@visulima/vite-overlay 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js ADDED
@@ -0,0 +1,1014 @@
1
+ var Ro=Object.defineProperty;var $=(t,e)=>Ro(t,"name",{value:e,configurable:!0});import{renderError as To,getErrorCauses as Ao}from"@visulima/error/error";import{ruleBasedFinder as cr,errorHintFinder as dr}from"@visulima/error/solution";import{parseStacktrace as jo}from"@visulima/error/stacktrace";import{boxen as Bo}from"@visulima/boxen";import{readFile as mt}from"node:fs/promises";import{fileURLToPath as Oo}from"node:url";import{parseStacktrace as ve,formatStacktrace as pr,codeFrame as Ot}from"@visulima/error";import Do from"@visulima/error/solution/ai/prompt";import{TraceMap as Io,originalPositionFor as Ho}from"@jridgewell/trace-mapping";import{stripVTControlCharacters as qo}from"node:util";import Zo from"node:fs";import Y from"node:path";import{distance as Ie}from"fastest-levenshtein";var Vo=Object.defineProperty,z=$((t,e)=>Vo(t,"name",{value:e,configurable:!0}),"g$7");function We(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}$(We,"q$1");z(We,"L");var ue=We();function gt(t){ue=t}$(gt,"le");z(gt,"G");var Se={exec:z(()=>null,"exec")};function C(t,e=""){let r=typeof t=="string"?t:t.source,n={replace:z((o,s)=>{let i=typeof s=="string"?s:s.source;return i=i.replace(q.caret,"$1"),r=r.replace(o,i),n},"replace"),getRegex:z(()=>new RegExp(r,e),"getRegex")};return n}$(C,"u$6");z(C,"h");var q={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,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,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:z(t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),"listItemRegex"),nextBulletRegex:z(t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),"nextBulletRegex"),hrRegex:z(t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),"hrRegex"),fencesBeginRegex:z(t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),"fencesBeginRegex"),headingBeginRegex:z(t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),"headingBeginRegex"),htmlBeginRegex:z(t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i"),"htmlBeginRegex")},Uo=/^(?:[ \t]*(?:\n|$))+/,No=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Wo=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Pe=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Go=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,ft=/(?:[*+-]|\d{1,9}[.)])/,ur=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,hr=C(ur).replace(/bull/g,ft).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(),Qo=C(ur).replace(/bull/g,ft).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(),wt=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Xo=/^[^\n]+/,vt=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Jo=C(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",vt).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Yo=C(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,ft).getRegex(),Ge="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",bt=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Ko=C("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",bt).replace("tag",Ge).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),mr=C(wt).replace("hr",Pe).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[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ge).getRegex(),en=C(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",mr).getRegex(),kt={blockquote:en,code:No,def:Jo,fences:Wo,heading:Go,hr:Pe,html:Ko,lheading:hr,list:Yo,newline:Uo,paragraph:mr,table:Se,text:Xo},Dt=C("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Pe).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[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ge).getRegex(),tn={...kt,lheading:Qo,table:Dt,paragraph:C(wt).replace("hr",Pe).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Dt).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ge).getRegex()},rn={...kt,html:C(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",bt).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:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Se,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:C(wt).replace("hr",Pe).replace("heading",` *#{1,6} *[^
2
+ ]`).replace("lheading",hr).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},on=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,nn=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,gr=/^( {2,}|\\)\n(?!\s*$)/,sn=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Qe=/[\p{P}\p{S}]/u,yt=/[\s\p{P}\p{S}]/u,fr=/[^\s\p{P}\p{S}]/u,an=C(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,yt).getRegex(),wr=/(?!~)[\p{P}\p{S}]/u,ln=/(?!~)[\s\p{P}\p{S}]/u,cn=/(?:[^\s\p{P}\p{S}]|~)/u,dn=/\[[^\[\]]*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g,vr=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,pn=C(vr,"u").replace(/punct/g,Qe).getRegex(),un=C(vr,"u").replace(/punct/g,wr).getRegex(),br="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",hn=C(br,"gu").replace(/notPunctSpace/g,fr).replace(/punctSpace/g,yt).replace(/punct/g,Qe).getRegex(),mn=C(br,"gu").replace(/notPunctSpace/g,cn).replace(/punctSpace/g,ln).replace(/punct/g,wr).getRegex(),gn=C("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,fr).replace(/punctSpace/g,yt).replace(/punct/g,Qe).getRegex(),fn=C(/\\(punct)/,"gu").replace(/punct/g,Qe).getRegex(),wn=C(/^<(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(),vn=C(bt).replace("(?:-->|$)","-->").getRegex(),bn=C("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",vn).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),He=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/,kn=C(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",He).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),kr=C(/^!?\[(label)\]\[(ref)\]/).replace("label",He).replace("ref",vt).getRegex(),yr=C(/^!?\[(ref)\](?:\[\])?/).replace("ref",vt).getRegex(),yn=C("reflink|nolink(?!\\()","g").replace("reflink",kr).replace("nolink",yr).getRegex(),xt={_backpedal:Se,anyPunctuation:fn,autolink:wn,blockSkip:dn,br:gr,code:nn,del:Se,emStrongLDelim:pn,emStrongRDelimAst:hn,emStrongRDelimUnd:gn,escape:on,link:kn,nolink:yr,punctuation:an,reflink:kr,reflinkSearch:yn,tag:bn,text:sn,url:Se},xn={...xt,link:C(/^!?\[(label)\]\((.*?)\)/).replace("label",He).getRegex(),reflink:C(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",He).getRegex()},nt={...xt,emStrongRDelimAst:mn,emStrongLDelim:un,url:C(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},$n={...nt,br:C(gr).replace("{2,}","*").getRegex(),text:C(nt.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Oe={normal:kt,gfm:tn,pedantic:rn},$e={normal:xt,gfm:nt,breaks:$n,pedantic:xn},_n={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},It=z(t=>_n[t],"ke");function J(t,e){if(e){if(q.escapeTest.test(t))return t.replace(q.escapeReplace,It)}else if(q.escapeTestNoEncode.test(t))return t.replace(q.escapeReplaceNoEncode,It);return t}$(J,"m$9");z(J,"w");function it(t){try{t=encodeURI(t).replace(q.percentDecode,"%")}catch{return null}return t}$(it,"ne");z(it,"J");function st(t,e){let r=t.replace(q.findPipe,(s,i,a)=>{let l=!1,c=i;for(;--c>=0&&a[c]==="\\";)l=!l;return l?"|":" |"}),n=r.split(q.splitPipe),o=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;o<n.length;o++)n[o]=n[o].trim().replace(q.slashPipe,"|");return n}$(st,"se");z(st,"V");function we(t,e,r){let n=t.length;if(n===0)return"";let o=0;for(;o<n;){let s=t.charAt(n-o-1);if(s===e&&!r)o++;else if(s!==e&&r)o++;else break}return t.slice(0,n-o)}$(we,"_$2");z(we,"z");function xr(t,e){if(t.indexOf(e[1])===-1)return-1;let r=0;for(let n=0;n<t.length;n++)if(t[n]==="\\")n++;else if(t[n]===e[0])r++;else if(t[n]===e[1]&&(r--,r<0))return n;return r>0?-2:-1}$(xr,"Ye");z(xr,"ge");function at(t,e,r,n,o){let s=e.href,i=e.title||null,a=t[1].replace(o.other.outputLinkReplace,"$1");n.state.inLink=!0;let l={type:t[0].charAt(0)==="!"?"image":"link",raw:r,href:s,title:i,text:a,tokens:n.inlineTokens(a)};return n.state.inLink=!1,l}$(at,"ie");z(at,"fe");function $r(t,e,r){let n=t.match(r.other.indentCodeCompensation);if(n===null)return e;let o=n[1];return e.split(`
3
+ `).map(s=>{let i=s.match(r.other.beginningSpace);if(i===null)return s;let[a]=i;return a.length>=o.length?s.slice(o.length):s}).join(`
4
+ `)}$($r,"et");z($r,"Je");var qe=class{static{$(this,"I")}static{z(this,"y")}options;rules;lexer;constructor(e){this.options=e||ue}space(e){let r=this.rules.block.newline.exec(e);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(e){let r=this.rules.block.code.exec(e);if(r){let n=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?n:we(n,`
5
+ `)}}}fences(e){let r=this.rules.block.fences.exec(e);if(r){let n=r[0],o=$r(n,r[3]||"",this.rules);return{type:"code",raw:n,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:o}}}heading(e){let r=this.rules.block.heading.exec(e);if(r){let n=r[2].trim();if(this.rules.other.endingHash.test(n)){let o=we(n,"#");(this.options.pedantic||!o||this.rules.other.endingSpaceChar.test(o))&&(n=o.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let r=this.rules.block.hr.exec(e);if(r)return{type:"hr",raw:we(r[0],`
6
+ `)}}blockquote(e){let r=this.rules.block.blockquote.exec(e);if(r){let n=we(r[0],`
7
+ `).split(`
8
+ `),o="",s="",i=[];for(;n.length>0;){let a=!1,l=[],c;for(c=0;c<n.length;c++)if(this.rules.other.blockquoteStart.test(n[c]))l.push(n[c]),a=!0;else if(!a)l.push(n[c]);else break;n=n.slice(c);let p=l.join(`
9
+ `),f=p.replace(this.rules.other.blockquoteSetextReplace,`
10
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");o=o?`${o}
11
+ ${p}`:p,s=s?`${s}
12
+ ${f}`:f;let h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(f,i,!0),this.lexer.state.top=h,n.length===0)break;let m=i.at(-1);if(m?.type==="code")break;if(m?.type==="blockquote"){let w=m,g=w.raw+`
13
+ `+n.join(`
14
+ `),y=this.blockquote(g);i[i.length-1]=y,o=o.substring(0,o.length-w.raw.length)+y.raw,s=s.substring(0,s.length-w.text.length)+y.text;break}else if(m?.type==="list"){let w=m,g=w.raw+`
15
+ `+n.join(`
16
+ `),y=this.list(g);i[i.length-1]=y,o=o.substring(0,o.length-m.raw.length)+y.raw,s=s.substring(0,s.length-w.raw.length)+y.raw,n=g.substring(i.at(-1).raw.length).split(`
17
+ `);continue}}return{type:"blockquote",raw:o,tokens:i,text:s}}}list(e){let r=this.rules.block.list.exec(e);if(r){let n=r[1].trim(),o=n.length>1,s={type:"list",raw:"",ordered:o,start:o?+n.slice(0,-1):"",loose:!1,items:[]};n=o?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=o?n:"[*+-]");let i=this.rules.other.listItemRegex(n),a=!1;for(;e;){let c=!1,p="",f="";if(!(r=i.exec(e))||this.rules.block.hr.test(e))break;p=r[0],e=e.substring(p.length);let h=r[2].split(`
18
+ `,1)[0].replace(this.rules.other.listReplaceTabs,S=>" ".repeat(3*S.length)),m=e.split(`
19
+ `,1)[0],w=!h.trim(),g=0;if(this.options.pedantic?(g=2,f=h.trimStart()):w?g=r[1].length+1:(g=r[2].search(this.rules.other.nonSpaceChar),g=g>4?1:g,f=h.slice(g),g+=r[1].length),w&&this.rules.other.blankLine.test(m)&&(p+=m+`
20
+ `,e=e.substring(m.length+1),c=!0),!c){let S=this.rules.other.nextBulletRegex(g),R=this.rules.other.hrRegex(g),H=this.rules.other.fencesBeginRegex(g),V=this.rules.other.headingBeginRegex(g),x=this.rules.other.htmlBeginRegex(g);for(;e;){let B=e.split(`
21
+ `,1)[0],te;if(m=B,this.options.pedantic?(m=m.replace(this.rules.other.listReplaceNesting," "),te=m):te=m.replace(this.rules.other.tabCharGlobal," "),H.test(m)||V.test(m)||x.test(m)||S.test(m)||R.test(m))break;if(te.search(this.rules.other.nonSpaceChar)>=g||!m.trim())f+=`
22
+ `+te.slice(g);else{if(w||h.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||H.test(h)||V.test(h)||R.test(h))break;f+=`
23
+ `+m}!w&&!m.trim()&&(w=!0),p+=B+`
24
+ `,e=e.substring(B.length+1),h=te.slice(g)}}s.loose||(a?s.loose=!0:this.rules.other.doubleBlankLine.test(p)&&(a=!0));let y=null,E;this.options.gfm&&(y=this.rules.other.listIsTask.exec(f),y&&(E=y[0]!=="[ ] ",f=f.replace(this.rules.other.listReplaceTask,""))),s.items.push({type:"list_item",raw:p,task:!!y,checked:E,loose:!1,text:f,tokens:[]}),s.raw+=p}let l=s.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;s.raw=s.raw.trimEnd();for(let c=0;c<s.items.length;c++)if(this.lexer.state.top=!1,s.items[c].tokens=this.lexer.blockTokens(s.items[c].text,[]),!s.loose){let p=s.items[c].tokens.filter(h=>h.type==="space"),f=p.length>0&&p.some(h=>this.rules.other.anyLine.test(h.raw));s.loose=f}if(s.loose)for(let c=0;c<s.items.length;c++)s.items[c].loose=!0;return s}}html(e){let r=this.rules.block.html.exec(e);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(e){let r=this.rules.block.def.exec(e);if(r){let n=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),o=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:n,raw:r[0],href:o,title:s}}}table(e){let r=this.rules.block.table.exec(e);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let n=st(r[1]),o=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=r[3]?.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
25
+ `):[],i={type:"table",raw:r[0],header:[],align:[],rows:[]};if(n.length===o.length){for(let a of o)this.rules.other.tableAlignRight.test(a)?i.align.push("right"):this.rules.other.tableAlignCenter.test(a)?i.align.push("center"):this.rules.other.tableAlignLeft.test(a)?i.align.push("left"):i.align.push(null);for(let a=0;a<n.length;a++)i.header.push({text:n[a],tokens:this.lexer.inline(n[a]),header:!0,align:i.align[a]});for(let a of s)i.rows.push(st(a,i.header.length).map((l,c)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:i.align[c]})));return i}}lheading(e){let r=this.rules.block.lheading.exec(e);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(e){let r=this.rules.block.paragraph.exec(e);if(r){let n=r[1].charAt(r[1].length-1)===`
26
+ `?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let r=this.rules.block.text.exec(e);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(e){let r=this.rules.inline.escape.exec(e);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(e){let r=this.rules.inline.tag.exec(e);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(e){let r=this.rules.inline.link.exec(e);if(r){let n=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let i=we(n.slice(0,-1),"\\");if((n.length-i.length)%2===0)return}else{let i=xr(r[2],"()");if(i===-2)return;if(i>-1){let a=(r[0].indexOf("!")===0?5:4)+r[1].length+i;r[2]=r[2].substring(0,i),r[0]=r[0].substring(0,a).trim(),r[3]=""}}let o=r[2],s="";if(this.options.pedantic){let i=this.rules.other.pedanticHrefTitle.exec(o);i&&(o=i[1],s=i[3])}else s=r[3]?r[3].slice(1,-1):"";return o=o.trim(),this.rules.other.startAngleBracket.test(o)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?o=o.slice(1):o=o.slice(1,-1)),at(r,{href:o&&o.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(e,r){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let o=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=r[o.toLowerCase()];if(!s){let i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return at(n,s,n[0],this.lexer,this.rules)}}emStrong(e,r,n=""){let o=this.rules.inline.emStrongLDelim.exec(e);if(!(!o||o[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(o[1]||o[2])||!n||this.rules.inline.punctuation.exec(n))){let s=[...o[0]].length-1,i,a,l=s,c=0,p=o[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(p.lastIndex=0,r=r.slice(-1*e.length+s);(o=p.exec(r))!=null;){if(i=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!i)continue;if(a=[...i].length,o[3]||o[4]){l+=a;continue}else if((o[5]||o[6])&&s%3&&!((s+a)%3)){c+=a;continue}if(l-=a,l>0)continue;a=Math.min(a,a+l+c);let f=[...o[0]][0].length,h=e.slice(0,s+o.index+f+a);if(Math.min(s,a)%2){let w=h.slice(1,-1);return{type:"em",raw:h,text:w,tokens:this.lexer.inlineTokens(w)}}let m=h.slice(2,-2);return{type:"strong",raw:h,text:m,tokens:this.lexer.inlineTokens(m)}}}}codespan(e){let r=this.rules.inline.code.exec(e);if(r){let n=r[2].replace(this.rules.other.newLineCharGlobal," "),o=this.rules.other.nonSpaceChar.test(n),s=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return o&&s&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:r[0],text:n}}}br(e){let r=this.rules.inline.br.exec(e);if(r)return{type:"br",raw:r[0]}}del(e){let r=this.rules.inline.del.exec(e);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(e){let r=this.rules.inline.autolink.exec(e);if(r){let n,o;return r[2]==="@"?(n=r[1],o="mailto:"+n):(n=r[1],o=n),{type:"link",raw:r[0],text:n,href:o,tokens:[{type:"text",raw:n,text:n}]}}}url(e){let r;if(r=this.rules.inline.url.exec(e)){let n,o;if(r[2]==="@")n=r[0],o="mailto:"+n;else{let s;do s=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(s!==r[0]);n=r[0],r[1]==="www."?o="http://"+r[0]:o=r[0]}return{type:"link",raw:r[0],text:n,href:o,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(e){let r=this.rules.inline.text.exec(e);if(r){let n=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:n}}}},ne=class lt{static{$(this,"N")}static{z(this,"l")}tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||ue,this.options.tokenizer=this.options.tokenizer||new qe,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 r={other:q,block:Oe.normal,inline:$e.normal};this.options.pedantic?(r.block=Oe.pedantic,r.inline=$e.pedantic):this.options.gfm&&(r.block=Oe.gfm,this.options.breaks?r.inline=$e.breaks:r.inline=$e.gfm),this.tokenizer.rules=r}static get rules(){return{block:Oe,inline:$e}}static lex(e,r){return new lt(r).lex(e)}static lexInline(e,r){return new lt(r).inlineTokens(e)}lex(e){e=e.replace(q.carriageReturn,`
27
+ `),this.blockTokens(e,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let n=this.inlineQueue[r];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,r=[],n=!1){for(this.options.pedantic&&(e=e.replace(q.tabCharGlobal," ").replace(q.spaceLine,""));e;){let o;if(this.options.extensions?.block?.some(i=>(o=i.call({lexer:this},e,r))?(e=e.substring(o.raw.length),r.push(o),!0):!1))continue;if(o=this.tokenizer.space(e)){e=e.substring(o.raw.length);let i=r.at(-1);o.raw.length===1&&i!==void 0?i.raw+=`
28
+ `:r.push(o);continue}if(o=this.tokenizer.code(e)){e=e.substring(o.raw.length);let i=r.at(-1);i?.type==="paragraph"||i?.type==="text"?(i.raw+=(i.raw.endsWith(`
29
+ `)?"":`
30
+ `)+o.raw,i.text+=`
31
+ `+o.text,this.inlineQueue.at(-1).src=i.text):r.push(o);continue}if(o=this.tokenizer.fences(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.heading(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.hr(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.blockquote(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.list(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.html(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.def(e)){e=e.substring(o.raw.length);let i=r.at(-1);i?.type==="paragraph"||i?.type==="text"?(i.raw+=(i.raw.endsWith(`
32
+ `)?"":`
33
+ `)+o.raw,i.text+=`
34
+ `+o.raw,this.inlineQueue.at(-1).src=i.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title},r.push(o));continue}if(o=this.tokenizer.table(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.lheading(e)){e=e.substring(o.raw.length),r.push(o);continue}let s=e;if(this.options.extensions?.startBlock){let i=1/0,a=e.slice(1),l;this.options.extensions.startBlock.forEach(c=>{l=c.call({lexer:this},a),typeof l=="number"&&l>=0&&(i=Math.min(i,l))}),i<1/0&&i>=0&&(s=e.substring(0,i+1))}if(this.state.top&&(o=this.tokenizer.paragraph(s))){let i=r.at(-1);n&&i?.type==="paragraph"?(i.raw+=(i.raw.endsWith(`
35
+ `)?"":`
36
+ `)+o.raw,i.text+=`
37
+ `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):r.push(o),n=s.length!==e.length,e=e.substring(o.raw.length);continue}if(o=this.tokenizer.text(e)){e=e.substring(o.raw.length);let i=r.at(-1);i?.type==="text"?(i.raw+=(i.raw.endsWith(`
38
+ `)?"":`
39
+ `)+o.raw,i.text+=`
40
+ `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):r.push(o);continue}if(e){let i="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(i);break}else throw new Error(i)}}return this.state.top=!0,r}inline(e,r=[]){return this.inlineQueue.push({src:e,tokens:r}),r}inlineTokens(e,r=[]){let n=e,o=null;if(this.tokens.links){let a=Object.keys(this.tokens.links);if(a.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)a.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,o.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(o=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)n=n.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let s=!1,i="";for(;e;){s||(i=""),s=!1;let a;if(this.options.extensions?.inline?.some(c=>(a=c.call({lexer:this},e,r))?(e=e.substring(a.raw.length),r.push(a),!0):!1))continue;if(a=this.tokenizer.escape(e)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.tag(e)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.link(e)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(a.raw.length);let c=r.at(-1);a.type==="text"&&c?.type==="text"?(c.raw+=a.raw,c.text+=a.text):r.push(a);continue}if(a=this.tokenizer.emStrong(e,n,i)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.codespan(e)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.br(e)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.del(e)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.autolink(e)){e=e.substring(a.raw.length),r.push(a);continue}if(!this.state.inLink&&(a=this.tokenizer.url(e))){e=e.substring(a.raw.length),r.push(a);continue}let l=e;if(this.options.extensions?.startInline){let c=1/0,p=e.slice(1),f;this.options.extensions.startInline.forEach(h=>{f=h.call({lexer:this},p),typeof f=="number"&&f>=0&&(c=Math.min(c,f))}),c<1/0&&c>=0&&(l=e.substring(0,c+1))}if(a=this.tokenizer.inlineText(l)){e=e.substring(a.raw.length),a.raw.slice(-1)!=="_"&&(i=a.raw.slice(-1)),s=!0;let c=r.at(-1);c?.type==="text"?(c.raw+=a.raw,c.text+=a.text):r.push(a);continue}if(e){let c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return r}},Ze=class{static{$(this,"L")}static{z(this,"P")}options;parser;constructor(e){this.options=e||ue}space(e){return""}code({text:e,lang:r,escaped:n}){let o=(r||"").match(q.notSpaceStart)?.[0],s=e.replace(q.endingNewline,"")+`
41
+ `;return o?'<pre><code class="language-'+J(o)+'">'+(n?s:J(s,!0))+`</code></pre>
42
+ `:"<pre><code>"+(n?s:J(s,!0))+`</code></pre>
43
+ `}blockquote({tokens:e}){return`<blockquote>
44
+ ${this.parser.parse(e)}</blockquote>
45
+ `}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:r}){return`<h${r}>${this.parser.parseInline(e)}</h${r}>
46
+ `}hr(e){return`<hr>
47
+ `}list(e){let r=e.ordered,n=e.start,o="";for(let a=0;a<e.items.length;a++){let l=e.items[a];o+=this.listitem(l)}let s=r?"ol":"ul",i=r&&n!==1?' start="'+n+'"':"";return"<"+s+i+`>
48
+ `+o+"</"+s+`>
49
+ `}listitem(e){let r="";if(e.task){let n=this.checkbox({checked:!!e.checked});e.loose?e.tokens[0]?.type==="paragraph"?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=n+" "+J(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):r+=n+" "}return r+=this.parser.parse(e.tokens,!!e.loose),`<li>${r}</li>
50
+ `}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
51
+ `}table(e){let r="",n="";for(let s=0;s<e.header.length;s++)n+=this.tablecell(e.header[s]);r+=this.tablerow({text:n});let o="";for(let s=0;s<e.rows.length;s++){let i=e.rows[s];n="";for(let a=0;a<i.length;a++)n+=this.tablecell(i[a]);o+=this.tablerow({text:n})}return o&&(o=`<tbody>${o}</tbody>`),`<table>
52
+ <thead>
53
+ `+r+`</thead>
54
+ `+o+`</table>
55
+ `}tablerow({text:e}){return`<tr>
56
+ ${e}</tr>
57
+ `}tablecell(e){let r=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+r+`</${n}>
58
+ `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${J(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:r,tokens:n}){let o=this.parser.parseInline(n),s=it(e);if(s===null)return o;e=s;let i='<a href="'+e+'"';return r&&(i+=' title="'+J(r)+'"'),i+=">"+o+"</a>",i}image({href:e,title:r,text:n,tokens:o}){o&&(n=this.parser.parseInline(o,this.parser.textRenderer));let s=it(e);if(s===null)return J(n);e=s;let i=`<img src="${e}" alt="${n}"`;return r&&(i+=` title="${J(r)}"`),i+=">",i}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:J(e.text)}},$t=class{static{$(this,"D")}static{z(this,"$")}strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},ie=class ct{static{$(this,"O")}static{z(this,"l")}options;renderer;textRenderer;constructor(e){this.options=e||ue,this.options.renderer=this.options.renderer||new Ze,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new $t}static parse(e,r){return new ct(r).parse(e)}static parseInline(e,r){return new ct(r).parseInline(e)}parse(e,r=!0){let n="";for(let o=0;o<e.length;o++){let s=e[o];if(this.options.extensions?.renderers?.[s.type]){let a=s,l=this.options.extensions.renderers[a.type].call({parser:this},a);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(a.type)){n+=l||"";continue}}let i=s;switch(i.type){case"space":{n+=this.renderer.space(i);continue}case"hr":{n+=this.renderer.hr(i);continue}case"heading":{n+=this.renderer.heading(i);continue}case"code":{n+=this.renderer.code(i);continue}case"table":{n+=this.renderer.table(i);continue}case"blockquote":{n+=this.renderer.blockquote(i);continue}case"list":{n+=this.renderer.list(i);continue}case"html":{n+=this.renderer.html(i);continue}case"def":{n+=this.renderer.def(i);continue}case"paragraph":{n+=this.renderer.paragraph(i);continue}case"text":{let a=i,l=this.renderer.text(a);for(;o+1<e.length&&e[o+1].type==="text";)a=e[++o],l+=`
59
+ `+this.renderer.text(a);r?n+=this.renderer.paragraph({type:"paragraph",raw:l,text:l,tokens:[{type:"text",raw:l,text:l,escaped:!0}]}):n+=l;continue}default:{let a='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return n}parseInline(e,r=this.renderer){let n="";for(let o=0;o<e.length;o++){let s=e[o];if(this.options.extensions?.renderers?.[s.type]){let a=this.options.extensions.renderers[s.type].call({parser:this},s);if(a!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){n+=a||"";continue}}let i=s;switch(i.type){case"escape":{n+=r.text(i);break}case"html":{n+=r.html(i);break}case"link":{n+=r.link(i);break}case"image":{n+=r.image(i);break}case"strong":{n+=r.strong(i);break}case"em":{n+=r.em(i);break}case"codespan":{n+=r.codespan(i);break}case"br":{n+=r.br(i);break}case"del":{n+=r.del(i);break}case"text":{n+=r.text(i);break}default:{let a='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return n}},_e=class{static{$(this,"T")}static{z(this,"S")}options;block;constructor(e){this.options=e||ue}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?ne.lex:ne.lexInline}provideParser(){return this.block?ie.parse:ie.parseInline}},Sn=class{static{$(this,"xe")}static{z(this,"B")}defaults=We();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=ie;Renderer=Ze;TextRenderer=$t;Lexer=ne;Tokenizer=qe;Hooks=_e;constructor(...t){this.use(...t)}walkTokens(t,e){let r=[];for(let n of t)switch(r=r.concat(e.call(this,n)),n.type){case"table":{let o=n;for(let s of o.header)r=r.concat(this.walkTokens(s.tokens,e));for(let s of o.rows)for(let i of s)r=r.concat(this.walkTokens(i.tokens,e));break}case"list":{let o=n;r=r.concat(this.walkTokens(o.items,e));break}default:{let o=n;this.defaults.extensions?.childTokens?.[o.type]?this.defaults.extensions.childTokens[o.type].forEach(s=>{let i=o[s].flat(1/0);r=r.concat(this.walkTokens(i,e))}):o.tokens&&(r=r.concat(this.walkTokens(o.tokens,e)))}}return r}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let n={...r};if(n.async=this.defaults.async||n.async||!1,r.extensions&&(r.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let s=e.renderers[o.name];s?e.renderers[o.name]=function(...i){let a=o.renderer.apply(this,i);return a===!1&&(a=s.apply(this,i)),a}:e.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=e[o.level];s?s.unshift(o.tokenizer):e[o.level]=[o.tokenizer],o.start&&(o.level==="block"?e.startBlock?e.startBlock.push(o.start):e.startBlock=[o.start]:o.level==="inline"&&(e.startInline?e.startInline.push(o.start):e.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(e.childTokens[o.name]=o.childTokens)}),n.extensions=e),r.renderer){let o=this.defaults.renderer||new Ze(this.defaults);for(let s in r.renderer){if(!(s in o))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let i=s,a=r.renderer[i],l=o[i];o[i]=(...c)=>{let p=a.apply(o,c);return p===!1&&(p=l.apply(o,c)),p||""}}n.renderer=o}if(r.tokenizer){let o=this.defaults.tokenizer||new qe(this.defaults);for(let s in r.tokenizer){if(!(s in o))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let i=s,a=r.tokenizer[i],l=o[i];o[i]=(...c)=>{let p=a.apply(o,c);return p===!1&&(p=l.apply(o,c)),p}}n.tokenizer=o}if(r.hooks){let o=this.defaults.hooks||new _e;for(let s in r.hooks){if(!(s in o))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let i=s,a=r.hooks[i],l=o[i];_e.passThroughHooks.has(s)?o[i]=c=>{if(this.defaults.async&&_e.passThroughHooksRespectAsync.has(s))return Promise.resolve(a.call(o,c)).then(f=>l.call(o,f));let p=a.call(o,c);return l.call(o,p)}:o[i]=(...c)=>{let p=a.apply(o,c);return p===!1&&(p=l.apply(o,c)),p}}n.hooks=o}if(r.walkTokens){let o=this.defaults.walkTokens,s=r.walkTokens;n.walkTokens=function(i){let a=[];return a.push(s.call(this,i)),o&&(a=a.concat(o.call(this,i))),a}}this.defaults={...this.defaults,...n}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return ne.lex(t,e??this.defaults)}parser(t,e){return ie.parse(t,e??this.defaults)}parseMarkdown(t){return(e,r)=>{let n={...r},o={...this.defaults,...n},s=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&n.async===!1)return s(new 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 e>"u"||e===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=t);let i=o.hooks?o.hooks.provideLexer():t?ne.lex:ne.lexInline,a=o.hooks?o.hooks.provideParser():t?ie.parse:ie.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(e):e).then(l=>i(l,o)).then(l=>o.hooks?o.hooks.processAllTokens(l):l).then(l=>o.walkTokens?Promise.all(this.walkTokens(l,o.walkTokens)).then(()=>l):l).then(l=>a(l,o)).then(l=>o.hooks?o.hooks.postprocess(l):l).catch(s);try{o.hooks&&(e=o.hooks.preprocess(e));let l=i(e,o);o.hooks&&(l=o.hooks.processAllTokens(l)),o.walkTokens&&this.walkTokens(l,o.walkTokens);let c=a(l,o);return o.hooks&&(c=o.hooks.postprocess(c)),c}catch(l){return s(l)}}}onError(t,e){return r=>{if(r.message+=`
60
+ Please report this to https://github.com/markedjs/marked.`,t){let n="<p>An error occurred:</p><pre>"+J(r.message+"",!0)+"</pre>";return e?Promise.resolve(n):n}if(e)return Promise.reject(r);throw r}}},pe=new Sn;function P(t,e){return pe.parse(t,e)}$(P,"p$5");z(P,"d");P.options=P.setOptions=function(t){return pe.setOptions(t),P.defaults=pe.defaults,gt(P.defaults),P};P.getDefaults=We;P.defaults=ue;P.use=function(...t){return pe.use(...t),P.defaults=pe.defaults,gt(P.defaults),P};P.walkTokens=function(t,e){return pe.walkTokens(t,e)};P.parseInline=pe.parseInline;P.Parser=ie;P.parser=ie.parse;P.Renderer=Ze;P.TextRenderer=$t;P.Lexer=ne;P.lexer=ne.lex;P.Tokenizer=qe;P.Hooks=_e;P.parse=P;var Ht=P,En=Object.defineProperty,Cn=$((t,e)=>En(t,"name",{value:e,configurable:!0}),"t$1");const Ln=["cjs","mjs"],Mn=["mdoc"],Le=Cn(t=>{const e=(t.split("?")[0]??t).split(".").pop()?.toLowerCase();if(!e||Ln.includes(e))return"javascript";if(Mn.includes(e))return"markdown";switch(e){case"js":return"javascript";case"json":return"json";case"json5":return"json5";case"jsonc":return"jsonc";case"jsx":return"jsx";case"sql":return"sql";case"ts":return"typescript";case"tsx":return"tsx";case"xml":return"xml";case"md":return"markdown";case"mdx":return"mdx";case"svelte":return"svelte";case"vue":return"vue";case"html":return"html";case"css":return"css";case"scss":return"scss";case"less":return"less";case"sass":return"sass";case"stylus":return"stylus";case"styl":return"styl";default:return"javascript"}},"findLanguageBasedOnExtension");var zn=Object.defineProperty,Pn=$((t,e)=>zn(t,"name",{value:e,configurable:!0}),"s$4");const De=new Map,Fn=Pn(async t=>{if(/^(?:http|https|file|data):/.test(t)){if(De.has(t))return De.get(t);if(t.startsWith("file:"))try{const e=Oo(t),r=await mt(e,"utf8");return De.set(t,r),r}catch{return}try{const e=await fetch(t);if(!e.ok)return;const r=await e.text();return De.set(t,r),r}catch{return}}},"getFileSource");var Rn=Object.defineProperty,Xe=$((t,e)=>Rn(t,"name",{value:e,configurable:!0}),"d$6");const Tn=Xe(t=>t.replace(/^\s*#+\s*/,"").trim(),"sanitizeTitle"),An=Xe(async(t,e,r=!1)=>{const n=[...e,cr,dr],o=jo(t,{frameLimit:1})[0]??{};for await(const s of n.sort((i,a)=>i.priority-a.priority)){const{handle:i}=s;if(typeof i!="function")continue;const a=await i(t,{file:o.file??"",language:Le(o.file??""),line:o.line??0,snippet:o.file?await Fn(o.file):""});if(a)return a}},"runSolutionFinders"),jn=Xe(async(t,e)=>{const{solutionFinders:r=[],solutionTitle:n,color:o,debug:s=!1,...i}=e,a=To(t,{...i,...o?.codeFrame}),l=await An(t,r,s);if(!l)return{errorAnsi:a,solutionBox:void 0};const c=Tn(l.header??n??"A possible solution to this error"),p=Bo(l.body,{borderStyle:"round",padding:{top:1,right:2,bottom:1,left:2},margin:{top:0,right:0,bottom:0,left:0},headerText:`💡 ${c}`,headerAlignment:"left",textAlignment:"left",...o?.boxen});return{errorAnsi:a,solutionBox:p}},"buildOutput"),_r=Xe(async(t,e={})=>{const{logger:r=console,...n}=e,{errorAnsi:o,solutionBox:s}=await jn(t,n);r.error(o),s&&(r.log(""),r.log(s))},"terminalOutput"),Bn=500,Sr="visulima:vite-overlay:error",On="visulima-vite-overlay",Er="Error",Dn="Runtime error",qt="data:image/svg+xml;charset=utf-8,%3Csvg%20class%3D%22lucide%20lucide-copy%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20%3E%20%3Crect%20width%3D%2214%22%20height%3D%2214%22%20x%3D%228%22%20y%3D%228%22%20rx%3D%222%22%20ry%3D%222%22%20%2F%3E%20%3Cpath%20d%3D%22M4%2016c-1.1%200-2-.9-2-2V4c0-1.1.9-2%202-2h10c1.1%200%202%20.9%202%202%22%20%2F%3E%20%3C%2Fsvg%3E",Zt="data:image/svg+xml;charset=utf-8,%3Csvg%20class%3D%22lucide%20lucide-info%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20%3E%20%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%2210%22%20%2F%3E%20%3Cpath%20d%3D%22M12%2016v-4%22%20%2F%3E%20%3Cpath%20d%3D%22M12%208h.01%22%20%2F%3E%20%3C%2Fsvg%3E",Vt="data:image/svg+xml;charset=utf-8,%3Csvg%20class%3D%22lucide%20lucide-moon-star%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20%3E%20%3Cpath%20d%3D%22M18%205h4%22%20%2F%3E%20%3Cpath%20d%3D%22M20%203v4%22%20%2F%3E%20%3Cpath%20d%3D%22M20.985%2012.486a9%209%200%201%201-9.473-9.472c.405-.022.617.46.402.803a6%206%200%200%200%208.268%208.268c.344-.215.825-.004.803.401%22%20%2F%3E%20%3C%2Fsvg%3E",Ut="data:image/svg+xml;charset=utf-8,%3Csvg%20class%3D%22lucide%20lucide-sun%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20%3E%20%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%224%22%20%2F%3E%20%3Cpath%20d%3D%22M12%202v2%22%20%2F%3E%20%3Cpath%20d%3D%22M12%2020v2%22%20%2F%3E%20%3Cpath%20d%3D%22m4.93%204.93%201.41%201.41%22%20%2F%3E%20%3Cpath%20d%3D%22m17.66%2017.66%201.41%201.41%22%20%2F%3E%20%3Cpath%20d%3D%22M2%2012h2%22%20%2F%3E%20%3Cpath%20d%3D%22M20%2012h2%22%20%2F%3E%20%3Cpath%20d%3D%22m6.34%2017.66-1.41%201.41%22%20%2F%3E%20%3Cpath%20d%3D%22m19.07%204.93-1.41%201.41%22%20%2F%3E%20%3C%2Fsvg%3E",Nt="data:image/svg+xml;charset=utf-8,%3Csvg%20class%3D%22lucide%20lucide-x%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20%3E%20%3Cpath%20d%3D%22M18%206%206%2018%22%20%2F%3E%20%3Cpath%20d%3D%22m6%206%2012%2012%22%20%2F%3E%20%3C%2Fsvg%3E";var dt=(t=>(t.appcode="AppCode",t["android-studio"]="Android Studio",t.atom="Atom",t["atom-beta"]="Atom Beta",t.brackets="Brackets",t.clion="CLion",t.code="Visual Studio Code",t["code-insiders"]="Visual Studio Code Insiders",t.codium="VSCodium",t.cursor="Cursor",t.emacs="GNU Emacs",t.emacsforosx="GNU Emacs for Mac OS X",t.intellij="IntelliJ IDEA",t.idea="IntelliJ IDEA",t.nano="GNU nano",t.neovim="NeoVim",t["notepad++"]="Notepad++",t.phpstorm="PhpStorm",t.pycharm="PyCharm",t.rider="Rider",t.rubymine="RubyMine",t.sublime="SublimeText",t.textmate="TextMate",t.vim="Vim",t.visualstudio="Visual Studio",t.vscode="Visual Studio Code",t.vscodium="VSCodium",t.webstorm="WebStorm",t.xcode="Xcode",t.zed="Zed",t))(dt||{}),In=`/*! tailwindcss v4.1.13 | MIT License | https://tailwindcss.com */
61
+ @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-outline-style:solid}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-yellow-500:oklch(79.5% .184 86.047);--color-yellow-600:oklch(68.1% .162 75.834);--color-lime-800:oklch(45.3% .124 130.933);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-blue-50:oklch(97% .014 254.604);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-700:oklch(37.2% .044 257.287);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-4xl:56rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-3xl:1.875rem;--text-3xl--line-height:calc(2.25/1.875);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--radius-md:.375rem;--radius-lg:.5rem;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--blur-sm:8px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}button:not(:disabled),[role=button]:not(:disabled){cursor:pointer}body{background-color:var(--ono-v-bg);color:var(--ono-v-text)}pre,code{color:var(--ono-v-text)}.text-muted{color:var(--ono-v-text-muted)}a{color:var(--ono-v-link)}a:hover{text-decoration:underline}::selection{background:var(--ono-v-red-orange)}@supports (color:color-mix(in lab, red, red)){::selection{background:color-mix(in srgb,var(--ono-v-red-orange)20%,transparent)}}kbd{background-color:var(--ono-v-chip-bg);color:var(--ono-v-chip-text);border-radius:.375rem;padding:.125rem .375rem;font:.75rem ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}hr{border-color:var(--ono-v-border)}[type=text],input:where(:not([type])),[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select{appearance:none;--tw-shadow:0 0 #0000;background-color:#fff;border-width:1px;border-color:oklch(55.1% .027 264.364);border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem}:is([type=text],input:where(:not([type])),[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select):focus{outline-offset:2px;--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:oklch(54.6% .245 262.881);--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:oklch(54.6% .245 262.881);outline:2px solid #0000}input::placeholder,textarea::placeholder{color:oklch(55.1% .027 264.364);opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em}::-webkit-date-and-time-value{text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-year-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-month-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-day-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-hour-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-minute-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-second-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-millisecond-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-meridiem-field{padding-top:0;padding-bottom:0}select{print-color-adjust:exact;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='oklch(55.1%25 0.027 264.364)' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem}[multiple],[size]:where(select:not([size="1"])){background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;print-color-adjust:unset;padding-right:.75rem}[type=checkbox],[type=radio]{appearance:none;print-color-adjust:exact;vertical-align:middle;-webkit-user-select:none;user-select:none;color:oklch(54.6% .245 262.881);--tw-shadow:0 0 #0000;background-color:#fff;background-origin:border-box;border-width:1px;border-color:oklch(55.1% .027 264.364);flex-shrink:0;width:1rem;height:1rem;padding:0;display:inline-block}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline-offset:2px;--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:2px;--tw-ring-offset-color:#fff;--tw-ring-color:oklch(54.6% .245 262.881);--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);outline:2px solid #0000}[type=checkbox]:checked,[type=radio]:checked{background-color:currentColor;background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:#0000}[type=checkbox]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")}@media (forced-colors:active){[type=checkbox]:checked{appearance:auto}}[type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")}@media (forced-colors:active){[type=radio]:checked{appearance:auto}}[type=checkbox]:checked:hover,[type=checkbox]:checked:focus,[type=radio]:checked:hover,[type=radio]:checked:focus{background-color:currentColor;border-color:#0000}[type=checkbox]:indeterminate{background-color:currentColor;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:#0000}@media (forced-colors:active){[type=checkbox]:indeterminate{appearance:auto}}[type=checkbox]:indeterminate:hover,[type=checkbox]:indeterminate:focus{background-color:currentColor;border-color:#0000}[type=file]{background:unset;border-color:inherit;font-size:unset;line-height:inherit;border-width:0;border-radius:0;padding:0}[type=file]:focus{outline:1px solid buttontext;outline:1px auto -webkit-focus-ring-color}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:calc(var(--spacing)*0)}.top-4{top:calc(var(--spacing)*4)}.top-\\[calc\\(var\\(--ono-v-dialog-border-width\\)\\*-1\\)\\]{top:calc(var(--ono-v-dialog-border-width)*-1)}.right-4{right:calc(var(--spacing)*4)}.right-\\[-54px\\]{right:-54px}.left-\\[-54px\\]{left:-54px}.-z-1,.-z-\\[1\\]{z-index:calc(1*-1)}.z-0{z-index:0}.z-10{z-index:10}.z-\\[2\\]{z-index:2}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.m-1{margin:calc(var(--spacing)*1)}.mx-auto{margin-inline:auto}.prose{color:var(--tw-prose-body);max-width:65ch}.prose :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-lead);margin-top:1.2em;margin-bottom:1.2em;font-size:1.25em;line-height:1.6}.prose :where(a):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-links);font-weight:500;text-decoration:underline}.prose :where(strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-bold);font-weight:600}.prose :where(a strong):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(blockquote strong):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(thead th strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em;list-style-type:decimal}.prose :where(ol[type=A]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=A s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=I]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type=I s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type="1"]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal}.prose :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em;list-style-type:disc}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-counters);font-weight:400}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-bullets)}.prose :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);margin-top:1.25em;font-weight:600}.prose :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}.prose :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-quotes);border-inline-start-width:.25rem;border-inline-start-color:var(--tw-prose-quote-borders);quotes:"“""”""‘""’";margin-top:1.6em;margin-bottom:1.6em;padding-inline-start:1em;font-style:italic;font-weight:500}.prose :where(blockquote p:first-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:open-quote}.prose :where(blockquote p:last-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:close-quote}.prose :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);margin-top:0;margin-bottom:.888889em;font-size:2.25em;font-weight:800;line-height:1.11111}.prose :where(h1 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:900}.prose :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);margin-top:2em;margin-bottom:1em;font-size:1.5em;font-weight:700;line-height:1.33333}.prose :where(h2 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:800}.prose :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);margin-top:1.6em;margin-bottom:.6em;font-size:1.25em;font-weight:600;line-height:1.6}.prose :where(h3 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:700}.prose :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);margin-top:1.5em;margin-bottom:.5em;font-weight:600;line-height:1.5}.prose :where(h4 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:700}.prose :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em;display:block}.prose :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-kbd);box-shadow:0 0 0 1px var(--tw-prose-kbd-shadows),0 3px 0 var(--tw-prose-kbd-shadows);padding-top:.1875em;padding-inline-end:.375em;padding-bottom:.1875em;border-radius:.3125rem;padding-inline-start:.375em;font-family:inherit;font-size:.875em;font-weight:500}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-code);font-size:.875em;font-weight:600}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):before,.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:"\`"}.prose :where(a code):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(h1 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.875em}.prose :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.9em}.prose :where(h4 code):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(blockquote code):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(thead th code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-pre-code);background-color:var(--tw-prose-pre-bg);padding-top:.857143em;padding-inline-end:1.14286em;padding-bottom:.857143em;border-radius:.375rem;margin-top:1.71429em;margin-bottom:1.71429em;padding-inline-start:1.14286em;font-size:.875em;font-weight:400;line-height:1.71429;overflow-x:auto}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:inherit;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit;background-color:#0000;border-width:0;border-radius:0;padding:0}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):before,.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:none}.prose :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){table-layout:auto;width:100%;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.71429}.prose :where(thead):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-th-borders)}.prose :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);vertical-align:bottom;padding-inline-end:.571429em;padding-bottom:.571429em;padding-inline-start:.571429em;font-weight:600}.prose :where(tbody tr):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-td-borders)}.prose :where(tbody tr:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:0}.prose :where(tbody td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:baseline}.prose :where(tfoot):not(:where([class~=not-prose],[class~=not-prose] *)){border-top-width:1px;border-top-color:var(--tw-prose-th-borders)}.prose :where(tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:top}.prose :where(th,td):not(:where([class~=not-prose],[class~=not-prose] *)){text-align:start}.prose :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-captions);margin-top:.857143em;font-size:.875em;line-height:1.42857}.prose{--tw-prose-body:oklch(37.3% .034 259.733);--tw-prose-headings:oklch(21% .034 264.665);--tw-prose-lead:oklch(44.6% .03 256.802);--tw-prose-links:oklch(21% .034 264.665);--tw-prose-bold:oklch(21% .034 264.665);--tw-prose-counters:oklch(55.1% .027 264.364);--tw-prose-bullets:oklch(87.2% .01 258.338);--tw-prose-hr:oklch(92.8% .006 264.531);--tw-prose-quotes:oklch(21% .034 264.665);--tw-prose-quote-borders:oklch(92.8% .006 264.531);--tw-prose-captions:oklch(55.1% .027 264.364);--tw-prose-kbd:oklch(21% .034 264.665);--tw-prose-kbd-shadows:oklab(21% -.00316127 -.0338527/.1);--tw-prose-code:oklch(21% .034 264.665);--tw-prose-pre-code:oklch(92.8% .006 264.531);--tw-prose-pre-bg:oklch(27.8% .033 256.848);--tw-prose-th-borders:oklch(87.2% .01 258.338);--tw-prose-td-borders:oklch(92.8% .006 264.531);--tw-prose-invert-body:oklch(87.2% .01 258.338);--tw-prose-invert-headings:#fff;--tw-prose-invert-lead:oklch(70.7% .022 261.325);--tw-prose-invert-links:#fff;--tw-prose-invert-bold:#fff;--tw-prose-invert-counters:oklch(70.7% .022 261.325);--tw-prose-invert-bullets:oklch(44.6% .03 256.802);--tw-prose-invert-hr:oklch(37.3% .034 259.733);--tw-prose-invert-quotes:oklch(96.7% .003 264.542);--tw-prose-invert-quote-borders:oklch(37.3% .034 259.733);--tw-prose-invert-captions:oklch(70.7% .022 261.325);--tw-prose-invert-kbd:#fff;--tw-prose-invert-kbd-shadows:rgb(255,255,255/10%);--tw-prose-invert-code:#fff;--tw-prose-invert-pre-code:oklch(87.2% .01 258.338);--tw-prose-invert-pre-bg:#00000080;--tw-prose-invert-th-borders:oklch(44.6% .03 256.802);--tw-prose-invert-td-borders:oklch(37.3% .034 259.733);font-size:1rem;line-height:1.75}.prose :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;margin-bottom:.5em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}.prose :where(.prose>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(.prose>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(.prose>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;padding-inline-start:1.625em}.prose :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding-top:.571429em;padding-inline-end:.571429em;padding-bottom:.571429em;padding-inline-start:.571429em}.prose :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(.prose>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(.prose>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.prose-sm{font-size:.875rem;line-height:1.71429}.prose-sm :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.14286em;margin-bottom:1.14286em}.prose-sm :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.888889em;margin-bottom:.888889em;font-size:1.28571em;line-height:1.55556}.prose-sm :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.33333em;margin-bottom:1.33333em;padding-inline-start:1.11111em}.prose-sm :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:.8em;font-size:2.14286em;line-height:1.2}.prose-sm :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.6em;margin-bottom:.8em;font-size:1.42857em;line-height:1.4}.prose-sm :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.55556em;margin-bottom:.444444em;font-size:1.28571em;line-height:1.55556}.prose-sm :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.42857em;margin-bottom:.571429em;line-height:1.42857}.prose-sm :where(img):not(:where([class~=not-prose],[class~=not-prose] *)),.prose-sm :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.71429em;margin-bottom:1.71429em}.prose-sm :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose-sm :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.71429em;margin-bottom:1.71429em}.prose-sm :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){padding-top:.142857em;padding-inline-end:.357143em;padding-bottom:.142857em;border-radius:.3125rem;padding-inline-start:.357143em;font-size:.857143em}.prose-sm :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.857143em}.prose-sm :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.9em}.prose-sm :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.888889em}.prose-sm :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){padding-top:.666667em;padding-inline-end:1em;padding-bottom:.666667em;border-radius:.25rem;margin-top:1.66667em;margin-bottom:1.66667em;padding-inline-start:1em;font-size:.857143em;line-height:1.66667}.prose-sm :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)),.prose-sm :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.14286em;margin-bottom:1.14286em;padding-inline-start:1.57143em}.prose-sm :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.285714em;margin-bottom:.285714em}.prose-sm :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)),.prose-sm :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.428571em}.prose-sm :where(.prose-sm>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.571429em;margin-bottom:.571429em}.prose-sm :where(.prose-sm>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.14286em}.prose-sm :where(.prose-sm>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.14286em}.prose-sm :where(.prose-sm>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.14286em}.prose-sm :where(.prose-sm>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.14286em}.prose-sm :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.571429em;margin-bottom:.571429em}.prose-sm :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.14286em;margin-bottom:1.14286em}.prose-sm :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.14286em}.prose-sm :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.285714em;padding-inline-start:1.57143em}.prose-sm :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2.85714em;margin-bottom:2.85714em}.prose-sm :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)),.prose-sm :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)),.prose-sm :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)),.prose-sm :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.857143em;line-height:1.5}.prose-sm :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:1em;padding-bottom:.666667em;padding-inline-start:1em}.prose-sm :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose-sm :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose-sm :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding-top:.666667em;padding-inline-end:1em;padding-bottom:.666667em;padding-inline-start:1em}.prose-sm :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose-sm :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose-sm :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.71429em;margin-bottom:1.71429em}.prose-sm :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose-sm :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.666667em;font-size:.857143em;line-height:1.33333}.prose-sm :where(.prose-sm>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(.prose-sm>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.-mt-5{margin-top:calc(var(--spacing)*-5)}.mt-8{margin-top:calc(var(--spacing)*8)}.mb-0{margin-bottom:calc(var(--spacing)*0)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-8{margin-bottom:calc(var(--spacing)*8)}.ml-2{margin-left:calc(var(--spacing)*2)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.size-5{width:calc(var(--spacing)*5);height:calc(var(--spacing)*5)}.size-6\\.5{width:calc(var(--spacing)*6.5);height:calc(var(--spacing)*6.5)}.size-8{width:calc(var(--spacing)*8);height:calc(var(--spacing)*8)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-\\[40vmin\\]{height:40vmin}.h-\\[calc\\(100\\%\\+var\\(--ono-v-dialog-border-width\\)\\)\\]{height:calc(100% + var(--ono-v-dialog-border-width))}.h-\\[var\\(--ono-v-dialog-notch-height\\)\\]{height:var(--ono-v-dialog-notch-height)}.max-h-\\[140px\\]{max-height:140px}.max-h-\\[calc\\(100\\%-56px\\)\\]{max-height:calc(100% - 56px)}.min-h-0{min-height:calc(var(--spacing)*0)}.min-h-screen{min-height:100vh}.w-1\\/2{width:50%}.w-1\\/3{width:33.3333%}.w-2\\/3{width:66.6667%}.w-2\\/5{width:40%}.w-3\\/4{width:75%}.w-3\\/5{width:60%}.w-4{width:calc(var(--spacing)*4)}.w-4\\/5{width:80%}.w-6{width:calc(var(--spacing)*6)}.w-44{width:calc(var(--spacing)*44)}.w-fit{width:fit-content}.w-full{width:100%}.max-w-4xl{max-width:var(--container-4xl)}.max-w-\\[var\\(--ono-v-dialog-max-width\\)\\]{max-width:var(--ono-v-dialog-max-width)}.max-w-full{max-width:100%}.min-w-8{min-width:calc(var(--spacing)*8)}.shrink-0{flex-shrink:0}.translate-x-\\[calc\\(var\\(--ono-v-dialog-border-width\\)\\*-1\\)\\]{--tw-translate-x:calc(var(--ono-v-dialog-border-width)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-\\[var\\(--ono-v-dialog-border-width\\)\\]{--tw-translate-x:var(--ono-v-dialog-border-width);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-\\[var\\(--ono-v-dialog-border-width\\)\\]{--tw-translate-y:var(--ono-v-dialog-border-width);translate:var(--tw-translate-x)var(--tw-translate-y)}.scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x)var(--tw-scale-y)}.\\[transform\\:rotateY\\(180deg\\)\\]{transform:rotateY(180deg)}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-\\[spin_20s_linear_infinite\\]{animation:20s linear infinite spin}.animate-pulse{animation:var(--animate-pulse)}.cursor-pointer{cursor:pointer}.resize{resize:both}.list-inside{list-style-position:inside}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.gap-6{gap:calc(var(--spacing)*6)}:where(.space-y-0\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-\\[var\\(--ono-v-radius-md\\)\\]{border-radius:var(--ono-v-radius-md)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-tl-\\[var\\(--ono-v-dialog-radius\\)\\]{border-top-left-radius:var(--ono-v-dialog-radius)}.rounded-tr-\\[var\\(--ono-v-dialog-radius\\)\\]{border-top-right-radius:var(--ono-v-dialog-radius)}.rounded-b-\\[var\\(--ono-v-dialog-radius\\)\\]{border-bottom-right-radius:var(--ono-v-dialog-radius);border-bottom-left-radius:var(--ono-v-dialog-radius)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-0{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.border-none{--tw-border-style:none;border-style:none}.border-\\[var\\(--ono-v-border\\)\\]{border-color:var(--ono-v-border)}.border-\\[var\\(--stroke-color\\)\\]{border-color:var(--stroke-color)}.bg-\\[\\#282c34\\]{background-color:#282c34}.bg-\\[\\#b0c8aa\\]{background-color:#b0c8aa}.bg-\\[var\\(--background-color\\)\\]{background-color:var(--background-color)}.bg-\\[var\\(--ono-v-chip-bg\\)\\]{background-color:var(--ono-v-chip-bg)}.bg-\\[var\\(--ono-v-success-bg\\)\\]{background-color:var(--ono-v-success-bg)}.bg-\\[var\\(--ono-v-surface\\)\\]{background-color:var(--ono-v-surface)}.bg-\\[var\\(--ono-v-surface-muted\\)\\]{background-color:var(--ono-v-surface-muted)}.bg-black\\/60{background-color:#0009}@supports (color:color-mix(in lab, red, red)){.bg-black\\/60{background-color:color-mix(in oklab,var(--color-black)60%,transparent)}}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-green-500{background-color:var(--color-green-500)}.bg-red-500{background-color:var(--color-red-500)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-yellow-500{background-color:var(--color-yellow-500)}.p-3{padding:calc(var(--spacing)*3)}.p-6{padding:calc(var(--spacing)*6)}.p-8{padding:calc(var(--spacing)*8)}.px-1\\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-\\[15px\\]{padding-inline:15px}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.py-3{padding-block:calc(var(--spacing)*3)}.pe-6{padding-inline-end:calc(var(--spacing)*6)}.pt-5{padding-top:calc(var(--spacing)*5)}.pt-\\[10vh\\]{padding-top:10vh}.pr-0{padding-right:calc(var(--spacing)*0)}.pl-0{padding-left:calc(var(--spacing)*0)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[11px\\]{font-size:11px}.text-\\[calc\\(10px\\+2vmin\\)\\]{font-size:calc(10px + 2vmin)}.leading-4{--tw-leading:calc(var(--spacing)*4);line-height:calc(var(--spacing)*4)}.leading-5{--tw-leading:calc(var(--spacing)*5);line-height:calc(var(--spacing)*5)}.leading-none{--tw-leading:1;line-height:1}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.text-\\[\\#61dafb\\]{color:#61dafb}.text-\\[var\\(--ono-v-red-orange\\)\\]{color:var(--ono-v-red-orange)}.text-\\[var\\(--ono-v-text\\)\\]{color:var(--ono-v-text)}.text-\\[var\\(--ono-v-text-muted\\)\\]{color:var(--ono-v-text-muted)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-white{color:var(--color-white)}.underline{text-decoration-line:underline}.opacity-100{opacity:1}.shadow-\\[var\\(--ono-v-elevation-1\\)\\]{--tw-shadow:var(--ono-v-elevation-1);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[var\\(--ono-v-elevation-2\\)\\]{--tw-shadow:var(--ono-v-elevation-2);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.outline-none{--tw-outline-style:none;outline-style:none}.\\[vite\\:legacy\\]{vite:legacy}.\\[vite\\:react-babel\\]{vite:react-babel}.\\[vite\\:vue\\]{vite:vue}.hover\\:bg-\\[var\\(--ono-v-hover-overlay\\)\\]:hover{background-color:var(--ono-v-hover-overlay)}.hover\\:bg-blue-600:hover{background-color:var(--color-blue-600)}.hover\\:bg-green-600:hover{background-color:var(--color-green-600)}.hover\\:bg-red-600:hover{background-color:var(--color-red-600)}.hover\\:bg-yellow-600:hover{background-color:var(--color-yellow-600)}.hover\\:text-\\[var\\(--ono-v-text\\)\\]:hover{color:var(--ono-v-text)}.hover\\:text-\\[var\\(--ono-v-text-muted\\)\\]:hover{color:var(--ono-v-text-muted)}.hover\\:underline:hover{text-decoration-line:underline}.focus\\:bg-\\[var\\(--ono-v-hover-overlay\\)\\]:focus{background-color:var(--ono-v-hover-overlay)}.focus\\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:ring-\\[var\\(--ono-v-red-orange\\)\\]:focus{--tw-ring-color:var(--ono-v-red-orange)}.focus\\:outline-hidden:focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.focus\\:outline-hidden:focus{outline-offset:2px;outline:2px solid #0000}}.focus-visible\\:outline:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}.focus-visible\\:outline-\\[var\\(--ono-v-red-orange\\)\\]:focus-visible{outline-color:var(--ono-v-red-orange)}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-50:disabled{opacity:.5}@media (min-width:40rem){.sm\\:flex{display:flex}}@media (min-width:48rem){.md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\\:backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}}.dark\\:bg-lime-800:where(.dark,.dark *){background-color:var(--color-lime-800)}.dark\\:prose-invert:where(.dark,.dark *){--tw-prose-body:var(--tw-prose-invert-body);--tw-prose-headings:var(--tw-prose-invert-headings);--tw-prose-lead:var(--tw-prose-invert-lead);--tw-prose-links:var(--tw-prose-invert-links);--tw-prose-bold:var(--tw-prose-invert-bold);--tw-prose-counters:var(--tw-prose-invert-counters);--tw-prose-bullets:var(--tw-prose-invert-bullets);--tw-prose-hr:var(--tw-prose-invert-hr);--tw-prose-quotes:var(--tw-prose-invert-quotes);--tw-prose-quote-borders:var(--tw-prose-invert-quote-borders);--tw-prose-captions:var(--tw-prose-invert-captions);--tw-prose-kbd:var(--tw-prose-invert-kbd);--tw-prose-kbd-shadows:var(--tw-prose-invert-kbd-shadows);--tw-prose-code:var(--tw-prose-invert-code);--tw-prose-pre-code:var(--tw-prose-invert-pre-code);--tw-prose-pre-bg:var(--tw-prose-invert-pre-bg);--tw-prose-th-borders:var(--tw-prose-invert-th-borders);--tw-prose-td-borders:var(--tw-prose-invert-td-borders)}.prose-headings\\:text-white :where(h1,h2,h3,h4,h5,h6,th):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--color-white)}.prose-ul\\:list-none :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:none}.prose-hr\\:my-6 :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){margin-block:calc(var(--spacing)*6)}.prose-hr\\:border :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){border-style:var(--tw-border-style);border-width:1px}}:host{--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-tracking:initial;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:rotateX(0);--tw-rotate-y:rotateY(0);--tw-rotate-z:rotateZ(0);--tw-skew-x:skewX(0);--tw-skew-y:skewY(0);--tw-space-x-reverse:0;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial:;--ono-v-white-smoke:#f5f5f5;--ono-v-red-orange:#ff4628;--ono-v-charcoal-black:#202020;--ono-v-bg:var(--ono-v-white-smoke);--ono-v-surface:#fff;--ono-v-surface-muted:#fafafa;--ono-v-border:#b9c8d780;--ono-v-hover-overlay:#2020200d;--ono-v-success:#2ea043;--ono-v-success-bg:#d6eed1;--ono-v-neutral:#6e7681;--ono-v-neutral-bg:#6e76812e;--ono-v-chip-bg:#6e768124;--ono-v-chip-text:var(--ono-v-text);--ono-v-radius-md:.5rem;--ono-v-radius-lg:.75rem;--ono-v-elevation-1:0 1px 2px #0000000a,0 1px 1px #00000005;--ono-v-elevation-2:0 10px 25px -5px #2020201a,0 8px 10px -6px #2020201a;--ono-v-text:#111827;--ono-v-text-muted:#374151;--ono-v-link:#c4311d;--ono-v-muted-on-surface:#374151;--ono-v-on-accent:#fff;--ono-v-dialog-border-width:1px;--ono-v-dialog-radius:12px;--ono-v-dialog-max-width:960px;--ono-v-dialog-row-padding:16px;--ono-v-dialog-padding:12px;--ono-v-dialog-notch-height:42px}.dark{--ono-v-bg:#161b22;--ono-v-surface:#0d1117;--ono-v-surface-muted:#0f141b;--ono-v-border:#30363d99;--ono-v-text:#c9d1d9;--ono-v-text-muted:#8b949e;--ono-v-link:#ff6a52;--ono-v-muted-on-surface:#8b949e;--ono-v-hover-overlay:#f0f6fc0f;--ono-v-on-accent:#fff;--ono-v-success:#2ea043;--ono-v-success-bg:#2ea04333;--ono-v-neutral:#6e7681;--ono-v-neutral-bg:#6e768140;--ono-v-chip-bg:#6e768133;--ono-v-chip-text:var(--ono-v-text)}@media (prefers-reduced-motion:reduce){*,:before,:after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}@media (min-width:576px){:host{--ono-v-dialog-max-width:540px}}@media (min-width:768px){:host{--ono-v-dialog-max-width:720px}}@media (min-width:992px){:host{--ono-v-dialog-max-width:960px}}button:focus-visible,[role=tab]:focus-visible,summary:focus-visible,select:focus-visible,input:focus-visible,textarea:focus-visible,[data-open-in-editor]:focus-visible,.js-clipboard:focus-visible{outline:2px solid var(--ono-v-red-orange);outline-offset:2px}.lucide{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.dui{width:1rem;height:1rem;-webkit-mask-image:var(--icon);-webkit-mask-position:50%;-webkit-mask-size:contain;-webkit-mask-repeat:no-repeat;-webkit-mask-image:var(--icon);-webkit-mask-image:var(--icon);mask-image:var(--icon);background-color:currentColor;display:inline-block;-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.dui.hidden{display:none!important}.shiki{max-width:100%;padding-bottom:calc(var(--spacing)*4);overflow-wrap:break-word;overflow:auto}.shiki pre{max-width:100%;overflow:auto}.shiki::-webkit-scrollbar{height:calc(var(--spacing)*2)}.shiki::-webkit-scrollbar-thumb{border-radius:3.40282e38px}.shiki::-webkit-scrollbar-thumb{background-color:var(--color-gray-500)}.shiki:where(.dark,.dark *)::-webkit-scrollbar-thumb{background-color:var(--color-slate-500)}.shiki::-webkit-scrollbar-track{border-radius:3.40282e38px}.shiki::-webkit-scrollbar-track{background-color:var(--color-gray-100)}.shiki:where(.dark,.dark *)::-webkit-scrollbar-track{background-color:var(--color-slate-700)}.dark .shiki,.dark .shiki span{color:var(--shiki-dark)!important;background-color:var(--shiki-dark-bg)!important;font-style:var(--shiki-dark-font-style)!important;font-weight:var(--shiki-dark-font-weight)!important;-webkit-text-decoration:var(--shiki-dark-text-decoration)!important;-webkit-text-decoration:var(--shiki-dark-text-decoration)!important;text-decoration:var(--shiki-dark-text-decoration)!important}.dark [type=checkbox]:checked,.dark [type=radio]:checked{background-color:currentColor}.v-o-skeleton{background:linear-gradient(90deg,#00000014 25%,#0000 50%,#00000014 75%) 0 0/200% 100%}.dark .v-o-skeleton{background:linear-gradient(90deg,#ffffff1a 25%,#0000 50%,#ffffff1a 75%)}#__v_o__stacktrace summary svg{transition:transform .2s}#__v_o__stacktrace[open] summary svg{transform:rotate(90deg)}:has(#__v_o__root){overflow:hidden}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}`;const Wt=`/* eslint-disable n/no-unsupported-features/node-builtins */
62
+ /* eslint-disable no-unsanitized/property */
63
+ /* eslint-disable no-underscore-dangle */
64
+ /* eslint-disable func-names */
65
+ /* eslint-disable no-plusplus */
66
+ // @ts-nocheck
67
+ /**
68
+ * Custom HTML element that displays error overlays in the browser.
69
+ * Provides interactive error display with theme switching, code frames, and navigation.
70
+ * @augments HTMLElement
71
+ */
72
+ class ErrorOverlay extends HTMLElement {
73
+ /**
74
+ * @typedef {import('../types').VisulimaViteOverlayErrorPayload} VisulimaViteOverlayErrorPayload
75
+ */
76
+
77
+ __v_oMode;
78
+
79
+ __v_oPayload;
80
+
81
+ /**
82
+ * Creates a new ErrorOverlay instance.
83
+ * @param {VisulimaViteOverlayErrorPayload} error - The error payload to display
84
+ */
85
+ constructor(error) {
86
+ super();
87
+
88
+ this.root = this.attachShadow({ mode: "open" });
89
+ // eslint-disable-next-line no-undef
90
+ this.root.innerHTML = overlayTemplate;
91
+ this.dir = "ltr";
92
+
93
+ this.element = this;
94
+
95
+ this.root.host._errorOverlay = this;
96
+
97
+ globalThis.__v_o__current = this;
98
+
99
+ document.body.append(this);
100
+
101
+ if (error && (error.errors === undefined || !Array.isArray(error.errors))) {
102
+ return;
103
+ }
104
+
105
+ const payload = {
106
+ errors: error.errors,
107
+ errorType: error.errorType || "server",
108
+ rootPath: error.rootPath || "",
109
+ };
110
+
111
+ this.__v_oPayload = payload;
112
+
113
+ this.__v_oMode = "original";
114
+
115
+ this.#initializeThemeToggle();
116
+
117
+ this.#initializeCopyError();
118
+
119
+ this.#initializePagination();
120
+
121
+ if (error.solution) {
122
+ this.#injectSolution(error.solution);
123
+ }
124
+
125
+ this.#hideLoadingStates();
126
+
127
+ const editorSelect = this.root.querySelector("#editor-selector");
128
+
129
+ if (editorSelect) {
130
+ let saved = null;
131
+
132
+ saved = localStorage.getItem("vo:editor");
133
+
134
+ if (saved && editorSelect.value !== saved) {
135
+ editorSelect.value = saved;
136
+ }
137
+
138
+ editorSelect.addEventListener("change", function () {
139
+ localStorage.setItem("vo:editor", this.value || "");
140
+ });
141
+ }
142
+
143
+ const closeButton = this.root.querySelector("#__v_o__close");
144
+
145
+ if (closeButton) {
146
+ if (this.__v_oPayload.errorType === "client") {
147
+ closeButton.addEventListener("click", () => {
148
+ this.close();
149
+ });
150
+ } else {
151
+ closeButton.style.display = "none";
152
+ }
153
+ }
154
+
155
+ if (this.__v_oPayload.errorType === "client") {
156
+ document.addEventListener("keydown", (event) => {
157
+ if (event.key === "Escape" && this.parentNode) {
158
+ this.close();
159
+ }
160
+ });
161
+ }
162
+ }
163
+
164
+ /**
165
+ * Removes the error overlay from the DOM.
166
+ */
167
+ close() {
168
+ if (this.parentNode) {
169
+ this.remove();
170
+ }
171
+ }
172
+
173
+ /**
174
+ * Updates the overlay content with the current error's code frame.
175
+ */
176
+ updateOverlay() {
177
+ const currentIndex = 0; // Assuming we're showing the first error
178
+
179
+ const currentError = this.__v_oPayload?.errors?.[currentIndex];
180
+
181
+ if (currentError) {
182
+ const flameOverlay = this.root.querySelector("#__v_o__overlay");
183
+
184
+ if (flameOverlay) {
185
+ const html = currentError.originalCodeFrameContent || currentError.compiledCodeFrameContent || "";
186
+
187
+ flameOverlay.innerHTML = html;
188
+ }
189
+ }
190
+ }
191
+
192
+ /**
193
+ * Hides loading skeleton states and shows the actual content after a brief delay.
194
+ * @private
195
+ */
196
+ #hideLoadingStates() {
197
+ setTimeout(() => {
198
+ const headerSkeleton = this.root.querySelector("#__v_o__header_loader");
199
+ const headerContent = this.root.querySelector("#__v_o__title");
200
+
201
+ if (headerSkeleton) {
202
+ headerSkeleton.style.display = "none";
203
+ }
204
+
205
+ if (headerContent) {
206
+ headerContent.classList.remove("hidden");
207
+ }
208
+
209
+ const messageSkeleton = this.root.querySelector("#__v_o__message_loader");
210
+ const messageContent = this.root.querySelector("#__v_o__message");
211
+
212
+ if (messageSkeleton) {
213
+ messageSkeleton.style.display = "none";
214
+ }
215
+
216
+ if (messageContent) {
217
+ messageContent.classList.remove("hidden");
218
+ }
219
+
220
+ const bodySkeleton = this.root.querySelector("#__v_o__body_loader");
221
+ const bodyContent = this.root.querySelector("#__v_o__overlay");
222
+
223
+ if (bodySkeleton) {
224
+ bodySkeleton.style.display = "none";
225
+ }
226
+
227
+ if (bodyContent) {
228
+ bodyContent.classList.remove("hidden");
229
+ }
230
+ }, 100); // Small delay to ensure DOM is ready
231
+ }
232
+
233
+ /**
234
+ * Initializes the copy error functionality that copies error details to clipboard.
235
+ * @private
236
+ */
237
+ #initializeCopyError() {
238
+ const copyButton = this.root.querySelector("#__v_o__copy_error");
239
+
240
+ if (!copyButton) {
241
+ return;
242
+ }
243
+
244
+ copyButton.addEventListener("click", async (e) => {
245
+ e.preventDefault();
246
+
247
+ try {
248
+ const payload = this.__v_oPayload;
249
+ const currentError = payload?.errors?.[0]; // Get first error
250
+
251
+ if (!currentError) {
252
+ console.warn("[v-o] No error data available to copy");
253
+
254
+ return;
255
+ }
256
+
257
+ const codeFrame = currentError?.originalSnippet || "";
258
+
259
+ const formattedText = [
260
+ "## Error Type",
261
+ currentError.name || "Unknown Error",
262
+ "",
263
+ "## Error Message",
264
+ currentError.message || "No error message available",
265
+ "",
266
+ "## Build Output",
267
+ currentError.originalFilePath
268
+ ? \`\${currentError.originalFilePath}:\${currentError.originalFileLine}:\${currentError.originalFileColumn}\`
269
+ : "Unknown location",
270
+ currentError.message || "No error message available",
271
+ ...codeFrame ? ["", codeFrame] : [],
272
+ "",
273
+ "## Stack Trace",
274
+ currentError.stack || "No stack trace available",
275
+ ].join("\\n");
276
+
277
+ await navigator.clipboard.writeText(formattedText);
278
+
279
+ const originalText = copyButton.innerHTML;
280
+
281
+ copyButton.innerHTML = \`
282
+ <span class="inline-flex shrink-0 justify-center items-center size-8">
283
+ <svg class="size-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
284
+ <polyline points="20,6 9,17 4,12"></polyline>
285
+ </svg>
286
+ </span>
287
+ \`;
288
+
289
+ setTimeout(() => {
290
+ copyButton.innerHTML = originalText;
291
+ }, 2000);
292
+ } catch (error) {
293
+ console.error("[v-o] Failed to copy error info:", error);
294
+
295
+ const originalText = copyButton.innerHTML;
296
+
297
+ copyButton.innerHTML = \`
298
+ <span class="inline-flex shrink-0 justify-center items-center size-8">
299
+ <svg class="size-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
300
+ <line x1="18" y1="6" x2="6" y2="18"></line>
301
+ <line x1="6" y1="6" x2="18" y2="18"></line>
302
+ </svg>
303
+ </span>
304
+ \`;
305
+
306
+ setTimeout(() => {
307
+ copyButton.innerHTML = originalText;
308
+ }, 2000);
309
+ }
310
+ });
311
+ }
312
+
313
+ /**
314
+ * Initializes pagination functionality for navigating between multiple errors.
315
+ * @private
316
+ */
317
+ #initializePagination() {
318
+ const payload = this.__v_oPayload;
319
+ const errors = Array.isArray(payload.errors) && payload.errors.length > 0 ? payload.errors : [];
320
+ const errorIds = errors.map((error) =>
321
+ String(error.__id || [error.originalFilePath || "", error.originalFileLine || 0, error.name || "", error.message || ""].join("|")),
322
+ );
323
+
324
+ const totalErrors = errors.length;
325
+
326
+ let currentIndex = 0;
327
+
328
+ const updateOverlayContent = () => {
329
+ const mount = this.root.querySelector("#__v_o__overlay");
330
+
331
+ if (!mount) {
332
+ return;
333
+ }
334
+
335
+ const currentError = errors[currentIndex] || {
336
+ compiledStack: payload.compiledStack,
337
+ message: payload.message,
338
+ name: payload.name,
339
+ originalStack: payload.originalStack,
340
+ };
341
+
342
+ const updateFileLink = () => {
343
+ const fileElement = this.root.querySelector("#__v_o__filelink");
344
+
345
+ if (fileElement) {
346
+ const fullPath = currentError?.originalFilePath || "";
347
+ const line = currentError?.originalFileLine;
348
+ const column = currentError?.originalFileColumn;
349
+
350
+ if (fullPath) {
351
+ let displayPath = fullPath;
352
+
353
+ if (payload.rootPath && fullPath.startsWith(payload.rootPath)) {
354
+ displayPath = fullPath.slice(payload.rootPath.length);
355
+
356
+ if (!displayPath.startsWith("/")) {
357
+ displayPath = \`/\${displayPath}\`;
358
+ }
359
+ }
360
+
361
+ fileElement.textContent = \`.\${displayPath}\${line ? \`:\${line}\` : ""}\`;
362
+ const editor = localStorage.getItem("vo:editor");
363
+
364
+ const url = \`/__open-in-editor?file=\${encodeURIComponent(fullPath)}\${
365
+ line ? \`&line=\${line}\` : ""
366
+ }\${column ? \`&column=\${column}\` : ""}\${editor ? \`&editor=\${editor}\` : ""}\`;
367
+
368
+ // Remove any existing event listeners
369
+ const newFileElement = fileElement.cloneNode(true);
370
+
371
+ fileElement.parentNode.replaceChild(newFileElement, fileElement);
372
+
373
+ newFileElement.addEventListener("click", (event) => {
374
+ event.preventDefault();
375
+ fetch(url, { method: "POST" });
376
+ });
377
+
378
+ newFileElement.classList.remove("hidden");
379
+ } else {
380
+ fileElement.textContent = "";
381
+ fileElement.classList.add("hidden");
382
+ }
383
+ }
384
+ };
385
+
386
+ const updateRawStack = (mode) => {
387
+ const stackHost = this.root.querySelector("#__v_o__stacktrace");
388
+ const stackElement = stackHost?.querySelector("div:last-child");
389
+
390
+ if (stackHost && stackElement) {
391
+ const rootPayload = this.__v_oPayload || {};
392
+
393
+ const stackText
394
+ = mode === "compiled"
395
+ ? String(currentError.compiledStack || rootPayload.compiledStack || "")
396
+ : String(currentError.originalStack || currentError.stack || rootPayload.originalStack || "");
397
+
398
+ const escape = (s) =>
399
+ String(s || "")
400
+ .replaceAll("&", "&amp;")
401
+ .replaceAll("<", "&lt;")
402
+ .replaceAll(">", "&gt;");
403
+
404
+ const normalizePath = (path) => {
405
+ if (/^https?:\\/\\//i.test(path)) {
406
+ const u = new URL(path);
407
+
408
+ path = u.pathname || "";
409
+ }
410
+
411
+ path = decodeURIComponent(path);
412
+ path = String(path || "").replace(/^\\/@fs\\//, "/");
413
+
414
+ return path;
415
+ };
416
+
417
+ const fmt = (line) => {
418
+ const m = /\\s*at\\s+(?:(.+?)\\s+\\()?(.*?):(\\d+):(\\d+)\\)?/.exec(line);
419
+
420
+ if (!m)
421
+ return \`<div class="frame">\${escape(line)}</div>\`;
422
+
423
+ const function_ = m[1] ? escape(m[1]) : "";
424
+ const file = m[2];
425
+ const ln = m[3];
426
+ const col = m[4];
427
+ const displayPath = normalizePath(file);
428
+ const display = \`\${displayPath}:\${ln}:\${col}\`;
429
+ const functionHtml = function_ ? \`<span class="fn">\${function_}</span> \` : "";
430
+
431
+ return \`<div class="frame"><span class="muted">at</span> \${functionHtml}<button type="button" class="stack-link text-left underline bg-transparent border-none cursor-pointer text-[var(--ono-v-text)] hover:text-[var(--ono-v-text-muted)]" data-file="\${escape(displayPath)}" data-line="\${ln}" data-column="\${col}">\${escape(display)}</button></div>\`;
432
+ };
433
+ const html = stackText.split("\\n").map(fmt).join("");
434
+
435
+ stackElement.innerHTML = html;
436
+ stackElement.querySelectorAll(".stack-link").forEach((button) => {
437
+ button.addEventListener("click", (event_) => {
438
+ event_.preventDefault();
439
+
440
+ const filePath = button.dataset.file || "";
441
+ const line = button.dataset.line || "";
442
+ const column = button.dataset.column || "";
443
+ let resolved = filePath;
444
+
445
+ const abs = currentError.originalFilePath || currentError.compiledFilePath || "";
446
+
447
+ if (abs && abs.endsWith(filePath)) {
448
+ resolved = abs;
449
+ }
450
+
451
+ const editor = localStorage.getItem("vo:editor");
452
+
453
+ const url = \`/__open-in-editor?file=\${encodeURIComponent(resolved)}\${
454
+ line ? \`&line=\${line}\` : ""
455
+ }\${column ? \`&column=\${column}\` : ""}\${editor ? \`&editor=\${editor}\` : ""}\`;
456
+
457
+ fetch(url, { method: "POST" });
458
+ });
459
+ });
460
+ }
461
+ };
462
+
463
+ const flameOverlay = this.root.querySelector("#__v_o__overlay");
464
+ const headingElement = this.root.querySelector("#__v_o__heading");
465
+ const messageElement = this.root.querySelector("#__v_o__message");
466
+ const modeSwitch = this.root.querySelector("#__v_o__mode");
467
+
468
+ if (headingElement) {
469
+ headingElement.textContent = currentError.name || "";
470
+ headingElement.dataset.errorId = errorIds[currentIndex] || "";
471
+ }
472
+
473
+ if (messageElement) {
474
+ messageElement.textContent = currentError.message || "";
475
+ }
476
+
477
+ const hasOriginal = !!currentError.originalCodeFrameContent;
478
+ const hasCompiled = !!currentError.compiledCodeFrameContent;
479
+
480
+ if (hasOriginal && hasCompiled && modeSwitch) {
481
+ modeSwitch.classList.remove("hidden");
482
+ } else if (modeSwitch) {
483
+ modeSwitch.classList.add("hidden");
484
+ }
485
+
486
+ const originalButton = this.root.querySelector("[data-flame-mode=\\"original\\"]");
487
+ const compiledButton = this.root.querySelector("[data-flame-mode=\\"compiled\\"]");
488
+
489
+ if (originalButton) {
490
+ originalButton.style.display = hasOriginal ? "" : "none";
491
+ }
492
+
493
+ if (compiledButton) {
494
+ compiledButton.style.display = hasCompiled ? "" : "none";
495
+ }
496
+
497
+ const renderCode = (mode) => {
498
+ if (!flameOverlay) {
499
+ return;
500
+ }
501
+
502
+ let codeFrame = "<div class=\\"no-code-frame font-mono\\">No code frame could be generated.</div>";
503
+
504
+ if (mode === "compiled" && currentError.compiledCodeFrameContent) {
505
+ codeFrame = currentError.compiledCodeFrameContent;
506
+ } else if (currentError.originalCodeFrameContent) {
507
+ codeFrame = currentError.originalCodeFrameContent;
508
+ }
509
+
510
+ flameOverlay.innerHTML = codeFrame;
511
+ };
512
+
513
+ const activeMode = this.__v_oMode || "original";
514
+
515
+ renderCode(activeMode);
516
+ updateFileLink();
517
+ updateRawStack(activeMode);
518
+
519
+ if (originalButton && compiledButton) {
520
+ if (activeMode === "original") {
521
+ originalButton.classList.add("active");
522
+ compiledButton.classList.remove("active");
523
+ } else {
524
+ compiledButton.classList.add("active");
525
+ originalButton.classList.remove("active");
526
+ }
527
+ }
528
+
529
+ originalButton?.addEventListener("click", (event) => {
530
+ event.preventDefault();
531
+
532
+ this.__v_oMode = "original";
533
+
534
+ renderCode("original");
535
+ updateRawStack("original");
536
+
537
+ originalButton?.classList.add("active");
538
+ compiledButton?.classList.remove("active");
539
+ });
540
+
541
+ compiledButton?.addEventListener("click", (event) => {
542
+ event.preventDefault();
543
+
544
+ this.__v_oMode = "compiled";
545
+
546
+ renderCode("compiled");
547
+ updateRawStack("compiled");
548
+
549
+ compiledButton?.classList.add("active");
550
+ originalButton?.classList.remove("active");
551
+ });
552
+ };
553
+
554
+ const updatePagination = () => {
555
+ const indexElement = this.root.querySelector("[data-flame-dialog-error-index]");
556
+ const totalElement = this.root.querySelector("[data-flame-dialog-header-total-count]");
557
+ const previousButton = this.root.querySelector("[data-flame-dialog-error-previous]");
558
+ const nextButton = this.root.querySelector("[data-flame-dialog-error-next]");
559
+
560
+ if (indexElement)
561
+ indexElement.textContent = (currentIndex + 1).toString();
562
+
563
+ if (totalElement)
564
+ totalElement.textContent = totalErrors.toString();
565
+
566
+ // Update button states
567
+ if (previousButton) {
568
+ previousButton.disabled = currentIndex === 0;
569
+ previousButton.setAttribute("aria-disabled", currentIndex === 0);
570
+ }
571
+
572
+ if (nextButton) {
573
+ nextButton.disabled = currentIndex >= totalErrors - 1;
574
+ nextButton.setAttribute("aria-disabled", currentIndex >= totalErrors - 1);
575
+ }
576
+
577
+ // Update overlay content
578
+ updateOverlayContent();
579
+ };
580
+
581
+ // Set up event listeners
582
+ const previousButton = this.root.querySelector("[data-flame-dialog-error-previous]");
583
+ const nextButton = this.root.querySelector("[data-flame-dialog-error-next]");
584
+
585
+ if (previousButton) {
586
+ previousButton.addEventListener("click", (event) => {
587
+ event.preventDefault();
588
+ event.stopPropagation();
589
+
590
+ if (currentIndex > 0) {
591
+ currentIndex--;
592
+ updatePagination();
593
+ }
594
+ });
595
+ }
596
+
597
+ if (nextButton) {
598
+ nextButton.addEventListener("click", (event) => {
599
+ event.preventDefault();
600
+ event.stopPropagation();
601
+
602
+ if (currentIndex < totalErrors - 1) {
603
+ currentIndex++;
604
+ updatePagination();
605
+ }
606
+ });
607
+ }
608
+
609
+ // Selection by error id (external)
610
+ const selectById = (id) => {
611
+ const index = errorIds.indexOf(String(id || ""));
612
+
613
+ if (index !== -1) {
614
+ currentIndex = index;
615
+
616
+ updatePagination();
617
+ }
618
+ };
619
+
620
+ globalThis.__v_oSelectError = selectById;
621
+
622
+ globalThis.addEventListener("v-o:select-error", (event_) => {
623
+ selectById(event_?.detail?.id);
624
+ });
625
+
626
+ updatePagination();
627
+ }
628
+
629
+ /**
630
+ * Initializes the theme toggle functionality for switching between light and dark modes.
631
+ * @private
632
+ */
633
+ #initializeThemeToggle() {
634
+ const savedTheme = localStorage.getItem("__v-o__theme");
635
+ const systemPrefersDark = globalThis.matchMedia && globalThis.matchMedia("(prefers-color-scheme: dark)").matches;
636
+ const currentTheme = savedTheme || (systemPrefersDark ? "dark" : "light");
637
+
638
+ const isDark = currentTheme === "dark";
639
+
640
+ const rootElement = this.root.querySelector("#__v_o__root");
641
+ const darkButton = this.root.querySelector("[data-v-o-theme-click-value=\\"dark\\"]");
642
+ const lightButton = this.root.querySelector("[data-v-o-theme-click-value=\\"light\\"]");
643
+
644
+ if (isDark) {
645
+ darkButton?.classList.add("hidden");
646
+ darkButton?.classList.remove("block");
647
+ lightButton?.classList.remove("hidden");
648
+ lightButton?.classList.add("block");
649
+ rootElement?.classList.add("dark");
650
+ } else {
651
+ darkButton?.classList.remove("hidden");
652
+ darkButton?.classList.add("block");
653
+ lightButton?.classList.add("hidden");
654
+ lightButton?.classList.remove("block");
655
+ rootElement?.classList.remove("dark");
656
+ }
657
+
658
+ rootElement?.classList.remove("hidden");
659
+
660
+ const themeButtons = this.root.querySelectorAll("[data-v-o-theme-click-value]");
661
+
662
+ themeButtons.forEach((button) => {
663
+ button.addEventListener("click", (e) => {
664
+ e.preventDefault();
665
+
666
+ const theme = e.currentTarget.dataset.vOThemeClickValue;
667
+
668
+ if (theme === "dark") {
669
+ rootElement?.classList.add("dark");
670
+ localStorage.setItem("__v-o__theme", "dark");
671
+
672
+ darkButton?.classList.add("hidden");
673
+ darkButton?.classList.remove("block");
674
+ lightButton?.classList.remove("hidden");
675
+ lightButton?.classList.add("block");
676
+ } else {
677
+ rootElement?.classList.remove("dark");
678
+ localStorage.setItem("__v-o__theme", "light");
679
+
680
+ darkButton?.classList.remove("hidden");
681
+ darkButton?.classList.add("block");
682
+ lightButton?.classList.add("hidden");
683
+ lightButton?.classList.remove("block");
684
+ }
685
+ });
686
+ });
687
+ }
688
+
689
+ /**
690
+ * Injects solution content into the overlay for display.
691
+ * @param {object} solution - The solution object containing header and body
692
+ * @private
693
+ */
694
+ #injectSolution(solution) {
695
+ const solutions = this.root.querySelector("#__v_o__solutions");
696
+ const solutionsContainer = this.root.querySelector("#__v_o__solutions_container");
697
+
698
+ if (solutionsContainer && solution) {
699
+ // Generate HTML from solution object
700
+ let html = "";
701
+
702
+ if (solution.header) {
703
+ html += solution.header;
704
+ }
705
+
706
+ if (solution.body) {
707
+ html += solution.body;
708
+ }
709
+
710
+ // Set the HTML content and show the container
711
+ solutionsContainer.innerHTML = html;
712
+ solutions.classList.remove("hidden");
713
+ }
714
+ }
715
+ }
716
+ `;var Hn=Object.defineProperty,_t=$((t,e)=>Hn(t,"name",{value:e,configurable:!0}),"a$4");const Gt='<option value="">Auto-detected Editor</option>',qn="class ErrorOverlay",Zn="var ErrorOverlay = ",Vn="window.ErrorOverlay = ErrorOverlay;",Un=_t(()=>{try{const t=Object.keys(dt);return[Gt,...t.map(e=>`<option value="${String(e)}">${String(dt[e])}</option>`)].join("")}catch{return Gt}},"generateEditorOptions"),Nn=_t(()=>{const t=Un();return`<style>${In}</style>
717
+ <div id="__v_o__root" class="fixed inset-0 z-0 flex flex-col items-center pt-[10vh] px-[15px] hidden">
718
+ <div id="__v_o__backdrop" class="fixed inset-0 -z-1 bg-black/60 backdrop-blur-sm md:backdrop-blur pointer-events-auto"></div>
719
+ <div id="__v_o__notch" class="relative z-[2] flex w-full max-w-[var(--ono-v-dialog-max-width)] items-center justify-between outline-none translate-x-[var(--ono-v-dialog-border-width)] translate-y-[var(--ono-v-dialog-border-width)]" style="--stroke-color: var(--ono-v-border); --background-color: var(--ono-v-surface);">
720
+ <div class="error-overlay-notch relative translate-x-[calc(var(--ono-v-dialog-border-width)*-1)] h-[var(--ono-v-dialog-notch-height)] p-3 pr-0 bg-[var(--background-color)] border border-[var(--stroke-color)] border-b-0 rounded-tl-[var(--ono-v-dialog-radius)]" data-side="left">
721
+ <nav class="error-overlay-pagination dialog-exclude-closing-from-outside-click flex justify-center items-center gap-2 w-fit">
722
+ <button type="button" aria-disabled="true" data-flame-dialog-error-previous="true" class="error-overlay-pagination-button flex justify-center items-center w-6 h-6 bg-[var(--ono-v-chip-bg)] rounded-full disabled:opacity-50 disabled:cursor-not-allowed focus-visible:outline focus-visible:outline-[var(--ono-v-red-orange)] hover:bg-[var(--ono-v-hover-overlay)] transition-colors" disabled>
723
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" aria-label="previous" class="error-overlay-pagination-button-icon">
724
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M9.24996 12.0608L8.71963 11.5304L5.89641 8.70722C5.50588 8.3167 5.50588 7.68353 5.89641 7.29301L8.71963 4.46978L9.24996 3.93945L10.3106 5.00011L9.78029 5.53044L7.31062 8.00011L9.78029 10.4698L10.3106 11.0001L9.24996 12.0608Z" fill="currentColor"></path>
725
+ </svg>
726
+ </button>
727
+ <div class="error-overlay-pagination-count inline-flex justify-center items-center min-w-8 h-5 gap-1 text-[var(--ono-v-text)] text-center text-[11px] font-medium leading-4 rounded-full px-1.5">
728
+ <span data-flame-dialog-error-index="0">1</span>
729
+ <span class="text-[var(--ono-v-text-muted)]">/</span>
730
+ <span data-flame-dialog-header-total-count="true">1</span>
731
+ </div>
732
+ <button type="button" aria-disabled="true" data-flame-dialog-error-next="true" class="error-overlay-pagination-button flex justify-center items-center w-6 h-6 bg-[var(--ono-v-chip-bg)] rounded-full disabled:opacity-50 disabled:cursor-not-allowed focus-visible:outline focus-visible:outline-[var(--ono-v-red-orange)] hover:bg-[var(--ono-v-hover-overlay)] transition-colors" disabled>
733
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" class="error-overlay-pagination-button-icon" aria-label="next">
734
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M6.75011 3.93945L7.28044 4.46978L10.1037 7.29301C10.4942 7.68353 10.4942 8.3167 10.1037 8.70722L7.28044 11.5304L6.75011 12.0608L5.68945 11.0001L6.21978 10.4698L8.68945 8.00011L6.21978 5.53044L5.68945 5.00011L6.75011 3.93945Z" fill="currentColor"></path>
735
+ </svg>
736
+ </button>
737
+ </nav>
738
+ <svg width="60" height="42" viewBox="0 0 60 42" fill="none" xmlns="http://www.w3.org/2000/svg" class="error-overlay-notch-tail absolute top-[calc(var(--ono-v-dialog-border-width)*-1)] -z-[1] h-[calc(100%+var(--ono-v-dialog-border-width))] right-[-54px] pointer-events-none" preserveAspectRatio="none">
739
+ <mask id="error_overlay_nav_mask0_2667_14687" maskUnits="userSpaceOnUse" x="0" y="-1" width="60" height="43" style="mask-type: alpha;">
740
+ <mask id="error_overlay_nav_path_1_outside_1_2667_14687" maskUnits="userSpaceOnUse" x="0" y="-1" width="60" height="43" fill="black">
741
+ <rect fill="white" y="-1" width="60" height="43"></rect>
742
+ <path d="M1 0L8.0783 0C15.772 0 22.7836 4.41324 26.111 11.3501L34.8889 29.6498C38.2164 36.5868 45.228 41 52.9217 41H60H1L1 0Z"></path>
743
+ </mask>
744
+ <path d="M1 0L8.0783 0C15.772 0 22.7836 4.41324 26.111 11.3501L34.8889 29.6498C38.2164 36.5868 45.228 41 52.9217 41H60H1L1 0Z" fill="white"></path>
745
+ <path d="M1 0V-1H0V0L1 0ZM1 41H0V42H1V41ZM34.8889 29.6498L33.9873 30.0823L34.8889 29.6498ZM26.111 11.3501L27.0127 10.9177L26.111 11.3501ZM1 1H8.0783V-1H1V1ZM60 40H1V42H60V40ZM2 41V0L0 0L0 41H2ZM25.2094 11.7826L33.9873 30.0823L35.7906 29.2174L27.0127 10.9177L25.2094 11.7826ZM52.9217 42H60V40H52.9217V42ZM33.9873 30.0823C37.4811 37.3661 44.8433 42 52.9217 42V40C45.6127 40 38.9517 35.8074 35.7906 29.2174L33.9873 30.0823ZM8.0783 1C15.3873 1 22.0483 5.19257 25.2094 11.7826L27.0127 10.9177C23.5188 3.6339 16.1567 -1 8.0783 -1V1Z" fill="black" mask="url(#error_overlay_nav_path_1_outside_1_2667_14687)"></path>
746
+ </mask>
747
+ <g mask="url(#error_overlay_nav_mask0_2667_14687)">
748
+ <mask id="error_overlay_nav_path_3_outside_2_2667_14687" maskUnits="userSpaceOnUse" x="-1" y="0.0244141" width="60" height="43" fill="black">
749
+ <rect fill="white" x="-1" y="0.0244141" width="60" height="43"></rect>
750
+ <path d="M0 1.02441H7.0783C14.772 1.02441 21.7836 5.43765 25.111 12.3746L33.8889 30.6743C37.2164 37.6112 44.228 42.0244 51.9217 42.0244H59H0L0 1.02441Z"></path>
751
+ </mask>
752
+ <path d="M0 1.02441H7.0783C14.772 1.02441 21.7836 5.43765 25.111 12.3746L33.8889 30.6743C37.2164 37.6112 44.228 42.0244 51.9217 42.0244H59H0L0 1.02441Z" fill="var(--background-color)"></path>
753
+ <path d="M0 1.02441L0 0.0244141H-1V1.02441H0ZM0 42.0244H-1V43.0244H0L0 42.0244ZM33.8889 30.6743L32.9873 31.1068L33.8889 30.6743ZM25.111 12.3746L26.0127 11.9421L25.111 12.3746ZM0 2.02441H7.0783V0.0244141H0L0 2.02441ZM59 41.0244H0L0 43.0244H59V41.0244ZM1 42.0244L1 1.02441H-1L-1 42.0244H1ZM24.2094 12.8071L32.9873 31.1068L34.7906 30.2418L26.0127 11.9421L24.2094 12.8071ZM51.9217 43.0244H59V41.0244H51.9217V43.0244ZM32.9873 31.1068C36.4811 38.3905 43.8433 43.0244 51.9217 43.0244V41.0244C44.6127 41.0244 37.9517 36.8318 34.7906 30.2418L32.9873 31.1068ZM7.0783 2.02441C14.3873 2.02441 21.0483 6.21699 24.2094 12.8071L26.0127 11.9421C22.5188 4.65831 15.1567 0.0244141 7.0783 0.0244141V2.02441Z" fill="var(--stroke-color)" mask="url(#error_overlay_nav_path_3_outside_2_2667_14687)"></path>
754
+ </g>
755
+ </svg>
756
+ </div>
757
+ <div class="error-overlay-notch flex gap-1 relative translate-x-[calc(var(--ono-v-dialog-border-width)*-1)] h-[var(--ono-v-dialog-notch-height)] p-3 pl-0 bg-[var(--background-color)] border border-[var(--stroke-color)] border-b-0 rounded-tr-[var(--ono-v-dialog-radius)]" data-side="right">
758
+ <div id="__v_o__editor" class="hidden sm:flex items-center gap-1">
759
+ <label for="editor-selector" class="sr-only">Editor</label>
760
+ <select id="editor-selector" class="py-1 cursor-pointer px-2 pe-6 block w-44 bg-[var(--ono-v-surface)] border border-[var(--ono-v-border)] rounded-[var(--ono-v-radius-md)] text-xs text-[var(--ono-v-text)] shadow-[var(--ono-v-elevation-1)] hover:bg-[var(--ono-v-hover-overlay)] focus:outline-hidden focus:ring-1 focus:ring-[var(--ono-v-red-orange)]">${t}</select>
761
+ </div>
762
+
763
+ <div id="v-o-theme-switch" class="flex items-center gap-1">
764
+ <button type="button" title="Switch to dark mode" aria-label="Switch to dark mode" class="font-medium rounded-full hover:bg-[var(--ono-v-hover-overlay)] focus:outline-hidden focus:bg-[var(--ono-v-hover-overlay)] text-[var(--ono-v-text)]" data-v-o-theme-click-value="dark">
765
+ <span class="inline-flex shrink-0 justify-center items-center size-8">
766
+ <span class="dui size-5" style="-webkit-mask-image: url('${Vt}'); mask-image: url('${Vt}')"></span>
767
+ </span>
768
+ </button>
769
+ <button type="button" title="Switch to light mode" aria-label="Switch to light mode" class="hidden font-medium rounded-full hover:bg-[var(--ono-v-hover-overlay)] focus:outline-hidden focus:bg-[var(--ono-v-hover-overlay)] text-[var(--ono-v-text)]" data-v-o-theme-click-value="light">
770
+ <span class="inline-flex shrink-0 justify-center items-center size-8">
771
+ <span class="dui size-5" style="-webkit-mask-image: url('${Ut}'); mask-image: url('${Ut}')"></span>
772
+ </span>
773
+ </button>
774
+ </div>
775
+
776
+ <div class="flex items-center">
777
+ <button type="button" id="__v_o__close" aria-label="Close error overlay" class="font-medium rounded-full hover:bg-[var(--ono-v-hover-overlay)] focus:outline-hidden focus:bg-[var(--ono-v-hover-overlay)] text-[var(--ono-v-text)]">
778
+ <span class="inline-flex shrink-0 justify-center items-center size-8">
779
+ <span class="dui size-5" style="-webkit-mask-image: url('${Nt}'); mask-image: url('${Nt}')"></span>
780
+ </span>
781
+ </button>
782
+ </div>
783
+
784
+ <svg width="60" height="42" viewBox="0 0 60 42" fill="none" xmlns="http://www.w3.org/2000/svg" class="error-overlay-notch-tail absolute top-[calc(var(--ono-v-dialog-border-width)*-1)] -z-[1] h-[calc(100%+var(--ono-v-dialog-border-width))] left-[-54px] pointer-events-none [transform:rotateY(180deg)]" preserveAspectRatio="none">
785
+ <mask id="error_overlay_nav_mask0_2667_14687" maskUnits="userSpaceOnUse" x="0" y="-1" width="60" height="43" style="mask-type: alpha;">
786
+ <mask id="error_overlay_nav_path_1_outside_1_2667_14687" maskUnits="userSpaceOnUse" x="0" y="-1" width="60" height="43" fill="black">
787
+ <rect fill="white" y="-1" width="60" height="43"></rect>
788
+ <path d="M1 0L8.0783 0C15.772 0 22.7836 4.41324 26.111 11.3501L34.8889 29.6498C38.2164 36.5868 45.228 41 52.9217 41H60H1L1 0Z"></path>
789
+ </mask>
790
+ <path d="M1 0L8.0783 0C15.772 0 22.7836 4.41324 26.111 11.3501L34.8889 29.6498C38.2164 36.5868 45.228 41 52.9217 41H60H1L1 0Z" fill="white"></path>
791
+ <path d="M1 0V-1H0V0L1 0ZM1 41H0V42H1V41ZM34.8889 29.6498L33.9873 30.0823L34.8889 29.6498ZM26.111 11.3501L27.0127 10.9177L26.111 11.3501ZM1 1H8.0783V-1H1V1ZM60 40H1V42H60V40ZM2 41V0L0 0L0 41H2ZM25.2094 11.7826L33.9873 30.0823L35.7906 29.2174L27.0127 10.9177L25.2094 11.7826ZM52.9217 42H60V40H52.9217V42ZM33.9873 30.0823C37.4811 37.3661 44.8433 42 52.9217 42V40C45.6127 40 38.9517 35.8074 35.7906 29.2174L33.9873 30.0823ZM8.0783 1C15.3873 1 22.0483 5.19257 25.2094 11.7826L27.0127 10.9177C23.5188 3.6339 16.1567 -1 8.0783 -1V1Z" fill="black" mask="url(#error_overlay_nav_path_1_outside_1_2667_14687)"></path>
792
+ </mask>
793
+ <g mask="url(#error_overlay_nav_mask0_2667_14687)">
794
+ <mask id="error_overlay_nav_path_3_outside_2_2667_14687" maskUnits="userSpaceOnUse" x="-1" y="0.0244141" width="60" height="43" fill="black">
795
+ <rect fill="white" x="-1" y="0.0244141" width="60" height="43"></rect>
796
+ <path d="M0 1.02441H7.0783C14.772 1.02441 21.7836 5.43765 25.111 12.3746L33.8889 30.6743C37.2164 37.6112 44.228 42.0244 51.9217 42.0244H59H0L0 1.02441Z"></path>
797
+ </mask>
798
+ <path d="M0 1.02441H7.0783C14.772 1.02441 21.7836 5.43765 25.111 12.3746L33.8889 30.6743C37.2164 37.6112 44.228 42.0244 51.9217 42.0244H59H0L0 1.02441Z" fill="var(--background-color)"></path>
799
+ <path d="M0 1.02441L0 0.0244141H-1V1.02441H0ZM0 42.0244H-1V43.0244H0L0 42.0244ZM33.8889 30.6743L32.9873 31.1068L33.8889 30.6743ZM25.111 12.3746L26.0127 11.9421L25.111 12.3746ZM0 2.02441H7.0783V0.0244141H0L0 2.02441ZM59 41.0244H0L0 43.0244H59V41.0244ZM1 42.0244L1 1.02441H-1L-1 42.0244H1ZM24.2094 12.8071L32.9873 31.1068L34.7906 30.2418L26.0127 11.9421L24.2094 12.8071ZM51.9217 43.0244H59V41.0244H51.9217V43.0244ZM32.9873 31.1068C36.4811 38.3905 43.8433 43.0244 51.9217 43.0244V41.0244C44.6127 41.0244 37.9517 36.8318 34.7906 30.2418L32.9873 31.1068ZM7.0783 2.02441C14.3873 2.02441 21.0483 6.21699 24.2094 12.8071L26.0127 11.9421C22.5188 4.65831 15.1567 0.0244141 7.0783 0.0244141V2.02441Z" fill="var(--stroke-color)" mask="url(#error_overlay_nav_path_3_outside_2_2667_14687)"></path>
800
+ </g>
801
+ </svg>
802
+ </div>
803
+ </div>
804
+
805
+ <div id="__v_o__panel" role="dialog" aria-modal="true" aria-label="Runtime Error Overlay" class="relative z-10 flex w-full max-w-[var(--ono-v-dialog-max-width)] max-h-[calc(100%-56px)] scale-100 opacity-100 flex-col overflow-hidden rounded-b-[var(--ono-v-dialog-radius)] bg-[var(--ono-v-surface)] text-[var(--ono-v-text)] shadow-[var(--ono-v-elevation-1)] border-b border-[var(--ono-v-border)] ">
806
+ <div id="__v_o__header" class="flex items-center gap-1 justify-between border-b border-[var(--ono-v-border)] bg-[var(--ono-v-surface)] px-4 py-2">
807
+ <div id="__v_o__header_loader" class="v-o-skeleton h-6 w-3/5 rounded animate-pulse"></div>
808
+ <div id="__v_o__title" class="flex items-center gap-2 w-full font-bold text-[var(--ono-v-text)] hidden">
809
+ <span id="__v_o__heading" class="leading-none rounded-md text-[var(--ono-v-red-orange)] font-mono text-sm"></span>
810
+ <button type="button" id="__v_o__filelink" class="ml-2 text-xs font-normal font-mono underline text-[var(--ono-v-text-muted)] hover:text-[var(--ono-v-text)] bg-transparent border-none cursor-pointer"></button>
811
+ </div>
812
+ <div id="__v_o__mode" class="sm:flex items-center gap-1">
813
+ <button type="button" data-flame-mode="original" class="inline-flex items-center gap-1 px-2 py-1 text-xs font-medium text-[var(--ono-v-text)] bg-[var(--ono-v-chip-bg)] rounded-full hover:bg-[var(--ono-v-hover-overlay)] focus:outline-hidden focus:bg-[var(--ono-v-hover-overlay)]" style="display:none">Original</button>
814
+ <button type="button" data-flame-mode="compiled" class="inline-flex items-center gap-1 px-2 py-1 text-xs font-medium text-[var(--ono-v-text)] bg-[var(--ono-v-chip-bg)] rounded-full hover:bg-[var(--ono-v-hover-overlay)] focus:outline-hidden focus:bg-[var(--ono-v-hover-overlay)]" style="display:none">Compiled</button>
815
+ </div>
816
+ <button type="button" id="__v_o__copy_error" title="Copy Error Info" aria-label="Copy Error Info" class="font-medium rounded-full hover:bg-[var(--ono-v-hover-overlay)] focus:outline-hidden focus:bg-[var(--ono-v-hover-overlay)] text-[var(--ono-v-text)]">
817
+ <span class="inline-flex shrink-0 justify-center items-center size-8">
818
+ <span class="dui size-5" style="-webkit-mask-image: url('${qt}'); mask-image: url('${qt}')"></span>
819
+ </span>
820
+ </button>
821
+ </div>
822
+
823
+ <div id="__v_o__message_loader" class="px-4 py-2 bg-[var(--ono-v-surface-muted)] border-b border-[var(--ono-v-border)]">
824
+ <div class="v-o-skeleton h-4 w-full rounded animate-pulse"></div>
825
+ </div>
826
+ <div id="__v_o__message" class="px-4 py-2 text-sm text-[var(--ono-v-red-orange)] font-mono bg-[var(--ono-v-surface-muted)] border-b border-[var(--ono-v-border)] font-medium hidden"></div>
827
+ <div id="__v_o__solutions" class="relative hidden">
828
+ <div title="Possible Solution" class="bg-[#b0c8aa] dark:bg-lime-800 rounded-[var(--ono-v-radius-md)] absolute top-4 right-4 z-10 size-6.5 flex items-center justify-center shadow-[var(--ono-v-elevation-1)]">
829
+ <span class="dui size-5" style="-webkit-mask-image: url('${Zt}'); mask-image: url('${Zt}')"></span>
830
+ </div>
831
+ <div id="__v_o__solutions_container" class="px-4 py-2 bg-[var(--ono-v-success-bg)] m-1 mb-0 prose prose-sm max-w-full prose-headings:text-white prose-ul:list-none prose-hr:my-6 prose-hr:border dark:prose-invert"></div>
832
+ </div>
833
+ <div id="__v_o__body" class="relative flex min-h-0 px-4 py-2 bg-[var(--ono-v-surface)]">
834
+ <div id="__v_o__body_loader" class="w-full space-y-1.5">
835
+ <div class="v-o-skeleton h-4 w-full rounded animate-pulse"></div>
836
+ <div class="v-o-skeleton h-4 w-3/4 rounded animate-pulse"></div>
837
+ <div class="v-o-skeleton h-4 w-1/2 rounded animate-pulse"></div>
838
+ <div class="v-o-skeleton h-4 w-2/3 rounded animate-pulse"></div>
839
+ <div class="v-o-skeleton h-4 w-4/5 rounded animate-pulse"></div>
840
+ <div class="v-o-skeleton h-4 w-1/3 rounded animate-pulse"></div>
841
+ <div class="v-o-skeleton h-4 w-2/5 rounded animate-pulse"></div>
842
+ <div class="v-o-skeleton h-4 w-3/5 rounded animate-pulse"></div>
843
+ </div>
844
+ <div id="__v_o__overlay" class="overflow-auto hidden"></div>
845
+ </div>
846
+ </div>
847
+
848
+ <details id="__v_o__stacktrace" class="relative -mt-5 pt-5 w-full max-w-[var(--ono-v-dialog-max-width)] rounded-b-[var(--ono-v-dialog-radius)] bg-[var(--ono-v-surface-muted)] shadow-[var(--ono-v-elevation-2)]">
849
+ <summary class="cursor-pointer px-4 py-3 text-xs font-mono text-[var(--ono-v-text-muted)] hover:text-[var(--ono-v-text)] transition-colors duration-200 list-none flex items-center gap-2 font-medium">
850
+ <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
851
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"></path>
852
+ </svg>
853
+ Raw stack trace
854
+ </summary>
855
+ <div class="px-4 py-3 text-[var(--ono-v-text)] text-xs rounded-b-[var(--ono-v-dialog-radius)] font-mono leading-5 overflow-auto space-y-0.5 max-h-[140px] bg-[var(--ono-v-surface)] border-t border-[var(--ono-v-border)]"></div>
856
+ </details>
857
+ </div>`},"generateOverlayTemplate"),Wn=_t(t=>{const e=Nn(),r=`const overlayTemplate = ${JSON.stringify(e)};`;let n=t.replace(qn,`${r}
858
+ ${Wt}
859
+ class ViteErrorOverlay`);return n=n.replace(Zn,`${r}
860
+ ${Wt}
861
+ var ViteErrorOverlay = `),n=`${n}
862
+
863
+ ${Vn};`,n},"patchOverlay");var Gn=Object.defineProperty,be=$((t,e)=>Gn(t,"name",{value:e,configurable:!0}),"r$2");let Ee,Ce;const Qn=be(async(t=[])=>{try{const[e,r]=await Promise.all([import("shiki/core"),import("shiki/engine/javascript")]),{createHighlighterCore:n}=e,{createJavaScriptRegexEngine:o}=r,s=await n({themes:[import("@shikijs/themes/github-dark-default"),import("@shikijs/themes/github-light")],langs:[import("@shikijs/langs/javascript"),import("@shikijs/langs/typescript"),import("@shikijs/langs/jsx"),import("@shikijs/langs/tsx"),import("@shikijs/langs/json"),import("@shikijs/langs/jsonc"),import("@shikijs/langs/xml"),import("@shikijs/langs/sql"),import("@shikijs/langs/bash"),import("@shikijs/langs/shell"),import("@shikijs/langs/markdown"),import("@shikijs/langs/mdx"),import("@shikijs/langs/html"),import("@shikijs/langs/css"),import("@shikijs/langs/scss"),import("@shikijs/langs/less"),import("@shikijs/langs/sass"),import("@shikijs/langs/stylus"),import("@shikijs/langs/styl"),...t],engine:o()}),i=s;return Ce=be(()=>{try{s?.dispose?.()}catch{}Ee=void 0},"disposeFn"),i}catch{const{createHighlighter:e}=await import("shiki"),r=await e({langs:["javascript","typescript","jsx","tsx","json","jsonc","xml","sql","bash","shell","markdown","mdx"],themes:["github-dark-default","github-light"]});return Ce=be(()=>{try{r?.dispose?.()}catch{}Ee=void 0},"disposeFn"),r}},"createSingletonHighlighter"),Xn=be(async(t=[])=>(Ee||(Ee=Qn(t)),Ee),"getHighlighter");be(async()=>{try{Ce&&(Ce(),Ce=void 0)}catch{}},"disposeHighlighter");const Qt=be((t=[])=>({name:"@shikijs/transformers:compact-line-options",line(e,r){const n=t.find(o=>o.line===r);return n?.classes&&this.addClassToHast(e,n.classes),e}}),"transformerCompactLineOptions");var Jn=Object.defineProperty,Cr=$((t,e)=>Jn(t,"name",{value:e,configurable:!0}),"c$3");const Yn=Cr((t,e)=>{for(const[r,n]of t.moduleGraph.idToModuleMap){if(!n)continue;const o=n,s=[String(o.file||"").replaceAll("\\","/"),String(r||"").replaceAll("\\","/"),String(o.url||"").replaceAll("\\","/")];for(const i of e)if(s.some(a=>a===i||a.includes(i)||i.includes(a)))return n}},"findBestModuleMatch"),Me=Cr((t,e)=>{const r=[...e,...e.map(s=>s.replace(/^\/@fs\//,"")),...e.map(s=>s.replace(/^[./]*/,""))];let n,o=0;for(const s of r)try{const i=t.moduleGraph.getModuleById(s);if(i){const l=Object.keys(i).length>0,c=!!i.transformResult;let p=0;if(l&&c?p=2:l&&(p=1),l&&(p>o&&(n=i,o=p),c))return i}const a=t.moduleGraph.getModuleByUrl?.(s);if(a){const l=Object.keys(a).length>0,c=!!a.transformResult;let p=0;if(l&&c?p=2:l&&(p=1),l&&(p>o&&(n=a,o=p),c))return a}}catch{}return n||Yn(t,e)||void 0},"findModuleForPath");var Kn=Object.defineProperty,St=$((t,e)=>Kn(t,"name",{value:e,configurable:!0}),"r$1");const ei=/^https?:\/\//,ti=St(t=>{const e=new URL(t),{pathname:r}=e,n=e.search||"",o=[r+n,r,r.replace(/^\/@fs\//,""),decodeURIComponent(r+n),decodeURIComponent(r)];return[...new Set(o)].filter(Boolean)},"generateUrlCandidates"),Lr=St(t=>ei.test(t),"isHttpUrl"),ce=St(t=>{if(!t)return[];try{if(Lr(t))return ti(t);const e=[t];if(t.startsWith("/")&&e.push(t.slice(1)),t.includes("?")){const r=t.split("?")[0];r&&e.push(r)}return[...new Set(e)].filter(Boolean)}catch(e){return console.warn(`Failed to normalize path "${t}":`,e),[]}},"normalizeIdCandidates");var ri=Object.defineProperty,se=$((t,e)=>ri(t,"name",{value:e,configurable:!0}),"o$4");const oi=se((t,e)=>t.split(/\n/g)[e-1]??"","getLine"),Xt=se(t=>t.replaceAll(/\s+/g,""),"removeWhitespace"),ni=se((t,e)=>{if(e<=0||e>t.length)return"";const r=Math.max(0,e-1),n=t.slice(r,r+64),o=/[A-Z_$][\w$]{2,}/i.exec(n);if(o?.[0])return o[0];let s=n.trim();return s.length<4&&(s=t.slice(Math.max(0,r-16),r+16).trim()),s},"extractCandidateToken"),ii=se((t,e)=>{if(!t||t.length<3)return null;for(const[r,n]of e.entries()){if(!n)continue;const o=n.indexOf(t);if(o!==-1)return{column:o+1,line:r+1}}return null},"tryTokenBasedSearch"),si=se((t,e)=>{if(!t)return null;for(const[r,n]of e.entries()){if(!n)continue;const o=n.indexOf(t);if(o!==-1)return{column:o+1,line:r+1}}return null},"tryLineSubstringSearch"),ai=se((t,e)=>{if(!t)return null;const r=Xt(t);if(!r)return null;for(const[n,o]of e.entries()){if(!o)continue;const s=Xt(o).indexOf(r);if(s!==-1){const i=li(o,s);if(i!==-1)return{column:i,line:n+1}}}return null},"tryWhitespaceInsensitiveSearch"),li=se((t,e)=>{let r=0;for(const[n,o]of[...t].entries())if(typeof o=="string"){if(r===e)return n+1;/\s/.test(o)||r++}return-1},"mapNormalizedToOriginalPosition"),ci=se((t,e,r,n)=>{const o=oi(t,e);if(!o)return null;const s=n.split(/\n/g),i=ni(o,r);return ii(i,s)||si(o.trim(),s)||ai(o.trim(),s)},"realignOriginalPosition");var di=Object.defineProperty,X=$((t,e)=>di(t,"name",{value:e,configurable:!0}),"u$2");const pi=/`((?:[^`$]|\$\{[^}]+\})*)`/g,Jt=/\$\{[^}]+\}/g,ui=/[.*+?^${}()|[\]\\]/g,Mr=[/new Error\(/,/throw new Error\(/,/new Error`/,/throw new Error`/,/new [A-Z]\w*\(/,/throw new [A-Z]\w*\(/,/new [A-Z]\w*`/,/throw new [A-Z]\w*`/],de=X(t=>t.replaceAll(ui,String.raw`\$&`),"escapeRegex"),hi=X(t=>{const e=de(t);return[t,`new Error("${e}")`,`new Error('${e}')`,`new Error(\`${de(t)}\`)`,`throw new Error("${e}")`,`throw new Error('${e}')`,`throw new Error(\`${de(t)}\`)`,`Error("${e}")`,`Error('${e}')`]},"createErrorPatterns"),Yt=X((t,e)=>{const r=[...t.matchAll(pi)];for(const n of r){const o=n[1];if(!o)continue;const s=o.split(Jt);if(s.every(a=>a===""||e.includes(a))&&s.length>1)return!0;if(!o)continue;const i=o.replaceAll(Jt,"(.+?)");try{if(new RegExp(`^${de(i)}$`).test(e))return!0}catch{}}return!1},"checkTemplateLiteralMatch"),mi=[/Failed to resolve import ["']([^"']+)["'](?:\s+from ["']([^"']+)["'])?/,/(.+?)\s+from line \d+/,/(.+?)\s+is not defined/,/(.+?)\s+is not a function/,/Cannot read properties of (.+?)\s+\(reading (.+?)\)/],gi=X(t=>{for(const e of mi){const r=t.match(e);if(r)return r}return null},"findDynamicErrorMatch"),Kt=X(t=>{let e=null,r=null;for(const n of Mr){const o=t.match(n);o&&(!e||n.source.includes("throw")&&!r?.source.includes("throw"))&&(e=o,r=n)}return{bestMatch:e,bestPattern:r}},"findBestErrorConstructor"),er=X((t,e)=>{let r=t.index;if(e.source.includes("throw new")&&t[0].startsWith("throw new")){const n=t[0].indexOf("new");n!==-1&&(r+=n)}return r+1},"calculateActualColumn"),fi=X((t,e,r=0)=>{if(!t||!e)return null;const n=t.split(`
864
+ `),o=gi(e),s=hi(e),i=X((f,h,m)=>{let w=0;for(const[g,y]of f.entries()){if(!y)continue;const E=y.includes(h)||Yt(y,h),S=Mr.some(R=>R.test(y));if(E&&S){const{bestMatch:R,bestPattern:H}=Kt(y);if(R&&H&&(w++,w>m))return{column:er(R,H),line:g+1}}}return null},"processErrorConstructorLines")(n,e,r);if(i)return i;o&&X((f,h,m)=>{if(f[0].includes("Failed to resolve import")){const w=f[1];if(!w)return;const g=de(w);m.unshift(`import.*from ["']${g}["']`,`import.*["']${g}["']`,w)}else if(f[0].includes("is not defined")){const w=f[1];if(!w)return;m.unshift(w,`{${w}}`,`src={${w}}`,`${w}.`,`=${w}`)}else if(f[0].includes("Cannot read properties")){const w=f[1],g=f[2];if(!g)return;m.unshift(g,`${w}.${g}`,`${w}?.${g}`,`${w}[${g}]`)}else{const w=f[1];if(!w)return;const g=de(h),y=de(w);m.unshift(`new Error(\`${y}`,`throw new Error(\`${y}`,`new Error("${y}`,`new Error('${y}`,`throw new Error("${y}`,`throw new Error('${y}`,`new Error("${g}")`,`new Error('${g}')`,`throw new Error("${g}")`,`throw new Error('${g}')`,`new Error(\`${g}\`)`,`throw new Error(\`${g}\`)`)}},"addDynamicPatterns")(o,e,s);const a=X((f,h,m)=>{let w=0;for(const[g,y]of f.entries()){if(!y||!Yt(y,h))continue;const{bestMatch:E,bestPattern:S}=Kt(y);if(E&&S&&(w++,w>m))return{column:er(E,S),line:g+1}}return null},"processTemplateLiteralLines"),l=X((f,h,m,w)=>{let g=0;for(const[y,E]of f.entries()){if(!E)continue;let S=-1,R=null;for(const H of h){const V=E.indexOf(H);V!==-1&&(S===-1||V<S)&&(S=V,R=H)}if(S!==-1&&R&&(g++,g>w))return{column:c(S,R,E,m),line:y+1}}return null},"processPatternLines"),c=X((f,h,m,w)=>{if(!w)return f+1;if(w[0].includes("Failed to resolve import")){const g=w[1];if(m.includes(`"${g}"`)||m.includes(`'${g}'`)){const y=m.includes(`"${g}"`)?'"':"'";return m.indexOf(`${y}${g}${y}`)+1}}else if(w[0].includes("is not defined")){const g=w[1];if(g&&h===g)return f+1;if(g&&h.includes(g))return f+h.indexOf(g)+1}else if(w[0].includes("Cannot read properties")){const g=w[2];if(g&&h.includes(g))return f+h.indexOf(g)+1}else if(h.includes("new Error("))return m.indexOf("new Error(")+1;return f+1},"calculatePatternColumn");return a(n,e,r)||l(n,s,o,r)},"findErrorInSourceCode");var wi=Object.defineProperty,Fe=$((t,e)=>wi(t,"name",{value:e,configurable:!0}),"m$3");const vi=1,tr=Fe((t,e)=>{let r=t,n=e;return t>=20?r=Math.max(1,Math.round(t*.5)):t>15?r=Math.max(1,Math.round(t*.6)):t>10?r=Math.max(1,t-8):r=Math.max(1,t-3),e>=10||e>7?n=Math.max(0,e-1):e>5&&(n=Math.max(0,e)),{estimatedColumn:n,estimatedLine:r}},"estimateOriginalPosition"),bi=Fe((t,e,r)=>{try{const n=new Io(t),o=[{column:r,desc:"original",line:e},{column:Math.max(0,r-vi),desc:"offset",line:e},{column:r,desc:"line above",line:e-1},{column:r,desc:"line below",line:e+1},...Array.from({length:5},(s,i)=>({column:Math.max(0,r-2+i),desc:`col ${r-2+i}`,line:e}))];for(const s of o){const i=Ho(n,{column:s.column,line:s.line});if(i.source&&i.line!==void 0&&i.column!==void 0&&i.line>0&&i.column>=0)return{column:i.column,line:i.line,source:i.source}}}catch(n){console.warn("Source map processing failed:",n)}return null},"resolveSourceMapPosition"),ki=Fe((t,e)=>e?Lr(t)?yi(t,e):e:t,"resolveSourcePath"),yi=Fe((t,e)=>{try{const r=new URL(t),n=(r.pathname||"").replace(/^\//,""),o=n.includes("/")?n.slice(0,Math.max(0,n.lastIndexOf("/"))):"";return`${r.origin}/${o?`${o}/`:""}${e}`}catch(r){return console.warn("URL parsing failed for source path resolution:",r),t}},"resolveHttpSourcePath"),pt=Fe(async(t,e,r,n,o,s,i=0)=>{if(s&&e)try{let l=null;if(e.transformResult?.map?.sourcesContent?.[0]?l=e.transformResult.map.sourcesContent[0]:e.transformResult?.code&&(l=e.transformResult.code),!l&&(e.id||e.url)){const c=e.id||e.url;if(c)try{const p=await t.transformRequest(c);p?.map&&"sourcesContent"in p.map&&p.map.sourcesContent?.[0]?l=p.map.sourcesContent[0]:p?.code&&(l=p.code)}catch(p){console.warn("Failed to get fresh source for error search:",p)}}if(!l&&r)try{const c=await import("node:fs/promises");let p=r;if(r.includes("://"))try{p=new URL(r).pathname}catch{const f=r.indexOf("://");f!==-1&&(p=r.slice(f+3))}p.startsWith("/")||(p=`${t.config.root||process.cwd()}/${p}`),l=await c.readFile(p,"utf8")}catch(c){console.warn("Failed to read source file from disk:",c)}if(l){const c=fi(l,s,i);if(c)return{originalFileColumn:c.column,originalFileLine:c.line,originalFilePath:r}}}catch(l){console.warn("Source code search failed:",l)}let a=e?.transformResult?.map;if(!a&&(e?.id||e?.url)){const l=e.id||e.url;if(l)try{const c=await t.transformRequest(l);c?.map&&(a=c.map)}catch(c){console.warn("Failed to get fresh source map:",c)}}if(!a){const{estimatedColumn:l,estimatedLine:c}=tr(n,o);return{originalFileColumn:l,originalFileLine:c,originalFilePath:r}}try{const l=bi(a,n,o);if(!l){const{estimatedColumn:p,estimatedLine:f}=tr(n,o);return{originalFileColumn:p,originalFileLine:f,originalFilePath:r}}const c=ki(r,l.source);return{originalFileColumn:l.column,originalFileLine:l.line,originalFilePath:c}}catch(l){return console.warn("Source map resolution failed:",l),{originalFileColumn:o,originalFileLine:n,originalFilePath:r}}},"resolveOriginalLocation");var xi=Object.defineProperty,$i=$((t,e)=>xi(t,"name",{value:e,configurable:!0}),"ce"),_i=Object.defineProperty,Et=$i((t,e)=>_i(t,"name",{value:e,configurable:!0}),"C"),Si=Object.defineProperty,_=Et((t,e)=>Si(t,"name",{value:e,configurable:!0}),"u$1");let rr=_(()=>{var t=(()=>{var e=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,s=_((d,u)=>{for(var v in u)e(d,v,{get:u[v],enumerable:!0})},"J"),i=_((d,u,v,k)=>{if(u&&typeof u=="object"||typeof u=="function")for(let b of n(u))!o.call(d,b)&&b!==v&&e(d,b,{get:_(()=>u[b],"get"),enumerable:!(k=r(u,b))||k.enumerable});return d},"T"),a=_(d=>i(e({},"__esModule",{value:!0}),d),"W"),l={};s(l,{zeptomatch:_(()=>Lo,"zeptomatch")});var c=_(d=>Array.isArray(d),"k"),p=_(d=>typeof d=="function","x"),f=_(d=>d.length===0,"K"),h=(()=>{const{toString:d}=Function.prototype,u=/(?:^\(\s*(?:[^,.()]|\.(?!\.\.))*\s*\)\s*=>|^\s*[a-zA-Z$_][a-zA-Z0-9$_]*\s*=>)/;return v=>(v.length===0||v.length===1)&&u.test(d.call(v))})(),m=_(d=>typeof d=="number","Y"),w=_(d=>typeof d=="object"&&d!==null,"rr"),g=_(d=>d instanceof RegExp,"er"),y=(()=>{const d=/\\\(|\((?!\?(?::|=|!|<=|<!))/;return u=>d.test(u.source)})(),E=(()=>{const d=/^[a-zA-Z0-9_-]+$/;return u=>d.test(u.source)&&!u.flags.includes("i")})(),S=_(d=>typeof d=="string","M"),R=_(d=>d===void 0,"f"),H=_(d=>{const u=new Map;return v=>{const k=u.get(v);if(k!==void 0)return k;const b=d(v);return u.set(v,b),b}},"ar"),V=_((d,u,v={})=>{const k={cache:{},input:d,index:0,indexBacktrackMax:0,options:v,output:[]},b=N(u)(k),L=Math.max(k.index,k.indexBacktrackMax);if(b&&k.index===d.length)return k.output;throw new Error(`Failed to parse at index ${L}`)},"or"),x=_((d,u)=>c(d)?B(d,u):S(d)?Ae(d,u):te(d,u),"o"),B=_((d,u)=>{const v={};for(const k of d){if(k.length!==1)throw new Error(`Invalid character: "${k}"`);const b=k.charCodeAt(0);v[b]=!0}return k=>{const b=k.input;let L=k.index,M=L;for(;M<b.length&&b.charCodeAt(M)in v;)M+=1;if(M>L){if(!R(u)&&!k.options.silent){const O=b.slice(L,M),W=p(u)?u(O,b,`${L}`):u;R(W)||k.output.push(W)}k.index=M}return!0}},"ir"),te=_((d,u)=>{if(E(d))return Ae(d.source,u);{const v=d.source,k=d.flags.replace(/y|$/,"y"),b=new RegExp(v,k);return y(d)&&p(u)&&!h(u)?Ye(b,u):ae(b,u)}},"ur"),Ye=_((d,u)=>v=>{const k=v.index,b=v.input;d.lastIndex=k;const L=d.exec(b);if(L){const M=d.lastIndex;if(!v.options.silent){const O=u(...L,b,`${k}`);R(O)||v.output.push(O)}return v.index=M,!0}else return!1},"sr"),ae=_((d,u)=>v=>{const k=v.index,b=v.input;if(d.lastIndex=k,d.test(b)){const L=d.lastIndex;if(!R(u)&&!v.options.silent){const M=p(u)?u(b.slice(k,L),b,`${k}`):u;R(M)||v.output.push(M)}return v.index=L,!0}else return!1},"cr"),Ae=_((d,u)=>v=>{const k=v.index,b=v.input;if(b.startsWith(d,k)){if(!R(u)&&!v.options.silent){const L=p(u)?u(d,b,`${k}`):u;R(L)||v.output.push(L)}return v.index+=d.length,!0}else return!1},"R"),T=_((d,u,v,k)=>{const b=N(d),L=u>1;return ge(me(ye(M=>{let O=0;for(;O<v;){const W=M.index;if(!b(M)||(O+=1,M.index===W))break}return O>=u},L),k))},"O"),A=_((d,u)=>T(d,0,1,u),"lr"),D=_((d,u)=>T(d,0,1/0,u),"m"),U=_((d,u)=>{const v=d.map(N);return ge(me(ye(k=>{for(let b=0,L=v.length;b<L;b++)if(!v[b](k))return!1;return!0}),u))},"_"),G=_((d,u)=>{const v=d.map(N);return ge(me(k=>{for(let b=0,L=v.length;b<L;b++)if(v[b](k))return!0;return!1},u))},"p"),ye=_((d,u=!0,v=!1)=>{const k=N(d);return u?b=>{const L=b.index,M=b.output.length,O=k(b);return!O&&!v&&(b.indexBacktrackMax=Math.max(b.indexBacktrackMax,b.index)),(!O||v)&&(b.index=L,b.output.length!==M&&(b.output.length=M)),O}:k},"P"),me=_((d,u)=>{const v=N(d);return u?k=>{if(k.options.silent)return v(k);const b=k.output.length;if(v(k)){const L=k.output.splice(b,1/0),M=u(L);return R(M)||k.output.push(M),!0}else return!1}:v},"C"),ge=(()=>{let d=0;return u=>{const v=N(u),k=d+=1;return b=>{var L;if(b.options.memoization===!1)return v(b);const M=b.index,O=(L=b.cache)[k]||(L[k]={indexMax:-1,queue:[]}),W=O.queue;if(M<=O.indexMax){const xe=O.store||(O.store=new Map);if(W.length){for(let fe=0,zo=W.length;fe<zo;fe+=2){const Po=W[fe*2],Fo=W[fe*2+1];xe.set(Po,Fo)}W.length=0}const ee=xe.get(M);if(ee===!1)return!1;if(m(ee))return b.index=ee,!0;if(ee)return b.index=ee.index,ee.output?.length&&b.output.push(...ee.output),!0}const Bt=b.output.length,Mo=v(b);if(O.indexMax=Math.max(O.indexMax,M),Mo){const xe=b.index,ee=b.output.length;if(ee>Bt){const fe=b.output.slice(Bt,ee);W.push(M,{index:xe,output:fe})}else W.push(M,xe);return!0}else return W.push(M,!1),!1}}})(),je=_(d=>{let u;return v=>(u||(u=N(d())),u(v))},"A"),N=H(d=>{if(p(d))return f(d)?je(d):d;if(S(d)||g(d))return x(d);if(c(d))return U(d);if(w(d))return G(Object.values(d));throw new Error("Invalid rule")}),F=_(d=>d,"v"),Q=_(d=>u=>V(u,d,{memoization:!1}).join(""),"z"),le=_(d=>{const u={};return v=>u[v]??(u[v]=d(v))},"pr"),re="abcdefghijklmnopqrstuvwxyz",Ke=_(d=>{let u="";for(;d>0;){const v=(d-1)%26;u=re[v]+u,d=Math.floor((d-1)/26)}return u},"vr"),Lt=_(d=>{let u=0;for(let v=0,k=d.length;v<k;v++)u=u*26+re.indexOf(d[v])+1;return u},"N"),et=_((d,u)=>{if(u<d)return et(u,d);const v=[];for(;d<=u;)v.push(d++);return v},"$"),Br=_((d,u,v)=>et(d,u).map(k=>String(k).padStart(v,"0")),"fr"),Mt=_((d,u)=>et(Lt(d),Lt(u)).map(Ke),"j"),tt=x(/\\./,F),Or=x(/[$.*+?^(){}[\]\|]/,d=>`\\${d}`),Dr=x(/./,F),Ir=x(/^(?:!!)*!(.*)$/,(d,u)=>`(?!^${jt(u)}$).*?`),Hr=x(/^(!!)+/,""),qr=G([Ir,Hr]),Zr=x(/\/(\*\*\/)+/,"(?:[\\\\/].+[\\\\/]|[\\\\/])"),Vr=x(/^(\*\*\/)+/,"(?:^|.*[\\\\/])"),Ur=x(/\/(\*\*)$/,"(?:[\\\\/].*|$)"),Nr=x(/\*\*/,".*"),zt=G([Zr,Vr,Ur,Nr]),Wr=x(/\*\/(?!\*\*\/|\*$)/,"[^\\\\/]*[\\\\/]"),Gr=x(/\*/,"[^\\\\/]*"),Pt=G([Wr,Gr]),Ft=x("?","[^\\\\/]"),Qr=x("[",F),Xr=x("]",F),Jr=x(/[!^]/,"^\\\\/"),Yr=x(/[a-z]-[a-z]|[0-9]-[0-9]/i,F),Kr=x(/[$.*+?^(){}[\|]/,d=>`\\${d}`),eo=x(/[^\]]/,F),to=G([tt,Kr,Yr,eo]),Rt=U([Qr,A(Jr),D(to),Xr]),ro=x("{","(?:"),oo=x("}",")"),no=x(/(\d+)\.\.(\d+)/,(d,u,v)=>Br(+u,+v,Math.min(u.length,v.length)).join("|")),io=x(/([a-z]+)\.\.([a-z]+)/,(d,u,v)=>Mt(u,v).join("|")),so=x(/([A-Z]+)\.\.([A-Z]+)/,(d,u,v)=>Mt(u.toLowerCase(),v.toLowerCase()).join("|").toUpperCase()),ao=G([no,io,so]),Tt=U([ro,ao,oo]),lo=x("{","(?:"),co=x("}",")"),po=x(",","|"),uo=x(/[$.*+?^(){[\]\|]/,d=>`\\${d}`),ho=x(/[^}]/,F),mo=je(()=>At),go=G([zt,Pt,Ft,Rt,Tt,mo,tt,uo,po,ho]),At=U([lo,D(go),co]),fo=D(G([qr,zt,Pt,Ft,Rt,Tt,At,tt,Or,Dr])),wo=fo,vo=Q(wo),jt=vo,bo=x(/\\./,F),ko=x(/./,F),yo=x(/\*\*\*+/,"*"),xo=x(/([^/{[(!])\*\*/,(d,u)=>`${u}*`),$o=x(/(^|.)\*\*(?=[^*/)\]}])/,(d,u)=>`${u}*`),_o=D(G([bo,yo,xo,$o,ko])),So=_o,Eo=Q(So),Co=Eo,Be=_((d,u)=>Array.isArray(d)?d.map(Be.compile).some(v=>v.test(u)):Be.compile(d).test(u),"S");Be.compile=le(d=>new RegExp(`^${jt(Co(d))}[\\\\/]?$`,"s"));var Lo=Be;return a(l)})();return t.default||t},"_lazyMatch"),rt;const Ei=_((t,e)=>(rt||(rt=rr(),rr=null),rt(t,e)),"default");var Ci=Object.defineProperty,Li=Et((t,e)=>Ci(t,"name",{value:e,configurable:!0}),"t");const Mi=/^[A-Z]:\//i,he=Li((t="")=>t&&t.replaceAll("\\","/").replace(Mi,e=>e.toUpperCase()),"normalizeWindowsPath");var zi=Object.defineProperty,Z=Et((t,e)=>zi(t,"name",{value:e,configurable:!0}),"r");const Pi=/^[/\\]{2}/,Fi=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,zr=/^[A-Z]:$/i,or=/^\/([A-Z]:)?$/i,Ri=/.(\.[^./]+)$/,Ti=/^[/\\]|^[a-z]:[/\\]/i,Ai=Z(()=>typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/","cwd"),Pr=Z((t,e)=>{let r="",n=0,o=-1,s=0,i=null;for(let a=0;a<=t.length;++a){if(a<t.length)i=t[a];else{if(i==="/")break;i="/"}if(i==="/"){if(!(o===a-1||s===1))if(s===2){if(r.length<2||n!==2||!r.endsWith(".")||r.at(-2)!=="."){if(r.length>2){const l=r.lastIndexOf("/");l===-1?(r="",n=0):(r=r.slice(0,l),n=r.length-1-r.lastIndexOf("/")),o=a,s=0;continue}else if(r.length>0){r="",n=0,o=a,s=0;continue}}e&&(r+=r.length>0?"/..":"..",n=2)}else r.length>0?r+=`/${t.slice(o+1,a)}`:r=t.slice(o+1,a),n=a-o-1;o=a,s=0}else i==="."&&s!==-1?++s:s=-1}return r},"normalizeString"),ze=Z(t=>Fi.test(t),"isAbsolute"),Ve=Z(function(t){if(t.length===0)return".";t=he(t);const e=Pi.exec(t),r=ze(t),n=t.at(-1)==="/";return t=Pr(t,!r),t.length===0?r?"/":n?"./":".":(n&&(t+="/"),zr.test(t)&&(t+="/"),e?r?`//${t}`:`//./${t}`:r&&!ze(t)?`/${t}`:t)},"normalize");Z((...t)=>{let e="";for(const r of t)if(r)if(e.length>0){const n=e[e.length-1]==="/",o=r[0]==="/";n&&o?e+=r.slice(1):e+=n||o?r:`/${r}`}else e+=r;return Ve(e)},"join");const Ue=Z(function(...t){t=t.map(n=>he(n));let e="",r=!1;for(let n=t.length-1;n>=-1&&!r;n--){const o=n>=0?t[n]:Ai();!o||o.length===0||(e=`${o}/${e}`,r=ze(o))}return e=Pr(e,!r),r&&!ze(e)?`/${e}`:e.length>0?e:"."},"resolve");Z(function(t){return he(t)},"toNamespacedPath");const ji=Z(function(t){return Ri.exec(he(t))?.[1]??""},"extname");Z(function(t,e){const r=Ue(t).replace(or,"$1").split("/"),n=Ue(e).replace(or,"$1").split("/");if(n[0][1]===":"&&r[0][1]===":"&&r[0]!==n[0])return n.join("/");const o=[...r];for(const s of o){if(n[0]!==s)break;r.shift(),n.shift()}return[...r.map(()=>".."),...n].join("/")},"relative");const Bi=Z(t=>{const e=he(t).replace(/\/$/,"").split("/").slice(0,-1);return e.length===1&&zr.test(e[0])&&(e[0]+="/"),e.join("/")||(ze(t)?"/":".")},"dirname");Z(function(t){const e=[t.root,t.dir,t.base??t.name+t.ext].filter(Boolean);return he(t.root?Ue(...e):e.join("/"))},"format");const Oi=Z((t,e)=>{const r=he(t).split("/").pop();return e&&r.endsWith(e)?r.slice(0,-e.length):r},"basename");Z(function(t){const e=Ti.exec(t)?.[0]?.replace(/\\/g,"/")??"",r=Oi(t),n=ji(r);return{base:r,dir:Bi(t),ext:n,name:r.slice(0,r.length-n.length),root:e}},"parse");Z((t,e)=>Ei(e,Ve(t)),"matchesGlob");var Di=Object.defineProperty,K=$((t,e)=>Di(t,"name",{value:e,configurable:!0}),"e$1");const ut="/",nr=":",Ii="at ",Hi=/https?:\/\/[^\s)]+/g,qi=/file:\/\//g,Fr=/\/@fs\//g,Zi=new Set([".cjs",".js",".jsx",".mjs",".svelte",".ts",".tsx",".vue"]),Vi=new Set(["<anonymous>","<unknown>","native"]),Ui=K(t=>{const e=t.trim();return!e.startsWith(Ii)||!([...Zi].some(r=>e.includes(r))||[...Vi].some(r=>e.includes(r)))?!1:/\([^)]*:\d+:\d+\)/.test(e)||/\([^)]*:\d+\)/.test(e)||/[^(\s][^:]*:\d+:\d+/.test(e)||/[^(\s][^:]*:\d+/.test(e)||e.includes("native")||e.includes("<unknown>")},"isValidStackFrame"),Ni=K(t=>(t=t.replaceAll(Fr,ut),t=t.replaceAll(qi,""),t.includes("<unknown>")?t.trim()||"":t.trim()&&!Ui(t)?"":t),"cleanStackLine"),Wi=K((t,e)=>{try{const{baseUrl:r,col:n,line:o}=Gi(t),s=Qi(r,e);return Xi(s,o,n)}catch(r){return console.warn("Failed to absolutize URL:",t,r),t}},"absolutizeUrl"),Gi=K(t=>{const e=t.match(/:(\d+)(?::(\d+))?$/),r=e?.[1],n=e?.[2];return{baseUrl:e?t.slice(0,-e[0].length):t,col:n,line:r}},"parseUrlWithLocation"),Qi=K((t,e)=>{const r=new URL(t);let n=decodeURIComponent(r.pathname||"");return n=n.replaceAll(Fr,ut),Ue(e,n.startsWith(ut)?n.slice(1):n)},"urlToAbsolutePath"),Xi=K((t,e,r)=>{if(!e)return t;const n=r?`${nr}${r}`:"";return`${t}${nr}${e}${n}`},"formatAbsolutePath"),Je=K(t=>t&&t.replaceAll(`\r
865
+ `,`
866
+ `).replaceAll("\r",`
867
+ `).split(/\n/).map(Ni).filter(e=>e.trim()!=="").join(`
868
+ `),"cleanErrorStack"),Ji=K(t=>{const e=typeof t=="string"?t:t.message||String(t);return qo(e)},"cleanErrorMessage"),Yi=K(t=>t instanceof AggregateError||t&&typeof t=="object"&&"errors"in t&&Array.isArray(t.errors),"isAggregateError"),Ki=K(t=>Yi(t)?t.errors:[t],"extractErrors"),Re=K((t,e)=>t&&String(t).replaceAll(Hi,r=>Wi(r,e)),"absolutizeStackUrls");var es=Object.defineProperty,Rr=$((t,e)=>es(t,"name",{value:e,configurable:!0}),"s$2");const ts=Rr(t=>!Array.isArray(t)||t.length===0?!1:t.some(e=>e&&typeof e=="object"&&(e.location||e.pluginName||e.text)),"isESBuildErrorArray"),rs=Rr(t=>t.map((e,r)=>{const{location:n,pluginName:o,text:s}=e,i={message:s||`ESBuild error #${r+1}`};return n&&(i.file=n.file,i.line=n.line,i.column=n.column),o&&(i.plugin=o),i.name=e.name||"Error",i.stack=e.stack||"",i}),"processESBuildErrors");var os=Object.defineProperty,ns=$((t,e)=>os(t,"name",{value:e,configurable:!0}),"o$2");const is=ns(t=>{if(!t.includes("[vue/compiler-sfc]"))return null;let e="",r=0,n=0;const o=/\((\d+):(\d+)\)/,s=t.match(o);s&&s[1]&&s[2]&&(r=Number.parseInt(s[1],10),n=Number.parseInt(s[2],10));const i=/(\S+\.vue)/,a=t.match(i);a&&a[1]&&(e=a[1]);const l=t.split(`
869
+ `)[0]||t;return e&&r>0&&n>0?{column:n,line:r,message:l,originalFilePath:e}:null},"parseVueCompilationError");var ss=Object.defineProperty,as=$((t,e)=>ss(t,"name",{value:e,configurable:!0}),"m$1");const ls=as(async(t,e,r)=>{let n=e;if(e.includes("at ")&&!e.includes(`
870
+ at `)&&(n=e.replace(/^(Error:.*?)at /,`$1
871
+ at `).replaceAll(/at ([^<\s]+)\s*(<[^>]+>:\d+:\d+)/g,`
872
+ at $1 $2`).replaceAll(/at ([^<\s]+)\s*(<unknown>:\d+:\d+)/g,`
873
+ at $1 $2`).replaceAll(/at ([^<\s]+)\s*<([^>]+)>:\d+:\d+/g,`
874
+ at $1 <$2>:d+:d+`),n=n.replaceAll(/at ([^<\s]+)(?=\s*at|$)/g,`
875
+ at $1 <unknown>:0:0`)),!n.includes("<unknown>")&&!n.includes("react-dom")&&!n.includes("react"))return n;const o=ve({stack:n}),s=await Promise.all(o.map(async i=>{const{file:a}=i,l=i.line??0,c=i.column??0;if(a&&a!=="<unknown>"&&l>0&&c>0&&!a.includes("react-dom")&&!a.includes("react"))return i;if(!a||l<=0||c<=0){if((a==="<unknown>"||a&&(a.includes("react-dom")||a.includes("react")))&&i.methodName){const{methodName:p}=i,f={batchedUpdates:"Batch Updates",dispatchEvent:"Event System",executeDispatch:"Event Dispatcher",processDispatchQueue:"Event Queue",runWithFiber:"Fiber Reconciliation"};for(const[h,m]of Object.entries(f))if(p.includes(h))return{...i,column:0,file:`[React] ${m}`,line:0};if(!p.includes("$")&&!p.includes("anonymous")){const h=ce(p),m=Me(t,h);if(m){const w=await pt(t,m,"",1,1);if(w.originalFilePath)return{...i,column:w.originalFileColumn||1,file:w.originalFilePath,line:w.originalFileLine||1}}}}return i}try{const p=ce(a),f=Me(t,p);if(!f)return i;const h=await pt(t,f,a,l,c);return{...i,column:h.originalFileColumn,file:h.originalFilePath,line:h.originalFileLine}}catch{return i}}));return pr(s,{header:r})},"remapStackToOriginal");var cs=Object.defineProperty,Te=$((t,e)=>cs(t,"name",{value:e,configurable:!0}),"t");const ds=Te(t=>!!(t&&Array.isArray(t.sources)&&Array.isArray(t.sourcesContent)),"isValidSourceMap"),ot=Te(t=>typeof t=="string"?t:void 0,"getSourceContent"),ps=Te((t,e)=>t===e||t.endsWith(e)||e.endsWith(t),"isPartialMatch"),us=Te((t,e)=>{if(!t||t.length===0)return-1;const r=t.indexOf(e);if(r!==-1)return r;if(!(e.includes("\\")||e.includes("/")))return-1;const n=Ve(e),o=t.indexOf(n);if(o!==-1)return o;for(const[s,i]of t.entries()){if(!i||typeof i!="string")continue;const a=Ve(i);if(ps(a,n))return s}return-1},"findSourceIndex"),ir=Te((t,e)=>{if(!ds(t))return;if(!e&&t.sourcesContent?.[0])return ot(t.sourcesContent[0]);const r=us(t.sources,e||"");return r>=0&&t.sourcesContent?.[r]?ot(t.sourcesContent[r]):t.sourcesContent?.[0]?ot(t.sourcesContent[0]):void 0},"getSourceFromMap");var hs=Object.defineProperty,ms=$((t,e)=>hs(t,"name",{value:e,configurable:!0}),"f");const sr=ms(async(t,e,r,n)=>{let o,s;if(e&&typeof e=="object"&&"transformResult"in e&&e.transformResult){const a=e.transformResult;a.code&&!s&&(s=a.code),a.map&&!o&&(o=ir(a.map,r))}const i=e&&typeof e=="object"&&("id"in e&&e.id||"url"in e&&e.url)?"id"in e&&e.id||"url"in e&&e.url:n[0];if(i&&(!o||!s))try{const a=await t.transformRequest(i);if(a?.code&&!s&&(s=a.code),a?.map&&!o){const l=a.map;typeof l=="object"&&l!==null&&"mappings"in l&&l.mappings!==""&&(o=ir(l,r))}}catch{}if(!o&&e&&typeof e=="object"&&"file"in e&&e.file)try{o=await mt(e.file,"utf8")}catch{}return{compiledSourceText:s,originalSourceText:o}},"retrieveSourceTexts");var gs=Object.defineProperty,fs=$((t,e)=>gs(t,"name",{value:e,configurable:!0}),"r");const ws=fs((t,e)=>!e||t.includes("?")?t:t+e,"addQueryToUrl");var vs=Object.defineProperty,bs=$((t,e)=>vs(t,"name",{value:e,configurable:!0}),"e");const ks=bs(t=>{try{return new URL(t).search}catch{return""}},"extractQueryFromHttpUrl");var ys=Object.defineProperty,ke=$((t,e)=>ys(t,"name",{value:e,configurable:!0}),"k$2");const xs=ke(t=>Array.isArray(t)&&ts(t)?rs(t).map(e=>({message:e.message||"ESBuild error",name:e.name||"Error",stack:e.stack||""})):Ki(t),"extractIndividualErrors"),$s=ke(t=>{const e=ve(t,{frameLimit:10}),r=e?.find(n=>n?.file?.startsWith("http"))||e?.[0];return{compiledColumn:r?.column??0,compiledFilePath:r?.file??"",compiledLine:r?.line??0}},"extractLocationFromStack"),_s=ke(async(t,e,r,n,o,s,i=0,a)=>{const l=o?.originalFilePath||e,c=o?.line??n,p=o?.column??r;if(l){let f=l,h=l;if(l.startsWith("http://")||l.startsWith("https://"))try{f=new URL(l).pathname,f.startsWith("/")&&(f=f.slice(1));const E=t.config.root||process.cwd();h=f.startsWith("/")?f:`${E}/${f}`}catch{console.warn("Failed to parse HTTP URL:",l)}const m=ce(f),w=Me(t,m);if(w)try{const E=await pt(t,w,e||a||f,c,p,s,i),S=h||E.originalFilePath;return{originalFileColumn:E.originalFileColumn,originalFileLine:E.originalFileLine,originalFilePath:S}}catch{console.warn("⚠️ Source map resolution failed, using estimation")}let g=c,y=p;return c>=20?g=Math.max(1,Math.round(c*.5)):c>15?g=Math.max(1,Math.round(c*.6)):c>10?g=Math.max(1,c-8):g=Math.max(1,c-3),p>=10||p>7?y=Math.max(0,p-1):p>5&&(y=Math.max(0,p)),{originalFileColumn:y,originalFileLine:g,originalFilePath:h||l}}return{originalFileColumn:p,originalFileLine:c,originalFilePath:l}},"resolveOriginalLocationInfo"),Ss=ke((t,e,r,n,o,s)=>({compiledCodeFrameContent:void 0,compiledColumn:t,compiledFilePath:e,compiledLine:r,fixPrompt:"",originalCodeFrameContent:void 0,originalFileColumn:n,originalFileLine:o,originalFilePath:s,originalSnippet:""}),"createEmptyResult"),Es=ke(async(t,e,r,n,o,s)=>{let i,a;const l=Le(r)||"text",c=Le(n)||l,p=[],f=new Set([c,l]);f.has("svelte")&&p.push(import("@shikijs/langs/svelte")),f.has("vue")&&p.push(import("@shikijs/langs/vue"));const h=await Xn(p),m={themes:{dark:"github-dark-default",light:"github-light"}};if(t&&t.trim())try{i=h.codeToHtml(t,{...m,lang:l,transformers:[Qt([{classes:["error-line"],line:o}])]})}catch{}if(e&&e.trim())try{a=h.codeToHtml(e,{...m,lang:c,transformers:[Qt([{classes:["error-line"],line:s}])]})}catch{}return{compiledCodeFrameContent:a,originalCodeFrameContent:i}},"generateSyntaxHighlightedFrames"),Cs=ke(async(t,e,r,n,o=0)=>{const s=t?.message?is(t.message):void 0,i=xs(t),a=i[0]||t;let l="";if(n&&n.length>1)for(const T of n.slice(1)){const A=T.stack||"",D=ve({stack:A},{frameLimit:10})?.find(U=>U?.file?.startsWith("http"));if(D?.file&&(l=ks(D.file),l))break}const c=Ji(a),p=Je(a.stack||""),f=await ls(e,p,{message:c,name:a.name});let h,m,w;if(r?.file&&r?.line&&r?.column)h=r.column,m=r.file,w=r.line;else{const T=$s(a);if(h=T.compiledColumn,m=T.compiledFilePath,w=T.compiledLine,m&&!m.startsWith("http")){const A=e.config.root;let D=m;m.startsWith(A)&&(D=m.slice(A.length)),D.startsWith("/")||(D=`/${D}`);let U=`http://localhost:5173${D}`;l&&(U=ws(U,l)),m=U}}let g=r?.file||m;if(!r?.file&&a.stack){const T=ve(a,{frameLimit:10})?.find(A=>A?.file&&!A.file.startsWith("http")&&!A.file.includes("node_modules")&&!A.file.includes(".vite")&&A.file.includes(".tsx"));T?.file&&(g=T.file)}let{originalFileColumn:y,originalFileLine:E,originalFilePath:S}=await _s(e,g,h,w,s,a.message,o,m);const R=r?.plugin;let H="",V="",x,B;try{const[T,A]=await Promise.all([Me(e,ce(m)),Me(e,ce(S))]);if(!T&&!A)return Ss(h,m,w,y,E,S);const D=m.startsWith("http")?m.replace(/^https?:\/\/[^/]+/,"").replace(/^\//,""):m,U=S.startsWith("http")?S.replace(/^https?:\/\/[^/]+/,"").replace(/^\//,""):S,G=T||A;if(G?.transformResult?.code&&(B=G.transformResult.code),A?.transformResult?.map&&!x){const F=A.transformResult.map;try{const Q=F.sourcesContent?.[0];Q&&(x=Q)}catch(Q){console.warn("Failed to get original source from source map:",Q)}}const[ye,me]=await Promise.all([!B&&T?sr(e,T,D,ce(D)):Promise.resolve({compiledSourceText:void 0,originalSourceText:void 0}),!x&&A?sr(e,A,U,ce(U)):Promise.resolve({compiledSourceText:void 0,originalSourceText:void 0})]);if(!B&&ye.compiledSourceText&&({compiledSourceText:B}=ye),!x&&me.originalSourceText&&({originalSourceText:x}=me),x){if(B&&E<=0&&w>0){const F=ci(B,w,h,x);F&&(E=F.line,y=F.column)}try{H=Ot(x,{start:{column:Math.max(1,y),line:Math.max(1,E)}},{showGutter:!1})}catch{H=x?.slice(0,500)||""}}const ge=B&&w>0,je=E>0&&y>0;let N=!1;if(ge&&w>0&&a.message&&B){const F=B.split(`
876
+ `)[w-1];if(F&&h<=F.length){const Q=a.message,le=Math.max(0,h-1),re=new Set(F.slice(Math.max(0,le)));N=re.has("new Error(")||re.has("throw new Error")||re.has("throw ")||re.has(Q.slice(0,20)),!N&&je&&(S.includes(".svelte")||S.includes(".vue")||S.includes(".astro")||m.includes(".js")||m.includes(".ts"))&&(N=!0)}}if(ge&&N&&B){const F=B.split(`
877
+ `),Q=F.length,le=Math.min(w,Q)||Math.max(1,Q-2),re=F[le-1]?Math.min(h||1,F[le-1]?.length||1):1;try{V=Ot(B,{start:{column:re,line:le}},{showGutter:!1})}catch(Ke){console.warn("Compiled codeFrame failed:",Ke),V=B?.slice(0,500)||""}}}catch(T){console.warn("Source retrieval failed:",T)}const{compiledCodeFrameContent:te,originalCodeFrameContent:Ye}=await Es(H,V,S,m,E,w);let ae=H;if(!ae&&x){const T=x.split(`
878
+ `),A=Math.max(0,E-3),D=Math.min(T.length,E+2);ae=T.slice(A,D).join(`
879
+ `)}ae||(ae=V||`Error at line ${E} in ${S}`);const Ae=Do({applicationType:void 0,error:t,file:{file:S,language:Le(S),line:E,snippet:ae}});return{compiledCodeFrameContent:te,compiledColumn:h,compiledFilePath:m,compiledLine:w,compiledStack:pr(ve({message:c,name:a.name,stack:p}),{header:{message:c,name:a.name}}),errorCount:i.length,fixPrompt:Ae,originalCodeFrameContent:Ye,originalFileColumn:y,originalFileLine:E,originalFilePath:S,originalSnippet:H,originalStack:f||p,plugin:R}},"buildExtendedErrorData");var Ls=Object.defineProperty,oe=$((t,e)=>Ls(t,"name",{value:e,configurable:!0}),"o");const Ms=/\.mdx$/i,zs=1,Ps=/Failed to load url\s+(.*?)\s+\(resolved id:/i,Fs=/glob:\s*"(.+)"\s*\(/i,Rs=oe(t=>t instanceof Error?t:new Error(String(t)),"createEnhancedError"),Ts=oe((t,e)=>{try{t.ssrFixStacktrace(e)}catch(r){console.warn("[visulima:vite-overlay:server] SSR stack trace fix failed:",r)}},"safeSsrFixStacktrace"),As=oe(t=>{try{const e=ve(t,{frameLimit:zs})?.[0];return String(e?.file||t.loc?.file||t.id||"")}catch(e){console.warn("[visulima:vite-overlay:server] Stack trace parsing failed:",e);return}},"extractTopFileFromStack"),js=oe(async t=>{try{return await mt(t,"utf8")}catch(e){console.warn(`[visulima:vite-overlay:server] Failed to read file ${t}:`,e);return}},"safeReadFile"),Bs=oe((t,e)=>{const r=t.id||t.loc?.file||e;r&&Ms.test(String(r))&&/syntax error/i.test(t.message)&&(t.hint=t.hint||"MDX detected without an appropriate integration. Install and configure the MDX plugin for Vite/your framework.")},"enhanceMdxError"),Tr=oe((t,e)=>{const r=t.split(`
880
+ `),n=r.findIndex(s=>s.includes(e));if(n===-1)return;const o=r[n]||"";return{column:Math.max(0,o.indexOf(e))+1,line:n+1}},"findImportLocation"),Os=oe(async(t,e,r)=>{const n=Ps.exec(t.message)?.[1];if(n&&(t.title="Failed to Load Module (SSR)",t.name="FailedToLoadModuleSSR",t.message=`Failed to load module: ${n}`,t.hint="Verify import path, ensure a plugin handles this file type during SSR, and check for typos or missing files.",r&&e)){const o=Tr(r,n);o&&(t.loc={...o,file:e})}},"enhanceFailedLoadError"),Ds=oe(async(t,e,r)=>{const n=Fs.exec(t.message)?.[1];if(n&&(t.name="InvalidGlob",t.title="Invalid Glob Pattern",t.message=`Invalid glob pattern: ${n}`,t.hint=t.hint||"Ensure your glob follows the expected syntax and matches existing files. Avoid unintended special characters.",r&&e)){const o=Tr(r,n);o&&(t.loc={...o,file:e})}},"enhanceGlobError"),Is=oe(async(t,e)=>{const r=Rs(t);Ts(e,r);const n=As(r),o=n?await js(n):void 0;return await Os(r,n,o),Bs(r,n),await Ds(r,n,o),r},"enhanceViteSsrError");var Hs=Object.defineProperty,j=$((t,e)=>Hs(t,"name",{value:e,configurable:!0}),"n");const qs=4,ar=1e3,Zs=5,Vs=.5,Us=[".js",".ts",".jsx",".tsx",".mjs",".cjs"],Ns=[".css",".scss",".sass",".less"],Ar=[".svg",".png",".jpg",".jpeg",".gif",".webp",".ico"],Ws=new Set([...Ar,...Us,...Ns]),Gs=j((t,e)=>{const r=Y.relative(t,e);return r.startsWith(".")?r:`./${r}`},"getRelativePath"),Qs=j(t=>t===0?"":t===1?" (in parent directory)":t===2?" (in grandparent directory)":` (${t} directories away)`,"getPathContext"),Xs=j((t,e)=>{try{const r=Y.relative(t,e).split(Y.sep).filter(o=>o&&o!==".");let n=0;for(const o of r)n+=o===".."?2:1;return n}catch{return 10}},"calculatePathDistance"),Js=j((t,e,r,n)=>{if(e&&n===e){const s=Ie(t,r);return s<=Math.max(3,Math.floor(t.length*Vs))?10-s:0}if(!e){const s=Ie(t,r);return s===0?9:s<=Math.max(2,Math.floor(t.length*.3))&&Ws.has(n)?7-s:0}const o=Ie(t,r);return o<=Math.max(2,Math.floor(t.length*.4))?5-o:0},"calculateRelevanceScore"),Ys=j((t,e,r)=>{const n=[],o=j((s,i=0)=>{if(!(i>qs||n.length>ar))try{const a=Zo.readdirSync(s,{withFileTypes:!0});for(const l of a){if(n.length>ar)break;const c=Y.join(s,l.name);if(l.isDirectory()&&!l.name.startsWith(".")&&l.name!=="node_modules")o(c,i+1);else if(l.isFile()){const p=Y.extname(l.name),f=Y.basename(l.name,p),h=Js(e,r,f,p);h>0&&n.push({baseName:f,extension:p,fullPath:c,path:c,relevanceScore:h})}}}catch{}},"walk");return o(t),n},"collectFileCandidates"),lr=j((t,e,r)=>{const n=Y.basename(t),o=Y.extname(n),s=Y.basename(n,o),i=Y.dirname(e),a=Ys(r,s,o).map(h=>{const m=Ie(s,h.baseName),w=Xs(i,Y.dirname(h.fullPath)),g=h.relevanceScore*.7+w*.2+m*.1;return{...h,nameDistance:m,pathDistance:w,score:g}});a.sort((h,m)=>h.score-m.score);const l=[],c=a.slice(0,8);let p=!1;for(const h of c){const m=Gs(i,h.fullPath);if(!l.includes(m)){const w=Qs(h.pathDistance);l.push(m+w);const g=h.fullPath.replaceAll("\\","/").split("/"),y=g.indexOf("public");y!==-1&&y<g.length-1&&(p=!0)}}let f=`<ul>${[...new Set(l)].slice(0,Zs).map(h=>`<li>\`${h}\`</li>`).join(`
881
+ `)}</ul>`;if(p){const h=n;[...Ar].some(m=>h.includes(m))&&(f+=`Files in the \`public\` folder should be accessed via absolute URLs like \`/${h}\`.`)}return f},"findSimilarFiles"),Ks=[{solution:{body:"Browser APIs like `window` and `document` are not available during server-side rendering. Use dynamic imports or check for SSR environment before using browser APIs.",header:"SSR Browser API Error"},test:j(t=>t.includes("window is not defined")||t.includes("document is not defined"),"test")},{solution:{body:"Some plugins need specific ordering. Use `enforce: 'pre'` for plugins that need to run first, or `enforce: 'post'` for plugins that need to run last.",header:"Plugin Ordering Issue"},test:j(t=>t.includes("Plugin ordering")||t.includes("enforce"),"test")},{solution:{body:"CSS Modules require proper configuration. Make sure your CSS files use the `.module.css` extension and are imported correctly.",header:"CSS Modules Configuration"},test:j(t=>t.includes("CSS Modules")||t.includes("module.css"),"test")},{solution:{body:["Only variables prefixed with `VITE_` are exposed on `import.meta.env` to the client at build time.","Server-only variables should not be prefixed with `VITE_`.","- Do not use `process.env` in browser code; prefer `import.meta.env.*`","- Custom vars must be prefixed with `VITE_` to be exposed to client",'- For TS, add `/// <reference types="vite/client" />` for type-safe access'].join(`
882
+ `),header:"Environment Variables"},test:j(t=>t.includes("VITE_")||t.includes("process.env"),"test")},{solution:{body:"For static assets, use the `new URL('./path/to/asset', import.meta.url)` syntax or import them and use the returned URL.",header:"Asset Import Issue"},test:j(t=>t.includes("Failed to load")&&(t.includes(".png")||t.includes(".jpg")||t.includes(".svg")),"test")},{solution:{body:"Some issues only occur in production builds. Check if the error happens in development mode. You might need different configurations for build vs dev.",header:"Build vs Development Mode"},test:j(t=>t.includes("production")||t.includes("build"),"test")},{solution:{body:"HMR issues can occur with certain patterns. Make sure you're not mutating module-level variables and consider using `import.meta.hot` guards.",header:"Hot Module Replacement Issue"},test:j(t=>t.includes("HMR")||t.includes("hot reload"),"test")},{solution:{body:"Check your `tsconfig.json` and make sure it includes proper paths and compiler options. For Vite, you might need a `vite-env.d.ts` file.",header:"TypeScript Configuration"},test:j((t,e)=>t.includes("TypeScript")||e&&e.endsWith(".ts"),"test")},{solution:{body:"Some dependencies need to be excluded from pre-bundling. Add them to `optimizeDeps.exclude` in your Vite config.",header:"Dependency Optimization"},test:j(t=>t.includes("optimizeDeps")||t.includes("pre-bundling"),"test")},{solution:{body:"Configure path aliases in your Vite config using the `resolve.alias` option to match your TypeScript path mappings.",header:"Path Resolution"},test:j(t=>t.includes("resolve.alias")||t.includes("Cannot find module"),"test")},{solution:{body:"Server middleware and proxy settings should be configured in the `server` section of your Vite config.",header:"Server Configuration"},test:j(t=>t.includes("middleware")||t.includes("proxy"),"test")},{solution:{body:"Check your plugin configuration in `vite.config.js/ts`. Make sure all required options are provided and options are correctly typed.",header:"Plugin Configuration"},test:j(t=>t.includes("plugin")&&t.includes("configuration"),"test")},{solution:{body:"Configure your build output directory using `build.outDir` in your Vite config. Make sure the directory is writable.",header:"Build Output Configuration"},test:j(t=>t.includes("build.outDir")||t.includes("dist"),"test")}],ea=j(t=>({async handle(e,r){const{file:n,language:o}=r,s=e.message??"";if(s.includes("Failed to resolve import")||s.includes("Cannot resolve module")){const i=s.match(/Failed to resolve import ["']([^"']+)["']/),a=s.match(/Cannot resolve module ["']([^"']+)["']/),l=i?.[1]||a?.[1];if(l&&n){const c=lr(l,n,t);if(c)return{body:`The import path \`${l}\` could not be resolved.<br/><br/>Did you mean one of these files?<br/>${c}`};if([".jsx",".tsx"].includes(o)||s.includes("react"))return{body:"Install and configure the React plugin. Add `@vitejs/plugin-react` to your dependencies and include it in your Vite config.",header:"Missing React Plugin"};if(o==="vue")return{body:"Install and configure the Vue plugin. Add `@vitejs/plugin-vue` to your dependencies and include it in your Vite config.",header:"Missing Vue Plugin"}}}if(s.includes("Cannot resolve")&&(o==="typescript"||o==="javascript")){const i=s.match(/Cannot resolve ["'](\.\.?\/[^"']*)["']/);if(i){const a=i[1];if(a&&n){const l=lr(a,n,t);if(l)return{body:`Cannot resolve \`${a}\`. Did you mean one of these files?${l}`,header:"File Not Found"}}}return{body:"In Vite, you may need to include file extensions in imports, especially for TypeScript files. Try adding `.js` extension to your imports.",header:"Missing File Extension"}}for(const i of Ks)if(i.test(s,n))return i.solution},name:"vite-solution-finder",priority:20}),"createViteSolutionFinder");var ta=Object.defineProperty,I=$((t,e)=>ta(t,"name",{value:e,configurable:!0}),"u");const Ne=I((t,e,r)=>{try{const n=r instanceof Error?r.message:String(r);t.config.logger.error(`${e}: ${n}`,{clear:!0,timestamp:!0})}catch{}},"logError"),ra=I(t=>({error:I(e=>t.config.logger.error(String(e??""),{clear:!0,timestamp:!0}),"error"),log:I(e=>t.config.logger.info(String(e??"")),"log")}),"createDevelopmentLogger"),oa=I(()=>{const t=new Map;return{recentErrors:t,shouldSkip:I(e=>{const r=Date.now(),n=t.get(e)||0;return r-n<Bn?!0:(t.set(e,r),!1)},"shouldSkip")}},"createRecentErrorTracker"),jr=I(t=>`${String(t?.message||"")}
883
+ ${String(t?.stack||"")}`,"createErrorSignature"),na=I(async(t,e,r)=>{try{t.stack=Re(Je(String(t.stack||"")),e)}catch{}await _r(t,{logger:r})},"processRuntimeError"),ia=I((t,e,r)=>async n=>{const o=n instanceof Error?n:new Error(String(n?.stack||n));try{t.ssrFixStacktrace(o)}catch(s){Ne(t,"[visulima:vite-overlay:server] ssrFixStacktrace failed",s)}try{const s=await Is(o,t);Object.assign(o,s)}catch(s){Ne(t,"[visulima:vite-overlay:server] enhanceViteSsrError failed",s)}try{o.stack=Re(Je(String(o.stack||"")),e)}catch{}await _r(o,{logger:r}),t.ws.send({err:o,type:"error"})},"createUnhandledRejectionHandler"),sa=I(async(t,e,r)=>{let n;e.push(dr,ea(r),cr);for await(const o of e.toSorted((s,i)=>i.priority-s.priority)){const{handle:s,name:i}=o;if(process.env.DEBUG&&console.debug(`Running solution finder: ${i}`),typeof s=="function")try{const a=await s({hint:t?.hint??"",message:t.message,name:t.name,stack:t?.stack},{file:t?.originalFilePath??"",language:Le(t?.originalFilePath??""),line:t?.originalFileLine??0,snippet:t?.originalSnippet??""});if(a===void 0)continue;const l=await Ht(a.header??"");n={body:await Ht(a.body??""),header:l};break}catch{continue}}return n},"findSolution"),ht=I(async(t,e,r,n,o,s)=>{const i=Ao(t);if(i.length===0)throw new Error("No errors found in the error stack");const a=await Promise.all(i.map(async(c,p)=>{let f=n;if(p>0){const w=(c?.stack?.split(`
884
+ `)||[]).find(g=>g.includes("at ")&&!g.includes("node_modules"));if(w){const g=w.match(/at\s+[^(\s]+\s*\(([^:)]+):(\d+):(\d+)\)/)||w.match(/at\s+([^:)]+):(\d+):(\d+)/);if(g){const[,y,E,S]=g;f={column:Number.parseInt(S||"0",10),file:y,line:Number.parseInt(E||"0",10),plugin:n?.plugin}}}}let h=f;p===0&&c?.sourceFile&&(h={...f,file:c.sourceFile});const m=await Cs(c,e,h,i,p);return{hint:c?.hint,message:c?.message||"",name:c?.name||Er,stack:Re(Je(c?.stack||""),r),...m}})),l=await sa(a[0],s,r);return{errors:a,errorType:o,rootPath:r,solution:l}},"buildExtendedError"),aa=I((t,e)=>{const r=String.raw`var orig = console.error;
885
+
886
+ console.error = function() {
887
+ function parseConsoleArgs(args) {
888
+ if (
889
+ args.length > 3 &&
890
+ typeof args[0] === 'string' &&
891
+ args[0].startsWith('%c%s%c') &&
892
+ typeof args[1] === 'string' &&
893
+ typeof args[2] === 'string' &&
894
+ typeof args[3] === 'string'
895
+ ) {
896
+ const environmentName = args[2]
897
+ const maybeError = args[4]
898
+
899
+ return {
900
+ environmentName: environmentName.trim(),
901
+ error: isError(maybeError) ? maybeError : null,
902
+ }
903
+ }
904
+
905
+ return {
906
+ environmentName: null,
907
+ error: null,
908
+ }
909
+ }
910
+
911
+ function isError(err) {
912
+ return typeof err === 'object' && err !== null && 'name' in err && 'message' in err;
913
+ }
914
+
915
+ try {
916
+ if (${t} !== 'production') {
917
+ const { error: replayedError } = parseConsoleArgs(args)
918
+
919
+ if (replayedError) {
920
+ maybeError = replayedError
921
+ } else if ((args[isError0])) {
922
+ maybeError = args[0]
923
+ } else {
924
+ maybeError = args[1]
925
+ }
926
+ } else {
927
+ maybeError = args[0]
928
+ }
929
+
930
+ if (maybeError) {
931
+ sendError(maybeError);
932
+ }
933
+ } catch {}
934
+
935
+ return orig.apply(console, arguments);
936
+ }`;return String.raw`
937
+ import { createHotContext } from '/@vite/client';
938
+
939
+ const hot = createHotContext('/@visulima/vite-overlay');
940
+
941
+ async function sendError(error, loc) {
942
+ if (!(error instanceof Error)) {
943
+ error = new Error("(unknown runtime error)");
944
+ }
945
+
946
+ var ownerStack = null;
947
+
948
+ try {
949
+ var mod = await import('react');
950
+
951
+ if (mod && typeof mod.captureOwnerStack === 'function') {
952
+ ownerStack = mod.captureOwnerStack();
953
+ }
954
+ } catch {}
955
+
956
+
957
+ function extractCauseChain(err) {
958
+ if (!err || !err.cause) {
959
+ return null;
960
+ }
961
+
962
+ var current = err.cause;
963
+ var rootCause = {
964
+ name: current.name || null,
965
+ message: current.message || null,
966
+ stack: current.stack || null,
967
+ cause: null
968
+ };
969
+
970
+ var currentNested = rootCause;
971
+ current = current.cause;
972
+
973
+ while (current) {
974
+ currentNested.cause = {
975
+ name: current.name || null,
976
+ message: current.message || null,
977
+ stack: current.stack || null,
978
+ cause: null
979
+ };
980
+ currentNested = currentNested.cause;
981
+ current = current.cause;
982
+ }
983
+
984
+ return rootCause;
985
+ }
986
+
987
+ var causeChain = extractCauseChain(error);
988
+
989
+ hot.send('${Sr}', {
990
+ name: error?.name || null,
991
+ message: error.message,
992
+ stack: error.stack,
993
+ cause: causeChain,
994
+ ownerStack,
995
+ file: loc?.filename || null,
996
+ line: loc?.lineno || null,
997
+ column: loc?.colno || null
998
+ });
999
+ }
1000
+
1001
+ window.addEventListener("error", function (evt) {
1002
+ sendError(evt.error, { filename: evt.filename, lineno: evt.lineno, colno: evt.colno });
1003
+ });
1004
+
1005
+ window.addEventListener("unhandledrejection", function (evt) {
1006
+ sendError(evt.reason);
1007
+ });
1008
+
1009
+ window.__flameSendError = sendError;
1010
+
1011
+ ${e?r:""}
1012
+ `},"generateClientScript"),Ct=I(t=>{if(!t)return null;const e=new Error(String(t.message||"Caused by error"));return e.name=String(t.name||"Error"),e.stack=String(t.stack||""),t.cause&&(e.cause=Ct(t.cause)),e},"reconstructCauseChain"),la=I((t,e,r,n,o)=>{const s=t.ws.send.bind(t.ws);t.ws.send=async(i,a)=>{try{if(i&&typeof i=="object"&&i.type==="error"&&i.err){const{err:l}=i,c=jr(l);if(e(c))return;if(l.message?.includes("Failed to resolve import")){const p=l.message.match(/Failed to resolve import ["']([^"']+)["'] from ["']([^"']+)["']/);if(p){const f=p[2],h=new Error(l.message);h.name="ImportResolutionError",h.stack=l.stack;const m=await ht(h,t,n,{column:l.loc?.column||1,file:f,line:l.loc?.line||1,plugin:l.plugin||"vite:import-analysis"},"server",o);i.err=m,r.set(JSON.stringify(m),Date.now())}}else{const p=String(l?.name||"Error"),f=String(l.message),h=String(l.stack),m=new Error(f);m.name=p,m.stack=`${p}: ${f}
1013
+ ${Re(h,n)}`,l.cause&&(m.cause=Ct(l.cause));const w=l.sourceFile?{column:l.column,file:l.sourceFile,line:l.line,plugin:l.plugin}:void 0,g=await ht(m,t,n,w,"server",o);i.err=g,r.set(JSON.stringify(g),Date.now())}}s(i,a)}catch(l){Ne(t,"[visulima:vite-overlay:server] ws.send intercept failed",l),a.send(i,a)}}},"setupWebSocketInterception"),ca=I((t,e,r,n,o,s,i)=>{t.ws.on(Sr,async(a,l)=>{if(!i)return;const c=a&&typeof a=="object"?a:{message:Dn,stack:""},p=jr(c);if(r(p))return;const f=String(c?.name||"Error"),h=String(c.message),m=String(c.stack),w=new Error(h);w.name=f,w.stack=`${f}: ${h}
1014
+ ${Re(m,o)}`,c.cause&&(w.cause=Ct(c.cause));try{await na(w,o,e);const g=await ht(w,t,o,{column:c?.column,file:c?.file,line:c?.line,plugin:c?.plugin},"client",s);n.set(JSON.stringify(g),Date.now());const y={err:g,type:"error"};g.solution&&(y.solutions=g.solution),l.send(y)}catch(g){Ne(t,"[visulima:vite-overlay:server] failed to build extended client error",g),l.send({err:{message:g.message,name:String(g.name||Er),stack:g.stack},type:"error"})}})},"setupHMRHandler"),da=I((t,e)=>t.flat().some(r=>r&&(e&&r.name===e||r.name==="vite:react"||r.name==="@vitejs/plugin-react"||typeof r=="function"&&r.name?.includes("react")||r.constructor&&r.constructor.name?.includes("React"))),"hasReactPlugin"),Ma=I(t=>{let e,r;return{apply:"serve",config(n,o){return n.plugins&&(r=da(n.plugins,t?.reactPluginName)),e=o.mode||"development",n},configureServer(n){const o=n.config.root||process.cwd(),s=ra(n),{recentErrors:i,shouldSkip:a}=oa(),l=n.transformRequest.bind(n);n.transformRequest=async(p,f)=>{try{return await l(p,f)}catch(h){if(h?.message?.includes("Failed to resolve import")){const m=h.message.match(/Failed to resolve import ["']([^"']+)["'] from ["']([^"']+)["']/);if(m){const[,w,g]=m;h.sourceFile=g,h.importPath=w}}throw h}},la(n,a,i,o,t?.solutionFinders??[]),ca(n,s,a,i,o,t?.solutionFinders??[],t?.logClientRuntimeError??!0);const c=ia(n,o,s);process.on("unhandledRejection",c),n.httpServer?.on("close",()=>{process.off("unhandledRejection",c)})},enforce:"pre",name:On,transform(n,o,s){return s?.ssr||!(o.includes("vite/dist/client/client.mjs")||o.includes("/@vite/client"))?null:Wn(n)},transformIndexHtml(){return{html:"",tags:[{attrs:{type:"module"},children:aa(e,r),injectTo:"head",tag:"script"}]}}}},"errorOverlayPlugin");export{Ma as default};