(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,79621,e=>{"use strict";var t=e.i(43476);function r(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var s=r(),n={exec:()=>null};function l(e){let t=[];return r=>{let s=Math.max(0,Math.min(3,r-1)),n=t[s];return n||(n=e(s),t[s]=n),n}}function i(e,t=""){let r="string"==typeof e?e:e.source,s={replace:(e,t)=>{let n="string"==typeof t?t:t.source;return n=n.replace(o.caret,"$1"),r=r.replace(e,n),s},getRegex:()=>new RegExp(r,t)};return s}var a=((e="")=>{try{return!!RegExp("(?<=1)(?/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:l(e=>RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:l(e=>RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:l(e=>RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:l(e=>RegExp(`^ {0,${e}}#`)),htmlBeginRegex:l(e=>RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`,"i")),blockquoteBeginRegex:l(e=>RegExp(`^ {0,${e}}>`))},c=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,h=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,p=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,u=i(p).replace(/bull/g,h).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),d=i(p).replace(/bull/g,h).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),k=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,g=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,x=i(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",g).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),f=i(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,h).getRegex(),b="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",m=/|$))/,w=i("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",m).replace("tag",b).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),y=i(k).replace("hr",c).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",b).getRegex(),$={blockquote:i(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",y).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:x,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:c,html:w,lheading:u,list:f,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:y,table:n,text:/^[^\n]+/},S=i("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",c).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",b).getRegex(),R={...$,lheading:d,table:S,paragraph:i(k).replace("hr",c).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",S).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",b).getRegex()},T={...$,html:i(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",m).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:n,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:i(k).replace("hr",c).replace("heading",` *#{1,6} *[^ ]`).replace("lheading",u).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},z=/^( {2,}|\\)\n(?!\s*$)/,j=/[\p{P}\p{S}]/u,A=/[\s\p{P}\p{S}]/u,P=/[^\s\p{P}\p{S}]/u,N=i(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,A).getRegex(),v=/(?!~)[\p{P}\p{S}]/u,L=i(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?`+)[^`]+\k(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",a?"(?`+)[^`]+\k(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),_=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,C=i(_,"u").replace(/punct/g,j).getRegex(),I=i(_,"u").replace(/punct/g,v).getRegex(),q="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",B=i(q,"gu").replace(/notPunctSpace/g,P).replace(/punctSpace/g,A).replace(/punct/g,j).getRegex(),E=i(q,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,v).getRegex(),Z=i("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,P).replace(/punctSpace/g,A).replace(/punct/g,j).getRegex(),D=i(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,j).getRegex(),M=i("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,P).replace(/punctSpace/g,A).replace(/punct/g,j).getRegex(),Q=i(/\\(punct)/,"gu").replace(/punct/g,j).getRegex(),O=i(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),H=i(m).replace("(?:-->|$)","-->").getRegex(),G=i("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",H).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),F=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,U=i(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",F).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),W=i(/^!?\[(label)\]\[(ref)\]/).replace("label",F).replace("ref",g).getRegex(),X=i(/^!?\[(ref)\](?:\[\])?/).replace("ref",g).getRegex(),K=i("reflink|nolink(?!\\()","g").replace("reflink",W).replace("nolink",X).getRegex(),V=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,J={_backpedal:n,anyPunctuation:Q,autolink:O,blockSkip:L,br:z,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:n,delLDelim:n,delRDelim:n,emStrongLDelim:C,emStrongRDelimAst:B,emStrongRDelimUnd:Z,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:U,nolink:X,punctuation:N,reflink:W,reflinkSearch:K,tag:G,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},el=e=>en[e];function ei(e,t){if(t){if(o.escapeTest.test(e))return e.replace(o.escapeReplace,el)}else if(o.escapeTestNoEncode.test(e))return e.replace(o.escapeReplaceNoEncode,el);return e}function ea(e){try{e=encodeURI(e).replace(o.percentDecode,"%")}catch{return null}return e}function eo(e,t){let r=e.replace(o.findPipe,(e,t,r)=>{let s=!1,n=t;for(;--n>=0&&"\\"===r[n];)s=!s;return s?"|":" |"}).split(o.splitPipe),s=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length=0&&o.blankLine.test(t[r]);)r--;return t.length-r<=2?e:t.slice(0,r+1).join(` `)}function ep(e,t,r,s,n){let l=t.href,i=t.title||null,a=e[1].replace(n.other.outputLinkReplace,"$1");s.state.inLink=!0;let o={type:"!"===e[0].charAt(0)?"image":"link",raw:r,href:l,title:i,text:a,tokens:s.inlineTokens(a)};return s.state.inLink=!1,o}var eu=class{options;rules;lexer;constructor(e){this.options=e||s}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=this.options.pedantic?t[0]:eh(t[0]),r=e.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e,codeBlockStyle:"indented",text:r}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],r=function(e,t,r){let s=e.match(r.other.indentCodeCompensation);if(null===s)return t;let n=s[1];return t.split(` `).map(e=>{let t=e.match(r.other.beginningSpace);if(null===t)return e;let[s]=t;return s.length>=n.length?e.slice(n.length):e}).join(` `)}(e,t[3]||"",this.rules);return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=ec(e,"#");(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:"heading",raw:ec(t[0],` `),depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:ec(t[0],` `)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=ec(t[0],` `).split(` `),r="",s="",n=[];for(;e.length>0;){let t=!1,l=[],i;for(i=0;i1,n={type:"list",raw:"",ordered:s,start:s?+r.slice(0,-1):"",loose:!1,items:[]};r=s?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=s?r:"[*+-]");let l=this.rules.other.listItemRegex(r),i=!1;for(;e;){let r=!1,s="",a="";if(!(t=l.exec(e))||this.rules.block.hr.test(e))break;s=t[0],e=e.substring(s.length);let o=function(e,t=0){let r=t,s="";for(let t of e)if(" "===t){let e=4-r%4;s+=" ".repeat(e),r+=e}else s+=t,r++;return s}(t[2].split(` `,1)[0],t[1].length),c=e.split(` `,1)[0],h=!o.trim(),p=0;if(this.options.pedantic?(p=2,a=o.trimStart()):h?p=t[1].length+1:(p=(p=o.search(this.rules.other.nonSpaceChar))>4?1:p,a=o.slice(p),p+=t[1].length),h&&this.rules.other.blankLine.test(c)&&(s+=c+` `,e=e.substring(c.length+1),r=!0),!r){let t=this.rules.other.nextBulletRegex(p),r=this.rules.other.hrRegex(p),n=this.rules.other.fencesBeginRegex(p),l=this.rules.other.headingBeginRegex(p),i=this.rules.other.htmlBeginRegex(p),u=this.rules.other.blockquoteBeginRegex(p);for(;e;){let d=e.split(` `,1)[0],k;if(c=d,k=this.options.pedantic?c=c.replace(this.rules.other.listReplaceNesting," "):c.replace(this.rules.other.tabCharGlobal," "),n.test(c)||l.test(c)||i.test(c)||u.test(c)||t.test(c)||r.test(c))break;if(k.search(this.rules.other.nonSpaceChar)>=p||!c.trim())a+=` `+k.slice(p);else{if(h||o.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||n.test(o)||l.test(o)||r.test(o))break;a+=` `+c}h=!c.trim(),s+=d+` `,e=e.substring(d.length+1),o=k.slice(p)}}n.loose||(i?n.loose=!0:this.rules.other.doubleBlankLine.test(s)&&(i=!0)),n.items.push({type:"list_item",raw:s,task:!!this.options.gfm&&this.rules.other.listIsTask.test(a),loose:!1,text:a,tokens:[]}),n.raw+=s}let a=n.items.at(-1);if(!a)return;for(let e of(a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd(),n.raw=n.raw.trimEnd(),n.items)){this.lexer.state.top=!1,e.tokens=this.lexer.blockTokens(e.text,[]);let t=e.tokens[0];if(e.task&&(t?.type==="text"||t?.type==="paragraph")){e.text=e.text.replace(this.rules.other.listReplaceTask,""),t.raw=t.raw.replace(this.rules.other.listReplaceTask,""),t.text=t.text.replace(this.rules.other.listReplaceTask,"");for(let e=this.lexer.inlineQueue.length-1;e>=0;e--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[e].src)){this.lexer.inlineQueue[e].src=this.lexer.inlineQueue[e].src.replace(this.rules.other.listReplaceTask,"");break}let r=this.rules.other.listTaskCheckbox.exec(e.raw);if(r){let t={type:"checkbox",raw:r[0]+" ",checked:"[ ]"!==r[0]};e.checked=t.checked,n.loose?e.tokens[0]&&["paragraph","text"].includes(e.tokens[0].type)&&"tokens"in e.tokens[0]&&e.tokens[0].tokens?(e.tokens[0].raw=t.raw+e.tokens[0].raw,e.tokens[0].text=t.raw+e.tokens[0].text,e.tokens[0].tokens.unshift(t)):e.tokens.unshift({type:"paragraph",raw:t.raw,text:t.raw,tokens:[t]}):e.tokens.unshift(t)}}else e.task&&(e.task=!1);if(!n.loose){let t=e.tokens.filter(e=>"space"===e.type);n.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}}if(n.loose)for(let e of n.items)for(let t of(e.loose=!0,e.tokens))"text"===t.type&&(t.type="paragraph");return n}}html(e){let t=this.rules.block.html.exec(e);if(t){let e=eh(t[0]);return{type:"html",block:!0,raw:e,pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:e}}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:ec(t[0],` `),href:r,title:s}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let r=eo(t[1]),s=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),n=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(` `):[],l={type:"table",raw:ec(t[0],` `),header:[],align:[],rows:[]};if(r.length===s.length){for(let e of s)this.rules.other.tableAlignRight.test(e)?l.align.push("right"):this.rules.other.tableAlignCenter.test(e)?l.align.push("center"):this.rules.other.tableAlignLeft.test(e)?l.align.push("left"):l.align.push(null);for(let e=0;e({text:e,tokens:this.lexer.inline(e),header:!1,align:l.align[t]})));return l}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let e=t[1].trim();return{type:"heading",raw:ec(t[0],` `),depth:"="===t[2].charAt(0)?1:2,text:e,tokens:this.lexer.inline(e)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===` `?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=ec(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{let e=function(e,t){if(-1===e.indexOf(")"))return -1;let r=0;for(let t=0;t0?-2:-1}(t[2],0);if(-2===e)return;if(e>-1){let r=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,r).trim(),t[3]=""}}let r=t[2],s="";if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(r);e&&(r=e[1],s=e[3])}else s=t[3]?t[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(r=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?r.slice(1):r.slice(1,-1)),ep(t,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){let e=t[(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!e){let e=r[0].charAt(0);return{type:"text",raw:e,text:e}}return ep(r,e,r[0],this.lexer,this.rules)}}emStrong(e,t,r=""){let s=this.rules.inline.emStrongLDelim.exec(e);if(!(!s||!s[1]&&!s[2]&&!s[3]&&!s[4]||s[4]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[3])||!r||this.rules.inline.punctuation.exec(r))){let r=[...s[0]].length-1,n,l,i=r,a=0,o="*"===s[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(o.lastIndex=0,t=t.slice(-1*e.length+r);null!==(s=o.exec(t));){if(!(n=s[1]||s[2]||s[3]||s[4]||s[5]||s[6]))continue;if(l=[...n].length,s[3]||s[4]){i+=l;continue}if((s[5]||s[6])&&r%3&&!((r+l)%3)){a+=l;continue}if((i-=l)>0)continue;l=Math.min(l,l+i+a);let t=[...s[0]][0].length,o=e.slice(0,r+s.index+t+l);if(Math.min(r,l)%2){let e=o.slice(1,-1);return{type:"em",raw:o,text:e,tokens:this.lexer.inlineTokens(e)}}let c=o.slice(2,-2);return{type:"strong",raw:o,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(e),s=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return r&&s&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,r=""){let s=this.rules.inline.delLDelim.exec(e);if(s&&(!s[1]||!r||this.rules.inline.punctuation.exec(r))){let r=[...s[0]].length-1,n,l,i=r,a=this.rules.inline.delRDelim;for(a.lastIndex=0,t=t.slice(-1*e.length+r);null!==(s=a.exec(t));){if(!(n=s[1]||s[2]||s[3]||s[4]||s[5]||s[6])||(l=[...n].length)!==r)continue;if(s[3]||s[4]){i+=l;continue}if((i-=l)>0)continue;l=Math.min(l,l+i);let t=[...s[0]][0].length,a=e.slice(0,r+s.index+t+l),o=a.slice(r,-r);return{type:"del",raw:a,text:o,tokens:this.lexer.inlineTokens(o)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,r;return r="@"===t[2]?"mailto:"+(e=t[1]):e=t[1],{type:"link",raw:t[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,r;if("@"===t[2])r="mailto:"+(e=t[0]);else{let s;do s=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(s!==t[0])e=t[0],r="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:e}}}},ed=class e{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||s,this.options.tokenizer=this.options.tokenizer||new eu,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:o,block:er.normal,inline:es.normal};this.options.pedantic?(t.block=er.pedantic,t.inline=es.pedantic):this.options.gfm&&(t.block=er.gfm,this.options.breaks?t.inline=es.breaks:t.inline=es.gfm),this.tokenizer.rules=t}static get rules(){return{block:er,inline:es}}static lex(t,r){return new e(r).lex(t)}static lexInline(t,r){return new e(r).inlineTokens(t)}lex(e){e=e.replace(o.carriageReturn,` `),this.blockTokens(e,this.tokens);for(let e=0;e!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))continue;if(n=this.tokenizer.space(e)){e=e.substring(n.raw.length);let r=t.at(-1);1===n.raw.length&&void 0!==r?r.raw+=` `:t.push(n);continue}if(n=this.tokenizer.code(e)){e=e.substring(n.raw.length);let r=t.at(-1);r?.type==="paragraph"||r?.type==="text"?(r.raw+=(r.raw.endsWith(` `)?"":` `)+n.raw,r.text+=` `+n.text,this.inlineQueue.at(-1).src=r.text):t.push(n);continue}if((n=this.tokenizer.fences(e))||(n=this.tokenizer.heading(e))||(n=this.tokenizer.hr(e))||(n=this.tokenizer.blockquote(e))||(n=this.tokenizer.list(e))||(n=this.tokenizer.html(e))){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.def(e)){e=e.substring(n.raw.length);let r=t.at(-1);r?.type==="paragraph"||r?.type==="text"?(r.raw+=(r.raw.endsWith(` `)?"":` `)+n.raw,r.text+=` `+n.raw,this.inlineQueue.at(-1).src=r.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title},t.push(n));continue}if((n=this.tokenizer.table(e))||(n=this.tokenizer.lheading(e))){e=e.substring(n.raw.length),t.push(n);continue}let l=e;if(this.options.extensions?.startBlock){let t=1/0,r=e.slice(1),s;this.options.extensions.startBlock.forEach(e=>{"number"==typeof(s=e.call({lexer:this},r))&&s>=0&&(t=Math.min(t,s))}),t<1/0&&t>=0&&(l=e.substring(0,t+1))}if(this.state.top&&(n=this.tokenizer.paragraph(l))){let s=t.at(-1);r&&s?.type==="paragraph"?(s.raw+=(s.raw.endsWith(` `)?"":` `)+n.raw,s.text+=` `+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):t.push(n),r=l.length!==e.length,e=e.substring(n.raw.length);continue}if(n=this.tokenizer.text(e)){e=e.substring(n.raw.length);let r=t.at(-1);r?.type==="text"?(r.raw+=(r.raw.endsWith(` `)?"":` `)+n.raw,r.text+=` `+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):t.push(n);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let r;this.tokenizer.lexer=this;let s=e,n=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;null!==(n=this.tokenizer.rules.inline.reflinkSearch.exec(s));)e.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!==(n=this.tokenizer.rules.inline.anyPunctuation.exec(s));)s=s.slice(0,n.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!==(n=this.tokenizer.rules.inline.blockSkip.exec(s));)r=n[2]?n[2].length:0,s=s.slice(0,n.index+r)+"["+"a".repeat(n[0].length-r-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);s=this.options.hooks?.emStrongMask?.call({lexer:this},s)??s;let l=!1,i="",a=1/0;for(;e;){let r;if(e.length!!(r=s.call({lexer:this},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0)))continue;if((r=this.tokenizer.escape(e))||(r=this.tokenizer.tag(e))||(r=this.tokenizer.link(e))){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length);let s=t.at(-1);"text"===r.type&&s?.type==="text"?(s.raw+=r.raw,s.text+=r.text):t.push(r);continue}if((r=this.tokenizer.emStrong(e,s,i))||(r=this.tokenizer.codespan(e))||(r=this.tokenizer.br(e))||(r=this.tokenizer.del(e,s,i))||(r=this.tokenizer.autolink(e))||!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),t.push(r);continue}let n=e;if(this.options.extensions?.startInline){let t=1/0,r=e.slice(1),s;this.options.extensions.startInline.forEach(e=>{"number"==typeof(s=e.call({lexer:this},r))&&s>=0&&(t=Math.min(t,s))}),t<1/0&&t>=0&&(n=e.substring(0,t+1))}if(r=this.tokenizer.inlineText(n)){e=e.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(i=r.raw.slice(-1)),l=!0;let s=t.at(-1);s?.type==="text"?(s.raw+=r.raw,s.text+=r.text):t.push(r);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return t}infiniteLoopError(e){let t="Infinite loop on byte: "+e;if(this.options.silent)console.error(t);else throw Error(t)}},ek=class{options;parser;constructor(e){this.options=e||s}space(e){return""}code({text:e,lang:t,escaped:r}){let s=(t||"").match(o.notSpaceStart)?.[0],n=e.replace(o.endingNewline,"")+` `;return s?'
'+(r?n:ei(n,!0))+`
`:"
"+(r?n:ei(n,!0))+`
`}blockquote({tokens:e}){return`
${this.parser.parse(e)}
`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`${this.parser.parseInline(e)} `}hr(e){return`
`}list(e){let t=e.ordered,r=e.start,s="";for(let t=0;t `+s+" `}listitem(e){return`
  • ${this.parser.parse(e.tokens)}
  • `}checkbox({checked:e}){return" '}paragraph({tokens:e}){return`

    ${this.parser.parseInline(e)}

    `}table(e){let t="",r="";for(let t=0;t${s}`),` `+t+` `+s+`
    `}tablerow({text:e}){return` ${e} `}tablecell(e){let t=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+` `}strong({tokens:e}){return`${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${ei(e,!0)}`}br(e){return"
    "}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:t,tokens:r}){let s=this.parser.parseInline(r),n=ea(e);if(null===n)return s;let l='
    "}image({href:e,title:t,text:r,tokens:s}){s&&(r=this.parser.parseInline(s,this.parser.textRenderer));let n=ea(e);if(null===n)return ei(r);e=n;let l=`${ei(r)}{let n=e[s].flat(1/0);r=r.concat(this.walkTokens(n,t))}):e.tokens&&(r=r.concat(this.walkTokens(e.tokens,t)))}}return r}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let r={...e};if(r.async=this.defaults.async||r.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error("extension name required");if("renderer"in e){let r=t.renderers[e.name];r?t.renderers[e.name]=function(...t){let s=e.renderer.apply(this,t);return!1===s&&(s=r.apply(this,t)),s}:t.renderers[e.name]=e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw Error("extension level must be 'block' or 'inline'");let r=t[e.level];r?r.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),r.extensions=t),e.renderer){let t=this.defaults.renderer||new ek(this.defaults);for(let r in e.renderer){if(!(r in t))throw Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;let s=e.renderer[r],n=t[r];t[r]=(...e)=>{let r=s.apply(t,e);return!1===r&&(r=n.apply(t,e)),r||""}}r.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new eu(this.defaults);for(let r in e.tokenizer){if(!(r in t))throw Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;let s=e.tokenizer[r],n=t[r];t[r]=(...e)=>{let r=s.apply(t,e);return!1===r&&(r=n.apply(t,e)),r}}r.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new ef;for(let r in e.hooks){if(!(r in t))throw Error(`hook '${r}' does not exist`);if(["options","block"].includes(r))continue;let s=e.hooks[r],n=t[r];ef.passThroughHooks.has(r)?t[r]=e=>{if(this.defaults.async&&ef.passThroughHooksRespectAsync.has(r))return(async()=>{let r=await s.call(t,e);return n.call(t,r)})();let l=s.call(t,e);return n.call(t,l)}:t[r]=(...e)=>{if(this.defaults.async)return(async()=>{let r=await s.apply(t,e);return!1===r&&(r=await n.apply(t,e)),r})();let r=s.apply(t,e);return!1===r&&(r=n.apply(t,e)),r}}r.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,s=e.walkTokens;r.walkTokens=function(e){let r=[];return r.push(s.call(this,e)),t&&(r=r.concat(t.call(this,e))),r}}this.defaults={...this.defaults,...r}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return ed.lex(e,t??this.defaults)}parser(e,t){return ex.parse(e,t??this.defaults)}parseMarkdown(e){return(t,r)=>{let s={...r},n={...this.defaults,...s},l=this.onError(!!n.silent,!!n.async);if(!0===this.defaults.async&&!1===s.async)return l(Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||null===t)return l(Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return l(Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(n.hooks&&(n.hooks.options=n,n.hooks.block=e),n.async)return(async()=>{let r=n.hooks?await n.hooks.preprocess(t):t,s=await (n.hooks?await n.hooks.provideLexer(e):e?ed.lex:ed.lexInline)(r,n),l=n.hooks?await n.hooks.processAllTokens(s):s;n.walkTokens&&await Promise.all(this.walkTokens(l,n.walkTokens));let i=await (n.hooks?await n.hooks.provideParser(e):e?ex.parse:ex.parseInline)(l,n);return n.hooks?await n.hooks.postprocess(i):i})().catch(l);try{n.hooks&&(t=n.hooks.preprocess(t));let r=(n.hooks?n.hooks.provideLexer(e):e?ed.lex:ed.lexInline)(t,n);n.hooks&&(r=n.hooks.processAllTokens(r)),n.walkTokens&&this.walkTokens(r,n.walkTokens);let s=(n.hooks?n.hooks.provideParser(e):e?ex.parse:ex.parseInline)(r,n);return n.hooks&&(s=n.hooks.postprocess(s)),s}catch(e){return l(e)}}}onError(e,t){return r=>{if(r.message+=` Please report this to https://github.com/markedjs/marked.`,e){let e="

    An error occurred:

    "+ei(r.message+"",!0)+"
    ";return t?Promise.resolve(e):e}if(t)return Promise.reject(r);throw r}}};function em(e,t){return eb.parse(e,t)}em.options=em.setOptions=function(e){return eb.setOptions(e),em.defaults=eb.defaults,s=em.defaults,em},em.getDefaults=r,em.defaults=s,em.use=function(...e){return eb.use(...e),em.defaults=eb.defaults,s=em.defaults,em},em.walkTokens=function(e,t){return eb.walkTokens(e,t)},em.parseInline=eb.parseInline,em.Parser=ex,em.parser=ex.parse,em.Renderer=ek,em.TextRenderer=eg,em.Lexer=ed,em.lexer=ed.lex,em.Tokenizer=eu,em.Hooks=ef,em.parse=em,em.options,em.setOptions,em.use,em.walkTokens,em.parseInline,ex.parse,ed.lex;var ew=e.i(71645),ey=e.i(21274),e$=e.i(23975),eS=e.i(38149),eR=e.i(85665),eT=e.i(11110);function ez(){let{tl:e}=(0,eT.useLanguage)(),[r,s]=(0,ew.useState)(""),[n,l]=(0,ew.useState)(""),[i,a]=(0,ew.useState)(!1),o=e.mdToPdf.content,c=(0,ew.useMemo)(()=>ed.lex(r),[r]),h=(0,ew.useCallback)(async e=>{let t=e[0];if(t)try{let e=await t.text();s(e),l(t.name),a(!1)}catch(e){console.error(e)}},[]),p=r.trim().length>0;return(0,t.jsxs)(eS.default,{title:e.mdToPdf.title,description:e.mdToPdf.desc,color:"green",icon:(0,t.jsxs)("svg",{viewBox:"0 0 24 24",className:"w-7 h-7 text-white",fill:"none",stroke:"currentColor",strokeWidth:2,children:[(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7 4h7l5 5v11a2 2 0 01-2 2H7a2 2 0 01-2-2V6a2 2 0 012-2z"}),(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14 4v5h5M8 15l2 2 2-2m-2 2v-6M14 17h3"})]}),children:[(0,t.jsxs)("div",{className:"space-y-6 no-print",children:[(0,t.jsx)(e$.default,{onFiles:h,accept:{"text/markdown":[".md",".markdown"],"text/plain":[".md",".markdown"],"application/octet-stream":[".md",".markdown"]},label:e.mdToPdf.dropLabel,sublabel:e.mdToPdf.dropSublabel,color:"green"}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)("label",{htmlFor:"markdown-input",className:"text-sm font-semibold text-slate-700 dark:text-slate-200",children:e.mdToPdf.inputLabel}),n&&(0,t.jsxs)("span",{className:"min-w-0 truncate text-xs text-slate-500 dark:text-slate-400",children:[e.mdToPdf.fileLabel,": ",n]})]}),(0,t.jsx)("textarea",{id:"markdown-input",value:r,onChange:e=>{s(e.target.value),a(!1)},placeholder:e.mdToPdf.inputPlaceholder,className:"min-h-[320px] w-full resize-y rounded-xl border border-slate-200 bg-white p-4 font-mono text-sm leading-6 text-slate-800 outline-none transition-colors placeholder:text-slate-400 focus:border-green-500 focus:ring-2 focus:ring-green-500/20 dark:border-slate-700 dark:bg-slate-800 dark:text-slate-100 dark:placeholder:text-slate-500"})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row",children:[(0,t.jsx)("button",{onClick:()=>{r.trim()&&(a(!1),window.print(),setTimeout(()=>a(!0),300))},disabled:!p,className:"flex flex-1 items-center justify-center gap-2 rounded-xl bg-green-600 py-3 font-semibold text-white transition-colors hover:bg-green-700 disabled:opacity-50",children:e.mdToPdf.convertBtn}),(0,t.jsx)("button",{onClick:()=>{s(""),l(""),a(!1)},className:"rounded-xl border border-slate-200 px-4 py-3 text-slate-600 transition-colors hover:bg-slate-50 dark:border-slate-700 dark:text-slate-300 dark:hover:bg-slate-800",children:e.mdToPdf.reset})]}),i&&(0,t.jsxs)("div",{className:"space-y-5",children:[(0,t.jsx)("p",{className:"rounded-xl border border-green-200 bg-green-50 px-4 py-3 text-sm text-green-700 dark:border-green-900 dark:bg-green-900/20 dark:text-green-300",children:e.mdToPdf.done}),(0,t.jsx)(ey.default,{})]})]}),p&&(0,t.jsxs)("section",{className:"mt-8 rounded-xl border border-slate-200 bg-white p-5 shadow-sm dark:border-slate-700 dark:bg-slate-900",children:[(0,t.jsxs)("div",{className:"no-print mb-4 flex items-center justify-between gap-3 border-b border-slate-200 pb-3 dark:border-slate-700",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-slate-700 dark:text-slate-200",children:e.mdToPdf.previewLabel}),n&&(0,t.jsx)("span",{className:"min-w-0 truncate text-xs text-slate-500 dark:text-slate-400",children:n})]}),(0,t.jsx)("article",{className:"print-document mx-auto max-w-[820px] bg-white px-6 py-8 text-slate-900 sm:px-10",children:(0,t.jsx)(ej,{tokens:c})})]}),!p&&(0,t.jsx)("section",{className:"mt-8 rounded-xl border border-dashed border-slate-200 bg-slate-50 p-8 text-center dark:border-slate-700 dark:bg-slate-800/50",children:(0,t.jsx)("p",{className:"text-sm text-slate-400 dark:text-slate-500",children:e.mdToPdf.previewPlaceholder})}),(0,t.jsxs)("div",{className:"no-print mt-12 space-y-12",children:[(0,t.jsx)(eR.default,{title:o.howTo.title,children:(0,t.jsx)("div",{className:"grid grid-cols-1 gap-5 sm:grid-cols-3",children:o.howTo.steps.map((e,r)=>(0,t.jsxs)("div",{className:"rounded-xl border border-slate-200 bg-white p-5 dark:border-slate-700 dark:bg-slate-800",children:[(0,t.jsxs)("div",{className:"mb-2 text-lg font-bold text-slate-400 dark:text-slate-500",children:["0",r+1]}),(0,t.jsx)("h3",{className:"mb-1 font-semibold text-slate-800 dark:text-slate-100",children:e.title}),(0,t.jsx)("p",{className:"text-sm text-slate-500 dark:text-slate-400",children:e.desc})]},e.title))})}),(0,t.jsxs)(eR.default,{title:o.about.title,children:[(0,t.jsx)("p",{className:"mb-6 text-slate-500 dark:text-slate-400",children:o.about.description}),(0,t.jsx)("div",{className:"space-y-5",children:o.about.methods.map(e=>(0,t.jsxs)("div",{className:"rounded-xl border border-slate-200 bg-slate-50 p-5 dark:border-slate-700 dark:bg-slate-800/50",children:[(0,t.jsx)("h3",{className:"mb-1 font-semibold text-slate-800 dark:text-slate-100",children:e.title}),(0,t.jsx)("p",{className:"text-sm text-slate-500 dark:text-slate-400",children:e.desc})]},e.title))})]}),(0,t.jsx)(eR.default,{title:o.faq.title,children:(0,t.jsx)("div",{className:"space-y-4",children:o.faq.items.map(e=>(0,t.jsxs)("details",{className:"cursor-pointer rounded-xl border border-slate-200 bg-slate-50 p-4 dark:border-slate-700 dark:bg-slate-800/50",children:[(0,t.jsx)("summary",{className:"font-semibold text-slate-800 dark:text-slate-100",children:e.q}),(0,t.jsx)("p",{className:"mt-2 text-sm text-slate-500 dark:text-slate-400",children:e.a})]},e.q))})})]})]})}function ej({tokens:e}){return(0,t.jsx)(t.Fragment,{children:e.map((e,r)=>(function e(r,s){switch(r.type){case"heading":{let e=Math.min(Math.max(r.depth??2,1),6),n=`h${e}`;return(0,t.jsx)(n,{className:`${["text-3xl","text-2xl","text-xl","text-lg","text-base","text-sm"][e-1]} mb-3 mt-7 break-words font-bold leading-tight text-slate-950 first:mt-0`,children:eA(r.tokens,r.text)},s)}case"paragraph":return(0,t.jsx)("p",{className:"mb-4 break-words text-base leading-7 text-slate-800",children:eA(r.tokens,r.text)},s);case"space":return null;case"hr":return(0,t.jsx)("hr",{className:"my-8 border-slate-300"},s);case"blockquote":return(0,t.jsx)("blockquote",{className:"my-5 border-l-4 border-slate-300 pl-4 text-slate-700",children:(r.tokens??[]).map((t,r)=>e(t,`${s}-${r}`))},s);case"list":{let n=r.ordered?"ol":"ul";return(0,t.jsx)(n,{className:`mb-5 pl-7 text-slate-800 ${r.ordered?"list-decimal":"list-disc"}`,children:(r.items??[]).map((r,n)=>(0,t.jsx)("li",{className:"mb-2 leading-7",children:r.tokens?.length?r.tokens.map((t,r)=>e(t,`${s}-${n}-${r}`)):eA(r.tokens,r.text)},`${s}-${n}`))},s)}case"code":return(0,t.jsx)("pre",{className:"mb-5 overflow-x-auto rounded-lg bg-slate-100 p-4 text-sm leading-6 text-slate-900",children:(0,t.jsx)("code",{children:r.text})},s);case"html":return(0,t.jsx)("pre",{className:"mb-5 whitespace-pre-wrap rounded-lg bg-slate-100 p-4 text-sm leading-6 text-slate-700",children:(0,t.jsx)("code",{children:r.text})},s);default:return r.text?(0,t.jsx)("p",{className:"mb-4 break-words text-base leading-7 text-slate-800",children:r.text},s):null}})(e,`block-${r}`))})}function eA(e,r=""){return e?.length?e.map((e,r)=>{let s=`inline-${r}`;switch(e.type){case"strong":return(0,t.jsx)("strong",{children:eA(e.tokens,e.text)},s);case"em":return(0,t.jsx)("em",{children:eA(e.tokens,e.text)},s);case"codespan":return(0,t.jsx)("code",{className:"rounded bg-slate-100 px-1.5 py-0.5 font-mono text-sm text-slate-900",children:e.text},s);case"link":return(0,t.jsx)("a",{href:e.href,title:e.title,className:"text-green-700 underline underline-offset-2",children:eA(e.tokens,e.text)},s);case"br":return(0,t.jsx)("br",{},s);case"del":return(0,t.jsx)("del",{children:eA(e.tokens,e.text)},s);default:return e.tokens?.length?eA(e.tokens,e.text):e.text}}):r}e.s(["default",()=>ez],79621)}]);