sveld 0.37.6 → 0.37.7

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/lib/browser.js CHANGED
@@ -1,169 +1,172 @@
1
- var Ac=Object.defineProperty;var Pc=(e)=>e;function kc(e,t){this[e]=Pc.bind(null,t)}var wc=(e,t)=>{for(var n in t)Ac(e,n,{get:t[n],enumerable:!0,configurable:!0,set:kc.bind(t,n)})};function Nc(e){return e}function $e(e){return typeof e==="object"&&e!==null}function Ri(e){return $e(e)&&e.type==="VariableDeclaration"&&Array.isArray(e.declarations)}function pt(e){return $e(e)&&e.type==="Literal"}function xe(e){return $e(e)&&e.type==="Identifier"&&typeof e.name==="string"}function Mi(e){return $e(e)&&e.type==="MemberExpression"}function Je(e){return $e(e)&&e.type==="ObjectExpression"&&Array.isArray(e.properties)}function _c(e){return $e(e)&&e.type==="CallExpression"}function Ye(e,t){if(!_c(e))return!1;return!!e.callee&&$e(e.callee)&&e.callee.type==="Identifier"&&e.callee.name===t}function lt(e){if($e(e)&&(e.type==="TSAsExpression"||e.type==="TSSatisfiesExpression")&&"expression"in e)return lt(e.expression);return e}function Oi(e){if($e(e)&&(e.type==="TSAsExpression"||e.type==="TSSatisfiesExpression")&&"typeAnnotation"in e)return e.typeAnnotation;return}function Dc(e){return $e(e)&&e.type==="NewExpression"}function Zn(e,t){if(!Dc(e))return!1;return!!e.callee&&$e(e.callee)&&e.callee.type==="Identifier"&&e.callee.name===t}function Bi(e){if(!$e(e)||typeof e.type!=="string")return null;if(e.type==="Literal"){let t=e.value;if(typeof t==="string")return t;return t==null?null:String(t)}if(e.type==="TemplateLiteral"){let t=e.quasis;if(t?.length===1){let n=t[0]?.value?.cooked;return n==null?null:n}}return null}var Fi={a:"HTMLAnchorElement",abbr:"HTMLElement",address:"HTMLElement",applet:"HTMLUnknownElement",area:"HTMLAreaElement",article:"HTMLElement",aside:"HTMLElement",audio:"HTMLAudioElement",b:"HTMLElement",base:"HTMLBaseElement",basefont:"HTMLElement",bdi:"HTMLElement",bdo:"HTMLElement",blockquote:"HTMLQuoteElement",body:"HTMLBodyElement",br:"HTMLBRElement",button:"HTMLButtonElement",canvas:"HTMLCanvasElement",caption:"HTMLTableCaptionElement",cite:"HTMLElement",code:"HTMLElement",col:"HTMLTableColElement",colgroup:"HTMLTableColElement",data:"HTMLDataElement",datalist:"HTMLDataListElement",dd:"HTMLElement",del:"HTMLModElement",details:"HTMLDetailsElement",dfn:"HTMLElement",dialog:"HTMLDialogElement",dir:"HTMLDirectoryElement",div:"HTMLDivElement",dl:"HTMLDListElement",dt:"HTMLElement",em:"HTMLElement",embed:"HTMLEmbedElement",fieldset:"HTMLFieldSetElement",figcaption:"HTMLElement",figure:"HTMLElement",font:"HTMLFontElement",footer:"HTMLElement",form:"HTMLFormElement",frame:"HTMLFrameElement",frameset:"HTMLFrameSetElement",h1:"HTMLHeadingElement",h2:"HTMLHeadingElement",h3:"HTMLHeadingElement",h4:"HTMLHeadingElement",h5:"HTMLHeadingElement",h6:"HTMLHeadingElement",head:"HTMLHeadElement",header:"HTMLElement",hgroup:"HTMLElement",hr:"HTMLHRElement",html:"HTMLHtmlElement",i:"HTMLElement",iframe:"HTMLIFrameElement",img:"HTMLImageElement",input:"HTMLInputElement",ins:"HTMLModElement",kbd:"HTMLElement",label:"HTMLLabelElement",legend:"HTMLLegendElement",li:"HTMLLIElement",link:"HTMLLinkElement",main:"HTMLElement",map:"HTMLMapElement",mark:"HTMLElement",marquee:"HTMLMarqueeElement",menu:"HTMLMenuElement",meta:"HTMLMetaElement",meter:"HTMLMeterElement",nav:"HTMLElement",noscript:"HTMLElement",object:"HTMLObjectElement",ol:"HTMLOListElement",optgroup:"HTMLOptGroupElement",option:"HTMLOptionElement",output:"HTMLOutputElement",p:"HTMLParagraphElement",param:"HTMLParamElement",picture:"HTMLPictureElement",pre:"HTMLPreElement",progress:"HTMLProgressElement",q:"HTMLQuoteElement",rp:"HTMLElement",rt:"HTMLElement",ruby:"HTMLElement",s:"HTMLElement",samp:"HTMLElement",script:"HTMLScriptElement",search:"HTMLElement",section:"HTMLElement",select:"HTMLSelectElement",slot:"HTMLSlotElement",small:"HTMLElement",source:"HTMLSourceElement",span:"HTMLSpanElement",strong:"HTMLElement",style:"HTMLStyleElement",sub:"HTMLElement",summary:"HTMLElement",sup:"HTMLElement",table:"HTMLTableElement",tbody:"HTMLTableSectionElement",td:"HTMLTableCellElement",template:"HTMLTemplateElement",textarea:"HTMLTextAreaElement",tfoot:"HTMLTableSectionElement",th:"HTMLTableCellElement",thead:"HTMLTableSectionElement",time:"HTMLTimeElement",title:"HTMLTitleElement",tr:"HTMLTableRowElement",track:"HTMLTrackElement",u:"HTMLElement",ul:"HTMLUListElement",var:"HTMLElement",video:"HTMLVideoElement",wbr:"HTMLElement"};function Ic(e){return e in Fi}function Vi(e){if(Ic(e))return Fi[e];return"HTMLElement"}var mn=Symbol("sveld.parsedComponentTypeScriptMetadata");function er(e){return e[mn]}var Lc=/\w/;function Rc(e,t){let n=e.trim();if(!n.startsWith("{")||!n.endsWith("}"))return;let r=n.slice(1,-1),i=[],o=0,s="";for(let p of r)if(p==="{"||p==="<"||p==="("||p==="[")o++,s+=p;else if(p==="}"||p===">"||p===")"||p==="]")o--,s+=p;else if((p===";"||p===",")&&o===0)i.push(s.trim()),s="";else s+=p;if(s.trim())i.push(s.trim());for(let p of i){if(!p.startsWith(t))continue;let l=p.slice(t.length);if(l.length>0&&Lc.test(l[0]))continue;let h=l.trimStart();if(h.startsWith("?"))h=h.slice(1).trimStart();if(h.startsWith(":"))return h.slice(1).trim()}return}function yn(e,t,n){let r=n;if(r.computed||r.object?.type!=="Identifier"||r.property?.type!=="Identifier")return;let i=r.object.name,o=r.property.name;if(!i||!o)return;if(e.wholePropsLocals.has(i))return t.getPropTypeByLocalOrPublic(o);let s=t.getPropTypeByLocalOrPublic(i)??t.findVariableTypeAndDescription(i)?.type;if(!s)return;return Rc(s,o)}function tr(){return{syntaxMode:"legacy",scriptLanguage:void 0,source:void 0,parsed:void 0,runesOptionOverride:void 0,sourceLineStartOffsetsCache:void 0,sourceLineHint:void 0,parsedJsDocByText:new Map,jsDocBlocksByStart:new Map,functionDocCommentStarts:new Set,rest_props:void 0,extends:void 0,customElementTag:void 0,customElement:void 0,componentComment:void 0,componentCommentSource:void 0,generics:null,scriptGenericsAttribute:void 0,diagnosticRecords:[],componentFilePath:"",props:new Map,moduleExports:new Map,propLocalToPublicName:new Map,reactive_vars:new Set,funcDecls:new Map,vars:new Set,valueImportBindingsByLocalName:new Map,pendingCallDefaultCandidates:[],pendingConstDefaultCandidates:[],pendingContextKeyCandidates:[],pendingDispatchEscapeCandidates:[],deferredEventNoSourceDiagnostics:[],runesPropsDeclarationMetadataByDeclaratorStart:new Map,typedRunesPropsDeclarations:[],explicitPropTypesByName:new Map,explicitVariableTypesByName:new Map,typeImportBindingsByLocalName:new Map,localTypeDeclarationsByName:new Map,additionalTypeDependencyNodes:[],wholePropsLocals:new Set,restPropLocals:new Set,componentScope:new Map,scopeDeclarations:new Map,activeScopes:[],slots:new Map,snippetPropLocals:new Set,cssParts:[],cssProperties:[],deferredSlotBlockGenerics:[],events:new Map,eventDescriptions:new Map,forwardedEvents:new Map,jsDocEventNames:new Set,jsDocEventSources:new Map,bindings:new Map,contexts:new Map,typedefs:new Map,variableInfoCache:new Map,variableInfoCacheBuilt:!1,sveldIgnoreDirectives:new Map}}var nr={"prop-unknown-type":"sveld/prop-unknown-type","context-any-type":"sveld/context-any-type","slot-missing-type":"sveld/slot-missing-type","event-no-source":"sveld/event-no-source","dispatch-escapes":"sveld/dispatch-escapes","example-compile-error":"sveld/example-compile-error","example-syntax-error":"sveld/example-syntax-error","syntax-skipped":"sveld/syntax-skipped","rest-props-unresolved":"sveld/rest-props-unresolved","context-duplicate-key":"sveld/context-duplicate-key","context-key-unresolved":"sveld/context-key-unresolved","spread-unresolved":"sveld/spread-unresolved","export-unresolved":"sveld/export-unresolved","module-export-conflict":"sveld/module-export-conflict","extend-props-target-missing":"sveld/extend-props-target-missing","extend-props-duplicate":"sveld/extend-props-duplicate","extend-props-override":"sveld/extend-props-override","jsdoc-unknown-tag":"sveld/jsdoc-unknown-tag","typedef-duplicate":"sveld/typedef-duplicate","property-duplicate":"sveld/property-duplicate","generics-conflict":"sveld/generics-conflict","event-description-ambiguous":"sveld/event-description-ambiguous","jsdoc-tag-dropped":"sveld/jsdoc-tag-dropped","internal-typedef-referenced":"sveld/internal-typedef-referenced","types-inline-unresolved":"sveld/types-inline-unresolved"},Mc={"prop-unknown-type":"warning","context-any-type":"warning","slot-missing-type":"warning","event-no-source":"warning","dispatch-escapes":"warning","example-compile-error":"error","example-syntax-error":"error","syntax-skipped":"error","rest-props-unresolved":"warning","context-duplicate-key":"warning","context-key-unresolved":"warning","spread-unresolved":"warning","export-unresolved":"warning","module-export-conflict":"warning","extend-props-target-missing":"error","extend-props-duplicate":"warning","extend-props-override":"warning","jsdoc-unknown-tag":"warning","typedef-duplicate":"warning","property-duplicate":"warning","generics-conflict":"warning","event-description-ambiguous":"warning","jsdoc-tag-dropped":"warning","internal-typedef-referenced":"error","types-inline-unresolved":"warning"};function $i(e){return{...e,code:nr[e.kind],severity:Mc[e.kind]}}function oe(e,t,n,r,i){e.diagnosticRecords.push(rr(e,t,n,r,i))}function rr(e,t,n,r,i){return $i({component:e.componentFilePath,kind:t,name:n,message:r,...i?{source:i}:{},...ir(e,t,n)?{ignored:!0}:{}})}function ji(e,t){return`${e}:${t}`}function tt(e,t,n,r){if(!r||r.length===0)return;let i=ji(t,n),o=e.sveldIgnoreDirectives.get(i)??new Set;for(let s of r)o.add(s);e.sveldIgnoreDirectives.set(i,o)}function ir(e,t,n){let r=e.sveldIgnoreDirectives.get(ji(t,n));if(!r)return!1;return r.has("")||r.has(nr[t])}function Oc(e){let t=[],n=0,r=0;for(let i=0;i<e.length;i++){let o=e[i];if(o==="<"||o==="("||o==="["||o==="{")n++;else if(o===">"||o===")"||o==="]"||o==="}")n=Math.max(n-1,0);else if(n===0&&(o===";"||o===","))t.push(e.slice(r,i)),r=i+1}return t.push(e.slice(r)),t}function Bc(e){let t=0;for(let n=0;n<e.length;n++){let r=e[n];if(r==="<"||r==="("||r==="["||r==="{")t++;else if(r===">"||r===")"||r==="]"||r==="}")t=Math.max(t-1,0);else if(t===0&&r===":")return n}return-1}var Fc=/^\{([\s\S]*)\}$/,Vc=/^[A-Za-z_$][\w$]*$/;function gn(e){let t=e.trim(),n=Fc.exec(t);if(!n)return null;let r=n[1].trim();if(r==="")return[];let i=[];for(let o of Oc(r)){let s=o.trim();if(!s)continue;let p=Bc(s);if(p===-1)return null;let l=s.slice(0,p).trim(),h=s.slice(p+1).trim();if(!h)return null;let d=!1;if(l.endsWith("?"))d=!0,l=l.slice(0,-1).trim();if(!Vc.test(l))return null;i.push({name:l,type:h,optional:d})}return i}var sr=/[\r\n]+/g;function $c(e){if(e.sourceLineStartOffsetsCache)return e.sourceLineStartOffsetsCache;let t=[0];if(e.source){let n=e.source.indexOf(`
1
+ var Pp=Object.defineProperty;var Ap=(e)=>e;function kp(e,t){this[e]=Ap.bind(null,t)}var wp=(e,t)=>{for(var n in t)Pp(e,n,{get:t[n],enumerable:!0,configurable:!0,set:kp.bind(t,n)})};function Np(e){return e}function We(e){return typeof e==="object"&&e!==null}function Cs(e){return We(e)&&e.type==="VariableDeclaration"&&Array.isArray(e.declarations)}function Tt(e){return We(e)&&e.type==="Literal"}function ye(e){return We(e)&&e.type==="Identifier"&&typeof e.name==="string"}function Wt(e){return We(e)&&e.type==="MemberExpression"}function Ke(e){return We(e)&&e.type==="ObjectExpression"&&Array.isArray(e.properties)}function Dp(e){return We(e)&&e.type==="CallExpression"}function ct(e,t){if(!Dp(e))return!1;return!!e.callee&&We(e.callee)&&e.callee.type==="Identifier"&&e.callee.name===t}function Et(e){if(We(e)&&(e.type==="TSAsExpression"||e.type==="TSSatisfiesExpression")&&"expression"in e)return Et(e.expression);return e}function Ss(e){if(We(e)&&(e.type==="TSAsExpression"||e.type==="TSSatisfiesExpression")&&"typeAnnotation"in e)return e.typeAnnotation;return}function _p(e){return We(e)&&e.type==="NewExpression"}function kr(e,t){if(!_p(e))return!1;return!!e.callee&&We(e.callee)&&e.callee.type==="Identifier"&&e.callee.name===t}function vs(e){if(!We(e)||typeof e.type!=="string")return null;if(e.type==="Literal"){let t=e.value;if(typeof t==="string")return t;return t==null?null:String(t)}if(e.type==="TemplateLiteral"){let t=e.quasis;if(t?.length===1){let n=t[0]?.value?.cooked;return n==null?null:n}}return null}var Ps={a:"HTMLAnchorElement",abbr:"HTMLElement",address:"HTMLElement",applet:"HTMLUnknownElement",area:"HTMLAreaElement",article:"HTMLElement",aside:"HTMLElement",audio:"HTMLAudioElement",b:"HTMLElement",base:"HTMLBaseElement",basefont:"HTMLElement",bdi:"HTMLElement",bdo:"HTMLElement",blockquote:"HTMLQuoteElement",body:"HTMLBodyElement",br:"HTMLBRElement",button:"HTMLButtonElement",canvas:"HTMLCanvasElement",caption:"HTMLTableCaptionElement",cite:"HTMLElement",code:"HTMLElement",col:"HTMLTableColElement",colgroup:"HTMLTableColElement",data:"HTMLDataElement",datalist:"HTMLDataListElement",dd:"HTMLElement",del:"HTMLModElement",details:"HTMLDetailsElement",dfn:"HTMLElement",dialog:"HTMLDialogElement",dir:"HTMLDirectoryElement",div:"HTMLDivElement",dl:"HTMLDListElement",dt:"HTMLElement",em:"HTMLElement",embed:"HTMLEmbedElement",fieldset:"HTMLFieldSetElement",figcaption:"HTMLElement",figure:"HTMLElement",font:"HTMLFontElement",footer:"HTMLElement",form:"HTMLFormElement",frame:"HTMLFrameElement",frameset:"HTMLFrameSetElement",h1:"HTMLHeadingElement",h2:"HTMLHeadingElement",h3:"HTMLHeadingElement",h4:"HTMLHeadingElement",h5:"HTMLHeadingElement",h6:"HTMLHeadingElement",head:"HTMLHeadElement",header:"HTMLElement",hgroup:"HTMLElement",hr:"HTMLHRElement",html:"HTMLHtmlElement",i:"HTMLElement",iframe:"HTMLIFrameElement",img:"HTMLImageElement",input:"HTMLInputElement",ins:"HTMLModElement",kbd:"HTMLElement",label:"HTMLLabelElement",legend:"HTMLLegendElement",li:"HTMLLIElement",link:"HTMLLinkElement",main:"HTMLElement",map:"HTMLMapElement",mark:"HTMLElement",marquee:"HTMLMarqueeElement",menu:"HTMLMenuElement",meta:"HTMLMetaElement",meter:"HTMLMeterElement",nav:"HTMLElement",noscript:"HTMLElement",object:"HTMLObjectElement",ol:"HTMLOListElement",optgroup:"HTMLOptGroupElement",option:"HTMLOptionElement",output:"HTMLOutputElement",p:"HTMLParagraphElement",param:"HTMLParamElement",picture:"HTMLPictureElement",pre:"HTMLPreElement",progress:"HTMLProgressElement",q:"HTMLQuoteElement",rp:"HTMLElement",rt:"HTMLElement",ruby:"HTMLElement",s:"HTMLElement",samp:"HTMLElement",script:"HTMLScriptElement",search:"HTMLElement",section:"HTMLElement",select:"HTMLSelectElement",slot:"HTMLSlotElement",small:"HTMLElement",source:"HTMLSourceElement",span:"HTMLSpanElement",strong:"HTMLElement",style:"HTMLStyleElement",sub:"HTMLElement",summary:"HTMLElement",sup:"HTMLElement",table:"HTMLTableElement",tbody:"HTMLTableSectionElement",td:"HTMLTableCellElement",template:"HTMLTemplateElement",textarea:"HTMLTextAreaElement",tfoot:"HTMLTableSectionElement",th:"HTMLTableCellElement",thead:"HTMLTableSectionElement",time:"HTMLTimeElement",title:"HTMLTitleElement",tr:"HTMLTableRowElement",track:"HTMLTrackElement",u:"HTMLElement",ul:"HTMLUListElement",var:"HTMLElement",video:"HTMLVideoElement",wbr:"HTMLElement"};function Ip(e){return e in Ps}function As(e){if(Ip(e))return Ps[e];return"HTMLElement"}var It=Symbol("sveld.parsedComponentTypeScriptMetadata");function wr(e){return e[It]}var Lp=/\w/;function Rp(e,t){let n=e.trim();if(!n.startsWith("{")||!n.endsWith("}"))return;let r=n.slice(1,-1),i=[],o=0,s="";for(let c of r)if(c==="{"||c==="<"||c==="("||c==="[")o++,s+=c;else if(c==="}"||c===">"||c===")"||c==="]")o--,s+=c;else if((c===";"||c===",")&&o===0)i.push(s.trim()),s="";else s+=c;if(s.trim())i.push(s.trim());for(let c of i){if(!c.startsWith(t))continue;let l=c.slice(t.length);if(l.length>0&&Lp.test(l[0]))continue;let u=l.trimStart();if(u.startsWith("?"))u=u.slice(1).trimStart();if(u.startsWith(":"))return u.slice(1).trim()}return}function Fn(e,t,n){let r=n;if(r.computed||r.object?.type!=="Identifier"||r.property?.type!=="Identifier")return;let i=r.object.name,o=r.property.name;if(!i||!o)return;if(e.wholePropsLocals.has(i))return t.getPropTypeByLocalOrPublic(o);let s=t.getPropTypeByLocalOrPublic(i)??t.findVariableTypeAndDescription(i)?.type;if(!s)return;return Rp(s,o)}var Nr=/^\s+/,ks=/\s/,Mp=/^@[^\s/]+(?=\s|$)/,Op=/^@(\S+)\s*/;function cn(e){let t=0;while(t<e.length){let n=e.charCodeAt(t);if(n!==32&&n!==9&&n!==13&&n!==10&&!ks.test(e[t]))break;t++}return t}function Bp(e,t){let n=e.slice(cn(e)),r=!1;if(t)n=n.slice(3),r=!0;else if(n.startsWith("*")&&!n.startsWith("*/"))n=n.slice(1),r=!0;let i=n.slice(0,cn(n));n=n.slice(i.length);let o=n.trimEnd(),s=o.endsWith("*/")?o.slice(0,-2).trimEnd():n;return{indent:r?i.slice(1):i,content:s}}function Fp(e,t,n){let r=n>t&&e.charCodeAt(n-1)===13?n-1:n;return e.slice(t,r)}function $p(e){let t=[],n=0;while(!0){let r=e.indexOf("/**",n);if(r===-1)break;let i=e.lastIndexOf(`
2
+ `,r-1)+1;if(e.charCodeAt(r+3)===42||e.slice(i,r).trim()!==""){n=r+1;continue}let o=[],s=i,c=!1,l=0;while(s<=e.length){let u=e.indexOf(`
3
+ `,s),f=u===-1?e.length:u,y=Fp(e,s,f),{indent:g,content:b}=Bp(y,o.length===0);o.push({raw:y,start:s,number:o.length,indent:g,content:b});let P=y.trimEnd();if(P.endsWith("*/")){c=!0,l=s+P.length,n=f;break}if(u===-1)break;s=u+1}if(!c)break;t.push({start:r,end:l,lines:o})}return t}function Vp(e){let t=e;if(t.length>0&&t[0].content==="")t=t.slice(1);if(t.length>0&&t[t.length-1].content==="")t=t.slice(0,-1);return t}function jp(e){let t=[[]],n=!1;for(let r of e){if(Mp.test(r.content)&&!n)t.push([r]);else t[t.length-1].push(r);if($n(r.content))n=!n}return t}function $n(e){return Hp(e,"```")%2===1}function Hp(e,t){let n=0,r=e.indexOf(t);while(r!==-1)n++,r=e.indexOf(t,r+t.length);return n}function ws(e){return e.map((t)=>t.indent+t.content).join(`
4
+ `)}function qp(e,t){let n=t;while(n<e.length-1&&e[n].content.trim()==="")n++;if(e[n].content[0]!=="{")return null;let r=0,i,o=!1,s=[],c=n;for(;c<e.length;c++){let f=e[c].content,y=0;for(let g of f){if(y++,i!==void 0){if(o)o=!1;else if(g==="\\")o=!0;else if(g===i)i=void 0;continue}if(g==='"'||g==="'"||g==="`")i=g;else if(g==="{")r++;else if(g==="}")r--;if(r===0)break}if(s.push(y),r===0)break}if(r!==0)return null;let l=c;return{type:s.map((f,y)=>{let g=n+y,b=e[g].content.slice(0,f);if(e[g].content=e[g].content.slice(f).replace(Nr,""),g>0)e[g].continuesType=!0;return y===0?b:e[g].indent+b}).join(`
5
+ `).slice(1,-1),endIndex:l}}function Up(e){let t=e.content.match(Nr)?.[0]??"",n=e.content.slice(t.length),r=0,i=0;for(let u of n){if(r===0&&ks.test(u))break;if(u==="[")r++;if(u==="]")r--;i++}let o=r===0?n.slice(0,i):"";if(!o)return null;let s=o,c=!1,l;if(o.startsWith("[")&&o.endsWith("]")){c=!0;let f=o.slice(1,-1).split("=");if(s=f[0].trim(),f.length>1)l=f.slice(1).join("=").trim();if(!s)return null}if(s.length>1&&(s[0]==='"'||s[0]==="'")&&s[s.length-1]===s[0])s=s.slice(1,-1);return e.content=n.slice(i).replace(Nr,""),{name:s,optional:c,default:l}}function Gp(e){let t=e[0],n=t.content.match(Op),r=n?n[1]:"",i=n?t.content.slice(n[0].length):t.content,o=i.trimEnd(),s=e.slice(1).map((b)=>b.indent+b.content),c=(o?[o,...s]:s).join(`
6
+ `);t.content=i,t.tag=r;let l=qp(e,0),u=l?.type??"",f=l?.endIndex??0,y=Up(e[f]),g=ws(e.slice(f));return{tag:r,name:y?.name??"",type:u,optional:y?.optional??!1,default:y?.default,description:g,text:c,lines:e}}function Wp(e,t,n){let r=Vp(e);r.forEach((s,c)=>{s.number=c});let i=jp(r),o=i.slice(1).map(Gp);return{description:ws(i[0]),tags:o,start:t,end:n,lines:r}}function Dr(e){return $p(e).map(({start:t,end:n,lines:r})=>Wp(r,t,n))}var _r={"prop-unknown-type":"sveld/prop-unknown-type","context-any-type":"sveld/context-any-type","slot-missing-type":"sveld/slot-missing-type","event-no-source":"sveld/event-no-source","dispatch-escapes":"sveld/dispatch-escapes","example-compile-error":"sveld/example-compile-error","example-syntax-error":"sveld/example-syntax-error","syntax-skipped":"sveld/syntax-skipped","rest-props-unresolved":"sveld/rest-props-unresolved","context-duplicate-key":"sveld/context-duplicate-key","context-key-unresolved":"sveld/context-key-unresolved","context-value-unresolved":"sveld/context-value-unresolved","spread-unresolved":"sveld/spread-unresolved","export-unresolved":"sveld/export-unresolved","module-export-conflict":"sveld/module-export-conflict","extend-props-target-missing":"sveld/extend-props-target-missing","extend-props-duplicate":"sveld/extend-props-duplicate","extend-props-override":"sveld/extend-props-override","jsdoc-unknown-tag":"sveld/jsdoc-unknown-tag","typedef-duplicate":"sveld/typedef-duplicate","property-duplicate":"sveld/property-duplicate","generics-conflict":"sveld/generics-conflict","event-description-ambiguous":"sveld/event-description-ambiguous","jsdoc-tag-dropped":"sveld/jsdoc-tag-dropped","internal-typedef-referenced":"sveld/internal-typedef-referenced","types-inline-unresolved":"sveld/types-inline-unresolved","cross-file-unresolved":"sveld/cross-file-unresolved","export-ambiguous":"sveld/export-ambiguous"},Kp={"prop-unknown-type":"warning","context-any-type":"warning","slot-missing-type":"warning","event-no-source":"warning","dispatch-escapes":"warning","example-compile-error":"error","example-syntax-error":"error","syntax-skipped":"error","rest-props-unresolved":"warning","context-duplicate-key":"warning","context-key-unresolved":"warning","context-value-unresolved":"warning","spread-unresolved":"warning","export-unresolved":"warning","module-export-conflict":"warning","extend-props-target-missing":"error","extend-props-duplicate":"warning","extend-props-override":"warning","jsdoc-unknown-tag":"warning","typedef-duplicate":"warning","property-duplicate":"warning","generics-conflict":"warning","event-description-ambiguous":"warning","jsdoc-tag-dropped":"warning","internal-typedef-referenced":"error","types-inline-unresolved":"warning","cross-file-unresolved":"warning","export-ambiguous":"warning"};function Vn(e){return{...e,code:_r[e.kind],severity:Kp[e.kind]}}function pe(e,t,n,r,i){e.diagnosticRecords.push(Ir(e,t,n,r,i))}function Ir(e,t,n,r,i){return Vn({component:e.componentFilePath,kind:t,name:n,message:r,...i?{source:i}:{},...Lr(e,t,n)?{ignored:!0}:{}})}function Ns(e,t){return`${e}:${t}`}function dt(e,t,n,r){if(!r||r.length===0)return;let i=Ns(t,n),o=e.sveldIgnoreDirectives.get(i)??new Set;for(let s of r)o.add(s);e.sveldIgnoreDirectives.set(i,o)}function Lr(e,t,n){let r=e.sveldIgnoreDirectives.get(Ns(t,n));if(!r)return!1;return r.has("")||r.has(_r[t])}function zp(e){let t=[],n=0,r=0;for(let i=0;i<e.length;i++){let o=e[i];if(o==="<"||o==="("||o==="["||o==="{")n++;else if(o===">"||o===")"||o==="]"||o==="}")n=Math.max(n-1,0);else if(n===0&&(o===";"||o===","))t.push(e.slice(r,i)),r=i+1}return t.push(e.slice(r)),t}function Jp(e){let t=0;for(let n=0;n<e.length;n++){let r=e[n];if(r==="<"||r==="("||r==="["||r==="{")t++;else if(r===">"||r===")"||r==="]"||r==="}")t=Math.max(t-1,0);else if(t===0&&r===":")return n}return-1}var Xp=/^\{([\s\S]*)\}$/,Yp=/^[A-Za-z_$][\w$]*$/;function pn(e){let t=e.trim(),n=Xp.exec(t);if(!n)return null;let r=n[1].trim();if(r==="")return[];let i=[];for(let o of zp(r)){let s=o.trim();if(!s)continue;let c=Jp(s);if(c===-1)return null;let l=s.slice(0,c).trim(),u=s.slice(c+1).trim();if(!u)return null;let f=!1;if(l.endsWith("?"))f=!0,l=l.slice(0,-1).trim();if(!Yp.test(l))return null;i.push({name:l,type:u,optional:f})}return i}var jn=/[\r\n]+/g;function Qp(e){if(e.sourceLineStartOffsetsCache)return e.sourceLineStartOffsetsCache;let t=[0];if(e.source){let n=e.source.indexOf(`
2
7
  `);while(n!==-1)t.push(n+1),n=e.source.indexOf(`
3
- `,n+1)}return e.sourceLineStartOffsetsCache=t,t}function Hi(e,t){if(!e.source||t<0||t>e.source.length)return;let n=$c(e),r=e.sourceLineHint;if(r!==void 0)for(let s=r;s<=r+1&&s<n.length;s++){let p=n[s],l=n[s+1]??Number.POSITIVE_INFINITY;if(t>=p&&t<l)return e.sourceLineHint=s,{line:s+1,column:t-p}}let i=0,o=n.length-1;while(i<=o){let s=i+o>>>1,p=n[s],l=n[s+1]??Number.POSITIVE_INFINITY;if(t<p)o=s-1;else if(t>=l)i=s+1;else return e.sourceLineHint=s,{line:s+1,column:t-p}}return}function xn(e,t,n){if(t===void 0||n===void 0||n<t)return;let r=Hi(e,t),i=Hi(e,n);if(!r||!i)return;return{start:r,end:i}}function se(e,t){if(!t||typeof t!=="object")return;let n="start"in t&&typeof t.start==="number"?t.start:void 0,r="end"in t&&typeof t.end==="number"?t.end:void 0;return xn(e,n,r)}function Be(e,t){if(!t||t.length===0)return;let n=[...t];while(n.length>1){let l=n[n.length-1];if(l.tag!==void 0||!l.raw.trim().endsWith("*/"))break;n.pop()}let r=n[0],i=r.raw.indexOf(`@${r.tag??""}`),o=r.start+Math.max(i,0),s=n[n.length-1],p=s.start+s.raw.length;return xn(e,o,p)}function pe(e,t,n){return e.source?.slice(t,n)}function nt(e,t){if(!t||typeof t!=="object")return;let n="start"in t&&typeof t.start==="number"?t.start:void 0,r="end"in t&&typeof t.end==="number"?t.end:void 0;if(n===void 0||r===void 0)return;return pe(e,n,r)?.replace(sr," ")}function je(e){return e===void 0||e===""?void 0:e}function Ht(e,t,n,r){if(je(n)===void 0)return;if(e.trackPropLocalName(n),t.props.has(n)){let i=t.props.get(n);t.props.set(n,{...i,...r})}else t.props.set(n,r)}function qt(e,t,n,r){if(t.pendingCallDefault)e.pendingCallDefaultCandidates.push({propName:n,location:r,...t.pendingCallDefault});if(t.pendingConstDefault)e.pendingConstDefaultCandidates.push({propName:n,location:r,...t.pendingConstDefault})}function ut(e,t,n,r=0){let i,o,s=!1;if(!n||typeof n!=="object"||!("type"in n))return{value:i,type:o,isFunction:s};let p=Ui(e,t,n);if(n.type==="ObjectExpression"||n.type==="BinaryExpression"||n.type==="ArrayExpression"||n.type==="ArrowFunctionExpression"||n.type==="FunctionExpression"){let l=n;if("start"in l&&"end"in l&&typeof l.start==="number"&&typeof l.end==="number")i=pe(t,l.start,l.end)?.replace(sr," ");if(o=i,s=n.type==="ArrowFunctionExpression"||n.type==="FunctionExpression",n.type==="BinaryExpression"){let h=n;if(h.left&&typeof h.left==="object"&&"type"in h.left&&h.left.type==="Literal"&&"value"in h.left&&typeof h.left.value==="string")o="string"}if(n.type==="ArrowFunctionExpression"||n.type==="FunctionExpression")o=Ki(n),i=qi(t,n)}else if(n.type==="UnaryExpression"){let l=n;if("start"in l&&"end"in l&&typeof l.start==="number"&&typeof l.end==="number")i=pe(t,l.start,l.end);if(l.argument){if(typeof l.argument==="object"&&"type"in l.argument&&l.argument.type==="UnaryExpression")o=ut(e,t,l.argument).type;else if(typeof l.argument==="object"&&"value"in l.argument)o=typeof l.argument.value}}else if(n.type==="NewExpression"){let l=n;if("start"in l&&"end"in l&&typeof l.start==="number"&&typeof l.end==="number")i=pe(t,l.start,l.end);if(l.callee&&typeof l.callee==="object"&&"type"in l.callee&&l.callee.type==="Identifier"){let h=l.callee.name;if(h==="Date")o="Date";else if(h==="Map")o="Map<any, any>";else if(h==="Set")o="Set<any>";else if(h==="WeakMap")o="WeakMap<object, any>";else if(h==="WeakSet")o="WeakSet<object>";else if(h==="Array")o="any[]";else if(h==="RegExp"||h==="Regexp")o="RegExp";else if(h==="Error")o="Error";else o=h}}else if(n.type==="CallExpression"){let l=n;if("start"in l&&"end"in l&&typeof l.start==="number"&&typeof l.end==="number")i=pe(t,l.start,l.end);let h=l.callee,d=h&&typeof h==="object"&&"type"in h&&h.type==="Identifier"?h.name:void 0;if((d==="$derived"||d==="$state")&&l.arguments.length===1&&r<5)return{...ut(e,t,l.arguments[0],r+1),value:i,defaultValue:p};if(d){let g=Hc(e,t,d);if(g)return{value:i,type:void 0,isFunction:!1,defaultValue:p,resolvedType:g};if(t.funcDecls.has(d)||qc(t,d))return{value:i,type:void 0,isFunction:!1,defaultValue:p,pendingCallDefault:{calleeName:d}};let b=t.valueImportBindingsByLocalName.get(d);if(b)return{value:i,type:void 0,isFunction:!1,defaultValue:p,pendingCallDefault:{calleeName:d,importSource:b.source,importedName:b.importedName}}}return{value:i,type:void 0,isFunction:!1,defaultValue:p,pendingCallDefault:{calleeName:d??jc(t,h)}}}else if(n.type==="Identifier"){let l=n;if(r<5){let d=Gi(t,l.name);if(d){let g=ut(e,t,d,r+1),b=e.resolveLocalVarJSDoc(l.name);return{...g,resolvedType:b?.type??g.resolvedType,resolvedDescription:b?.description??g.resolvedDescription,resolvedParams:b?.params??g.resolvedParams,resolvedReturnType:b?.returnType??g.resolvedReturnType}}if(t.funcDecls.has(l.name)){let g=e.resolveLocalVarJSDoc(l.name),b=t.funcDecls.get(l.name);return{value:b?qi(t,b):void 0,type:void 0,isFunction:!0,defaultValue:b?Ui(e,t,b):void 0,resolvedType:g?.type??Kc(g,b),resolvedDescription:g?.description,resolvedParams:g?.params,resolvedReturnType:g?.returnType}}}if("start"in l&&"end"in l&&typeof l.start==="number"&&typeof l.end==="number")i=pe(t,l.start,l.end);let h=t.valueImportBindingsByLocalName.get(l.name);if(h)return{value:i,type:o,isFunction:s,defaultValue:p,pendingConstDefault:{importSource:h.source,importedName:h.importedName}}}else if(n.type==="MemberExpression"){let l=n;if("start"in l&&"end"in l&&typeof l.start==="number"&&typeof l.end==="number")i=pe(t,l.start,l.end);if(e.isNumericConstant(n))o="number"}else if(n.type==="TemplateLiteral"){let l=n;if("start"in l&&"end"in l&&typeof l.start==="number"&&typeof l.end==="number")i=pe(t,l.start,l.end);o="string"}else if("raw"in n&&typeof n.raw==="string"){if(i=n.raw,"value"in n)o=n.value==null?void 0:typeof n.value}return{value:i,type:o,isFunction:s,defaultValue:p}}function Gi(e,t){for(let n of e.vars)for(let r of n.declarations)if(r.id&&typeof r.id==="object"&&"type"in r.id&&r.id.type==="Identifier"&&"name"in r.id&&r.id.name===t&&r.init)return r.init;return}function Ut(e,t){for(let n of e.vars){if(n.kind!=="const")continue;for(let r of n.declarations)if(r.id&&typeof r.id==="object"&&"type"in r.id&&r.id.type==="Identifier"&&"name"in r.id&&r.id.name===t&&r.init)return r.init}return}function jc(e,t){if(t&&typeof t==="object"&&"start"in t&&"end"in t&&typeof t.start==="number"&&typeof t.end==="number")return pe(e,t.start,t.end)??"call";return"call"}function Hc(e,t,n){let r=e.resolveLocalVarJSDoc(n);if(r?.returnType)return r.returnType;let i=t.funcDecls.get(n)??Wi(t,n);if(!i)return;let o=Wc(t,i);if(o)return o;let s=Uc(t,n);if(s)return s;let p=zi(i);return p==="any"?void 0:p}function qc(e,t){return Wi(e,t)!==void 0}function Wi(e,t){let n=Gi(e,t);if(!n||typeof n!=="object"||!("type"in n))return;if(n.type==="ArrowFunctionExpression"||n.type==="FunctionExpression")return n;return}function Uc(e,t){for(let n of e.vars)for(let r of n.declarations){let i=r.id;if(!i||typeof i!=="object"||!("type"in i)||i.type!=="Identifier"||!("name"in i)||i.name!==t)continue;let o=i.typeAnnotation;if(o?.type!=="TSTypeAnnotation")return;let s=o.typeAnnotation;if(!s||typeof s.start!=="number"||typeof s.end!=="number")return;return Gc(pe(e,s.start,s.end))}return}function Gc(e){if(!e)return;let t=e.lastIndexOf("=>");if(t===-1)return;return e.slice(t+2).trim()||void 0}function Wc(e,t){let n=t.returnType;if(n?.type!=="TSTypeAnnotation")return;let r=n.typeAnnotation;if(!r||typeof r.start!=="number"||typeof r.end!=="number")return;return pe(e,r.start,r.end)}function Kc(e,t){let n=e?.returnType??"any",r=e?.params;if(r&&r.length>0)return`(${r.map((o)=>`${o.name}${o.optional?"?":""}: ${o.type}`).join(", ")}) => ${n}`;if(e?.returnType)return`() => ${n}`;if(t)return Ki(t);return"(...args: any[]) => any"}function Ki(e){return`(${zc(e)}) => ${zi(e)}`}function zc(e){let t=e.params;if(!Array.isArray(t)||t.length===0)return"...args: any[]";let n=[];for(let r of t)if(r&&typeof r==="object"&&"type"in r&&r.type==="Identifier"&&"name"in r&&typeof r.name==="string")n.push(`${r.name}: any`);else return"...args: any[]";return n.join(", ")}function zi(e){if(e.async||e.generator)return"any";let t=e.body,n;if(t&&typeof t==="object"&&"type"in t&&t.type==="BlockStatement"){if(n=Xc(t),n.length===0)return"any"}else n=[t];let r=null;for(let i of n){let o=Jc(i);if(!o)return"any";if(r===null)r=o;else if(r!==o)return"any"}return r??"any"}function Xc(e){let t=[];return ar(e,t),t}function ar(e,t){if(!e||typeof e!=="object")return;let n=e;if(typeof n.type!=="string")return;if(n.type==="FunctionDeclaration"||n.type==="FunctionExpression"||n.type==="ArrowFunctionExpression")return;if(n.type==="ReturnStatement")t.push(n.argument??null);for(let r in n){if(r==="leadingComments")continue;let i=n[r];if(!i||typeof i!=="object")continue;if(Array.isArray(i))for(let o=0;o<i.length;o++)ar(i[o],t);else ar(i,t)}}function Jc(e){if(!e||typeof e!=="object"||!("type"in e))return null;switch(e.type){case"Literal":{let t=e.value;if(typeof t==="string")return"string";if(typeof t==="number")return"number";if(typeof t==="boolean")return"boolean";return null}case"TemplateLiteral":return"string";case"CallExpression":{let t=e.callee;if(t&&typeof t==="object"&&"type"in t&&t.type==="Identifier"){let n=t.name;if(n==="String")return"string";if(n==="Number")return"number";if(n==="Boolean")return"boolean"}return null}default:return null}}function Xi(e){if(Ye(e,"$bindable"))return{init:e.arguments[0],bindable:!0};return{init:e,bindable:!1}}function Yc(e,t){let n=t.params;if(!Array.isArray(n)||n.length===0)return"";let r=n[0],i=n[n.length-1];if(typeof r.start!=="number"||typeof i.end!=="number")return"";return pe(e,r.start,i.end)??""}function qi(e,t){if(t.generator)return;let n=t.body;if(!n||typeof n!=="object"||!("type"in n))return;let r=Yc(e,t),i=t.async?"async ":"",o=(p,l)=>p&&typeof p==="object"&&("type"in p)&&p.type==="ObjectExpression"?`(${l})`:l;if(n.type!=="BlockStatement"){let p=nt(e,n);return p===void 0?void 0:`${i}(${r}) => ${o(n,p)}`}let s=n.body;if(s.length===0)return`${i}(${r}) => {}`;if(s.length===1){let p=s[0];if(p&&typeof p==="object"&&"type"in p&&p.type==="ReturnStatement"){let l=p.argument;if(l){let h=nt(e,l);if(h!==void 0)return`${i}(${r}) => ${o(l,h)}`}}}return}function Ui(e,t,n){let r=nt(t,n);if(!r||!n||typeof n!=="object"||!("type"in n))return;let i="expression";if(n.type==="Literal"||n.type==="UnaryExpression")i="literal";else if(n.type==="TemplateLiteral")i=n.expressions.length===0?"literal":"expression";else if(n.type==="ArrayExpression")i="array";else if(n.type==="ObjectExpression")i="object";else if(n.type==="ArrowFunctionExpression"||n.type==="FunctionExpression"||n.type==="FunctionDeclaration")i="function";let o={raw:r,kind:i};if(i==="literal"||i==="array"||i==="object"){let s=or(e,n);if(s.ok)o.value=s.value}return o}function or(e,t){if(!t||typeof t!=="object"||!("type"in t))return{ok:!1};if(t.type==="Literal"){let n=t.value;return typeof n==="bigint"?{ok:!1}:{ok:!0,value:n}}if(t.type==="UnaryExpression"){let n=t,r=n.argument;if(!r||typeof r!=="object"||!("type"in r)||r.type!=="Literal")return{ok:!1};let i=r.value;if(typeof i==="number"){if(n.operator==="-")return{ok:!0,value:-i};if(n.operator==="+")return{ok:!0,value:i}}if(typeof i==="boolean"&&n.operator==="!")return{ok:!0,value:!i};return{ok:!1}}if(t.type==="TemplateLiteral"){let n=t;if(n.expressions.length>0||n.quasis.length!==1)return{ok:!1};return{ok:!0,value:n.quasis[0].value.cooked??n.quasis[0].value.raw}}if(t.type==="ArrayExpression"){let n=t,r=[];for(let i of n.elements){if(!i)return{ok:!1};let o=or(e,i);if(!o.ok)return{ok:!1};r.push(o.value)}return{ok:!0,value:r}}if(t.type==="ObjectExpression"){let n=t,r={};for(let i of n.properties){if(i.type!=="Property"||i.computed)return{ok:!1};let o=e.getPropertyName(i.key);if(!o)return{ok:!1};let s=or(e,i.value);if(!s.ok)return{ok:!1};r[o]=s.value}return{ok:!0,value:r}}return{ok:!1}}function Qc(e,t,n,r){if(!xe(n))return null;let i=Ut(e,n.name);if(Je(i))return Qi(e,t,i,r).properties;let o=t.findVariableTypeAndDescription(n.name);if(!o)return null;let s=gn(o.type);if(!s)return null;return s.map((p)=>({name:p.name,type:p.type,optional:p.optional}))}function Qi(e,t,n,r){let i=[],o=!1;for(let s of n.properties){if(s.type==="SpreadElement"){let g=Qc(e,t,s.argument,r);if(g)i.push(...g);else o=!0,oe(e,"spread-unresolved",r,`Context "${r}" spreads a value sveld can't resolve; its shape is widened to "Record<string, any>".`,se(e,s));continue}if(s.type!=="Property")continue;let p=t.getPropertyName(s.key);if(!p)continue;let l="any",h,d;if(xe(s.value)){let g=s.value.name,b=t.findVariableTypeAndDescription(g);if(b)l=b.type,h=b.description,d=b.internal;else oe(e,"context-any-type",p,`Context "${r}" property "${p}" has no type annotation; defaulted to "any".`,se(e,s))}else if(s.value&&typeof s.value==="object"&&"type"in s.value&&(s.value.type==="ArrowFunctionExpression"||s.value.type==="FunctionExpression"))l=`(${s.value.params?.map((E)=>{if(xe(E))return`${E.name||"arg"}: any`;return"arg: any"}).join(", ")||""}) => any`;else if(pt(s.value))l=s.value.value==null?"null":typeof s.value.value;i.push({name:p,type:l,description:h,optional:!1,...d?{internal:!0}:{}})}return{properties:i,hasUnresolvedSpread:o}}var Zc=/[-_.:/\s]+/;function cr(e){return`${e.split(Zc).map((r)=>r.charAt(0).toUpperCase()+r.slice(1)).join("")}Context`}function Ji(e,t,n,r){if(!n||typeof n!=="object"||!("type"in n))return null;if(n.type==="ObjectExpression"){if(!Je(n))return null;let{properties:i,hasUnresolvedSpread:o}=Qi(e,t,n,r);return{key:r,typeName:cr(r),properties:i,description:void 0,...o?{hasUnresolvedSpread:o}:{}}}else if(xe(n)){let i=n.name,o=t.findVariableTypeAndDescription(i);if(o)return{key:r,typeName:cr(r),properties:[{name:i,type:o.type,description:o.description,optional:!1}],description:void 0,...o.internal?{internal:!0}:{}};return oe(e,"context-any-type",i,`Context "${r}" variable "${i}" has no type annotation; defaulted to "any".`,se(e,n)),{key:r,typeName:cr(r),properties:[{name:i,type:"any",description:void 0,optional:!1}]}}return null}function Yi(e){let t=e.callee;if(!t||typeof t!=="object"||!("type"in t))return null;let n=t.type==="Identifier"&&t.name==="Symbol",r=t.type==="MemberExpression"&&!t.computed&&t.object.type==="Identifier"&&t.object.name==="Symbol"&&t.property.type==="Identifier"&&t.property.name==="for";if(!n&&!r)return null;let i=e.arguments[0];if(!i||typeof i!=="object"||!("type"in i))return"";if(i.type==="Literal"&&typeof i.value==="string")return i.value;if(i.type==="TemplateLiteral"&&i.quasis?.length===1)return i.quasis[0].value.cooked??"";return""}function Zi(e,t,n=0){if(!t||typeof t!=="object"||!("type"in t))return{kind:"unresolved"};let r=t;if(r.type==="Literal"||r.type==="TemplateLiteral"){let i=Bi(r);return i==null?{kind:"unresolved"}:{kind:"resolved",key:i}}if(r.type==="CallExpression"||r.type==="NewExpression"){let i=Yi(r);return i==null?{kind:"unresolved"}:{kind:"resolved",key:i}}if(r.type==="Identifier"){if(n>=5)return{kind:"unresolved"};let i=Ut(e,r.name);if(i&&typeof i==="object"&&"type"in i){let s=i;if((s.type==="CallExpression"||s.type==="NewExpression")&&Yi(s)==="")return{kind:"resolved",key:r.name};return Zi(e,s,n+1)}let o=e.valueImportBindingsByLocalName.get(r.name);if(o)return{kind:"pending",importSource:o.source,importedName:o.importedName};return{kind:"unresolved"}}return{kind:"unresolved"}}function es(e,t,n,r){if(!n||typeof n!=="object"||!("type"in n)||n.type!=="CallExpression")return;let i=n,o=i.arguments[0];if(!o)return;let s=Zi(e,o);if(s.kind==="unresolved"||s.kind==="resolved"&&!s.key){let g=nt(e,o)??"";oe(e,"context-key-unresolved",g,`setContext key \`${g}\` isn't a string literal, const-bound string, Symbol(), or imported \`export const\` string; the context is skipped.`,se(e,n));return}let p=i.arguments[1];if(!p)return;let l=se(e,n);if(s.kind==="pending"){let g=Ji(e,t,p,s.importedName);if(g)e.pendingContextKeyCandidates.push({importSource:s.importSource,importedName:s.importedName,properties:g.properties,description:g.description,source:l});return}let h=s.key,d=Ji(e,t,p,h);if(!d)return;if(e.contexts.has(h)){oe(e,"context-duplicate-key",h,`setContext("${h}", ...) was called more than once; only the first call's shape is used.`,l);return}e.contexts.set(h,{...d,source:l})}var ep=new Set(["Component","SvelteComponent","SvelteSelf"]),tp=new Set(["RegularElement","SvelteElement"]);function Gt(e){return ep.has(e)}function Wt(e){return tp.has(e)}var np=/\n/g;function ts(e,t){if(!t||typeof t!=="object"||!("type"in t))return;if(Je(t))return rs(e,t);if(t.type==="ArrayExpression")return is(e,t);return}function ns(e,t){if(!t||typeof t!=="object"||!("type"in t))return"any";if(xe(t))return e.findVariableTypeAndDescription(t.name)?.type??"any";if(pt(t)){let n=t.value;return n===null?"null":typeof n}if(Je(t))return rs(e,t);if(t.type==="ArrayExpression")return is(e,t);return"any"}function rs(e,t){let n=[];for(let r of t.properties){if(r.type!=="Property"||r.computed)continue;let i=e.getPropertyName(r.key);if(!i)continue;n.push({name:i,type:ns(e,r.value)})}return bn(n)}function is(e,t){let n=new Set(t.elements.filter((r)=>r!=null).map((r)=>ns(e,r)));if(n.size===0)return"any[]";if(n.size===1)return`${[...n][0]}[]`;return`(${[...n].join(" | ")})[]`}function ss(e,t){for(let[n,r]of e.arguments.entries()){if(xe(r)&&r.name===t)return{argumentIndex:n};if(!Je(r))continue;for(let i of r.properties){if(i.type!=="Property"||!xe(i.value))continue;if(i.value.name!==t)continue;let o=!i.computed&&xe(i.key)?i.key.name:void 0;return{argumentIndex:n,property:o??""}}}return}function as(e,t){let n=e.name.localeCompare(t.name);if(n!==0)return n;let r=e.type.localeCompare(t.type);if(r!==0)return r;if(e.type==="forwarded"&&t.type==="forwarded"){let i=e.element.localeCompare(t.element);if(i!==0)return i}return(e.detail??"").localeCompare(t.detail??"")}function pr(e){return typeof e==="string"?JSON.stringify(e):String(e)}function dt(e,{name:t,detail:n,has_argument:r,description:i,deprecated:o,tags:s,internal:p,source:l}){if(t===void 0)return;let h=!r&&!n?"null":je(n),d=i,g=e.events.get(t);if(g?.type==="forwarded")e.events.set(t,{type:"dispatched",name:t,detail:h,description:d||g.description,deprecated:o??g.deprecated,tags:s??g.tags,...p||g.internal?{internal:!0}:{},source:l||g.source});else if(g){let b=g.tags??s;e.events.set(t,{...g,detail:g.detail===void 0?h:g.detail,description:g.description||d,deprecated:g.deprecated??o,tags:b,...g.internal||p?{internal:!0}:{},source:l||g.source})}else e.events.set(t,{type:"dispatched",name:t,detail:h,description:d,deprecated:o,tags:s,...p?{internal:!0}:{},source:l})}function os(e,t){let n=t.arguments[0],r=Zn(n,"CustomEvent");if(!r&&!Zn(n,"Event"))return;let i=n.arguments[0],o=pt(i)?i.value:void 0;if(o==null)return;let s=r?n.arguments[1]:void 0,p=!1,l;if(Je(s)){let h=s.properties.find((d)=>d.type==="Property"&&xe(d.key)&&d.key.name==="detail");if(h?.type==="Property")p=!0,l=pt(h.value)?h.value.value:void 0}return dt(e,{name:String(o),detail:l==null?"":pr(l),has_argument:p,source:se(e,t)}),String(o)}function bn(e,t,n=!1){if(e.length===0)return"null";let r=e.map(({name:i,type:o,description:s,optional:p,default:l})=>{let h=p?"?":"",d=s||"";if(l&&d)d=`${d} @default ${l}`;else if(l)d=`@default ${l}`;if(d){if(n)return`${d.includes(`
8
+ `,n+1)}return e.sourceLineStartOffsetsCache=t,t}function Ds(e,t){if(!e.source||t<0||t>e.source.length)return;let n=Qp(e),r=e.sourceLineHint;if(r!==void 0)for(let s=r;s<=r+1&&s<n.length;s++){let c=n[s],l=n[s+1]??Number.POSITIVE_INFINITY;if(t>=c&&t<l)return e.sourceLineHint=s,{line:s+1,column:t-c}}let i=0,o=n.length-1;while(i<=o){let s=i+o>>>1,c=n[s],l=n[s+1]??Number.POSITIVE_INFINITY;if(t<c)o=s-1;else if(t>=l)i=s+1;else return e.sourceLineHint=s,{line:s+1,column:t-c}}return}function Hn(e,t,n){if(t===void 0||n===void 0||n<t)return;let r=Ds(e,t),i=Ds(e,n);if(!r||!i)return;return{start:r,end:i}}function oe(e,t){if(!t||typeof t!=="object")return;let n="start"in t&&typeof t.start==="number"?t.start:void 0,r="end"in t&&typeof t.end==="number"?t.end:void 0;return Hn(e,n,r)}function He(e,t){if(!t||t.length===0)return;let n=[...t];while(n.length>1){let l=n[n.length-1];if(l.tag!==void 0||!l.raw.trim().endsWith("*/"))break;n.pop()}let r=n[0],i=r.raw.indexOf(`@${r.tag??""}`),o=r.start+Math.max(i,0),s=n[n.length-1],c=s.start+s.raw.length;return Hn(e,o,c)}function le(e,t,n){return e.source?.slice(t,n)}function qe(e,t){if(!t||typeof t!=="object")return;let n="start"in t&&typeof t.start==="number"?t.start:void 0,r="end"in t&&typeof t.end==="number"?t.end:void 0;if(n===void 0||r===void 0)return;return le(e,n,r)?.replace(jn," ")}var Zp=/\*\//g;function ft(e){return e.replace(Zp,"*\\/")}function Ct(e){return e.map((t)=>`${t.name}${t.optional?"?":""}: ${t.type}`).join(", ")}function ze(e){return e===void 0||e===""?void 0:e}var el=new Intl.Collator("en");function ht(e,t){return el.compare(e,t)}var tl=/[A-Za-z_$][\w$]*/g;function nl(e,t){if(!t)return!1;let n=new Set(t[0].split(",").map((r)=>r.trim()));for(let[r]of e.matchAll(tl))if(n.has(r))return!0;return!1}function Rr(e,t){if(t===void 0)return;return e.runesPropsDeclarationMetadataByDeclaratorStart.get(t)}function _s(e,t,n){return Rr(e,t)?.props.get(n)}function Is(e){if(!e||typeof e!=="object"||!("type"in e))return;if(e.type==="Identifier"&&"name"in e&&typeof e.name==="string")return e.name;if(e.type==="TSQualifiedName"&&"right"in e&&e.right&&typeof e.right==="object"&&"name"in e.right&&typeof e.right.name==="string")return e.right.name;return}function Ls(e){if(!e||typeof e!=="object"||!("type"in e))return;if(e.type==="Identifier"&&"name"in e&&typeof e.name==="string")return e.name;if(e.type==="TSQualifiedName"&&"left"in e&&e.left&&typeof e.left==="object")return Ls(e.left);return}function mt(e,t){let n=t?.start,r=t?.end;if(n===void 0||r===void 0)return;return le(e,n+1,r)?.trim()}function Lt(e,t){let n=t?.start,r=t?.end;if(n===void 0||r===void 0)return;return le(e,n,r)?.trim()}function Ie(e,t,n,r,i=new Set){if(!t?.type)return;switch(t.type){case"TSInterfaceDeclaration":for(let o of t.extends??[])Ie(e,{type:"TSTypeReference",typeName:o.expression,typeParameters:o.typeParameters},n,r,i);Ie(e,{type:"TSTypeLiteral",members:t.body?.body},n,r,i);return;case"TSTypeAliasDeclaration":case"TSParenthesizedType":case"TSTypeAnnotation":Ie(e,t.typeAnnotation,n,r,i);return;case"TSIntersectionType":case"TSUnionType":for(let o of t.types??[])Ie(e,o,n,r,i);return;case"TSTypeLiteral":for(let o of t.members??[]){if(o?.type!=="TSPropertySignature")continue;Ie(e,o.typeAnnotation?.typeAnnotation,n,r,i)}return;case"TSTypeReference":{let o=Ls(t.typeName);if(o){if(e.typeImportBindingsByLocalName.has(o)||e.valueImportBindingsByLocalName.has(o))n.add(o);let c=e.localTypeDeclarationsByName.get(o);if(c&&!i.has(o))r.add(o),i.add(o),Ie(e,c.node,n,r,i),i.delete(o)}let s=t.typeArguments??t.typeParameters;if(s&&typeof s==="object"){let c=s;for(let l of c.params??[])Ie(e,l,n,r,i)}return}case"TSArrayType":case"TSRestType":case"TSOptionalType":case"TSIndexedAccessType":case"TSTypeOperator":case"TSExpressionWithTypeArguments":case"TSTupleType":case"TSConditionalType":case"TSInferType":case"TSMappedType":case"TSFunctionType":case"TSConstructorType":case"TSTypeQuery":case"TSImportType":case"TSLiteralType":case"TSTypePredicate":case"TSNamedTupleMember":break;default:break}for(let o in t){let s=t[o];if(!s||typeof s!=="object")continue;if(Array.isArray(s)){for(let c of s){if(!c||typeof c!=="object"||!("type"in c))continue;Ie(e,c,n,r,i)}continue}if("type"in s)Ie(e,s,n,r,i)}}function rl(e,t){let n=new Map;for(let r of Array.from(t).sort()){let i=e.typeImportBindingsByLocalName.get(r),o=i?void 0:e.valueImportBindingsByLocalName.get(r),s=i??(o?{importedName:o.importedName,localName:o.localName,source:o.source,specifierType:"named"}:void 0);if(!s)continue;let c=n.get(s.source)??{default:[],named:[],namespace:[]};if(s.specifierType==="default")c.default.push(s.localName);else if(s.specifierType==="namespace")c.namespace.push(s.localName);else c.named.push({imported:s.importedName,local:s.localName});n.set(s.source,c)}return Array.from(n.entries()).sort(([r],[i])=>ht(r,i)).map(([r,i])=>{if(i.namespace.length>0)return i.namespace.map((l)=>`import type * as ${l} from "${r}";`).join(`
9
+ `);let o=i.named.map(({imported:l,local:u})=>{if(!l||l===u)return u;return`${l} as ${u}`}),s=i.default[0],c=o.length>0?`{ ${o.join(", ")} }`:"";if(s&&c)return`import type ${s}, ${c} from "${r}";`;if(s)return`import type ${s} from "${r}";`;return`import type ${c} from "${r}";`})}function Ae(e,t){if(t)e.additionalTypeDependencyNodes.push(t)}function il(e){if(!e.const)return;let t=e.id?.name;if(!t)return;let n=[];for(let r of e.members??[]){let i=r.initializer;if(i?.type!=="Literal")return;let o=i.value;if(typeof o==="string")n.push(JSON.stringify(o));else if(typeof o==="number")n.push(String(o));else return}if(n.length===0)return;return`type ${t} = ${n.join(" | ")};`}function Rs(e,t){let n=il(t);if(n)return n;if(t.start===void 0||t.end===void 0)return;let r=le(e,t.start,t.end)?.trim();return r?`declare ${r}`:void 0}function Mr(e,t){let n=[];for(let r of t.params??[]){let i=r.type==="TSParameterProperty"&&r.parameter?r.parameter:r;if(i.type==="RestElement"){Ae(e,i.typeAnnotation?.typeAnnotation),n.push({name:i.argument?.name??"rest",type:mt(e,i.typeAnnotation),optional:!1,rest:!0});continue}let o=i.type==="AssignmentPattern",s=o?i.left:i;Ae(e,s?.typeAnnotation?.typeAnnotation),n.push({name:s?.name??"arg",type:mt(e,s?.typeAnnotation),optional:o||i.optional===!0,rest:!1})}Ae(e,t.returnType?.typeAnnotation);for(let r of t.typeParameters?.params??[])Ae(e,r.constraint),Ae(e,r.default);return{params:n,returnType:mt(e,t.returnType),typeParameters:Lt(e,t.typeParameters)||void 0}}function Or(e,t){let{params:n,returnType:r,typeParameters:i}=Mr(e,t),o=n.map(({name:c,type:l,optional:u,rest:f})=>f?`...${c}: ${l??"any[]"}`:`${c}${u?"?":""}: ${l??"any"}`),s=r!==void 0||i!==void 0||n.some((c)=>c.type!==void 0);return{signature:`${i??""}(${o.join(", ")}) => ${r??"any"}`,hasAnnotations:s}}function Ms(e){let t=e.pendingCallDefaultCandidates.length>0?e.pendingCallDefaultCandidates.slice():void 0,n=e.pendingConstDefaultCandidates.length>0?e.pendingConstDefaultCandidates.slice():void 0,r=e.pendingContextKeyCandidates.length>0?e.pendingContextKeyCandidates.slice():void 0,i=e.pendingDispatchEscapeCandidates.length>0?e.pendingDispatchEscapeCandidates.slice():void 0,o=e.deferredEventNoSourceDiagnostics.length>0?e.deferredEventNoSourceDiagnostics.slice():void 0,s=i&&e.untypedJsDocEventNames.size>0?Array.from(e.untypedJsDocEventNames):void 0,c={...t?{pendingCallDefaultCandidates:t}:{},...n?{pendingConstDefaultCandidates:n}:{},...r?{pendingContextKeyCandidates:r}:{},...i?{pendingDispatchEscapeCandidates:i}:{},...o?{deferredEventNoSourceDiagnostics:o}:{},...s?{untypedJsDocEventNames:s}:{}},l=t!==void 0||n!==void 0||r!==void 0||i!==void 0,u=new Set,f=new Set;for(let D of e.additionalTypeDependencyNodes)Ie(e,D,u,f);let y=Array.from(e.localTypeDeclarationsByName.values()).filter((D)=>D.exported).sort((D,j)=>D.start-j.start);for(let D of y)Ie(e,D.node,u,f);let g=y.map((D)=>`export ${D.code}`),b=e.typedRunesPropsDeclarations.length===1?e.typedRunesPropsDeclarations[0]:void 0,P=b?.canonicalType;if(b&&P){for(let D of b.referencedImportedTypes)u.add(D);for(let D of b.referencedLocalTypes)f.add(D)}if(!P&&u.size===0&&f.size===0&&g.length===0)return l?{canonicalPropNames:[],localTypeDeclarations:[],typeImportStatements:[],...c}:void 0;let N=Array.from(f).map((D)=>e.localTypeDeclarationsByName.get(D)).filter((D)=>D!==void 0&&!D.exported).sort((D,j)=>D.start-j.start).map((D)=>D.code);return{...P?{canonicalPropsType:P}:{},canonicalPropNames:b&&P?Array.from(b.props.keys()).sort():[],localTypeDeclarations:N,...g.length>0?{moduleTypeDeclarations:g}:{},typeImportStatements:rl(e,u),referencesComponentGenerics:P?nl(P,e.generics):!1,...c}}function qn(e,t){let n=t.source?.value;if(typeof n!=="string"||t.importKind==="type")return;for(let r of t.specifiers??[]){if(r.type!=="ImportSpecifier"||r.importKind==="type")continue;let i=r.local?.name;if(!i)continue;let o=r.imported?.name??(typeof r.imported?.value==="string"?r.imported.value:i);e.valueImportBindingsByLocalName.set(i,{localName:i,importedName:o,source:n})}}function ln(e){return[e.importedName,...e.members??[]].join(".")}function Br(e,t){let n=[],r=t;while(r.type==="MemberExpression"){if(r.computed||!ye(r.property))return;n.unshift(r.property.name),r=r.object}if(!ye(r))return;let i=r.name,o=(c,l,u)=>u.length>0?{source:c,importedName:l,members:u}:{source:c,importedName:l},s=e.valueImportBindingsByLocalName.get(i);if(s)return o(s.source,s.importedName,n);for(let c of[e.parsed?.instance,e.parsed?.module])for(let l of(c?St(c):void 0)??[]){let u=l,f=u.source?.value;if(u.type!=="ImportDeclaration"||u.importKind==="type"||typeof f!=="string")continue;let y=u.specifiers?.find((g)=>g.local?.name===i);if(y?.type==="ImportDefaultSpecifier")return o(f,"default",n);if(y?.type==="ImportNamespaceSpecifier"&&n.length>0)return o(f,n[0],n.slice(1))}return}function Un(e,t){if(!Wt(t))return;return Br(e,t)}function St(e){let t=e,n=t.type==="Program"?t.body:t.content?.body??t.body;return Array.isArray(n)?n:void 0}function Os(e){let t=new Map,n=e?St(e):void 0;if(!n)return t;for(let r of n){let i=r;if(i.type!=="ImportDeclaration"||i.importKind==="type")continue;let o=i.source?.value;if(typeof o!=="string")continue;for(let s of i.specifiers??[]){let c=s.local?.name;if(!c||s.importKind==="type")continue;let l;if(s.type==="ImportDefaultSpecifier")l="default";else if(s.type==="ImportNamespaceSpecifier")l="*";else l=s.imported?.name??String(s.imported?.value??c);t.set(c,{from:o,imported:l})}}return t}function Fr(e,t){if(!t)return;let n=St(t);if(!n)return;for(let r of n){let i=r;if(i.type==="ImportDeclaration"){qn(e,i);continue}let o=i.type==="ExportNamedDeclaration"&&i.declaration?i.declaration:i;if(o.type==="FunctionDeclaration"){let s=o;if(s.id?.name)e.funcDecls.set(s.id.name,s)}}}function un(e,t,n,r){if(ze(n)===void 0)return;if(e.trackPropLocalName(n),t.props.has(n)){let i=t.props.get(n);t.props.set(n,{...i,...r})}else t.props.set(n,r)}function dn(e,t,n,r){if(t.pendingCallDefault)e.pendingCallDefaultCandidates.push({propName:n,location:r,...t.pendingCallDefault});if(t.pendingConstDefault)e.pendingConstDefaultCandidates.push({propName:n,location:r,...t.pendingConstDefault})}var sl=/[^\S\r\n]*[\r\n]\s*/g;function pt(e,t,n,r=0){let i,o,s=!1;if(!n||typeof n!=="object"||!("type"in n))return{value:i,type:o,isFunction:s};let c=$s(e,t,n);if(n.type==="ObjectExpression"||n.type==="BinaryExpression"||n.type==="ArrayExpression"||n.type==="ArrowFunctionExpression"||n.type==="FunctionExpression"){let l=n;if("start"in l&&"end"in l&&typeof l.start==="number"&&typeof l.end==="number")i=le(t,l.start,l.end)?.replace(jn," ");if(s=n.type==="ArrowFunctionExpression"||n.type==="FunctionExpression",n.type==="BinaryExpression")o=Je(e,t,n,r);else if(n.type==="ObjectExpression"||n.type==="ArrayExpression"){let{start:u,end:f}=l;o=$r(n)?cl(t,u,f,i):void 0}if(n.type==="ArrowFunctionExpression"||n.type==="FunctionExpression")o=js(n),i=Fs(t,n)}else if(n.type==="UnaryExpression"){let l=n;if("start"in l&&"end"in l&&typeof l.start==="number"&&typeof l.end==="number")i=le(t,l.start,l.end);o=Je(e,t,l,r)}else if(n.type==="LogicalExpression"||n.type==="ConditionalExpression"||n.type==="SequenceExpression"){let{start:l,end:u}=n,f=l===void 0||u===void 0?void 0:le(t,l,u)?.replace(sl," ");i=f!==void 0&&n.type==="SequenceExpression"?`(${f})`:f,o=Je(e,t,n,r)}else if(n.type==="NewExpression"){let l=n;if("start"in l&&"end"in l&&typeof l.start==="number"&&typeof l.end==="number")i=le(t,l.start,l.end);if(l.callee&&typeof l.callee==="object"&&"type"in l.callee&&l.callee.type==="Identifier"){let u=l.callee.name;if(u==="Date")o="Date";else if(u==="Map")o="Map<any, any>";else if(u==="Set")o="Set<any>";else if(u==="WeakMap")o="WeakMap<object, any>";else if(u==="WeakSet")o="WeakSet<object>";else if(u==="Array")o="any[]";else if(u==="RegExp"||u==="Regexp")o="RegExp";else if(u==="Error")o="Error";else o=u}}else if(n.type==="CallExpression"){let l=n;if("start"in l&&"end"in l&&typeof l.start==="number"&&typeof l.end==="number")i=le(t,l.start,l.end);let u=l.callee,f=u&&typeof u==="object"&&"type"in u&&u.type==="Identifier"?u.name:void 0;if((f==="$derived"||f==="$state")&&l.arguments.length===1&&r<5)return{...pt(e,t,l.arguments[0],r+1),value:i,defaultValue:c};if(f){let y=ll(e,t,f);if(y)return{value:i,type:void 0,isFunction:!1,defaultValue:c,resolvedType:y};if(t.funcDecls.has(f)||ul(t,f))return{value:i,type:void 0,isFunction:!1,defaultValue:c,pendingCallDefault:{calleeName:f}};let g=t.valueImportBindingsByLocalName.get(f);if(g)return{value:i,type:void 0,isFunction:!1,defaultValue:c,pendingCallDefault:{calleeName:f,importSource:g.source,importedName:g.importedName}}}return{value:i,type:void 0,isFunction:!1,defaultValue:c,pendingCallDefault:{calleeName:f??pl(t,u)}}}else if(n.type==="Identifier"){let l=n;if(r<5){let f=Wn(t,l.name);if(f){let y=pt(e,t,f,r+1),g=e.resolveLocalVarJSDoc(l.name);return{...y,resolvedType:g?.type??y.resolvedType,resolvedDescription:g?.description??y.resolvedDescription,resolvedParams:g?.params??y.resolvedParams,resolvedReturnType:g?.returnType??y.resolvedReturnType}}if(t.funcDecls.has(l.name)){let y=e.resolveLocalVarJSDoc(l.name),g=t.funcDecls.get(l.name);return{value:g?Fs(t,g):void 0,type:void 0,isFunction:!0,defaultValue:g?$s(e,t,g):void 0,resolvedType:y?.type??ml(y,g),resolvedDescription:y?.description,resolvedParams:y?.params,resolvedReturnType:y?.returnType}}}if("start"in l&&"end"in l&&typeof l.start==="number"&&typeof l.end==="number")i=le(t,l.start,l.end);let u=t.valueImportBindingsByLocalName.get(l.name);if(u)return{value:i,type:o,isFunction:s,defaultValue:c,pendingConstDefault:{importSource:u.source,importedName:u.importedName}}}else if(n.type==="MemberExpression"){let l=n;if("start"in l&&"end"in l&&typeof l.start==="number"&&typeof l.end==="number")i=le(t,l.start,l.end);if(e.isNumericConstant(n))o="number";let u=Un(t,n);if(u)return{value:i,type:o,isFunction:s,defaultValue:c,pendingConstDefault:{importSource:u.source,importedName:u.importedName,...u.members?{members:u.members}:{}}}}else if(n.type==="TemplateLiteral"){let l=n;if("start"in l&&"end"in l&&typeof l.start==="number"&&typeof l.end==="number")i=le(t,l.start,l.end);o="string"}else if("raw"in n&&typeof n.raw==="string")i=n.raw,o=fn(n);return{value:i,type:o,isFunction:s,defaultValue:c}}function fn(e){if("regex"in e&&e.regex)return"RegExp";if("bigint"in e&&e.bigint)return"bigint";return e.value==null?void 0:typeof e.value}var al=new Set(["-","*","/","%","**","<<",">>",">>>","&","|","^"]),ol=new Set(["==","!=","===","!==","<","<=",">",">=","in","instanceof"]);function Je(e,t,n,r){if(!n||typeof n!=="object"||!("type"in n))return;switch(n.type){case"UnaryExpression":{let i=n;if(i.operator==="!"||i.operator==="delete")return"boolean";if(i.operator==="typeof")return"string";if(i.operator==="void")return;if(i.operator==="+")return"number";return Je(e,t,i.argument,r)==="bigint"?"bigint":"number"}case"BinaryExpression":{let i=n;if(ol.has(i.operator))return"boolean";let o=Je(e,t,i.left,r),s=Je(e,t,i.right,r);if(o==="bigint"&&s==="bigint")return"bigint";if(al.has(i.operator))return"number";if(i.operator!=="+")return;if(o==="string"||s==="string")return"string";if(o==="number"&&s==="number")return"number";return}case"LogicalExpression":{let i=n;return Bs([Je(e,t,i.left,r),Je(e,t,i.right,r)])}case"ConditionalExpression":{let i=n;return Bs([Je(e,t,i.consequent,r),Je(e,t,i.alternate,r)])}case"SequenceExpression":{let i=n.expressions;return Je(e,t,i[i.length-1],r)}case"Identifier":{let i=n.name;if(i==="NaN"||i==="Infinity")return"number";if(i==="undefined")return;let o=e.findVariableTypeAndDescription(i)?.type;if(o)return o;if(r>=5)return;return Je(e,t,Wn(t,i),r+1)}default:{if(r>=5)return;let i=pt(e,t,n,r+1);return i.type??i.resolvedType}}}function Bs(e){let t=new Set;for(let n of e){if(n===void 0)return;t.add(n.includes("=>")?`(${n})`:n)}return t.size===1?e[0]:[...t].join(" | ")}function cl(e,t,n,r){if(r===void 0||t===void 0||n===void 0)return r;let i=e.parsed?.comments??[],o="",s=t;for(let c of i){if(c.start<t||c.end>n)continue;o+=le(e,s,c.start)??"",s=c.end}if(s===t)return r;return o+=le(e,s,n)??"",o.replace(jn," ")}function $r(e){if(!e||typeof e!=="object"||!("type"in e))return!1;switch(e.type){case"Literal":return!(("regex"in e)&&e.regex);case"TemplateLiteral":return e.expressions.length===0;case"Identifier":return e.name==="undefined";case"UnaryExpression":{let t=e,n=t.argument;return t.operator==="-"&&n?.type==="Literal"&&(typeof n.value==="number"||typeof n.value==="bigint")}case"ArrayExpression":return e.elements.every((t)=>t!==null&&$r(t));case"ObjectExpression":return e.properties.every((t)=>t.type==="Property"&&t.kind==="init"&&!t.computed&&!t.method&&!t.shorthand&&(t.key.type==="Identifier"||t.key.type==="Literal")&&$r(t.value));default:return!1}}function Gn(e,t,n){let r=Wn(t,n);if(!r||typeof r!=="object"||!("type"in r))return;if(r.type==="CallExpression"){let i=r,o=qe(t,i.callee);if(o==="$state"||o==="$state.raw"||o==="$derived"){let s=i.typeArguments?.params?.[0];if(s)return Ae(t,s),qe(t,s);if(o==="$state.raw")return pt(e,t,i.arguments[0],1).type}}return pt(e,t,r).type}function Wn(e,t){for(let n of e.vars)for(let r of n.declarations)if(r.id&&typeof r.id==="object"&&"type"in r.id&&r.id.type==="Identifier"&&"name"in r.id&&r.id.name===t&&r.init)return r.init;return}function Kt(e,t){for(let n of e.vars){if(n.kind!=="const")continue;for(let r of n.declarations)if(r.id&&typeof r.id==="object"&&"type"in r.id&&r.id.type==="Identifier"&&"name"in r.id&&r.id.name===t&&r.init)return r.init}return}function pl(e,t){if(t&&typeof t==="object"&&"start"in t&&"end"in t&&typeof t.start==="number"&&typeof t.end==="number")return le(e,t.start,t.end)??"call";return"call"}function ll(e,t,n){let r=e.resolveLocalVarJSDoc(n);if(r?.returnType)return r.returnType;let i=t.funcDecls.get(n)??Vs(t,n);if(!i)return;let o=hl(t,i);if(o)return o;let s=dl(t,n);if(s)return s;let c=Hs(i);return c==="any"?void 0:c}function ul(e,t){return Vs(e,t)!==void 0}function Vs(e,t){let n=Wn(e,t);if(!n||typeof n!=="object"||!("type"in n))return;if(n.type==="ArrowFunctionExpression"||n.type==="FunctionExpression")return n;return}function dl(e,t){for(let n of e.vars)for(let r of n.declarations){let i=r.id;if(!i||typeof i!=="object"||!("type"in i)||i.type!=="Identifier"||!("name"in i)||i.name!==t)continue;let o=i.typeAnnotation;if(o?.type!=="TSTypeAnnotation")return;let s=o.typeAnnotation;if(!s||typeof s.start!=="number"||typeof s.end!=="number")return;return fl(le(e,s.start,s.end))}return}function fl(e){if(!e)return;let t=e.lastIndexOf("=>");if(t===-1)return;return e.slice(t+2).trim()||void 0}function hl(e,t){let n=t.returnType;if(n?.type!=="TSTypeAnnotation")return;let r=n.typeAnnotation;if(!r||typeof r.start!=="number"||typeof r.end!=="number")return;return le(e,r.start,r.end)}function ml(e,t){let n=e?.returnType??"any",r=e?.params;if(r&&r.length>0)return`(${Ct(r)}) => ${n}`;if(e?.returnType)return`() => ${n}`;if(t)return js(t);return"(...args: any[]) => any"}function js(e){return`(${yl(e)}) => ${Hs(e)}`}function yl(e){let t=e.params;if(!Array.isArray(t)||t.length===0)return"...args: any[]";let n=[];for(let r of t)if(r&&typeof r==="object"&&"type"in r&&r.type==="Identifier"&&"name"in r&&typeof r.name==="string")n.push(`${r.name}: any`);else return"...args: any[]";return n.join(", ")}function Hs(e){if(e.async||e.generator)return"any";let t=e.body,n;if(t&&typeof t==="object"&&"type"in t&&t.type==="BlockStatement"){if(n=gl(t),n.length===0)return"any"}else n=[t];let r=null;for(let i of n){let o=xl(i);if(!o)return"any";if(r===null)r=o;else if(r!==o)return"any"}return r??"any"}function gl(e){let t=[];return Vr(e,t),t}function Vr(e,t){if(!e||typeof e!=="object")return;let n=e;if(typeof n.type!=="string")return;if(n.type==="FunctionDeclaration"||n.type==="FunctionExpression"||n.type==="ArrowFunctionExpression")return;if(n.type==="ReturnStatement")t.push(n.argument??null);for(let r in n){if(r==="leadingComments")continue;let i=n[r];if(!i||typeof i!=="object")continue;if(Array.isArray(i))for(let o=0;o<i.length;o++)Vr(i[o],t);else Vr(i,t)}}function xl(e){if(!e||typeof e!=="object"||!("type"in e))return null;switch(e.type){case"Literal":{let t=e.value;if(typeof t==="string")return"string";if(typeof t==="number")return"number";if(typeof t==="boolean")return"boolean";return null}case"TemplateLiteral":return"string";case"CallExpression":{let t=e.callee;if(t&&typeof t==="object"&&"type"in t&&t.type==="Identifier"){let n=t.name;if(n==="String")return"string";if(n==="Number")return"number";if(n==="Boolean")return"boolean"}return null}default:return null}}function qs(e){if(ct(e,"$bindable"))return{init:e.arguments[0],bindable:!0};return{init:e,bindable:!1}}function bl(e,t){let n=t.params;if(!Array.isArray(n)||n.length===0)return"";let r=n[0],i=n[n.length-1];if(typeof r.start!=="number"||typeof i.end!=="number")return"";return le(e,r.start,i.end)??""}function Fs(e,t){if(t.generator)return;let n=t.body;if(!n||typeof n!=="object"||!("type"in n))return;let r=bl(e,t),i=t.async?"async ":"",o=(c,l)=>c&&typeof c==="object"&&("type"in c)&&c.type==="ObjectExpression"?`(${l})`:l;if(n.type!=="BlockStatement"){let c=qe(e,n);return c===void 0?void 0:`${i}(${r}) => ${o(n,c)}`}let s=n.body;if(s.length===0)return`${i}(${r}) => {}`;if(s.length===1){let c=s[0];if(c&&typeof c==="object"&&"type"in c&&c.type==="ReturnStatement"){let l=c.argument;if(l){let u=qe(e,l);if(u!==void 0)return`${i}(${r}) => ${o(l,u)}`}}}return}function $s(e,t,n){let r=qe(t,n);if(!r||!n||typeof n!=="object"||!("type"in n))return;let i="expression";if(n.type==="Literal"||n.type==="UnaryExpression")i="literal";else if(n.type==="TemplateLiteral")i=n.expressions.length===0?"literal":"expression";else if(n.type==="ArrayExpression")i="array";else if(n.type==="ObjectExpression")i="object";else if(n.type==="ArrowFunctionExpression"||n.type==="FunctionExpression"||n.type==="FunctionDeclaration")i="function";let o={raw:r,kind:i};if(i==="literal"||i==="array"||i==="object"){let s=jr(e,n);if(s.ok)o.value=s.value}return o}function jr(e,t){if(!t||typeof t!=="object"||!("type"in t))return{ok:!1};if(t.type==="Literal"){let n=t.value;return typeof n==="bigint"||"regex"in t?{ok:!1}:{ok:!0,value:n}}if(t.type==="UnaryExpression"){let n=t,r=n.argument;if(!r||typeof r!=="object"||!("type"in r)||r.type!=="Literal")return{ok:!1};let i=r.value;if(typeof i==="number"){if(n.operator==="-")return{ok:!0,value:-i};if(n.operator==="+")return{ok:!0,value:i}}if(typeof i==="boolean"&&n.operator==="!")return{ok:!0,value:!i};return{ok:!1}}if(t.type==="TemplateLiteral"){let n=t;if(n.expressions.length>0||n.quasis.length!==1)return{ok:!1};return{ok:!0,value:n.quasis[0].value.cooked??n.quasis[0].value.raw}}if(t.type==="ArrayExpression"){let n=t,r=[];for(let i of n.elements){if(!i)return{ok:!1};let o=jr(e,i);if(!o.ok)return{ok:!1};r.push(o.value)}return{ok:!0,value:r}}if(t.type==="ObjectExpression"){let n=t,r={};for(let i of n.properties){if(i.type!=="Property"||i.computed)return{ok:!1};let o=e.getPropertyName(i.key);if(!o)return{ok:!1};let s=jr(e,i.value);if(!s.ok)return{ok:!1};r[o]=s.value}return{ok:!0,value:r}}return{ok:!1}}function De(e,t,n){if(!t||e.has(t))return;e.set(t,n)}function hn(e,t){for(let n=e.activeScopes.length-1;n>=0;n-=1){let r=e.activeScopes[n]?.get(t);if(!r)continue;return r.kind==="prop"?r.publicPropName:void 0}return}function mn(e,t){for(let n=e.activeScopes.length-1;n>=0;n-=1){let r=e.activeScopes[n];if(r===e.componentScope)return!1;if(r?.has(t))return!0}return!1}function Kn(e,t){let n=t;while(Wt(n))n=n.object;return ye(n)&&mn(e,n.name)}function ge(e,t=new Set){if(!e||typeof e!=="object"||!("type"in e))return t;switch(e.type){case"Identifier":t.add(e.name);break;case"AssignmentPattern":ge(e.left,t);break;case"ArrayPattern":for(let n of e.elements)ge(n??void 0,t);break;case"ObjectPattern":for(let n of e.properties)if(n.type==="Property")ge(n.value,t);else if(n.type==="RestElement")ge(n.argument,t);break;case"RestElement":ge(e.argument,t);break}return t}function qr(e,t){if(!t||typeof t!=="object"||!("type"in t))return;if(t.type==="Identifier"){let r=hn(e,t.name);if(r)e.reactive_vars.add(r);return}let n=ge(t);for(let r of n){let i=hn(e,r);if(i)e.reactive_vars.add(i)}}function yn(e){if(!e||typeof e!=="object"||!("type"in e))return!1;switch(String(e.type)){case"BlockStatement":case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"CatchClause":case"EachBlock":case"AwaitBlock":return!0;default:return!1}}function Us(e){if(!e||typeof e!=="object"||!("type"in e))return!1;let t=String(e.type);return t==="FunctionDeclaration"||t==="FunctionExpression"||t==="ArrowFunctionExpression"}function Tl(e,t){let n=e.scopeDeclarations.get(t);if(!n)n=new Map,e.scopeDeclarations.set(t,n);return n}function El(e,t,n){let r=[];if(n.id.type==="Identifier")return r.push({kind:"local",name:n.id.name}),r;if(n.id.type!=="ObjectPattern")return r;for(let i of n.id.properties){if(i.type==="RestElement"){if(i.argument.type==="Identifier")r.push({kind:"local",name:i.argument.name});continue}if(i.computed)continue;let o=e.getPropertyName(i.key);if(!o)continue;let s;if(i.value.type==="Identifier")s=i.value.name;else if(i.value.type==="AssignmentPattern"&&i.value.left.type==="Identifier")s=i.value.left.name;if(!s)continue;r.push({kind:"prop",name:s,publicPropName:o})}return r}function Hr(e,t,n,r,i){if(!Cs(t))return;let o=i?.allowRunesProps??!1,s=i?.forceProp??!1,c=t;for(let l of c.declarations){if(o&&ct(Et(l.init),"$props")){for(let y of El(e,c,l))De(y.kind==="prop"?n:r,y.name,y.kind==="prop"?{kind:"prop",publicPropName:y.publicPropName}:{kind:"local"});continue}let u=c.kind==="var"?r:n,f=s?"prop":"local";for(let y of ge(l.id))De(u,y,f==="prop"?{kind:"prop",publicPropName:y}:{kind:"local"})}}function Cl(e,t){if("id"in e&&e.id&&typeof e.id==="object"&&"name"in e.id&&typeof e.id.name==="string")De(t,e.id.name,{kind:"local"});for(let n of e.params)for(let r of ge(n))De(t,r,{kind:"local"})}function Sl(e,t,n,r){if(!Array.isArray(t))return;for(let i of t){if(!i||typeof i!=="object"||!("type"in i))continue;switch(i.type){case"VariableDeclaration":Hr(e,i,n,r);break;case"FunctionDeclaration":if(i.id?.name)De(n,i.id.name,{kind:"local"});break;case"ClassDeclaration":if(i.id?.name)De(n,i.id.name,{kind:"local"});break}}}function vl(e,t){for(let{local:n,exported:r}of t){if(n.type!=="Identifier")continue;let i=r.type==="Identifier"?r.name:String(r.value);if(e.componentScope.get(n.name)?.kind==="prop")continue;e.componentScope.set(n.name,{kind:"prop",publicPropName:i})}}function Pl(e,t,n){if(!n||typeof n!=="object")return;let r="content"in n&&n.content&&typeof n.content==="object"&&"body"in n.content&&Array.isArray(n.content.body)?n.content:("body"in n)&&Array.isArray(n.body)?n:void 0;if(!r||!("body"in r)||!Array.isArray(r.body))return;for(let i of r.body){if(!i||typeof i!=="object"||!("type"in i))continue;switch(i.type){case"ImportDeclaration":for(let o of i.specifiers??[])if(o.local?.name)De(t.componentScope,o.local.name,{kind:"local"});break;case"VariableDeclaration":Hr(e,i,t.componentScope,t.componentScope,{allowRunesProps:!0});break;case"FunctionDeclaration":if(i.id?.name)De(t.componentScope,i.id.name,{kind:"local"});break;case"ClassDeclaration":if(i.id?.name)De(t.componentScope,i.id.name,{kind:"local"});break;case"ExportNamedDeclaration":if(!i.declaration||typeof i.declaration!=="object"||!("type"in i.declaration)){if(i.source==null)vl(t,i.specifiers??[]);break}if(i.declaration.type==="VariableDeclaration")Hr(e,i.declaration,t.componentScope,t.componentScope,{forceProp:!0});else if(i.declaration.type==="FunctionDeclaration"&&i.declaration.id?.name)De(t.componentScope,i.declaration.id.name,{kind:"prop",publicPropName:i.declaration.id.name});break}}}function Gs(e,t){t.componentScope.clear(),t.scopeDeclarations=new Map,t.activeScopes.length=0,Pl(e,t,t.parsed?.instance)}function Ws(e){return{varScopeStack:[e.componentScope]}}function Ks(e,t,n,r){if(!yn(r))return;let i=Tl(t,r),o=n.varScopeStack[n.varScopeStack.length-1]??t.componentScope;switch(String(r.type)){case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":Cl(r,i);break;case"BlockStatement":Sl(e,r.body,i,o);break;case"CatchClause":if("param"in r)for(let c of ge(r.param))De(i,c,{kind:"local"});break;case"EachBlock":{let c=r;for(let l of ge(c.context))De(i,l,{kind:"local"});if(typeof c.index==="string")De(i,c.index,{kind:"local"});else if(c.index&&"name"in c.index)De(i,c.index.name,{kind:"local"});break}case"AwaitBlock":{let c=r;for(let l of ge(c.value))De(i,l,{kind:"local"});for(let l of ge(c.error))De(i,l,{kind:"local"});break}}if(Us(r))n.varScopeStack.push(i);return i}function zs(e,t){if(Us(t))e.varScopeStack.pop()}function Gr(e,t,n){let r=t.findVariableTypeAndDescription(n);if(r&&r.type===e.explicitVariableTypesByName.get(n))Ae(e,e.explicitVariableTypeNodesByName.get(n));return r}function zn(e,t,n,r=!0){let i=Gr(e,t,n);if(i||!r)return i;let o=Gn(t,e,n);return o?{type:o,...t.findVariableJsDoc(n)}:null}function Al(e,t,n,r){if(!ye(n))return null;let i=Kt(e,n.name);if(Ke(i))return ta(e,t,i,r).properties;let o=zn(e,t,n.name);return o?pn(o.type):null}function kl(e,t,n){return t.properties.some((r)=>r.type==="Property"&&r.kind==="get"&&e.getPropertyName(r.key)===n)}function Js(e,t,n){if(!t||typeof t!=="object"||!(n in t))return;let r=t[n];if(!r||typeof r!=="object"||!("typeAnnotation"in r))return;return qe(e,r.typeAnnotation)}function wl(e){let t=e?.body.body;if(t?.length!==1||t[0].type!=="ReturnStatement")return;return t[0].argument??void 0}function Nl(e,t,n,r,i,o){if(ye(o)){let s=zn(e,t,o.name);if(s)return s;return pe(e,"context-any-type",r,`Context "${n}" property "${r}" has no type annotation; defaulted to "any".`,oe(e,i)),{type:"any"}}if(o?.type==="ArrowFunctionExpression"||o?.type==="FunctionExpression")return{type:`(${o.params.map((c)=>`${ye(c)?c.name||"arg":"arg"}: any`).join(", ")}) => any`};if(Tt(o))return{type:fn(o)??"null"};return{type:"any"}}function ta(e,t,n,r){let i=[],o=!1;for(let s of n.properties){if(s.type==="SpreadElement"){let y=Al(e,t,s.argument,r);if(y)i.push(...y);else o=!0,pe(e,"spread-unresolved",r,`Context "${r}" spreads a value sveld can't resolve; its shape is widened to "Record<string, any>".`,oe(e,s));continue}if(s.type!=="Property")continue;let c=t.getPropertyName(s.key);if(!c)continue;if(s.kind==="set"&&kl(t,n,c))continue;let l=s.kind==="get"||s.kind==="set"?s.value:void 0,u=l?s.kind==="get"?Js(e,l,"returnType"):Js(e,l.params[0],"typeAnnotation"):void 0,f=u?{type:u}:Nl(e,t,r,c,s,s.kind==="get"?wl(l):s.kind==="set"?void 0:s.value);i.push({name:c,type:f.type,description:f.description,optional:!1,...f.internal?{internal:!0}:{}})}return{properties:i,hasUnresolvedSpread:o}}var Dl=/(?:_|[^\p{ID_Continue}$])+/u,_l=/^[\p{ID_Start}$]/u;function Ur(e){let r=`${e.split(Dl).map((i)=>i.charAt(0).toUpperCase()+i.slice(1)).join("")}Context`;return _l.test(r)?r:`_${r}`}function Xs(e,t,n,r){let{properties:i,hasUnresolvedSpread:o}=ta(e,t,n,r);return{key:r,typeName:Ur(r),properties:i,description:void 0,...o?{hasUnresolvedSpread:o}:{}}}function Ys(e,t,n,r){if(Ke(n))return Xs(e,t,n,r);else if(ye(n)){let i=n.name,o=zn(e,t,i,!1),s=o?void 0:Kt(e,i);if(Ke(s))return Xs(e,t,s,r);let c=o??zn(e,t,i);if(c){let l=pn(c.type);return{key:r,typeName:Ur(r),...l?{}:{type:c.type},properties:l??[],description:c.description,...c.internal?{internal:!0}:{}}}return pe(e,"context-any-type",i,`Context "${r}" variable "${i}" has no type annotation; defaulted to "any".`,oe(e,n)),{key:r,typeName:Ur(r),type:"any",properties:[]}}return null}function Qs(e){let t=e.callee;if(!t||typeof t!=="object"||!("type"in t))return null;let n=t.type==="Identifier"&&t.name==="Symbol",r=t.type==="MemberExpression"&&!t.computed&&t.object.type==="Identifier"&&t.object.name==="Symbol"&&t.property.type==="Identifier"&&t.property.name==="for";if(!n&&!r)return null;let i=e.arguments[0];if(!i||typeof i!=="object"||!("type"in i))return"";if(i.type==="Literal"&&typeof i.value==="string")return i.value;if(i.type==="TemplateLiteral"&&i.quasis?.length===1)return i.quasis[0].value.cooked??"";return""}function Zs(e){return{kind:"pending",importSource:e.source,importedName:e.importedName,...e.members?{members:e.members}:{}}}function na(e,t,n=0){if(!t||typeof t!=="object"||!("type"in t))return{kind:"unresolved"};let r=t;if(r.type==="Literal"||r.type==="TemplateLiteral"){let i=vs(r);return i==null?{kind:"unresolved"}:{kind:"resolved",key:i}}if(r.type==="CallExpression"||r.type==="NewExpression"){let i=Qs(r);return i==null?{kind:"unresolved"}:{kind:"resolved",key:i}}if(r.type==="Identifier"){if(n>=5)return{kind:"unresolved"};let i=Kt(e,r.name);if(i&&typeof i==="object"&&"type"in i){let s=i;if((s.type==="CallExpression"||s.type==="NewExpression")&&Qs(s)==="")return{kind:"resolved",key:r.name};return na(e,s,n+1)}let o=n===0&&mn(e,r.name)?void 0:e.valueImportBindingsByLocalName.get(r.name);return o?Zs(o):{kind:"unresolved"}}if(r.type==="MemberExpression"){let i=n===0&&Kn(e,r)?void 0:Un(e,r);if(i)return Zs(i)}return{kind:"unresolved"}}function ea(e,t,n,r,i){let o=qe(e,r)??"";pe(e,"context-value-unresolved",t,`setContext(${n}, ${o}): the value isn't an object literal or a variable, so sveld can't describe its shape; the context is skipped.`,i)}function ra(e,t,n,r){if(!n||typeof n!=="object"||!("type"in n)||n.type!=="CallExpression")return;let i=n,o=i.arguments[0];if(!o)return;let s=na(e,o);if(s.kind==="unresolved"||s.kind==="resolved"&&!s.key){let y=qe(e,o)??"";pe(e,"context-key-unresolved",y,`setContext key \`${y}\` isn't a string literal, const-bound string, Symbol(), or imported \`export const\` string; the context is skipped.`,oe(e,n));return}let c=i.arguments[1];if(!c)return;let l=oe(e,n);if(s.kind==="pending"){let y=ln(s),g=Ys(e,t,c,y);if(g)e.pendingContextKeyCandidates.push({importSource:s.importSource,importedName:s.importedName,...s.members?{members:s.members}:{},...g.type===void 0?{}:{type:g.type},properties:g.properties,description:g.description,...g.hasUnresolvedSpread?{hasUnresolvedSpread:!0}:{},...g.internal?{internal:!0}:{},source:l});else ea(e,y,y,c,l);return}let u=s.key,f=Ys(e,t,c,u);if(!f){ea(e,u,JSON.stringify(u),c,l);return}if(e.contexts.has(u)){pe(e,"context-duplicate-key",u,`setContext("${u}", ...) was called more than once; only the first call's shape is used.`,l);return}e.contexts.set(u,{...f,source:l})}var Il=/\n/g,Ll=/^[A-Za-z_$][\w$]*$/;function Wr(e,t,n){return{variableType:(r)=>{if(n?.has(r))return;return Gr(t,e,r)?.type??Gn(e,t,r)},getPropertyName:(r)=>e.getPropertyName(r)}}function gn(e,t,n){if(!t||typeof t!=="object"||!("type"in t))return n;if(ye(t)){if(!mn(e,t.name))return n;let i=n??new Set;return i.add(t.name),i}let r=n;if(Ke(t)){for(let i of t.properties)if(i.type==="Property")r=gn(e,i.value,r)}else if(t.type==="ArrayExpression")for(let i of t.elements)r=gn(e,i,r);return r}function Kr(e,t){if(ye(t))return e.variableType(t.name);return Rl(e,t)}function Rl(e,t){if(!t||typeof t!=="object"||!("type"in t))return;if(Ke(t))return sa(e,t);if(t.type==="ArrayExpression")return aa(e,t);return}function ia(e,t){if(!t||typeof t!=="object"||!("type"in t))return"any";if(ye(t))return e.variableType(t.name)??"any";if(Tt(t))return fn(t)??"null";if(Ke(t))return sa(e,t);if(t.type==="ArrayExpression")return aa(e,t);return"any"}function sa(e,t){if(t.properties.length===0)return"Record<string, never>";let n=[],r=!1;for(let i of t.properties){let o=i.type==="Property"&&!i.computed?e.getPropertyName(i.key):void 0;if(i.type!=="Property"||!o){r=!0;continue}n.push({name:o,type:ia(e,i.value)})}if(!r)return xn(n);if(n.length===0)return"Record<string, any>";return xn([...n,{name:"[key: string]",type:"any"}])}function aa(e,t){let n=new Set(t.elements.filter((r)=>r!=null).map((r)=>ia(e,r)));if(n.size===0)return"any[]";if(n.size===1)return`${[...n][0]}[]`;return`(${[...n].join(" | ")})[]`}function oa(e,t){for(let[n,r]of e.arguments.entries()){if(ye(r)&&r.name===t)return{argumentIndex:n};if(!Ke(r))continue;for(let i of r.properties){if(i.type!=="Property"||!ye(i.value))continue;if(i.value.name!==t)continue;let o=!i.computed&&ye(i.key)?i.key.name:void 0;return{argumentIndex:n,property:o??""}}}return}function ca(e,t){let n=ht(e.name,t.name);if(n!==0)return n;let r=ht(e.type,t.type);if(r!==0)return r;if(e.type==="forwarded"&&t.type==="forwarded"){let i=ht(e.element,t.element);if(i!==0)return i}return ht(e.detail??"",t.detail??"")}function zr(e){return typeof e==="string"?JSON.stringify(e):String(e)}function vt(e,{name:t,detail:n,has_argument:r,description:i,deprecated:o,tags:s,internal:c,source:l}){if(t===void 0)return;let u=!r&&!n?"null":ze(n),f=i,y=e.events.get(t);if(y?.type==="forwarded")e.events.set(t,{type:"dispatched",name:t,detail:u,description:f||y.description,deprecated:o??y.deprecated,tags:s??y.tags,...c||y.internal?{internal:!0}:{},source:l||y.source});else if(y){let g=y.tags??s,b=e.untypedJsDocEventNames.delete(t);e.events.set(t,{...y,detail:y.detail===void 0||b?u:y.detail,description:y.description||f,deprecated:y.deprecated??o,tags:g,...y.internal||c?{internal:!0}:{},source:l||y.source})}else e.events.set(t,{type:"dispatched",name:t,detail:u,description:f,deprecated:o,tags:s,...c?{internal:!0}:{},source:l})}function pa(e,t){let n=t.arguments[0],r=kr(n,"CustomEvent");if(!r&&!kr(n,"Event"))return;let i=n.arguments[0],o=Tt(i)?i.value:void 0;if(o==null)return;let s=r?n.arguments[1]:void 0,c=!1,l;if(Ke(s)){let u=s.properties.find((f)=>f.type==="Property"&&ye(f.key)&&f.key.name==="detail");if(u?.type==="Property")c=!0,l=u.value}return{name:String(o),detail:l,hasArgument:c,nestedBoundNames:gn(e,l),source:oe(e,t)}}function la(e,t,n){let r=Kr(Wr(e,t,n.nestedBoundNames),n.detail),i=r===void 0&&Tt(n.detail)?n.detail.value:void 0;vt(t,{name:n.name,detail:r??(i==null?"":zr(i)),has_argument:n.hasArgument,source:n.source})}function xn(e,t,n=!1){if(e.length===0)return"null";let r=e.map(({name:i,type:o,description:s,optional:c,default:l})=>{let u=c?"?":"",f=Ll.test(i)||i.startsWith("[")?i:JSON.stringify(i),y=s||"";if(l&&y)y=`${y} @default ${l}`;else if(l)y=`@default ${l}`;if(y=ft(y),y){if(n)return`${y.includes(`
4
10
  `)?`/**
5
- * ${d.split(`
6
- `).join(`
7
- * `)}
8
- */`:`/** ${d} */`}
9
- ${i}${h}: ${o};`;return`/** ${d.replace(np," ")} */ ${i}${h}: ${o};`}return`${i}${h}: ${o};`}).join(n?`
11
+ ${y.split(`
12
+ `).map((b)=>b?` * ${b}`:" *").join(`
13
+ `)}
14
+ */`:`/** ${y} */`}
15
+ ${f}${u}: ${o};`;return`/** ${y.replace(Il," ")} */ ${f}${u}: ${o};`}return`${f}${u}: ${o};`}).join(n?`
10
16
  `:" ");return n?`{
11
17
  ${r}
12
- }`:`{ ${r} }`}var rp=/[A-Za-z_$][\w$]*/g;function ip(e,t){if(!t)return!1;let n=new Set(t[0].split(",").map((r)=>r.trim()));for(let[r]of e.matchAll(rp))if(n.has(r))return!0;return!1}function lr(e,t){if(t===void 0)return;return e.runesPropsDeclarationMetadataByDeclaratorStart.get(t)}function cs(e,t,n){return lr(e,t)?.props.get(n)}function ps(e){if(!e||typeof e!=="object"||!("type"in e))return;if(e.type==="Identifier"&&"name"in e&&typeof e.name==="string")return e.name;if(e.type==="TSQualifiedName"&&"right"in e&&e.right&&typeof e.right==="object"&&"name"in e.right&&typeof e.right.name==="string")return e.right.name;return}function ls(e){if(!e||typeof e!=="object"||!("type"in e))return;if(e.type==="Identifier"&&"name"in e&&typeof e.name==="string")return e.name;if(e.type==="TSQualifiedName"&&"left"in e&&e.left&&typeof e.left==="object")return ls(e.left);return}function Tt(e,t){let n=t?.start,r=t?.end;if(n===void 0||r===void 0)return;return pe(e,n+1,r)?.trim()}function us(e,t){let n=t?.start,r=t?.end;if(n===void 0||r===void 0)return;return pe(e,n,r)?.trim()}function Fe(e,t,n,r,i=new Set){if(!t?.type)return;switch(t.type){case"TSInterfaceDeclaration":Fe(e,{type:"TSTypeLiteral",members:t.body?.body},n,r,i);return;case"TSTypeAliasDeclaration":case"TSParenthesizedType":case"TSTypeAnnotation":Fe(e,t.typeAnnotation,n,r,i);return;case"TSIntersectionType":case"TSUnionType":for(let o of t.types??[])Fe(e,o,n,r,i);return;case"TSTypeLiteral":for(let o of t.members??[]){if(o?.type!=="TSPropertySignature")continue;Fe(e,o.typeAnnotation?.typeAnnotation,n,r,i)}return;case"TSTypeReference":{let o=ls(t.typeName);if(o){if(e.typeImportBindingsByLocalName.has(o)||e.valueImportBindingsByLocalName.has(o))n.add(o);let s=e.localTypeDeclarationsByName.get(o);if(s&&!i.has(o))r.add(o),i.add(o),Fe(e,s.node,n,r,i),i.delete(o)}if("typeParameters"in t&&t.typeParameters&&typeof t.typeParameters==="object"){let s=t.typeParameters;for(let p of s.params??[])Fe(e,p,n,r,i)}return}case"TSArrayType":case"TSRestType":case"TSOptionalType":case"TSIndexedAccessType":case"TSTypeOperator":case"TSExpressionWithTypeArguments":case"TSTupleType":case"TSConditionalType":case"TSInferType":case"TSMappedType":case"TSFunctionType":case"TSConstructorType":case"TSTypeQuery":case"TSImportType":case"TSLiteralType":case"TSTypePredicate":case"TSNamedTupleMember":break;default:break}for(let o in t){let s=t[o];if(!s||typeof s!=="object")continue;if(Array.isArray(s)){for(let p of s){if(!p||typeof p!=="object"||!("type"in p))continue;Fe(e,p,n,r,i)}continue}if("type"in s)Fe(e,s,n,r,i)}}function sp(e,t){let n=new Map;for(let r of Array.from(t).sort()){let i=e.typeImportBindingsByLocalName.get(r),o=i?void 0:e.valueImportBindingsByLocalName.get(r),s=i??(o?{importedName:o.importedName,localName:o.localName,source:o.source,specifierType:"named"}:void 0);if(!s)continue;let p=n.get(s.source)??{default:[],named:[],namespace:[]};if(s.specifierType==="default")p.default.push(s.localName);else if(s.specifierType==="namespace")p.namespace.push(s.localName);else p.named.push({imported:s.importedName,local:s.localName});n.set(s.source,p)}return Array.from(n.entries()).sort(([r],[i])=>r.localeCompare(i)).map(([r,i])=>{if(i.namespace.length>0)return i.namespace.map((l)=>`import type * as ${l} from "${r}";`).join(`
13
- `);let o=i.named.map(({imported:l,local:h})=>{if(!l||l===h)return h;return`${l} as ${h}`}),s=i.default[0],p=o.length>0?`{ ${o.join(", ")} }`:"";if(s&&p)return`import type ${s}, ${p} from "${r}";`;if(s)return`import type ${s} from "${r}";`;return`import type ${p} from "${r}";`})}function Nt(e,t){if(t)e.additionalTypeDependencyNodes.push(t)}function ap(e){if(!e.const)return;let t=e.id?.name;if(!t)return;let n=[];for(let r of e.members??[]){let i=r.initializer;if(i?.type!=="Literal")return;let o=i.value;if(typeof o==="string")n.push(JSON.stringify(o));else if(typeof o==="number")n.push(String(o));else return}if(n.length===0)return;return`type ${t} = ${n.join(" | ")};`}function ds(e,t){let n=ap(t);if(n)return n;if(t.start===void 0||t.end===void 0)return;let r=pe(e,t.start,t.end)?.trim();return r?`declare ${r}`:void 0}function ur(e,t){let n=!1,r=[];for(let o of t.params??[]){if(o.type==="RestElement"){let g=o.argument?.name??"rest",b=Tt(e,o.typeAnnotation);if(b)n=!0;Nt(e,o.typeAnnotation?.typeAnnotation),r.push(`...${g}: ${b??"any[]"}`);continue}let s=o.type==="AssignmentPattern",p=s?o.left:o,l=p?.name??"arg",h=Tt(e,p?.typeAnnotation);if(h)n=!0;Nt(e,p?.typeAnnotation?.typeAnnotation);let d=s||o.optional===!0;r.push(`${l}${d?"?":""}: ${h??"any"}`)}let i=Tt(e,t.returnType);if(i)n=!0;return Nt(e,t.returnType?.typeAnnotation),{signature:`(${r.join(", ")}) => ${i??"any"}`,hasAnnotations:n}}function fs(e){let t=e.pendingCallDefaultCandidates.length>0?e.pendingCallDefaultCandidates.slice():void 0,n=e.pendingConstDefaultCandidates.length>0?e.pendingConstDefaultCandidates.slice():void 0,r=e.pendingContextKeyCandidates.length>0?e.pendingContextKeyCandidates.slice():void 0,i=e.pendingDispatchEscapeCandidates.length>0?e.pendingDispatchEscapeCandidates.slice():void 0,o=e.deferredEventNoSourceDiagnostics.length>0?e.deferredEventNoSourceDiagnostics.slice():void 0,s={...t?{pendingCallDefaultCandidates:t}:{},...n?{pendingConstDefaultCandidates:n}:{},...r?{pendingContextKeyCandidates:r}:{},...i?{pendingDispatchEscapeCandidates:i}:{},...o?{deferredEventNoSourceDiagnostics:o}:{}},p=t!==void 0||n!==void 0||r!==void 0||i!==void 0,l=new Set,h=new Set;for(let E of e.additionalTypeDependencyNodes)Fe(e,E,l,h);let d=e.typedRunesPropsDeclarations.length===1?e.typedRunesPropsDeclarations[0]:void 0,g=d?.canonicalType;if(d&&g){for(let E of d.referencedImportedTypes)l.add(E);for(let E of d.referencedLocalTypes)h.add(E)}if(!g&&l.size===0&&h.size===0)return p?{canonicalPropNames:[],localTypeDeclarations:[],typeImportStatements:[],...s}:void 0;let b=Array.from(h).map((E)=>e.localTypeDeclarationsByName.get(E)).filter((E)=>E!==void 0).sort((E,w)=>E.start-w.start).map((E)=>E.code);return{...g?{canonicalPropsType:g}:{},canonicalPropNames:d&&g?Array.from(d.props.keys()).sort():[],localTypeDeclarations:b,typeImportStatements:sp(e,l),referencesComponentGenerics:g?ip(g,e.generics):!1,...s}}var op=/^[A-Za-z_$][\w$]*/,cp=/[A-Za-z_$][\w$]*/g,hs=/^(?:const|in|out)\s+/;function Qe(e){let t=[],n=0,r=0;for(let i=0;i<e.length;i++){let o=e[i];if(o==="<"||o==="("||o==="["||o==="{")n++;else if(o===">"||o===")"||o==="]"||o==="}")n=Math.max(n-1,0);else if(o===","&&n===0)t.push(e.slice(r,i)),r=i+1}return t.push(e.slice(r)),t}function ms(e){let t=Qe(e).map((r)=>r.trim()).filter((r)=>r.length>0);if(t.length===0)return null;return[t.map((r)=>{let i=r;while(hs.test(i))i=i.replace(hs,"");return i.match(op)?.[0]??r}).join(", "),t.join(", ")]}function ys(e,t,n){let r=e.scriptGenericsAttribute?.value;if(!r)return;for(let[i]of r.matchAll(cp)){if(e.typeImportBindingsByLocalName.has(i))t.add(i);if(n.has(i))continue;let o=e.localTypeDeclarationsByName.get(i);if(!o)continue;n.add(i),Fe(e,o.node,t,n)}}var dr=/^\s+/,xs=/\s/,pp=/^@[^\s/]+(?=\s|$)/,lp=/^@(\S+)\s*/;function gs(e){let t=0;while(t<e.length){let n=e.charCodeAt(t);if(n!==32&&n!==9&&n!==13&&n!==10&&!xs.test(e[t]))break;t++}return t}function up(e,t){let n=e.slice(gs(e)),r=!1;if(t)n=n.slice(3),r=!0;else if(n.startsWith("*")&&!n.startsWith("*/"))n=n.slice(1),r=!0;let i=n.slice(0,gs(n));n=n.slice(i.length);let o=n.trimEnd(),s=o.endsWith("*/")?o.slice(0,-2):n;return{indent:r?i.slice(1):i,separator:i,content:s}}function dp(e,t,n){let r=n>t&&e.charCodeAt(n-1)===13?n-1:n;return e.slice(t,r)}function fp(e){let t=[],n=0;while(!0){let r=e.indexOf("/**",n);if(r===-1)break;let i=e.lastIndexOf(`
14
- `,r-1)+1;if(e.charCodeAt(r+3)===42||e.slice(i,r).trim()!==""){n=r+1;continue}let o=[],s=i,p=!1,l=0;while(s<=e.length){let h=e.indexOf(`
15
- `,s),d=h===-1?e.length:h,g=dp(e,s,d),{indent:b,separator:E,content:w}=up(g,o.length===0);o.push({raw:g,start:s,number:o.length,indent:b,separator:E,content:w});let N=g.trimEnd();if(N.endsWith("*/")){p=!0,l=s+N.length,n=d;break}if(h===-1)break;s=h+1}if(!p)break;t.push({start:r,end:l,lines:o})}return t}function hp(e){let t=e;if(t.length>0&&t[0].content==="")t=t.slice(1);if(t.length>0&&t[t.length-1].content==="")t=t.slice(0,-1);return t}function mp(e){let t=[[]],n=!1;for(let r of e){if(pp.test(r.content)&&!n)t.push([r]);else t[t.length-1].push(r);if(yp(r.content,"```")%2===1)n=!n}return t}function yp(e,t){let n=0,r=e.indexOf(t);while(r!==-1)n++,r=e.indexOf(t,r+t.length);return n}function bs(e){return e.map((t)=>t.indent+t.content).join(`
16
- `)}function gp(e,t){let n=t;while(n<e.length-1&&e[n].content.trim()==="")n++;if(e[n].content[0]!=="{")return null;let r=0,i=[],o=n;for(;o<e.length;o++){let l=e[o].content,h=0;for(let d of l){if(d==="{")r++;else if(d==="}")r--;if(h++,r===0)break}if(i.push(h),r===0)break}if(r!==0)return null;let s=o;return{type:i.map((l,h)=>{let d=n+h,g=e[d].content.slice(0,l);if(e[d].content=e[d].content.slice(l).replace(dr,""),d>0)e[d].continuesType=!0;return h===0?g:e[d].indent+g}).join(`
17
- `).slice(1,-1),endIndex:s}}function xp(e){let t=e.content.match(dr)?.[0]??"",n=e.content.slice(t.length),r=0,i=0;for(let h of n){if(r===0&&xs.test(h))break;if(h==="[")r++;if(h==="]")r--;i++}let o=r===0?n.slice(0,i):"";if(!o)return null;let s=o,p=!1,l;if(o.startsWith("[")&&o.endsWith("]")){p=!0;let d=o.slice(1,-1).split("=");if(s=d[0].trim(),d.length>1)l=d.slice(1).join("=").trim();if(!s)return null}if(s.length>1&&(s[0]==='"'||s[0]==="'")&&s[s.length-1]===s[0])s=s.slice(1,-1);return e.content=n.slice(i).replace(dr,""),{name:s,optional:p,default:l}}function bp(e){let t=e[0],n=t.content.match(lp),r=n?n[1]:"",i=n?t.content.slice(n[0].length):t.content,o=i.trimEnd(),s=e.slice(1).map((E)=>E.separator+E.content),p=(o?[o,...s]:s).join(`
18
- `);t.content=i,t.tag=r;let l=gp(e,0),h=l?.type??"",d=0;if(l){d=l.endIndex;while(d<e.length-1&&e[d].content.trim()==="")d++}let g=xp(e[d]),b=bs(e.slice(l?l.endIndex:0));return{tag:r,name:g?.name??"",type:h,optional:g?.optional??!1,default:g?.default,description:b,raw:p,lines:e}}function Tp(e,t,n){let r=hp(e);r.forEach((s,p)=>{s.number=p});let i=mp(r),o=i.slice(1).map(bp);return{description:bs(i[0]),tags:o,start:t,end:n,lines:r}}function fr(e){return fp(e).map(({start:t,end:n,lines:r})=>Tp(r,t,n))}var Ep=null;function Sp(e,t,n){let r={value:void 0,replace:!1};if(!n||typeof n!=="object"||!("type"in n))return r;if(n.type==="Identifier")r.value=n.name,r.replace=!0;else if(n.type==="Literal")r.value=String(n.value);else if(n.type==="MemberExpression")r.value=yn(e,t,n);else if((n.type==="ObjectExpression"||n.type==="TemplateLiteral")&&"start"in n&&"end"in n&&typeof n.start==="number"&&typeof n.end==="number")r.value=pe(e,n.start,n.end);return r}function Cp(e,t,n){if(!xe(n))return null;let r=Ut(e,n.name);if(Je(r))return hr(e,t,r).slot_props;let i=t.findVariableTypeAndDescription(n.name);if(!i)return null;let o=gn(i.type);if(!o)return null;let s={};for(let p of o)s[p.name]={value:p.type,replace:!1};return s}function hr(e,t,n){let r={},i=!1;for(let o of n.properties){if(o.type==="SpreadElement"){let p=Cp(e,t,o.argument);if(p)Object.assign(r,p);else i=!0,oe(e,"spread-unresolved","slot_props",`Slot props spread a value sveld can't resolve; its shape is widened to "Record<string, any>".`,se(e,o));continue}if(o.type!=="Property"||o.computed)continue;let s=t.getPropertyName(o.key);if(!s)continue;r[s]=Sp(e,t,o.value)}return{slot_props:r,hasUnresolvedSpread:i}}function vp(e,t){if(!t||typeof t!=="object"||!("type"in t))return null;if(t.type==="Identifier"){let o=t,s=e.propLocalToPublicName.get(o.name);if(!s)return null;return{publicName:s,trackingName:o.name}}if(t.type!=="MemberExpression")return null;let n=t,r=n.object&&typeof n.object==="object"&&"type"in n.object&&n.object.type==="Identifier"?n.object.name:void 0;if(!r||!e.wholePropsLocals.has(r))return null;let i;if(!n.computed&&n.property&&typeof n.property==="object"&&"type"in n.property){if(n.property.type==="Identifier")i=n.property.name;else if(n.property.type==="Literal"&&n.property.value!=null)i=String(n.property.value)}else if(n.computed&&n.property&&typeof n.property==="object"&&"type"in n.property&&n.property.type==="Literal"&&"value"in n.property&&n.property.value!=null)i=String(n.property.value);if(!i)return null;return{publicName:i,trackingName:i}}function Ts(e,t){let n=t;if(n&&typeof n==="object"&&"type"in n&&n.type==="ChainExpression")n=n.expression;if(!n||typeof n!=="object"||!("type"in n)||n.type!=="CallExpression")return null;let r=n;if(!r.callee||typeof r.callee!=="object"||!("type"in r.callee))return null;let i=vp(e,r.callee);if(!i)return null;return{...i,arguments:r.arguments}}function Kt(e,{slot_name:t,slot_props:n,slot_props_unresolved_spread:r,slot_fallback:i,slot_description:o,slot_deprecated:s,slot_tags:p,slot_internal:l,source:h}){let d=t===void 0||t==="",g=d?Ep:t??"",b=je(i),E=n===void 0||n===""?void 0:n,w=o?.trim()||void 0;if(e.slots.has(g)){let N=e.slots.get(g);if(N)e.slots.set(g,{...N,default:N.default??d,fallback:b,slot_props:N.slot_props===void 0?E:N.slot_props,slot_props_unresolved_spread:N.slot_props_unresolved_spread||r,description:N.description||w,deprecated:N.deprecated??s,tags:N.tags||p,...N.internal||l?{internal:!0}:{},source:h||N.source})}else e.slots.set(g,{name:g,default:d,fallback:b,slot_props:E,slot_props_unresolved_spread:r,description:w,deprecated:s,tags:p,...l?{internal:!0}:{},source:h})}function Tn(e,t){let n=t.source?.value;if(typeof n!=="string"||t.importKind==="type")return;for(let r of t.specifiers??[]){if(r.type!=="ImportSpecifier"||r.importKind==="type")continue;let i=r.local?.name;if(!i)continue;let o=r.imported?.name??(typeof r.imported?.value==="string"?r.imported.value:i);e.valueImportBindingsByLocalName.set(i,{localName:i,importedName:o,source:n})}}function En(e){let t=e,n=t.type==="Program"?t.body:t.content?.body??t.body;return Array.isArray(n)?n:void 0}function Es(e){let t=new Map,n=e?En(e):void 0;if(!n)return t;for(let r of n){let i=r;if(i.type!=="ImportDeclaration"||i.importKind==="type")continue;let o=i.source?.value;if(typeof o!=="string")continue;for(let s of i.specifiers??[]){let p=s.local?.name;if(!p||s.importKind==="type")continue;let l;if(s.type==="ImportDefaultSpecifier")l="default";else if(s.type==="ImportNamespaceSpecifier")l="*";else l=s.imported?.name??String(s.imported?.value??p);t.set(p,{from:o,imported:l})}}return t}function mr(e,t){if(!t)return;let n=En(t);if(!n)return;for(let r of n){let i=r;if(i.type==="ImportDeclaration"){Tn(e,i);continue}let o=i.type==="ExportNamedDeclaration"&&i.declaration?i.declaration:i;if(o.type==="FunctionDeclaration"){let s=o;if(s.id?.name)e.funcDecls.set(s.id.name,s)}}}var Ap=/\s*=\s*/;function Ss(e){let t=e.indexOf("<");if(t===-1||!e.endsWith(">"))return e;let n=e.slice(0,t),r=e.slice(t+1,-1),i=Qe(r).map((o)=>o.trim().replace(Ap," = ")).join(", ");return`${n}<${i}>`}var gr=/^\s*$/,Pp=/;$/,kp=/^-\s*/;function wp(e){return e.split(`
19
- `).map((t)=>t.trim()).join(`
20
- `)}function _t(e){if(e===void 0)return;let t=e.replace(kp,"").trim();return t===""?"":t}var Cs=new Set(["restProps","slot","snippet","event","typedef","callback"]),yr=new Set(["property","type"]);function Sn(e){if(!e||e.length===0)return;let t=0;while(e[t+1]?.continuesType)t++;return e[t].content}var vs=new Set(["since","example","see"]),Np=new Set(["bindable","default","required"]);function _p(e){let t=e.trim();return t===""?!0:t}function As(e,t){return _p(`${e??""}${t?` ${t}`:""}`)}function Dp(e){let t=e.trim().replace(Pp,"").trimEnd();if(!t.startsWith("{")||!t.endsWith("}"))return!1;let n=0,r=null;for(let i=0;i<t.length;i++){let o=t[i];if(r!==null){if(o==="\\"){i++;continue}if(o===r)r=null;continue}if(o==='"'||o==="'"||o==="`"){r=o;continue}if(o==="{"||o==="["||o==="(")n++;else if(o==="}"||o==="]"||o===")"){if(n--,n===0&&i<t.length-1)return!1}}return n===0}function Ip(e){let t=e;if(!t.startsWith("/*"))t=`/*${t}`;if(!t.endsWith("*/"))t+="*/";return t}var Lp=new Set(["type","param","returns","return","extends","extendProps","restProps","slot","snippet","event","typedef","callback","bindable","deprecated","ignore","internal","csspart","cssprop","cssproperty"]);function xr(e,t){let n=e.parsedJsDocByText.get(t);if(n===void 0)n=fr(t),e.parsedJsDocByText.set(t,n);return n}function br(e){let t=e[0]?.tags??[],n,r=[],i,o,s,p=!1,l=[],h=[],d=[];for(let g of t)if(g.tag==="type")n=g;else if(g.tag==="param")r.push(g);else if(g.tag==="returns"||g.tag==="return")i=g;else if(g.tag==="deprecated")s??=As(g.name,g.description);else if(g.tag==="ignore"||g.tag==="internal")p=!0;else if(g.tag==="sveld-ignore")d.push(g.name);else if(vs.has(g.tag))h.push(g);else if(g.tag==="bindable"){if(g.type)continue;let b=`${g.name}${g.description?` ${g.description}`:""}`.trim();if(b==="readonly"||b==="writable")o??=b}else if(!Lp.has(g.tag))l.push(g);return{type:n,param:r,returns:i,binding:o,deprecated:s,internal:p,additional:l,passthrough:h,ignore:d,description:e[0]?.description}}function Rp(e,t){if(typeof t.start!=="number"||typeof t.end!=="number")return;let n=e.jsDocBlocksByStart.get(t.start);if(n===void 0||n.end!==t.end)return;return[n]}function Mp(e){if(!e||e.length===0)return;let t=e[e.length-1];return t&&typeof t==="object"&&"value"in t?t:void 0}function Ps(e,t,n){if(!t||t.length===0||n===void 0||!e.source)return;for(let r=t.length-1;r>=0;r--){let i=t[r];if(!i||typeof i!=="object"||!("value"in i)||!("end"in i))continue;if(typeof i.end!=="number"||!("start"in i)||typeof i.start!=="number")continue;let o=e.source.slice(i.end,n);if(gr.test(o))return i}return}function Op(e){let t=new Set,n=(i)=>{let{leadingComments:o,start:s}=i,p=Ps(e,o,s);if(p)t.add(p.start)};for(let i of e.funcDecls.values())n(i);let r=[{root:e.parsed?.module,isModule:!0},{root:e.parsed?.instance,isModule:!1}];for(let{root:i,isModule:o}of r)for(let s of(i&&En(i))??[]){let p=s,l=p.type==="ExportNamedDeclaration",h=l?p.declaration:p;if(h?.type==="FunctionDeclaration"){if(l)n(p)}else if(h?.type==="VariableDeclaration"&&(o||!l)&&h.declarations?.length===1&&Bp.has(h.declarations[0].init?.type??""))n(p)}return t}var Bp=new Set(["ArrowFunctionExpression","FunctionExpression"]);function rt(e,t,n){if(!n?.leadingComments)return;let r=Ps(e,n.leadingComments,n.start);if(!r)return;return Fp(e,t,[r])}function ks(e,t,n){if(!n?.leadingComments)return;return rt(e,t,n)}function ws(e,t,n){let r=e;if(t)r=`${e} extends ${t}`;if(n)r+=` = ${n}`;return r}function Fp(e,t,n){if(!n)return;let r=Mp(n);if(!r)return;let i=Rp(e,r)??xr(e,Ip(r.value)),{type:o,param:s,returns:p,binding:l,deprecated:h,internal:d,additional:g,passthrough:b,ignore:E,description:w}=br(i),N,D,q,W;if(o)N=t.aliasType(o.type);if(s.length>0)D=s.filter((Q)=>!Q.name.includes(".")).map((Q)=>({name:Q.name,type:t.aliasType(Q.type),description:_t(wp(Q.description)),optional:Q.optional||!1}));if(p)q=t.aliasType(p.type);let P,B=g;if(typeof r.start==="number"&&e.functionDocCommentStarts.has(r.start)){let Q=g.filter((te)=>te.tag==="template"&&te.name);if(Q.length>0)P=Q.map((te)=>ws(te.name,t.aliasType(te.type),te.default)).join(", "),B=g.filter((te)=>te.tag!=="template")}let R=je(w?.trim());if(R||B.length>0){let Q=[];if(R)Q.push(R);for(let te of B){let a=`@${te.tag}${te.name?` ${te.name}`:""}${te.description?` ${te.description}`:""}`;Q.push(a)}W=Q.join(`
21
- `)}let ae=b.length>0?b.map((Q)=>({name:Q.tag,body:Q.raw})):void 0;return{type:N,params:D,returnType:q,description:W,binding:l,deprecated:h,tags:ae,sveldIgnore:E.length>0?E:void 0,internal:d,typeParameters:P}}function Ns(e,t,n=e.source){if(!n)return;let r=!1,i=!1,o=!1,s=new Set,p=()=>{if(r&&i&&!o){o=!0;let w=e.componentFilePath?` in ${e.componentFilePath}`:"";console.warn(`Warning: Both @generics and @template tags are used to declare component generics${w}; their declarations are combined in the order encountered.`)}},l=(w,N)=>{if(s.has(w))oe(e,"generics-conflict",w,`Duplicate generic name "${w}".`,N);else s.add(w)},h=(w,N)=>{if(e.generics){let q=Qe(e.generics[0]).map((W)=>W.trim()).indexOf(w.trim());if(q!==-1){let W=Qe(e.generics[1]).map((P)=>P.trim());W[q]=N,e.generics=[e.generics[0],W.join(", ")];return}}t.accumulateGeneric(w,N)},d=(w,N)=>{if(e.typedefs.has(w))oe(e,"typedef-duplicate",w,`Duplicate typedef/callback name "${w}"; the later declaration overwrites the earlier one.`,N)},g=(w,N,D,q)=>{let W=w.findIndex((P)=>P.name===N.name);if(W===-1)w.push(N);else{let P=D?` of "${D}"`:"";oe(e,"property-duplicate",N.name,`Duplicate property "${N.name}"${P}; the later declaration overwrites the earlier one.`,q),w[W]=N}},b=n.includes("@template")?Op(e):new Set;e.functionDocCommentStarts=b;let E=fr(n);for(let w of E)e.jsDocBlocksByStart.set(w.start,w);for(let{tags:w,description:N,lines:D,start:q}of E){let W=b.has(q),P,B,R,ae,Q=!1,te,a,c=[],u=[],m=[],T,y,x,C,v=[],S=!1,A=[],k,_,j,F=[],G=!1,z=[],K,Y,le=!1,ne=!0,V=[],Ee,me=!1,Ce=new Map,Me=new Set,ze=new Set;for(let M of w)if(M.lines.length>0)Me.add(M.lines[0].number);for(let M of D)if(M.continuesType)Me.add(M.number);let xt=new Set,bt=!1;for(let M of D){if(!M.tag&&!M.continuesType&&M.content&&M.content.trim()!=="}")Ce.set(M.number,M.content);if(M.tag!==void 0||M.continuesType)bt=!0;else if(bt&&M.indent&&M.content.trim())xt.add(M.number);else bt=!1}let Yn=(M)=>{if(!M||M.length===0)return;let ie=M[0].number,ge=[],U=[],Pe=!1;for(let re=ie-1;re>=0;re--){if(Me.has(re)||xt.has(re))break;let he=Ce.get(re);if(he)ge.unshift(he),U.unshift(re),Pe=!0;else if(Pe){let ke=D[re];if(!(!ke||!ke.tag&&(!ke.content||ke.content.trim()==="")))break}}if(ge.length===0)return;for(let re of U)ze.add(re);return ge.join(`
22
- `).trim()},Pt=(M,ie)=>{let ge=_t(Sn(M)),U=ie!==void 0&&Cs.has(ie.tag)&&!_t(Sn(ie.lines)),Pe=P!==void 0&&(ie===void 0||!yr.has(ie.tag)),re=[];for(let he=1;he<M.length;he++){let ke=M[he];if((U||Pe)&&!xt.has(ke.number))continue;let ce=Ce.get(ke.number)?.trim();if(!ce||ze.has(ke.number))continue;re.push(ce),ze.add(ke.number)}if(re.length===0)return ge;return[ge,...re].filter(Boolean).join(`
23
- `)},bc=(M,ie,ge,U)=>{if(P===void 0||R)return;if(U?.tag!=="event"&&!yr.has(U?.tag??""))return;if(_t(Sn(ge)))return;let Pe=ie?`@${M} "${ie}"`:`@${M}`;oe(e,"event-description-ambiguous",P,`Text after @event "${P}" was used as the description of ${Pe}. Move it above the tag it describes, indent it as a continuation line, or give each event its own comment block.`,Be(e,ge))},Di=()=>{if(P!==void 0){let M=B&&B!=="object"&&B!=="Object"?B:void 0,ie;if(M)ie=M;else if(m.length>0)ie=bn(m,P,!0);else ie=B||"";if(a!==void 0){let ge;for(let re of w){let he=re.lines[0]?.number;if(typeof he!=="number")continue;if(he<=a)continue;if(yr.has(re.tag))continue;ge=he;break}let U=[],Pe=Array.from(Ce.keys()).sort((re,he)=>re-he);for(let re of Pe){if(re<=a)continue;if(ge!==void 0&&re>=ge)continue;if(ze.has(re))continue;let ke=Ce.get(re)?.trim();if(ke)U.push(ke),ze.add(re)}if(U.length>0){let re=U.join(`
24
- `);R=R?`${R}
25
- ${re}`:re}}dt(e,{name:P,detail:ie,has_argument:!1,description:R,deprecated:ae,tags:c.length>0?c:void 0,internal:Q||void 0,source:te}),e.eventDescriptions.set(P,R),e.jsDocEventNames.add(P),e.jsDocEventSources.set(P,te),tt(e,"event-no-source",P,u),m.length=0,P=void 0,B=void 0,R=void 0,ae=void 0,Q=!1,te=void 0,a=void 0,c=[],u=[]}},Ii=()=>{if(T!==void 0){let M,ie;if(A.length>0)M=bn(A,void 0,!0),ie=`type ${T} = ${M};`;else if(y)M=y,ie=Dp(M)?`interface ${T} ${M}`:`type ${T} = ${M};`;else M="{}",ie=`type ${T} = ${M};`;d(T,C),e.typedefs.set(T,{type:M,name:T,description:je(x),ts:ie,tags:v.length>0?v:void 0,...S?{internal:!0}:{},source:C}),A.length=0,T=void 0,y=void 0,x=void 0,C=void 0,v=[],S=!1}},Li=()=>{if(k!==void 0){let ge=`(${z.map(({name:Pe,type:re,optional:he})=>`${Pe}${he?"?":""}: ${re}`).join(", ")}) => ${K||"void"}`,U=`type ${k} = ${ge};`;d(k,j),e.typedefs.set(k,{type:ge,name:k,description:je(_),ts:U,tags:F.length>0?F:void 0,...G?{internal:!0}:{},source:j}),z.length=0,K=void 0,k=void 0,_=void 0,j=void 0,F=[],G=!1}},Tc=w.some((M)=>M.tag==="slot"||M.tag==="snippet"),Ec=w.some((M)=>M.tag==="extends"||M.tag==="extendProps"),Sc=w.some((M)=>M.tag==="slot"||M.tag==="snippet"||M.tag==="event"||M.tag==="typedef"||M.tag==="callback");for(let M=0;M<w.length;M++){let{tag:ie,type:ge,name:U,description:Pe,optional:re,default:he,raw:ke,lines:ce}=w[M],kt=w[M+1],Oe=t.aliasType(ge),wt=Cs.has(ie)?Yn(ce):void 0;if(wt)bc(ie,U,ce,w[M-1]);switch(ie){case"extends":case"extendProps":if(e.extends!==void 0)oe(e,"extend-props-duplicate",U,`A second @extends/@extendProps tag ("${U}") overwrote the first ("${e.extends.interface}"); only one is used.`,Be(e,ce));if(e.extends={interface:U,import:Oe},ne)ne=!1;break;case"restProps":{let ue=U?Pe?`${U} ${Pe}`:U:Pe,ct=_t(ue)||wt;if(!ct&&ne&&!le&&N)ct=N,le=!0;if(e.rest_props={type:"Element",name:Oe,description:ct||void 0},ne)ne=!1;break}case"slot":case"snippet":{let De=Pt(ce,kt);if(!De&&ne&&!le&&N)De=N,le=!0;if(!De&&V.length===0)De=wt;if(ne)ne=!1;let ct=Oe;if(!ct)ct="Record<string, never>",oe(e,"slot-missing-type",U||"default",`@${ie}${U?` "${U}"`:""} is missing a required {Type} annotation; falling back to "${ct}".`,Be(e,ce));Kt(e,{slot_name:U,slot_props:ct,slot_description:De||void 0,slot_deprecated:Ee,slot_tags:V.length>0?[...V]:void 0,slot_internal:me||void 0,source:Be(e,ce)}),V.length=0,Ee=void 0,me=!1;{let Cc=U===void 0||U===""?null:U;Y=(vc)=>{let Qn=e.slots.get(Cc);if(Qn)Qn.tags=[...Qn.tags??[],vc]}}break}case"csspart":{let ue=Pt(ce,kt);e.cssParts.push({name:U,...ue?{description:ue}:{}});break}case"cssprop":case"cssproperty":{let ue=Pt(ce,kt);e.cssProperties.push({name:U,...Oe?{type:Oe}:{},...he===void 0?{}:{default:he},...ue?{description:ue}:{}});break}case"event":{if(Di(),P=U,B=Oe,a=ce.length>0?ce[0].number:void 0,R=_t(Sn(ce))||wt,!R&&ne&&!le&&N)R=N,le=!0;if(te=Be(e,ce),V.length>0)c.push(...V),V.length=0;if(Y=(De)=>c.push(De),ne)ne=!1;break}case"type":if(P!==void 0)B=Oe;break;case"param":if(k!==void 0)z.push({name:U,type:Oe,optional:re||!1});break;case"returns":case"return":if(k!==void 0)K=Oe;break;case"property":{let ue={name:U,type:Oe,description:Pt(ce,kt),optional:re||!1,default:he};if(P!==void 0)g(m,ue,P,Be(e,ce));else if(T!==void 0)g(A,ue,T,Be(e,ce));break}case"typedef":{if(Ii(),T=Ss(U),y=Oe,C=Be(e,ce),x=Pt(ce,kt)||wt,!x&&ne&&!le&&N)x=N,le=!0;if(V.length>0)v.push(...V),V.length=0;if(S=me,me=!1,Y=(De)=>v.push(De),ne)ne=!1;break}case"callback":{if(Li(),k=Ss(U),j=Be(e,ce),_=Pt(ce,kt)||wt,!_&&ne&&!le&&N)_=N,le=!0;if(V.length>0)F.push(...V),V.length=0;if(G=me,me=!1,Y=(De)=>F.push(De),ne)ne=!1;break}case"generics":{let ue=Oe||U;for(let De of Qe(U))l(De.trim(),Be(e,ce));if(r=!0,p(),h(U,ue),ne)ne=!1;break}case"template":{let ue=ws(U,Oe,he);if(Tc&&!Ec){e.deferredSlotBlockGenerics.push({name:U,constraint:ue});break}if(W)break;if(l(U,Be(e,ce)),i=!0,p(),h(U,ue),ne)ne=!1;break}case"deprecated":{let ue=As(U,Pe);if(P===void 0)Ee??=ue;else ae??=ue;break}case"ignore":case"internal":{if(P===void 0)me=!0;else Q=!0;break}case"sveld-ignore":if(P!==void 0)u.push(U);break;case"enum":case"class":case"implements":case"this":case"namespace":case"memberof":case"module":case"file":case"overview":break;default:{let ue={name:ie,body:ke};if(!vs.has(ie)&&!Np.has(ie))oe(e,"jsdoc-unknown-tag",ie,`Unknown JSDoc tag "@${ie}"; passed through unchanged. If this is a typo, fix the tag name.`,Be(e,ce));if(Y)Y(ue);else V.push(ue)}break}}if(Di(),Ii(),Li(),Sc&&V.length>0){for(let M of V)oe(e,"jsdoc-tag-dropped",M.name,`@${M.name} could not attach to a @slot/@snippet/@event/@typedef/@callback tag in the same comment block and was dropped.`);V.length=0}}}function Vp({hasTypeScriptType:e,hasJSDocType:t,inferredType:n,finalType:r}){if(e)return"typescript";if(t)return"jsdoc";if(n!==void 0)return"default";if(r!==void 0)return"inferred";return"unknown"}function zt(e){let t=e.explicitType??e.jsdocType??e.resolvedType??e.typeSeed,n=e.jsdocParams??e.resolvedParams,r=e.jsdocReturnType??e.resolvedReturnType;if(e.isFunctionDeclaration&&t==="() => any"&&r){let l=e.jsdocTypeParameters?`<${e.jsdocTypeParameters}>`:"";t=n&&n.length>0?`${l}(${n.map((h)=>`${h.name}${h.optional?"?":""}: ${h.type}`).join(", ")}) => ${r}`:`${l}() => ${r}`}let i=e.jsdocDescription??e.resolvedDescription;if(i===void 0&&t!==void 0)i=e.typedefs?.get(t)?.description;let o=Vp({hasTypeScriptType:e.explicitType!==void 0,hasJSDocType:e.jsdocType!==void 0||e.jsdocParams!==void 0||e.jsdocReturnType!==void 0||e.resolvedType!==void 0,inferredType:e.inferredTypeForSource,finalType:t}),s=e.initializerIsFunction||e.isFunctionDeclaration||e.inferIsFunctionFromTypeSignature===!0&&(!!e.jsdocParams?.length||e.jsdocReturnType!==void 0||!!e.jsdocType?.includes("=>")||!!e.resolvedType?.includes("=>")||!!e.explicitType?.includes("=>")),p=s?e.jsdocTypeParameters:void 0;return{type:t,typeSource:o,description:i,params:n,returnType:r,isFunction:s,typeParameters:p}}function $p(e){if(!e||typeof e!=="object"||!("type"in e))return;let t=String(e.type),n=Gt(t);if(!n&&!Wt(t))return;let r="name"in e&&typeof e.name==="string"?e.name:void 0;if(!r)return;let i=n?{type:"InlineComponent",name:r}:{type:"Element",name:r};if(r==="svelte:element"&&"tag"in e&&e.tag&&typeof e.tag==="object"){let o=e.tag;if(o.type==="Literal"&&typeof o.value==="string")i.thisValue=o.value}return i}function _s(e,t){let n=$p(t);if(!n)return;if(e.rest_props===void 0){e.rest_props=n;return}if(e.rest_props.type==="InlineComponent"&&n.type==="Element")e.rest_props=n}function ve(e,t,n){if(!t||e.has(t))return;e.set(t,n)}function Xt(e,t){for(let n=e.activeScopes.length-1;n>=0;n-=1){let r=e.activeScopes[n]?.get(t);if(!r)continue;return r.kind==="prop"?r.publicPropName:void 0}return}function ye(e,t=new Set){if(!e||typeof e!=="object"||!("type"in e))return t;switch(e.type){case"Identifier":t.add(e.name);break;case"AssignmentPattern":ye(e.left,t);break;case"ArrayPattern":for(let n of e.elements)ye(n??void 0,t);break;case"ObjectPattern":for(let n of e.properties)if(n.type==="Property")ye(n.value,t);else if(n.type==="RestElement")ye(n.argument,t);break;case"RestElement":ye(e.argument,t);break}return t}function Er(e,t){if(!t||typeof t!=="object"||!("type"in t))return;if(t.type==="Identifier"){let r=Xt(e,t.name);if(r)e.reactive_vars.add(r);return}let n=ye(t);for(let r of n){let i=Xt(e,r);if(i)e.reactive_vars.add(i)}}function Jt(e){if(!e||typeof e!=="object"||!("type"in e))return!1;switch(String(e.type)){case"BlockStatement":case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"CatchClause":case"EachBlock":case"AwaitBlock":return!0;default:return!1}}function Ds(e){if(!e||typeof e!=="object"||!("type"in e))return!1;let t=String(e.type);return t==="FunctionDeclaration"||t==="FunctionExpression"||t==="ArrowFunctionExpression"}function jp(e,t){let n=e.scopeDeclarations.get(t);if(!n)n=new Map,e.scopeDeclarations.set(t,n);return n}function Hp(e,t,n){let r=[];if(n.id.type==="Identifier")return r.push({kind:"local",name:n.id.name}),r;if(n.id.type!=="ObjectPattern")return r;for(let i of n.id.properties){if(i.type==="RestElement"){if(i.argument.type==="Identifier")r.push({kind:"local",name:i.argument.name});continue}if(i.computed)continue;let o=e.getPropertyName(i.key);if(!o)continue;let s;if(i.value.type==="Identifier")s=i.value.name;else if(i.value.type==="AssignmentPattern"&&i.value.left.type==="Identifier")s=i.value.left.name;if(!s)continue;r.push({kind:"prop",name:s,publicPropName:o})}return r}function Tr(e,t,n,r,i){if(!Ri(t))return;let o=i?.allowRunesProps??!1,s=i?.forceProp??!1,p=t;for(let l of p.declarations){if(o&&Ye(lt(l.init),"$props")){for(let g of Hp(e,p,l))ve(g.kind==="prop"?n:r,g.name,g.kind==="prop"?{kind:"prop",publicPropName:g.publicPropName}:{kind:"local"});continue}let h=p.kind==="var"?r:n,d=s?"prop":"local";for(let g of ye(l.id))ve(h,g,d==="prop"?{kind:"prop",publicPropName:g}:{kind:"local"})}}function qp(e,t){if("id"in e&&e.id&&typeof e.id==="object"&&"name"in e.id&&typeof e.id.name==="string")ve(t,e.id.name,{kind:"local"});for(let n of e.params)for(let r of ye(n))ve(t,r,{kind:"local"})}function Up(e,t,n,r){if(!Array.isArray(t))return;for(let i of t){if(!i||typeof i!=="object"||!("type"in i))continue;switch(i.type){case"VariableDeclaration":Tr(e,i,n,r);break;case"FunctionDeclaration":if(i.id?.name)ve(n,i.id.name,{kind:"local"});break;case"ClassDeclaration":if(i.id?.name)ve(n,i.id.name,{kind:"local"});break}}}function Gp(e,t,n){if(!n||typeof n!=="object")return;let r="content"in n&&n.content&&typeof n.content==="object"&&"body"in n.content&&Array.isArray(n.content.body)?n.content:("body"in n)&&Array.isArray(n.body)?n:void 0;if(!r||!("body"in r)||!Array.isArray(r.body))return;for(let i of r.body){if(!i||typeof i!=="object"||!("type"in i))continue;switch(i.type){case"ImportDeclaration":for(let o of i.specifiers??[])if(o.local?.name)ve(t.componentScope,o.local.name,{kind:"local"});break;case"VariableDeclaration":Tr(e,i,t.componentScope,t.componentScope,{allowRunesProps:!0});break;case"FunctionDeclaration":if(i.id?.name)ve(t.componentScope,i.id.name,{kind:"local"});break;case"ClassDeclaration":if(i.id?.name)ve(t.componentScope,i.id.name,{kind:"local"});break;case"ExportNamedDeclaration":if(!i.declaration||typeof i.declaration!=="object"||!("type"in i.declaration))break;if(i.declaration.type==="VariableDeclaration")Tr(e,i.declaration,t.componentScope,t.componentScope,{forceProp:!0});else if(i.declaration.type==="FunctionDeclaration"&&i.declaration.id?.name)ve(t.componentScope,i.declaration.id.name,{kind:"prop",publicPropName:i.declaration.id.name});break}}}function Is(e,t){t.componentScope.clear(),t.scopeDeclarations=new Map,t.activeScopes.length=0,Gp(e,t,t.parsed?.instance)}function Ls(e){return{varScopeStack:[e.componentScope]}}function Rs(e,t,n,r){if(!Jt(r))return;let i=jp(t,r),o=n.varScopeStack[n.varScopeStack.length-1]??t.componentScope;switch(String(r.type)){case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":qp(r,i);break;case"BlockStatement":Up(e,r.body,i,o);break;case"CatchClause":if("param"in r)for(let p of ye(r.param))ve(i,p,{kind:"local"});break;case"EachBlock":{let p=r;for(let l of ye(p.context))ve(i,l,{kind:"local"});if(typeof p.index==="string")ve(i,p.index,{kind:"local"});else if(p.index&&"name"in p.index)ve(i,p.index.name,{kind:"local"});break}case"AwaitBlock":{let p=r;for(let l of ye(p.value))ve(i,l,{kind:"local"});for(let l of ye(p.error))ve(i,l,{kind:"local"});break}}if(Ds(r))n.varScopeStack.push(i);return i}function Ms(e,t){if(Ds(t))e.varScopeStack.pop()}function Cr(e){return e==="TSTypeAnnotation"||e==="TSTypeAliasDeclaration"||e==="TSInterfaceDeclaration"||e==="TSTypeParameterDeclaration"||e==="TSTypeParameterInstantiation"}function vr(e,t,n,r){Sr(e,null,null,t,n,r?.skipTypeOnlySubtrees===!0)}function Sr(e,t,n,r,i,o){r(e,t,n);let s=e.type;if((s==="Identifier"||s==="Literal"||s==="Text")&&e.typeAnnotation===void 0){if(i)i(e);return}if(o&&s.charCodeAt(0)===84&&Cr(s)){if(i)i(e);return}for(let p in e){if(p==="leadingComments")continue;let l=e[p];if(!l||typeof l!=="object")continue;if(Array.isArray(l))for(let h=0;h<l.length;h++){let d=l[h];if(d&&typeof d==="object"&&typeof d.type==="string")Sr(d,e,p,r,i,o)}else if(typeof l.type==="string")Sr(l,e,p,r,i,o)}if(i)i(e)}var Fs=new Set(["$state","$derived","$effect","$props","$bindable","$inspect","$host"]);function Wp(e,t){switch(t?.type){case"MemberExpression":return t.computed||e===t.object;case"MethodDefinition":return!!t.computed;case"MetaProperty":return e===t.meta;case"PropertyDefinition":return t.computed||e===t.value;case"Property":return t.computed||e===t.value;case"ExportSpecifier":case"ImportSpecifier":return e===t.local;case"LabeledStatement":case"BreakStatement":case"ContinueStatement":return!1;default:return!0}}var Kp=Array.from(Fs);function Os(e){return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e===95||e===36}function zp(e){if(e.includes("\\u"))return!0;for(let t of Kp){let n=e.indexOf(t);while(n!==-1){if(!Os(e.charCodeAt(n-1))&&!Os(e.charCodeAt(n+t.length)))return!0;n=e.indexOf(t,n+1)}}return!1}function Xp(e,t){for(let n=t.length-1;n>=0;n-=1)if(t[n]?.has(e))return!0;return!1}function Jp(e){let t=new Set;if(!e||typeof e!=="object"||!("type"in e))return t;switch(String(e.type)){case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":{let n=e;if(n.id?.name)t.add(n.id.name);for(let r of n.params??[])ye(r,t);break}case"BlockStatement":Cn(e.body,t);break;case"CatchClause":ye(e.param,t);break;case"EachBlock":{let n=e;if(ye(n.context,t),typeof n.index==="string")t.add(n.index);else if(n.index?.name)t.add(n.index.name);break}case"AwaitBlock":{let n=e;ye(n.value,t),ye(n.error,t);break}}return t}function Cn(e,t){if(!Array.isArray(e))return;for(let n of e){if(!n||typeof n!=="object"||!("type"in n))continue;switch(String(n.type)){case"ImportDeclaration":for(let r of n.specifiers??[])if(r.local?.name)t.add(r.local.name);break;case"VariableDeclaration":for(let r of n.declarations??[])ye(r.id,t);break;case"FunctionDeclaration":case"ClassDeclaration":{let r=n.id?.name;if(r)t.add(r);break}case"ExportNamedDeclaration":{let r=n.declaration;if(r&&typeof r==="object"&&"type"in r)Cn([r],t);break}}}}function Ar(e,t){if(!e||typeof e!=="object")return!1;return Pr(e,void 0,[...t])}function Pr(e,t,n){if(Cr(e.type))return!1;let r=Jt(e);if(r)n.push(Jp(e));let i=!1;if(t&&e.type==="Identifier"&&e.name!==void 0&&Fs.has(e.name)&&!t.type.startsWith("TS")&&Wp(e,t)&&!Xp(e.name,n))i=!0;else for(let o in e){if(o==="leadingComments")continue;let s=e[o];if(!s||typeof s!=="object")continue;if(Array.isArray(s)){for(let p=0;p<s.length;p++){let l=s[p];if(l&&typeof l==="object"&&typeof l.type==="string"){if(Pr(l,e,n)){i=!0;break}}}if(i)break}else if(typeof s.type==="string"){if(Pr(s,e,n)){i=!0;break}}}if(r)n.pop();return i}function Bs(e){if(!e||typeof e!=="object")return;if("content"in e){let t=e.content,n=t&&typeof t==="object"&&"body"in t?t.body:void 0;if(Array.isArray(n))return n}if("body"in e&&Array.isArray(e.body))return e.body;return}function Vs(e){if(e.runesOptionOverride!==void 0)return e.runesOptionOverride?"runes":"legacy";let t=e.parsed;if(!t)return"legacy";if(e.source!==void 0&&!zp(e.source))return"legacy";let n=new Set;Cn(Bs(t.module),n);let r=new Set;return Cn(Bs(t.instance),r),Ar(t.module,[n])||Ar(t.instance,[n,r])||Ar(t.fragment,[n,r])?"runes":"legacy"}var Yp=/[A-Za-z_$][\w$]*/g;function Qp(e,t,n){let r=new Map,i=t.typeParameters?.params,o=n.typeArguments?.params;if(!i?.length||!o?.length)return r;for(let s=0;s<i.length;s++){let p=i[s]?.name,l=o[s];if(!p||l?.start===void 0||l?.end===void 0)continue;let h=pe(e,l.start,l.end)?.trim();if(h)r.set(p,h)}return r}function Zp(e,t){if(t.size===0)return e;return e.replace(Yp,(n)=>t.get(n)??n)}function Dt(e,t,n,r,i=new Set){let o=new Map;if(!n?.type)return o;let s=(p)=>{for(let l of p){if(l?.type!=="TSPropertySignature"||l.computed)continue;if(!l.key)continue;let h=e.getPropertyName(l.key);if(!h)continue;let d=l.typeAnnotation?.start,g=l.typeAnnotation?.end;if(d===void 0||g===void 0)continue;let b=pe(t,d+1,g)?.trim();if(!b)continue;Nt(t,l.typeAnnotation?.typeAnnotation),o.set(h,{type:b,optional:l.optional===!0,source:se(t,l)})}};switch(n.type){case"TSTypeLiteral":s(n.members??[]);break;case"TSInterfaceDeclaration":s(n.body?.body??[]);break;case"TSTypeAliasDeclaration":{let p=Dt(e,t,n.typeAnnotation,r,i);for(let[l,h]of p)o.set(l,h);break}case"TSTypeReference":{let p=ps(n.typeName);if(!p||i.has(p))break;let l=r.get(p);if(!l)break;i.add(p);let h=Dt(e,t,l,r,i);i.delete(p);let d=Qp(t,l,n);for(let[g,b]of h)o.set(g,d.size===0?b:{...b,type:Zp(b.type,d)});break}case"TSIntersectionType":for(let p of n.types??[]){let l=Dt(e,t,p,r,i);for(let[h,d]of l)o.set(h,d)}break;case"TSParenthesizedType":{let p=Dt(e,t,n.typeAnnotation,r,i);for(let[l,h]of p)o.set(l,h);break}}return o}function el(e){let t={};for(let[n,r]of Object.entries(e))t[n]={...r.attribute===void 0?{}:{attribute:r.attribute},...r.reflect===void 0?{}:{reflect:r.reflect},...r.type===void 0?{}:{type:r.type}};return t}function $s(e,t,n){if(t.runesPropsDeclarationMetadataByDeclaratorStart.clear(),t.explicitPropTypesByName.clear(),t.explicitVariableTypesByName.clear(),t.typeImportBindingsByLocalName.clear(),t.localTypeDeclarationsByName.clear(),t.additionalTypeDependencyNodes.length=0,t.typedRunesPropsDeclarations.length=0,!t.source)return;let r=n;t.scriptLanguage=e.resolveScriptLanguage(r);let i=r.options?.customElement;t.customElementTag=i?.tag,t.customElement=i?{...i.tag===void 0?{}:{tag:i.tag},...i.shadow==="open"||i.shadow==="none"?{shadow:i.shadow}:{},...i.props?{props:el(i.props)}:{},...i.extend===void 0?{}:{extend:!0}}:void 0,t.runesOptionOverride=r.options?.runes,t.scriptGenericsAttribute=e.resolveScriptGenericsAttribute(r);let o=r.instance?.content?.body??[];for(let s of o){if(!s?.type)continue;if(s.type==="ImportDeclaration"&&s.source?.value)for(let p of s.specifiers??[]){let l=p.local?.name;if(!l)continue;if(!(s.importKind==="type"||p.importKind==="type"))continue;let d,g;if(p.type==="ImportSpecifier")d="named",g=p.imported?.type==="Identifier"?p.imported.name:typeof p.imported?.value==="string"?p.imported.value:void 0;else if(p.type==="ImportDefaultSpecifier")d="default";else if(p.type==="ImportNamespaceSpecifier")d="namespace";if(!d)continue;t.typeImportBindingsByLocalName.set(l,{importedName:g,localName:l,source:String(s.source.value),specifierType:d})}if((s.type==="TSInterfaceDeclaration"||s.type==="TSTypeAliasDeclaration")&&s.id?.name&&s.start!==void 0&&s.end!==void 0)t.localTypeDeclarationsByName.set(s.id.name,{code:pe(t,s.start,s.end)?.trim()??"",node:s,start:s.start});if(s.type==="TSEnumDeclaration"&&s.id?.name&&s.start!==void 0&&s.end!==void 0)t.localTypeDeclarationsByName.set(s.id.name,{code:ds(t,s)??"",node:s,start:s.start});if(s.type==="ExportNamedDeclaration"&&s.declaration?.type==="VariableDeclaration")for(let p of s.declaration.declarations??[]){if(p.id?.type!=="Identifier"||!p.id.name)continue;let l=Tt(t,p.id.typeAnnotation);if(l)t.explicitPropTypesByName.set(p.id.name,l),Nt(t,p.id.typeAnnotation?.typeAnnotation)}else if(s.type==="VariableDeclaration")for(let p of s.declarations??[]){if(p.id?.type!=="Identifier"||!p.id.name)continue;let l=Tt(t,p.id.typeAnnotation);if(l)t.explicitVariableTypesByName.set(p.id.name,l)}}for(let s of o){if(!s||typeof s!=="object"||!("declarations"in s))continue;for(let p of s.declarations??[]){if(!Ye(lt(p.init),"$props"))continue;let l=p.id?.typeAnnotation?void 0:Oi(p.init),h=p.id?.typeAnnotation?.typeAnnotation??l,d=p.id?.typeAnnotation?Tt(t,p.id.typeAnnotation):us(t,l),g=Dt(e,t,h,new Map(Array.from(t.localTypeDeclarationsByName.entries(),([w,N])=>[w,N.node]))),b=new Set,E=new Set;if(Fe(t,h,b,E),ys(t,b,E),p.start!==void 0){let w={canonicalType:d,props:g,referencedImportedTypes:b,referencedLocalTypes:E};if(t.runesPropsDeclarationMetadataByDeclaratorStart.set(p.start,w),d)t.typedRunesPropsDeclarations.push(w)}}}}function js(e,t,n){for(let r of n.declarations){if(!Ye(lt(r.init),"$props"))continue;if(r.id.type==="Identifier"){t.wholePropsLocals.add(r.id.name),t.restPropLocals.add(r.id.name);let s=lr(t,r.start);if(s)for(let[p,l]of s.props)Ht(e,t,p,{name:p,kind:"let",type:l.type,typeSource:"typescript",isFunction:!1,isFunctionDeclaration:!1,isRequired:!l.optional,constant:!1,reactive:!1,source:l.source});continue}if(r.id.type!=="ObjectPattern")continue;let i=rt(t,e,n),o=r.id.properties.filter((s)=>{if(s.type!=="Property"||s.computed)return!1;if(!e.getPropertyName(s.key))return!1;if(s.value.type==="Identifier")return!0;return s.value.type==="AssignmentPattern"&&s.value.left.type==="Identifier"}).length;for(let s of r.id.properties){if(s.type==="RestElement"){if(s.argument.type==="Identifier")t.restPropLocals.add(s.argument.name);continue}let p=e.getPropertyName(s.key);if(!p)continue;let l,h;if(s.value.type==="Identifier")l=s.value.name;else{let c=s.value;l=c.left.name,h=c.right}if(!l)continue;if(e.trackPropLocalName(p,l),p==="children")t.snippetPropLocals.add(l);let d=ks(t,e,s)??(o===1?i:void 0),g=cs(t,r.start,p),{init:b,bindable:E}=Xi(h),w=b==null?{isFunction:!1}:ut(e,t,b),{value:N,type:D,isFunction:q,defaultValue:W}=w,P=g?.type===void 0&&d?.type===void 0?w.resolvedType:void 0;qt(t,w,p,"props");let{type:B,typeSource:R,description:ae,params:Q,returnType:te,isFunction:a}=zt({explicitType:g?.type,typeSeed:D,inferredTypeForSource:D,jsdocType:d?.type,jsdocDescription:d?.description,jsdocParams:d?.params,jsdocReturnType:d?.returnType,resolvedType:P,resolvedDescription:w.resolvedDescription,resolvedParams:w.resolvedParams,resolvedReturnType:w.resolvedReturnType,initializerIsFunction:q,isFunctionDeclaration:!1,inferIsFunctionFromTypeSignature:!0});if(E)t.reactive_vars.add(p);tt(t,"prop-unknown-type",p,d?.sveldIgnore),Ht(e,t,p,{name:p,...l===p?{}:{localName:l},kind:"let",description:ae,binding:d?.binding,deprecated:d?.deprecated,tags:d?.tags,...d?.internal?{internal:!0}:{},...E?{bindable:!0}:{},type:B,typeSource:R,value:N,defaultValue:W,params:Q,returnType:te,isFunction:a,isFunctionDeclaration:!1,isRequired:!E&&b==null&&g?.optional!==!0,constant:!1,reactive:E,source:se(t,s)})}}}function tl(e){let n=e.indexOf("EventDispatcher");if(n===-1)return;let r=n+15;while(e[r]===" ")r++;if(e[r]!=="<")return;let i=0,o=r;for(;r<e.length;r++)if(e[r]==="<")i++;else if(e[r]===">"){if(i--,i===0)return e.slice(o+1,r)}return}function nl(e){let t=[],n=0,r=0;for(let i=0;i<e.length;i++){let o=e[i];if(o==="{"||o==="("||o==="["||o==="<")n++;else if(o==="}"||o===")"||o==="]"||o===">")n=Math.max(n-1,0);else if(n===0&&(o===";"||o===","))t.push(e.slice(r,i)),r=i+1}return t.push(e.slice(r)),t.map((i)=>i.trim()).filter((i)=>i.length>0)}var rl=/^["']|["']$/g,il=/\?$/,sl=/^\{/,al=/\}$/;function ol(e){let t=0;for(let n=0;n<e.length;n++){let r=e[n];if(r==="{"||r==="("||r==="["||r==="<")t++;else if(r==="}"||r===")"||r==="]"||r===">")t=Math.max(t-1,0);else if(t===0&&r===":"){let i=e.slice(0,n).trim().replace(il,"").replace(rl,""),o=e.slice(n+1).trim();if(!i||!o)return;return{name:i,type:o}}}return}function Hs(e,t,n,r,i){if(n){let l=new Map(Array.from(t.localTypeDeclarationsByName.entries(),([d,g])=>[d,g.node])),h=Dt(e,t,n,l);for(let[d,g]of h)dt(t,{name:d,detail:g.type,has_argument:!0,source:g.source});return}let o=e.resolveLocalVarJSDoc(r)?.type,s=o?tl(o):void 0;if(!s)return;let p=s.trim().replace(sl,"").replace(al,"");for(let l of nl(p)){let h=ol(l);if(!h)continue;dt(t,{name:h.name,detail:h.type,has_argument:!0,source:i})}}function qs(e,t){if(e.syntaxMode!=="runes")return;for(let[n,r]of Array.from(e.events.entries())){if(r.type!=="dispatched")continue;if(t.has(n)||e.forwardedEvents.has(n))continue;let i=`on${n}`,o=e.props.get(i);if(!o)continue;let s=o.type!==void 0||o.params!==void 0||o.returnType!==void 0,p=r.detail===void 0||r.detail==="undefined"||r.detail==="null"?"() => void":`(detail: ${r.detail}) => void`;e.props.set(i,{...o,description:o.description??r.description,type:s?o.type:p,typeSource:s?o.typeSource:"inferred",isFunction:!0}),e.events.delete(n)}}var Us=new Set(["TSAsExpression","TSSatisfiesExpression","TSNonNullExpression","TSTypeAssertion","TSInstantiationExpression"]);function kr(e){return e!==null&&typeof e==="object"&&typeof e.type==="string"}function Gs(e){if(!Us.has(e.type))return e;let t=e.expression;while(t&&Us.has(t.type))t=t.expression;return t??e}function vn(e){if(!kr(e))return;wr(e)}function wr(e){for(let t in e){if(t==="leadingComments")continue;let n=e[t];if(!n||typeof n!=="object")continue;if(Array.isArray(n))for(let r=0;r<n.length;r++){let i=n[r];if(!kr(i))continue;let o=Gs(i);if(o!==i)n[r]=o;wr(o)}else if(kr(n)){let r=Gs(n);if(r!==n)e[t]=r;wr(r)}}}function cl(e,t,n,r,i){for(let o of e){if(o.type!=="Block"||o.start<n||o.end>r)continue;let s=t.slice(o.start,o.end);i.push({end:o.end,isJsDoc:s.startsWith("/**")&&s.length>4,text:s})}}function Ws(e,t,n){if(!e||typeof e!=="object"||!("type"in e))return;let r=e;if(r.type==="FunctionDeclaration"){if(r.id?.type==="Identifier"&&r.id.name)n.push({name:r.id.name,start:t});return}if(r.type==="VariableDeclaration"){for(let i of r.declarations??[])if(i?.id?.type==="Identifier"&&i.id.name)n.push({name:i.id.name,start:t})}}function pl(e){let t=[];for(let n of e){if(!n||typeof n!=="object"||!("type"in n))continue;let r=n;if(r.start===void 0)continue;if(r.type==="ExportNamedDeclaration"&&r.declaration)Ws(r.declaration,r.start,t);else Ws(r,r.start,t)}return t}function ll(e,t,n){let r;for(let i of e){if(i.end>t)break;if(!i.isJsDoc)continue;if(!gr.test(n.slice(i.end,t)))continue;r=i}return r}function Ks(e,t){let n=new Map;if(!e.source)return n;let r=[e.parsed?.module,e.parsed?.instance],i=[],o=[],s=e.parsed?.comments??[];for(let p of r){let l=p?.content;if(!l?.body||l.start===void 0||l.end===void 0)continue;cl(s,e.source,l.start,l.end,i),o.push(...pl(l.body))}i.sort((p,l)=>p.end-l.end);for(let p of o){let l=ll(i,p.start,e.source);if(!l)continue;let h=xr(e,l.text),{type:d,description:g,ignore:b,internal:E}=br(h);if(b.length>0)tt(e,"context-any-type",p.name,b);if(!d)continue;n.set(p.name,{type:t.aliasType(d.type),description:g||d.description,internal:E||void 0})}return n}var ul={li:{direct:["li"]},dt:{descendant:["dt","dd"]},dd:{descendant:["dt","dd"]},p:{descendant:["address","article","aside","blockquote","div","dl","fieldset","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","main","menu","nav","ol","p","pre","section","table","ul"]},rt:{descendant:["rt","rp"]},rp:{descendant:["rt","rp"]},optgroup:{descendant:["optgroup"]},option:{descendant:["option","optgroup"]},thead:{direct:["tbody","tfoot"]},tbody:{direct:["tbody","tfoot"]},tfoot:{direct:["tbody"]},tr:{direct:["tr","tbody"]},td:{direct:["td","th","tr"]},th:{direct:["td","th","tr"]}};function zs(e,t){let n=ul[e];if(!n)return!1;if(!t)return!0;return(n.direct??n.descendant??[]).includes(t)}var Hr={};wc(Hr,{Node:()=>tn,Parser:()=>fe,Position:()=>It,SourceLocation:()=>Zt,TokContext:()=>Ue,Token:()=>On,TokenType:()=>ee,defaultOptions:()=>Pn,getLineInfo:()=>Or,isIdentifierChar:()=>Le,isIdentifierStart:()=>we,isNewLine:()=>St,keywordTypes:()=>Dn,lineBreak:()=>Ne,lineBreakG:()=>na,nonASCIIwhitespace:()=>Mr,parse:()=>Kl,parseExpressionAt:()=>zl,tokContexts:()=>de,tokTypes:()=>f,tokenizer:()=>Xl,version:()=>Ma});var dl=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239],Zs=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],fl="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-᫝᫠-᫫ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・",ea="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-࢏ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚ౜ౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ೜-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ƛ꟱-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",Nr={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},_r="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",hl={5:_r,"5module":_r+" export import",6:_r+" const class extends export import super"},ta=/^in(stanceof)?$/,ml=new RegExp("["+ea+"]"),yl=new RegExp("["+ea+fl+"]");function Dr(e,t){var n=65536;for(var r=0;r<t.length;r+=2){if(n+=t[r],n>e)return!1;if(n+=t[r+1],n>=e)return!0}return!1}function we(e,t){if(e<65)return e===36;if(e<91)return!0;if(e<97)return e===95;if(e<123)return!0;if(e<=65535)return e>=170&&ml.test(String.fromCharCode(e));if(t===!1)return!1;return Dr(e,Zs)}function Le(e,t){if(e<48)return e===36;if(e<58)return!0;if(e<65)return!1;if(e<91)return!0;if(e<97)return e===95;if(e<123)return!0;if(e<=65535)return e>=170&&yl.test(String.fromCharCode(e));if(t===!1)return!1;return Dr(e,Zs)||Dr(e,dl)}var ee=function(t,n){if(n===void 0)n={};this.label=t,this.keyword=n.keyword,this.beforeExpr=!!n.beforeExpr,this.startsExpr=!!n.startsExpr,this.isLoop=!!n.isLoop,this.isAssign=!!n.isAssign,this.prefix=!!n.prefix,this.postfix=!!n.postfix,this.binop=n.binop||null,this.updateContext=null};function He(e,t){return new ee(e,{beforeExpr:!0,binop:t})}var qe={beforeExpr:!0},Ie={startsExpr:!0},Dn={};function Z(e,t){if(t===void 0)t={};return t.keyword=e,Dn[e]=new ee(e,t)}var f={num:new ee("num",Ie),regexp:new ee("regexp",Ie),string:new ee("string",Ie),name:new ee("name",Ie),privateId:new ee("privateId",Ie),eof:new ee("eof"),bracketL:new ee("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new ee("]"),braceL:new ee("{",{beforeExpr:!0,startsExpr:!0}),braceR:new ee("}"),parenL:new ee("(",{beforeExpr:!0,startsExpr:!0}),parenR:new ee(")"),comma:new ee(",",qe),semi:new ee(";",qe),colon:new ee(":",qe),dot:new ee("."),question:new ee("?",qe),questionDot:new ee("?."),arrow:new ee("=>",qe),template:new ee("template"),invalidTemplate:new ee("invalidTemplate"),ellipsis:new ee("...",qe),backQuote:new ee("`",Ie),dollarBraceL:new ee("${",{beforeExpr:!0,startsExpr:!0}),eq:new ee("=",{beforeExpr:!0,isAssign:!0}),assign:new ee("_=",{beforeExpr:!0,isAssign:!0}),incDec:new ee("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new ee("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:He("||",1),logicalAND:He("&&",2),bitwiseOR:He("|",3),bitwiseXOR:He("^",4),bitwiseAND:He("&",5),equality:He("==/!=/===/!==",6),relational:He("</>/<=/>=",7),bitShift:He("<</>>/>>>",8),plusMin:new ee("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:He("%",10),star:He("*",10),slash:He("/",10),starstar:new ee("**",{beforeExpr:!0}),coalesce:He("??",1),_break:Z("break"),_case:Z("case",qe),_catch:Z("catch"),_continue:Z("continue"),_debugger:Z("debugger"),_default:Z("default",qe),_do:Z("do",{isLoop:!0,beforeExpr:!0}),_else:Z("else",qe),_finally:Z("finally"),_for:Z("for",{isLoop:!0}),_function:Z("function",Ie),_if:Z("if"),_return:Z("return",qe),_switch:Z("switch"),_throw:Z("throw",qe),_try:Z("try"),_var:Z("var"),_const:Z("const"),_while:Z("while",{isLoop:!0}),_with:Z("with"),_new:Z("new",{beforeExpr:!0,startsExpr:!0}),_this:Z("this",Ie),_super:Z("super",Ie),_class:Z("class",Ie),_extends:Z("extends",qe),_export:Z("export"),_import:Z("import",Ie),_null:Z("null",Ie),_true:Z("true",Ie),_false:Z("false",Ie),_in:Z("in",{beforeExpr:!0,binop:7}),_instanceof:Z("instanceof",{beforeExpr:!0,binop:7}),_typeof:Z("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:Z("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:Z("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},Ne=/\r\n?|\n|\u2028|\u2029/,na=new RegExp(Ne.source,"g");function St(e){return e===10||e===13||e===8232||e===8233}function ra(e,t,n){if(n===void 0)n=e.length;for(var r=t;r<n;r++){var i=e.charCodeAt(r);if(St(i))return r<n-1&&i===13&&e.charCodeAt(r+1)===10?r+2:r+1}return-1}var Mr=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,be=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,ia=Object.prototype,{hasOwnProperty:gl,toString:xl}=ia,Lt=Object.hasOwn||function(e,t){return gl.call(e,t)},Xs=Array.isArray||function(e){return xl.call(e)==="[object Array]"},Js=Object.create(null);function ft(e){return Js[e]||(Js[e]=new RegExp("^(?:"+e.replace(/ /g,"|")+")$"))}function it(e){if(e<=65535)return String.fromCharCode(e);return e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320)}var bl=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,It=function(t,n){this.line=t,this.column=n};It.prototype.offset=function(t){return new It(this.line,this.column+t)};var Zt=function(t,n,r){if(this.start=n,this.end=r,t.sourceFile!==null)this.source=t.sourceFile};function Or(e,t){for(var n=1,r=0;;){var i=ra(e,r,t);if(i<0)return new It(n,t-r);++n,r=i}}var Pn={ecmaVersion:null,sourceType:"script",strict:!1,onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,startLocation:null,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},Ys=!1;function Tl(e){var t={};for(var n in Pn)t[n]=e&&Lt(e,n)?e[n]:Pn[n];if(t.ecmaVersion==="latest")t.ecmaVersion=1e8;else if(t.ecmaVersion==null){if(!Ys&&typeof console==="object"&&console.warn)Ys=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
26
- Defaulting to 2020, but this will stop working in the future.`);t.ecmaVersion=11}else if(t.ecmaVersion>=2015)t.ecmaVersion-=2009;if(t.allowReserved==null)t.allowReserved=t.ecmaVersion<5;if(!e||e.allowHashBang==null)t.allowHashBang=t.ecmaVersion>=14;if(Xs(t.onToken)){var r=t.onToken;t.onToken=function(i){return r.push(i)}}if(Xs(t.onComment))t.onComment=El(t,t.onComment);if(t.sourceType==="commonjs"&&t.allowAwaitOutsideFunction)throw Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return t}function El(e,t){return function(n,r,i,o,s,p){var l={type:n?"Block":"Line",value:r,start:i,end:o};if(e.locations)l.loc=new Zt(this,s,p);if(e.ranges)l.range=[i,o];t.push(l)}}var Et=1,Ct=2,Br=4,sa=8,Fr=16,aa=32,In=64,oa=128,vt=256,en=512,ca=1024,Ln=Et|Ct|vt;function Vr(e,t){return Ct|(e?Br:0)|(t?sa:0)}var kn=0,$r=1,at=2,pa=3,la=4,ua=5,fe=function(t,n,r){this.options=t=Tl(t),this.sourceFile=t.sourceFile,this.keywords=ft(hl[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var i="";if(t.allowReserved!==!0){if(i=Nr[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module")i+=" await"}this.reservedWords=ft(i);var o=(i?i+" ":"")+Nr.strict;if(this.reservedWordsStrict=ft(o),this.reservedWordsStrictBind=ft(o+" "+Nr.strictBind),this.input=String(n),this.containsEsc=!1,this.pos=r||0,this.curLine=1,t.startLocation)this.lineStart=this.pos-t.startLocation.column,this.curLine=t.startLocation.line;else if(r){if(this.lineStart=this.input.lastIndexOf(`
27
- `,r-1)+1,this.options.locations)this.curLine=this.input.slice(0,this.lineStart).split(Ne).length}else this.lineStart=0;if(this.type=f.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=t.sourceType==="module",this.strict=this.inModule||t.strict===!0||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&t.allowHashBang&&this.input.slice(0,2)==="#!")this.skipLineComment(2);this.scopeStack=[],this.enterScope(this.options.sourceType==="commonjs"?Ct:Et),this.regexpState=null,this.privateNameStack=[]},We={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowReturn:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},allowUsing:{configurable:!0},inClassStaticBlock:{configurable:!0}};fe.prototype.parse=function(){var t=this,n=this.options.program||this.startNode();return this.nextToken(),this.catchStackOverflow(function(){return t.parseTopLevel(n)})};We.inFunction.get=function(){return(this.currentVarScope().flags&Ct)>0};We.inGenerator.get=function(){return(this.currentVarScope().flags&sa)>0};We.inAsync.get=function(){return(this.currentVarScope().flags&Br)>0};We.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],n=t.flags;if(n&(vt|en))return!1;if(n&Ct)return(n&Br)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};We.allowReturn.get=function(){if(this.inFunction)return!0;if(this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&Et)return!0;return!1};We.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags;return(t&In)>0||this.options.allowSuperOutsideMethod};We.allowDirectSuper.get=function(){return(this.currentThisScope().flags&oa)>0};We.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};We.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],n=t.flags;if(n&(vt|en)||n&Ct&&!(n&Fr))return!0}return!1};We.allowUsing.get=function(){var e=this.currentScope(),t=e.flags;if(t&ca)return!1;if(!this.inModule&&t&Et)return!1;return!0};We.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&vt)>0};fe.extend=function(){var t=[],n=arguments.length;while(n--)t[n]=arguments[n];var r=this;for(var i=0;i<t.length;i++)r=t[i](r);return r};fe.parse=function(t,n){return new this(n,t).parse()};fe.parseExpressionAt=function(t,n,r){var i=new this(r,t,n);return i.nextToken(),i.parseExpression()};fe.tokenizer=function(t,n){return new this(n,t)};Object.defineProperties(fe.prototype,We);var Ae=fe.prototype,Sl=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;Ae.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){be.lastIndex=e,e+=be.exec(this.input)[0].length;var t=Sl.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])==="use strict"){be.lastIndex=e+t[0].length;var n=be.exec(this.input),r=n.index+n[0].length,i=this.input.charAt(r);return i===";"||i==="}"||Ne.test(n[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(i)||i==="!"&&this.input.charAt(r+1)==="=")}if(e+=t[0].length,be.lastIndex=e,e+=be.exec(this.input)[0].length,this.input[e]===";")e++}};Ae.eat=function(e){if(this.type===e)return this.next(),!0;else return!1};Ae.isContextual=function(e){return this.type===f.name&&this.value===e&&!this.containsEsc};Ae.eatContextual=function(e){if(!this.isContextual(e))return!1;return this.next(),!0};Ae.catchStackOverflow=function(e){try{return e()}catch(t){if(t instanceof Error&&(/\bstack\b.*\b(exceeded|overflow)\b/i.test(t.message)||/\btoo much recursion\b/i.test(t.message)))this.raise(this.start,"Not enough stack space to parse input");else throw t}};Ae.expectContextual=function(e){if(!this.eatContextual(e))this.unexpected()};Ae.canInsertSemicolon=function(){return this.type===f.eof||this.type===f.braceR||Ne.test(this.input.slice(this.lastTokEnd,this.start))};Ae.insertSemicolon=function(){if(this.canInsertSemicolon()){if(this.options.onInsertedSemicolon)this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc);return!0}};Ae.semicolon=function(){if(!this.eat(f.semi)&&!this.insertSemicolon())this.unexpected()};Ae.afterTrailingComma=function(e,t){if(this.type===e){if(this.options.onTrailingComma)this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc);if(!t)this.next();return!0}};Ae.expect=function(e){this.eat(e)||this.unexpected()};Ae.unexpected=function(e){this.raise(e!=null?e:this.start,"Unexpected token")};var Rn=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};Ae.checkPatternErrors=function(e,t){if(!e)return;if(e.trailingComma>-1)this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var n=t?e.parenthesizedAssign:e.parenthesizedBind;if(n>-1)this.raiseRecoverable(n,t?"Assigning to rvalue":"Parenthesized pattern")};Ae.checkExpressionErrors=function(e,t){if(!e)return!1;var{shorthandAssign:n,doubleProto:r}=e;if(!t)return n>=0||r>=0;if(n>=0)this.raise(n,"Shorthand property assignments are valid only in destructuring patterns");if(r>=0)this.raiseRecoverable(r,"Redefinition of __proto__ property")};Ae.checkYieldAwaitInDefaultParams=function(){if(this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos))this.raise(this.yieldPos,"Yield expression cannot be a default value");if(this.awaitPos)this.raise(this.awaitPos,"Await expression cannot be a default value")};Ae.isSimpleAssignTarget=function(e){if(e.type==="ParenthesizedExpression")return this.isSimpleAssignTarget(e.expression);return e.type==="Identifier"||e.type==="MemberExpression"};var O=fe.prototype;O.parseTopLevel=function(e){var t=Object.create(null);if(!e.body)e.body=[];while(this.type!==f.eof){var n=this.parseStatement(null,!0,t);e.body.push(n)}if(this.inModule)for(var r=0,i=Object.keys(this.undefinedExports);r<i.length;r+=1){var o=i[r];this.raiseRecoverable(this.undefinedExports[o].start,"Export '"+o+"' is not defined")}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType==="commonjs"?"script":this.options.sourceType,this.finishNode(e,"Program")};var jr={kind:"loop"},Cl={kind:"switch"};O.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;be.lastIndex=this.pos;var t=be.exec(this.input),n=this.pos+t[0].length,r=this.fullCharCodeAt(n);if(r===91||r===92)return!0;if(e)return!1;if(r===123)return!0;if(we(r)){var i=n;do n+=r<=65535?1:2;while(Le(r=this.fullCharCodeAt(n)));if(r===92)return!0;var o=this.input.slice(i,n);if(!ta.test(o))return!0}return!1};O.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;be.lastIndex=this.pos;var e=be.exec(this.input),t=this.pos+e[0].length,n;return!Ne.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)==="function"&&(t+8===this.input.length||!(Le(n=this.fullCharCodeAt(t+8))||n===92))};O.isUsingKeyword=function(e,t){if(this.options.ecmaVersion<17||!this.isContextual(e?"await":"using"))return!1;be.lastIndex=this.pos;var n=be.exec(this.input),r=this.pos+n[0].length;if(Ne.test(this.input.slice(this.pos,r)))return!1;if(e){var i=r+5,o;if(this.input.slice(r,i)!=="using"||i===this.input.length||Le(o=this.fullCharCodeAt(i))||o===92)return!1;be.lastIndex=i;var s=be.exec(this.input);if(r=i+s[0].length,s&&Ne.test(this.input.slice(i,r)))return!1}var p=this.fullCharCodeAt(r);if(!we(p)&&p!==92)return!1;var l=r;do r+=p<=65535?1:2;while(Le(p=this.fullCharCodeAt(r)));if(p===92)return!0;var h=this.input.slice(l,r);if(ta.test(h))return!1;if(t&&!e&&h==="of"){be.lastIndex=r;var d=be.exec(this.input);if(r=r+d[0].length,this.input.charCodeAt(r)!==61||(p=this.input.charCodeAt(r+1))===61||p===62)return!1}return!0};O.isAwaitUsing=function(e){return this.isUsingKeyword(!0,e)};O.isUsing=function(e){return this.isUsingKeyword(!1,e)};O.parseStatement=function(e,t,n){var r=this.type,i=this.startNode(),o;if(this.isLet(e))r=f._var,o="let";switch(r){case f._break:case f._continue:return this.parseBreakContinueStatement(i,r.keyword);case f._debugger:return this.parseDebuggerStatement(i);case f._do:return this.parseDoStatement(i);case f._for:return this.parseForStatement(i);case f._function:if(e&&(this.strict||e!=="if"&&e!=="label")&&this.options.ecmaVersion>=6)this.unexpected();return this.parseFunctionStatement(i,!1,!e);case f._class:if(e)this.unexpected();return this.parseClass(i,!0);case f._if:return this.parseIfStatement(i);case f._return:return this.parseReturnStatement(i);case f._switch:return this.parseSwitchStatement(i);case f._throw:return this.parseThrowStatement(i);case f._try:return this.parseTryStatement(i);case f._const:case f._var:if(o=o||this.value,e&&o!=="var")this.unexpected();return this.parseVarStatement(i,o);case f._while:return this.parseWhileStatement(i);case f._with:return this.parseWithStatement(i);case f.braceL:return this.parseBlock(!0,i);case f.semi:return this.parseEmptyStatement(i);case f._export:case f._import:if(this.options.ecmaVersion>10&&r===f._import){be.lastIndex=this.pos;var s=be.exec(this.input),p=this.pos+s[0].length,l=this.input.charCodeAt(p);if(l===40||l===46)return this.parseExpressionStatement(i,this.parseExpression())}if(!this.options.allowImportExportEverywhere){if(!t)this.raise(this.start,"'import' and 'export' may only appear at the top level");if(!this.inModule)this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")}return r===f._import?this.parseImport(i):this.parseExport(i,n);default:if(this.isAsyncFunction()){if(e)this.unexpected();return this.next(),this.parseFunctionStatement(i,!0,!e)}var h=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(h){if(!this.allowUsing)this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement");if(e)this.raise(this.start,"Using declaration is not allowed in single-statement positions");if(h==="await using"){if(!this.canAwait)this.raise(this.start,"Await using cannot appear outside of async function");this.next()}return this.next(),this.parseVar(i,!1,h),this.semicolon(),this.finishNode(i,"VariableDeclaration")}var d=this.value,g=this.parseExpression();if(r===f.name&&g.type==="Identifier"&&this.eat(f.colon))return this.parseLabeledStatement(i,d,g,e);else return this.parseExpressionStatement(i,g)}};O.parseBreakContinueStatement=function(e,t){var n=t==="break";if(this.next(),this.eat(f.semi)||this.insertSemicolon())e.label=null;else if(this.type!==f.name)this.unexpected();else e.label=this.parseIdent(),this.semicolon();var r=0;for(;r<this.labels.length;++r){var i=this.labels[r];if(e.label==null||i.name===e.label.name){if(i.kind!=null&&(n||i.kind==="loop"))break;if(e.label&&n)break}}if(r===this.labels.length)this.raise(e.start,"Unsyntactic "+t);return this.finishNode(e,n?"BreakStatement":"ContinueStatement")};O.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")};O.parseDoStatement=function(e){if(this.next(),this.labels.push(jr),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(f._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6)this.eat(f.semi);else this.semicolon();return this.finishNode(e,"DoWhileStatement")};O.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(jr),this.enterScope(0),this.expect(f.parenL),this.type===f.semi){if(t>-1)this.unexpected(t);return this.parseFor(e,null)}var n=this.isLet();if(this.type===f._var||this.type===f._const||n){var r=this.startNode(),i=n?"let":this.value;return this.next(),this.parseVar(r,!0,i),this.finishNode(r,"VariableDeclaration"),this.parseForAfterInit(e,r,t)}var o=this.isContextual("let"),s=!1,p=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(p){var l=this.startNode();if(this.next(),p==="await using"){if(!this.canAwait)this.raise(this.start,"Await using cannot appear outside of async function");this.next()}return this.parseVar(l,!0,p),this.finishNode(l,"VariableDeclaration"),this.parseForAfterInit(e,l,t)}var h=this.containsEsc,d=new Rn,g=this.start,b=t>-1?this.parseExprSubscripts(d,"await"):this.parseExpression(!0,d);if(this.type===f._in||(s=this.options.ecmaVersion>=6&&this.isContextual("of"))){if(t>-1){if(this.type===f._in)this.unexpected(t);e.await=!0}else if(s&&this.options.ecmaVersion>=8){if(b.start===g&&!h&&b.type==="Identifier"&&b.name==="async")this.unexpected();else if(this.options.ecmaVersion>=9)e.await=!1}if(o&&s)this.raise(b.start,"The left-hand side of a for-of loop may not start with 'let'.");return this.toAssignable(b,!1,d),this.checkLValPattern(b),this.parseForIn(e,b)}else this.checkExpressionErrors(d,!0);if(t>-1)this.unexpected(t);return this.parseFor(e,b)};O.parseForAfterInit=function(e,t,n){if((this.type===f._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&t.declarations.length===1){if(this.type===f._in){if((t.kind==="using"||t.kind==="await using")&&!t.declarations[0].init)this.raise(this.start,"Using declaration is not allowed in for-in loops");if(this.options.ecmaVersion>=9&&n>-1)this.unexpected(n)}else if(this.options.ecmaVersion>=9)e.await=n>-1;return this.parseForIn(e,t)}if(n>-1)this.unexpected(n);return this.parseFor(e,t)};O.parseFunctionStatement=function(e,t,n){return this.next(),this.parseFunction(e,Qt|(n?0:Ir),!1,t)};O.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(f._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")};O.parseReturnStatement=function(e){if(!this.allowReturn)this.raise(this.start,"'return' outside of function");if(this.next(),this.eat(f.semi)||this.insertSemicolon())e.argument=null;else e.argument=this.parseExpression(),this.semicolon();return this.finishNode(e,"ReturnStatement")};O.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(f.braceL),this.labels.push(Cl),this.enterScope(ca);var t;for(var n=!1;this.type!==f.braceR;)if(this.type===f._case||this.type===f._default){var r=this.type===f._case;if(t)this.finishNode(t,"SwitchCase");if(e.cases.push(t=this.startNode()),t.consequent=[],this.next(),r)t.test=this.parseExpression();else{if(n)this.raiseRecoverable(this.lastTokStart,"Multiple default clauses");n=!0,t.test=null}this.expect(f.colon)}else{if(!t)this.unexpected();t.consequent.push(this.parseStatement(null))}if(this.exitScope(),t)this.finishNode(t,"SwitchCase");return this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")};O.parseThrowStatement=function(e){if(this.next(),Ne.test(this.input.slice(this.lastTokEnd,this.start)))this.raise(this.lastTokEnd,"Illegal newline after throw");return e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var vl=[];O.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type==="Identifier";return this.enterScope(t?aa:0),this.checkLValPattern(e,t?la:at),this.expect(f.parenR),e};O.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===f._catch){var t=this.startNode();if(this.next(),this.eat(f.parenL))t.param=this.parseCatchClauseParam();else{if(this.options.ecmaVersion<10)this.unexpected();t.param=null,this.enterScope(0)}t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}if(e.finalizer=this.eat(f._finally)?this.parseBlock():null,!e.handler&&!e.finalizer)this.raise(e.start,"Missing catch or finally clause");return this.finishNode(e,"TryStatement")};O.parseVarStatement=function(e,t,n){return this.next(),this.parseVar(e,!1,t,n),this.semicolon(),this.finishNode(e,"VariableDeclaration")};O.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(jr),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")};O.parseWithStatement=function(e){if(this.strict)this.raise(this.start,"'with' in strict mode");return this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")};O.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")};O.parseLabeledStatement=function(e,t,n,r){for(var i=0,o=this.labels;i<o.length;i+=1){var s=o[i];if(s.name===t)this.raise(n.start,"Label '"+t+"' is already declared")}var p=this.type.isLoop?"loop":this.type===f._switch?"switch":null;for(var l=this.labels.length-1;l>=0;l--){var h=this.labels[l];if(h.statementStart===e.start)h.statementStart=this.start,h.kind=p;else break}return this.labels.push({name:t,kind:p,statementStart:this.start}),e.body=this.parseStatement(r?r.indexOf("label")===-1?r+"label":r:"label"),this.labels.pop(),e.label=n,this.finishNode(e,"LabeledStatement")};O.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")};O.parseBlock=function(e,t,n){if(e===void 0)e=!0;if(t===void 0)t=this.startNode();if(t.body=[],this.expect(f.braceL),e)this.enterScope(0);while(this.type!==f.braceR){var r=this.parseStatement(null);t.body.push(r)}if(n)this.strict=!1;if(this.next(),e)this.exitScope();return this.finishNode(t,"BlockStatement")};O.parseFor=function(e,t){return e.init=t,this.expect(f.semi),e.test=this.type===f.semi?null:this.parseExpression(),this.expect(f.semi),e.update=this.type===f.parenR?null:this.parseExpression(),this.expect(f.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")};O.parseForIn=function(e,t){var n=this.type===f._in;if(this.next(),t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!n||this.options.ecmaVersion<8||this.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier"))this.raise(t.start,(n?"for-in":"for-of")+" loop variable declaration may not have an initializer");return e.left=t,e.right=n?this.parseExpression():this.parseMaybeAssign(),this.expect(f.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,n?"ForInStatement":"ForOfStatement")};O.parseVar=function(e,t,n,r){e.declarations=[],e.kind=n;for(;;){var i=this.startNode();if(this.parseVarId(i,n),this.eat(f.eq))i.init=this.parseMaybeAssign(t);else if(!r&&n==="const"&&!(this.type===f._in||this.options.ecmaVersion>=6&&this.isContextual("of")))this.unexpected();else if(!r&&(n==="using"||n==="await using")&&this.options.ecmaVersion>=17&&this.type!==f._in&&!this.isContextual("of"))this.raise(this.lastTokEnd,"Missing initializer in "+n+" declaration");else if(!r&&i.id.type!=="Identifier"&&!(t&&(this.type===f._in||this.isContextual("of"))))this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value");else i.init=null;if(e.declarations.push(this.finishNode(i,"VariableDeclarator")),!this.eat(f.comma))break}return e};O.parseVarId=function(e,t){e.id=t==="using"||t==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(e.id,t==="var"?$r:at,!1)};var Qt=1,Ir=2,da=4;O.parseFunction=function(e,t,n,r,i){if(this.initFunction(e),this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!r){if(this.type===f.star&&t&Ir)this.unexpected();e.generator=this.eat(f.star)}if(this.options.ecmaVersion>=8)e.async=!!r;if(t&Qt){if(e.id=t&da&&this.type!==f.name?null:this.parseIdent(),e.id&&!(t&Ir))this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?$r:at:pa)}var o=this.yieldPos,s=this.awaitPos,p=this.awaitIdentPos;if(this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Vr(e.async,e.generator)),!(t&Qt))e.id=this.type===f.name?this.parseIdent():null;return this.parseFunctionParams(e),this.parseFunctionBody(e,n,!1,i),this.yieldPos=o,this.awaitPos=s,this.awaitIdentPos=p,this.finishNode(e,t&Qt?"FunctionDeclaration":"FunctionExpression")};O.parseFunctionParams=function(e){this.expect(f.parenL),e.params=this.parseBindingList(f.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};O.parseClass=function(e,t){this.next();var n=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var r=this.enterClassBody(),i=this.startNode(),o=!1;i.body=[],this.expect(f.braceL);while(this.type!==f.braceR){var s=this.parseClassElement(e.superClass!==null);if(s){if(i.body.push(s),s.type==="MethodDefinition"&&s.kind==="constructor"){if(o)this.raiseRecoverable(s.start,"Duplicate constructor in the same class");o=!0}else if(s.key&&s.key.type==="PrivateIdentifier"&&Al(r,s))this.raiseRecoverable(s.key.start,"Identifier '#"+s.key.name+"' has already been declared")}}return this.strict=n,this.next(),e.body=this.finishNode(i,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")};O.parseClassElement=function(e){if(this.eat(f.semi))return null;var t=this.options.ecmaVersion,n=this.startNode(),r="",i=!1,o=!1,s="method",p=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(f.braceL))return this.parseClassStaticBlock(n),n;if(this.isClassElementNameStart()||this.type===f.star)p=!0;else r="static"}if(n.static=p,!r&&t>=8&&this.eatContextual("async"))if((this.isClassElementNameStart()||this.type===f.star)&&!this.canInsertSemicolon())o=!0;else r="async";if(!r&&(t>=9||!o)&&this.eat(f.star))i=!0;if(!r&&!o&&!i){var l=this.value;if(this.eatContextual("get")||this.eatContextual("set"))if(this.isClassElementNameStart())s=l;else r=l}if(r)n.computed=!1,n.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),n.key.name=r,this.finishNode(n.key,"Identifier");else this.parseClassElementName(n);if(t<13||this.type===f.parenL||s!=="method"||i||o){var h=!n.static&&wn(n,"constructor"),d=h&&e;if(h&&s!=="method")this.raise(n.key.start,"Constructor can't have get/set modifier");n.kind=h?"constructor":s,this.parseClassMethod(n,i,o,d)}else this.parseClassField(n);return n};O.isClassElementNameStart=function(){return this.type===f.name||this.type===f.privateId||this.type===f.num||this.type===f.string||this.type===f.bracketL||this.type.keyword};O.parseClassElementName=function(e){if(this.type===f.privateId){if(this.value==="constructor")this.raise(this.start,"Classes can't have an element named '#constructor'");e.computed=!1,e.key=this.parsePrivateIdent()}else this.parsePropertyName(e)};O.parseClassMethod=function(e,t,n,r){var i=e.key;if(e.kind==="constructor"){if(t)this.raise(i.start,"Constructor can't be a generator");if(n)this.raise(i.start,"Constructor can't be an async method")}else if(e.static&&wn(e,"prototype"))this.raise(i.start,"Classes may not have a static property named prototype");var o=e.value=this.parseMethod(t,n,r);if(e.kind==="get"&&o.params.length!==0)this.raiseRecoverable(o.start,"getter should have no params");if(e.kind==="set"&&o.params.length!==1)this.raiseRecoverable(o.start,"setter should have exactly one param");if(e.kind==="set"&&o.params[0].type==="RestElement")this.raiseRecoverable(o.params[0].start,"Setter cannot use rest params");return this.finishNode(e,"MethodDefinition")};O.parseClassField=function(e){if(wn(e,"constructor"))this.raise(e.key.start,"Classes can't have a field named 'constructor'");else if(e.static&&wn(e,"prototype"))this.raise(e.key.start,"Classes can't have a static field named 'prototype'");if(this.eat(f.eq))this.enterScope(en|In),e.value=this.parseMaybeAssign(),this.exitScope();else e.value=null;return this.semicolon(),this.finishNode(e,"PropertyDefinition")};O.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;this.labels=[],this.enterScope(vt|In);while(this.type!==f.braceR){var n=this.parseStatement(null);e.body.push(n)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")};O.parseClassId=function(e,t){if(this.type===f.name){if(e.id=this.parseIdent(),t)this.checkLValSimple(e.id,at,!1)}else{if(t===!0)this.unexpected();e.id=null}};O.parseClassSuper=function(e){e.superClass=this.eat(f._extends)?this.parseExprSubscripts(null,!1):null};O.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared};O.exitClassBody=function(){var e=this.privateNameStack.pop(),{declared:t,used:n}=e;if(!this.options.checkPrivateFields)return;var r=this.privateNameStack.length,i=r===0?null:this.privateNameStack[r-1];for(var o=0;o<n.length;++o){var s=n[o];if(!Lt(t,s.name))if(i)i.used.push(s);else this.raiseRecoverable(s.start,"Private field '#"+s.name+"' must be declared in an enclosing class")}};function Al(e,t){var n=t.key.name,r=e[n],i="true";if(t.type==="MethodDefinition"&&(t.kind==="get"||t.kind==="set"))i=(t.static?"s":"i")+t.kind;if(r==="iget"&&i==="iset"||r==="iset"&&i==="iget"||r==="sget"&&i==="sset"||r==="sset"&&i==="sget")return e[n]="true",!1;else if(!r)return e[n]=i,!1;else return!0}function wn(e,t){var{computed:n,key:r}=e;return!n&&(r.type==="Identifier"&&r.name===t||r.type==="Literal"&&r.value===t)}O.parseExportAllDeclaration=function(e,t){if(this.options.ecmaVersion>=11)if(this.eatContextual("as"))e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart);else e.exported=null;if(this.expectContextual("from"),this.type!==f.string)this.unexpected();if(e.source=this.parseExprAtom(),this.options.ecmaVersion>=16)e.attributes=this.parseWithClause();return this.semicolon(),this.finishNode(e,"ExportAllDeclaration")};O.parseExport=function(e,t){if(this.next(),this.eat(f.star))return this.parseExportAllDeclaration(e,t);if(this.eat(f._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement()){if(e.declaration=this.parseExportDeclaration(e),e.declaration.type==="VariableDeclaration")this.checkVariableExport(t,e.declaration.declarations);else this.checkExport(t,e.declaration.id,e.declaration.id.start);if(e.specifiers=[],e.source=null,this.options.ecmaVersion>=16)e.attributes=[]}else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from")){if(this.type!==f.string)this.unexpected();if(e.source=this.parseExprAtom(),this.options.ecmaVersion>=16)e.attributes=this.parseWithClause()}else{for(var n=0,r=e.specifiers;n<r.length;n+=1){var i=r[n];if(this.checkUnreserved(i.local),this.checkLocalExport(i.local),i.local.type==="Literal")this.raise(i.local.start,"A string literal cannot be used as an exported binding without `from`.")}if(e.source=null,this.options.ecmaVersion>=16)e.attributes=[]}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")};O.parseExportDeclaration=function(e){return this.parseStatement(null)};O.parseExportDefaultDeclaration=function(){var e;if(this.type===f._function||(e=this.isAsyncFunction())){var t=this.startNode();if(this.next(),e)this.next();return this.parseFunction(t,Qt|da,!1,e)}else if(this.type===f._class){var n=this.startNode();return this.parseClass(n,"nullableID")}else{var r=this.parseMaybeAssign();return this.semicolon(),r}};O.checkExport=function(e,t,n){if(!e)return;if(typeof t!=="string")t=t.type==="Identifier"?t.name:t.value;if(Lt(e,t))this.raiseRecoverable(n,"Duplicate export '"+t+"'");e[t]=!0};O.checkPatternExport=function(e,t){var n=t.type;if(n==="Identifier")this.checkExport(e,t,t.start);else if(n==="ObjectPattern")for(var r=0,i=t.properties;r<i.length;r+=1){var o=i[r];this.checkPatternExport(e,o)}else if(n==="ArrayPattern")for(var s=0,p=t.elements;s<p.length;s+=1){var l=p[s];if(l)this.checkPatternExport(e,l)}else if(n==="Property")this.checkPatternExport(e,t.value);else if(n==="AssignmentPattern")this.checkPatternExport(e,t.left);else if(n==="RestElement")this.checkPatternExport(e,t.argument)};O.checkVariableExport=function(e,t){if(!e)return;for(var n=0,r=t;n<r.length;n+=1){var i=r[n];this.checkPatternExport(e,i.id)}};O.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()};O.parseExportSpecifier=function(e){var t=this.startNode();return t.local=this.parseModuleExportName(),t.exported=this.eatContextual("as")?this.parseModuleExportName():t.local,this.checkExport(e,t.exported,t.exported.start),this.finishNode(t,"ExportSpecifier")};O.parseExportSpecifiers=function(e){var t=[],n=!0;this.expect(f.braceL);while(!this.eat(f.braceR)){if(!n){if(this.expect(f.comma),this.afterTrailingComma(f.braceR))break}else n=!1;t.push(this.parseExportSpecifier(e))}return t};O.parseImport=function(e){if(this.next(),this.type===f.string)e.specifiers=vl,e.source=this.parseExprAtom();else e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===f.string?this.parseExprAtom():this.unexpected();if(this.options.ecmaVersion>=16)e.attributes=this.parseWithClause();return this.semicolon(),this.finishNode(e,"ImportDeclaration")};O.parseImportSpecifier=function(){var e=this.startNode();if(e.imported=this.parseModuleExportName(),this.eatContextual("as"))e.local=this.parseIdent();else this.checkUnreserved(e.imported),e.local=e.imported;return this.checkLValSimple(e.local,at),this.finishNode(e,"ImportSpecifier")};O.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,at),this.finishNode(e,"ImportDefaultSpecifier")};O.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual("as"),e.local=this.parseIdent(),this.checkLValSimple(e.local,at),this.finishNode(e,"ImportNamespaceSpecifier")};O.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===f.name){if(e.push(this.parseImportDefaultSpecifier()),!this.eat(f.comma))return e}if(this.type===f.star)return e.push(this.parseImportNamespaceSpecifier()),e;this.expect(f.braceL);while(!this.eat(f.braceR)){if(!t){if(this.expect(f.comma),this.afterTrailingComma(f.braceR))break}else t=!1;e.push(this.parseImportSpecifier())}return e};O.parseWithClause=function(){var e=[];if(!this.eat(f._with))return e;this.expect(f.braceL);var t={},n=!0;while(!this.eat(f.braceR)){if(!n){if(this.expect(f.comma),this.afterTrailingComma(f.braceR))break}else n=!1;var r=this.parseImportAttribute(),i=r.key.type==="Identifier"?r.key.name:r.key.value;if(Lt(t,i))this.raiseRecoverable(r.key.start,"Duplicate attribute key '"+i+"'");t[i]=!0,e.push(r)}return e};O.parseImportAttribute=function(){var e=this.startNode();if(e.key=this.type===f.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(f.colon),this.type!==f.string)this.unexpected();return e.value=this.parseExprAtom(),this.finishNode(e,"ImportAttribute")};O.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===f.string){var e=this.parseLiteral(this.value);if(bl.test(e.value))this.raise(e.start,"An export name cannot include a lone surrogate.");return e}return this.parseIdent(!0)};O.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)};O.isDirectiveCandidate=function(e){return this.options.ecmaVersion>=5&&e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value==="string"&&(this.input[e.start]==='"'||this.input[e.start]==="'")};var Ke=fe.prototype;Ke.toAssignable=function(e,t,n){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":if(this.inAsync&&e.name==="await")this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":if(e.type="ObjectPattern",n)this.checkPatternErrors(n,!0);for(var r=0,i=e.properties;r<i.length;r+=1){var o=i[r];if(this.toAssignable(o,t),o.type==="RestElement"&&(o.argument.type==="ArrayPattern"||o.argument.type==="ObjectPattern"))this.raise(o.argument.start,"Unexpected token")}break;case"Property":if(e.kind!=="init")this.raise(e.key.start,"Object pattern can't contain getter or setter");this.toAssignable(e.value,t);break;case"ArrayExpression":if(e.type="ArrayPattern",n)this.checkPatternErrors(n,!0);this.toAssignableList(e.elements,t);break;case"SpreadElement":if(e.type="RestElement",this.toAssignable(e.argument,t),e.argument.type==="AssignmentPattern")this.raise(e.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":if(e.operator!=="=")this.raise(e.left.end,"Only '=' operator can be used for specifying default value.");e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(e.expression,t,n);break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}else if(n)this.checkPatternErrors(n,!0);return e};Ke.toAssignableList=function(e,t){var n=e.length;for(var r=0;r<n;r++){var i=e[r];if(i)this.toAssignable(i,t)}if(n){var o=e[n-1];if(this.options.ecmaVersion===6&&t&&o&&o.type==="RestElement"&&o.argument.type!=="Identifier")this.unexpected(o.argument.start)}return e};Ke.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")};Ke.parseRestBinding=function(){var e=this.startNode();if(this.next(),this.options.ecmaVersion===6&&this.type!==f.name)this.unexpected();return e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")};Ke.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case f.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(f.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case f.braceL:return this.parseObj(!0)}return this.parseIdent()};Ke.parseBindingList=function(e,t,n,r){var i=[],o=!0;while(!this.eat(e)){if(o)o=!1;else this.expect(f.comma);if(t&&this.type===f.comma)i.push(null);else if(n&&this.afterTrailingComma(e))break;else if(this.type===f.ellipsis){var s=this.parseRestBinding();if(this.parseBindingListItem(s),i.push(s),this.type===f.comma)this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");this.expect(e);break}else i.push(this.parseAssignableListItem(r))}return i};Ke.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t};Ke.parseBindingListItem=function(e){return e};Ke.parseMaybeDefault=function(e,t,n){if(n=n||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(f.eq))return n;var r=this.startNodeAt(e,t);return r.left=n,r.right=this.parseMaybeAssign(),this.finishNode(r,"AssignmentPattern")};Ke.checkLValSimple=function(e,t,n){if(t===void 0)t=kn;var r=t!==kn;switch(e.type){case"Identifier":if(this.strict&&this.reservedWordsStrictBind.test(e.name))this.raiseRecoverable(e.start,(r?"Binding ":"Assigning to ")+e.name+" in strict mode");if(r){if(t===at&&e.name==="let")this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name");if(n){if(Lt(n,e.name))this.raiseRecoverable(e.start,"Argument name clash");n[e.name]=!0}if(t!==ua)this.declareName(e.name,t,e.start)}break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(r)this.raiseRecoverable(e.start,"Binding member expression");break;case"ParenthesizedExpression":if(r)this.raiseRecoverable(e.start,"Binding parenthesized expression");return this.checkLValSimple(e.expression,t,n);default:this.raise(e.start,(r?"Binding":"Assigning to")+" rvalue")}};Ke.checkLValPattern=function(e,t,n){if(t===void 0)t=kn;switch(e.type){case"ObjectPattern":for(var r=0,i=e.properties;r<i.length;r+=1){var o=i[r];this.checkLValInnerPattern(o,t,n)}break;case"ArrayPattern":for(var s=0,p=e.elements;s<p.length;s+=1){var l=p[s];if(l)this.checkLValInnerPattern(l,t,n)}break;default:this.checkLValSimple(e,t,n)}};Ke.checkLValInnerPattern=function(e,t,n){if(t===void 0)t=kn;switch(e.type){case"Property":this.checkLValInnerPattern(e.value,t,n);break;case"AssignmentPattern":this.checkLValPattern(e.left,t,n);break;case"RestElement":this.checkLValPattern(e.argument,t,n);break;default:this.checkLValPattern(e,t,n)}};var Ue=function(t,n,r,i,o){this.token=t,this.isExpr=!!n,this.preserveSpace=!!r,this.override=i,this.generator=!!o},de={b_stat:new Ue("{",!1),b_expr:new Ue("{",!0),b_tmpl:new Ue("${",!1),p_stat:new Ue("(",!1),p_expr:new Ue("(",!0),q_tmpl:new Ue("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new Ue("function",!1),f_expr:new Ue("function",!0),f_expr_gen:new Ue("function",!0,!1,null,!0),f_gen:new Ue("function",!1,!1,null,!0)},Rt=fe.prototype;Rt.initialContext=function(){return[de.b_stat]};Rt.curContext=function(){return this.context[this.context.length-1]};Rt.braceIsBlock=function(e){var t=this.curContext();if(t===de.f_expr||t===de.f_stat)return!0;if(e===f.colon&&(t===de.b_stat||t===de.b_expr))return!t.isExpr;if(e===f._return||e===f.name&&this.exprAllowed)return Ne.test(this.input.slice(this.lastTokEnd,this.start));if(e===f._else||e===f.semi||e===f.eof||e===f.parenR||e===f.arrow)return!0;if(e===f.braceL)return t===de.b_stat;if(e===f._var||e===f._const||e===f.name)return!1;return!this.exprAllowed};Rt.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if(t.token==="function")return t.generator}return!1};Rt.updateContext=function(e){var t,n=this.type;if(n.keyword&&e===f.dot)this.exprAllowed=!1;else if(t=n.updateContext)t.call(this,e);else this.exprAllowed=n.beforeExpr};Rt.overrideContext=function(e){if(this.curContext()!==e)this.context[this.context.length-1]=e};f.parenR.updateContext=f.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var e=this.context.pop();if(e===de.b_stat&&this.curContext().token==="function")e=this.context.pop();this.exprAllowed=!e.isExpr};f.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?de.b_stat:de.b_expr),this.exprAllowed=!0};f.dollarBraceL.updateContext=function(){this.context.push(de.b_tmpl),this.exprAllowed=!0};f.parenL.updateContext=function(e){var t=e===f._if||e===f._for||e===f._with||e===f._while;this.context.push(t?de.p_stat:de.p_expr),this.exprAllowed=!0};f.incDec.updateContext=function(){};f._function.updateContext=f._class.updateContext=function(e){if(e.beforeExpr&&e!==f._else&&!(e===f.semi&&this.curContext()!==de.p_stat)&&!(e===f._return&&Ne.test(this.input.slice(this.lastTokEnd,this.start)))&&!((e===f.colon||e===f.braceL)&&this.curContext()===de.b_stat))this.context.push(de.f_expr);else this.context.push(de.f_stat);this.exprAllowed=!1};f.colon.updateContext=function(){if(this.curContext().token==="function")this.context.pop();this.exprAllowed=!0};f.backQuote.updateContext=function(){if(this.curContext()===de.q_tmpl)this.context.pop();else this.context.push(de.q_tmpl);this.exprAllowed=!1};f.star.updateContext=function(e){if(e===f._function){var t=this.context.length-1;if(this.context[t]===de.f_expr)this.context[t]=de.f_expr_gen;else this.context[t]=de.f_gen}this.exprAllowed=!0};f.name.updateContext=function(e){var t=!1;if(this.options.ecmaVersion>=6&&e!==f.dot){if(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())t=!0}this.exprAllowed=t};var H=fe.prototype;H.checkPropClash=function(e,t,n){if(this.options.ecmaVersion>=9&&e.type==="SpreadElement")return;if(this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))return;var r=e.key,i;switch(r.type){case"Identifier":i=r.name;break;case"Literal":i=String(r.value);break;default:return}var o=e.kind;if(this.options.ecmaVersion>=6){if(i==="__proto__"&&o==="init"){if(t.proto)if(n){if(n.doubleProto<0)n.doubleProto=r.start}else this.raiseRecoverable(r.start,"Redefinition of __proto__ property");t.proto=!0}return}i="$"+i;var s=t[i];if(s){var p;if(o==="init")p=this.strict&&s.init||s.get||s.set;else p=s.init||s[o];if(p)this.raiseRecoverable(r.start,"Redefinition of property")}else s=t[i]={init:!1,get:!1,set:!1};s[o]=!0};H.parseExpression=function(e,t){var n=this;return this.catchStackOverflow(function(){var{start:r,startLoc:i}=n,o=n.parseMaybeAssign(e,t);if(n.type===f.comma){var s=n.startNodeAt(r,i);s.expressions=[o];while(n.eat(f.comma))s.expressions.push(n.parseMaybeAssign(e,t));return n.finishNode(s,"SequenceExpression")}return o})};H.parseMaybeAssign=function(e,t,n){if(this.isContextual("yield"))if(this.inGenerator)return this.parseYield(e);else this.exprAllowed=!1;var r=!1,i=-1,o=-1,s=-1;if(t)i=t.parenthesizedAssign,o=t.trailingComma,s=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1;else t=new Rn,r=!0;var p=this.start,l=this.startLoc;if(this.type===f.parenL||this.type===f.name)this.potentialArrowAt=this.start,this.potentialArrowInForAwait=e==="await";var h=this.parseMaybeConditional(e,t);if(n)h=n.call(this,h,p,l);if(this.type.isAssign){var d=this.startNodeAt(p,l);if(d.operator=this.value,this.type===f.eq)h=this.toAssignable(h,!1,t);if(!r)t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1;if(t.shorthandAssign>=h.start)t.shorthandAssign=-1;if(this.type===f.eq)this.checkLValPattern(h);else this.checkLValSimple(h);if(d.left=h,this.next(),d.right=this.parseMaybeAssign(e),s>-1)t.doubleProto=s;return this.finishNode(d,"AssignmentExpression")}else if(r)this.checkExpressionErrors(t,!0);if(i>-1)t.parenthesizedAssign=i;if(o>-1)t.trailingComma=o;return h};H.parseMaybeConditional=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return i;if(!(i.type==="ArrowFunctionExpression"&&i.start===n)&&this.eat(f.question)){var o=this.startNodeAt(n,r);return o.test=i,o.consequent=this.parseMaybeAssign(),this.expect(f.colon),o.alternate=this.parseMaybeAssign(e),this.finishNode(o,"ConditionalExpression")}return i};H.parseExprOps=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeUnary(t,!1,!1,e);if(this.checkExpressionErrors(t))return i;return i.start===n&&i.type==="ArrowFunctionExpression"?i:this.parseExprOp(i,n,r,-1,e)};H.parseExprOp=function(e,t,n,r,i){var o=this.type.binop;if(o!=null&&(!i||this.type!==f._in)){if(o>r){var s=this.type===f.logicalOR||this.type===f.logicalAND,p=this.type===f.coalesce;if(p)o=f.logicalAND.binop;var l=this.value;this.next();var h=this.start,d=this.startLoc,g=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,i),h,d,o,i),b=this.buildBinary(t,n,e,g,l,s||p);if(s&&this.type===f.coalesce||p&&(this.type===f.logicalOR||this.type===f.logicalAND))this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses");return this.parseExprOp(b,t,n,r,i)}}return e};H.buildBinary=function(e,t,n,r,i,o){if(r.type==="PrivateIdentifier")this.raise(r.start,"Private identifier can only be left side of binary expression");var s=this.startNodeAt(e,t);return s.left=n,s.operator=i,s.right=r,this.finishNode(s,o?"LogicalExpression":"BinaryExpression")};H.parseMaybeUnary=function(e,t,n,r){var i=this.start,o=this.startLoc,s;if(this.isContextual("await")&&this.canAwait)s=this.parseAwait(r),t=!0;else if(this.type.prefix){var p=this.startNode(),l=this.type===f.incDec;if(p.operator=this.value,p.prefix=!0,this.next(),p.argument=this.parseMaybeUnary(null,!0,l,r),this.checkExpressionErrors(e,!0),l)this.checkLValSimple(p.argument);else if(this.strict&&p.operator==="delete"&&fa(p.argument))this.raiseRecoverable(p.start,"Deleting local variable in strict mode");else if(p.operator==="delete"&&Lr(p.argument))this.raiseRecoverable(p.start,"Private fields can not be deleted");else t=!0;s=this.finishNode(p,l?"UpdateExpression":"UnaryExpression")}else if(!t&&this.type===f.privateId){if((r||this.privateNameStack.length===0)&&this.options.checkPrivateFields)this.unexpected();if(s=this.parsePrivateIdent(),this.type!==f._in)this.unexpected()}else{if(s=this.parseExprSubscripts(e,r),this.checkExpressionErrors(e))return s;while(this.type.postfix&&!this.canInsertSemicolon()){var h=this.startNodeAt(i,o);h.operator=this.value,h.prefix=!1,h.argument=s,this.checkLValSimple(s),this.next(),s=this.finishNode(h,"UpdateExpression")}}if(!n&&!(s.type==="ArrowFunctionExpression"&&s.start===i)&&this.eat(f.starstar))if(t)this.unexpected(this.lastTokStart);else return this.buildBinary(i,o,s,this.parseMaybeUnary(null,!1,!1,r),"**",!1);else return s};function fa(e){return e.type==="Identifier"||e.type==="ParenthesizedExpression"&&fa(e.expression)}function Lr(e){return e.type==="MemberExpression"&&e.property.type==="PrivateIdentifier"||e.type==="ChainExpression"&&Lr(e.expression)||e.type==="ParenthesizedExpression"&&Lr(e.expression)}H.parseExprSubscripts=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprAtom(e,t);if(i.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return i;var o=this.parseSubscripts(i,n,r,!1,t);if(e&&o.type==="MemberExpression"){if(e.parenthesizedAssign>=o.start)e.parenthesizedAssign=-1;if(e.parenthesizedBind>=o.start)e.parenthesizedBind=-1;if(e.trailingComma>=o.start)e.trailingComma=-1}return o};H.parseSubscripts=function(e,t,n,r,i){var o=this.options.ecmaVersion>=8&&e.type==="Identifier"&&e.name==="async"&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.potentialArrowAt===e.start,s=!1;while(!0){var p=this.parseSubscript(e,t,n,r,o,s,i);if(p.optional)s=!0;if(p===e||p.type==="ArrowFunctionExpression"){if(s){var l=this.startNodeAt(t,n);l.expression=p,p=this.finishNode(l,"ChainExpression")}return p}e=p}};H.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(f.arrow)};H.parseSubscriptAsyncArrow=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!0,r)};H.parseSubscript=function(e,t,n,r,i,o,s){var p=this.options.ecmaVersion>=11,l=p&&this.eat(f.questionDot);if(r&&l)this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var h=this.eat(f.bracketL);if(h||l&&this.type!==f.parenL&&this.type!==f.backQuote||this.eat(f.dot)){var d=this.startNodeAt(t,n);if(d.object=e,h)d.property=this.parseExpression(),this.expect(f.bracketR);else if(this.type===f.privateId&&e.type!=="Super")d.property=this.parsePrivateIdent();else d.property=this.parseIdent(this.options.allowReserved!=="never");if(d.computed=!!h,p)d.optional=l;e=this.finishNode(d,"MemberExpression")}else if(!r&&this.eat(f.parenL)){var g=new Rn,b=this.yieldPos,E=this.awaitPos,w=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var N=this.parseExprList(f.parenR,this.options.ecmaVersion>=8,!1,g);if(i&&!l&&this.shouldParseAsyncArrow()){if(this.checkPatternErrors(g,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0)this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function");return this.yieldPos=b,this.awaitPos=E,this.awaitIdentPos=w,this.parseSubscriptAsyncArrow(t,n,N,s)}this.checkExpressionErrors(g,!0),this.yieldPos=b||this.yieldPos,this.awaitPos=E||this.awaitPos,this.awaitIdentPos=w||this.awaitIdentPos;var D=this.startNodeAt(t,n);if(D.callee=e,D.arguments=N,p)D.optional=l;e=this.finishNode(D,"CallExpression")}else if(this.type===f.backQuote){if(l||o)this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var q=this.startNodeAt(t,n);q.tag=e,q.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(q,"TaggedTemplateExpression")}return e};H.parseExprAtom=function(e,t,n){if(this.type===f.slash)this.readRegexp();var r,i=this.potentialArrowAt===this.start;switch(this.type){case f._super:if(!this.allowSuper)this.raise(this.start,"'super' keyword outside a method");if(r=this.startNode(),this.next(),this.type===f.parenL&&!this.allowDirectSuper)this.raise(r.start,"super() call outside constructor of a subclass");if(this.type!==f.dot&&this.type!==f.bracketL&&this.type!==f.parenL)this.unexpected();return this.finishNode(r,"Super");case f._this:return r=this.startNode(),this.next(),this.finishNode(r,"ThisExpression");case f.name:var o=this.start,s=this.startLoc,p=this.containsEsc,l=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!p&&l.name==="async"&&!this.canInsertSemicolon()&&this.eat(f._function))return this.overrideContext(de.f_expr),this.parseFunction(this.startNodeAt(o,s),0,!1,!0,t);if(i&&!this.canInsertSemicolon()){if(this.eat(f.arrow))return this.parseArrowExpression(this.startNodeAt(o,s),[l],!1,t);if(this.options.ecmaVersion>=8&&l.name==="async"&&this.type===f.name&&!p&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc)){if(l=this.parseIdent(!1),this.canInsertSemicolon()||!this.eat(f.arrow))this.unexpected();return this.parseArrowExpression(this.startNodeAt(o,s),[l],!0,t)}}return l;case f.regexp:var h=this.value;return r=this.parseLiteral(h.value),r.regex={pattern:h.pattern,flags:h.flags},r;case f.num:case f.string:return this.parseLiteral(this.value);case f._null:case f._true:case f._false:return r=this.startNode(),r.value=this.type===f._null?null:this.type===f._true,r.raw=this.type.keyword,this.next(),this.finishNode(r,"Literal");case f.parenL:var d=this.start,g=this.parseParenAndDistinguishExpression(i,t);if(e){if(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(g))e.parenthesizedAssign=d;if(e.parenthesizedBind<0)e.parenthesizedBind=d}return g;case f.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(f.bracketR,!0,!0,e),this.finishNode(r,"ArrayExpression");case f.braceL:return this.overrideContext(de.b_expr),this.parseObj(!1,e);case f._function:return r=this.startNode(),this.next(),this.parseFunction(r,0);case f._class:return this.parseClass(this.startNode(),!1);case f._new:return this.parseNew();case f.backQuote:return this.parseTemplate();case f._import:if(this.options.ecmaVersion>=11)return this.parseExprImport(n);else return this.unexpected();default:return this.parseExprAtomDefault()}};H.parseExprAtomDefault=function(){this.unexpected()};H.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc)this.raiseRecoverable(this.start,"Escape sequence in keyword import");if(this.next(),this.type===f.parenL&&!e)return this.parseDynamicImport(t);else if(this.type===f.dot){var n=this.startNodeAt(t.start,t.loc&&t.loc.start);return n.name="import",t.meta=this.finishNode(n,"Identifier"),this.parseImportMeta(t)}else this.unexpected()};H.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)if(!this.eat(f.parenR))if(this.expect(f.comma),!this.afterTrailingComma(f.parenR)){if(e.options=this.parseMaybeAssign(),!this.eat(f.parenR)){if(this.expect(f.comma),!this.afterTrailingComma(f.parenR))this.unexpected()}}else e.options=null;else e.options=null;else if(!this.eat(f.parenR)){var t=this.start;if(this.eat(f.comma)&&this.eat(f.parenR))this.raiseRecoverable(t,"Trailing comma is not allowed in import()");else this.unexpected(t)}return this.finishNode(e,"ImportExpression")};H.parseImportMeta=function(e){this.next();var t=this.containsEsc;if(e.property=this.parseIdent(!0),e.property.name!=="meta")this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'");if(t)this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters");if(this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere)this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module");return this.finishNode(e,"MetaProperty")};H.parseLiteral=function(e){var t=this.startNode();if(t.value=e,t.raw=this.input.slice(this.start,this.end),t.raw.charCodeAt(t.raw.length-1)===110)t.bigint=t.value!=null?t.value.toString():t.raw.slice(0,-1).replace(/_/g,"");return this.next(),this.finishNode(t,"Literal")};H.parseParenExpression=function(){this.expect(f.parenL);var e=this.parseExpression();return this.expect(f.parenR),e};H.shouldParseArrow=function(e){return!this.canInsertSemicolon()};H.parseParenAndDistinguishExpression=function(e,t){var n=this.start,r=this.startLoc,i,o=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var s=this.start,p=this.startLoc,l=[],h=!0,d=!1,g=new Rn,b=this.yieldPos,E=this.awaitPos,w;this.yieldPos=0,this.awaitPos=0;while(this.type!==f.parenR)if(h?h=!1:this.expect(f.comma),o&&this.afterTrailingComma(f.parenR,!0)){d=!0;break}else if(this.type===f.ellipsis){if(w=this.start,l.push(this.parseParenItem(this.parseRestBinding())),this.type===f.comma)this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else l.push(this.parseMaybeAssign(!1,g,this.parseParenItem));var N=this.lastTokEnd,D=this.lastTokEndLoc;if(this.expect(f.parenR),e&&this.shouldParseArrow(l)&&this.eat(f.arrow))return this.checkPatternErrors(g,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=b,this.awaitPos=E,this.parseParenArrowList(n,r,l,t);if(!l.length||d)this.unexpected(this.lastTokStart);if(w)this.unexpected(w);if(this.checkExpressionErrors(g,!0),this.yieldPos=b||this.yieldPos,this.awaitPos=E||this.awaitPos,l.length>1)i=this.startNodeAt(s,p),i.expressions=l,this.finishNodeAt(i,"SequenceExpression",N,D);else i=l[0]}else i=this.parseParenExpression();if(this.options.preserveParens){var q=this.startNodeAt(n,r);return q.expression=i,this.finishNode(q,"ParenthesizedExpression")}else return i};H.parseParenItem=function(e){return e};H.parseParenArrowList=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!1,r)};var Pl=[];H.parseNew=function(){if(this.containsEsc)this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===f.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name="new",e.meta=this.finishNode(t,"Identifier"),this.next();var n=this.containsEsc;if(e.property=this.parseIdent(!0),e.property.name!=="target")this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'");if(n)this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters");if(!this.allowNewDotTarget)this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block");return this.finishNode(e,"MetaProperty")}var r=this.start,i=this.startLoc;if(e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),r,i,!0,!1),e.callee.type==="Super")this.raiseRecoverable(r,"Invalid use of 'super'");if(this.eat(f.parenL))e.arguments=this.parseExprList(f.parenR,this.options.ecmaVersion>=8,!1);else e.arguments=Pl;return this.finishNode(e,"NewExpression")};H.parseTemplateElement=function(e){var t=e.isTagged,n=this.startNode();if(this.type===f.invalidTemplate){if(!t)this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal");n.value={raw:this.value.replace(/\r\n?/g,`
18
+ }`:`{ ${r} }`}var Ml=/^[A-Za-z_$][\w$]*/,Ol=/[A-Za-z_$][\w$]*/g,ua=/^(?:const|in|out)\s+/;function lt(e){let t=[],n=0,r=0;for(let i=0;i<e.length;i++){let o=e[i];if(o==="<"||o==="("||o==="["||o==="{")n++;else if(o===">"||o===")"||o==="]"||o==="}")n=Math.max(n-1,0);else if(o===","&&n===0)t.push(e.slice(r,i)),r=i+1}return t.push(e.slice(r)),t}function da(e){let t=lt(e).map((r)=>r.trim()).filter((r)=>r.length>0);if(t.length===0)return null;return[t.map((r)=>{let i=r;while(ua.test(i))i=i.replace(ua,"");return i.match(Ml)?.[0]??r}).join(", "),t.join(", ")]}function fa(e,t,n){let r=e.scriptGenericsAttribute?.value;if(!r)return;for(let[i]of r.matchAll(Ol)){if(e.typeImportBindingsByLocalName.has(i))t.add(i);if(n.has(i))continue;let o=e.localTypeDeclarationsByName.get(i);if(!o)continue;n.add(i),Ie(e,o.node,t,n)}}var Bl=null;function Fl(e,t,n){let r={value:void 0,replace:!1};if(!n||typeof n!=="object"||!("type"in n))return r;if(n.type==="Identifier")r.value=n.name,r.replace=!0;else if(n.type==="Literal")r.value=String(n.value);else if(n.type==="MemberExpression")r.value=Fn(e,t,n);else if((n.type==="ObjectExpression"||n.type==="TemplateLiteral")&&"start"in n&&"end"in n&&typeof n.start==="number"&&typeof n.end==="number")r.value=le(e,n.start,n.end);return r}function $l(e,t,n){if(!ye(n))return null;let r=Kt(e,n.name);if(Ke(r))return Jr(e,t,r).slot_props;let i=t.findVariableTypeAndDescription(n.name);if(!i)return null;let o=pn(i.type);if(!o)return null;let s={};for(let c of o)s[c.name]={value:c.type,replace:!1};return s}function Jr(e,t,n){let r={},i=!1;for(let o of n.properties){if(o.type==="SpreadElement"){let c=$l(e,t,o.argument);if(c)Object.assign(r,c);else i=!0,pe(e,"spread-unresolved","slot_props",`Slot props spread a value sveld can't resolve; its shape is widened to "Record<string, any>".`,oe(e,o));continue}if(o.type!=="Property"||o.computed)continue;let s=t.getPropertyName(o.key);if(!s)continue;r[s]=Fl(e,t,o.value)}return{slot_props:r,hasUnresolvedSpread:i}}function Vl(e,t){if(!t||typeof t!=="object"||!("type"in t))return null;if(t.type==="Identifier"){let o=t,s=e.propLocalToPublicName.get(o.name);if(!s)return null;return{publicName:s,trackingName:o.name}}if(t.type!=="MemberExpression")return null;let n=t,r=n.object&&typeof n.object==="object"&&"type"in n.object&&n.object.type==="Identifier"?n.object.name:void 0;if(!r||!e.wholePropsLocals.has(r))return null;let i;if(!n.computed&&n.property&&typeof n.property==="object"&&"type"in n.property){if(n.property.type==="Identifier")i=n.property.name;else if(n.property.type==="Literal"&&n.property.value!=null)i=String(n.property.value)}else if(n.computed&&n.property&&typeof n.property==="object"&&"type"in n.property&&n.property.type==="Literal"&&"value"in n.property&&n.property.value!=null)i=String(n.property.value);if(!i)return null;return{publicName:i,trackingName:i}}function ha(e,t){let n=t;if(n&&typeof n==="object"&&"type"in n&&n.type==="ChainExpression")n=n.expression;if(!n||typeof n!=="object"||!("type"in n)||n.type!=="CallExpression")return null;let r=n;if(!r.callee||typeof r.callee!=="object"||!("type"in r.callee))return null;let i=Vl(e,r.callee);if(!i)return null;return{...i,arguments:r.arguments}}function bn(e,{slot_name:t,slot_props:n,slot_props_unresolved_spread:r,slot_fallback:i,slot_description:o,slot_deprecated:s,slot_tags:c,slot_internal:l,source:u}){let f=t===void 0||t==="",y=f?Bl:t??"",g=ze(i),b=n===void 0||n===""?void 0:n,P=o?.trim()||void 0;if(e.slots.has(y)){let N=e.slots.get(y);if(N)e.slots.set(y,{...N,default:N.default??f,fallback:g,slot_props:N.slot_props===void 0?b:N.slot_props,slot_props_unresolved_spread:N.slot_props_unresolved_spread||r,description:N.description||P,deprecated:N.deprecated??s,tags:N.tags||c,...N.internal||l?{internal:!0}:{},source:u||N.source})}else e.slots.set(y,{name:y,default:f,fallback:g,slot_props:b,slot_props_unresolved_spread:r,description:P,deprecated:s,tags:c,...l?{internal:!0}:{},source:u})}var jl=/\s*=\s*/;function Hl(e){let t=e.indexOf("<");if(t===-1||!e.endsWith(">"))return e;let n=e.slice(0,t),r=e.slice(t+1,-1),i=lt(r).map((o)=>o.trim().replace(jl," = ")).join(", ");return`${n}<${i}>`}var ql=/\s/;function Zr(e,t,n){let r=t;while(r<n){let i=e[r];if(i==="/"&&e[r+1]==="/"){let o=e.indexOf(`
19
+ `,r+2);if(o===-1||o>=n)return!0;r=o+1}else if(i==="/"&&e[r+1]==="*"&&e[r+2]!=="*"){let o=e.indexOf("*/",r+2);if(o===-1||o+2>n)return!1;r=o+2}else if(i===" "||i===`
20
+ `||i==="\t"||i==="\r"||ql.test(i))r++;else return!1}return!0}var Ul=/;$/,Gl=/^-\s*/;function ei(e){let t=[],n,r=!1;for(let i of e){let o=$n(i);if(n!==void 0){if(o)t.push(i.trim()),n=void 0;else t.push(i.slice(Math.min(n,cn(i))).trimEnd());continue}let s=i.trim();if(s===""){r=t.length>0;continue}if(r)t.push("");if(r=!1,t.push(s),o)n=cn(i)}return t.join(`
21
+ `).trimEnd()}function Pt(e){if(e===void 0)return;let t=e.replace(Gl,"").trim();return t===""?"":t}function ga(e){let t=e.name?`${e.name} ${e.description}`:e.description;return Pt(ei(t.split(`
22
+ `)))}var Wl=new Set(["restProps","slot","snippet","event","typedef","callback"]),Xr=new Set(["property","type"]),Kl=new Set(["slot","snippet","typedef","callback"]);function Jn(e){if(!e||e.length===0)return;return e[xa(e)].content}function xa(e){let t=0;while(e[t+1]?.continuesType)t++;return t}function ma(e){return!e||!e.tag&&!e.continuesType&&e.content.trim()===""}function zl(e){return e.text.split(`
23
+ `).length===e.lines.length}function Yr(e,t){if(t<=0)return e;return e.split(`
24
+ `).slice(0,-t).join(`
25
+ `).trimEnd()}var ba=new Set(["since","example","see"]),Jl=new Set(["bindable","default","required"]);function Xl(e){return e.length>0?e.map((t)=>({name:t.tag,body:t.text})):void 0}function Qr(e){let t=e.trim();return t===""?!0:t}function Yl(e){let t=e.trim().replace(Ul,"").trimEnd();if(!t.startsWith("{")||!t.endsWith("}"))return!1;let n=0,r=null;for(let i=0;i<t.length;i++){let o=t[i];if(r!==null){if(o==="\\"){i++;continue}if(o===r)r=null;continue}if(o==='"'||o==="'"||o==="`"){r=o;continue}if(o==="{"||o==="["||o==="(")n++;else if(o==="}"||o==="]"||o===")"){if(n--,n===0&&i<t.length-1)return!1}}return n===0}function Ql(e){let t=e;if(!t.startsWith("/*"))t=`/*${t}`;if(!t.endsWith("*/"))t+="*/";return t}var Zl=new Set(["type","param","returns","return","extends","extendProps","restProps","slot","snippet","event","typedef","callback","bindable","deprecated","ignore","internal","csspart","cssprop","cssproperty"]);function ti(e,t){let n=e.parsedJsDocByText.get(t);if(n===void 0)n=Dr(t),e.parsedJsDocByText.set(t,n);return n}function ni(e){let t=e[0]?.tags??[],n,r=[],i,o,s,c=!1,l=[],u=[],f=[];for(let y of t)if(y.tag==="type")n=y;else if(y.tag==="param")r.push(y);else if(y.tag==="returns"||y.tag==="return")i=y;else if(y.tag==="deprecated")s??=Qr(y.text);else if(y.tag==="ignore"||y.tag==="internal")c=!0;else if(y.tag==="sveld-ignore")f.push(y.name);else if(ba.has(y.tag))u.push(y);else if(y.tag==="bindable"){if(y.type)continue;let g=`${y.name}${y.description?` ${y.description}`:""}`.trim();if(g==="readonly"||g==="writable")o??=g}else if(!Zl.has(y.tag))l.push(y);return{type:n,param:r,returns:i,binding:o,deprecated:s,internal:c,additional:l,passthrough:u,ignore:f,description:e[0]?.description}}function eu(e,t){if(typeof t.start!=="number"||typeof t.end!=="number")return;let n=e.jsDocBlocksByStart.get(t.start);if(n===void 0||n.end!==t.end)return;return[n]}function tu(e){if(!e||e.length===0)return;let t=e[e.length-1];return t&&typeof t==="object"&&"value"in t?t:void 0}function Ta(e,t,n){if(!t||t.length===0||n===void 0||!e.source)return;for(let r=t.length-1;r>=0;r--){let i=t[r];if(!i||typeof i!=="object"||!("value"in i)||!("end"in i))continue;if(typeof i.end!=="number"||!("start"in i)||typeof i.start!=="number")continue;if("type"in i&&i.type==="Line"||!String(i.value).startsWith("*"))continue;if(Zr(e.source,i.end,n))return i}return}function nu(e){let t=new Set,n=(i)=>{let{leadingComments:o,start:s}=i,c=Ta(e,o,s);if(c)t.add(c.start)};for(let i of e.funcDecls.values())n(i);let r=[{root:e.parsed?.module,isModule:!0},{root:e.parsed?.instance,isModule:!1}];for(let{root:i,isModule:o}of r)for(let s of(i&&St(i))??[]){let c=s,l=c.type==="ExportNamedDeclaration",u=l?c.declaration:c;if(u?.type==="FunctionDeclaration"){if(l)n(c)}else if(u?.type==="ClassDeclaration"&&o){n(l?c:u);for(let f of u.body?.body??[])if(f.type==="MethodDefinition")n(f)}else if(u?.type==="VariableDeclaration"&&(o||!l||u.kind==="const")&&u.declarations?.length===1&&ru.has(u.declarations[0].init?.type??""))n(c)}return t}var ru=new Set(["ArrowFunctionExpression","FunctionExpression"]);function Ue(e,t,n){if(!n?.leadingComments)return;let r=Ta(e,n.leadingComments,n.start);if(!r)return;return lu(e,t,[r])}function Ea(e,t,n){if(!n?.leadingComments)return;return Ue(e,t,n)}function iu(e,t,n){let r=e;if(t)r=`${e} extends ${t}`;if(n)r+=` = ${n}`;return r}var su=/^[^\s,]+/,ya=/^\s*,\s*([^\s,]+)/;function Ca(e,t){let n=e.optional?e.name:su.exec(e.name)?.[0];if(!n)return[];let r=[{name:n,constraint:iu(n,t,e.default)}],i=`${e.optional?"":e.name.slice(n.length)} ${e.description}`;for(let o=ya.exec(i);o;o=ya.exec(i))r.push({name:o[1],constraint:o[1]}),i=i.slice(o[0].length);return r}var au=/[\w$]+/g,ou=new Set(["property","param","returns","return"]);function cu(e,t,n){let r=[e[t].type];for(let o=t+1;ou.has(e[o]?.tag);o++)r.push(e[o].type);let i=new Set(r.join(" ").match(au));return n.some(({name:o})=>i.has(o))}function pu(e){let t=e?.trim();return!t||t==="object"||t==="Object"}function lu(e,t,n){if(!n)return;let r=tu(n);if(!r)return;let i=eu(e,r)??ti(e,Ql(r.value)),{type:o,param:s,returns:c,binding:l,deprecated:u,internal:f,additional:y,passthrough:g,ignore:b,description:P}=ni(i),N,D,j,U;if(o)N=t.aliasType(o.type);if(s.length>0)D=s.filter((G)=>!G.name.includes(".")).map((G)=>({name:G.name,type:t.aliasType(G.type),description:Pt(ei(G.description.split(`
26
+ `))),optional:G.optional||!1}));if(c)j=t.aliasType(c.type);let v,w=y;if(typeof r.start==="number"&&e.functionDocCommentStarts.has(r.start)){let G=y.filter((X)=>X.tag==="template"&&X.name);if(G.length>0)v=G.flatMap((X)=>Ca(X,t.aliasType(X.type))).map(({constraint:X})=>X).join(", "),w=y.filter((X)=>X.tag!=="template")}let M=ze(P?.trim());if(M||w.length>0){let G=[];if(M)G.push(M);for(let X of w)G.push(`@${X.tag}${X.text?` ${X.text}`:""}`);U=G.join(`
27
+ `)}return{type:N,params:D,returnType:j,description:U,binding:l,deprecated:u,tags:Xl(g),sveldIgnore:b.length>0?b:void 0,internal:f,typeParameters:v}}function Sa(e,t,n=e.source){if(!n)return;let r=!1,i=!1,o=!1,s=new Set,c=()=>{if(r&&i&&!o){o=!0;let P=e.componentFilePath?` in ${e.componentFilePath}`:"";console.warn(`Warning: Both @generics and @template tags are used to declare component generics${P}; their declarations are combined in the order encountered.`)}},l=(P,N)=>{if(s.has(P))pe(e,"generics-conflict",P,`Duplicate generic name "${P}".`,N);else s.add(P)},u=(P,N)=>{if(e.generics){let j=lt(e.generics[0]).map((U)=>U.trim()).indexOf(P.trim());if(j!==-1){let U=lt(e.generics[1]).map((v)=>v.trim());U[j]=N,e.generics=[e.generics[0],U.join(", ")];return}}t.accumulateGeneric(P,N)},f=(P,N)=>{if(e.typedefs.has(P))pe(e,"typedef-duplicate",P,`Duplicate typedef/callback name "${P}"; the later declaration overwrites the earlier one.`,N)},y=(P,N,D,j)=>{let U=P.findIndex((v)=>v.name===N.name);if(U===-1)P.push(N);else{let v=D?` of "${D}"`:"";pe(e,"property-duplicate",N.name,`Duplicate property "${N.name}"${v}; the later declaration overwrites the earlier one.`,j),P[U]=N}},g=n.includes("@template")?nu(e):new Set;e.functionDocCommentStarts=g;let b=Dr(n);for(let P of b)e.jsDocBlocksByStart.set(P.start,P);for(let{tags:P,description:N,lines:D,start:j}of b){let U=g.has(j),v,w,M,G,X=!1,be,a,p=[],d=[],m=[],E,S,k,x,C=[],T=!1,L=[],_,A,I,O=[],H=!1,K=[],W,J,ae=!1,Y=!0,ce=[],we,Z=!1,Se=[],Ne=(R)=>{if(Se.length===0)return Hl(R);let Q=`${R}<${Se.join(", ")}>`;return Se.length=0,Q},ve=new Map,Pe=new Set,Ve=new Set,bt,at;for(let R of P)if(R.lines.length>0)Pe.add(R.lines[0].number);for(let R of D)if(R.continuesType)Pe.add(R.number);let qt=new Set,sn=!1,Bn=!1;for(let R of D){if(!R.tag&&!R.continuesType&&R.content&&(Bn||R.content.trim()!=="}"))ve.set(R.number,R.content);if(R.tag!==void 0||R.continuesType)sn=!0;else if(!R.content.trim());else if(sn&&(R.indent||Bn))qt.add(R.number);else sn=!1;if($n(R.content))Bn=!Bn}let vr=(R,Q)=>{let fe=Q?Q.text.split(`
28
+ `):[],q=Q?.line;for(let ie of R){if(q!==void 0&&ie-q>1){let ue=q+1;while(ue<ie&&ma(D[ue]))ue++;if(ue===ie)for(let Te=q+1;Te<ie;Te++)fe.push("")}let rt=D[ie];fe.push(rt.indent+rt.content),q=ie}return ei(fe)},Tp=(R)=>{if(R.length===0)return;let Q=R[0].number,fe=[],q=!1;for(let ie=Q-1;ie>=0;ie--){if(Pe.has(ie)||qt.has(ie)||Ve.has(ie))break;if(ve.has(ie))fe.unshift(ie),q=!0;else if(q&&!ma(D[ie]))break}if(fe.length===0)return;for(let ie of fe)Ve.add(ie);return bt?.(fe[0]),vr(fe)},Pr=(R,Q)=>{if(!zl(R)){for(let q=1;q<R.lines.length;q++)Ve.add(R.lines[q].number);return}let fe=R.lines[R.lines.length-1].number;at=(q)=>Q(fe-q+1)},Ut=(R,Q,fe=!1)=>{let q=Pt(Jn(R)),ie=Q!==void 0&&Wl.has(Q.tag)&&!Pt(Jn(Q.lines)),rt=fe&&(Q===void 0||!Xr.has(Q.tag)),ue=[];for(let Te=1;Te<R.length;Te++){let de=R[Te];if((ie||rt)&&!qt.has(de.number))continue;if(!ve.get(de.number)?.trim()||Ve.has(de.number))continue;ue.push(de.number),Ve.add(de.number)}if(ue.length===0)return q;return vr(ue,{text:q??"",line:R[xa(R)].number})},Ep=(R,Q,fe,q)=>{if(v===void 0||M)return;if(a!==void 0&&qt.has(a+1))return;if(q?.tag!=="event"&&!Xr.has(q?.tag??""))return;if(Pt(Jn(fe)))return;let ie=Q?`@${R} "${Q}"`:`@${R}`;pe(e,"event-description-ambiguous",v,`Text after @event "${v}" was used as the description of ${ie}. Move it above the tag it describes, indent it as a continuation line, or give each event its own comment block.`,He(e,fe))},an=(R)=>{let{tag:Q,name:fe,lines:q}=P[R],ie=Tp(q);if(ie)Ep(Q,fe,q,P[R-1]);return ie},Ar=()=>{if(v!==void 0){let R=w&&w!=="object"&&w!=="Object"?w:void 0,Q;if(R)Q=R;else if(m.length>0)Q=xn(m,v,!0);else Q=w||"";if(a!==void 0){let q;for(let ue of P){let Te=ue.lines[0]?.number;if(typeof Te!=="number")continue;if(Te<=a)continue;if(Xr.has(ue.tag))continue;q=Te;break}let ie=[],rt=Array.from(ve.keys()).sort((ue,Te)=>ue-Te);for(let ue of rt){if(ue<=a)continue;if(q!==void 0&&ue>=q)continue;if(Ve.has(ue))continue;if(ve.get(ue)?.trim())ie.push(ue),Ve.add(ue)}if(ie.length>0)M=vr(ie,M?{text:M,line:a}:void 0)}let fe=Q===""&&(!e.events.has(v)||e.untypedJsDocEventNames.has(v));if(vt(e,{name:v,detail:Q,has_argument:!1,description:M,deprecated:G,tags:p.length>0?p:void 0,internal:X||void 0,source:be}),fe)e.untypedJsDocEventNames.add(v);e.eventDescriptions.set(v,M),e.jsDocEventNames.add(v),e.jsDocEventSources.set(v,be),dt(e,"event-no-source",v,d),m.length=0,v=void 0,w=void 0,M=void 0,G=void 0,X=!1,be=void 0,a=void 0,p=[],d=[]}},Ts=()=>{if(E!==void 0){let R,Q;if(L.length>0)R=xn(L,void 0,!0),Q=`type ${E} = ${R};`;else if(S)R=S,Q=Yl(R)?`interface ${E} ${R}`:`type ${E} = ${R};`;else R="{}",Q=`type ${E} = ${R};`;f(E,x),e.typedefs.set(E,{type:R,name:E,description:ze(k),ts:Q,tags:C.length>0?C:void 0,...T?{internal:!0}:{},source:x}),L.length=0,E=void 0,S=void 0,k=void 0,x=void 0,C=[],T=!1}},Es=()=>{if(_!==void 0){let fe=`(${K.map(({name:ie,type:rt,optional:ue})=>`${ie}${ue?"?":""}: ${rt}`).join(", ")}) => ${W||"void"}`,q=`type ${_} = ${fe};`;f(_,I),e.typedefs.set(_,{type:fe,name:_,description:ze(A),ts:q,tags:O.length>0?O:void 0,...H?{internal:!0}:{},source:I}),K.length=0,W=void 0,_=void 0,A=void 0,I=void 0,O=[],H=!1}},Cp=P.some((R)=>R.tag==="slot"||R.tag==="snippet"),Sp=P.some((R)=>R.tag==="extends"||R.tag==="extendProps"),vp=P.some((R)=>R.tag==="slot"||R.tag==="snippet"||R.tag==="event"||R.tag==="typedef"||R.tag==="callback");for(let R=0;R<P.length;R++){let{tag:Q,type:fe,name:q,description:ie,optional:rt,default:ue,text:Te,lines:de}=P[R],Gt=P[R+1],je=t.aliasType(fe);switch(bt=at,at=void 0,Q){case"extends":case"extendProps":if(e.extends!==void 0)pe(e,"extend-props-duplicate",q,`A second @extends/@extendProps tag ("${q}") overwrote the first ("${e.extends.interface}"); only one is used.`,He(e,de));if(e.extends={interface:q,import:je},Y)Y=!1;break;case"restProps":{let ee=q?ie?`${q} ${ie}`:q:ie,xe=Pt(ee),Oe=xe||an(R);if(!Oe&&Y&&!ae&&N)Oe=N,ae=!0;let ot={type:"Element",name:je,description:Oe||void 0};if(e.rest_props=ot,xe)Pr(P[R],(on)=>{ot.description=Pt(Yr(ee,on))||void 0});if(Y)Y=!1;break}case"slot":case"snippet":{let ee=Ut(de,Gt);if(!ee&&Y&&!ae&&N)ee=N,ae=!0;if(!ee&&ce.length===0)ee=an(R);if(Y)Y=!1;let xe=je;if(!xe)xe="Record<string, never>",pe(e,"slot-missing-type",q||"default",`@${Q}${q?` "${q}"`:""} is missing a required {Type} annotation; falling back to "${xe}".`,He(e,de));bn(e,{slot_name:q,slot_props:xe,slot_description:ee||void 0,slot_deprecated:we,slot_tags:ce.length>0?[...ce]:void 0,slot_internal:Z||void 0,source:He(e,de)}),ce.length=0,we=void 0,Z=!1;{let Oe=q===void 0||q===""?null:q;J=(ot)=>{let on=e.slots.get(Oe);if(on)on.tags=[...on.tags??[],ot]}}break}case"csspart":{let ee=Ut(de,Gt);e.cssParts.push({name:q,...ee?{description:ee}:{}});break}case"cssprop":case"cssproperty":{let ee=Ut(de,Gt);e.cssProperties.push({name:q,...je?{type:je}:{},...ue===void 0?{}:{default:ue},...ee?{description:ee}:{}});break}case"event":{let ee=Pt(Jn(de))||an(R);if(Ar(),v=q,w=je,a=de.length>0?de[0].number:void 0,M=ee,!M&&Y&&!ae&&N)M=N,ae=!0;if(be=He(e,de),ce.length>0)p.push(...ce),ce.length=0;if(J=(xe)=>p.push(xe),Y)Y=!1;break}case"type":if(v!==void 0)w=je;break;case"param":if(_!==void 0)K.push({name:q,type:je,optional:rt||!1});break;case"returns":case"return":if(_!==void 0)W=je;break;case"property":{let ee={name:q,type:je,description:Ut(de,Gt,v!==void 0),optional:rt||!1,default:ue};if(v!==void 0)y(m,ee,v,He(e,de));else if(E!==void 0&&pu(S))y(L,ee,E,He(e,de));break}case"typedef":{if(Ts(),E=Ne(q),S=je,x=He(e,de),k=Ut(de,Gt)||an(R),!k&&Y&&!ae&&N)k=N,ae=!0;if(ce.length>0)C.push(...ce),ce.length=0;if(T=Z,Z=!1,J=(ee)=>C.push(ee),Y)Y=!1;break}case"callback":{if(Es(),_=Ne(q),I=He(e,de),A=Ut(de,Gt)||an(R),!A&&Y&&!ae&&N)A=N,ae=!0;if(ce.length>0)O.push(...ce),ce.length=0;if(H=Z,Z=!1,J=(ee)=>O.push(ee),Y)Y=!1;break}case"generics":{let ee=je||q;for(let xe of lt(q))l(xe.trim(),He(e,de));if(r=!0,c(),u(q,ee),Y)Y=!1;break}case"template":{let ee=Ca(P[R],je),xe=R+1;while(P[xe]?.tag==="template")xe++;let Oe=P[xe];if((Oe?.tag==="typedef"||Oe?.tag==="callback")&&!Oe.name.includes("<")&&cu(P,xe,ee)){Se.push(...ee.map(({constraint:ot})=>ot));break}if(Cp&&!Sp){e.deferredSlotBlockGenerics.push(...ee);break}if(U)break;for(let ot of ee)l(ot.name,He(e,de)),u(ot.name,ot.constraint);if(i=!0,c(),Y)Y=!1;break}case"deprecated":{let ee=v!==void 0;if(ee?G!==void 0:we!==void 0)break;let xe=(Oe)=>{if(ee)G=Oe;else we=Oe};xe(Qr(Te)),Pr(P[R],(Oe)=>{xe(Qr(Yr(Te,Oe)))});break}case"ignore":case"internal":{if(v===void 0)Z=!0;else X=!0;break}case"sveld-ignore":if(v!==void 0)d.push(q);break;case"enum":case"class":case"implements":case"this":case"namespace":case"memberof":case"module":case"file":case"overview":break;default:{let ee={name:Q,body:Te};if(Pr(P[R],(xe)=>{ee.body=Yr(Te,xe)}),!ba.has(Q)&&!Jl.has(Q))pe(e,"jsdoc-unknown-tag",Q,`Unknown JSDoc tag "@${Q}"; passed through unchanged. If this is a typo, fix the tag name.`,He(e,de));if(J)J(ee);else ce.push(ee)}break}if(Kl.has(Q))Ar()}if(Ar(),Ts(),Es(),vp&&ce.length>0){for(let R of ce)pe(e,"jsdoc-tag-dropped",R.name,`@${R.name} could not attach to a @slot/@snippet/@event/@typedef/@callback tag in the same comment block and was dropped.`);ce.length=0}}}var uu=new Set(["MethodDefinition","PropertyDefinition","AccessorProperty"]);function du(e){if(e.computed||!e.key)return;if(e.key.type==="Identifier")return e.key.name;if(e.key.type==="Literal"&&(typeof e.key.value==="string"||typeof e.key.value==="number"))return String(e.key.value);return}function va(e){return e==="private"||e==="protected"}function zt(e){return{...e?.description?{description:e.description}:{},...e?.deprecated===void 0?{}:{deprecated:e.deprecated},...e?.tags?{tags:e.tags}:{}}}function Aa(e){return e?.slice(1,-1).trim()||void 0}function ri(e,t,n){let r=Mr(e,t),i=new Map((n?.params??[]).map((l)=>[l.name,l])),o=r.params.map(({name:l,type:u,optional:f,rest:y})=>{let g=i.get(l);return{name:y?`...${l}`:l,type:u??g?.type??(y?"any[]":"any"),...g?.description?{description:g.description}:{},...!y&&(f||g?.optional)?{optional:!0}:{}}}),s=r.returnType??n?.returnType??(t.async?"Promise<any>":void 0),c=Aa(r.typeParameters)??n?.typeParameters;return{...o.length>0?{params:o}:{},...s?{returnType:s}:{},...c?{typeParameters:c}:{}}}function ka(e,t,n){let r=[],i=new Map,o=new Set,s=new Set,c,l=-1;for(let y of n.body?.body??[]){let g=y;if(!uu.has(g.type)||va(g.accessibility))continue;let b=du(g);if(b===void 0)continue;let P=Ue(e,t,g);if(P?.internal)continue;let N=`${g.static?"static ":""}${b}`,D={...g.static?{static:!0}:{},...g.optional?{optional:!0}:{},...g.abstract?{abstract:!0}:{}};if(g.type!=="MethodDefinition"){if(Ae(e,g.typeAnnotation?.typeAnnotation),!g.static)s.add(b);r.push({kind:"property",name:b,type:mt(e,g.typeAnnotation)??P?.type??"any",...D,...g.readonly?{readonly:!0}:{},...zt(P)});continue}let j=g.value,U=g.typeParameters?{...j,typeParameters:g.typeParameters}:j;if(g.kind==="constructor"){let v=ri(e,U,P);r.push({kind:"constructor",name:"constructor",params:v.params,...zt(P)}),l=r.length,c=U.body?.body,(U.params??[]).forEach((M,G)=>{if(M.type!=="TSParameterProperty"||va(M.accessibility))return;let X=v.params?.[G];if(!X)return;s.add(X.name),r.push({kind:"property",name:X.name,type:X.type,...M.readonly?{readonly:!0}:{},...X.description?{description:X.description}:{}})});continue}if(g.kind==="get"||g.kind==="set"){let v=ri(e,U,P),w=g.kind==="get"?v.returnType??P?.type:v.params?.[0]?.type??P?.type,M=i.get(N);if(M){if(g.kind==="set")M.readonly=void 0;if(w&&w!=="any"&&(M.type==="any"||g.kind==="get"))M.type=w;if(!M.description&&!M.deprecated)Object.assign(M,zt(P));continue}let G={kind:"property",name:b,type:w??"any",...D,...g.kind==="get"?{readonly:!0}:{},...zt(P)};i.set(N,G),r.push(G);continue}if(U.type==="TSDeclareMethod"&&!g.abstract)o.add(N);else if(U.type!=="TSDeclareMethod"&&o.has(N))continue;r.push({kind:"method",name:b,...D,...ri(e,U,P),...zt(P)})}if(e.scriptLanguage!=="ts"&&c)r.splice(l,0,...hu(e,t,c,s));for(let y of n.typeParameters?.params??[])Ae(e,y.constraint),Ae(e,y.default);let u=Aa(Lt(e,n.typeParameters)),f=fu(e,n);return{members:r,...u?{typeParameters:u}:{},...f}}function fu(e,t){let n={},r=t.superClass;if(r){if(n.extends=Lt(e,{start:r.start,end:t.superTypeParameters?.end??r.end}),r.type==="Identifier")Pa(e,r,t.superTypeParameters)}let i=(t.implements??[]).map((o)=>(Pa(e,o.expression,o.typeParameters),Lt(e,o))).filter((o)=>Boolean(o));if(i.length>0)n.implements=i;return n}function Pa(e,t,n){Ae(e,{type:"TSTypeReference",typeName:t,...n?{typeParameters:n}:{}})}function hu(e,t,n,r){let i=[];for(let o of n){let s=o.type==="ExpressionStatement"?o.expression:void 0;if(s?.type!=="AssignmentExpression"||s.operator!=="=")continue;let c=s.left;if(c?.type!=="MemberExpression"||c.computed||c.object?.type!=="ThisExpression")continue;let l=c.property?.type==="Identifier"?c.property.name:void 0;if(!l||r.has(l))continue;r.add(l);let u=Ue(e,t,o);if(u?.internal)continue;i.push({kind:"property",name:l,type:u?.type??"any",...zt(u)})}return i}function ii(){return{syntaxMode:"legacy",scriptLanguage:void 0,source:void 0,parsed:void 0,runesOptionOverride:void 0,sourceLineStartOffsetsCache:void 0,sourceLineHint:void 0,parsedJsDocByText:new Map,jsDocBlocksByStart:new Map,functionDocCommentStarts:new Set,rest_props:void 0,extends:void 0,customElementTag:void 0,customElement:void 0,componentComment:void 0,componentCommentSource:void 0,generics:null,scriptGenericsAttribute:void 0,diagnosticRecords:[],componentFilePath:"",props:new Map,moduleExports:new Map,propLocalToPublicName:new Map,reactive_vars:new Set,funcDecls:new Map,vars:new Set,valueImportBindingsByLocalName:new Map,pendingCallDefaultCandidates:[],pendingConstDefaultCandidates:[],pendingContextKeyCandidates:[],pendingDispatchEscapeCandidates:[],deferredEventNoSourceDiagnostics:[],runesPropsDeclarationMetadataByDeclaratorStart:new Map,typedRunesPropsDeclarations:[],explicitPropTypesByName:new Map,explicitVariableTypesByName:new Map,explicitVariableTypeNodesByName:new Map,typeImportBindingsByLocalName:new Map,localTypeDeclarationsByName:new Map,additionalTypeDependencyNodes:[],wholePropsLocals:new Set,restPropLocals:new Set,componentScope:new Map,scopeDeclarations:new Map,activeScopes:[],slots:new Map,snippetPropLocals:new Set,cssParts:[],cssProperties:[],deferredSlotBlockGenerics:[],events:new Map,eventDescriptions:new Map,forwardedEvents:new Map,jsDocEventNames:new Set,untypedJsDocEventNames:new Set,jsDocEventSources:new Map,bindings:new Map,contexts:new Map,typedefs:new Map,variableInfoCache:new Map,variableInfoCacheBuilt:!1,sveldIgnoreDirectives:new Map}}var mu=new Set(["Component","SvelteComponent","SvelteSelf"]),yu=new Set(["RegularElement","SvelteElement"]);function Tn(e){return mu.has(e)}function En(e){return yu.has(e)}function gu({hasTypeScriptType:e,hasJSDocType:t,inferredType:n,finalType:r}){if(e)return"typescript";if(t)return"jsdoc";if(n!==void 0)return"default";if(r!==void 0)return"inferred";return"unknown"}function Cn(e){let t=e.explicitType??e.jsdocType??e.resolvedType??e.typeSeed,n=e.jsdocParams??e.resolvedParams,r=e.jsdocReturnType??e.resolvedReturnType;if((e.isFunctionDeclaration?t==="() => any":e.initializerIsFunction&&t===e.typeSeed)&&r){let u=e.jsdocTypeParameters?`<${e.jsdocTypeParameters}>`:"";t=n&&n.length>0?`${u}(${Ct(n)}) => ${r}`:`${u}() => ${r}`}let o=e.jsdocDescription??e.resolvedDescription;if(o===void 0&&t!==void 0)o=e.typedefs?.get(t)?.description;let s=gu({hasTypeScriptType:e.explicitType!==void 0,hasJSDocType:e.jsdocType!==void 0||e.jsdocParams!==void 0||e.jsdocReturnType!==void 0||e.resolvedType!==void 0,inferredType:e.inferredTypeForSource,finalType:t}),c=e.initializerIsFunction||e.isFunctionDeclaration||e.inferIsFunctionFromTypeSignature===!0&&(!!e.jsdocParams?.length||e.jsdocReturnType!==void 0||!!e.jsdocType?.includes("=>")||!!e.resolvedType?.includes("=>")||!!e.explicitType?.includes("=>")),l=c?e.jsdocTypeParameters:void 0;return{type:t,typeSource:s,description:o,params:n,returnType:r,isFunction:c,typeParameters:l}}function xu(e){if(!e||typeof e!=="object"||!("type"in e))return;let t=String(e.type),n=Tn(t);if(!n&&!En(t))return;let r="name"in e&&typeof e.name==="string"?e.name:void 0;if(!r)return;let i=n?{type:"InlineComponent",name:r}:{type:"Element",name:r};if(r==="svelte:element"&&"tag"in e&&e.tag&&typeof e.tag==="object"){let o=e.tag;if(o.type==="Literal"&&typeof o.value==="string")i.thisValue=o.value}return i}function wa(e,t){let n=xu(t);if(!n)return;if(e.rest_props===void 0){e.rest_props=n;return}if(e.rest_props.type==="InlineComponent"&&n.type==="Element")e.rest_props=n}function ai(e){return e==="TSTypeAnnotation"||e==="TSTypeAliasDeclaration"||e==="TSInterfaceDeclaration"||e==="TSTypeParameterDeclaration"||e==="TSTypeParameterInstantiation"}function oi(e,t,n,r){si(e,null,null,t,n,r?.skipTypeOnlySubtrees===!0)}function si(e,t,n,r,i,o){r(e,t,n);let s=e.type;if((s==="Identifier"||s==="Literal"||s==="Text")&&e.typeAnnotation===void 0){if(i)i(e);return}if(o&&s.charCodeAt(0)===84&&ai(s)){if(i)i(e);return}for(let c in e){if(c==="leadingComments")continue;let l=e[c];if(!l||typeof l!=="object")continue;if(Array.isArray(l))for(let u=0;u<l.length;u++){let f=l[u];if(f&&typeof f==="object"&&typeof f.type==="string")si(f,e,c,r,i,o)}else if(typeof l.type==="string")si(l,e,c,r,i,o)}if(i)i(e)}var _a=new Set(["$state","$derived","$effect","$props","$bindable","$inspect","$host"]);function bu(e,t){switch(t?.type){case"MemberExpression":return t.computed||e===t.object;case"MethodDefinition":return!!t.computed;case"MetaProperty":return e===t.meta;case"PropertyDefinition":return t.computed||e===t.value;case"Property":return t.computed||e===t.value;case"ExportSpecifier":case"ImportSpecifier":return e===t.local;case"LabeledStatement":case"BreakStatement":case"ContinueStatement":return!1;default:return!0}}var Tu=Array.from(_a);function Na(e){return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e===95||e===36}function Eu(e){if(e.includes("\\u"))return!0;for(let t of Tu){let n=e.indexOf(t);while(n!==-1){if(!Na(e.charCodeAt(n-1))&&!Na(e.charCodeAt(n+t.length)))return!0;n=e.indexOf(t,n+1)}}return!1}function Cu(e,t){for(let n=t.length-1;n>=0;n-=1)if(t[n]?.has(e))return!0;return!1}function Su(e){let t=new Set;if(!e||typeof e!=="object"||!("type"in e))return t;switch(String(e.type)){case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":{let n=e;if(n.id?.name)t.add(n.id.name);for(let r of n.params??[])ge(r,t);break}case"BlockStatement":Xn(e.body,t);break;case"CatchClause":ge(e.param,t);break;case"EachBlock":{let n=e;if(ge(n.context,t),typeof n.index==="string")t.add(n.index);else if(n.index?.name)t.add(n.index.name);break}case"AwaitBlock":{let n=e;ge(n.value,t),ge(n.error,t);break}}return t}function Xn(e,t){if(!Array.isArray(e))return;for(let n of e){if(!n||typeof n!=="object"||!("type"in n))continue;switch(String(n.type)){case"ImportDeclaration":for(let r of n.specifiers??[])if(r.local?.name)t.add(r.local.name);break;case"VariableDeclaration":for(let r of n.declarations??[])ge(r.id,t);break;case"FunctionDeclaration":case"ClassDeclaration":{let r=n.id?.name;if(r)t.add(r);break}case"ExportNamedDeclaration":{let r=n.declaration;if(r&&typeof r==="object"&&"type"in r)Xn([r],t);break}}}}function ci(e,t){if(!e||typeof e!=="object")return!1;return pi(e,void 0,[...t])}function pi(e,t,n){if(ai(e.type))return!1;let r=yn(e);if(r)n.push(Su(e));let i=!1;if(t&&e.type==="Identifier"&&e.name!==void 0&&_a.has(e.name)&&!t.type.startsWith("TS")&&bu(e,t)&&!Cu(e.name,n))i=!0;else for(let o in e){if(o==="leadingComments")continue;let s=e[o];if(!s||typeof s!=="object")continue;if(Array.isArray(s)){for(let c=0;c<s.length;c++){let l=s[c];if(l&&typeof l==="object"&&typeof l.type==="string"){if(pi(l,e,n)){i=!0;break}}}if(i)break}else if(typeof s.type==="string"){if(pi(s,e,n)){i=!0;break}}}if(r)n.pop();return i}function Da(e){if(!e||typeof e!=="object")return;if("content"in e){let t=e.content,n=t&&typeof t==="object"&&"body"in t?t.body:void 0;if(Array.isArray(n))return n}if("body"in e&&Array.isArray(e.body))return e.body;return}function Ia(e){if(e.runesOptionOverride!==void 0)return e.runesOptionOverride?"runes":"legacy";let t=e.parsed;if(!t)return"legacy";if(e.source!==void 0&&!Eu(e.source))return"legacy";let n=new Set;Xn(Da(t.module),n);let r=new Set;return Xn(Da(t.instance),r),ci(t.module,[n])||ci(t.instance,[n,r])||ci(t.fragment,[n,r])?"runes":"legacy"}var vu=/[A-Za-z_$][\w$]*/g;function Pu(e,t,n){let r=new Map,i=t.typeParameters?.params,o=n.typeArguments?.params;if(!i?.length||!o?.length)return r;for(let s=0;s<i.length;s++){let c=i[s]?.name,l=o[s];if(!c||l?.start===void 0||l?.end===void 0)continue;let u=le(e,l.start,l.end)?.trim();if(u)r.set(c,u)}return r}function Au(e,t){if(t.size===0)return e;return e.replace(vu,(n)=>t.get(n)??n)}function Jt(e,t,n,r,i=new Set){let o=new Map;if(!n?.type)return o;let s=(c)=>{for(let l of c){if(l?.type!=="TSPropertySignature"||l.computed)continue;if(!l.key)continue;let u=e.getPropertyName(l.key);if(!u)continue;let f=l.typeAnnotation?.start,y=l.typeAnnotation?.end;if(f===void 0||y===void 0)continue;let g=le(t,f+1,y)?.trim();if(!g)continue;Ae(t,l.typeAnnotation?.typeAnnotation),o.set(u,{type:g,optional:l.optional===!0,source:oe(t,l)})}};switch(n.type){case"TSTypeLiteral":s(n.members??[]);break;case"TSInterfaceDeclaration":s(n.body?.body??[]);break;case"TSTypeAliasDeclaration":{let c=Jt(e,t,n.typeAnnotation,r,i);for(let[l,u]of c)o.set(l,u);break}case"TSTypeReference":{let c=Is(n.typeName);if(!c||i.has(c))break;let l=r.get(c);if(!l)break;i.add(c);let u=Jt(e,t,l,r,i);i.delete(c);let f=Pu(t,l,n);for(let[y,g]of u)o.set(y,f.size===0?g:{...g,type:Au(g.type,f)});break}case"TSIntersectionType":for(let c of n.types??[]){let l=Jt(e,t,c,r,i);for(let[u,f]of l)o.set(u,f)}break;case"TSParenthesizedType":{let c=Jt(e,t,n.typeAnnotation,r,i);for(let[l,u]of c)o.set(l,u);break}}return o}function ku(e){let t={};for(let[n,r]of Object.entries(e))t[n]={...r.attribute===void 0?{}:{attribute:r.attribute},...r.reflect===void 0?{}:{reflect:r.reflect},...r.type===void 0?{}:{type:r.type}};return t}function li(e,t,n){if(t.type==="ImportDeclaration"&&t.source?.value)for(let i of t.specifiers??[]){let o=i.local?.name;if(!o)continue;if(!(t.importKind==="type"||i.importKind==="type"))continue;let c,l;if(i.type==="ImportSpecifier")c="named",l=i.imported?.type==="Identifier"?i.imported.name:typeof i.imported?.value==="string"?i.imported.value:void 0;else if(i.type==="ImportDefaultSpecifier")c="default";else if(i.type==="ImportNamespaceSpecifier")c="namespace";if(!c)continue;e.typeImportBindingsByLocalName.set(o,{importedName:l,localName:o,source:String(t.source.value),specifierType:c})}let r=t.type==="TSEnumDeclaration";if((r||t.type==="TSInterfaceDeclaration"||t.type==="TSTypeAliasDeclaration")&&t.id?.name&&t.start!==void 0&&t.end!==void 0){let i=r?Rs(e,t):le(e,t.start,t.end)?.trim();e.localTypeDeclarationsByName.set(t.id.name,{code:i??"",node:t,start:t.start,...n?{exported:n}:{}})}}function La(e,t,n){if(t.runesPropsDeclarationMetadataByDeclaratorStart.clear(),t.explicitPropTypesByName.clear(),t.explicitVariableTypesByName.clear(),t.explicitVariableTypeNodesByName.clear(),t.typeImportBindingsByLocalName.clear(),t.localTypeDeclarationsByName.clear(),t.additionalTypeDependencyNodes.length=0,t.typedRunesPropsDeclarations.length=0,!t.source)return;let r=n;t.scriptLanguage=e.resolveScriptLanguage(r);let i=r.options?.customElement;t.customElementTag=i?.tag,t.customElement=i?{...i.tag===void 0?{}:{tag:i.tag},...i.shadow==="open"||i.shadow==="none"?{shadow:i.shadow}:{},...i.props?{props:ku(i.props)}:{},...i.extend===void 0?{}:{extend:!0}}:void 0,t.runesOptionOverride=r.options?.runes,t.scriptGenericsAttribute=e.resolveScriptGenericsAttribute(r);let o=r.module?.content?.body??[],s=new Set;for(let l of o){if(!l?.type)continue;if(l.type==="ExportNamedDeclaration"&&l.declaration)li(t,l.declaration,!0);else if(l.type==="ExportNamedDeclaration"&&!l.source)for(let u of l.specifiers??[]){let f=u.local?.name;if(f&&f===u.exported?.name)s.add(f)}else li(t,l,!1)}for(let l of s){let u=t.localTypeDeclarationsByName.get(l);if(u)u.exported=!0}let c=r.instance?.content?.body??[];for(let l of c){if(!l?.type)continue;if(li(t,l,!1),l.type==="ExportNamedDeclaration"&&l.declaration?.type==="VariableDeclaration")for(let u of l.declaration.declarations??[]){if(u.id?.type!=="Identifier"||!u.id.name)continue;let f=mt(t,u.id.typeAnnotation);if(f)t.explicitPropTypesByName.set(u.id.name,f),Ae(t,u.id.typeAnnotation?.typeAnnotation)}else if(l.type==="VariableDeclaration")for(let u of l.declarations??[]){if(u.id?.type!=="Identifier"||!u.id.name)continue;let f=mt(t,u.id.typeAnnotation);if(f){t.explicitVariableTypesByName.set(u.id.name,f);let y=u.id.typeAnnotation?.typeAnnotation;if(y)t.explicitVariableTypeNodesByName.set(u.id.name,y)}}}for(let l of c){if(!l||typeof l!=="object"||!("declarations"in l))continue;for(let u of l.declarations??[]){if(!ct(Et(u.init),"$props"))continue;let f=u.id?.typeAnnotation?void 0:Ss(u.init),y=u.id?.typeAnnotation?.typeAnnotation??f,g=u.id?.typeAnnotation?mt(t,u.id.typeAnnotation):Lt(t,f),b=Jt(e,t,y,new Map(Array.from(t.localTypeDeclarationsByName.entries(),([D,j])=>[D,j.node]))),P=new Set,N=new Set;if(Ie(t,y,P,N),fa(t,P,N),u.start!==void 0){let D={canonicalType:g,props:b,referencedImportedTypes:P,referencedLocalTypes:N};if(t.runesPropsDeclarationMetadataByDeclaratorStart.set(u.start,D),g)t.typedRunesPropsDeclarations.push(D)}}}}function Ra(e,t,n){for(let r of n.declarations){if(!ct(Et(r.init),"$props"))continue;if(r.id.type==="Identifier"){t.wholePropsLocals.add(r.id.name),t.restPropLocals.add(r.id.name);let s=Rr(t,r.start);if(s)for(let[c,l]of s.props)un(e,t,c,{name:c,kind:"let",type:l.type,typeSource:"typescript",isFunction:!1,isFunctionDeclaration:!1,isRequired:!l.optional,constant:!1,reactive:!1,source:l.source});continue}if(r.id.type!=="ObjectPattern")continue;let i=Ue(t,e,n),o=r.id.properties.filter((s)=>{if(s.type!=="Property"||s.computed)return!1;if(!e.getPropertyName(s.key))return!1;if(s.value.type==="Identifier")return!0;return s.value.type==="AssignmentPattern"&&s.value.left.type==="Identifier"}).length;for(let s of r.id.properties){if(s.type==="RestElement"){if(s.argument.type==="Identifier")t.restPropLocals.add(s.argument.name);continue}let c=e.getPropertyName(s.key);if(!c)continue;let l,u;if(s.value.type==="Identifier")l=s.value.name;else{let p=s.value;l=p.left.name,u=p.right}if(!l)continue;if(e.trackPropLocalName(c,l),c==="children")t.snippetPropLocals.add(l);let f=Ea(t,e,s)??(o===1?i:void 0),y=_s(t,r.start,c),{init:g,bindable:b}=qs(u),P=g==null?{isFunction:!1}:pt(e,t,g),{value:N,type:D,isFunction:j,defaultValue:U}=P,v=y?.type===void 0&&f?.type===void 0?P.resolvedType:void 0;dn(t,P,c,"props");let{type:w,typeSource:M,description:G,params:X,returnType:be,isFunction:a}=Cn({explicitType:y?.type,typeSeed:D,inferredTypeForSource:D,jsdocType:f?.type,jsdocDescription:f?.description,jsdocParams:f?.params,jsdocReturnType:f?.returnType,resolvedType:v,resolvedDescription:P.resolvedDescription,resolvedParams:P.resolvedParams,resolvedReturnType:P.resolvedReturnType,initializerIsFunction:j,isFunctionDeclaration:!1,inferIsFunctionFromTypeSignature:!0});if(b)t.reactive_vars.add(c);dt(t,"prop-unknown-type",c,f?.sveldIgnore),un(e,t,c,{name:c,...l===c?{}:{localName:l},kind:"let",description:G,binding:f?.binding,deprecated:f?.deprecated,tags:f?.tags,...f?.internal?{internal:!0}:{},...b?{bindable:!0}:{},type:w,typeSource:M,value:N,defaultValue:U,params:X,returnType:be,isFunction:a,isFunctionDeclaration:!1,isRequired:!b&&g==null&&y?.optional!==!0,constant:!1,reactive:b,source:oe(t,s)})}}}function wu(e){let n=e.indexOf("EventDispatcher");if(n===-1)return;let r=n+15;while(e[r]===" ")r++;if(e[r]!=="<")return;let i=0,o=r;for(;r<e.length;r++)if(e[r]==="<")i++;else if(e[r]===">"){if(i--,i===0)return e.slice(o+1,r)}return}function Ma(e,t){let n=e[t];for(let r=t+1;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===n)return r;return e.length}function Nu(e){let t=[],n=0,r=0;for(let i=0;i<e.length;i++){let o=e[i];if(o==='"'||o==="'")i=Ma(e,i);else if(o==="{"||o==="("||o==="["||o==="<")n++;else if(o==="}"||o===")"||o==="]"||o===">")n=Math.max(n-1,0);else if(n===0&&(o===";"||o===","))t.push(e.slice(r,i)),r=i+1}return t.push(e.slice(r)),t.map((i)=>i.trim()).filter((i)=>i.length>0)}var Du=/^["']|["']$/g,_u=/\?$/,Iu=/^\{/,Lu=/\}$/;function Ru(e){let t=0;for(let n=0;n<e.length;n++){let r=e[n];if(r==='"'||r==="'")n=Ma(e,n);else if(r==="{"||r==="("||r==="["||r==="<")t++;else if(r==="}"||r===")"||r==="]"||r===">")t=Math.max(t-1,0);else if(t===0&&r===":"){let i=e.slice(0,n).trim().replace(_u,"").replace(Du,""),o=e.slice(n+1).trim();if(!i||!o)return;return{name:i,type:o}}}return}function Oa(e,t,n,r,i){if(n){let l=new Map(Array.from(t.localTypeDeclarationsByName.entries(),([f,y])=>[f,y.node])),u=Jt(e,t,n,l);for(let[f,y]of u)vt(t,{name:f,detail:y.type,has_argument:!0,source:y.source});return}let o=e.resolveLocalVarJSDoc(r)?.type,s=o?wu(o):void 0;if(!s)return;let c=s.trim().replace(Iu,"").replace(Lu,"");for(let l of Nu(c)){let u=Ru(l);if(!u)continue;vt(t,{name:u.name,detail:u.type,has_argument:!0,source:i})}}function Ba(e,t){if(e.syntaxMode!=="runes")return;for(let[n,r]of Array.from(e.events.entries())){if(r.type!=="dispatched")continue;if(t.has(n)||e.forwardedEvents.has(n))continue;let i=`on${n}`,o=e.props.get(i);if(!o)continue;let s=o.type!==void 0||o.params!==void 0||o.returnType!==void 0,c=r.detail===void 0||r.detail==="undefined"||r.detail==="null"?"() => void":`(detail: ${r.detail}) => void`;e.props.set(i,{...o,description:o.description??r.description,type:s?o.type:c,typeSource:s?o.typeSource:"inferred",isFunction:!0}),e.events.delete(n)}}var Fa=new Set(["TSAsExpression","TSSatisfiesExpression","TSNonNullExpression","TSTypeAssertion","TSInstantiationExpression"]);function ui(e){return e!==null&&typeof e==="object"&&typeof e.type==="string"}function $a(e){if(!Fa.has(e.type))return e;let t=e.expression;while(t&&Fa.has(t.type))t=t.expression;return t??e}function Yn(e){if(!ui(e))return;di(e)}function di(e){for(let t in e){if(t==="leadingComments")continue;let n=e[t];if(!n||typeof n!=="object")continue;if(Array.isArray(n))for(let r=0;r<n.length;r++){let i=n[r];if(!ui(i))continue;let o=$a(i);if(o!==i)n[r]=o;di(o)}else if(ui(n)){let r=$a(n);if(r!==n)e[t]=r;di(r)}}}function Mu(e,t,n,r,i){for(let o of e){if(o.type!=="Block"||o.start<n||o.end>r)continue;i.push({start:o.start,end:o.end,isJsDoc:o.end-o.start>4&&t.startsWith("/**",o.start)})}}function Va(e,t,n){if(!e||typeof e!=="object"||!("type"in e))return;let r=e;if(r.type==="FunctionDeclaration"){if(r.id?.type==="Identifier"&&r.id.name)n.push({name:r.id.name,start:t});return}if(r.type==="VariableDeclaration"){for(let i of r.declarations??[])if(i?.id?.type==="Identifier"&&i.id.name)n.push({name:i.id.name,start:t})}}function Ou(e){let t=[];for(let n of e){if(!n||typeof n!=="object"||!("type"in n))continue;let r=n;if(r.start===void 0)continue;if(r.type==="ExportNamedDeclaration"&&r.declaration)Va(r.declaration,r.start,t);else Va(r,r.start,t)}return t}function Bu(e,t,n){let r=0,i=e.length;while(r<i){let o=r+i>>>1;if(e[o].end<=t)r=o+1;else i=o}for(let o=r-1;o>=0;o--){let s=e[o];if(!s.isJsDoc)continue;return Zr(n,s.end,t)?s:void 0}return}function ja(e,t){let n=new Map;if(!e.source)return n;let r=[e.parsed?.module,e.parsed?.instance],i=[],o=[],s=e.parsed?.comments??[];for(let c of r){let l=c?.content;if(!l?.body||l.start===void 0||l.end===void 0)continue;Mu(s,e.source,l.start,l.end,i),o.push(...Ou(l.body))}i.sort((c,l)=>c.end-l.end);for(let c of o){let l=Bu(i,c.start,e.source);if(!l)continue;let u=ti(e,e.source.slice(l.start,l.end)),{type:f,description:y,ignore:g,internal:b}=ni(u);if(g.length>0)dt(e,"context-any-type",c.name,g);if(!f&&!y&&!b)continue;n.set(c.name,{type:f?t.aliasType(f.type):void 0,description:y||f&&ga(f),internal:b||void 0})}return n}var Fu={li:{direct:["li"]},dt:{descendant:["dt","dd"]},dd:{descendant:["dt","dd"]},p:{descendant:["address","article","aside","blockquote","div","dl","fieldset","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","main","menu","nav","ol","p","pre","section","table","ul"]},rt:{descendant:["rt","rp"]},rp:{descendant:["rt","rp"]},optgroup:{descendant:["optgroup"]},option:{descendant:["option","optgroup"]},thead:{direct:["tbody","tfoot"]},tbody:{direct:["tbody","tfoot"]},tfoot:{direct:["tbody"]},tr:{direct:["tr","tbody"]},td:{direct:["td","th","tr"]},th:{direct:["td","th","tr"]}};function Ha(e,t){let n=Fu[e];if(!n)return!1;if(!t)return!0;return(n.direct??n.descendant??[]).includes(t)}var Ai={};wp(Ai,{Node:()=>kn,Parser:()=>me,Position:()=>Xt,SourceLocation:()=>Pn,TokContext:()=>Qe,Token:()=>pr,TokenType:()=>se,defaultOptions:()=>Zn,getLineInfo:()=>Ti,isIdentifierChar:()=>Fe,isIdentifierStart:()=>Le,isNewLine:()=>Mt,keywordTypes:()=>ir,lineBreak:()=>Re,lineBreakG:()=>Xa,nonASCIIwhitespace:()=>bi,parse:()=>Td,parseExpressionAt:()=>Ed,tokContexts:()=>he,tokTypes:()=>h,tokenizer:()=>Cd,version:()=>Do});var $u=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239],Ka=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],Vu="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-᫝᫠-᫫ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・",za="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-࢏ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚ౜ౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ೜-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ƛ꟱-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",fi={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},hi="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",ju={5:hi,"5module":hi+" export import",6:hi+" const class extends export import super"},Ja=/^in(stanceof)?$/,Hu=new RegExp("["+za+"]"),qu=new RegExp("["+za+Vu+"]");function mi(e,t){var n=65536;for(var r=0;r<t.length;r+=2){if(n+=t[r],n>e)return!1;if(n+=t[r+1],n>=e)return!0}return!1}function Le(e,t){if(e<65)return e===36;if(e<91)return!0;if(e<97)return e===95;if(e<123)return!0;if(e<=65535)return e>=170&&Hu.test(String.fromCharCode(e));if(t===!1)return!1;return mi(e,Ka)}function Fe(e,t){if(e<48)return e===36;if(e<58)return!0;if(e<65)return!1;if(e<91)return!0;if(e<97)return e===95;if(e<123)return!0;if(e<=65535)return e>=170&&qu.test(String.fromCharCode(e));if(t===!1)return!1;return mi(e,Ka)||mi(e,$u)}var se=function(t,n){if(n===void 0)n={};this.label=t,this.keyword=n.keyword,this.beforeExpr=!!n.beforeExpr,this.startsExpr=!!n.startsExpr,this.isLoop=!!n.isLoop,this.isAssign=!!n.isAssign,this.prefix=!!n.prefix,this.postfix=!!n.postfix,this.binop=n.binop||null,this.updateContext=null};function Xe(e,t){return new se(e,{beforeExpr:!0,binop:t})}var Ye={beforeExpr:!0},Be={startsExpr:!0},ir={};function re(e,t){if(t===void 0)t={};return t.keyword=e,ir[e]=new se(e,t)}var h={num:new se("num",Be),regexp:new se("regexp",Be),string:new se("string",Be),name:new se("name",Be),privateId:new se("privateId",Be),eof:new se("eof"),bracketL:new se("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new se("]"),braceL:new se("{",{beforeExpr:!0,startsExpr:!0}),braceR:new se("}"),parenL:new se("(",{beforeExpr:!0,startsExpr:!0}),parenR:new se(")"),comma:new se(",",Ye),semi:new se(";",Ye),colon:new se(":",Ye),dot:new se("."),question:new se("?",Ye),questionDot:new se("?."),arrow:new se("=>",Ye),template:new se("template"),invalidTemplate:new se("invalidTemplate"),ellipsis:new se("...",Ye),backQuote:new se("`",Be),dollarBraceL:new se("${",{beforeExpr:!0,startsExpr:!0}),eq:new se("=",{beforeExpr:!0,isAssign:!0}),assign:new se("_=",{beforeExpr:!0,isAssign:!0}),incDec:new se("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new se("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:Xe("||",1),logicalAND:Xe("&&",2),bitwiseOR:Xe("|",3),bitwiseXOR:Xe("^",4),bitwiseAND:Xe("&",5),equality:Xe("==/!=/===/!==",6),relational:Xe("</>/<=/>=",7),bitShift:Xe("<</>>/>>>",8),plusMin:new se("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:Xe("%",10),star:Xe("*",10),slash:Xe("/",10),starstar:new se("**",{beforeExpr:!0}),coalesce:Xe("??",1),_break:re("break"),_case:re("case",Ye),_catch:re("catch"),_continue:re("continue"),_debugger:re("debugger"),_default:re("default",Ye),_do:re("do",{isLoop:!0,beforeExpr:!0}),_else:re("else",Ye),_finally:re("finally"),_for:re("for",{isLoop:!0}),_function:re("function",Be),_if:re("if"),_return:re("return",Ye),_switch:re("switch"),_throw:re("throw",Ye),_try:re("try"),_var:re("var"),_const:re("const"),_while:re("while",{isLoop:!0}),_with:re("with"),_new:re("new",{beforeExpr:!0,startsExpr:!0}),_this:re("this",Be),_super:re("super",Be),_class:re("class",Be),_extends:re("extends",Ye),_export:re("export"),_import:re("import",Be),_null:re("null",Be),_true:re("true",Be),_false:re("false",Be),_in:re("in",{beforeExpr:!0,binop:7}),_instanceof:re("instanceof",{beforeExpr:!0,binop:7}),_typeof:re("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:re("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:re("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},Re=/\r\n?|\n|\u2028|\u2029/,Xa=new RegExp(Re.source,"g");function Mt(e){return e===10||e===13||e===8232||e===8233}function Ya(e,t,n){if(n===void 0)n=e.length;for(var r=t;r<n;r++){var i=e.charCodeAt(r);if(Mt(i))return r<n-1&&i===13&&e.charCodeAt(r+1)===10?r+2:r+1}return-1}var bi=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,Ee=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,Qa=Object.prototype,{hasOwnProperty:Uu,toString:Gu}=Qa,Yt=Object.hasOwn||function(e,t){return Uu.call(e,t)},qa=Array.isArray||function(e){return Gu.call(e)==="[object Array]"},Ua=Object.create(null);function At(e){return Ua[e]||(Ua[e]=new RegExp("^(?:"+e.replace(/ /g,"|")+")$"))}function yt(e){if(e<=65535)return String.fromCharCode(e);return e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320)}var Wu=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,Xt=function(t,n){this.line=t,this.column=n};Xt.prototype.offset=function(t){return new Xt(this.line,this.column+t)};var Pn=function(t,n,r){if(this.start=n,this.end=r,t.sourceFile!==null)this.source=t.sourceFile};function Ti(e,t){for(var n=1,r=0;;){var i=Ya(e,r,t);if(i<0)return new Xt(n,t-r);++n,r=i}}var Zn={ecmaVersion:null,sourceType:"script",strict:!1,onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,startLocation:null,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},Ga=!1;function Ku(e){var t={};for(var n in Zn)t[n]=e&&Yt(e,n)?e[n]:Zn[n];if(t.ecmaVersion==="latest")t.ecmaVersion=1e8;else if(t.ecmaVersion==null){if(!Ga&&typeof console==="object"&&console.warn)Ga=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
29
+ Defaulting to 2020, but this will stop working in the future.`);t.ecmaVersion=11}else if(t.ecmaVersion>=2015)t.ecmaVersion-=2009;if(t.allowReserved==null)t.allowReserved=t.ecmaVersion<5;if(!e||e.allowHashBang==null)t.allowHashBang=t.ecmaVersion>=14;if(qa(t.onToken)){var r=t.onToken;t.onToken=function(i){return r.push(i)}}if(qa(t.onComment))t.onComment=zu(t,t.onComment);if(t.sourceType==="commonjs"&&t.allowAwaitOutsideFunction)throw Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return t}function zu(e,t){return function(n,r,i,o,s,c){var l={type:n?"Block":"Line",value:r,start:i,end:o};if(e.locations)l.loc=new Pn(this,s,c);if(e.ranges)l.range=[i,o];t.push(l)}}var Rt=1,Ot=2,Ei=4,Za=8,Ci=16,eo=32,sr=64,to=128,Bt=256,An=512,no=1024,ar=Rt|Ot|Bt;function Si(e,t){return Ot|(e?Ei:0)|(t?Za:0)}var er=0,vi=1,xt=2,ro=3,io=4,so=5,me=function(t,n,r){this.options=t=Ku(t),this.sourceFile=t.sourceFile,this.keywords=At(ju[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var i="";if(t.allowReserved!==!0){if(i=fi[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module")i+=" await"}this.reservedWords=At(i);var o=(i?i+" ":"")+fi.strict;if(this.reservedWordsStrict=At(o),this.reservedWordsStrictBind=At(o+" "+fi.strictBind),this.input=String(n),this.containsEsc=!1,this.pos=r||0,this.curLine=1,t.startLocation)this.lineStart=this.pos-t.startLocation.column,this.curLine=t.startLocation.line;else if(r){if(this.lineStart=this.input.lastIndexOf(`
30
+ `,r-1)+1,this.options.locations)this.curLine=this.input.slice(0,this.lineStart).split(Re).length}else this.lineStart=0;if(this.type=h.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=t.sourceType==="module",this.strict=this.inModule||t.strict===!0||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&t.allowHashBang&&this.input.slice(0,2)==="#!")this.skipLineComment(2);this.scopeStack=[],this.enterScope(this.options.sourceType==="commonjs"?Ot:Rt),this.regexpState=null,this.privateNameStack=[]},et={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowReturn:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},allowUsing:{configurable:!0},inClassStaticBlock:{configurable:!0}};me.prototype.parse=function(){var t=this,n=this.options.program||this.startNode();return this.nextToken(),this.catchStackOverflow(function(){return t.parseTopLevel(n)})};et.inFunction.get=function(){return(this.currentVarScope().flags&Ot)>0};et.inGenerator.get=function(){return(this.currentVarScope().flags&Za)>0};et.inAsync.get=function(){return(this.currentVarScope().flags&Ei)>0};et.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],n=t.flags;if(n&(Bt|An))return!1;if(n&Ot)return(n&Ei)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};et.allowReturn.get=function(){if(this.inFunction)return!0;if(this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&Rt)return!0;return!1};et.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags;return(t&sr)>0||this.options.allowSuperOutsideMethod};et.allowDirectSuper.get=function(){return(this.currentThisScope().flags&to)>0};et.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};et.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],n=t.flags;if(n&(Bt|An)||n&Ot&&!(n&Ci))return!0}return!1};et.allowUsing.get=function(){var e=this.currentScope(),t=e.flags;if(t&no)return!1;if(!this.inModule&&t&Rt)return!1;return!0};et.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&Bt)>0};me.extend=function(){var t=[],n=arguments.length;while(n--)t[n]=arguments[n];var r=this;for(var i=0;i<t.length;i++)r=t[i](r);return r};me.parse=function(t,n){return new this(n,t).parse()};me.parseExpressionAt=function(t,n,r){var i=new this(r,t,n);return i.nextToken(),i.parseExpression()};me.tokenizer=function(t,n){return new this(n,t)};Object.defineProperties(me.prototype,et);var _e=me.prototype,Ju=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;_e.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){Ee.lastIndex=e,e+=Ee.exec(this.input)[0].length;var t=Ju.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])==="use strict"){Ee.lastIndex=e+t[0].length;var n=Ee.exec(this.input),r=n.index+n[0].length,i=this.input.charAt(r);return i===";"||i==="}"||Re.test(n[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(i)||i==="!"&&this.input.charAt(r+1)==="=")}if(e+=t[0].length,Ee.lastIndex=e,e+=Ee.exec(this.input)[0].length,this.input[e]===";")e++}};_e.eat=function(e){if(this.type===e)return this.next(),!0;else return!1};_e.isContextual=function(e){return this.type===h.name&&this.value===e&&!this.containsEsc};_e.eatContextual=function(e){if(!this.isContextual(e))return!1;return this.next(),!0};_e.catchStackOverflow=function(e){try{return e()}catch(t){if(t instanceof Error&&(/\bstack\b.*\b(exceeded|overflow)\b/i.test(t.message)||/\btoo much recursion\b/i.test(t.message)))this.raise(this.start,"Not enough stack space to parse input");else throw t}};_e.expectContextual=function(e){if(!this.eatContextual(e))this.unexpected()};_e.canInsertSemicolon=function(){return this.type===h.eof||this.type===h.braceR||Re.test(this.input.slice(this.lastTokEnd,this.start))};_e.insertSemicolon=function(){if(this.canInsertSemicolon()){if(this.options.onInsertedSemicolon)this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc);return!0}};_e.semicolon=function(){if(!this.eat(h.semi)&&!this.insertSemicolon())this.unexpected()};_e.afterTrailingComma=function(e,t){if(this.type===e){if(this.options.onTrailingComma)this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc);if(!t)this.next();return!0}};_e.expect=function(e){this.eat(e)||this.unexpected()};_e.unexpected=function(e){this.raise(e!=null?e:this.start,"Unexpected token")};var or=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};_e.checkPatternErrors=function(e,t){if(!e)return;if(e.trailingComma>-1)this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var n=t?e.parenthesizedAssign:e.parenthesizedBind;if(n>-1)this.raiseRecoverable(n,t?"Assigning to rvalue":"Parenthesized pattern")};_e.checkExpressionErrors=function(e,t){if(!e)return!1;var{shorthandAssign:n,doubleProto:r}=e;if(!t)return n>=0||r>=0;if(n>=0)this.raise(n,"Shorthand property assignments are valid only in destructuring patterns");if(r>=0)this.raiseRecoverable(r,"Redefinition of __proto__ property")};_e.checkYieldAwaitInDefaultParams=function(){if(this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos))this.raise(this.yieldPos,"Yield expression cannot be a default value");if(this.awaitPos)this.raise(this.awaitPos,"Await expression cannot be a default value")};_e.isSimpleAssignTarget=function(e){if(e.type==="ParenthesizedExpression")return this.isSimpleAssignTarget(e.expression);return e.type==="Identifier"||e.type==="MemberExpression"};var V=me.prototype;V.parseTopLevel=function(e){var t=Object.create(null);if(!e.body)e.body=[];while(this.type!==h.eof){var n=this.parseStatement(null,!0,t);e.body.push(n)}if(this.inModule)for(var r=0,i=Object.keys(this.undefinedExports);r<i.length;r+=1){var o=i[r];this.raiseRecoverable(this.undefinedExports[o].start,"Export '"+o+"' is not defined")}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType==="commonjs"?"script":this.options.sourceType,this.finishNode(e,"Program")};var Pi={kind:"loop"},Xu={kind:"switch"};V.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;Ee.lastIndex=this.pos;var t=Ee.exec(this.input),n=this.pos+t[0].length,r=this.fullCharCodeAt(n);if(r===91||r===92)return!0;if(e)return!1;if(r===123)return!0;if(Le(r)){var i=n;do n+=r<=65535?1:2;while(Fe(r=this.fullCharCodeAt(n)));if(r===92)return!0;var o=this.input.slice(i,n);if(!Ja.test(o))return!0}return!1};V.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;Ee.lastIndex=this.pos;var e=Ee.exec(this.input),t=this.pos+e[0].length,n;return!Re.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)==="function"&&(t+8===this.input.length||!(Fe(n=this.fullCharCodeAt(t+8))||n===92))};V.isUsingKeyword=function(e,t){if(this.options.ecmaVersion<17||!this.isContextual(e?"await":"using"))return!1;Ee.lastIndex=this.pos;var n=Ee.exec(this.input),r=this.pos+n[0].length;if(Re.test(this.input.slice(this.pos,r)))return!1;if(e){var i=r+5,o;if(this.input.slice(r,i)!=="using"||i===this.input.length||Fe(o=this.fullCharCodeAt(i))||o===92)return!1;Ee.lastIndex=i;var s=Ee.exec(this.input);if(r=i+s[0].length,s&&Re.test(this.input.slice(i,r)))return!1}var c=this.fullCharCodeAt(r);if(!Le(c)&&c!==92)return!1;var l=r;do r+=c<=65535?1:2;while(Fe(c=this.fullCharCodeAt(r)));if(c===92)return!0;var u=this.input.slice(l,r);if(Ja.test(u))return!1;if(t&&!e&&u==="of"){Ee.lastIndex=r;var f=Ee.exec(this.input);if(r=r+f[0].length,this.input.charCodeAt(r)!==61||(c=this.input.charCodeAt(r+1))===61||c===62)return!1}return!0};V.isAwaitUsing=function(e){return this.isUsingKeyword(!0,e)};V.isUsing=function(e){return this.isUsingKeyword(!1,e)};V.parseStatement=function(e,t,n){var r=this.type,i=this.startNode(),o;if(this.isLet(e))r=h._var,o="let";switch(r){case h._break:case h._continue:return this.parseBreakContinueStatement(i,r.keyword);case h._debugger:return this.parseDebuggerStatement(i);case h._do:return this.parseDoStatement(i);case h._for:return this.parseForStatement(i);case h._function:if(e&&(this.strict||e!=="if"&&e!=="label")&&this.options.ecmaVersion>=6)this.unexpected();return this.parseFunctionStatement(i,!1,!e);case h._class:if(e)this.unexpected();return this.parseClass(i,!0);case h._if:return this.parseIfStatement(i);case h._return:return this.parseReturnStatement(i);case h._switch:return this.parseSwitchStatement(i);case h._throw:return this.parseThrowStatement(i);case h._try:return this.parseTryStatement(i);case h._const:case h._var:if(o=o||this.value,e&&o!=="var")this.unexpected();return this.parseVarStatement(i,o);case h._while:return this.parseWhileStatement(i);case h._with:return this.parseWithStatement(i);case h.braceL:return this.parseBlock(!0,i);case h.semi:return this.parseEmptyStatement(i);case h._export:case h._import:if(this.options.ecmaVersion>10&&r===h._import){Ee.lastIndex=this.pos;var s=Ee.exec(this.input),c=this.pos+s[0].length,l=this.input.charCodeAt(c);if(l===40||l===46)return this.parseExpressionStatement(i,this.parseExpression())}if(!this.options.allowImportExportEverywhere){if(!t)this.raise(this.start,"'import' and 'export' may only appear at the top level");if(!this.inModule)this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")}return r===h._import?this.parseImport(i):this.parseExport(i,n);default:if(this.isAsyncFunction()){if(e)this.unexpected();return this.next(),this.parseFunctionStatement(i,!0,!e)}var u=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(u){if(!this.allowUsing)this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement");if(e)this.raise(this.start,"Using declaration is not allowed in single-statement positions");if(u==="await using"){if(!this.canAwait)this.raise(this.start,"Await using cannot appear outside of async function");this.next()}return this.next(),this.parseVar(i,!1,u),this.semicolon(),this.finishNode(i,"VariableDeclaration")}var f=this.value,y=this.parseExpression();if(r===h.name&&y.type==="Identifier"&&this.eat(h.colon))return this.parseLabeledStatement(i,f,y,e);else return this.parseExpressionStatement(i,y)}};V.parseBreakContinueStatement=function(e,t){var n=t==="break";if(this.next(),this.eat(h.semi)||this.insertSemicolon())e.label=null;else if(this.type!==h.name)this.unexpected();else e.label=this.parseIdent(),this.semicolon();var r=0;for(;r<this.labels.length;++r){var i=this.labels[r];if(e.label==null||i.name===e.label.name){if(i.kind!=null&&(n||i.kind==="loop"))break;if(e.label&&n)break}}if(r===this.labels.length)this.raise(e.start,"Unsyntactic "+t);return this.finishNode(e,n?"BreakStatement":"ContinueStatement")};V.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")};V.parseDoStatement=function(e){if(this.next(),this.labels.push(Pi),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(h._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6)this.eat(h.semi);else this.semicolon();return this.finishNode(e,"DoWhileStatement")};V.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Pi),this.enterScope(0),this.expect(h.parenL),this.type===h.semi){if(t>-1)this.unexpected(t);return this.parseFor(e,null)}var n=this.isLet();if(this.type===h._var||this.type===h._const||n){var r=this.startNode(),i=n?"let":this.value;return this.next(),this.parseVar(r,!0,i),this.finishNode(r,"VariableDeclaration"),this.parseForAfterInit(e,r,t)}var o=this.isContextual("let"),s=!1,c=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(c){var l=this.startNode();if(this.next(),c==="await using"){if(!this.canAwait)this.raise(this.start,"Await using cannot appear outside of async function");this.next()}return this.parseVar(l,!0,c),this.finishNode(l,"VariableDeclaration"),this.parseForAfterInit(e,l,t)}var u=this.containsEsc,f=new or,y=this.start,g=t>-1?this.parseExprSubscripts(f,"await"):this.parseExpression(!0,f);if(this.type===h._in||(s=this.options.ecmaVersion>=6&&this.isContextual("of"))){if(t>-1){if(this.type===h._in)this.unexpected(t);e.await=!0}else if(s&&this.options.ecmaVersion>=8){if(g.start===y&&!u&&g.type==="Identifier"&&g.name==="async")this.unexpected();else if(this.options.ecmaVersion>=9)e.await=!1}if(o&&s)this.raise(g.start,"The left-hand side of a for-of loop may not start with 'let'.");return this.toAssignable(g,!1,f),this.checkLValPattern(g),this.parseForIn(e,g)}else this.checkExpressionErrors(f,!0);if(t>-1)this.unexpected(t);return this.parseFor(e,g)};V.parseForAfterInit=function(e,t,n){if((this.type===h._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&t.declarations.length===1){if(this.type===h._in){if((t.kind==="using"||t.kind==="await using")&&!t.declarations[0].init)this.raise(this.start,"Using declaration is not allowed in for-in loops");if(this.options.ecmaVersion>=9&&n>-1)this.unexpected(n)}else if(this.options.ecmaVersion>=9)e.await=n>-1;return this.parseForIn(e,t)}if(n>-1)this.unexpected(n);return this.parseFor(e,t)};V.parseFunctionStatement=function(e,t,n){return this.next(),this.parseFunction(e,vn|(n?0:yi),!1,t)};V.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(h._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")};V.parseReturnStatement=function(e){if(!this.allowReturn)this.raise(this.start,"'return' outside of function");if(this.next(),this.eat(h.semi)||this.insertSemicolon())e.argument=null;else e.argument=this.parseExpression(),this.semicolon();return this.finishNode(e,"ReturnStatement")};V.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(h.braceL),this.labels.push(Xu),this.enterScope(no);var t;for(var n=!1;this.type!==h.braceR;)if(this.type===h._case||this.type===h._default){var r=this.type===h._case;if(t)this.finishNode(t,"SwitchCase");if(e.cases.push(t=this.startNode()),t.consequent=[],this.next(),r)t.test=this.parseExpression();else{if(n)this.raiseRecoverable(this.lastTokStart,"Multiple default clauses");n=!0,t.test=null}this.expect(h.colon)}else{if(!t)this.unexpected();t.consequent.push(this.parseStatement(null))}if(this.exitScope(),t)this.finishNode(t,"SwitchCase");return this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")};V.parseThrowStatement=function(e){if(this.next(),Re.test(this.input.slice(this.lastTokEnd,this.start)))this.raise(this.lastTokEnd,"Illegal newline after throw");return e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var Yu=[];V.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type==="Identifier";return this.enterScope(t?eo:0),this.checkLValPattern(e,t?io:xt),this.expect(h.parenR),e};V.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===h._catch){var t=this.startNode();if(this.next(),this.eat(h.parenL))t.param=this.parseCatchClauseParam();else{if(this.options.ecmaVersion<10)this.unexpected();t.param=null,this.enterScope(0)}t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}if(e.finalizer=this.eat(h._finally)?this.parseBlock():null,!e.handler&&!e.finalizer)this.raise(e.start,"Missing catch or finally clause");return this.finishNode(e,"TryStatement")};V.parseVarStatement=function(e,t,n){return this.next(),this.parseVar(e,!1,t,n),this.semicolon(),this.finishNode(e,"VariableDeclaration")};V.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(Pi),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")};V.parseWithStatement=function(e){if(this.strict)this.raise(this.start,"'with' in strict mode");return this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")};V.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")};V.parseLabeledStatement=function(e,t,n,r){for(var i=0,o=this.labels;i<o.length;i+=1){var s=o[i];if(s.name===t)this.raise(n.start,"Label '"+t+"' is already declared")}var c=this.type.isLoop?"loop":this.type===h._switch?"switch":null;for(var l=this.labels.length-1;l>=0;l--){var u=this.labels[l];if(u.statementStart===e.start)u.statementStart=this.start,u.kind=c;else break}return this.labels.push({name:t,kind:c,statementStart:this.start}),e.body=this.parseStatement(r?r.indexOf("label")===-1?r+"label":r:"label"),this.labels.pop(),e.label=n,this.finishNode(e,"LabeledStatement")};V.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")};V.parseBlock=function(e,t,n){if(e===void 0)e=!0;if(t===void 0)t=this.startNode();if(t.body=[],this.expect(h.braceL),e)this.enterScope(0);while(this.type!==h.braceR){var r=this.parseStatement(null);t.body.push(r)}if(n)this.strict=!1;if(this.next(),e)this.exitScope();return this.finishNode(t,"BlockStatement")};V.parseFor=function(e,t){return e.init=t,this.expect(h.semi),e.test=this.type===h.semi?null:this.parseExpression(),this.expect(h.semi),e.update=this.type===h.parenR?null:this.parseExpression(),this.expect(h.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")};V.parseForIn=function(e,t){var n=this.type===h._in;if(this.next(),t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!n||this.options.ecmaVersion<8||this.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier"))this.raise(t.start,(n?"for-in":"for-of")+" loop variable declaration may not have an initializer");return e.left=t,e.right=n?this.parseExpression():this.parseMaybeAssign(),this.expect(h.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,n?"ForInStatement":"ForOfStatement")};V.parseVar=function(e,t,n,r){e.declarations=[],e.kind=n;for(;;){var i=this.startNode();if(this.parseVarId(i,n),this.eat(h.eq))i.init=this.parseMaybeAssign(t);else if(!r&&n==="const"&&!(this.type===h._in||this.options.ecmaVersion>=6&&this.isContextual("of")))this.unexpected();else if(!r&&(n==="using"||n==="await using")&&this.options.ecmaVersion>=17&&this.type!==h._in&&!this.isContextual("of"))this.raise(this.lastTokEnd,"Missing initializer in "+n+" declaration");else if(!r&&i.id.type!=="Identifier"&&!(t&&(this.type===h._in||this.isContextual("of"))))this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value");else i.init=null;if(e.declarations.push(this.finishNode(i,"VariableDeclarator")),!this.eat(h.comma))break}return e};V.parseVarId=function(e,t){e.id=t==="using"||t==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(e.id,t==="var"?vi:xt,!1)};var vn=1,yi=2,ao=4;V.parseFunction=function(e,t,n,r,i){if(this.initFunction(e),this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!r){if(this.type===h.star&&t&yi)this.unexpected();e.generator=this.eat(h.star)}if(this.options.ecmaVersion>=8)e.async=!!r;if(t&vn){if(e.id=t&ao&&this.type!==h.name?null:this.parseIdent(),e.id&&!(t&yi))this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?vi:xt:ro)}var o=this.yieldPos,s=this.awaitPos,c=this.awaitIdentPos;if(this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Si(e.async,e.generator)),!(t&vn))e.id=this.type===h.name?this.parseIdent():null;return this.parseFunctionParams(e),this.parseFunctionBody(e,n,!1,i),this.yieldPos=o,this.awaitPos=s,this.awaitIdentPos=c,this.finishNode(e,t&vn?"FunctionDeclaration":"FunctionExpression")};V.parseFunctionParams=function(e){this.expect(h.parenL),e.params=this.parseBindingList(h.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};V.parseClass=function(e,t){this.next();var n=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var r=this.enterClassBody(),i=this.startNode(),o=!1;i.body=[],this.expect(h.braceL);while(this.type!==h.braceR){var s=this.parseClassElement(e.superClass!==null);if(s){if(i.body.push(s),s.type==="MethodDefinition"&&s.kind==="constructor"){if(o)this.raiseRecoverable(s.start,"Duplicate constructor in the same class");o=!0}else if(s.key&&s.key.type==="PrivateIdentifier"&&Qu(r,s))this.raiseRecoverable(s.key.start,"Identifier '#"+s.key.name+"' has already been declared")}}return this.strict=n,this.next(),e.body=this.finishNode(i,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")};V.parseClassElement=function(e){if(this.eat(h.semi))return null;var t=this.options.ecmaVersion,n=this.startNode(),r="",i=!1,o=!1,s="method",c=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(h.braceL))return this.parseClassStaticBlock(n),n;if(this.isClassElementNameStart()||this.type===h.star)c=!0;else r="static"}if(n.static=c,!r&&t>=8&&this.eatContextual("async"))if((this.isClassElementNameStart()||this.type===h.star)&&!this.canInsertSemicolon())o=!0;else r="async";if(!r&&(t>=9||!o)&&this.eat(h.star))i=!0;if(!r&&!o&&!i){var l=this.value;if(this.eatContextual("get")||this.eatContextual("set"))if(this.isClassElementNameStart())s=l;else r=l}if(r)n.computed=!1,n.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),n.key.name=r,this.finishNode(n.key,"Identifier");else this.parseClassElementName(n);if(t<13||this.type===h.parenL||s!=="method"||i||o){var u=!n.static&&tr(n,"constructor"),f=u&&e;if(u&&s!=="method")this.raise(n.key.start,"Constructor can't have get/set modifier");n.kind=u?"constructor":s,this.parseClassMethod(n,i,o,f)}else this.parseClassField(n);return n};V.isClassElementNameStart=function(){return this.type===h.name||this.type===h.privateId||this.type===h.num||this.type===h.string||this.type===h.bracketL||this.type.keyword};V.parseClassElementName=function(e){if(this.type===h.privateId){if(this.value==="constructor")this.raise(this.start,"Classes can't have an element named '#constructor'");e.computed=!1,e.key=this.parsePrivateIdent()}else this.parsePropertyName(e)};V.parseClassMethod=function(e,t,n,r){var i=e.key;if(e.kind==="constructor"){if(t)this.raise(i.start,"Constructor can't be a generator");if(n)this.raise(i.start,"Constructor can't be an async method")}else if(e.static&&tr(e,"prototype"))this.raise(i.start,"Classes may not have a static property named prototype");var o=e.value=this.parseMethod(t,n,r);if(e.kind==="get"&&o.params.length!==0)this.raiseRecoverable(o.start,"getter should have no params");if(e.kind==="set"&&o.params.length!==1)this.raiseRecoverable(o.start,"setter should have exactly one param");if(e.kind==="set"&&o.params[0].type==="RestElement")this.raiseRecoverable(o.params[0].start,"Setter cannot use rest params");return this.finishNode(e,"MethodDefinition")};V.parseClassField=function(e){if(tr(e,"constructor"))this.raise(e.key.start,"Classes can't have a field named 'constructor'");else if(e.static&&tr(e,"prototype"))this.raise(e.key.start,"Classes can't have a static field named 'prototype'");if(this.eat(h.eq))this.enterScope(An|sr),e.value=this.parseMaybeAssign(),this.exitScope();else e.value=null;return this.semicolon(),this.finishNode(e,"PropertyDefinition")};V.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;this.labels=[],this.enterScope(Bt|sr);while(this.type!==h.braceR){var n=this.parseStatement(null);e.body.push(n)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")};V.parseClassId=function(e,t){if(this.type===h.name){if(e.id=this.parseIdent(),t)this.checkLValSimple(e.id,xt,!1)}else{if(t===!0)this.unexpected();e.id=null}};V.parseClassSuper=function(e){e.superClass=this.eat(h._extends)?this.parseExprSubscripts(null,!1):null};V.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared};V.exitClassBody=function(){var e=this.privateNameStack.pop(),{declared:t,used:n}=e;if(!this.options.checkPrivateFields)return;var r=this.privateNameStack.length,i=r===0?null:this.privateNameStack[r-1];for(var o=0;o<n.length;++o){var s=n[o];if(!Yt(t,s.name))if(i)i.used.push(s);else this.raiseRecoverable(s.start,"Private field '#"+s.name+"' must be declared in an enclosing class")}};function Qu(e,t){var n=t.key.name,r=e[n],i="true";if(t.type==="MethodDefinition"&&(t.kind==="get"||t.kind==="set"))i=(t.static?"s":"i")+t.kind;if(r==="iget"&&i==="iset"||r==="iset"&&i==="iget"||r==="sget"&&i==="sset"||r==="sset"&&i==="sget")return e[n]="true",!1;else if(!r)return e[n]=i,!1;else return!0}function tr(e,t){var{computed:n,key:r}=e;return!n&&(r.type==="Identifier"&&r.name===t||r.type==="Literal"&&r.value===t)}V.parseExportAllDeclaration=function(e,t){if(this.options.ecmaVersion>=11)if(this.eatContextual("as"))e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart);else e.exported=null;if(this.expectContextual("from"),this.type!==h.string)this.unexpected();if(e.source=this.parseExprAtom(),this.options.ecmaVersion>=16)e.attributes=this.parseWithClause();return this.semicolon(),this.finishNode(e,"ExportAllDeclaration")};V.parseExport=function(e,t){if(this.next(),this.eat(h.star))return this.parseExportAllDeclaration(e,t);if(this.eat(h._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement()){if(e.declaration=this.parseExportDeclaration(e),e.declaration.type==="VariableDeclaration")this.checkVariableExport(t,e.declaration.declarations);else this.checkExport(t,e.declaration.id,e.declaration.id.start);if(e.specifiers=[],e.source=null,this.options.ecmaVersion>=16)e.attributes=[]}else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from")){if(this.type!==h.string)this.unexpected();if(e.source=this.parseExprAtom(),this.options.ecmaVersion>=16)e.attributes=this.parseWithClause()}else{for(var n=0,r=e.specifiers;n<r.length;n+=1){var i=r[n];if(this.checkUnreserved(i.local),this.checkLocalExport(i.local),i.local.type==="Literal")this.raise(i.local.start,"A string literal cannot be used as an exported binding without `from`.")}if(e.source=null,this.options.ecmaVersion>=16)e.attributes=[]}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")};V.parseExportDeclaration=function(e){return this.parseStatement(null)};V.parseExportDefaultDeclaration=function(){var e;if(this.type===h._function||(e=this.isAsyncFunction())){var t=this.startNode();if(this.next(),e)this.next();return this.parseFunction(t,vn|ao,!1,e)}else if(this.type===h._class){var n=this.startNode();return this.parseClass(n,"nullableID")}else{var r=this.parseMaybeAssign();return this.semicolon(),r}};V.checkExport=function(e,t,n){if(!e)return;if(typeof t!=="string")t=t.type==="Identifier"?t.name:t.value;if(Yt(e,t))this.raiseRecoverable(n,"Duplicate export '"+t+"'");e[t]=!0};V.checkPatternExport=function(e,t){var n=t.type;if(n==="Identifier")this.checkExport(e,t,t.start);else if(n==="ObjectPattern")for(var r=0,i=t.properties;r<i.length;r+=1){var o=i[r];this.checkPatternExport(e,o)}else if(n==="ArrayPattern")for(var s=0,c=t.elements;s<c.length;s+=1){var l=c[s];if(l)this.checkPatternExport(e,l)}else if(n==="Property")this.checkPatternExport(e,t.value);else if(n==="AssignmentPattern")this.checkPatternExport(e,t.left);else if(n==="RestElement")this.checkPatternExport(e,t.argument)};V.checkVariableExport=function(e,t){if(!e)return;for(var n=0,r=t;n<r.length;n+=1){var i=r[n];this.checkPatternExport(e,i.id)}};V.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()};V.parseExportSpecifier=function(e){var t=this.startNode();return t.local=this.parseModuleExportName(),t.exported=this.eatContextual("as")?this.parseModuleExportName():t.local,this.checkExport(e,t.exported,t.exported.start),this.finishNode(t,"ExportSpecifier")};V.parseExportSpecifiers=function(e){var t=[],n=!0;this.expect(h.braceL);while(!this.eat(h.braceR)){if(!n){if(this.expect(h.comma),this.afterTrailingComma(h.braceR))break}else n=!1;t.push(this.parseExportSpecifier(e))}return t};V.parseImport=function(e){if(this.next(),this.type===h.string)e.specifiers=Yu,e.source=this.parseExprAtom();else e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===h.string?this.parseExprAtom():this.unexpected();if(this.options.ecmaVersion>=16)e.attributes=this.parseWithClause();return this.semicolon(),this.finishNode(e,"ImportDeclaration")};V.parseImportSpecifier=function(){var e=this.startNode();if(e.imported=this.parseModuleExportName(),this.eatContextual("as"))e.local=this.parseIdent();else this.checkUnreserved(e.imported),e.local=e.imported;return this.checkLValSimple(e.local,xt),this.finishNode(e,"ImportSpecifier")};V.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,xt),this.finishNode(e,"ImportDefaultSpecifier")};V.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual("as"),e.local=this.parseIdent(),this.checkLValSimple(e.local,xt),this.finishNode(e,"ImportNamespaceSpecifier")};V.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===h.name){if(e.push(this.parseImportDefaultSpecifier()),!this.eat(h.comma))return e}if(this.type===h.star)return e.push(this.parseImportNamespaceSpecifier()),e;this.expect(h.braceL);while(!this.eat(h.braceR)){if(!t){if(this.expect(h.comma),this.afterTrailingComma(h.braceR))break}else t=!1;e.push(this.parseImportSpecifier())}return e};V.parseWithClause=function(){var e=[];if(!this.eat(h._with))return e;this.expect(h.braceL);var t={},n=!0;while(!this.eat(h.braceR)){if(!n){if(this.expect(h.comma),this.afterTrailingComma(h.braceR))break}else n=!1;var r=this.parseImportAttribute(),i=r.key.type==="Identifier"?r.key.name:r.key.value;if(Yt(t,i))this.raiseRecoverable(r.key.start,"Duplicate attribute key '"+i+"'");t[i]=!0,e.push(r)}return e};V.parseImportAttribute=function(){var e=this.startNode();if(e.key=this.type===h.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(h.colon),this.type!==h.string)this.unexpected();return e.value=this.parseExprAtom(),this.finishNode(e,"ImportAttribute")};V.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===h.string){var e=this.parseLiteral(this.value);if(Wu.test(e.value))this.raise(e.start,"An export name cannot include a lone surrogate.");return e}return this.parseIdent(!0)};V.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)};V.isDirectiveCandidate=function(e){return this.options.ecmaVersion>=5&&e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value==="string"&&(this.input[e.start]==='"'||this.input[e.start]==="'")};var tt=me.prototype;tt.toAssignable=function(e,t,n){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":if(this.inAsync&&e.name==="await")this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":if(e.type="ObjectPattern",n)this.checkPatternErrors(n,!0);for(var r=0,i=e.properties;r<i.length;r+=1){var o=i[r];if(this.toAssignable(o,t),o.type==="RestElement"&&(o.argument.type==="ArrayPattern"||o.argument.type==="ObjectPattern"))this.raise(o.argument.start,"Unexpected token")}break;case"Property":if(e.kind!=="init")this.raise(e.key.start,"Object pattern can't contain getter or setter");this.toAssignable(e.value,t);break;case"ArrayExpression":if(e.type="ArrayPattern",n)this.checkPatternErrors(n,!0);this.toAssignableList(e.elements,t);break;case"SpreadElement":if(e.type="RestElement",this.toAssignable(e.argument,t),e.argument.type==="AssignmentPattern")this.raise(e.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":if(e.operator!=="=")this.raise(e.left.end,"Only '=' operator can be used for specifying default value.");e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(e.expression,t,n);break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}else if(n)this.checkPatternErrors(n,!0);return e};tt.toAssignableList=function(e,t){var n=e.length;for(var r=0;r<n;r++){var i=e[r];if(i)this.toAssignable(i,t)}if(n){var o=e[n-1];if(this.options.ecmaVersion===6&&t&&o&&o.type==="RestElement"&&o.argument.type!=="Identifier")this.unexpected(o.argument.start)}return e};tt.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")};tt.parseRestBinding=function(){var e=this.startNode();if(this.next(),this.options.ecmaVersion===6&&this.type!==h.name)this.unexpected();return e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")};tt.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case h.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(h.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case h.braceL:return this.parseObj(!0)}return this.parseIdent()};tt.parseBindingList=function(e,t,n,r){var i=[],o=!0;while(!this.eat(e)){if(o)o=!1;else this.expect(h.comma);if(t&&this.type===h.comma)i.push(null);else if(n&&this.afterTrailingComma(e))break;else if(this.type===h.ellipsis){var s=this.parseRestBinding();if(this.parseBindingListItem(s),i.push(s),this.type===h.comma)this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");this.expect(e);break}else i.push(this.parseAssignableListItem(r))}return i};tt.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t};tt.parseBindingListItem=function(e){return e};tt.parseMaybeDefault=function(e,t,n){if(n=n||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(h.eq))return n;var r=this.startNodeAt(e,t);return r.left=n,r.right=this.parseMaybeAssign(),this.finishNode(r,"AssignmentPattern")};tt.checkLValSimple=function(e,t,n){if(t===void 0)t=er;var r=t!==er;switch(e.type){case"Identifier":if(this.strict&&this.reservedWordsStrictBind.test(e.name))this.raiseRecoverable(e.start,(r?"Binding ":"Assigning to ")+e.name+" in strict mode");if(r){if(t===xt&&e.name==="let")this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name");if(n){if(Yt(n,e.name))this.raiseRecoverable(e.start,"Argument name clash");n[e.name]=!0}if(t!==so)this.declareName(e.name,t,e.start)}break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(r)this.raiseRecoverable(e.start,"Binding member expression");break;case"ParenthesizedExpression":if(r)this.raiseRecoverable(e.start,"Binding parenthesized expression");return this.checkLValSimple(e.expression,t,n);default:this.raise(e.start,(r?"Binding":"Assigning to")+" rvalue")}};tt.checkLValPattern=function(e,t,n){if(t===void 0)t=er;switch(e.type){case"ObjectPattern":for(var r=0,i=e.properties;r<i.length;r+=1){var o=i[r];this.checkLValInnerPattern(o,t,n)}break;case"ArrayPattern":for(var s=0,c=e.elements;s<c.length;s+=1){var l=c[s];if(l)this.checkLValInnerPattern(l,t,n)}break;default:this.checkLValSimple(e,t,n)}};tt.checkLValInnerPattern=function(e,t,n){if(t===void 0)t=er;switch(e.type){case"Property":this.checkLValInnerPattern(e.value,t,n);break;case"AssignmentPattern":this.checkLValPattern(e.left,t,n);break;case"RestElement":this.checkLValPattern(e.argument,t,n);break;default:this.checkLValPattern(e,t,n)}};var Qe=function(t,n,r,i,o){this.token=t,this.isExpr=!!n,this.preserveSpace=!!r,this.override=i,this.generator=!!o},he={b_stat:new Qe("{",!1),b_expr:new Qe("{",!0),b_tmpl:new Qe("${",!1),p_stat:new Qe("(",!1),p_expr:new Qe("(",!0),q_tmpl:new Qe("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new Qe("function",!1),f_expr:new Qe("function",!0),f_expr_gen:new Qe("function",!0,!1,null,!0),f_gen:new Qe("function",!1,!1,null,!0)},Qt=me.prototype;Qt.initialContext=function(){return[he.b_stat]};Qt.curContext=function(){return this.context[this.context.length-1]};Qt.braceIsBlock=function(e){var t=this.curContext();if(t===he.f_expr||t===he.f_stat)return!0;if(e===h.colon&&(t===he.b_stat||t===he.b_expr))return!t.isExpr;if(e===h._return||e===h.name&&this.exprAllowed)return Re.test(this.input.slice(this.lastTokEnd,this.start));if(e===h._else||e===h.semi||e===h.eof||e===h.parenR||e===h.arrow)return!0;if(e===h.braceL)return t===he.b_stat;if(e===h._var||e===h._const||e===h.name)return!1;return!this.exprAllowed};Qt.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if(t.token==="function")return t.generator}return!1};Qt.updateContext=function(e){var t,n=this.type;if(n.keyword&&e===h.dot)this.exprAllowed=!1;else if(t=n.updateContext)t.call(this,e);else this.exprAllowed=n.beforeExpr};Qt.overrideContext=function(e){if(this.curContext()!==e)this.context[this.context.length-1]=e};h.parenR.updateContext=h.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var e=this.context.pop();if(e===he.b_stat&&this.curContext().token==="function")e=this.context.pop();this.exprAllowed=!e.isExpr};h.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?he.b_stat:he.b_expr),this.exprAllowed=!0};h.dollarBraceL.updateContext=function(){this.context.push(he.b_tmpl),this.exprAllowed=!0};h.parenL.updateContext=function(e){var t=e===h._if||e===h._for||e===h._with||e===h._while;this.context.push(t?he.p_stat:he.p_expr),this.exprAllowed=!0};h.incDec.updateContext=function(){};h._function.updateContext=h._class.updateContext=function(e){if(e.beforeExpr&&e!==h._else&&!(e===h.semi&&this.curContext()!==he.p_stat)&&!(e===h._return&&Re.test(this.input.slice(this.lastTokEnd,this.start)))&&!((e===h.colon||e===h.braceL)&&this.curContext()===he.b_stat))this.context.push(he.f_expr);else this.context.push(he.f_stat);this.exprAllowed=!1};h.colon.updateContext=function(){if(this.curContext().token==="function")this.context.pop();this.exprAllowed=!0};h.backQuote.updateContext=function(){if(this.curContext()===he.q_tmpl)this.context.pop();else this.context.push(he.q_tmpl);this.exprAllowed=!1};h.star.updateContext=function(e){if(e===h._function){var t=this.context.length-1;if(this.context[t]===he.f_expr)this.context[t]=he.f_expr_gen;else this.context[t]=he.f_gen}this.exprAllowed=!0};h.name.updateContext=function(e){var t=!1;if(this.options.ecmaVersion>=6&&e!==h.dot){if(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())t=!0}this.exprAllowed=t};var z=me.prototype;z.checkPropClash=function(e,t,n){if(this.options.ecmaVersion>=9&&e.type==="SpreadElement")return;if(this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))return;var r=e.key,i;switch(r.type){case"Identifier":i=r.name;break;case"Literal":i=String(r.value);break;default:return}var o=e.kind;if(this.options.ecmaVersion>=6){if(i==="__proto__"&&o==="init"){if(t.proto)if(n){if(n.doubleProto<0)n.doubleProto=r.start}else this.raiseRecoverable(r.start,"Redefinition of __proto__ property");t.proto=!0}return}i="$"+i;var s=t[i];if(s){var c;if(o==="init")c=this.strict&&s.init||s.get||s.set;else c=s.init||s[o];if(c)this.raiseRecoverable(r.start,"Redefinition of property")}else s=t[i]={init:!1,get:!1,set:!1};s[o]=!0};z.parseExpression=function(e,t){var n=this;return this.catchStackOverflow(function(){var{start:r,startLoc:i}=n,o=n.parseMaybeAssign(e,t);if(n.type===h.comma){var s=n.startNodeAt(r,i);s.expressions=[o];while(n.eat(h.comma))s.expressions.push(n.parseMaybeAssign(e,t));return n.finishNode(s,"SequenceExpression")}return o})};z.parseMaybeAssign=function(e,t,n){if(this.isContextual("yield"))if(this.inGenerator)return this.parseYield(e);else this.exprAllowed=!1;var r=!1,i=-1,o=-1,s=-1;if(t)i=t.parenthesizedAssign,o=t.trailingComma,s=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1;else t=new or,r=!0;var c=this.start,l=this.startLoc;if(this.type===h.parenL||this.type===h.name)this.potentialArrowAt=this.start,this.potentialArrowInForAwait=e==="await";var u=this.parseMaybeConditional(e,t);if(n)u=n.call(this,u,c,l);if(this.type.isAssign){var f=this.startNodeAt(c,l);if(f.operator=this.value,this.type===h.eq)u=this.toAssignable(u,!1,t);if(!r)t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1;if(t.shorthandAssign>=u.start)t.shorthandAssign=-1;if(this.type===h.eq)this.checkLValPattern(u);else this.checkLValSimple(u);if(f.left=u,this.next(),f.right=this.parseMaybeAssign(e),s>-1)t.doubleProto=s;return this.finishNode(f,"AssignmentExpression")}else if(r)this.checkExpressionErrors(t,!0);if(i>-1)t.parenthesizedAssign=i;if(o>-1)t.trailingComma=o;return u};z.parseMaybeConditional=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return i;if(!(i.type==="ArrowFunctionExpression"&&i.start===n)&&this.eat(h.question)){var o=this.startNodeAt(n,r);return o.test=i,o.consequent=this.parseMaybeAssign(),this.expect(h.colon),o.alternate=this.parseMaybeAssign(e),this.finishNode(o,"ConditionalExpression")}return i};z.parseExprOps=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeUnary(t,!1,!1,e);if(this.checkExpressionErrors(t))return i;return i.start===n&&i.type==="ArrowFunctionExpression"?i:this.parseExprOp(i,n,r,-1,e)};z.parseExprOp=function(e,t,n,r,i){var o=this.type.binop;if(o!=null&&(!i||this.type!==h._in)){if(o>r){var s=this.type===h.logicalOR||this.type===h.logicalAND,c=this.type===h.coalesce;if(c)o=h.logicalAND.binop;var l=this.value;this.next();var u=this.start,f=this.startLoc,y=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,i),u,f,o,i),g=this.buildBinary(t,n,e,y,l,s||c);if(s&&this.type===h.coalesce||c&&(this.type===h.logicalOR||this.type===h.logicalAND))this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses");return this.parseExprOp(g,t,n,r,i)}}return e};z.buildBinary=function(e,t,n,r,i,o){if(r.type==="PrivateIdentifier")this.raise(r.start,"Private identifier can only be left side of binary expression");var s=this.startNodeAt(e,t);return s.left=n,s.operator=i,s.right=r,this.finishNode(s,o?"LogicalExpression":"BinaryExpression")};z.parseMaybeUnary=function(e,t,n,r){var i=this.start,o=this.startLoc,s;if(this.isContextual("await")&&this.canAwait)s=this.parseAwait(r),t=!0;else if(this.type.prefix){var c=this.startNode(),l=this.type===h.incDec;if(c.operator=this.value,c.prefix=!0,this.next(),c.argument=this.parseMaybeUnary(null,!0,l,r),this.checkExpressionErrors(e,!0),l)this.checkLValSimple(c.argument);else if(this.strict&&c.operator==="delete"&&oo(c.argument))this.raiseRecoverable(c.start,"Deleting local variable in strict mode");else if(c.operator==="delete"&&gi(c.argument))this.raiseRecoverable(c.start,"Private fields can not be deleted");else t=!0;s=this.finishNode(c,l?"UpdateExpression":"UnaryExpression")}else if(!t&&this.type===h.privateId){if((r||this.privateNameStack.length===0)&&this.options.checkPrivateFields)this.unexpected();if(s=this.parsePrivateIdent(),this.type!==h._in)this.unexpected()}else{if(s=this.parseExprSubscripts(e,r),this.checkExpressionErrors(e))return s;while(this.type.postfix&&!this.canInsertSemicolon()){var u=this.startNodeAt(i,o);u.operator=this.value,u.prefix=!1,u.argument=s,this.checkLValSimple(s),this.next(),s=this.finishNode(u,"UpdateExpression")}}if(!n&&!(s.type==="ArrowFunctionExpression"&&s.start===i)&&this.eat(h.starstar))if(t)this.unexpected(this.lastTokStart);else return this.buildBinary(i,o,s,this.parseMaybeUnary(null,!1,!1,r),"**",!1);else return s};function oo(e){return e.type==="Identifier"||e.type==="ParenthesizedExpression"&&oo(e.expression)}function gi(e){return e.type==="MemberExpression"&&e.property.type==="PrivateIdentifier"||e.type==="ChainExpression"&&gi(e.expression)||e.type==="ParenthesizedExpression"&&gi(e.expression)}z.parseExprSubscripts=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprAtom(e,t);if(i.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return i;var o=this.parseSubscripts(i,n,r,!1,t);if(e&&o.type==="MemberExpression"){if(e.parenthesizedAssign>=o.start)e.parenthesizedAssign=-1;if(e.parenthesizedBind>=o.start)e.parenthesizedBind=-1;if(e.trailingComma>=o.start)e.trailingComma=-1}return o};z.parseSubscripts=function(e,t,n,r,i){var o=this.options.ecmaVersion>=8&&e.type==="Identifier"&&e.name==="async"&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.potentialArrowAt===e.start,s=!1;while(!0){var c=this.parseSubscript(e,t,n,r,o,s,i);if(c.optional)s=!0;if(c===e||c.type==="ArrowFunctionExpression"){if(s){var l=this.startNodeAt(t,n);l.expression=c,c=this.finishNode(l,"ChainExpression")}return c}e=c}};z.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(h.arrow)};z.parseSubscriptAsyncArrow=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!0,r)};z.parseSubscript=function(e,t,n,r,i,o,s){var c=this.options.ecmaVersion>=11,l=c&&this.eat(h.questionDot);if(r&&l)this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var u=this.eat(h.bracketL);if(u||l&&this.type!==h.parenL&&this.type!==h.backQuote||this.eat(h.dot)){var f=this.startNodeAt(t,n);if(f.object=e,u)f.property=this.parseExpression(),this.expect(h.bracketR);else if(this.type===h.privateId&&e.type!=="Super")f.property=this.parsePrivateIdent();else f.property=this.parseIdent(this.options.allowReserved!=="never");if(f.computed=!!u,c)f.optional=l;e=this.finishNode(f,"MemberExpression")}else if(!r&&this.eat(h.parenL)){var y=new or,g=this.yieldPos,b=this.awaitPos,P=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var N=this.parseExprList(h.parenR,this.options.ecmaVersion>=8,!1,y);if(i&&!l&&this.shouldParseAsyncArrow()){if(this.checkPatternErrors(y,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0)this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function");return this.yieldPos=g,this.awaitPos=b,this.awaitIdentPos=P,this.parseSubscriptAsyncArrow(t,n,N,s)}this.checkExpressionErrors(y,!0),this.yieldPos=g||this.yieldPos,this.awaitPos=b||this.awaitPos,this.awaitIdentPos=P||this.awaitIdentPos;var D=this.startNodeAt(t,n);if(D.callee=e,D.arguments=N,c)D.optional=l;e=this.finishNode(D,"CallExpression")}else if(this.type===h.backQuote){if(l||o)this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var j=this.startNodeAt(t,n);j.tag=e,j.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(j,"TaggedTemplateExpression")}return e};z.parseExprAtom=function(e,t,n){if(this.type===h.slash)this.readRegexp();var r,i=this.potentialArrowAt===this.start;switch(this.type){case h._super:if(!this.allowSuper)this.raise(this.start,"'super' keyword outside a method");if(r=this.startNode(),this.next(),this.type===h.parenL&&!this.allowDirectSuper)this.raise(r.start,"super() call outside constructor of a subclass");if(this.type!==h.dot&&this.type!==h.bracketL&&this.type!==h.parenL)this.unexpected();return this.finishNode(r,"Super");case h._this:return r=this.startNode(),this.next(),this.finishNode(r,"ThisExpression");case h.name:var o=this.start,s=this.startLoc,c=this.containsEsc,l=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!c&&l.name==="async"&&!this.canInsertSemicolon()&&this.eat(h._function))return this.overrideContext(he.f_expr),this.parseFunction(this.startNodeAt(o,s),0,!1,!0,t);if(i&&!this.canInsertSemicolon()){if(this.eat(h.arrow))return this.parseArrowExpression(this.startNodeAt(o,s),[l],!1,t);if(this.options.ecmaVersion>=8&&l.name==="async"&&this.type===h.name&&!c&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc)){if(l=this.parseIdent(!1),this.canInsertSemicolon()||!this.eat(h.arrow))this.unexpected();return this.parseArrowExpression(this.startNodeAt(o,s),[l],!0,t)}}return l;case h.regexp:var u=this.value;return r=this.parseLiteral(u.value),r.regex={pattern:u.pattern,flags:u.flags},r;case h.num:case h.string:return this.parseLiteral(this.value);case h._null:case h._true:case h._false:return r=this.startNode(),r.value=this.type===h._null?null:this.type===h._true,r.raw=this.type.keyword,this.next(),this.finishNode(r,"Literal");case h.parenL:var f=this.start,y=this.parseParenAndDistinguishExpression(i,t);if(e){if(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(y))e.parenthesizedAssign=f;if(e.parenthesizedBind<0)e.parenthesizedBind=f}return y;case h.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(h.bracketR,!0,!0,e),this.finishNode(r,"ArrayExpression");case h.braceL:return this.overrideContext(he.b_expr),this.parseObj(!1,e);case h._function:return r=this.startNode(),this.next(),this.parseFunction(r,0);case h._class:return this.parseClass(this.startNode(),!1);case h._new:return this.parseNew();case h.backQuote:return this.parseTemplate();case h._import:if(this.options.ecmaVersion>=11)return this.parseExprImport(n);else return this.unexpected();default:return this.parseExprAtomDefault()}};z.parseExprAtomDefault=function(){this.unexpected()};z.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc)this.raiseRecoverable(this.start,"Escape sequence in keyword import");if(this.next(),this.type===h.parenL&&!e)return this.parseDynamicImport(t);else if(this.type===h.dot){var n=this.startNodeAt(t.start,t.loc&&t.loc.start);return n.name="import",t.meta=this.finishNode(n,"Identifier"),this.parseImportMeta(t)}else this.unexpected()};z.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)if(!this.eat(h.parenR))if(this.expect(h.comma),!this.afterTrailingComma(h.parenR)){if(e.options=this.parseMaybeAssign(),!this.eat(h.parenR)){if(this.expect(h.comma),!this.afterTrailingComma(h.parenR))this.unexpected()}}else e.options=null;else e.options=null;else if(!this.eat(h.parenR)){var t=this.start;if(this.eat(h.comma)&&this.eat(h.parenR))this.raiseRecoverable(t,"Trailing comma is not allowed in import()");else this.unexpected(t)}return this.finishNode(e,"ImportExpression")};z.parseImportMeta=function(e){this.next();var t=this.containsEsc;if(e.property=this.parseIdent(!0),e.property.name!=="meta")this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'");if(t)this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters");if(this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere)this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module");return this.finishNode(e,"MetaProperty")};z.parseLiteral=function(e){var t=this.startNode();if(t.value=e,t.raw=this.input.slice(this.start,this.end),t.raw.charCodeAt(t.raw.length-1)===110)t.bigint=t.value!=null?t.value.toString():t.raw.slice(0,-1).replace(/_/g,"");return this.next(),this.finishNode(t,"Literal")};z.parseParenExpression=function(){this.expect(h.parenL);var e=this.parseExpression();return this.expect(h.parenR),e};z.shouldParseArrow=function(e){return!this.canInsertSemicolon()};z.parseParenAndDistinguishExpression=function(e,t){var n=this.start,r=this.startLoc,i,o=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var s=this.start,c=this.startLoc,l=[],u=!0,f=!1,y=new or,g=this.yieldPos,b=this.awaitPos,P;this.yieldPos=0,this.awaitPos=0;while(this.type!==h.parenR)if(u?u=!1:this.expect(h.comma),o&&this.afterTrailingComma(h.parenR,!0)){f=!0;break}else if(this.type===h.ellipsis){if(P=this.start,l.push(this.parseParenItem(this.parseRestBinding())),this.type===h.comma)this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else l.push(this.parseMaybeAssign(!1,y,this.parseParenItem));var N=this.lastTokEnd,D=this.lastTokEndLoc;if(this.expect(h.parenR),e&&this.shouldParseArrow(l)&&this.eat(h.arrow))return this.checkPatternErrors(y,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=g,this.awaitPos=b,this.parseParenArrowList(n,r,l,t);if(!l.length||f)this.unexpected(this.lastTokStart);if(P)this.unexpected(P);if(this.checkExpressionErrors(y,!0),this.yieldPos=g||this.yieldPos,this.awaitPos=b||this.awaitPos,l.length>1)i=this.startNodeAt(s,c),i.expressions=l,this.finishNodeAt(i,"SequenceExpression",N,D);else i=l[0]}else i=this.parseParenExpression();if(this.options.preserveParens){var j=this.startNodeAt(n,r);return j.expression=i,this.finishNode(j,"ParenthesizedExpression")}else return i};z.parseParenItem=function(e){return e};z.parseParenArrowList=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!1,r)};var Zu=[];z.parseNew=function(){if(this.containsEsc)this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===h.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name="new",e.meta=this.finishNode(t,"Identifier"),this.next();var n=this.containsEsc;if(e.property=this.parseIdent(!0),e.property.name!=="target")this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'");if(n)this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters");if(!this.allowNewDotTarget)this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block");return this.finishNode(e,"MetaProperty")}var r=this.start,i=this.startLoc;if(e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),r,i,!0,!1),e.callee.type==="Super")this.raiseRecoverable(r,"Invalid use of 'super'");if(this.eat(h.parenL))e.arguments=this.parseExprList(h.parenR,this.options.ecmaVersion>=8,!1);else e.arguments=Zu;return this.finishNode(e,"NewExpression")};z.parseTemplateElement=function(e){var t=e.isTagged,n=this.startNode();if(this.type===h.invalidTemplate){if(!t)this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal");n.value={raw:this.value.replace(/\r\n?/g,`
28
31
  `),cooked:null}}else n.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
29
- `),cooked:this.value};return this.next(),n.tail=this.type===f.backQuote,this.finishNode(n,"TemplateElement")};H.parseTemplate=function(e){if(e===void 0)e={};var t=e.isTagged;if(t===void 0)t=!1;var n=this.startNode();this.next(),n.expressions=[];var r=this.parseTemplateElement({isTagged:t});n.quasis=[r];while(!r.tail){if(this.type===f.eof)this.raise(this.pos,"Unterminated template literal");this.expect(f.dollarBraceL),n.expressions.push(this.parseExpression()),this.expect(f.braceR),n.quasis.push(r=this.parseTemplateElement({isTagged:t}))}return this.next(),this.finishNode(n,"TemplateLiteral")};H.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===f.name||this.type===f.num||this.type===f.string||this.type===f.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===f.star)&&!Ne.test(this.input.slice(this.lastTokEnd,this.start))};H.parseObj=function(e,t){var n=this.startNode(),r=!0,i={};n.properties=[],this.next();while(!this.eat(f.braceR)){if(!r){if(this.expect(f.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(f.braceR))break}else r=!1;var o=this.parseProperty(e,t);if(!e)this.checkPropClash(o,i,t);n.properties.push(o)}return this.finishNode(n,e?"ObjectPattern":"ObjectExpression")};H.parseProperty=function(e,t){var n=this.startNode(),r,i,o,s;if(this.options.ecmaVersion>=9&&this.eat(f.ellipsis)){if(e){if(n.argument=this.parseIdent(!1),this.type===f.comma)this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");return this.finishNode(n,"RestElement")}if(n.argument=this.parseMaybeAssign(!1,t),this.type===f.comma&&t&&t.trailingComma<0)t.trailingComma=this.start;return this.finishNode(n,"SpreadElement")}if(this.options.ecmaVersion>=6){if(n.method=!1,n.shorthand=!1,e||t)o=this.start,s=this.startLoc;if(!e)r=this.eat(f.star)}var p=this.containsEsc;if(this.parsePropertyName(n),!e&&!p&&this.options.ecmaVersion>=8&&!r&&this.isAsyncProp(n))i=!0,r=this.options.ecmaVersion>=9&&this.eat(f.star),this.parsePropertyName(n);else i=!1;return this.parsePropertyValue(n,e,r,i,o,s,t,p),this.finishNode(n,"Property")};H.parseGetterSetter=function(e){var t=e.key.name;this.parsePropertyName(e),e.value=this.parseMethod(!1),e.kind=t;var n=e.kind==="get"?0:1;if(e.value.params.length!==n){var r=e.value.start;if(e.kind==="get")this.raiseRecoverable(r,"getter should have no params");else this.raiseRecoverable(r,"setter should have exactly one param")}else if(e.kind==="set"&&e.value.params[0].type==="RestElement")this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")};H.parsePropertyValue=function(e,t,n,r,i,o,s,p){if((n||r)&&this.type===f.colon)this.unexpected();if(this.eat(f.colon))e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,s),e.kind="init";else if(this.options.ecmaVersion>=6&&this.type===f.parenL){if(t)this.unexpected();e.method=!0,e.value=this.parseMethod(n,r),e.kind="init"}else if(!t&&!p&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&(this.type!==f.comma&&this.type!==f.braceR&&this.type!==f.eq)){if(n||r)this.unexpected();this.parseGetterSetter(e)}else if(this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"){if(n||r)this.unexpected();if(this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos)this.awaitIdentPos=i;if(t)e.value=this.parseMaybeDefault(i,o,this.copyNode(e.key));else if(this.type===f.eq&&s){if(s.shorthandAssign<0)s.shorthandAssign=this.start;e.value=this.parseMaybeDefault(i,o,this.copyNode(e.key))}else e.value=this.copyNode(e.key);e.kind="init",e.shorthand=!0}else this.unexpected()};H.parsePropertyName=function(e){if(this.options.ecmaVersion>=6)if(this.eat(f.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(f.bracketR),e.key;else e.computed=!1;return e.key=this.type===f.num||this.type===f.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};H.initFunction=function(e){if(e.id=null,this.options.ecmaVersion>=6)e.generator=e.expression=!1;if(this.options.ecmaVersion>=8)e.async=!1};H.parseMethod=function(e,t,n){var r=this.startNode(),i=this.yieldPos,o=this.awaitPos,s=this.awaitIdentPos;if(this.initFunction(r),this.options.ecmaVersion>=6)r.generator=e;if(this.options.ecmaVersion>=8)r.async=!!t;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Vr(t,r.generator)|In|(n?oa:0)),this.expect(f.parenL),r.params=this.parseBindingList(f.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(r,!1,!0,!1),this.yieldPos=i,this.awaitPos=o,this.awaitIdentPos=s,this.finishNode(r,"FunctionExpression")};H.parseArrowExpression=function(e,t,n,r){var i=this.yieldPos,o=this.awaitPos,s=this.awaitIdentPos;if(this.enterScope(Vr(n,!1)|Fr),this.initFunction(e),this.options.ecmaVersion>=8)e.async=!!n;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,r),this.yieldPos=i,this.awaitPos=o,this.awaitIdentPos=s,this.finishNode(e,"ArrowFunctionExpression")};H.parseFunctionBody=function(e,t,n,r){var i=t&&this.type!==f.braceL,o=this.strict,s=!1;if(i)e.body=this.parseMaybeAssign(r),e.expression=!0,this.checkParams(e,!1);else{var p=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);if(!o||p){if(s=this.strictDirective(this.end),s&&p)this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list")}var l=this.labels;if(this.labels=[],s)this.strict=!0;if(this.checkParams(e,!o&&!s&&!t&&!n&&this.isSimpleParamList(e.params)),this.strict&&e.id)this.checkLValSimple(e.id,ua);e.body=this.parseBlock(!1,void 0,s&&!o),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=l}this.exitScope()};H.isSimpleParamList=function(e){for(var t=0,n=e;t<n.length;t+=1){var r=n[t];if(r.type!=="Identifier")return!1}return!0};H.checkParams=function(e,t){var n=Object.create(null);for(var r=0,i=e.params;r<i.length;r+=1){var o=i[r];this.checkLValInnerPattern(o,$r,t?null:n)}};H.parseExprList=function(e,t,n,r){var i=[],o=!0;while(!this.eat(e)){if(!o){if(this.expect(f.comma),t&&this.afterTrailingComma(e))break}else o=!1;var s=void 0;if(n&&this.type===f.comma)s=null;else if(this.type===f.ellipsis){if(s=this.parseSpread(r),r&&this.type===f.comma&&r.trailingComma<0)r.trailingComma=this.start}else s=this.parseMaybeAssign(!1,r);i.push(s)}return i};H.checkUnreserved=function(e){var{start:t,end:n,name:r}=e;if(this.inGenerator&&r==="yield")this.raiseRecoverable(t,"Cannot use 'yield' as identifier inside a generator");if(this.inAsync&&r==="await")this.raiseRecoverable(t,"Cannot use 'await' as identifier inside an async function");if(!(this.currentThisScope().flags&Ln)&&r==="arguments")this.raiseRecoverable(t,"Cannot use 'arguments' in class field initializer");if(this.inClassStaticBlock&&(r==="arguments"||r==="await"))this.raise(t,"Cannot use "+r+" in class static initialization block");if(this.keywords.test(r))this.raise(t,"Unexpected keyword '"+r+"'");if(this.options.ecmaVersion<6&&this.input.slice(t,n).indexOf("\\")!==-1)return;var i=this.strict?this.reservedWordsStrict:this.reservedWords;if(i.test(r)){if(!this.inAsync&&r==="await")this.raiseRecoverable(t,"Cannot use keyword 'await' outside an async function");this.raiseRecoverable(t,"The keyword '"+r+"' is reserved")}};H.parseIdent=function(e){var t=this.parseIdentNode();if(this.next(!!e),this.finishNode(t,"Identifier"),!e){if(this.checkUnreserved(t),t.name==="await"&&!this.awaitIdentPos)this.awaitIdentPos=t.start}return t};H.parseIdentNode=function(){var e=this.startNode();if(this.type===f.name)e.name=this.value;else if(this.type.keyword){if(e.name=this.type.keyword,(e.name==="class"||e.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46))this.context.pop();this.type=f.name}else this.unexpected();return e};H.parsePrivateIdent=function(){var e=this.startNode();if(this.type===f.privateId)e.name=this.value;else this.unexpected();if(this.next(),this.finishNode(e,"PrivateIdentifier"),this.options.checkPrivateFields)if(this.privateNameStack.length===0)this.raise(e.start,"Private field '#"+e.name+"' must be declared in an enclosing class");else this.privateNameStack[this.privateNameStack.length-1].used.push(e);return e};H.parseYield=function(e){if(!this.yieldPos)this.yieldPos=this.start;var t=this.startNode();if(this.next(),this.type===f.semi||this.canInsertSemicolon()||this.type!==f.star&&!this.type.startsExpr)t.delegate=!1,t.argument=null;else t.delegate=this.eat(f.star),t.argument=this.parseMaybeAssign(e);return this.finishNode(t,"YieldExpression")};H.parseAwait=function(e){if(!this.awaitPos)this.awaitPos=this.start;var t=this.startNode();return this.next(),t.argument=this.parseMaybeUnary(null,!0,!1,e),this.finishNode(t,"AwaitExpression")};var Nn=fe.prototype;Nn.raise=function(e,t){var n=Or(this.input,e);if(t+=" ("+n.line+":"+n.column+")",this.sourceFile)t+=" in "+this.sourceFile;var r=SyntaxError(t);throw r.pos=e,r.loc=n,r.raisedAt=this.pos,r};Nn.raiseRecoverable=Nn.raise;Nn.curPosition=function(){if(this.options.locations)return new It(this.curLine,this.pos-this.lineStart)};var ht=fe.prototype,kl=function(t){this.flags=t,this.var=[],this.lexical=[],this.functions=[]};ht.enterScope=function(e){this.scopeStack.push(new kl(e))};ht.exitScope=function(){this.scopeStack.pop()};ht.treatFunctionsAsVarInScope=function(e){return e.flags&Ct||!this.inModule&&e.flags&Et};ht.declareName=function(e,t,n){var r=!1;if(t===at){var i=this.currentScope();if(r=i.lexical.indexOf(e)>-1||i.functions.indexOf(e)>-1||i.var.indexOf(e)>-1,i.lexical.push(e),this.inModule&&i.flags&Et)delete this.undefinedExports[e]}else if(t===la){var o=this.currentScope();o.lexical.push(e)}else if(t===pa){var s=this.currentScope();if(this.treatFunctionsAsVar)r=s.lexical.indexOf(e)>-1;else r=s.lexical.indexOf(e)>-1||s.var.indexOf(e)>-1;s.functions.push(e)}else for(var p=this.scopeStack.length-1;p>=0;--p){var l=this.scopeStack[p];if(l.lexical.indexOf(e)>-1&&!(l.flags&aa&&l.lexical[0]===e)||!this.treatFunctionsAsVarInScope(l)&&l.functions.indexOf(e)>-1){r=!0;break}if(l.var.push(e),this.inModule&&l.flags&Et)delete this.undefinedExports[e];if(l.flags&Ln)break}if(r)this.raiseRecoverable(n,"Identifier '"+e+"' has already been declared")};ht.checkLocalExport=function(e){if(this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1)this.undefinedExports[e.name]=e};ht.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};ht.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(Ln|en|vt))return t}};ht.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(Ln|en|vt)&&!(t.flags&Fr))return t}};var tn=function(t,n,r){if(this.type="",this.start=n,this.end=0,t.options.locations)this.loc=new Zt(t,r);if(t.options.directSourceFile)this.sourceFile=t.options.directSourceFile;if(t.options.ranges)this.range=[n,0]},nn=fe.prototype;nn.startNode=function(){return new tn(this,this.start,this.startLoc)};nn.startNodeAt=function(e,t){return new tn(this,e,t)};function ha(e,t,n,r){if(e.type=t,e.end=n,this.options.locations)e.loc.end=r;if(this.options.ranges)e.range[1]=n;return e}nn.finishNode=function(e,t){return ha.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)};nn.finishNodeAt=function(e,t,n,r){return ha.call(this,e,t,n,r)};nn.copyNode=function(e){var t=new tn(this,e.start,this.startLoc);for(var n in e)t[n]=e[n];return t};var wl="Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz",ma="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",ya=ma+" Extended_Pictographic",ga=ya,xa=ga+" EBase EComp EMod EPres ExtPict",ba=xa,Nl=ba,_l={9:ma,10:ya,11:ga,12:xa,13:ba,14:Nl},Dl="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",Il={9:"",10:"",11:"",12:"",13:"",14:Dl},Qs="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",Ta="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",Ea=Ta+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",Sa=Ea+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",Ca=Sa+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",va=Ca+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",Ll=va+" "+wl,Rl={9:Ta,10:Ea,11:Sa,12:Ca,13:va,14:Ll},Aa={};function Ml(e){var t=Aa[e]={binary:ft(_l[e]+" "+Qs),binaryOfStrings:ft(Il[e]),nonBinary:{General_Category:ft(Qs),Script:ft(Rl[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}for(Yt=0,An=[9,10,11,12,13,14];Yt<An.length;Yt+=1)Rr=An[Yt],Ml(Rr);var Rr,Yt,An,I=fe.prototype,_n=function(t,n){this.parent=t,this.base=n||this};_n.prototype.separatedFrom=function(t){for(var n=this;n;n=n.parent)for(var r=t;r;r=r.parent)if(n.base===r.base&&n!==r)return!0;return!1};_n.prototype.sibling=function(){return new _n(this.parent,this.base)};var Ze=function(t){this.parser=t,this.validFlags="gim"+(t.options.ecmaVersion>=6?"uy":"")+(t.options.ecmaVersion>=9?"s":"")+(t.options.ecmaVersion>=13?"d":"")+(t.options.ecmaVersion>=15?"v":""),this.unicodeProperties=Aa[t.options.ecmaVersion>=14?14:t.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};Ze.prototype.reset=function(t,n,r){var i=r.indexOf("v")!==-1,o=r.indexOf("u")!==-1;if(this.start=t|0,this.source=n+"",this.flags=r,i&&this.parser.options.ecmaVersion>=15)this.switchU=!0,this.switchV=!0,this.switchN=!0;else this.switchU=o&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=o&&this.parser.options.ecmaVersion>=9};Ze.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)};Ze.prototype.at=function(t,n){if(n===void 0)n=!1;var r=this.source,i=r.length;if(t>=i)return-1;var o=r.charCodeAt(t);if(!(n||this.switchU)||o<=55295||o>=57344||t+1>=i)return o;var s=r.charCodeAt(t+1);return s>=56320&&s<=57343?(o<<10)+s-56613888:o};Ze.prototype.nextIndex=function(t,n){if(n===void 0)n=!1;var r=this.source,i=r.length;if(t>=i)return i;var o=r.charCodeAt(t),s;if(!(n||this.switchU)||o<=55295||o>=57344||t+1>=i||(s=r.charCodeAt(t+1))<56320||s>57343)return t+1;return t+2};Ze.prototype.current=function(t){if(t===void 0)t=!1;return this.at(this.pos,t)};Ze.prototype.lookahead=function(t){if(t===void 0)t=!1;return this.at(this.nextIndex(this.pos,t),t)};Ze.prototype.advance=function(t){if(t===void 0)t=!1;this.pos=this.nextIndex(this.pos,t)};Ze.prototype.eat=function(t,n){if(n===void 0)n=!1;if(this.current(n)===t)return this.advance(n),!0;return!1};Ze.prototype.eatChars=function(t,n){if(n===void 0)n=!1;var r=this.pos;for(var i=0,o=t;i<o.length;i+=1){var s=o[i],p=this.at(r,n);if(p===-1||p!==s)return!1;r=this.nextIndex(r,n)}return this.pos=r,!0};I.validateRegExpFlags=function(e){var{validFlags:t,flags:n}=e,r=!1,i=!1;for(var o=0;o<n.length;o++){var s=n.charAt(o);if(t.indexOf(s)===-1)this.raise(e.start,"Invalid regular expression flag");if(n.indexOf(s,o+1)>-1)this.raise(e.start,"Duplicate regular expression flag");if(s==="u")r=!0;if(s==="v")i=!0}if(this.options.ecmaVersion>=15&&r&&i)this.raise(e.start,"Invalid regular expression flag")};function Ol(e){for(var t in e)return!0;return!1}I.validateRegExpPattern=function(e){if(this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&Ol(e.groupNames))e.switchN=!0,this.regexp_pattern(e)};I.regexp_pattern=function(e){if(e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames=Object.create(null),e.backReferenceNames.length=0,e.branchID=null,this.regexp_disjunction(e),e.pos!==e.source.length){if(e.eat(41))e.raise("Unmatched ')'");if(e.eat(93)||e.eat(125))e.raise("Lone quantifier brackets")}if(e.maxBackReference>e.numCapturingParens)e.raise("Invalid escape");for(var t=0,n=e.backReferenceNames;t<n.length;t+=1){var r=n[t];if(!e.groupNames[r])e.raise("Invalid named capture referenced")}};I.regexp_disjunction=function(e){var t=this.options.ecmaVersion>=16;if(t)e.branchID=new _n(e.branchID,null);this.regexp_alternative(e);while(e.eat(124)){if(t)e.branchID=e.branchID.sibling();this.regexp_alternative(e)}if(t)e.branchID=e.branchID.parent;if(this.regexp_eatQuantifier(e,!0))e.raise("Nothing to repeat");if(e.eat(123))e.raise("Lone quantifier brackets")};I.regexp_alternative=function(e){while(e.pos<e.source.length&&this.regexp_eatTerm(e));};I.regexp_eatTerm=function(e){if(this.regexp_eatAssertion(e)){if(e.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(e)){if(e.switchU)e.raise("Invalid quantifier")}return!0}if(e.switchU?this.regexp_eatAtom(e):this.regexp_eatExtendedAtom(e))return this.regexp_eatQuantifier(e),!0;return!1};I.regexp_eatAssertion=function(e){var t=e.pos;if(e.lastAssertionIsQuantifiable=!1,e.eat(94)||e.eat(36))return!0;if(e.eat(92)){if(e.eat(66)||e.eat(98))return!0;e.pos=t}if(e.eat(40)&&e.eat(63)){var n=!1;if(this.options.ecmaVersion>=9)n=e.eat(60);if(e.eat(61)||e.eat(33)){if(this.regexp_disjunction(e),!e.eat(41))e.raise("Unterminated group");return e.lastAssertionIsQuantifiable=!n,!0}}return e.pos=t,!1};I.regexp_eatQuantifier=function(e,t){if(t===void 0)t=!1;if(this.regexp_eatQuantifierPrefix(e,t))return e.eat(63),!0;return!1};I.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)};I.regexp_eatBracedQuantifier=function(e,t){var n=e.pos;if(e.eat(123)){var r=0,i=-1;if(this.regexp_eatDecimalDigits(e)){if(r=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e))i=e.lastIntValue;if(e.eat(125)){if(i!==-1&&i<r&&!t)e.raise("numbers out of order in {} quantifier");return!0}}if(e.switchU&&!t)e.raise("Incomplete quantifier");e.pos=n}return!1};I.regexp_eatAtom=function(e){return this.regexp_eatPatternCharacters(e)||e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)};I.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1};I.regexp_eatUncapturingGroup=function(e){var t=e.pos;if(e.eat(40)){if(e.eat(63)){if(this.options.ecmaVersion>=16){var n=this.regexp_eatModifiers(e),r=e.eat(45);if(n||r){for(var i=0;i<n.length;i++){var o=n.charAt(i);if(n.indexOf(o,i+1)>-1)e.raise("Duplicate regular expression modifiers")}if(r){var s=this.regexp_eatModifiers(e);if(!n&&!s&&e.current()===58)e.raise("Invalid regular expression modifiers");for(var p=0;p<s.length;p++){var l=s.charAt(p);if(s.indexOf(l,p+1)>-1||n.indexOf(l)>-1)e.raise("Duplicate regular expression modifiers")}}}}if(e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise("Unterminated group")}}e.pos=t}return!1};I.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9)this.regexp_groupSpecifier(e);else if(e.current()===63)e.raise("Invalid group");if(this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1};I.regexp_eatModifiers=function(e){var t="",n=0;while((n=e.current())!==-1&&Bl(n))t+=it(n),e.advance();return t};function Bl(e){return e===105||e===109||e===115}I.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)};I.regexp_eatInvalidBracedQuantifier=function(e){if(this.regexp_eatBracedQuantifier(e,!0))e.raise("Nothing to repeat");return!1};I.regexp_eatSyntaxCharacter=function(e){var t=e.current();if(Pa(t))return e.lastIntValue=t,e.advance(),!0;return!1};function Pa(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}I.regexp_eatPatternCharacters=function(e){var t=e.pos,n=0;while((n=e.current())!==-1&&!Pa(n))e.advance();return e.pos!==t};I.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();if(t!==-1&&t!==36&&!(t>=40&&t<=43)&&t!==46&&t!==63&&t!==91&&t!==94&&t!==124)return e.advance(),!0;return!1};I.regexp_groupSpecifier=function(e){if(e.eat(63)){if(!this.regexp_eatGroupName(e))e.raise("Invalid group");var t=this.options.ecmaVersion>=16,n=e.groupNames[e.lastStringValue];if(n)if(t)for(var r=0,i=n;r<i.length;r+=1){var o=i[r];if(!o.separatedFrom(e.branchID))e.raise("Duplicate capture group name")}else e.raise("Duplicate capture group name");if(t)(n||(e.groupNames[e.lastStringValue]=[])).push(e.branchID);else e.groupNames[e.lastStringValue]=!0}};I.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1};I.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){e.lastStringValue+=it(e.lastIntValue);while(this.regexp_eatRegExpIdentifierPart(e))e.lastStringValue+=it(e.lastIntValue);return!0}return!1};I.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,n=this.options.ecmaVersion>=11,r=e.current(n);if(e.advance(n),r===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n))r=e.lastIntValue;if(Fl(r))return e.lastIntValue=r,!0;return e.pos=t,!1};function Fl(e){return we(e,!0)||e===36||e===95}I.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,n=this.options.ecmaVersion>=11,r=e.current(n);if(e.advance(n),r===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n))r=e.lastIntValue;if(Vl(r))return e.lastIntValue=r,!0;return e.pos=t,!1};function Vl(e){return Le(e,!0)||e===36||e===95||e===8204||e===8205}I.regexp_eatAtomEscape=function(e){if(this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e))return!0;if(e.switchU){if(e.current()===99)e.raise("Invalid unicode escape");e.raise("Invalid escape")}return!1};I.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var n=e.lastIntValue;if(e.switchU){if(n>e.maxBackReference)e.maxBackReference=n;return!0}if(n<=e.numCapturingParens)return!0;e.pos=t}return!1};I.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1};I.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)};I.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1};I.regexp_eatZero=function(e){if(e.current()===48&&!Mn(e.lookahead()))return e.lastIntValue=0,e.advance(),!0;return!1};I.regexp_eatControlEscape=function(e){var t=e.current();if(t===116)return e.lastIntValue=9,e.advance(),!0;if(t===110)return e.lastIntValue=10,e.advance(),!0;if(t===118)return e.lastIntValue=11,e.advance(),!0;if(t===102)return e.lastIntValue=12,e.advance(),!0;if(t===114)return e.lastIntValue=13,e.advance(),!0;return!1};I.regexp_eatControlLetter=function(e){var t=e.current();if(ka(t))return e.lastIntValue=t%32,e.advance(),!0;return!1};function ka(e){return e>=65&&e<=90||e>=97&&e<=122}I.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){if(t===void 0)t=!1;var n=e.pos,r=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var i=e.lastIntValue;if(r&&i>=55296&&i<=56319){var o=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var s=e.lastIntValue;if(s>=56320&&s<=57343)return e.lastIntValue=(i-55296)*1024+(s-56320)+65536,!0}e.pos=o,e.lastIntValue=i}return!0}if(r&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&$l(e.lastIntValue))return!0;if(r)e.raise("Invalid unicode escape");e.pos=n}return!1};function $l(e){return e>=0&&e<=1114111}I.regexp_eatIdentityEscape=function(e){if(e.switchU){if(this.regexp_eatSyntaxCharacter(e))return!0;if(e.eat(47))return e.lastIntValue=47,!0;return!1}var t=e.current();if(t!==99&&(!e.switchN||t!==107))return e.lastIntValue=t,e.advance(),!0;return!1};I.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do e.lastIntValue=10*e.lastIntValue+(t-48),e.advance();while((t=e.current())>=48&&t<=57);return!0}return!1};var wa=0,st=1,Ge=2;I.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(jl(t))return e.lastIntValue=-1,e.advance(),st;var n=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((n=t===80)||t===112)){e.lastIntValue=-1,e.advance();var r;if(e.eat(123)&&(r=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125)){if(n&&r===Ge)e.raise("Invalid property name");return r}e.raise("Invalid property name")}return wa};function jl(e){return e===100||e===68||e===115||e===83||e===119||e===87}I.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var n=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var r=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,n,r),st}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,i)}return wa};I.regexp_validateUnicodePropertyNameAndValue=function(e,t,n){if(!Lt(e.unicodeProperties.nonBinary,t))e.raise("Invalid property name");if(!e.unicodeProperties.nonBinary[t].test(n))e.raise("Invalid property value")};I.regexp_validateUnicodePropertyNameOrValue=function(e,t){if(e.unicodeProperties.binary.test(t))return st;if(e.switchV&&e.unicodeProperties.binaryOfStrings.test(t))return Ge;e.raise("Invalid property name")};I.regexp_eatUnicodePropertyName=function(e){var t=0;e.lastStringValue="";while(Na(t=e.current()))e.lastStringValue+=it(t),e.advance();return e.lastStringValue!==""};function Na(e){return ka(e)||e===95}I.regexp_eatUnicodePropertyValue=function(e){var t=0;e.lastStringValue="";while(Hl(t=e.current()))e.lastStringValue+=it(t),e.advance();return e.lastStringValue!==""};function Hl(e){return Na(e)||Mn(e)}I.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)};I.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),n=this.regexp_classContents(e);if(!e.eat(93))e.raise("Unterminated character class");if(t&&n===Ge)e.raise("Negated character class may contain strings");return!0}return!1};I.regexp_classContents=function(e){if(e.current()===93)return st;if(e.switchV)return this.regexp_classSetExpression(e);return this.regexp_nonEmptyClassRanges(e),st};I.regexp_nonEmptyClassRanges=function(e){while(this.regexp_eatClassAtom(e)){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var n=e.lastIntValue;if(e.switchU&&(t===-1||n===-1))e.raise("Invalid character class");if(t!==-1&&n!==-1&&t>n)e.raise("Range out of order in character class")}}};I.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var n=e.current();if(n===99||Ia(n))e.raise("Invalid class escape");e.raise("Invalid escape")}e.pos=t}var r=e.current();if(r!==93)return e.lastIntValue=r,e.advance(),!0;return!1};I.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)};I.regexp_classSetExpression=function(e){var t=st,n;if(this.regexp_eatClassSetRange(e));else if(n=this.regexp_eatClassSetOperand(e)){if(n===Ge)t=Ge;var r=e.pos;while(e.eatChars([38,38])){if(e.current()!==38&&(n=this.regexp_eatClassSetOperand(e))){if(n!==Ge)t=st;continue}e.raise("Invalid character in character class")}if(r!==e.pos)return t;while(e.eatChars([45,45])){if(this.regexp_eatClassSetOperand(e))continue;e.raise("Invalid character in character class")}if(r!==e.pos)return t}else e.raise("Invalid character in character class");for(;;){if(this.regexp_eatClassSetRange(e))continue;if(n=this.regexp_eatClassSetOperand(e),!n)return t;if(n===Ge)t=Ge}};I.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var n=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var r=e.lastIntValue;if(n!==-1&&r!==-1&&n>r)e.raise("Range out of order in character class");return!0}e.pos=t}return!1};I.regexp_eatClassSetOperand=function(e){if(this.regexp_eatClassSetCharacter(e))return st;return this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)};I.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var n=e.eat(94),r=this.regexp_classContents(e);if(e.eat(93)){if(n&&r===Ge)e.raise("Negated character class may contain strings");return r}e.pos=t}if(e.eat(92)){var i=this.regexp_eatCharacterClassEscape(e);if(i)return i;e.pos=t}return null};I.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var n=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return n}else e.raise("Invalid escape");e.pos=t}return null};I.regexp_classStringDisjunctionContents=function(e){var t=this.regexp_classString(e);while(e.eat(124))if(this.regexp_classString(e)===Ge)t=Ge;return t};I.regexp_classString=function(e){var t=0;while(this.regexp_eatClassSetCharacter(e))t++;return t===1?st:Ge};I.regexp_eatClassSetCharacter=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatCharacterEscape(e)||this.regexp_eatClassSetReservedPunctuator(e))return!0;if(e.eat(98))return e.lastIntValue=8,!0;return e.pos=t,!1}var n=e.current();if(n<0||n===e.lookahead()&&ql(n))return!1;if(Ul(n))return!1;return e.advance(),e.lastIntValue=n,!0};function ql(e){return e===33||e>=35&&e<=38||e>=42&&e<=44||e===46||e>=58&&e<=64||e===94||e===96||e===126}function Ul(e){return e===40||e===41||e===45||e===47||e>=91&&e<=93||e>=123&&e<=125}I.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();if(Gl(t))return e.lastIntValue=t,e.advance(),!0;return!1};function Gl(e){return e===33||e===35||e===37||e===38||e===44||e===45||e>=58&&e<=62||e===64||e===96||e===126}I.regexp_eatClassControlLetter=function(e){var t=e.current();if(Mn(t)||t===95)return e.lastIntValue=t%32,e.advance(),!0;return!1};I.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;if(e.switchU)e.raise("Invalid escape");e.pos=t}return!1};I.regexp_eatDecimalDigits=function(e){var t=e.pos,n=0;e.lastIntValue=0;while(Mn(n=e.current()))e.lastIntValue=10*e.lastIntValue+(n-48),e.advance();return e.pos!==t};function Mn(e){return e>=48&&e<=57}I.regexp_eatHexDigits=function(e){var t=e.pos,n=0;e.lastIntValue=0;while(_a(n=e.current()))e.lastIntValue=16*e.lastIntValue+Da(n),e.advance();return e.pos!==t};function _a(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function Da(e){if(e>=65&&e<=70)return 10+(e-65);if(e>=97&&e<=102)return 10+(e-97);return e-48}I.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var n=e.lastIntValue;if(t<=3&&this.regexp_eatOctalDigit(e))e.lastIntValue=t*64+n*8+e.lastIntValue;else e.lastIntValue=t*8+n}else e.lastIntValue=t;return!0}return!1};I.regexp_eatOctalDigit=function(e){var t=e.current();if(Ia(t))return e.lastIntValue=t-48,e.advance(),!0;return e.lastIntValue=0,!1};function Ia(e){return e>=48&&e<=55}I.regexp_eatFixedHexDigits=function(e,t){var n=e.pos;e.lastIntValue=0;for(var r=0;r<t;++r){var i=e.current();if(!_a(i))return e.pos=n,!1;e.lastIntValue=16*e.lastIntValue+Da(i),e.advance()}return!0};var On=function(t){if(this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,t.options.locations)this.loc=new Zt(t,t.startLoc,t.endLoc);if(t.options.ranges)this.range=[t.start,t.end]},X=fe.prototype;X.next=function(e){if(!e&&this.type.keyword&&this.containsEsc)this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword);if(this.options.onToken)this.options.onToken(new On(this));this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()};X.getToken=function(){return this.next(),new On(this)};if(typeof Symbol<"u")X[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===f.eof,value:t}}}};X.nextToken=function(){var e=this.curContext();if(!e||!e.preserveSpace)this.skipSpace();if(this.start=this.pos,this.options.locations)this.startLoc=this.curPosition();if(this.pos>=this.input.length)return this.finishToken(f.eof);if(e.override)return e.override(this);else this.readToken(this.fullCharCodeAtPos())};X.readToken=function(e){if(we(e,this.options.ecmaVersion>=6)||e===92)return this.readWord();return this.getTokenFromCode(e)};X.fullCharCodeAt=function(e){var t=this.input.charCodeAt(e);if(t<=55295||t>=56320)return t;var n=this.input.charCodeAt(e+1);return n<=56319||n>=57344?t:(t<<10)+n-56613888};X.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)};X.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,n=this.input.indexOf("*/",this.pos+=2);if(n===-1)this.raise(this.pos-2,"Unterminated comment");if(this.pos=n+2,this.options.locations)for(var r=void 0,i=t;(r=ra(this.input,i,this.pos))>-1;)++this.curLine,i=this.lineStart=r;if(this.options.onComment)this.options.onComment(!0,this.input.slice(t+2,n),t,this.pos,e,this.curPosition())};X.skipLineComment=function(e){var t=this.pos,n=this.options.onComment&&this.curPosition(),r=this.input.charCodeAt(this.pos+=e);while(this.pos<this.input.length&&!St(r))r=this.input.charCodeAt(++this.pos);if(this.options.onComment)this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,n,this.curPosition())};X.skipSpace=function(){e:while(this.pos<this.input.length){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:if(this.input.charCodeAt(this.pos+1)===10)++this.pos;case 10:case 8232:case 8233:if(++this.pos,this.options.locations)++this.curLine,this.lineStart=this.pos;break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(e>8&&e<14||e>=5760&&Mr.test(String.fromCharCode(e)))++this.pos;else break e}}};X.finishToken=function(e,t){if(this.end=this.pos,this.options.locations)this.endLoc=this.curPosition();var n=this.type;this.type=e,this.value=t,this.updateContext(n)};X.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);if(this.options.ecmaVersion>=6&&e===46&&t===46)return this.pos+=3,this.finishToken(f.ellipsis);else return++this.pos,this.finishToken(f.dot)};X.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);if(this.exprAllowed)return++this.pos,this.readRegexp();if(e===61)return this.finishOp(f.assign,2);return this.finishOp(f.slash,1)};X.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,r=e===42?f.star:f.modulo;if(this.options.ecmaVersion>=7&&e===42&&t===42)++n,r=f.starstar,t=this.input.charCodeAt(this.pos+2);if(t===61)return this.finishOp(f.assign,n+1);return this.finishOp(r,n)};X.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(this.options.ecmaVersion>=12){var n=this.input.charCodeAt(this.pos+2);if(n===61)return this.finishOp(f.assign,3)}return this.finishOp(e===124?f.logicalOR:f.logicalAND,2)}if(t===61)return this.finishOp(f.assign,2);return this.finishOp(e===124?f.bitwiseOR:f.bitwiseAND,1)};X.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);if(e===61)return this.finishOp(f.assign,2);return this.finishOp(f.bitwiseXOR,1)};X.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(t===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||Ne.test(this.input.slice(this.lastTokEnd,this.pos))))return this.skipLineComment(3),this.skipSpace(),this.nextToken();return this.finishOp(f.incDec,2)}if(t===61)return this.finishOp(f.assign,2);return this.finishOp(f.plusMin,1)};X.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),n=1;if(t===e){if(n=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+n)===61)return this.finishOp(f.assign,n+1);return this.finishOp(f.bitShift,n)}if(t===33&&e===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45)return this.skipLineComment(4),this.skipSpace(),this.nextToken();if(t===61)n=2;return this.finishOp(f.relational,n)};X.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===61)return this.finishOp(f.equality,this.input.charCodeAt(this.pos+2)===61?3:2);if(e===61&&t===62&&this.options.ecmaVersion>=6)return this.pos+=2,this.finishToken(f.arrow);return this.finishOp(e===61?f.eq:f.prefix,1)};X.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(t===46){var n=this.input.charCodeAt(this.pos+2);if(n<48||n>57)return this.finishOp(f.questionDot,2)}if(t===63){if(e>=12){var r=this.input.charCodeAt(this.pos+2);if(r===61)return this.finishOp(f.assign,3)}return this.finishOp(f.coalesce,2)}}return this.finishOp(f.question,1)};X.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13){if(++this.pos,t=this.fullCharCodeAtPos(),we(t,!0)||t===92)return this.finishToken(f.privateId,this.readWord1())}this.raise(this.pos,"Unexpected character '"+it(t)+"'")};X.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(f.parenL);case 41:return++this.pos,this.finishToken(f.parenR);case 59:return++this.pos,this.finishToken(f.semi);case 44:return++this.pos,this.finishToken(f.comma);case 91:return++this.pos,this.finishToken(f.bracketL);case 93:return++this.pos,this.finishToken(f.bracketR);case 123:return++this.pos,this.finishToken(f.braceL);case 125:return++this.pos,this.finishToken(f.braceR);case 58:return++this.pos,this.finishToken(f.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(f.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(t===120||t===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(t===111||t===79)return this.readRadixNumber(8);if(t===98||t===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(f.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+it(e)+"'")};X.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)};X.readRegexp=function(){var e,t,n=this.pos;for(;;){if(this.pos>=this.input.length)this.raise(n,"Unterminated regular expression");var r=this.input.charAt(this.pos);if(Ne.test(r))this.raise(n,"Unterminated regular expression");if(!e){if(r==="[")t=!0;else if(r==="]"&&t)t=!1;else if(r==="/"&&!t)break;e=r==="\\"}else e=!1;++this.pos}var i=this.input.slice(n,this.pos);++this.pos;var o=this.pos,s=this.readWord1();if(this.containsEsc)this.unexpected(o);var p=this.regexpState||(this.regexpState=new Ze(this));p.reset(n,i,s),this.validateRegExpFlags(p),this.validateRegExpPattern(p);var l=null;try{l=new RegExp(i,s)}catch(h){}return this.finishToken(f.regexp,{pattern:i,flags:s,value:l})};X.readInt=function(e,t,n){var r=this.options.ecmaVersion>=12&&t===void 0,i=n&&this.input.charCodeAt(this.pos)===48,o=this.pos,s=0,p=0;for(var l=0,h=t==null?1/0:t;l<h;++l,++this.pos){var d=this.input.charCodeAt(this.pos),g=void 0;if(r&&d===95){if(i)this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals");if(p===95)this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore");if(l===0)this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits");p=d;continue}if(d>=97)g=d-97+10;else if(d>=65)g=d-65+10;else if(d>=48&&d<=57)g=d-48;else g=1/0;if(g>=e)break;p=d,s=s*e+g}if(r&&p===95)this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits");if(this.pos===o||t!=null&&this.pos-o!==t)return null;return s};function Wl(e,t){if(t)return parseInt(e,8);return parseFloat(e.replace(/_/g,""))}function La(e){if(typeof BigInt!=="function")return null;return BigInt(e.replace(/_/g,""))}X.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var n=this.readInt(e);if(n==null)this.raise(this.start+2,"Expected number in radix "+e);if(this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110)n=La(this.input.slice(t,this.pos)),++this.pos;else if(we(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");return this.finishToken(f.num,n)};X.readNumber=function(e){var t=this.pos;if(!e&&this.readInt(10,void 0,!0)===null)this.raise(t,"Invalid number");var n=this.pos-t>=2&&this.input.charCodeAt(t)===48;if(n&&this.strict)this.raise(t,"Invalid number");var r=this.input.charCodeAt(this.pos);if(!n&&!e&&this.options.ecmaVersion>=11&&r===110){var i=La(this.input.slice(t,this.pos));if(++this.pos,we(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");return this.finishToken(f.num,i)}if(n&&/[89]/.test(this.input.slice(t,this.pos)))n=!1;if(r===46&&!n)++this.pos,this.readInt(10),r=this.input.charCodeAt(this.pos);if((r===69||r===101)&&!n){if(r=this.input.charCodeAt(++this.pos),r===43||r===45)++this.pos;if(this.readInt(10)===null)this.raise(t,"Invalid number")}if(we(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");var o=Wl(this.input.slice(t,this.pos),n);return this.finishToken(f.num,o)};X.readCodePoint=function(){var e=this.input.charCodeAt(this.pos),t;if(e===123){if(this.options.ecmaVersion<6)this.unexpected();var n=++this.pos;if(t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,t>1114111)this.invalidStringToken(n,"Code point out of bounds")}else t=this.readHexChar(4);return t};X.readString=function(e){var t="",n=++this.pos;for(;;){if(this.pos>=this.input.length)this.raise(this.start,"Unterminated string constant");var r=this.input.charCodeAt(this.pos);if(r===e)break;if(r===92)t+=this.input.slice(n,this.pos),t+=this.readEscapedChar(!1),n=this.pos;else if(r===8232||r===8233){if(this.options.ecmaVersion<10)this.raise(this.start,"Unterminated string constant");if(++this.pos,this.options.locations)this.curLine++,this.lineStart=this.pos}else{if(St(r))this.raise(this.start,"Unterminated string constant");++this.pos}}return t+=this.input.slice(n,this.pos++),this.finishToken(f.string,t)};var Ra={};X.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===Ra)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1};X.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw Ra;else this.raise(e,t)};X.readTmplToken=function(){var e="",t=this.pos;for(;;){if(this.pos>=this.input.length)this.raise(this.start,"Unterminated template");var n=this.input.charCodeAt(this.pos);if(n===96||n===36&&this.input.charCodeAt(this.pos+1)===123){if(this.pos===this.start&&(this.type===f.template||this.type===f.invalidTemplate))if(n===36)return this.pos+=2,this.finishToken(f.dollarBraceL);else return++this.pos,this.finishToken(f.backQuote);return e+=this.input.slice(t,this.pos),this.finishToken(f.template,e)}if(n===92)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(St(n)){switch(e+=this.input.slice(t,this.pos),++this.pos,n){case 13:if(this.input.charCodeAt(this.pos)===10)++this.pos;case 10:e+=`
30
- `;break;default:e+=String.fromCharCode(n);break}if(this.options.locations)++this.curLine,this.lineStart=this.pos;t=this.pos}else++this.pos}};X.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{")break;case"`":return this.finishToken(f.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":if(this.input[this.pos+1]===`
32
+ `),cooked:this.value};return this.next(),n.tail=this.type===h.backQuote,this.finishNode(n,"TemplateElement")};z.parseTemplate=function(e){if(e===void 0)e={};var t=e.isTagged;if(t===void 0)t=!1;var n=this.startNode();this.next(),n.expressions=[];var r=this.parseTemplateElement({isTagged:t});n.quasis=[r];while(!r.tail){if(this.type===h.eof)this.raise(this.pos,"Unterminated template literal");this.expect(h.dollarBraceL),n.expressions.push(this.parseExpression()),this.expect(h.braceR),n.quasis.push(r=this.parseTemplateElement({isTagged:t}))}return this.next(),this.finishNode(n,"TemplateLiteral")};z.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===h.name||this.type===h.num||this.type===h.string||this.type===h.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===h.star)&&!Re.test(this.input.slice(this.lastTokEnd,this.start))};z.parseObj=function(e,t){var n=this.startNode(),r=!0,i={};n.properties=[],this.next();while(!this.eat(h.braceR)){if(!r){if(this.expect(h.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(h.braceR))break}else r=!1;var o=this.parseProperty(e,t);if(!e)this.checkPropClash(o,i,t);n.properties.push(o)}return this.finishNode(n,e?"ObjectPattern":"ObjectExpression")};z.parseProperty=function(e,t){var n=this.startNode(),r,i,o,s;if(this.options.ecmaVersion>=9&&this.eat(h.ellipsis)){if(e){if(n.argument=this.parseIdent(!1),this.type===h.comma)this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");return this.finishNode(n,"RestElement")}if(n.argument=this.parseMaybeAssign(!1,t),this.type===h.comma&&t&&t.trailingComma<0)t.trailingComma=this.start;return this.finishNode(n,"SpreadElement")}if(this.options.ecmaVersion>=6){if(n.method=!1,n.shorthand=!1,e||t)o=this.start,s=this.startLoc;if(!e)r=this.eat(h.star)}var c=this.containsEsc;if(this.parsePropertyName(n),!e&&!c&&this.options.ecmaVersion>=8&&!r&&this.isAsyncProp(n))i=!0,r=this.options.ecmaVersion>=9&&this.eat(h.star),this.parsePropertyName(n);else i=!1;return this.parsePropertyValue(n,e,r,i,o,s,t,c),this.finishNode(n,"Property")};z.parseGetterSetter=function(e){var t=e.key.name;this.parsePropertyName(e),e.value=this.parseMethod(!1),e.kind=t;var n=e.kind==="get"?0:1;if(e.value.params.length!==n){var r=e.value.start;if(e.kind==="get")this.raiseRecoverable(r,"getter should have no params");else this.raiseRecoverable(r,"setter should have exactly one param")}else if(e.kind==="set"&&e.value.params[0].type==="RestElement")this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")};z.parsePropertyValue=function(e,t,n,r,i,o,s,c){if((n||r)&&this.type===h.colon)this.unexpected();if(this.eat(h.colon))e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,s),e.kind="init";else if(this.options.ecmaVersion>=6&&this.type===h.parenL){if(t)this.unexpected();e.method=!0,e.value=this.parseMethod(n,r),e.kind="init"}else if(!t&&!c&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&(this.type!==h.comma&&this.type!==h.braceR&&this.type!==h.eq)){if(n||r)this.unexpected();this.parseGetterSetter(e)}else if(this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"){if(n||r)this.unexpected();if(this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos)this.awaitIdentPos=i;if(t)e.value=this.parseMaybeDefault(i,o,this.copyNode(e.key));else if(this.type===h.eq&&s){if(s.shorthandAssign<0)s.shorthandAssign=this.start;e.value=this.parseMaybeDefault(i,o,this.copyNode(e.key))}else e.value=this.copyNode(e.key);e.kind="init",e.shorthand=!0}else this.unexpected()};z.parsePropertyName=function(e){if(this.options.ecmaVersion>=6)if(this.eat(h.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(h.bracketR),e.key;else e.computed=!1;return e.key=this.type===h.num||this.type===h.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};z.initFunction=function(e){if(e.id=null,this.options.ecmaVersion>=6)e.generator=e.expression=!1;if(this.options.ecmaVersion>=8)e.async=!1};z.parseMethod=function(e,t,n){var r=this.startNode(),i=this.yieldPos,o=this.awaitPos,s=this.awaitIdentPos;if(this.initFunction(r),this.options.ecmaVersion>=6)r.generator=e;if(this.options.ecmaVersion>=8)r.async=!!t;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Si(t,r.generator)|sr|(n?to:0)),this.expect(h.parenL),r.params=this.parseBindingList(h.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(r,!1,!0,!1),this.yieldPos=i,this.awaitPos=o,this.awaitIdentPos=s,this.finishNode(r,"FunctionExpression")};z.parseArrowExpression=function(e,t,n,r){var i=this.yieldPos,o=this.awaitPos,s=this.awaitIdentPos;if(this.enterScope(Si(n,!1)|Ci),this.initFunction(e),this.options.ecmaVersion>=8)e.async=!!n;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,r),this.yieldPos=i,this.awaitPos=o,this.awaitIdentPos=s,this.finishNode(e,"ArrowFunctionExpression")};z.parseFunctionBody=function(e,t,n,r){var i=t&&this.type!==h.braceL,o=this.strict,s=!1;if(i)e.body=this.parseMaybeAssign(r),e.expression=!0,this.checkParams(e,!1);else{var c=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);if(!o||c){if(s=this.strictDirective(this.end),s&&c)this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list")}var l=this.labels;if(this.labels=[],s)this.strict=!0;if(this.checkParams(e,!o&&!s&&!t&&!n&&this.isSimpleParamList(e.params)),this.strict&&e.id)this.checkLValSimple(e.id,so);e.body=this.parseBlock(!1,void 0,s&&!o),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=l}this.exitScope()};z.isSimpleParamList=function(e){for(var t=0,n=e;t<n.length;t+=1){var r=n[t];if(r.type!=="Identifier")return!1}return!0};z.checkParams=function(e,t){var n=Object.create(null);for(var r=0,i=e.params;r<i.length;r+=1){var o=i[r];this.checkLValInnerPattern(o,vi,t?null:n)}};z.parseExprList=function(e,t,n,r){var i=[],o=!0;while(!this.eat(e)){if(!o){if(this.expect(h.comma),t&&this.afterTrailingComma(e))break}else o=!1;var s=void 0;if(n&&this.type===h.comma)s=null;else if(this.type===h.ellipsis){if(s=this.parseSpread(r),r&&this.type===h.comma&&r.trailingComma<0)r.trailingComma=this.start}else s=this.parseMaybeAssign(!1,r);i.push(s)}return i};z.checkUnreserved=function(e){var{start:t,end:n,name:r}=e;if(this.inGenerator&&r==="yield")this.raiseRecoverable(t,"Cannot use 'yield' as identifier inside a generator");if(this.inAsync&&r==="await")this.raiseRecoverable(t,"Cannot use 'await' as identifier inside an async function");if(!(this.currentThisScope().flags&ar)&&r==="arguments")this.raiseRecoverable(t,"Cannot use 'arguments' in class field initializer");if(this.inClassStaticBlock&&(r==="arguments"||r==="await"))this.raise(t,"Cannot use "+r+" in class static initialization block");if(this.keywords.test(r))this.raise(t,"Unexpected keyword '"+r+"'");if(this.options.ecmaVersion<6&&this.input.slice(t,n).indexOf("\\")!==-1)return;var i=this.strict?this.reservedWordsStrict:this.reservedWords;if(i.test(r)){if(!this.inAsync&&r==="await")this.raiseRecoverable(t,"Cannot use keyword 'await' outside an async function");this.raiseRecoverable(t,"The keyword '"+r+"' is reserved")}};z.parseIdent=function(e){var t=this.parseIdentNode();if(this.next(!!e),this.finishNode(t,"Identifier"),!e){if(this.checkUnreserved(t),t.name==="await"&&!this.awaitIdentPos)this.awaitIdentPos=t.start}return t};z.parseIdentNode=function(){var e=this.startNode();if(this.type===h.name)e.name=this.value;else if(this.type.keyword){if(e.name=this.type.keyword,(e.name==="class"||e.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46))this.context.pop();this.type=h.name}else this.unexpected();return e};z.parsePrivateIdent=function(){var e=this.startNode();if(this.type===h.privateId)e.name=this.value;else this.unexpected();if(this.next(),this.finishNode(e,"PrivateIdentifier"),this.options.checkPrivateFields)if(this.privateNameStack.length===0)this.raise(e.start,"Private field '#"+e.name+"' must be declared in an enclosing class");else this.privateNameStack[this.privateNameStack.length-1].used.push(e);return e};z.parseYield=function(e){if(!this.yieldPos)this.yieldPos=this.start;var t=this.startNode();if(this.next(),this.type===h.semi||this.canInsertSemicolon()||this.type!==h.star&&!this.type.startsExpr)t.delegate=!1,t.argument=null;else t.delegate=this.eat(h.star),t.argument=this.parseMaybeAssign(e);return this.finishNode(t,"YieldExpression")};z.parseAwait=function(e){if(!this.awaitPos)this.awaitPos=this.start;var t=this.startNode();return this.next(),t.argument=this.parseMaybeUnary(null,!0,!1,e),this.finishNode(t,"AwaitExpression")};var nr=me.prototype;nr.raise=function(e,t){var n=Ti(this.input,e);if(t+=" ("+n.line+":"+n.column+")",this.sourceFile)t+=" in "+this.sourceFile;var r=SyntaxError(t);throw r.pos=e,r.loc=n,r.raisedAt=this.pos,r};nr.raiseRecoverable=nr.raise;nr.curPosition=function(){if(this.options.locations)return new Xt(this.curLine,this.pos-this.lineStart)};var kt=me.prototype,ed=function(t){this.flags=t,this.var=[],this.lexical=[],this.functions=[]};kt.enterScope=function(e){this.scopeStack.push(new ed(e))};kt.exitScope=function(){this.scopeStack.pop()};kt.treatFunctionsAsVarInScope=function(e){return e.flags&Ot||!this.inModule&&e.flags&Rt};kt.declareName=function(e,t,n){var r=!1;if(t===xt){var i=this.currentScope();if(r=i.lexical.indexOf(e)>-1||i.functions.indexOf(e)>-1||i.var.indexOf(e)>-1,i.lexical.push(e),this.inModule&&i.flags&Rt)delete this.undefinedExports[e]}else if(t===io){var o=this.currentScope();o.lexical.push(e)}else if(t===ro){var s=this.currentScope();if(this.treatFunctionsAsVar)r=s.lexical.indexOf(e)>-1;else r=s.lexical.indexOf(e)>-1||s.var.indexOf(e)>-1;s.functions.push(e)}else for(var c=this.scopeStack.length-1;c>=0;--c){var l=this.scopeStack[c];if(l.lexical.indexOf(e)>-1&&!(l.flags&eo&&l.lexical[0]===e)||!this.treatFunctionsAsVarInScope(l)&&l.functions.indexOf(e)>-1){r=!0;break}if(l.var.push(e),this.inModule&&l.flags&Rt)delete this.undefinedExports[e];if(l.flags&ar)break}if(r)this.raiseRecoverable(n,"Identifier '"+e+"' has already been declared")};kt.checkLocalExport=function(e){if(this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1)this.undefinedExports[e.name]=e};kt.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};kt.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(ar|An|Bt))return t}};kt.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(ar|An|Bt)&&!(t.flags&Ci))return t}};var kn=function(t,n,r){if(this.type="",this.start=n,this.end=0,t.options.locations)this.loc=new Pn(t,r);if(t.options.directSourceFile)this.sourceFile=t.options.directSourceFile;if(t.options.ranges)this.range=[n,0]},wn=me.prototype;wn.startNode=function(){return new kn(this,this.start,this.startLoc)};wn.startNodeAt=function(e,t){return new kn(this,e,t)};function co(e,t,n,r){if(e.type=t,e.end=n,this.options.locations)e.loc.end=r;if(this.options.ranges)e.range[1]=n;return e}wn.finishNode=function(e,t){return co.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)};wn.finishNodeAt=function(e,t,n,r){return co.call(this,e,t,n,r)};wn.copyNode=function(e){var t=new kn(this,e.start,this.startLoc);for(var n in e)t[n]=e[n];return t};var td="Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz",po="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",lo=po+" Extended_Pictographic",uo=lo,fo=uo+" EBase EComp EMod EPres ExtPict",ho=fo,nd=ho,rd={9:po,10:lo,11:uo,12:fo,13:ho,14:nd},id="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",sd={9:"",10:"",11:"",12:"",13:"",14:id},Wa="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",mo="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",yo=mo+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",go=yo+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",xo=go+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",bo=xo+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",ad=bo+" "+td,od={9:mo,10:yo,11:go,12:xo,13:bo,14:ad},To={};function cd(e){var t=To[e]={binary:At(rd[e]+" "+Wa),binaryOfStrings:At(sd[e]),nonBinary:{General_Category:At(Wa),Script:At(od[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}for(Sn=0,Qn=[9,10,11,12,13,14];Sn<Qn.length;Sn+=1)xi=Qn[Sn],cd(xi);var xi,Sn,Qn,B=me.prototype,rr=function(t,n){this.parent=t,this.base=n||this};rr.prototype.separatedFrom=function(t){for(var n=this;n;n=n.parent)for(var r=t;r;r=r.parent)if(n.base===r.base&&n!==r)return!0;return!1};rr.prototype.sibling=function(){return new rr(this.parent,this.base)};var ut=function(t){this.parser=t,this.validFlags="gim"+(t.options.ecmaVersion>=6?"uy":"")+(t.options.ecmaVersion>=9?"s":"")+(t.options.ecmaVersion>=13?"d":"")+(t.options.ecmaVersion>=15?"v":""),this.unicodeProperties=To[t.options.ecmaVersion>=14?14:t.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};ut.prototype.reset=function(t,n,r){var i=r.indexOf("v")!==-1,o=r.indexOf("u")!==-1;if(this.start=t|0,this.source=n+"",this.flags=r,i&&this.parser.options.ecmaVersion>=15)this.switchU=!0,this.switchV=!0,this.switchN=!0;else this.switchU=o&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=o&&this.parser.options.ecmaVersion>=9};ut.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)};ut.prototype.at=function(t,n){if(n===void 0)n=!1;var r=this.source,i=r.length;if(t>=i)return-1;var o=r.charCodeAt(t);if(!(n||this.switchU)||o<=55295||o>=57344||t+1>=i)return o;var s=r.charCodeAt(t+1);return s>=56320&&s<=57343?(o<<10)+s-56613888:o};ut.prototype.nextIndex=function(t,n){if(n===void 0)n=!1;var r=this.source,i=r.length;if(t>=i)return i;var o=r.charCodeAt(t),s;if(!(n||this.switchU)||o<=55295||o>=57344||t+1>=i||(s=r.charCodeAt(t+1))<56320||s>57343)return t+1;return t+2};ut.prototype.current=function(t){if(t===void 0)t=!1;return this.at(this.pos,t)};ut.prototype.lookahead=function(t){if(t===void 0)t=!1;return this.at(this.nextIndex(this.pos,t),t)};ut.prototype.advance=function(t){if(t===void 0)t=!1;this.pos=this.nextIndex(this.pos,t)};ut.prototype.eat=function(t,n){if(n===void 0)n=!1;if(this.current(n)===t)return this.advance(n),!0;return!1};ut.prototype.eatChars=function(t,n){if(n===void 0)n=!1;var r=this.pos;for(var i=0,o=t;i<o.length;i+=1){var s=o[i],c=this.at(r,n);if(c===-1||c!==s)return!1;r=this.nextIndex(r,n)}return this.pos=r,!0};B.validateRegExpFlags=function(e){var{validFlags:t,flags:n}=e,r=!1,i=!1;for(var o=0;o<n.length;o++){var s=n.charAt(o);if(t.indexOf(s)===-1)this.raise(e.start,"Invalid regular expression flag");if(n.indexOf(s,o+1)>-1)this.raise(e.start,"Duplicate regular expression flag");if(s==="u")r=!0;if(s==="v")i=!0}if(this.options.ecmaVersion>=15&&r&&i)this.raise(e.start,"Invalid regular expression flag")};function pd(e){for(var t in e)return!0;return!1}B.validateRegExpPattern=function(e){if(this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&pd(e.groupNames))e.switchN=!0,this.regexp_pattern(e)};B.regexp_pattern=function(e){if(e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames=Object.create(null),e.backReferenceNames.length=0,e.branchID=null,this.regexp_disjunction(e),e.pos!==e.source.length){if(e.eat(41))e.raise("Unmatched ')'");if(e.eat(93)||e.eat(125))e.raise("Lone quantifier brackets")}if(e.maxBackReference>e.numCapturingParens)e.raise("Invalid escape");for(var t=0,n=e.backReferenceNames;t<n.length;t+=1){var r=n[t];if(!e.groupNames[r])e.raise("Invalid named capture referenced")}};B.regexp_disjunction=function(e){var t=this.options.ecmaVersion>=16;if(t)e.branchID=new rr(e.branchID,null);this.regexp_alternative(e);while(e.eat(124)){if(t)e.branchID=e.branchID.sibling();this.regexp_alternative(e)}if(t)e.branchID=e.branchID.parent;if(this.regexp_eatQuantifier(e,!0))e.raise("Nothing to repeat");if(e.eat(123))e.raise("Lone quantifier brackets")};B.regexp_alternative=function(e){while(e.pos<e.source.length&&this.regexp_eatTerm(e));};B.regexp_eatTerm=function(e){if(this.regexp_eatAssertion(e)){if(e.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(e)){if(e.switchU)e.raise("Invalid quantifier")}return!0}if(e.switchU?this.regexp_eatAtom(e):this.regexp_eatExtendedAtom(e))return this.regexp_eatQuantifier(e),!0;return!1};B.regexp_eatAssertion=function(e){var t=e.pos;if(e.lastAssertionIsQuantifiable=!1,e.eat(94)||e.eat(36))return!0;if(e.eat(92)){if(e.eat(66)||e.eat(98))return!0;e.pos=t}if(e.eat(40)&&e.eat(63)){var n=!1;if(this.options.ecmaVersion>=9)n=e.eat(60);if(e.eat(61)||e.eat(33)){if(this.regexp_disjunction(e),!e.eat(41))e.raise("Unterminated group");return e.lastAssertionIsQuantifiable=!n,!0}}return e.pos=t,!1};B.regexp_eatQuantifier=function(e,t){if(t===void 0)t=!1;if(this.regexp_eatQuantifierPrefix(e,t))return e.eat(63),!0;return!1};B.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)};B.regexp_eatBracedQuantifier=function(e,t){var n=e.pos;if(e.eat(123)){var r=0,i=-1;if(this.regexp_eatDecimalDigits(e)){if(r=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e))i=e.lastIntValue;if(e.eat(125)){if(i!==-1&&i<r&&!t)e.raise("numbers out of order in {} quantifier");return!0}}if(e.switchU&&!t)e.raise("Incomplete quantifier");e.pos=n}return!1};B.regexp_eatAtom=function(e){return this.regexp_eatPatternCharacters(e)||e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)};B.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1};B.regexp_eatUncapturingGroup=function(e){var t=e.pos;if(e.eat(40)){if(e.eat(63)){if(this.options.ecmaVersion>=16){var n=this.regexp_eatModifiers(e),r=e.eat(45);if(n||r){for(var i=0;i<n.length;i++){var o=n.charAt(i);if(n.indexOf(o,i+1)>-1)e.raise("Duplicate regular expression modifiers")}if(r){var s=this.regexp_eatModifiers(e);if(!n&&!s&&e.current()===58)e.raise("Invalid regular expression modifiers");for(var c=0;c<s.length;c++){var l=s.charAt(c);if(s.indexOf(l,c+1)>-1||n.indexOf(l)>-1)e.raise("Duplicate regular expression modifiers")}}}}if(e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise("Unterminated group")}}e.pos=t}return!1};B.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9)this.regexp_groupSpecifier(e);else if(e.current()===63)e.raise("Invalid group");if(this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1};B.regexp_eatModifiers=function(e){var t="",n=0;while((n=e.current())!==-1&&ld(n))t+=yt(n),e.advance();return t};function ld(e){return e===105||e===109||e===115}B.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)};B.regexp_eatInvalidBracedQuantifier=function(e){if(this.regexp_eatBracedQuantifier(e,!0))e.raise("Nothing to repeat");return!1};B.regexp_eatSyntaxCharacter=function(e){var t=e.current();if(Eo(t))return e.lastIntValue=t,e.advance(),!0;return!1};function Eo(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}B.regexp_eatPatternCharacters=function(e){var t=e.pos,n=0;while((n=e.current())!==-1&&!Eo(n))e.advance();return e.pos!==t};B.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();if(t!==-1&&t!==36&&!(t>=40&&t<=43)&&t!==46&&t!==63&&t!==91&&t!==94&&t!==124)return e.advance(),!0;return!1};B.regexp_groupSpecifier=function(e){if(e.eat(63)){if(!this.regexp_eatGroupName(e))e.raise("Invalid group");var t=this.options.ecmaVersion>=16,n=e.groupNames[e.lastStringValue];if(n)if(t)for(var r=0,i=n;r<i.length;r+=1){var o=i[r];if(!o.separatedFrom(e.branchID))e.raise("Duplicate capture group name")}else e.raise("Duplicate capture group name");if(t)(n||(e.groupNames[e.lastStringValue]=[])).push(e.branchID);else e.groupNames[e.lastStringValue]=!0}};B.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1};B.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){e.lastStringValue+=yt(e.lastIntValue);while(this.regexp_eatRegExpIdentifierPart(e))e.lastStringValue+=yt(e.lastIntValue);return!0}return!1};B.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,n=this.options.ecmaVersion>=11,r=e.current(n);if(e.advance(n),r===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n))r=e.lastIntValue;if(ud(r))return e.lastIntValue=r,!0;return e.pos=t,!1};function ud(e){return Le(e,!0)||e===36||e===95}B.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,n=this.options.ecmaVersion>=11,r=e.current(n);if(e.advance(n),r===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n))r=e.lastIntValue;if(dd(r))return e.lastIntValue=r,!0;return e.pos=t,!1};function dd(e){return Fe(e,!0)||e===36||e===95||e===8204||e===8205}B.regexp_eatAtomEscape=function(e){if(this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e))return!0;if(e.switchU){if(e.current()===99)e.raise("Invalid unicode escape");e.raise("Invalid escape")}return!1};B.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var n=e.lastIntValue;if(e.switchU){if(n>e.maxBackReference)e.maxBackReference=n;return!0}if(n<=e.numCapturingParens)return!0;e.pos=t}return!1};B.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1};B.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)};B.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1};B.regexp_eatZero=function(e){if(e.current()===48&&!cr(e.lookahead()))return e.lastIntValue=0,e.advance(),!0;return!1};B.regexp_eatControlEscape=function(e){var t=e.current();if(t===116)return e.lastIntValue=9,e.advance(),!0;if(t===110)return e.lastIntValue=10,e.advance(),!0;if(t===118)return e.lastIntValue=11,e.advance(),!0;if(t===102)return e.lastIntValue=12,e.advance(),!0;if(t===114)return e.lastIntValue=13,e.advance(),!0;return!1};B.regexp_eatControlLetter=function(e){var t=e.current();if(Co(t))return e.lastIntValue=t%32,e.advance(),!0;return!1};function Co(e){return e>=65&&e<=90||e>=97&&e<=122}B.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){if(t===void 0)t=!1;var n=e.pos,r=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var i=e.lastIntValue;if(r&&i>=55296&&i<=56319){var o=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var s=e.lastIntValue;if(s>=56320&&s<=57343)return e.lastIntValue=(i-55296)*1024+(s-56320)+65536,!0}e.pos=o,e.lastIntValue=i}return!0}if(r&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&fd(e.lastIntValue))return!0;if(r)e.raise("Invalid unicode escape");e.pos=n}return!1};function fd(e){return e>=0&&e<=1114111}B.regexp_eatIdentityEscape=function(e){if(e.switchU){if(this.regexp_eatSyntaxCharacter(e))return!0;if(e.eat(47))return e.lastIntValue=47,!0;return!1}var t=e.current();if(t!==99&&(!e.switchN||t!==107))return e.lastIntValue=t,e.advance(),!0;return!1};B.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do e.lastIntValue=10*e.lastIntValue+(t-48),e.advance();while((t=e.current())>=48&&t<=57);return!0}return!1};var So=0,gt=1,Ze=2;B.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(hd(t))return e.lastIntValue=-1,e.advance(),gt;var n=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((n=t===80)||t===112)){e.lastIntValue=-1,e.advance();var r;if(e.eat(123)&&(r=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125)){if(n&&r===Ze)e.raise("Invalid property name");return r}e.raise("Invalid property name")}return So};function hd(e){return e===100||e===68||e===115||e===83||e===119||e===87}B.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var n=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var r=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,n,r),gt}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,i)}return So};B.regexp_validateUnicodePropertyNameAndValue=function(e,t,n){if(!Yt(e.unicodeProperties.nonBinary,t))e.raise("Invalid property name");if(!e.unicodeProperties.nonBinary[t].test(n))e.raise("Invalid property value")};B.regexp_validateUnicodePropertyNameOrValue=function(e,t){if(e.unicodeProperties.binary.test(t))return gt;if(e.switchV&&e.unicodeProperties.binaryOfStrings.test(t))return Ze;e.raise("Invalid property name")};B.regexp_eatUnicodePropertyName=function(e){var t=0;e.lastStringValue="";while(vo(t=e.current()))e.lastStringValue+=yt(t),e.advance();return e.lastStringValue!==""};function vo(e){return Co(e)||e===95}B.regexp_eatUnicodePropertyValue=function(e){var t=0;e.lastStringValue="";while(md(t=e.current()))e.lastStringValue+=yt(t),e.advance();return e.lastStringValue!==""};function md(e){return vo(e)||cr(e)}B.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)};B.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),n=this.regexp_classContents(e);if(!e.eat(93))e.raise("Unterminated character class");if(t&&n===Ze)e.raise("Negated character class may contain strings");return!0}return!1};B.regexp_classContents=function(e){if(e.current()===93)return gt;if(e.switchV)return this.regexp_classSetExpression(e);return this.regexp_nonEmptyClassRanges(e),gt};B.regexp_nonEmptyClassRanges=function(e){while(this.regexp_eatClassAtom(e)){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var n=e.lastIntValue;if(e.switchU&&(t===-1||n===-1))e.raise("Invalid character class");if(t!==-1&&n!==-1&&t>n)e.raise("Range out of order in character class")}}};B.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var n=e.current();if(n===99||ko(n))e.raise("Invalid class escape");e.raise("Invalid escape")}e.pos=t}var r=e.current();if(r!==93)return e.lastIntValue=r,e.advance(),!0;return!1};B.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)};B.regexp_classSetExpression=function(e){var t=gt,n;if(this.regexp_eatClassSetRange(e));else if(n=this.regexp_eatClassSetOperand(e)){if(n===Ze)t=Ze;var r=e.pos;while(e.eatChars([38,38])){if(e.current()!==38&&(n=this.regexp_eatClassSetOperand(e))){if(n!==Ze)t=gt;continue}e.raise("Invalid character in character class")}if(r!==e.pos)return t;while(e.eatChars([45,45])){if(this.regexp_eatClassSetOperand(e))continue;e.raise("Invalid character in character class")}if(r!==e.pos)return t}else e.raise("Invalid character in character class");for(;;){if(this.regexp_eatClassSetRange(e))continue;if(n=this.regexp_eatClassSetOperand(e),!n)return t;if(n===Ze)t=Ze}};B.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var n=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var r=e.lastIntValue;if(n!==-1&&r!==-1&&n>r)e.raise("Range out of order in character class");return!0}e.pos=t}return!1};B.regexp_eatClassSetOperand=function(e){if(this.regexp_eatClassSetCharacter(e))return gt;return this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)};B.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var n=e.eat(94),r=this.regexp_classContents(e);if(e.eat(93)){if(n&&r===Ze)e.raise("Negated character class may contain strings");return r}e.pos=t}if(e.eat(92)){var i=this.regexp_eatCharacterClassEscape(e);if(i)return i;e.pos=t}return null};B.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var n=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return n}else e.raise("Invalid escape");e.pos=t}return null};B.regexp_classStringDisjunctionContents=function(e){var t=this.regexp_classString(e);while(e.eat(124))if(this.regexp_classString(e)===Ze)t=Ze;return t};B.regexp_classString=function(e){var t=0;while(this.regexp_eatClassSetCharacter(e))t++;return t===1?gt:Ze};B.regexp_eatClassSetCharacter=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatCharacterEscape(e)||this.regexp_eatClassSetReservedPunctuator(e))return!0;if(e.eat(98))return e.lastIntValue=8,!0;return e.pos=t,!1}var n=e.current();if(n<0||n===e.lookahead()&&yd(n))return!1;if(gd(n))return!1;return e.advance(),e.lastIntValue=n,!0};function yd(e){return e===33||e>=35&&e<=38||e>=42&&e<=44||e===46||e>=58&&e<=64||e===94||e===96||e===126}function gd(e){return e===40||e===41||e===45||e===47||e>=91&&e<=93||e>=123&&e<=125}B.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();if(xd(t))return e.lastIntValue=t,e.advance(),!0;return!1};function xd(e){return e===33||e===35||e===37||e===38||e===44||e===45||e>=58&&e<=62||e===64||e===96||e===126}B.regexp_eatClassControlLetter=function(e){var t=e.current();if(cr(t)||t===95)return e.lastIntValue=t%32,e.advance(),!0;return!1};B.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;if(e.switchU)e.raise("Invalid escape");e.pos=t}return!1};B.regexp_eatDecimalDigits=function(e){var t=e.pos,n=0;e.lastIntValue=0;while(cr(n=e.current()))e.lastIntValue=10*e.lastIntValue+(n-48),e.advance();return e.pos!==t};function cr(e){return e>=48&&e<=57}B.regexp_eatHexDigits=function(e){var t=e.pos,n=0;e.lastIntValue=0;while(Po(n=e.current()))e.lastIntValue=16*e.lastIntValue+Ao(n),e.advance();return e.pos!==t};function Po(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function Ao(e){if(e>=65&&e<=70)return 10+(e-65);if(e>=97&&e<=102)return 10+(e-97);return e-48}B.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var n=e.lastIntValue;if(t<=3&&this.regexp_eatOctalDigit(e))e.lastIntValue=t*64+n*8+e.lastIntValue;else e.lastIntValue=t*8+n}else e.lastIntValue=t;return!0}return!1};B.regexp_eatOctalDigit=function(e){var t=e.current();if(ko(t))return e.lastIntValue=t-48,e.advance(),!0;return e.lastIntValue=0,!1};function ko(e){return e>=48&&e<=55}B.regexp_eatFixedHexDigits=function(e,t){var n=e.pos;e.lastIntValue=0;for(var r=0;r<t;++r){var i=e.current();if(!Po(i))return e.pos=n,!1;e.lastIntValue=16*e.lastIntValue+Ao(i),e.advance()}return!0};var pr=function(t){if(this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,t.options.locations)this.loc=new Pn(t,t.startLoc,t.endLoc);if(t.options.ranges)this.range=[t.start,t.end]},te=me.prototype;te.next=function(e){if(!e&&this.type.keyword&&this.containsEsc)this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword);if(this.options.onToken)this.options.onToken(new pr(this));this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()};te.getToken=function(){return this.next(),new pr(this)};if(typeof Symbol<"u")te[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===h.eof,value:t}}}};te.nextToken=function(){var e=this.curContext();if(!e||!e.preserveSpace)this.skipSpace();if(this.start=this.pos,this.options.locations)this.startLoc=this.curPosition();if(this.pos>=this.input.length)return this.finishToken(h.eof);if(e.override)return e.override(this);else this.readToken(this.fullCharCodeAtPos())};te.readToken=function(e){if(Le(e,this.options.ecmaVersion>=6)||e===92)return this.readWord();return this.getTokenFromCode(e)};te.fullCharCodeAt=function(e){var t=this.input.charCodeAt(e);if(t<=55295||t>=56320)return t;var n=this.input.charCodeAt(e+1);return n<=56319||n>=57344?t:(t<<10)+n-56613888};te.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)};te.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,n=this.input.indexOf("*/",this.pos+=2);if(n===-1)this.raise(this.pos-2,"Unterminated comment");if(this.pos=n+2,this.options.locations)for(var r=void 0,i=t;(r=Ya(this.input,i,this.pos))>-1;)++this.curLine,i=this.lineStart=r;if(this.options.onComment)this.options.onComment(!0,this.input.slice(t+2,n),t,this.pos,e,this.curPosition())};te.skipLineComment=function(e){var t=this.pos,n=this.options.onComment&&this.curPosition(),r=this.input.charCodeAt(this.pos+=e);while(this.pos<this.input.length&&!Mt(r))r=this.input.charCodeAt(++this.pos);if(this.options.onComment)this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,n,this.curPosition())};te.skipSpace=function(){e:while(this.pos<this.input.length){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:if(this.input.charCodeAt(this.pos+1)===10)++this.pos;case 10:case 8232:case 8233:if(++this.pos,this.options.locations)++this.curLine,this.lineStart=this.pos;break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(e>8&&e<14||e>=5760&&bi.test(String.fromCharCode(e)))++this.pos;else break e}}};te.finishToken=function(e,t){if(this.end=this.pos,this.options.locations)this.endLoc=this.curPosition();var n=this.type;this.type=e,this.value=t,this.updateContext(n)};te.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);if(this.options.ecmaVersion>=6&&e===46&&t===46)return this.pos+=3,this.finishToken(h.ellipsis);else return++this.pos,this.finishToken(h.dot)};te.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);if(this.exprAllowed)return++this.pos,this.readRegexp();if(e===61)return this.finishOp(h.assign,2);return this.finishOp(h.slash,1)};te.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,r=e===42?h.star:h.modulo;if(this.options.ecmaVersion>=7&&e===42&&t===42)++n,r=h.starstar,t=this.input.charCodeAt(this.pos+2);if(t===61)return this.finishOp(h.assign,n+1);return this.finishOp(r,n)};te.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(this.options.ecmaVersion>=12){var n=this.input.charCodeAt(this.pos+2);if(n===61)return this.finishOp(h.assign,3)}return this.finishOp(e===124?h.logicalOR:h.logicalAND,2)}if(t===61)return this.finishOp(h.assign,2);return this.finishOp(e===124?h.bitwiseOR:h.bitwiseAND,1)};te.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);if(e===61)return this.finishOp(h.assign,2);return this.finishOp(h.bitwiseXOR,1)};te.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(t===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||Re.test(this.input.slice(this.lastTokEnd,this.pos))))return this.skipLineComment(3),this.skipSpace(),this.nextToken();return this.finishOp(h.incDec,2)}if(t===61)return this.finishOp(h.assign,2);return this.finishOp(h.plusMin,1)};te.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),n=1;if(t===e){if(n=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+n)===61)return this.finishOp(h.assign,n+1);return this.finishOp(h.bitShift,n)}if(t===33&&e===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45)return this.skipLineComment(4),this.skipSpace(),this.nextToken();if(t===61)n=2;return this.finishOp(h.relational,n)};te.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===61)return this.finishOp(h.equality,this.input.charCodeAt(this.pos+2)===61?3:2);if(e===61&&t===62&&this.options.ecmaVersion>=6)return this.pos+=2,this.finishToken(h.arrow);return this.finishOp(e===61?h.eq:h.prefix,1)};te.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(t===46){var n=this.input.charCodeAt(this.pos+2);if(n<48||n>57)return this.finishOp(h.questionDot,2)}if(t===63){if(e>=12){var r=this.input.charCodeAt(this.pos+2);if(r===61)return this.finishOp(h.assign,3)}return this.finishOp(h.coalesce,2)}}return this.finishOp(h.question,1)};te.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13){if(++this.pos,t=this.fullCharCodeAtPos(),Le(t,!0)||t===92)return this.finishToken(h.privateId,this.readWord1())}this.raise(this.pos,"Unexpected character '"+yt(t)+"'")};te.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(h.parenL);case 41:return++this.pos,this.finishToken(h.parenR);case 59:return++this.pos,this.finishToken(h.semi);case 44:return++this.pos,this.finishToken(h.comma);case 91:return++this.pos,this.finishToken(h.bracketL);case 93:return++this.pos,this.finishToken(h.bracketR);case 123:return++this.pos,this.finishToken(h.braceL);case 125:return++this.pos,this.finishToken(h.braceR);case 58:return++this.pos,this.finishToken(h.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(h.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(t===120||t===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(t===111||t===79)return this.readRadixNumber(8);if(t===98||t===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(h.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+yt(e)+"'")};te.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)};te.readRegexp=function(){var e,t,n=this.pos;for(;;){if(this.pos>=this.input.length)this.raise(n,"Unterminated regular expression");var r=this.input.charAt(this.pos);if(Re.test(r))this.raise(n,"Unterminated regular expression");if(!e){if(r==="[")t=!0;else if(r==="]"&&t)t=!1;else if(r==="/"&&!t)break;e=r==="\\"}else e=!1;++this.pos}var i=this.input.slice(n,this.pos);++this.pos;var o=this.pos,s=this.readWord1();if(this.containsEsc)this.unexpected(o);var c=this.regexpState||(this.regexpState=new ut(this));c.reset(n,i,s),this.validateRegExpFlags(c),this.validateRegExpPattern(c);var l=null;try{l=new RegExp(i,s)}catch(u){}return this.finishToken(h.regexp,{pattern:i,flags:s,value:l})};te.readInt=function(e,t,n){var r=this.options.ecmaVersion>=12&&t===void 0,i=n&&this.input.charCodeAt(this.pos)===48,o=this.pos,s=0,c=0;for(var l=0,u=t==null?1/0:t;l<u;++l,++this.pos){var f=this.input.charCodeAt(this.pos),y=void 0;if(r&&f===95){if(i)this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals");if(c===95)this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore");if(l===0)this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits");c=f;continue}if(f>=97)y=f-97+10;else if(f>=65)y=f-65+10;else if(f>=48&&f<=57)y=f-48;else y=1/0;if(y>=e)break;c=f,s=s*e+y}if(r&&c===95)this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits");if(this.pos===o||t!=null&&this.pos-o!==t)return null;return s};function bd(e,t){if(t)return parseInt(e,8);return parseFloat(e.replace(/_/g,""))}function wo(e){if(typeof BigInt!=="function")return null;return BigInt(e.replace(/_/g,""))}te.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var n=this.readInt(e);if(n==null)this.raise(this.start+2,"Expected number in radix "+e);if(this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110)n=wo(this.input.slice(t,this.pos)),++this.pos;else if(Le(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");return this.finishToken(h.num,n)};te.readNumber=function(e){var t=this.pos;if(!e&&this.readInt(10,void 0,!0)===null)this.raise(t,"Invalid number");var n=this.pos-t>=2&&this.input.charCodeAt(t)===48;if(n&&this.strict)this.raise(t,"Invalid number");var r=this.input.charCodeAt(this.pos);if(!n&&!e&&this.options.ecmaVersion>=11&&r===110){var i=wo(this.input.slice(t,this.pos));if(++this.pos,Le(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");return this.finishToken(h.num,i)}if(n&&/[89]/.test(this.input.slice(t,this.pos)))n=!1;if(r===46&&!n)++this.pos,this.readInt(10),r=this.input.charCodeAt(this.pos);if((r===69||r===101)&&!n){if(r=this.input.charCodeAt(++this.pos),r===43||r===45)++this.pos;if(this.readInt(10)===null)this.raise(t,"Invalid number")}if(Le(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");var o=bd(this.input.slice(t,this.pos),n);return this.finishToken(h.num,o)};te.readCodePoint=function(){var e=this.input.charCodeAt(this.pos),t;if(e===123){if(this.options.ecmaVersion<6)this.unexpected();var n=++this.pos;if(t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,t>1114111)this.invalidStringToken(n,"Code point out of bounds")}else t=this.readHexChar(4);return t};te.readString=function(e){var t="",n=++this.pos;for(;;){if(this.pos>=this.input.length)this.raise(this.start,"Unterminated string constant");var r=this.input.charCodeAt(this.pos);if(r===e)break;if(r===92)t+=this.input.slice(n,this.pos),t+=this.readEscapedChar(!1),n=this.pos;else if(r===8232||r===8233){if(this.options.ecmaVersion<10)this.raise(this.start,"Unterminated string constant");if(++this.pos,this.options.locations)this.curLine++,this.lineStart=this.pos}else{if(Mt(r))this.raise(this.start,"Unterminated string constant");++this.pos}}return t+=this.input.slice(n,this.pos++),this.finishToken(h.string,t)};var No={};te.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===No)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1};te.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw No;else this.raise(e,t)};te.readTmplToken=function(){var e="",t=this.pos;for(;;){if(this.pos>=this.input.length)this.raise(this.start,"Unterminated template");var n=this.input.charCodeAt(this.pos);if(n===96||n===36&&this.input.charCodeAt(this.pos+1)===123){if(this.pos===this.start&&(this.type===h.template||this.type===h.invalidTemplate))if(n===36)return this.pos+=2,this.finishToken(h.dollarBraceL);else return++this.pos,this.finishToken(h.backQuote);return e+=this.input.slice(t,this.pos),this.finishToken(h.template,e)}if(n===92)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(Mt(n)){switch(e+=this.input.slice(t,this.pos),++this.pos,n){case 13:if(this.input.charCodeAt(this.pos)===10)++this.pos;case 10:e+=`
33
+ `;break;default:e+=String.fromCharCode(n);break}if(this.options.locations)++this.curLine,this.lineStart=this.pos;t=this.pos}else++this.pos}};te.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{")break;case"`":return this.finishToken(h.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":if(this.input[this.pos+1]===`
31
34
  `)++this.pos;case`
32
- `:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")};X.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return`
33
- `;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return it(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:if(this.input.charCodeAt(this.pos)===10)++this.pos;case 10:if(this.options.locations)this.lineStart=this.pos,++this.curLine;return"";case 56:case 57:if(this.strict)this.invalidStringToken(this.pos-1,"Invalid escape sequence");if(e){var n=this.pos-1;this.invalidStringToken(n,"Invalid escape sequence in template string")}default:if(t>=48&&t<=55){var r=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(r,8);if(i>255)r=r.slice(0,-1),i=parseInt(r,8);if(this.pos+=r.length-1,t=this.input.charCodeAt(this.pos),(r!=="0"||t===56||t===57)&&(this.strict||e))this.invalidStringToken(this.pos-1-r.length,e?"Octal literal in template string":"Octal literal in strict mode");return String.fromCharCode(i)}if(St(t)){if(this.options.locations)this.lineStart=this.pos,++this.curLine;return""}return String.fromCharCode(t)}};X.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);if(n===null)this.invalidStringToken(t,"Bad character escape sequence");return n};X.readWord1=function(){this.containsEsc=!1;var e="",t=!0,n=this.pos,r=this.options.ecmaVersion>=6;while(this.pos<this.input.length){var i=this.fullCharCodeAtPos();if(Le(i,r))this.pos+=i<=65535?1:2;else if(i===92){this.containsEsc=!0,e+=this.input.slice(n,this.pos);var o=this.pos;if(this.input.charCodeAt(++this.pos)!==117)this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX");++this.pos;var s=this.readCodePoint();if(!(t?we:Le)(s,r))this.invalidStringToken(o,"Invalid Unicode escape");e+=it(s),n=this.pos}else break;t=!1}return e+this.input.slice(n,this.pos)};X.readWord=function(){var e=this.readWord1(),t=f.name;if(this.keywords.test(e))t=Dn[e];return this.finishToken(t,e)};var Ma="8.18.0";fe.acorn={Parser:fe,version:Ma,defaultOptions:Pn,Position:It,SourceLocation:Zt,getLineInfo:Or,Node:tn,TokenType:ee,tokTypes:f,keywordTypes:Dn,TokContext:Ue,tokContexts:de,isIdentifierChar:Le,isIdentifierStart:we,Token:On,isNewLine:St,lineBreak:Ne,lineBreakG:na,nonASCIIwhitespace:Mr};function Kl(e,t){return fe.parse(e,t)}function zl(e,t,n){return fe.parseExpressionAt(e,t,n)}function Xl(e,t){return fe.tokenizer(e,t)}var Ve=!0,Jl=new WeakMap;function Yl(e){let t=e.Parser.acorn||e,n=Jl.get(t);if(!n){let p=function(R){return R===E.name||R===E.string||R===E.num||N.includes(R)||q.includes(R)},l=function(R){return R===E.name||N.includes(R)||q.includes(R)},h=function(R){return R===E.name||q.includes(R)},d=function(R){return R===D.abstract||R===D.declare||R===D.enum||R===D.module||R===D.namespace||R===D.interface||R===D.type},g=function(R){return R===D.keyof||R===D.readonly||R===D.unique},b=function(R){return R===E.invalidTemplate},{tokTypes:E,keywordTypes:w}=t,N=Object.values(w),D=s(),q=Object.values(D),W=o(),P=i(),B=new RegExp(`^(?:${Object.keys(D).join("|")})$`);W.jsxTagStart.updateContext=function(){this.context.push(P.tc_expr),this.context.push(P.tc_oTag),this.exprAllowed=!1},W.jsxTagEnd.updateContext=function(R){let ae=this.context.pop();if(ae===P.tc_oTag&&R===E.slash||ae===P.tc_cTag)this.context.pop(),this.exprAllowed=this.curContext()===P.tc_expr;else this.exprAllowed=!0},n={tokTypes:{...D,...W},tokContexts:{...P},keywordsRegExp:B,tokenIsLiteralPropertyName:p,tokenIsKeywordOrIdentifier:l,tokenIsIdentifier:h,tokenIsTSDeclarationStart:d,tokenIsTSTypeOperator:g,tokenIsTemplate:b}}return n;function r(p,l={}){return new t.TokenType("name",l)}function i(){return{tc_oTag:new t.TokContext("<tag",!1,!1),tc_cTag:new t.TokContext("</tag",!1,!1),tc_expr:new t.TokContext("<tag>...</tag>",!0,!0)}}function o(){return{at:new t.TokenType("@"),jsxName:new t.TokenType("jsxName"),jsxText:new t.TokenType("jsxText",{beforeExpr:!0}),jsxTagStart:new t.TokenType("jsxTagStart",{startsExpr:!0}),jsxTagEnd:new t.TokenType("jsxTagEnd")}}function s(){return{assert:r("assert",{startsExpr:Ve}),asserts:r("asserts",{startsExpr:Ve}),global:r("global",{startsExpr:Ve}),keyof:r("keyof",{startsExpr:Ve}),readonly:r("readonly",{startsExpr:Ve}),unique:r("unique",{startsExpr:Ve}),abstract:r("abstract",{startsExpr:Ve}),declare:r("declare",{startsExpr:Ve}),enum:r("enum",{startsExpr:Ve}),module:r("module",{startsExpr:Ve}),namespace:r("namespace",{startsExpr:Ve}),interface:r("interface",{startsExpr:Ve}),type:r("type",{startsExpr:Ve})}}}var Ql=1048576,rn=2097152,Ot=1,Vn=2,Zl=4,Wr=8,eu=16,qa=64,Ua=128,tu=256,nu=512,Ga=1024,Vm=Ot|Vn|Wr|Ua,$m=Ot|0|Wr|0,jm=Ot|0|Zl|0,Hm=Ot|0|eu|0,qm=0|Vn|0|Ua,Um=0|Vn|0|0,ru=Ot|Vn|Wr|tu,Gm=0|Ga,Wm=0|qa,Km=Ot|0|0|qa,zm=ru|nu,Xm=0|Ga,Wa=4,Ka=2,za=1,Jm=Ka|za,Ym=Ka|Wa,Qm=za|Wa,iu=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/y,Oa=new RegExp("(?=("+iu.source+"))\\1"+/(?=[\n\r\u2028\u2029]|\/\*(?!.*?\*\/)|$)/.source,"y"),sn=class{constructor(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1}};function su(e,t){let n="true";if(t.type==="MethodDefinition"&&(t.kind==="get"||t.kind==="set"))n=(t.static?"s":"i")+t.kind;if(e==="iget"&&n==="iset"||e==="iset"&&n==="iget"||e==="sget"&&n==="sset"||e==="sset"&&n==="sget")return[!1,"true"];if(!e)return[!1,n];return[!0,e]}function Ba(e,t){let{computed:n,key:r}=e;return!n&&(r.type==="Identifier"&&r.name===t||r.type==="Literal"&&r.value===t)}var L={AbstractMethodHasImplementation:({methodName:e})=>`Method '${e}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:e})=>`Property '${e}' cannot have an initializer because it is marked abstract.`,AccesorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccesorCannotHaveTypeParameters:"An accessor cannot have type parameters.",CannotFindName:({name:e})=>`Cannot find name '${e}'.`,ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference:"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:({kind:e})=>`'declare' is not allowed in ${e}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:()=>"Accessibility modifier already seen.",DuplicateModifier:({modifier:e})=>`Duplicate modifier: '${e}'.`,EmptyHeritageClauseType:({token:e})=>`'${e}' list cannot be empty.`,EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ImportAliasHasImportType:"An import alias can not use 'import type'.",IncompatibleModifiers:({modifiers:e})=>`'${e[0]}' modifier cannot be used with '${e[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:e})=>`Index signatures cannot have an accessibility modifier ('${e}').`,IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier.",IndexSignatureHasOverride:"'override' modifier cannot appear on an index signature.",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier.",InitializerNotAllowedInAmbientContext:"Initializers are not allowed in ambient contexts.",InvalidModifierOnTypeMember:({modifier:e})=>`'${e}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:e})=>`'${e}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:e})=>`'${e}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifiersOrder:({orderedModifiers:e})=>`'${e[0]}' modifier must precede '${e[1]}' modifier.`,InvalidPropertyAccessAfterInstantiationExpression:"Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MissingInterfaceName:"'interface' declarations must be followed by an identifier.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifer:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:({modifier:e})=>`Private elements cannot have an accessibility modifier ('${e}').`,PrivateMethodsHasAccessibility:({modifier:e})=>`Private methods cannot have an accessibility modifier ('${e}').`,ReadonlyForMethodSignature:"'readonly' modifier can only appear on a property declaration or index signature.",ReservedArrowTypeParam:"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `<T,>() => ...`.",ReservedTypeAssertion:"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",SetAccesorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccesorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccesorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:({typeParameterName:e})=>`Single type parameter ${e} should have a trailing comma. Example usage: <${e},>.`,StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:"A type-only import can specify a default import or named bindings, but not both.",TypeModifierIsUsedInTypeExports:"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.",TypeModifierIsUsedInTypeImports:"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.",UnexpectedParameterModifier:"A parameter property is only allowed in a constructor implementation.",UnexpectedReadonly:"'readonly' type modifier is only permitted on array and tuple literal types.",GenericsEndWithComma:"Trailing comma is not allowed at the end of generics.",UnexpectedTypeAnnotation:"Did not expect a type annotation here.",UnexpectedTypeCastInParameter:"Unexpected type cast in parameter position.",UnsupportedImportTypeArgument:"Argument in a type import must be a string literal.",UnsupportedParameterPropertyKind:"A parameter property may not be declared using a binding pattern.",UnsupportedSignatureParameterKind:({type:e})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${e}.`,LetInLexicalBinding:"'let' is not allowed to be used as a name in 'let' or 'const' declarations."},Fn={UnexpectedLeadingDecorator:"Leading decorators must be attached to a class declaration.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",TrailingDecorator:"Decorators must be attached to a class element.",SpreadElementDecorator:"Decorators can't be used with SpreadElement"};function au(e,t,n){let{tokTypes:r}=n,{tokTypes:i}=t;return class extends e{takeDecorators(s){let p=this.decoratorStack[this.decoratorStack.length-1];if(p.length)s.decorators=p,this.resetStartLocationFromNode(s,p[0]),this.decoratorStack[this.decoratorStack.length-1]=[]}parseDecorators(s){let p=this.decoratorStack[this.decoratorStack.length-1];while(this.match(i.at)){let l=this.parseDecorator();p.push(l)}if(this.match(r._export)){if(!s)this.unexpected()}else if(!this.canHaveLeadingDecorator())this.raise(this.start,Fn.UnexpectedLeadingDecorator)}parseDecorator(){let s=this.startNode();this.next(),this.decoratorStack.push([]);let p=this.start,l=this.startLoc,h;if(this.match(r.parenL)){let d=this.start,g=this.startLoc;if(this.next(),h=this.parseExpression(),this.expect(r.parenR),this.options.preserveParens){let b=this.startNodeAt(d,g);b.expression=h,h=this.finishNode(b,"ParenthesizedExpression")}}else{h=this.parseIdent(!1);while(this.eat(r.dot)){let d=this.startNodeAt(p,l);d.object=h,d.property=this.parseIdent(!0),d.computed=!1,h=this.finishNode(d,"MemberExpression")}}return s.expression=this.parseMaybeDecoratorArguments(h),this.decoratorStack.pop(),this.finishNode(s,"Decorator")}parseMaybeDecoratorArguments(s){if(this.eat(r.parenL)){let p=this.startNodeAtNode(s);return p.callee=s,p.arguments=this.parseExprList(r.parenR,!1),this.finishNode(p,"CallExpression")}return s}}}var Fa={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"},ou=/^[\da-fA-F]+$/,cu=/^\d+$/;function an(e){if(!e)return e;if(e.type==="JSXIdentifier")return e.name;if(e.type==="JSXNamespacedName")return e.namespace.name+":"+e.name.name;if(e.type==="JSXMemberExpression")return an(e.object)+"."+an(e.property)}function pu(e,t,n,r){let i=e.tokTypes,o=t.tokTypes,{isNewLine:s,isIdentifierChar:p}=e,l=Object.assign({allowNamespaces:!0,allowNamespacedObjects:!0},r||{});return class extends n{jsx_readToken(){let d="",g=this.pos;for(;;){if(this.pos>=this.input.length)this.raise(this.start,"Unterminated JSX contents");let b=this.input.charCodeAt(this.pos);switch(b){case 60:case 123:if(this.pos===this.start){if(b===60&&this.exprAllowed)return++this.pos,this.finishToken(o.jsxTagStart);return this.getTokenFromCode(b)}return d+=this.input.slice(g,this.pos),this.finishToken(o.jsxText,d);case 38:d+=this.input.slice(g,this.pos),d+=this.jsx_readEntity(),g=this.pos;break;case 62:case 125:this.raise(this.pos,"Unexpected token `"+this.input[this.pos]+"`. Did you mean `"+(b===62?"&gt;":"&rbrace;")+'` or `{"'+this.input[this.pos]+'"}`?');default:if(s(b))d+=this.input.slice(g,this.pos),d+=this.jsx_readNewLine(!0),g=this.pos;else++this.pos}}}jsx_readNewLine(d){let g=this.input.charCodeAt(this.pos),b;if(++this.pos,g===13&&this.input.charCodeAt(this.pos)===10)++this.pos,b=d?`
35
+ `:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")};te.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return`
36
+ `;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return yt(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:if(this.input.charCodeAt(this.pos)===10)++this.pos;case 10:if(this.options.locations)this.lineStart=this.pos,++this.curLine;return"";case 56:case 57:if(this.strict)this.invalidStringToken(this.pos-1,"Invalid escape sequence");if(e){var n=this.pos-1;this.invalidStringToken(n,"Invalid escape sequence in template string")}default:if(t>=48&&t<=55){var r=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(r,8);if(i>255)r=r.slice(0,-1),i=parseInt(r,8);if(this.pos+=r.length-1,t=this.input.charCodeAt(this.pos),(r!=="0"||t===56||t===57)&&(this.strict||e))this.invalidStringToken(this.pos-1-r.length,e?"Octal literal in template string":"Octal literal in strict mode");return String.fromCharCode(i)}if(Mt(t)){if(this.options.locations)this.lineStart=this.pos,++this.curLine;return""}return String.fromCharCode(t)}};te.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);if(n===null)this.invalidStringToken(t,"Bad character escape sequence");return n};te.readWord1=function(){this.containsEsc=!1;var e="",t=!0,n=this.pos,r=this.options.ecmaVersion>=6;while(this.pos<this.input.length){var i=this.fullCharCodeAtPos();if(Fe(i,r))this.pos+=i<=65535?1:2;else if(i===92){this.containsEsc=!0,e+=this.input.slice(n,this.pos);var o=this.pos;if(this.input.charCodeAt(++this.pos)!==117)this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX");++this.pos;var s=this.readCodePoint();if(!(t?Le:Fe)(s,r))this.invalidStringToken(o,"Invalid Unicode escape");e+=yt(s),n=this.pos}else break;t=!1}return e+this.input.slice(n,this.pos)};te.readWord=function(){var e=this.readWord1(),t=h.name;if(this.keywords.test(e))t=ir[e];return this.finishToken(t,e)};var Do="8.18.0";me.acorn={Parser:me,version:Do,defaultOptions:Zn,Position:Xt,SourceLocation:Pn,getLineInfo:Ti,Node:kn,TokenType:se,tokTypes:h,keywordTypes:ir,TokContext:Qe,tokContexts:he,isIdentifierChar:Fe,isIdentifierStart:Le,Token:pr,isNewLine:Mt,lineBreak:Re,lineBreakG:Xa,nonASCIIwhitespace:bi};function Td(e,t){return me.parse(e,t)}function Ed(e,t,n){return me.parseExpressionAt(e,t,n)}function Cd(e,t){return me.tokenizer(e,t)}var Ge=!0,Sd=new WeakMap;function vd(e){let t=e.Parser.acorn||e,n=Sd.get(t);if(!n){let c=function(M){return M===b.name||M===b.string||M===b.num||N.includes(M)||j.includes(M)},l=function(M){return M===b.name||N.includes(M)||j.includes(M)},u=function(M){return M===b.name||j.includes(M)},f=function(M){return M===D.abstract||M===D.declare||M===D.enum||M===D.module||M===D.namespace||M===D.interface||M===D.type},y=function(M){return M===D.keyof||M===D.readonly||M===D.unique},g=function(M){return M===b.invalidTemplate},{tokTypes:b,keywordTypes:P}=t,N=Object.values(P),D=s(),j=Object.values(D),U=o(),v=i(),w=new RegExp(`^(?:${Object.keys(D).join("|")})$`);U.jsxTagStart.updateContext=function(){this.context.push(v.tc_expr),this.context.push(v.tc_oTag),this.exprAllowed=!1},U.jsxTagEnd.updateContext=function(M){let G=this.context.pop();if(G===v.tc_oTag&&M===b.slash||G===v.tc_cTag)this.context.pop(),this.exprAllowed=this.curContext()===v.tc_expr;else this.exprAllowed=!0},n={tokTypes:{...D,...U},tokContexts:{...v},keywordsRegExp:w,tokenIsLiteralPropertyName:c,tokenIsKeywordOrIdentifier:l,tokenIsIdentifier:u,tokenIsTSDeclarationStart:f,tokenIsTSTypeOperator:y,tokenIsTemplate:g}}return n;function r(c,l={}){return new t.TokenType("name",l)}function i(){return{tc_oTag:new t.TokContext("<tag",!1,!1),tc_cTag:new t.TokContext("</tag",!1,!1),tc_expr:new t.TokContext("<tag>...</tag>",!0,!0)}}function o(){return{at:new t.TokenType("@"),jsxName:new t.TokenType("jsxName"),jsxText:new t.TokenType("jsxText",{beforeExpr:!0}),jsxTagStart:new t.TokenType("jsxTagStart",{startsExpr:!0}),jsxTagEnd:new t.TokenType("jsxTagEnd")}}function s(){return{assert:r("assert",{startsExpr:Ge}),asserts:r("asserts",{startsExpr:Ge}),global:r("global",{startsExpr:Ge}),keyof:r("keyof",{startsExpr:Ge}),readonly:r("readonly",{startsExpr:Ge}),unique:r("unique",{startsExpr:Ge}),abstract:r("abstract",{startsExpr:Ge}),declare:r("declare",{startsExpr:Ge}),enum:r("enum",{startsExpr:Ge}),module:r("module",{startsExpr:Ge}),namespace:r("namespace",{startsExpr:Ge}),interface:r("interface",{startsExpr:Ge}),type:r("type",{startsExpr:Ge})}}}var Pd=1048576,Nn=2097152,en=1,dr=2,Ad=4,Di=8,kd=16,Fo=64,$o=128,wd=256,Nd=512,Vo=1024,Kg=en|dr|Di|$o,zg=en|0|Di|0,Jg=en|0|Ad|0,Xg=en|0|kd|0,Yg=0|dr|0|$o,Qg=0|dr|0|0,Dd=en|dr|Di|wd,Zg=0|Vo,ex=0|Fo,tx=en|0|0|Fo,nx=Dd|Nd,rx=0|Vo,jo=4,Ho=2,qo=1,ix=Ho|qo,sx=Ho|jo,ax=qo|jo,_d=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/y,_o=new RegExp("(?=("+_d.source+"))\\1"+/(?=[\n\r\u2028\u2029]|\/\*(?!.*?\*\/)|$)/.source,"y"),Dn=class{constructor(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1}};function Id(e,t){let n="true";if(t.type==="MethodDefinition"&&(t.kind==="get"||t.kind==="set"))n=(t.static?"s":"i")+t.kind;if(e==="iget"&&n==="iset"||e==="iset"&&n==="iget"||e==="sget"&&n==="sset"||e==="sset"&&n==="sget")return[!1,"true"];if(!e)return[!1,n];return[!0,e]}function Io(e,t){let{computed:n,key:r}=e;return!n&&(r.type==="Identifier"&&r.name===t||r.type==="Literal"&&r.value===t)}var F={AbstractMethodHasImplementation:({methodName:e})=>`Method '${e}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:e})=>`Property '${e}' cannot have an initializer because it is marked abstract.`,AccesorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccesorCannotHaveTypeParameters:"An accessor cannot have type parameters.",CannotFindName:({name:e})=>`Cannot find name '${e}'.`,ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference:"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:({kind:e})=>`'declare' is not allowed in ${e}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:()=>"Accessibility modifier already seen.",DuplicateModifier:({modifier:e})=>`Duplicate modifier: '${e}'.`,EmptyHeritageClauseType:({token:e})=>`'${e}' list cannot be empty.`,EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ImportAliasHasImportType:"An import alias can not use 'import type'.",IncompatibleModifiers:({modifiers:e})=>`'${e[0]}' modifier cannot be used with '${e[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:e})=>`Index signatures cannot have an accessibility modifier ('${e}').`,IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier.",IndexSignatureHasOverride:"'override' modifier cannot appear on an index signature.",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier.",InitializerNotAllowedInAmbientContext:"Initializers are not allowed in ambient contexts.",InvalidModifierOnTypeMember:({modifier:e})=>`'${e}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:e})=>`'${e}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:e})=>`'${e}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifiersOrder:({orderedModifiers:e})=>`'${e[0]}' modifier must precede '${e[1]}' modifier.`,InvalidPropertyAccessAfterInstantiationExpression:"Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MissingInterfaceName:"'interface' declarations must be followed by an identifier.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifer:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:({modifier:e})=>`Private elements cannot have an accessibility modifier ('${e}').`,PrivateMethodsHasAccessibility:({modifier:e})=>`Private methods cannot have an accessibility modifier ('${e}').`,ReadonlyForMethodSignature:"'readonly' modifier can only appear on a property declaration or index signature.",ReservedArrowTypeParam:"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `<T,>() => ...`.",ReservedTypeAssertion:"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",SetAccesorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccesorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccesorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:({typeParameterName:e})=>`Single type parameter ${e} should have a trailing comma. Example usage: <${e},>.`,StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:"A type-only import can specify a default import or named bindings, but not both.",TypeModifierIsUsedInTypeExports:"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.",TypeModifierIsUsedInTypeImports:"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.",UnexpectedParameterModifier:"A parameter property is only allowed in a constructor implementation.",UnexpectedReadonly:"'readonly' type modifier is only permitted on array and tuple literal types.",GenericsEndWithComma:"Trailing comma is not allowed at the end of generics.",UnexpectedTypeAnnotation:"Did not expect a type annotation here.",UnexpectedTypeCastInParameter:"Unexpected type cast in parameter position.",UnsupportedImportTypeArgument:"Argument in a type import must be a string literal.",UnsupportedParameterPropertyKind:"A parameter property may not be declared using a binding pattern.",UnsupportedSignatureParameterKind:({type:e})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${e}.`,LetInLexicalBinding:"'let' is not allowed to be used as a name in 'let' or 'const' declarations."},ur={UnexpectedLeadingDecorator:"Leading decorators must be attached to a class declaration.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",TrailingDecorator:"Decorators must be attached to a class element.",SpreadElementDecorator:"Decorators can't be used with SpreadElement"};function Ld(e,t,n){let{tokTypes:r}=n,{tokTypes:i}=t;return class extends e{takeDecorators(s){let c=this.decoratorStack[this.decoratorStack.length-1];if(c.length)s.decorators=c,this.resetStartLocationFromNode(s,c[0]),this.decoratorStack[this.decoratorStack.length-1]=[]}parseDecorators(s){let c=this.decoratorStack[this.decoratorStack.length-1];while(this.match(i.at)){let l=this.parseDecorator();c.push(l)}if(this.match(r._export)){if(!s)this.unexpected()}else if(!this.canHaveLeadingDecorator())this.raise(this.start,ur.UnexpectedLeadingDecorator)}parseDecorator(){let s=this.startNode();this.next(),this.decoratorStack.push([]);let c=this.start,l=this.startLoc,u;if(this.match(r.parenL)){let f=this.start,y=this.startLoc;if(this.next(),u=this.parseExpression(),this.expect(r.parenR),this.options.preserveParens){let g=this.startNodeAt(f,y);g.expression=u,u=this.finishNode(g,"ParenthesizedExpression")}}else{u=this.parseIdent(!1);while(this.eat(r.dot)){let f=this.startNodeAt(c,l);f.object=u,f.property=this.parseIdent(!0),f.computed=!1,u=this.finishNode(f,"MemberExpression")}}return s.expression=this.parseMaybeDecoratorArguments(u),this.decoratorStack.pop(),this.finishNode(s,"Decorator")}parseMaybeDecoratorArguments(s){if(this.eat(r.parenL)){let c=this.startNodeAtNode(s);return c.callee=s,c.arguments=this.parseExprList(r.parenR,!1),this.finishNode(c,"CallExpression")}return s}}}var Lo={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"},Rd=/^[\da-fA-F]+$/,Md=/^\d+$/;function _n(e){if(!e)return e;if(e.type==="JSXIdentifier")return e.name;if(e.type==="JSXNamespacedName")return e.namespace.name+":"+e.name.name;if(e.type==="JSXMemberExpression")return _n(e.object)+"."+_n(e.property)}function Od(e,t,n,r){let i=e.tokTypes,o=t.tokTypes,{isNewLine:s,isIdentifierChar:c}=e,l=Object.assign({allowNamespaces:!0,allowNamespacedObjects:!0},r||{});return class extends n{jsx_readToken(){let f="",y=this.pos;for(;;){if(this.pos>=this.input.length)this.raise(this.start,"Unterminated JSX contents");let g=this.input.charCodeAt(this.pos);switch(g){case 60:case 123:if(this.pos===this.start){if(g===60&&this.exprAllowed)return++this.pos,this.finishToken(o.jsxTagStart);return this.getTokenFromCode(g)}return f+=this.input.slice(y,this.pos),this.finishToken(o.jsxText,f);case 38:f+=this.input.slice(y,this.pos),f+=this.jsx_readEntity(),y=this.pos;break;case 62:case 125:this.raise(this.pos,"Unexpected token `"+this.input[this.pos]+"`. Did you mean `"+(g===62?"&gt;":"&rbrace;")+'` or `{"'+this.input[this.pos]+'"}`?');default:if(s(g))f+=this.input.slice(y,this.pos),f+=this.jsx_readNewLine(!0),y=this.pos;else++this.pos}}}jsx_readNewLine(f){let y=this.input.charCodeAt(this.pos),g;if(++this.pos,y===13&&this.input.charCodeAt(this.pos)===10)++this.pos,g=f?`
34
37
  `:`\r
35
- `;else b=String.fromCharCode(g);if(this.options.locations)++this.curLine,this.lineStart=this.pos;return b}jsx_readString(d){let g="",b=++this.pos;for(;;){if(this.pos>=this.input.length)this.raise(this.start,"Unterminated string constant");let E=this.input.charCodeAt(this.pos);if(E===d)break;if(E===38)g+=this.input.slice(b,this.pos),g+=this.jsx_readEntity(),b=this.pos;else if(s(E))g+=this.input.slice(b,this.pos),g+=this.jsx_readNewLine(!1),b=this.pos;else++this.pos}return g+=this.input.slice(b,this.pos++),this.finishToken(i.string,g)}jsx_readEntity(){let d="",g=0,b,E=this.input[this.pos];if(E!=="&")this.raise(this.pos,"Entity must start with an ampersand");let w=++this.pos;while(this.pos<this.input.length&&g++<10){if(E=this.input[this.pos++],E===";"){if(d[0]==="#"){let N;if(d[1]==="x"||d[1]==="X"){if(d=d.substr(2),ou.test(d))N=parseInt(d,16)}else if(d=d.substr(1),cu.test(d))N=parseInt(d,10);if(N!==void 0&&N<=1114111)b=String.fromCodePoint(N)}else if(Object.prototype.hasOwnProperty.call(Fa,d))b=Fa[d];break}d+=E}if(b===void 0)return this.pos=w,"&";return b}jsx_readWord(){let d,g=this.pos;do d=this.input.charCodeAt(++this.pos);while(p(d)||d===45);return this.finishToken(o.jsxName,this.input.slice(g,this.pos))}jsx_parseIdentifier(){let d=this.startNode();if(this.type===o.jsxName)d.name=this.value;else if(this.type.keyword)d.name=this.type.keyword;else this.unexpected();return this.next(),this.finishNode(d,"JSXIdentifier")}jsx_parseNamespacedName(){let d=this.start,g=this.startLoc,b=this.jsx_parseIdentifier();if(!l.allowNamespaces||!this.eat(i.colon))return b;var E=this.startNodeAt(d,g);return E.namespace=b,E.name=this.jsx_parseIdentifier(),this.finishNode(E,"JSXNamespacedName")}jsx_parseElementName(){if(this.type===o.jsxTagEnd)return"";let d=this.start,g=this.startLoc,b=this.jsx_parseNamespacedName();if(this.type===i.dot&&b.type==="JSXNamespacedName"&&!l.allowNamespacedObjects)this.unexpected();while(this.eat(i.dot)){let E=this.startNodeAt(d,g);E.object=b,E.property=this.jsx_parseIdentifier(),b=this.finishNode(E,"JSXMemberExpression")}return b}jsx_parseAttributeValue(){switch(this.type){case i.braceL:let d=this.jsx_parseExpressionContainer();if(d.expression.type==="JSXEmptyExpression")this.raise(d.start,"JSX attributes must only be assigned a non-empty expression");return d;case o.jsxTagStart:case i.string:return this.parseExprAtom();default:this.raise(this.start,"JSX value should be either an expression or a quoted JSX text")}}jsx_parseEmptyExpression(){let d=this.startNodeAt(this.lastTokEnd,this.lastTokEndLoc);return this.finishNodeAt(d,"JSXEmptyExpression",this.start,this.startLoc)}jsx_parseExpressionContainer(){let d=this.startNode();if(this.next(),this.eat(i.ellipsis))return d.expression=this.parseExpression(),this.expect(i.braceR),this.finishNode(d,"JSXSpreadChild");return d.expression=this.type===i.braceR?this.jsx_parseEmptyExpression():this.parseExpression(),this.expect(i.braceR),this.finishNode(d,"JSXExpressionContainer")}jsx_parseAttribute(){let d=this.startNode();if(this.eat(i.braceL))return this.expect(i.ellipsis),d.argument=this.parseMaybeAssign(),this.expect(i.braceR),this.finishNode(d,"JSXSpreadAttribute");return d.name=this.jsx_parseNamespacedName(),d.value=this.eat(i.eq)?this.jsx_parseAttributeValue():null,this.finishNode(d,"JSXAttribute")}jsx_parseOpeningElementAt(d,g){let b=this.startNodeAt(d,g);b.attributes=[];let E=this.jsx_parseElementName();if(E)b.name=E;while(this.type!==i.slash&&this.type!==o.jsxTagEnd)b.attributes.push(this.jsx_parseAttribute());return b.selfClosing=this.eat(i.slash),this.expect(o.jsxTagEnd),this.finishNode(b,E?"JSXOpeningElement":"JSXOpeningFragment")}jsx_parseClosingElementAt(d,g){let b=this.startNodeAt(d,g),E=this.jsx_parseElementName();if(E)b.name=E;return this.expect(o.jsxTagEnd),this.finishNode(b,E?"JSXClosingElement":"JSXClosingFragment")}jsx_parseElementAt(d,g){let b=this.startNodeAt(d,g),E=[],w=this.jsx_parseOpeningElementAt(d,g),N=null;if(!w.selfClosing){e:for(;;)switch(this.type){case o.jsxTagStart:if(d=this.start,g=this.startLoc,this.next(),this.eat(i.slash)){N=this.jsx_parseClosingElementAt(d,g);break e}E.push(this.jsx_parseElementAt(d,g));break;case o.jsxText:E.push(this.parseExprAtom());break;case i.braceL:E.push(this.jsx_parseExpressionContainer());break;default:this.unexpected()}if(an(N.name)!==an(w.name))this.raise(N.start,"Expected corresponding JSX closing tag for <"+an(w.name)+">")}let D=w.name?"Element":"Fragment";if(b["opening"+D]=w,b["closing"+D]=N,b.children=E,this.type===i.relational&&this.value==="<")this.raise(this.start,"Adjacent JSX elements must be wrapped in an enclosing tag");return this.finishNode(b,"JSX"+D)}jsx_parseText(){let d=this.parseLiteral(this.value);return d.type="JSXText",d}jsx_parseElement(){let d=this.start,g=this.startLoc;return this.next(),this.jsx_parseElementAt(d,g)}}}function lu(e,t,n){let{tokTypes:r}=t,{tokTypes:i}=n;return class extends e{parseMaybeImportAttributes(s){if(this.type===i._with||this.type===r.assert){this.next();let p=this.parseImportAttributes();if(p)s.attributes=p}}parseImportAttributes(){this.expect(i.braceL);let s=this.parseWithEntries();return this.expect(i.braceR),s}parseWithEntries(){let s=[],p=new Set;do{if(this.type===i.braceR)break;let l=this.startNode(),h;if(this.type===i.string)h=this.parseLiteral(this.value);else h=this.parseIdent(!0);if(this.next(),l.key=h,p.has(l.key.name))this.raise(this.pos,"Duplicated key in attributes");if(p.add(l.key.name),this.type!==i.string)this.raise(this.pos,"Only string is supported as an attribute value");l.value=this.parseLiteral(this.value),s.push(this.finishNode(l,"ImportAttribute"))}while(this.eat(i.comma));return s}}}var qr=["onToken","onComment","onInsertedSemicolon","onTrailingComma"];function Xa(){return{_tag:"BufferedParserEvents",segments:[]}}var uu=Xa();function Va(e){return e.segments.length>0}var du=class{constructor(e,t){this.options=e,this.state=t,this.callbacks={},this.callbackWrappers={},this.frames=[],this.undoLog=[],this.hasCallbacks=this.captureCallbacks()}get active(){return this.frames.length>0}begin(){let e={_tag:"ParseEffectFrame",depth:this.frames.length,undoMark:this.undoLog.length,checkpoint:this.state?.capture()};if(this.frames.push(e),e.depth===0&&this.hasCallbacks)this.activateCallbacks();return e}commit(e){this.close(e);let t=this.currentFrame();if(t){if(e.output)this.appendOutput(this.outputFor(t),e.output);return}if(this.undoLog.length=e.undoMark,e.output)this.flush(e.output)}rollback(e){this.close(e),this.unwind(e.undoMark),this.restore(e)}rollbackWithEvents(e){return this.close(e),this.unwind(e.undoMark),this.restore(e),e.output??uu}replay(e){if(!Va(e))return;let t=this.currentFrame();if(t){this.appendOutput(this.outputFor(t),e);return}this.flush(e)}set(e,t,n){this.willSet(e,t),e[t]=n}remove(e,t){this.willSet(e,t),delete e[t]}append(e,t){this.willAppend(e),e.push(t)}pop(e){return this.willMutateTail(e,1),e.pop()}truncate(e,t){if(t<e.length)this.willMutateTail(e,e.length-t);else this.willAppend(e);e.length=t}modify(e,t,n){let[r,i]=n(e[t]);return this.set(e,t,i),r}willAppend(e){if(!this.active)return;this.undoLog.push({_tag:"ArrayLength",target:e,length:e.length})}willMutateTail(e,t){if(!this.active)return;let n=Math.max(0,e.length-t);this.undoLog.push({_tag:"ArrayTail",target:e,start:n,values:e.slice(n)})}willSet(e,t){if(!this.active)return;let n=e;this.undoLog.push({_tag:"Property",target:n,key:t,had:Object.prototype.hasOwnProperty.call(n,t),value:n[t]})}captureCallbacks(){let e=!1;for(let t of qr){let n=this.options[t];if(!n)continue;e=!0,this.callbacks[t]=n,this.callbackWrappers[t]=(...r)=>{this.emit({name:t,args:r})}}return e}activateCallbacks(){for(let e of qr){let t=this.callbackWrappers[e];if(t)this.options[e]=t}}deactivateCallbacks(){for(let e of qr){let t=this.callbacks[e];if(t)this.options[e]=t}}emit(e){let t=this.currentFrame();if(!t){this.invoke(e);return}let n=this.outputFor(t).segments,r=n[n.length-1];if(Array.isArray(r))r.push(e);else n.push([e])}appendOutput(e,t){if(Va(t))e.segments.push(t)}outputFor(e){return e.output??=Xa()}flush(e){let t=[];for(let n=e.segments.length-1;n>=0;n--)t.push(e.segments[n]);while(t.length>0){let n=t.pop();if(Array.isArray(n)){for(let r of n)this.invoke(r);continue}for(let r=n.segments.length-1;r>=0;r--)t.push(n.segments[r])}}invoke(e){this.callbacks[e.name]?.apply(this.options,e.args)}currentFrame(){return this.frames[this.frames.length-1]}close(e){if(this.currentFrame()!==e||e.depth!==this.frames.length-1)throw Error("Parse effect scopes must be closed in order");if(this.frames.pop(),this.frames.length===0&&this.hasCallbacks)this.deactivateCallbacks()}restore(e){if(this.state)this.state.restore(e.checkpoint)}unwind(e){for(let t=this.undoLog.length-1;t>=e;t--){let n=this.undoLog[t];switch(n._tag){case"ArrayLength":if(n.target.length<n.length)throw Error("A parse effect shortened an append-only array");n.target.length=n.length;break;case"ArrayTail":n.target.length=n.start;for(let r of n.values)n.target.push(r);break;case"Property":if(n.had)n.target[n.key]=n.value;else delete n.target[n.key];break}}this.undoLog.length=e}};function Mt(e,t,n){if(e.length===t)return e;if(e.length<t)throw Error(`A parse branch shortened the ${n} below its checkpoint`);return e.length=t,e}function fu(e){return{lookahead:e.getCurLookaheadState(),context:e.context,contextLength:e.context.length,scopeStack:e.scopeStack,scopeStackLength:e.scopeStack.length,importsStack:e.importsStack,importsStackLength:e.importsStack.length,labels:e.labels,labelsLength:e.labels.length,privateNameStack:e.privateNameStack,privateNameStackLength:e.privateNameStack.length,decoratorStack:e.decoratorStack,decoratorStackLength:e.decoratorStack.length,strict:e.strict,potentialArrowAt:e.potentialArrowAt,potentialArrowInForAwait:e.potentialArrowInForAwait,yieldPos:e.yieldPos,awaitPos:e.awaitPos,awaitIdentPos:e.awaitIdentPos,preValue:e.preValue,preToken:e.preToken,isLookahead:e.isLookahead,isAmbientContext:e.isAmbientContext,inAbstractClass:e.inAbstractClass,inType:e.inType,inDisallowConditionalTypesContext:e.inDisallowConditionalTypesContext,maybeInArrowParameters:e.maybeInArrowParameters,shouldParseArrowReturnType:e.shouldParseArrowReturnType,shouldParseAsyncArrowReturnType:e.shouldParseAsyncArrowReturnType,importOrExportOuterKind:e.importOrExportOuterKind}}function hu(e,t){e.setLookaheadTokenState(t.lookahead),e.context=Mt(t.context,t.contextLength,"token context stack"),e.scopeStack=Mt(t.scopeStack,t.scopeStackLength,"scope stack"),e.importsStack=Mt(t.importsStack,t.importsStackLength,"import stack"),e.labels=Mt(t.labels,t.labelsLength,"label stack"),e.privateNameStack=Mt(t.privateNameStack,t.privateNameStackLength,"private-name stack"),e.decoratorStack=Mt(t.decoratorStack,t.decoratorStackLength,"decorator stack"),e.strict=t.strict,e.potentialArrowAt=t.potentialArrowAt,e.potentialArrowInForAwait=t.potentialArrowInForAwait,e.yieldPos=t.yieldPos,e.awaitPos=t.awaitPos,e.awaitIdentPos=t.awaitIdentPos,e.regexpState=null,e.preValue=t.preValue,e.preToken=t.preToken,e.isLookahead=t.isLookahead,e.isAmbientContext=t.isAmbientContext,e.inAbstractClass=t.inAbstractClass,e.inType=t.inType,e.inDisallowConditionalTypesContext=t.inDisallowConditionalTypesContext,e.maybeInArrowParameters=t.maybeInArrowParameters,e.shouldParseArrowReturnType=t.shouldParseArrowReturnType,e.shouldParseAsyncArrowReturnType=t.shouldParseAsyncArrowReturnType,e.importOrExportOuterKind=t.importOrExportOuterKind}function mu(e){return{capture:()=>fu(e),restore:(t)=>hu(e,t)}}function yu(e,t){let{acornTokenTypes:n,typeScriptTokenTypes:r,scope:i}=t,o=i.SCOPE_TOP|i.SCOPE_FUNCTION|i.SCOPE_CLASS_STATIC_BLOCK;return class extends e{constructor(p,l,h){super(p,l,h);this.parseEffects=new du(this.options,mu(this))}overrideContext(p){if(this.curContext()!==p)this.parseEffects?.willMutateTail(this.context,1);return super.overrideContext(p)}takeDecorators(p){let l=this.decoratorStack.length-1;if(this.decoratorStack[l].length>0)this.parseEffects?.willSet(this.decoratorStack,String(l));return super.takeDecorators(p)}parseDecorators(p){let l=this.decoratorStack[this.decoratorStack.length-1];return this.parseEffects?.willAppend(l),super.parseDecorators(p)}parseDecorator(){return this.parseEffects?.willAppend(this.decoratorStack),super.parseDecorator()}parseIdentNode(){if((this.type.keyword==="class"||this.type.keyword==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46))this.parseEffects?.willMutateTail(this.context,1);return super.parseIdentNode()}parseLabeledStatement(p,l,h,d){for(let g=this.labels.length-1;g>=0;g--){let b=this.labels[g];if(b.statementStart!==p.start)break;this.parseEffects?.willSet(b,"statementStart"),this.parseEffects?.willSet(b,"kind")}return this.parseEffects?.willAppend(this.labels),super.parseLabeledStatement(p,l,h,d)}enterClassBody(){return this.parseEffects?.willAppend(this.privateNameStack),super.enterClassBody()}exitClassBody(){let p=this.privateNameStack[this.privateNameStack.length-2];if(p)this.parseEffects?.willAppend(p.used);return this.parseEffects?.willMutateTail(this.privateNameStack,1),super.exitClassBody()}parsePrivateIdent(){if(this.options.checkPrivateFields&&this.privateNameStack.length>0){let p=this.privateNameStack[this.privateNameStack.length-1];this.parseEffects?.willAppend(p.used)}return super.parsePrivateIdent()}parseClassField(p){return this.parseEffects?.willSet(this.currentThisScope(),"inClassFieldInit"),super.parseClassField(p)}updateContext(p){let{type:l}=this;if(l===n.parenR||l===n.braceR||l===n.braceL||l===n.dollarBraceL||l===n.parenL||l===n._function||l===n._class||l===n.colon||l===n.backQuote||l===n.star||l===r.jsxTagStart||l===r.jsxTagEnd||l===n.slash&&p===r.jsxTagStart)this.parseEffects?.willMutateTail(this.context,2);return super.updateContext(p)}enterScope(p){return this.parseEffects?.willAppend(this.scopeStack),super.enterScope(p)}exitScope(){return this.parseEffects?.willMutateTail(this.scopeStack,1),super.exitScope()}declareName(p,l,h){let d=this.parseEffects;if(d?.active)if(l===i.BIND_LEXICAL){let g=this.currentScope();if(d.willAppend(g.lexical),this.inModule&&g.flags&i.SCOPE_TOP)d.willSet(this.undefinedExports,p)}else if(l===i.BIND_SIMPLE_CATCH)d.willAppend(this.currentScope().lexical);else if(l===i.BIND_FUNCTION)d.willAppend(this.currentScope().functions);else for(let g=this.scopeStack.length-1;g>=0;g--){let b=this.scopeStack[g];if(d.willAppend(b.var),this.inModule&&b.flags&i.SCOPE_TOP)d.willSet(this.undefinedExports,p);if(b.flags&o)break}return super.declareName(p,l,h)}checkLocalExport(p){return this.parseEffects?.willSet(this.undefinedExports,p.name),super.checkLocalExport(p)}}}var Ur=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;function $a(e){if(!e)throw Error("Assert fail")}function gu(e){return e==="accessor"}function xu(e){return e==="in"||e==="out"}var Bn=1,ja=2,bu=4,J={SCOPE_TOP:1,SCOPE_FUNCTION:2,SCOPE_ASYNC:4,SCOPE_GENERATOR:8,SCOPE_ARROW:16,SCOPE_SIMPLE_CATCH:32,SCOPE_SUPER:64,SCOPE_DIRECT_SUPER:128,SCOPE_CLASS_STATIC_BLOCK:256,SCOPE_VAR:256,BIND_NONE:0,BIND_VAR:1,BIND_LEXICAL:2,BIND_FUNCTION:3,BIND_SIMPLE_CATCH:4,BIND_OUTSIDE:5,BIND_TS_TYPE:6,BIND_TS_INTERFACE:7,BIND_TS_NAMESPACE:1032,BIND_FLAGS_TS_EXPORT_ONLY:1024,BIND_FLAGS_TS_IMPORT:4096,BIND_FLAGS_TS_ENUM:256,BIND_FLAGS_TS_CONST_ENUM:512,BIND_TS_ENUM:258,BIND_TS_CONST_ENUM:770,BIND_FLAGS_CLASS:128};function Gr(e,t){return J.SCOPE_FUNCTION|(e?J.SCOPE_ASYNC:0)|(t?J.SCOPE_GENERATOR:0)}function Tu(e){if(e.type!=="MemberExpression")return!1;let{computed:t,property:n}=e;if(t&&(n.type!=="TemplateLiteral"||n.expressions.length>0))return!1;return Ja(e.object)}function Eu(e){return e.type==="UnaryExpression"&&(e.operator==="-"||e.operator==="+")&&e.argument.type==="Literal"&&(typeof e.argument.value==="number"||typeof e.argument.value==="bigint")}function Ja(e){if(e.type==="Identifier")return!0;if(e.type!=="MemberExpression")return!1;if(e.computed)return!1;return Ja(e.object)}function Ha(e){return e==="private"||e==="public"||e==="protected"}function Su(e){return Boolean(e.startsExpr)}function Cu(e){if(e==null)throw Error(`Unexpected ${e} value.`);return e}function vu(e){switch(e){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}function Ya(e){let{dts:t=!1}=e||{},n=!!e?.jsx;return function(r){let i=r.acorn||Hr,o=Yl(i),{tokTypes:s,keywordTypes:p,isIdentifierStart:l,lineBreak:h,isNewLine:d,tokContexts:g,isIdentifierChar:b}=i,{tokTypes:E,tokContexts:w,keywordsRegExp:N,tokenIsLiteralPropertyName:D,tokenIsTemplate:q,tokenIsTSDeclarationStart:W,tokenIsIdentifier:P,tokenIsKeywordOrIdentifier:B,tokenIsTSTypeOperator:R}=o;function ae(a,c,u=a.length){for(let m=c;m<u;m++){let T=a.charCodeAt(m);if(d(T))return m<u-1&&T===13&&a.charCodeAt(m+1)===10?m+2:m+1}return-1}if(r=au(r,o,i),e?.jsx)r=pu(i,o,r,typeof e.jsx==="boolean"?{}:e.jsx);r=lu(r,o,i);let Q=yu(r,{acornTokenTypes:s,typeScriptTokenTypes:E,scope:J});class te extends Q{constructor(a,c,u){super(a,c,u);this.preValue=null,this.preToken=null,this.isLookahead=!1,this.isAmbientContext=!1,this.inAbstractClass=!1,this.inType=!1,this.inDisallowConditionalTypesContext=!1,this.maybeInArrowParameters=!1,this.shouldParseArrowReturnType=void 0,this.shouldParseAsyncArrowReturnType=void 0,this.decoratorStack=[[]],this.importsStack=[[]],this.importOrExportOuterKind=void 0,this.tsParseConstModifier=(m)=>{this.tsParseModifiers({modified:m,allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:L.InvalidModifierOnTypeParameterPositions})},this.ecmaVersion=this.options.ecmaVersion}static get acornTypeScript(){return o}get acornTypeScript(){return o}getTokenFromCodeInType(a){if(a===62)return this.finishOp(s.relational,1);if(a===60)return this.finishOp(s.relational,1);return super.getTokenFromCode(a)}readToken(a){if(!this.inType){let c=this.curContext();if(c===w.tc_expr)return this.jsx_readToken();if(c===w.tc_oTag||c===w.tc_cTag){if(l(a))return this.jsx_readWord();if(a==62)return++this.pos,this.finishToken(E.jsxTagEnd);if((a===34||a===39)&&c==w.tc_oTag)return this.jsx_readString(a)}if(a===60&&this.exprAllowed&&this.input.charCodeAt(this.pos+1)!==33)if(++this.pos,e?.jsx)return this.finishToken(E.jsxTagStart);else return this.finishToken(s.relational,"<")}return super.readToken(a)}getTokenFromCode(a){if(this.inType)return this.getTokenFromCodeInType(a);if(a===64)return++this.pos,this.finishToken(E.at);return super.getTokenFromCode(a)}isAbstractClass(){return this.ts_isContextual(E.abstract)&&this.lookahead().type===s._class}isDeclareClass(){if(!this.ts_isContextual(E.declare))return!1;let a=this.nextTokenStart();if(this.isUnparsedContextual(a,"class"))return!0;if(!this.isUnparsedContextual(a,"abstract"))return!1;let c=this.nextTokenStartSince(a+8);return this.isUnparsedContextual(c,"class")}finishNode(a,c){if(a.type!==""&&a.end!==0)return a;return super.finishNode(a,c)}tryParse(a){let c={},u=this.beginParseEffectScope(),m;try{m=a(()=>{throw c})}catch(T){let y=T===c;if(!y&&!(T instanceof SyntaxError))throw this.parseEffects.rollback(u),T;let x={events:this.parseEffects.rollbackWithEvents(u),selected:!1};return y?{node:null,error:null,thrown:!1,aborted:!0,failState:x}:{node:null,error:T,thrown:!0,aborted:!1,failState:x}}return this.parseEffects.commit(u),{node:m,error:null,thrown:!1,aborted:!1,failState:null}}setOptionalParametersError(a,c){a.optionalParametersLoc=c?.loc??this.startLoc}reScan_lt_gt(){if(this.type===s.relational)this.pos-=1,this.readToken_lt_gt(this.fullCharCodeAtPos())}reScan_lt(){let{type:a}=this;if(a===s.bitShift)return this.pos-=2,this.finishOp(s.relational,1),s.relational;return a}resetEndLocation(a,c=this.lastTokEnd,u=this.lastTokEndLoc){if(a.end=c,a.loc.end=u,this.options.ranges)a.range[1]=c}startNodeAtNode(a){return super.startNodeAt(a.start,a.loc.start)}nextTokenStart(){return this.nextTokenStartSince(this.pos)}tsHasSomeModifiers(a,c){return c.some((u)=>{if(Ha(u))return a.accessibility===u;return!!a[u]})}tsIsStartOfStaticBlocks(){return this.isContextual("static")&&this.lookaheadCharCode()===123}tsCheckForInvalidTypeCasts(a){a.forEach((c)=>{if(c?.type==="TSTypeCastExpression")this.raise(c.typeAnnotation.start,L.UnexpectedTypeAnnotation)})}atPossibleAsyncArrow(a){return a.type==="Identifier"&&a.name==="async"&&this.lastTokEnd===a.end&&!this.canInsertSemicolon()&&a.end-a.start===5&&a.start===this.potentialArrowAt}tsIsIdentifier(){return P(this.type)}tsTryParseTypeOrTypePredicateAnnotation(){return this.match(s.colon)?this.tsParseTypeOrTypePredicateAnnotation(s.colon):void 0}tsTryParseGenericAsyncArrowFunction(a,c,u){if(!this.tsMatchLeftRelational())return;let m=this.maybeInArrowParameters;this.maybeInArrowParameters=!0;let T=this.tsTryParseAndCatch(()=>{let y=this.startNodeAt(a,c);return y.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(y),y.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(s.arrow),y});if(this.maybeInArrowParameters=m,!T)return;return this.parseArrowExpression(T,T.params,!0,u)}tsParseTypeArgumentsInExpression(){if(this.reScan_lt()!==s.relational)return;return this.tsParseTypeArguments(!0)}tsInNoContext(a){let c=this.context;this.context=[c[0]];try{return a()}finally{this.context=c}}tsTryParseTypeAnnotation(){return this.match(s.colon)?this.tsParseTypeAnnotation():void 0}isUnparsedContextual(a,c){let u=a+c.length;if(this.input.slice(a,u)===c){let m=this.input.charCodeAt(u);return!(b(m)||(m&64512)===55296)}return!1}isAbstractConstructorSignature(){return this.ts_isContextual(E.abstract)&&this.lookahead().type===s._new}nextTokenStartSince(a){return Ur.lastIndex=a,Ur.test(this.input)?Ur.lastIndex:a}lookaheadCharCode(){return this.input.charCodeAt(this.nextTokenStart())}createLookaheadState(){this.value=null,this.context=[this.curContext()]}getCurLookaheadState(){return{endLoc:this.endLoc,lastTokEnd:this.lastTokEnd,lastTokStart:this.lastTokStart,lastTokStartLoc:this.lastTokStartLoc,pos:this.pos,value:this.value,type:this.type,exprAllowed:this.exprAllowed,start:this.start,end:this.end,context:this.context,startLoc:this.startLoc,lastTokEndLoc:this.lastTokEndLoc,curLine:this.curLine,lineStart:this.lineStart,containsEsc:this.containsEsc}}setLookaheadTokenState(a){this.pos=a.pos,this.value=a.value,this.exprAllowed=a.exprAllowed,this.endLoc=a.endLoc,this.lastTokEnd=a.lastTokEnd,this.lastTokStart=a.lastTokStart,this.lastTokStartLoc=a.lastTokStartLoc,this.type=a.type,this.start=a.start,this.end=a.end,this.startLoc=a.startLoc,this.lastTokEndLoc=a.lastTokEndLoc,this.curLine=a.curLine,this.lineStart=a.lineStart,this.containsEsc=a.containsEsc}setLookaheadState(a){this.setLookaheadTokenState(a),this.context=a.context&&a.context.slice()}beginParseEffectScope(){return this.parseEffects.begin()}selectTryParseResult(a){let c=a.failState;if(!c)return;if(c.selected)throw Error("A parse branch result can only be selected once");c.selected=!0,this.parseEffects.replay(c.events)}tsLookAhead(a){let c=this.beginParseEffectScope();try{return a()}finally{this.parseEffects.rollback(c)}}lookahead(a){let c=this.getCurLookaheadState(),u=this.context,m=this.preValue,T=this.preToken,y=this.isLookahead;try{if(this.createLookaheadState(),this.isLookahead=!0,a!==void 0)for(let x=0;x<a;x++)this.nextToken();else this.nextToken();return this.getCurLookaheadState()}finally{this.setLookaheadTokenState(c),this.context=u,this.preValue=m,this.preToken=T,this.isLookahead=y}}readWord(){let a=this.readWord1(),c=s.name;if(this.keywords.test(a))c=p[a];else if(new RegExp(N).test(a))c=E[a];return this.finishToken(c,a)}skipBlockComment(){let a;if(!this.isLookahead)a=this.options.onComment&&this.curPosition();let c=this.pos,u=this.input.indexOf("*/",this.pos+=2);if(u===-1)this.raise(this.pos-2,"Unterminated comment");if(this.pos=u+2,this.options.locations)for(let m,T=c;(m=ae(this.input,T,this.pos))>-1;)++this.curLine,T=this.lineStart=m;if(this.isLookahead)return;if(this.options.onComment)this.options.onComment(!0,this.input.slice(c+2,u),c,this.pos,a,this.curPosition())}skipLineComment(a){let c=this.pos,u;if(!this.isLookahead)u=this.options.onComment&&this.curPosition();let m=this.input.charCodeAt(this.pos+=a);while(this.pos<this.input.length&&!d(m))m=this.input.charCodeAt(++this.pos);if(this.isLookahead)return;if(this.options.onComment)this.options.onComment(!1,this.input.slice(c+a,this.pos),c,this.pos,u,this.curPosition())}finishToken(a,c){if(this.preValue=this.value,this.preToken=this.type,this.end=this.pos,this.options.locations)this.endLoc=this.curPosition();let u=this.type;if(this.type=a,this.value=c,!this.isLookahead)this.updateContext(u)}resetStartLocation(a,c,u){if(a.start=c,a.loc.start=u,this.options.ranges)a.range[0]=c}isLineTerminator(){return this.eat(s.semi)||super.canInsertSemicolon()}hasFollowingLineBreak(){return Oa.lastIndex=this.end,Oa.test(this.input)}addExtra(a,c,u,m=!0){if(!a)return;let T=a.extra=a.extra||{};if(m)T[c]=u;else Object.defineProperty(T,c,{enumerable:m,value:u})}isLiteralPropertyName(){return D(this.type)}hasPrecedingLineBreak(){return h.test(this.input.slice(this.lastTokEnd,this.start))}createIdentifier(a,c){return a.name=c,this.finishNode(a,"Identifier")}resetStartLocationFromNode(a,c){this.resetStartLocation(a,c.start,c.loc.start)}isThisParam(a){return a.type==="Identifier"&&a.name==="this"}isLookaheadContextual(a){let c=this.nextTokenStart();return this.isUnparsedContextual(c,a)}ts_type_isContextual(a,c){return a===c&&!this.containsEsc}ts_isContextual(a){return this.type===a&&!this.containsEsc}ts_isContextualWithState(a,c){return a.type===c&&!a.containsEsc}isContextualWithState(a,c){return c.type===s.name&&c.value===a&&!c.containsEsc}tsIsStartOfMappedType(){if(this.next(),this.eat(s.plusMin))return this.ts_isContextual(E.readonly);if(this.ts_isContextual(E.readonly))this.next();if(!this.match(s.bracketL))return!1;if(this.next(),!this.tsIsIdentifier())return!1;return this.next(),this.match(s._in)}tsInDisallowConditionalTypesContext(a){let c=this.inDisallowConditionalTypesContext;this.inDisallowConditionalTypesContext=!0;try{return a()}finally{this.inDisallowConditionalTypesContext=c}}tsTryParseType(){return this.tsEatThenParseType(s.colon)}match(a){return this.type===a}matchJsx(a){return this.type===o.tokTypes[a]}ts_eatWithState(a,c,u){let m=u.type;if(a===m){for(let T=0;T<c;T++)this.next();return!0}else return!1}ts_eatContextualWithState(a,c,u){if(N.test(a)){if(this.ts_isContextualWithState(u,E[a])){for(let m=0;m<c;m++)this.next();return!0}return!1}else{if(!this.isContextualWithState(a,u))return!1;for(let m=0;m<c;m++)this.next();return!0}}canHaveLeadingDecorator(){return this.match(s._class)||this.isAbstractClass()||this.isDeclareClass()}eatContextual(a){if(N.test(a)){if(this.ts_isContextual(E[a]))return this.next(),!0;return!1}else return super.eatContextual(a)}tsIsExternalModuleReference(){return this.isContextual("require")&&this.lookaheadCharCode()===40}tsParseExternalModuleReference(){let a=this.startNode();if(this.expectContextual("require"),this.expect(s.parenL),!this.match(s.string))this.unexpected();return a.expression=this.parseExprAtom(),this.expect(s.parenR),this.finishNode(a,"TSExternalModuleReference")}tsParseEntityName(a=!0){let c=this.parseIdent(a);while(this.eat(s.dot)){let u=this.startNodeAtNode(c);u.left=c,u.right=this.parseIdent(a),c=this.finishNode(u,"TSQualifiedName")}return c}tsParseEnumMember(){let a=this.startNode();if(a.id=this.match(s.string)?this.parseLiteral(this.value):this.parseIdent(!0),this.eat(s.eq))a.initializer=this.parseMaybeAssign();return this.finishNode(a,"TSEnumMember")}tsParseEnumDeclaration(a,c={}){if(c.const)a.const=!0;if(c.declare)a.declare=!0;this.expectContextual("enum"),a.id=this.parseIdent();let u=c.const?J.BIND_TS_CONST_ENUM:J.BIND_TS_ENUM;return this.checkLValSimple(a.id,u),this.expect(s.braceL),a.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(s.braceR),this.finishNode(a,"TSEnumDeclaration")}tsParseModuleBlock(){let a=this.startNode();this.enterScope(Ql),this.expect(s.braceL),a.body=[];while(this.type!==s.braceR){let c=this.parseStatement(null,!0);a.body.push(c)}return this.next(),super.exitScope(),this.finishNode(a,"TSModuleBlock")}tsParseAmbientExternalModuleDeclaration(a){if(this.ts_isContextual(E.global))a.global=!0,a.id=this.parseIdent();else if(this.match(s.string))a.id=this.parseLiteral(this.value);else this.unexpected();if(this.match(s.braceL))this.enterScope(rn),a.body=this.tsParseModuleBlock(),super.exitScope();else super.semicolon();return this.finishNode(a,"TSModuleDeclaration")}tsTryParseDeclare(a){if(this.isLineTerminator())return;let c=this.type,u;if(this.isContextual("let"))c=s._var,u="let";return this.tsInAmbientContext(()=>{if(c===s._function)return a.declare=!0,this.parseFunctionStatement(a,!1,!0);if(c===s._class)return a.declare=!0,this.parseClass(a,!0);if(c===E.enum)return this.tsParseEnumDeclaration(a,{declare:!0});if(c===E.global)return this.tsParseAmbientExternalModuleDeclaration(a);if(c===s._const||c===s._var){if(!this.match(s._const)||!this.isLookaheadContextual("enum"))return a.declare=!0,this.parseVarStatement(a,u||this.value,!0);return this.expect(s._const),this.tsParseEnumDeclaration(a,{const:!0,declare:!0})}if(c===E.interface){let m=this.tsParseInterfaceDeclaration(a,{declare:!0});if(m)return m}if(P(c))return this.tsParseDeclaration(a,this.value,!0)})}tsIsListTerminator(a){switch(a){case"EnumMembers":case"TypeMembers":return this.match(s.braceR);case"HeritageClauseElement":return this.match(s.braceL);case"TupleElementTypes":return this.match(s.bracketR);case"TypeParametersOrArguments":return this.tsMatchRightRelational()}}tsParseDelimitedListWorker(a,c,u,m){let T=[],y=-1;for(;;){if(this.tsIsListTerminator(a))break;y=-1;let x=c();if(x==null)return;if(T.push(x),this.eat(s.comma)){y=this.lastTokStart;continue}if(this.tsIsListTerminator(a))break;if(u)this.expect(s.comma);return}if(m)m.value=y;return T}tsParseDelimitedList(a,c,u){return Cu(this.tsParseDelimitedListWorker(a,c,!0,u))}tsParseBracketedList(a,c,u,m,T){if(!m)if(u)this.expect(s.bracketL);else this.expect(s.relational);let y=this.tsParseDelimitedList(a,c,T);if(u)this.expect(s.bracketR);else this.expect(s.relational);return y}tsParseTypeParameterName(){return this.parseIdent().name}tsEatThenParseType(a){return!this.match(a)?void 0:this.tsNextThenParseType()}tsExpectThenParseType(a){return this.tsDoThenParseType(()=>this.expect(a))}tsNextThenParseType(){return this.tsDoThenParseType(()=>this.next())}tsDoThenParseType(a){return this.tsInType(()=>(a(),this.tsParseType()))}tsSkipParameterStart(){if(P(this.type)||this.match(s._this))return this.next(),!0;if(this.match(s.braceL))try{return this.parseObj(!0),!0}catch{return!1}if(this.match(s.bracketL)){this.next();try{return this.parseBindingList(s.bracketR,!0,!0),!0}catch{return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){if(this.next(),this.match(s.parenR)||this.match(s.ellipsis))return!0;if(this.tsSkipParameterStart()){if(this.match(s.colon)||this.match(s.comma)||this.match(s.question)||this.match(s.eq))return!0;if(this.match(s.parenR)){if(this.next(),this.match(s.arrow))return!0}}return!1}tsIsStartOfFunctionType(){if(this.tsMatchLeftRelational())return!0;return this.match(s.parenL)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsInAllowConditionalTypesContext(a){let c=this.inDisallowConditionalTypesContext;this.inDisallowConditionalTypesContext=!1;try{return a()}finally{this.inDisallowConditionalTypesContext=c}}tsParseBindingListForSignature(){return super.parseBindingList(s.parenR,!0,!0).map((a)=>{if(a.type!=="Identifier"&&a.type!=="RestElement"&&a.type!=="ObjectPattern"&&a.type!=="ArrayPattern")this.raise(a.start,L.UnsupportedSignatureParameterKind({type:a.type}));return a})}tsParseTypePredicateAsserts(){if(this.type!==E.asserts)return!1;let a=this.containsEsc;if(this.next(),!P(this.type)&&!this.match(s._this))return!1;if(a)this.raise(this.lastTokStart,"Escape sequence in keyword asserts");return!0}tsParseThisTypeNode(){let a=this.startNode();return this.next(),this.finishNode(a,"TSThisType")}tsParseTypeAnnotation(a=!0,c=this.startNode()){return this.tsInType(()=>{if(a)this.expect(s.colon);c.typeAnnotation=this.tsParseType()}),this.finishNode(c,"TSTypeAnnotation")}tsParseThisTypePredicate(a){this.next();let c=this.startNodeAtNode(a);return c.parameterName=a,c.typeAnnotation=this.tsParseTypeAnnotation(!1),c.asserts=!1,this.finishNode(c,"TSTypePredicate")}tsParseThisTypeOrThisTypePredicate(){let a=this.tsParseThisTypeNode();if(this.isContextual("is")&&!this.hasPrecedingLineBreak())return this.tsParseThisTypePredicate(a);else return a}tsParseTypePredicatePrefix(){let a=this.parseIdent();if(this.isContextual("is")&&!this.hasPrecedingLineBreak())return this.next(),a}tsParseTypeOrTypePredicateAnnotation(a){return this.tsInType(()=>{let c=this.startNode();this.expect(a);let u=this.startNode(),m=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(m){let C=this.tsParseTypeAnnotation(!1);return u.parameterName=m,u.typeAnnotation=C,u.asserts=!1,c.typeAnnotation=this.finishNode(u,"TSTypePredicate"),this.finishNode(c,"TSTypeAnnotation")}let T=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(T&&this.match(s._this)){let C=this.tsParseThisTypeOrThisTypePredicate();if(C.type==="TSThisType")u.parameterName=C,u.asserts=!0,u.typeAnnotation=null,C=this.finishNode(u,"TSTypePredicate");else this.resetStartLocationFromNode(C,u),C.asserts=!0;return c.typeAnnotation=C,this.finishNode(c,"TSTypeAnnotation")}let y=T&&this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!y){if(!T)return this.tsParseTypeAnnotation(!1,c);return u.parameterName=this.parseIdent(),u.asserts=T,u.typeAnnotation=null,c.typeAnnotation=this.finishNode(u,"TSTypePredicate"),this.finishNode(c,"TSTypeAnnotation")}let x=this.tsParseTypeAnnotation(!1);return u.parameterName=y,u.typeAnnotation=x,u.asserts=T,c.typeAnnotation=this.finishNode(u,"TSTypePredicate"),this.finishNode(c,"TSTypeAnnotation")})}tsFillSignature(a,c){let u=a===s.arrow,m="parameters",T="typeAnnotation";if(c.typeParameters=this.tsTryParseTypeParameters(),this.expect(s.parenL),c.parameters=this.tsParseBindingListForSignature(),u)c.typeAnnotation=this.tsParseTypeOrTypePredicateAnnotation(a);else if(this.match(a))c.typeAnnotation=this.tsParseTypeOrTypePredicateAnnotation(a)}tsTryNextParseConstantContext(){if(this.lookahead().type!==s._const)return null;this.next();let a=this.tsParseTypeReference();if(a.typeParameters||a.typeArguments)this.raise(a.typeName.start,L.CannotFindName({name:"const"}));return a}tsParseFunctionOrConstructorType(a,c){let u=this.startNode();if(a==="TSConstructorType"){if(u.abstract=!!c,c)this.next();this.next()}return this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(s.arrow,u)),this.finishNode(u,a)}tsParseUnionOrIntersectionType(a,c,u){let m=this.startNode(),T=this.eat(u),y=[];do y.push(c());while(this.eat(u));if(y.length===1&&!T)return y[0];return m.types=y,this.finishNode(m,a)}tsCheckTypeAnnotationForReadOnly(a){switch(a.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(a.start,L.UnexpectedReadonly)}}tsParseTypeOperator(){let a=this.startNode(),c=this.value;if(this.next(),a.operator=c,a.typeAnnotation=this.tsParseTypeOperatorOrHigher(),c==="readonly")this.tsCheckTypeAnnotationForReadOnly(a);return this.finishNode(a,"TSTypeOperator")}tsParseConstraintForInferType(){if(this.eat(s._extends)){let a=this.tsInDisallowConditionalTypesContext(()=>this.tsParseType());if(this.inDisallowConditionalTypesContext||!this.match(s.question))return a}}tsParseInferType(){let a=this.startNode();this.expectContextual("infer");let c=this.startNode();return c.name=this.tsParseTypeParameterName(),c.constraint=this.tsTryParse(()=>this.tsParseConstraintForInferType()),a.typeParameter=this.finishNode(c,"TSTypeParameter"),this.finishNode(a,"TSInferType")}tsParseLiteralTypeNode(){let a=this.startNode();return a.literal=(()=>{switch(this.type){case s.num:case s.string:case s._true:case s._false:return this.parseExprAtom();default:this.unexpected()}})(),this.finishNode(a,"TSLiteralType")}tsParseImportType(){let a=this.startNode();if(this.expect(s._import),this.expect(s.parenL),!this.match(s.string))this.raise(this.start,L.UnsupportedImportTypeArgument);if(a.argument=this.parseExprAtom(),this.expect(s.parenR),this.eat(s.dot))a.qualifier=this.tsParseEntityName();if(this.tsMatchLeftRelational())a.typeArguments=this.tsParseTypeArguments();return this.finishNode(a,"TSImportType")}tsParseTypeQuery(){let a=this.startNode();if(this.expect(s._typeof),this.match(s._import))a.exprName=this.tsParseImportType();else a.exprName=this.tsParseEntityName();if(!this.hasPrecedingLineBreak()&&this.tsMatchLeftRelational())a.typeArguments=this.tsParseTypeArguments();return this.finishNode(a,"TSTypeQuery")}tsParseMappedTypeParameter(){let a=this.startNode();return a.name=this.tsParseTypeParameterName(),a.constraint=this.tsExpectThenParseType(s._in),this.finishNode(a,"TSTypeParameter")}tsParseMappedType(){let a=this.startNode();if(this.expect(s.braceL),this.match(s.plusMin))a.readonly=this.value,this.next(),this.expectContextual("readonly");else if(this.eatContextual("readonly"))a.readonly=!0;if(this.expect(s.bracketL),a.typeParameter=this.tsParseMappedTypeParameter(),a.nameType=this.eatContextual("as")?this.tsParseType():null,this.expect(s.bracketR),this.match(s.plusMin))a.optional=this.value,this.next(),this.expect(s.question);else if(this.eat(s.question))a.optional=!0;return a.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(s.braceR),this.finishNode(a,"TSMappedType")}tsParseTypeLiteral(){let a=this.startNode();return a.members=this.tsParseObjectTypeMembers(),this.finishNode(a,"TSTypeLiteral")}tsIsTupleElementLabel(){if(!B(this.type))return!1;let a=this.lookahead();if(a.type===s.colon)return!0;if(a.type!==s.question)return!1;return this.lookahead(2).type===s.colon}tsParseTupleElementType(){let a=this.startLoc,c=this.start,u=this.eat(s.ellipsis),m;if(this.tsIsTupleElementLabel()){let T=this.startNode();T.label=this.parseIdent(!0),T.optional=this.eat(s.question),this.expect(s.colon),T.elementType=this.tsParseType(),m=this.finishNode(T,"TSNamedTupleMember")}else{m=this.tsParseType();let T=this.eat(s.question);if(this.eat(s.colon))this.raise(m.start,L.InvalidTupleMemberLabel);if(T){let y=this.startNodeAtNode(m);y.typeAnnotation=m,m=this.finishNode(y,"TSOptionalType")}}if(u){let T=this.startNodeAt(c,a);T.typeAnnotation=m,m=this.finishNode(T,"TSRestType")}return m}tsParseTupleType(){let a=this.startNode();a.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let c=!1;return a.elementTypes.forEach((u)=>{let{type:m}=u;if(c&&m!=="TSRestType"&&m!=="TSOptionalType"&&!(m==="TSNamedTupleMember"&&u.optional))this.raise(u.start,L.OptionalTypeBeforeRequired);if(c||=m==="TSNamedTupleMember"&&u.optional||m==="TSOptionalType",m==="TSRestType")u=u.typeAnnotation}),this.finishNode(a,"TSTupleType")}tsParseTemplateLiteralType(){let a=this.startNode();return a.literal=this.parseTemplate({isTagged:!1}),this.finishNode(a,"TSLiteralType")}tsParseTypeReference(){let a=this.startNode();if(a.typeName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.tsMatchLeftRelational())a.typeArguments=this.tsParseTypeArguments();return this.finishNode(a,"TSTypeReference")}tsMatchLeftRelational(){return this.match(s.relational)&&this.value==="<"}tsMatchRightRelational(){return this.match(s.relational)&&this.value===">"}tsParseParenthesizedType(){let a=this.startNode();return this.expect(s.parenL),a.typeAnnotation=this.tsParseType(),this.expect(s.parenR),this.finishNode(a,"TSParenthesizedType")}tsParseNonArrayType(){switch(this.type){case s.string:case s.num:case s._true:case s._false:return this.tsParseLiteralTypeNode();case s.plusMin:if(this.value==="-"){let a=this.startNode();if(this.lookahead().type!==s.num)this.unexpected();return a.literal=this.parseMaybeUnary(),this.finishNode(a,"TSLiteralType")}break;case s._this:return this.tsParseThisTypeOrThisTypePredicate();case s._typeof:return this.tsParseTypeQuery();case s._import:return this.tsParseImportType();case s.braceL:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case s.bracketL:return this.tsParseTupleType();case s.parenL:return this.tsParseParenthesizedType();case s.backQuote:case s.dollarBraceL:return this.tsParseTemplateLiteralType();default:{let{type:a}=this;if(B(a)||a===s._void||a===s._null){let c=a===s._void?"TSVoidKeyword":a===s._null?"TSNullKeyword":vu(this.value);if(c!==void 0&&this.lookaheadCharCode()!==46){let u=this.startNode();return this.next(),this.finishNode(u,c)}return this.tsParseTypeReference()}}}this.unexpected()}tsParseArrayTypeOrHigher(){let a=this.tsParseNonArrayType();while(!this.hasPrecedingLineBreak()&&this.eat(s.bracketL))if(this.match(s.bracketR)){let c=this.startNodeAtNode(a);c.elementType=a,this.expect(s.bracketR),a=this.finishNode(c,"TSArrayType")}else{let c=this.startNodeAtNode(a);c.objectType=a,c.indexType=this.tsParseType(),this.expect(s.bracketR),a=this.finishNode(c,"TSIndexedAccessType")}return a}tsParseTypeOperatorOrHigher(){return R(this.type)&&!this.containsEsc?this.tsParseTypeOperator():this.isContextual("infer")?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),s.bitwiseAND)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),s.bitwiseOR)}tsParseNonConditionalType(){if(this.tsIsStartOfFunctionType())return this.tsParseFunctionOrConstructorType("TSFunctionType");if(this.match(s._new))return this.tsParseFunctionOrConstructorType("TSConstructorType");else if(this.isAbstractConstructorSignature())return this.tsParseFunctionOrConstructorType("TSConstructorType",!0);return this.tsParseUnionTypeOrHigher()}tsParseType(){$a(this.inType);let a=this.tsParseNonConditionalType();if(this.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(s._extends))return a;let c=this.startNodeAtNode(a);return c.checkType=a,c.extendsType=this.tsInDisallowConditionalTypesContext(()=>this.tsParseNonConditionalType()),this.expect(s.question),c.trueType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.expect(s.colon),c.falseType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.finishNode(c,"TSConditionalType")}tsIsUnambiguouslyIndexSignature(){if(this.next(),P(this.type))return this.next(),this.match(s.colon);return!1}tsInType(a){let c=this.inType;this.inType=!0;try{return a()}finally{this.inType=c}}tsTryParseIndexSignature(a){if(!(this.match(s.bracketL)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))))return;this.expect(s.bracketL);let c=this.parseIdent();c.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(c),this.expect(s.bracketR),a.parameters=[c];let u=this.tsTryParseTypeAnnotation();if(u)a.typeAnnotation=u;return this.tsParseTypeMemberSemicolon(),this.finishNode(a,"TSIndexSignature")}tsParseNoneModifiers(a){this.tsParseModifiers({modified:a,allowedModifiers:[],disallowedModifiers:["in","out"],errorTemplate:L.InvalidModifierOnTypeParameterPositions})}tsParseTypeParameter(a=this.tsParseNoneModifiers.bind(this)){let c=this.startNode();return a(c),c.name=this.tsParseTypeParameterName(),c.constraint=this.tsEatThenParseType(s._extends),c.default=this.tsEatThenParseType(s.eq),this.finishNode(c,"TSTypeParameter")}tsParseTypeParameters(a){let c=this.startNode();if(this.tsMatchLeftRelational()||this.matchJsx("jsxTagStart"))this.next();else this.unexpected();let u={value:-1};if(c.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,a),!1,!0,u),c.params.length===0)this.raise(this.start,L.EmptyTypeParameters);if(u.value!==-1)this.addExtra(c,"trailingComma",u.value);return this.finishNode(c,"TSTypeParameterDeclaration")}tsTryParseTypeParameters(a){if(this.tsMatchLeftRelational())return this.tsParseTypeParameters(a)}tsTryParse(a){let c=this.beginParseEffectScope(),u;try{u=a()}catch(m){throw this.parseEffects.rollback(c),m}if(u!==void 0&&u!==!1)return this.parseEffects.commit(c),u;this.parseEffects.rollback(c);return}tsTokenCanFollowModifier(){return(this.match(s.bracketL)||this.match(s.braceL)||this.match(s.star)||this.match(s.ellipsis)||this.match(s.privateId)||this.isLiteralPropertyName())&&!this.hasPrecedingLineBreak()}tsNextTokenCanFollowModifier(){return this.next(!0),this.tsTokenCanFollowModifier()}tsParseModifier(a,c){let u=this.value;if(a.indexOf(u)!==-1&&!this.containsEsc){if(c&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return u}return}tsParseModifiersByMap({modified:a,map:c}){for(let u of Object.keys(c))a[u]=c[u]}tsParseModifiers({modified:a,allowedModifiers:c,disallowedModifiers:u,stopOnStartOfClassStaticBlock:m,errorTemplate:T=L.InvalidModifierOnTypeMember}){let y={},x=(v,S,A,k)=>{if(S===A&&a[k])this.raise(v.column,L.InvalidModifiersOrder({orderedModifiers:[A,k]}))},C=(v,S,A,k)=>{if(a[A]&&S===k||a[k]&&S===A)this.raise(v.column,L.IncompatibleModifiers({modifiers:[A,k]}))};for(;;){let v=this.startLoc,S=this.tsParseModifier(c.concat(u??[]),m);if(!S)break;if(Ha(S))if(a.accessibility)this.raise(this.start,L.DuplicateAccessibilityModifier());else x(v,S,S,"override"),x(v,S,S,"static"),x(v,S,S,"readonly"),x(v,S,S,"accessor"),y.accessibility=S,a.accessibility=S;else if(xu(S))if(a[S])this.raise(this.start,L.DuplicateModifier({modifier:S}));else x(v,S,"in","out"),y[S]=S,a[S]=!0;else if(gu(S))if(a[S])this.raise(this.start,L.DuplicateModifier({modifier:S}));else C(v,S,"accessor","readonly"),C(v,S,"accessor","override"),y[S]=S,a[S]=!0;else if(S==="const")if(a[S])this.raise(this.start,L.DuplicateModifier({modifier:S}));else y[S]=S,a[S]=!0;else if(Object.hasOwnProperty.call(a,S))this.raise(this.start,L.DuplicateModifier({modifier:S}));else x(v,S,"static","readonly"),x(v,S,"static","override"),x(v,S,"override","readonly"),x(v,S,"abstract","override"),C(v,S,"declare","override"),C(v,S,"static","abstract"),y[S]=S,a[S]=!0;if(u?.includes(S))this.raise(this.start,T)}return y}tsParseInOutModifiers(a){this.tsParseModifiers({modified:a,allowedModifiers:["in","out"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:L.InvalidModifierOnTypeParameter})}tsParseClassTypeParameterModifiers(a){this.tsParseModifiers({modified:a,allowedModifiers:["const","in","out"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:L.InvalidModifierOnTypeParameter})}parseMaybeUnary(a,c,u,m){if(!e?.jsx&&this.tsMatchLeftRelational())return this.tsParseTypeAssertion();else return super.parseMaybeUnary(a,c,u,m)}tsParseTypeAssertion(){if(n)this.raise(this.start,L.ReservedTypeAssertion);let a=this.tryParse(()=>{let c=this.startNode(),u=this.tsTryNextParseConstantContext();return c.typeAnnotation=u||this.tsNextThenParseType(),this.expect(s.relational),c.expression=this.parseMaybeUnary(),this.finishNode(c,"TSTypeAssertion")});if(a.error)return this.tsParseTypeParameters(this.tsParseConstModifier);else return a.node}tsParseTypeArguments(a=!1){let c=this.startNode();if(c.params=this.tsInType(()=>this.tsInNoContext(()=>(this.expect(s.relational),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))),c.params.length===0)this.raise(this.start,L.EmptyTypeArguments);if(a&&this.curContext()!==w.tc_oTag)this.reScan_lt_gt();if(!this.tsMatchRightRelational())this.unexpected();return this.exprAllowed=!1,this.next(),this.finishNode(c,"TSTypeParameterInstantiation")}tsParseHeritageClause(a){let c=this.start,u=this.tsParseDelimitedList("HeritageClauseElement",()=>{let m=this.startNode();if(m.expression=this.tsParseEntityName(),this.tsMatchLeftRelational())m.typeParameters=this.tsParseTypeArguments();return this.finishNode(m,"TSExpressionWithTypeArguments")});if(!u.length)this.raise(c,L.EmptyHeritageClauseType({token:a}));return u}tsParseTypeMemberSemicolon(){if(!this.eat(s.comma)&&!this.isLineTerminator())this.expect(s.semi)}tsTryParseAndCatch(a){let c=this.tryParse((u)=>a()||u());if(c.aborted||!c.node)return;return c.node}tsParseSignatureMember(a,c){return this.tsFillSignature(s.colon,c),this.tsParseTypeMemberSemicolon(),this.finishNode(c,a)}tsParsePropertyOrMethodSignature(a,c){if(this.eat(s.question))a.optional=!0;let u=a;if(this.match(s.parenL)||this.tsMatchLeftRelational()){if(c)this.raise(a.start,L.ReadonlyForMethodSignature);let m=u;if(m.kind&&this.tsMatchLeftRelational())this.raise(this.start,L.AccesorCannotHaveTypeParameters);this.tsFillSignature(s.colon,m),this.tsParseTypeMemberSemicolon();let T="parameters",y="typeAnnotation";if(m.kind==="get"){if(m[T].length>0){if(this.raise(this.start,"A 'get' accesor must not have any formal parameters."),this.isThisParam(m[T][0]))this.raise(this.start,L.AccesorCannotDeclareThisParameter)}}else if(m.kind==="set"){if(m[T].length!==1)this.raise(this.start,"A 'get' accesor must not have any formal parameters.");else{let x=m[T][0];if(this.isThisParam(x))this.raise(this.start,L.AccesorCannotDeclareThisParameter);if(x.type==="Identifier"&&x.optional)this.raise(this.start,L.SetAccesorCannotHaveOptionalParameter);if(x.type==="RestElement")this.raise(this.start,L.SetAccesorCannotHaveRestParameter)}if(m[y])this.raise(m[y].start,L.SetAccesorCannotHaveReturnType)}else m.kind="method";return this.finishNode(m,"TSMethodSignature")}else{let m=u;if(c)m.readonly=!0;let T=this.tsTryParseTypeAnnotation();if(T)m.typeAnnotation=T;return this.tsParseTypeMemberSemicolon(),this.finishNode(m,"TSPropertySignature")}}tsParseTypeMember(){let a=this.startNode();if(this.match(s.parenL)||this.tsMatchLeftRelational())return this.tsParseSignatureMember("TSCallSignatureDeclaration",a);if(this.match(s._new)){let u=this.startNode();if(this.next(),this.match(s.parenL)||this.tsMatchLeftRelational())return this.tsParseSignatureMember("TSConstructSignatureDeclaration",a);else return a.key=this.createIdentifier(u,"new"),this.tsParsePropertyOrMethodSignature(a,!1)}this.tsParseModifiers({modified:a,allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]});let c=this.tsTryParseIndexSignature(a);if(c)return c;if(this.parsePropertyName(a),!a.computed&&a.key.type==="Identifier"&&(a.key.name==="get"||a.key.name==="set")&&this.tsTokenCanFollowModifier())a.kind=a.key.name,this.parsePropertyName(a);return this.tsParsePropertyOrMethodSignature(a,!!a.readonly)}tsParseList(a,c){let u=[];while(!this.tsIsListTerminator(a))u.push(c());return u}tsParseObjectTypeMembers(){this.expect(s.braceL);let a=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(s.braceR),a}tsParseInterfaceDeclaration(a,c={}){if(this.hasFollowingLineBreak())return null;if(this.expectContextual("interface"),c.declare)a.declare=!0;if(P(this.type)){a.id=this.parseIdent(),this.checkLValSimple(a.id,J.BIND_TS_INTERFACE);let m=this.currentScope();this.maybeExportDefined(m,a.id.name)}else a.id=null,this.raise(this.start,L.MissingInterfaceName);if(a.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers.bind(this)),this.eat(s._extends))a.extends=this.tsParseHeritageClause("extends");let u=this.startNode();return u.body=this.tsParseInterfaceBody(),a.body=this.finishNode(u,"TSInterfaceBody"),this.finishNode(a,"TSInterfaceDeclaration")}tsParseInterfaceBody(){this.expect(s.braceL);let a=this.inType;this.inType=!0;let c=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.inType=a,this.expect(s.braceR),c}tsParseAbstractDeclaration(a){if(this.match(s._class))return a.abstract=!0,this.parseClass(a,!0);else if(this.ts_isContextual(E.interface)){if(!this.hasFollowingLineBreak())return a.abstract=!0,this.tsParseInterfaceDeclaration(a)}else this.unexpected(a.start)}tsIsDeclarationStart(){return W(this.type)}tsParseExpressionStatement(a,c){switch(c.name){case"declare":{let u=this.tsTryParseDeclare(a);if(u)return u.declare=!0,u;break}case"global":if(this.match(s.braceL)){this.enterScope(rn);let u=a;return u.global=!0,u.id=c,u.body=this.tsParseModuleBlock(),super.exitScope(),this.finishNode(u,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(a,c.name,!1)}}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)}tsIsExportDefaultSpecifier(){let{type:a}=this,c=this.isAsyncFunction(),u=this.isLet();if(P(a)){if(c&&!this.containsEsc||u)return!1;if((a===E.type||a===E.interface)&&!this.containsEsc){let y=this.lookahead();if(P(y.type)&&!this.isContextualWithState("from",y)||y.type===s.braceL)return!1}}else if(!this.match(s._default))return!1;let m=this.nextTokenStart(),T=this.isUnparsedContextual(m,"from");if(this.input.charCodeAt(m)===44||P(this.type)&&T)return!0;if(this.match(s._default)&&T){let y=this.input.charCodeAt(this.nextTokenStartSince(m+4));return y===34||y===39}return!1}tsInAmbientContext(a){let c=this.isAmbientContext;this.isAmbientContext=!0;try{return a()}finally{this.isAmbientContext=c}}tsCheckLineTerminator(a){if(a){if(this.hasFollowingLineBreak())return!1;return this.next(),!0}return!this.isLineTerminator()}tsParseModuleOrNamespaceDeclaration(a,c=!1){if(a.id=this.parseIdent(),!c)this.checkLValSimple(a.id,J.BIND_TS_NAMESPACE);if(this.eat(s.dot)){let u=this.startNode();this.tsParseModuleOrNamespaceDeclaration(u,!0),a.body=u}else this.enterScope(rn),a.body=this.tsParseModuleBlock(),super.exitScope();return this.finishNode(a,"TSModuleDeclaration")}checkLValSimple(a,c=J.BIND_NONE,u){while(a.type==="TSNonNullExpression"||a.type==="TSAsExpression"||a.type==="TSSatisfiesExpression"||a.type==="TSTypeAssertion")a=a.expression;return super.checkLValSimple(a,c,u)}isSimpleAssignTarget(a){while(a.type==="TSNonNullExpression"||a.type==="TSAsExpression"||a.type==="TSSatisfiesExpression"||a.type==="TSTypeAssertion")a=a.expression;return super.isSimpleAssignTarget(a)}tsParseTypeAliasDeclaration(a){a.id=this.parseIdent(),this.checkLValSimple(a.id,J.BIND_TS_TYPE);let c=this.currentScope();return this.maybeExportDefined(c,a.id.name),a.typeAnnotation=this.tsInType(()=>{if(a.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers.bind(this)),this.expect(s.eq),this.ts_isContextual(E.interface)&&this.lookahead().type!==s.dot){let u=this.startNode();return this.next(),this.finishNode(u,"TSIntrinsicKeyword")}return this.tsParseType()}),this.semicolon(),this.finishNode(a,"TSTypeAliasDeclaration")}tsParseDeclaration(a,c,u){switch(c){case"abstract":if(this.tsCheckLineTerminator(u)&&(this.match(s._class)||P(this.type)))return this.tsParseAbstractDeclaration(a);break;case"module":if(this.tsCheckLineTerminator(u)){if(this.match(s.string))return this.tsParseAmbientExternalModuleDeclaration(a);else if(P(this.type))return this.tsParseModuleOrNamespaceDeclaration(a)}break;case"namespace":if(this.tsCheckLineTerminator(u)&&P(this.type))return this.tsParseModuleOrNamespaceDeclaration(a);break;case"type":if(this.tsCheckLineTerminator(u)&&P(this.type))return this.tsParseTypeAliasDeclaration(a);break}}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.value,!0)}tsParseImportEqualsDeclaration(a,c){a.isExport=c||!1,a.id=this.parseIdent(),this.checkLValSimple(a.id,J.BIND_LEXICAL),super.expect(s.eq);let u=this.tsParseModuleReference();if(a.importKind==="type"&&u.type!=="TSExternalModuleReference")this.raise(u.start,L.ImportAliasHasImportType);return a.moduleReference=u,super.semicolon(),this.finishNode(a,"TSImportEqualsDeclaration")}isExportDefaultSpecifier(){if(this.tsIsDeclarationStart())return!1;let{type:a}=this;if(P(a)){if(this.isContextual("async")||this.isContextual("let"))return!1;if((a===E.type||a===E.interface)&&!this.containsEsc){let m=this.lookahead();if(P(m.type)&&!this.isContextualWithState("from",m)||m.type===s.braceL)return!1}}else if(!this.match(s._default))return!1;let c=this.nextTokenStart(),u=this.isUnparsedContextual(c,"from");if(this.input.charCodeAt(c)===44||P(this.type)&&u)return!0;if(this.match(s._default)&&u){let m=this.input.charCodeAt(this.nextTokenStartSince(c+4));return m===34||m===39}return!1}parseTemplate({isTagged:a=!1}={}){let c=this.startNode();this.next(),c.expressions=[];let u=this.parseTemplateElement({isTagged:a});c.quasis=[u];while(!u.tail){if(this.type===s.eof)this.raise(this.pos,"Unterminated template literal");this.expect(s.dollarBraceL),c.expressions.push(this.inType?this.tsParseType():this.parseExpression()),this.expect(s.braceR),c.quasis.push(u=this.parseTemplateElement({isTagged:a}))}return this.next(),this.finishNode(c,"TemplateLiteral")}parseFunction(a,c,u,m,T){if(this.initFunction(a),this.ecmaVersion>=9||this.ecmaVersion>=6&&!m){if(this.type===s.star&&c&ja)this.unexpected();a.generator=this.eat(s.star)}if(this.ecmaVersion>=8)a.async=!!m;if(c&Bn)a.id=c&bu&&this.type!==s.name?null:this.parseIdent();let y=this.yieldPos,x=this.awaitPos,C=this.awaitIdentPos,v=this.maybeInArrowParameters;if(this.maybeInArrowParameters=!1,this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Gr(a.async,a.generator)),!(c&Bn))a.id=this.type===s.name?this.parseIdent():null;this.parseFunctionParams(a);let S=c&Bn;if(this.parseFunctionBody(a,u,!1,T,{isFunctionDeclaration:S}),S&&this.isAmbientContext&&a.id){if(this.currentScope().flags&J.SCOPE_TOP)this.declareName(a.id.name,J.BIND_FLAGS_TS_EXPORT_ONLY,a.id.start)}if(this.yieldPos=y,this.awaitPos=x,this.awaitIdentPos=C,c&Bn&&a.id&&!(c&ja))if(a.body)this.checkLValSimple(a.id,this.strict||a.generator||a.async?this.treatFunctionsAsVar?J.BIND_VAR:J.BIND_LEXICAL:J.BIND_FUNCTION);else this.checkLValSimple(a.id,J.BIND_NONE);return this.maybeInArrowParameters=v,this.finishNode(a,S?"FunctionDeclaration":"FunctionExpression")}parseFunctionBody(a,c=!1,u=!1,m=!1,T){if(this.match(s.colon))a.returnType=this.tsParseTypeOrTypePredicateAnnotation(s.colon);let y=T?.isFunctionDeclaration?"TSDeclareFunction":T?.isClassMethod?"TSDeclareMethod":void 0;if(y&&!this.match(s.braceL)&&this.isLineTerminator())return this.exitScope(),this.finishNode(a,y);if(y==="TSDeclareFunction"&&this.isAmbientContext){if(this.raise(a.start,L.DeclareFunctionHasImplementation),a.declare)return super.parseFunctionBody(a,c,u,!1),this.finishNode(a,y)}return super.parseFunctionBody(a,c,u,m),a}parseNew(){if(this.containsEsc)this.raiseRecoverable(this.start,"Escape sequence in keyword new");let a=this.startNode(),c=this.parseIdent(!0);if(this.ecmaVersion>=6&&this.eat(s.dot)){a.meta=c;let x=this.containsEsc;if(a.property=this.parseIdent(!0),a.property.name!=="target")this.raiseRecoverable(a.property.start,"The only valid meta property for new is 'new.target'");if(x)this.raiseRecoverable(a.start,"'new.target' must not contain escaped characters");if(!this.allowNewDotTarget)this.raiseRecoverable(a.start,"'new.target' can only be used in functions and class static block");return this.finishNode(a,"MetaProperty")}let u=this.start,m=this.startLoc,T=this.type===s._import;if(a.callee=this.parseSubscripts(this.parseExprAtom(),u,m,!0,!1),T&&a.callee.type==="ImportExpression")this.raise(u,"Cannot use new with import()");let{callee:y}=a;if(y.type==="TSInstantiationExpression"&&!y.extra?.parenthesized)a.typeArguments=y.typeArguments,a.callee=y.expression;if(this.eat(s.parenL))a.arguments=this.parseExprList(s.parenR,this.ecmaVersion>=8,!1);else a.arguments=[];return this.finishNode(a,"NewExpression")}parseExprOp(a,c,u,m,T){if(s._in.binop>m&&!this.hasPrecedingLineBreak()){let y;if(this.isContextual("as"))y="TSAsExpression";if(this.isContextual("satisfies"))y="TSSatisfiesExpression";if(y){let x=this.startNodeAt(c,u);x.expression=a;let C=this.tsTryNextParseConstantContext();if(C)x.typeAnnotation=C;else x.typeAnnotation=this.tsNextThenParseType();return this.finishNode(x,y),this.reScan_lt_gt(),this.parseExprOp(x,c,u,m,T)}}return super.parseExprOp(a,c,u,m,T)}parseImportSpecifiers(){let a=[],c=!0;if(o.tokenIsIdentifier(this.type)){if(a.push(this.parseImportDefaultSpecifier()),!this.eat(s.comma))return a}if(this.type===s.star)return a.push(this.parseImportNamespaceSpecifier()),a;this.expect(s.braceL);while(!this.eat(s.braceR)){if(!c){if(this.expect(s.comma),this.afterTrailingComma(s.braceR))break}else c=!1;a.push(this.parseImportSpecifier())}return a}parseImport(a){let c=this.lookahead();if(a.importKind="value",this.importOrExportOuterKind="value",P(c.type)||this.match(s.star)||this.match(s.braceL)){let u=this.lookahead(2);if(u.type!==s.comma&&!this.isContextualWithState("from",u)&&u.type!==s.eq&&this.ts_eatContextualWithState("type",1,c))this.importOrExportOuterKind="type",a.importKind="type",c=this.lookahead(),u=this.lookahead(2);if(P(c.type)&&u.type===s.eq){this.next();let m=this.tsParseImportEqualsDeclaration(a);return this.importOrExportOuterKind="value",m}}if(this.next(),this.type===s.string)a.specifiers=[],a.source=this.parseExprAtom();else a.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),a.source=this.type===s.string?this.parseExprAtom():this.unexpected();if(this.parseMaybeImportAttributes(a),this.semicolon(),this.finishNode(a,"ImportDeclaration"),this.importOrExportOuterKind="value",a.importKind==="type"&&a.specifiers.length>1&&a.specifiers[0].type==="ImportDefaultSpecifier")this.raise(a.start,L.TypeImportCannotSpecifyDefaultAndNamed);return a}parseExportDefaultDeclaration(){if(this.isAbstractClass()){let a=this.startNode();return this.next(),a.abstract=!0,this.parseClass(a,!0)}if(this.match(E.interface)){let a=this.tsParseInterfaceDeclaration(this.startNode());if(a)return a}return super.parseExportDefaultDeclaration()}parseExportAllDeclaration(a,c){if(this.ecmaVersion>=11)if(this.eatContextual("as"))a.exported=this.parseModuleExportName(),this.checkExport(c,a.exported,this.lastTokStart);else a.exported=null;if(this.expectContextual("from"),this.type!==s.string)this.unexpected();return a.source=this.parseExprAtom(),this.parseMaybeImportAttributes(a),this.semicolon(),this.finishNode(a,"ExportAllDeclaration")}parseDynamicImport(a){if(this.next(),a.source=this.parseMaybeAssign(),this.eat(s.comma)){let c=this.parseExpression();a.arguments=[c]}if(!this.eat(s.parenR)){let c=this.start;if(this.eat(s.comma)&&this.eat(s.parenR))this.raiseRecoverable(c,"Trailing comma is not allowed in import()");else this.unexpected(c)}return this.finishNode(a,"ImportExpression")}parseExport(a,c){let u=this.lookahead();if(this.ts_eatWithState(s._import,2,u)){if(this.ts_isContextual(E.type)&&this.lookaheadCharCode()!==61)a.importKind="type",this.importOrExportOuterKind="type",this.next();else a.importKind="value",this.importOrExportOuterKind="value";let m=this.tsParseImportEqualsDeclaration(a,!0);return this.importOrExportOuterKind=void 0,m}else if(this.ts_eatWithState(s.eq,2,u)){let m=a;return m.expression=this.parseExpression(),this.semicolon(),this.importOrExportOuterKind=void 0,this.finishNode(m,"TSExportAssignment")}else if(this.ts_eatContextualWithState("as",2,u)){let m=a;return this.expectContextual("namespace"),m.id=this.parseIdent(),this.semicolon(),this.importOrExportOuterKind=void 0,this.finishNode(m,"TSNamespaceExportDeclaration")}else{let m=this.lookahead(2).type;if(this.ts_isContextualWithState(u,E.type)&&(m===s.braceL||m===s.star))this.next(),this.importOrExportOuterKind="type",a.exportKind="type";else this.importOrExportOuterKind="value",a.exportKind="value";if(this.next(),this.eat(s.star))return this.parseExportAllDeclaration(a,c);if(this.eat(s._default))return this.checkExport(c,"default",this.lastTokStart),a.declaration=this.parseExportDefaultDeclaration(),this.finishNode(a,"ExportDefaultDeclaration");if(this.shouldParseExportStatement()){if(a.declaration=this.parseExportDeclaration(a),a.declaration.type==="VariableDeclaration")this.checkVariableExport(c,a.declaration.declarations);else this.checkExport(c,a.declaration.id,a.declaration.id.start);a.specifiers=[],a.source=null}else{if(a.declaration=null,a.specifiers=this.parseExportSpecifiers(c),this.eatContextual("from")){if(this.type!==s.string)this.unexpected();a.source=this.parseExprAtom(),this.parseMaybeImportAttributes(a)}else{for(let T of a.specifiers)if(this.checkUnreserved(T.local),this.checkLocalExport(T.local),T.local.type==="Literal")this.raise(T.local.start,"A string literal cannot be used as an exported binding without `from`.");a.source=null}this.semicolon()}return this.finishNode(a,"ExportNamedDeclaration")}}checkExport(a,c,u){if(!a)return;if(typeof c!=="string")c=c.type==="Identifier"?c.name:c.value;a[c]=!0}parseMaybeDefault(a,c,u){let m=super.parseMaybeDefault(a,c,u);if(m.type==="AssignmentPattern"&&m.typeAnnotation&&m.right.start<m.typeAnnotation.start)this.raise(m.typeAnnotation.start,L.TypeAnnotationAfterAssign);return m}typeCastToParameter(a){return a.expression.typeAnnotation=a.typeAnnotation,this.resetEndLocation(a.expression,a.typeAnnotation.end,a.typeAnnotation.loc?.end),a.expression}toAssignableList(a,c){if(!a)a=[];for(let u=0;u<a.length;u++){let m=a[u];if(m?.type==="TSTypeCastExpression")a[u]=this.typeCastToParameter(m)}return super.toAssignableList(a,c)}reportReservedArrowTypeParam(a){if(a.params.length===1&&!a.extra?.trailingComma&&n)this.raise(a.start,L.ReservedArrowTypeParam)}parseExprAtom(a,c,u){if(this.type===E.jsxText)return this.jsx_parseText();else if(this.type===E.jsxTagStart)return this.jsx_parseElement();else if(this.type===E.at)return this.parseDecorators(),this.parseExprAtom();else if(P(this.type)){let m=this.potentialArrowAt===this.start,T=this.start,y=this.startLoc,x=this.containsEsc,C=this.parseIdent(!1);if(this.ecmaVersion>=8&&!x&&C.name==="async"&&!this.canInsertSemicolon()&&this.eat(s._function))return this.overrideContext(g.f_expr),this.parseFunction(this.startNodeAt(T,y),0,!1,!0,c);if(m&&!this.canInsertSemicolon()){if(this.eat(s.arrow))return this.parseArrowExpression(this.startNodeAt(T,y),[C],!1,c);if(this.ecmaVersion>=8&&C.name==="async"&&this.type===s.name&&!x&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc)){if(C=this.parseIdent(!1),this.canInsertSemicolon()||!this.eat(s.arrow))this.unexpected();return this.parseArrowExpression(this.startNodeAt(T,y),[C],!0,c)}}return C}else return super.parseExprAtom(a,c,u)}parseExprAtomDefault(){if(P(this.type)){let a=this.potentialArrowAt===this.start,c=this.containsEsc,u=this.parseIdent();if(!c&&u.name==="async"&&!this.canInsertSemicolon()){let{type:m}=this;if(m===s._function)return this.next(),this.parseFunction(this.startNodeAtNode(u),void 0,!0,!0);else if(P(m))if(this.lookaheadCharCode()===61){let T=this.parseIdent(!1);if(this.canInsertSemicolon()||!this.eat(s.arrow))this.unexpected();return this.parseArrowExpression(this.startNodeAtNode(u),[T],!0)}else return u}if(a&&this.match(s.arrow)&&!this.canInsertSemicolon())return this.next(),this.parseArrowExpression(this.startNodeAtNode(u),[u],!1);return u}else this.unexpected()}parseIdentNode(){let a=this.startNode();if(B(this.type)&&!((this.type.keyword==="class"||this.type.keyword==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46)))a.name=this.value;else return super.parseIdentNode();return a}parseVarStatement(a,c,u=!1){let{isAmbientContext:m}=this;this.next(),super.parseVar(a,!1,c,u||m),this.semicolon();let T=this.finishNode(a,"VariableDeclaration");if(!m)return T;for(let{id:y,init:x}of T.declarations){if(!x)continue;if(c!=="const"||!!y.typeAnnotation)this.raise(x.start,L.InitializerNotAllowedInAmbientContext);else if(x.type!=="Literal"&&(x.type!=="TemplateLiteral"||x.expressions.length>0)&&!Eu(x)&&!Tu(x))this.raise(x.start,L.ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference)}return T}parseStatement(a,c,u){if(this.match(E.at))this.parseDecorators(!0);if(this.match(s._const)&&this.isLookaheadContextual("enum")){let m=this.startNode();return this.expect(s._const),this.tsParseEnumDeclaration(m,{const:!0})}if(this.ts_isContextual(E.enum))return this.tsParseEnumDeclaration(this.startNode());if(this.ts_isContextual(E.interface)){let m=this.tsParseInterfaceDeclaration(this.startNode());if(m)return m}return super.parseStatement(a,c,u)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}parsePostMemberNameModifiers(a){if(this.eat(s.question))a.optional=!0;if(a.readonly&&this.match(s.parenL))this.raise(a.start,L.ClassMethodHasReadonly);if(a.declare&&this.match(s.parenL))this.raise(a.start,L.ClassMethodHasDeclare)}parseExpressionStatement(a,c){return(c.type==="Identifier"?this.tsParseExpressionStatement(a,c):void 0)||super.parseExpressionStatement(a,c)}shouldParseExportStatement(){if(this.tsIsDeclarationStart())return!0;if(this.match(E.at))return!0;return super.shouldParseExportStatement()}parseConditional(a,c,u,m,T){if(this.eat(s.question)){let y=this.startNodeAt(c,u);return y.test=a,y.consequent=this.parseMaybeAssign(),this.expect(s.colon),y.alternate=this.parseMaybeAssign(m),this.finishNode(y,"ConditionalExpression")}return a}parseMaybeConditional(a,c){let u=this.start,m=this.startLoc,T=this.parseExprOps(a,c);if(this.checkExpressionErrors(c))return T;if(!this.maybeInArrowParameters||!this.match(s.question))return this.parseConditional(T,u,m,a,c);let y=this.tryParse(()=>this.parseConditional(T,u,m,a,c));if(!y.node){if(y.error)this.setOptionalParametersError(c,y.error);return T}return y.node}parseParenItem(a){let c=this.start,u=this.startLoc;if(a=super.parseParenItem(a),this.eat(s.question))a.optional=!0,this.resetEndLocation(a);if(this.match(s.colon)){let m=this.startNodeAt(c,u);return m.expression=a,m.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(m,"TSTypeCastExpression")}return a}parseExportDeclaration(a){if(!this.isAmbientContext&&this.ts_isContextual(E.declare))return this.tsInAmbientContext(()=>this.parseExportDeclaration(a));let c=this.start,u=this.startLoc,m=this.eatContextual("declare");if(m&&(this.ts_isContextual(E.declare)||!this.shouldParseExportStatement()))this.raise(this.start,L.ExpectedAmbientAfterExportDeclare);let y=P(this.type)&&this.tsTryParseExportDeclaration()||this.parseStatement(null);if(!y)return null;if(y.type==="TSInterfaceDeclaration"||y.type==="TSTypeAliasDeclaration"||m)a.exportKind="type";if(m)this.resetStartLocation(y,c,u),y.declare=!0;return y}parseClassId(a,c){if(!c&&this.isContextual("implements"))return;super.parseClassId(a,c);let u=this.tsTryParseTypeParameters(this.tsParseClassTypeParameterModifiers.bind(this));if(u)a.typeParameters=u}parseClassPropertyAnnotation(a){if(!a.optional){if(this.value==="!"&&this.eat(s.prefix))a.definite=!0;else if(this.eat(s.question))a.optional=!0}let c=this.tsTryParseTypeAnnotation();if(c)a.typeAnnotation=c}parseClassField(a){if(a.key.type==="PrivateIdentifier"){if(a.abstract)this.raise(a.start,L.PrivateElementHasAbstract);if(a.accessibility)this.raise(a.start,L.PrivateElementHasAccessibility({modifier:a.accessibility}));this.parseClassPropertyAnnotation(a)}else{if(this.parseClassPropertyAnnotation(a),this.isAmbientContext&&!(a.readonly&&!a.typeAnnotation)&&this.match(s.eq))this.raise(this.start,L.DeclareClassFieldHasInitializer);if(a.abstract&&this.match(s.eq)){let{key:u}=a;this.raise(this.start,L.AbstractPropertyHasInitializer({propertyName:u.type==="Identifier"&&!a.computed?u.name:`[${this.input.slice(u.start,u.end)}]`}))}}return super.parseClassField(a)}parseClassMethod(a,c,u,m){let T=a.kind==="constructor",y=a.key.type==="PrivateIdentifier",x=this.tsTryParseTypeParameters(this.tsParseConstModifier);if(y){if(x)a.typeParameters=x;if(a.accessibility)this.raise(a.start,L.PrivateMethodsHasAccessibility({modifier:a.accessibility}))}else if(x&&T)this.raise(x.start,L.ConstructorHasTypeParameters);let{declare:C=!1,kind:v}=a;if(C&&(v==="get"||v==="set"))this.raise(a.start,L.DeclareAccessor({kind:v}));if(x)a.typeParameters=x;let S=a.key;if(a.kind==="constructor"){if(c)this.raise(S.start,"Constructor can't be a generator");if(u)this.raise(S.start,"Constructor can't be an async method")}else if(a.static&&Ba(a,"prototype"))this.raise(S.start,"Classes may not have a static property named prototype");let A=a.value=this.parseMethod(c,u,m,!0,a);if(a.kind==="get"&&A.params.length!==0)this.raiseRecoverable(A.start,"getter should have no params");if(a.kind==="set"&&A.params.length!==1)this.raiseRecoverable(A.start,"setter should have exactly one param");if(a.kind==="set"&&A.params[0].type==="RestElement")this.raiseRecoverable(A.params[0].start,"Setter cannot use rest params");return this.finishNode(a,"MethodDefinition")}isClassMethod(){return this.match(s.relational)}parseClassElement(a){if(this.eat(s.semi))return null;let c=this.startNode(),u="",m=!1,T=!1,y="method",x=!1,C=["declare","private","public","protected","accessor","override","abstract","readonly","static"],v=this.tsParseModifiers({modified:c,allowedModifiers:C,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:L.InvalidModifierOnTypeParameterPositions});x=Boolean(v.static);let S=()=>{if(this.tsIsStartOfStaticBlocks()){if(this.next(),this.next(),this.tsHasSomeModifiers(c,C))this.raise(this.start,L.StaticBlockCannotHaveModifier);if(this.ecmaVersion>=13)return super.parseClassStaticBlock(c),c}else{let A=this.tsTryParseIndexSignature(c);if(A){if(c.abstract)this.raise(c.start,L.IndexSignatureHasAbstract);if(c.accessibility)this.raise(c.start,L.IndexSignatureHasAccessibility({modifier:c.accessibility}));if(c.declare)this.raise(c.start,L.IndexSignatureHasDeclare);if(c.override)this.raise(c.start,L.IndexSignatureHasOverride);return A}if(!this.inAbstractClass&&c.abstract)this.raise(c.start,L.NonAbstractClassHasAbstractMethod);if(c.override){if(!a)this.raise(c.start,L.OverrideNotInSubClass)}if(c.static=x,x){if(!(this.isClassElementNameStart()||this.type===s.star))u="static"}if(!u&&this.ecmaVersion>=8&&this.eatContextual("async"))if((this.isClassElementNameStart()||this.type===s.star)&&!this.canInsertSemicolon())T=!0;else u="async";if(!u&&(this.ecmaVersion>=9||!T)&&this.eat(s.star))m=!0;if(!u&&!T&&!m){let k=this.value;if(this.eatContextual("get")||this.eatContextual("set"))if(this.isClassElementNameStart())y=k;else u=k}if(u)c.computed=!1,c.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),c.key.name=u,this.finishNode(c.key,"Identifier");else this.parseClassElementName(c);if(this.parsePostMemberNameModifiers(c),this.isClassMethod()||this.ecmaVersion<13||this.type===s.parenL||y!=="method"||m||T){let k=!c.static&&Ba(c,"constructor"),_=k&&a;if(k&&y!=="method")this.raise(c.key.start,"Constructor can't have get/set modifier");c.kind=k?"constructor":y,this.parseClassMethod(c,m,T,_)}else this.parseClassField(c);return c}};if(c.declare)this.tsInAmbientContext(S);else S();return c}isClassElementNameStart(){if(this.tsIsIdentifier())return!0;return super.isClassElementNameStart()}parseClassSuper(a){if(super.parseClassSuper(a),a.superClass&&(this.tsMatchLeftRelational()||this.match(s.bitShift)))a.superTypeParameters=this.tsParseTypeArgumentsInExpression();if(this.eatContextual("implements"))a.implements=this.tsParseHeritageClause("implements")}parseFunctionParams(a){let c=this.tsTryParseTypeParameters(this.tsParseConstModifier);if(c)a.typeParameters=c;super.parseFunctionParams(a)}parseVarId(a,c){if(super.parseVarId(a,c),a.id.type==="Identifier"&&!this.hasPrecedingLineBreak()&&this.value==="!"&&this.eat(s.prefix))a.definite=!0;let u=this.tsTryParseTypeAnnotation();if(u)a.id.typeAnnotation=u,this.resetEndLocation(a.id)}parseArrowExpression(a,c,u,m){if(this.match(s.colon))a.returnType=this.tsParseTypeAnnotation();let T=this.yieldPos,y=this.awaitPos,x=this.awaitIdentPos;this.enterScope(Gr(u,!1)|J.SCOPE_ARROW),this.initFunction(a);let C=this.maybeInArrowParameters;if(this.ecmaVersion>=8)a.async=!!u;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.maybeInArrowParameters=!0,a.params=this.toAssignableList(c,!0),this.maybeInArrowParameters=!1,this.parseFunctionBody(a,!0,!1,m),this.yieldPos=T,this.awaitPos=y,this.awaitIdentPos=x,this.maybeInArrowParameters=C,this.finishNode(a,"ArrowFunctionExpression")}parseYield(a){if(!this.yieldPos)this.yieldPos=this.start;let c=this.startNode();this.next();let u=this.tsMatchLeftRelational();if(!(!this.match(s.semi)&&!this.canInsertSemicolon()&&(this.match(s.star)||this.type.startsExpr||u)))return c.delegate=!1,c.argument=null,this.finishNode(c,"YieldExpression");return c.delegate=this.eat(s.star),c.argument=this.parseMaybeAssign(a),this.finishNode(c,"YieldExpression")}parseMaybeAssignOrigin(a,c,u){if(this.isContextual("yield"))if(this.inGenerator)return this.parseYield(a);else this.exprAllowed=!1;let m=!1,T=-1,y=-1,x=-1;if(c)T=c.parenthesizedAssign,y=c.trailingComma,x=c.doubleProto,c.parenthesizedAssign=c.trailingComma=-1;else c=new sn,m=!0;let C=this.start,v=this.startLoc;if(this.type===s.parenL||P(this.type))this.potentialArrowAt=this.start,this.potentialArrowInForAwait=a==="await";let S=this.parseMaybeConditional(a,c);if(u)S=u.call(this,S,C,v);if(this.type.isAssign){let A=this.startNodeAt(C,v);if(A.operator=this.value,this.type===s.eq)S=this.toAssignable(S,!0,c,!0);if(!m)c.parenthesizedAssign=c.trailingComma=c.doubleProto=-1;if(c.shorthandAssign>=S.start)c.shorthandAssign=-1;if(!this.maybeInArrowParameters)if(this.type===s.eq)this.checkLValPattern(S);else this.checkLValSimple(S);if(A.left=S,this.next(),A.right=this.parseMaybeAssign(a),x>-1)c.doubleProto=x;return this.finishNode(A,"AssignmentExpression")}else if(m)this.checkExpressionErrors(c,!0);if(T>-1)c.parenthesizedAssign=T;if(y>-1)c.trailingComma=y;return S}parseMaybeAssign(a,c,u){let m,T;if(e?.jsx&&(this.matchJsx("jsxTagStart")||this.tsMatchLeftRelational())){if(m=this.tryParse(()=>this.parseMaybeAssignOrigin(a,c,u)),!m.error)return m.node;let C=this.context,v=C[C.length-1],S=C[C.length-2];if(v===o.tokContexts.tc_oTag&&S===o.tokContexts.tc_expr)this.parseEffects.pop(C),this.parseEffects.pop(C);else if(v===o.tokContexts.tc_oTag||v===o.tokContexts.tc_expr)this.parseEffects.pop(C)}if(!m?.error&&!this.tsMatchLeftRelational())return this.parseMaybeAssignOrigin(a,c,u);let y,x=this.tryParse((C)=>{y=this.tsParseTypeParameters(this.tsParseConstModifier);let v=this.parseMaybeAssignOrigin(a,c,u);if(v.type!=="ArrowFunctionExpression"||v.extra?.parenthesized)C();if(y?.params.length!==0)this.resetStartLocationFromNode(v,y);return v.typeParameters=y,v});if(!x.error&&!x.aborted){if(y)this.reportReservedArrowTypeParam(y);return x.node}if(!m){if($a(!0),T=this.tryParse(()=>this.parseMaybeAssignOrigin(a,c,u)),!T.error)return T.node}if(m?.thrown)throw this.selectTryParseResult(m),m.error;if(x.thrown)throw this.selectTryParseResult(x),x.error;if(T?.thrown)throw this.selectTryParseResult(T),T.error;throw m?.error||x.error||T?.error}parseAssignableListItem(a){let c=[];while(this.match(E.at))c.push(this.parseDecorator());let u=this.start,m=this.startLoc,T,y=!1,x=!1;if(a!==void 0){let S={};if(this.tsParseModifiers({modified:S,allowedModifiers:["public","private","protected","override","readonly"]}),T=S.accessibility,x=S.override,y=S.readonly,a===!1&&(T||y||x))this.raise(m.column,L.UnexpectedParameterModifier)}let C=this.parseMaybeDefault(u,m);this.parseBindingListItem(C);let v=this.parseMaybeDefault(C.start,C.loc.start,C);if(c.length)v.decorators=c;if(T||y||x){let S=this.startNodeAt(u,m);if(T)S.accessibility=T;if(y)S.readonly=y;if(x)S.override=x;if(v.type!=="Identifier"&&v.type!=="AssignmentPattern")this.raise(S.start,L.UnsupportedParameterPropertyKind);return S.parameter=v,this.finishNode(S,"TSParameterProperty")}return v}checkLValInnerPattern(a,c=J.BIND_NONE,u){switch(a.type){case"TSParameterProperty":this.checkLValInnerPattern(a.parameter,c,u);break;default:{super.checkLValInnerPattern(a,c,u);break}}}parseBindingListItem(a){if(this.eat(s.question)){if(a.type!=="Identifier"&&!this.isAmbientContext&&!this.inType)this.raise(a.start,L.PatternIsOptional);a.optional=!0}let c=this.tsTryParseTypeAnnotation();if(c)a.typeAnnotation=c;return this.resetEndLocation(a),a}isAssignable(a,c){switch(a.type){case"TSTypeCastExpression":return this.isAssignable(a.expression,c);case"TSParameterProperty":return!0;case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":return!0;case"ObjectExpression":{let u=a.properties.length-1;return a.properties.every((m,T)=>m.type!=="ObjectMethod"&&(T===u||m.type!=="SpreadElement")&&this.isAssignable(m))}case"Property":case"ObjectProperty":return this.isAssignable(a.value);case"SpreadElement":return this.isAssignable(a.argument);case"ArrayExpression":return a.elements.every((u)=>u===null||this.isAssignable(u));case"AssignmentExpression":return a.operator==="=";case"ParenthesizedExpression":return this.isAssignable(a.expression);case"MemberExpression":case"OptionalMemberExpression":return!c;default:return!1}}toAssignable(a,c=!1,u=new sn,m=!1){switch(a.type){case"ParenthesizedExpression":return this.toAssignableParenthesizedExpression(a,c,u,m);case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":if(c);else this.raise(a.start,L.UnexpectedTypeCastInParameter);let T=this.toAssignable(a.expression,c,u,m);if(m)return a.expression=T,a;return T;case"MemberExpression":break;case"AssignmentExpression":if(!c&&a.left.type==="TSTypeCastExpression")a.left=this.typeCastToParameter(a.left);return super.toAssignable(a,c,u);case"TSTypeCastExpression":return this.typeCastToParameter(a);default:return super.toAssignable(a,c,u)}return a}toAssignableParenthesizedExpression(a,c,u,m=!1){switch(a.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":let T=this.toAssignable(a.expression,c,u,m);if(m)return a.expression=T,a;return T;default:return super.toAssignable(a,c,u)}}parseBindingAtom(){switch(this.type){case s._this:return this.parseIdent(!0);default:return super.parseBindingAtom()}}shouldParseArrow(a){let c;if(this.match(s.colon))c=a.every((u)=>this.isAssignable(u,!0));else c=!this.canInsertSemicolon();if(c){if(this.match(s.colon)){let u=this.tryParse((m)=>{let T=this.tsParseTypeOrTypePredicateAnnotation(s.colon);if(this.canInsertSemicolon()||!this.match(s.arrow))m();return T});if(u.aborted)return this.shouldParseArrowReturnType=void 0,!1;if(!u.thrown)this.shouldParseArrowReturnType=u.node}if(!this.match(s.arrow))return this.shouldParseArrowReturnType=void 0,!1;return!0}return this.shouldParseArrowReturnType=void 0,c}parseParenArrowList(a,c,u,m){let T=this.startNodeAt(a,c);return T.returnType=this.shouldParseArrowReturnType,this.shouldParseArrowReturnType=void 0,this.parseArrowExpression(T,u,!1,m)}parseParenAndDistinguishExpression(a,c){let u=this.start,m=this.startLoc,T,y=this.ecmaVersion>=8;if(this.ecmaVersion>=6){let x=this.maybeInArrowParameters;this.maybeInArrowParameters=!0,this.next();let C=this.start,v=this.startLoc,S=[],A=!0,k=!1,_=new sn,j=this.yieldPos,F=this.awaitPos,G;this.yieldPos=0,this.awaitPos=0;while(this.type!==s.parenR)if(A?A=!1:this.expect(s.comma),y&&this.afterTrailingComma(s.parenR,!0)){k=!0;break}else if(this.type===s.ellipsis){if(G=this.start,S.push(this.parseParenItem(this.parseRestBinding())),this.type===s.comma)this.raise(this.start,"Comma is not permitted after the rest element");break}else S.push(this.parseMaybeAssign(!1,_,this.parseParenItem));let z=this.lastTokEnd,K=this.lastTokEndLoc;if(this.expect(s.parenR),this.maybeInArrowParameters=x,a&&this.shouldParseArrow(S)&&this.eat(s.arrow))return this.checkPatternErrors(_,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=j,this.awaitPos=F,this.parseParenArrowList(u,m,S,c);if(!S.length||k)this.unexpected(this.lastTokStart);if(G)this.unexpected(G);if(this.checkExpressionErrors(_,!0),this.yieldPos=j||this.yieldPos,this.awaitPos=F||this.awaitPos,S.length>1)T=this.startNodeAt(C,v),T.expressions=S,this.finishNodeAt(T,"SequenceExpression",z,K);else T=S[0]}else T=this.parseParenExpression();if(this.options.preserveParens){let x=this.startNodeAt(u,m);return x.expression=T,this.finishNode(x,"ParenthesizedExpression")}else return T}parseTaggedTemplateExpression(a,c,u,m){let T=this.startNodeAt(c,u);if(T.tag=a,T.quasi=this.parseTemplate({isTagged:!0}),m)this.raise(c,"Tagged Template Literals are not allowed in optionalChain.");return this.finishNode(T,"TaggedTemplateExpression")}shouldParseAsyncArrow(){if(this.match(s.colon)){let a=this.tryParse((c)=>{let u=this.tsParseTypeOrTypePredicateAnnotation(s.colon);if(this.canInsertSemicolon()||!this.match(s.arrow))c();return u});if(a.aborted)return this.shouldParseAsyncArrowReturnType=void 0,!1;if(!a.thrown)return this.shouldParseAsyncArrowReturnType=a.node,!this.canInsertSemicolon()&&this.eat(s.arrow)}else return!this.canInsertSemicolon()&&this.eat(s.arrow)}parseSubscriptAsyncArrow(a,c,u,m){let T=this.startNodeAt(a,c);return T.returnType=this.shouldParseAsyncArrowReturnType,this.shouldParseAsyncArrowReturnType=void 0,this.parseArrowExpression(T,u,!0,m)}parseExprList(a,c,u,m){let T=[],y=!0;while(!this.eat(a)){if(!y){if(this.expect(s.comma),c&&this.afterTrailingComma(a))break}else y=!1;let x;if(u&&this.type===s.comma)x=null;else if(this.type===s.ellipsis){if(x=this.parseSpread(m),this.maybeInArrowParameters&&this.match(s.colon))x.typeAnnotation=this.tsParseTypeAnnotation();if(m&&this.type===s.comma&&m.trailingComma<0)m.trailingComma=this.start}else x=this.parseMaybeAssign(!1,m,this.parseParenItem);T.push(x)}return T}parseMaybeDecoratorArguments(a){let c=this.tsMatchLeftRelational()||this.match(s.bitShift)?this.tsParseTypeArgumentsInExpression():void 0;if(this.eat(s.parenL)){let u=this.startNodeAtNode(a);if(u.callee=a,u.arguments=this.parseExprList(s.parenR,!1),c)u.typeArguments=c;return this.finishNode(u,"CallExpression")}if(c){let u=this.startNodeAtNode(a);return u.expression=a,u.typeArguments=c,this.finishNode(u,"TSInstantiationExpression")}return a}parseSubscript(a,c,u,m,T,y,x){let C=y;if(!this.hasPrecedingLineBreak()&&this.value==="!"&&this.match(s.prefix)){this.exprAllowed=!1,this.next();let _=this.startNodeAt(c,u);return _.expression=a,a=this.finishNode(_,"TSNonNullExpression"),a}let v=!1;if(this.match(s.questionDot)&&this.lookaheadCharCode()===60){if(m)return a;a.optional=!0,C=v=!0,this.next()}if(this.tsMatchLeftRelational()||this.match(s.bitShift)){let _,j=this.tsTryParseAndCatch(()=>{if(!m&&this.atPossibleAsyncArrow(a)){let K=this.tsTryParseGenericAsyncArrowFunction(c,u,x);if(K)return a=K,a}let F=this.tsParseTypeArgumentsInExpression();if(!F)return a;if(v&&!this.match(s.parenL))return _=this.curPosition(),a;if(q(this.type)||this.type===s.backQuote){let K=this.parseTaggedTemplateExpression(a,c,u,C);return K.typeArguments=F,K}if(!m&&this.eat(s.parenL)){let K=new sn,Y=this.startNodeAt(c,u);if(Y.callee=a,Y.arguments=this.parseExprList(s.parenR,this.ecmaVersion>=8,!1,K),this.tsCheckForInvalidTypeCasts(Y.arguments),Y.typeArguments=F,C)Y.optional=v;return this.checkExpressionErrors(K,!0),a=this.finishNode(Y,"CallExpression"),a}let G=this.type;if(this.tsMatchRightRelational()||G===s.bitShift||G!==s.parenL&&Su(G)&&!this.hasPrecedingLineBreak())return;let z=this.startNodeAt(c,u);return z.expression=a,z.typeArguments=F,this.finishNode(z,"TSInstantiationExpression")});if(_)this.unexpected(_);if(j){if(j.type==="TSInstantiationExpression"&&(this.match(s.dot)||this.match(s.questionDot)&&this.lookaheadCharCode()!==40))this.raise(this.start,L.InvalidPropertyAccessAfterInstantiationExpression);return a=j,a}}let S=this.ecmaVersion>=11,A=S&&this.eat(s.questionDot);if(m&&A)this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");let k=this.eat(s.bracketL);if(k||A&&this.type!==s.parenL&&this.type!==s.backQuote||this.eat(s.dot)){let _=this.startNodeAt(c,u);if(_.object=a,k)_.property=this.parseExpression(),this.expect(s.bracketR);else if(this.type===s.privateId&&a.type!=="Super")_.property=this.parsePrivateIdent();else _.property=this.parseIdent(this.options.allowReserved!=="never");if(_.computed=!!k,S)_.optional=A;a=this.finishNode(_,"MemberExpression")}else if(!m&&this.eat(s.parenL)){let _=this.maybeInArrowParameters;this.maybeInArrowParameters=!0;let j=new sn,F=this.yieldPos,G=this.awaitPos,z=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;let K=this.parseExprList(s.parenR,this.ecmaVersion>=8,!1,j);if(T&&!A&&this.shouldParseAsyncArrow()){if(this.checkPatternErrors(j,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0)this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function");this.yieldPos=F,this.awaitPos=G,this.awaitIdentPos=z,a=this.parseSubscriptAsyncArrow(c,u,K,x)}else{this.checkExpressionErrors(j,!0),this.yieldPos=F||this.yieldPos,this.awaitPos=G||this.awaitPos,this.awaitIdentPos=z||this.awaitIdentPos;let Y=this.startNodeAt(c,u);if(Y.callee=a,Y.arguments=K,S)Y.optional=A;a=this.finishNode(Y,"CallExpression")}this.maybeInArrowParameters=_}else if(this.type===s.backQuote){if(A||C)this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");let _=this.startNodeAt(c,u);_.tag=a,_.quasi=this.parseTemplate({isTagged:!0}),a=this.finishNode(_,"TaggedTemplateExpression")}return a}parseGetterSetter(a){a.kind=a.key.name,this.parsePropertyName(a);let c=this.tsTryParseTypeParameters(this.tsParseConstModifier);if(a.value=this.parseMethod(!1),c)a.value.typeParameters=c;let u=a.kind==="get"?0:1,m=a.value.params[0];if(u=m&&this.isThisParam(m)?u+1:u,a.value.params.length!==u){let y=a.value.start;if(a.kind==="get")this.raiseRecoverable(y,"getter should have no params");else this.raiseRecoverable(y,"setter should have exactly one param")}else if(a.kind==="set"&&a.value.params[0].type==="RestElement")this.raiseRecoverable(a.value.params[0].start,"Setter cannot use rest params")}parsePropertyValue(a,c,u,m,T,y,x,C){if(this.tsMatchLeftRelational()){if(c)this.unexpected();a.kind="init",a.method=!0;let v=this.tsTryParseTypeParameters(this.tsParseConstModifier);if(a.value=this.parseMethod(u,m),v)a.value.typeParameters=v;return}return super.parsePropertyValue(a,c,u,m,T,y,x,C)}parseProperty(a,c){if(!a){let u=[];if(this.match(E.at))while(this.match(E.at))u.push(this.parseDecorator());let m=super.parseProperty(a,c);if(m.type==="SpreadElement"){if(u.length)this.raise(m.start,Fn.SpreadElementDecorator)}if(u.length)m.decorators=u,u=[];return m}return super.parseProperty(a,c)}parseCatchClauseParam(){let a=this.parseBindingAtom(),c=a.type==="Identifier";this.enterScope(c?J.SCOPE_SIMPLE_CATCH:0),this.checkLValPattern(a,c?J.BIND_SIMPLE_CATCH:J.BIND_LEXICAL);let u=this.tsTryParseTypeAnnotation();if(u)a.typeAnnotation=u,this.resetEndLocation(a);return this.expect(s.parenR),a}parseClass(a,c){let u=this.inAbstractClass;this.inAbstractClass=!!a.abstract;try{this.next(),this.takeDecorators(a);let m=this.strict;this.strict=!0,this.parseClassId(a,c),this.parseClassSuper(a);let T=this.enterClassBody(),y=this.startNode(),x=!1;y.body=[];let C=[];this.expect(s.braceL);while(this.type!==s.braceR){if(this.match(E.at)){C.push(this.parseDecorator());continue}let v=this.parseClassElement(a.superClass!==null);if(C.length)v.decorators=C,this.resetStartLocationFromNode(v,C[0]),C=[];if(v){if(y.body.push(v),v.type==="MethodDefinition"&&v.kind==="constructor"&&v.value.type==="FunctionExpression"){if(x)this.raiseRecoverable(v.start,"Duplicate constructor in the same class");if(x=!0,v.decorators&&v.decorators.length>0)this.raise(v.start,Fn.DecoratorConstructor)}else if(v.key&&v.key.type==="PrivateIdentifier"&&v.value?.type!=="TSDeclareMethod"){let S=v.key.name;if(this.parseEffects.modify(T,S,(k)=>su(k,v)))this.raiseRecoverable(v.key.start,`Identifier '#${S}' has already been declared`)}}}if(this.strict=m,this.next(),C.length)this.raise(this.start,Fn.TrailingDecorator);return a.body=this.finishNode(y,"ClassBody"),this.exitClassBody(),this.finishNode(a,c?"ClassDeclaration":"ClassExpression")}finally{this.inAbstractClass=u}}parseClassFunctionParams(){let a=this.tsTryParseTypeParameters(),c=this.parseBindingList(s.parenR,!1,this.ecmaVersion>=8,!0);if(a)c.typeParameters=a;return c}parseMethod(a,c,u,m,T){let y=this.startNode(),x=this.yieldPos,C=this.awaitPos,v=this.awaitIdentPos;if(this.initFunction(y),this.ecmaVersion>=6)y.generator=a;if(this.ecmaVersion>=8)y.async=!!c;if(this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Gr(c,y.generator)|J.SCOPE_SUPER|(u?J.SCOPE_DIRECT_SUPER:0)),this.expect(s.parenL),y.params=this.parseClassFunctionParams(),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(y,!1,!0,!1,{isClassMethod:m}),this.yieldPos=x,this.awaitPos=C,this.awaitIdentPos=v,T&&T.abstract){if(!!y.body){let{key:A}=T;this.raise(T.start,L.AbstractMethodHasImplementation({methodName:A.type==="Identifier"&&!T.computed?A.name:`[${this.input.slice(A.start,A.end)}]`}))}}return this.finishNode(y,"FunctionExpression")}static parse(a,c){if(c.locations===!1)throw Error("You have to enable options.locations while using acorn-typescript");else c.locations=!0;let u=new this(c,a);if(t)u.isAmbientContext=!0;return u.parse()}static parseExpressionAt(a,c,u){if(u.locations===!1)throw Error("You have to enable options.locations while using acorn-typescript");else u.locations=!0;let m=new this(u,a,c);if(t)m.isAmbientContext=!0;return m.nextToken(),m.parseExpression()}parseImportSpecifier(){if(this.ts_isContextual(E.type)){let c=this.startNode();return c.imported=this.parseModuleExportName(),this.parseTypeOnlyImportExportSpecifier(c,!0,this.importOrExportOuterKind==="type"),this.finishNode(c,"ImportSpecifier")}else{let c=super.parseImportSpecifier();return c.importKind="value",c}}parseExportSpecifier(a){let c=this.ts_isContextual(E.type);if(!this.match(s.string)&&c){let m=this.startNode();return m.local=this.parseModuleExportName(),this.parseTypeOnlyImportExportSpecifier(m,!1,this.importOrExportOuterKind==="type"),this.finishNode(m,"ExportSpecifier"),this.checkExport(a,m.exported,m.exported.start),m}else{let m=super.parseExportSpecifier(a);return m.exportKind="value",m}}parseTypeOnlyImportExportSpecifier(a,c,u){let m=c?"imported":"local",T=c?"local":"exported",y=a[m],x,C=!1,v=!0,S=y.start;if(this.isContextual("as")){let k=this.parseIdent();if(this.isContextual("as")){let _=this.parseIdent();if(B(this.type))C=!0,y=k,x=c?this.parseIdent():this.parseModuleExportName(),v=!1;else x=_,v=!1}else if(B(this.type))v=!1,x=c?this.parseIdent():this.parseModuleExportName();else C=!0,y=k}else if(B(this.type))if(C=!0,c){if(y=super.parseIdent(!0),!this.isContextual("as"))this.checkUnreserved(y)}else y=this.parseModuleExportName();if(C&&u)this.raise(S,c?L.TypeModifierIsUsedInTypeImports:L.TypeModifierIsUsedInTypeExports);a[m]=y,a[T]=x;let A=c?"importKind":"exportKind";if(a[A]=C?"type":"value",v&&this.eatContextual("as"))a[T]=c?this.parseIdent():this.parseModuleExportName();if(!a[T])a[T]=this.copyNode(a[m]);if(c)this.checkLValSimple(a[T],J.BIND_LEXICAL)}raiseCommonCheck(a,c,u){switch(c){case"Comma is not permitted after the rest element":if(this.isAmbientContext&&this.match(s.comma)&&this.lookaheadCharCode()===41){this.next();return}else return super.raise(a,c)}return u?super.raiseRecoverable(a,c):super.raise(a,c)}raiseRecoverable(a,c){return this.raiseCommonCheck(a,c,!0)}raise(a,c){return this.raiseCommonCheck(a,c,!0)}updateContext(a){let{type:c}=this;if(c==s.braceL){var u=this.curContext();if(u==w.tc_oTag)this.parseEffects.append(this.context,g.b_expr);else if(u==w.tc_expr)this.parseEffects.append(this.context,g.b_tmpl);else super.updateContext(a);this.exprAllowed=!0}else if(c===s.slash&&a===E.jsxTagStart)this.parseEffects.truncate(this.context,this.context.length-2),this.parseEffects.append(this.context,w.tc_cTag),this.exprAllowed=!1;else return super.updateContext(a)}jsx_parseOpeningElementAt(a,c){let u=this.startNodeAt(a,c),m=this.jsx_parseElementName();if(m)u.name=m;if(this.match(s.relational)||this.match(s.bitShift)){let T=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());if(T)u.typeArguments=T}u.attributes=[];while(this.type!==s.slash&&this.type!==E.jsxTagEnd)u.attributes.push(this.jsx_parseAttribute());return u.selfClosing=this.eat(s.slash),this.expect(E.jsxTagEnd),this.finishNode(u,m?"JSXOpeningElement":"JSXOpeningFragment")}enterScope(a){let c=a===rn;if(c)this.parseEffects.append(this.importsStack,[]);let u=c?a|J.SCOPE_CLASS_STATIC_BLOCK:a;super.enterScope(u);let m=super.currentScope();m.types=[],m.enums=[],m.constEnums=[],m.classes=[],m.exportOnlyBindings=[]}exitScope(){if(super.currentScope().flags&rn)this.parseEffects.pop(this.importsStack);super.exitScope()}hasImport(a,c){let u=this.importsStack.length;if(this.importsStack[u-1].indexOf(a)>-1)return!0;if(!c&&u>1){for(let m=0;m<u-1;m++)if(this.importsStack[m].indexOf(a)>-1)return!0}return!1}maybeExportDefined(a,c){if(this.inModule&&a.flags&J.SCOPE_TOP)this.parseEffects.remove(this.undefinedExports,c)}declareName(a,c,u){if(c&J.BIND_FLAGS_TS_IMPORT){if(this.hasImport(a,!0))this.raise(u,`Identifier '${a}' has already been declared.`);this.parseEffects.append(this.importsStack[this.importsStack.length-1],a);return}let m=this.currentScope();if(c&J.BIND_FLAGS_TS_EXPORT_ONLY){this.maybeExportDefined(m,a),this.parseEffects.append(m.exportOnlyBindings,a);return}if(c===J.BIND_TS_TYPE||c===J.BIND_TS_INTERFACE){if(c===J.BIND_TS_TYPE&&m.types.includes(a))this.raise(u,`type '${a}' has already been declared.`);this.parseEffects.append(m.types,a)}else if(c&J.BIND_FLAGS_TS_ENUM){if(m.enums.includes(a))return;super.declareName(a,J.BIND_LEXICAL,u)}else super.declareName(a,c,u);if(c&J.BIND_FLAGS_TS_ENUM)this.parseEffects.append(m.enums,a);if(c&J.BIND_FLAGS_TS_CONST_ENUM)this.parseEffects.append(m.constEnums,a);if(c&J.BIND_FLAGS_CLASS)this.parseEffects.append(m.classes,a)}checkLocalExport(a){let{name:c}=a;if(this.hasImport(c))return;let u=this.scopeStack.length;for(let m=u-1;m>=0;m--){let T=this.scopeStack[m];if(T.types.indexOf(c)>-1||T.exportOnlyBindings.indexOf(c)>-1)return}super.checkLocalExport(a)}}return te}}var Au=/\n/,Pu=/[ \t]/,ku=/^[,) \t]*$/,$n="",Qa=[];function jn(e,t){$n=e,Qa=t}function Hn(e,t,n,r){let i=t;if(e&&Au.test(i)){let o=n;while(o>0&&$n[o-1]!==`
36
- `)o-=1;let s=o;while(Pu.test($n[s]))s+=1;let p=$n.slice(o,s);i=wu(i,p)}Qa.push({type:e?"Block":"Line",value:i,start:n,end:r})}function wu(e,t){if(t==="")return e;return(e.startsWith(t)?e.slice(t.length):e).replaceAll(`
38
+ `;else g=String.fromCharCode(y);if(this.options.locations)++this.curLine,this.lineStart=this.pos;return g}jsx_readString(f){let y="",g=++this.pos;for(;;){if(this.pos>=this.input.length)this.raise(this.start,"Unterminated string constant");let b=this.input.charCodeAt(this.pos);if(b===f)break;if(b===38)y+=this.input.slice(g,this.pos),y+=this.jsx_readEntity(),g=this.pos;else if(s(b))y+=this.input.slice(g,this.pos),y+=this.jsx_readNewLine(!1),g=this.pos;else++this.pos}return y+=this.input.slice(g,this.pos++),this.finishToken(i.string,y)}jsx_readEntity(){let f="",y=0,g,b=this.input[this.pos];if(b!=="&")this.raise(this.pos,"Entity must start with an ampersand");let P=++this.pos;while(this.pos<this.input.length&&y++<10){if(b=this.input[this.pos++],b===";"){if(f[0]==="#"){let N;if(f[1]==="x"||f[1]==="X"){if(f=f.substr(2),Rd.test(f))N=parseInt(f,16)}else if(f=f.substr(1),Md.test(f))N=parseInt(f,10);if(N!==void 0&&N<=1114111)g=String.fromCodePoint(N)}else if(Object.prototype.hasOwnProperty.call(Lo,f))g=Lo[f];break}f+=b}if(g===void 0)return this.pos=P,"&";return g}jsx_readWord(){let f,y=this.pos;do f=this.input.charCodeAt(++this.pos);while(c(f)||f===45);return this.finishToken(o.jsxName,this.input.slice(y,this.pos))}jsx_parseIdentifier(){let f=this.startNode();if(this.type===o.jsxName)f.name=this.value;else if(this.type.keyword)f.name=this.type.keyword;else this.unexpected();return this.next(),this.finishNode(f,"JSXIdentifier")}jsx_parseNamespacedName(){let f=this.start,y=this.startLoc,g=this.jsx_parseIdentifier();if(!l.allowNamespaces||!this.eat(i.colon))return g;var b=this.startNodeAt(f,y);return b.namespace=g,b.name=this.jsx_parseIdentifier(),this.finishNode(b,"JSXNamespacedName")}jsx_parseElementName(){if(this.type===o.jsxTagEnd)return"";let f=this.start,y=this.startLoc,g=this.jsx_parseNamespacedName();if(this.type===i.dot&&g.type==="JSXNamespacedName"&&!l.allowNamespacedObjects)this.unexpected();while(this.eat(i.dot)){let b=this.startNodeAt(f,y);b.object=g,b.property=this.jsx_parseIdentifier(),g=this.finishNode(b,"JSXMemberExpression")}return g}jsx_parseAttributeValue(){switch(this.type){case i.braceL:let f=this.jsx_parseExpressionContainer();if(f.expression.type==="JSXEmptyExpression")this.raise(f.start,"JSX attributes must only be assigned a non-empty expression");return f;case o.jsxTagStart:case i.string:return this.parseExprAtom();default:this.raise(this.start,"JSX value should be either an expression or a quoted JSX text")}}jsx_parseEmptyExpression(){let f=this.startNodeAt(this.lastTokEnd,this.lastTokEndLoc);return this.finishNodeAt(f,"JSXEmptyExpression",this.start,this.startLoc)}jsx_parseExpressionContainer(){let f=this.startNode();if(this.next(),this.eat(i.ellipsis))return f.expression=this.parseExpression(),this.expect(i.braceR),this.finishNode(f,"JSXSpreadChild");return f.expression=this.type===i.braceR?this.jsx_parseEmptyExpression():this.parseExpression(),this.expect(i.braceR),this.finishNode(f,"JSXExpressionContainer")}jsx_parseAttribute(){let f=this.startNode();if(this.eat(i.braceL))return this.expect(i.ellipsis),f.argument=this.parseMaybeAssign(),this.expect(i.braceR),this.finishNode(f,"JSXSpreadAttribute");return f.name=this.jsx_parseNamespacedName(),f.value=this.eat(i.eq)?this.jsx_parseAttributeValue():null,this.finishNode(f,"JSXAttribute")}jsx_parseOpeningElementAt(f,y){let g=this.startNodeAt(f,y);g.attributes=[];let b=this.jsx_parseElementName();if(b)g.name=b;while(this.type!==i.slash&&this.type!==o.jsxTagEnd)g.attributes.push(this.jsx_parseAttribute());return g.selfClosing=this.eat(i.slash),this.expect(o.jsxTagEnd),this.finishNode(g,b?"JSXOpeningElement":"JSXOpeningFragment")}jsx_parseClosingElementAt(f,y){let g=this.startNodeAt(f,y),b=this.jsx_parseElementName();if(b)g.name=b;return this.expect(o.jsxTagEnd),this.finishNode(g,b?"JSXClosingElement":"JSXClosingFragment")}jsx_parseElementAt(f,y){let g=this.startNodeAt(f,y),b=[],P=this.jsx_parseOpeningElementAt(f,y),N=null;if(!P.selfClosing){e:for(;;)switch(this.type){case o.jsxTagStart:if(f=this.start,y=this.startLoc,this.next(),this.eat(i.slash)){N=this.jsx_parseClosingElementAt(f,y);break e}b.push(this.jsx_parseElementAt(f,y));break;case o.jsxText:b.push(this.parseExprAtom());break;case i.braceL:b.push(this.jsx_parseExpressionContainer());break;default:this.unexpected()}if(_n(N.name)!==_n(P.name))this.raise(N.start,"Expected corresponding JSX closing tag for <"+_n(P.name)+">")}let D=P.name?"Element":"Fragment";if(g["opening"+D]=P,g["closing"+D]=N,g.children=b,this.type===i.relational&&this.value==="<")this.raise(this.start,"Adjacent JSX elements must be wrapped in an enclosing tag");return this.finishNode(g,"JSX"+D)}jsx_parseText(){let f=this.parseLiteral(this.value);return f.type="JSXText",f}jsx_parseElement(){let f=this.start,y=this.startLoc;return this.next(),this.jsx_parseElementAt(f,y)}}}function Bd(e,t,n){let{tokTypes:r}=t,{tokTypes:i}=n;return class extends e{parseMaybeImportAttributes(s){if(this.type===i._with||this.type===r.assert){this.next();let c=this.parseImportAttributes();if(c)s.attributes=c}}parseImportAttributes(){this.expect(i.braceL);let s=this.parseWithEntries();return this.expect(i.braceR),s}parseWithEntries(){let s=[],c=new Set;do{if(this.type===i.braceR)break;let l=this.startNode(),u;if(this.type===i.string)u=this.parseLiteral(this.value);else u=this.parseIdent(!0);if(this.next(),l.key=u,c.has(l.key.name))this.raise(this.pos,"Duplicated key in attributes");if(c.add(l.key.name),this.type!==i.string)this.raise(this.pos,"Only string is supported as an attribute value");l.value=this.parseLiteral(this.value),s.push(this.finishNode(l,"ImportAttribute"))}while(this.eat(i.comma));return s}}}var ki=["onToken","onComment","onInsertedSemicolon","onTrailingComma"];function Uo(){return{_tag:"BufferedParserEvents",segments:[]}}var Fd=Uo();function Ro(e){return e.segments.length>0}var $d=class{constructor(e,t){this.options=e,this.state=t,this.callbacks={},this.callbackWrappers={},this.frames=[],this.undoLog=[],this.hasCallbacks=this.captureCallbacks()}get active(){return this.frames.length>0}begin(){let e={_tag:"ParseEffectFrame",depth:this.frames.length,undoMark:this.undoLog.length,checkpoint:this.state?.capture()};if(this.frames.push(e),e.depth===0&&this.hasCallbacks)this.activateCallbacks();return e}commit(e){this.close(e);let t=this.currentFrame();if(t){if(e.output)this.appendOutput(this.outputFor(t),e.output);return}if(this.undoLog.length=e.undoMark,e.output)this.flush(e.output)}rollback(e){this.close(e),this.unwind(e.undoMark),this.restore(e)}rollbackWithEvents(e){return this.close(e),this.unwind(e.undoMark),this.restore(e),e.output??Fd}replay(e){if(!Ro(e))return;let t=this.currentFrame();if(t){this.appendOutput(this.outputFor(t),e);return}this.flush(e)}set(e,t,n){this.willSet(e,t),e[t]=n}remove(e,t){this.willSet(e,t),delete e[t]}append(e,t){this.willAppend(e),e.push(t)}pop(e){return this.willMutateTail(e,1),e.pop()}truncate(e,t){if(t<e.length)this.willMutateTail(e,e.length-t);else this.willAppend(e);e.length=t}modify(e,t,n){let[r,i]=n(e[t]);return this.set(e,t,i),r}willAppend(e){if(!this.active)return;this.undoLog.push({_tag:"ArrayLength",target:e,length:e.length})}willMutateTail(e,t){if(!this.active)return;let n=Math.max(0,e.length-t);this.undoLog.push({_tag:"ArrayTail",target:e,start:n,values:e.slice(n)})}willSet(e,t){if(!this.active)return;let n=e;this.undoLog.push({_tag:"Property",target:n,key:t,had:Object.prototype.hasOwnProperty.call(n,t),value:n[t]})}captureCallbacks(){let e=!1;for(let t of ki){let n=this.options[t];if(!n)continue;e=!0,this.callbacks[t]=n,this.callbackWrappers[t]=(...r)=>{this.emit({name:t,args:r})}}return e}activateCallbacks(){for(let e of ki){let t=this.callbackWrappers[e];if(t)this.options[e]=t}}deactivateCallbacks(){for(let e of ki){let t=this.callbacks[e];if(t)this.options[e]=t}}emit(e){let t=this.currentFrame();if(!t){this.invoke(e);return}let n=this.outputFor(t).segments,r=n[n.length-1];if(Array.isArray(r))r.push(e);else n.push([e])}appendOutput(e,t){if(Ro(t))e.segments.push(t)}outputFor(e){return e.output??=Uo()}flush(e){let t=[];for(let n=e.segments.length-1;n>=0;n--)t.push(e.segments[n]);while(t.length>0){let n=t.pop();if(Array.isArray(n)){for(let r of n)this.invoke(r);continue}for(let r=n.segments.length-1;r>=0;r--)t.push(n.segments[r])}}invoke(e){this.callbacks[e.name]?.apply(this.options,e.args)}currentFrame(){return this.frames[this.frames.length-1]}close(e){if(this.currentFrame()!==e||e.depth!==this.frames.length-1)throw Error("Parse effect scopes must be closed in order");if(this.frames.pop(),this.frames.length===0&&this.hasCallbacks)this.deactivateCallbacks()}restore(e){if(this.state)this.state.restore(e.checkpoint)}unwind(e){for(let t=this.undoLog.length-1;t>=e;t--){let n=this.undoLog[t];switch(n._tag){case"ArrayLength":if(n.target.length<n.length)throw Error("A parse effect shortened an append-only array");n.target.length=n.length;break;case"ArrayTail":n.target.length=n.start;for(let r of n.values)n.target.push(r);break;case"Property":if(n.had)n.target[n.key]=n.value;else delete n.target[n.key];break}}this.undoLog.length=e}};function Zt(e,t,n){if(e.length===t)return e;if(e.length<t)throw Error(`A parse branch shortened the ${n} below its checkpoint`);return e.length=t,e}function Vd(e){return{lookahead:e.getCurLookaheadState(),context:e.context,contextLength:e.context.length,scopeStack:e.scopeStack,scopeStackLength:e.scopeStack.length,importsStack:e.importsStack,importsStackLength:e.importsStack.length,labels:e.labels,labelsLength:e.labels.length,privateNameStack:e.privateNameStack,privateNameStackLength:e.privateNameStack.length,decoratorStack:e.decoratorStack,decoratorStackLength:e.decoratorStack.length,strict:e.strict,potentialArrowAt:e.potentialArrowAt,potentialArrowInForAwait:e.potentialArrowInForAwait,yieldPos:e.yieldPos,awaitPos:e.awaitPos,awaitIdentPos:e.awaitIdentPos,preValue:e.preValue,preToken:e.preToken,isLookahead:e.isLookahead,isAmbientContext:e.isAmbientContext,inAbstractClass:e.inAbstractClass,inType:e.inType,inDisallowConditionalTypesContext:e.inDisallowConditionalTypesContext,maybeInArrowParameters:e.maybeInArrowParameters,shouldParseArrowReturnType:e.shouldParseArrowReturnType,shouldParseAsyncArrowReturnType:e.shouldParseAsyncArrowReturnType,importOrExportOuterKind:e.importOrExportOuterKind}}function jd(e,t){e.setLookaheadTokenState(t.lookahead),e.context=Zt(t.context,t.contextLength,"token context stack"),e.scopeStack=Zt(t.scopeStack,t.scopeStackLength,"scope stack"),e.importsStack=Zt(t.importsStack,t.importsStackLength,"import stack"),e.labels=Zt(t.labels,t.labelsLength,"label stack"),e.privateNameStack=Zt(t.privateNameStack,t.privateNameStackLength,"private-name stack"),e.decoratorStack=Zt(t.decoratorStack,t.decoratorStackLength,"decorator stack"),e.strict=t.strict,e.potentialArrowAt=t.potentialArrowAt,e.potentialArrowInForAwait=t.potentialArrowInForAwait,e.yieldPos=t.yieldPos,e.awaitPos=t.awaitPos,e.awaitIdentPos=t.awaitIdentPos,e.regexpState=null,e.preValue=t.preValue,e.preToken=t.preToken,e.isLookahead=t.isLookahead,e.isAmbientContext=t.isAmbientContext,e.inAbstractClass=t.inAbstractClass,e.inType=t.inType,e.inDisallowConditionalTypesContext=t.inDisallowConditionalTypesContext,e.maybeInArrowParameters=t.maybeInArrowParameters,e.shouldParseArrowReturnType=t.shouldParseArrowReturnType,e.shouldParseAsyncArrowReturnType=t.shouldParseAsyncArrowReturnType,e.importOrExportOuterKind=t.importOrExportOuterKind}function Hd(e){return{capture:()=>Vd(e),restore:(t)=>jd(e,t)}}function qd(e,t){let{acornTokenTypes:n,typeScriptTokenTypes:r,scope:i}=t,o=i.SCOPE_TOP|i.SCOPE_FUNCTION|i.SCOPE_CLASS_STATIC_BLOCK;return class extends e{constructor(c,l,u){super(c,l,u);this.parseEffects=new $d(this.options,Hd(this))}overrideContext(c){if(this.curContext()!==c)this.parseEffects?.willMutateTail(this.context,1);return super.overrideContext(c)}takeDecorators(c){let l=this.decoratorStack.length-1;if(this.decoratorStack[l].length>0)this.parseEffects?.willSet(this.decoratorStack,String(l));return super.takeDecorators(c)}parseDecorators(c){let l=this.decoratorStack[this.decoratorStack.length-1];return this.parseEffects?.willAppend(l),super.parseDecorators(c)}parseDecorator(){return this.parseEffects?.willAppend(this.decoratorStack),super.parseDecorator()}parseIdentNode(){if((this.type.keyword==="class"||this.type.keyword==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46))this.parseEffects?.willMutateTail(this.context,1);return super.parseIdentNode()}parseLabeledStatement(c,l,u,f){for(let y=this.labels.length-1;y>=0;y--){let g=this.labels[y];if(g.statementStart!==c.start)break;this.parseEffects?.willSet(g,"statementStart"),this.parseEffects?.willSet(g,"kind")}return this.parseEffects?.willAppend(this.labels),super.parseLabeledStatement(c,l,u,f)}enterClassBody(){return this.parseEffects?.willAppend(this.privateNameStack),super.enterClassBody()}exitClassBody(){let c=this.privateNameStack[this.privateNameStack.length-2];if(c)this.parseEffects?.willAppend(c.used);return this.parseEffects?.willMutateTail(this.privateNameStack,1),super.exitClassBody()}parsePrivateIdent(){if(this.options.checkPrivateFields&&this.privateNameStack.length>0){let c=this.privateNameStack[this.privateNameStack.length-1];this.parseEffects?.willAppend(c.used)}return super.parsePrivateIdent()}parseClassField(c){return this.parseEffects?.willSet(this.currentThisScope(),"inClassFieldInit"),super.parseClassField(c)}updateContext(c){let{type:l}=this;if(l===n.parenR||l===n.braceR||l===n.braceL||l===n.dollarBraceL||l===n.parenL||l===n._function||l===n._class||l===n.colon||l===n.backQuote||l===n.star||l===r.jsxTagStart||l===r.jsxTagEnd||l===n.slash&&c===r.jsxTagStart)this.parseEffects?.willMutateTail(this.context,2);return super.updateContext(c)}enterScope(c){return this.parseEffects?.willAppend(this.scopeStack),super.enterScope(c)}exitScope(){return this.parseEffects?.willMutateTail(this.scopeStack,1),super.exitScope()}declareName(c,l,u){let f=this.parseEffects;if(f?.active)if(l===i.BIND_LEXICAL){let y=this.currentScope();if(f.willAppend(y.lexical),this.inModule&&y.flags&i.SCOPE_TOP)f.willSet(this.undefinedExports,c)}else if(l===i.BIND_SIMPLE_CATCH)f.willAppend(this.currentScope().lexical);else if(l===i.BIND_FUNCTION)f.willAppend(this.currentScope().functions);else for(let y=this.scopeStack.length-1;y>=0;y--){let g=this.scopeStack[y];if(f.willAppend(g.var),this.inModule&&g.flags&i.SCOPE_TOP)f.willSet(this.undefinedExports,c);if(g.flags&o)break}return super.declareName(c,l,u)}checkLocalExport(c){return this.parseEffects?.willSet(this.undefinedExports,c.name),super.checkLocalExport(c)}}}var wi=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;function Mo(e){if(!e)throw Error("Assert fail")}function Ud(e){return e==="accessor"}function Gd(e){return e==="in"||e==="out"}var lr=1,Oo=2,Wd=4,ne={SCOPE_TOP:1,SCOPE_FUNCTION:2,SCOPE_ASYNC:4,SCOPE_GENERATOR:8,SCOPE_ARROW:16,SCOPE_SIMPLE_CATCH:32,SCOPE_SUPER:64,SCOPE_DIRECT_SUPER:128,SCOPE_CLASS_STATIC_BLOCK:256,SCOPE_VAR:256,BIND_NONE:0,BIND_VAR:1,BIND_LEXICAL:2,BIND_FUNCTION:3,BIND_SIMPLE_CATCH:4,BIND_OUTSIDE:5,BIND_TS_TYPE:6,BIND_TS_INTERFACE:7,BIND_TS_NAMESPACE:1032,BIND_FLAGS_TS_EXPORT_ONLY:1024,BIND_FLAGS_TS_IMPORT:4096,BIND_FLAGS_TS_ENUM:256,BIND_FLAGS_TS_CONST_ENUM:512,BIND_TS_ENUM:258,BIND_TS_CONST_ENUM:770,BIND_FLAGS_CLASS:128};function Ni(e,t){return ne.SCOPE_FUNCTION|(e?ne.SCOPE_ASYNC:0)|(t?ne.SCOPE_GENERATOR:0)}function Kd(e){if(e.type!=="MemberExpression")return!1;let{computed:t,property:n}=e;if(t&&(n.type!=="TemplateLiteral"||n.expressions.length>0))return!1;return Go(e.object)}function zd(e){return e.type==="UnaryExpression"&&(e.operator==="-"||e.operator==="+")&&e.argument.type==="Literal"&&(typeof e.argument.value==="number"||typeof e.argument.value==="bigint")}function Go(e){if(e.type==="Identifier")return!0;if(e.type!=="MemberExpression")return!1;if(e.computed)return!1;return Go(e.object)}function Bo(e){return e==="private"||e==="public"||e==="protected"}function Jd(e){return Boolean(e.startsExpr)}function Xd(e){if(e==null)throw Error(`Unexpected ${e} value.`);return e}function Yd(e){switch(e){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}function Wo(e){let{dts:t=!1}=e||{},n=!!e?.jsx;return function(r){let i=r.acorn||Ai,o=vd(i),{tokTypes:s,keywordTypes:c,isIdentifierStart:l,lineBreak:u,isNewLine:f,tokContexts:y,isIdentifierChar:g}=i,{tokTypes:b,tokContexts:P,keywordsRegExp:N,tokenIsLiteralPropertyName:D,tokenIsTemplate:j,tokenIsTSDeclarationStart:U,tokenIsIdentifier:v,tokenIsKeywordOrIdentifier:w,tokenIsTSTypeOperator:M}=o;function G(a,p,d=a.length){for(let m=p;m<d;m++){let E=a.charCodeAt(m);if(f(E))return m<d-1&&E===13&&a.charCodeAt(m+1)===10?m+2:m+1}return-1}if(r=Ld(r,o,i),e?.jsx)r=Od(i,o,r,typeof e.jsx==="boolean"?{}:e.jsx);r=Bd(r,o,i);let X=qd(r,{acornTokenTypes:s,typeScriptTokenTypes:b,scope:ne});class be extends X{constructor(a,p,d){super(a,p,d);this.preValue=null,this.preToken=null,this.isLookahead=!1,this.isAmbientContext=!1,this.inAbstractClass=!1,this.inType=!1,this.inDisallowConditionalTypesContext=!1,this.maybeInArrowParameters=!1,this.shouldParseArrowReturnType=void 0,this.shouldParseAsyncArrowReturnType=void 0,this.decoratorStack=[[]],this.importsStack=[[]],this.importOrExportOuterKind=void 0,this.tsParseConstModifier=(m)=>{this.tsParseModifiers({modified:m,allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:F.InvalidModifierOnTypeParameterPositions})},this.ecmaVersion=this.options.ecmaVersion}static get acornTypeScript(){return o}get acornTypeScript(){return o}getTokenFromCodeInType(a){if(a===62)return this.finishOp(s.relational,1);if(a===60)return this.finishOp(s.relational,1);return super.getTokenFromCode(a)}readToken(a){if(!this.inType){let p=this.curContext();if(p===P.tc_expr)return this.jsx_readToken();if(p===P.tc_oTag||p===P.tc_cTag){if(l(a))return this.jsx_readWord();if(a==62)return++this.pos,this.finishToken(b.jsxTagEnd);if((a===34||a===39)&&p==P.tc_oTag)return this.jsx_readString(a)}if(a===60&&this.exprAllowed&&this.input.charCodeAt(this.pos+1)!==33)if(++this.pos,e?.jsx)return this.finishToken(b.jsxTagStart);else return this.finishToken(s.relational,"<")}return super.readToken(a)}getTokenFromCode(a){if(this.inType)return this.getTokenFromCodeInType(a);if(a===64)return++this.pos,this.finishToken(b.at);return super.getTokenFromCode(a)}isAbstractClass(){return this.ts_isContextual(b.abstract)&&this.lookahead().type===s._class}isDeclareClass(){if(!this.ts_isContextual(b.declare))return!1;let a=this.nextTokenStart();if(this.isUnparsedContextual(a,"class"))return!0;if(!this.isUnparsedContextual(a,"abstract"))return!1;let p=this.nextTokenStartSince(a+8);return this.isUnparsedContextual(p,"class")}finishNode(a,p){if(a.type!==""&&a.end!==0)return a;return super.finishNode(a,p)}tryParse(a){let p={},d=this.beginParseEffectScope(),m;try{m=a(()=>{throw p})}catch(E){let S=E===p;if(!S&&!(E instanceof SyntaxError))throw this.parseEffects.rollback(d),E;let k={events:this.parseEffects.rollbackWithEvents(d),selected:!1};return S?{node:null,error:null,thrown:!1,aborted:!0,failState:k}:{node:null,error:E,thrown:!0,aborted:!1,failState:k}}return this.parseEffects.commit(d),{node:m,error:null,thrown:!1,aborted:!1,failState:null}}setOptionalParametersError(a,p){a.optionalParametersLoc=p?.loc??this.startLoc}reScan_lt_gt(){if(this.type===s.relational)this.pos-=1,this.readToken_lt_gt(this.fullCharCodeAtPos())}reScan_lt(){let{type:a}=this;if(a===s.bitShift)return this.pos-=2,this.finishOp(s.relational,1),s.relational;return a}resetEndLocation(a,p=this.lastTokEnd,d=this.lastTokEndLoc){if(a.end=p,a.loc.end=d,this.options.ranges)a.range[1]=p}startNodeAtNode(a){return super.startNodeAt(a.start,a.loc.start)}nextTokenStart(){return this.nextTokenStartSince(this.pos)}tsHasSomeModifiers(a,p){return p.some((d)=>{if(Bo(d))return a.accessibility===d;return!!a[d]})}tsIsStartOfStaticBlocks(){return this.isContextual("static")&&this.lookaheadCharCode()===123}tsCheckForInvalidTypeCasts(a){a.forEach((p)=>{if(p?.type==="TSTypeCastExpression")this.raise(p.typeAnnotation.start,F.UnexpectedTypeAnnotation)})}atPossibleAsyncArrow(a){return a.type==="Identifier"&&a.name==="async"&&this.lastTokEnd===a.end&&!this.canInsertSemicolon()&&a.end-a.start===5&&a.start===this.potentialArrowAt}tsIsIdentifier(){return v(this.type)}tsTryParseTypeOrTypePredicateAnnotation(){return this.match(s.colon)?this.tsParseTypeOrTypePredicateAnnotation(s.colon):void 0}tsTryParseGenericAsyncArrowFunction(a,p,d){if(!this.tsMatchLeftRelational())return;let m=this.maybeInArrowParameters;this.maybeInArrowParameters=!0;let E=this.tsTryParseAndCatch(()=>{let S=this.startNodeAt(a,p);return S.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(S),S.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(s.arrow),S});if(this.maybeInArrowParameters=m,!E)return;return this.parseArrowExpression(E,E.params,!0,d)}tsParseTypeArgumentsInExpression(){if(this.reScan_lt()!==s.relational)return;return this.tsParseTypeArguments(!0)}tsInNoContext(a){let p=this.context;this.context=[p[0]];try{return a()}finally{this.context=p}}tsTryParseTypeAnnotation(){return this.match(s.colon)?this.tsParseTypeAnnotation():void 0}isUnparsedContextual(a,p){let d=a+p.length;if(this.input.slice(a,d)===p){let m=this.input.charCodeAt(d);return!(g(m)||(m&64512)===55296)}return!1}isAbstractConstructorSignature(){return this.ts_isContextual(b.abstract)&&this.lookahead().type===s._new}nextTokenStartSince(a){return wi.lastIndex=a,wi.test(this.input)?wi.lastIndex:a}lookaheadCharCode(){return this.input.charCodeAt(this.nextTokenStart())}createLookaheadState(){this.value=null,this.context=[this.curContext()]}getCurLookaheadState(){return{endLoc:this.endLoc,lastTokEnd:this.lastTokEnd,lastTokStart:this.lastTokStart,lastTokStartLoc:this.lastTokStartLoc,pos:this.pos,value:this.value,type:this.type,exprAllowed:this.exprAllowed,start:this.start,end:this.end,context:this.context,startLoc:this.startLoc,lastTokEndLoc:this.lastTokEndLoc,curLine:this.curLine,lineStart:this.lineStart,containsEsc:this.containsEsc}}setLookaheadTokenState(a){this.pos=a.pos,this.value=a.value,this.exprAllowed=a.exprAllowed,this.endLoc=a.endLoc,this.lastTokEnd=a.lastTokEnd,this.lastTokStart=a.lastTokStart,this.lastTokStartLoc=a.lastTokStartLoc,this.type=a.type,this.start=a.start,this.end=a.end,this.startLoc=a.startLoc,this.lastTokEndLoc=a.lastTokEndLoc,this.curLine=a.curLine,this.lineStart=a.lineStart,this.containsEsc=a.containsEsc}setLookaheadState(a){this.setLookaheadTokenState(a),this.context=a.context&&a.context.slice()}beginParseEffectScope(){return this.parseEffects.begin()}selectTryParseResult(a){let p=a.failState;if(!p)return;if(p.selected)throw Error("A parse branch result can only be selected once");p.selected=!0,this.parseEffects.replay(p.events)}tsLookAhead(a){let p=this.beginParseEffectScope();try{return a()}finally{this.parseEffects.rollback(p)}}lookahead(a){let p=this.getCurLookaheadState(),d=this.context,m=this.preValue,E=this.preToken,S=this.isLookahead;try{if(this.createLookaheadState(),this.isLookahead=!0,a!==void 0)for(let k=0;k<a;k++)this.nextToken();else this.nextToken();return this.getCurLookaheadState()}finally{this.setLookaheadTokenState(p),this.context=d,this.preValue=m,this.preToken=E,this.isLookahead=S}}readWord(){let a=this.readWord1(),p=s.name;if(this.keywords.test(a))p=c[a];else if(new RegExp(N).test(a))p=b[a];return this.finishToken(p,a)}skipBlockComment(){let a;if(!this.isLookahead)a=this.options.onComment&&this.curPosition();let p=this.pos,d=this.input.indexOf("*/",this.pos+=2);if(d===-1)this.raise(this.pos-2,"Unterminated comment");if(this.pos=d+2,this.options.locations)for(let m,E=p;(m=G(this.input,E,this.pos))>-1;)++this.curLine,E=this.lineStart=m;if(this.isLookahead)return;if(this.options.onComment)this.options.onComment(!0,this.input.slice(p+2,d),p,this.pos,a,this.curPosition())}skipLineComment(a){let p=this.pos,d;if(!this.isLookahead)d=this.options.onComment&&this.curPosition();let m=this.input.charCodeAt(this.pos+=a);while(this.pos<this.input.length&&!f(m))m=this.input.charCodeAt(++this.pos);if(this.isLookahead)return;if(this.options.onComment)this.options.onComment(!1,this.input.slice(p+a,this.pos),p,this.pos,d,this.curPosition())}finishToken(a,p){if(this.preValue=this.value,this.preToken=this.type,this.end=this.pos,this.options.locations)this.endLoc=this.curPosition();let d=this.type;if(this.type=a,this.value=p,!this.isLookahead)this.updateContext(d)}resetStartLocation(a,p,d){if(a.start=p,a.loc.start=d,this.options.ranges)a.range[0]=p}isLineTerminator(){return this.eat(s.semi)||super.canInsertSemicolon()}hasFollowingLineBreak(){return _o.lastIndex=this.end,_o.test(this.input)}addExtra(a,p,d,m=!0){if(!a)return;let E=a.extra=a.extra||{};if(m)E[p]=d;else Object.defineProperty(E,p,{enumerable:m,value:d})}isLiteralPropertyName(){return D(this.type)}hasPrecedingLineBreak(){return u.test(this.input.slice(this.lastTokEnd,this.start))}createIdentifier(a,p){return a.name=p,this.finishNode(a,"Identifier")}resetStartLocationFromNode(a,p){this.resetStartLocation(a,p.start,p.loc.start)}isThisParam(a){return a.type==="Identifier"&&a.name==="this"}isLookaheadContextual(a){let p=this.nextTokenStart();return this.isUnparsedContextual(p,a)}ts_type_isContextual(a,p){return a===p&&!this.containsEsc}ts_isContextual(a){return this.type===a&&!this.containsEsc}ts_isContextualWithState(a,p){return a.type===p&&!a.containsEsc}isContextualWithState(a,p){return p.type===s.name&&p.value===a&&!p.containsEsc}tsIsStartOfMappedType(){if(this.next(),this.eat(s.plusMin))return this.ts_isContextual(b.readonly);if(this.ts_isContextual(b.readonly))this.next();if(!this.match(s.bracketL))return!1;if(this.next(),!this.tsIsIdentifier())return!1;return this.next(),this.match(s._in)}tsInDisallowConditionalTypesContext(a){let p=this.inDisallowConditionalTypesContext;this.inDisallowConditionalTypesContext=!0;try{return a()}finally{this.inDisallowConditionalTypesContext=p}}tsTryParseType(){return this.tsEatThenParseType(s.colon)}match(a){return this.type===a}matchJsx(a){return this.type===o.tokTypes[a]}ts_eatWithState(a,p,d){let m=d.type;if(a===m){for(let E=0;E<p;E++)this.next();return!0}else return!1}ts_eatContextualWithState(a,p,d){if(N.test(a)){if(this.ts_isContextualWithState(d,b[a])){for(let m=0;m<p;m++)this.next();return!0}return!1}else{if(!this.isContextualWithState(a,d))return!1;for(let m=0;m<p;m++)this.next();return!0}}canHaveLeadingDecorator(){return this.match(s._class)||this.isAbstractClass()||this.isDeclareClass()}eatContextual(a){if(N.test(a)){if(this.ts_isContextual(b[a]))return this.next(),!0;return!1}else return super.eatContextual(a)}tsIsExternalModuleReference(){return this.isContextual("require")&&this.lookaheadCharCode()===40}tsParseExternalModuleReference(){let a=this.startNode();if(this.expectContextual("require"),this.expect(s.parenL),!this.match(s.string))this.unexpected();return a.expression=this.parseExprAtom(),this.expect(s.parenR),this.finishNode(a,"TSExternalModuleReference")}tsParseEntityName(a=!0){let p=this.parseIdent(a);while(this.eat(s.dot)){let d=this.startNodeAtNode(p);d.left=p,d.right=this.parseIdent(a),p=this.finishNode(d,"TSQualifiedName")}return p}tsParseEnumMember(){let a=this.startNode();if(a.id=this.match(s.string)?this.parseLiteral(this.value):this.parseIdent(!0),this.eat(s.eq))a.initializer=this.parseMaybeAssign();return this.finishNode(a,"TSEnumMember")}tsParseEnumDeclaration(a,p={}){if(p.const)a.const=!0;if(p.declare)a.declare=!0;this.expectContextual("enum"),a.id=this.parseIdent();let d=p.const?ne.BIND_TS_CONST_ENUM:ne.BIND_TS_ENUM;return this.checkLValSimple(a.id,d),this.expect(s.braceL),a.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(s.braceR),this.finishNode(a,"TSEnumDeclaration")}tsParseModuleBlock(){let a=this.startNode();this.enterScope(Pd),this.expect(s.braceL),a.body=[];while(this.type!==s.braceR){let p=this.parseStatement(null,!0);a.body.push(p)}return this.next(),super.exitScope(),this.finishNode(a,"TSModuleBlock")}tsParseAmbientExternalModuleDeclaration(a){if(this.ts_isContextual(b.global))a.global=!0,a.id=this.parseIdent();else if(this.match(s.string))a.id=this.parseLiteral(this.value);else this.unexpected();if(this.match(s.braceL))this.enterScope(Nn),a.body=this.tsParseModuleBlock(),super.exitScope();else super.semicolon();return this.finishNode(a,"TSModuleDeclaration")}tsTryParseDeclare(a){if(this.isLineTerminator())return;let p=this.type,d;if(this.isContextual("let"))p=s._var,d="let";return this.tsInAmbientContext(()=>{if(p===s._function)return a.declare=!0,this.parseFunctionStatement(a,!1,!0);if(p===s._class)return a.declare=!0,this.parseClass(a,!0);if(p===b.enum)return this.tsParseEnumDeclaration(a,{declare:!0});if(p===b.global)return this.tsParseAmbientExternalModuleDeclaration(a);if(p===s._const||p===s._var){if(!this.match(s._const)||!this.isLookaheadContextual("enum"))return a.declare=!0,this.parseVarStatement(a,d||this.value,!0);return this.expect(s._const),this.tsParseEnumDeclaration(a,{const:!0,declare:!0})}if(p===b.interface){let m=this.tsParseInterfaceDeclaration(a,{declare:!0});if(m)return m}if(v(p))return this.tsParseDeclaration(a,this.value,!0)})}tsIsListTerminator(a){switch(a){case"EnumMembers":case"TypeMembers":return this.match(s.braceR);case"HeritageClauseElement":return this.match(s.braceL);case"TupleElementTypes":return this.match(s.bracketR);case"TypeParametersOrArguments":return this.tsMatchRightRelational()}}tsParseDelimitedListWorker(a,p,d,m){let E=[],S=-1;for(;;){if(this.tsIsListTerminator(a))break;S=-1;let k=p();if(k==null)return;if(E.push(k),this.eat(s.comma)){S=this.lastTokStart;continue}if(this.tsIsListTerminator(a))break;if(d)this.expect(s.comma);return}if(m)m.value=S;return E}tsParseDelimitedList(a,p,d){return Xd(this.tsParseDelimitedListWorker(a,p,!0,d))}tsParseBracketedList(a,p,d,m,E){if(!m)if(d)this.expect(s.bracketL);else this.expect(s.relational);let S=this.tsParseDelimitedList(a,p,E);if(d)this.expect(s.bracketR);else this.expect(s.relational);return S}tsParseTypeParameterName(){return this.parseIdent().name}tsEatThenParseType(a){return!this.match(a)?void 0:this.tsNextThenParseType()}tsExpectThenParseType(a){return this.tsDoThenParseType(()=>this.expect(a))}tsNextThenParseType(){return this.tsDoThenParseType(()=>this.next())}tsDoThenParseType(a){return this.tsInType(()=>(a(),this.tsParseType()))}tsSkipParameterStart(){if(v(this.type)||this.match(s._this))return this.next(),!0;if(this.match(s.braceL))try{return this.parseObj(!0),!0}catch{return!1}if(this.match(s.bracketL)){this.next();try{return this.parseBindingList(s.bracketR,!0,!0),!0}catch{return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){if(this.next(),this.match(s.parenR)||this.match(s.ellipsis))return!0;if(this.tsSkipParameterStart()){if(this.match(s.colon)||this.match(s.comma)||this.match(s.question)||this.match(s.eq))return!0;if(this.match(s.parenR)){if(this.next(),this.match(s.arrow))return!0}}return!1}tsIsStartOfFunctionType(){if(this.tsMatchLeftRelational())return!0;return this.match(s.parenL)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsInAllowConditionalTypesContext(a){let p=this.inDisallowConditionalTypesContext;this.inDisallowConditionalTypesContext=!1;try{return a()}finally{this.inDisallowConditionalTypesContext=p}}tsParseBindingListForSignature(){return super.parseBindingList(s.parenR,!0,!0).map((a)=>{if(a.type!=="Identifier"&&a.type!=="RestElement"&&a.type!=="ObjectPattern"&&a.type!=="ArrayPattern")this.raise(a.start,F.UnsupportedSignatureParameterKind({type:a.type}));return a})}tsParseTypePredicateAsserts(){if(this.type!==b.asserts)return!1;let a=this.containsEsc;if(this.next(),!v(this.type)&&!this.match(s._this))return!1;if(a)this.raise(this.lastTokStart,"Escape sequence in keyword asserts");return!0}tsParseThisTypeNode(){let a=this.startNode();return this.next(),this.finishNode(a,"TSThisType")}tsParseTypeAnnotation(a=!0,p=this.startNode()){return this.tsInType(()=>{if(a)this.expect(s.colon);p.typeAnnotation=this.tsParseType()}),this.finishNode(p,"TSTypeAnnotation")}tsParseThisTypePredicate(a){this.next();let p=this.startNodeAtNode(a);return p.parameterName=a,p.typeAnnotation=this.tsParseTypeAnnotation(!1),p.asserts=!1,this.finishNode(p,"TSTypePredicate")}tsParseThisTypeOrThisTypePredicate(){let a=this.tsParseThisTypeNode();if(this.isContextual("is")&&!this.hasPrecedingLineBreak())return this.tsParseThisTypePredicate(a);else return a}tsParseTypePredicatePrefix(){let a=this.parseIdent();if(this.isContextual("is")&&!this.hasPrecedingLineBreak())return this.next(),a}tsParseTypeOrTypePredicateAnnotation(a){return this.tsInType(()=>{let p=this.startNode();this.expect(a);let d=this.startNode(),m=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(m){let x=this.tsParseTypeAnnotation(!1);return d.parameterName=m,d.typeAnnotation=x,d.asserts=!1,p.typeAnnotation=this.finishNode(d,"TSTypePredicate"),this.finishNode(p,"TSTypeAnnotation")}let E=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(E&&this.match(s._this)){let x=this.tsParseThisTypeOrThisTypePredicate();if(x.type==="TSThisType")d.parameterName=x,d.asserts=!0,d.typeAnnotation=null,x=this.finishNode(d,"TSTypePredicate");else this.resetStartLocationFromNode(x,d),x.asserts=!0;return p.typeAnnotation=x,this.finishNode(p,"TSTypeAnnotation")}let S=E&&this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!S){if(!E)return this.tsParseTypeAnnotation(!1,p);return d.parameterName=this.parseIdent(),d.asserts=E,d.typeAnnotation=null,p.typeAnnotation=this.finishNode(d,"TSTypePredicate"),this.finishNode(p,"TSTypeAnnotation")}let k=this.tsParseTypeAnnotation(!1);return d.parameterName=S,d.typeAnnotation=k,d.asserts=E,p.typeAnnotation=this.finishNode(d,"TSTypePredicate"),this.finishNode(p,"TSTypeAnnotation")})}tsFillSignature(a,p){let d=a===s.arrow,m="parameters",E="typeAnnotation";if(p.typeParameters=this.tsTryParseTypeParameters(),this.expect(s.parenL),p.parameters=this.tsParseBindingListForSignature(),d)p.typeAnnotation=this.tsParseTypeOrTypePredicateAnnotation(a);else if(this.match(a))p.typeAnnotation=this.tsParseTypeOrTypePredicateAnnotation(a)}tsTryNextParseConstantContext(){if(this.lookahead().type!==s._const)return null;this.next();let a=this.tsParseTypeReference();if(a.typeParameters||a.typeArguments)this.raise(a.typeName.start,F.CannotFindName({name:"const"}));return a}tsParseFunctionOrConstructorType(a,p){let d=this.startNode();if(a==="TSConstructorType"){if(d.abstract=!!p,p)this.next();this.next()}return this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(s.arrow,d)),this.finishNode(d,a)}tsParseUnionOrIntersectionType(a,p,d){let m=this.startNode(),E=this.eat(d),S=[];do S.push(p());while(this.eat(d));if(S.length===1&&!E)return S[0];return m.types=S,this.finishNode(m,a)}tsCheckTypeAnnotationForReadOnly(a){switch(a.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(a.start,F.UnexpectedReadonly)}}tsParseTypeOperator(){let a=this.startNode(),p=this.value;if(this.next(),a.operator=p,a.typeAnnotation=this.tsParseTypeOperatorOrHigher(),p==="readonly")this.tsCheckTypeAnnotationForReadOnly(a);return this.finishNode(a,"TSTypeOperator")}tsParseConstraintForInferType(){if(this.eat(s._extends)){let a=this.tsInDisallowConditionalTypesContext(()=>this.tsParseType());if(this.inDisallowConditionalTypesContext||!this.match(s.question))return a}}tsParseInferType(){let a=this.startNode();this.expectContextual("infer");let p=this.startNode();return p.name=this.tsParseTypeParameterName(),p.constraint=this.tsTryParse(()=>this.tsParseConstraintForInferType()),a.typeParameter=this.finishNode(p,"TSTypeParameter"),this.finishNode(a,"TSInferType")}tsParseLiteralTypeNode(){let a=this.startNode();return a.literal=(()=>{switch(this.type){case s.num:case s.string:case s._true:case s._false:return this.parseExprAtom();default:this.unexpected()}})(),this.finishNode(a,"TSLiteralType")}tsParseImportType(){let a=this.startNode();if(this.expect(s._import),this.expect(s.parenL),!this.match(s.string))this.raise(this.start,F.UnsupportedImportTypeArgument);if(a.argument=this.parseExprAtom(),this.expect(s.parenR),this.eat(s.dot))a.qualifier=this.tsParseEntityName();if(this.tsMatchLeftRelational())a.typeArguments=this.tsParseTypeArguments();return this.finishNode(a,"TSImportType")}tsParseTypeQuery(){let a=this.startNode();if(this.expect(s._typeof),this.match(s._import))a.exprName=this.tsParseImportType();else a.exprName=this.tsParseEntityName();if(!this.hasPrecedingLineBreak()&&this.tsMatchLeftRelational())a.typeArguments=this.tsParseTypeArguments();return this.finishNode(a,"TSTypeQuery")}tsParseMappedTypeParameter(){let a=this.startNode();return a.name=this.tsParseTypeParameterName(),a.constraint=this.tsExpectThenParseType(s._in),this.finishNode(a,"TSTypeParameter")}tsParseMappedType(){let a=this.startNode();if(this.expect(s.braceL),this.match(s.plusMin))a.readonly=this.value,this.next(),this.expectContextual("readonly");else if(this.eatContextual("readonly"))a.readonly=!0;if(this.expect(s.bracketL),a.typeParameter=this.tsParseMappedTypeParameter(),a.nameType=this.eatContextual("as")?this.tsParseType():null,this.expect(s.bracketR),this.match(s.plusMin))a.optional=this.value,this.next(),this.expect(s.question);else if(this.eat(s.question))a.optional=!0;return a.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(s.braceR),this.finishNode(a,"TSMappedType")}tsParseTypeLiteral(){let a=this.startNode();return a.members=this.tsParseObjectTypeMembers(),this.finishNode(a,"TSTypeLiteral")}tsIsTupleElementLabel(){if(!w(this.type))return!1;let a=this.lookahead();if(a.type===s.colon)return!0;if(a.type!==s.question)return!1;return this.lookahead(2).type===s.colon}tsParseTupleElementType(){let a=this.startLoc,p=this.start,d=this.eat(s.ellipsis),m;if(this.tsIsTupleElementLabel()){let E=this.startNode();E.label=this.parseIdent(!0),E.optional=this.eat(s.question),this.expect(s.colon),E.elementType=this.tsParseType(),m=this.finishNode(E,"TSNamedTupleMember")}else{m=this.tsParseType();let E=this.eat(s.question);if(this.eat(s.colon))this.raise(m.start,F.InvalidTupleMemberLabel);if(E){let S=this.startNodeAtNode(m);S.typeAnnotation=m,m=this.finishNode(S,"TSOptionalType")}}if(d){let E=this.startNodeAt(p,a);E.typeAnnotation=m,m=this.finishNode(E,"TSRestType")}return m}tsParseTupleType(){let a=this.startNode();a.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let p=!1;return a.elementTypes.forEach((d)=>{let{type:m}=d;if(p&&m!=="TSRestType"&&m!=="TSOptionalType"&&!(m==="TSNamedTupleMember"&&d.optional))this.raise(d.start,F.OptionalTypeBeforeRequired);if(p||=m==="TSNamedTupleMember"&&d.optional||m==="TSOptionalType",m==="TSRestType")d=d.typeAnnotation}),this.finishNode(a,"TSTupleType")}tsParseTemplateLiteralType(){let a=this.startNode();return a.literal=this.parseTemplate({isTagged:!1}),this.finishNode(a,"TSLiteralType")}tsParseTypeReference(){let a=this.startNode();if(a.typeName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.tsMatchLeftRelational())a.typeArguments=this.tsParseTypeArguments();return this.finishNode(a,"TSTypeReference")}tsMatchLeftRelational(){return this.match(s.relational)&&this.value==="<"}tsMatchRightRelational(){return this.match(s.relational)&&this.value===">"}tsParseParenthesizedType(){let a=this.startNode();return this.expect(s.parenL),a.typeAnnotation=this.tsParseType(),this.expect(s.parenR),this.finishNode(a,"TSParenthesizedType")}tsParseNonArrayType(){switch(this.type){case s.string:case s.num:case s._true:case s._false:return this.tsParseLiteralTypeNode();case s.plusMin:if(this.value==="-"){let a=this.startNode();if(this.lookahead().type!==s.num)this.unexpected();return a.literal=this.parseMaybeUnary(),this.finishNode(a,"TSLiteralType")}break;case s._this:return this.tsParseThisTypeOrThisTypePredicate();case s._typeof:return this.tsParseTypeQuery();case s._import:return this.tsParseImportType();case s.braceL:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case s.bracketL:return this.tsParseTupleType();case s.parenL:return this.tsParseParenthesizedType();case s.backQuote:case s.dollarBraceL:return this.tsParseTemplateLiteralType();default:{let{type:a}=this;if(w(a)||a===s._void||a===s._null){let p=a===s._void?"TSVoidKeyword":a===s._null?"TSNullKeyword":Yd(this.value);if(p!==void 0&&this.lookaheadCharCode()!==46){let d=this.startNode();return this.next(),this.finishNode(d,p)}return this.tsParseTypeReference()}}}this.unexpected()}tsParseArrayTypeOrHigher(){let a=this.tsParseNonArrayType();while(!this.hasPrecedingLineBreak()&&this.eat(s.bracketL))if(this.match(s.bracketR)){let p=this.startNodeAtNode(a);p.elementType=a,this.expect(s.bracketR),a=this.finishNode(p,"TSArrayType")}else{let p=this.startNodeAtNode(a);p.objectType=a,p.indexType=this.tsParseType(),this.expect(s.bracketR),a=this.finishNode(p,"TSIndexedAccessType")}return a}tsParseTypeOperatorOrHigher(){return M(this.type)&&!this.containsEsc?this.tsParseTypeOperator():this.isContextual("infer")?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),s.bitwiseAND)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),s.bitwiseOR)}tsParseNonConditionalType(){if(this.tsIsStartOfFunctionType())return this.tsParseFunctionOrConstructorType("TSFunctionType");if(this.match(s._new))return this.tsParseFunctionOrConstructorType("TSConstructorType");else if(this.isAbstractConstructorSignature())return this.tsParseFunctionOrConstructorType("TSConstructorType",!0);return this.tsParseUnionTypeOrHigher()}tsParseType(){Mo(this.inType);let a=this.tsParseNonConditionalType();if(this.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(s._extends))return a;let p=this.startNodeAtNode(a);return p.checkType=a,p.extendsType=this.tsInDisallowConditionalTypesContext(()=>this.tsParseNonConditionalType()),this.expect(s.question),p.trueType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.expect(s.colon),p.falseType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.finishNode(p,"TSConditionalType")}tsIsUnambiguouslyIndexSignature(){if(this.next(),v(this.type))return this.next(),this.match(s.colon);return!1}tsInType(a){let p=this.inType;this.inType=!0;try{return a()}finally{this.inType=p}}tsTryParseIndexSignature(a){if(!(this.match(s.bracketL)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))))return;this.expect(s.bracketL);let p=this.parseIdent();p.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(p),this.expect(s.bracketR),a.parameters=[p];let d=this.tsTryParseTypeAnnotation();if(d)a.typeAnnotation=d;return this.tsParseTypeMemberSemicolon(),this.finishNode(a,"TSIndexSignature")}tsParseNoneModifiers(a){this.tsParseModifiers({modified:a,allowedModifiers:[],disallowedModifiers:["in","out"],errorTemplate:F.InvalidModifierOnTypeParameterPositions})}tsParseTypeParameter(a=this.tsParseNoneModifiers.bind(this)){let p=this.startNode();return a(p),p.name=this.tsParseTypeParameterName(),p.constraint=this.tsEatThenParseType(s._extends),p.default=this.tsEatThenParseType(s.eq),this.finishNode(p,"TSTypeParameter")}tsParseTypeParameters(a){let p=this.startNode();if(this.tsMatchLeftRelational()||this.matchJsx("jsxTagStart"))this.next();else this.unexpected();let d={value:-1};if(p.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,a),!1,!0,d),p.params.length===0)this.raise(this.start,F.EmptyTypeParameters);if(d.value!==-1)this.addExtra(p,"trailingComma",d.value);return this.finishNode(p,"TSTypeParameterDeclaration")}tsTryParseTypeParameters(a){if(this.tsMatchLeftRelational())return this.tsParseTypeParameters(a)}tsTryParse(a){let p=this.beginParseEffectScope(),d;try{d=a()}catch(m){throw this.parseEffects.rollback(p),m}if(d!==void 0&&d!==!1)return this.parseEffects.commit(p),d;this.parseEffects.rollback(p);return}tsTokenCanFollowModifier(){return(this.match(s.bracketL)||this.match(s.braceL)||this.match(s.star)||this.match(s.ellipsis)||this.match(s.privateId)||this.isLiteralPropertyName())&&!this.hasPrecedingLineBreak()}tsNextTokenCanFollowModifier(){return this.next(!0),this.tsTokenCanFollowModifier()}tsParseModifier(a,p){let d=this.value;if(a.indexOf(d)!==-1&&!this.containsEsc){if(p&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return d}return}tsParseModifiersByMap({modified:a,map:p}){for(let d of Object.keys(p))a[d]=p[d]}tsParseModifiers({modified:a,allowedModifiers:p,disallowedModifiers:d,stopOnStartOfClassStaticBlock:m,errorTemplate:E=F.InvalidModifierOnTypeMember}){let S={},k=(C,T,L,_)=>{if(T===L&&a[_])this.raise(C.column,F.InvalidModifiersOrder({orderedModifiers:[L,_]}))},x=(C,T,L,_)=>{if(a[L]&&T===_||a[_]&&T===L)this.raise(C.column,F.IncompatibleModifiers({modifiers:[L,_]}))};for(;;){let C=this.startLoc,T=this.tsParseModifier(p.concat(d??[]),m);if(!T)break;if(Bo(T))if(a.accessibility)this.raise(this.start,F.DuplicateAccessibilityModifier());else k(C,T,T,"override"),k(C,T,T,"static"),k(C,T,T,"readonly"),k(C,T,T,"accessor"),S.accessibility=T,a.accessibility=T;else if(Gd(T))if(a[T])this.raise(this.start,F.DuplicateModifier({modifier:T}));else k(C,T,"in","out"),S[T]=T,a[T]=!0;else if(Ud(T))if(a[T])this.raise(this.start,F.DuplicateModifier({modifier:T}));else x(C,T,"accessor","readonly"),x(C,T,"accessor","override"),S[T]=T,a[T]=!0;else if(T==="const")if(a[T])this.raise(this.start,F.DuplicateModifier({modifier:T}));else S[T]=T,a[T]=!0;else if(Object.hasOwnProperty.call(a,T))this.raise(this.start,F.DuplicateModifier({modifier:T}));else k(C,T,"static","readonly"),k(C,T,"static","override"),k(C,T,"override","readonly"),k(C,T,"abstract","override"),x(C,T,"declare","override"),x(C,T,"static","abstract"),S[T]=T,a[T]=!0;if(d?.includes(T))this.raise(this.start,E)}return S}tsParseInOutModifiers(a){this.tsParseModifiers({modified:a,allowedModifiers:["in","out"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:F.InvalidModifierOnTypeParameter})}tsParseClassTypeParameterModifiers(a){this.tsParseModifiers({modified:a,allowedModifiers:["const","in","out"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:F.InvalidModifierOnTypeParameter})}parseMaybeUnary(a,p,d,m){if(!e?.jsx&&this.tsMatchLeftRelational())return this.tsParseTypeAssertion();else return super.parseMaybeUnary(a,p,d,m)}tsParseTypeAssertion(){if(n)this.raise(this.start,F.ReservedTypeAssertion);let a=this.tryParse(()=>{let p=this.startNode(),d=this.tsTryNextParseConstantContext();return p.typeAnnotation=d||this.tsNextThenParseType(),this.expect(s.relational),p.expression=this.parseMaybeUnary(),this.finishNode(p,"TSTypeAssertion")});if(a.error)return this.tsParseTypeParameters(this.tsParseConstModifier);else return a.node}tsParseTypeArguments(a=!1){let p=this.startNode();if(p.params=this.tsInType(()=>this.tsInNoContext(()=>(this.expect(s.relational),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))),p.params.length===0)this.raise(this.start,F.EmptyTypeArguments);if(a&&this.curContext()!==P.tc_oTag)this.reScan_lt_gt();if(!this.tsMatchRightRelational())this.unexpected();return this.exprAllowed=!1,this.next(),this.finishNode(p,"TSTypeParameterInstantiation")}tsParseHeritageClause(a){let p=this.start,d=this.tsParseDelimitedList("HeritageClauseElement",()=>{let m=this.startNode();if(m.expression=this.tsParseEntityName(),this.tsMatchLeftRelational())m.typeParameters=this.tsParseTypeArguments();return this.finishNode(m,"TSExpressionWithTypeArguments")});if(!d.length)this.raise(p,F.EmptyHeritageClauseType({token:a}));return d}tsParseTypeMemberSemicolon(){if(!this.eat(s.comma)&&!this.isLineTerminator())this.expect(s.semi)}tsTryParseAndCatch(a){let p=this.tryParse((d)=>a()||d());if(p.aborted||!p.node)return;return p.node}tsParseSignatureMember(a,p){return this.tsFillSignature(s.colon,p),this.tsParseTypeMemberSemicolon(),this.finishNode(p,a)}tsParsePropertyOrMethodSignature(a,p){if(this.eat(s.question))a.optional=!0;let d=a;if(this.match(s.parenL)||this.tsMatchLeftRelational()){if(p)this.raise(a.start,F.ReadonlyForMethodSignature);let m=d;if(m.kind&&this.tsMatchLeftRelational())this.raise(this.start,F.AccesorCannotHaveTypeParameters);this.tsFillSignature(s.colon,m),this.tsParseTypeMemberSemicolon();let E="parameters",S="typeAnnotation";if(m.kind==="get"){if(m[E].length>0){if(this.raise(this.start,"A 'get' accesor must not have any formal parameters."),this.isThisParam(m[E][0]))this.raise(this.start,F.AccesorCannotDeclareThisParameter)}}else if(m.kind==="set"){if(m[E].length!==1)this.raise(this.start,"A 'get' accesor must not have any formal parameters.");else{let k=m[E][0];if(this.isThisParam(k))this.raise(this.start,F.AccesorCannotDeclareThisParameter);if(k.type==="Identifier"&&k.optional)this.raise(this.start,F.SetAccesorCannotHaveOptionalParameter);if(k.type==="RestElement")this.raise(this.start,F.SetAccesorCannotHaveRestParameter)}if(m[S])this.raise(m[S].start,F.SetAccesorCannotHaveReturnType)}else m.kind="method";return this.finishNode(m,"TSMethodSignature")}else{let m=d;if(p)m.readonly=!0;let E=this.tsTryParseTypeAnnotation();if(E)m.typeAnnotation=E;return this.tsParseTypeMemberSemicolon(),this.finishNode(m,"TSPropertySignature")}}tsParseTypeMember(){let a=this.startNode();if(this.match(s.parenL)||this.tsMatchLeftRelational())return this.tsParseSignatureMember("TSCallSignatureDeclaration",a);if(this.match(s._new)){let d=this.startNode();if(this.next(),this.match(s.parenL)||this.tsMatchLeftRelational())return this.tsParseSignatureMember("TSConstructSignatureDeclaration",a);else return a.key=this.createIdentifier(d,"new"),this.tsParsePropertyOrMethodSignature(a,!1)}this.tsParseModifiers({modified:a,allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]});let p=this.tsTryParseIndexSignature(a);if(p)return p;if(this.parsePropertyName(a),!a.computed&&a.key.type==="Identifier"&&(a.key.name==="get"||a.key.name==="set")&&this.tsTokenCanFollowModifier())a.kind=a.key.name,this.parsePropertyName(a);return this.tsParsePropertyOrMethodSignature(a,!!a.readonly)}tsParseList(a,p){let d=[];while(!this.tsIsListTerminator(a))d.push(p());return d}tsParseObjectTypeMembers(){this.expect(s.braceL);let a=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(s.braceR),a}tsParseInterfaceDeclaration(a,p={}){if(this.hasFollowingLineBreak())return null;if(this.expectContextual("interface"),p.declare)a.declare=!0;if(v(this.type)){a.id=this.parseIdent(),this.checkLValSimple(a.id,ne.BIND_TS_INTERFACE);let m=this.currentScope();this.maybeExportDefined(m,a.id.name)}else a.id=null,this.raise(this.start,F.MissingInterfaceName);if(a.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers.bind(this)),this.eat(s._extends))a.extends=this.tsParseHeritageClause("extends");let d=this.startNode();return d.body=this.tsParseInterfaceBody(),a.body=this.finishNode(d,"TSInterfaceBody"),this.finishNode(a,"TSInterfaceDeclaration")}tsParseInterfaceBody(){this.expect(s.braceL);let a=this.inType;this.inType=!0;let p=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.inType=a,this.expect(s.braceR),p}tsParseAbstractDeclaration(a){if(this.match(s._class))return a.abstract=!0,this.parseClass(a,!0);else if(this.ts_isContextual(b.interface)){if(!this.hasFollowingLineBreak())return a.abstract=!0,this.tsParseInterfaceDeclaration(a)}else this.unexpected(a.start)}tsIsDeclarationStart(){return U(this.type)}tsParseExpressionStatement(a,p){switch(p.name){case"declare":{let d=this.tsTryParseDeclare(a);if(d)return d.declare=!0,d;break}case"global":if(this.match(s.braceL)){this.enterScope(Nn);let d=a;return d.global=!0,d.id=p,d.body=this.tsParseModuleBlock(),super.exitScope(),this.finishNode(d,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(a,p.name,!1)}}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)}tsIsExportDefaultSpecifier(){let{type:a}=this,p=this.isAsyncFunction(),d=this.isLet();if(v(a)){if(p&&!this.containsEsc||d)return!1;if((a===b.type||a===b.interface)&&!this.containsEsc){let S=this.lookahead();if(v(S.type)&&!this.isContextualWithState("from",S)||S.type===s.braceL)return!1}}else if(!this.match(s._default))return!1;let m=this.nextTokenStart(),E=this.isUnparsedContextual(m,"from");if(this.input.charCodeAt(m)===44||v(this.type)&&E)return!0;if(this.match(s._default)&&E){let S=this.input.charCodeAt(this.nextTokenStartSince(m+4));return S===34||S===39}return!1}tsInAmbientContext(a){let p=this.isAmbientContext;this.isAmbientContext=!0;try{return a()}finally{this.isAmbientContext=p}}tsCheckLineTerminator(a){if(a){if(this.hasFollowingLineBreak())return!1;return this.next(),!0}return!this.isLineTerminator()}tsParseModuleOrNamespaceDeclaration(a,p=!1){if(a.id=this.parseIdent(),!p)this.checkLValSimple(a.id,ne.BIND_TS_NAMESPACE);if(this.eat(s.dot)){let d=this.startNode();this.tsParseModuleOrNamespaceDeclaration(d,!0),a.body=d}else this.enterScope(Nn),a.body=this.tsParseModuleBlock(),super.exitScope();return this.finishNode(a,"TSModuleDeclaration")}checkLValSimple(a,p=ne.BIND_NONE,d){while(a.type==="TSNonNullExpression"||a.type==="TSAsExpression"||a.type==="TSSatisfiesExpression"||a.type==="TSTypeAssertion")a=a.expression;return super.checkLValSimple(a,p,d)}isSimpleAssignTarget(a){while(a.type==="TSNonNullExpression"||a.type==="TSAsExpression"||a.type==="TSSatisfiesExpression"||a.type==="TSTypeAssertion")a=a.expression;return super.isSimpleAssignTarget(a)}tsParseTypeAliasDeclaration(a){a.id=this.parseIdent(),this.checkLValSimple(a.id,ne.BIND_TS_TYPE);let p=this.currentScope();return this.maybeExportDefined(p,a.id.name),a.typeAnnotation=this.tsInType(()=>{if(a.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers.bind(this)),this.expect(s.eq),this.ts_isContextual(b.interface)&&this.lookahead().type!==s.dot){let d=this.startNode();return this.next(),this.finishNode(d,"TSIntrinsicKeyword")}return this.tsParseType()}),this.semicolon(),this.finishNode(a,"TSTypeAliasDeclaration")}tsParseDeclaration(a,p,d){switch(p){case"abstract":if(this.tsCheckLineTerminator(d)&&(this.match(s._class)||v(this.type)))return this.tsParseAbstractDeclaration(a);break;case"module":if(this.tsCheckLineTerminator(d)){if(this.match(s.string))return this.tsParseAmbientExternalModuleDeclaration(a);else if(v(this.type))return this.tsParseModuleOrNamespaceDeclaration(a)}break;case"namespace":if(this.tsCheckLineTerminator(d)&&v(this.type))return this.tsParseModuleOrNamespaceDeclaration(a);break;case"type":if(this.tsCheckLineTerminator(d)&&v(this.type))return this.tsParseTypeAliasDeclaration(a);break}}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.value,!0)}tsParseImportEqualsDeclaration(a,p){a.isExport=p||!1,a.id=this.parseIdent(),this.checkLValSimple(a.id,ne.BIND_LEXICAL),super.expect(s.eq);let d=this.tsParseModuleReference();if(a.importKind==="type"&&d.type!=="TSExternalModuleReference")this.raise(d.start,F.ImportAliasHasImportType);return a.moduleReference=d,super.semicolon(),this.finishNode(a,"TSImportEqualsDeclaration")}isExportDefaultSpecifier(){if(this.tsIsDeclarationStart())return!1;let{type:a}=this;if(v(a)){if(this.isContextual("async")||this.isContextual("let"))return!1;if((a===b.type||a===b.interface)&&!this.containsEsc){let m=this.lookahead();if(v(m.type)&&!this.isContextualWithState("from",m)||m.type===s.braceL)return!1}}else if(!this.match(s._default))return!1;let p=this.nextTokenStart(),d=this.isUnparsedContextual(p,"from");if(this.input.charCodeAt(p)===44||v(this.type)&&d)return!0;if(this.match(s._default)&&d){let m=this.input.charCodeAt(this.nextTokenStartSince(p+4));return m===34||m===39}return!1}parseTemplate({isTagged:a=!1}={}){let p=this.startNode();this.next(),p.expressions=[];let d=this.parseTemplateElement({isTagged:a});p.quasis=[d];while(!d.tail){if(this.type===s.eof)this.raise(this.pos,"Unterminated template literal");this.expect(s.dollarBraceL),p.expressions.push(this.inType?this.tsParseType():this.parseExpression()),this.expect(s.braceR),p.quasis.push(d=this.parseTemplateElement({isTagged:a}))}return this.next(),this.finishNode(p,"TemplateLiteral")}parseFunction(a,p,d,m,E){if(this.initFunction(a),this.ecmaVersion>=9||this.ecmaVersion>=6&&!m){if(this.type===s.star&&p&Oo)this.unexpected();a.generator=this.eat(s.star)}if(this.ecmaVersion>=8)a.async=!!m;if(p&lr)a.id=p&Wd&&this.type!==s.name?null:this.parseIdent();let S=this.yieldPos,k=this.awaitPos,x=this.awaitIdentPos,C=this.maybeInArrowParameters;if(this.maybeInArrowParameters=!1,this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Ni(a.async,a.generator)),!(p&lr))a.id=this.type===s.name?this.parseIdent():null;this.parseFunctionParams(a);let T=p&lr;if(this.parseFunctionBody(a,d,!1,E,{isFunctionDeclaration:T}),T&&this.isAmbientContext&&a.id){if(this.currentScope().flags&ne.SCOPE_TOP)this.declareName(a.id.name,ne.BIND_FLAGS_TS_EXPORT_ONLY,a.id.start)}if(this.yieldPos=S,this.awaitPos=k,this.awaitIdentPos=x,p&lr&&a.id&&!(p&Oo))if(a.body)this.checkLValSimple(a.id,this.strict||a.generator||a.async?this.treatFunctionsAsVar?ne.BIND_VAR:ne.BIND_LEXICAL:ne.BIND_FUNCTION);else this.checkLValSimple(a.id,ne.BIND_NONE);return this.maybeInArrowParameters=C,this.finishNode(a,T?"FunctionDeclaration":"FunctionExpression")}parseFunctionBody(a,p=!1,d=!1,m=!1,E){if(this.match(s.colon))a.returnType=this.tsParseTypeOrTypePredicateAnnotation(s.colon);let S=E?.isFunctionDeclaration?"TSDeclareFunction":E?.isClassMethod?"TSDeclareMethod":void 0;if(S&&!this.match(s.braceL)&&this.isLineTerminator())return this.exitScope(),this.finishNode(a,S);if(S==="TSDeclareFunction"&&this.isAmbientContext){if(this.raise(a.start,F.DeclareFunctionHasImplementation),a.declare)return super.parseFunctionBody(a,p,d,!1),this.finishNode(a,S)}return super.parseFunctionBody(a,p,d,m),a}parseNew(){if(this.containsEsc)this.raiseRecoverable(this.start,"Escape sequence in keyword new");let a=this.startNode(),p=this.parseIdent(!0);if(this.ecmaVersion>=6&&this.eat(s.dot)){a.meta=p;let k=this.containsEsc;if(a.property=this.parseIdent(!0),a.property.name!=="target")this.raiseRecoverable(a.property.start,"The only valid meta property for new is 'new.target'");if(k)this.raiseRecoverable(a.start,"'new.target' must not contain escaped characters");if(!this.allowNewDotTarget)this.raiseRecoverable(a.start,"'new.target' can only be used in functions and class static block");return this.finishNode(a,"MetaProperty")}let d=this.start,m=this.startLoc,E=this.type===s._import;if(a.callee=this.parseSubscripts(this.parseExprAtom(),d,m,!0,!1),E&&a.callee.type==="ImportExpression")this.raise(d,"Cannot use new with import()");let{callee:S}=a;if(S.type==="TSInstantiationExpression"&&!S.extra?.parenthesized)a.typeArguments=S.typeArguments,a.callee=S.expression;if(this.eat(s.parenL))a.arguments=this.parseExprList(s.parenR,this.ecmaVersion>=8,!1);else a.arguments=[];return this.finishNode(a,"NewExpression")}parseExprOp(a,p,d,m,E){if(s._in.binop>m&&!this.hasPrecedingLineBreak()){let S;if(this.isContextual("as"))S="TSAsExpression";if(this.isContextual("satisfies"))S="TSSatisfiesExpression";if(S){let k=this.startNodeAt(p,d);k.expression=a;let x=this.tsTryNextParseConstantContext();if(x)k.typeAnnotation=x;else k.typeAnnotation=this.tsNextThenParseType();return this.finishNode(k,S),this.reScan_lt_gt(),this.parseExprOp(k,p,d,m,E)}}return super.parseExprOp(a,p,d,m,E)}parseImportSpecifiers(){let a=[],p=!0;if(o.tokenIsIdentifier(this.type)){if(a.push(this.parseImportDefaultSpecifier()),!this.eat(s.comma))return a}if(this.type===s.star)return a.push(this.parseImportNamespaceSpecifier()),a;this.expect(s.braceL);while(!this.eat(s.braceR)){if(!p){if(this.expect(s.comma),this.afterTrailingComma(s.braceR))break}else p=!1;a.push(this.parseImportSpecifier())}return a}parseImport(a){let p=this.lookahead();if(a.importKind="value",this.importOrExportOuterKind="value",v(p.type)||this.match(s.star)||this.match(s.braceL)){let d=this.lookahead(2);if(d.type!==s.comma&&!this.isContextualWithState("from",d)&&d.type!==s.eq&&this.ts_eatContextualWithState("type",1,p))this.importOrExportOuterKind="type",a.importKind="type",p=this.lookahead(),d=this.lookahead(2);if(v(p.type)&&d.type===s.eq){this.next();let m=this.tsParseImportEqualsDeclaration(a);return this.importOrExportOuterKind="value",m}}if(this.next(),this.type===s.string)a.specifiers=[],a.source=this.parseExprAtom();else a.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),a.source=this.type===s.string?this.parseExprAtom():this.unexpected();if(this.parseMaybeImportAttributes(a),this.semicolon(),this.finishNode(a,"ImportDeclaration"),this.importOrExportOuterKind="value",a.importKind==="type"&&a.specifiers.length>1&&a.specifiers[0].type==="ImportDefaultSpecifier")this.raise(a.start,F.TypeImportCannotSpecifyDefaultAndNamed);return a}parseExportDefaultDeclaration(){if(this.isAbstractClass()){let a=this.startNode();return this.next(),a.abstract=!0,this.parseClass(a,!0)}if(this.match(b.interface)){let a=this.tsParseInterfaceDeclaration(this.startNode());if(a)return a}return super.parseExportDefaultDeclaration()}parseExportAllDeclaration(a,p){if(this.ecmaVersion>=11)if(this.eatContextual("as"))a.exported=this.parseModuleExportName(),this.checkExport(p,a.exported,this.lastTokStart);else a.exported=null;if(this.expectContextual("from"),this.type!==s.string)this.unexpected();return a.source=this.parseExprAtom(),this.parseMaybeImportAttributes(a),this.semicolon(),this.finishNode(a,"ExportAllDeclaration")}parseDynamicImport(a){if(this.next(),a.source=this.parseMaybeAssign(),this.eat(s.comma)){let p=this.parseExpression();a.arguments=[p]}if(!this.eat(s.parenR)){let p=this.start;if(this.eat(s.comma)&&this.eat(s.parenR))this.raiseRecoverable(p,"Trailing comma is not allowed in import()");else this.unexpected(p)}return this.finishNode(a,"ImportExpression")}parseExport(a,p){let d=this.lookahead();if(this.ts_eatWithState(s._import,2,d)){if(this.ts_isContextual(b.type)&&this.lookaheadCharCode()!==61)a.importKind="type",this.importOrExportOuterKind="type",this.next();else a.importKind="value",this.importOrExportOuterKind="value";let m=this.tsParseImportEqualsDeclaration(a,!0);return this.importOrExportOuterKind=void 0,m}else if(this.ts_eatWithState(s.eq,2,d)){let m=a;return m.expression=this.parseExpression(),this.semicolon(),this.importOrExportOuterKind=void 0,this.finishNode(m,"TSExportAssignment")}else if(this.ts_eatContextualWithState("as",2,d)){let m=a;return this.expectContextual("namespace"),m.id=this.parseIdent(),this.semicolon(),this.importOrExportOuterKind=void 0,this.finishNode(m,"TSNamespaceExportDeclaration")}else{let m=this.lookahead(2).type;if(this.ts_isContextualWithState(d,b.type)&&(m===s.braceL||m===s.star))this.next(),this.importOrExportOuterKind="type",a.exportKind="type";else this.importOrExportOuterKind="value",a.exportKind="value";if(this.next(),this.eat(s.star))return this.parseExportAllDeclaration(a,p);if(this.eat(s._default))return this.checkExport(p,"default",this.lastTokStart),a.declaration=this.parseExportDefaultDeclaration(),this.finishNode(a,"ExportDefaultDeclaration");if(this.shouldParseExportStatement()){if(a.declaration=this.parseExportDeclaration(a),a.declaration.type==="VariableDeclaration")this.checkVariableExport(p,a.declaration.declarations);else this.checkExport(p,a.declaration.id,a.declaration.id.start);a.specifiers=[],a.source=null}else{if(a.declaration=null,a.specifiers=this.parseExportSpecifiers(p),this.eatContextual("from")){if(this.type!==s.string)this.unexpected();a.source=this.parseExprAtom(),this.parseMaybeImportAttributes(a)}else{for(let E of a.specifiers)if(this.checkUnreserved(E.local),this.checkLocalExport(E.local),E.local.type==="Literal")this.raise(E.local.start,"A string literal cannot be used as an exported binding without `from`.");a.source=null}this.semicolon()}return this.finishNode(a,"ExportNamedDeclaration")}}checkExport(a,p,d){if(!a)return;if(typeof p!=="string")p=p.type==="Identifier"?p.name:p.value;a[p]=!0}parseMaybeDefault(a,p,d){let m=super.parseMaybeDefault(a,p,d);if(m.type==="AssignmentPattern"&&m.typeAnnotation&&m.right.start<m.typeAnnotation.start)this.raise(m.typeAnnotation.start,F.TypeAnnotationAfterAssign);return m}typeCastToParameter(a){return a.expression.typeAnnotation=a.typeAnnotation,this.resetEndLocation(a.expression,a.typeAnnotation.end,a.typeAnnotation.loc?.end),a.expression}toAssignableList(a,p){if(!a)a=[];for(let d=0;d<a.length;d++){let m=a[d];if(m?.type==="TSTypeCastExpression")a[d]=this.typeCastToParameter(m)}return super.toAssignableList(a,p)}reportReservedArrowTypeParam(a){if(a.params.length===1&&!a.extra?.trailingComma&&n)this.raise(a.start,F.ReservedArrowTypeParam)}parseExprAtom(a,p,d){if(this.type===b.jsxText)return this.jsx_parseText();else if(this.type===b.jsxTagStart)return this.jsx_parseElement();else if(this.type===b.at)return this.parseDecorators(),this.parseExprAtom();else if(v(this.type)){let m=this.potentialArrowAt===this.start,E=this.start,S=this.startLoc,k=this.containsEsc,x=this.parseIdent(!1);if(this.ecmaVersion>=8&&!k&&x.name==="async"&&!this.canInsertSemicolon()&&this.eat(s._function))return this.overrideContext(y.f_expr),this.parseFunction(this.startNodeAt(E,S),0,!1,!0,p);if(m&&!this.canInsertSemicolon()){if(this.eat(s.arrow))return this.parseArrowExpression(this.startNodeAt(E,S),[x],!1,p);if(this.ecmaVersion>=8&&x.name==="async"&&this.type===s.name&&!k&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc)){if(x=this.parseIdent(!1),this.canInsertSemicolon()||!this.eat(s.arrow))this.unexpected();return this.parseArrowExpression(this.startNodeAt(E,S),[x],!0,p)}}return x}else return super.parseExprAtom(a,p,d)}parseExprAtomDefault(){if(v(this.type)){let a=this.potentialArrowAt===this.start,p=this.containsEsc,d=this.parseIdent();if(!p&&d.name==="async"&&!this.canInsertSemicolon()){let{type:m}=this;if(m===s._function)return this.next(),this.parseFunction(this.startNodeAtNode(d),void 0,!0,!0);else if(v(m))if(this.lookaheadCharCode()===61){let E=this.parseIdent(!1);if(this.canInsertSemicolon()||!this.eat(s.arrow))this.unexpected();return this.parseArrowExpression(this.startNodeAtNode(d),[E],!0)}else return d}if(a&&this.match(s.arrow)&&!this.canInsertSemicolon())return this.next(),this.parseArrowExpression(this.startNodeAtNode(d),[d],!1);return d}else this.unexpected()}parseIdentNode(){let a=this.startNode();if(w(this.type)&&!((this.type.keyword==="class"||this.type.keyword==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46)))a.name=this.value;else return super.parseIdentNode();return a}parseVarStatement(a,p,d=!1){let{isAmbientContext:m}=this;this.next(),super.parseVar(a,!1,p,d||m),this.semicolon();let E=this.finishNode(a,"VariableDeclaration");if(!m)return E;for(let{id:S,init:k}of E.declarations){if(!k)continue;if(p!=="const"||!!S.typeAnnotation)this.raise(k.start,F.InitializerNotAllowedInAmbientContext);else if(k.type!=="Literal"&&(k.type!=="TemplateLiteral"||k.expressions.length>0)&&!zd(k)&&!Kd(k))this.raise(k.start,F.ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference)}return E}parseStatement(a,p,d){if(this.match(b.at))this.parseDecorators(!0);if(this.match(s._const)&&this.isLookaheadContextual("enum")){let m=this.startNode();return this.expect(s._const),this.tsParseEnumDeclaration(m,{const:!0})}if(this.ts_isContextual(b.enum))return this.tsParseEnumDeclaration(this.startNode());if(this.ts_isContextual(b.interface)){let m=this.tsParseInterfaceDeclaration(this.startNode());if(m)return m}return super.parseStatement(a,p,d)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}parsePostMemberNameModifiers(a){if(this.eat(s.question))a.optional=!0;if(a.readonly&&this.match(s.parenL))this.raise(a.start,F.ClassMethodHasReadonly);if(a.declare&&this.match(s.parenL))this.raise(a.start,F.ClassMethodHasDeclare)}parseExpressionStatement(a,p){return(p.type==="Identifier"?this.tsParseExpressionStatement(a,p):void 0)||super.parseExpressionStatement(a,p)}shouldParseExportStatement(){if(this.tsIsDeclarationStart())return!0;if(this.match(b.at))return!0;return super.shouldParseExportStatement()}parseConditional(a,p,d,m,E){if(this.eat(s.question)){let S=this.startNodeAt(p,d);return S.test=a,S.consequent=this.parseMaybeAssign(),this.expect(s.colon),S.alternate=this.parseMaybeAssign(m),this.finishNode(S,"ConditionalExpression")}return a}parseMaybeConditional(a,p){let d=this.start,m=this.startLoc,E=this.parseExprOps(a,p);if(this.checkExpressionErrors(p))return E;if(!this.maybeInArrowParameters||!this.match(s.question))return this.parseConditional(E,d,m,a,p);let S=this.tryParse(()=>this.parseConditional(E,d,m,a,p));if(!S.node){if(S.error)this.setOptionalParametersError(p,S.error);return E}return S.node}parseParenItem(a){let p=this.start,d=this.startLoc;if(a=super.parseParenItem(a),this.eat(s.question))a.optional=!0,this.resetEndLocation(a);if(this.match(s.colon)){let m=this.startNodeAt(p,d);return m.expression=a,m.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(m,"TSTypeCastExpression")}return a}parseExportDeclaration(a){if(!this.isAmbientContext&&this.ts_isContextual(b.declare))return this.tsInAmbientContext(()=>this.parseExportDeclaration(a));let p=this.start,d=this.startLoc,m=this.eatContextual("declare");if(m&&(this.ts_isContextual(b.declare)||!this.shouldParseExportStatement()))this.raise(this.start,F.ExpectedAmbientAfterExportDeclare);let S=v(this.type)&&this.tsTryParseExportDeclaration()||this.parseStatement(null);if(!S)return null;if(S.type==="TSInterfaceDeclaration"||S.type==="TSTypeAliasDeclaration"||m)a.exportKind="type";if(m)this.resetStartLocation(S,p,d),S.declare=!0;return S}parseClassId(a,p){if(!p&&this.isContextual("implements"))return;super.parseClassId(a,p);let d=this.tsTryParseTypeParameters(this.tsParseClassTypeParameterModifiers.bind(this));if(d)a.typeParameters=d}parseClassPropertyAnnotation(a){if(!a.optional){if(this.value==="!"&&this.eat(s.prefix))a.definite=!0;else if(this.eat(s.question))a.optional=!0}let p=this.tsTryParseTypeAnnotation();if(p)a.typeAnnotation=p}parseClassField(a){if(a.key.type==="PrivateIdentifier"){if(a.abstract)this.raise(a.start,F.PrivateElementHasAbstract);if(a.accessibility)this.raise(a.start,F.PrivateElementHasAccessibility({modifier:a.accessibility}));this.parseClassPropertyAnnotation(a)}else{if(this.parseClassPropertyAnnotation(a),this.isAmbientContext&&!(a.readonly&&!a.typeAnnotation)&&this.match(s.eq))this.raise(this.start,F.DeclareClassFieldHasInitializer);if(a.abstract&&this.match(s.eq)){let{key:d}=a;this.raise(this.start,F.AbstractPropertyHasInitializer({propertyName:d.type==="Identifier"&&!a.computed?d.name:`[${this.input.slice(d.start,d.end)}]`}))}}return super.parseClassField(a)}parseClassMethod(a,p,d,m){let E=a.kind==="constructor",S=a.key.type==="PrivateIdentifier",k=this.tsTryParseTypeParameters(this.tsParseConstModifier);if(S){if(k)a.typeParameters=k;if(a.accessibility)this.raise(a.start,F.PrivateMethodsHasAccessibility({modifier:a.accessibility}))}else if(k&&E)this.raise(k.start,F.ConstructorHasTypeParameters);let{declare:x=!1,kind:C}=a;if(x&&(C==="get"||C==="set"))this.raise(a.start,F.DeclareAccessor({kind:C}));if(k)a.typeParameters=k;let T=a.key;if(a.kind==="constructor"){if(p)this.raise(T.start,"Constructor can't be a generator");if(d)this.raise(T.start,"Constructor can't be an async method")}else if(a.static&&Io(a,"prototype"))this.raise(T.start,"Classes may not have a static property named prototype");let L=a.value=this.parseMethod(p,d,m,!0,a);if(a.kind==="get"&&L.params.length!==0)this.raiseRecoverable(L.start,"getter should have no params");if(a.kind==="set"&&L.params.length!==1)this.raiseRecoverable(L.start,"setter should have exactly one param");if(a.kind==="set"&&L.params[0].type==="RestElement")this.raiseRecoverable(L.params[0].start,"Setter cannot use rest params");return this.finishNode(a,"MethodDefinition")}isClassMethod(){return this.match(s.relational)}parseClassElement(a){if(this.eat(s.semi))return null;let p=this.startNode(),d="",m=!1,E=!1,S="method",k=!1,x=["declare","private","public","protected","accessor","override","abstract","readonly","static"],C=this.tsParseModifiers({modified:p,allowedModifiers:x,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:F.InvalidModifierOnTypeParameterPositions});k=Boolean(C.static);let T=()=>{if(this.tsIsStartOfStaticBlocks()){if(this.next(),this.next(),this.tsHasSomeModifiers(p,x))this.raise(this.start,F.StaticBlockCannotHaveModifier);if(this.ecmaVersion>=13)return super.parseClassStaticBlock(p),p}else{let L=this.tsTryParseIndexSignature(p);if(L){if(p.abstract)this.raise(p.start,F.IndexSignatureHasAbstract);if(p.accessibility)this.raise(p.start,F.IndexSignatureHasAccessibility({modifier:p.accessibility}));if(p.declare)this.raise(p.start,F.IndexSignatureHasDeclare);if(p.override)this.raise(p.start,F.IndexSignatureHasOverride);return L}if(!this.inAbstractClass&&p.abstract)this.raise(p.start,F.NonAbstractClassHasAbstractMethod);if(p.override){if(!a)this.raise(p.start,F.OverrideNotInSubClass)}if(p.static=k,k){if(!(this.isClassElementNameStart()||this.type===s.star))d="static"}if(!d&&this.ecmaVersion>=8&&this.eatContextual("async"))if((this.isClassElementNameStart()||this.type===s.star)&&!this.canInsertSemicolon())E=!0;else d="async";if(!d&&(this.ecmaVersion>=9||!E)&&this.eat(s.star))m=!0;if(!d&&!E&&!m){let _=this.value;if(this.eatContextual("get")||this.eatContextual("set"))if(this.isClassElementNameStart())S=_;else d=_}if(d)p.computed=!1,p.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),p.key.name=d,this.finishNode(p.key,"Identifier");else this.parseClassElementName(p);if(this.parsePostMemberNameModifiers(p),this.isClassMethod()||this.ecmaVersion<13||this.type===s.parenL||S!=="method"||m||E){let _=!p.static&&Io(p,"constructor"),A=_&&a;if(_&&S!=="method")this.raise(p.key.start,"Constructor can't have get/set modifier");p.kind=_?"constructor":S,this.parseClassMethod(p,m,E,A)}else this.parseClassField(p);return p}};if(p.declare)this.tsInAmbientContext(T);else T();return p}isClassElementNameStart(){if(this.tsIsIdentifier())return!0;return super.isClassElementNameStart()}parseClassSuper(a){if(super.parseClassSuper(a),a.superClass&&(this.tsMatchLeftRelational()||this.match(s.bitShift)))a.superTypeParameters=this.tsParseTypeArgumentsInExpression();if(this.eatContextual("implements"))a.implements=this.tsParseHeritageClause("implements")}parseFunctionParams(a){let p=this.tsTryParseTypeParameters(this.tsParseConstModifier);if(p)a.typeParameters=p;super.parseFunctionParams(a)}parseVarId(a,p){if(super.parseVarId(a,p),a.id.type==="Identifier"&&!this.hasPrecedingLineBreak()&&this.value==="!"&&this.eat(s.prefix))a.definite=!0;let d=this.tsTryParseTypeAnnotation();if(d)a.id.typeAnnotation=d,this.resetEndLocation(a.id)}parseArrowExpression(a,p,d,m){if(this.match(s.colon))a.returnType=this.tsParseTypeAnnotation();let E=this.yieldPos,S=this.awaitPos,k=this.awaitIdentPos;this.enterScope(Ni(d,!1)|ne.SCOPE_ARROW),this.initFunction(a);let x=this.maybeInArrowParameters;if(this.ecmaVersion>=8)a.async=!!d;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.maybeInArrowParameters=!0,a.params=this.toAssignableList(p,!0),this.maybeInArrowParameters=!1,this.parseFunctionBody(a,!0,!1,m),this.yieldPos=E,this.awaitPos=S,this.awaitIdentPos=k,this.maybeInArrowParameters=x,this.finishNode(a,"ArrowFunctionExpression")}parseYield(a){if(!this.yieldPos)this.yieldPos=this.start;let p=this.startNode();this.next();let d=this.tsMatchLeftRelational();if(!(!this.match(s.semi)&&!this.canInsertSemicolon()&&(this.match(s.star)||this.type.startsExpr||d)))return p.delegate=!1,p.argument=null,this.finishNode(p,"YieldExpression");return p.delegate=this.eat(s.star),p.argument=this.parseMaybeAssign(a),this.finishNode(p,"YieldExpression")}parseMaybeAssignOrigin(a,p,d){if(this.isContextual("yield"))if(this.inGenerator)return this.parseYield(a);else this.exprAllowed=!1;let m=!1,E=-1,S=-1,k=-1;if(p)E=p.parenthesizedAssign,S=p.trailingComma,k=p.doubleProto,p.parenthesizedAssign=p.trailingComma=-1;else p=new Dn,m=!0;let x=this.start,C=this.startLoc;if(this.type===s.parenL||v(this.type))this.potentialArrowAt=this.start,this.potentialArrowInForAwait=a==="await";let T=this.parseMaybeConditional(a,p);if(d)T=d.call(this,T,x,C);if(this.type.isAssign){let L=this.startNodeAt(x,C);if(L.operator=this.value,this.type===s.eq)T=this.toAssignable(T,!0,p,!0);if(!m)p.parenthesizedAssign=p.trailingComma=p.doubleProto=-1;if(p.shorthandAssign>=T.start)p.shorthandAssign=-1;if(!this.maybeInArrowParameters)if(this.type===s.eq)this.checkLValPattern(T);else this.checkLValSimple(T);if(L.left=T,this.next(),L.right=this.parseMaybeAssign(a),k>-1)p.doubleProto=k;return this.finishNode(L,"AssignmentExpression")}else if(m)this.checkExpressionErrors(p,!0);if(E>-1)p.parenthesizedAssign=E;if(S>-1)p.trailingComma=S;return T}parseMaybeAssign(a,p,d){let m,E;if(e?.jsx&&(this.matchJsx("jsxTagStart")||this.tsMatchLeftRelational())){if(m=this.tryParse(()=>this.parseMaybeAssignOrigin(a,p,d)),!m.error)return m.node;let x=this.context,C=x[x.length-1],T=x[x.length-2];if(C===o.tokContexts.tc_oTag&&T===o.tokContexts.tc_expr)this.parseEffects.pop(x),this.parseEffects.pop(x);else if(C===o.tokContexts.tc_oTag||C===o.tokContexts.tc_expr)this.parseEffects.pop(x)}if(!m?.error&&!this.tsMatchLeftRelational())return this.parseMaybeAssignOrigin(a,p,d);let S,k=this.tryParse((x)=>{S=this.tsParseTypeParameters(this.tsParseConstModifier);let C=this.parseMaybeAssignOrigin(a,p,d);if(C.type!=="ArrowFunctionExpression"||C.extra?.parenthesized)x();if(S?.params.length!==0)this.resetStartLocationFromNode(C,S);return C.typeParameters=S,C});if(!k.error&&!k.aborted){if(S)this.reportReservedArrowTypeParam(S);return k.node}if(!m){if(Mo(!0),E=this.tryParse(()=>this.parseMaybeAssignOrigin(a,p,d)),!E.error)return E.node}if(m?.thrown)throw this.selectTryParseResult(m),m.error;if(k.thrown)throw this.selectTryParseResult(k),k.error;if(E?.thrown)throw this.selectTryParseResult(E),E.error;throw m?.error||k.error||E?.error}parseAssignableListItem(a){let p=[];while(this.match(b.at))p.push(this.parseDecorator());let d=this.start,m=this.startLoc,E,S=!1,k=!1;if(a!==void 0){let T={};if(this.tsParseModifiers({modified:T,allowedModifiers:["public","private","protected","override","readonly"]}),E=T.accessibility,k=T.override,S=T.readonly,a===!1&&(E||S||k))this.raise(m.column,F.UnexpectedParameterModifier)}let x=this.parseMaybeDefault(d,m);this.parseBindingListItem(x);let C=this.parseMaybeDefault(x.start,x.loc.start,x);if(p.length)C.decorators=p;if(E||S||k){let T=this.startNodeAt(d,m);if(E)T.accessibility=E;if(S)T.readonly=S;if(k)T.override=k;if(C.type!=="Identifier"&&C.type!=="AssignmentPattern")this.raise(T.start,F.UnsupportedParameterPropertyKind);return T.parameter=C,this.finishNode(T,"TSParameterProperty")}return C}checkLValInnerPattern(a,p=ne.BIND_NONE,d){switch(a.type){case"TSParameterProperty":this.checkLValInnerPattern(a.parameter,p,d);break;default:{super.checkLValInnerPattern(a,p,d);break}}}parseBindingListItem(a){if(this.eat(s.question)){if(a.type!=="Identifier"&&!this.isAmbientContext&&!this.inType)this.raise(a.start,F.PatternIsOptional);a.optional=!0}let p=this.tsTryParseTypeAnnotation();if(p)a.typeAnnotation=p;return this.resetEndLocation(a),a}isAssignable(a,p){switch(a.type){case"TSTypeCastExpression":return this.isAssignable(a.expression,p);case"TSParameterProperty":return!0;case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":return!0;case"ObjectExpression":{let d=a.properties.length-1;return a.properties.every((m,E)=>m.type!=="ObjectMethod"&&(E===d||m.type!=="SpreadElement")&&this.isAssignable(m))}case"Property":case"ObjectProperty":return this.isAssignable(a.value);case"SpreadElement":return this.isAssignable(a.argument);case"ArrayExpression":return a.elements.every((d)=>d===null||this.isAssignable(d));case"AssignmentExpression":return a.operator==="=";case"ParenthesizedExpression":return this.isAssignable(a.expression);case"MemberExpression":case"OptionalMemberExpression":return!p;default:return!1}}toAssignable(a,p=!1,d=new Dn,m=!1){switch(a.type){case"ParenthesizedExpression":return this.toAssignableParenthesizedExpression(a,p,d,m);case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":if(p);else this.raise(a.start,F.UnexpectedTypeCastInParameter);let E=this.toAssignable(a.expression,p,d,m);if(m)return a.expression=E,a;return E;case"MemberExpression":break;case"AssignmentExpression":if(!p&&a.left.type==="TSTypeCastExpression")a.left=this.typeCastToParameter(a.left);return super.toAssignable(a,p,d);case"TSTypeCastExpression":return this.typeCastToParameter(a);default:return super.toAssignable(a,p,d)}return a}toAssignableParenthesizedExpression(a,p,d,m=!1){switch(a.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":let E=this.toAssignable(a.expression,p,d,m);if(m)return a.expression=E,a;return E;default:return super.toAssignable(a,p,d)}}parseBindingAtom(){switch(this.type){case s._this:return this.parseIdent(!0);default:return super.parseBindingAtom()}}shouldParseArrow(a){let p;if(this.match(s.colon))p=a.every((d)=>this.isAssignable(d,!0));else p=!this.canInsertSemicolon();if(p){if(this.match(s.colon)){let d=this.tryParse((m)=>{let E=this.tsParseTypeOrTypePredicateAnnotation(s.colon);if(this.canInsertSemicolon()||!this.match(s.arrow))m();return E});if(d.aborted)return this.shouldParseArrowReturnType=void 0,!1;if(!d.thrown)this.shouldParseArrowReturnType=d.node}if(!this.match(s.arrow))return this.shouldParseArrowReturnType=void 0,!1;return!0}return this.shouldParseArrowReturnType=void 0,p}parseParenArrowList(a,p,d,m){let E=this.startNodeAt(a,p);return E.returnType=this.shouldParseArrowReturnType,this.shouldParseArrowReturnType=void 0,this.parseArrowExpression(E,d,!1,m)}parseParenAndDistinguishExpression(a,p){let d=this.start,m=this.startLoc,E,S=this.ecmaVersion>=8;if(this.ecmaVersion>=6){let k=this.maybeInArrowParameters;this.maybeInArrowParameters=!0,this.next();let x=this.start,C=this.startLoc,T=[],L=!0,_=!1,A=new Dn,I=this.yieldPos,O=this.awaitPos,H;this.yieldPos=0,this.awaitPos=0;while(this.type!==s.parenR)if(L?L=!1:this.expect(s.comma),S&&this.afterTrailingComma(s.parenR,!0)){_=!0;break}else if(this.type===s.ellipsis){if(H=this.start,T.push(this.parseParenItem(this.parseRestBinding())),this.type===s.comma)this.raise(this.start,"Comma is not permitted after the rest element");break}else T.push(this.parseMaybeAssign(!1,A,this.parseParenItem));let K=this.lastTokEnd,W=this.lastTokEndLoc;if(this.expect(s.parenR),this.maybeInArrowParameters=k,a&&this.shouldParseArrow(T)&&this.eat(s.arrow))return this.checkPatternErrors(A,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=I,this.awaitPos=O,this.parseParenArrowList(d,m,T,p);if(!T.length||_)this.unexpected(this.lastTokStart);if(H)this.unexpected(H);if(this.checkExpressionErrors(A,!0),this.yieldPos=I||this.yieldPos,this.awaitPos=O||this.awaitPos,T.length>1)E=this.startNodeAt(x,C),E.expressions=T,this.finishNodeAt(E,"SequenceExpression",K,W);else E=T[0]}else E=this.parseParenExpression();if(this.options.preserveParens){let k=this.startNodeAt(d,m);return k.expression=E,this.finishNode(k,"ParenthesizedExpression")}else return E}parseTaggedTemplateExpression(a,p,d,m){let E=this.startNodeAt(p,d);if(E.tag=a,E.quasi=this.parseTemplate({isTagged:!0}),m)this.raise(p,"Tagged Template Literals are not allowed in optionalChain.");return this.finishNode(E,"TaggedTemplateExpression")}shouldParseAsyncArrow(){if(this.match(s.colon)){let a=this.tryParse((p)=>{let d=this.tsParseTypeOrTypePredicateAnnotation(s.colon);if(this.canInsertSemicolon()||!this.match(s.arrow))p();return d});if(a.aborted)return this.shouldParseAsyncArrowReturnType=void 0,!1;if(!a.thrown)return this.shouldParseAsyncArrowReturnType=a.node,!this.canInsertSemicolon()&&this.eat(s.arrow)}else return!this.canInsertSemicolon()&&this.eat(s.arrow)}parseSubscriptAsyncArrow(a,p,d,m){let E=this.startNodeAt(a,p);return E.returnType=this.shouldParseAsyncArrowReturnType,this.shouldParseAsyncArrowReturnType=void 0,this.parseArrowExpression(E,d,!0,m)}parseExprList(a,p,d,m){let E=[],S=!0;while(!this.eat(a)){if(!S){if(this.expect(s.comma),p&&this.afterTrailingComma(a))break}else S=!1;let k;if(d&&this.type===s.comma)k=null;else if(this.type===s.ellipsis){if(k=this.parseSpread(m),this.maybeInArrowParameters&&this.match(s.colon))k.typeAnnotation=this.tsParseTypeAnnotation();if(m&&this.type===s.comma&&m.trailingComma<0)m.trailingComma=this.start}else k=this.parseMaybeAssign(!1,m,this.parseParenItem);E.push(k)}return E}parseMaybeDecoratorArguments(a){let p=this.tsMatchLeftRelational()||this.match(s.bitShift)?this.tsParseTypeArgumentsInExpression():void 0;if(this.eat(s.parenL)){let d=this.startNodeAtNode(a);if(d.callee=a,d.arguments=this.parseExprList(s.parenR,!1),p)d.typeArguments=p;return this.finishNode(d,"CallExpression")}if(p){let d=this.startNodeAtNode(a);return d.expression=a,d.typeArguments=p,this.finishNode(d,"TSInstantiationExpression")}return a}parseSubscript(a,p,d,m,E,S,k){let x=S;if(!this.hasPrecedingLineBreak()&&this.value==="!"&&this.match(s.prefix)){this.exprAllowed=!1,this.next();let A=this.startNodeAt(p,d);return A.expression=a,a=this.finishNode(A,"TSNonNullExpression"),a}let C=!1;if(this.match(s.questionDot)&&this.lookaheadCharCode()===60){if(m)return a;a.optional=!0,x=C=!0,this.next()}if(this.tsMatchLeftRelational()||this.match(s.bitShift)){let A,I=this.tsTryParseAndCatch(()=>{if(!m&&this.atPossibleAsyncArrow(a)){let W=this.tsTryParseGenericAsyncArrowFunction(p,d,k);if(W)return a=W,a}let O=this.tsParseTypeArgumentsInExpression();if(!O)return a;if(C&&!this.match(s.parenL))return A=this.curPosition(),a;if(j(this.type)||this.type===s.backQuote){let W=this.parseTaggedTemplateExpression(a,p,d,x);return W.typeArguments=O,W}if(!m&&this.eat(s.parenL)){let W=new Dn,J=this.startNodeAt(p,d);if(J.callee=a,J.arguments=this.parseExprList(s.parenR,this.ecmaVersion>=8,!1,W),this.tsCheckForInvalidTypeCasts(J.arguments),J.typeArguments=O,x)J.optional=C;return this.checkExpressionErrors(W,!0),a=this.finishNode(J,"CallExpression"),a}let H=this.type;if(this.tsMatchRightRelational()||H===s.bitShift||H!==s.parenL&&Jd(H)&&!this.hasPrecedingLineBreak())return;let K=this.startNodeAt(p,d);return K.expression=a,K.typeArguments=O,this.finishNode(K,"TSInstantiationExpression")});if(A)this.unexpected(A);if(I){if(I.type==="TSInstantiationExpression"&&(this.match(s.dot)||this.match(s.questionDot)&&this.lookaheadCharCode()!==40))this.raise(this.start,F.InvalidPropertyAccessAfterInstantiationExpression);return a=I,a}}let T=this.ecmaVersion>=11,L=T&&this.eat(s.questionDot);if(m&&L)this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");let _=this.eat(s.bracketL);if(_||L&&this.type!==s.parenL&&this.type!==s.backQuote||this.eat(s.dot)){let A=this.startNodeAt(p,d);if(A.object=a,_)A.property=this.parseExpression(),this.expect(s.bracketR);else if(this.type===s.privateId&&a.type!=="Super")A.property=this.parsePrivateIdent();else A.property=this.parseIdent(this.options.allowReserved!=="never");if(A.computed=!!_,T)A.optional=L;a=this.finishNode(A,"MemberExpression")}else if(!m&&this.eat(s.parenL)){let A=this.maybeInArrowParameters;this.maybeInArrowParameters=!0;let I=new Dn,O=this.yieldPos,H=this.awaitPos,K=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;let W=this.parseExprList(s.parenR,this.ecmaVersion>=8,!1,I);if(E&&!L&&this.shouldParseAsyncArrow()){if(this.checkPatternErrors(I,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0)this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function");this.yieldPos=O,this.awaitPos=H,this.awaitIdentPos=K,a=this.parseSubscriptAsyncArrow(p,d,W,k)}else{this.checkExpressionErrors(I,!0),this.yieldPos=O||this.yieldPos,this.awaitPos=H||this.awaitPos,this.awaitIdentPos=K||this.awaitIdentPos;let J=this.startNodeAt(p,d);if(J.callee=a,J.arguments=W,T)J.optional=L;a=this.finishNode(J,"CallExpression")}this.maybeInArrowParameters=A}else if(this.type===s.backQuote){if(L||x)this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");let A=this.startNodeAt(p,d);A.tag=a,A.quasi=this.parseTemplate({isTagged:!0}),a=this.finishNode(A,"TaggedTemplateExpression")}return a}parseGetterSetter(a){a.kind=a.key.name,this.parsePropertyName(a);let p=this.tsTryParseTypeParameters(this.tsParseConstModifier);if(a.value=this.parseMethod(!1),p)a.value.typeParameters=p;let d=a.kind==="get"?0:1,m=a.value.params[0];if(d=m&&this.isThisParam(m)?d+1:d,a.value.params.length!==d){let S=a.value.start;if(a.kind==="get")this.raiseRecoverable(S,"getter should have no params");else this.raiseRecoverable(S,"setter should have exactly one param")}else if(a.kind==="set"&&a.value.params[0].type==="RestElement")this.raiseRecoverable(a.value.params[0].start,"Setter cannot use rest params")}parsePropertyValue(a,p,d,m,E,S,k,x){if(this.tsMatchLeftRelational()){if(p)this.unexpected();a.kind="init",a.method=!0;let C=this.tsTryParseTypeParameters(this.tsParseConstModifier);if(a.value=this.parseMethod(d,m),C)a.value.typeParameters=C;return}return super.parsePropertyValue(a,p,d,m,E,S,k,x)}parseProperty(a,p){if(!a){let d=[];if(this.match(b.at))while(this.match(b.at))d.push(this.parseDecorator());let m=super.parseProperty(a,p);if(m.type==="SpreadElement"){if(d.length)this.raise(m.start,ur.SpreadElementDecorator)}if(d.length)m.decorators=d,d=[];return m}return super.parseProperty(a,p)}parseCatchClauseParam(){let a=this.parseBindingAtom(),p=a.type==="Identifier";this.enterScope(p?ne.SCOPE_SIMPLE_CATCH:0),this.checkLValPattern(a,p?ne.BIND_SIMPLE_CATCH:ne.BIND_LEXICAL);let d=this.tsTryParseTypeAnnotation();if(d)a.typeAnnotation=d,this.resetEndLocation(a);return this.expect(s.parenR),a}parseClass(a,p){let d=this.inAbstractClass;this.inAbstractClass=!!a.abstract;try{this.next(),this.takeDecorators(a);let m=this.strict;this.strict=!0,this.parseClassId(a,p),this.parseClassSuper(a);let E=this.enterClassBody(),S=this.startNode(),k=!1;S.body=[];let x=[];this.expect(s.braceL);while(this.type!==s.braceR){if(this.match(b.at)){x.push(this.parseDecorator());continue}let C=this.parseClassElement(a.superClass!==null);if(x.length)C.decorators=x,this.resetStartLocationFromNode(C,x[0]),x=[];if(C){if(S.body.push(C),C.type==="MethodDefinition"&&C.kind==="constructor"&&C.value.type==="FunctionExpression"){if(k)this.raiseRecoverable(C.start,"Duplicate constructor in the same class");if(k=!0,C.decorators&&C.decorators.length>0)this.raise(C.start,ur.DecoratorConstructor)}else if(C.key&&C.key.type==="PrivateIdentifier"&&C.value?.type!=="TSDeclareMethod"){let T=C.key.name;if(this.parseEffects.modify(E,T,(_)=>Id(_,C)))this.raiseRecoverable(C.key.start,`Identifier '#${T}' has already been declared`)}}}if(this.strict=m,this.next(),x.length)this.raise(this.start,ur.TrailingDecorator);return a.body=this.finishNode(S,"ClassBody"),this.exitClassBody(),this.finishNode(a,p?"ClassDeclaration":"ClassExpression")}finally{this.inAbstractClass=d}}parseClassFunctionParams(){let a=this.tsTryParseTypeParameters(),p=this.parseBindingList(s.parenR,!1,this.ecmaVersion>=8,!0);if(a)p.typeParameters=a;return p}parseMethod(a,p,d,m,E){let S=this.startNode(),k=this.yieldPos,x=this.awaitPos,C=this.awaitIdentPos;if(this.initFunction(S),this.ecmaVersion>=6)S.generator=a;if(this.ecmaVersion>=8)S.async=!!p;if(this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Ni(p,S.generator)|ne.SCOPE_SUPER|(d?ne.SCOPE_DIRECT_SUPER:0)),this.expect(s.parenL),S.params=this.parseClassFunctionParams(),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(S,!1,!0,!1,{isClassMethod:m}),this.yieldPos=k,this.awaitPos=x,this.awaitIdentPos=C,E&&E.abstract){if(!!S.body){let{key:L}=E;this.raise(E.start,F.AbstractMethodHasImplementation({methodName:L.type==="Identifier"&&!E.computed?L.name:`[${this.input.slice(L.start,L.end)}]`}))}}return this.finishNode(S,"FunctionExpression")}static parse(a,p){if(p.locations===!1)throw Error("You have to enable options.locations while using acorn-typescript");else p.locations=!0;let d=new this(p,a);if(t)d.isAmbientContext=!0;return d.parse()}static parseExpressionAt(a,p,d){if(d.locations===!1)throw Error("You have to enable options.locations while using acorn-typescript");else d.locations=!0;let m=new this(d,a,p);if(t)m.isAmbientContext=!0;return m.nextToken(),m.parseExpression()}parseImportSpecifier(){if(this.ts_isContextual(b.type)){let p=this.startNode();return p.imported=this.parseModuleExportName(),this.parseTypeOnlyImportExportSpecifier(p,!0,this.importOrExportOuterKind==="type"),this.finishNode(p,"ImportSpecifier")}else{let p=super.parseImportSpecifier();return p.importKind="value",p}}parseExportSpecifier(a){let p=this.ts_isContextual(b.type);if(!this.match(s.string)&&p){let m=this.startNode();return m.local=this.parseModuleExportName(),this.parseTypeOnlyImportExportSpecifier(m,!1,this.importOrExportOuterKind==="type"),this.finishNode(m,"ExportSpecifier"),this.checkExport(a,m.exported,m.exported.start),m}else{let m=super.parseExportSpecifier(a);return m.exportKind="value",m}}parseTypeOnlyImportExportSpecifier(a,p,d){let m=p?"imported":"local",E=p?"local":"exported",S=a[m],k,x=!1,C=!0,T=S.start;if(this.isContextual("as")){let _=this.parseIdent();if(this.isContextual("as")){let A=this.parseIdent();if(w(this.type))x=!0,S=_,k=p?this.parseIdent():this.parseModuleExportName(),C=!1;else k=A,C=!1}else if(w(this.type))C=!1,k=p?this.parseIdent():this.parseModuleExportName();else x=!0,S=_}else if(w(this.type))if(x=!0,p){if(S=super.parseIdent(!0),!this.isContextual("as"))this.checkUnreserved(S)}else S=this.parseModuleExportName();if(x&&d)this.raise(T,p?F.TypeModifierIsUsedInTypeImports:F.TypeModifierIsUsedInTypeExports);a[m]=S,a[E]=k;let L=p?"importKind":"exportKind";if(a[L]=x?"type":"value",C&&this.eatContextual("as"))a[E]=p?this.parseIdent():this.parseModuleExportName();if(!a[E])a[E]=this.copyNode(a[m]);if(p)this.checkLValSimple(a[E],ne.BIND_LEXICAL)}raiseCommonCheck(a,p,d){switch(p){case"Comma is not permitted after the rest element":if(this.isAmbientContext&&this.match(s.comma)&&this.lookaheadCharCode()===41){this.next();return}else return super.raise(a,p)}return d?super.raiseRecoverable(a,p):super.raise(a,p)}raiseRecoverable(a,p){return this.raiseCommonCheck(a,p,!0)}raise(a,p){return this.raiseCommonCheck(a,p,!0)}updateContext(a){let{type:p}=this;if(p==s.braceL){var d=this.curContext();if(d==P.tc_oTag)this.parseEffects.append(this.context,y.b_expr);else if(d==P.tc_expr)this.parseEffects.append(this.context,y.b_tmpl);else super.updateContext(a);this.exprAllowed=!0}else if(p===s.slash&&a===b.jsxTagStart)this.parseEffects.truncate(this.context,this.context.length-2),this.parseEffects.append(this.context,P.tc_cTag),this.exprAllowed=!1;else return super.updateContext(a)}jsx_parseOpeningElementAt(a,p){let d=this.startNodeAt(a,p),m=this.jsx_parseElementName();if(m)d.name=m;if(this.match(s.relational)||this.match(s.bitShift)){let E=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());if(E)d.typeArguments=E}d.attributes=[];while(this.type!==s.slash&&this.type!==b.jsxTagEnd)d.attributes.push(this.jsx_parseAttribute());return d.selfClosing=this.eat(s.slash),this.expect(b.jsxTagEnd),this.finishNode(d,m?"JSXOpeningElement":"JSXOpeningFragment")}enterScope(a){let p=a===Nn;if(p)this.parseEffects.append(this.importsStack,[]);let d=p?a|ne.SCOPE_CLASS_STATIC_BLOCK:a;super.enterScope(d);let m=super.currentScope();m.types=[],m.enums=[],m.constEnums=[],m.classes=[],m.exportOnlyBindings=[]}exitScope(){if(super.currentScope().flags&Nn)this.parseEffects.pop(this.importsStack);super.exitScope()}hasImport(a,p){let d=this.importsStack.length;if(this.importsStack[d-1].indexOf(a)>-1)return!0;if(!p&&d>1){for(let m=0;m<d-1;m++)if(this.importsStack[m].indexOf(a)>-1)return!0}return!1}maybeExportDefined(a,p){if(this.inModule&&a.flags&ne.SCOPE_TOP)this.parseEffects.remove(this.undefinedExports,p)}declareName(a,p,d){if(p&ne.BIND_FLAGS_TS_IMPORT){if(this.hasImport(a,!0))this.raise(d,`Identifier '${a}' has already been declared.`);this.parseEffects.append(this.importsStack[this.importsStack.length-1],a);return}let m=this.currentScope();if(p&ne.BIND_FLAGS_TS_EXPORT_ONLY){this.maybeExportDefined(m,a),this.parseEffects.append(m.exportOnlyBindings,a);return}if(p===ne.BIND_TS_TYPE||p===ne.BIND_TS_INTERFACE){if(p===ne.BIND_TS_TYPE&&m.types.includes(a))this.raise(d,`type '${a}' has already been declared.`);this.parseEffects.append(m.types,a)}else if(p&ne.BIND_FLAGS_TS_ENUM){if(m.enums.includes(a))return;super.declareName(a,ne.BIND_LEXICAL,d)}else super.declareName(a,p,d);if(p&ne.BIND_FLAGS_TS_ENUM)this.parseEffects.append(m.enums,a);if(p&ne.BIND_FLAGS_TS_CONST_ENUM)this.parseEffects.append(m.constEnums,a);if(p&ne.BIND_FLAGS_CLASS)this.parseEffects.append(m.classes,a)}checkLocalExport(a){let{name:p}=a;if(this.hasImport(p))return;let d=this.scopeStack.length;for(let m=d-1;m>=0;m--){let E=this.scopeStack[m];if(E.types.indexOf(p)>-1||E.exportOnlyBindings.indexOf(p)>-1)return}super.checkLocalExport(a)}}return be}}var Qd=/\n/,Zd=/[ \t]/,ef=/^[,) \t]*$/,fr="",Ko=[];function hr(e,t){fr=e,Ko=t}function mr(e,t,n,r){let i=t;if(e&&Qd.test(i)){let o=n;while(o>0&&fr[o-1]!==`
39
+ `)o-=1;let s=o;while(Zd.test(fr[s]))s+=1;let c=fr.slice(o,s);i=tf(i,c)}Ko.push({type:e?"Block":"Line",value:i,start:n,end:r})}function tf(e,t){if(t==="")return e;return(e.startsWith(t)?e.slice(t.length):e).replaceAll(`
37
40
  ${t}`,`
38
- `)}function Xr(e,t,n,r){let i=Nu(n,r);if(i>=n.length)return;zr(e,void 0,n,{index:i},t)}function Nu(e,t){let n=0,r=e.length;while(n<r){let i=n+r>>>1;if(e[i].start<t)n=i+1;else r=i}return n}function zr(e,t,n,r,i){while(r.index<n.length&&n[r.index].start<(e.start??0))e.leadingComments??=[],e.leadingComments.push(n[r.index]),r.index++;if(r.index>=n.length)return;let o=n[r.index].start,s=e.end,l=s===void 0||s>o?Object.keys(e):[];for(let h=0;h<l.length;h++){let d=l[h];if(d==="type"||d==="leadingComments")continue;let g=e[d];if(!g||typeof g!=="object")continue;if(Array.isArray(g)){for(let b of g)if(b&&typeof b==="object"&&typeof b.type==="string"){if(zr(b,e,n,r,i),r.index>=n.length)return}}else if(typeof g.type==="string"){if(zr(g,e,n,r,i),r.index>=n.length)return}}if(r.index<n.length){let h=n[r.index];if(t===void 0||e.end!==t.end){let d=i.slice(e.end??0,h.start);if((t?.type==="BlockStatement"||t?.type==="Program")&&Kr(t.body,e)||t?.type==="ArrayExpression"&&Kr(t.elements,e)||t?.type==="ObjectExpression"&&Kr(t.properties,e))while(r.index<n.length){if(t&&n[r.index].start>=(t.end??Number.POSITIVE_INFINITY))break;r.index++}else if((e.end??0)<=h.start&&ku.test(d))r.index++}}}function Kr(e,t){return!!e&&e.indexOf(t)===e.length-1}var qn={sawParenthesized:!1},to=(e)=>class extends e{parseParenAndDistinguishExpression(t,n){let r=super.parseParenAndDistinguishExpression(t,n);if(r.type==="ParenthesizedExpression")qn.sawParenthesized=!0;return r}parseDecorator(){return qn.sawParenthesized=!0,super.parseDecorator()}},_u=fe.extend(to),Du=fe.extend(Ya(),to);function Zr(e){return e?Du:_u}var Iu={onComment:Hn,sourceType:"module",ecmaVersion:16},no={onComment:Hn,sourceType:"module",ecmaVersion:16,preserveParens:!0},Lu={onComment:Hn,sourceType:"module",ecmaVersion:16},Za={...no,startLocation:null},Jr=/\r\n?|\n|\u2028|\u2029/g;function Ru(e,t){if(t?.breakEnds)return t.breakEnds;let n=[];Jr.lastIndex=0;while(Jr.test(e))n.push(Jr.lastIndex);if(t)t.breakEnds=n;return n}function Mu(e,t,n){let r=e.lastIndexOf(`
39
- `,t-1)+1,i=Ru(e,n),o=0,s=i.length;while(o<s){let p=o+s>>>1;if(i[p]<=r)o=p+1;else s=p}return{line:o+1,column:t-r}}function ro(e,t,n,r,i){if(n.length===i)return;Xr(e,t,n,r)}function io(e,t,n){let r=n.length;jn(e,n);let i=Zr(t).parse(e,Iu);if(n.length>0)Xr(i,e,n,r);return i}var Ou={count:0};function Bt(e,t,n,r,i){Ou.count+=1;let o=r.length;jn(e,r),qn.sawParenthesized=!1;let s=no;if(n)Za.startLocation=Mu(e,t,i),s=Za;let p=Zr(n).parseExpressionAt(e,t,s);ro(p,e,r,t,o);let l=r.length>o?r.at(-1):void 0,h=l&&l.end>(p.end??0)?l.end:p.end??0;return{node:qn.sawParenthesized?Bu(p):p,end:h}}function so(e,t,n,r){let i=r.length,o=Zr(n);jn(e,r);let s=new o(Lu,e,t);s.nextToken();let p=s.parseStatement(null,!0,Object.create(null));return ro(p,e,r,t,i),p}function eo(e){return e!==null&&typeof e==="object"&&typeof e.type==="string"}function Yr(e){let t=e;while(t.type==="ParenthesizedExpression"&&t.expression)t=t.expression;return t}function Bu(e){let t=Yr(e);return Qr(t),t}function Qr(e){for(let t in e){let n=e[t];if(!n||typeof n!=="object")continue;if(Array.isArray(n))for(let r=0;r<n.length;r++){let i=n[r];if(!eo(i))continue;let o=Yr(i);if(o!==i)n[r]=o;Qr(o)}else if(eo(n)){let r=Yr(n);if(r!==n)e[t]=r;Qr(r)}}}function At(e){if(e===32||e<=13&&e>=9)return!0;if(e<160)return!1;return e===160||e===5760||e>=8192&&e<=8202||e===8232||e===8233||e===8239||e===8287||e===12288||e===65279}class ei{source;index=0;constructor(e){this.source=e}match(e){if(e.length===1)return this.source.charCodeAt(this.index)===e.charCodeAt(0);return this.source.startsWith(e,this.index)}matchRegex(e){e.lastIndex=this.index;let t=e.exec(this.source);if(!t||t.index!==this.index)return null;return t[0]}eat(e,t=!1){if(this.match(e))return this.index+=e.length,!0;if(t)throw new mt(`Expected token ${JSON.stringify(e)}`,this.index);return!1}read(e){let t=this.matchRegex(e);if(t)this.index+=t.length;return t}readUntil(e){if(this.index>=this.source.length)throw new mt("Unexpected end of input",this.source.length);let t=this.index;e.lastIndex=t;let n=e.exec(this.source);if(n)return this.index=n.index,this.source.slice(t,this.index);return this.index=this.source.length,this.source.slice(t)}readUntilString(e){if(this.index>=this.source.length)throw new mt("Unexpected end of input",this.source.length);let t=this.source.indexOf(e,this.index),n=t===-1?this.source.length:t,r=this.source.slice(this.index,n);return this.index=n,r}allowWhitespace(){while(this.index<this.source.length&&At(this.source.charCodeAt(this.index)))this.index++}requireWhitespace(){if(!At(this.source.charCodeAt(this.index)))throw new mt("Expected whitespace",this.index);this.allowWhitespace()}readIdentifierName(){let e=this.index,t=e,n="",r=this.source.codePointAt(this.index);if(r!==void 0&&we(r,!0)){t+=r<=65535?1:2;while(t<this.source.length){let i=this.source.codePointAt(t);if(i===void 0||!Le(i,!0))break;t+=i<=65535?1:2}n=this.source.slice(e,t),this.index=t}return{type:"Identifier",name:n,start:e,end:t}}}class mt extends Error{position;constructor(e,t){super(`${e} (at index ${t})`);this.name="TemplateSyntaxError",this.position=t}}function _e(){return{type:"Fragment",nodes:[]}}var Fu=new Set(["await","break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","export","extends","finally","for","function","if","implements","import","in","instanceof","interface","let","new","package","private","protected","public","return","static","super","switch","this","throw","try","typeof","var","void","while","with","yield"]),Vu=["&&","||","??"],$u=["===","!==","==","!="];function ao(e,t){let n=e.codePointAt(t);if(n===void 0||!we(n,!0))return t;let r=t+(n<=65535?1:2);while(r<e.length){let i=e.codePointAt(r);if(!Le(i,!0))break;r+=i<=65535?1:2}return r}function ju(e,t){let n=t;while(n<e.length){let r=e.charCodeAt(n);if(r<48||r>57)break;n++}return n}function Un(e,t){let n=t;while(n<e.length&&At(e.charCodeAt(n)))n++;return n}function oo(e,t){let n=ju(e,t);if(n===t)return null;if(e.charCodeAt(t)===48&&n-t>1)return null;if(n<e.length){let i=e.codePointAt(n);if(i===46||Le(i,!0))return null}let r=e.slice(t,n);return{type:"Literal",start:t,end:n,value:Number(r),raw:r}}function co(e,t){let n=e.charCodeAt(t),r=t+1;while(r<e.length){let i=e.charCodeAt(r);if(i===n){let o=e.slice(t,r+1);return{type:"Literal",start:t,end:r+1,value:e.slice(t+1,r),raw:o}}if(i===92||i===10||i===13)return null;r++}return null}function Hu(e,t){let n=e.charCodeAt(t);if(n===34||n===39)return co(e,t);let r=ao(e,t);if(r===t)return oo(e,t);let i=e.slice(t,r);if(i==="true"||i==="false")return{type:"Literal",start:t,end:r,value:i==="true",raw:i};if(i==="null")return{type:"Literal",start:t,end:r,value:null,raw:i};if(Fu.has(i))return null;let o={type:"Identifier",start:t,end:r,name:i},s=r;while(s<e.length){let p=e.charCodeAt(s);if(p===46){let l=s+1,h=ao(e,l);if(h===l)return null;let d={type:"Identifier",start:l,end:h,name:e.slice(l,h)};o={type:"MemberExpression",start:t,end:h,object:o,property:d,computed:!1,optional:!1},s=h}else if(p===91){let l=s+1,h=e.charCodeAt(l),d=h===34||h===39?co(e,l):oo(e,l);if(!d||e.charCodeAt(d.end)!==93)return null;o={type:"MemberExpression",start:t,end:d.end+1,object:o,property:d,computed:!0,optional:!1},s=d.end+1}else break}return o}function ti(e,t){if(e.charCodeAt(t)!==33||e.charCodeAt(t+1)===61)return Hu(e,t);let n=ti(e,Un(e,t+1));if(!n)return null;return{type:"UnaryExpression",start:t,end:n.end,operator:"!",prefix:!0,argument:n}}function qu(e,t){for(let n of $u)if(e.startsWith(n,t))return{operator:n,logical:!1};for(let n of Vu)if(e.startsWith(n,t))return{operator:n,logical:!0};return null}function po(e,t){let n=Un(e,t);if(n>=e.length)return!1;let r=e.charCodeAt(n);return r===125||r===41}function Uu(e){let t=e.source,n=ti(t,e.index);if(!n)return null;if(po(t,n.end))return e.index=n.end,n;let r=Un(t,n.end),i=qu(t,r);if(!i)return null;let o=ti(t,Un(t,r+i.operator.length));if(!o||!po(t,o.end))return null;return e.index=o.end,{type:i.logical?"LogicalExpression":"BinaryExpression",start:n.start,end:o.end,left:n,operator:i.operator,right:o}}function Te(e){let t=Uu(e);if(t)return t;let{node:n,end:r}=Bt(e.source,e.index,e.isTypeScript,e.root.comments,e.lineTable);return e.index=r,n}var Gu={"CounterClockwiseContourIntegral;":8755,"ClockwiseContourIntegral;":8754,"DoubleLongLeftRightArrow;":10234,"NotNestedGreaterGreater;":10914,"DiacriticalDoubleAcute;":733,"NotSquareSupersetEqual;":8931,"CloseCurlyDoubleQuote;":8221,"DoubleContourIntegral;":8751,"FilledVerySmallSquare;":9642,"NegativeVeryThinSpace;":8203,"NotPrecedesSlantEqual;":8928,"NotRightTriangleEqual;":8941,"NotSucceedsSlantEqual;":8929,"CapitalDifferentialD;":8517,"DoubleLeftRightArrow;":8660,"DoubleLongRightArrow;":10233,"EmptyVerySmallSquare;":9643,"NestedGreaterGreater;":8811,"NotDoubleVerticalBar;":8742,"NotGreaterSlantEqual;":10878,"NotLeftTriangleEqual;":8940,"NotSquareSubsetEqual;":8930,"OpenCurlyDoubleQuote;":8220,"ReverseUpEquilibrium;":10607,"DoubleLongLeftArrow;":10232,"DownLeftRightVector;":10576,"LeftArrowRightArrow;":8646,"NegativeMediumSpace;":8203,"NotGreaterFullEqual;":8807,"NotRightTriangleBar;":10704,"RightArrowLeftArrow;":8644,"SquareSupersetEqual;":8850,"leftrightsquigarrow;":8621,"DownRightTeeVector;":10591,"DownRightVectorBar;":10583,"LongLeftRightArrow;":10231,"Longleftrightarrow;":10234,"NegativeThickSpace;":8203,"NotLeftTriangleBar;":10703,"PrecedesSlantEqual;":8828,"ReverseEquilibrium;":8651,"RightDoubleBracket;":10215,"RightDownTeeVector;":10589,"RightDownVectorBar;":10581,"RightTriangleEqual;":8885,"SquareIntersection;":8851,"SucceedsSlantEqual;":8829,"blacktriangleright;":9656,"longleftrightarrow;":10231,"DoubleUpDownArrow;":8661,"DoubleVerticalBar;":8741,"DownLeftTeeVector;":10590,"DownLeftVectorBar;":10582,"FilledSmallSquare;":9724,"GreaterSlantEqual;":10878,"LeftDoubleBracket;":10214,"LeftDownTeeVector;":10593,"LeftDownVectorBar;":10585,"LeftTriangleEqual;":8884,"NegativeThinSpace;":8203,"NotGreaterGreater;":8811,"NotLessSlantEqual;":10877,"NotNestedLessLess;":10913,"NotReverseElement;":8716,"NotSquareSuperset;":8848,"NotTildeFullEqual;":8775,"RightAngleBracket;":10217,"RightUpDownVector;":10575,"SquareSubsetEqual;":8849,"VerticalSeparator;":10072,"blacktriangledown;":9662,"blacktriangleleft;":9666,"leftrightharpoons;":8651,"rightleftharpoons;":8652,"twoheadrightarrow;":8608,"DiacriticalAcute;":180,"DiacriticalGrave;":96,"DiacriticalTilde;":732,"DoubleRightArrow;":8658,"DownArrowUpArrow;":8693,"EmptySmallSquare;":9723,"GreaterEqualLess;":8923,"GreaterFullEqual;":8807,"LeftAngleBracket;":10216,"LeftUpDownVector;":10577,"LessEqualGreater;":8922,"NonBreakingSpace;":160,"NotPrecedesEqual;":10927,"NotRightTriangle;":8939,"NotSucceedsEqual;":10928,"NotSucceedsTilde;":8831,"NotSupersetEqual;":8841,"RightTriangleBar;":10704,"RightUpTeeVector;":10588,"RightUpVectorBar;":10580,"UnderParenthesis;":9181,"UpArrowDownArrow;":8645,"circlearrowright;":8635,"downharpoonright;":8642,"ntrianglerighteq;":8941,"rightharpoondown;":8641,"rightrightarrows;":8649,"twoheadleftarrow;":8606,"vartriangleright;":8883,"CloseCurlyQuote;":8217,"ContourIntegral;":8750,"DoubleDownArrow;":8659,"DoubleLeftArrow;":8656,"DownRightVector;":8641,"LeftRightVector;":10574,"LeftTriangleBar;":10703,"LeftUpTeeVector;":10592,"LeftUpVectorBar;":10584,"LowerRightArrow;":8600,"NotGreaterEqual;":8817,"NotGreaterTilde;":8821,"NotHumpDownHump;":8782,"NotLeftTriangle;":8938,"NotSquareSubset;":8847,"OverParenthesis;":9180,"RightDownVector;":8642,"ShortRightArrow;":8594,"UpperRightArrow;":8599,"bigtriangledown;":9661,"circlearrowleft;":8634,"curvearrowright;":8631,"downharpoonleft;":8643,"leftharpoondown;":8637,"leftrightarrows;":8646,"nLeftrightarrow;":8654,"nleftrightarrow;":8622,"ntrianglelefteq;":8940,"rightleftarrows;":8644,"rightsquigarrow;":8605,"rightthreetimes;":8908,"straightepsilon;":1013,"trianglerighteq;":8885,"vartriangleleft;":8882,"DiacriticalDot;":729,"DoubleRightTee;":8872,"DownLeftVector;":8637,"GreaterGreater;":10914,"HorizontalLine;":9472,"InvisibleComma;":8291,"InvisibleTimes;":8290,"LeftDownVector;":8643,"LeftRightArrow;":8596,"Leftrightarrow;":8660,"LessSlantEqual;":10877,"LongRightArrow;":10230,"Longrightarrow;":10233,"LowerLeftArrow;":8601,"NestedLessLess;":8810,"NotGreaterLess;":8825,"NotLessGreater;":8824,"NotSubsetEqual;":8840,"NotVerticalBar;":8740,"OpenCurlyQuote;":8216,"ReverseElement;":8715,"RightTeeVector;":10587,"RightVectorBar;":10579,"ShortDownArrow;":8595,"ShortLeftArrow;":8592,"SquareSuperset;":8848,"TildeFullEqual;":8773,"UpperLeftArrow;":8598,"ZeroWidthSpace;":8203,"curvearrowleft;":8630,"doublebarwedge;":8966,"downdownarrows;":8650,"hookrightarrow;":8618,"leftleftarrows;":8647,"leftrightarrow;":8596,"leftthreetimes;":8907,"longrightarrow;":10230,"looparrowright;":8620,"nshortparallel;":8742,"ntriangleright;":8939,"rightarrowtail;":8611,"rightharpoonup;":8640,"trianglelefteq;":8884,"upharpoonright;":8638,"ApplyFunction;":8289,"DifferentialD;":8518,"DoubleLeftTee;":10980,"DoubleUpArrow;":8657,"LeftTeeVector;":10586,"LeftVectorBar;":10578,"LessFullEqual;":8806,"LongLeftArrow;":10229,"Longleftarrow;":10232,"NotEqualTilde;":8770,"NotTildeEqual;":8772,"NotTildeTilde;":8777,"Poincareplane;":8460,"PrecedesEqual;":10927,"PrecedesTilde;":8830,"RightArrowBar;":8677,"RightTeeArrow;":8614,"RightTriangle;":8883,"RightUpVector;":8638,"SucceedsEqual;":10928,"SucceedsTilde;":8831,"SupersetEqual;":8839,"UpEquilibrium;":10606,"VerticalTilde;":8768,"VeryThinSpace;":8202,"bigtriangleup;":9651,"blacktriangle;":9652,"divideontimes;":8903,"fallingdotseq;":8786,"hookleftarrow;":8617,"leftarrowtail;":8610,"leftharpoonup;":8636,"longleftarrow;":10229,"looparrowleft;":8619,"measuredangle;":8737,"ntriangleleft;":8938,"shortparallel;":8741,"smallsetminus;":8726,"triangleright;":9657,"upharpoonleft;":8639,"varsubsetneqq;":10955,"varsupsetneqq;":10956,"DownArrowBar;":10515,"DownTeeArrow;":8615,"ExponentialE;":8519,"GreaterEqual;":8805,"GreaterTilde;":8819,"HilbertSpace;":8459,"HumpDownHump;":8782,"Intersection;":8898,"LeftArrowBar;":8676,"LeftTeeArrow;":8612,"LeftTriangle;":8882,"LeftUpVector;":8639,"NotCongruent;":8802,"NotHumpEqual;":8783,"NotLessEqual;":8816,"NotLessTilde;":8820,"Proportional;":8733,"RightCeiling;":8969,"RoundImplies;":10608,"ShortUpArrow;":8593,"SquareSubset;":8847,"UnderBracket;":9141,"VerticalLine;":124,"blacklozenge;":10731,"exponentiale;":8519,"risingdotseq;":8787,"triangledown;":9663,"triangleleft;":9667,"varsubsetneq;":8842,"varsupsetneq;":8843,"CircleMinus;":8854,"CircleTimes;":8855,"Equilibrium;":8652,"GreaterLess;":8823,"LeftCeiling;":8968,"LessGreater;":8822,"MediumSpace;":8287,"NotLessLess;":8810,"NotPrecedes;":8832,"NotSucceeds;":8833,"NotSuperset;":8835,"OverBracket;":9140,"RightVector;":8640,"Rrightarrow;":8667,"RuleDelayed;":10740,"SmallCircle;":8728,"SquareUnion;":8852,"SubsetEqual;":8838,"UpDownArrow;":8597,"Updownarrow;":8661,"VerticalBar;":8739,"backepsilon;":1014,"blacksquare;":9642,"circledcirc;":8858,"circleddash;":8861,"curlyeqprec;":8926,"curlyeqsucc;":8927,"diamondsuit;":9830,"eqslantless;":10901,"expectation;":8496,"nRightarrow;":8655,"nrightarrow;":8603,"preccurlyeq;":8828,"precnapprox;":10937,"quaternions;":8461,"straightphi;":981,"succcurlyeq;":8829,"succnapprox;":10938,"thickapprox;":8776,"updownarrow;":8597,"Bernoullis;":8492,"CirclePlus;":8853,"EqualTilde;":8770,"Fouriertrf;":8497,"ImaginaryI;":8520,"Laplacetrf;":8466,"LeftVector;":8636,"Lleftarrow;":8666,"NotElement;":8713,"NotGreater;":8815,"Proportion;":8759,"RightArrow;":8594,"RightFloor;":8971,"Rightarrow;":8658,"ThickSpace;":8287,"TildeEqual;":8771,"TildeTilde;":8776,"UnderBrace;":9183,"UpArrowBar;":10514,"UpTeeArrow;":8613,"circledast;":8859,"complement;":8705,"curlywedge;":8911,"eqslantgtr;":10902,"gtreqqless;":10892,"lessapprox;":10885,"lesseqqgtr;":10891,"lmoustache;":9136,"longmapsto;":10236,"mapstodown;":8615,"mapstoleft;":8612,"nLeftarrow;":8653,"nleftarrow;":8602,"nsubseteqq;":10949,"nsupseteqq;":10950,"precapprox;":10935,"rightarrow;":8594,"rmoustache;":9137,"sqsubseteq;":8849,"sqsupseteq;":8850,"subsetneqq;":10955,"succapprox;":10936,"supsetneqq;":10956,"upuparrows;":8648,"varepsilon;":1013,"varnothing;":8709,"Backslash;":8726,"CenterDot;":183,"CircleDot;":8857,"Congruent;":8801,"Coproduct;":8720,"DoubleDot;":168,"DownArrow;":8595,"DownBreve;":785,"Downarrow;":8659,"HumpEqual;":8783,"LeftArrow;":8592,"LeftFloor;":8970,"Leftarrow;":8656,"LessTilde;":8818,"Mellintrf;":8499,"MinusPlus;":8723,"NotCupCap;":8813,"NotExists;":8708,"NotSubset;":8834,"OverBrace;":9182,"PlusMinus;":177,"Therefore;":8756,"ThinSpace;":8201,"TripleDot;":8411,"UnionPlus;":8846,"backprime;":8245,"backsimeq;":8909,"bigotimes;":10754,"centerdot;":183,"checkmark;":10003,"complexes;":8450,"dotsquare;":8865,"downarrow;":8595,"gtrapprox;":10886,"gtreqless;":8923,"gvertneqq;":8809,"heartsuit;":9829,"leftarrow;":8592,"lesseqgtr;":8922,"lvertneqq;":8808,"ngeqslant;":10878,"nleqslant;":10877,"nparallel;":8742,"nshortmid;":8740,"nsubseteq;":8840,"nsupseteq;":8841,"pitchfork;":8916,"rationals;":8474,"spadesuit;":9824,"subseteqq;":10949,"subsetneq;":8842,"supseteqq;":10950,"supsetneq;":8843,"therefore;":8756,"triangleq;":8796,"varpropto;":8733,"DDotrahd;":10513,"DotEqual;":8784,"Integral;":8747,"LessLess;":10913,"NotEqual;":8800,"NotTilde;":8769,"PartialD;":8706,"Precedes;":8826,"RightTee;":8866,"Succeeds;":8827,"SuchThat;":8715,"Superset;":8835,"Uarrocir;":10569,"UnderBar;":95,"andslope;":10840,"angmsdaa;":10664,"angmsdab;":10665,"angmsdac;":10666,"angmsdad;":10667,"angmsdae;":10668,"angmsdaf;":10669,"angmsdag;":10670,"angmsdah;":10671,"angrtvbd;":10653,"approxeq;":8778,"awconint;":8755,"backcong;":8780,"barwedge;":8965,"bbrktbrk;":9142,"bigoplus;":10753,"bigsqcup;":10758,"biguplus;":10756,"bigwedge;":8896,"boxminus;":8863,"boxtimes;":8864,"bsolhsub;":10184,"capbrcup;":10825,"circledR;":174,"circledS;":9416,"cirfnint;":10768,"clubsuit;":9827,"cupbrcap;":10824,"curlyvee;":8910,"cwconint;":8754,"doteqdot;":8785,"dotminus;":8760,"drbkarow;":10512,"dzigrarr;":10239,"elinters;":9191,"emptyset;":8709,"eqvparsl;":10725,"fpartint;":10765,"geqslant;":10878,"gesdotol;":10884,"gnapprox;":10890,"hksearow;":10533,"hkswarow;":10534,"imagline;":8464,"imagpart;":8465,"infintie;":10717,"integers;":8484,"intercal;":8890,"intlarhk;":10775,"laemptyv;":10676,"ldrushar;":10571,"leqslant;":10877,"lesdotor;":10883,"llcorner;":8990,"lnapprox;":10889,"lrcorner;":8991,"lurdshar;":10570,"mapstoup;":8613,"multimap;":8888,"naturals;":8469,"ncongdot;":10861,"notindot;":8949,"otimesas;":10806,"parallel;":8741,"plusacir;":10787,"pointint;":10773,"precneqq;":10933,"precnsim;":8936,"profalar;":9006,"profline;":8978,"profsurf;":8979,"raemptyv;":10675,"realpart;":8476,"rppolint;":10770,"rtriltri;":10702,"scpolint;":10771,"setminus;":8726,"shortmid;":8739,"smeparsl;":10724,"sqsubset;":8847,"sqsupset;":8848,"subseteq;":8838,"succneqq;":10934,"succnsim;":8937,"supseteq;":8839,"thetasym;":977,"thicksim;":8764,"timesbar;":10801,"triangle;":9653,"triminus;":10810,"trpezium;":9186,"ulcorner;":8988,"urcorner;":8989,"varkappa;":1008,"varsigma;":962,"vartheta;":977,"Because;":8757,"Cayleys;":8493,"Cconint;":8752,"Cedilla;":184,"Diamond;":8900,"DownTee;":8868,"Element;":8712,"Epsilon;":917,"Implies;":8658,"LeftTee;":8867,"NewLine;":10,"NoBreak;":8288,"NotLess;":8814,"Omicron;":927,"OverBar;":8254,"Product;":8719,"UpArrow;":8593,"Uparrow;":8657,"Upsilon;":933,"alefsym;":8501,"angrtvb;":8894,"angzarr;":9084,"asympeq;":8781,"backsim;":8765,"because;":8757,"bemptyv;":10672,"between;":8812,"bigcirc;":9711,"bigodot;":10752,"bigstar;":9733,"bnequiv;":8801,"boxplus;":8862,"ccupssm;":10832,"cemptyv;":10674,"cirscir;":10690,"coloneq;":8788,"congdot;":10861,"cudarrl;":10552,"cudarrr;":10549,"cularrp;":10557,"curarrm;":10556,"dbkarow;":10511,"ddagger;":8225,"ddotseq;":10871,"demptyv;":10673,"diamond;":8900,"digamma;":989,"dotplus;":8724,"dwangle;":10662,"epsilon;":949,"eqcolon;":8789,"equivDD;":10872,"gesdoto;":10882,"gtquest;":10876,"gtrless;":8823,"harrcir;":10568,"intprod;":10812,"isindot;":8949,"larrbfs;":10527,"larrsim;":10611,"lbrksld;":10639,"lbrkslu;":10637,"ldrdhar;":10599,"lesdoto;":10881,"lessdot;":8918,"lessgtr;":8822,"lesssim;":8818,"lotimes;":10804,"lozenge;":9674,"ltquest;":10875,"luruhar;":10598,"maltese;":10016,"minusdu;":10794,"napprox;":8777,"natural;":9838,"nearrow;":8599,"nexists;":8708,"notinva;":8713,"notinvb;":8951,"notinvc;":8950,"notniva;":8716,"notnivb;":8958,"notnivc;":8957,"npolint;":10772,"npreceq;":10927,"nsqsube;":8930,"nsqsupe;":8931,"nsubset;":8834,"nsucceq;":10928,"nsupset;":8835,"nvinfin;":10718,"nvltrie;":8884,"nvrtrie;":8885,"nwarrow;":8598,"olcross;":10683,"omicron;":959,"orderof;":8500,"orslope;":10839,"pertenk;":8241,"planckh;":8462,"pluscir;":10786,"plussim;":10790,"plustwo;":10791,"precsim;":8830,"quatint;":10774,"questeq;":8799,"rarrbfs;":10528,"rarrsim;":10612,"rbrksld;":10638,"rbrkslu;":10640,"rdldhar;":10601,"realine;":8475,"rotimes;":10805,"ruluhar;":10600,"searrow;":8600,"simplus;":10788,"simrarr;":10610,"subedot;":10947,"submult;":10945,"subplus;":10943,"subrarr;":10617,"succsim;":8831,"supdsub;":10968,"supedot;":10948,"suphsol;":10185,"suphsub;":10967,"suplarr;":10619,"supmult;":10946,"supplus;":10944,"swarrow;":8601,"topfork;":10970,"triplus;":10809,"tritime;":10811,"uparrow;":8593,"upsilon;":965,"uwangle;":10663,"vzigzag;":10650,"zigrarr;":8669,"Aacute;":193,"Abreve;":258,"Agrave;":192,"Assign;":8788,"Atilde;":195,"Barwed;":8966,"Bumpeq;":8782,"Cacute;":262,"Ccaron;":268,"Ccedil;":199,"Colone;":10868,"Conint;":8751,"CupCap;":8781,"Dagger;":8225,"Dcaron;":270,"DotDot;":8412,"Dstrok;":272,"Eacute;":201,"Ecaron;":282,"Egrave;":200,"Exists;":8707,"ForAll;":8704,"Gammad;":988,"Gbreve;":286,"Gcedil;":290,"HARDcy;":1066,"Hstrok;":294,"Iacute;":205,"Igrave;":204,"Itilde;":296,"Jsercy;":1032,"Kcedil;":310,"Lacute;":313,"Lambda;":923,"Lcaron;":317,"Lcedil;":315,"Lmidot;":319,"Lstrok;":321,"Nacute;":323,"Ncaron;":327,"Ncedil;":325,"Ntilde;":209,"Oacute;":211,"Odblac;":336,"Ograve;":210,"Oslash;":216,"Otilde;":213,"Otimes;":10807,"Racute;":340,"Rarrtl;":10518,"Rcaron;":344,"Rcedil;":342,"SHCHcy;":1065,"SOFTcy;":1068,"Sacute;":346,"Scaron;":352,"Scedil;":350,"Square;":9633,"Subset;":8912,"Supset;":8913,"Tcaron;":356,"Tcedil;":354,"Tstrok;":358,"Uacute;":218,"Ubreve;":364,"Udblac;":368,"Ugrave;":217,"Utilde;":360,"Vdashl;":10982,"Verbar;":8214,"Vvdash;":8874,"Yacute;":221,"Zacute;":377,"Zcaron;":381,"aacute;":225,"abreve;":259,"agrave;":224,"andand;":10837,"angmsd;":8737,"angsph;":8738,"apacir;":10863,"approx;":8776,"atilde;":227,"barvee;":8893,"barwed;":8965,"becaus;":8757,"bernou;":8492,"bigcap;":8898,"bigcup;":8899,"bigvee;":8897,"bkarow;":10509,"bottom;":8869,"bowtie;":8904,"boxbox;":10697,"bprime;":8245,"brvbar;":166,"bullet;":8226,"bumpeq;":8783,"cacute;":263,"capand;":10820,"capcap;":10827,"capcup;":10823,"capdot;":10816,"ccaron;":269,"ccedil;":231,"circeq;":8791,"cirmid;":10991,"colone;":8788,"commat;":64,"compfn;":8728,"conint;":8750,"coprod;":8720,"copysr;":8471,"cularr;":8630,"cupcap;":10822,"cupcup;":10826,"cupdot;":8845,"curarr;":8631,"curren;":164,"cylcty;":9005,"dagger;":8224,"daleth;":8504,"dcaron;":271,"dfisht;":10623,"divide;":247,"divonx;":8903,"dlcorn;":8990,"dlcrop;":8973,"dollar;":36,"drcorn;":8991,"drcrop;":8972,"dstrok;":273,"eacute;":233,"easter;":10862,"ecaron;":283,"ecolon;":8789,"egrave;":232,"egsdot;":10904,"elsdot;":10903,"emptyv;":8709,"emsp13;":8196,"emsp14;":8197,"eparsl;":10723,"eqcirc;":8790,"equals;":61,"equest;":8799,"female;":9792,"ffilig;":64259,"ffllig;":64260,"forall;":8704,"frac12;":189,"frac13;":8531,"frac14;":188,"frac15;":8533,"frac16;":8537,"frac18;":8539,"frac23;":8532,"frac25;":8534,"frac34;":190,"frac35;":8535,"frac38;":8540,"frac45;":8536,"frac56;":8538,"frac58;":8541,"frac78;":8542,"gacute;":501,"gammad;":989,"gbreve;":287,"gesdot;":10880,"gesles;":10900,"gtlPar;":10645,"gtrarr;":10616,"gtrdot;":8919,"gtrsim;":8819,"hairsp;":8202,"hamilt;":8459,"hardcy;":1098,"hearts;":9829,"hellip;":8230,"hercon;":8889,"homtht;":8763,"horbar;":8213,"hslash;":8463,"hstrok;":295,"hybull;":8259,"hyphen;":8208,"iacute;":237,"igrave;":236,"iiiint;":10764,"iinfin;":10716,"incare;":8453,"inodot;":305,"intcal;":8890,"iquest;":191,"isinsv;":8947,"itilde;":297,"jsercy;":1112,"kappav;":1008,"kcedil;":311,"kgreen;":312,"lAtail;":10523,"lacute;":314,"lagran;":8466,"lambda;":955,"langle;":10216,"larrfs;":10525,"larrhk;":8617,"larrlp;":8619,"larrpl;":10553,"larrtl;":8610,"latail;":10521,"lbrace;":123,"lbrack;":91,"lcaron;":318,"lcedil;":316,"ldquor;":8222,"lesdot;":10879,"lesges;":10899,"lfisht;":10620,"lfloor;":8970,"lharul;":10602,"llhard;":10603,"lmidot;":320,"lmoust;":9136,"loplus;":10797,"lowast;":8727,"lowbar;":95,"lparlt;":10643,"lrhard;":10605,"lsaquo;":8249,"lsquor;":8218,"lstrok;":322,"lthree;":8907,"ltimes;":8905,"ltlarr;":10614,"ltrPar;":10646,"mapsto;":8614,"marker;":9646,"mcomma;":10793,"midast;":42,"midcir;":10992,"middot;":183,"minusb;":8863,"minusd;":8760,"mnplus;":8723,"models;":8871,"mstpos;":8766,"nVDash;":8879,"nVdash;":8878,"nacute;":324,"nbumpe;":8783,"ncaron;":328,"ncedil;":326,"nearhk;":10532,"nequiv;":8802,"nesear;":10536,"nexist;":8708,"nltrie;":8940,"notinE;":8953,"nparsl;":11005,"nprcue;":8928,"nrarrc;":10547,"nrarrw;":8605,"nrtrie;":8941,"nsccue;":8929,"nsimeq;":8772,"ntilde;":241,"numero;":8470,"nvDash;":8877,"nvHarr;":10500,"nvdash;":8876,"nvlArr;":10498,"nvrArr;":10499,"nwarhk;":10531,"nwnear;":10535,"oacute;":243,"odblac;":337,"odsold;":10684,"ograve;":242,"ominus;":8854,"origof;":8886,"oslash;":248,"otilde;":245,"otimes;":8855,"parsim;":10995,"percnt;":37,"period;":46,"permil;":8240,"phmmat;":8499,"planck;":8463,"plankv;":8463,"plusdo;":8724,"plusdu;":10789,"plusmn;":177,"preceq;":10927,"primes;":8473,"prnsim;":8936,"propto;":8733,"prurel;":8880,"puncsp;":8200,"qprime;":8279,"rAtail;":10524,"racute;":341,"rangle;":10217,"rarrap;":10613,"rarrfs;":10526,"rarrhk;":8618,"rarrlp;":8620,"rarrpl;":10565,"rarrtl;":8611,"ratail;":10522,"rbrace;":125,"rbrack;":93,"rcaron;":345,"rcedil;":343,"rdquor;":8221,"rfisht;":10621,"rfloor;":8971,"rharul;":10604,"rmoust;":9137,"roplus;":10798,"rpargt;":10644,"rsaquo;":8250,"rsquor;":8217,"rthree;":8908,"rtimes;":8906,"sacute;":347,"scaron;":353,"scedil;":351,"scnsim;":8937,"searhk;":10533,"seswar;":10537,"sfrown;":8994,"shchcy;":1097,"sigmaf;":962,"sigmav;":962,"simdot;":10858,"smashp;":10803,"softcy;":1100,"solbar;":9023,"spades;":9824,"sqcaps;":8851,"sqcups;":8852,"sqsube;":8849,"sqsupe;":8850,"square;":9633,"squarf;":9642,"ssetmn;":8726,"ssmile;":8995,"sstarf;":8902,"subdot;":10941,"subset;":8834,"subsim;":10951,"subsub;":10965,"subsup;":10963,"succeq;":10928,"supdot;":10942,"supset;":8835,"supsim;":10952,"supsub;":10964,"supsup;":10966,"swarhk;":10534,"swnwar;":10538,"target;":8982,"tcaron;":357,"tcedil;":355,"telrec;":8981,"there4;":8756,"thetav;":977,"thinsp;":8201,"thksim;":8764,"timesb;":8864,"timesd;":10800,"topbot;":9014,"topcir;":10993,"tprime;":8244,"tridot;":9708,"tstrok;":359,"uacute;":250,"ubreve;":365,"udblac;":369,"ufisht;":10622,"ugrave;":249,"ulcorn;":8988,"ulcrop;":8975,"urcorn;":8989,"urcrop;":8974,"utilde;":361,"vangrt;":10652,"varphi;":981,"varrho;":1009,"veebar;":8891,"vellip;":8942,"verbar;":124,"vsubnE;":10955,"vsubne;":8842,"vsupnE;":10956,"vsupne;":8843,"wedbar;":10847,"wedgeq;":8793,"weierp;":8472,"wreath;":8768,"xoplus;":10753,"xotime;":10754,"xsqcup;":10758,"xuplus;":10756,"xwedge;":8896,"yacute;":253,"zacute;":378,"zcaron;":382,"zeetrf;":8488,"AElig;":198,Aacute:193,"Acirc;":194,Agrave:192,"Alpha;":913,"Amacr;":256,"Aogon;":260,"Aring;":197,Atilde:195,"Breve;":728,Ccedil:199,"Ccirc;":264,"Colon;":8759,"Cross;":10799,"Dashv;":10980,"Delta;":916,Eacute:201,"Ecirc;":202,Egrave:200,"Emacr;":274,"Eogon;":280,"Equal;":10869,"Gamma;":915,"Gcirc;":284,"Hacek;":711,"Hcirc;":292,"IJlig;":306,Iacute:205,"Icirc;":206,Igrave:204,"Imacr;":298,"Iogon;":302,"Iukcy;":1030,"Jcirc;":308,"Jukcy;":1028,"Kappa;":922,Ntilde:209,"OElig;":338,Oacute:211,"Ocirc;":212,Ograve:210,"Omacr;":332,"Omega;":937,Oslash:216,Otilde:213,"Prime;":8243,"RBarr;":10512,"Scirc;":348,"Sigma;":931,"THORN;":222,"TRADE;":8482,"TSHcy;":1035,"Theta;":920,"Tilde;":8764,Uacute:218,"Ubrcy;":1038,"Ucirc;":219,Ugrave:217,"Umacr;":362,"Union;":8899,"Uogon;":370,"UpTee;":8869,"Uring;":366,"VDash;":8875,"Vdash;":8873,"Wcirc;":372,"Wedge;":8896,Yacute:221,"Ycirc;":374,aacute:225,"acirc;":226,"acute;":180,"aelig;":230,agrave:224,"aleph;":8501,"alpha;":945,"amacr;":257,"amalg;":10815,"angle;":8736,"angrt;":8735,"angst;":197,"aogon;":261,"aring;":229,"asymp;":8776,atilde:227,"awint;":10769,"bcong;":8780,"bdquo;":8222,"bepsi;":1014,"blank;":9251,"blk12;":9618,"blk14;":9617,"blk34;":9619,"block;":9608,"boxDL;":9559,"boxDR;":9556,"boxDl;":9558,"boxDr;":9555,"boxHD;":9574,"boxHU;":9577,"boxHd;":9572,"boxHu;":9575,"boxUL;":9565,"boxUR;":9562,"boxUl;":9564,"boxUr;":9561,"boxVH;":9580,"boxVL;":9571,"boxVR;":9568,"boxVh;":9579,"boxVl;":9570,"boxVr;":9567,"boxdL;":9557,"boxdR;":9554,"boxdl;":9488,"boxdr;":9484,"boxhD;":9573,"boxhU;":9576,"boxhd;":9516,"boxhu;":9524,"boxuL;":9563,"boxuR;":9560,"boxul;":9496,"boxur;":9492,"boxvH;":9578,"boxvL;":9569,"boxvR;":9566,"boxvh;":9532,"boxvl;":9508,"boxvr;":9500,"breve;":728,brvbar:166,"bsemi;":8271,"bsime;":8909,"bsolb;":10693,"bumpE;":10926,"bumpe;":8783,"caret;":8257,"caron;":711,"ccaps;":10829,ccedil:231,"ccirc;":265,"ccups;":10828,"cedil;":184,"check;":10003,"clubs;":9827,"colon;":58,"comma;":44,"crarr;":8629,"cross;":10007,"csube;":10961,"csupe;":10962,"ctdot;":8943,"cuepr;":8926,"cuesc;":8927,"cupor;":10821,curren:164,"cuvee;":8910,"cuwed;":8911,"cwint;":8753,"dashv;":8867,"dblac;":733,"ddarr;":8650,"delta;":948,"dharl;":8643,"dharr;":8642,"diams;":9830,"disin;":8946,divide:247,"doteq;":8784,"dtdot;":8945,"dtrif;":9662,"duarr;":8693,"duhar;":10607,"eDDot;":10871,eacute:233,"ecirc;":234,"efDot;":8786,egrave:232,"emacr;":275,"empty;":8709,"eogon;":281,"eplus;":10865,"epsiv;":1013,"eqsim;":8770,"equiv;":8801,"erDot;":8787,"erarr;":10609,"esdot;":8784,"exist;":8707,"fflig;":64256,"filig;":64257,"fjlig;":102,"fllig;":64258,"fltns;":9649,"forkv;":10969,frac12:189,frac14:188,frac34:190,"frasl;":8260,"frown;":8994,"gamma;":947,"gcirc;":285,"gescc;":10921,"gimel;":8503,"gneqq;":8809,"gnsim;":8935,"grave;":96,"gsime;":10894,"gsiml;":10896,"gtcir;":10874,"gtdot;":8919,"harrw;":8621,"hcirc;":293,"hoarr;":8703,iacute:237,"icirc;":238,"iexcl;":161,igrave:236,"iiint;":8749,"iiota;":8489,"ijlig;":307,"imacr;":299,"image;":8465,"imath;":305,"imped;":437,"infin;":8734,"iogon;":303,"iprod;":10812,iquest:191,"isinE;":8953,"isins;":8948,"isinv;":8712,"iukcy;":1110,"jcirc;":309,"jmath;":567,"jukcy;":1108,"kappa;":954,"lAarr;":8666,"lBarr;":10510,"langd;":10641,"laquo;":171,"larrb;":8676,"lates;":10925,"lbarr;":10508,"lbbrk;":10098,"lbrke;":10635,"lceil;":8968,"ldquo;":8220,"lescc;":10920,"lhard;":8637,"lharu;":8636,"lhblk;":9604,"llarr;":8647,"lltri;":9722,"lneqq;":8808,"lnsim;":8934,"loang;":10220,"loarr;":8701,"lobrk;":10214,"lopar;":10629,"lrarr;":8646,"lrhar;":8651,"lrtri;":8895,"lsime;":10893,"lsimg;":10895,"lsquo;":8216,"ltcir;":10873,"ltdot;":8918,"ltrie;":8884,"ltrif;":9666,"mDDot;":8762,"mdash;":8212,"micro;":181,middot:183,"minus;":8722,"mumap;":8888,"nabla;":8711,"napid;":8779,"napos;":329,"natur;":9838,"nbump;":8782,"ncong;":8775,"ndash;":8211,"neArr;":8663,"nearr;":8599,"nedot;":8784,"nesim;":8770,"ngeqq;":8807,"ngsim;":8821,"nhArr;":8654,"nharr;":8622,"nhpar;":10994,"nlArr;":8653,"nlarr;":8602,"nleqq;":8806,"nless;":8814,"nlsim;":8820,"nltri;":8938,"notin;":8713,"notni;":8716,"npart;":8706,"nprec;":8832,"nrArr;":8655,"nrarr;":8603,"nrtri;":8939,"nsime;":8772,"nsmid;":8740,"nspar;":8742,"nsubE;":10949,"nsube;":8840,"nsucc;":8833,"nsupE;":10950,"nsupe;":8841,ntilde:241,"numsp;":8199,"nvsim;":8764,"nwArr;":8662,"nwarr;":8598,oacute:243,"ocirc;":244,"odash;":8861,"oelig;":339,"ofcir;":10687,ograve:242,"ohbar;":10677,"olarr;":8634,"olcir;":10686,"oline;":8254,"omacr;":333,"omega;":969,"operp;":10681,"oplus;":8853,"orarr;":8635,"order;":8500,oslash:248,otilde:245,"ovbar;":9021,"parsl;":11005,"phone;":9742,"plusb;":8862,"pluse;":10866,plusmn:177,"pound;":163,"prcue;":8828,"prime;":8242,"prnap;":10937,"prsim;":8830,"quest;":63,"rAarr;":8667,"rBarr;":10511,"radic;":8730,"rangd;":10642,"range;":10661,"raquo;":187,"rarrb;":8677,"rarrc;":10547,"rarrw;":8605,"ratio;":8758,"rbarr;":10509,"rbbrk;":10099,"rbrke;":10636,"rceil;":8969,"rdquo;":8221,"reals;":8477,"rhard;":8641,"rharu;":8640,"rlarr;":8644,"rlhar;":8652,"rnmid;":10990,"roang;":10221,"roarr;":8702,"robrk;":10215,"ropar;":10630,"rrarr;":8649,"rsquo;":8217,"rtrie;":8885,"rtrif;":9656,"sbquo;":8218,"sccue;":8829,"scirc;":349,"scnap;":10938,"scsim;":8831,"sdotb;":8865,"sdote;":10854,"seArr;":8664,"searr;":8600,"setmn;":8726,"sharp;":9839,"sigma;":963,"simeq;":8771,"simgE;":10912,"simlE;":10911,"simne;":8774,"slarr;":8592,"smile;":8995,"smtes;":10924,"sqcap;":8851,"sqcup;":8852,"sqsub;":8847,"sqsup;":8848,"srarr;":8594,"starf;":9733,"strns;":175,"subnE;":10955,"subne;":8842,"supnE;":10956,"supne;":8843,"swArr;":8665,"swarr;":8601,"szlig;":223,"theta;":952,"thkap;":8776,"thorn;":254,"tilde;":732,"times;":215,"trade;":8482,"trisb;":10701,"tshcy;":1115,"twixt;":8812,uacute:250,"ubrcy;":1118,"ucirc;":251,"udarr;":8645,"udhar;":10606,ugrave:249,"uharl;":8639,"uharr;":8638,"uhblk;":9600,"ultri;":9720,"umacr;":363,"uogon;":371,"uplus;":8846,"upsih;":978,"uring;":367,"urtri;":9721,"utdot;":8944,"utrif;":9652,"uuarr;":8648,"vBarv;":10985,"vDash;":8872,"varpi;":982,"vdash;":8866,"veeeq;":8794,"vltri;":8882,"vnsub;":8834,"vnsup;":8835,"vprop;":8733,"vrtri;":8883,"wcirc;":373,"wedge;":8743,"xcirc;":9711,"xdtri;":9661,"xhArr;":10234,"xharr;":10231,"xlArr;":10232,"xlarr;":10229,"xodot;":10752,"xrArr;":10233,"xrarr;":10230,"xutri;":9651,yacute:253,"ycirc;":375,AElig:198,Acirc:194,"Aopf;":120120,Aring:197,"Ascr;":119964,"Auml;":196,"Barv;":10983,"Beta;":914,"Bopf;":120121,"Bscr;":8492,"CHcy;":1063,"COPY;":169,"Cdot;":266,"Copf;":8450,"Cscr;":119966,"DJcy;":1026,"DScy;":1029,"DZcy;":1039,"Darr;":8609,"Dopf;":120123,"Dscr;":119967,Ecirc:202,"Edot;":278,"Eopf;":120124,"Escr;":8496,"Esim;":10867,"Euml;":203,"Fopf;":120125,"Fscr;":8497,"GJcy;":1027,"Gdot;":288,"Gopf;":120126,"Gscr;":119970,"Hopf;":8461,"Hscr;":8459,"IEcy;":1045,"IOcy;":1025,Icirc:206,"Idot;":304,"Iopf;":120128,"Iota;":921,"Iscr;":8464,"Iuml;":207,"Jopf;":120129,"Jscr;":119973,"KHcy;":1061,"KJcy;":1036,"Kopf;":120130,"Kscr;":119974,"LJcy;":1033,"Lang;":10218,"Larr;":8606,"Lopf;":120131,"Lscr;":8466,"Mopf;":120132,"Mscr;":8499,"NJcy;":1034,"Nopf;":8469,"Nscr;":119977,Ocirc:212,"Oopf;":120134,"Oscr;":119978,"Ouml;":214,"Popf;":8473,"Pscr;":119979,"QUOT;":34,"Qopf;":8474,"Qscr;":119980,"Rang;":10219,"Rarr;":8608,"Ropf;":8477,"Rscr;":8475,"SHcy;":1064,"Sopf;":120138,"Sqrt;":8730,"Sscr;":119982,"Star;":8902,THORN:222,"TScy;":1062,"Topf;":120139,"Tscr;":119983,"Uarr;":8607,Ucirc:219,"Uopf;":120140,"Upsi;":978,"Uscr;":119984,"Uuml;":220,"Vbar;":10987,"Vert;":8214,"Vopf;":120141,"Vscr;":119985,"Wopf;":120142,"Wscr;":119986,"Xopf;":120143,"Xscr;":119987,"YAcy;":1071,"YIcy;":1031,"YUcy;":1070,"Yopf;":120144,"Yscr;":119988,"Yuml;":376,"ZHcy;":1046,"Zdot;":379,"Zeta;":918,"Zopf;":8484,"Zscr;":119989,acirc:226,acute:180,aelig:230,"andd;":10844,"andv;":10842,"ange;":10660,"aopf;":120146,"apid;":8779,"apos;":39,aring:229,"ascr;":119990,"auml;":228,"bNot;":10989,"bbrk;":9141,"beta;":946,"beth;":8502,"bnot;":8976,"bopf;":120147,"boxH;":9552,"boxV;":9553,"boxh;":9472,"boxv;":9474,"bscr;":119991,"bsim;":8765,"bsol;":92,"bull;":8226,"bump;":8782,"caps;":8745,"cdot;":267,cedil:184,"cent;":162,"chcy;":1095,"cirE;":10691,"circ;":710,"cire;":8791,"comp;":8705,"cong;":8773,"copf;":120148,"copy;":169,"cscr;":119992,"csub;":10959,"csup;":10960,"cups;":8746,"dArr;":8659,"dHar;":10597,"darr;":8595,"dash;":8208,"diam;":8900,"djcy;":1106,"dopf;":120149,"dscr;":119993,"dscy;":1109,"dsol;":10742,"dtri;":9663,"dzcy;":1119,"eDot;":8785,"ecir;":8790,ecirc:234,"edot;":279,"emsp;":8195,"ensp;":8194,"eopf;":120150,"epar;":8917,"epsi;":949,"escr;":8495,"esim;":8770,"euml;":235,"euro;":8364,"excl;":33,"flat;":9837,"fnof;":402,"fopf;":120151,"fork;":8916,"fscr;":119995,"gdot;":289,"geqq;":8807,"gesl;":8923,"gjcy;":1107,"gnap;":10890,"gneq;":10888,"gopf;":120152,"gscr;":8458,"gsim;":8819,"gtcc;":10919,"gvnE;":8809,"hArr;":8660,"half;":189,"harr;":8596,"hbar;":8463,"hopf;":120153,"hscr;":119997,icirc:238,"iecy;":1077,iexcl:161,"imof;":8887,"iocy;":1105,"iopf;":120154,"iota;":953,"iscr;":119998,"isin;":8712,"iuml;":239,"jopf;":120155,"jscr;":119999,"khcy;":1093,"kjcy;":1116,"kopf;":120156,"kscr;":120000,"lArr;":8656,"lHar;":10594,"lang;":10216,laquo:171,"larr;":8592,"late;":10925,"lcub;":123,"ldca;":10550,"ldsh;":8626,"leqq;":8806,"lesg;":8922,"ljcy;":1113,"lnap;":10889,"lneq;":10887,"lopf;":120157,"lozf;":10731,"lpar;":40,"lscr;":120001,"lsim;":8818,"lsqb;":91,"ltcc;":10918,"ltri;":9667,"lvnE;":8808,"macr;":175,"male;":9794,"malt;":10016,micro:181,"mlcp;":10971,"mldr;":8230,"mopf;":120158,"mscr;":120002,"nGtv;":8811,"nLtv;":8810,"nang;":8736,"napE;":10864,"nbsp;":160,"ncap;":10819,"ncup;":10818,"ngeq;":8817,"nges;":10878,"ngtr;":8815,"nisd;":8954,"njcy;":1114,"nldr;":8229,"nleq;":8816,"nles;":10877,"nmid;":8740,"nopf;":120159,"npar;":8742,"npre;":10927,"nsce;":10928,"nscr;":120003,"nsim;":8769,"nsub;":8836,"nsup;":8837,"ntgl;":8825,"ntlg;":8824,"nvap;":8781,"nvge;":8805,"nvgt;":62,"nvle;":8804,"nvlt;":60,"oast;":8859,"ocir;":8858,ocirc:244,"odiv;":10808,"odot;":8857,"ogon;":731,"oint;":8750,"omid;":10678,"oopf;":120160,"opar;":10679,"ordf;":170,"ordm;":186,"oror;":10838,"oscr;":8500,"osol;":8856,"ouml;":246,"para;":182,"part;":8706,"perp;":8869,"phiv;":981,"plus;":43,"popf;":120161,pound:163,"prap;":10935,"prec;":8826,"prnE;":10933,"prod;":8719,"prop;":8733,"pscr;":120005,"qint;":10764,"qopf;":120162,"qscr;":120006,"quot;":34,"rArr;":8658,"rHar;":10596,"race;":8765,"rang;":10217,raquo:187,"rarr;":8594,"rcub;":125,"rdca;":10551,"rdsh;":8627,"real;":8476,"rect;":9645,"rhov;":1009,"ring;":730,"ropf;":120163,"rpar;":41,"rscr;":120007,"rsqb;":93,"rtri;":9657,"scap;":10936,"scnE;":10934,"sdot;":8901,"sect;":167,"semi;":59,"sext;":10038,"shcy;":1096,"sime;":8771,"simg;":10910,"siml;":10909,"smid;":8739,"smte;":10924,"solb;":10692,"sopf;":120164,"spar;":8741,"squf;":9642,"sscr;":120008,"star;":9734,"subE;":10949,"sube;":8838,"succ;":8827,"sung;":9834,"sup1;":185,"sup2;":178,"sup3;":179,"supE;":10950,"supe;":8839,szlig:223,"tbrk;":9140,"tdot;":8411,thorn:254,times:215,"tint;":8749,"toea;":10536,"topf;":120165,"tosa;":10537,"trie;":8796,"tscr;":120009,"tscy;":1094,"uArr;":8657,"uHar;":10595,"uarr;":8593,ucirc:251,"uopf;":120166,"upsi;":965,"uscr;":120010,"utri;":9653,"uuml;":252,"vArr;":8661,"vBar;":10984,"varr;":8597,"vert;":124,"vopf;":120167,"vscr;":120011,"wopf;":120168,"wscr;":120012,"xcap;":8898,"xcup;":8899,"xmap;":10236,"xnis;":8955,"xopf;":120169,"xscr;":120013,"xvee;":8897,"yacy;":1103,"yicy;":1111,"yopf;":120170,"yscr;":120014,"yucy;":1102,"yuml;":255,"zdot;":380,"zeta;":950,"zhcy;":1078,"zopf;":120171,"zscr;":120015,"zwnj;":8204,"AMP;":38,"Acy;":1040,"Afr;":120068,"And;":10835,Auml:196,"Bcy;":1041,"Bfr;":120069,COPY:169,"Cap;":8914,"Cfr;":8493,"Chi;":935,"Cup;":8915,"Dcy;":1044,"Del;":8711,"Dfr;":120071,"Dot;":168,"ENG;":330,"ETH;":208,"Ecy;":1069,"Efr;":120072,"Eta;":919,Euml:203,"Fcy;":1060,"Ffr;":120073,"Gcy;":1043,"Gfr;":120074,"Hat;":94,"Hfr;":8460,"Icy;":1048,"Ifr;":8465,"Int;":8748,Iuml:207,"Jcy;":1049,"Jfr;":120077,"Kcy;":1050,"Kfr;":120078,"Lcy;":1051,"Lfr;":120079,"Lsh;":8624,"Map;":10501,"Mcy;":1052,"Mfr;":120080,"Ncy;":1053,"Nfr;":120081,"Not;":10988,"Ocy;":1054,"Ofr;":120082,Ouml:214,"Pcy;":1055,"Pfr;":120083,"Phi;":934,"Psi;":936,QUOT:34,"Qfr;":120084,"REG;":174,"Rcy;":1056,"Rfr;":8476,"Rho;":929,"Rsh;":8625,"Scy;":1057,"Sfr;":120086,"Sub;":8912,"Sum;":8721,"Sup;":8913,"Tab;":9,"Tau;":932,"Tcy;":1058,"Tfr;":120087,"Ucy;":1059,"Ufr;":120088,Uuml:220,"Vcy;":1042,"Vee;":8897,"Vfr;":120089,"Wfr;":120090,"Xfr;":120091,"Ycy;":1067,"Yfr;":120092,"Zcy;":1047,"Zfr;":8488,"acE;":8766,"acd;":8767,"acy;":1072,"afr;":120094,"amp;":38,"and;":8743,"ang;":8736,"apE;":10864,"ape;":8778,"ast;":42,auml:228,"bcy;":1073,"bfr;":120095,"bne;":61,"bot;":8869,"cap;":8745,cent:162,"cfr;":120096,"chi;":967,"cir;":9675,copy:169,"cup;":8746,"dcy;":1076,"deg;":176,"dfr;":120097,"die;":168,"div;":247,"dot;":729,"ecy;":1101,"efr;":120098,"egs;":10902,"ell;":8467,"els;":10901,"eng;":331,"eta;":951,"eth;":240,euml:235,"fcy;":1092,"ffr;":120099,"gEl;":10892,"gap;":10886,"gcy;":1075,"gel;":8923,"geq;":8805,"ges;":10878,"gfr;":120100,"ggg;":8921,"glE;":10898,"gla;":10917,"glj;":10916,"gnE;":8809,"gne;":10888,"hfr;":120101,"icy;":1080,"iff;":8660,"ifr;":120102,"int;":8747,iuml:239,"jcy;":1081,"jfr;":120103,"kcy;":1082,"kfr;":120104,"lEg;":10891,"lap;":10885,"lat;":10923,"lcy;":1083,"leg;":8922,"leq;":8804,"les;":10877,"lfr;":120105,"lgE;":10897,"lnE;":8808,"lne;":10887,"loz;":9674,"lrm;":8206,"lsh;":8624,macr:175,"map;":8614,"mcy;":1084,"mfr;":120106,"mho;":8487,"mid;":8739,"nGg;":8921,"nGt;":8811,"nLl;":8920,"nLt;":8810,"nap;":8777,nbsp:160,"ncy;":1085,"nfr;":120107,"ngE;":8807,"nge;":8817,"ngt;":8815,"nis;":8956,"niv;":8715,"nlE;":8806,"nle;":8816,"nlt;":8814,"not;":172,"npr;":8832,"nsc;":8833,"num;":35,"ocy;":1086,"ofr;":120108,"ogt;":10689,"ohm;":937,"olt;":10688,"ord;":10845,ordf:170,ordm:186,"orv;":10843,ouml:246,"par;":8741,para:182,"pcy;":1087,"pfr;":120109,"phi;":966,"piv;":982,"prE;":10931,"pre;":10927,"psi;":968,"qfr;":120110,quot:34,"rcy;":1088,"reg;":174,"rfr;":120111,"rho;":961,"rlm;":8207,"rsh;":8625,"scE;":10932,"sce;":10928,"scy;":1089,sect:167,"sfr;":120112,"shy;":173,"sim;":8764,"smt;":10922,"sol;":47,"squ;":9633,"sub;":8834,"sum;":8721,sup1:185,sup2:178,sup3:179,"sup;":8835,"tau;":964,"tcy;":1090,"tfr;":120113,"top;":8868,"ucy;":1091,"ufr;":120114,"uml;":168,uuml:252,"vcy;":1074,"vee;":8744,"vfr;":120115,"wfr;":120116,"xfr;":120117,"ycy;":1099,"yen;":165,"yfr;":120118,yuml:255,"zcy;":1079,"zfr;":120119,"zwj;":8205,AMP:38,"DD;":8517,ETH:208,"GT;":62,"Gg;":8921,"Gt;":8811,"Im;":8465,"LT;":60,"Ll;":8920,"Lt;":8810,"Mu;":924,"Nu;":925,"Or;":10836,"Pi;":928,"Pr;":10939,REG:174,"Re;":8476,"Sc;":10940,"Xi;":926,"ac;":8766,"af;":8289,amp:38,"ap;":8776,"dd;":8518,deg:176,"ee;":8519,"eg;":10906,"el;":10905,eth:240,"gE;":8807,"ge;":8805,"gg;":8811,"gl;":8823,"gt;":62,"ic;":8291,"ii;":8520,"in;":8712,"it;":8290,"lE;":8806,"le;":8804,"lg;":8822,"ll;":8810,"lt;":60,"mp;":8723,"mu;":956,"ne;":8800,"ni;":8715,not:172,"nu;":957,"oS;":9416,"or;":8744,"pi;":960,"pm;":177,"pr;":8826,reg:174,"rx;":8478,"sc;":8827,shy:173,uml:168,"wp;":8472,"wr;":8768,"xi;":958,yen:165,GT:62,LT:60,gt:62,lt:60},ni=Gu;var Wu=[8364,129,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,141,381,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,157,382,376];function Ku(e,t){if(t&&!e.endsWith(";"))return`${e}\\b(?!=)`;return e}function lo(e){let n=Object.keys(ni).map((r)=>Ku(r,e));return new RegExp(`&(#(?:x[a-fA-F\\d]+|\\d+)(?:;)?|${n.join("|")})`,"g")}var ri,ii;function zu(e){if(e){if(!ii)ii=lo(!0);return ii}if(!ri)ri=lo(!1);return ri}var uo=0;function Xu(e){if(e===10)return 32;if(e<128)return e;if(e<=159)return Wu[e-128];if(e<55296)return e;if(e<=57343)return uo;if(e<=65535)return e;if(e>=65536&&e<=131071)return e;if(e>=131072&&e<=196607)return e;if(e>=917504&&e<=917631||e>=917760&&e<=917999)return e;return uo}function si(e,t){if(e.indexOf("&")===-1)return e;return e.replace(zu(t),(n,r)=>{let i;if(r[0]!=="#")i=ni[r];else if(r[1]==="x")i=Number.parseInt(r.substring(2),16);else i=Number.parseInt(r.substring(1),10);if(!i)return n;return String.fromCodePoint(Xu(i))})}class on extends Error{constructor(e){super(`sveld's template parser doesn't support ${e} yet.`);this.name="TemplateParseNotImplementedError"}}var Ju=/<\/script\s*>/g,Yu=/<\/script\s*>/y,Qu=/[^\n]/g,Zu=new Set(["server","client","worker","test","default"]);function fo(e,t,n){let r=e.index,i=e.readUntil(Ju);if(e.index>=e.source.length)throw Error("sveld: unclosed <script> tag");let o=e.source.slice(0,r).replace(Qu," ")+i;e.read(Yu);let s=io(o,e.isTypeScript,e.root.comments);s.start=r;let p="default";for(let l of n){if(Zu.has(l.name))throw Error(`sveld: "${l.name}" is a reserved <script> attribute name.`);if(l.name==="module"){if(l.value!==!0)throw Error("sveld: <script module> does not take a value.");p="module"}if(l.name==="context"){let h=l.value;if(h===!0||!Array.isArray(h)||h.length!==1||h[0].type!=="Text")throw Error("sveld: context attribute must be a plain string.");if(h[0].data!=="module")throw Error('sveld: only context="module" is valid.');p="module"}}return{type:"Script",start:t,end:e.index,context:p,content:s,attributes:n}}function ho(e,t,n){let r=e.index,i=e.source.indexOf("</style",e.index),o=i===-1?e.source.length:i;return e.index=o,e.eat("</style",!0),e.read(/\s*>/y),{type:"StyleSheet",start:t,end:e.index,attributes:n,children:[],comments:[],content:{start:r,end:o,styles:e.source.slice(r,o),comment:null}}}var ed=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]);function ai(e){return ed.has(e)||e.charCodeAt(0)===33&&e.toLowerCase()==="!doctype"}var td="^[a-zA-Z][a-zA-Z0-9]*(-[a-zA-Z0-9.\\-_\\u00B7\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u203F-\\u2040\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\u{10000}-\\u{EFFFF}]*)?$",nd=new RegExp(td,"u");function mo(e){return nd.test(e)}var rd=/(?:"([^"]*)"|'([^'])*'|([^>\s]+))/y,To=/["']/y,id=/(\/>|[\s"'=<>`])/y,oi=/<\/textarea(\s[^>]*)?>/iy,sd=/^![a-zA-Z]+$/,ad=/^[a-zA-Z][a-zA-Z0-9]*:[a-zA-Z][a-zA-Z0-9-]*[a-zA-Z0-9]$/,od=/^(?:\p{Lu}[$\u200c\u200d\p{ID_Continue}.]*|\p{ID_Start}[$\u200c\u200d\p{ID_Continue}]*(?:\.[$\u200c\u200d\p{ID_Continue}]+)+)$/u,Eo={"svelte:head":"SvelteHead","svelte:options":"SvelteOptions","svelte:window":"SvelteWindow","svelte:document":"SvelteDocument","svelte:body":"SvelteBody"},yo={...Eo,"svelte:element":"SvelteElement","svelte:component":"SvelteComponent","svelte:self":"SvelteSelf","svelte:fragment":"SvelteFragment","svelte:boundary":"SvelteBoundary"};function cd(e){let t=e.charCodeAt(0);if(t<97||t>122)return!1;for(let n=1;n<e.length;n++){let r=e.charCodeAt(n);if((r<97||r>122)&&(r<48||r>57))return!1}return!0}function pd(e){if(cd(e))return!0;if(sd.test(e))return!0;if(ad.test(e))return!0;return mo(e)}function ld(e){let t=e.charCodeAt(0);if(t>=97&&t<=122&&!e.includes("."))return!1;return!0}function ud(e){return`Svelte${e.slice(7).split("-").map((n)=>n.charAt(0).toUpperCase()+n.slice(1)).join("")}`}function dd(e){for(let t=e.length-1;t>=0;t--){let n=e[t].type;if(n==="SvelteHead")return!0;if(n==="RegularElement"||n==="Component")return!1}return!1}function fd(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n.type==="RegularElement"&&n.attributes?.some((r)=>r.type==="Attribute"&&r.name==="shadowrootmode"))return!0}return!1}function go(e){let{source:t,index:n}=e;if(n>=t.length)throw new mt("Unexpected end of input",t.length);let r=n;while(r<t.length){let i=t.charCodeAt(r);if(i===47||i===62||At(i))break;r++}return e.index=r,{name:t.slice(n,r),start:n,end:r}}function So(e){let{source:t,index:n}=e;if(n>=t.length)throw new mt("Unexpected end of input",t.length);let r=n;while(r<t.length){let i=t.charCodeAt(r);if(i===61||i===47||i===62||i===34||i===39||At(i))break;r++}return e.index=r,{name:t.slice(n,r),start:n,end:r}}function hd(e){let t=e.index;if(e.eat("//")){let n=e.readUntilString(`
40
- `),r=e.index;e.root.comments.push({type:"Line",value:n,start:t,end:r});return}if(e.eat("/*")){let n=e.readUntilString("*/");e.eat("*/");let r=e.index;e.root.comments.push({type:"Block",value:n,start:t,end:r})}}function md(e){if(e==="use")return"UseDirective";if(e==="animate")return"AnimateDirective";if(e==="bind")return"BindDirective";if(e==="class")return"ClassDirective";if(e==="style")return"StyleDirective";if(e==="on")return"OnDirective";if(e==="let")return"LetDirective";if(e==="in"||e==="out"||e==="transition")return"TransitionDirective";return!1}function Co(e,t,n){let r={start:e.index,end:-1,type:"Text",raw:"",data:""},i=[],o=(s)=>{if(s>r.start)r.raw=e.source.slice(r.start,s),r.data=si(r.raw,!0),r.end=s,i.push(r)};while(e.index<e.source.length){if(t())return o(e.index),i;if(e.eat("{")){if(e.match("#")||e.match("@"))throw new on("blocks/tags inside attribute value sequences");let s=e.index-1;o(s),e.allowWhitespace();let p=Te(e);e.allowWhitespace(),e.eat("}",!0),i.push({type:"ExpressionTag",start:s,end:e.index,expression:p}),r={start:e.index,end:-1,type:"Text",raw:"",data:""}}else{let s=e.index+1;if(n!==void 0){let p=e.source;while(s<p.length){let l=p.charCodeAt(s);if(l===123||l===n)break;s++}}e.index=s}}throw new on("unterminated attribute value / sequence (loose mode)")}function yd(e){let t=e.eat("'")?"'":e.eat('"')?'"':null;if(t&&e.eat(t))return[{start:e.index-1,end:e.index-1,type:"Text",raw:"",data:""}];let n=Co(e,()=>{if(t)return e.match(t);return!!e.matchRegex(id)},t===null?void 0:t.charCodeAt(0));if(n.length===0&&!t)throw Error("sveld: expected attribute value");if(t)e.index+=1;if(t||n.length>1||n[0].type==="Text")return n;return n[0]}function ci(e,t,n,r){return{type:"Attribute",start:t,end:n,name:e,value:r}}function gd(e){let t=e.index,n=So(e);if(!n.name)return null;let r=!0;if(e.eat("=")){e.allowWhitespace();let i=e.matchRegex(rd);if(!i)throw Error("sveld: expected attribute value");e.index+=i.length;let o=i[0]==='"'||i[0]==="'";if(o)i=i.slice(1,-1);r=[{start:e.index-i.length-(o?1:0),end:o?e.index-1:e.index,type:"Text",raw:i,data:si(i,!0)}]}if(e.matchRegex(To))throw Error("sveld: expected '='");return ci(n.name,t,e.index,r)}function xd(e){while(!0){let p=e.index;if(hd(e),e.index===p)break;e.allowWhitespace()}let t=e.index;if(e.eat("{")){if(e.allowWhitespace(),e.eat("@attach")){e.requireWhitespace();let h=Te(e);return e.allowWhitespace(),e.eat("}",!0),{type:"AttachTag",start:t,end:e.index,expression:h}}if(e.eat("...")){let h=Te(e);return e.allowWhitespace(),e.eat("}",!0),{type:"SpreadAttribute",start:t,end:e.index,expression:h}}let p=e.readIdentifierName();if(p.name==="")throw Error("sveld: empty attribute shorthand");e.allowWhitespace(),e.eat("}",!0);let l={type:"ExpressionTag",start:p.start,end:p.end,expression:p};return ci(p.name,t,e.index,l)}let n=So(e);if(!n.name)return null;let r=e.index;e.allowWhitespace();let i=n.name.indexOf(":"),o=i!==-1&&md(n.name.slice(0,i)),s=!0;if(e.eat("="))if(e.allowWhitespace(),e.source[e.index]==="/"&&e.source[e.index+1]===">"){let p=e.index;e.index++,s=[{start:p,end:p+1,type:"Text",raw:"/",data:"/"}],r=e.index}else s=yd(e),r=e.index;else if(e.matchRegex(To))throw Error("sveld: expected '='");if(o){let p=n.name.slice(i+1).split("|",1)[0];if(p==="")throw Error("sveld: directive missing a name");if(o==="StyleDirective")return{start:t,end:r,type:o,name:p,value:s};let l=s===!0?void 0:Array.isArray(s)?s[0]:s,h=null;if(l){if((Array.isArray(s)?s.length>1:!1)||l.type==="Text")throw Error("sveld: directive value must be a single expression");h=l.expression}let d={start:t,end:r,type:o,name:p,expression:h};if((d.type==="BindDirective"||d.type==="ClassDirective")&&!d.expression)d.expression={start:t+i+1,end:r,type:"Identifier",name:d.name};return d}return ci(n.name,t,r,s)}function vo(e){let t=e.index++,n=e.current();if(e.eat("!--")){let b=e.readUntilString("-->");e.eat("-->",!0),e.append({type:"Comment",start:t,end:e.index,data:b});return}if(e.eat("/")){let{name:b}=go(e);if(e.allowWhitespace(),e.eat(">",!0),ai(b))throw Error(`sveld: <${b}> is a void element and cannot have a closing tag`);while(n.name!==b){if(n.type==="RegularElement");else throw Error(`sveld: invalid closing tag </${b}>`);n.end=t,e.pop(),n=e.current()}if(n.end=e.index,e.pop(),e.lastAutoClosedTag&&e.stack.length<e.lastAutoClosedTag.depth)e.lastAutoClosedTag=void 0;return}let r=go(e),i=ld(r.name)&&od.test(r.name);if(!pd(r.name)&&!i)throw Error(`sveld: "${r.name}" is not a valid element or component name`);if(r.name in Eo&&n.type!=="Root")throw Error(`sveld: <${r.name}> must be a top-level element`);let o;if(r.name in yo)o=yo[r.name];else if(r.name.startsWith("svelte:"))o=ud(r.name);else if(i)o="Component";else if(r.name==="title"&&dd(e.stack))o="TitleElement";else if(r.name==="slot"&&!fd(e.stack))o="SlotElement";else o="RegularElement";let s={type:o,start:t,end:-1,name:r.name,attributes:[],fragment:{type:"Fragment",nodes:[]}};if(e.allowWhitespace(),n.type==="RegularElement"&&zs(n.name,r.name))n.end=t,e.pop(),e.lastAutoClosedTag={tag:n.name,reason:r.name,depth:e.stack.length},n=e.current();let p=e.current(),l=(r.name==="script"||r.name==="style")&&p.type==="Root",h=l?gd:xd,d;while(d=h(e))s.attributes.push(d),e.allowWhitespace();if(s.type==="SvelteComponent")s.expression=bo(xo(s));if(s.type==="SvelteElement"){let b=xo(s);if(b.value===!0)throw Error("sveld: <svelte:element> `this` attribute needs a value");if(bd(b))s.tag=bo(b);else{let E=b.value[0];s.tag=E.type==="Text"?{type:"Literal",value:E.data,raw:`'${E.raw}'`,start:E.start,end:E.end}:E.expression}}if(l){if(e.eat(">",!0),r.name==="script"){let b=fo(e,t,s.attributes);if(b.context==="module"){if(e.root.module)throw Error("sveld: duplicate <script module>");e.root.module=b}else{if(e.root.instance)throw Error("sveld: duplicate <script>");e.root.instance=b}}else{if(e.root.css)throw Error("sveld: duplicate <style>");e.root.css=ho(e,t,s.attributes)}return}e.append(s);let g=e.eat("/")||ai(r.name);if(e.eat(">",!0),g)s.end=e.index;else if(r.name==="textarea")s.fragment.nodes=Co(e,()=>(oi.lastIndex=e.index,oi.test(e.source))),e.read(oi),s.end=e.index;else e.push(s,s.fragment)}function xo(e){let t=e.attributes,n=t.findIndex((r)=>r.type==="Attribute"&&r.name==="this");if(n===-1)throw Error(`sveld: <${e.name}> requires a \`this\` attribute`);return t.splice(n,1)[0]}function bo(e){return Array.isArray(e.value)?e.value[0].expression:e.value.expression}function bd(e){return e.value!==!0&&!Array.isArray(e.value)||Array.isArray(e.value)&&e.value.length===1&&e.value[0].type==="ExpressionTag"}function Ao(e){let t={start:e.start,end:e.end,attributes:e.attributes};for(let n of e.attributes){if(n.type!=="Attribute")continue;if(n.name==="runes"){let r=Po(n);if(typeof r==="boolean")t.runes=r}if(n.name==="customElement"){let r=Sd(n);if(r!==void 0)t.customElement=r}}return t}function Po(e){let{value:t}=e;if(t===!0)return!0;let n=Array.isArray(t)?t[0]:t;if(!n)return!0;if(Array.isArray(t)&&t.length>1)return null;if(n.type==="Text")return n.data;if(n.expression.type!=="Literal")return null;return n.expression.value}var Td=new Set(["String","Boolean","Number","Array","Object"]);function pi(e){let t=[];for(let n of e.properties){if(!n||typeof n!=="object"||n.type!=="Property"||n.computed||n.key?.type!=="Identifier")continue;let{key:r,value:i}=n;t.push([r.name,i])}return t}function Ed(e){let t={};if(!e||typeof e!=="object"||e.type!=="ObjectExpression")return t;for(let[n,r]of pi(e)){if(!r||typeof r!=="object"||r.type!=="Literal")continue;let i=r.value;if(n==="attribute"&&typeof i==="string")t.attribute=i;else if(n==="reflect"&&typeof i==="boolean")t.reflect=i;else if(n==="type"&&typeof i==="string"&&Td.has(i))t.type=i}return t}function Sd(e){let{value:t}=e;if(t===!0)return;let n=Array.isArray(t)?t[0]:t;if(!n)return;if(n.type==="Text"){let d=Po(e);return typeof d==="string"?{tag:d}:void 0}let r=n.expression;if(r.type==="Literal"&&r.value===null)return;if(r.type!=="ObjectExpression")return;let i=pi(r),o={},s=i.find(([d])=>d==="tag")?.[1];if(s&&typeof s==="object"&&s.type==="Literal"&&typeof s.value==="string")o.tag=s.value;let p=i.find(([d])=>d==="props")?.[1];if(p&&typeof p==="object"&&p.type==="ObjectExpression"){o.props={};for(let[d,g]of pi(p))o.props[d]=Ed(g)}let l=i.find(([d])=>d==="shadow")?.[1];if(l&&typeof l==="object"){let d=l;if(d.type==="Literal"&&(d.value==="open"||d.value==="none"))o.shadow=d.value;else if(d.type==="ObjectExpression")o.shadow=l}let h=i.find(([d])=>d==="extend")?.[1];if(h!==void 0)o.extend=h;return o}var Cd=/<script\s+(?:[^>]*|(?:[^=>'"/]+=(?:"[^"]*"|'[^']*'|[^>\s]+)\s+)*)lang=(["'])?ts\1[^>]*>/;class li extends ei{root;stack=[];fragments=[];isTypeScript;lineTable={};lastAutoClosedTag;constructor(e,t){super(e);this.isTypeScript=Cd.test(e);let n=_e();this.root={type:"Root",start:0,end:t,css:null,js:[],options:null,fragment:n,comments:[]},this.stack.push(this.root),this.fragments.push(n)}current(){return this.stack[this.stack.length-1]}currentFragment(){return this.fragments[this.fragments.length-1]}push(e,t){this.stack.push(e),this.fragments.push(t)}pop(){return this.fragments.pop(),this.stack.pop()}append(e){return this.currentFragment().nodes.push(e),e}}var ui={"{":"}","(":")","[":"]"},vd=new Set(Object.values(ui));function cn(e,t,n=ui){let r=n===ui?vd:new Set(Object.values(n)),i=[],o=t;while(o<e.source.length){let s=e.source[o++];if(s==="'"||s==='"'||s==="`"){o=Ad(e,o,s);continue}if(Object.hasOwn(n,s))i.push(s);else if(r.has(s)){let p=i.pop(),l=p?n[p]:void 0;if(s!==l)throw Error(`sveld: expected "${l}"`);if(i.length===0)return o}}throw Error("sveld: unexpected end of input")}function Ad(e,t,n){let r=!1,i=t;while(i<e.source.length){let o=e.source[i++];if(r){r=!1;continue}if(o===n)return i;if(o==="\\")r=!0;if(n==="`"&&o==="$"&&e.source[i]==="{")i=cn(e,i)}throw Error("sveld: unterminated string constant")}var wo=/[^\n]/g,Pd=/\?\s*:/g;function yt(e){let t=e.index,n=e.readIdentifierName();if(n.name!==""){let b=ko(e);return{...n,typeAnnotation:b}}let r=e.source[e.index];if(r!=="{"&&r!=="[")throw Error("sveld: expected a binding pattern");let i=cn(e,t);e.index=i;let o=e.source.slice(t,i),s=e.source.slice(0,t).replace(wo," "),p=s.indexOf(" ");s=s.slice(0,p)+s.slice(p+1);let l=`${s}(${o} = 1)`,{node:h}=Bt(l,t-1,e.isTypeScript,e.root.comments),d=h.left,g=ko(e);if(g)d.typeAnnotation=g,d.end=g.end;return d}function ko(e){let t=e.index;if(e.allowWhitespace(),!e.eat(":")){e.index=t;return}let n="_ as ",r=e.index-n.length,i=e.source.slice(0,r).replace(wo," ")+n+e.source.slice(e.index).replace(Pd,":"),{node:o}=Bt(i,r,e.isTypeScript,e.root.comments),s=o;if(s.type==="AssignmentExpression"){let p=s.right.start;while(i[p]!=="=")p-=1;({node:o}=Bt(i.slice(0,p),r,e.isTypeScript,e.root.comments)),s=o}if(s.type==="SequenceExpression"&&s.expressions)s=s.expressions[0];return e.index=s.end,{type:"TSTypeAnnotation",start:t,end:e.index,typeAnnotation:s.typeAnnotation}}var No=/\s*}/y,kd={"<":">"};function _o(e){let t=e.index-2;while(e.source[t]!=="{")t-=1;if(e.eat("if")){e.requireWhitespace();let n={type:"IfBlock",elseif:!1,start:t,end:-1,test:Te(e),consequent:_e(),alternate:null};e.append(n),e.allowWhitespace(),e.eat("}",!0),e.push(n,n.consequent);return}if(e.eat("each")){e.requireWhitespace();let n=Te(e);if(e.allowWhitespace(),!e.match("as")){let p=n;if(p.type==="SequenceExpression"&&p.expressions)p=p.expressions[0];if(p.type==="TSAsExpression"){let l=p;n=l.expression;let h=l.typeAnnotation.start-2;while(h>=0&&!(e.source[h]==="a"&&e.source[h+1]==="s"))h-=1;e.index=h}}let r=null,i,o;if(e.eat("as"))e.requireWhitespace(),r=yt(e);if(e.allowWhitespace(),e.eat(",")){e.allowWhitespace();let p=e.readIdentifierName();if(!p.name)throw Error("sveld: expected an identifier");i=p.name,e.allowWhitespace()}if(e.eat("("))e.allowWhitespace(),o=Te(e),e.allowWhitespace(),e.eat(")",!0),e.allowWhitespace();e.eat("}",!0);let s={type:"EachBlock",start:t,end:-1,expression:n,body:_e(),context:r,index:i,key:o};e.append(s),e.push(s,s.body);return}if(e.eat("await")){e.requireWhitespace();let n=Te(e);e.allowWhitespace();let r={type:"AwaitBlock",start:t,end:-1,expression:n,value:null,error:null,pending:null,then:null,catch:null};if(e.eat("then")){if(!e.matchRegex(No))e.requireWhitespace(),r.value=yt(e),e.allowWhitespace();r.then=_e()}else if(e.eat("catch")){if(!e.matchRegex(No))e.requireWhitespace(),r.error=yt(e),e.allowWhitespace();r.catch=_e()}else r.pending=_e();e.eat("}",!0),e.append(r),e.push(r,r.then??r.catch??r.pending);return}if(e.eat("key")){e.requireWhitespace();let n=Te(e);e.allowWhitespace(),e.eat("}",!0);let r={type:"KeyBlock",start:t,end:-1,expression:n,fragment:_e()};e.append(r),e.push(r,r.fragment);return}if(e.eat("snippet")){e.requireWhitespace();let n=e.readIdentifierName();if(n.name==="")throw Error("sveld: expected a snippet name");e.allowWhitespace();let r;if(e.isTypeScript&&e.match("<")){let o=e.index,s=cn(e,o,kd);r=e.source.slice(o+1,s-1),e.index=s}if(e.allowWhitespace(),e.eat("(")){let o=1;while(e.index<e.source.length&&(!e.match(")")||o!==1)){if(e.match("("))o++;if(e.match(")"))o--;e.index+=1}e.eat(")",!0)}e.allowWhitespace(),e.eat("}",!0);let i={type:"SnippetBlock",start:t,end:-1,expression:n,typeParams:r,parameters:[],body:_e()};e.append(i),e.push(i,i.body);return}throw Error("sveld: expected if/each/await/key/snippet")}function Do(e){let t=e.index-1,n=e.current();if(n.type==="IfBlock"){if(!e.eat("else"))throw Error("sveld: expected {:else} or {:else if}");if(e.eat("if"))throw Error("sveld: {:else if} cannot follow {:else if} directly");if(e.allowWhitespace(),e.fragments.pop(),n.alternate=_e(),e.fragments.push(n.alternate),e.eat("if")){e.requireWhitespace();let r=Te(e);e.allowWhitespace(),e.eat("}",!0);let i=t-1;while(e.source[i]!=="{")i-=1;let o={type:"IfBlock",start:i,end:-1,elseif:!0,test:r,consequent:_e(),alternate:null};e.append(o),e.stack.push(o),e.fragments.pop(),e.fragments.push(o.consequent)}else e.allowWhitespace(),e.eat("}",!0);return}if(n.type==="EachBlock"){if(!e.eat("else"))throw Error("sveld: expected {:else}");e.allowWhitespace(),e.eat("}",!0),n.fallback=_e(),e.fragments.pop(),e.fragments.push(n.fallback);return}if(n.type==="AwaitBlock"){if(e.eat("then")){if(n.then)throw Error("sveld: duplicate {:then}");if(!e.eat("}"))e.requireWhitespace(),n.value=yt(e),e.allowWhitespace(),e.eat("}",!0);n.then=_e(),e.fragments.pop(),e.fragments.push(n.then);return}if(e.eat("catch")){if(n.catch)throw Error("sveld: duplicate {:catch}");if(!e.eat("}"))e.requireWhitespace(),n.error=yt(e),e.allowWhitespace(),e.eat("}",!0);n.catch=_e(),e.fragments.pop(),e.fragments.push(n.catch);return}throw Error("sveld: expected {:then ...} or {:catch ...}")}throw Error("sveld: {:...} not valid here")}function Io(e){let t=e.current();switch(t.type){case"IfBlock":{e.eat("if",!0),e.allowWhitespace(),e.eat("}",!0);while(t.type==="IfBlock"&&t.elseif)t.end=e.index,e.stack.pop(),t=e.current();t.end=e.index,e.pop();return}case"EachBlock":e.eat("each",!0);break;case"KeyBlock":e.eat("key",!0);break;case"AwaitBlock":e.eat("await",!0);break;case"SnippetBlock":e.eat("snippet",!0);break;default:throw Error("sveld: unexpected closing block tag")}e.allowWhitespace(),e.eat("}",!0),t.end=e.index,e.pop()}var wd=/(?:let|const)\b/y,Nd=/(?:var|interface|enum)\b/y,_d=/type\b/y;function Lo(e){let t=e.index;if(e.matchRegex(Nd))throw Error("sveld: `var`/`interface`/`enum` are not valid here");if(!e.matchRegex(wd)&&!e.matchRegex(_d))return null;let n=e.root.comments.length,r=so(e.source,t,e.isTypeScript,e.root.comments);if(r.type!=="VariableDeclaration"){if(r.type==="ExpressionStatement")return e.root.comments.length=n,null;throw Error("sveld: expected a `let`/`const` declaration")}if(r.kind!=="let"&&r.kind!=="const")throw Error("sveld: expected a `let`/`const` declaration");return e.index=r.end,e.allowWhitespace(),e.eat("}",!0),r}var Dd=/\s*}/y;function Ro(e){let t=e.index;while(e.source[t]!=="{")t-=1;if(e.eat("html")){e.requireWhitespace();let n=Te(e);e.allowWhitespace(),e.eat("}",!0);let r={type:"HtmlTag",start:t,end:e.index,expression:n};e.append(r);return}if(e.eat("debug")){let n;if(e.read(Dd))n=[];else{let i=Te(e);n=i.type==="SequenceExpression"?i.expressions:[i];for(let o of n)if(o.type!=="Identifier")throw Error("sveld: {@debug} arguments must be identifiers");e.allowWhitespace(),e.eat("}",!0)}let r={type:"DebugTag",start:t,end:e.index,identifiers:n};e.append(r);return}if(e.eat("const")){e.requireWhitespace();let n=yt(e);e.allowWhitespace(),e.eat("=",!0),e.allowWhitespace();let r=Te(e),i=e.index;e.allowWhitespace(),e.eat("}",!0);let o={type:"VariableDeclarator",id:n,init:r,start:n.start,end:i},s={type:"ConstTag",start:t,end:e.index,declaration:{type:"VariableDeclaration",kind:"const",declarations:[o],start:t+2,end:e.index-1}};e.append(s);return}if(e.eat("render")){e.requireWhitespace();let n=Te(e);if(!(n.type==="CallExpression"||n.type==="ChainExpression"&&n.expression.type==="CallExpression"))throw Error("sveld: {@render ...} must be a function call");e.allowWhitespace(),e.eat("}",!0);let i={type:"RenderTag",start:t,end:e.index,expression:n};e.append(i);return}throw Error("sveld: expected html/debug/const/render")}function Mo(e){let t=e.index;if(e.index+=1,e.allowWhitespace(),e.eat("#")){_o(e);return}if(e.eat(":")){Do(e);return}if(e.eat("@")){Ro(e);return}if(e.match("/")&&!e.match("/*")&&!e.match("//")){e.eat("/"),Io(e);return}let n=Lo(e);if(n){let o={type:"DeclarationTag",start:t,end:e.index,declaration:n};e.append(o);return}let r=Te(e);e.allowWhitespace(),e.eat("}",!0);let i={type:"ExpressionTag",start:t,end:e.index,expression:r};e.append(i)}function Oo(e){let{index:t,source:n}=e,r=n.indexOf("<",t),i=n.indexOf("{",t),o;if(r===-1)o=i===-1?n.length:i;else o=i===-1?r:Math.min(r,i);e.index=o;let s=n.slice(t,o),p={type:"Text",start:t,end:e.index,raw:s,data:s};e.append(p)}function di(e){let t=e.trimEnd(),n=new li(t,e.length);while(n.index<n.source.length)if(n.match("<"))vo(n);else if(n.match("{"))Mo(n);else Oo(n);let r=n.root.fragment.nodes.findIndex((i)=>i.type==="SvelteOptions");if(r!==-1){let[i]=n.root.fragment.nodes.splice(r,1);n.root.options=Ao(i)}return n.root}function fi(e){if(e?.type==="Identifier")return e.name;return typeof e?.value==="string"?e.value:void 0}function Bo(e){if(e==="var")return"let";if(e==="using"||e==="await using")return"const";return e}var Id=null,Fo=/^@component/,Ld=/\r/g,Rd=/^\{\s*\}$/,Md=new Set(["AssignmentExpression","UpdateExpression","CallExpression","SpreadAttribute","FunctionDeclaration","ImportDeclaration","VariableDeclaration","ExportNamedDeclaration","Comment","SlotElement","RenderTag","OnDirective","BindDirective"]);class Se{ctx=tr();static mapToArray(e){return Array.from(e,([t,n])=>n)}static getStaticAttributeValue(e){if(!Array.isArray(e.value))return;return e.value.map((t)=>t.data??t.raw??"").join("").trim()}resolveScriptLanguage(e){let t=[e.instance,e.module].filter((r)=>r!==void 0),n=!1;for(let r of t){let i=r.attributes?.find((s)=>s.name==="lang");if(!i){n=!0;continue}if(Se.getStaticAttributeValue(i)?.toLowerCase()==="ts")return"ts"}return n?"js":void 0}resolveScriptGenericsAttribute(e){let t=e.instance?.attributes?.find((s)=>s.name==="generics");if(!t)return;let n=se(this.ctx,t),r=e.instance?.attributes?.find((s)=>s.name==="lang");if((r?Se.getStaticAttributeValue(r)?.toLowerCase():void 0)!=="ts"){oe(this.ctx,"syntax-skipped","generics",'<script generics="..."> requires lang="ts"; the generics attribute was ignored because the script is not TypeScript.',n);return}let o=Se.getStaticAttributeValue(t);if(!o)return;return{value:o,source:n}}resolvePublicPropName(e){return this.ctx.propLocalToPublicName.get(e)??e}trackPropLocalName(e,t=e){this.ctx.propLocalToPublicName.set(t,e)}getPropByLocalOrPublic(e){return this.ctx.props.get(this.resolvePublicPropName(e))}getPropTypeByLocalOrPublic(e){return this.getPropByLocalOrPublic(e)?.type}getExplicitPropType(e){return this.ctx.explicitPropTypesByName.get(e)}getPropertyName(e){if(!e||typeof e!=="object"||!("type"in e))return;if(xe(e))return e.name;if(pt(e))return e.value==null?void 0:String(e.value);return}isNumericConstant(e){if(!e||typeof e!=="object"||!("type"in e))return!1;if(e.type!=="MemberExpression")return!1;let t=e,n=t.object&&"name"in t.object?t.object.name:void 0,r=t.property&&"name"in t.property?t.property.name:void 0;if(!n||!r)return!1;if(n==="Number")return["POSITIVE_INFINITY","NEGATIVE_INFINITY","MAX_VALUE","MIN_VALUE","MAX_SAFE_INTEGER","MIN_SAFE_INTEGER","EPSILON","NaN"].includes(r);if(n==="Math")return["PI","E","LN2","LN10","LOG2E","LOG10E","SQRT2","SQRT1_2"].includes(r);return!1}resolveLocalVarJSDoc(e){for(let n of this.ctx.vars)if(n.declarations.some((i)=>i.id&&typeof i.id==="object"&&("type"in i.id)&&i.id.type==="Identifier"&&("name"in i.id)&&i.id.name===e))return rt(this.ctx,this,n);let t=this.ctx.funcDecls.get(e);if(t)return rt(this.ctx,this,t);return}addModuleExport(e,t){if(je(e)===void 0)return;if(this.ctx.moduleExports.has(e)){let n=this.ctx.moduleExports.get(e);this.ctx.moduleExports.set(e,{...n,...t})}else this.ctx.moduleExports.set(e,t)}resolveExportSpecifier(e,t){let n=fi(t.local),r=fi(t.exported);if(!n||!r)return;if(e.source!=null)return{localName:n,exportedName:r};for(let i of this.ctx.vars){let o=i.declarations.find((s)=>s.id.type==="Identifier"&&s.id.name===n);if(o)return{localName:n,exportedName:r,declaration:i,declarator:o}}return{localName:n,exportedName:r}}recordUnresolvedExportSpecifier(e,t,n){let r=e.source?.value,i=typeof r==="string"?`it re-exports from "${r}"`:this.ctx.valueImportBindingsByLocalName.has(t)?"it re-exports an imported binding":"no matching local declaration was found";oe(this.ctx,"export-unresolved",n,`export "${n}" was skipped because ${i}; sveld only resolves exports of a local declaration.`,se(this.ctx,e))}aliasType(e){if(e==="*")return"any";return e.trim()}findVariableTypeAndDescription(e){let t=this.getPropByLocalOrPublic(e);if(t?.type)return{type:t.type,description:t.description,internal:t.internal};if(!this.ctx.variableInfoCacheBuilt)this.ctx.variableInfoCache=Ks(this.ctx,this),this.ctx.variableInfoCacheBuilt=!0;let n=this.ctx.variableInfoCache.get(e),r=this.ctx.explicitVariableTypesByName.get(e);if(r)return{type:r,description:n?.description,internal:n?.internal};return n??null}accumulateGeneric(e,t){if(this.ctx.generics)this.ctx.generics=[`${this.ctx.generics[0]}, ${e}`,`${this.ctx.generics[1]}, ${t}`];else this.ctx.generics=[e,t]}cleanup(){this.ctx=tr()}static SCRIPT_BLOCK_REGEX=/(<script[^>]*>)([\s\S]*?)(<\/script>)/gi;static TS_DIRECTIVE_REGEX=/\/\/\s*@ts-[^\n\r]*/g;static stripTypeScriptDirectivesFromScripts(e){if(!e.includes("@ts-"))return e;return Se.SCRIPT_BLOCK_REGEX.lastIndex=0,e.replace(Se.SCRIPT_BLOCK_REGEX,(t,n,r,i)=>{Se.TS_DIRECTIVE_REGEX.lastIndex=0;let o=r.replace(Se.TS_DIRECTIVE_REGEX,"");return n+o+i})}parseSvelteComponent(e,t){this.cleanup(),this.ctx.componentFilePath=t.filePath;let n=Se.stripTypeScriptDirectivesFromScripts(e);this.ctx.source=n;let r=di(n);if($s(this,this.ctx,r),this.ctx.parsed=r,this.ctx.scriptLanguage==="ts")vn(this.ctx.parsed.module),vn(this.ctx.parsed.instance),vn(this.ctx.parsed.fragment);this.ctx.syntaxMode=Vs(this.ctx);let i=this.ctx.parsed.css,o=i?.start!==void 0&&i?.end!==void 0?n.slice(0,i.start)+" ".repeat(i.end-i.start)+n.slice(i.end):n;mr(this.ctx,this.ctx.parsed?.module),mr(this.ctx,this.ctx.parsed?.instance),Ns(this.ctx,this,o);let s={type:"ComponentRoot",instance:this.ctx.parsed.instance,fragment:this.ctx.parsed.fragment};if(this.ctx.parsed?.module){let y=Es(this.ctx.parsed.module),x=(v,S,A)=>{let k=rt(this.ctx,this,v);this.addModuleExport(S==="*"?`* from ${A.from}`:S,{name:S,kind:"re-export",description:k?.description,deprecated:k?.deprecated,tags:k?.tags,...k?.internal?{internal:!0}:{},isFunction:!1,isFunctionDeclaration:!1,isRequired:!1,constant:!1,reactive:!1,reExport:A,source:se(this.ctx,v)})},C=(v,S,A)=>{let k=[];if(S.type==="FunctionDeclaration"){let j=S;if(!j.id?.name)return;let F=this.ctx.scriptLanguage==="ts"?ur(this.ctx,j):void 0;k.push({prop_name:j.id.name,kind:"function",isFunctionDeclaration:!0,value:void 0,typeSeed:F?.hasAnnotations?void 0:"() => any",explicitType:F?.hasAnnotations?F.signature:void 0,initializerIsFunction:!0,defaultValue:void 0,inferredTypeForSource:void 0,resolvedJSDoc:void 0})}else if(S.type==="VariableDeclaration"){let j=S,F=Bo(j.kind),G=A?.declarator?[A.declarator]:j.declarations;for(let z of G){if(!z||typeof z!=="object"||!("id"in z))continue;let{id:K,init:Y}=z;if(!K||typeof K!=="object"||!("name"in K))continue;let le=K.name,ne=A?.exportedName??le,V=Y==null?{isFunction:!1}:ut(this,this.ctx,Y),{value:Ee,type:me,isFunction:Ce,defaultValue:Me}=V,ze=V;qt(this.ctx,V,le,"moduleExports"),k.push({prop_name:ne,kind:F,isFunctionDeclaration:!1,value:Ee,typeSeed:me,explicitType:this.getExplicitPropType(le),initializerIsFunction:Ce,defaultValue:Me,inferredTypeForSource:me,resolvedJSDoc:ze})}if(k.length===0)return}else return;let _=rt(this.ctx,this,v);for(let{prop_name:j,kind:F,isFunctionDeclaration:G,value:z,typeSeed:K,explicitType:Y,initializerIsFunction:le,defaultValue:ne,inferredTypeForSource:V,resolvedJSDoc:Ee}of k){let{type:me,typeSource:Ce,description:Me,params:ze,returnType:xt,isFunction:bt,typeParameters:Yn}=zt({explicitType:Y,typeSeed:K,inferredTypeForSource:V,jsdocType:_?.type,jsdocDescription:_?.description,jsdocParams:_?.params,jsdocReturnType:_?.returnType,jsdocTypeParameters:_?.typeParameters,resolvedType:Ee?.resolvedType,resolvedDescription:Ee?.resolvedDescription,resolvedParams:Ee?.resolvedParams,resolvedReturnType:Ee?.resolvedReturnType,initializerIsFunction:le,isFunctionDeclaration:G,typedefs:this.ctx.typedefs});this.addModuleExport(j,{name:j,kind:F,description:Me,deprecated:_?.deprecated,tags:_?.tags,..._?.internal?{internal:!0}:{},type:me,typeSource:Ce,value:z,defaultValue:ne,params:ze,returnType:xt,typeParameters:Yn,isFunction:bt,isFunctionDeclaration:G,isRequired:!1,constant:F==="const",reactive:!1,source:se(this.ctx,v)})}};vr(this.ctx.parsed?.module,(v)=>{if(v.type==="ImportDeclaration")Tn(this.ctx,v);if(v.type==="FunctionDeclaration"){let S=v;if(S.id?.name)this.ctx.funcDecls.set(S.id.name,S)}if(v.type==="VariableDeclaration")this.ctx.vars.add(v);if(v.type==="ExportNamedDeclaration"){if(v.declaration!=null){C(v,v.declaration);return}let S=v.source?.value;for(let A of v.specifiers){let k=this.resolveExportSpecifier(v,A);if(!k)continue;if(k.exportedName==="default"){oe(this.ctx,"module-export-conflict",k.exportedName,`export "default" was skipped because it collides with the component's own default export.`,se(this.ctx,v));continue}let _=typeof S==="string"?{from:S,imported:k.localName}:y.get(k.localName);if(k.declaration)C(v,k.declaration,k);else if(_)x(v,k.exportedName,_);else this.recordUnresolvedExportSpecifier(v,k.localName,k.exportedName)}}if(v.type==="ExportAllDeclaration"&&typeof v.source.value==="string"){let S=(v.exported&&fi(v.exported))??"*";x(v,S,{from:v.source.value,imported:"*"})}})}let p,l,h,d=new Set,g=new Set,b=[],E=[];Is(this,this.ctx),this.ctx.activeScopes.push(this.ctx.componentScope);let w=Ls(this.ctx),N=(y,x,C)=>{let v=[];if(x.type==="FunctionDeclaration"){let A=x;if(!A.id?.name)return;let k=A.id.name,_=this.ctx.scriptLanguage==="ts"?ur(this.ctx,A):void 0;v.push({prop_name:k,kind:"function",isFunctionDeclaration:!0,value:void 0,typeSeed:_?.hasAnnotations?void 0:"() => any",explicitType:_?.hasAnnotations?_.signature:void 0,initializerIsFunction:!0,isRequired:!1,localName:A.id.name,defaultValue:void 0,inferredTypeForSource:void 0,resolvedJSDoc:void 0})}else if(x.type==="VariableDeclaration"){let A=x,k=Bo(A.kind),_=C?.declarator?[C.declarator]:A.declarations;for(let j of _){if(!j||typeof j!=="object"||!("id"in j))continue;let{id:F,init:G}=j;if(!F||typeof F!=="object"||!("name"in F))continue;let z=F.name,K=C?.exportedName??z,Y=k==="let"&&G==null,le=G==null?{isFunction:!1}:ut(this,this.ctx,G),{value:ne,type:V,isFunction:Ee,defaultValue:me}=le,Ce=le;qt(this.ctx,le,K,"props"),v.push({prop_name:K,kind:k,isFunctionDeclaration:!1,value:ne,typeSeed:V,explicitType:this.getExplicitPropType(z),initializerIsFunction:Ee,isRequired:Y,localName:z,defaultValue:me,inferredTypeForSource:V,resolvedJSDoc:Ce})}if(v.length===0)return}else return;let S=rt(this.ctx,this,y);for(let{prop_name:A,kind:k,isFunctionDeclaration:_,value:j,typeSeed:F,explicitType:G,initializerIsFunction:z,isRequired:K,localName:Y,defaultValue:le,inferredTypeForSource:ne,resolvedJSDoc:V}of v){let{type:Ee,typeSource:me,description:Ce,params:Me,returnType:ze,isFunction:xt,typeParameters:bt}=zt({explicitType:G,typeSeed:F,inferredTypeForSource:ne,jsdocType:S?.type,jsdocDescription:S?.description,jsdocParams:S?.params,jsdocReturnType:S?.returnType,jsdocTypeParameters:S?.typeParameters,resolvedType:V?.resolvedType,resolvedDescription:V?.resolvedDescription,resolvedParams:V?.resolvedParams,resolvedReturnType:V?.resolvedReturnType,initializerIsFunction:z,isFunctionDeclaration:_,typedefs:this.ctx.typedefs});tt(this.ctx,"prop-unknown-type",A,S?.sveldIgnore),Ht(this,this.ctx,A,{name:A,...Y!==void 0&&Y!==A?{localName:Y}:{},kind:k,description:Ce,binding:S?.binding,deprecated:S?.deprecated,tags:S?.tags,...S?.internal?{internal:!0}:{},type:Ee,typeSource:me,value:j,defaultValue:le,params:Me,returnType:ze,typeParameters:bt,isFunction:xt,isFunctionDeclaration:_,isRequired:K,constant:k==="const",reactive:this.ctx.reactive_vars.has(A),source:se(this.ctx,y)})}};if(vr(s,(y,x,C)=>{let v=Rs(this,this.ctx,w,y);if(v)this.ctx.activeScopes.push(v);let S=y.type;if(!Md.has(S))return;if(y.type==="AssignmentExpression")Er(this.ctx,y.left);if(y.type==="UpdateExpression")Er(this.ctx,y.argument);if(y.type==="CallExpression"){let A=y,k=A.callee&&typeof A.callee==="object"&&"name"in A.callee?A.callee.name:void 0;if(k==="createEventDispatcher"){if(x&&typeof x==="object"&&"id"in x&&x.id&&typeof x.id==="object"&&"name"in x.id)p=x.id.name,l=x;h=A.typeArguments?.params?.[0]}if(k==="$host"){if(x&&typeof x==="object"&&"id"in x&&x.id&&typeof x.id==="object"&&"name"in x.id)d.add(x.id.name)}if(k==="setContext")es(this.ctx,this,y,x??void 0);if(A.arguments.length>0)E.push(A);if(k)b.push({name:k,arguments:A.arguments,node:A});if(Mi(A.callee)&&xe(A.callee.property)&&A.callee.property.name==="dispatchEvent"&&(Ye(A.callee.object,"$host")||xe(A.callee.object)&&d.has(A.callee.object.name))){let _=os(this.ctx,A);if(_)g.add(_)}}if(S==="SpreadAttribute"){let A=y;if(A.expression?.name==="$$restProps"||this.ctx.restPropLocals.has(A.expression?.name??""))_s(this.ctx,x)}if(y.type==="FunctionDeclaration"){let A=y;if(A.id?.name)this.ctx.funcDecls.set(A.id.name,A)}if(y.type==="ImportDeclaration")Tn(this.ctx,y);if(y.type==="VariableDeclaration"){if(this.ctx.vars.add(y),x&&typeof x==="object"&&"type"in x&&x.type==="Program"&&y.declarations.some((A)=>Ye(lt(A.init),"$props")))js(this,this.ctx,y)}if(y.type==="ExportNamedDeclaration"){if(y.declaration!=null){N(y,y.declaration);return}for(let A of y.specifiers){let k=this.resolveExportSpecifier(y,A);if(!k)continue;if(k.declaration)N(y,k.declaration,k);else this.recordUnresolvedExportSpecifier(y,k.localName,k.exportedName)}}if(S==="Comment"){let k=y?.data?.trim()??"";if(Fo.test(k))this.ctx.componentComment=k.replace(Fo,"").replace(Ld,""),this.ctx.componentCommentSource=se(this.ctx,y)}if(S==="SlotElement"){let A=y,k=A.attributes?.find((G)=>G.name==="name")?.value,_=(Array.isArray(k)?k[0]:void 0)?.data,j=(A.attributes||[]).filter((G)=>G.name!=="name").reduce((G,z)=>{let K={value:void 0,replace:!1},Y=z.value;if(Y===void 0||Y===!0)return G;let le=Array.isArray(Y)?Y[0]:Y;if(le){let{type:ne,expression:V,raw:Ee,start:me,end:Ce}=le;if(ne==="Text"&&Ee!==void 0)K.value=JSON.stringify(Ee);else if(!Array.isArray(Y)&&ne==="ExpressionTag"&&V&&typeof V==="object"&&"type"in V&&V.type==="Identifier"&&"name"in V&&V.name===z.name)K.value=V.name,K.replace=!0;if(V&&typeof V==="object"&&"type"in V){if(V.type==="Literal"&&"value"in V){let Me=V.value;K.value=typeof Me==="string"?JSON.stringify(Me):String(Me)}else if(V.type==="MemberExpression")K.value=yn(this.ctx,this,V);else if(V.type!=="Identifier"){if(me!==void 0&&Ce!==void 0){if(V.type==="ObjectExpression"||V.type==="TemplateLiteral")K.value=pe(this.ctx,me+1,Ce-1)}}}}if(z.name)G[z.name]=K;return G},{}),F=A.fragment?.nodes?.map(({start:G,end:z})=>{if(G===void 0||z===void 0)return"";return pe(this.ctx,G,z)??""}).join("").trim();Kt(this.ctx,{slot_name:_,slot_props:j,slot_fallback:F,source:se(this.ctx,y)})}if(S==="RenderTag"){let A=y,k=Ts(this.ctx,A.expression);if(k){let _,j=!1;if(k.arguments.length===0)_={};else if(k.arguments.length===1&&typeof k.arguments[0]==="object"&&k.arguments[0]&&"type"in k.arguments[0]&&k.arguments[0].type==="ObjectExpression"){let z=hr(this.ctx,this,k.arguments[0]);_=z.slot_props,j=z.hasUnresolvedSpread}else if(k.arguments.length===1)oe(this.ctx,"syntax-skipped",k.publicName,`{@render ${k.publicName}(...)} argument is not a plain object literal; the render call was not mapped to slot metadata.`,se(this.ctx,y));let F=k.publicName==="children"?void 0:k.publicName,G=F===void 0?Id:F;if(_!==void 0)Kt(this.ctx,{slot_name:F,slot_props:_,slot_props_unresolved_spread:j||void 0,source:se(this.ctx,y)});if(_!==void 0||this.ctx.slots.has(G))this.ctx.snippetPropLocals.add(k.trackingName)}}if(S==="OnDirective"){let A=y;if(A.expression==null&&A.name){if(x!=null&&typeof x==="object"&&"name"in x){let k=typeof x.name==="string"?x.name:void 0,_="type"in x?String(x.type):void 0;if(k&&_){let j=Gt(_)?{type:"InlineComponent",name:k}:{type:"Element",name:k};this.ctx.forwardedEvents.set(A.name,j);let F=this.ctx.events.get(A.name),G=this.ctx.eventDescriptions.get(A.name),z=F?.deprecated,K=F?.internal;if(!F)this.ctx.events.set(A.name,{type:"forwarded",name:A.name,element:j,description:G,deprecated:z,...K?{internal:!0}:{},source:se(this.ctx,y)});else if(F.type==="forwarded"&&G&&!F.description)this.ctx.events.set(A.name,{...F,description:G,deprecated:F.deprecated??z,...F.internal||K?{internal:!0}:{},source:F.source||se(this.ctx,y)})}}}}if(S==="BindDirective"&&x&&typeof x==="object"&&"type"in x&&(Wt(String(x.type))||Gt(String(x.type)))){let A=y;if(A.expression?.name){let k=Xt(this.ctx,A.expression.name);if(k)this.ctx.reactive_vars.add(k)}if(Wt(String(x.type))&&A.name==="this"&&A.expression?.name&&"name"in x&&typeof x.name==="string"){let k=Xt(this.ctx,A.expression.name);if(!k)return;let _=x.name;if(this.ctx.bindings.has(k)){let j=this.ctx.bindings.get(k);if(j&&!j.elements.includes(_))this.ctx.bindings.set(k,{...j,elements:[...j.elements,_]})}else this.ctx.bindings.set(k,{elements:[_]})}}},(y)=>{if(Jt(y))this.ctx.activeScopes.pop(),Ms(w,y)},{skipTypeOnlySubtrees:!0}),p!==void 0){Hs(this,this.ctx,h,p,se(this.ctx,l));for(let y of b)if(y.name===p){let x=y.arguments[0],C=x&&typeof x==="object"&&"value"in x?x.value:void 0,v=y.arguments[1],S=ts(this,v),A=S===void 0&&v&&typeof v==="object"&&"value"in v?v.value:void 0;if(C!=null)dt(this.ctx,{name:String(C),detail:S??(A==null?"":pr(A)),has_argument:Boolean(v),source:se(this.ctx,y.node)})}}let D=new Set(g);if(p!==void 0){for(let y of b)if(y.name===p){let x=y.arguments[0],C=x&&typeof x==="object"&&"value"in x?x.value:void 0;if(C!=null)D.add(String(C))}}this.ctx.forwardedEvents.forEach((y,x)=>{let C=this.ctx.events.get(x);if(C&&C.type==="dispatched"&&!D.has(x)){let v=this.ctx.eventDescriptions.get(x),S={type:"forwarded",name:x,element:y,description:v,deprecated:C.deprecated,tags:C.tags,source:C.source};if(C.internal)S.internal=!0;if(C.detail!==void 0&&C.detail!=="undefined")S.detail=C.detail;this.ctx.events.set(x,S)}}),qs(this.ctx,D);let q=this.ctx.syntaxMode==="runes"?new Set(Array.from(this.ctx.snippetPropLocals,(y)=>this.resolvePublicPropName(y))):new Set,W=Se.mapToArray(this.ctx.props).filter((y)=>!q.has(y.name)).map((y)=>{if(this.ctx.bindings.has(y.name)){let x=this.ctx.bindings.get(y.name)?.elements.sort().map((C)=>Vi(C)).join(" | ");return{...y,type:`null | ${x}`,typeSource:"inferred",reactive:y.reactive||this.ctx.reactive_vars.has(y.name)}}return{...y,reactive:y.reactive||this.ctx.reactive_vars.has(y.name)}});this.ctx.activeScopes.length=0;let P=Se.mapToArray(this.ctx.slots).map((y)=>{let{slot_props_unresolved_spread:x,...C}=y;if(!y.slot_props)return C;if(typeof y.slot_props==="string")return Rd.test(y.slot_props)?{...C,slot_props:"Record<string, never>"}:C;let v=y.slot_props,S=[];for(let _ of Object.keys(v)){if(v[_].replace&&v[_].value!==void 0)v[_].value=this.getPropTypeByLocalOrPublic(v[_].value);if(v[_].value===void 0)v[_].value="any";S.push(`${_}: ${v[_].value}`)}let A=x?" & Record<string, any>":"",k=S.length===0?x?"Record<string, any>":"Record<string, never>":S.length===1?`{ ${S[0]} }${A}`:`{
41
- ${S.join(`;
41
+ `)}function Li(e,t,n,r){let i=nf(n,r);if(i>=n.length)return;Ii(e,void 0,n,{index:i},t)}function nf(e,t){let n=0,r=e.length;while(n<r){let i=n+r>>>1;if(e[i].start<t)n=i+1;else r=i}return n}function Ii(e,t,n,r,i){while(r.index<n.length&&n[r.index].start<(e.start??0))e.leadingComments??=[],e.leadingComments.push(n[r.index]),r.index++;if(r.index>=n.length)return;let o=n[r.index].start,s=e.end,l=s===void 0||s>o?Object.keys(e):[];for(let u=0;u<l.length;u++){let f=l[u];if(f==="type"||f==="leadingComments")continue;let y=e[f];if(!y||typeof y!=="object")continue;if(Array.isArray(y)){for(let g of y)if(g&&typeof g==="object"&&typeof g.type==="string"){if(Ii(g,e,n,r,i),r.index>=n.length)return}}else if(typeof y.type==="string"){if(Ii(y,e,n,r,i),r.index>=n.length)return}}if(r.index<n.length){let u=n[r.index];if(t===void 0||e.end!==t.end){let f=i.slice(e.end??0,u.start);if((t?.type==="BlockStatement"||t?.type==="Program")&&_i(t.body,e)||t?.type==="ArrayExpression"&&_i(t.elements,e)||t?.type==="ObjectExpression"&&_i(t.properties,e))while(r.index<n.length){if(t&&n[r.index].start>=(t.end??Number.POSITIVE_INFINITY))break;r.index++}else if((e.end??0)<=u.start&&ef.test(f))r.index++}}}function _i(e,t){return!!e&&e.indexOf(t)===e.length-1}var yr={sawParenthesized:!1},Xo=(e)=>class extends e{parseParenAndDistinguishExpression(t,n){let r=super.parseParenAndDistinguishExpression(t,n);if(r.type==="ParenthesizedExpression")yr.sawParenthesized=!0;return r}parseDecorator(){return yr.sawParenthesized=!0,super.parseDecorator()}},Yo=(e)=>class extends e{checkLocalExport(){}},rf=me.extend(Xo,Yo),sf=me.extend(Wo(),Xo,Yo);function Bi(e){return e?sf:rf}var af={onComment:mr,sourceType:"module",ecmaVersion:16},Qo={onComment:mr,sourceType:"module",ecmaVersion:16,preserveParens:!0},of={onComment:mr,sourceType:"module",ecmaVersion:16},zo={...Qo,startLocation:null},Ri=/\r\n?|\n|\u2028|\u2029/g;function cf(e,t){if(t?.breakEnds)return t.breakEnds;let n=[];Ri.lastIndex=0;while(Ri.test(e))n.push(Ri.lastIndex);if(t)t.breakEnds=n;return n}function pf(e,t,n){let r=e.lastIndexOf(`
42
+ `,t-1)+1,i=cf(e,n),o=0,s=i.length;while(o<s){let c=o+s>>>1;if(i[c]<=r)o=c+1;else s=c}return{line:o+1,column:t-r}}function Zo(e,t,n,r,i){if(n.length===i)return;Li(e,t,n,r)}function ec(e,t,n){let r=n.length;hr(e,n);let i=Bi(t).parse(e,af);if(n.length>0)Li(i,e,n,r);return i}var lf={count:0};function tn(e,t,n,r,i){lf.count+=1;let o=r.length;hr(e,r),yr.sawParenthesized=!1;let s=Qo;if(n)zo.startLocation=pf(e,t,i),s=zo;let c=Bi(n).parseExpressionAt(e,t,s);Zo(c,e,r,t,o);let l=r.length>o?r.at(-1):void 0,u=l&&l.end>(c.end??0)?l.end:c.end??0;return{node:yr.sawParenthesized?uf(c):c,end:u}}function tc(e,t,n,r){let i=r.length,o=Bi(n);hr(e,r);let s=new o(of,e,t);s.nextToken();let c=s.parseStatement(null,!0,Object.create(null));return Zo(c,e,r,t,i),c}function Jo(e){return e!==null&&typeof e==="object"&&typeof e.type==="string"}function Mi(e){let t=e;while(t.type==="ParenthesizedExpression"&&t.expression)t=t.expression;return t}function uf(e){let t=Mi(e);return Oi(t),t}function Oi(e){for(let t in e){let n=e[t];if(!n||typeof n!=="object")continue;if(Array.isArray(n))for(let r=0;r<n.length;r++){let i=n[r];if(!Jo(i))continue;let o=Mi(i);if(o!==i)n[r]=o;Oi(o)}else if(Jo(n)){let r=Mi(n);if(r!==n)e[t]=r;Oi(r)}}}function Ft(e){if(e===32||e<=13&&e>=9)return!0;if(e<160)return!1;return e===160||e===5760||e>=8192&&e<=8202||e===8232||e===8233||e===8239||e===8287||e===12288||e===65279}class Fi{source;index=0;constructor(e){this.source=e}match(e){if(e.length===1)return this.source.charCodeAt(this.index)===e.charCodeAt(0);return this.source.startsWith(e,this.index)}matchRegex(e){e.lastIndex=this.index;let t=e.exec(this.source);if(!t||t.index!==this.index)return null;return t[0]}eat(e,t=!1){if(this.match(e))return this.index+=e.length,!0;if(t)throw new wt(`Expected token ${JSON.stringify(e)}`,this.index);return!1}read(e){let t=this.matchRegex(e);if(t)this.index+=t.length;return t}readUntil(e){if(this.index>=this.source.length)throw new wt("Unexpected end of input",this.source.length);let t=this.index;e.lastIndex=t;let n=e.exec(this.source);if(n)return this.index=n.index,this.source.slice(t,this.index);return this.index=this.source.length,this.source.slice(t)}readUntilString(e){if(this.index>=this.source.length)throw new wt("Unexpected end of input",this.source.length);let t=this.source.indexOf(e,this.index),n=t===-1?this.source.length:t,r=this.source.slice(this.index,n);return this.index=n,r}allowWhitespace(){while(this.index<this.source.length&&Ft(this.source.charCodeAt(this.index)))this.index++}requireWhitespace(){if(!Ft(this.source.charCodeAt(this.index)))throw new wt("Expected whitespace",this.index);this.allowWhitespace()}readIdentifierName(){let e=this.index,t=e,n="",r=this.source.codePointAt(this.index);if(r!==void 0&&Le(r,!0)){t+=r<=65535?1:2;while(t<this.source.length){let i=this.source.codePointAt(t);if(i===void 0||!Fe(i,!0))break;t+=i<=65535?1:2}n=this.source.slice(e,t),this.index=t}return{type:"Identifier",name:n,start:e,end:t}}}class wt extends Error{position;constructor(e,t){super(`${e} (at index ${t})`);this.name="TemplateSyntaxError",this.position=t}}function Me(){return{type:"Fragment",nodes:[]}}var df=new Set(["await","break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","export","extends","finally","for","function","if","implements","import","in","instanceof","interface","let","new","package","private","protected","public","return","static","super","switch","this","throw","try","typeof","var","void","while","with","yield"]),ff=["&&","||","??"],hf=["===","!==","==","!="];function nc(e,t){let n=e.codePointAt(t);if(n===void 0||!Le(n,!0))return t;let r=t+(n<=65535?1:2);while(r<e.length){let i=e.codePointAt(r);if(!Fe(i,!0))break;r+=i<=65535?1:2}return r}function mf(e,t){let n=t;while(n<e.length){let r=e.charCodeAt(n);if(r<48||r>57)break;n++}return n}function gr(e,t){let n=t;while(n<e.length&&Ft(e.charCodeAt(n)))n++;return n}function rc(e,t){let n=mf(e,t);if(n===t)return null;if(e.charCodeAt(t)===48&&n-t>1)return null;if(n<e.length){let i=e.codePointAt(n);if(i===46||Fe(i,!0))return null}let r=e.slice(t,n);return{type:"Literal",start:t,end:n,value:Number(r),raw:r}}function ic(e,t){let n=e.charCodeAt(t),r=t+1;while(r<e.length){let i=e.charCodeAt(r);if(i===n){let o=e.slice(t,r+1);return{type:"Literal",start:t,end:r+1,value:e.slice(t+1,r),raw:o}}if(i===92||i===10||i===13)return null;r++}return null}function yf(e,t){let n=e.charCodeAt(t);if(n===34||n===39)return ic(e,t);let r=nc(e,t);if(r===t)return rc(e,t);let i=e.slice(t,r);if(i==="true"||i==="false")return{type:"Literal",start:t,end:r,value:i==="true",raw:i};if(i==="null")return{type:"Literal",start:t,end:r,value:null,raw:i};if(df.has(i))return null;let o={type:"Identifier",start:t,end:r,name:i},s=r;while(s<e.length){let c=e.charCodeAt(s);if(c===46){let l=s+1,u=nc(e,l);if(u===l)return null;let f={type:"Identifier",start:l,end:u,name:e.slice(l,u)};o={type:"MemberExpression",start:t,end:u,object:o,property:f,computed:!1,optional:!1},s=u}else if(c===91){let l=s+1,u=e.charCodeAt(l),f=u===34||u===39?ic(e,l):rc(e,l);if(!f||e.charCodeAt(f.end)!==93)return null;o={type:"MemberExpression",start:t,end:f.end+1,object:o,property:f,computed:!0,optional:!1},s=f.end+1}else break}return o}function $i(e,t){if(e.charCodeAt(t)!==33||e.charCodeAt(t+1)===61)return yf(e,t);let n=$i(e,gr(e,t+1));if(!n)return null;return{type:"UnaryExpression",start:t,end:n.end,operator:"!",prefix:!0,argument:n}}function gf(e,t){for(let n of hf)if(e.startsWith(n,t))return{operator:n,logical:!1};for(let n of ff)if(e.startsWith(n,t))return{operator:n,logical:!0};return null}function sc(e,t){let n=gr(e,t);if(n>=e.length)return!1;let r=e.charCodeAt(n);return r===125||r===41}function xf(e){let t=e.source,n=$i(t,e.index);if(!n)return null;if(sc(t,n.end))return e.index=n.end,n;let r=gr(t,n.end),i=gf(t,r);if(!i)return null;let o=$i(t,gr(t,r+i.operator.length));if(!o||!sc(t,o.end))return null;return e.index=o.end,{type:i.logical?"LogicalExpression":"BinaryExpression",start:n.start,end:o.end,left:n,operator:i.operator,right:o}}function Ce(e){let t=xf(e);if(t)return t;let{node:n,end:r}=tn(e.source,e.index,e.isTypeScript,e.root.comments,e.lineTable);return e.index=r,n}var bf={"CounterClockwiseContourIntegral;":8755,"ClockwiseContourIntegral;":8754,"DoubleLongLeftRightArrow;":10234,"NotNestedGreaterGreater;":10914,"DiacriticalDoubleAcute;":733,"NotSquareSupersetEqual;":8931,"CloseCurlyDoubleQuote;":8221,"DoubleContourIntegral;":8751,"FilledVerySmallSquare;":9642,"NegativeVeryThinSpace;":8203,"NotPrecedesSlantEqual;":8928,"NotRightTriangleEqual;":8941,"NotSucceedsSlantEqual;":8929,"CapitalDifferentialD;":8517,"DoubleLeftRightArrow;":8660,"DoubleLongRightArrow;":10233,"EmptyVerySmallSquare;":9643,"NestedGreaterGreater;":8811,"NotDoubleVerticalBar;":8742,"NotGreaterSlantEqual;":10878,"NotLeftTriangleEqual;":8940,"NotSquareSubsetEqual;":8930,"OpenCurlyDoubleQuote;":8220,"ReverseUpEquilibrium;":10607,"DoubleLongLeftArrow;":10232,"DownLeftRightVector;":10576,"LeftArrowRightArrow;":8646,"NegativeMediumSpace;":8203,"NotGreaterFullEqual;":8807,"NotRightTriangleBar;":10704,"RightArrowLeftArrow;":8644,"SquareSupersetEqual;":8850,"leftrightsquigarrow;":8621,"DownRightTeeVector;":10591,"DownRightVectorBar;":10583,"LongLeftRightArrow;":10231,"Longleftrightarrow;":10234,"NegativeThickSpace;":8203,"NotLeftTriangleBar;":10703,"PrecedesSlantEqual;":8828,"ReverseEquilibrium;":8651,"RightDoubleBracket;":10215,"RightDownTeeVector;":10589,"RightDownVectorBar;":10581,"RightTriangleEqual;":8885,"SquareIntersection;":8851,"SucceedsSlantEqual;":8829,"blacktriangleright;":9656,"longleftrightarrow;":10231,"DoubleUpDownArrow;":8661,"DoubleVerticalBar;":8741,"DownLeftTeeVector;":10590,"DownLeftVectorBar;":10582,"FilledSmallSquare;":9724,"GreaterSlantEqual;":10878,"LeftDoubleBracket;":10214,"LeftDownTeeVector;":10593,"LeftDownVectorBar;":10585,"LeftTriangleEqual;":8884,"NegativeThinSpace;":8203,"NotGreaterGreater;":8811,"NotLessSlantEqual;":10877,"NotNestedLessLess;":10913,"NotReverseElement;":8716,"NotSquareSuperset;":8848,"NotTildeFullEqual;":8775,"RightAngleBracket;":10217,"RightUpDownVector;":10575,"SquareSubsetEqual;":8849,"VerticalSeparator;":10072,"blacktriangledown;":9662,"blacktriangleleft;":9666,"leftrightharpoons;":8651,"rightleftharpoons;":8652,"twoheadrightarrow;":8608,"DiacriticalAcute;":180,"DiacriticalGrave;":96,"DiacriticalTilde;":732,"DoubleRightArrow;":8658,"DownArrowUpArrow;":8693,"EmptySmallSquare;":9723,"GreaterEqualLess;":8923,"GreaterFullEqual;":8807,"LeftAngleBracket;":10216,"LeftUpDownVector;":10577,"LessEqualGreater;":8922,"NonBreakingSpace;":160,"NotPrecedesEqual;":10927,"NotRightTriangle;":8939,"NotSucceedsEqual;":10928,"NotSucceedsTilde;":8831,"NotSupersetEqual;":8841,"RightTriangleBar;":10704,"RightUpTeeVector;":10588,"RightUpVectorBar;":10580,"UnderParenthesis;":9181,"UpArrowDownArrow;":8645,"circlearrowright;":8635,"downharpoonright;":8642,"ntrianglerighteq;":8941,"rightharpoondown;":8641,"rightrightarrows;":8649,"twoheadleftarrow;":8606,"vartriangleright;":8883,"CloseCurlyQuote;":8217,"ContourIntegral;":8750,"DoubleDownArrow;":8659,"DoubleLeftArrow;":8656,"DownRightVector;":8641,"LeftRightVector;":10574,"LeftTriangleBar;":10703,"LeftUpTeeVector;":10592,"LeftUpVectorBar;":10584,"LowerRightArrow;":8600,"NotGreaterEqual;":8817,"NotGreaterTilde;":8821,"NotHumpDownHump;":8782,"NotLeftTriangle;":8938,"NotSquareSubset;":8847,"OverParenthesis;":9180,"RightDownVector;":8642,"ShortRightArrow;":8594,"UpperRightArrow;":8599,"bigtriangledown;":9661,"circlearrowleft;":8634,"curvearrowright;":8631,"downharpoonleft;":8643,"leftharpoondown;":8637,"leftrightarrows;":8646,"nLeftrightarrow;":8654,"nleftrightarrow;":8622,"ntrianglelefteq;":8940,"rightleftarrows;":8644,"rightsquigarrow;":8605,"rightthreetimes;":8908,"straightepsilon;":1013,"trianglerighteq;":8885,"vartriangleleft;":8882,"DiacriticalDot;":729,"DoubleRightTee;":8872,"DownLeftVector;":8637,"GreaterGreater;":10914,"HorizontalLine;":9472,"InvisibleComma;":8291,"InvisibleTimes;":8290,"LeftDownVector;":8643,"LeftRightArrow;":8596,"Leftrightarrow;":8660,"LessSlantEqual;":10877,"LongRightArrow;":10230,"Longrightarrow;":10233,"LowerLeftArrow;":8601,"NestedLessLess;":8810,"NotGreaterLess;":8825,"NotLessGreater;":8824,"NotSubsetEqual;":8840,"NotVerticalBar;":8740,"OpenCurlyQuote;":8216,"ReverseElement;":8715,"RightTeeVector;":10587,"RightVectorBar;":10579,"ShortDownArrow;":8595,"ShortLeftArrow;":8592,"SquareSuperset;":8848,"TildeFullEqual;":8773,"UpperLeftArrow;":8598,"ZeroWidthSpace;":8203,"curvearrowleft;":8630,"doublebarwedge;":8966,"downdownarrows;":8650,"hookrightarrow;":8618,"leftleftarrows;":8647,"leftrightarrow;":8596,"leftthreetimes;":8907,"longrightarrow;":10230,"looparrowright;":8620,"nshortparallel;":8742,"ntriangleright;":8939,"rightarrowtail;":8611,"rightharpoonup;":8640,"trianglelefteq;":8884,"upharpoonright;":8638,"ApplyFunction;":8289,"DifferentialD;":8518,"DoubleLeftTee;":10980,"DoubleUpArrow;":8657,"LeftTeeVector;":10586,"LeftVectorBar;":10578,"LessFullEqual;":8806,"LongLeftArrow;":10229,"Longleftarrow;":10232,"NotEqualTilde;":8770,"NotTildeEqual;":8772,"NotTildeTilde;":8777,"Poincareplane;":8460,"PrecedesEqual;":10927,"PrecedesTilde;":8830,"RightArrowBar;":8677,"RightTeeArrow;":8614,"RightTriangle;":8883,"RightUpVector;":8638,"SucceedsEqual;":10928,"SucceedsTilde;":8831,"SupersetEqual;":8839,"UpEquilibrium;":10606,"VerticalTilde;":8768,"VeryThinSpace;":8202,"bigtriangleup;":9651,"blacktriangle;":9652,"divideontimes;":8903,"fallingdotseq;":8786,"hookleftarrow;":8617,"leftarrowtail;":8610,"leftharpoonup;":8636,"longleftarrow;":10229,"looparrowleft;":8619,"measuredangle;":8737,"ntriangleleft;":8938,"shortparallel;":8741,"smallsetminus;":8726,"triangleright;":9657,"upharpoonleft;":8639,"varsubsetneqq;":10955,"varsupsetneqq;":10956,"DownArrowBar;":10515,"DownTeeArrow;":8615,"ExponentialE;":8519,"GreaterEqual;":8805,"GreaterTilde;":8819,"HilbertSpace;":8459,"HumpDownHump;":8782,"Intersection;":8898,"LeftArrowBar;":8676,"LeftTeeArrow;":8612,"LeftTriangle;":8882,"LeftUpVector;":8639,"NotCongruent;":8802,"NotHumpEqual;":8783,"NotLessEqual;":8816,"NotLessTilde;":8820,"Proportional;":8733,"RightCeiling;":8969,"RoundImplies;":10608,"ShortUpArrow;":8593,"SquareSubset;":8847,"UnderBracket;":9141,"VerticalLine;":124,"blacklozenge;":10731,"exponentiale;":8519,"risingdotseq;":8787,"triangledown;":9663,"triangleleft;":9667,"varsubsetneq;":8842,"varsupsetneq;":8843,"CircleMinus;":8854,"CircleTimes;":8855,"Equilibrium;":8652,"GreaterLess;":8823,"LeftCeiling;":8968,"LessGreater;":8822,"MediumSpace;":8287,"NotLessLess;":8810,"NotPrecedes;":8832,"NotSucceeds;":8833,"NotSuperset;":8835,"OverBracket;":9140,"RightVector;":8640,"Rrightarrow;":8667,"RuleDelayed;":10740,"SmallCircle;":8728,"SquareUnion;":8852,"SubsetEqual;":8838,"UpDownArrow;":8597,"Updownarrow;":8661,"VerticalBar;":8739,"backepsilon;":1014,"blacksquare;":9642,"circledcirc;":8858,"circleddash;":8861,"curlyeqprec;":8926,"curlyeqsucc;":8927,"diamondsuit;":9830,"eqslantless;":10901,"expectation;":8496,"nRightarrow;":8655,"nrightarrow;":8603,"preccurlyeq;":8828,"precnapprox;":10937,"quaternions;":8461,"straightphi;":981,"succcurlyeq;":8829,"succnapprox;":10938,"thickapprox;":8776,"updownarrow;":8597,"Bernoullis;":8492,"CirclePlus;":8853,"EqualTilde;":8770,"Fouriertrf;":8497,"ImaginaryI;":8520,"Laplacetrf;":8466,"LeftVector;":8636,"Lleftarrow;":8666,"NotElement;":8713,"NotGreater;":8815,"Proportion;":8759,"RightArrow;":8594,"RightFloor;":8971,"Rightarrow;":8658,"ThickSpace;":8287,"TildeEqual;":8771,"TildeTilde;":8776,"UnderBrace;":9183,"UpArrowBar;":10514,"UpTeeArrow;":8613,"circledast;":8859,"complement;":8705,"curlywedge;":8911,"eqslantgtr;":10902,"gtreqqless;":10892,"lessapprox;":10885,"lesseqqgtr;":10891,"lmoustache;":9136,"longmapsto;":10236,"mapstodown;":8615,"mapstoleft;":8612,"nLeftarrow;":8653,"nleftarrow;":8602,"nsubseteqq;":10949,"nsupseteqq;":10950,"precapprox;":10935,"rightarrow;":8594,"rmoustache;":9137,"sqsubseteq;":8849,"sqsupseteq;":8850,"subsetneqq;":10955,"succapprox;":10936,"supsetneqq;":10956,"upuparrows;":8648,"varepsilon;":1013,"varnothing;":8709,"Backslash;":8726,"CenterDot;":183,"CircleDot;":8857,"Congruent;":8801,"Coproduct;":8720,"DoubleDot;":168,"DownArrow;":8595,"DownBreve;":785,"Downarrow;":8659,"HumpEqual;":8783,"LeftArrow;":8592,"LeftFloor;":8970,"Leftarrow;":8656,"LessTilde;":8818,"Mellintrf;":8499,"MinusPlus;":8723,"NotCupCap;":8813,"NotExists;":8708,"NotSubset;":8834,"OverBrace;":9182,"PlusMinus;":177,"Therefore;":8756,"ThinSpace;":8201,"TripleDot;":8411,"UnionPlus;":8846,"backprime;":8245,"backsimeq;":8909,"bigotimes;":10754,"centerdot;":183,"checkmark;":10003,"complexes;":8450,"dotsquare;":8865,"downarrow;":8595,"gtrapprox;":10886,"gtreqless;":8923,"gvertneqq;":8809,"heartsuit;":9829,"leftarrow;":8592,"lesseqgtr;":8922,"lvertneqq;":8808,"ngeqslant;":10878,"nleqslant;":10877,"nparallel;":8742,"nshortmid;":8740,"nsubseteq;":8840,"nsupseteq;":8841,"pitchfork;":8916,"rationals;":8474,"spadesuit;":9824,"subseteqq;":10949,"subsetneq;":8842,"supseteqq;":10950,"supsetneq;":8843,"therefore;":8756,"triangleq;":8796,"varpropto;":8733,"DDotrahd;":10513,"DotEqual;":8784,"Integral;":8747,"LessLess;":10913,"NotEqual;":8800,"NotTilde;":8769,"PartialD;":8706,"Precedes;":8826,"RightTee;":8866,"Succeeds;":8827,"SuchThat;":8715,"Superset;":8835,"Uarrocir;":10569,"UnderBar;":95,"andslope;":10840,"angmsdaa;":10664,"angmsdab;":10665,"angmsdac;":10666,"angmsdad;":10667,"angmsdae;":10668,"angmsdaf;":10669,"angmsdag;":10670,"angmsdah;":10671,"angrtvbd;":10653,"approxeq;":8778,"awconint;":8755,"backcong;":8780,"barwedge;":8965,"bbrktbrk;":9142,"bigoplus;":10753,"bigsqcup;":10758,"biguplus;":10756,"bigwedge;":8896,"boxminus;":8863,"boxtimes;":8864,"bsolhsub;":10184,"capbrcup;":10825,"circledR;":174,"circledS;":9416,"cirfnint;":10768,"clubsuit;":9827,"cupbrcap;":10824,"curlyvee;":8910,"cwconint;":8754,"doteqdot;":8785,"dotminus;":8760,"drbkarow;":10512,"dzigrarr;":10239,"elinters;":9191,"emptyset;":8709,"eqvparsl;":10725,"fpartint;":10765,"geqslant;":10878,"gesdotol;":10884,"gnapprox;":10890,"hksearow;":10533,"hkswarow;":10534,"imagline;":8464,"imagpart;":8465,"infintie;":10717,"integers;":8484,"intercal;":8890,"intlarhk;":10775,"laemptyv;":10676,"ldrushar;":10571,"leqslant;":10877,"lesdotor;":10883,"llcorner;":8990,"lnapprox;":10889,"lrcorner;":8991,"lurdshar;":10570,"mapstoup;":8613,"multimap;":8888,"naturals;":8469,"ncongdot;":10861,"notindot;":8949,"otimesas;":10806,"parallel;":8741,"plusacir;":10787,"pointint;":10773,"precneqq;":10933,"precnsim;":8936,"profalar;":9006,"profline;":8978,"profsurf;":8979,"raemptyv;":10675,"realpart;":8476,"rppolint;":10770,"rtriltri;":10702,"scpolint;":10771,"setminus;":8726,"shortmid;":8739,"smeparsl;":10724,"sqsubset;":8847,"sqsupset;":8848,"subseteq;":8838,"succneqq;":10934,"succnsim;":8937,"supseteq;":8839,"thetasym;":977,"thicksim;":8764,"timesbar;":10801,"triangle;":9653,"triminus;":10810,"trpezium;":9186,"ulcorner;":8988,"urcorner;":8989,"varkappa;":1008,"varsigma;":962,"vartheta;":977,"Because;":8757,"Cayleys;":8493,"Cconint;":8752,"Cedilla;":184,"Diamond;":8900,"DownTee;":8868,"Element;":8712,"Epsilon;":917,"Implies;":8658,"LeftTee;":8867,"NewLine;":10,"NoBreak;":8288,"NotLess;":8814,"Omicron;":927,"OverBar;":8254,"Product;":8719,"UpArrow;":8593,"Uparrow;":8657,"Upsilon;":933,"alefsym;":8501,"angrtvb;":8894,"angzarr;":9084,"asympeq;":8781,"backsim;":8765,"because;":8757,"bemptyv;":10672,"between;":8812,"bigcirc;":9711,"bigodot;":10752,"bigstar;":9733,"bnequiv;":8801,"boxplus;":8862,"ccupssm;":10832,"cemptyv;":10674,"cirscir;":10690,"coloneq;":8788,"congdot;":10861,"cudarrl;":10552,"cudarrr;":10549,"cularrp;":10557,"curarrm;":10556,"dbkarow;":10511,"ddagger;":8225,"ddotseq;":10871,"demptyv;":10673,"diamond;":8900,"digamma;":989,"dotplus;":8724,"dwangle;":10662,"epsilon;":949,"eqcolon;":8789,"equivDD;":10872,"gesdoto;":10882,"gtquest;":10876,"gtrless;":8823,"harrcir;":10568,"intprod;":10812,"isindot;":8949,"larrbfs;":10527,"larrsim;":10611,"lbrksld;":10639,"lbrkslu;":10637,"ldrdhar;":10599,"lesdoto;":10881,"lessdot;":8918,"lessgtr;":8822,"lesssim;":8818,"lotimes;":10804,"lozenge;":9674,"ltquest;":10875,"luruhar;":10598,"maltese;":10016,"minusdu;":10794,"napprox;":8777,"natural;":9838,"nearrow;":8599,"nexists;":8708,"notinva;":8713,"notinvb;":8951,"notinvc;":8950,"notniva;":8716,"notnivb;":8958,"notnivc;":8957,"npolint;":10772,"npreceq;":10927,"nsqsube;":8930,"nsqsupe;":8931,"nsubset;":8834,"nsucceq;":10928,"nsupset;":8835,"nvinfin;":10718,"nvltrie;":8884,"nvrtrie;":8885,"nwarrow;":8598,"olcross;":10683,"omicron;":959,"orderof;":8500,"orslope;":10839,"pertenk;":8241,"planckh;":8462,"pluscir;":10786,"plussim;":10790,"plustwo;":10791,"precsim;":8830,"quatint;":10774,"questeq;":8799,"rarrbfs;":10528,"rarrsim;":10612,"rbrksld;":10638,"rbrkslu;":10640,"rdldhar;":10601,"realine;":8475,"rotimes;":10805,"ruluhar;":10600,"searrow;":8600,"simplus;":10788,"simrarr;":10610,"subedot;":10947,"submult;":10945,"subplus;":10943,"subrarr;":10617,"succsim;":8831,"supdsub;":10968,"supedot;":10948,"suphsol;":10185,"suphsub;":10967,"suplarr;":10619,"supmult;":10946,"supplus;":10944,"swarrow;":8601,"topfork;":10970,"triplus;":10809,"tritime;":10811,"uparrow;":8593,"upsilon;":965,"uwangle;":10663,"vzigzag;":10650,"zigrarr;":8669,"Aacute;":193,"Abreve;":258,"Agrave;":192,"Assign;":8788,"Atilde;":195,"Barwed;":8966,"Bumpeq;":8782,"Cacute;":262,"Ccaron;":268,"Ccedil;":199,"Colone;":10868,"Conint;":8751,"CupCap;":8781,"Dagger;":8225,"Dcaron;":270,"DotDot;":8412,"Dstrok;":272,"Eacute;":201,"Ecaron;":282,"Egrave;":200,"Exists;":8707,"ForAll;":8704,"Gammad;":988,"Gbreve;":286,"Gcedil;":290,"HARDcy;":1066,"Hstrok;":294,"Iacute;":205,"Igrave;":204,"Itilde;":296,"Jsercy;":1032,"Kcedil;":310,"Lacute;":313,"Lambda;":923,"Lcaron;":317,"Lcedil;":315,"Lmidot;":319,"Lstrok;":321,"Nacute;":323,"Ncaron;":327,"Ncedil;":325,"Ntilde;":209,"Oacute;":211,"Odblac;":336,"Ograve;":210,"Oslash;":216,"Otilde;":213,"Otimes;":10807,"Racute;":340,"Rarrtl;":10518,"Rcaron;":344,"Rcedil;":342,"SHCHcy;":1065,"SOFTcy;":1068,"Sacute;":346,"Scaron;":352,"Scedil;":350,"Square;":9633,"Subset;":8912,"Supset;":8913,"Tcaron;":356,"Tcedil;":354,"Tstrok;":358,"Uacute;":218,"Ubreve;":364,"Udblac;":368,"Ugrave;":217,"Utilde;":360,"Vdashl;":10982,"Verbar;":8214,"Vvdash;":8874,"Yacute;":221,"Zacute;":377,"Zcaron;":381,"aacute;":225,"abreve;":259,"agrave;":224,"andand;":10837,"angmsd;":8737,"angsph;":8738,"apacir;":10863,"approx;":8776,"atilde;":227,"barvee;":8893,"barwed;":8965,"becaus;":8757,"bernou;":8492,"bigcap;":8898,"bigcup;":8899,"bigvee;":8897,"bkarow;":10509,"bottom;":8869,"bowtie;":8904,"boxbox;":10697,"bprime;":8245,"brvbar;":166,"bullet;":8226,"bumpeq;":8783,"cacute;":263,"capand;":10820,"capcap;":10827,"capcup;":10823,"capdot;":10816,"ccaron;":269,"ccedil;":231,"circeq;":8791,"cirmid;":10991,"colone;":8788,"commat;":64,"compfn;":8728,"conint;":8750,"coprod;":8720,"copysr;":8471,"cularr;":8630,"cupcap;":10822,"cupcup;":10826,"cupdot;":8845,"curarr;":8631,"curren;":164,"cylcty;":9005,"dagger;":8224,"daleth;":8504,"dcaron;":271,"dfisht;":10623,"divide;":247,"divonx;":8903,"dlcorn;":8990,"dlcrop;":8973,"dollar;":36,"drcorn;":8991,"drcrop;":8972,"dstrok;":273,"eacute;":233,"easter;":10862,"ecaron;":283,"ecolon;":8789,"egrave;":232,"egsdot;":10904,"elsdot;":10903,"emptyv;":8709,"emsp13;":8196,"emsp14;":8197,"eparsl;":10723,"eqcirc;":8790,"equals;":61,"equest;":8799,"female;":9792,"ffilig;":64259,"ffllig;":64260,"forall;":8704,"frac12;":189,"frac13;":8531,"frac14;":188,"frac15;":8533,"frac16;":8537,"frac18;":8539,"frac23;":8532,"frac25;":8534,"frac34;":190,"frac35;":8535,"frac38;":8540,"frac45;":8536,"frac56;":8538,"frac58;":8541,"frac78;":8542,"gacute;":501,"gammad;":989,"gbreve;":287,"gesdot;":10880,"gesles;":10900,"gtlPar;":10645,"gtrarr;":10616,"gtrdot;":8919,"gtrsim;":8819,"hairsp;":8202,"hamilt;":8459,"hardcy;":1098,"hearts;":9829,"hellip;":8230,"hercon;":8889,"homtht;":8763,"horbar;":8213,"hslash;":8463,"hstrok;":295,"hybull;":8259,"hyphen;":8208,"iacute;":237,"igrave;":236,"iiiint;":10764,"iinfin;":10716,"incare;":8453,"inodot;":305,"intcal;":8890,"iquest;":191,"isinsv;":8947,"itilde;":297,"jsercy;":1112,"kappav;":1008,"kcedil;":311,"kgreen;":312,"lAtail;":10523,"lacute;":314,"lagran;":8466,"lambda;":955,"langle;":10216,"larrfs;":10525,"larrhk;":8617,"larrlp;":8619,"larrpl;":10553,"larrtl;":8610,"latail;":10521,"lbrace;":123,"lbrack;":91,"lcaron;":318,"lcedil;":316,"ldquor;":8222,"lesdot;":10879,"lesges;":10899,"lfisht;":10620,"lfloor;":8970,"lharul;":10602,"llhard;":10603,"lmidot;":320,"lmoust;":9136,"loplus;":10797,"lowast;":8727,"lowbar;":95,"lparlt;":10643,"lrhard;":10605,"lsaquo;":8249,"lsquor;":8218,"lstrok;":322,"lthree;":8907,"ltimes;":8905,"ltlarr;":10614,"ltrPar;":10646,"mapsto;":8614,"marker;":9646,"mcomma;":10793,"midast;":42,"midcir;":10992,"middot;":183,"minusb;":8863,"minusd;":8760,"mnplus;":8723,"models;":8871,"mstpos;":8766,"nVDash;":8879,"nVdash;":8878,"nacute;":324,"nbumpe;":8783,"ncaron;":328,"ncedil;":326,"nearhk;":10532,"nequiv;":8802,"nesear;":10536,"nexist;":8708,"nltrie;":8940,"notinE;":8953,"nparsl;":11005,"nprcue;":8928,"nrarrc;":10547,"nrarrw;":8605,"nrtrie;":8941,"nsccue;":8929,"nsimeq;":8772,"ntilde;":241,"numero;":8470,"nvDash;":8877,"nvHarr;":10500,"nvdash;":8876,"nvlArr;":10498,"nvrArr;":10499,"nwarhk;":10531,"nwnear;":10535,"oacute;":243,"odblac;":337,"odsold;":10684,"ograve;":242,"ominus;":8854,"origof;":8886,"oslash;":248,"otilde;":245,"otimes;":8855,"parsim;":10995,"percnt;":37,"period;":46,"permil;":8240,"phmmat;":8499,"planck;":8463,"plankv;":8463,"plusdo;":8724,"plusdu;":10789,"plusmn;":177,"preceq;":10927,"primes;":8473,"prnsim;":8936,"propto;":8733,"prurel;":8880,"puncsp;":8200,"qprime;":8279,"rAtail;":10524,"racute;":341,"rangle;":10217,"rarrap;":10613,"rarrfs;":10526,"rarrhk;":8618,"rarrlp;":8620,"rarrpl;":10565,"rarrtl;":8611,"ratail;":10522,"rbrace;":125,"rbrack;":93,"rcaron;":345,"rcedil;":343,"rdquor;":8221,"rfisht;":10621,"rfloor;":8971,"rharul;":10604,"rmoust;":9137,"roplus;":10798,"rpargt;":10644,"rsaquo;":8250,"rsquor;":8217,"rthree;":8908,"rtimes;":8906,"sacute;":347,"scaron;":353,"scedil;":351,"scnsim;":8937,"searhk;":10533,"seswar;":10537,"sfrown;":8994,"shchcy;":1097,"sigmaf;":962,"sigmav;":962,"simdot;":10858,"smashp;":10803,"softcy;":1100,"solbar;":9023,"spades;":9824,"sqcaps;":8851,"sqcups;":8852,"sqsube;":8849,"sqsupe;":8850,"square;":9633,"squarf;":9642,"ssetmn;":8726,"ssmile;":8995,"sstarf;":8902,"subdot;":10941,"subset;":8834,"subsim;":10951,"subsub;":10965,"subsup;":10963,"succeq;":10928,"supdot;":10942,"supset;":8835,"supsim;":10952,"supsub;":10964,"supsup;":10966,"swarhk;":10534,"swnwar;":10538,"target;":8982,"tcaron;":357,"tcedil;":355,"telrec;":8981,"there4;":8756,"thetav;":977,"thinsp;":8201,"thksim;":8764,"timesb;":8864,"timesd;":10800,"topbot;":9014,"topcir;":10993,"tprime;":8244,"tridot;":9708,"tstrok;":359,"uacute;":250,"ubreve;":365,"udblac;":369,"ufisht;":10622,"ugrave;":249,"ulcorn;":8988,"ulcrop;":8975,"urcorn;":8989,"urcrop;":8974,"utilde;":361,"vangrt;":10652,"varphi;":981,"varrho;":1009,"veebar;":8891,"vellip;":8942,"verbar;":124,"vsubnE;":10955,"vsubne;":8842,"vsupnE;":10956,"vsupne;":8843,"wedbar;":10847,"wedgeq;":8793,"weierp;":8472,"wreath;":8768,"xoplus;":10753,"xotime;":10754,"xsqcup;":10758,"xuplus;":10756,"xwedge;":8896,"yacute;":253,"zacute;":378,"zcaron;":382,"zeetrf;":8488,"AElig;":198,Aacute:193,"Acirc;":194,Agrave:192,"Alpha;":913,"Amacr;":256,"Aogon;":260,"Aring;":197,Atilde:195,"Breve;":728,Ccedil:199,"Ccirc;":264,"Colon;":8759,"Cross;":10799,"Dashv;":10980,"Delta;":916,Eacute:201,"Ecirc;":202,Egrave:200,"Emacr;":274,"Eogon;":280,"Equal;":10869,"Gamma;":915,"Gcirc;":284,"Hacek;":711,"Hcirc;":292,"IJlig;":306,Iacute:205,"Icirc;":206,Igrave:204,"Imacr;":298,"Iogon;":302,"Iukcy;":1030,"Jcirc;":308,"Jukcy;":1028,"Kappa;":922,Ntilde:209,"OElig;":338,Oacute:211,"Ocirc;":212,Ograve:210,"Omacr;":332,"Omega;":937,Oslash:216,Otilde:213,"Prime;":8243,"RBarr;":10512,"Scirc;":348,"Sigma;":931,"THORN;":222,"TRADE;":8482,"TSHcy;":1035,"Theta;":920,"Tilde;":8764,Uacute:218,"Ubrcy;":1038,"Ucirc;":219,Ugrave:217,"Umacr;":362,"Union;":8899,"Uogon;":370,"UpTee;":8869,"Uring;":366,"VDash;":8875,"Vdash;":8873,"Wcirc;":372,"Wedge;":8896,Yacute:221,"Ycirc;":374,aacute:225,"acirc;":226,"acute;":180,"aelig;":230,agrave:224,"aleph;":8501,"alpha;":945,"amacr;":257,"amalg;":10815,"angle;":8736,"angrt;":8735,"angst;":197,"aogon;":261,"aring;":229,"asymp;":8776,atilde:227,"awint;":10769,"bcong;":8780,"bdquo;":8222,"bepsi;":1014,"blank;":9251,"blk12;":9618,"blk14;":9617,"blk34;":9619,"block;":9608,"boxDL;":9559,"boxDR;":9556,"boxDl;":9558,"boxDr;":9555,"boxHD;":9574,"boxHU;":9577,"boxHd;":9572,"boxHu;":9575,"boxUL;":9565,"boxUR;":9562,"boxUl;":9564,"boxUr;":9561,"boxVH;":9580,"boxVL;":9571,"boxVR;":9568,"boxVh;":9579,"boxVl;":9570,"boxVr;":9567,"boxdL;":9557,"boxdR;":9554,"boxdl;":9488,"boxdr;":9484,"boxhD;":9573,"boxhU;":9576,"boxhd;":9516,"boxhu;":9524,"boxuL;":9563,"boxuR;":9560,"boxul;":9496,"boxur;":9492,"boxvH;":9578,"boxvL;":9569,"boxvR;":9566,"boxvh;":9532,"boxvl;":9508,"boxvr;":9500,"breve;":728,brvbar:166,"bsemi;":8271,"bsime;":8909,"bsolb;":10693,"bumpE;":10926,"bumpe;":8783,"caret;":8257,"caron;":711,"ccaps;":10829,ccedil:231,"ccirc;":265,"ccups;":10828,"cedil;":184,"check;":10003,"clubs;":9827,"colon;":58,"comma;":44,"crarr;":8629,"cross;":10007,"csube;":10961,"csupe;":10962,"ctdot;":8943,"cuepr;":8926,"cuesc;":8927,"cupor;":10821,curren:164,"cuvee;":8910,"cuwed;":8911,"cwint;":8753,"dashv;":8867,"dblac;":733,"ddarr;":8650,"delta;":948,"dharl;":8643,"dharr;":8642,"diams;":9830,"disin;":8946,divide:247,"doteq;":8784,"dtdot;":8945,"dtrif;":9662,"duarr;":8693,"duhar;":10607,"eDDot;":10871,eacute:233,"ecirc;":234,"efDot;":8786,egrave:232,"emacr;":275,"empty;":8709,"eogon;":281,"eplus;":10865,"epsiv;":1013,"eqsim;":8770,"equiv;":8801,"erDot;":8787,"erarr;":10609,"esdot;":8784,"exist;":8707,"fflig;":64256,"filig;":64257,"fjlig;":102,"fllig;":64258,"fltns;":9649,"forkv;":10969,frac12:189,frac14:188,frac34:190,"frasl;":8260,"frown;":8994,"gamma;":947,"gcirc;":285,"gescc;":10921,"gimel;":8503,"gneqq;":8809,"gnsim;":8935,"grave;":96,"gsime;":10894,"gsiml;":10896,"gtcir;":10874,"gtdot;":8919,"harrw;":8621,"hcirc;":293,"hoarr;":8703,iacute:237,"icirc;":238,"iexcl;":161,igrave:236,"iiint;":8749,"iiota;":8489,"ijlig;":307,"imacr;":299,"image;":8465,"imath;":305,"imped;":437,"infin;":8734,"iogon;":303,"iprod;":10812,iquest:191,"isinE;":8953,"isins;":8948,"isinv;":8712,"iukcy;":1110,"jcirc;":309,"jmath;":567,"jukcy;":1108,"kappa;":954,"lAarr;":8666,"lBarr;":10510,"langd;":10641,"laquo;":171,"larrb;":8676,"lates;":10925,"lbarr;":10508,"lbbrk;":10098,"lbrke;":10635,"lceil;":8968,"ldquo;":8220,"lescc;":10920,"lhard;":8637,"lharu;":8636,"lhblk;":9604,"llarr;":8647,"lltri;":9722,"lneqq;":8808,"lnsim;":8934,"loang;":10220,"loarr;":8701,"lobrk;":10214,"lopar;":10629,"lrarr;":8646,"lrhar;":8651,"lrtri;":8895,"lsime;":10893,"lsimg;":10895,"lsquo;":8216,"ltcir;":10873,"ltdot;":8918,"ltrie;":8884,"ltrif;":9666,"mDDot;":8762,"mdash;":8212,"micro;":181,middot:183,"minus;":8722,"mumap;":8888,"nabla;":8711,"napid;":8779,"napos;":329,"natur;":9838,"nbump;":8782,"ncong;":8775,"ndash;":8211,"neArr;":8663,"nearr;":8599,"nedot;":8784,"nesim;":8770,"ngeqq;":8807,"ngsim;":8821,"nhArr;":8654,"nharr;":8622,"nhpar;":10994,"nlArr;":8653,"nlarr;":8602,"nleqq;":8806,"nless;":8814,"nlsim;":8820,"nltri;":8938,"notin;":8713,"notni;":8716,"npart;":8706,"nprec;":8832,"nrArr;":8655,"nrarr;":8603,"nrtri;":8939,"nsime;":8772,"nsmid;":8740,"nspar;":8742,"nsubE;":10949,"nsube;":8840,"nsucc;":8833,"nsupE;":10950,"nsupe;":8841,ntilde:241,"numsp;":8199,"nvsim;":8764,"nwArr;":8662,"nwarr;":8598,oacute:243,"ocirc;":244,"odash;":8861,"oelig;":339,"ofcir;":10687,ograve:242,"ohbar;":10677,"olarr;":8634,"olcir;":10686,"oline;":8254,"omacr;":333,"omega;":969,"operp;":10681,"oplus;":8853,"orarr;":8635,"order;":8500,oslash:248,otilde:245,"ovbar;":9021,"parsl;":11005,"phone;":9742,"plusb;":8862,"pluse;":10866,plusmn:177,"pound;":163,"prcue;":8828,"prime;":8242,"prnap;":10937,"prsim;":8830,"quest;":63,"rAarr;":8667,"rBarr;":10511,"radic;":8730,"rangd;":10642,"range;":10661,"raquo;":187,"rarrb;":8677,"rarrc;":10547,"rarrw;":8605,"ratio;":8758,"rbarr;":10509,"rbbrk;":10099,"rbrke;":10636,"rceil;":8969,"rdquo;":8221,"reals;":8477,"rhard;":8641,"rharu;":8640,"rlarr;":8644,"rlhar;":8652,"rnmid;":10990,"roang;":10221,"roarr;":8702,"robrk;":10215,"ropar;":10630,"rrarr;":8649,"rsquo;":8217,"rtrie;":8885,"rtrif;":9656,"sbquo;":8218,"sccue;":8829,"scirc;":349,"scnap;":10938,"scsim;":8831,"sdotb;":8865,"sdote;":10854,"seArr;":8664,"searr;":8600,"setmn;":8726,"sharp;":9839,"sigma;":963,"simeq;":8771,"simgE;":10912,"simlE;":10911,"simne;":8774,"slarr;":8592,"smile;":8995,"smtes;":10924,"sqcap;":8851,"sqcup;":8852,"sqsub;":8847,"sqsup;":8848,"srarr;":8594,"starf;":9733,"strns;":175,"subnE;":10955,"subne;":8842,"supnE;":10956,"supne;":8843,"swArr;":8665,"swarr;":8601,"szlig;":223,"theta;":952,"thkap;":8776,"thorn;":254,"tilde;":732,"times;":215,"trade;":8482,"trisb;":10701,"tshcy;":1115,"twixt;":8812,uacute:250,"ubrcy;":1118,"ucirc;":251,"udarr;":8645,"udhar;":10606,ugrave:249,"uharl;":8639,"uharr;":8638,"uhblk;":9600,"ultri;":9720,"umacr;":363,"uogon;":371,"uplus;":8846,"upsih;":978,"uring;":367,"urtri;":9721,"utdot;":8944,"utrif;":9652,"uuarr;":8648,"vBarv;":10985,"vDash;":8872,"varpi;":982,"vdash;":8866,"veeeq;":8794,"vltri;":8882,"vnsub;":8834,"vnsup;":8835,"vprop;":8733,"vrtri;":8883,"wcirc;":373,"wedge;":8743,"xcirc;":9711,"xdtri;":9661,"xhArr;":10234,"xharr;":10231,"xlArr;":10232,"xlarr;":10229,"xodot;":10752,"xrArr;":10233,"xrarr;":10230,"xutri;":9651,yacute:253,"ycirc;":375,AElig:198,Acirc:194,"Aopf;":120120,Aring:197,"Ascr;":119964,"Auml;":196,"Barv;":10983,"Beta;":914,"Bopf;":120121,"Bscr;":8492,"CHcy;":1063,"COPY;":169,"Cdot;":266,"Copf;":8450,"Cscr;":119966,"DJcy;":1026,"DScy;":1029,"DZcy;":1039,"Darr;":8609,"Dopf;":120123,"Dscr;":119967,Ecirc:202,"Edot;":278,"Eopf;":120124,"Escr;":8496,"Esim;":10867,"Euml;":203,"Fopf;":120125,"Fscr;":8497,"GJcy;":1027,"Gdot;":288,"Gopf;":120126,"Gscr;":119970,"Hopf;":8461,"Hscr;":8459,"IEcy;":1045,"IOcy;":1025,Icirc:206,"Idot;":304,"Iopf;":120128,"Iota;":921,"Iscr;":8464,"Iuml;":207,"Jopf;":120129,"Jscr;":119973,"KHcy;":1061,"KJcy;":1036,"Kopf;":120130,"Kscr;":119974,"LJcy;":1033,"Lang;":10218,"Larr;":8606,"Lopf;":120131,"Lscr;":8466,"Mopf;":120132,"Mscr;":8499,"NJcy;":1034,"Nopf;":8469,"Nscr;":119977,Ocirc:212,"Oopf;":120134,"Oscr;":119978,"Ouml;":214,"Popf;":8473,"Pscr;":119979,"QUOT;":34,"Qopf;":8474,"Qscr;":119980,"Rang;":10219,"Rarr;":8608,"Ropf;":8477,"Rscr;":8475,"SHcy;":1064,"Sopf;":120138,"Sqrt;":8730,"Sscr;":119982,"Star;":8902,THORN:222,"TScy;":1062,"Topf;":120139,"Tscr;":119983,"Uarr;":8607,Ucirc:219,"Uopf;":120140,"Upsi;":978,"Uscr;":119984,"Uuml;":220,"Vbar;":10987,"Vert;":8214,"Vopf;":120141,"Vscr;":119985,"Wopf;":120142,"Wscr;":119986,"Xopf;":120143,"Xscr;":119987,"YAcy;":1071,"YIcy;":1031,"YUcy;":1070,"Yopf;":120144,"Yscr;":119988,"Yuml;":376,"ZHcy;":1046,"Zdot;":379,"Zeta;":918,"Zopf;":8484,"Zscr;":119989,acirc:226,acute:180,aelig:230,"andd;":10844,"andv;":10842,"ange;":10660,"aopf;":120146,"apid;":8779,"apos;":39,aring:229,"ascr;":119990,"auml;":228,"bNot;":10989,"bbrk;":9141,"beta;":946,"beth;":8502,"bnot;":8976,"bopf;":120147,"boxH;":9552,"boxV;":9553,"boxh;":9472,"boxv;":9474,"bscr;":119991,"bsim;":8765,"bsol;":92,"bull;":8226,"bump;":8782,"caps;":8745,"cdot;":267,cedil:184,"cent;":162,"chcy;":1095,"cirE;":10691,"circ;":710,"cire;":8791,"comp;":8705,"cong;":8773,"copf;":120148,"copy;":169,"cscr;":119992,"csub;":10959,"csup;":10960,"cups;":8746,"dArr;":8659,"dHar;":10597,"darr;":8595,"dash;":8208,"diam;":8900,"djcy;":1106,"dopf;":120149,"dscr;":119993,"dscy;":1109,"dsol;":10742,"dtri;":9663,"dzcy;":1119,"eDot;":8785,"ecir;":8790,ecirc:234,"edot;":279,"emsp;":8195,"ensp;":8194,"eopf;":120150,"epar;":8917,"epsi;":949,"escr;":8495,"esim;":8770,"euml;":235,"euro;":8364,"excl;":33,"flat;":9837,"fnof;":402,"fopf;":120151,"fork;":8916,"fscr;":119995,"gdot;":289,"geqq;":8807,"gesl;":8923,"gjcy;":1107,"gnap;":10890,"gneq;":10888,"gopf;":120152,"gscr;":8458,"gsim;":8819,"gtcc;":10919,"gvnE;":8809,"hArr;":8660,"half;":189,"harr;":8596,"hbar;":8463,"hopf;":120153,"hscr;":119997,icirc:238,"iecy;":1077,iexcl:161,"imof;":8887,"iocy;":1105,"iopf;":120154,"iota;":953,"iscr;":119998,"isin;":8712,"iuml;":239,"jopf;":120155,"jscr;":119999,"khcy;":1093,"kjcy;":1116,"kopf;":120156,"kscr;":120000,"lArr;":8656,"lHar;":10594,"lang;":10216,laquo:171,"larr;":8592,"late;":10925,"lcub;":123,"ldca;":10550,"ldsh;":8626,"leqq;":8806,"lesg;":8922,"ljcy;":1113,"lnap;":10889,"lneq;":10887,"lopf;":120157,"lozf;":10731,"lpar;":40,"lscr;":120001,"lsim;":8818,"lsqb;":91,"ltcc;":10918,"ltri;":9667,"lvnE;":8808,"macr;":175,"male;":9794,"malt;":10016,micro:181,"mlcp;":10971,"mldr;":8230,"mopf;":120158,"mscr;":120002,"nGtv;":8811,"nLtv;":8810,"nang;":8736,"napE;":10864,"nbsp;":160,"ncap;":10819,"ncup;":10818,"ngeq;":8817,"nges;":10878,"ngtr;":8815,"nisd;":8954,"njcy;":1114,"nldr;":8229,"nleq;":8816,"nles;":10877,"nmid;":8740,"nopf;":120159,"npar;":8742,"npre;":10927,"nsce;":10928,"nscr;":120003,"nsim;":8769,"nsub;":8836,"nsup;":8837,"ntgl;":8825,"ntlg;":8824,"nvap;":8781,"nvge;":8805,"nvgt;":62,"nvle;":8804,"nvlt;":60,"oast;":8859,"ocir;":8858,ocirc:244,"odiv;":10808,"odot;":8857,"ogon;":731,"oint;":8750,"omid;":10678,"oopf;":120160,"opar;":10679,"ordf;":170,"ordm;":186,"oror;":10838,"oscr;":8500,"osol;":8856,"ouml;":246,"para;":182,"part;":8706,"perp;":8869,"phiv;":981,"plus;":43,"popf;":120161,pound:163,"prap;":10935,"prec;":8826,"prnE;":10933,"prod;":8719,"prop;":8733,"pscr;":120005,"qint;":10764,"qopf;":120162,"qscr;":120006,"quot;":34,"rArr;":8658,"rHar;":10596,"race;":8765,"rang;":10217,raquo:187,"rarr;":8594,"rcub;":125,"rdca;":10551,"rdsh;":8627,"real;":8476,"rect;":9645,"rhov;":1009,"ring;":730,"ropf;":120163,"rpar;":41,"rscr;":120007,"rsqb;":93,"rtri;":9657,"scap;":10936,"scnE;":10934,"sdot;":8901,"sect;":167,"semi;":59,"sext;":10038,"shcy;":1096,"sime;":8771,"simg;":10910,"siml;":10909,"smid;":8739,"smte;":10924,"solb;":10692,"sopf;":120164,"spar;":8741,"squf;":9642,"sscr;":120008,"star;":9734,"subE;":10949,"sube;":8838,"succ;":8827,"sung;":9834,"sup1;":185,"sup2;":178,"sup3;":179,"supE;":10950,"supe;":8839,szlig:223,"tbrk;":9140,"tdot;":8411,thorn:254,times:215,"tint;":8749,"toea;":10536,"topf;":120165,"tosa;":10537,"trie;":8796,"tscr;":120009,"tscy;":1094,"uArr;":8657,"uHar;":10595,"uarr;":8593,ucirc:251,"uopf;":120166,"upsi;":965,"uscr;":120010,"utri;":9653,"uuml;":252,"vArr;":8661,"vBar;":10984,"varr;":8597,"vert;":124,"vopf;":120167,"vscr;":120011,"wopf;":120168,"wscr;":120012,"xcap;":8898,"xcup;":8899,"xmap;":10236,"xnis;":8955,"xopf;":120169,"xscr;":120013,"xvee;":8897,"yacy;":1103,"yicy;":1111,"yopf;":120170,"yscr;":120014,"yucy;":1102,"yuml;":255,"zdot;":380,"zeta;":950,"zhcy;":1078,"zopf;":120171,"zscr;":120015,"zwnj;":8204,"AMP;":38,"Acy;":1040,"Afr;":120068,"And;":10835,Auml:196,"Bcy;":1041,"Bfr;":120069,COPY:169,"Cap;":8914,"Cfr;":8493,"Chi;":935,"Cup;":8915,"Dcy;":1044,"Del;":8711,"Dfr;":120071,"Dot;":168,"ENG;":330,"ETH;":208,"Ecy;":1069,"Efr;":120072,"Eta;":919,Euml:203,"Fcy;":1060,"Ffr;":120073,"Gcy;":1043,"Gfr;":120074,"Hat;":94,"Hfr;":8460,"Icy;":1048,"Ifr;":8465,"Int;":8748,Iuml:207,"Jcy;":1049,"Jfr;":120077,"Kcy;":1050,"Kfr;":120078,"Lcy;":1051,"Lfr;":120079,"Lsh;":8624,"Map;":10501,"Mcy;":1052,"Mfr;":120080,"Ncy;":1053,"Nfr;":120081,"Not;":10988,"Ocy;":1054,"Ofr;":120082,Ouml:214,"Pcy;":1055,"Pfr;":120083,"Phi;":934,"Psi;":936,QUOT:34,"Qfr;":120084,"REG;":174,"Rcy;":1056,"Rfr;":8476,"Rho;":929,"Rsh;":8625,"Scy;":1057,"Sfr;":120086,"Sub;":8912,"Sum;":8721,"Sup;":8913,"Tab;":9,"Tau;":932,"Tcy;":1058,"Tfr;":120087,"Ucy;":1059,"Ufr;":120088,Uuml:220,"Vcy;":1042,"Vee;":8897,"Vfr;":120089,"Wfr;":120090,"Xfr;":120091,"Ycy;":1067,"Yfr;":120092,"Zcy;":1047,"Zfr;":8488,"acE;":8766,"acd;":8767,"acy;":1072,"afr;":120094,"amp;":38,"and;":8743,"ang;":8736,"apE;":10864,"ape;":8778,"ast;":42,auml:228,"bcy;":1073,"bfr;":120095,"bne;":61,"bot;":8869,"cap;":8745,cent:162,"cfr;":120096,"chi;":967,"cir;":9675,copy:169,"cup;":8746,"dcy;":1076,"deg;":176,"dfr;":120097,"die;":168,"div;":247,"dot;":729,"ecy;":1101,"efr;":120098,"egs;":10902,"ell;":8467,"els;":10901,"eng;":331,"eta;":951,"eth;":240,euml:235,"fcy;":1092,"ffr;":120099,"gEl;":10892,"gap;":10886,"gcy;":1075,"gel;":8923,"geq;":8805,"ges;":10878,"gfr;":120100,"ggg;":8921,"glE;":10898,"gla;":10917,"glj;":10916,"gnE;":8809,"gne;":10888,"hfr;":120101,"icy;":1080,"iff;":8660,"ifr;":120102,"int;":8747,iuml:239,"jcy;":1081,"jfr;":120103,"kcy;":1082,"kfr;":120104,"lEg;":10891,"lap;":10885,"lat;":10923,"lcy;":1083,"leg;":8922,"leq;":8804,"les;":10877,"lfr;":120105,"lgE;":10897,"lnE;":8808,"lne;":10887,"loz;":9674,"lrm;":8206,"lsh;":8624,macr:175,"map;":8614,"mcy;":1084,"mfr;":120106,"mho;":8487,"mid;":8739,"nGg;":8921,"nGt;":8811,"nLl;":8920,"nLt;":8810,"nap;":8777,nbsp:160,"ncy;":1085,"nfr;":120107,"ngE;":8807,"nge;":8817,"ngt;":8815,"nis;":8956,"niv;":8715,"nlE;":8806,"nle;":8816,"nlt;":8814,"not;":172,"npr;":8832,"nsc;":8833,"num;":35,"ocy;":1086,"ofr;":120108,"ogt;":10689,"ohm;":937,"olt;":10688,"ord;":10845,ordf:170,ordm:186,"orv;":10843,ouml:246,"par;":8741,para:182,"pcy;":1087,"pfr;":120109,"phi;":966,"piv;":982,"prE;":10931,"pre;":10927,"psi;":968,"qfr;":120110,quot:34,"rcy;":1088,"reg;":174,"rfr;":120111,"rho;":961,"rlm;":8207,"rsh;":8625,"scE;":10932,"sce;":10928,"scy;":1089,sect:167,"sfr;":120112,"shy;":173,"sim;":8764,"smt;":10922,"sol;":47,"squ;":9633,"sub;":8834,"sum;":8721,sup1:185,sup2:178,sup3:179,"sup;":8835,"tau;":964,"tcy;":1090,"tfr;":120113,"top;":8868,"ucy;":1091,"ufr;":120114,"uml;":168,uuml:252,"vcy;":1074,"vee;":8744,"vfr;":120115,"wfr;":120116,"xfr;":120117,"ycy;":1099,"yen;":165,"yfr;":120118,yuml:255,"zcy;":1079,"zfr;":120119,"zwj;":8205,AMP:38,"DD;":8517,ETH:208,"GT;":62,"Gg;":8921,"Gt;":8811,"Im;":8465,"LT;":60,"Ll;":8920,"Lt;":8810,"Mu;":924,"Nu;":925,"Or;":10836,"Pi;":928,"Pr;":10939,REG:174,"Re;":8476,"Sc;":10940,"Xi;":926,"ac;":8766,"af;":8289,amp:38,"ap;":8776,"dd;":8518,deg:176,"ee;":8519,"eg;":10906,"el;":10905,eth:240,"gE;":8807,"ge;":8805,"gg;":8811,"gl;":8823,"gt;":62,"ic;":8291,"ii;":8520,"in;":8712,"it;":8290,"lE;":8806,"le;":8804,"lg;":8822,"ll;":8810,"lt;":60,"mp;":8723,"mu;":956,"ne;":8800,"ni;":8715,not:172,"nu;":957,"oS;":9416,"or;":8744,"pi;":960,"pm;":177,"pr;":8826,reg:174,"rx;":8478,"sc;":8827,shy:173,uml:168,"wp;":8472,"wr;":8768,"xi;":958,yen:165,GT:62,LT:60,gt:62,lt:60},Vi=bf;var Tf=[8364,129,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,141,381,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,157,382,376];function Ef(e,t){if(t&&!e.endsWith(";"))return`${e}\\b(?!=)`;return e}function ac(e){let n=Object.keys(Vi).map((r)=>Ef(r,e));return new RegExp(`&(#(?:x[a-fA-F\\d]+|\\d+)(?:;)?|${n.join("|")})`,"g")}var ji,Hi;function Cf(e){if(e){if(!Hi)Hi=ac(!0);return Hi}if(!ji)ji=ac(!1);return ji}var oc=0;function Sf(e){if(e===10)return 32;if(e<128)return e;if(e<=159)return Tf[e-128];if(e<55296)return e;if(e<=57343)return oc;if(e<=65535)return e;if(e>=65536&&e<=131071)return e;if(e>=131072&&e<=196607)return e;if(e>=917504&&e<=917631||e>=917760&&e<=917999)return e;return oc}function qi(e,t){if(e.indexOf("&")===-1)return e;return e.replace(Cf(t),(n,r)=>{let i;if(r[0]!=="#")i=Vi[r];else if(r[1]==="x")i=Number.parseInt(r.substring(2),16);else i=Number.parseInt(r.substring(1),10);if(!i)return n;return String.fromCodePoint(Sf(i))})}class In extends Error{constructor(e){super(`sveld's template parser doesn't support ${e} yet.`);this.name="TemplateParseNotImplementedError"}}var vf=/<\/script\s*>/g,Pf=/<\/script\s*>/y,Af=/[^\n]/g,kf=new Set(["server","client","worker","test","default"]);function cc(e,t,n){let r=e.index,i=e.readUntil(vf);if(e.index>=e.source.length)throw Error("sveld: unclosed <script> tag");let o=e.source.slice(0,r).replace(Af," ")+i;e.read(Pf);let s=ec(o,e.isTypeScript,e.root.comments);s.start=r;let c="default";for(let l of n){if(kf.has(l.name))throw Error(`sveld: "${l.name}" is a reserved <script> attribute name.`);if(l.name==="module"){if(l.value!==!0)throw Error("sveld: <script module> does not take a value.");c="module"}if(l.name==="context"){let u=l.value;if(u===!0||!Array.isArray(u)||u.length!==1||u[0].type!=="Text")throw Error("sveld: context attribute must be a plain string.");if(u[0].data!=="module")throw Error('sveld: only context="module" is valid.');c="module"}}return{type:"Script",start:t,end:e.index,context:c,content:s,attributes:n}}function pc(e,t,n){let r=e.index,i=e.source.indexOf("</style",e.index),o=i===-1?e.source.length:i;return e.index=o,e.eat("</style",!0),e.read(/\s*>/y),{type:"StyleSheet",start:t,end:e.index,attributes:n,children:[],comments:[],content:{start:r,end:o,styles:e.source.slice(r,o),comment:null}}}var wf=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]);function Ui(e){return wf.has(e)||e.charCodeAt(0)===33&&e.toLowerCase()==="!doctype"}var Nf="^[a-zA-Z][a-zA-Z0-9]*(-[a-zA-Z0-9.\\-_\\u00B7\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u203F-\\u2040\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\u{10000}-\\u{EFFFF}]*)?$",Df=new RegExp(Nf,"u");function lc(e){return Df.test(e)}var _f=/(?:"([^"]*)"|'([^'])*'|([^>\s]+))/y,mc=/["']/y,If=/(\/>|[\s"'=<>`])/y,Gi=/<\/textarea(\s[^>]*)?>/iy,Lf=/^![a-zA-Z]+$/,Rf=/^[a-zA-Z][a-zA-Z0-9]*:[a-zA-Z][a-zA-Z0-9-]*[a-zA-Z0-9]$/,Mf=/^(?:\p{Lu}[$\u200c\u200d\p{ID_Continue}.]*|\p{ID_Start}[$\u200c\u200d\p{ID_Continue}]*(?:\.[$\u200c\u200d\p{ID_Continue}]+)+)$/u,yc={"svelte:head":"SvelteHead","svelte:options":"SvelteOptions","svelte:window":"SvelteWindow","svelte:document":"SvelteDocument","svelte:body":"SvelteBody"},uc={...yc,"svelte:element":"SvelteElement","svelte:component":"SvelteComponent","svelte:self":"SvelteSelf","svelte:fragment":"SvelteFragment","svelte:boundary":"SvelteBoundary"};function Of(e){let t=e.charCodeAt(0);if(t<97||t>122)return!1;for(let n=1;n<e.length;n++){let r=e.charCodeAt(n);if((r<97||r>122)&&(r<48||r>57))return!1}return!0}function Bf(e){if(Of(e))return!0;if(Lf.test(e))return!0;if(Rf.test(e))return!0;return lc(e)}function Ff(e){let t=e.charCodeAt(0);if(t>=97&&t<=122&&!e.includes("."))return!1;return!0}function $f(e){return`Svelte${e.slice(7).split("-").map((n)=>n.charAt(0).toUpperCase()+n.slice(1)).join("")}`}function Vf(e){for(let t=e.length-1;t>=0;t--){let n=e[t].type;if(n==="SvelteHead")return!0;if(n==="RegularElement"||n==="Component")return!1}return!1}function jf(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n.type==="RegularElement"&&n.attributes?.some((r)=>r.type==="Attribute"&&r.name==="shadowrootmode"))return!0}return!1}function dc(e){let{source:t,index:n}=e;if(n>=t.length)throw new wt("Unexpected end of input",t.length);let r=n;while(r<t.length){let i=t.charCodeAt(r);if(i===47||i===62||Ft(i))break;r++}return e.index=r,{name:t.slice(n,r),start:n,end:r}}function gc(e){let{source:t,index:n}=e;if(n>=t.length)throw new wt("Unexpected end of input",t.length);let r=n;while(r<t.length){let i=t.charCodeAt(r);if(i===61||i===47||i===62||i===34||i===39||Ft(i))break;r++}return e.index=r,{name:t.slice(n,r),start:n,end:r}}function Hf(e){let t=e.index;if(e.eat("//")){let n=e.readUntilString(`
43
+ `),r=e.index;e.root.comments.push({type:"Line",value:n,start:t,end:r});return}if(e.eat("/*")){let n=e.readUntilString("*/");e.eat("*/");let r=e.index;e.root.comments.push({type:"Block",value:n,start:t,end:r})}}function qf(e){if(e==="use")return"UseDirective";if(e==="animate")return"AnimateDirective";if(e==="bind")return"BindDirective";if(e==="class")return"ClassDirective";if(e==="style")return"StyleDirective";if(e==="on")return"OnDirective";if(e==="let")return"LetDirective";if(e==="in"||e==="out"||e==="transition")return"TransitionDirective";return!1}function xc(e,t,n){let r={start:e.index,end:-1,type:"Text",raw:"",data:""},i=[],o=(s)=>{if(s>r.start)r.raw=e.source.slice(r.start,s),r.data=qi(r.raw,!0),r.end=s,i.push(r)};while(e.index<e.source.length){if(t())return o(e.index),i;if(e.eat("{")){if(e.match("#")||e.match("@"))throw new In("blocks/tags inside attribute value sequences");let s=e.index-1;o(s),e.allowWhitespace();let c=Ce(e);e.allowWhitespace(),e.eat("}",!0),i.push({type:"ExpressionTag",start:s,end:e.index,expression:c}),r={start:e.index,end:-1,type:"Text",raw:"",data:""}}else{let s=e.index+1;if(n!==void 0){let c=e.source;while(s<c.length){let l=c.charCodeAt(s);if(l===123||l===n)break;s++}}e.index=s}}throw new In("unterminated attribute value / sequence (loose mode)")}function Uf(e){let t=e.eat("'")?"'":e.eat('"')?'"':null;if(t&&e.eat(t))return[{start:e.index-1,end:e.index-1,type:"Text",raw:"",data:""}];let n=xc(e,()=>{if(t)return e.match(t);return!!e.matchRegex(If)},t===null?void 0:t.charCodeAt(0));if(n.length===0&&!t)throw Error("sveld: expected attribute value");if(t)e.index+=1;if(t||n.length>1||n[0].type==="Text")return n;return n[0]}function Wi(e,t,n,r){return{type:"Attribute",start:t,end:n,name:e,value:r}}function Gf(e){let t=e.index,n=gc(e);if(!n.name)return null;let r=!0;if(e.eat("=")){e.allowWhitespace();let i=e.matchRegex(_f);if(!i)throw Error("sveld: expected attribute value");e.index+=i.length;let o=i[0]==='"'||i[0]==="'";if(o)i=i.slice(1,-1);r=[{start:e.index-i.length-(o?1:0),end:o?e.index-1:e.index,type:"Text",raw:i,data:qi(i,!0)}]}if(e.matchRegex(mc))throw Error("sveld: expected '='");return Wi(n.name,t,e.index,r)}function Wf(e){while(!0){let c=e.index;if(Hf(e),e.index===c)break;e.allowWhitespace()}let t=e.index;if(e.eat("{")){if(e.allowWhitespace(),e.eat("@attach")){e.requireWhitespace();let u=Ce(e);return e.allowWhitespace(),e.eat("}",!0),{type:"AttachTag",start:t,end:e.index,expression:u}}if(e.eat("...")){let u=Ce(e);return e.allowWhitespace(),e.eat("}",!0),{type:"SpreadAttribute",start:t,end:e.index,expression:u}}let c=e.readIdentifierName();if(c.name==="")throw Error("sveld: empty attribute shorthand");e.allowWhitespace(),e.eat("}",!0);let l={type:"ExpressionTag",start:c.start,end:c.end,expression:c};return Wi(c.name,t,e.index,l)}let n=gc(e);if(!n.name)return null;let r=e.index;e.allowWhitespace();let i=n.name.indexOf(":"),o=i!==-1&&qf(n.name.slice(0,i)),s=!0;if(e.eat("="))if(e.allowWhitespace(),e.source[e.index]==="/"&&e.source[e.index+1]===">"){let c=e.index;e.index++,s=[{start:c,end:c+1,type:"Text",raw:"/",data:"/"}],r=e.index}else s=Uf(e),r=e.index;else if(e.matchRegex(mc))throw Error("sveld: expected '='");if(o){let c=n.name.slice(i+1).split("|",1)[0];if(c==="")throw Error("sveld: directive missing a name");if(o==="StyleDirective")return{start:t,end:r,type:o,name:c,value:s};let l=s===!0?void 0:Array.isArray(s)?s[0]:s,u=null;if(l){if((Array.isArray(s)?s.length>1:!1)||l.type==="Text")throw Error("sveld: directive value must be a single expression");u=l.expression}let f={start:t,end:r,type:o,name:c,expression:u};if((f.type==="BindDirective"||f.type==="ClassDirective")&&!f.expression)f.expression={start:t+i+1,end:r,type:"Identifier",name:f.name};return f}return Wi(n.name,t,r,s)}function bc(e){let t=e.index++,n=e.current();if(e.eat("!--")){let g=e.readUntilString("-->");e.eat("-->",!0),e.append({type:"Comment",start:t,end:e.index,data:g});return}if(e.eat("/")){let{name:g}=dc(e);if(e.allowWhitespace(),e.eat(">",!0),Ui(g))throw Error(`sveld: <${g}> is a void element and cannot have a closing tag`);while(n.name!==g){if(n.type==="RegularElement");else throw Error(`sveld: invalid closing tag </${g}>`);n.end=t,e.pop(),n=e.current()}if(n.end=e.index,e.pop(),e.lastAutoClosedTag&&e.stack.length<e.lastAutoClosedTag.depth)e.lastAutoClosedTag=void 0;return}let r=dc(e),i=Ff(r.name)&&Mf.test(r.name);if(!Bf(r.name)&&!i)throw Error(`sveld: "${r.name}" is not a valid element or component name`);if(r.name in yc&&n.type!=="Root")throw Error(`sveld: <${r.name}> must be a top-level element`);let o;if(r.name in uc)o=uc[r.name];else if(r.name.startsWith("svelte:"))o=$f(r.name);else if(i)o="Component";else if(r.name==="title"&&Vf(e.stack))o="TitleElement";else if(r.name==="slot"&&!jf(e.stack))o="SlotElement";else o="RegularElement";let s={type:o,start:t,end:-1,name:r.name,attributes:[],fragment:{type:"Fragment",nodes:[]}};if(e.allowWhitespace(),n.type==="RegularElement"&&Ha(n.name,r.name))n.end=t,e.pop(),e.lastAutoClosedTag={tag:n.name,reason:r.name,depth:e.stack.length},n=e.current();let c=e.current(),l=(r.name==="script"||r.name==="style")&&c.type==="Root",u=l?Gf:Wf,f;while(f=u(e))s.attributes.push(f),e.allowWhitespace();if(s.type==="SvelteComponent")s.expression=hc(fc(s));if(s.type==="SvelteElement"){let g=fc(s);if(g.value===!0)throw Error("sveld: <svelte:element> `this` attribute needs a value");if(zf(g))s.tag=hc(g);else{let b=g.value[0];s.tag=b.type==="Text"?{type:"Literal",value:b.data,raw:`'${b.raw}'`,start:b.start,end:b.end}:b.expression}}if(l){e.eat(">",!0);let g=Kf(c.fragment.nodes,t);if(r.name==="script"){let b=cc(e,t,s.attributes);if(g)b.content.leadingComments=[{type:"Line",value:g.data}];if(b.context==="module"){if(e.root.module)throw Error("sveld: duplicate <script module>");e.root.module=b}else{if(e.root.instance)throw Error("sveld: duplicate <script>");e.root.instance=b}}else{if(e.root.css)throw Error("sveld: duplicate <style>");let b=pc(e,t,s.attributes);b.content.comment=g,e.root.css=b}return}e.append(s);let y=e.eat("/")||Ui(r.name);if(e.eat(">",!0),y)s.end=e.index;else if(r.name==="textarea")s.fragment.nodes=xc(e,()=>(Gi.lastIndex=e.index,Gi.test(e.source))),e.read(Gi),s.end=e.index;else e.push(s,s.fragment)}function Kf(e,t){for(let n=e.length-1;n>=0;n--){let r=e[n];if(n===e.length-1&&r.end!==t)break;if(r.type==="Comment")return r;if(r.type!=="Text"||r.data.trim())break}return null}function fc(e){let t=e.attributes,n=t.findIndex((r)=>r.type==="Attribute"&&r.name==="this");if(n===-1)throw Error(`sveld: <${e.name}> requires a \`this\` attribute`);return t.splice(n,1)[0]}function hc(e){return Array.isArray(e.value)?e.value[0].expression:e.value.expression}function zf(e){return e.value!==!0&&!Array.isArray(e.value)||Array.isArray(e.value)&&e.value.length===1&&e.value[0].type==="ExpressionTag"}function Tc(e){let t={start:e.start,end:e.end,attributes:e.attributes};for(let n of e.attributes){if(n.type!=="Attribute")continue;if(n.name==="runes"){let r=Ec(n);if(typeof r==="boolean")t.runes=r}if(n.name==="customElement"){let r=Yf(n);if(r!==void 0)t.customElement=r}}return t}function Ec(e){let{value:t}=e;if(t===!0)return!0;let n=Array.isArray(t)?t[0]:t;if(!n)return!0;if(Array.isArray(t)&&t.length>1)return null;if(n.type==="Text")return n.data;if(n.expression.type!=="Literal")return null;return n.expression.value}var Jf=new Set(["String","Boolean","Number","Array","Object"]);function Ki(e){let t=[];for(let n of e.properties){if(!n||typeof n!=="object"||n.type!=="Property"||n.computed||n.key?.type!=="Identifier")continue;let{key:r,value:i}=n;t.push([r.name,i])}return t}function Xf(e){let t={};if(!e||typeof e!=="object"||e.type!=="ObjectExpression")return t;for(let[n,r]of Ki(e)){if(!r||typeof r!=="object"||r.type!=="Literal")continue;let i=r.value;if(n==="attribute"&&typeof i==="string")t.attribute=i;else if(n==="reflect"&&typeof i==="boolean")t.reflect=i;else if(n==="type"&&typeof i==="string"&&Jf.has(i))t.type=i}return t}function Yf(e){let{value:t}=e;if(t===!0)return;let n=Array.isArray(t)?t[0]:t;if(!n)return;if(n.type==="Text"){let f=Ec(e);return typeof f==="string"?{tag:f}:void 0}let r=n.expression;if(r.type==="Literal"&&r.value===null)return;if(r.type!=="ObjectExpression")return;let i=Ki(r),o={},s=i.find(([f])=>f==="tag")?.[1];if(s&&typeof s==="object"&&s.type==="Literal"&&typeof s.value==="string")o.tag=s.value;let c=i.find(([f])=>f==="props")?.[1];if(c&&typeof c==="object"&&c.type==="ObjectExpression"){o.props={};for(let[f,y]of Ki(c))o.props[f]=Xf(y)}let l=i.find(([f])=>f==="shadow")?.[1];if(l&&typeof l==="object"){let f=l;if(f.type==="Literal"&&(f.value==="open"||f.value==="none"))o.shadow=f.value;else if(f.type==="ObjectExpression")o.shadow=l}let u=i.find(([f])=>f==="extend")?.[1];if(u!==void 0)o.extend=u;return o}var Qf=/<script\s+(?:[^>]*|(?:[^=>'"/]+=(?:"[^"]*"|'[^']*'|[^>\s]+)\s+)*)lang=(["'])?ts\1[^>]*>/;class zi extends Fi{root;stack=[];fragments=[];isTypeScript;lineTable={};lastAutoClosedTag;constructor(e,t){super(e);this.isTypeScript=Qf.test(e);let n=Me();this.root={type:"Root",start:0,end:t,css:null,js:[],options:null,fragment:n,comments:[]},this.stack.push(this.root),this.fragments.push(n)}current(){return this.stack[this.stack.length-1]}currentFragment(){return this.fragments[this.fragments.length-1]}push(e,t){this.stack.push(e),this.fragments.push(t)}pop(){return this.fragments.pop(),this.stack.pop()}append(e){return this.currentFragment().nodes.push(e),e}}var Ji={"{":"}","(":")","[":"]"},Zf=new Set(Object.values(Ji));function Ln(e,t,n=Ji){let r=n===Ji?Zf:new Set(Object.values(n)),i=[],o=t;while(o<e.source.length){let s=e.source[o++];if(s==="'"||s==='"'||s==="`"){o=eh(e,o,s);continue}if(Object.hasOwn(n,s))i.push(s);else if(r.has(s)){let c=i.pop(),l=c?n[c]:void 0;if(s!==l)throw Error(`sveld: expected "${l}"`);if(i.length===0)return o}}throw Error("sveld: unexpected end of input")}function eh(e,t,n){let r=!1,i=t;while(i<e.source.length){let o=e.source[i++];if(r){r=!1;continue}if(o===n)return i;if(o==="\\")r=!0;if(n==="`"&&o==="$"&&e.source[i]==="{")i=Ln(e,i)}throw Error("sveld: unterminated string constant")}var Sc=/[^\n]/g,th=/\?\s*:/g;function Nt(e){let t=e.index,n=e.readIdentifierName();if(n.name!==""){let g=Cc(e);return{...n,typeAnnotation:g}}let r=e.source[e.index];if(r!=="{"&&r!=="[")throw Error("sveld: expected a binding pattern");let i=Ln(e,t);e.index=i;let o=e.source.slice(t,i),s=e.source.slice(0,t).replace(Sc," "),c=s.indexOf(" ");s=s.slice(0,c)+s.slice(c+1);let l=`${s}(${o} = 1)`,{node:u}=tn(l,t-1,e.isTypeScript,e.root.comments),f=u.left,y=Cc(e);if(y)f.typeAnnotation=y,f.end=y.end;return f}function Cc(e){let t=e.index;if(e.allowWhitespace(),!e.eat(":")){e.index=t;return}let n="_ as ",r=e.index-n.length,i=e.source.slice(0,r).replace(Sc," ")+n+e.source.slice(e.index).replace(th,":"),{node:o}=tn(i,r,e.isTypeScript,e.root.comments),s=o;if(s.type==="AssignmentExpression"){let c=s.right.start;while(i[c]!=="=")c-=1;({node:o}=tn(i.slice(0,c),r,e.isTypeScript,e.root.comments)),s=o}if(s.type==="SequenceExpression"&&s.expressions)s=s.expressions[0];return e.index=s.end,{type:"TSTypeAnnotation",start:t,end:e.index,typeAnnotation:s.typeAnnotation}}var vc=/\s*}/y,nh={"<":">"};function Pc(e){let t=e.index-2;while(e.source[t]!=="{")t-=1;if(e.eat("if")){e.requireWhitespace();let n={type:"IfBlock",elseif:!1,start:t,end:-1,test:Ce(e),consequent:Me(),alternate:null};e.append(n),e.allowWhitespace(),e.eat("}",!0),e.push(n,n.consequent);return}if(e.eat("each")){e.requireWhitespace();let n=Ce(e);if(e.allowWhitespace(),!e.match("as")){let c=n;if(c.type==="SequenceExpression"&&c.expressions)c=c.expressions[0];if(c.type==="TSAsExpression"){let l=c;n=l.expression;let u=l.typeAnnotation.start-2;while(u>=0&&!(e.source[u]==="a"&&e.source[u+1]==="s"))u-=1;e.index=u}}let r=null,i,o;if(e.eat("as"))e.requireWhitespace(),r=Nt(e);if(e.allowWhitespace(),e.eat(",")){e.allowWhitespace();let c=e.readIdentifierName();if(!c.name)throw Error("sveld: expected an identifier");i=c.name,e.allowWhitespace()}if(e.eat("("))e.allowWhitespace(),o=Ce(e),e.allowWhitespace(),e.eat(")",!0),e.allowWhitespace();e.eat("}",!0);let s={type:"EachBlock",start:t,end:-1,expression:n,body:Me(),context:r,index:i,key:o};e.append(s),e.push(s,s.body);return}if(e.eat("await")){e.requireWhitespace();let n=Ce(e);e.allowWhitespace();let r={type:"AwaitBlock",start:t,end:-1,expression:n,value:null,error:null,pending:null,then:null,catch:null};if(e.eat("then")){if(!e.matchRegex(vc))e.requireWhitespace(),r.value=Nt(e),e.allowWhitespace();r.then=Me()}else if(e.eat("catch")){if(!e.matchRegex(vc))e.requireWhitespace(),r.error=Nt(e),e.allowWhitespace();r.catch=Me()}else r.pending=Me();e.eat("}",!0),e.append(r),e.push(r,r.then??r.catch??r.pending);return}if(e.eat("key")){e.requireWhitespace();let n=Ce(e);e.allowWhitespace(),e.eat("}",!0);let r={type:"KeyBlock",start:t,end:-1,expression:n,fragment:Me()};e.append(r),e.push(r,r.fragment);return}if(e.eat("snippet")){e.requireWhitespace();let n=e.readIdentifierName();if(n.name==="")throw Error("sveld: expected a snippet name");e.allowWhitespace();let r;if(e.isTypeScript&&e.match("<")){let o=e.index,s=Ln(e,o,nh);r=e.source.slice(o+1,s-1),e.index=s}if(e.allowWhitespace(),e.eat("(")){let o=1;while(e.index<e.source.length&&(!e.match(")")||o!==1)){if(e.match("("))o++;if(e.match(")"))o--;e.index+=1}e.eat(")",!0)}e.allowWhitespace(),e.eat("}",!0);let i={type:"SnippetBlock",start:t,end:-1,expression:n,typeParams:r,parameters:[],body:Me()};e.append(i),e.push(i,i.body);return}throw Error("sveld: expected if/each/await/key/snippet")}function Ac(e){let t=e.index-1,n=e.current();if(n.type==="IfBlock"){if(!e.eat("else"))throw Error("sveld: expected {:else} or {:else if}");if(e.eat("if"))throw Error("sveld: {:else if} cannot follow {:else if} directly");if(e.allowWhitespace(),e.fragments.pop(),n.alternate=Me(),e.fragments.push(n.alternate),e.eat("if")){e.requireWhitespace();let r=Ce(e);e.allowWhitespace(),e.eat("}",!0);let i=t-1;while(e.source[i]!=="{")i-=1;let o={type:"IfBlock",start:i,end:-1,elseif:!0,test:r,consequent:Me(),alternate:null};e.append(o),e.stack.push(o),e.fragments.pop(),e.fragments.push(o.consequent)}else e.allowWhitespace(),e.eat("}",!0);return}if(n.type==="EachBlock"){if(!e.eat("else"))throw Error("sveld: expected {:else}");e.allowWhitespace(),e.eat("}",!0),n.fallback=Me(),e.fragments.pop(),e.fragments.push(n.fallback);return}if(n.type==="AwaitBlock"){if(e.eat("then")){if(n.then)throw Error("sveld: duplicate {:then}");if(!e.eat("}"))e.requireWhitespace(),n.value=Nt(e),e.allowWhitespace(),e.eat("}",!0);n.then=Me(),e.fragments.pop(),e.fragments.push(n.then);return}if(e.eat("catch")){if(n.catch)throw Error("sveld: duplicate {:catch}");if(!e.eat("}"))e.requireWhitespace(),n.error=Nt(e),e.allowWhitespace(),e.eat("}",!0);n.catch=Me(),e.fragments.pop(),e.fragments.push(n.catch);return}throw Error("sveld: expected {:then ...} or {:catch ...}")}throw Error("sveld: {:...} not valid here")}function kc(e){let t=e.current();switch(t.type){case"IfBlock":{e.eat("if",!0),e.allowWhitespace(),e.eat("}",!0);while(t.type==="IfBlock"&&t.elseif)t.end=e.index,e.stack.pop(),t=e.current();t.end=e.index,e.pop();return}case"EachBlock":e.eat("each",!0);break;case"KeyBlock":e.eat("key",!0);break;case"AwaitBlock":e.eat("await",!0);break;case"SnippetBlock":e.eat("snippet",!0);break;default:throw Error("sveld: unexpected closing block tag")}e.allowWhitespace(),e.eat("}",!0),t.end=e.index,e.pop()}var rh=/(?:let|const)\b/y,ih=/(?:var|interface|enum)\b/y,sh=/type\b/y;function wc(e){let t=e.index;if(e.matchRegex(ih))throw Error("sveld: `var`/`interface`/`enum` are not valid here");if(!e.matchRegex(rh)&&!e.matchRegex(sh))return null;let n=e.root.comments.length,r=tc(e.source,t,e.isTypeScript,e.root.comments);if(r.type!=="VariableDeclaration"){if(r.type==="ExpressionStatement")return e.root.comments.length=n,null;throw Error("sveld: expected a `let`/`const` declaration")}if(r.kind!=="let"&&r.kind!=="const")throw Error("sveld: expected a `let`/`const` declaration");return e.index=r.end,e.allowWhitespace(),e.eat("}",!0),r}var ah=/\s*}/y;function Nc(e){let t=e.index;while(e.source[t]!=="{")t-=1;if(e.eat("html")){e.requireWhitespace();let n=Ce(e);e.allowWhitespace(),e.eat("}",!0);let r={type:"HtmlTag",start:t,end:e.index,expression:n};e.append(r);return}if(e.eat("debug")){let n;if(e.read(ah))n=[];else{let i=Ce(e);n=i.type==="SequenceExpression"?i.expressions:[i];for(let o of n)if(o.type!=="Identifier")throw Error("sveld: {@debug} arguments must be identifiers");e.allowWhitespace(),e.eat("}",!0)}let r={type:"DebugTag",start:t,end:e.index,identifiers:n};e.append(r);return}if(e.eat("const")){e.requireWhitespace();let n=Nt(e);e.allowWhitespace(),e.eat("=",!0),e.allowWhitespace();let r=Ce(e),i=e.index;e.allowWhitespace(),e.eat("}",!0);let o={type:"VariableDeclarator",id:n,init:r,start:n.start,end:i},s={type:"ConstTag",start:t,end:e.index,declaration:{type:"VariableDeclaration",kind:"const",declarations:[o],start:t+2,end:e.index-1}};e.append(s);return}if(e.eat("render")){e.requireWhitespace();let n=Ce(e);if(!(n.type==="CallExpression"||n.type==="ChainExpression"&&n.expression.type==="CallExpression"))throw Error("sveld: {@render ...} must be a function call");e.allowWhitespace(),e.eat("}",!0);let i={type:"RenderTag",start:t,end:e.index,expression:n};e.append(i);return}throw Error("sveld: expected html/debug/const/render")}function Dc(e){let t=e.index;if(e.index+=1,e.allowWhitespace(),e.eat("#")){Pc(e);return}if(e.eat(":")){Ac(e);return}if(e.eat("@")){Nc(e);return}if(e.match("/")&&!e.match("/*")&&!e.match("//")){e.eat("/"),kc(e);return}let n=wc(e);if(n){let o={type:"DeclarationTag",start:t,end:e.index,declaration:n};e.append(o);return}let r=Ce(e);e.allowWhitespace(),e.eat("}",!0);let i={type:"ExpressionTag",start:t,end:e.index,expression:r};e.append(i)}function _c(e){let{index:t,source:n}=e,r=n.indexOf("<",t),i=n.indexOf("{",t),o;if(r===-1)o=i===-1?n.length:i;else o=i===-1?r:Math.min(r,i);e.index=o;let s=n.slice(t,o),c={type:"Text",start:t,end:e.index,raw:s,data:s};e.append(c)}function Xi(e){let t=e.trimEnd(),n=new zi(t,e.length);while(n.index<n.source.length)if(n.match("<"))bc(n);else if(n.match("{"))Dc(n);else _c(n);let r=n.root.fragment.nodes.findIndex((i)=>i.type==="SvelteOptions");if(r!==-1){let[i]=n.root.fragment.nodes.splice(r,1);n.root.options=Tc(i)}return n.root}function Yi(e){if(e?.type==="Identifier")return e.name;return typeof e?.value==="string"?e.value:void 0}function Ic(e,t){for(let n of(e&&St(e))??[]){let r=n,i=r.type==="ExportNamedDeclaration"&&r.declaration?r.declaration:r;if(i.type==="VariableDeclaration"){let o=i.declarations.find((s)=>s.id.type==="Identifier"?s.id.name===t:ge(s.id).has(t));if(o)return{declaration:i,declarator:o,statement:r}}else if((i.type==="FunctionDeclaration"||i.type==="ClassDeclaration")&&i.id?.name===t)return{declaration:i,statement:r}}return}function oh(e,t){for(let n of(e&&St(e))??[]){let r=n;if(r.type!=="LabeledStatement"||r.label.name!=="$")continue;if(r.body.type!=="ExpressionStatement")continue;let i=r.body.expression;if(i.type!=="AssignmentExpression"||i.operator!=="=")continue;if(!ge(i.left).has(t))continue;let o={type:"VariableDeclarator",id:i.left,init:i.right};return{declaration:{type:"VariableDeclaration",kind:"let",declarations:[o]},declarator:o,statement:r}}return}function Lc(e){if(e==="var")return"let";if(e==="using"||e==="await using")return"const";return e}var ch=null,Rc=/^@component/,ph=/^[A-Za-z_$][\w$]*(?=\s*(?:<|$))/,lh=/\r/g,uh=/^\{\s*\}$/,dh=new Set(["AssignmentExpression","UpdateExpression","CallExpression","SpreadAttribute","FunctionDeclaration","ImportDeclaration","VariableDeclaration","ExportNamedDeclaration","Comment","SlotElement","RenderTag","OnDirective","BindDirective"]);class ke{ctx=ii();static mapToArray(e){return Array.from(e,([t,n])=>n)}static getStaticAttributeValue(e){if(!Array.isArray(e.value))return;return e.value.map((t)=>t.data??t.raw??"").join("").trim()}resolveScriptLanguage(e){let t=[e.instance,e.module].filter((r)=>r!==void 0),n=!1;for(let r of t){let i=r.attributes?.find((s)=>s.name==="lang");if(!i){n=!0;continue}if(ke.getStaticAttributeValue(i)?.toLowerCase()==="ts")return"ts"}return n?"js":void 0}resolveScriptGenericsAttribute(e){let t=e.instance?.attributes?.find((s)=>s.name==="generics");if(!t)return;let n=oe(this.ctx,t),r=e.instance?.attributes?.find((s)=>s.name==="lang");if((r?ke.getStaticAttributeValue(r)?.toLowerCase():void 0)!=="ts"){pe(this.ctx,"syntax-skipped","generics",'<script generics="..."> requires lang="ts"; the generics attribute was ignored because the script is not TypeScript.',n);return}let o=ke.getStaticAttributeValue(t);if(!o)return;return{value:o,source:n}}resolvePublicPropName(e){return this.ctx.propLocalToPublicName.get(e)??e}trackPropLocalName(e,t=e){this.ctx.propLocalToPublicName.set(t,e)}getPropByLocalOrPublic(e){return this.ctx.props.get(this.resolvePublicPropName(e))}getPropTypeByLocalOrPublic(e){return this.getPropByLocalOrPublic(e)?.type}getExplicitPropType(e){return this.ctx.explicitPropTypesByName.get(e)}getPropertyName(e){if(!e||typeof e!=="object"||!("type"in e))return;if(ye(e))return e.name;if(Tt(e))return e.value==null?void 0:String(e.value);return}isNumericConstant(e){if(!e||typeof e!=="object"||!("type"in e))return!1;if(e.type!=="MemberExpression")return!1;let t=e,n=t.object&&"name"in t.object?t.object.name:void 0,r=t.property&&"name"in t.property?t.property.name:void 0;if(!n||!r)return!1;if(n==="Number")return["POSITIVE_INFINITY","NEGATIVE_INFINITY","MAX_VALUE","MIN_VALUE","MAX_SAFE_INTEGER","MIN_SAFE_INTEGER","EPSILON","NaN"].includes(r);if(n==="Math")return["PI","E","LN2","LN10","LOG2E","LOG10E","SQRT2","SQRT1_2"].includes(r);return!1}resolveLocalVarJSDoc(e){for(let n of this.ctx.vars)if(n.declarations.some((i)=>i.id&&typeof i.id==="object"&&("type"in i.id)&&i.id.type==="Identifier"&&("name"in i.id)&&i.id.name===e))return Ue(this.ctx,this,n);let t=this.ctx.funcDecls.get(e);if(t)return Ue(this.ctx,this,t);return}addModuleExport(e,t){if(ze(e)===void 0)return;if(this.ctx.moduleExports.has(e)){let n=this.ctx.moduleExports.get(e);this.ctx.moduleExports.set(e,{...n,...t})}else this.ctx.moduleExports.set(e,t)}resolveExportSpecifier(e,t,n,r){let i=Yi(t.local),o=Yi(t.exported);if(!i||!o)return;if(e.source!=null)return{localName:i,exportedName:o};let s=Ic(n,i);if(!s&&r==="instance"){let c=this.ctx.parsed?.module;s=Ic(c,i)??oh(n,i)}return{localName:i,exportedName:o,...s}}recordUnresolvedExportSpecifier(e,t,n){let r=e.source?.value,i=typeof r==="string"?`it re-exports from "${r}"`:this.ctx.valueImportBindingsByLocalName.has(t)?"it re-exports an imported binding":"no matching local declaration was found";pe(this.ctx,"export-unresolved",n,`export "${n}" was skipped because ${i}; sveld only resolves exports of a local declaration.`,oe(this.ctx,e))}exportJSDoc(e,t){if(!t)return Ue(this.ctx,this,e);let n=e.specifiers.length===1?Ue(this.ctx,this,e):void 0,r=Ue(this.ctx,this,t.statement);if(!n||!r)return n??r;let i=Object.fromEntries(Object.entries(n).filter(([,o])=>o!==void 0));return{...r,...i,internal:n.internal||r.internal}}recordClassExport(e,t){pe(this.ctx,"export-unresolved",t,`export "${t}" was skipped because a class can't be a prop; export it from the module script instead.`,oe(this.ctx,e))}dropUndeclaredClassBases(){let e=Array.from(this.ctx.moduleExports.values()).filter((n)=>n.kind==="class"),t=new Set(e.map((n)=>n.localName??n.name));for(let n of e){if(!n.extends)continue;let r=ph.exec(n.extends)?.[0];if(r&&(t.has(r)||this.ctx.valueImportBindingsByLocalName.has(r)||this.ctx.typeImportBindingsByLocalName.has(r)))continue;pe(this.ctx,"export-unresolved",n.name,`class "${n.name}" extends \`${n.extends}\`, which isn't imported or an exported class, so the .d.ts declares it without \`extends\` and its inherited members are missing. Export the base class from the module script.`,n.source),n.extends=void 0}}addModuleClassExport(e,t,n){let r=t.id?.name;if(!r)return;let i=n?.exportedName??r,o=this.exportJSDoc(e,n),{members:s,typeParameters:c,extends:l,implements:u}=ka(this.ctx,this,t),f=c??o?.typeParameters;this.addModuleExport(i,{name:i,...r===i?{}:{localName:r},kind:"class",description:o?.description,deprecated:o?.deprecated,tags:o?.tags,...o?.internal?{internal:!0}:{},type:`typeof ${r}`,...f?{typeParameters:f}:{},members:s,...t.abstract?{abstract:!0}:{},...l?{extends:l}:{},...u?{implements:u}:{},isFunction:!1,isFunctionDeclaration:!1,isRequired:!1,constant:!1,reactive:!1,source:oe(this.ctx,e)})}aliasType(e){if(e==="*")return"any";return e.trim()}findVariableTypeAndDescription(e){let t=this.getPropByLocalOrPublic(e);if(t?.type)return{type:t.type,description:t.description,internal:t.internal};let n=this.variableJsDocEntry(e),r=this.ctx.explicitVariableTypesByName.get(e);if(r)return{type:r,description:n?.description,internal:n?.internal};if(!n?.type)return null;return{type:n.type,description:n.description,internal:n.internal}}findVariableJsDoc(e){let t=this.variableJsDocEntry(e);return{...t?.description?{description:t.description}:{},...t?.internal?{internal:!0}:{}}}variableJsDocEntry(e){if(!this.ctx.variableInfoCacheBuilt)this.ctx.variableInfoCache=ja(this.ctx,this),this.ctx.variableInfoCacheBuilt=!0;return this.ctx.variableInfoCache.get(e)}accumulateGeneric(e,t){if(this.ctx.generics)this.ctx.generics=[`${this.ctx.generics[0]}, ${e}`,`${this.ctx.generics[1]}, ${t}`];else this.ctx.generics=[e,t]}cleanup(){this.ctx=ii()}static SCRIPT_BLOCK_REGEX=/(<script[^>]*>)([\s\S]*?)(<\/script>)/gi;static TS_DIRECTIVE_REGEX=/\/\/(?<!^[ \t]*\*.*\/\/)\s*@ts-[^\n\r]*/gm;static stripTypeScriptDirectivesFromScripts(e){if(!e.includes("@ts-"))return e;return ke.SCRIPT_BLOCK_REGEX.lastIndex=0,e.replace(ke.SCRIPT_BLOCK_REGEX,(t,n,r,i)=>{ke.TS_DIRECTIVE_REGEX.lastIndex=0;let o=r.replace(ke.TS_DIRECTIVE_REGEX,"");return n+o+i})}parseSvelteComponent(e,t){this.cleanup(),this.ctx.componentFilePath=t.filePath;let n=ke.stripTypeScriptDirectivesFromScripts(e);this.ctx.source=n;let r=Xi(n);if(La(this,this.ctx,r),this.ctx.parsed=r,this.ctx.scriptLanguage==="ts")Yn(this.ctx.parsed.module),Yn(this.ctx.parsed.instance),Yn(this.ctx.parsed.fragment);this.ctx.syntaxMode=Ia(this.ctx);let i=this.ctx.parsed.css,o=i?.start!==void 0&&i?.end!==void 0?n.slice(0,i.start)+" ".repeat(i.end-i.start)+n.slice(i.end):n;Fr(this.ctx,this.ctx.parsed?.module),Fr(this.ctx,this.ctx.parsed?.instance),Sa(this.ctx,this,o);let s={type:"ComponentRoot",instance:this.ctx.parsed.instance,fragment:this.ctx.parsed.fragment};if(this.ctx.parsed?.module){let x=Os(this.ctx.parsed.module),C=(_,A,I)=>{let O=Ue(this.ctx,this,_);this.addModuleExport(A==="*"?`* from ${I.from}`:A,{name:A,kind:"re-export",description:O?.description,deprecated:O?.deprecated,tags:O?.tags,...O?.internal?{internal:!0}:{},isFunction:!1,isFunctionDeclaration:!1,isRequired:!1,constant:!1,reactive:!1,reExport:I,source:oe(this.ctx,_)})},T=(_)=>{pe(this.ctx,"module-export-conflict","default",`export "default" was skipped because it collides with the component's own default export.`,oe(this.ctx,_))},L=(_,A,I)=>{let O=[];if(A.type==="FunctionDeclaration"){let K=A;if(!K.id?.name)return;let W=this.ctx.scriptLanguage==="ts"?Or(this.ctx,K):void 0;O.push({prop_name:I?.exportedName??K.id.name,kind:"function",isFunctionDeclaration:!0,value:void 0,typeSeed:W?.hasAnnotations?void 0:"() => any",explicitType:W?.hasAnnotations?W.signature:void 0,initializerIsFunction:!0,defaultValue:void 0,inferredTypeForSource:void 0,resolvedJSDoc:void 0})}else if(A.type==="VariableDeclaration"){let K=A,W=Lc(K.kind),J=I?.declarator?[I.declarator]:K.declarations;for(let ae of J){if(!ae||typeof ae!=="object"||!("id"in ae))continue;let{id:Y,init:ce}=ae;if(!Y||typeof Y!=="object")continue;if(Y.type!=="Identifier"){for(let at of ge(Y)){if(I&&I.localName!==at)continue;O.push({prop_name:I?.exportedName??at,kind:W,isFunctionDeclaration:!1,value:void 0,typeSeed:void 0,explicitType:void 0,initializerIsFunction:!1,defaultValue:void 0,inferredTypeForSource:void 0,resolvedJSDoc:void 0})}continue}let we=Y.name,Z=I?.exportedName??we,Se=ce==null?{isFunction:!1}:pt(this,this.ctx,ce),{value:Ne,type:ve,isFunction:Pe,defaultValue:Ve}=Se,bt=Se;dn(this.ctx,Se,Z,"moduleExports"),O.push({prop_name:Z,kind:W,isFunctionDeclaration:!1,value:Ne,typeSeed:ve,explicitType:this.getExplicitPropType(we),initializerIsFunction:Pe,defaultValue:Ve,inferredTypeForSource:ve,resolvedJSDoc:bt})}if(O.length===0)return}else{if(A.type==="ClassDeclaration")this.addModuleClassExport(_,A,I);return}let H=this.exportJSDoc(_,I);for(let{prop_name:K,kind:W,isFunctionDeclaration:J,value:ae,typeSeed:Y,explicitType:ce,initializerIsFunction:we,defaultValue:Z,inferredTypeForSource:Se,resolvedJSDoc:Ne}of O){let{type:ve,typeSource:Pe,description:Ve,params:bt,returnType:at,isFunction:qt,typeParameters:sn}=Cn({explicitType:ce,typeSeed:Y,inferredTypeForSource:Se,jsdocType:H?.type,jsdocDescription:H?.description,jsdocParams:H?.params,jsdocReturnType:H?.returnType,jsdocTypeParameters:H?.typeParameters,resolvedType:Ne?.resolvedType,resolvedDescription:Ne?.resolvedDescription,resolvedParams:Ne?.resolvedParams,resolvedReturnType:Ne?.resolvedReturnType,initializerIsFunction:we,isFunctionDeclaration:J,typedefs:this.ctx.typedefs});this.addModuleExport(K,{name:K,kind:W,description:Ve,deprecated:H?.deprecated,tags:H?.tags,...H?.internal?{internal:!0}:{},type:ve,typeSource:Pe,value:ae,defaultValue:Z,params:bt,returnType:at,typeParameters:sn,isFunction:qt,isFunctionDeclaration:J,isRequired:!1,constant:W==="const",reactive:!1,source:oe(this.ctx,_)})}};oi(this.ctx.parsed?.module,(_,A)=>{if(_.type==="ImportDeclaration")qn(this.ctx,_);if(_.type==="FunctionDeclaration"){let I=_;if(I.id?.name)this.ctx.funcDecls.set(I.id.name,I)}if(_.type==="VariableDeclaration")this.ctx.vars.add(_);if(_.type==="ExportNamedDeclaration"){if(_.declaration!=null){L(_,_.declaration);return}let I=_.source?.value;for(let O of _.specifiers){let H=this.resolveExportSpecifier(_,O,A,"module");if(!H)continue;if(H.exportedName==="default"){T(_);continue}let K=typeof I==="string"?{from:I,imported:H.localName}:x.get(H.localName);if(H.declaration)L(_,H.declaration,H);else if(K)C(_,H.exportedName,K);else if(!this.ctx.localTypeDeclarationsByName.get(H.localName)?.exported)this.recordUnresolvedExportSpecifier(_,H.localName,H.exportedName)}}if(_.type==="ExportAllDeclaration"&&typeof _.source.value==="string"){let I=(_.exported&&Yi(_.exported))??"*";if(I==="default"){T(_);return}C(_,I,{from:_.source.value,imported:"*"})}}),this.dropUndeclaredClassBases()}let c,l,u,f=new Set,y=new Set,g=[],b=[],P=[],N=new Set;Gs(this,this.ctx),this.ctx.activeScopes.push(this.ctx.componentScope);let D=Ws(this.ctx),j=(x,C,T)=>{let L=[];if(C.type==="FunctionDeclaration"){let A=C;if(!A.id?.name)return;let I=T?.exportedName??A.id.name,O=this.ctx.scriptLanguage==="ts"?Or(this.ctx,A):void 0;L.push({prop_name:I,kind:"function",isFunctionDeclaration:!0,value:void 0,typeSeed:O?.hasAnnotations?void 0:"() => any",explicitType:O?.hasAnnotations?O.signature:void 0,initializerIsFunction:!0,isRequired:!1,localName:A.id.name,defaultValue:void 0,inferredTypeForSource:void 0,resolvedJSDoc:void 0})}else if(C.type==="VariableDeclaration"){let A=C,I=Lc(A.kind),O=T?.declarator?[T.declarator]:A.declarations;for(let H of O){if(!H||typeof H!=="object"||!("id"in H))continue;let{id:K,init:W}=H;if(!K||typeof K!=="object")continue;if(K.type!=="Identifier"){for(let Pe of ge(K)){if(T&&T.localName!==Pe)continue;L.push({prop_name:T?.exportedName??Pe,kind:I,isFunctionDeclaration:!1,value:void 0,typeSeed:void 0,explicitType:void 0,initializerIsFunction:!1,isRequired:!1,localName:Pe,defaultValue:void 0,inferredTypeForSource:void 0,resolvedJSDoc:void 0})}continue}let J=K.name,ae=T?.exportedName??J,Y=I==="let"&&W==null,ce=W==null?{isFunction:!1}:pt(this,this.ctx,W),{value:we,type:Z,isFunction:Se,defaultValue:Ne}=ce,ve=ce;dn(this.ctx,ce,ae,"props"),L.push({prop_name:ae,kind:I,isFunctionDeclaration:!1,value:we,typeSeed:Z,explicitType:this.getExplicitPropType(J),initializerIsFunction:Se,isRequired:Y,localName:J,defaultValue:Ne,inferredTypeForSource:Z,resolvedJSDoc:ve})}if(L.length===0)return}else{if(C.type==="ClassDeclaration"&&C.id)this.recordClassExport(x,T?.exportedName??C.id.name);return}let _=this.exportJSDoc(x,T);for(let{prop_name:A,kind:I,isFunctionDeclaration:O,value:H,typeSeed:K,explicitType:W,initializerIsFunction:J,isRequired:ae,localName:Y,defaultValue:ce,inferredTypeForSource:we,resolvedJSDoc:Z}of L){let{type:Se,typeSource:Ne,description:ve,params:Pe,returnType:Ve,isFunction:bt,typeParameters:at}=Cn({explicitType:W,typeSeed:K,inferredTypeForSource:we,jsdocType:_?.type,jsdocDescription:_?.description,jsdocParams:_?.params,jsdocReturnType:_?.returnType,jsdocTypeParameters:_?.typeParameters,resolvedType:Z?.resolvedType,resolvedDescription:Z?.resolvedDescription,resolvedParams:Z?.resolvedParams,resolvedReturnType:Z?.resolvedReturnType,initializerIsFunction:J,isFunctionDeclaration:O,typedefs:this.ctx.typedefs});dt(this.ctx,"prop-unknown-type",A,_?.sveldIgnore),un(this,this.ctx,A,{name:A,...Y!==void 0&&Y!==A?{localName:Y}:{},kind:I,description:ve,binding:_?.binding,deprecated:_?.deprecated,tags:_?.tags,..._?.internal?{internal:!0}:{},type:Se,typeSource:Ne,value:H,defaultValue:ce,params:Pe,returnType:Ve,typeParameters:at,isFunction:bt,isFunctionDeclaration:O,isRequired:ae,constant:I==="const",reactive:this.ctx.reactive_vars.has(A),source:oe(this.ctx,x)})}};oi(s,(x,C,T)=>{let L=Ks(this,this.ctx,D,x);if(L)this.ctx.activeScopes.push(L);let _=x.type;if(!dh.has(_))return;if(x.type==="AssignmentExpression")qr(this.ctx,x.left);if(x.type==="UpdateExpression")qr(this.ctx,x.argument);if(x.type==="CallExpression"){let A=x,I=A.callee&&typeof A.callee==="object"&&"name"in A.callee?A.callee.name:void 0;if(I==="createEventDispatcher"){if(C&&typeof C==="object"&&"id"in C&&C.id&&typeof C.id==="object"&&"name"in C.id)c=C.id.name,l=C;u=A.typeArguments?.params?.[0]}if(I==="$host"){if(C&&typeof C==="object"&&"id"in C&&C.id&&typeof C.id==="object"&&"name"in C.id)f.add(C.id.name)}if(I==="setContext")ra(this.ctx,this,x,C??void 0);if(A.arguments.length>0){if(P.push(A),Kn(this.ctx,A.callee))N.add(A)}if(I)b.push({name:I,arguments:A.arguments,node:A,nestedBoundDetailNames:gn(this.ctx,A.arguments[1])});if(Wt(A.callee)&&ye(A.callee.property)&&A.callee.property.name==="dispatchEvent"&&(ct(A.callee.object,"$host")||ye(A.callee.object)&&f.has(A.callee.object.name))){let O=pa(this.ctx,A);if(O)y.add(O.name),g.push(O)}}if(_==="SpreadAttribute"){let A=x;if(A.expression?.name==="$$restProps"||this.ctx.restPropLocals.has(A.expression?.name??""))wa(this.ctx,C)}if(x.type==="FunctionDeclaration"){let A=x;if(A.id?.name)this.ctx.funcDecls.set(A.id.name,A)}if(x.type==="ImportDeclaration")qn(this.ctx,x);if(x.type==="VariableDeclaration"){if(this.ctx.vars.add(x),C&&typeof C==="object"&&"type"in C&&C.type==="Program"&&x.declarations.some((A)=>ct(Et(A.init),"$props")))Ra(this,this.ctx,x)}if(x.type==="ExportNamedDeclaration"){if(x.declaration!=null){j(x,x.declaration);return}for(let A of x.specifiers){let I=this.resolveExportSpecifier(x,A,C,"instance");if(!I)continue;if(I.declaration)j(x,I.declaration,I);else this.recordUnresolvedExportSpecifier(x,I.localName,I.exportedName)}}if(_==="Comment"){let I=x?.data?.trim()??"";if(Rc.test(I))this.ctx.componentComment=I.replace(Rc,"").replace(lh,""),this.ctx.componentCommentSource=oe(this.ctx,x)}if(_==="SlotElement"){let A=x,I=A.attributes?.find((W)=>W.name==="name")?.value,O=(Array.isArray(I)?I[0]:void 0)?.data,H=(A.attributes||[]).filter((W)=>W.name!=="name").reduce((W,J)=>{let ae={value:void 0,replace:!1},Y=J.value;if(Y===void 0||Y===!0)return W;let ce=Array.isArray(Y)?Y[0]:Y;if(ce){let{type:we,expression:Z,raw:Se,start:Ne,end:ve}=ce;if(we==="Text"&&Se!==void 0)ae.value=JSON.stringify(Se);else if(!Array.isArray(Y)&&we==="ExpressionTag"&&Z&&typeof Z==="object"&&"type"in Z&&Z.type==="Identifier"&&"name"in Z&&Z.name===J.name)ae.value=Z.name,ae.replace=!0;if(Z&&typeof Z==="object"&&"type"in Z){if(Z.type==="Literal"&&"value"in Z){let Pe=Z.value;ae.value=typeof Pe==="string"?JSON.stringify(Pe):String(Pe)}else if(Z.type==="MemberExpression")ae.value=Fn(this.ctx,this,Z);else if(Z.type!=="Identifier"){if(Ne!==void 0&&ve!==void 0){if(Z.type==="ObjectExpression"||Z.type==="TemplateLiteral")ae.value=le(this.ctx,Ne+1,ve-1)}}}}if(J.name)W[J.name]=ae;return W},{}),K=A.fragment?.nodes?.map(({start:W,end:J})=>{if(W===void 0||J===void 0)return"";return le(this.ctx,W,J)??""}).join("").trim();bn(this.ctx,{slot_name:O,slot_props:H,slot_fallback:K,source:oe(this.ctx,x)})}if(_==="RenderTag"){let A=x,I=ha(this.ctx,A.expression);if(I){let O,H=!1;if(I.arguments.length===0)O={};else if(I.arguments.length===1&&typeof I.arguments[0]==="object"&&I.arguments[0]&&"type"in I.arguments[0]&&I.arguments[0].type==="ObjectExpression"){let J=Jr(this.ctx,this,I.arguments[0]);O=J.slot_props,H=J.hasUnresolvedSpread}else if(I.arguments.length===1)pe(this.ctx,"syntax-skipped",I.publicName,`{@render ${I.publicName}(...)} argument is not a plain object literal; the render call was not mapped to slot metadata.`,oe(this.ctx,x));let K=I.publicName==="children"?void 0:I.publicName,W=K===void 0?ch:K;if(O!==void 0)bn(this.ctx,{slot_name:K,slot_props:O,slot_props_unresolved_spread:H||void 0,source:oe(this.ctx,x)});if(O!==void 0||this.ctx.slots.has(W))this.ctx.snippetPropLocals.add(I.trackingName)}}if(_==="OnDirective"){let A=x;if(A.expression==null&&A.name){if(C!=null&&typeof C==="object"&&"name"in C){let I=typeof C.name==="string"?C.name:void 0,O="type"in C?String(C.type):void 0;if(I&&O){let H=Tn(O)?{type:"InlineComponent",name:I}:{type:"Element",name:I};this.ctx.forwardedEvents.set(A.name,H);let K=this.ctx.events.get(A.name),W=this.ctx.eventDescriptions.get(A.name),J=K?.deprecated,ae=K?.internal;if(!K)this.ctx.events.set(A.name,{type:"forwarded",name:A.name,element:H,description:W,deprecated:J,...ae?{internal:!0}:{},source:oe(this.ctx,x)});else if(K.type==="forwarded"&&W&&!K.description)this.ctx.events.set(A.name,{...K,description:W,deprecated:K.deprecated??J,...K.internal||ae?{internal:!0}:{},source:K.source||oe(this.ctx,x)})}}}}if(_==="BindDirective"&&C&&typeof C==="object"&&"type"in C&&(En(String(C.type))||Tn(String(C.type)))){let A=x;if(A.expression?.name){let I=hn(this.ctx,A.expression.name);if(I)this.ctx.reactive_vars.add(I)}if(En(String(C.type))&&A.name==="this"&&A.expression?.name&&"name"in C&&typeof C.name==="string"){let I=hn(this.ctx,A.expression.name);if(!I)return;let O=C.name;if(this.ctx.bindings.has(I)){let H=this.ctx.bindings.get(I);if(H&&!H.elements.includes(O))this.ctx.bindings.set(I,{...H,elements:[...H.elements,O]})}else this.ctx.bindings.set(I,{elements:[O]})}}},(x)=>{if(yn(x))this.ctx.activeScopes.pop(),zs(D,x)},{skipTypeOnlySubtrees:!0});for(let x of g)la(this,this.ctx,x);if(c!==void 0){Oa(this,this.ctx,u,c,oe(this.ctx,l));for(let x of b)if(x.name===c){let C=x.arguments[0],T=C&&typeof C==="object"&&"value"in C?C.value:void 0,L=x.arguments[1],_=Kr(Wr(this,this.ctx,x.nestedBoundDetailNames),L),A=_===void 0&&L&&typeof L==="object"&&"value"in L?L.value:void 0,I=A===null&&L.raw==="null";if(T!=null)vt(this.ctx,{name:String(T),detail:_??(I?"null":A==null?"":zr(A)),has_argument:Boolean(L),source:oe(this.ctx,x.node)})}}let U=new Set(y);if(c!==void 0){for(let x of b)if(x.name===c){let C=x.arguments[0],T=C&&typeof C==="object"&&"value"in C?C.value:void 0;if(T!=null)U.add(String(T))}}this.ctx.forwardedEvents.forEach((x,C)=>{let T=this.ctx.events.get(C);if(T&&T.type==="dispatched"&&!U.has(C)){let L=this.ctx.eventDescriptions.get(C),_={type:"forwarded",name:C,element:x,description:L,deprecated:T.deprecated,tags:T.tags,source:T.source};if(T.internal)_.internal=!0;if(T.detail!==void 0&&T.detail!=="undefined")_.detail=T.detail;this.ctx.events.set(C,_)}}),Ba(this.ctx,U);let v=this.ctx.syntaxMode==="runes"?new Set(Array.from(this.ctx.snippetPropLocals,(x)=>this.resolvePublicPropName(x))):new Set,w=ke.mapToArray(this.ctx.props).filter((x)=>!v.has(x.name)).map((x)=>{if(this.ctx.bindings.has(x.name)){let C=this.ctx.bindings.get(x.name)?.elements.sort().map((T)=>As(T)).join(" | ");return{...x,type:`null | ${C}`,typeSource:"inferred",reactive:x.reactive||this.ctx.reactive_vars.has(x.name)}}return{...x,reactive:x.reactive||this.ctx.reactive_vars.has(x.name)}});this.ctx.activeScopes.length=0;let M=ke.mapToArray(this.ctx.slots).map((x)=>{let{slot_props_unresolved_spread:C,...T}=x;if(!x.slot_props)return T;if(typeof x.slot_props==="string")return uh.test(x.slot_props)?{...T,slot_props:"Record<string, never>"}:T;let L=x.slot_props,_=[];for(let O of Object.keys(L)){if(L[O].replace&&L[O].value!==void 0)L[O].value=this.getPropTypeByLocalOrPublic(L[O].value);if(L[O].value===void 0)L[O].value="any";_.push(`${O}: ${L[O].value}`)}let A=C?" & Record<string, any>":"",I=_.length===0?C?"Record<string, any>":"Record<string, never>":_.length===1?`{ ${_[0]} }${A}`:`{
44
+ ${_.join(`;
42
45
  `)};
43
- }${A}`;return{...C,slot_props:k}}).sort((y,x)=>{let C=y.name??"",v=x.name??"";if(C<v)return-1;if(C>v)return 1;return 0});if(this.ctx.deferredSlotBlockGenerics.length>0){let y=[...W.map((x)=>x.type??""),...P.map((x)=>x.slot_props??"")].join(`
44
- `);for(let{name:x,constraint:C}of this.ctx.deferredSlotBlockGenerics){let v=x.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");if(!new RegExp(`\\b${v}\\b`).test(y))continue;this.accumulateGeneric(x,C)}}if(this.ctx.scriptGenericsAttribute){if(this.ctx.generics)oe(this.ctx,"syntax-skipped","generics",'Both the "generics" script attribute and @generics/@template JSDoc tags declare component generics; the script attribute takes precedence and the JSDoc declaration was ignored.',this.ctx.scriptGenericsAttribute.source);this.ctx.generics=ms(this.ctx.scriptGenericsAttribute.value)}let B=Se.mapToArray(this.ctx.moduleExports),R=Se.mapToArray(this.ctx.events).map((y)=>{switch(y.type){case"forwarded":return{...y,element:y.element.name};case"dispatched":return y;default:return y}}).sort(as),ae=Se.mapToArray(this.ctx.typedefs),Q=Se.mapToArray(this.ctx.contexts),te={props:new Map(this.ctx.pendingCallDefaultCandidates.filter((y)=>y.location==="props").map((y)=>[y.propName,y])),moduleExports:new Map(this.ctx.pendingCallDefaultCandidates.filter((y)=>y.location==="moduleExports").map((y)=>[y.propName,y]))};for(let y of W)if(y.typeSource==="unknown"){let x=te.props.get(y.name);if(x)y.type="any";let C=x?x.importSource?`Prop "${y.name}" default calls "${x.calleeName}()" imported from "${x.importSource}"; falling back to "any" pending cross-file resolution.`:`Prop "${y.name}" default calls "${x.calleeName}()", but its return type could not be inferred; falling back to "any".`:`Prop "${y.name}" type could not be inferred; falling back to "${y.type??"any"}".`;oe(this.ctx,"prop-unknown-type",y.name,C,y.source)}for(let y of B)if(y.typeSource==="unknown"&&te.moduleExports.has(y.name))y.type="any";let a=p,c=[];if(a!==void 0){let y=[];for(let C of E){let v=ss(C,a);if(v)y.push({call:C,...v})}if(y.length>0)tt(this.ctx,"dispatch-escapes",a,this.resolveLocalVarJSDoc(a)?.sveldIgnore);let x=ir(this.ctx,"dispatch-escapes",a);for(let{call:C,argumentIndex:v,property:S}of y){let A=xe(C.callee)?this.ctx.valueImportBindingsByLocalName.get(C.callee.name):void 0;if(!A){c.push(C);continue}let k=se(this.ctx,C);this.ctx.pendingDispatchEscapeCandidates.push({importSource:A.source,importedName:A.importedName,calleeText:nt(this.ctx,C.callee)??A.importedName,dispatcherName:a,argumentIndex:v,...S===void 0?{}:{property:S},...k?{source:k}:{},...x?{ignored:x}:{}})}}for(let y of this.ctx.jsDocEventNames){if(D.has(y))continue;if(this.ctx.forwardedEvents.has(y))continue;if(this.ctx.props.has(`on${y}`))continue;if(c.length>0)continue;let x=rr(this.ctx,"event-no-source",y,`@event "${y}" has no matching dispatch or callback prop.`,this.ctx.jsDocEventSources.get(y));if(this.ctx.pendingDispatchEscapeCandidates.length>0)this.ctx.deferredEventNoSourceDiagnostics.push(x);else this.ctx.diagnosticRecords.push(x)}for(let y of c){let x=nt(this.ctx,y.callee)??"";oe(this.ctx,"dispatch-escapes",a??"",`\`${a}\` is passed to \`${x}\`, which sveld can only follow when it's an imported function. Document the events dispatched there with @event tags.`,se(this.ctx,y))}if(this.ctx.rest_props?.type==="InlineComponent")oe(this.ctx,"rest-props-unresolved","$$restProps",`$$restProps is only spread onto component "${this.ctx.rest_props.name}"; sveld cannot infer its rest-prop type. Spread onto a plain element or add an @restProps tag.`);let u=ae.filter((y)=>y.internal).map((y)=>y.name.split("<")[0]);if(u.length>0){let y=u.map((C)=>({name:C,regex:new RegExp(`\\b${C}\\b`)})),x=(C,v,S)=>{if(!v)return;for(let{name:A,regex:k}of y){if(!k.test(v))continue;oe(this.ctx,"internal-typedef-referenced",C,`"${C}" references "${A}", which is @internal and excluded from output; the generated .d.ts will contain a dangling reference to it.`,S)}};for(let C of W){if(C.internal)continue;x(C.name,C.type,C.source)}for(let C of B){if(C.internal)continue;x(C.name,C.type,C.source)}for(let C of ae){if(C.internal)continue;x(C.name,C.ts)}for(let C of R){if(C.internal||C.type!=="dispatched")continue;x(C.name,C.detail,C.source)}for(let C of P){if(C.internal)continue;x(C.name??"default",C.slot_props,C.source)}for(let C of Q){if(C.internal)continue;for(let v of C.properties)x(v.name,v.type)}}let m={source:xn(this.ctx,0,this.ctx.source?.length),syntaxMode:this.ctx.syntaxMode,...this.ctx.scriptLanguage?{scriptLanguage:this.ctx.scriptLanguage}:{},props:W,moduleExports:B,slots:P,events:R,typedefs:ae,generics:this.ctx.generics,rest_props:this.ctx.rest_props,extends:this.ctx.extends,componentComment:this.ctx.componentComment,componentCommentSource:this.ctx.componentCommentSource,contexts:Q,customElementTag:this.ctx.customElementTag,customElement:this.ctx.customElement,...this.ctx.cssParts.length>0?{cssParts:this.ctx.cssParts.slice()}:{},...this.ctx.cssProperties.length>0?{cssProperties:this.ctx.cssProperties.slice()}:{},diagnostics:this.ctx.diagnosticRecords.slice()},T=fs(this.ctx);if(T)m[mn]=T;return m}}var $o="sveld",jo="0.37.6";var hi="5.57.0";var qo=1,Ho=new WeakMap;function gt(e){return e.some((t)=>t.internal)?e.filter((t)=>!t.internal):e}function Bd(e){return{...e,props:gt(e.props),moduleExports:gt(e.moduleExports),slots:gt(e.slots),events:gt(e.events),typedefs:gt(e.typedefs),...e.contexts?{contexts:gt(e.contexts).map((t)=>({...t,properties:gt(t.properties)}))}:{}}}function pn(e,t={}){let n=Ho.get(e),r=n?.get(t.entryExports);if(r)return r;let i=Array.from(e,([,p])=>{let{diagnostics:l,...h}=p;return Bd(h)}).sort((p,l)=>p.moduleName.localeCompare(l.moduleName)),o={schemaVersion:qo,generator:{name:$o,version:jo,svelteVersion:hi},total:i.length,components:i},s=t.entryExports?gt(t.entryExports):void 0;if(s&&s.length>0)o.totalExports=s.length,o.exports=s;if(!n)n=new Map,Ho.set(e,n);return n.set(t.entryExports,o),o}var Fd=/\binterface\s+[A-Za-z_$][\w$]*(\s*<[^{};]*>)?\s*$/;var Wo=/\s/,Vd=/\s{2}|[^\S ]/,$d=/["'`{}/]/g,jd=/["'`{};/]/g;function Hd(e){return Fd.test(e.slice(-200))}var Uo=[""];function qd(e){let t=Uo[e];if(t===void 0)t=" ".repeat(e),Uo[e]=t;return t}function Ud(e,t){let n="";for(let r=e.length-1;r>=0&&n.length<t;r--)n=e[r]+n;return n.length>t?n.slice(-t):n}function Gd(e){if(e.length===0)return!1;let t=e[e.length-1];return t.charCodeAt(t.length-1)===10}function Wd(e){while(e.length>0){let t=e[e.length-1],n=t.length;while(n>0){let r=t.charCodeAt(n-1);if(r!==32&&r!==9)break;n--}if(n===t.length)return;if(n===0){e.pop();continue}e[e.length-1]=t.slice(0,n);return}}function Kd(e){while(e.length>0){let t=e[e.length-1];if(!Wo.test(t[t.length-1]))return;let n=t.trimEnd();if(n.length===t.length)return;if(n.length===0){e.pop();continue}e[e.length-1]=n;return}}function zd(e){if(e.includes("{"))return!1;let t=0,n=0;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);if(t!==0){if(i===t&&e.charCodeAt(r-1)!==92)t=0;continue}if(i===34||i===39||i===96){t=i;continue}if(i===59&&++n>=2)return!0}return!1}function Xd(e){if(!Vd.test(e))return e.trimEnd();let t="",n=null,r=!1;for(let i=0;i<e.length;i++){let o=e[i],s=e[i-1];if(n){if(t+=o,n==="double"&&o==='"'&&s!=="\\"||n==="single"&&o==="'"&&s!=="\\"||n==="template"&&o==="`"&&s!=="\\")n=null;r=!1;continue}if(o==='"'||o==="'"||o==="`"){n=o==='"'?"double":o==="'"?"single":"template",t+=o,r=!1;continue}if(Wo.test(o)){if(!r&&t.length>0)t+=" ",r=!0;continue}t+=o,r=!1}return t.trimEnd()}function Ko(e,t){let n=e[t],r=e.indexOf(n,t+1);while(r!==-1&&e.charCodeAt(r-1)===92)r=e.indexOf(n,r+1);return r}function zo(e,t){let n=e.indexOf("*/",t+1);return n===-1?-1:n+1}function Jd(e){let t=new Map,n=[],r=$d,i=0;while(i<e.length){if(r.lastIndex=i,!r.test(e))break;i=r.lastIndex-1;let o=e.charCodeAt(i);if(o===47){if(e.charCodeAt(i+1)===42){let s=zo(e,i);if(s===-1)break;i=s}}else if(o===34||o===39||o===96){let s=Ko(e,i);if(s===-1)break;i=s}else if(o===123)n.push(i);else if(o===125&&n.length>0)t.set(n.pop(),i);i++}return t}function Yd(e,t,n){for(let r=t;r<n;r++)if(!mi(e.charCodeAt(r)))return!1;return!0}function mi(e){if(e<=32)return e===32||e>=9&&e<=13;if(e<160)return!1;return e===160||e===5760||e>=8192&&e<=8202||e===8232||e===8233||e===8239||e===8287||e===12288||e===65279}function Xo(e,t,n,r){let i=[],o=jd,s=t,p=t;while(p<n){if(o.lastIndex=p,!o.test(e))break;if(p=o.lastIndex-1,p>=n)break;let l=e.charCodeAt(p);if(l===47){if(e.charCodeAt(p+1)===42){let h=zo(e,p);if(h===-1)break;p=h}p++;continue}if(l===34||l===39||l===96){let h=Ko(e,p);if(h===-1)break;p=h+1;continue}if(l===123){let h=r.get(p);if(h===void 0||h>=n){p++;continue}if(s<p)i.push(e.slice(s,p));let d=p+1;if(Yd(e,d,h)){i.push("{}"),p=h+1,s=p;continue}let g=e.slice(d,h),b=e.charCodeAt(d)===10;if(!b&&!g.includes("/*")&&!zd(g)&&!Hd(Ud(i,200))){let E=Xo(e,d,h,r),w=E.trim();if(!w.includes(`
45
- `)){let N=w.endsWith(";")?w.slice(0,-1):w,D=`{ ${Xd(N)} }`;if(D.length<=120){i.push(D),p=h+1,s=p;continue}}if(i.push("{"),E.charCodeAt(0)!==59)i.push(`
46
- `);if(E.length>0)i.push(E);p=h,s=h;continue}if(i.push("{"),!b)i.push(`
47
- `);p=d,s=d;continue}if(l===125){if(s<p)i.push(e.slice(s,p));if(Wd(i),!Gd(i))i.push(`
48
- `);i.push("}"),p++,s=p;continue}if(s<p)i.push(e.slice(s,p));if(Kd(i),i.push(";"),e.charCodeAt(p+1)!==10)i.push(`
49
- `);p++,s=p}if(s<n)i.push(e.slice(s,n));return i.join("")}function Qd(e){return Xo(e,0,e.length,Jd(e))}function Zd(e){if(!e.includes(" "))return e;let t="",n=0;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);if(n!==0){if(t+=e[r],i===n&&e.charCodeAt(r-1)!==92)n=0;continue}if(i===34||i===39||i===96){n=i,t+=e[r];continue}if(i===32&&t.charCodeAt(t.length-1)===32)continue;t+=e[r]}return t}function ef(e){return e===125||e===93||e===41||e===62}function tf(e,t,n){return n-t>=3&&e.charCodeAt(t)===47&&e.charCodeAt(t+1)===42&&e.charCodeAt(t+2)===42}function Go(e,t,n){let r=e.indexOf("*/",t);return r!==-1&&r+2<=n}function nf(e,t,n){let r=e.charCodeAt(t);if(r===124||r===38)return!0;return r===46&&t+1<n&&e.charCodeAt(t+1)!==46}function rf(e){let t=[],n=[],r=e.length,i=0,o=!1,s=0,p=0;while(p<=r){let d=e.indexOf(`
50
- `,p);if(d===-1)d=r;let g=d+1,b=p,E=d;while(b<E&&mi(e.charCodeAt(b)))b++;while(E>b&&mi(e.charCodeAt(E-1)))E--;if(b===E){let P=n.length>0?n[n.length-1]:void 0;if(P!==void 0&&P!==""){let B=P.charCodeAt(P.length-1);if(B!==123&&B!==40&&B!==91)t.push(0),n.push("")}p=g;continue}if(o){if(t.push(s),n.push(` ${e.slice(b,E)}`),Go(e,b,E))o=!1;p=g;continue}let w=tf(e,b,E),N=w&&Go(e,b,E);if(w&&!N){t.push(i),n.push(e.slice(b,E)),o=!0,s=i,p=g;continue}let D=ef(e.charCodeAt(b)),q=Math.max(0,i-(D?1:0))+(nf(e,b,E)?1:0);if(D&&q===0&&n.length>0&&n[n.length-1]==="")t.pop(),n.pop();if(t.push(q),n.push(Zd(e.slice(b,E))),p=g,N)continue;let W=0;for(let P=b;P<E;P++){let B=e.charCodeAt(P);if(W!==0){if(B===W&&e.charCodeAt(P-1)!==92)W=0;continue}if(B===34||B===39||B===96)W=B;else if(B===123||B===40||B===91||B===60)i++;else if(B===125||B===41||B===93)i=Math.max(0,i-1);else if(B===62&&e.charCodeAt(P-1)!==61)i=Math.max(0,i-1)}}let l=n.length;while(l>0&&n[l-1]==="")l--;let h=[];for(let d=0;d<l;d++){if(d>0)h.push(`
51
- `);let g=t[d];if(g>0)h.push(qd(g));h.push(n[d])}return h.join("")}function Jo(e){return`${rf(Qd(e))}
52
- `}var ot="any",Re="",sf="Record<string, any>",gi="Record<string, never>",xi=/^[A-Za-z_$][A-Za-z0-9_$]*$/,af=/CustomEvent/,of=/^[A-Z]/,cf=/\n/,tc=/=>/,pf=/(?:^|\n)@default\b/,bi=/\n/g,lf=/\s+/g,Ft=/(^|[^.\w])Snippet(?:\s*<|\b)/,uf=/import\s+type\s+[^;]*\bSnippet\b[^;]*from\s+"svelte";/,df=/[.*+?^${}()|[\]\\]/g,ff=/^const\s+/,hf=/\{name\}/g;function Ti(e){return e.replace(ff,"")}function mf(e){if(!e)return;return e.replace(bi,`
53
- * `)}function Gn(e){if(!e)return"";return`/** ${e} */`}function Wn(e){if(!e)return"";return`/**
54
- * ${e.replace(bi,`
46
+ }${A}`;return{...T,slot_props:I}}).sort((x,C)=>{let T=x.name??"",L=C.name??"";if(T<L)return-1;if(T>L)return 1;return 0});if(this.ctx.deferredSlotBlockGenerics.length>0){let x=[...w.map((C)=>C.type??""),...M.map((C)=>C.slot_props??"")].join(`
47
+ `);for(let{name:C,constraint:T}of this.ctx.deferredSlotBlockGenerics){let L=C.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");if(!new RegExp(`\\b${L}\\b`).test(x))continue;this.accumulateGeneric(C,T)}}if(this.ctx.scriptGenericsAttribute){if(this.ctx.generics)pe(this.ctx,"syntax-skipped","generics",'Both the "generics" script attribute and @generics/@template JSDoc tags declare component generics; the script attribute takes precedence and the JSDoc declaration was ignored.',this.ctx.scriptGenericsAttribute.source);this.ctx.generics=da(this.ctx.scriptGenericsAttribute.value)}let G=ke.mapToArray(this.ctx.moduleExports),X=ke.mapToArray(this.ctx.events).map((x)=>{switch(x.type){case"forwarded":return{...x,element:x.element.name};case"dispatched":return x;default:return x}}).sort(ca),be=ke.mapToArray(this.ctx.typedefs),a=ke.mapToArray(this.ctx.contexts),p={props:new Map(this.ctx.pendingCallDefaultCandidates.filter((x)=>x.location==="props").map((x)=>[x.propName,x])),moduleExports:new Map(this.ctx.pendingCallDefaultCandidates.filter((x)=>x.location==="moduleExports").map((x)=>[x.propName,x]))};for(let x of w)if(x.typeSource==="unknown"){let C=p.props.get(x.name);if(C)x.type="any";let T=C?C.importSource?`Prop "${x.name}" default calls "${C.calleeName}()" imported from "${C.importSource}"; falling back to "any" pending cross-file resolution.`:`Prop "${x.name}" default calls "${C.calleeName}()", but its return type could not be inferred; falling back to "any".`:`Prop "${x.name}" type could not be inferred; falling back to "${x.type??"any"}".`;pe(this.ctx,"prop-unknown-type",x.name,T,x.source)}for(let x of G)if(x.typeSource==="unknown"&&p.moduleExports.has(x.name))x.type="any";let d=c,m=[];if(d!==void 0){let x=[];for(let T of P){let L=oa(T,d);if(L)x.push({call:T,...L})}if(x.length>0)dt(this.ctx,"dispatch-escapes",d,this.resolveLocalVarJSDoc(d)?.sveldIgnore);let C=Lr(this.ctx,"dispatch-escapes",d);for(let{call:T,argumentIndex:L,property:_}of x){let A=N.has(T)?void 0:Br(this.ctx,T.callee);if(!A){m.push(T);continue}let I=oe(this.ctx,T);this.ctx.pendingDispatchEscapeCandidates.push({importSource:A.source,importedName:A.importedName,...A.members?{members:A.members}:{},calleeText:qe(this.ctx,T.callee)??A.importedName,dispatcherName:d,argumentIndex:L,..._===void 0?{}:{property:_},...I?{source:I}:{},...C?{ignored:C}:{}})}}for(let x of this.ctx.jsDocEventNames){if(U.has(x))continue;if(this.ctx.forwardedEvents.has(x))continue;if(this.ctx.props.has(`on${x}`))continue;if(m.length>0)continue;let C=Ir(this.ctx,"event-no-source",x,`@event "${x}" has no matching dispatch or callback prop.`,this.ctx.jsDocEventSources.get(x));if(this.ctx.pendingDispatchEscapeCandidates.length>0)this.ctx.deferredEventNoSourceDiagnostics.push(C);else this.ctx.diagnosticRecords.push(C)}for(let x of m){let C=qe(this.ctx,x.callee)??"";pe(this.ctx,"dispatch-escapes",d??"",`\`${d}\` is passed to \`${C}\`, which sveld can't follow: it only reads a function imported from another module, by name, as its default export, or through a namespace import. Document the events dispatched there with @event tags.`,oe(this.ctx,x))}if(this.ctx.rest_props?.type==="InlineComponent")pe(this.ctx,"rest-props-unresolved","$$restProps",`$$restProps is only spread onto component "${this.ctx.rest_props.name}"; sveld cannot infer its rest-prop type. Spread onto a plain element or add an @restProps tag.`);let E=be.filter((x)=>x.internal).map((x)=>x.name.split("<")[0]);if(E.length>0){let x=E.map((T)=>({name:T,regex:new RegExp(`\\b${T}\\b`)})),C=(T,L,_)=>{if(!L)return;for(let{name:A,regex:I}of x){if(!I.test(L))continue;pe(this.ctx,"internal-typedef-referenced",T,`"${T}" references "${A}", which is @internal and excluded from output; the generated .d.ts will contain a dangling reference to it.`,_)}};for(let T of w){if(T.internal)continue;C(T.name,T.type,T.source)}for(let T of G){if(T.internal)continue;C(T.name,T.type,T.source)}for(let T of be){if(T.internal)continue;C(T.name,T.ts)}for(let T of X){if(T.internal||T.type!=="dispatched")continue;C(T.name,T.detail,T.source)}for(let T of M){if(T.internal)continue;C(T.name??"default",T.slot_props,T.source)}for(let T of a){if(T.internal)continue;if(T.type!==void 0)C(T.typeName,T.type,T.source);for(let L of T.properties)C(L.name,L.type)}}let S={source:Hn(this.ctx,0,this.ctx.source?.length),syntaxMode:this.ctx.syntaxMode,...this.ctx.scriptLanguage?{scriptLanguage:this.ctx.scriptLanguage}:{},props:w,moduleExports:G,slots:M,events:X,typedefs:be,generics:this.ctx.generics,rest_props:this.ctx.rest_props,extends:this.ctx.extends,componentComment:this.ctx.componentComment,componentCommentSource:this.ctx.componentCommentSource,contexts:a,customElementTag:this.ctx.customElementTag,customElement:this.ctx.customElement,...this.ctx.cssParts.length>0?{cssParts:this.ctx.cssParts.slice()}:{},...this.ctx.cssProperties.length>0?{cssProperties:this.ctx.cssProperties.slice()}:{},diagnostics:this.ctx.diagnosticRecords.slice()},k=Ms(this.ctx);if(k)S[It]=k;return S}}var fh=/\.$/,Qi="resolving it needs file access (generateBundle or the CLI)";function hh(e,t={}){let n=e[It];if(!n)return e;let{pendingCallDefaultCandidates:r,pendingConstDefaultCandidates:i,pendingContextKeyCandidates:o,pendingDispatchEscapeCandidates:s,deferredEventNoSourceDiagnostics:c,untypedJsDocEventNames:l,...u}=n,f=(r??[]).filter((w)=>w.importSource!==void 0);if(f.length===0&&!i&&!o&&!s&&!c)return e;let y=e.filePath,g=t.filePath??(typeof y==="string"?y:""),b=[],P=(w,M,G,X)=>{b.push(Vn({component:g,kind:"cross-file-unresolved",name:w,message:M,...G?{source:G}:{},...X?{ignored:X}:{}}))},N=(w,M)=>(w==="props"?e.props:e.moduleExports).find((G)=>G.name===M)?.source,D=(w)=>w==="props"?"Prop":"Module export";for(let w of o??[]){let M=ln(w);P(M,`setContext key \`${M}\` is imported from "${w.importSource}"; ${Qi}, so the context is omitted.`,w.source)}for(let w of i??[])P(w.propName,`${D(w.location)} "${w.propName}" defaults to \`${ln(w)}\` imported from "${w.importSource}"; ${Qi}, so the default shows the identifier and its type isn't read.`,N(w.location,w.propName));for(let w of f)P(w.propName,`${D(w.location)} "${w.propName}" defaults to \`${w.calleeName}()\` imported from "${w.importSource}"; ${Qi}, so its return type isn't read and the prop falls back to "any".`,N(w.location,w.propName));for(let w of s??[])P(w.calleeText,`\`${w.dispatcherName}\` is passed to \`${w.calleeText}\`, imported from "${w.importSource}"; reading the events it dispatches needs file access (generateBundle or the CLI), so they're omitted.`,w.source,w.ignored);let j=Array.from(new Set((s??[]).map((w)=>`\`${w.calleeText}\``))).join(", "),U=(c??[]).map((w)=>j?{...w,message:`${w.message.replace(fh,"")} in this file; ${j} may dispatch it, but imported helpers aren't read without file access.`}:w),v={...e,diagnostics:[...e.diagnostics??[],...U,...b]};return v[It]=u,v}var Oc="sveld",Bc="0.37.7";var Zi="5.57.0";var $c=1,Fc=new WeakMap;function Dt(e){return e.some((t)=>t.internal)?e.filter((t)=>!t.internal):e}function yh(e){return{...e,props:Dt(e.props),moduleExports:Dt(e.moduleExports),slots:Dt(e.slots),events:Dt(e.events),typedefs:Dt(e.typedefs),...e.contexts?{contexts:Dt(e.contexts).map((t)=>({...t,properties:Dt(t.properties)}))}:{}}}function Rn(e,t={}){let n=Fc.get(e),r=n?.get(t.entryExports);if(r)return r;let i=Array.from(e,([,c])=>{let{diagnostics:l,...u}=c;return yh(u)}).sort((c,l)=>ht(c.moduleName,l.moduleName)),o={schemaVersion:$c,generator:{name:Oc,version:Bc,svelteVersion:Zi},total:i.length,components:i},s=t.entryExports?Dt(t.entryExports):void 0;if(s&&s.length>0)o.totalExports=s.length,o.exports=s;if(!n)n=new Map,Fc.set(e,n);return n.set(t.entryExports,o),o}var gh=/\binterface\s+[A-Za-z_$][\w$]*(\s*<[^{};]*>)?\s*$/;var Hc=/\s/,xh=/\s{2}|[^\S ]/,bh=/["'`{}/]/g,Th=/["'`{};/]/g;function Eh(e){return gh.test(e.slice(-200))}var Vc=[""];function Ch(e){let t=Vc[e];if(t===void 0)t=" ".repeat(e),Vc[e]=t;return t}function Sh(e,t){let n="";for(let r=e.length-1;r>=0&&n.length<t;r--)n=e[r]+n;return n.length>t?n.slice(-t):n}function vh(e){if(e.length===0)return!1;let t=e[e.length-1];return t.charCodeAt(t.length-1)===10}function Ph(e){while(e.length>0){let t=e[e.length-1],n=t.length;while(n>0){let r=t.charCodeAt(n-1);if(r!==32&&r!==9)break;n--}if(n===t.length)return;if(n===0){e.pop();continue}e[e.length-1]=t.slice(0,n);return}}function Ah(e){while(e.length>0){let t=e[e.length-1];if(!Hc.test(t[t.length-1]))return;let n=t.trimEnd();if(n.length===t.length)return;if(n.length===0){e.pop();continue}e[e.length-1]=n;return}}function kh(e){if(e.includes("{"))return!1;let t=0,n=0;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);if(t!==0){if(i===t&&e.charCodeAt(r-1)!==92)t=0;continue}if(i===34||i===39||i===96){t=i;continue}if(i===59&&++n>=2)return!0}return!1}function wh(e){if(!xh.test(e))return e.trimEnd();let t="",n=null,r=!1;for(let i=0;i<e.length;i++){let o=e[i],s=e[i-1];if(n){if(t+=o,n==="double"&&o==='"'&&s!=="\\"||n==="single"&&o==="'"&&s!=="\\"||n==="template"&&o==="`"&&s!=="\\")n=null;r=!1;continue}if(o==='"'||o==="'"||o==="`"){n=o==='"'?"double":o==="'"?"single":"template",t+=o,r=!1;continue}if(Hc.test(o)){if(!r&&t.length>0)t+=" ",r=!0;continue}t+=o,r=!1}return t.trimEnd()}function qc(e,t){let n=e[t],r=e.indexOf(n,t+1);while(r!==-1&&e.charCodeAt(r-1)===92)r=e.indexOf(n,r+1);return r}function Uc(e,t){let n=e.indexOf("*/",t+1);return n===-1?-1:n+1}function Nh(e){let t=new Map,n=[],r=bh,i=0;while(i<e.length){if(r.lastIndex=i,!r.test(e))break;i=r.lastIndex-1;let o=e.charCodeAt(i);if(o===47){if(e.charCodeAt(i+1)===42){let s=Uc(e,i);if(s===-1)break;i=s}}else if(o===34||o===39||o===96){let s=qc(e,i);if(s===-1)break;i=s}else if(o===123)n.push(i);else if(o===125&&n.length>0)t.set(n.pop(),i);i++}return t}function Dh(e,t,n){for(let r=t;r<n;r++)if(!es(e.charCodeAt(r)))return!1;return!0}function es(e){if(e<=32)return e===32||e>=9&&e<=13;if(e<160)return!1;return e===160||e===5760||e>=8192&&e<=8202||e===8232||e===8233||e===8239||e===8287||e===12288||e===65279}function Gc(e,t,n,r){let i=[],o=Th,s=t,c=t;while(c<n){if(o.lastIndex=c,!o.test(e))break;if(c=o.lastIndex-1,c>=n)break;let l=e.charCodeAt(c);if(l===47){if(e.charCodeAt(c+1)===42){let u=Uc(e,c);if(u===-1)break;c=u}c++;continue}if(l===34||l===39||l===96){let u=qc(e,c);if(u===-1)break;c=u+1;continue}if(l===123){let u=r.get(c);if(u===void 0||u>=n){c++;continue}if(s<c)i.push(e.slice(s,c));let f=c+1;if(Dh(e,f,u)){i.push("{}"),c=u+1,s=c;continue}let y=e.slice(f,u),g=e.charCodeAt(f)===10;if(!g&&!y.includes("/*")&&!kh(y)&&!Eh(Sh(i,200))){let b=Gc(e,f,u,r),P=b.trim();if(!P.includes(`
48
+ `)){let N=P.endsWith(";")?P.slice(0,-1):P,D=`{ ${wh(N)} }`;if(D.length<=120){i.push(D),c=u+1,s=c;continue}}if(i.push("{"),b.charCodeAt(0)!==59)i.push(`
49
+ `);if(b.length>0)i.push(b);c=u,s=u;continue}if(i.push("{"),!g)i.push(`
50
+ `);c=f,s=f;continue}if(l===125){if(s<c)i.push(e.slice(s,c));if(Ph(i),!vh(i))i.push(`
51
+ `);i.push("}"),c++,s=c;continue}if(s<c)i.push(e.slice(s,c));if(Ah(i),i.push(";"),e.charCodeAt(c+1)!==10)i.push(`
52
+ `);c++,s=c}if(s<n)i.push(e.slice(s,n));return i.join("")}function _h(e){return Gc(e,0,e.length,Nh(e))}function Ih(e){if(!e.includes(" "))return e;let t="",n=0;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);if(n!==0){if(t+=e[r],i===n&&e.charCodeAt(r-1)!==92)n=0;continue}if(i===34||i===39||i===96){n=i,t+=e[r];continue}if(i===32&&t.charCodeAt(t.length-1)===32)continue;t+=e[r]}return t}function Lh(e){return e===125||e===93||e===41||e===62}function Rh(e,t,n){return n-t>=3&&e.charCodeAt(t)===47&&e.charCodeAt(t+1)===42&&e.charCodeAt(t+2)===42}function jc(e,t,n){let r=e.indexOf("*/",t);return r!==-1&&r+2<=n}function Mh(e,t,n){let r=e.charCodeAt(t);if(r===124||r===38)return!0;return r===46&&t+1<n&&e.charCodeAt(t+1)!==46}function Oh(e){let t=[],n=[],r=e.length,i=0,o=!1,s=0,c=0;while(c<=r){let f=e.indexOf(`
53
+ `,c);if(f===-1)f=r;let y=f+1,g=c,b=f;while(g<b&&es(e.charCodeAt(g)))g++;while(b>g&&es(e.charCodeAt(b-1)))b--;if(g===b){let v=n.length>0?n[n.length-1]:void 0;if(v!==void 0&&v!==""){let w=v.charCodeAt(v.length-1);if(w!==123&&w!==40&&w!==91)t.push(0),n.push("")}c=y;continue}if(o){if(t.push(s),n.push(` ${e.slice(g,b)}`),jc(e,g,b))o=!1;c=y;continue}let P=Rh(e,g,b),N=P&&jc(e,g,b);if(P&&!N){t.push(i),n.push(e.slice(g,b)),o=!0,s=i,c=y;continue}let D=Lh(e.charCodeAt(g)),j=Math.max(0,i-(D?1:0))+(Mh(e,g,b)?1:0);if(D&&j===0&&n.length>0&&n[n.length-1]==="")t.pop(),n.pop();if(t.push(j),n.push(Ih(e.slice(g,b))),c=y,N)continue;let U=0;for(let v=g;v<b;v++){let w=e.charCodeAt(v);if(U!==0){if(w===U&&e.charCodeAt(v-1)!==92)U=0;continue}if(w===34||w===39||w===96)U=w;else if(w===123||w===40||w===91||w===60)i++;else if(w===125||w===41||w===93)i=Math.max(0,i-1);else if(w===62&&e.charCodeAt(v-1)!==61)i=Math.max(0,i-1)}}let l=n.length;while(l>0&&n[l-1]==="")l--;let u=[];for(let f=0;f<l;f++){if(f>0)u.push(`
54
+ `);let y=t[f];if(y>0)u.push(Ch(y));u.push(n[f])}return u.join("")}function Wc(e){return`${Oh(_h(e))}
55
+ `}var it="any",$e="",Bh="Record<string, any>",rs="Record<string, never>",xr=/^[A-Za-z_$][A-Za-z0-9_$]*$/,Fh=/CustomEvent/,$h=/^[A-Z]/,Vh=/\n/,Yc=/=>/,jh=/(?:^|\n)@default\b/,is=/\n/g,Hh=/^([ \t]*\*) +$/gm,qh=/\s+/g,nn=/(^|[^.\w])Snippet(?:\s*<|\b)/,Uh=/import\s+type\s+[^;]*\bSnippet\b[^;]*from\s+"svelte";/,Gh=/[.*+?^${}()|[\]\\]/g,Wh=/^const\s+/,Kh=/\{name\}/g,zh=/^export /,Jh=/[^\w$]/g;function ss(e){return e.replace(Wh,"")}function Xh(e){if(!e)return;return e.replace(is,`
56
+ * `)}function br(e){if(!e)return"";return`/** ${ft(e)} */`}function Tr(e){if(!e)return"";return`/**
57
+ * ${ft(e).replace(is,`
55
58
  * `)}
56
- */`}function nc(e){if(e===void 0)return;return e===!0?"@deprecated":`@deprecated ${e}`}function yf(e){let t=nc(e);if(t===void 0)return;return`* ${t.replace(bi,`
59
+ */`}function Qc(e){if(e===void 0)return;return e===!0?"@deprecated":`@deprecated ${e}`}function Yh(e){let t=Qc(e);if(t===void 0)return;return`* ${t.replace(is,`
57
60
  * `)}
58
- `}function gf(e,t){if(!t)return[`@${e}`];if(!t.includes(`
61
+ `}function Qh(e,t){if(!t)return[`@${e}`];if(!t.includes(`
59
62
  `))return[`@${e} ${t}`];return[`@${e}`,...t.split(`
60
- `)]}function Ei(e){let t=[];for(let{name:n,body:r}of e??[])t.push(...gf(n,r));return t}function ln(e,t,n){let r=nc(n),i=Ei(t),o=i.length>0;if(!e&&!o&&!r)return"";if(!o&&!r)return e?.includes(`
61
- `)?Wn(e):Gn(e);let s=[];if(e)s.push(...e.split(`
62
- `));if(s.push(...i),r)s.push(...r.split(`
63
+ `)]}function as(e){let t=[];for(let{name:n,body:r}of e??[])t.push(...Qh(n,r));return t}function On(e,t,n,r){if(r==="none")return"";let i=Qc(n),o=r==="all"?as(t):[],s=o.length>0;if(!e&&!s&&!i)return"";if(!s&&!i)return e?.includes(`
64
+ `)?Tr(e):br(e);let c=[];if(e)c.push(...e.split(`
65
+ `));if(c.push(...o),i)c.push(...i.split(`
63
66
  `));return`/**
64
- * ${s.join(`
65
- * `)}
66
- */`}function xf(e){let t=Ei(e);if(t.length===0)return"";return t.map((n)=>`* ${n}
67
- `).join("")}function Kn(e){if(e===void 0)return ot;return`${e}
68
- `}function zn(e,t={export:!0},n="all"){if(e.typedefs.length===0)return Re;let r=t.export?"export ":"";return e.typedefs.map((i)=>{let o=Re;if(n!=="none"){let s=n==="all"?Ei(i.tags):[];if(s.length===0)o=i.description?`${Wn(i.description)}
69
- `:"";else o=`/**
70
- * ${(i.description?[...i.description.split(`
71
- `),...s]:s).join(`
72
- * `)}
67
+ * ${ft(c.join(`
68
+ * `))}
69
+ */`}function Zh(e){let t=as(e);if(t.length===0)return"";return t.map((n)=>`* ${n}
70
+ `).join("")}function Er(e){if(e===void 0)return it;return`${e}
71
+ `}function Cr(e,t={export:!0},n="all"){if(e.typedefs.length===0)return $e;let r=t.export?"export ":"";return e.typedefs.map((i)=>{let o=$e;if(n!=="none"){let s=n==="all"?as(i.tags):[];if(s.length===0)o=i.description?`${Tr(i.description)}
72
+ `:"";else{let c=i.description?[...i.description.split(`
73
+ `),...s]:s;o=`/**
74
+ * ${ft(c.join(`
75
+ * `))}
73
76
  */
74
- `}return`${o}${r}${i.ts}`}).join(`
77
+ `}}return`${o}${r}${i.ts}`.replace(Hh,"$1")}).join(`
75
78
 
76
- `)}var Yo=new Map;function rc(e,t){let n=Yo.get(t);if(n===void 0){let r=t.replace(df,"\\$&");n=new RegExp(`\\b${r}\\b`),Yo.set(t,n)}return n.test(e)}var Qo,Zo=[];function Si(e){if(e!==Qo)Qo=e,Zo=Qe(e);return Zo}function bf(e){if(e===null)return[];return e[0].split(",").map((t,n)=>({name:t.trim(),constraint:(Si(e[1]??"")[n]??t).trim()}))}function Tf(e,t){let n=bf(e).filter(({name:r})=>rc(t,r));if(n.length===0)return{declSuffix:Re,refSuffix:Re};return{declSuffix:`<${n.map(({constraint:r})=>Ti(r)).join(", ")}>`,refSuffix:`<${n.map(({name:r})=>r).join(", ")}>`}}function ic(e,t={export:!0},n="all"){if(!e.contexts||e.contexts.length===0)return Re;let r=t.export?"export ":"",i=e.generics===null?[]:e.generics[0].split(",").map((o,s)=>({name:o.trim(),constraint:(Si(e.generics?.[1]??"")[s]??o).trim()}));return e.contexts.map((o)=>{let s=o.properties.map((g)=>{let b=n!=="none"&&g.description?`${Gn(g.description)}
77
- `:"",E=g.optional?"?":"";return`${b}${g.name}${E}: ${g.type};`}).join(`
78
- `),p=n!=="none"&&o.description?`${Wn(o.description)}
79
- `:"",l=i.filter(({name:g})=>o.properties.some((b)=>rc(b.type,g))).map(({constraint:g})=>g),h=l.length>0?`<${l.map(Ti).join(", ")}>`:"";if(o.properties.length===0)return o.hasUnresolvedSpread?`${p}${r}type ${o.typeName} = Record<string, any>;`:`${p}${r}type ${o.typeName} = Record<string, never>;`;let d=o.hasUnresolvedSpread?" & Record<string, any>":"";return`${p}${r}type ${o.typeName}${h} = {
79
+ `)}var Kc=new Map;function ts(e,t){let n=Kc.get(t);if(n===void 0){let r=t.replace(Gh,"\\$&");n=new RegExp(`\\b${r}\\b`),Kc.set(t,n)}return n.test(e)}var zc,Jc=[];function os(e){if(e!==zc)zc=e,Jc=lt(e);return Jc}function em(e){if(e===null)return[];return e[0].split(",").map((t,n)=>({name:t.trim(),constraint:(os(e[1]??"")[n]??t).trim()}))}function tm(e,t){let n=em(e).filter(({name:r})=>ts(t,r));if(n.length===0)return{declSuffix:$e,refSuffix:$e};return{declSuffix:`<${n.map(({constraint:r})=>ss(r)).join(", ")}>`,refSuffix:`<${n.map(({name:r})=>r).join(", ")}>`}}function Zc(e,t={export:!0},n="all"){if(!e.contexts||e.contexts.length===0)return $e;let r=t.export?"export ":"",i=e.generics===null?[]:e.generics[0].split(",").map((o,s)=>({name:o.trim(),constraint:(os(e.generics?.[1]??"")[s]??o).trim()}));return e.contexts.map((o)=>{let s=o.properties.map((y)=>{let g=n!=="none"&&y.description?`${br(y.description)}
80
+ `:"",b=y.optional?"?":"";return`${g}${y.name}${b}: ${y.type};`}).join(`
81
+ `),c=n!=="none"&&o.description?`${Tr(o.description)}
82
+ `:"",l=i.filter(({name:y})=>o.type!==void 0&&ts(o.type,y)||o.properties.some((g)=>ts(g.type,y))).map(({constraint:y})=>y),u=l.length>0?`<${l.map(ss).join(", ")}>`:"";if(o.type!==void 0)return`${c}${r}type ${o.typeName}${u} = ${o.type};`;if(o.properties.length===0)return o.hasUnresolvedSpread?`${c}${r}type ${o.typeName} = Record<string, any>;`:`${c}${r}type ${o.typeName} = Record<string, never>;`;let f=o.hasUnresolvedSpread?" & Record<string, any>":"";return`${c}${r}type ${o.typeName}${u} = {
80
83
  ${s}
81
- }${d};`}).join(`
82
-
83
- `)}function Vt(e){return xi.test(e)?e:JSON.stringify(e)}function sc(e,t){if(!e)return;return`* ${t||e}
84
- `}function Xn(e,t,n,r="all"){if(r==="none")return Re;return[sc(mf(e)),yf(t),r==="all"?xf(n):void 0].filter(Boolean).join("")}function un(e){return e.length>0?`/**
85
- ${e}*/`:Re}function Ef(e,t={export:!0},n="all"){let r=t.export?"export ":"",i=e.props.filter((P)=>!P.isFunctionDeclaration&&P.kind!=="const"),o=new Set([...i.map((P)=>P.name),...Array.from(e.canonicalPropNames??[])]),s=i.map((P)=>{let B=typeof P.value==="string"?P.value.replace(lf," "):P.value,ae=pf.test(P.description??"")||P.value===void 0,Q=[Xn(P.description,P.deprecated,P.tags,n),n==="all"?sc(P.constant,"@constant"):null,n==="all"&&!ae?`* @default ${B}
86
- `:null].filter(Boolean).join(""),te=P.constant&&!P.isFunction?P.value:P.type||ot;return`
87
- ${un(Q)}
88
- ${Vt(P.name)}${P.isRequired?"":"?"}: ${te};`}),p=e.canonicalPropsType?s.filter((P,B)=>{let R=i[B];return R?!(e.canonicalPropNames?.has(R.name)??!1):!0}):s,l=(e.slots||[]).filter((P)=>!P.default&&P.name!=null&&!o.has(P.name)).map((P)=>{let B=P.name,R=Vt(B),ae=ln(P.description,P.tags,P.deprecated),Q=ae?`${ae}
89
- `:"",a=P.slot_props&&P.slot_props!=="Record<string, never>"?`(this: void, ...args: [${P.slot_props}]) => void`:"(this: void) => void";return`
90
- ${Q}${R}?: ${a};`}),h=(e.slots||[]).find((P)=>P.default||P.name===null),d=h&&!o.has("children")?(()=>{let P=ln(h.description,h.tags,h.deprecated),B=P?`${P}
91
- `:"",ae=h.slot_props&&h.slot_props!=="Record<string, never>"?`(this: void, ...args: [${h.slot_props}]) => void`:"(this: void) => void";return`
92
- ${B}children?: ${ae};`})():"",g=e.events?kf({events:e.events},o):[],b=[...l,d,...g].filter(Boolean),E=[...p,...b].join(`
93
- `),w=Vf(e.moduleName,t.typeNames),N=Re,D=e.generics?`<${Si(e.generics[1]).map((P)=>Ti(P.trim())).join(", ")}>`:"",q=e.generics?`<${e.generics[0]}>`:"",W=e.canonicalPropsType?`
94
- type $Props${D} = ${e.canonicalPropsType}${E.trim()===""?"":` & {${E}
84
+ }${f};`}).join(`
85
+
86
+ `)}function _t(e){return xr.test(e)?e:JSON.stringify(e)}function ep(e,t){if(!e)return;return`* ${t||e}
87
+ `}function rn(e,t,n,r="all"){if(r==="none")return $e;return[ep(Xh(e)),Yh(t),r==="all"?Zh(n):void 0].filter(Boolean).join("")}function $t(e){return e.length>0?`/**
88
+ ${ft(e)}*/`:$e}function nm(e,t={export:!0},n="all"){let r=t.export?"export ":"",i=e.props.filter((v)=>!v.isFunctionDeclaration&&v.kind!=="const"),o=new Set([...i.map((v)=>v.name),...Array.from(e.canonicalPropNames??[])]),s=i.map((v)=>{let w=typeof v.value==="string"?v.value.replace(qh," "):v.value,G=jh.test(v.description??"")||v.value===void 0,X=[rn(v.description,v.deprecated,v.tags,n),n==="all"?ep(v.constant,"@constant"):null,n==="all"&&!G?`* @default ${w}
89
+ `:null].filter(Boolean).join(""),be=v.constant&&!v.isFunction?v.value:v.type||it;return`
90
+ ${$t(X)}
91
+ ${_t(v.name)}${v.isRequired?"":"?"}: ${be};`}),c=e.canonicalPropsType?s.filter((v,w)=>{let M=i[w];return M?!(e.canonicalPropNames?.has(M.name)??!1):!0}):s,l=(e.slots||[]).filter((v)=>!v.default&&v.name!=null&&!o.has(v.name)).map((v)=>{let w=v.name,M=_t(w),G=On(v.description,v.tags,v.deprecated,n),X=G?`${G}
92
+ `:"",a=v.slot_props&&v.slot_props!=="Record<string, never>"?`(this: void, ...args: [${v.slot_props}]) => void`:"(this: void) => void";return`
93
+ ${X}${M}?: ${a};`}),u=(e.slots||[]).find((v)=>v.default||v.name===null),f=u&&!o.has("children")?(()=>{let v=On(u.description,u.tags,u.deprecated,n),w=v?`${v}
94
+ `:"",G=u.slot_props&&u.slot_props!=="Record<string, never>"?`(this: void, ...args: [${u.slot_props}]) => void`:"(this: void) => void";return`
95
+ ${w}children?: ${G};`})():"",y=e.events?cm({events:e.events},o,n):[],g=[...l,f,...y].filter(Boolean),b=[...c,...g].join(`
96
+ `),P=Cm(e.moduleName,t.typeNames),N=$e,D=e.generics?`<${os(e.generics[1]).map((v)=>ss(v.trim())).join(", ")}>`:"",j=e.generics?`<${e.generics[0]}>`:"",U=e.canonicalPropsType?`
97
+ type $Props${D} = ${e.canonicalPropsType}${b.trim()===""?"":` & {${b}
95
98
  }`};
96
99
  `:`
97
100
  type $Props${D} = {
98
- ${E}
101
+ ${b}
99
102
  };
100
- `;if(e.rest_props?.type==="Element"){let P;if(e.rest_props.name==="svelte:element")if(e.rest_props.thisValue)P=`SvelteHTMLElements["${e.rest_props.thisValue}"]`;else P="HTMLAttributes<HTMLElement>";else P=e.rest_props.name.split("|").map((ae)=>`SvelteHTMLElements["${ae.trim()}"]`).join(" & ");let B="[key: `data-${string}`]: unknown;",R=e.rest_props.description?e.rest_props.description.includes(`
101
- `)?`${Wn(e.rest_props.description)}
102
- `:`${Gn(e.rest_props.description)}
103
+ `;if(e.rest_props?.type==="Element"){let v;if(e.rest_props.name==="svelte:element")if(e.rest_props.thisValue)v=`SvelteHTMLElements["${e.rest_props.thisValue}"]`;else v="HTMLAttributes<HTMLElement>";else v=e.rest_props.name.split("|").map((G)=>`SvelteHTMLElements["${G.trim()}"]`).join(" & ");let w="[key: `data-${string}`]: unknown;",M=n!=="none"&&e.rest_props.description?e.rest_props.description.includes(`
104
+ `)?`${Tr(e.rest_props.description)}
105
+ `:`${br(e.rest_props.description)}
103
106
  `:"";if(e.extends===void 0)N=`
104
- ${R}${P?`type $RestProps = ${P};
107
+ ${M}${v?`type $RestProps = ${v};
105
108
  `:""}
106
- ${e.canonicalPropsType?`type $Props${D} = (${e.canonicalPropsType}) & {${E}
109
+ ${e.canonicalPropsType?`type $Props${D} = (${e.canonicalPropsType}) & {${b}
107
110
 
108
- ${B}
111
+ ${w}
109
112
  };`:`type $Props${D} = {
110
- ${E}
113
+ ${b}
111
114
 
112
- ${B}
115
+ ${w}
113
116
  };`}
114
117
 
115
- ${r}type ${w}${D} = Omit<$RestProps, keyof $Props${q}> & $Props${q};
118
+ ${r}type ${P}${D} = Omit<$RestProps, keyof $Props${j}> & $Props${j};
116
119
  `;else N=`
117
- ${R}${P?`type $RestProps = ${P};
120
+ ${M}${v?`type $RestProps = ${v};
118
121
  `:""}
119
- ${e.canonicalPropsType?`type $Props${D} = (${e.canonicalPropsType}) & {${E}
122
+ ${e.canonicalPropsType?`type $Props${D} = (${e.canonicalPropsType}) & {${b}
120
123
 
121
- ${B}
124
+ ${w}
122
125
  };`:`type $Props${D} = {
123
- ${E}
126
+ ${b}
124
127
 
125
- ${B}
128
+ ${w}
126
129
  };`}
127
130
 
128
- ${r}type ${w}${D} = Omit<$RestProps, keyof ($Props${q} & ${e.extends.interface})> & Omit<${e.extends.interface}, keyof $Props${q}> & $Props${q};
129
- `}else if(E.trim()===""&&e.extends===void 0&&!e.canonicalPropsType)N=`
130
- ${r}type ${w}${D} = ${gi};
131
+ ${r}type ${P}${D} = Omit<$RestProps, keyof ($Props${j} & ${e.extends.interface})> & Omit<${e.extends.interface}, keyof $Props${j}> & $Props${j};
132
+ `}else if(b.trim()===""&&e.extends===void 0&&!e.canonicalPropsType)N=`
133
+ ${r}type ${P}${D} = ${rs};
131
134
  `;else if(e.canonicalPropsType)N=`
132
- ${W}
133
- ${r}type ${w}${D} = ${e.extends===void 0?"":`Omit<${e.extends.interface}, keyof $Props${q}> & `}$Props${q};
134
- `;else if(e.extends===void 0)N=t.propsDeclaration==="interface"&&E.trim()!==""?`
135
- ${r}interface ${w}${D} {
136
- ${E}
135
+ ${U}
136
+ ${r}type ${P}${D} = ${e.extends===void 0?"":`Omit<${e.extends.interface}, keyof $Props${j}> & `}$Props${j};
137
+ `;else if(e.extends===void 0)N=t.propsDeclaration==="interface"&&b.trim()!==""?`
138
+ ${r}interface ${P}${D} {
139
+ ${b}
137
140
  }
138
141
  `:`
139
- ${r}type ${w}${D} = {
140
- ${E}
142
+ ${r}type ${P}${D} = {
143
+ ${b}
141
144
  };
142
145
  `;else N=`
143
146
  type $Props${D} = {
144
- ${E}
147
+ ${b}
145
148
  };
146
149
 
147
- ${r}type ${w}${D} = Omit<${e.extends.interface}, keyof $Props${q}> & $Props${q};
148
- `;return{props_name:w,prop_def:N}}function Sf(e){if(e.slots.length===0)return gi;let t=e.slots.map(({name:n,slot_props:r,...i})=>{let o=i.default||n===null?"default":Vt(n??""),s=ln(i.description,i.tags,i.deprecated);return`${s?`${s}
149
- `:""}${o}: ${Kn(r)};`}).join(`
150
- `);return e.slots.length===1?`{${t}}`:`{
151
- ${t}
152
- }`}var Cf=()=>"WindowEventMap",vf=new Set(["click","dblclick","mousedown","mouseup","mousemove","mouseover","mouseout","mouseenter","mouseleave","contextmenu","wheel","keydown","keyup","keypress","submit","change","input","focus","blur","focusin","focusout","reset","select","touchstart","touchend","touchmove","touchcancel","drag","dragstart","dragend","dragover","dragenter","dragleave","drop","pointerdown","pointerup","pointermove","pointerover","pointerout","pointerenter","pointerleave","pointercancel","gotpointercapture","lostpointercapture","play","pause","ended","volumechange","timeupdate","loadeddata","loadedmetadata","canplay","canplaythrough","seeking","seeked","playing","waiting","stalled","suspend","abort","error","emptied","ratechange","durationchange","loadstart","progress","loadend","animationstart","animationend","animationiteration","animationcancel","transitionstart","transitionend","transitionrun","transitioncancel","scroll","resize","load","unload","beforeunload","cut","copy","paste","compositionstart","compositionupdate","compositionend"]);function yi(e=ot){if(af.test(e))return e;return`CustomEvent<${e}>`}function Af(e){return vf.has(e)}function ac(e){switch(e.type){case"dispatched":return yi(e.detail);case"forwarded":{let t=e.element,r=!(t&&of.test(t))||Af(e.name),i=e.detail!==void 0&&e.detail!=="undefined"&&!(e.detail==="null"&&r),o=e.detail==="null"&&!r;if(i||o)return yi(e.detail);else if(r)return`${Cf()}["${e.name}"]`;else return yi()}default:return e}}function Pf(e){if(e.events.length===0)return sf;let t=e.events.map((n)=>{let r="",i=ln(n.description,n.tags,n.deprecated);if(i)r=`${i}
153
- `;return`${r}${Vt(n.name)}: ${ac(n)};
154
- `}).join("");return e.events.length===1?`{${t}}`:`{
155
- ${t}}`}function kf(e,t){return e.events.map((n)=>{let r=`on${n.name}`;if(t.has(r))return;let i="",o=ln(n.description,n.tags,n.deprecated);if(o)i=`${o}
150
+ ${r}type ${P}${D} = Omit<${e.extends.interface}, keyof $Props${j}> & $Props${j};
151
+ `;return{props_name:P,prop_def:N}}function rm(e,t="all"){if(e.slots.length===0)return rs;let n=e.slots.map(({name:r,slot_props:i,...o})=>{let s=o.default||r===null?"default":_t(r??""),c=On(o.description,o.tags,o.deprecated,t);return`${c?`${c}
152
+ `:""}${s}: ${Er(i)};`}).join(`
153
+ `);return e.slots.length===1?`{${n}}`:`{
154
+ ${n}
155
+ }`}var im=()=>"WindowEventMap",sm=new Set(["click","dblclick","mousedown","mouseup","mousemove","mouseover","mouseout","mouseenter","mouseleave","contextmenu","wheel","keydown","keyup","keypress","submit","change","input","focus","blur","focusin","focusout","reset","select","touchstart","touchend","touchmove","touchcancel","drag","dragstart","dragend","dragover","dragenter","dragleave","drop","pointerdown","pointerup","pointermove","pointerover","pointerout","pointerenter","pointerleave","pointercancel","gotpointercapture","lostpointercapture","play","pause","ended","volumechange","timeupdate","loadeddata","loadedmetadata","canplay","canplaythrough","seeking","seeked","playing","waiting","stalled","suspend","abort","error","emptied","ratechange","durationchange","loadstart","progress","loadend","animationstart","animationend","animationiteration","animationcancel","transitionstart","transitionend","transitionrun","transitioncancel","scroll","resize","load","unload","beforeunload","cut","copy","paste","compositionstart","compositionupdate","compositionend"]);function Mn(e=it){if(Fh.test(e))return e;return`CustomEvent<${e}>`}function am(e){return sm.has(e)}function tp(e){switch(e.type){case"dispatched":return Mn(e.detail);case"forwarded":{let t=e.element,r=!(t&&$h.test(t))||am(e.name),i=e.detail!==void 0&&e.detail!=="undefined"&&!(e.detail==="null"&&r),o=e.detail==="null"&&!r;if(i||o)return Mn(e.detail);else if(r)return`${im()}["${e.name}"]`;else return Mn()}default:return e}}function om(e,t="all"){if(e.events.length===0)return Bh;let n=e.events.map((r)=>{let i="",o=On(r.description,r.tags,r.deprecated,t);if(o)i=`${o}
156
+ `;return`${i}${_t(r.name)}: ${tp(r)};
157
+ `}).join("");return e.events.length===1?`{${n}}`:`{
158
+ ${n}}`}function cm(e,t,n="all"){return e.events.map((r)=>{let i=`on${r.name}`;if(t.has(i))return;let o="",s=On(r.description,r.tags,r.deprecated,n);if(s)o=`${s}
156
159
  `;return`
157
- ${i}${Vt(r)}?: (event: ${ac(n)}) => void;`}).filter((n)=>n!==void 0)}function wf(e){let t=e.type==="() => any";if(e.type&&tc.test(e.type)&&!t)return e.type;else if(e.params&&e.params.length>0){let r=e.params.map((o)=>{let s=o.optional?"?":"";return`${o.name}${s}: ${o.type}`}).join(", "),i=e.returnType||ot;return`(${r}) => ${i}`}else if(e.returnType)return`() => ${e.returnType}`;else return e.type||ot}function oc(e,t="all"){return e.props.filter((n)=>n.isFunctionDeclaration||n.kind==="const").map((n)=>{let r=Xn(n.description,n.deprecated,n.tags,t),i=wf(n);return`
158
- ${un(r)}
159
- ${Vt(n.name)}: ${i};`}).join(`
160
- `)}function Nf(e,t={export:!0},n="all"){let r=t.export?"export ":"",i=$f(e.moduleName,t.typeNames),o=oc({props:e.props},n);if(o.trim()==="")return{exports_name:i,exports_ref:i,exports_def:`${r}type ${i} = ${gi};`};let{declSuffix:s,refSuffix:p}=Tf(e.generics,o);return{exports_name:i,exports_ref:`${i}${p}`,exports_def:`${r}type ${i}${s} = {${o}
161
- };`}}function _f(e){let t=e.props.filter((n)=>n.bindable===!0||n.binding==="writable").map((n)=>JSON.stringify(n.name));return t.length===0?Re:t.join(" | ")}function Df(e){let t=e.moduleName==="default"?"$$Component":e.moduleName,n=e.bindings===Re?'""':e.bindings;return`declare const ${t}: Component<
160
+ ${o}${_t(i)}?: (event: ${tp(r)}) => void;`}).filter((r)=>r!==void 0)}function pm(e){let t=e.type==="() => any";if(e.type&&Yc.test(e.type)&&!t)return e.type;else if(e.params&&e.params.length>0)return`(${Ct(e.params)}) => ${e.returnType||it}`;else if(e.returnType)return`() => ${e.returnType}`;else return e.type||it}function np(e,t="all"){return e.props.filter((n)=>n.isFunctionDeclaration||n.kind==="const").map((n)=>{let r=rn(n.description,n.deprecated,n.tags,t),i=pm(n);return`
161
+ ${$t(r)}
162
+ ${_t(n.name)}: ${i};`}).join(`
163
+ `)}function lm(e,t={export:!0},n="all"){let r=t.export?"export ":"",i=Sm(e.moduleName,t.typeNames),o=np({props:e.props},n);if(o.trim()==="")return{exports_name:i,exports_ref:i,exports_def:`${r}type ${i} = ${rs};`};let{declSuffix:s,refSuffix:c}=tm(e.generics,o);return{exports_name:i,exports_ref:`${i}${c}`,exports_def:`${r}type ${i}${s} = {${o}
164
+ };`}}function um(e){let t=e.props.filter((n)=>n.bindable===!0||n.binding==="writable").map((n)=>JSON.stringify(n.name));return t.length===0?$e:t.join(" | ")}function cs(e){return e==="default"?"$$Component":e}function dm(e){let t=cs(e.moduleName),n=e.bindings===$e?'""':e.bindings;return`declare const ${t}: Component<
162
165
  ${e.propsRef},
163
166
  ${e.exportsRef},
164
167
  ${n}
165
168
  >;
166
- export default ${t};`}function If(e){let t=e.moduleName==="default"?"$$Component":e.moduleName,n=`${t}Component`,r=e.bindings===Re?'""':e.bindings;return`interface ${n} {
169
+ export default ${t};`}function fm(e){let t=cs(e.moduleName),n=`${t}Component`,r=e.bindings===$e?'""':e.bindings;return`interface ${n} {
167
170
  new ${e.generic}(
168
171
  options: ComponentConstructorOptions<${e.propsRef}>
169
172
  ): SvelteComponent<${e.propsRef}> & ${e.exportsRef};
@@ -179,66 +182,91 @@ ${t}}`}function kf(e,t){return e.events.map((n)=>{let r=`on${n.name}`;if(t.has(r
179
182
  z_$$bindings?: ${r};
180
183
  }
181
184
  declare const ${t}: ${n};
182
- export default ${t};`}function Lf(e){if(e.extends===void 0)return"";return`import type { ${e.extends.interface} } from ${e.extends.import};`}function Rf(e,t="all"){if(t==="none"||!e.componentComment)return"";if(!cf.test(e.componentComment))return Gn(e.componentComment.trim());return`/*${e.componentComment.split(`
185
+ export default ${t};`}function hm(e){if(e.extends===void 0)return"";return`import type { ${e.extends.interface} } from ${e.extends.import};`}function mm(e,t="all"){if(t==="none"||!e.componentComment)return"";if(!Vh.test(e.componentComment))return br(e.componentComment.trim());return`/*${ft(e.componentComment).split(`
183
186
  `).map((n)=>`* ${n}`).join(`
184
187
  `)}
185
- */`}function ec(e){return xi.test(e)?e:JSON.stringify(e)}function Mf(e,t){let n=[],r=new Map;for(let i of e.moduleExports){if(i.kind!=="re-export"||!i.reExport)continue;let{from:o,imported:s}=i.reExport,p=Xn(i.description,i.deprecated,i.tags,t),l=ec(i.name);if(s==="*"){let g=i.name==="*"?"*":`* as ${l}`;n.push(`${un(p)}
186
- export ${g} from ${JSON.stringify(o)};`);continue}let h=`${o}\x00${p}`,d=r.get(h);if(!d)d={comments:p,from:o,specifiers:[]},r.set(h,d),n.push(h);d.specifiers.push(s===i.name?l:`${ec(s)} as ${l}`)}return n.map((i)=>{let o=r.get(i);if(!o)return i;return`${un(o.comments)}
188
+ */`}function ns(e){return xr.test(e)?e:JSON.stringify(e)}function ym(e,t){let n=[],r=new Map;for(let i of e.moduleExports){if(i.kind!=="re-export"||!i.reExport)continue;let{from:o,imported:s}=i.reExport,c=rn(i.description,i.deprecated,i.tags,t),l=ns(i.name);if(s==="*"){let y=i.name==="*"?"*":`* as ${l}`;n.push(`${$t(c)}
189
+ export ${y} from ${JSON.stringify(o)};`);continue}let u=`${o}\x00${c}`,f=r.get(u);if(!f)f={comments:c,from:o,specifiers:[]},r.set(u,f),n.push(u);f.specifiers.push(s===i.name?l:`${ns(s)} as ${l}`)}return n.map((i)=>{let o=r.get(i);if(!o)return i;return`${$t(o.comments)}
187
190
  export { ${o.specifiers.join(", ")} } from ${JSON.stringify(o.from)};`}).join(`
188
191
 
189
- `)}function Of(e,t="all"){let n=Mf(e,t),r=e.moduleExports.filter((i)=>i.kind!=="re-export").map((i)=>{let o=Xn(i.description,i.deprecated,i.tags,t),s,p=i.type&&tc.test(i.type),l=i.type==="() => any",h=i.typeParameters?`<${i.typeParameters}>`:"";if(i.kind==="const"&&!p)s=`export declare const ${i.name}: ${i.type||ot};
190
- `;else if(i.params&&i.params.length>0){let g=i.params.map((E)=>{let w=E.optional?"?":"";return`${E.name}${w}: ${E.type}`}).join(", "),b=i.returnType||ot;s=`export declare function ${i.name}${h}(${g}): ${b};`}else if(i.returnType)s=`export declare function ${i.name}${h}(): ${i.returnType};`;else if(p&&i.type&&!l){let[d,g,...b]=i.type.split("=>"),E=b.map((w)=>` => ${w.trim()}`).join("");s=`export declare function ${i.name}${d.trimEnd()}: ${g.trim()}${E};`}else if(p&&i.type){let[d,g,...b]=i.type.split("=>"),E=b.map((w)=>` => ${w.trim()}`).join("");s=`export declare function ${i.name}${d.trimEnd()}: ${g.trim()}${E};`}else if(i.kind==="const")s=`export declare const ${i.name}: ${i.type||ot};
191
- `;else s=`export type ${i.name} = ${i.type||ot};`;return`
192
- ${un(o)}
193
- ${s}`}).join(`
194
- `);return[n,r].filter(Boolean).join(`
192
+ `)}function ps(e){let t=[e.static?"static ":"",e.abstract?"abstract ":"",e.readonly?"readonly ":""].join(""),n=e.optional?"?":"";if(e.kind==="property")return`${t}${_t(e.name)}${n}: ${e.type??it}`;let r=Ct(e.params??[]);if(e.kind==="constructor")return`constructor(${r})`;let i=e.typeParameters?`<${e.typeParameters}>`:"";return`${t}${_t(e.name)}${n}${i}(${r}): ${e.returnType??it}`}function gm(e,t,n){let r=e.localName??e.name,i=r!==e.name,o=`export { ${r}${i?` as ${ns(e.name)}`:""} };`;if(n.has(r))return o;n.add(r);let s=e.typeParameters?`<${e.typeParameters}>`:"",c=(e.members??[]).map((y)=>[$t(rn(y.description,y.deprecated,y.tags,t)),`${ps(y)};`].filter(Boolean).join(`
193
+ `)).join(`
195
194
 
196
- `)}var Bf=120;function Ff(e){let n=`export default class ${e.moduleName==="default"?"":e.moduleName}${e.generic} extends SvelteComponentTyped<`,r=[e.genericProps,e.events,e.slots];if(e.accessors.trim()===""&&r.every((i)=>!i.includes(`
197
- `))){let i=`${n}${r.join(", ")}> {}`;if(i.length<=Bf)return i}return`${n}
195
+ `),l=`${e.extends?` extends ${e.extends}`:""}${e.implements?.length?` implements ${e.implements.join(", ")}`:""}`,u=`${i?"":"export "}declare ${e.abstract?"abstract ":""}class ${r}${s}${l}`;return`
196
+ ${[$t(rn(e.description,e.deprecated,e.tags,t)),c?`${u} {
197
+ ${c}
198
+ }`:`${u} {}`,i?o:""].filter(Boolean).join(`
199
+ `)}`}function xm(e,t="all"){let n=ym(e,t),r=new Set,i=e.moduleExports.filter((o)=>o.kind!=="re-export").map((o)=>{if(o.kind==="class")return gm(o,t,r);let s=!xr.test(o.name),c=s?{...o,name:bm(o.name)}:o,l=rn(c.description,c.deprecated,c.tags,t),u,f=c.type&&Yc.test(c.type),y=c.type==="() => any",g=c.typeParameters?`<${c.typeParameters}>`:"";if(c.kind==="const"&&!f)u=`export declare const ${c.name}: ${c.type||it};
200
+ `;else if(c.params&&c.params.length>0)u=`export declare function ${c.name}${g}(${Ct(c.params)}): ${c.returnType||it};`;else if(c.returnType)u=`export declare function ${c.name}${g}(): ${c.returnType};`;else if(f&&c.type&&!y){let[b,P,...N]=c.type.split("=>"),D=N.map((j)=>` => ${j.trim()}`).join("");u=`export declare function ${c.name}${b.trimEnd()}: ${P.trim()}${D};`}else if(f&&c.type){let[b,P,...N]=c.type.split("=>"),D=N.map((j)=>` => ${j.trim()}`).join("");u=`export declare function ${c.name}${b.trimEnd()}: ${P.trim()}${D};`}else if(c.kind==="const")u=`export declare const ${c.name}: ${c.type||it};
201
+ `;else u=`export declare let ${c.name}: ${c.type||it};`;if(s)u=`${u.replace(zh,"").trimEnd()}
202
+ export { ${c.name} as ${JSON.stringify(o.name)} };`;return`
203
+ ${$t(l)}
204
+ ${u}`}).join(`
205
+ `);return[n,i].filter(Boolean).join(`
206
+
207
+ `)}function bm(e){return`__export_${e.replace(Jh,"_")}`}var Tm=120;function Em(e){let n=`export default class ${e.moduleName==="default"?"":e.moduleName}${e.generic} extends SvelteComponentTyped<`,r=[e.genericProps,e.events,e.slots];if(e.accessors.trim()===""&&r.every((i)=>!i.includes(`
208
+ `))){let i=`${n}${r.join(", ")}> {}`;if(i.length<=Tm)return i}return`${n}
198
209
  ${e.genericProps},
199
210
  ${e.events},
200
211
  ${e.slots}
201
212
  > {
202
213
  ${e.accessors}
203
- }`}function cc(e,t,n){let r=n.replace(hf,t);if(!n.includes("{name}")||!xi.test(r))throw Error(`sveld: typesOptions.typeNames.${e} must contain "{name}" and produce a valid identifier; got "${n}".`);return r}function Vf(e,t){return cc("props",e,t?.props??"{name}Props")}function $f(e,t){return cc("exports",e,t?.exports??"{name}Exports")}function jf(e,t,n){if(e===void 0||e===!0)return{...t};if(e===!1)return{props:!1,exports:!1,typedefs:!1,contexts:!1};return{props:e.props??n,exports:e.exports??n,typedefs:e.typedefs??n,contexts:e.contexts??n}}var Hf={props:!0,exports:!0,typedefs:!0,contexts:!0};function qf(e){let t=jf(e?.exportTypes,Hf,!0);if(e?.forceExportProps===!0)t.props=!0;return t}function Uf(e,t){let n=er(e),{moduleName:r,typedefs:i,generics:o,props:s,moduleExports:p,slots:l,events:h,rest_props:d,extends:g,componentComment:b,contexts:E,syntaxMode:w}=e,N=t?.format==="component",D=o!==null,q=qf(t),W=t?.comments??"all",{props_name:P,prop_def:B}=Ef({moduleName:r,props:s,rest_props:d,extends:g,generics:o,slots:l,canonicalPropNames:new Set(n?.canonicalPropNames??[]),canonicalPropsType:n?.canonicalPropsType,events:N&&w==="legacy"?h:void 0},{export:q.props,typeNames:t?.typeNames,propsDeclaration:t?.propsDeclaration},W),R=o?`<${o[1]}>`:"",ae=o?`${P}<${o[0]}>`:P,Q=Of({moduleExports:p},W),te=zn({typedefs:i},{export:q.typedefs},W),a=ic({contexts:E,generics:o},{export:q.contexts},W),c=new Set(t?.inlined?.droppedImportStatements??[]),u=(n?.typeImportStatements??[]).filter((F)=>!c.has(F)).join(`
204
- `),m=[...t?.inlined?.declarations??[],...n?.localTypeDeclarations??[]].join(`
214
+ }`}function Xc(e,t,n){let r=n.replace(Kh,t);if(!n.includes("{name}")||!xr.test(r))throw Error(`sveld: typesOptions.typeNames.${e} must contain "{name}" and produce a valid identifier; got "${n}".`);return r}function rp(e,t){let n=Xc("props",e,t?.props??"{name}Props"),r=Xc("exports",e,t?.exports??"{name}Exports");if(n===r)throw Error(`sveld: typesOptions.typeNames.props and typesOptions.typeNames.exports both produce "${n}" for component "${e}"; they must differ.`);let i=cs(e);for(let[o,s]of[["props",n],["exports",r]])if(s===i||s===`${i}Component`)throw Error(`sveld: typesOptions.typeNames.${o} produces "${s}" for component "${e}", which the .d.ts already declares for the component itself; use a different template.`);return{props:n,exports:r}}function Cm(e,t){return rp(e,t).props}function Sm(e,t){return rp(e,t).exports}function vm(e,t,n){if(e===void 0||e===!0)return{...t};if(e===!1)return{props:!1,exports:!1,typedefs:!1,contexts:!1};return{props:e.props??n,exports:e.exports??n,typedefs:e.typedefs??n,contexts:e.contexts??n}}var Pm={props:!0,exports:!0,typedefs:!0,contexts:!0};function Am(e){let t=vm(e?.exportTypes,Pm,!0);if(e?.forceExportProps===!0)t.props=!0;return t}function km(e,t){let n=wr(e),{moduleName:r,typedefs:i,generics:o,props:s,moduleExports:c,slots:l,events:u,rest_props:f,extends:y,componentComment:g,contexts:b,syntaxMode:P}=e,N=t?.format==="component",D=o!==null,j=Am(t),U=t?.comments??"all",{props_name:v,prop_def:w}=nm({moduleName:r,props:s,rest_props:f,extends:y,generics:o,slots:l,canonicalPropNames:new Set(n?.canonicalPropNames??[]),canonicalPropsType:n?.canonicalPropsType,events:N&&P==="legacy"?u:void 0},{export:j.props,typeNames:t?.typeNames,propsDeclaration:t?.propsDeclaration},U),M=o?`<${o[1]}>`:"",G=o?`${v}<${o[0]}>`:v,X=xm({moduleExports:c},U),be=Cr({typedefs:i},{export:j.typedefs},U),a=Zc({contexts:b,generics:o},{export:j.contexts},U),p=new Set(t?.inlined?.droppedImportStatements??[]),d=(n?.typeImportStatements??[]).filter((O)=>!p.has(O)).join(`
215
+ `),m=[...t?.inlined?.declarations??[],...n?.localTypeDeclarations??[],...n?.moduleTypeDeclarations??[]].join(`
205
216
 
206
- `),{exports_ref:T,exports_def:y}=N?Nf({props:s,moduleName:r,generics:o},{export:q.exports,typeNames:t?.typeNames},W):{exports_ref:Re,exports_def:Re},x=N?_f({props:s}):Re,C=!uf.test(u)&&(Ft.test(B)||Ft.test(Q)||Ft.test(te)||Ft.test(a)||Ft.test(m)||Ft.test(y)),v=d?.type==="Element"&&(d.name!=="svelte:element"||d.name==="svelte:element"&&d.thisValue),S=d?.type==="Element"&&d.name==="svelte:element"&&!d.thisValue,k=[N?D?`import type { SvelteComponent, ComponentConstructorOptions, ComponentInternals${C?", Snippet":""} } from "svelte";`:`import type { Component${C?", Snippet":""} } from "svelte";`:`import { SvelteComponentTyped${C?", type Snippet":""} } from "svelte";`,v?'import type { SvelteHTMLElements } from "svelte/elements";':"",S?'import type { HTMLAttributes } from "svelte/elements";':"",u,Lf({extends:g})].filter(Boolean).join(`
207
- `),_=N?D?If({moduleName:r,generic:R,propsRef:ae,exportsRef:T,bindings:x}):Df({moduleName:r,propsRef:ae,exportsRef:T,bindings:x}):Ff({moduleName:r,generic:R,genericProps:ae,events:Pf({events:h}),slots:Sf({slots:l}),accessors:oc({props:s},W)}),j=[Q,te,m,a,B,y,[Rf({componentComment:b},W),_].filter(Boolean).join(`
208
- `)].map((F)=>F.trim()).filter(Boolean).join(`
217
+ `),{exports_ref:E,exports_def:S}=N?lm({props:s,moduleName:r,generics:o},{export:j.exports,typeNames:t?.typeNames},U):{exports_ref:$e,exports_def:$e},k=N?um({props:s}):$e,x=!Uh.test(d)&&(nn.test(w)||nn.test(X)||nn.test(be)||nn.test(a)||nn.test(m)||nn.test(S)),C=f?.type==="Element"&&(f.name!=="svelte:element"||f.name==="svelte:element"&&f.thisValue),T=f?.type==="Element"&&f.name==="svelte:element"&&!f.thisValue,_=[N?D?`import type { SvelteComponent, ComponentConstructorOptions, ComponentInternals${x?", Snippet":""} } from "svelte";`:`import type { Component${x?", Snippet":""} } from "svelte";`:`import { SvelteComponentTyped${x?", type Snippet":""} } from "svelte";`,C?'import type { SvelteHTMLElements } from "svelte/elements";':"",T?'import type { HTMLAttributes } from "svelte/elements";':"",d,hm({extends:y})].filter(Boolean).join(`
218
+ `),A=N?D?fm({moduleName:r,generic:M,propsRef:G,exportsRef:E,bindings:k}):dm({moduleName:r,propsRef:G,exportsRef:E,bindings:k}):Em({moduleName:r,generic:M,genericProps:G,events:om({events:u},U),slots:rm({slots:l},U),accessors:np({props:s},U)}),I=[X,be,m,a,w,S,[mm({componentComment:g},U),A].filter(Boolean).join(`
219
+ `)].map((O)=>O.trim()).filter(Boolean).join(`
209
220
 
210
- `);return Jo([k,j].filter(Boolean).join(`
221
+ `);return Wc([_,I].filter(Boolean).join(`
211
222
 
212
- `))}var vi=/`/g,pc=/\s+/g,Xe="--",lc=`| Prop name | Required | Kind | Reactive | Binding | Type | Default value | Description |
223
+ `))}var ip=/`/g,sp=/\s+/g,st="--",ap=`| Prop name | Required | Kind | Reactive | Binding | Type | Default value | Description |
213
224
  | :- | :- | :- | :- | :- | :- | :- | :- |
214
- `,uc=`| Slot name | Default | Props | Fallback | Description |
225
+ `,op=`| Slot name | Default | Props | Fallback | Description |
215
226
  | :- | :- | :- | :- | :- |
216
- `,dc=`| Event name | Type | Detail | Description |
227
+ `,cp=`| Event name | Type | Detail | Description |
217
228
  | :- | :- | :- | :- |
218
- `,Ai=`| Name | Kind | Type | Description |
229
+ `,ds=`| Name | Kind | Type | Description |
219
230
  | :- | :- | :- | :- |
220
- `,fc=`| Part name | Description |
231
+ `,wm=`| Member | Signature | Description |
232
+ | :- | :- | :- |
233
+ `,pp=`| Part name | Description |
221
234
  | :- | :- |
222
- `,hc=`| Property name | Type | Default value | Description |
235
+ `,lp=`| Property name | Type | Default value | Description |
223
236
  | :- | :- | :- | :- |
224
- `,fn=/\|/g,Gf=/</g,Wf=/>/g,$t=/\n/g,Kf=/^[A-Za-z_$][\w$]*$/,zf=/\{@link\s+([^{}\s|]+)(?:\|([^{}]+))?\}/g;function Ci(e){return e.replace(zf,(t,n,r)=>`[${r===void 0?n:r.trim()}](${n})`)}function et(e){if(e===void 0)return Xe;return`<code>${e.replace(fn,"&#124;")}</code>`}function mc(e){if(!e.reExport)return et(e.type);let{from:t,imported:n}=e.reExport,r=n==="*"?"":Kf.test(n)?`.${n}`:`[${JSON.stringify(n)}]`;return et(`typeof import(${JSON.stringify(t)})${r}`)}function dn(e){return e.replace(Gf,"&lt;").replace(Wf,"&gt;")}function Pi(e){if(e===void 0)return Xe;return`<code>${e.replace(vi,"\\`").replace(fn,"&#124;")}</code>`}function jt(e,t){if(t===void 0)return e;let n=typeof t==="string"&&t.trim().length>0?`: ${dn(t).replace($t," ").replace(fn,"&#124;")}`:"";return`<s>${e}</s><br />**Deprecated**${n}`}function Jn(e){if(e===void 0||e.trim().length===0)return Xe;return dn(Ci(e)).replace(fn,"&#124;").replace($t,"<br />")}function yc(e){if(e===void 0||e==="{}")return Xe;return et(Kn(e).replace($t," "))}function gc(e){if(e===void 0)return Xe;return et(dn(e).replace($t,"<br />"))}function hn(e,t){let n=[];if(e!==void 0&&e.trim().length>0)n.push(dn(Ci(e)));for(let{name:r,body:i}of t??[]){let o=i?.trim();n.push(o?`@${r} ${dn(Ci(o))}`:`@${r}`)}if(n.length===0)return Xe;return n.join(`
225
- `).replace(fn,"&#124;").replace($t,"<br />")}function xc(e){if(e===void 0)return Xe;return et(e.replace($t," "))}function wi(e,t,n){if(e.append("h1","Component Index"),e.append("h2","Components").tableOfContents(),e.append("divider"),n&&n.length>0)Xf(e,n);let r=pn(t);for(let i of r.components)Qf(e,i)}function Xf(e,t){e.append("h2","Exports"),e.append("raw",Ai);for(let n of t){let r=(n.type??n.value)?.replace(pc," ").trim();e.append("raw",`| ${jt(n.name,n.deprecated)} | ${`<code>${n.kind}</code>`} | ${et(r)} | ${Jn(n.description)} |
237
+ `,fs=/\|/g,Nm=/</g,Dm=/>/g,Vt=/\n/g,_m=/^[A-Za-z_$][\w$]*$/,Im=/\s*\n\s*/g,Lm=/&(?=#?\w+;)|<(?=[A-Za-z/!?])|[|`*]|\\(?=[!-/:-@[-`{-~])|(?<![A-Za-z0-9])_|_(?![A-Za-z0-9])/g,Rm=/[&<|`*\\_]/;function hs(e){if(!Rm.test(e))return e;return e.replace(Lm,(t)=>t==="&"?"&amp;":t==="<"?"&lt;":t==="_"?"&#95;":`&#${t.charCodeAt(0)};`)}function up(e){return`<code>${hs(e.includes(`
238
+ `)?e.replace(Im," "):e)}</code>`}var Mm=/\{@link\s+([^{}\s|]+)(?:\|([^{}]+))?\}/g;function Om(e){if(!e.includes("{@link"))return e;return e.replace(Mm,(t,n,r)=>`[${r===void 0?n:r.trim()}](${n})`)}function ls(e){return e.includes("```")||e.includes("~~~")}function us(e){return mp(Om(e))}var Bm=/^([ \t]*)(`{3,}|~{3,})(.*)$/,Fm=/^\n/,$m=/\n$/;function dp(e){let t=(o)=>({kind:"prose",text:us(o.join(`
239
+ `))});if(!ls(e))return[t([e])];let n=e.split(`
240
+ `),r=[],i=[];for(let o=0;o<n.length;o++){let s=Bm.exec(n[o]),[,c="",l="",u=""]=s??[];if(!s||l[0]==="`"&&u.includes("`")){i.push(n[o]);continue}if(i.push(""),i.length>1)r.push(t(i));let f=[],y=new RegExp(`^[ \\t]*${l[0]}{${l.length},}[ \\t]*$`);for(o++;o<n.length&&!y.test(n[o]);o++){let g=n[o],b=0;while(b<c.length&&(g[b]===" "||g[b]==="\t"))b++;f.push(g.slice(b))}r.push({kind:"code",block:{fence:l,info:u.trim(),code:f.join(`
241
+ `)}}),i=[""]}if(i.length>1||r.length===0)r.push(t(i));return r}function fp(e,t){let n="";for(let r=0;r<e.length;r++){let i=e[r];if(i.kind==="code"){if(t)t.push(i.block),n+="(code below)";else n+=`<pre><code>${hs(i.block.code).replace(Vt,"<br />")}</code></pre>`;continue}let o=i.text;if(!t){if(e[r-1]?.kind==="code")o=o.replace(Fm,"");if(e[r+1]?.kind==="code")o=o.replace($m,"")}n+=o.replace(fs,"&#124;").replace(Vt,"<br />")}return n}function Vm(e,t,n,r){let i=[],o=Ht(n,r,i);if(i.length>0)e.push({label:t,blocks:i});return o}function jm(e,t){if(e.append("raw",`
242
+ `),t.length===0)return;let n="";for(let{label:r,blocks:i}of t){n+=`Code for \`${r}\`:
243
+
244
+ `;for(let{fence:o,info:s,code:c}of i)n+=`${o}${s}
245
+ ${c}${c?`
246
+ `:""}${o}
247
+
248
+ `}e.append("raw",n)}function nt(e){if(e===void 0)return st;return up(e)}function hp(e){if(!e.reExport)return nt(e.type);let{from:t,imported:n}=e.reExport,r=n==="*"?"":_m.test(n)?`.${n}`:`[${JSON.stringify(n)}]`;return nt(`typeof import(${JSON.stringify(t)})${r}`)}function mp(e){if(!e.includes("<")&&!e.includes(">"))return e;return e.replace(Nm,"&lt;").replace(Dm,"&gt;")}function ms(e){if(e===void 0)return st;return up(e)}function jt(e,t){if(t===void 0)return e;let n=typeof t==="string"&&t.trim().length>0?`: ${mp(t).replace(Vt," ").replace(fs,"&#124;")}`:"";return`<s>${e}</s><br />**Deprecated**${n}`}function Sr(e){if(e===void 0||e.trim().length===0)return st;return fp(dp(e),void 0)}function yp(e){if(e===void 0||e==="{}")return st;return nt(Er(e).replace(Vt," "))}function gp(e){if(e===void 0)return st;return`<code>${hs(e).replace(Vt,"<br />")}</code>`}function Ht(e,t,n){let r=e!==void 0&&e.trim().length>0;if(!(r&&ls(e))&&!t?.some(({body:c})=>c&&ls(c))){let c=r?[us(e)]:[];for(let{name:l,body:u}of t??[]){let f=u?.trim();c.push(f?`@${l} ${us(f)}`:`@${l}`)}if(c.length===0)return st;return c.join(`
249
+ `).replace(fs,"&#124;").replace(Vt,"<br />")}let i=[],o=(c)=>{let l=i.at(-1);if(l?.kind==="prose")l.text+=c;else i.push({kind:"prose",text:c})},s=(c,l)=>{if(i.length>0)o(`
250
+ `);if(c)o(c);for(let u of dp(l))if(u.kind==="prose")o(u.text);else i.push(u)};if(r)s("",e);for(let{name:c,body:l}of t??[]){let u=l?.trim();s(u?`@${c} `:`@${c}`,u??"")}if(i.length===0)return st;return fp(i,n)}function xp(e){if(e===void 0)return st;return nt(e.replace(Vt," "))}function Hm(e){let t=[e.extends?`Extends ${nt(e.extends)}.`:"",e.implements?.length?`Implements ${e.implements.map((n)=>nt(n)).join(", ")}.`:""].filter(Boolean);return t.length>0?t.join(" "):void 0}function bp(e,t,n){let r=new Set;for(let i of t){if(i.kind!=="class")continue;let o=Hm(i);if(!i.members?.length&&!o)continue;let s=i.localName??i.name;if(r.has(s))continue;if(r.add(s),e.append("h4",`\`${s}\` members`),o)e.append("raw",`${o}
251
+
252
+ `);if(!i.members?.length)continue;e.append("raw",wm);let c=[];for(let l of i.members){let u=n?.codeBelow?Vm(c,l.name,l.description,l.tags):Ht(l.description,l.tags);e.append("raw",`| ${jt(l.name,l.deprecated)} | ${nt(ps(l))} | ${u} |
253
+ `)}jm(e,c)}}function gs(e,t,n){if(e.append("h1","Component Index"),e.append("h2","Components").tableOfContents(),e.append("divider"),n&&n.length>0)qm(e,n);let r=Rn(t);for(let i of r.components)Wm(e,i)}function qm(e,t){e.append("h2","Exports"),e.append("raw",ds);for(let n of t){let r=(n.type??n.value)?.replace(sp," ").trim();e.append("raw",`| ${jt(n.name,n.deprecated)} | ${`<code>${n.kind}</code>`} | ${nt(r)} | ${Sr(n.description)} |
226
254
  `)}e.append("raw",`
227
- `),e.append("divider")}function Jf(e){return e.kind==="const"||e.isFunctionDeclaration}function Yf(e,t){e.append("h3","Module exports"),e.append("raw",Ai);for(let n of t)e.append("raw",`| ${jt(n.name,n.deprecated)} | ${`<code>${n.kind}</code>`} | ${mc(n)} | ${hn(n.description,n.tags)} |
255
+ `),e.append("divider")}function Um(e){return e.kind==="const"||e.isFunctionDeclaration}function Gm(e,t){e.append("h3","Module exports"),e.append("raw",ds);for(let n of t)e.append("raw",`| ${jt(n.name,n.deprecated)} | ${`<code>${n.kind}</code>`} | ${hp(n)} | ${Ht(n.description,n.tags)} |
228
256
  `);e.append("raw",`
229
- `)}function ki(e,t,n,r){if(t.length>0)n(),e.append("raw",`
230
- `);else e.append("p",r??"None.")}function Qf(e,t){if(e.append("h2",`\`${t.moduleName}\``),t.generics)e.append("p",`**Type parameters:** ${et(`<${t.generics[1]}>`)}`);if(t.typedefs.length>0)e.append("h3","Types").append("raw",`\`\`\`ts
231
- ${zn({typedefs:t.typedefs})}
257
+ `),bp(e,t)}function ys(e,t,n,r){if(t.length>0)n(),e.append("raw",`
258
+ `);else e.append("p",r??"None.")}function Wm(e,t){if(e.append("h2",`\`${t.moduleName}\``),t.generics)e.append("p",`**Type parameters:** ${nt(`<${t.generics[1]}>`)}`);if(t.typedefs.length>0)e.append("h3","Types").append("raw",`\`\`\`ts
259
+ ${Cr({typedefs:t.typedefs})}
232
260
  \`\`\`
233
261
 
234
- `);if(e.append("h3","Props"),ki(e,t.props,()=>{e.append("raw",lc);let n=(i)=>i.reactive?0:i.constant?2:1,r=t.props.map((i,o)=>({prop:i,index:o})).sort((i,o)=>n(i.prop)-n(o.prop)||i.index-o.index).map(({prop:i})=>i);for(let i of r){let o=Jf(i)?"accessor":i.kind;e.append("raw",`| ${jt(i.name,i.deprecated)} | ${i.isRequired?"Yes":"No"} | ${`<code>${o}</code>`} | ${i.reactive?"Yes":"No"} | ${i.binding??"--"} | ${et(i.type)} | ${Pi(i.value)} | ${hn(i.description,i.tags)} |
235
- `)}}),t.moduleExports.length>0)Yf(e,t.moduleExports);if(e.append("h3","Slots"),ki(e,t.slots,()=>{e.append("raw",uc);for(let n of t.slots)e.append("raw",`| ${jt(n.default?Xe:n.name??Xe,n.deprecated)} | ${n.default?"Yes":"No"} | ${yc(n.slot_props)} | ${gc(n.fallback)} | ${hn(n.description,n.tags)} |
236
- `)}),e.append("h3","Events"),ki(e,t.events,()=>{e.append("raw",dc);for(let n of t.events)e.append("raw",`| ${jt(n.name,n.deprecated)} | ${n.type} | ${n.type==="dispatched"?xc(n.detail):Xe} | ${hn(n.description,n.tags)} |
237
- `)}),t.cssParts&&t.cssParts.length>0){e.append("h3","CSS Parts"),e.append("raw",fc);for(let n of t.cssParts)e.append("raw",`| ${n.name} | ${Jn(n.description)} |
262
+ `);if(e.append("h3","Props"),ys(e,t.props,()=>{e.append("raw",ap);let n=(i)=>i.reactive?0:i.constant?2:1,r=t.props.map((i,o)=>({prop:i,index:o})).sort((i,o)=>n(i.prop)-n(o.prop)||i.index-o.index).map(({prop:i})=>i);for(let i of r){let o=Um(i)?"accessor":i.kind;e.append("raw",`| ${jt(i.name,i.deprecated)} | ${i.isRequired?"Yes":"No"} | ${`<code>${o}</code>`} | ${i.reactive?"Yes":"No"} | ${i.binding??"--"} | ${nt(i.type)} | ${ms(i.value)} | ${Ht(i.description,i.tags)} |
263
+ `)}}),t.moduleExports.length>0)Gm(e,t.moduleExports);if(e.append("h3","Slots"),ys(e,t.slots,()=>{e.append("raw",op);for(let n of t.slots)e.append("raw",`| ${jt(n.default?st:n.name??st,n.deprecated)} | ${n.default?"Yes":"No"} | ${yp(n.slot_props)} | ${gp(n.fallback)} | ${Ht(n.description,n.tags)} |
264
+ `)}),e.append("h3","Events"),ys(e,t.events,()=>{e.append("raw",cp);for(let n of t.events)e.append("raw",`| ${jt(n.name,n.deprecated)} | ${n.type} | ${xp(n.detail)} | ${Ht(n.description,n.tags)} |
265
+ `)}),t.cssParts&&t.cssParts.length>0){e.append("h3","CSS Parts"),e.append("raw",pp);for(let n of t.cssParts)e.append("raw",`| ${n.name} | ${Sr(n.description)} |
238
266
  `);e.append("raw",`
239
- `)}if(t.cssProperties&&t.cssProperties.length>0){e.append("h3","CSS Custom Properties"),e.append("raw",hc);for(let n of t.cssProperties)e.append("raw",`| ${n.name} | ${et(n.type)} | ${Pi(n.default)} | ${Jn(n.description)} |
267
+ `)}if(t.cssProperties&&t.cssProperties.length>0){e.append("h3","CSS Custom Properties"),e.append("raw",lp);for(let n of t.cssProperties)e.append("raw",`| ${n.name} | ${nt(n.type)} | ${ms(n.default)} | ${Sr(n.description)} |
240
268
  `);e.append("raw",`
241
- `)}}var Zf=/^=>\s*/;function eh(e){let t=e.trim();if(!t.startsWith("("))return{parameters:[],returnTypeText:t||"any"};let n=0,r=-1;for(let p=0;p<t.length;p++)if(t[p]==="(")n++;else if(t[p]===")"){if(n--,n===0){r=p;break}}if(r===-1)return{parameters:[],returnTypeText:"any"};let i=t.slice(1,r).trim(),o=t.slice(r+1).trim().replace(Zf,"");return{parameters:i===""?[]:Qe(i).map((p)=>{let l=p.trim(),h=l.startsWith("..."),d=h?l.slice(3):l,g=d.indexOf(":"),b=(g===-1?d:d.slice(0,g)).trim(),E=g===-1?void 0:d.slice(g+1).trim(),w=b.endsWith("?"),N={name:w?b.slice(0,-1):b};if(E)N.type={text:E};if(w)N.optional=!0;if(h)N.rest=!0;return N}),returnTypeText:o||"any"}}function th(e){if(e.params!==void 0||e.returnType!==void 0)return{parameters:(e.params??[]).map((n)=>{let r={name:n.name};if(n.type)r.type={text:n.type};if(n.optional)r.optional=!0;return r}),returnTypeText:e.returnType??"any"};return e.type?eh(e.type):{parameters:[],returnTypeText:"any"}}function nh(e){return e.map((t)=>{if(t.isFunctionDeclaration){let{parameters:r,returnTypeText:i}=th(t),o={kind:"method",name:t.name,static:!1};if(r.length>0)o.parameters=r;if(o.return={type:{text:i}},t.description)o.description=t.description;if(t.deprecated!==void 0)o.deprecated=t.deprecated;return o}let n={kind:"field",name:t.name};if(t.type)n.type={text:t.type};if(t.value!==void 0)n.default=t.value;if(t.description)n.description=t.description;if(t.deprecated!==void 0)n.deprecated=t.deprecated;if(t.kind==="const")n.readonly=!0;return n})}function rh(e){let t=e.customElement?.props,n=new Map,r=[];for(let i of e.props){if(i.isFunctionDeclaration)continue;let o=t?.[i.name];if(o?.attribute===!1)continue;let s=o?.attribute||i.name.toLowerCase(),p=n.get(s);if(p!==void 0){console.warn(`sveld: props "${p}" and "${i.name}" of component "${e.moduleName}" both map to the custom-element attribute "${s}"; only "${p}" is included.`);continue}n.set(s,i.name);let h=o?.type==="Array"||o?.type==="Object"?[i.description,"Serialized to/from JSON for the attribute."].filter(Boolean).join(" "):i.description,d={name:s,fieldName:i.name};if(i.type)d.type={text:i.type};if(i.value!==void 0)d.default=i.value;if(h)d.description=h;if(o?.reflect)d.reflects=!0;r.push(d)}return r}function ih(e){if(!e||e.length===0)return;return e.map((t)=>{let n={name:t.name};if(t.description)n.description=t.description;return n})}function sh(e){if(!e||e.length===0)return;return e.map((t)=>{let n={name:t.name};if(t.type)n.type={text:t.type};if(t.default!==void 0)n.default=t.default;if(t.description)n.description=t.description;return n})}function ah(e){return e.filter((t)=>t.type==="dispatched").map((t)=>{let n={name:t.name,type:{text:`CustomEvent<${t.detail??"unknown"}>`}};if(t.description)n.description=t.description;if(t.deprecated!==void 0)n.deprecated=t.deprecated;return n})}function oh(e){return e.map((t)=>{let n={name:t.default?"":t.name??""};if(t.description)n.description=t.description;if(t.deprecated!==void 0)n.deprecated=t.deprecated;return n})}function ch(e){let t=ih(e.cssParts),n=sh(e.cssProperties),r=nh(e.props),i=rh(e),o=ah(e.events),s=oh(e.slots),p=e.moduleName,l=e.componentComment?{kind:"class",name:p,description:e.componentComment,members:r,attributes:i,events:o,slots:s}:{kind:"class",name:p,members:r,attributes:i,events:o,slots:s};if(t)l.cssParts=t;if(n)l.cssProperties=n;if(e.customElementTag)l.tagName=e.customElementTag,l.customElement=!0;return l}function ph(e,t){let n=[{kind:"js",name:e.moduleName,declaration:{name:e.moduleName,module:t}}];if(e.customElementTag)n.push({kind:"custom-element-definition",name:e.customElementTag,declaration:{name:e.moduleName,module:t}});return n}function lh(e,t={}){let n=pn(e),r=t.resolveModulePath??((o)=>o.filePath);return{schemaVersion:"1.0.0",modules:n.components.map((o)=>{let s=r(o);return{kind:"javascript-module",path:s,declarations:[ch(o)],exports:ph(o,s)}})}}var uh=/[^\w\- ]+/g,dh=/\s+/g;function fh(e,t){let n=e.toLowerCase().replace(vi,"").replace(uh,"").replace(dh,"-"),r=t.get(n)??0;return t.set(n,r+1),r===0?n:`${n}-${r}`}class Ni{sourceParts=[];hasToC=!1;toc=[];get source(){return this.sourceParts.join("")}appendLineBreaks(){return this.sourceParts.push(`
269
+ `)}}var Km=/^=>\s*/;function zm(e){let t=e.trim();if(!t.startsWith("("))return{parameters:[],returnTypeText:t||"any"};let n=0,r=-1;for(let c=0;c<t.length;c++)if(t[c]==="(")n++;else if(t[c]===")"){if(n--,n===0){r=c;break}}if(r===-1)return{parameters:[],returnTypeText:"any"};let i=t.slice(1,r).trim(),o=t.slice(r+1).trim().replace(Km,"");return{parameters:i===""?[]:lt(i).map((c)=>{let l=c.trim(),u=l.startsWith("..."),f=u?l.slice(3):l,y=f.indexOf(":"),g=(y===-1?f:f.slice(0,y)).trim(),b=y===-1?void 0:f.slice(y+1).trim(),P=g.endsWith("?"),N={name:P?g.slice(0,-1):g};if(b)N.type={text:b};if(P)N.optional=!0;if(u)N.rest=!0;return N}),returnTypeText:o||"any"}}function Jm(e){if(e.params!==void 0||e.returnType!==void 0)return{parameters:(e.params??[]).map((n)=>{let r={name:n.name};if(n.type)r.type={text:n.type};if(n.optional)r.optional=!0;return r}),returnTypeText:e.returnType??"any"};return e.type?zm(e.type):{parameters:[],returnTypeText:"any"}}function Xm(e){return e.map((t)=>{if(t.isFunctionDeclaration){let{parameters:r,returnTypeText:i}=Jm(t),o={kind:"method",name:t.name,static:!1};if(r.length>0)o.parameters=r;if(o.return={type:{text:i}},t.description)o.description=t.description;if(t.deprecated!==void 0)o.deprecated=t.deprecated;return o}let n={kind:"field",name:t.name};if(t.type)n.type={text:t.type};if(t.value!==void 0)n.default=t.value;if(t.description)n.description=t.description;if(t.deprecated!==void 0)n.deprecated=t.deprecated;if(t.kind==="const")n.readonly=!0;return n})}function Ym(e){let t=e.customElement?.props,n=new Map,r=[];for(let i of e.props){if(i.isFunctionDeclaration)continue;let o=t?.[i.name];if(o?.attribute===!1)continue;let s=o?.attribute||i.name.toLowerCase(),c=n.get(s);if(c!==void 0){console.warn(`sveld: props "${c}" and "${i.name}" of component "${e.moduleName}" both map to the custom-element attribute "${s}"; only "${c}" is included.`);continue}n.set(s,i.name);let u=o?.type==="Array"||o?.type==="Object"?[i.description,"Serialized to/from JSON for the attribute."].filter(Boolean).join(" "):i.description,f={name:s,fieldName:i.name};if(i.type)f.type={text:i.type};if(i.value!==void 0)f.default=i.value;if(u)f.description=u;if(o?.reflect)f.reflects=!0;r.push(f)}return r}function Qm(e){if(!e||e.length===0)return;return e.map((t)=>{let n={name:t.name};if(t.description)n.description=t.description;return n})}function Zm(e){if(!e||e.length===0)return;return e.map((t)=>{let n={name:t.name};if(t.type)n.type={text:t.type};if(t.default!==void 0)n.default=t.default;if(t.description)n.description=t.description;return n})}function ey(e){return e.filter((t)=>t.type==="dispatched").map((t)=>{let n={name:t.name,type:{text:Mn(t.detail??"unknown")}};if(t.description)n.description=t.description;if(t.deprecated!==void 0)n.deprecated=t.deprecated;return n})}function ty(e){return e.map((t)=>{let n={name:t.default?"":t.name??""};if(t.description)n.description=t.description;if(t.deprecated!==void 0)n.deprecated=t.deprecated;return n})}function ny(e){let t=Qm(e.cssParts),n=Zm(e.cssProperties),r=Xm(e.props),i=Ym(e),o=ey(e.events),s=ty(e.slots),c=e.moduleName,l=e.componentComment?{kind:"class",name:c,description:e.componentComment,members:r,attributes:i,events:o,slots:s}:{kind:"class",name:c,members:r,attributes:i,events:o,slots:s};if(t)l.cssParts=t;if(n)l.cssProperties=n;if(e.customElementTag)l.tagName=e.customElementTag,l.customElement=!0;return l}function ry(e,t){let n=[{kind:"js",name:e.moduleName,declaration:{name:e.moduleName,module:t}}];if(e.customElementTag)n.push({kind:"custom-element-definition",name:e.customElementTag,declaration:{name:e.moduleName,module:t}});return n}function iy(e,t={}){let n=Rn(e),r=t.resolveModulePath??((o)=>o.filePath);return{schemaVersion:"1.0.0",modules:n.components.map((o)=>{let s=r(o);return{kind:"javascript-module",path:s,declarations:[ny(o)],exports:ry(o,s)}})}}var sy=/[^\w\- ]+/g,ay=/\s+/g;function oy(e,t){let n=e.toLowerCase().replace(ip,"").replace(sy,"").replace(ay,"-"),r=t.get(n)??0;return t.set(n,r+1),r===0?n:`${n}-${r}`}class xs{sourceParts=[];hasToC=!1;toc=[];get source(){return this.sourceParts.join("")}appendLineBreaks(){return this.sourceParts.push(`
242
270
 
243
- `),this}append(e,t){switch(e){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":{let n=Number(e.slice(-1));if(this.sourceParts.push(`${"#".repeat(n)} ${t}`),this.hasToC&&e==="h2")this.toc.push({indent:0,raw:t??""});break}case"quote":this.sourceParts.push(`> ${t}`);break;case"p":this.sourceParts.push(t??"");break;case"divider":this.sourceParts.push("---");break;case"raw":this.sourceParts.push(t??"");break}if(e!=="raw")this.appendLineBreaks();return this}tableOfContents(){return this.sourceParts.push("<!-- __TOC__ -->"),this.hasToC=!0,this.appendLineBreaks(),this}end(){let e=this.sourceParts.join("");if(!this.hasToC)return e;let t="<!-- __TOC__ -->",n=e.indexOf(t);if(n===-1)return e;let r=new Map,i=this.toc.map(({indent:o,raw:s})=>`${" ".repeat(o)}- [${s}](#${fh(s,r)})`).join(`
244
- `);return e.slice(0,n)+i+e.slice(n+t.length)}}class _i extends Ni{onAppend;constructor(e){super();this.onAppend=e.onAppend}append(e,t){return super.append(e,t),this.onAppend?.call(this,e,this),this}}function hh(e,t){let n=new _i({onAppend:(r,i)=>{t?.onAppend?.call(null,r,i,e)}});return wi(n,e),n.end()}export{_i as BrowserWriterMarkdown,qo as COMPONENT_API_SCHEMA_VERSION,Se as ComponentParser,Nc as asNormalizedPath,pn as buildComponentApiDocument,lh as buildCustomElementsManifest,Kn as formatTsProps,ic as getContextDefs,zn as getTypeDefs,wi as renderComponentsToMarkdown,hh as writeMarkdownCore,Uf as writeTsDefinition};
271
+ `),this}append(e,t){switch(e){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":{let n=Number(e.slice(-1));if(this.sourceParts.push(`${"#".repeat(n)} ${t}`),this.hasToC&&e==="h2")this.toc.push({indent:0,raw:t??""});break}case"quote":this.sourceParts.push(`> ${t}`);break;case"p":this.sourceParts.push(t??"");break;case"divider":this.sourceParts.push("---");break;case"raw":this.sourceParts.push(t??"");break}if(e!=="raw")this.appendLineBreaks();return this}tableOfContents(){return this.sourceParts.push("<!-- __TOC__ -->"),this.hasToC=!0,this.appendLineBreaks(),this}end(){let e=this.sourceParts.join("");if(!this.hasToC)return e;let t="<!-- __TOC__ -->",n=e.indexOf(t);if(n===-1)return e;let r=new Map,i=this.toc.map(({indent:o,raw:s})=>`${" ".repeat(o)}- [${s}](#${oy(s,r)})`).join(`
272
+ `);return e.slice(0,n)+i+e.slice(n+t.length)}}class bs extends xs{onAppend;constructor(e){super();this.onAppend=e.onAppend}append(e,t){return super.append(e,t),this.onAppend?.call(this,e,this),this}}function cy(e,t){let n=new bs({onAppend:(r,i)=>{t?.onAppend?.call(null,r,i,e)}});return gs(n,e),n.end()}export{bs as BrowserWriterMarkdown,$c as COMPONENT_API_SCHEMA_VERSION,ke as ComponentParser,Np as asNormalizedPath,Rn as buildComponentApiDocument,iy as buildCustomElementsManifest,hh as finalizeWithoutCrossFileResolution,Er as formatTsProps,Zc as getContextDefs,Cr as getTypeDefs,gs as renderComponentsToMarkdown,cy as writeMarkdownCore,km as writeTsDefinition};