sveld 0.37.0 → 0.37.1
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.d.ts +2 -0
- package/lib/browser.js +124 -124
- package/lib/chunk-2x8axrwh.js +1 -0
- package/lib/chunk-3s74a556.js +1 -0
- package/lib/{chunk-eybp3ae7.js → chunk-a5qb9706.js} +1 -1
- package/lib/{chunk-550yx3gf.js → chunk-k096ka38.js} +4 -4
- package/lib/chunk-q2023ykg.js +300 -0
- package/lib/chunk-sty5s7z0.js +7 -0
- package/lib/cli-entry.js +1 -1
- package/lib/index.js +1 -1
- package/package.json +1 -1
- package/lib/chunk-6n4d12tf.js +0 -1
- package/lib/chunk-74rbv9gf.js +0 -1
- package/lib/chunk-jtm65qmd.js +0 -300
- package/lib/chunk-s1v2vjye.js +0 -7
package/lib/browser.js
CHANGED
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
var Ho=Object.defineProperty;var qo=(e)=>e;function Uo(e,t){this[e]=qo.bind(null,t)}var Go=(e,t)=>{for(var n in t)Ho(e,n,{get:t[n],enumerable:!0,configurable:!0,set:Uo.bind(t,n)})};function Wo(e){return e}class ln{constructor(){this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.context={skip:()=>this.should_skip=!0,remove:()=>this.should_remove=!0,replace:(e)=>this.replacement=e}}replace(e,t,n,r){if(e&&t)if(n!=null)e[t][n]=r;else e[t]=r}remove(e,t,n){if(e&&t)if(n!==null&&n!==void 0)e[t].splice(n,1);else delete e[t]}}class Wn extends ln{constructor(e,t){super();this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.context={skip:()=>this.should_skip=!0,remove:()=>this.should_remove=!0,replace:(n)=>this.replacement=n},this.enter=e,this.leave=t}visit(e,t,n,r){if(e){if(this.enter){let o=this.should_skip,s=this.should_remove,p=this.replacement;if(this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.enter.call(this.context,e,t,n,r),this.replacement)e=this.replacement,this.replace(t,n,r,e);if(this.should_remove)this.remove(t,n,r);let l=this.should_skip,m=this.should_remove;if(this.should_skip=o,this.should_remove=s,this.replacement=p,l)return e;if(m)return null}let i;for(i in e){let o=e[i];if(o&&typeof o==="object"){if(Array.isArray(o)){let s=o;for(let p=0;p<s.length;p+=1){let l=s[p];if(li(l)){if(!this.visit(l,e,i,p))p--}}}else if(li(o))this.visit(o,e,i,null)}}if(this.leave){let o=this.replacement,s=this.should_remove;if(this.replacement=null,this.should_remove=!1,this.leave.call(this.context,e,t,n,r),this.replacement)e=this.replacement,this.replace(t,n,r,e);if(this.should_remove)this.remove(t,n,r);let p=this.should_remove;if(this.replacement=o,this.should_remove=s,p)return null}}return e}}function li(e){return e!==null&&typeof e==="object"&&"type"in e&&typeof e.type==="string"}function He(e,{enter:t,leave:n}){return new Wn(t,n).visit(e,null)}function De(e){return typeof e==="object"&&e!==null}function ui(e){return De(e)&&e.type==="VariableDeclaration"&&Array.isArray(e.declarations)}function rt(e){return De(e)&&e.type==="Literal"}function ve(e){return De(e)&&e.type==="Identifier"&&typeof e.name==="string"}function di(e){return De(e)&&e.type==="MemberExpression"}function ze(e){return De(e)&&e.type==="ObjectExpression"&&Array.isArray(e.properties)}function Ko(e){return De(e)&&e.type==="CallExpression"}function Ue(e,t){if(!Ko(e))return!1;return!!e.callee&&De(e.callee)&&e.callee.type==="Identifier"&&e.callee.name===t}function it(e){if(De(e)&&(e.type==="TSAsExpression"||e.type==="TSSatisfiesExpression")&&"expression"in e)return it(e.expression);return e}function hi(e){if(De(e)&&(e.type==="TSAsExpression"||e.type==="TSSatisfiesExpression")&&"typeAnnotation"in e)return e.typeAnnotation;return}function zo(e){return De(e)&&e.type==="NewExpression"}function Kn(e,t){if(!zo(e))return!1;return!!e.callee&&De(e.callee)&&e.callee.type==="Identifier"&&e.callee.name===t}function fi(e){if(!De(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 mi={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 Xo(e){return e in mi}function yi(e){if(Xo(e))return mi[e];return"HTMLElement"}var un=Symbol("sveld.parsedComponentTypeScriptMetadata");function zn(e){return e[un]}var Jo=/\w/;function Yo(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&&Jo.test(l[0]))continue;let m=l.trimStart();if(m.startsWith("?"))m=m.slice(1).trimStart();if(m.startsWith(":"))return m.slice(1).trim()}return}function dn(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 Yo(s,o)}function Xn(){return{syntaxMode:"legacy",scriptLanguage:void 0,source:void 0,parsed:void 0,runesOptionOverride:void 0,sourceLineStartOffsetsCache:void 0,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:[],pendingContextKeyCandidates:[],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 WeakMap,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 Jn={"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","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","spread-unresolved":"sveld/spread-unresolved","export-unresolved":"sveld/export-unresolved","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","jsdoc-tag-dropped":"sveld/jsdoc-tag-dropped","internal-typedef-referenced":"sveld/internal-typedef-referenced"},Qo={"prop-unknown-type":"warning","context-any-type":"warning","slot-missing-type":"warning","event-no-source":"warning","example-compile-error":"error","example-syntax-error":"error","syntax-skipped":"error","rest-props-unresolved":"warning","context-duplicate-key":"warning","spread-unresolved":"warning","export-unresolved":"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","jsdoc-tag-dropped":"warning","internal-typedef-referenced":"error"};function gi(e){return{...e,code:Jn[e.kind],severity:Qo[e.kind]}}function ie(e,t,n,r,i){e.diagnosticRecords.push(gi({component:e.componentFilePath,kind:t,name:n,message:r,...i?{source:i}:{},...Zo(e,t,n)?{ignored:!0}:{}}))}function xi(e,t){return`${e}:${t}`}function st(e,t,n,r){if(!r||r.length===0)return;let i=xi(t,n),o=e.sveldIgnoreDirectives.get(i)??new Set;for(let s of r)o.add(s);e.sveldIgnoreDirectives.set(i,o)}function Zo(e,t,n){let r=e.sveldIgnoreDirectives.get(xi(t,n));if(!r)return!1;return r.has("")||r.has(Jn[t])}function ec(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 tc(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 nc=/^\{([\s\S]*)\}$/,rc=/^[A-Za-z_$][\w$]*$/;function hn(e){let t=e.trim(),n=nc.exec(t);if(!n)return null;let r=n[1].trim();if(r==="")return[];let i=[];for(let o of ec(r)){let s=o.trim();if(!s)continue;let p=tc(s);if(p===-1)return null;let l=s.slice(0,p).trim(),m=s.slice(p+1).trim();if(!m)return null;let d=!1;if(l.endsWith("?"))d=!0,l=l.slice(0,-1).trim();if(!rc.test(l))return null;i.push({name:l,type:m,optional:d})}return i}var Yn=/[\r\n]+/g;function ic(e){if(e.sourceLineStartOffsetsCache)return e.sourceLineStartOffsetsCache;let t=[0];if(e.source){let n=e.source.indexOf(`
|
|
1
|
+
var Jo=Object.defineProperty;var Yo=(e)=>e;function Qo(e,t){this[e]=Yo.bind(null,t)}var Zo=(e,t)=>{for(var n in t)Jo(e,n,{get:t[n],enumerable:!0,configurable:!0,set:Qo.bind(t,n)})};function ec(e){return e}function De(e){return typeof e==="object"&&e!==null}function yi(e){return De(e)&&e.type==="VariableDeclaration"&&Array.isArray(e.declarations)}function rt(e){return De(e)&&e.type==="Literal"}function Ae(e){return De(e)&&e.type==="Identifier"&&typeof e.name==="string"}function gi(e){return De(e)&&e.type==="MemberExpression"}function Xe(e){return De(e)&&e.type==="ObjectExpression"&&Array.isArray(e.properties)}function tc(e){return De(e)&&e.type==="CallExpression"}function Ge(e,t){if(!tc(e))return!1;return!!e.callee&&De(e.callee)&&e.callee.type==="Identifier"&&e.callee.name===t}function it(e){if(De(e)&&(e.type==="TSAsExpression"||e.type==="TSSatisfiesExpression")&&"expression"in e)return it(e.expression);return e}function xi(e){if(De(e)&&(e.type==="TSAsExpression"||e.type==="TSSatisfiesExpression")&&"typeAnnotation"in e)return e.typeAnnotation;return}function nc(e){return De(e)&&e.type==="NewExpression"}function Wn(e,t){if(!nc(e))return!1;return!!e.callee&&De(e.callee)&&e.callee.type==="Identifier"&&e.callee.name===t}function bi(e){if(!De(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 Ti={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 rc(e){return e in Ti}function Ei(e){if(rc(e))return Ti[e];return"HTMLElement"}var pn=Symbol("sveld.parsedComponentTypeScriptMetadata");function Kn(e){return e[pn]}var ic=/\w/;function sc(e,t){let n=e.trim();if(!n.startsWith("{")||!n.endsWith("}"))return;let r=n.slice(1,-1),i=[],o=0,s="";for(let l of r)if(l==="{"||l==="<"||l==="("||l==="[")o++,s+=l;else if(l==="}"||l===">"||l===")"||l==="]")o--,s+=l;else if((l===";"||l===",")&&o===0)i.push(s.trim()),s="";else s+=l;if(s.trim())i.push(s.trim());for(let l of i){if(!l.startsWith(t))continue;let p=l.slice(t.length);if(p.length>0&&ic.test(p[0]))continue;let m=p.trimStart();if(m.startsWith("?"))m=m.slice(1).trimStart();if(m.startsWith(":"))return m.slice(1).trim()}return}function un(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 sc(s,o)}function zn(){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,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:[],pendingContextKeyCandidates:[],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 Xn={"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","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","spread-unresolved":"sveld/spread-unresolved","export-unresolved":"sveld/export-unresolved","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","jsdoc-tag-dropped":"sveld/jsdoc-tag-dropped","internal-typedef-referenced":"sveld/internal-typedef-referenced"},ac={"prop-unknown-type":"warning","context-any-type":"warning","slot-missing-type":"warning","event-no-source":"warning","example-compile-error":"error","example-syntax-error":"error","syntax-skipped":"error","rest-props-unresolved":"warning","context-duplicate-key":"warning","spread-unresolved":"warning","export-unresolved":"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","jsdoc-tag-dropped":"warning","internal-typedef-referenced":"error"};function Si(e){return{...e,code:Xn[e.kind],severity:ac[e.kind]}}function ae(e,t,n,r,i){e.diagnosticRecords.push(Si({component:e.componentFilePath,kind:t,name:n,message:r,...i?{source:i}:{},...oc(e,t,n)?{ignored:!0}:{}}))}function vi(e,t){return`${e}:${t}`}function st(e,t,n,r){if(!r||r.length===0)return;let i=vi(t,n),o=e.sveldIgnoreDirectives.get(i)??new Set;for(let s of r)o.add(s);e.sveldIgnoreDirectives.set(i,o)}function oc(e,t,n){let r=e.sveldIgnoreDirectives.get(vi(t,n));if(!r)return!1;return r.has("")||r.has(Xn[t])}function cc(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 lc(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 pc=/^\{([\s\S]*)\}$/,uc=/^[A-Za-z_$][\w$]*$/;function dn(e){let t=e.trim(),n=pc.exec(t);if(!n)return null;let r=n[1].trim();if(r==="")return[];let i=[];for(let o of cc(r)){let s=o.trim();if(!s)continue;let l=lc(s);if(l===-1)return null;let p=s.slice(0,l).trim(),m=s.slice(l+1).trim();if(!m)return null;let d=!1;if(p.endsWith("?"))d=!0,p=p.slice(0,-1).trim();if(!uc.test(p))return null;i.push({name:p,type:m,optional:d})}return i}class hn{constructor(){this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.context={skip:()=>this.should_skip=!0,remove:()=>this.should_remove=!0,replace:(e)=>this.replacement=e}}replace(e,t,n,r){if(e&&t)if(n!=null)e[t][n]=r;else e[t]=r}remove(e,t,n){if(e&&t)if(n!==null&&n!==void 0)e[t].splice(n,1);else delete e[t]}}class Jn extends hn{constructor(e,t){super();this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.context={skip:()=>this.should_skip=!0,remove:()=>this.should_remove=!0,replace:(n)=>this.replacement=n},this.enter=e,this.leave=t}visit(e,t,n,r){if(e){if(this.enter){let o=this.should_skip,s=this.should_remove,l=this.replacement;if(this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.enter.call(this.context,e,t,n,r),this.replacement)e=this.replacement,this.replace(t,n,r,e);if(this.should_remove)this.remove(t,n,r);let p=this.should_skip,m=this.should_remove;if(this.should_skip=o,this.should_remove=s,this.replacement=l,p)return e;if(m)return null}let i;for(i in e){let o=e[i];if(o&&typeof o==="object"){if(Array.isArray(o)){let s=o;for(let l=0;l<s.length;l+=1){let p=s[l];if(Ci(p)){if(!this.visit(p,e,i,l))l--}}}else if(Ci(o))this.visit(o,e,i,null)}}if(this.leave){let o=this.replacement,s=this.should_remove;if(this.replacement=null,this.should_remove=!1,this.leave.call(this.context,e,t,n,r),this.replacement)e=this.replacement,this.replace(t,n,r,e);if(this.should_remove)this.remove(t,n,r);let l=this.should_remove;if(this.replacement=o,this.should_remove=s,l)return null}}return e}}function Ci(e){return e!==null&&typeof e==="object"&&"type"in e&&typeof e.type==="string"}function St(e,{enter:t,leave:n}){return new Jn(t,n).visit(e,null)}var Yn=/[\r\n]+/g;function dc(e){if(e.sourceLineStartOffsetsCache)return e.sourceLineStartOffsetsCache;let t=[0];if(e.source){let n=e.source.indexOf(`
|
|
2
2
|
`);while(n!==-1)t.push(n+1),n=e.source.indexOf(`
|
|
3
|
-
`,n+1)}return e.sourceLineStartOffsetsCache=t,t}function bi(e,t){if(!e.source||t<0||t>e.source.length)return;let n=ic(e),r=0,i=n.length-1;while(r<=i){let o=Math.floor((r+i)/2),s=n[o],p=n[o+1]??Number.POSITIVE_INFINITY;if(t<s)i=o-1;else if(t>=p)r=o+1;else return{line:o+1,column:t-s}}return}function fn(e,t,n){if(t===void 0||n===void 0||n<t)return;let r=bi(e,t),i=bi(e,n);if(!r||!i)return;return{start:r,end:i}}function ne(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 fn(e,n,r)}function Le(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 fn(e,o,p)}function re(e,t,n){return e.source?.slice(t,n)}function mn(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 re(e,n,r)?.replace(Yn," ")}function Re(e){return e===void 0||e===""?void 0:e}function Bt(e,t,n,r){if(Re(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 at(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=Ei(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=re(t,l.start,l.end)?.replace(Yn," ");if(o=i,s=n.type==="ArrowFunctionExpression"||n.type==="FunctionExpression",n.type==="BinaryExpression"){let m=n;if(m.left&&typeof m.left==="object"&&"type"in m.left&&m.left.type==="Literal"&&"value"in m.left&&typeof m.left.value==="string")o="string"}if(n.type==="ArrowFunctionExpression"||n.type==="FunctionExpression")o=Ci(n),i=Ti(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=re(t,l.start,l.end);if(l.argument){if(typeof l.argument==="object"&&"type"in l.argument&&l.argument.type==="UnaryExpression")o=at(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=re(t,l.start,l.end);if(l.callee&&typeof l.callee==="object"&&"type"in l.callee&&l.callee.type==="Identifier"){let m=l.callee.name;if(m==="Date")o="Date";else if(m==="Map")o="Map<any, any>";else if(m==="Set")o="Set<any>";else if(m==="WeakMap")o="WeakMap<object, any>";else if(m==="WeakSet")o="WeakSet<object>";else if(m==="Array")o="any[]";else if(m==="RegExp"||m==="Regexp")o="RegExp";else if(m==="Error")o="Error";else o=m}}else if(n.type==="CallExpression"){let l=n;if("start"in l&&"end"in l&&typeof l.start==="number"&&typeof l.end==="number")i=re(t,l.start,l.end);let m=l.callee,d=m&&typeof m==="object"&&"type"in m&&m.type==="Identifier"?m.name:void 0;if((d==="$derived"||d==="$state")&&l.arguments.length===1&&r<5)return{...at(e,t,l.arguments[0],r+1),value:i,defaultValue:p};if(d){let g=ac(e,t,d);if(g)return{value:i,type:void 0,isFunction:!1,defaultValue:p,resolvedType:g};if(t.funcDecls.has(d)||oc(t,d))return{value:i,type:void 0,isFunction:!1,defaultValue:p,pendingCallDefault:{calleeName:d}};let y=t.valueImportBindingsByLocalName.get(d);if(y)return{value:i,type:void 0,isFunction:!1,defaultValue:p,pendingCallDefault:{calleeName:d,importSource:y.source,importedName:y.importedName}}}return{value:i,type:void 0,isFunction:!1,defaultValue:p,pendingCallDefault:{calleeName:d??sc(t,m)}}}else if(n.type==="Identifier"){let l=n;if(r<5){let m=Si(t,l.name);if(m){let d=at(e,t,m,r+1),g=e.resolveLocalVarJSDoc(l.name);return{...d,resolvedType:g?.type??d.resolvedType,resolvedDescription:g?.description??d.resolvedDescription,resolvedParams:g?.params??d.resolvedParams,resolvedReturnType:g?.returnType??d.resolvedReturnType}}if(t.funcDecls.has(l.name)){let d=e.resolveLocalVarJSDoc(l.name),g=t.funcDecls.get(l.name);return{value:g?Ti(t,g):void 0,type:void 0,isFunction:!0,defaultValue:g?Ei(e,t,g):void 0,resolvedType:d?.type??uc(d,g),resolvedDescription:d?.description,resolvedParams:d?.params,resolvedReturnType:d?.returnType}}}if("start"in l&&"end"in l&&typeof l.start==="number"&&typeof l.end==="number")i=re(t,l.start,l.end)}else if(n.type==="MemberExpression"){let l=n;if("start"in l&&"end"in l&&typeof l.start==="number"&&typeof l.end==="number")i=re(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=re(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 Si(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 Ft(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 sc(e,t){if(t&&typeof t==="object"&&"start"in t&&"end"in t&&typeof t.start==="number"&&typeof t.end==="number")return re(e,t.start,t.end)??"call";return"call"}function ac(e,t,n){let r=e.resolveLocalVarJSDoc(n);if(r?.returnType)return r.returnType;let i=t.funcDecls.get(n)??vi(t,n);if(!i)return;let o=lc(t,i);if(o)return o;let s=cc(t,n);if(s)return s;let p=Ai(i);return p==="any"?void 0:p}function oc(e,t){return vi(e,t)!==void 0}function vi(e,t){let n=Si(e,t);if(!n||typeof n!=="object"||!("type"in n))return;if(n.type==="ArrowFunctionExpression"||n.type==="FunctionExpression")return n;return}function cc(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 pc(re(e,s.start,s.end))}return}function pc(e){if(!e)return;let t=e.lastIndexOf("=>");if(t===-1)return;return e.slice(t+2).trim()||void 0}function lc(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 re(e,r.start,r.end)}function uc(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 Ci(t);return"(...args: any[]) => any"}function Ci(e){return`(${dc(e)}) => ${Ai(e)}`}function dc(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 Ai(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=hc(t),n.length===0)return"any"}else n=[t];let r=null;for(let i of n){let o=fc(i);if(!o)return"any";if(r===null)r=o;else if(r!==o)return"any"}return r??"any"}function hc(e){let t=[];return He(e,{enter(n){if(n.type==="FunctionDeclaration"||n.type==="FunctionExpression"||n.type==="ArrowFunctionExpression"){this.skip();return}if(n.type==="ReturnStatement")t.push(n.argument??null)}}),t}function fc(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 Pi(e){if(Ue(e,"$bindable"))return{init:e.arguments[0],bindable:!0};return{init:e,bindable:!1}}function mc(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 re(e,r.start,i.end)??""}function Ti(e,t){if(t.generator)return;let n=t.body;if(!n||typeof n!=="object"||!("type"in n))return;let r=mc(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=mn(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 m=mn(e,l);if(m!==void 0)return`${i}(${r}) => ${o(l,m)}`}}}return}function Ei(e,t,n){let r=mn(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=Qn(e,n);if(s.ok)o.value=s.value}return o}function Qn(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=Qn(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=Qn(e,i.value);if(!s.ok)return{ok:!1};r[o]=s.value}return{ok:!0,value:r}}return{ok:!1}}function yc(e,t,n,r){if(!ve(n))return null;let i=Ft(e,n.name);if(ze(i))return _i(e,t,i,r).properties;let o=t.findVariableTypeAndDescription(n.name);if(!o)return null;let s=hn(o.type);if(!s)return null;return s.map((p)=>({name:p.name,type:p.type,optional:p.optional}))}function _i(e,t,n,r){let i=[],o=!1;for(let s of n.properties){if(s.type==="SpreadElement"){let g=yc(e,t,s.argument,r);if(g)i.push(...g);else o=!0,ie(e,"spread-unresolved",r,`Context "${r}" spreads a value sveld can't resolve; its shape is widened to "Record<string, any>".`,ne(e,s));continue}if(s.type!=="Property")continue;let p=t.getPropertyName(s.key);if(!p)continue;let l="any",m,d;if(ve(s.value)){let g=s.value.name,y=t.findVariableTypeAndDescription(g);if(y)l=y.type,m=y.description,d=y.internal;else ie(e,"context-any-type",p,`Context "${r}" property "${p}" has no type annotation; defaulted to "any".`,ne(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((T)=>{if(ve(T))return`${T.name||"arg"}: any`;return"arg: any"}).join(", ")||""}) => any`;else if(rt(s.value))l=s.value.value==null?"null":typeof s.value.value;i.push({name:p,type:l,description:m,optional:!1,...d?{internal:!0}:{}})}return{properties:i,hasUnresolvedSpread:o}}var gc=/[-_.:/\s]+/;function Zn(e){return`${e.split(gc).map((r)=>r.charAt(0).toUpperCase()+r.slice(1)).join("")}Context`}function ki(e,t,n,r){if(!n||typeof n!=="object"||!("type"in n))return null;if(n.type==="ObjectExpression"){if(!ze(n))return null;let{properties:i,hasUnresolvedSpread:o}=_i(e,t,n,r);return{key:r,typeName:Zn(r),properties:i,description:void 0,...o?{hasUnresolvedSpread:o}:{}}}else if(ve(n)){let i=n.name,o=t.findVariableTypeAndDescription(i);if(o)return{key:r,typeName:Zn(r),properties:[{name:i,type:o.type,description:o.description,optional:!1}],description:void 0,...o.internal?{internal:!0}:{}};return ie(e,"context-any-type",i,`Context "${r}" variable "${i}" has no type annotation; defaulted to "any".`,ne(e,n)),{key:r,typeName:Zn(r),properties:[{name:i,type:"any",description:void 0,optional:!1}]}}return null}function wi(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 Ni(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=fi(r);return i==null?{kind:"unresolved"}:{kind:"resolved",key:i}}if(r.type==="CallExpression"||r.type==="NewExpression"){let i=wi(r);return i==null?{kind:"unresolved"}:{kind:"resolved",key:i}}if(r.type==="Identifier"){if(n>=5)return{kind:"unresolved"};let i=Ft(e,r.name);if(i&&typeof i==="object"&&"type"in i){let s=i;if((s.type==="CallExpression"||s.type==="NewExpression")&&wi(s)==="")return{kind:"resolved",key:r.name};return Ni(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 Ii(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=Ni(e,o);if(s.kind==="unresolved"||s.kind==="resolved"&&!s.key){let g=e.componentFilePath?` in ${e.componentFilePath}`:"";console.warn(`Warning: Could not resolve setContext key${g}. Use a string literal, const-bound string, or Symbol(). Skipping context type generation.`);return}let p=i.arguments[1];if(!p)return;let l=ne(e,n);if(s.kind==="pending"){let g=ki(e,t,p,"");if(g)e.pendingContextKeyCandidates.push({importSource:s.importSource,importedName:s.importedName,properties:g.properties,description:g.description,source:l});return}let m=s.key,d=ki(e,t,p,m);if(!d)return;if(e.contexts.has(m)){ie(e,"context-duplicate-key",m,`setContext("${m}", ...) was called more than once; only the first call's shape is used.`,l);return}e.contexts.set(m,{...d,source:l})}var xc=new Set(["Component","SvelteComponent","SvelteSelf"]),bc=new Set(["RegularElement","SvelteElement"]);function Vt(e){return xc.has(e)}function jt(e){return bc.has(e)}function Di(e,t){if(!t||typeof t!=="object"||!("type"in t))return;if(ze(t))return Ri(e,t);if(t.type==="ArrayExpression")return Mi(e,t);return}function Li(e,t){if(!t||typeof t!=="object"||!("type"in t))return"any";if(ve(t))return e.findVariableTypeAndDescription(t.name)?.type??"any";if(rt(t)){let n=t.value;return n===null?"null":typeof n}if(ze(t))return Ri(e,t);if(t.type==="ArrayExpression")return Mi(e,t);return"any"}function Ri(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:Li(e,r.value)})}return yn(n)}function Mi(e,t){let n=new Set(t.elements.filter((r)=>r!=null).map((r)=>Li(e,r)));if(n.size===0)return"any[]";if(n.size===1)return`${[...n][0]}[]`;return`(${[...n].join(" | ")})[]`}function er(e){return typeof e==="string"?JSON.stringify(e):String(e)}function ot(e,{name:t,detail:n,has_argument:r,description:i,deprecated:o,tags:s,internal:p,source:l}){if(t===void 0)return;let m=!r&&!n?"null":Re(n),d=i,g=e.events.get(t);if(g?.type==="forwarded")e.events.set(t,{type:"dispatched",name:t,detail:m,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 y=g.tags??s;e.events.set(t,{...g,detail:g.detail===void 0?m:g.detail,description:g.description||d,deprecated:g.deprecated??o,tags:y,...g.internal||p?{internal:!0}:{},source:l||g.source})}else e.events.set(t,{type:"dispatched",name:t,detail:m,description:d,deprecated:o,tags:s,...p?{internal:!0}:{},source:l})}function Oi(e,t){let n=t.arguments[0],r=Kn(n,"CustomEvent");if(!r&&!Kn(n,"Event"))return;let i=n.arguments[0],o=rt(i)?i.value:void 0;if(o==null)return;let s=r?n.arguments[1]:void 0,p=!1,l;if(ze(s)){let m=s.properties.find((d)=>d.type==="Property"&&ve(d.key)&&d.key.name==="detail");if(m?.type==="Property")p=!0,l=rt(m.value)?m.value.value:void 0}return ot(e,{name:String(o),detail:l==null?"":er(l),has_argument:p,source:ne(e,t)}),String(o)}function yn(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 m=p?"?":"",d=s||"";if(l&&d)d=`${d} @default ${l}`;else if(l)d=`@default ${l}`;if(d){if(n)return`/** ${d} */
|
|
3
|
+
`,n+1)}return e.sourceLineStartOffsetsCache=t,t}function Ai(e,t){if(!e.source||t<0||t>e.source.length)return;let n=dc(e),r=e.sourceLineHint;if(r!==void 0)for(let s=r;s<=r+1&&s<n.length;s++){let l=n[s],p=n[s+1]??Number.POSITIVE_INFINITY;if(t>=l&&t<p)return e.sourceLineHint=s,{line:s+1,column:t-l}}let i=0,o=n.length-1;while(i<=o){let s=i+o>>>1,l=n[s],p=n[s+1]??Number.POSITIVE_INFINITY;if(t<l)o=s-1;else if(t>=p)i=s+1;else return e.sourceLineHint=s,{line:s+1,column:t-l}}return}function fn(e,t,n){if(t===void 0||n===void 0||n<t)return;let r=Ai(e,t),i=Ai(e,n);if(!r||!i)return;return{start:r,end:i}}function ie(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 fn(e,n,r)}function Le(e,t){if(!t||t.length===0)return;let n=[...t];while(n.length>1){let p=n[n.length-1];if(p.tag!==void 0||!p.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],l=s.start+s.raw.length;return fn(e,o,l)}function se(e,t,n){return e.source?.slice(t,n)}function mn(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 se(e,n,r)?.replace(Yn," ")}function Re(e){return e===void 0||e===""?void 0:e}function Ft(e,t,n,r){if(Re(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 at(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 l=ki(e,t,n);if(n.type==="ObjectExpression"||n.type==="BinaryExpression"||n.type==="ArrayExpression"||n.type==="ArrowFunctionExpression"||n.type==="FunctionExpression"){let p=n;if("start"in p&&"end"in p&&typeof p.start==="number"&&typeof p.end==="number")i=se(t,p.start,p.end)?.replace(Yn," ");if(o=i,s=n.type==="ArrowFunctionExpression"||n.type==="FunctionExpression",n.type==="BinaryExpression"){let m=n;if(m.left&&typeof m.left==="object"&&"type"in m.left&&m.left.type==="Literal"&&"value"in m.left&&typeof m.left.value==="string")o="string"}if(n.type==="ArrowFunctionExpression"||n.type==="FunctionExpression")o=Ni(n),i=Pi(t,n)}else if(n.type==="UnaryExpression"){let p=n;if("start"in p&&"end"in p&&typeof p.start==="number"&&typeof p.end==="number")i=se(t,p.start,p.end);if(p.argument){if(typeof p.argument==="object"&&"type"in p.argument&&p.argument.type==="UnaryExpression")o=at(e,t,p.argument).type;else if(typeof p.argument==="object"&&"value"in p.argument)o=typeof p.argument.value}}else if(n.type==="NewExpression"){let p=n;if("start"in p&&"end"in p&&typeof p.start==="number"&&typeof p.end==="number")i=se(t,p.start,p.end);if(p.callee&&typeof p.callee==="object"&&"type"in p.callee&&p.callee.type==="Identifier"){let m=p.callee.name;if(m==="Date")o="Date";else if(m==="Map")o="Map<any, any>";else if(m==="Set")o="Set<any>";else if(m==="WeakMap")o="WeakMap<object, any>";else if(m==="WeakSet")o="WeakSet<object>";else if(m==="Array")o="any[]";else if(m==="RegExp"||m==="Regexp")o="RegExp";else if(m==="Error")o="Error";else o=m}}else if(n.type==="CallExpression"){let p=n;if("start"in p&&"end"in p&&typeof p.start==="number"&&typeof p.end==="number")i=se(t,p.start,p.end);let m=p.callee,d=m&&typeof m==="object"&&"type"in m&&m.type==="Identifier"?m.name:void 0;if((d==="$derived"||d==="$state")&&p.arguments.length===1&&r<5)return{...at(e,t,p.arguments[0],r+1),value:i,defaultValue:l};if(d){let y=fc(e,t,d);if(y)return{value:i,type:void 0,isFunction:!1,defaultValue:l,resolvedType:y};if(t.funcDecls.has(d)||mc(t,d))return{value:i,type:void 0,isFunction:!1,defaultValue:l,pendingCallDefault:{calleeName:d}};let x=t.valueImportBindingsByLocalName.get(d);if(x)return{value:i,type:void 0,isFunction:!1,defaultValue:l,pendingCallDefault:{calleeName:d,importSource:x.source,importedName:x.importedName}}}return{value:i,type:void 0,isFunction:!1,defaultValue:l,pendingCallDefault:{calleeName:d??hc(t,m)}}}else if(n.type==="Identifier"){let p=n;if(r<5){let m=wi(t,p.name);if(m){let d=at(e,t,m,r+1),y=e.resolveLocalVarJSDoc(p.name);return{...d,resolvedType:y?.type??d.resolvedType,resolvedDescription:y?.description??d.resolvedDescription,resolvedParams:y?.params??d.resolvedParams,resolvedReturnType:y?.returnType??d.resolvedReturnType}}if(t.funcDecls.has(p.name)){let d=e.resolveLocalVarJSDoc(p.name),y=t.funcDecls.get(p.name);return{value:y?Pi(t,y):void 0,type:void 0,isFunction:!0,defaultValue:y?ki(e,t,y):void 0,resolvedType:d?.type??bc(d,y),resolvedDescription:d?.description,resolvedParams:d?.params,resolvedReturnType:d?.returnType}}}if("start"in p&&"end"in p&&typeof p.start==="number"&&typeof p.end==="number")i=se(t,p.start,p.end)}else if(n.type==="MemberExpression"){let p=n;if("start"in p&&"end"in p&&typeof p.start==="number"&&typeof p.end==="number")i=se(t,p.start,p.end);if(e.isNumericConstant(n))o="number"}else if(n.type==="TemplateLiteral"){let p=n;if("start"in p&&"end"in p&&typeof p.start==="number"&&typeof p.end==="number")i=se(t,p.start,p.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:l}}function wi(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 Vt(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 hc(e,t){if(t&&typeof t==="object"&&"start"in t&&"end"in t&&typeof t.start==="number"&&typeof t.end==="number")return se(e,t.start,t.end)??"call";return"call"}function fc(e,t,n){let r=e.resolveLocalVarJSDoc(n);if(r?.returnType)return r.returnType;let i=t.funcDecls.get(n)??_i(t,n);if(!i)return;let o=xc(t,i);if(o)return o;let s=yc(t,n);if(s)return s;let l=Ii(i);return l==="any"?void 0:l}function mc(e,t){return _i(e,t)!==void 0}function _i(e,t){let n=wi(e,t);if(!n||typeof n!=="object"||!("type"in n))return;if(n.type==="ArrowFunctionExpression"||n.type==="FunctionExpression")return n;return}function yc(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(se(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 xc(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 se(e,r.start,r.end)}function bc(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 Ni(t);return"(...args: any[]) => any"}function Ni(e){return`(${Tc(e)}) => ${Ii(e)}`}function Tc(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 Ii(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=Ec(t),n.length===0)return"any"}else n=[t];let r=null;for(let i of n){let o=Sc(i);if(!o)return"any";if(r===null)r=o;else if(r!==o)return"any"}return r??"any"}function Ec(e){let t=[];return St(e,{enter(n){if(n.type==="FunctionDeclaration"||n.type==="FunctionExpression"||n.type==="ArrowFunctionExpression"){this.skip();return}if(n.type==="ReturnStatement")t.push(n.argument??null)}}),t}function Sc(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 Di(e){if(Ge(e,"$bindable"))return{init:e.arguments[0],bindable:!0};return{init:e,bindable:!1}}function vc(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 se(e,r.start,i.end)??""}function Pi(e,t){if(t.generator)return;let n=t.body;if(!n||typeof n!=="object"||!("type"in n))return;let r=vc(e,t),i=t.async?"async ":"",o=(l,p)=>l&&typeof l==="object"&&("type"in l)&&l.type==="ObjectExpression"?`(${p})`:p;if(n.type!=="BlockStatement"){let l=mn(e,n);return l===void 0?void 0:`${i}(${r}) => ${o(n,l)}`}let s=n.body;if(s.length===0)return`${i}(${r}) => {}`;if(s.length===1){let l=s[0];if(l&&typeof l==="object"&&"type"in l&&l.type==="ReturnStatement"){let p=l.argument;if(p){let m=mn(e,p);if(m!==void 0)return`${i}(${r}) => ${o(p,m)}`}}}return}function ki(e,t,n){let r=mn(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=Qn(e,n);if(s.ok)o.value=s.value}return o}function Qn(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=Qn(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=Qn(e,i.value);if(!s.ok)return{ok:!1};r[o]=s.value}return{ok:!0,value:r}}return{ok:!1}}function Cc(e,t,n,r){if(!Ae(n))return null;let i=Vt(e,n.name);if(Xe(i))return Mi(e,t,i,r).properties;let o=t.findVariableTypeAndDescription(n.name);if(!o)return null;let s=dn(o.type);if(!s)return null;return s.map((l)=>({name:l.name,type:l.type,optional:l.optional}))}function Mi(e,t,n,r){let i=[],o=!1;for(let s of n.properties){if(s.type==="SpreadElement"){let y=Cc(e,t,s.argument,r);if(y)i.push(...y);else o=!0,ae(e,"spread-unresolved",r,`Context "${r}" spreads a value sveld can't resolve; its shape is widened to "Record<string, any>".`,ie(e,s));continue}if(s.type!=="Property")continue;let l=t.getPropertyName(s.key);if(!l)continue;let p="any",m,d;if(Ae(s.value)){let y=s.value.name,x=t.findVariableTypeAndDescription(y);if(x)p=x.type,m=x.description,d=x.internal;else ae(e,"context-any-type",l,`Context "${r}" property "${l}" has no type annotation; defaulted to "any".`,ie(e,s))}else if(s.value&&typeof s.value==="object"&&"type"in s.value&&(s.value.type==="ArrowFunctionExpression"||s.value.type==="FunctionExpression"))p=`(${s.value.params?.map((E)=>{if(Ae(E))return`${E.name||"arg"}: any`;return"arg: any"}).join(", ")||""}) => any`;else if(rt(s.value))p=s.value.value==null?"null":typeof s.value.value;i.push({name:l,type:p,description:m,optional:!1,...d?{internal:!0}:{}})}return{properties:i,hasUnresolvedSpread:o}}var Ac=/[-_.:/\s]+/;function Zn(e){return`${e.split(Ac).map((r)=>r.charAt(0).toUpperCase()+r.slice(1)).join("")}Context`}function Li(e,t,n,r){if(!n||typeof n!=="object"||!("type"in n))return null;if(n.type==="ObjectExpression"){if(!Xe(n))return null;let{properties:i,hasUnresolvedSpread:o}=Mi(e,t,n,r);return{key:r,typeName:Zn(r),properties:i,description:void 0,...o?{hasUnresolvedSpread:o}:{}}}else if(Ae(n)){let i=n.name,o=t.findVariableTypeAndDescription(i);if(o)return{key:r,typeName:Zn(r),properties:[{name:i,type:o.type,description:o.description,optional:!1}],description:void 0,...o.internal?{internal:!0}:{}};return ae(e,"context-any-type",i,`Context "${r}" variable "${i}" has no type annotation; defaulted to "any".`,ie(e,n)),{key:r,typeName:Zn(r),properties:[{name:i,type:"any",description:void 0,optional:!1}]}}return null}function Ri(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 Oi(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=Ri(r);return i==null?{kind:"unresolved"}:{kind:"resolved",key:i}}if(r.type==="Identifier"){if(n>=5)return{kind:"unresolved"};let i=Vt(e,r.name);if(i&&typeof i==="object"&&"type"in i){let s=i;if((s.type==="CallExpression"||s.type==="NewExpression")&&Ri(s)==="")return{kind:"resolved",key:r.name};return Oi(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 Bi(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=Oi(e,o);if(s.kind==="unresolved"||s.kind==="resolved"&&!s.key){let y=e.componentFilePath?` in ${e.componentFilePath}`:"";console.warn(`Warning: Could not resolve setContext key${y}. Use a string literal, const-bound string, or Symbol(). Skipping context type generation.`);return}let l=i.arguments[1];if(!l)return;let p=ie(e,n);if(s.kind==="pending"){let y=Li(e,t,l,"");if(y)e.pendingContextKeyCandidates.push({importSource:s.importSource,importedName:s.importedName,properties:y.properties,description:y.description,source:p});return}let m=s.key,d=Li(e,t,l,m);if(!d)return;if(e.contexts.has(m)){ae(e,"context-duplicate-key",m,`setContext("${m}", ...) was called more than once; only the first call's shape is used.`,p);return}e.contexts.set(m,{...d,source:p})}var Pc=new Set(["Component","SvelteComponent","SvelteSelf"]),kc=new Set(["RegularElement","SvelteElement"]);function jt(e){return Pc.has(e)}function $t(e){return kc.has(e)}function Fi(e,t){if(!t||typeof t!=="object"||!("type"in t))return;if(Xe(t))return ji(e,t);if(t.type==="ArrayExpression")return $i(e,t);return}function Vi(e,t){if(!t||typeof t!=="object"||!("type"in t))return"any";if(Ae(t))return e.findVariableTypeAndDescription(t.name)?.type??"any";if(rt(t)){let n=t.value;return n===null?"null":typeof n}if(Xe(t))return ji(e,t);if(t.type==="ArrayExpression")return $i(e,t);return"any"}function ji(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:Vi(e,r.value)})}return yn(n)}function $i(e,t){let n=new Set(t.elements.filter((r)=>r!=null).map((r)=>Vi(e,r)));if(n.size===0)return"any[]";if(n.size===1)return`${[...n][0]}[]`;return`(${[...n].join(" | ")})[]`}function er(e){return typeof e==="string"?JSON.stringify(e):String(e)}function ot(e,{name:t,detail:n,has_argument:r,description:i,deprecated:o,tags:s,internal:l,source:p}){if(t===void 0)return;let m=!r&&!n?"null":Re(n),d=i,y=e.events.get(t);if(y?.type==="forwarded")e.events.set(t,{type:"dispatched",name:t,detail:m,description:d||y.description,deprecated:o??y.deprecated,tags:s??y.tags,...l||y.internal?{internal:!0}:{},source:p||y.source});else if(y){let x=y.tags??s;e.events.set(t,{...y,detail:y.detail===void 0?m:y.detail,description:y.description||d,deprecated:y.deprecated??o,tags:x,...y.internal||l?{internal:!0}:{},source:p||y.source})}else e.events.set(t,{type:"dispatched",name:t,detail:m,description:d,deprecated:o,tags:s,...l?{internal:!0}:{},source:p})}function Hi(e,t){let n=t.arguments[0],r=Wn(n,"CustomEvent");if(!r&&!Wn(n,"Event"))return;let i=n.arguments[0],o=rt(i)?i.value:void 0;if(o==null)return;let s=r?n.arguments[1]:void 0,l=!1,p;if(Xe(s)){let m=s.properties.find((d)=>d.type==="Property"&&Ae(d.key)&&d.key.name==="detail");if(m?.type==="Property")l=!0,p=rt(m.value)?m.value.value:void 0}return ot(e,{name:String(o),detail:p==null?"":er(p),has_argument:l,source:ie(e,t)}),String(o)}function yn(e,t,n=!1){if(e.length===0)return"null";let r=e.map(({name:i,type:o,description:s,optional:l,default:p})=>{let m=l?"?":"",d=s||"";if(p&&d)d=`${d} @default ${p}`;else if(p)d=`@default ${p}`;if(d){if(n)return`/** ${d} */
|
|
4
4
|
${i}${m}: ${o};`;return`/** ${d} */ ${i}${m}: ${o};`}return`${i}${m}: ${o};`}).join(n?`
|
|
5
5
|
`:" ");return n?`{
|
|
6
6
|
${r}
|
|
7
|
-
}`:`{ ${r} }`}var
|
|
8
|
-
`);let o=i.named.map(({imported:
|
|
9
|
-
`,r-1)+1;if(e.charCodeAt(r+3)===42||e.slice(i,r).trim()!==""){n=r+1;continue}let o=[],s=i,
|
|
10
|
-
`,s),m
|
|
11
|
-
`)}function
|
|
12
|
-
`).slice(1,-1),endIndex:s}}function
|
|
13
|
-
`);t.content=i,t.tag=r;let
|
|
14
|
-
`)}let
|
|
15
|
-
`).trim()},
|
|
16
|
-
`);
|
|
17
|
-
${Q}`:Q}}ot(e,{name:w,detail:Ee,has_argument:!1,description:D,deprecated:K,tags:oe.length>0?oe:void 0,internal:O||void 0,source:q}),e.eventDescriptions.set(w,D),e.jsDocEventNames.add(w),e.jsDocEventSources.set(w,q),st(e,"event-no-source",w,Pe),ye.length=0,w=void 0,A=void 0,D=void 0,K=void 0,O=!1,q=void 0,B=void 0,oe=[],Pe=[]}},cn=()=>{if(a!==void 0){let F,Ee;if(b.length>0)F=yn(b,void 0,!0),Ee=`type ${a} = ${F};`;else if(c)F=c,Ee=Kc(F)?`interface ${a} ${F}`:`type ${a} = ${F};`;else F="{}",Ee=`type ${a} = ${F};`;d(a,h),e.typedefs.set(a,{type:F,name:a,description:Re(u),ts:Ee,tags:x.length>0?x:void 0,...E?{internal:!0}:{},source:h}),b.length=0,a=void 0,c=void 0,u=void 0,h=void 0,x=[],E=!1}},pn=()=>{if(S!==void 0){let G=`(${R.map(({name:Ke,type:Q,optional:_e})=>`${Ke}${_e?"?":""}: ${Q}`).join(", ")}) => ${W||"void"}`,we=`type ${S} = ${G};`;d(S,v),e.typedefs.set(S,{type:G,name:S,description:Re(C),ts:we,tags:P.length>0?P:void 0,..._?{internal:!0}:{},source:v}),R.length=0,W=void 0,S=void 0,C=void 0,v=void 0,P=[],_=!1}},Un=y.some((F)=>F.tag==="slot"||F.tag==="snippet"),Fo=y.some((F)=>F.tag==="extends"||F.tag==="extendProps"),Vo=y.some((F)=>F.tag==="slot"||F.tag==="snippet"||F.tag==="event"||F.tag==="typedef"||F.tag==="callback");for(let{tag:F,type:Ee,name:G,description:we,optional:Ke,default:Q,raw:_e,lines:Z}of y){let ge=t.aliasType(Ee),Ot=Mt(Z);switch(F){case"extends":case"extendProps":if(e.extends!==void 0)ie(e,"extend-props-duplicate",G,`A second @extends/@extendProps tag ("${G}") overwrote the first ("${e.extends.interface}"); only one is used.`,Le(e,Z));if(e.extends={interface:G,import:ge},H)H=!1;break;case"restProps":{let te=G?we?`${G} ${we}`:G:we,nt=Xe(te)||Ot;if(!nt&&H&&!j&&T)nt=T,j=!0;if(e.rest_props={type:"Element",name:ge,description:nt||void 0},H)H=!1;break}case"slot":case"snippet":{let Se=Xe(yt(Z));if(!Se&&H&&!j&&T)Se=T,j=!0;if(!Se&&M.length===0)Se=Ot;if(H)H=!1;let nt=ge;if(!nt)nt="Record<string, never>",ie(e,"slot-missing-type",G||"default",`@${F}${G?` "${G}"`:""} is missing a required {Type} annotation; falling back to "${nt}".`,Le(e,Z));Ht(e,{slot_name:G,slot_props:nt,slot_description:Se||void 0,slot_deprecated:ee,slot_tags:M.length>0?[...M]:void 0,slot_internal:ce||void 0,source:Le(e,Z)}),M.length=0,ee=void 0,ce=!1;{let jo=G===void 0||G===""?null:G;U=($o)=>{let Gn=e.slots.get(jo);if(Gn)Gn.tags=[...Gn.tags??[],$o]}}break}case"csspart":{let te=Xe(yt(Z));e.cssParts.push({name:G,...te?{description:te}:{}});break}case"cssprop":case"cssproperty":{let te=Xe(yt(Z));e.cssProperties.push({name:G,...ge?{type:ge}:{},...Q===void 0?{}:{default:Q},...te?{description:te}:{}});break}case"event":{if(tt(),w=G,A=ge,B=Z.length>0?Z[0].number:void 0,D=Xe(yt(Z))||Ot,!D&&H&&!j&&T)D=T,j=!0;if(q=Le(e,Z),M.length>0)oe.push(...M),M.length=0;if(U=(Se)=>oe.push(Se),H)H=!1;break}case"type":if(w!==void 0)A=ge;break;case"param":if(S!==void 0)R.push({name:G,type:ge,optional:Ke||!1});break;case"returns":case"return":if(S!==void 0)W=ge;break;case"property":{let te={name:G,type:ge,description:Xe(yt(Z)),optional:Ke||!1,default:Q};if(w!==void 0)g(ye,te,w,Le(e,Z));else if(a!==void 0)g(b,te,a,Le(e,Z));break}case"typedef":{if(cn(),a=Ji(G),c=ge,h=Le(e,Z),u=Xe(yt(Z))||Ot,!u&&H&&!j&&T)u=T,j=!0;if(M.length>0)x.push(...M),M.length=0;if(E=ce,ce=!1,U=(Se)=>x.push(Se),H)H=!1;break}case"callback":{if(pn(),S=Ji(G),v=Le(e,Z),C=Xe(yt(Z))||Ot,!C&&H&&!j&&T)C=T,j=!0;if(M.length>0)P.push(...M),M.length=0;if(_=ce,ce=!1,U=(Se)=>P.push(Se),H)H=!1;break}case"generics":{let te=ge||G;for(let Se of Ge(G))l(Se.trim(),Le(e,Z));if(r=!0,p(),m(G,te),H)H=!1;break}case"template":{let te=G;if(ge)te=`${G} extends ${ge}`;if(Q)te+=` = ${Q}`;if(Un&&!Fo){e.deferredSlotBlockGenerics.push({name:G,constraint:te});break}if(l(G,Le(e,Z)),i=!0,p(),m(G,te),H)H=!1;break}case"deprecated":{let te=Qi(G,we);if(w===void 0)ee??=te;else K??=te;break}case"ignore":case"internal":{if(w===void 0)ce=!0;else O=!0;break}case"sveld-ignore":if(w!==void 0)Pe.push(G);break;case"enum":case"class":case"implements":case"this":case"namespace":case"memberof":case"module":case"file":case"overview":break;default:{let te={name:F,body:_e};if(!Yi.has(F)&&!Gc.has(F))ie(e,"jsdoc-unknown-tag",F,`Unknown JSDoc tag "@${F}"; passed through unchanged. If this is a typo, fix the tag name.`,Le(e,Z));if(U)U(te);else M.push(te)}break}}if(tt(),cn(),pn(),Vo&&M.length>0){for(let F of M)ie(e,"jsdoc-tag-dropped",F.name,`@${F.name} could not attach to a @slot/@snippet/@event/@typedef/@callback tag in the same comment block and was dropped.`);M.length=0}}}function Qc({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 qt(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)t=n&&n.length>0?`(${n.map((p)=>`${p.name}${p.optional?"?":""}: ${p.type}`).join(", ")}) => ${r}`:`() => ${r}`;let i=e.jsdocDescription??e.resolvedDescription;if(i===void 0&&t!==void 0)i=e.typedefs?.get(t)?.description;let o=Qc({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("=>"));return{type:t,typeSource:o,description:i,params:n,returnType:r,isFunction:s}}function Zc(e){if(!e||typeof e!=="object"||!("type"in e))return;let t=String(e.type),n=Vt(t);if(!n&&!jt(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 ts(e,t){let n=Zc(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 fe(e,t,n){if(!t||e.has(t))return;e.set(t,n)}function Ut(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 pe(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":pe(e.left,t);break;case"ArrayPattern":for(let n of e.elements)pe(n??void 0,t);break;case"ObjectPattern":for(let n of e.properties)if(n.type==="Property")pe(n.value,t);else if(n.type==="RestElement")pe(n.argument,t);break;case"RestElement":pe(e.argument,t);break}return t}function cr(e,t){if(!t||typeof t!=="object"||!("type"in t))return;if(t.type==="Identifier"){let r=Ut(e,t.name);if(r)e.reactive_vars.add(r);return}let n=pe(t);for(let r of n){let i=Ut(e,r);if(i)e.reactive_vars.add(i)}}function vt(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 ns(e){if(!e||typeof e!=="object"||!("type"in e))return!1;let t=String(e.type);return t==="FunctionDeclaration"||t==="FunctionExpression"||t==="ArrowFunctionExpression"}function ep(e,t){let n=e.scopeDeclarations.get(t);if(!n)n=new Map,e.scopeDeclarations.set(t,n);return n}function tp(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 or(e,t,n,r,i){if(!ui(t))return;let o=i?.allowRunesProps??!1,s=i?.forceProp??!1,p=t;for(let l of p.declarations){if(o&&Ue(it(l.init),"$props")){for(let g of tp(e,p,l))fe(g.kind==="prop"?n:r,g.name,g.kind==="prop"?{kind:"prop",publicPropName:g.publicPropName}:{kind:"local"});continue}let m=p.kind==="var"?r:n,d=s?"prop":"local";for(let g of pe(l.id))fe(m,g,d==="prop"?{kind:"prop",publicPropName:g}:{kind:"local"})}}function np(e,t){if("id"in e&&e.id&&typeof e.id==="object"&&"name"in e.id&&typeof e.id.name==="string")fe(t,e.id.name,{kind:"local"});for(let n of e.params)for(let r of pe(n))fe(t,r,{kind:"local"})}function rp(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":or(e,i,n,r);break;case"FunctionDeclaration":if(i.id?.name)fe(n,i.id.name,{kind:"local"});break;case"ClassDeclaration":if(i.id?.name)fe(n,i.id.name,{kind:"local"});break}}}function ip(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)fe(t.componentScope,o.local.name,{kind:"local"});break;case"VariableDeclaration":or(e,i,t.componentScope,t.componentScope,{allowRunesProps:!0});break;case"FunctionDeclaration":if(i.id?.name)fe(t.componentScope,i.id.name,{kind:"local"});break;case"ClassDeclaration":if(i.id?.name)fe(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")or(e,i.declaration,t.componentScope,t.componentScope,{forceProp:!0});else if(i.declaration.type==="FunctionDeclaration"&&i.declaration.id?.name)fe(t.componentScope,i.declaration.id.name,{kind:"prop",publicPropName:i.declaration.id.name});break}}}function rs(e,t){t.componentScope.clear(),t.scopeDeclarations=new WeakMap,t.activeScopes.length=0,ip(e,t,t.parsed?.instance)}function is(e){return{varScopeStack:[e.componentScope]}}function ss(e,t,n,r){if(!vt(r))return;let i=ep(t,r),o=n.varScopeStack[n.varScopeStack.length-1]??t.componentScope;switch(String(r.type)){case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":np(r,i);break;case"BlockStatement":rp(e,r.body,i,o);break;case"CatchClause":if("param"in r)for(let p of pe(r.param))fe(i,p,{kind:"local"});break;case"EachBlock":{let p=r;for(let l of pe(p.context))fe(i,l,{kind:"local"});if(typeof p.index==="string")fe(i,p.index,{kind:"local"});else if(p.index&&"name"in p.index)fe(i,p.index.name,{kind:"local"});break}case"AwaitBlock":{let p=r;for(let l of pe(p.value))fe(i,l,{kind:"local"});for(let l of pe(p.error))fe(i,l,{kind:"local"});break}}if(ns(r))n.varScopeStack.push(i);return i}function as(e,t){if(ns(t))e.varScopeStack.pop()}var ps=new Set(["$state","$derived","$effect","$props","$bindable","$inspect","$host"]);function sp(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 ap=Array.from(ps);function os(e){return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e===95||e===36}function op(e){if(e.includes("\\u"))return!0;for(let t of ap){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 cp(e,t){for(let n=t.length-1;n>=0;n-=1)if(t[n]?.has(e))return!0;return!1}function pp(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??[])pe(r,t);break}case"BlockStatement":gn(e.body,t);break;case"CatchClause":pe(e.param,t);break;case"EachBlock":{let n=e;if(pe(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;pe(n.value,t),pe(n.error,t);break}}return t}function gn(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??[])pe(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)gn([r],t);break}}}}function pr(e,t){if(!e||typeof e!=="object")return!1;let n=[...t],r=!1;return He(e,{enter(i,o){if(r){this.skip();return}if(vt(i))n.push(pp(i));if(o&&i.type==="Identifier"&&ps.has(i.name)&&!o.type.startsWith("TS")&&sp(i,o)&&!cp(i.name,n))r=!0,this.skip()},leave(i){if(vt(i))n.pop()}}),r}function cs(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 ls(e){if(e.runesOptionOverride!==void 0)return e.runesOptionOverride?"runes":"legacy";let t=e.parsed;if(!t)return"legacy";if(e.source!==void 0&&!op(e.source))return"legacy";let n=new Set;gn(cs(t.module),n);let r=new Set;return gn(cs(t.instance),r),pr(t.module,[n])||pr(t.instance,[n,r])||pr(t.fragment,[n,r])?"runes":"legacy"}var lp=/[A-Za-z_$][\w$]*/g;function up(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 m=re(e,l.start,l.end)?.trim();if(m)r.set(p,m)}return r}function dp(e,t){if(t.size===0)return e;return e.replace(lp,(n)=>t.get(n)??n)}function Ct(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 m=e.getPropertyName(l.key);if(!m)continue;let d=l.typeAnnotation?.start,g=l.typeAnnotation?.end;if(d===void 0||g===void 0)continue;let y=re(t,d+1,g)?.trim();if(!y)continue;St(t,l.typeAnnotation?.typeAnnotation),o.set(m,{type:y,optional:l.optional===!0,source:ne(t,l)})}};switch(n.type){case"TSTypeLiteral":s(n.members??[]);break;case"TSInterfaceDeclaration":s(n.body?.body??[]);break;case"TSTypeAliasDeclaration":{let p=Ct(e,t,n.typeAnnotation,r,i);for(let[l,m]of p)o.set(l,m);break}case"TSTypeReference":{let p=Fi(n.typeName);if(!p||i.has(p))break;let l=r.get(p);if(!l)break;i.add(p);let m=Ct(e,t,l,r,i);i.delete(p);let d=up(t,l,n);for(let[g,y]of m)o.set(g,d.size===0?y:{...y,type:dp(y.type,d)});break}case"TSIntersectionType":for(let p of n.types??[]){let l=Ct(e,t,p,r,i);for(let[m,d]of l)o.set(m,d)}break;case"TSParenthesizedType":{let p=Ct(e,t,n.typeAnnotation,r,i);for(let[l,m]of p)o.set(l,m);break}}return o}function hp(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 us(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:hp(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:re(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:$i(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=mt(t,p.id.typeAnnotation);if(l)t.explicitPropTypesByName.set(p.id.name,l),St(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=mt(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(!Ue(it(p.init),"$props"))continue;let l=p.id?.typeAnnotation?void 0:hi(p.init),m=p.id?.typeAnnotation?.typeAnnotation??l,d=p.id?.typeAnnotation?mt(t,p.id.typeAnnotation):ji(t,l),g=Ct(e,t,m,new Map(Array.from(t.localTypeDeclarationsByName.entries(),([k,w])=>[k,w.node]))),y=new Set,T=new Set;if(Ne(t,m,y,T),Gi(t,y,T),p.start!==void 0){let k={canonicalType:d,props:g,referencedImportedTypes:y,referencedLocalTypes:T};if(t.runesPropsDeclarationMetadataByDeclaratorStart.set(p.start,k),d)t.typedRunesPropsDeclarations.push(k)}}}}function ds(e,t,n){for(let r of n.declarations){if(!Ue(it(r.init),"$props"))continue;if(r.id.type==="Identifier"){t.wholePropsLocals.add(r.id.name),t.restPropLocals.add(r.id.name);let s=tr(t,r.start);if(s)for(let[p,l]of s.props)Bt(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=ct(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,m;if(s.value.type==="Identifier")l=s.value.name;else{let c=s.value;l=c.left.name,m=c.right}if(!l)continue;if(e.trackPropLocalName(p,l),p==="children")t.snippetPropLocals.add(l);let d=Zi(t,e,s)??(o===1?i:void 0),g=Bi(t,r.start,p),{init:y,bindable:T}=Pi(m),k=y==null?{isFunction:!1}:at(e,t,y),{value:w,type:A,isFunction:D,defaultValue:K}=k,O=g?.type===void 0&&d?.type===void 0?k.resolvedType:void 0;if(k.pendingCallDefault)t.pendingCallDefaultCandidates.push({propName:p,location:"props",...k.pendingCallDefault});let{type:q,typeSource:B,description:oe,params:Pe,returnType:ye,isFunction:a}=qt({explicitType:g?.type,typeSeed:A,inferredTypeForSource:A,jsdocType:d?.type,jsdocDescription:d?.description,jsdocParams:d?.params,jsdocReturnType:d?.returnType,resolvedType:O,resolvedDescription:k.resolvedDescription,resolvedParams:k.resolvedParams,resolvedReturnType:k.resolvedReturnType,initializerIsFunction:D,isFunctionDeclaration:!1,inferIsFunctionFromTypeSignature:!0});if(T)t.reactive_vars.add(p);st(t,"prop-unknown-type",p,d?.sveldIgnore),Bt(e,t,p,{name:p,...l===p?{}:{localName:l},kind:"let",description:oe,binding:d?.binding,deprecated:d?.deprecated,tags:d?.tags,...d?.internal?{internal:!0}:{},...T?{bindable:!0}:{},type:q,typeSource:B,value:w,defaultValue:K,params:Pe,returnType:ye,isFunction:a,isFunctionDeclaration:!1,isRequired:!T&&y==null&&g?.optional!==!0,constant:!1,reactive:T,source:ne(t,s)})}}}function fp(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 mp(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 yp=/^["']|["']$/g,gp=/\?$/,xp=/^\{/,bp=/\}$/;function Tp(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(gp,"").replace(yp,""),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])),m=Ct(e,t,n,l);for(let[d,g]of m)ot(t,{name:d,detail:g.type,has_argument:!0,source:g.source});return}let o=e.resolveLocalVarJSDoc(r)?.type,s=o?fp(o):void 0;if(!s)return;let p=s.trim().replace(xp,"").replace(bp,"");for(let l of mp(p)){let m=Tp(l);if(!m)continue;ot(t,{name:m.name,detail:m.type,has_argument:!0,source:i})}}function fs(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 ms=new Set(["TSAsExpression","TSSatisfiesExpression","TSNonNullExpression","TSTypeAssertion","TSInstantiationExpression"]);function xn(e){if(!e||typeof e!=="object")return;He(e,{enter(t){if(!ms.has(t.type))return;let n=t.expression;while(n&&ms.has(n.type))n=n.expression;if(n)this.replace(n)}})}function bn(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 lr(e,t){if(!t)return;He(t,{enter(n){if(n.type==="ImportDeclaration")bn(e,n);if(n.type==="FunctionDeclaration"){let r=n;if(r.id?.name)e.funcDecls.set(r.id.name,r)}}})}function gs(e,t,n){let r=t+1;while(r<e.length){if(e[r]==="\\"){r+=2;continue}if(e[r]===n)return r+1;r++}return r}function xs(e,t){let n=t+1,r=0;while(n<e.length){let i=e[n];if(i==="\\"){n+=2;continue}if(r===0){if(i==="`")return n+1;if(i==="$"&&e[n+1]==="{"){r=1,n+=2;continue}n++;continue}if(i==="{")r++;else if(i==="}")r--;else if(i==='"'||i==="'"){n=gs(e,n,i);continue}else if(i==="`"){n=xs(e,n);continue}n++}return n}function Ep(e,t){let n=[],r=e.length,i=0;while(i<r){let o=e[i];if(o==='"'||o==="'"){i=gs(e,i,o);continue}if(o==="`"){i=xs(e,i);continue}if(o==="/"&&e[i+1]==="/"){let s=i+2;while(s<r&&e[s]!==`
|
|
18
|
-
`)s++;i=s;continue}if(o==="/"&&e[i+1]==="*"){let s=i,p=i+2;while(p<r&&!(e[p]==="*"&&e[p+1]==="/"))p++;let l=Math.min(p+2,r),m=e.slice(s,l);n.push({end:l+t,isJsDoc:m.startsWith("/**")&&m.length>4,text:m}),i=l;continue}i++}return n}function ys(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 Sp(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)ys(r.declaration,r.start,t);else ys(r,r.start,t)}return t}function vp(e,t,n){let r;for(let i of e){if(i.end>t)break;if(!i.isJsDoc)continue;if(!sr.test(n.slice(i.end,t)))continue;r=i}return r}function bs(e,t){let n=new Map;if(!e.source)return n;let r=[e.parsed?.module,e.parsed?.instance],i=[],o=[];for(let s of r){let p=s?.content;if(!p?.body||p.start===void 0||p.end===void 0)continue;i.push(...Ep(e.source.slice(p.start,p.end),p.start)),o.push(...Sp(p.body))}i.sort((s,p)=>s.end-p.end);for(let s of o){let p=vp(i,s.start,e.source);if(!p)continue;let l=$t(p.text),{type:m,description:d,ignore:g,internal:y}=ar(l);if(g.length>0)st(e,"context-any-type",s.name,g);if(!m)continue;n.set(s.name,{type:t.aliasType(m.type),description:d||m.description,internal:y||void 0})}return n}var Cp={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 Ts(e,t){let n=Cp[e];if(!n)return!1;if(!t)return!0;return(n.direct??n.descendant??[]).includes(t)}var Cr={};Go(Cr,{Node:()=>Xt,Parser:()=>ae,Position:()=>At,SourceLocation:()=>Kt,TokContext:()=>Be,Token:()=>In,TokenType:()=>Y,defaultOptions:()=>En,getLineInfo:()=>xr,isIdentifierChar:()=>Ae,isIdentifierStart:()=>xe,isNewLine:()=>xt,keywordTypes:()=>Pn,lineBreak:()=>be,lineBreakG:()=>ws,nonASCIIwhitespace:()=>gr,parse:()=>al,parseExpressionAt:()=>ol,tokContexts:()=>se,tokTypes:()=>f,tokenizer:()=>cl,version:()=>oa});var Ap=[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],As=[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],Pp="·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ--ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・",Ps="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ--ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",ur={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"},dr="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",kp={5:dr,"5module":dr+" export import",6:dr+" const class extends export import super"},ks=/^in(stanceof)?$/,wp=new RegExp("["+Ps+"]"),_p=new RegExp("["+Ps+Pp+"]");function hr(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 xe(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&&wp.test(String.fromCharCode(e));if(t===!1)return!1;return hr(e,As)}function Ae(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&&_p.test(String.fromCharCode(e));if(t===!1)return!1;return hr(e,As)||hr(e,Ap)}var Y=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 Me(e,t){return new Y(e,{beforeExpr:!0,binop:t})}var Oe={beforeExpr:!0},Ce={startsExpr:!0},Pn={};function J(e,t){if(t===void 0)t={};return t.keyword=e,Pn[e]=new Y(e,t)}var f={num:new Y("num",Ce),regexp:new Y("regexp",Ce),string:new Y("string",Ce),name:new Y("name",Ce),privateId:new Y("privateId",Ce),eof:new Y("eof"),bracketL:new Y("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new Y("]"),braceL:new Y("{",{beforeExpr:!0,startsExpr:!0}),braceR:new Y("}"),parenL:new Y("(",{beforeExpr:!0,startsExpr:!0}),parenR:new Y(")"),comma:new Y(",",Oe),semi:new Y(";",Oe),colon:new Y(":",Oe),dot:new Y("."),question:new Y("?",Oe),questionDot:new Y("?."),arrow:new Y("=>",Oe),template:new Y("template"),invalidTemplate:new Y("invalidTemplate"),ellipsis:new Y("...",Oe),backQuote:new Y("`",Ce),dollarBraceL:new Y("${",{beforeExpr:!0,startsExpr:!0}),eq:new Y("=",{beforeExpr:!0,isAssign:!0}),assign:new Y("_=",{beforeExpr:!0,isAssign:!0}),incDec:new Y("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new Y("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:Me("||",1),logicalAND:Me("&&",2),bitwiseOR:Me("|",3),bitwiseXOR:Me("^",4),bitwiseAND:Me("&",5),equality:Me("==/!=/===/!==",6),relational:Me("</>/<=/>=",7),bitShift:Me("<</>>/>>>",8),plusMin:new Y("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:Me("%",10),star:Me("*",10),slash:Me("/",10),starstar:new Y("**",{beforeExpr:!0}),coalesce:Me("??",1),_break:J("break"),_case:J("case",Oe),_catch:J("catch"),_continue:J("continue"),_debugger:J("debugger"),_default:J("default",Oe),_do:J("do",{isLoop:!0,beforeExpr:!0}),_else:J("else",Oe),_finally:J("finally"),_for:J("for",{isLoop:!0}),_function:J("function",Ce),_if:J("if"),_return:J("return",Oe),_switch:J("switch"),_throw:J("throw",Oe),_try:J("try"),_var:J("var"),_const:J("const"),_while:J("while",{isLoop:!0}),_with:J("with"),_new:J("new",{beforeExpr:!0,startsExpr:!0}),_this:J("this",Ce),_super:J("super",Ce),_class:J("class",Ce),_extends:J("extends",Oe),_export:J("export"),_import:J("import",Ce),_null:J("null",Ce),_true:J("true",Ce),_false:J("false",Ce),_in:J("in",{beforeExpr:!0,binop:7}),_instanceof:J("instanceof",{beforeExpr:!0,binop:7}),_typeof:J("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:J("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:J("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},be=/\r\n?|\n|\u2028|\u2029/,ws=new RegExp(be.source,"g");function xt(e){return e===10||e===13||e===8232||e===8233}function _s(e,t,n){if(n===void 0)n=e.length;for(var r=t;r<n;r++){var i=e.charCodeAt(r);if(xt(i))return r<n-1&&i===13&&e.charCodeAt(r+1)===10?r+2:r+1}return-1}var gr=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,le=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,Ns=Object.prototype,{hasOwnProperty:Np,toString:Ip}=Ns,Pt=Object.hasOwn||function(e,t){return Np.call(e,t)},Es=Array.isArray||function(e){return Ip.call(e)==="[object Array]"},Ss=Object.create(null);function pt(e){return Ss[e]||(Ss[e]=new RegExp("^(?:"+e.replace(/ /g,"|")+")$"))}function Je(e){if(e<=65535)return String.fromCharCode(e);return e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320)}var Dp=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,At=function(t,n){this.line=t,this.column=n};At.prototype.offset=function(t){return new At(this.line,this.column+t)};var Kt=function(t,n,r){if(this.start=n,this.end=r,t.sourceFile!==null)this.source=t.sourceFile};function xr(e,t){for(var n=1,r=0;;){var i=_s(e,r,t);if(i<0)return new At(n,t-r);++n,r=i}}var En={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},vs=!1;function Lp(e){var t={};for(var n in En)t[n]=e&&Pt(e,n)?e[n]:En[n];if(t.ecmaVersion==="latest")t.ecmaVersion=1e8;else if(t.ecmaVersion==null){if(!vs&&typeof console==="object"&&console.warn)vs=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
|
|
19
|
-
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(
|
|
20
|
-
`,r-1)+1,this.options.locations)this.curLine=this.input.slice(0,this.lineStart).split(be).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"?bt:gt),this.regexpState=null,this.privateNameStack=[]},Ve={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}};ae.prototype.parse=function(){var t=this,n=this.options.program||this.startNode();return this.nextToken(),this.catchStackOverflow(function(){return t.parseTopLevel(n)})};Ve.inFunction.get=function(){return(this.currentVarScope().flags&bt)>0};Ve.inGenerator.get=function(){return(this.currentVarScope().flags&Is)>0};Ve.inAsync.get=function(){return(this.currentVarScope().flags&br)>0};Ve.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],n=t.flags;if(n&(Tt|zt))return!1;if(n&bt)return(n&br)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};Ve.allowReturn.get=function(){if(this.inFunction)return!0;if(this.options.allowReturnOutsideFunction&&this.currentVarScope().flags>)return!0;return!1};Ve.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags;return(t&kn)>0||this.options.allowSuperOutsideMethod};Ve.allowDirectSuper.get=function(){return(this.currentThisScope().flags&Ls)>0};Ve.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};Ve.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],n=t.flags;if(n&(Tt|zt)||n&bt&&!(n&Tr))return!0}return!1};Ve.allowUsing.get=function(){var e=this.currentScope(),t=e.flags;if(t&Rs)return!1;if(!this.inModule&&t>)return!1;return!0};Ve.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&Tt)>0};ae.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};ae.parse=function(t,n){return new this(n,t).parse()};ae.parseExpressionAt=function(t,n,r){var i=new this(r,t,n);return i.nextToken(),i.parseExpression()};ae.tokenizer=function(t,n){return new this(n,t)};Object.defineProperties(ae.prototype,Ve);var me=ae.prototype,Mp=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;me.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){le.lastIndex=e,e+=le.exec(this.input)[0].length;var t=Mp.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])==="use strict"){le.lastIndex=e+t[0].length;var n=le.exec(this.input),r=n.index+n[0].length,i=this.input.charAt(r);return i===";"||i==="}"||be.test(n[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(i)||i==="!"&&this.input.charAt(r+1)==="=")}if(e+=t[0].length,le.lastIndex=e,e+=le.exec(this.input)[0].length,this.input[e]===";")e++}};me.eat=function(e){if(this.type===e)return this.next(),!0;else return!1};me.isContextual=function(e){return this.type===f.name&&this.value===e&&!this.containsEsc};me.eatContextual=function(e){if(!this.isContextual(e))return!1;return this.next(),!0};me.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}};me.expectContextual=function(e){if(!this.eatContextual(e))this.unexpected()};me.canInsertSemicolon=function(){return this.type===f.eof||this.type===f.braceR||be.test(this.input.slice(this.lastTokEnd,this.start))};me.insertSemicolon=function(){if(this.canInsertSemicolon()){if(this.options.onInsertedSemicolon)this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc);return!0}};me.semicolon=function(){if(!this.eat(f.semi)&&!this.insertSemicolon())this.unexpected()};me.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}};me.expect=function(e){this.eat(e)||this.unexpected()};me.unexpected=function(e){this.raise(e!=null?e:this.start,"Unexpected token")};var _n=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};me.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")};me.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")};me.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")};me.isSimpleAssignTarget=function(e){if(e.type==="ParenthesizedExpression")return this.isSimpleAssignTarget(e.expression);return e.type==="Identifier"||e.type==="MemberExpression"};var L=ae.prototype;L.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 vr={kind:"loop"},Op={kind:"switch"};L.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;le.lastIndex=this.pos;var t=le.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(xe(r)){var i=n;do n+=r<=65535?1:2;while(Ae(r=this.fullCharCodeAt(n)));if(r===92)return!0;var o=this.input.slice(i,n);if(!ks.test(o))return!0}return!1};L.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;le.lastIndex=this.pos;var e=le.exec(this.input),t=this.pos+e[0].length,n;return!be.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)==="function"&&(t+8===this.input.length||!(Ae(n=this.fullCharCodeAt(t+8))||n===92))};L.isUsingKeyword=function(e,t){if(this.options.ecmaVersion<17||!this.isContextual(e?"await":"using"))return!1;le.lastIndex=this.pos;var n=le.exec(this.input),r=this.pos+n[0].length;if(be.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||Ae(o=this.fullCharCodeAt(i))||o===92)return!1;le.lastIndex=i;var s=le.exec(this.input);if(r=i+s[0].length,s&&be.test(this.input.slice(i,r)))return!1}var p=this.fullCharCodeAt(r);if(!xe(p)&&p!==92)return!1;var l=r;do r+=p<=65535?1:2;while(Ae(p=this.fullCharCodeAt(r)));if(p===92)return!0;var m=this.input.slice(l,r);if(ks.test(m))return!1;if(t&&!e&&m==="of"){le.lastIndex=r;var d=le.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};L.isAwaitUsing=function(e){return this.isUsingKeyword(!0,e)};L.isUsing=function(e){return this.isUsingKeyword(!1,e)};L.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){le.lastIndex=this.pos;var s=le.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 m=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(m){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(m==="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,m),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)}};L.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")};L.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")};L.parseDoStatement=function(e){if(this.next(),this.labels.push(vr),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")};L.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(vr),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 m=this.containsEsc,d=new _n,g=this.start,y=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(y.start===g&&!m&&y.type==="Identifier"&&y.name==="async")this.unexpected();else if(this.options.ecmaVersion>=9)e.await=!1}if(o&&s)this.raise(y.start,"The left-hand side of a for-of loop may not start with 'let'.");return this.toAssignable(y,!1,d),this.checkLValPattern(y),this.parseForIn(e,y)}else this.checkExpressionErrors(d,!0);if(t>-1)this.unexpected(t);return this.parseFor(e,y)};L.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)};L.parseFunctionStatement=function(e,t,n){return this.next(),this.parseFunction(e,Wt|(n?0:fr),!1,t)};L.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")};L.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")};L.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(f.braceL),this.labels.push(Op),this.enterScope(Rs);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")};L.parseThrowStatement=function(e){if(this.next(),be.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 Bp=[];L.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type==="Identifier";return this.enterScope(t?Ds:0),this.checkLValPattern(e,t?Os:Qe),this.expect(f.parenR),e};L.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")};L.parseVarStatement=function(e,t,n){return this.next(),this.parseVar(e,!1,t,n),this.semicolon(),this.finishNode(e,"VariableDeclaration")};L.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(vr),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")};L.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")};L.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")};L.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 m=this.labels[l];if(m.statementStart===e.start)m.statementStart=this.start,m.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")};L.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")};L.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")};L.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")};L.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")};L.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};L.parseVarId=function(e,t){e.id=t==="using"||t==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(e.id,t==="var"?Sr:Qe,!1)};var Wt=1,fr=2,Fs=4;L.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&fr)this.unexpected();e.generator=this.eat(f.star)}if(this.options.ecmaVersion>=8)e.async=!!r;if(t&Wt){if(e.id=t&Fs&&this.type!==f.name?null:this.parseIdent(),e.id&&!(t&fr))this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?Sr:Qe:Ms)}var o=this.yieldPos,s=this.awaitPos,p=this.awaitIdentPos;if(this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Er(e.async,e.generator)),!(t&Wt))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&Wt?"FunctionDeclaration":"FunctionExpression")};L.parseFunctionParams=function(e){this.expect(f.parenL),e.params=this.parseBindingList(f.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};L.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"&&Fp(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")};L.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 m=!n.static&&vn(n,"constructor"),d=m&&e;if(m&&s!=="method")this.raise(n.key.start,"Constructor can't have get/set modifier");n.kind=m?"constructor":s,this.parseClassMethod(n,i,o,d)}else this.parseClassField(n);return n};L.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};L.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)};L.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&&vn(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")};L.parseClassField=function(e){if(vn(e,"constructor"))this.raise(e.key.start,"Classes can't have a field named 'constructor'");else if(e.static&&vn(e,"prototype"))this.raise(e.key.start,"Classes can't have a static field named 'prototype'");if(this.eat(f.eq))this.enterScope(zt|kn),e.value=this.parseMaybeAssign(),this.exitScope();else e.value=null;return this.semicolon(),this.finishNode(e,"PropertyDefinition")};L.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;this.labels=[],this.enterScope(Tt|kn);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")};L.parseClassId=function(e,t){if(this.type===f.name){if(e.id=this.parseIdent(),t)this.checkLValSimple(e.id,Qe,!1)}else{if(t===!0)this.unexpected();e.id=null}};L.parseClassSuper=function(e){e.superClass=this.eat(f._extends)?this.parseExprSubscripts(null,!1):null};L.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared};L.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(!Pt(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 Fp(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 vn(e,t){var{computed:n,key:r}=e;return!n&&(r.type==="Identifier"&&r.name===t||r.type==="Literal"&&r.value===t)}L.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")};L.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")};L.parseExportDeclaration=function(e){return this.parseStatement(null)};L.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,Wt|Fs,!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}};L.checkExport=function(e,t,n){if(!e)return;if(typeof t!=="string")t=t.type==="Identifier"?t.name:t.value;if(Pt(e,t))this.raiseRecoverable(n,"Duplicate export '"+t+"'");e[t]=!0};L.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)};L.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)}};L.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()};L.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")};L.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};L.parseImport=function(e){if(this.next(),this.type===f.string)e.specifiers=Bp,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")};L.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,Qe),this.finishNode(e,"ImportSpecifier")};L.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,Qe),this.finishNode(e,"ImportDefaultSpecifier")};L.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual("as"),e.local=this.parseIdent(),this.checkLValSimple(e.local,Qe),this.finishNode(e,"ImportNamespaceSpecifier")};L.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};L.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(Pt(t,i))this.raiseRecoverable(r.key.start,"Duplicate attribute key '"+i+"'");t[i]=!0,e.push(r)}return e};L.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")};L.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===f.string){var e=this.parseLiteral(this.value);if(Dp.test(e.value))this.raise(e.start,"An export name cannot include a lone surrogate.");return e}return this.parseIdent(!0)};L.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)};L.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 je=ae.prototype;je.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};je.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};je.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")};je.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")};je.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()};je.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};je.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t};je.parseBindingListItem=function(e){return e};je.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")};je.checkLValSimple=function(e,t,n){if(t===void 0)t=Sn;var r=t!==Sn;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===Qe&&e.name==="let")this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name");if(n){if(Pt(n,e.name))this.raiseRecoverable(e.start,"Argument name clash");n[e.name]=!0}if(t!==Bs)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")}};je.checkLValPattern=function(e,t,n){if(t===void 0)t=Sn;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)}};je.checkLValInnerPattern=function(e,t,n){if(t===void 0)t=Sn;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 Be=function(t,n,r,i,o){this.token=t,this.isExpr=!!n,this.preserveSpace=!!r,this.override=i,this.generator=!!o},se={b_stat:new Be("{",!1),b_expr:new Be("{",!0),b_tmpl:new Be("${",!1),p_stat:new Be("(",!1),p_expr:new Be("(",!0),q_tmpl:new Be("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new Be("function",!1),f_expr:new Be("function",!0),f_expr_gen:new Be("function",!0,!1,null,!0),f_gen:new Be("function",!1,!1,null,!0)},kt=ae.prototype;kt.initialContext=function(){return[se.b_stat]};kt.curContext=function(){return this.context[this.context.length-1]};kt.braceIsBlock=function(e){var t=this.curContext();if(t===se.f_expr||t===se.f_stat)return!0;if(e===f.colon&&(t===se.b_stat||t===se.b_expr))return!t.isExpr;if(e===f._return||e===f.name&&this.exprAllowed)return be.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===se.b_stat;if(e===f._var||e===f._const||e===f.name)return!1;return!this.exprAllowed};kt.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};kt.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};kt.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===se.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)?se.b_stat:se.b_expr),this.exprAllowed=!0};f.dollarBraceL.updateContext=function(){this.context.push(se.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?se.p_stat:se.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()!==se.p_stat)&&!(e===f._return&&be.test(this.input.slice(this.lastTokEnd,this.start)))&&!((e===f.colon||e===f.braceL)&&this.curContext()===se.b_stat))this.context.push(se.f_expr);else this.context.push(se.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()===se.q_tmpl)this.context.pop();else this.context.push(se.q_tmpl);this.exprAllowed=!1};f.star.updateContext=function(e){if(e===f._function){var t=this.context.length-1;if(this.context[t]===se.f_expr)this.context[t]=se.f_expr_gen;else this.context[t]=se.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 V=ae.prototype;V.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};V.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})};V.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 _n,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 m=this.parseMaybeConditional(e,t);if(n)m=n.call(this,m,p,l);if(this.type.isAssign){var d=this.startNodeAt(p,l);if(d.operator=this.value,this.type===f.eq)m=this.toAssignable(m,!1,t);if(!r)t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1;if(t.shorthandAssign>=m.start)t.shorthandAssign=-1;if(this.type===f.eq)this.checkLValPattern(m);else this.checkLValSimple(m);if(d.left=m,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 m};V.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};V.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)};V.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 m=this.start,d=this.startLoc,g=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,i),m,d,o,i),y=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(y,t,n,r,i)}}return e};V.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")};V.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"&&Vs(p.argument))this.raiseRecoverable(p.start,"Deleting local variable in strict mode");else if(p.operator==="delete"&&mr(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 m=this.startNodeAt(i,o);m.operator=this.value,m.prefix=!1,m.argument=s,this.checkLValSimple(s),this.next(),s=this.finishNode(m,"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 Vs(e){return e.type==="Identifier"||e.type==="ParenthesizedExpression"&&Vs(e.expression)}function mr(e){return e.type==="MemberExpression"&&e.property.type==="PrivateIdentifier"||e.type==="ChainExpression"&&mr(e.expression)||e.type==="ParenthesizedExpression"&&mr(e.expression)}V.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};V.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}};V.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(f.arrow)};V.parseSubscriptAsyncArrow=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!0,r)};V.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 m=this.eat(f.bracketL);if(m||l&&this.type!==f.parenL&&this.type!==f.backQuote||this.eat(f.dot)){var d=this.startNodeAt(t,n);if(d.object=e,m)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=!!m,p)d.optional=l;e=this.finishNode(d,"MemberExpression")}else if(!r&&this.eat(f.parenL)){var g=new _n,y=this.yieldPos,T=this.awaitPos,k=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var w=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=y,this.awaitPos=T,this.awaitIdentPos=k,this.parseSubscriptAsyncArrow(t,n,w,s)}this.checkExpressionErrors(g,!0),this.yieldPos=y||this.yieldPos,this.awaitPos=T||this.awaitPos,this.awaitIdentPos=k||this.awaitIdentPos;var A=this.startNodeAt(t,n);if(A.callee=e,A.arguments=w,p)A.optional=l;e=this.finishNode(A,"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 D=this.startNodeAt(t,n);D.tag=e,D.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(D,"TaggedTemplateExpression")}return e};V.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(se.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 m=this.value;return r=this.parseLiteral(m.value),r.regex={pattern:m.pattern,flags:m.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(se.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()}};V.parseExprAtomDefault=function(){this.unexpected()};V.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()};V.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")};V.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")};V.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")};V.parseParenExpression=function(){this.expect(f.parenL);var e=this.parseExpression();return this.expect(f.parenR),e};V.shouldParseArrow=function(e){return!this.canInsertSemicolon()};V.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=[],m=!0,d=!1,g=new _n,y=this.yieldPos,T=this.awaitPos,k;this.yieldPos=0,this.awaitPos=0;while(this.type!==f.parenR)if(m?m=!1:this.expect(f.comma),o&&this.afterTrailingComma(f.parenR,!0)){d=!0;break}else if(this.type===f.ellipsis){if(k=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 w=this.lastTokEnd,A=this.lastTokEndLoc;if(this.expect(f.parenR),e&&this.shouldParseArrow(l)&&this.eat(f.arrow))return this.checkPatternErrors(g,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=y,this.awaitPos=T,this.parseParenArrowList(n,r,l,t);if(!l.length||d)this.unexpected(this.lastTokStart);if(k)this.unexpected(k);if(this.checkExpressionErrors(g,!0),this.yieldPos=y||this.yieldPos,this.awaitPos=T||this.awaitPos,l.length>1)i=this.startNodeAt(s,p),i.expressions=l,this.finishNodeAt(i,"SequenceExpression",w,A);else i=l[0]}else i=this.parseParenExpression();if(this.options.preserveParens){var D=this.startNodeAt(n,r);return D.expression=i,this.finishNode(D,"ParenthesizedExpression")}else return i};V.parseParenItem=function(e){return e};V.parseParenArrowList=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!1,r)};var Vp=[];V.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=Vp;return this.finishNode(e,"NewExpression")};V.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,`
|
|
7
|
+
}`:`{ ${r} }`}var wc=/[A-Za-z_$][\w$]*/g;function _c(e,t){if(!t)return!1;let n=new Set(t[0].split(",").map((r)=>r.trim()));for(let[r]of e.matchAll(wc))if(n.has(r))return!0;return!1}function tr(e,t){if(t===void 0)return;return e.runesPropsDeclarationMetadataByDeclaratorStart.get(t)}function qi(e,t,n){return tr(e,t)?.props.get(n)}function Ui(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 Gi(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 Gi(e.left);return}function mt(e,t){let n=t?.start,r=t?.end;if(n===void 0||r===void 0)return;return se(e,n+1,r)?.trim()}function Wi(e,t){let n=t?.start,r=t?.end;if(n===void 0||r===void 0)return;return se(e,n,r)?.trim()}function Ne(e,t,n,r,i=new Set){if(!t?.type)return;switch(t.type){case"TSInterfaceDeclaration":Ne(e,{type:"TSTypeLiteral",members:t.body?.body},n,r,i);return;case"TSTypeAliasDeclaration":case"TSParenthesizedType":case"TSTypeAnnotation":Ne(e,t.typeAnnotation,n,r,i);return;case"TSIntersectionType":case"TSUnionType":for(let o of t.types??[])Ne(e,o,n,r,i);return;case"TSTypeLiteral":for(let o of t.members??[]){if(o?.type!=="TSPropertySignature")continue;Ne(e,o.typeAnnotation?.typeAnnotation,n,r,i)}return;case"TSTypeReference":{let o=Gi(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),Ne(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 l of s.params??[])Ne(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 of Object.values(t)){if(!o||typeof o!=="object")continue;if(Array.isArray(o)){for(let s of o){if(!s||typeof s!=="object"||!("type"in s))continue;Ne(e,s,n,r,i)}continue}if("type"in o)Ne(e,o,n,r,i)}}function Nc(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 l=n.get(s.source)??{default:[],named:[],namespace:[]};if(s.specifierType==="default")l.default.push(s.localName);else if(s.specifierType==="namespace")l.namespace.push(s.localName);else l.named.push({imported:s.importedName,local:s.localName});n.set(s.source,l)}return Array.from(n.entries()).sort(([r],[i])=>r.localeCompare(i)).map(([r,i])=>{if(i.namespace.length>0)return i.namespace.map((p)=>`import type * as ${p} from "${r}";`).join(`
|
|
8
|
+
`);let o=i.named.map(({imported:p,local:m})=>{if(!p||p===m)return m;return`${p} as ${m}`}),s=i.default[0],l=o.length>0?`{ ${o.join(", ")} }`:"";if(s&&l)return`import type ${s}, ${l} from "${r}";`;if(s)return`import type ${s} from "${r}";`;return`import type ${l} from "${r}";`})}function vt(e,t){if(t)e.additionalTypeDependencyNodes.push(t)}function Ic(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 Ki(e,t){let n=Ic(t);if(n)return n;if(t.start===void 0||t.end===void 0)return;let r=se(e,t.start,t.end)?.trim();return r?`declare ${r}`:void 0}function nr(e,t){let n=!1,r=[];for(let o of t.params??[]){if(o.type==="RestElement"){let y=o.argument?.name??"rest",x=mt(e,o.typeAnnotation);if(x)n=!0;vt(e,o.typeAnnotation?.typeAnnotation),r.push(`...${y}: ${x??"any[]"}`);continue}let s=o.type==="AssignmentPattern",l=s?o.left:o,p=l?.name??"arg",m=mt(e,l?.typeAnnotation);if(m)n=!0;vt(e,l?.typeAnnotation?.typeAnnotation);let d=s||o.optional===!0;r.push(`${p}${d?"?":""}: ${m??"any"}`)}let i=mt(e,t.returnType);if(i)n=!0;return vt(e,t.returnType?.typeAnnotation),{signature:`(${r.join(", ")}) => ${i??"any"}`,hasAnnotations:n}}function zi(e){let t=e.pendingCallDefaultCandidates.length>0?e.pendingCallDefaultCandidates.slice():void 0,n=e.pendingContextKeyCandidates.length>0?e.pendingContextKeyCandidates.slice():void 0,r={...t?{pendingCallDefaultCandidates:t}:{},...n?{pendingContextKeyCandidates:n}:{}},i=t!==void 0||n!==void 0,o=new Set,s=new Set;for(let d of e.additionalTypeDependencyNodes)Ne(e,d,o,s);let l=e.typedRunesPropsDeclarations.length===1?e.typedRunesPropsDeclarations[0]:void 0,p=l?.canonicalType;if(l&&p){for(let d of l.referencedImportedTypes)o.add(d);for(let d of l.referencedLocalTypes)s.add(d)}if(!p&&o.size===0&&s.size===0)return i?{canonicalPropNames:[],localTypeDeclarations:[],typeImportStatements:[],...r}:void 0;let m=Array.from(s).map((d)=>e.localTypeDeclarationsByName.get(d)).filter((d)=>d!==void 0).sort((d,y)=>d.start-y.start).map((d)=>d.code);return{...p?{canonicalPropsType:p}:{},canonicalPropNames:l&&p?Array.from(l.props.keys()).sort():[],localTypeDeclarations:m,typeImportStatements:Nc(e,o),referencesComponentGenerics:p?_c(p,e.generics):!1,...r}}var Dc=/^[A-Za-z_$][\w$]*/,Lc=/[A-Za-z_$][\w$]*/g,Xi=/^(?:const|in|out)\s+/;function We(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 Ji(e){let t=We(e).map((r)=>r.trim()).filter((r)=>r.length>0);if(t.length===0)return null;return[t.map((r)=>{let i=r;while(Xi.test(i))i=i.replace(Xi,"");return i.match(Dc)?.[0]??r}).join(", "),t.join(", ")]}function Yi(e,t,n){let r=e.scriptGenericsAttribute?.value;if(!r)return;for(let[i]of r.matchAll(Lc)){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),Ne(e,o.node,t,n)}}var rr=/^\s+/,Zi=/\s/,Rc=/^@[^\s/]+(?=\s|$)/,Mc=/^@(\S+)\s*/;function Qi(e){let t=0;while(t<e.length){let n=e.charCodeAt(t);if(n!==32&&n!==9&&n!==13&&n!==10&&!Zi.test(e[t]))break;t++}return t}function Oc(e,t){let n=e.slice(Qi(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,Qi(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 Bc(e,t,n){let r=n>t&&e.charCodeAt(n-1)===13?n-1:n;return e.slice(t,r)}function Fc(e){let t=[],n=0;while(!0){let r=e.indexOf("/**",n);if(r===-1)break;let i=e.lastIndexOf(`
|
|
9
|
+
`,r-1)+1;if(e.charCodeAt(r+3)===42||e.slice(i,r).trim()!==""){n=r+1;continue}let o=[],s=i,l=!1,p=0;while(s<=e.length){let m=e.indexOf(`
|
|
10
|
+
`,s),d=m===-1?e.length:m,y=Bc(e,s,d),{indent:x,separator:E,content:P}=Oc(y,o.length===0);o.push({raw:y,start:s,number:o.length,indent:x,separator:E,content:P});let w=y.trimEnd();if(w.endsWith("*/")){l=!0,p=s+w.length,n=d;break}if(m===-1)break;s=m+1}if(!l)break;t.push({start:r,end:p,lines:o})}return t}function Vc(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 jc(e){let t=[[]],n=!1;for(let r of e){if(Rc.test(r.content)&&!n)t.push([r]);else t[t.length-1].push(r);if($c(r.content,"```")%2===1)n=!n}return t}function $c(e,t){let n=0,r=e.indexOf(t);while(r!==-1)n++,r=e.indexOf(t,r+t.length);return n}function es(e){return e.map((t)=>t.indent+t.content).join(`
|
|
11
|
+
`)}function Hc(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 p=e[o].content,m=0;for(let d of p){if(d==="{")r++;else if(d==="}")r--;if(m++,r===0)break}if(i.push(m),r===0)break}if(r!==0)return null;let s=o;return{type:i.map((p,m)=>{let d=n+m,y=e[d].content.slice(0,p);return e[d].content=e[d].content.slice(p).replace(rr,""),m===0?y:e[d].indent+y}).join(`
|
|
12
|
+
`).slice(1,-1),endIndex:s}}function qc(e){let t=e.content.match(rr)?.[0]??"",n=e.content.slice(t.length),r=0,i=0;for(let m of n){if(r===0&&Zi.test(m))break;if(m==="[")r++;if(m==="]")r--;i++}let o=r===0?n.slice(0,i):"";if(!o)return null;let s=o,l=!1,p;if(o.startsWith("[")&&o.endsWith("]")){l=!0;let d=o.slice(1,-1).split("=");if(s=d[0].trim(),d.length>1)p=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(rr,""),{name:s,optional:l,default:p}}function Uc(e){let t=e[0],n=t.content.match(Mc),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),l=(o?[o,...s]:s).join(`
|
|
13
|
+
`);t.content=i,t.tag=r;let p=Hc(e,0),m=p?.type??"",d=0;if(p){d=p.endIndex;while(d<e.length-1&&e[d].content.trim()==="")d++}let y=qc(e[d]),x=es(e.slice(p?p.endIndex:0));return{tag:r,name:y?.name??"",type:m,optional:y?.optional??!1,default:y?.default,description:x,raw:l,lines:e}}function Gc(e,t,n){let r=Vc(e);r.forEach((s,l)=>{s.number=l});let i=jc(r),o=i.slice(1).map(Uc);return{description:es(i[0]),tags:o,start:t,end:n,lines:r}}function ir(e){return Fc(e).map(({start:t,end:n,lines:r})=>Gc(r,t,n))}var Wc=null;function Kc(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=un(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=se(e,n.start,n.end);return r}function zc(e,t,n){if(!Ae(n))return null;let r=Vt(e,n.name);if(Xe(r))return sr(e,t,r).slot_props;let i=t.findVariableTypeAndDescription(n.name);if(!i)return null;let o=dn(i.type);if(!o)return null;let s={};for(let l of o)s[l.name]={value:l.type,replace:!1};return s}function sr(e,t,n){let r={},i=!1;for(let o of n.properties){if(o.type==="SpreadElement"){let l=zc(e,t,o.argument);if(l)Object.assign(r,l);else i=!0,ae(e,"spread-unresolved","slot_props",`Slot props spread a value sveld can't resolve; its shape is widened to "Record<string, any>".`,ie(e,o));continue}if(o.type!=="Property"||o.computed)continue;let s=t.getPropertyName(o.key);if(!s)continue;r[s]=Kc(e,t,o.value)}return{slot_props:r,hasUnresolvedSpread:i}}function Xc(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=Xc(e,r.callee);if(!i)return null;return{...i,arguments:r.arguments}}function Ht(e,{slot_name:t,slot_props:n,slot_props_unresolved_spread:r,slot_fallback:i,slot_description:o,slot_deprecated:s,slot_tags:l,slot_internal:p,source:m}){let d=t===void 0||t==="",y=d?Wc:t??"",x=Re(i),E=n===void 0||n===""?void 0:n,P=o?.trim()||void 0;if(e.slots.has(y)){let w=e.slots.get(y);if(w)e.slots.set(y,{...w,default:w.default??d,fallback:x,slot_props:w.slot_props===void 0?E:w.slot_props,slot_props_unresolved_spread:w.slot_props_unresolved_spread||r,description:w.description||P,deprecated:w.deprecated??s,tags:w.tags||l,...w.internal||p?{internal:!0}:{},source:m||w.source})}else e.slots.set(y,{name:y,default:d,fallback:x,slot_props:E,slot_props_unresolved_spread:r,description:P,deprecated:s,tags:l,...p?{internal:!0}:{},source:m})}var Jc=/\s*=\s*/;function ns(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=We(r).map((o)=>o.trim().replace(Jc," = ")).join(", ");return`${n}<${i}>`}var ar=/^\s*$/,Yc=/;$/,Qc=/^-\s*/;function Je(e){if(e===void 0)return;let t=e.replace(Qc,"").trim();return t===""?"":t}function yt(e){if(!e||e.length===0)return;return e[0].content}var rs=new Set(["since","example","see"]),Zc=new Set(["bindable","default","required"]);function el(e){let t=e.trim();return t===""?!0:t}function is(e,t){return el(`${e??""}${t?` ${t}`:""}`)}function tl(e){let t=e.trim().replace(Yc,"").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 nl(e){let t=e;if(!t.startsWith("/*"))t=`/*${t}`;if(!t.endsWith("*/"))t+="*/";return t}var rl=new Set(["type","param","returns","return","extends","extendProps","restProps","slot","snippet","event","typedef","callback","bindable","deprecated","ignore","internal","csspart","cssprop","cssproperty"]);function or(e,t){let n=e.parsedJsDocByText.get(t);if(n===void 0)n=ir(t),e.parsedJsDocByText.set(t,n);return n}function cr(e){let t=e[0]?.tags??[],n,r=[],i,o,s,l=!1,p=[],m=[],d=[];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??=is(y.name,y.description);else if(y.tag==="ignore"||y.tag==="internal")l=!0;else if(y.tag==="sveld-ignore")d.push(y.name);else if(rs.has(y.tag))m.push(y);else if(y.tag==="bindable"){if(y.type)continue;let x=`${y.name}${y.description?` ${y.description}`:""}`.trim();if(x==="readonly"||x==="writable")o??=x}else if(!rl.has(y.tag))p.push(y);return{type:n,param:r,returns:i,binding:o,deprecated:s,internal:l,additional:p,passthrough:m,ignore:d,description:e[0]?.description}}function il(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 sl(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 ss(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(ar.test(o))return i}return}function al(e){let t=new Set;for(let n of e.funcDecls.values()){let{leadingComments:r,start:i}=n,o=ss(e,r,i);if(o)t.add(o.start)}return t}function ct(e,t,n){if(!n?.leadingComments)return;let r=ss(e,n.leadingComments,n.start);if(!r)return;return ol(e,t,[r])}function as(e,t,n){if(!n?.leadingComments)return;return ct(e,t,n)}function ol(e,t,n){if(!n)return;let r=sl(n);if(!r)return;let i=il(e,r)??or(e,nl(r.value)),{type:o,param:s,returns:l,binding:p,deprecated:m,internal:d,additional:y,passthrough:x,ignore:E,description:P}=cr(i),w,A,O,j;if(o)w=t.aliasType(o.type);if(s.length>0)A=s.filter((I)=>!I.name.includes(".")).map((I)=>({name:I.name,type:t.aliasType(I.type),description:Je(I.description),optional:I.optional||!1}));if(l)O=t.aliasType(l.type);let N=Re(P?.trim());if(N||y.length>0){let I=[];if(N)I.push(N);for(let ce of y){let ge=`@${ce.tag}${ce.name?` ${ce.name}`:""}${ce.description?` ${ce.description}`:""}`;I.push(ge)}j=I.join(`
|
|
14
|
+
`)}let X=x.length>0?x.map((I)=>({name:I.tag,body:I.raw})):void 0;return{type:w,params:A,returnType:O,description:j,binding:p,deprecated:m,tags:X,sveldIgnore:E.length>0?E:void 0,internal:d}}function os(e,t,n=e.source){if(!n)return;let r=!1,i=!1,o=!1,s=new Set,l=()=>{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.`)}},p=(P,w)=>{if(s.has(P))ae(e,"generics-conflict",P,`Duplicate generic name "${P}".`,w);else s.add(P)},m=(P,w)=>{if(e.generics){let O=We(e.generics[0]).map((j)=>j.trim()).indexOf(P.trim());if(O!==-1){let j=We(e.generics[1]).map((N)=>N.trim());j[O]=w,e.generics=[e.generics[0],j.join(", ")];return}}t.accumulateGeneric(P,w)},d=(P,w)=>{if(e.typedefs.has(P))ae(e,"typedef-duplicate",P,`Duplicate typedef/callback name "${P}"; the later declaration overwrites the earlier one.`,w)},y=(P,w,A,O)=>{let j=P.findIndex((N)=>N.name===w.name);if(j===-1)P.push(w);else{let N=A?` of "${A}"`:"";ae(e,"property-duplicate",w.name,`Duplicate property "${w.name}"${N}; the later declaration overwrites the earlier one.`,O),P[j]=w}},x=al(e),E=ir(n);for(let P of E)e.jsDocBlocksByStart.set(P.start,P);for(let{tags:P,description:w,lines:A,start:O}of E){let j=x.has(O),N,X,I,ce,ge=!1,xe,a,c=[],u=[],h=[],g,T,b,v,C=[],S=!1,k=[],_,D,H,q=[],G=!1,re=[],V,Y,le=!1,ee=!0,Q=[],ft,He=!1,Ue=new Map,ln=new Set,Ot=new Set;for(let B of P)if(B.lines.length>0)ln.add(B.lines[0].number);for(let B of A)if(!B.tag&&B.content&&B.content.trim()!=="}")Ue.set(B.number,B.content);let Un=(B)=>{if(!B||B.length===0)return;let ve=B[0].number,U=[],we=[],ze=!1;for(let Z=ve-1;Z>=0;Z--){if(ln.has(Z))break;let _e=Ue.get(Z);if(_e)U.unshift(_e),we.unshift(Z),ze=!0;else if(ze){let te=A[Z];if(!(!te||!te.tag&&(!te.content||te.content.trim()==="")))break}}if(U.length===0)return;for(let Z of we)Ot.add(Z);return U.join(`
|
|
15
|
+
`).trim()},hi=()=>{if(N!==void 0){let B=X&&X!=="object"&&X!=="Object"?X:void 0,ve;if(B)ve=B;else if(h.length>0)ve=yn(h,N,!0);else ve=X||"";if(a!==void 0){let U;for(let Z of P){let _e=Z.lines[0]?.number;if(typeof _e!=="number")continue;if(_e<=a)continue;if(Z.tag==="property"||Z.tag==="type")continue;U=_e;break}let we=[],ze=Array.from(Ue.keys()).sort((Z,_e)=>Z-_e);for(let Z of ze){if(Z<=a)continue;if(U!==void 0&&Z>=U)continue;if(Ot.has(Z))continue;let te=Ue.get(Z)?.trim();if(te)we.push(te),Ot.add(Z)}if(we.length>0){let Z=we.join(`
|
|
16
|
+
`);I=I?`${I}
|
|
17
|
+
${Z}`:Z}}ot(e,{name:N,detail:ve,has_argument:!1,description:I,deprecated:ce,tags:c.length>0?c:void 0,internal:ge||void 0,source:xe}),e.eventDescriptions.set(N,I),e.jsDocEventNames.add(N),e.jsDocEventSources.set(N,xe),st(e,"event-no-source",N,u),h.length=0,N=void 0,X=void 0,I=void 0,ce=void 0,ge=!1,xe=void 0,a=void 0,c=[],u=[]}},fi=()=>{if(g!==void 0){let B,ve;if(k.length>0)B=yn(k,void 0,!0),ve=`type ${g} = ${B};`;else if(T)B=T,ve=tl(B)?`interface ${g} ${B}`:`type ${g} = ${B};`;else B="{}",ve=`type ${g} = ${B};`;d(g,v),e.typedefs.set(g,{type:B,name:g,description:Re(b),ts:ve,tags:C.length>0?C:void 0,...S?{internal:!0}:{},source:v}),k.length=0,g=void 0,T=void 0,b=void 0,v=void 0,C=[],S=!1}},mi=()=>{if(_!==void 0){let U=`(${re.map(({name:ze,type:Z,optional:_e})=>`${ze}${_e?"?":""}: ${Z}`).join(", ")}) => ${V||"void"}`,we=`type ${_} = ${U};`;d(_,H),e.typedefs.set(_,{type:U,name:_,description:Re(D),ts:we,tags:q.length>0?q:void 0,...G?{internal:!0}:{},source:H}),re.length=0,V=void 0,_=void 0,D=void 0,H=void 0,q=[],G=!1}},Go=P.some((B)=>B.tag==="slot"||B.tag==="snippet"),Wo=P.some((B)=>B.tag==="extends"||B.tag==="extendProps"),Ko=P.some((B)=>B.tag==="slot"||B.tag==="snippet"||B.tag==="event"||B.tag==="typedef"||B.tag==="callback");for(let{tag:B,type:ve,name:U,description:we,optional:ze,default:Z,raw:_e,lines:te}of P){let be=t.aliasType(ve),Bt=Un(te);switch(B){case"extends":case"extendProps":if(e.extends!==void 0)ae(e,"extend-props-duplicate",U,`A second @extends/@extendProps tag ("${U}") overwrote the first ("${e.extends.interface}"); only one is used.`,Le(e,te));if(e.extends={interface:U,import:be},ee)ee=!1;break;case"restProps":{let ne=U?we?`${U} ${we}`:U:we,nt=Je(ne)||Bt;if(!nt&&ee&&!le&&w)nt=w,le=!0;if(e.rest_props={type:"Element",name:be,description:nt||void 0},ee)ee=!1;break}case"slot":case"snippet":{let Ce=Je(yt(te));if(!Ce&&ee&&!le&&w)Ce=w,le=!0;if(!Ce&&Q.length===0)Ce=Bt;if(ee)ee=!1;let nt=be;if(!nt)nt="Record<string, never>",ae(e,"slot-missing-type",U||"default",`@${B}${U?` "${U}"`:""} is missing a required {Type} annotation; falling back to "${nt}".`,Le(e,te));Ht(e,{slot_name:U,slot_props:nt,slot_description:Ce||void 0,slot_deprecated:ft,slot_tags:Q.length>0?[...Q]:void 0,slot_internal:He||void 0,source:Le(e,te)}),Q.length=0,ft=void 0,He=!1;{let zo=U===void 0||U===""?null:U;Y=(Xo)=>{let Gn=e.slots.get(zo);if(Gn)Gn.tags=[...Gn.tags??[],Xo]}}break}case"csspart":{let ne=Je(yt(te));e.cssParts.push({name:U,...ne?{description:ne}:{}});break}case"cssprop":case"cssproperty":{let ne=Je(yt(te));e.cssProperties.push({name:U,...be?{type:be}:{},...Z===void 0?{}:{default:Z},...ne?{description:ne}:{}});break}case"event":{if(hi(),N=U,X=be,a=te.length>0?te[0].number:void 0,I=Je(yt(te))||Bt,!I&&ee&&!le&&w)I=w,le=!0;if(xe=Le(e,te),Q.length>0)c.push(...Q),Q.length=0;if(Y=(Ce)=>c.push(Ce),ee)ee=!1;break}case"type":if(N!==void 0)X=be;break;case"param":if(_!==void 0)re.push({name:U,type:be,optional:ze||!1});break;case"returns":case"return":if(_!==void 0)V=be;break;case"property":{let ne={name:U,type:be,description:Je(yt(te)),optional:ze||!1,default:Z};if(N!==void 0)y(h,ne,N,Le(e,te));else if(g!==void 0)y(k,ne,g,Le(e,te));break}case"typedef":{if(fi(),g=ns(U),T=be,v=Le(e,te),b=Je(yt(te))||Bt,!b&&ee&&!le&&w)b=w,le=!0;if(Q.length>0)C.push(...Q),Q.length=0;if(S=He,He=!1,Y=(Ce)=>C.push(Ce),ee)ee=!1;break}case"callback":{if(mi(),_=ns(U),H=Le(e,te),D=Je(yt(te))||Bt,!D&&ee&&!le&&w)D=w,le=!0;if(Q.length>0)q.push(...Q),Q.length=0;if(G=He,He=!1,Y=(Ce)=>q.push(Ce),ee)ee=!1;break}case"generics":{let ne=be||U;for(let Ce of We(U))p(Ce.trim(),Le(e,te));if(r=!0,l(),m(U,ne),ee)ee=!1;break}case"template":{let ne=U;if(be)ne=`${U} extends ${be}`;if(Z)ne+=` = ${Z}`;if(Go&&!Wo){e.deferredSlotBlockGenerics.push({name:U,constraint:ne});break}if(j)break;if(p(U,Le(e,te)),i=!0,l(),m(U,ne),ee)ee=!1;break}case"deprecated":{let ne=is(U,we);if(N===void 0)ft??=ne;else ce??=ne;break}case"ignore":case"internal":{if(N===void 0)He=!0;else ge=!0;break}case"sveld-ignore":if(N!==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 ne={name:B,body:_e};if(!rs.has(B)&&!Zc.has(B))ae(e,"jsdoc-unknown-tag",B,`Unknown JSDoc tag "@${B}"; passed through unchanged. If this is a typo, fix the tag name.`,Le(e,te));if(Y)Y(ne);else Q.push(ne)}break}}if(hi(),fi(),mi(),Ko&&Q.length>0){for(let B of Q)ae(e,"jsdoc-tag-dropped",B.name,`@${B.name} could not attach to a @slot/@snippet/@event/@typedef/@callback tag in the same comment block and was dropped.`);Q.length=0}}}function cl({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 qt(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)t=n&&n.length>0?`(${n.map((l)=>`${l.name}${l.optional?"?":""}: ${l.type}`).join(", ")}) => ${r}`:`() => ${r}`;let i=e.jsdocDescription??e.resolvedDescription;if(i===void 0&&t!==void 0)i=e.typedefs?.get(t)?.description;let o=cl({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("=>"));return{type:t,typeSource:o,description:i,params:n,returnType:r,isFunction:s}}function ll(e){if(!e||typeof e!=="object"||!("type"in e))return;let t=String(e.type),n=jt(t);if(!n&&!$t(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 cs(e,t){let n=ll(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 me(e,t,n){if(!t||e.has(t))return;e.set(t,n)}function Ut(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 ue(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":ue(e.left,t);break;case"ArrayPattern":for(let n of e.elements)ue(n??void 0,t);break;case"ObjectPattern":for(let n of e.properties)if(n.type==="Property")ue(n.value,t);else if(n.type==="RestElement")ue(n.argument,t);break;case"RestElement":ue(e.argument,t);break}return t}function pr(e,t){if(!t||typeof t!=="object"||!("type"in t))return;if(t.type==="Identifier"){let r=Ut(e,t.name);if(r)e.reactive_vars.add(r);return}let n=ue(t);for(let r of n){let i=Ut(e,r);if(i)e.reactive_vars.add(i)}}function Ct(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 ls(e){if(!e||typeof e!=="object"||!("type"in e))return!1;let t=String(e.type);return t==="FunctionDeclaration"||t==="FunctionExpression"||t==="ArrowFunctionExpression"}function pl(e,t){let n=e.scopeDeclarations.get(t);if(!n)n=new Map,e.scopeDeclarations.set(t,n);return n}function ul(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 lr(e,t,n,r,i){if(!yi(t))return;let o=i?.allowRunesProps??!1,s=i?.forceProp??!1,l=t;for(let p of l.declarations){if(o&&Ge(it(p.init),"$props")){for(let y of ul(e,l,p))me(y.kind==="prop"?n:r,y.name,y.kind==="prop"?{kind:"prop",publicPropName:y.publicPropName}:{kind:"local"});continue}let m=l.kind==="var"?r:n,d=s?"prop":"local";for(let y of ue(p.id))me(m,y,d==="prop"?{kind:"prop",publicPropName:y}:{kind:"local"})}}function dl(e,t){if("id"in e&&e.id&&typeof e.id==="object"&&"name"in e.id&&typeof e.id.name==="string")me(t,e.id.name,{kind:"local"});for(let n of e.params)for(let r of ue(n))me(t,r,{kind:"local"})}function hl(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":lr(e,i,n,r);break;case"FunctionDeclaration":if(i.id?.name)me(n,i.id.name,{kind:"local"});break;case"ClassDeclaration":if(i.id?.name)me(n,i.id.name,{kind:"local"});break}}}function fl(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)me(t.componentScope,o.local.name,{kind:"local"});break;case"VariableDeclaration":lr(e,i,t.componentScope,t.componentScope,{allowRunesProps:!0});break;case"FunctionDeclaration":if(i.id?.name)me(t.componentScope,i.id.name,{kind:"local"});break;case"ClassDeclaration":if(i.id?.name)me(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")lr(e,i.declaration,t.componentScope,t.componentScope,{forceProp:!0});else if(i.declaration.type==="FunctionDeclaration"&&i.declaration.id?.name)me(t.componentScope,i.declaration.id.name,{kind:"prop",publicPropName:i.declaration.id.name});break}}}function ps(e,t){t.componentScope.clear(),t.scopeDeclarations=new Map,t.activeScopes.length=0,fl(e,t,t.parsed?.instance)}function us(e){return{varScopeStack:[e.componentScope]}}function ds(e,t,n,r){if(!Ct(r))return;let i=pl(t,r),o=n.varScopeStack[n.varScopeStack.length-1]??t.componentScope;switch(String(r.type)){case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":dl(r,i);break;case"BlockStatement":hl(e,r.body,i,o);break;case"CatchClause":if("param"in r)for(let l of ue(r.param))me(i,l,{kind:"local"});break;case"EachBlock":{let l=r;for(let p of ue(l.context))me(i,p,{kind:"local"});if(typeof l.index==="string")me(i,l.index,{kind:"local"});else if(l.index&&"name"in l.index)me(i,l.index.name,{kind:"local"});break}case"AwaitBlock":{let l=r;for(let p of ue(l.value))me(i,p,{kind:"local"});for(let p of ue(l.error))me(i,p,{kind:"local"});break}}if(ls(r))n.varScopeStack.push(i);return i}function hs(e,t){if(ls(t))e.varScopeStack.pop()}var ys=new Set(["$state","$derived","$effect","$props","$bindable","$inspect","$host"]);function ml(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 yl=Array.from(ys);function fs(e){return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e===95||e===36}function gl(e){if(e.includes("\\u"))return!0;for(let t of yl){let n=e.indexOf(t);while(n!==-1){if(!fs(e.charCodeAt(n-1))&&!fs(e.charCodeAt(n+t.length)))return!0;n=e.indexOf(t,n+1)}}return!1}function xl(e,t){for(let n=t.length-1;n>=0;n-=1)if(t[n]?.has(e))return!0;return!1}function bl(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??[])ue(r,t);break}case"BlockStatement":gn(e.body,t);break;case"CatchClause":ue(e.param,t);break;case"EachBlock":{let n=e;if(ue(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;ue(n.value,t),ue(n.error,t);break}}return t}function gn(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??[])ue(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)gn([r],t);break}}}}function ur(e,t){if(!e||typeof e!=="object")return!1;let n=[...t],r=!1;return St(e,{enter(i,o){if(r){this.skip();return}if(Ct(i))n.push(bl(i));if(o&&i.type==="Identifier"&&ys.has(i.name)&&!o.type.startsWith("TS")&&ml(i,o)&&!xl(i.name,n))r=!0,this.skip()},leave(i){if(Ct(i))n.pop()}}),r}function ms(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 gs(e){if(e.runesOptionOverride!==void 0)return e.runesOptionOverride?"runes":"legacy";let t=e.parsed;if(!t)return"legacy";if(e.source!==void 0&&!gl(e.source))return"legacy";let n=new Set;gn(ms(t.module),n);let r=new Set;return gn(ms(t.instance),r),ur(t.module,[n])||ur(t.instance,[n,r])||ur(t.fragment,[n,r])?"runes":"legacy"}var Tl=/[A-Za-z_$][\w$]*/g;function El(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 l=i[s]?.name,p=o[s];if(!l||p?.start===void 0||p?.end===void 0)continue;let m=se(e,p.start,p.end)?.trim();if(m)r.set(l,m)}return r}function Sl(e,t){if(t.size===0)return e;return e.replace(Tl,(n)=>t.get(n)??n)}function At(e,t,n,r,i=new Set){let o=new Map;if(!n?.type)return o;let s=(l)=>{for(let p of l){if(p?.type!=="TSPropertySignature"||p.computed)continue;if(!p.key)continue;let m=e.getPropertyName(p.key);if(!m)continue;let d=p.typeAnnotation?.start,y=p.typeAnnotation?.end;if(d===void 0||y===void 0)continue;let x=se(t,d+1,y)?.trim();if(!x)continue;vt(t,p.typeAnnotation?.typeAnnotation),o.set(m,{type:x,optional:p.optional===!0,source:ie(t,p)})}};switch(n.type){case"TSTypeLiteral":s(n.members??[]);break;case"TSInterfaceDeclaration":s(n.body?.body??[]);break;case"TSTypeAliasDeclaration":{let l=At(e,t,n.typeAnnotation,r,i);for(let[p,m]of l)o.set(p,m);break}case"TSTypeReference":{let l=Ui(n.typeName);if(!l||i.has(l))break;let p=r.get(l);if(!p)break;i.add(l);let m=At(e,t,p,r,i);i.delete(l);let d=El(t,p,n);for(let[y,x]of m)o.set(y,d.size===0?x:{...x,type:Sl(x.type,d)});break}case"TSIntersectionType":for(let l of n.types??[]){let p=At(e,t,l,r,i);for(let[m,d]of p)o.set(m,d)}break;case"TSParenthesizedType":{let l=At(e,t,n.typeAnnotation,r,i);for(let[p,m]of l)o.set(p,m);break}}return o}function vl(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 xs(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:vl(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 l of s.specifiers??[]){let p=l.local?.name;if(!p)continue;if(!(s.importKind==="type"||l.importKind==="type"))continue;let d,y;if(l.type==="ImportSpecifier")d="named",y=l.imported?.type==="Identifier"?l.imported.name:typeof l.imported?.value==="string"?l.imported.value:void 0;else if(l.type==="ImportDefaultSpecifier")d="default";else if(l.type==="ImportNamespaceSpecifier")d="namespace";if(!d)continue;t.typeImportBindingsByLocalName.set(p,{importedName:y,localName:p,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:se(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:Ki(t,s)??"",node:s,start:s.start});if(s.type==="ExportNamedDeclaration"&&s.declaration?.type==="VariableDeclaration")for(let l of s.declaration.declarations??[]){if(l.id?.type!=="Identifier"||!l.id.name)continue;let p=mt(t,l.id.typeAnnotation);if(p)t.explicitPropTypesByName.set(l.id.name,p),vt(t,l.id.typeAnnotation?.typeAnnotation)}else if(s.type==="VariableDeclaration")for(let l of s.declarations??[]){if(l.id?.type!=="Identifier"||!l.id.name)continue;let p=mt(t,l.id.typeAnnotation);if(p)t.explicitVariableTypesByName.set(l.id.name,p)}}for(let s of o){if(!s||typeof s!=="object"||!("declarations"in s))continue;for(let l of s.declarations??[]){if(!Ge(it(l.init),"$props"))continue;let p=l.id?.typeAnnotation?void 0:xi(l.init),m=l.id?.typeAnnotation?.typeAnnotation??p,d=l.id?.typeAnnotation?mt(t,l.id.typeAnnotation):Wi(t,p),y=At(e,t,m,new Map(Array.from(t.localTypeDeclarationsByName.entries(),([P,w])=>[P,w.node]))),x=new Set,E=new Set;if(Ne(t,m,x,E),Yi(t,x,E),l.start!==void 0){let P={canonicalType:d,props:y,referencedImportedTypes:x,referencedLocalTypes:E};if(t.runesPropsDeclarationMetadataByDeclaratorStart.set(l.start,P),d)t.typedRunesPropsDeclarations.push(P)}}}}function bs(e,t,n){for(let r of n.declarations){if(!Ge(it(r.init),"$props"))continue;if(r.id.type==="Identifier"){t.wholePropsLocals.add(r.id.name),t.restPropLocals.add(r.id.name);let s=tr(t,r.start);if(s)for(let[l,p]of s.props)Ft(e,t,l,{name:l,kind:"let",type:p.type,typeSource:"typescript",isFunction:!1,isFunctionDeclaration:!1,isRequired:!p.optional,constant:!1,reactive:!1,source:p.source});continue}if(r.id.type!=="ObjectPattern")continue;let i=ct(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 l=e.getPropertyName(s.key);if(!l)continue;let p,m;if(s.value.type==="Identifier")p=s.value.name;else{let c=s.value;p=c.left.name,m=c.right}if(!p)continue;if(e.trackPropLocalName(l,p),l==="children")t.snippetPropLocals.add(p);let d=as(t,e,s)??(o===1?i:void 0),y=qi(t,r.start,l),{init:x,bindable:E}=Di(m),P=x==null?{isFunction:!1}:at(e,t,x),{value:w,type:A,isFunction:O,defaultValue:j}=P,N=y?.type===void 0&&d?.type===void 0?P.resolvedType:void 0;if(P.pendingCallDefault)t.pendingCallDefaultCandidates.push({propName:l,location:"props",...P.pendingCallDefault});let{type:X,typeSource:I,description:ce,params:ge,returnType:xe,isFunction:a}=qt({explicitType:y?.type,typeSeed:A,inferredTypeForSource:A,jsdocType:d?.type,jsdocDescription:d?.description,jsdocParams:d?.params,jsdocReturnType:d?.returnType,resolvedType:N,resolvedDescription:P.resolvedDescription,resolvedParams:P.resolvedParams,resolvedReturnType:P.resolvedReturnType,initializerIsFunction:O,isFunctionDeclaration:!1,inferIsFunctionFromTypeSignature:!0});if(E)t.reactive_vars.add(l);st(t,"prop-unknown-type",l,d?.sveldIgnore),Ft(e,t,l,{name:l,...p===l?{}:{localName:p},kind:"let",description:ce,binding:d?.binding,deprecated:d?.deprecated,tags:d?.tags,...d?.internal?{internal:!0}:{},...E?{bindable:!0}:{},type:X,typeSource:I,value:w,defaultValue:j,params:ge,returnType:xe,isFunction:a,isFunctionDeclaration:!1,isRequired:!E&&x==null&&y?.optional!==!0,constant:!1,reactive:E,source:ie(t,s)})}}}function Cl(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 Al(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 Pl=/^["']|["']$/g,kl=/\?$/,wl=/^\{/,_l=/\}$/;function Nl(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(kl,"").replace(Pl,""),o=e.slice(n+1).trim();if(!i||!o)return;return{name:i,type:o}}}return}function Ts(e,t,n,r,i){if(n){let p=new Map(Array.from(t.localTypeDeclarationsByName.entries(),([d,y])=>[d,y.node])),m=At(e,t,n,p);for(let[d,y]of m)ot(t,{name:d,detail:y.type,has_argument:!0,source:y.source});return}let o=e.resolveLocalVarJSDoc(r)?.type,s=o?Cl(o):void 0;if(!s)return;let l=s.trim().replace(wl,"").replace(_l,"");for(let p of Al(l)){let m=Nl(p);if(!m)continue;ot(t,{name:m.name,detail:m.type,has_argument:!0,source:i})}}function Es(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,l=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:l,typeSource:s?o.typeSource:"inferred",isFunction:!0}),e.events.delete(n)}}var Ss=new Set(["TSAsExpression","TSSatisfiesExpression","TSNonNullExpression","TSTypeAssertion","TSInstantiationExpression"]);function xn(e){if(!e||typeof e!=="object")return;St(e,{enter(t){if(!Ss.has(t.type))return;let n=t.expression;while(n&&Ss.has(n.type))n=n.expression;if(n)this.replace(n)}})}function Gt(e,t,n){dr(e,null,null,t,n)}function dr(e,t,n,r,i){r(e,t,n);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 l=0;l<s.length;l++){let p=s[l];if(p&&typeof p==="object"&&typeof p.type==="string")dr(p,e,o,r,i)}else if(typeof s.type==="string")dr(s,e,o,r,i)}if(i)i(e)}function bn(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 hr(e,t){if(!t)return;Gt(t,(n)=>{if(n.type==="ImportDeclaration")bn(e,n);if(n.type==="FunctionDeclaration"){let r=n;if(r.id?.name)e.funcDecls.set(r.id.name,r)}})}function Cs(e,t,n){let r=t+1;while(r<e.length){if(e[r]==="\\"){r+=2;continue}if(e[r]===n)return r+1;r++}return r}function As(e,t){let n=t+1,r=0;while(n<e.length){let i=e[n];if(i==="\\"){n+=2;continue}if(r===0){if(i==="`")return n+1;if(i==="$"&&e[n+1]==="{"){r=1,n+=2;continue}n++;continue}if(i==="{")r++;else if(i==="}")r--;else if(i==='"'||i==="'"){n=Cs(e,n,i);continue}else if(i==="`"){n=As(e,n);continue}n++}return n}function Il(e,t){let n=[],r=e.length,i=0;while(i<r){let o=e[i];if(o==='"'||o==="'"){i=Cs(e,i,o);continue}if(o==="`"){i=As(e,i);continue}if(o==="/"&&e[i+1]==="/"){let s=i+2;while(s<r&&e[s]!==`
|
|
18
|
+
`)s++;i=s;continue}if(o==="/"&&e[i+1]==="*"){let s=i,l=i+2;while(l<r&&!(e[l]==="*"&&e[l+1]==="/"))l++;let p=Math.min(l+2,r),m=e.slice(s,p);n.push({end:p+t,isJsDoc:m.startsWith("/**")&&m.length>4,text:m}),i=p;continue}i++}return n}function vs(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 Dl(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)vs(r.declaration,r.start,t);else vs(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(!ar.test(n.slice(i.end,t)))continue;r=i}return r}function Ps(e,t){let n=new Map;if(!e.source)return n;let r=[e.parsed?.module,e.parsed?.instance],i=[],o=[];for(let s of r){let l=s?.content;if(!l?.body||l.start===void 0||l.end===void 0)continue;i.push(...Il(e.source.slice(l.start,l.end),l.start)),o.push(...Dl(l.body))}i.sort((s,l)=>s.end-l.end);for(let s of o){let l=Ll(i,s.start,e.source);if(!l)continue;let p=or(e,l.text),{type:m,description:d,ignore:y,internal:x}=cr(p);if(y.length>0)st(e,"context-any-type",s.name,y);if(!m)continue;n.set(s.name,{type:t.aliasType(m.type),description:d||m.description,internal:x||void 0})}return n}var Rl={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 ks(e,t){let n=Rl[e];if(!n)return!1;if(!t)return!0;return(n.direct??n.descendant??[]).includes(t)}var kr={};Zo(kr,{Node:()=>Jt,Parser:()=>pe,Position:()=>Pt,SourceLocation:()=>zt,TokContext:()=>Be,Token:()=>In,TokenType:()=>J,defaultOptions:()=>En,getLineInfo:()=>Er,isIdentifierChar:()=>ke,isIdentifierStart:()=>Te,isNewLine:()=>xt,keywordTypes:()=>Pn,lineBreak:()=>Ee,lineBreakG:()=>Ms,nonASCIIwhitespace:()=>Tr,parse:()=>yp,parseExpressionAt:()=>gp,tokContexts:()=>oe,tokTypes:()=>f,tokenizer:()=>xp,version:()=>fa});var Ml=[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],Ds=[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],Ol="·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ--ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・",Ls="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ--ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",fr={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"},mr="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",Bl={5:mr,"5module":mr+" export import",6:mr+" const class extends export import super"},Rs=/^in(stanceof)?$/,Fl=new RegExp("["+Ls+"]"),Vl=new RegExp("["+Ls+Ol+"]");function yr(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 Te(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&&Fl.test(String.fromCharCode(e));if(t===!1)return!1;return yr(e,Ds)}function ke(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&&Vl.test(String.fromCharCode(e));if(t===!1)return!1;return yr(e,Ds)||yr(e,Ml)}var J=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 Me(e,t){return new J(e,{beforeExpr:!0,binop:t})}var Oe={beforeExpr:!0},Pe={startsExpr:!0},Pn={};function z(e,t){if(t===void 0)t={};return t.keyword=e,Pn[e]=new J(e,t)}var f={num:new J("num",Pe),regexp:new J("regexp",Pe),string:new J("string",Pe),name:new J("name",Pe),privateId:new J("privateId",Pe),eof:new J("eof"),bracketL:new J("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new J("]"),braceL:new J("{",{beforeExpr:!0,startsExpr:!0}),braceR:new J("}"),parenL:new J("(",{beforeExpr:!0,startsExpr:!0}),parenR:new J(")"),comma:new J(",",Oe),semi:new J(";",Oe),colon:new J(":",Oe),dot:new J("."),question:new J("?",Oe),questionDot:new J("?."),arrow:new J("=>",Oe),template:new J("template"),invalidTemplate:new J("invalidTemplate"),ellipsis:new J("...",Oe),backQuote:new J("`",Pe),dollarBraceL:new J("${",{beforeExpr:!0,startsExpr:!0}),eq:new J("=",{beforeExpr:!0,isAssign:!0}),assign:new J("_=",{beforeExpr:!0,isAssign:!0}),incDec:new J("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new J("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:Me("||",1),logicalAND:Me("&&",2),bitwiseOR:Me("|",3),bitwiseXOR:Me("^",4),bitwiseAND:Me("&",5),equality:Me("==/!=/===/!==",6),relational:Me("</>/<=/>=",7),bitShift:Me("<</>>/>>>",8),plusMin:new J("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:Me("%",10),star:Me("*",10),slash:Me("/",10),starstar:new J("**",{beforeExpr:!0}),coalesce:Me("??",1),_break:z("break"),_case:z("case",Oe),_catch:z("catch"),_continue:z("continue"),_debugger:z("debugger"),_default:z("default",Oe),_do:z("do",{isLoop:!0,beforeExpr:!0}),_else:z("else",Oe),_finally:z("finally"),_for:z("for",{isLoop:!0}),_function:z("function",Pe),_if:z("if"),_return:z("return",Oe),_switch:z("switch"),_throw:z("throw",Oe),_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",Pe),_super:z("super",Pe),_class:z("class",Pe),_extends:z("extends",Oe),_export:z("export"),_import:z("import",Pe),_null:z("null",Pe),_true:z("true",Pe),_false:z("false",Pe),_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})},Ee=/\r\n?|\n|\u2028|\u2029/,Ms=new RegExp(Ee.source,"g");function xt(e){return e===10||e===13||e===8232||e===8233}function Os(e,t,n){if(n===void 0)n=e.length;for(var r=t;r<n;r++){var i=e.charCodeAt(r);if(xt(i))return r<n-1&&i===13&&e.charCodeAt(r+1)===10?r+2:r+1}return-1}var Tr=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,de=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,Bs=Object.prototype,{hasOwnProperty:jl,toString:$l}=Bs,kt=Object.hasOwn||function(e,t){return jl.call(e,t)},ws=Array.isArray||function(e){return $l.call(e)==="[object Array]"},_s=Object.create(null);function lt(e){return _s[e]||(_s[e]=new RegExp("^(?:"+e.replace(/ /g,"|")+")$"))}function Ye(e){if(e<=65535)return String.fromCharCode(e);return e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320)}var Hl=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,Pt=function(t,n){this.line=t,this.column=n};Pt.prototype.offset=function(t){return new Pt(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 Er(e,t){for(var n=1,r=0;;){var i=Os(e,r,t);if(i<0)return new Pt(n,t-r);++n,r=i}}var En={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},Ns=!1;function ql(e){var t={};for(var n in En)t[n]=e&&kt(e,n)?e[n]:En[n];if(t.ecmaVersion==="latest")t.ecmaVersion=1e8;else if(t.ecmaVersion==null){if(!Ns&&typeof console==="object"&&console.warn)Ns=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
|
|
19
|
+
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(ws(t.onToken)){var r=t.onToken;t.onToken=function(i){return r.push(i)}}if(ws(t.onComment))t.onComment=Ul(t,t.onComment);if(t.sourceType==="commonjs"&&t.allowAwaitOutsideFunction)throw Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return t}function Ul(e,t){return function(n,r,i,o,s,l){var p={type:n?"Block":"Line",value:r,start:i,end:o};if(e.locations)p.loc=new zt(this,s,l);if(e.ranges)p.range=[i,o];t.push(p)}}var gt=1,bt=2,Sr=4,Fs=8,vr=16,Vs=32,kn=64,js=128,Tt=256,Xt=512,$s=1024,wn=gt|bt|Tt;function Cr(e,t){return bt|(e?Sr:0)|(t?Fs:0)}var Sn=0,Ar=1,Ze=2,Hs=3,qs=4,Us=5,pe=function(t,n,r){this.options=t=ql(t),this.sourceFile=t.sourceFile,this.keywords=lt(Bl[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var i="";if(t.allowReserved!==!0){if(i=fr[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module")i+=" await"}this.reservedWords=lt(i);var o=(i?i+" ":"")+fr.strict;if(this.reservedWordsStrict=lt(o),this.reservedWordsStrictBind=lt(o+" "+fr.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(`
|
|
20
|
+
`,r-1)+1,this.options.locations)this.curLine=this.input.slice(0,this.lineStart).split(Ee).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"?bt:gt),this.regexpState=null,this.privateNameStack=[]},Ve={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}};pe.prototype.parse=function(){var t=this,n=this.options.program||this.startNode();return this.nextToken(),this.catchStackOverflow(function(){return t.parseTopLevel(n)})};Ve.inFunction.get=function(){return(this.currentVarScope().flags&bt)>0};Ve.inGenerator.get=function(){return(this.currentVarScope().flags&Fs)>0};Ve.inAsync.get=function(){return(this.currentVarScope().flags&Sr)>0};Ve.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],n=t.flags;if(n&(Tt|Xt))return!1;if(n&bt)return(n&Sr)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};Ve.allowReturn.get=function(){if(this.inFunction)return!0;if(this.options.allowReturnOutsideFunction&&this.currentVarScope().flags>)return!0;return!1};Ve.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags;return(t&kn)>0||this.options.allowSuperOutsideMethod};Ve.allowDirectSuper.get=function(){return(this.currentThisScope().flags&js)>0};Ve.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};Ve.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],n=t.flags;if(n&(Tt|Xt)||n&bt&&!(n&vr))return!0}return!1};Ve.allowUsing.get=function(){var e=this.currentScope(),t=e.flags;if(t&$s)return!1;if(!this.inModule&&t>)return!1;return!0};Ve.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&Tt)>0};pe.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};pe.parse=function(t,n){return new this(n,t).parse()};pe.parseExpressionAt=function(t,n,r){var i=new this(r,t,n);return i.nextToken(),i.parseExpression()};pe.tokenizer=function(t,n){return new this(n,t)};Object.defineProperties(pe.prototype,Ve);var ye=pe.prototype,Gl=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;ye.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){de.lastIndex=e,e+=de.exec(this.input)[0].length;var t=Gl.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])==="use strict"){de.lastIndex=e+t[0].length;var n=de.exec(this.input),r=n.index+n[0].length,i=this.input.charAt(r);return i===";"||i==="}"||Ee.test(n[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(i)||i==="!"&&this.input.charAt(r+1)==="=")}if(e+=t[0].length,de.lastIndex=e,e+=de.exec(this.input)[0].length,this.input[e]===";")e++}};ye.eat=function(e){if(this.type===e)return this.next(),!0;else return!1};ye.isContextual=function(e){return this.type===f.name&&this.value===e&&!this.containsEsc};ye.eatContextual=function(e){if(!this.isContextual(e))return!1;return this.next(),!0};ye.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}};ye.expectContextual=function(e){if(!this.eatContextual(e))this.unexpected()};ye.canInsertSemicolon=function(){return this.type===f.eof||this.type===f.braceR||Ee.test(this.input.slice(this.lastTokEnd,this.start))};ye.insertSemicolon=function(){if(this.canInsertSemicolon()){if(this.options.onInsertedSemicolon)this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc);return!0}};ye.semicolon=function(){if(!this.eat(f.semi)&&!this.insertSemicolon())this.unexpected()};ye.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}};ye.expect=function(e){this.eat(e)||this.unexpected()};ye.unexpected=function(e){this.raise(e!=null?e:this.start,"Unexpected token")};var _n=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};ye.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")};ye.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")};ye.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")};ye.isSimpleAssignTarget=function(e){if(e.type==="ParenthesizedExpression")return this.isSimpleAssignTarget(e.expression);return e.type==="Identifier"||e.type==="MemberExpression"};var M=pe.prototype;M.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 Pr={kind:"loop"},Wl={kind:"switch"};M.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;de.lastIndex=this.pos;var t=de.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(Te(r)){var i=n;do n+=r<=65535?1:2;while(ke(r=this.fullCharCodeAt(n)));if(r===92)return!0;var o=this.input.slice(i,n);if(!Rs.test(o))return!0}return!1};M.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;de.lastIndex=this.pos;var e=de.exec(this.input),t=this.pos+e[0].length,n;return!Ee.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)==="function"&&(t+8===this.input.length||!(ke(n=this.fullCharCodeAt(t+8))||n===92))};M.isUsingKeyword=function(e,t){if(this.options.ecmaVersion<17||!this.isContextual(e?"await":"using"))return!1;de.lastIndex=this.pos;var n=de.exec(this.input),r=this.pos+n[0].length;if(Ee.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||ke(o=this.fullCharCodeAt(i))||o===92)return!1;de.lastIndex=i;var s=de.exec(this.input);if(r=i+s[0].length,s&&Ee.test(this.input.slice(i,r)))return!1}var l=this.fullCharCodeAt(r);if(!Te(l)&&l!==92)return!1;var p=r;do r+=l<=65535?1:2;while(ke(l=this.fullCharCodeAt(r)));if(l===92)return!0;var m=this.input.slice(p,r);if(Rs.test(m))return!1;if(t&&!e&&m==="of"){de.lastIndex=r;var d=de.exec(this.input);if(r=r+d[0].length,this.input.charCodeAt(r)!==61||(l=this.input.charCodeAt(r+1))===61||l===62)return!1}return!0};M.isAwaitUsing=function(e){return this.isUsingKeyword(!0,e)};M.isUsing=function(e){return this.isUsingKeyword(!1,e)};M.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){de.lastIndex=this.pos;var s=de.exec(this.input),l=this.pos+s[0].length,p=this.input.charCodeAt(l);if(p===40||p===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 m=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(m){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(m==="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,m),this.semicolon(),this.finishNode(i,"VariableDeclaration")}var d=this.value,y=this.parseExpression();if(r===f.name&&y.type==="Identifier"&&this.eat(f.colon))return this.parseLabeledStatement(i,d,y,e);else return this.parseExpressionStatement(i,y)}};M.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")};M.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")};M.parseDoStatement=function(e){if(this.next(),this.labels.push(Pr),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")};M.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Pr),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,l=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(l){var p=this.startNode();if(this.next(),l==="await using"){if(!this.canAwait)this.raise(this.start,"Await using cannot appear outside of async function");this.next()}return this.parseVar(p,!0,l),this.finishNode(p,"VariableDeclaration"),this.parseForAfterInit(e,p,t)}var m=this.containsEsc,d=new _n,y=this.start,x=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(x.start===y&&!m&&x.type==="Identifier"&&x.name==="async")this.unexpected();else if(this.options.ecmaVersion>=9)e.await=!1}if(o&&s)this.raise(x.start,"The left-hand side of a for-of loop may not start with 'let'.");return this.toAssignable(x,!1,d),this.checkLValPattern(x),this.parseForIn(e,x)}else this.checkExpressionErrors(d,!0);if(t>-1)this.unexpected(t);return this.parseFor(e,x)};M.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)};M.parseFunctionStatement=function(e,t,n){return this.next(),this.parseFunction(e,Kt|(n?0:gr),!1,t)};M.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")};M.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")};M.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(f.braceL),this.labels.push(Wl),this.enterScope($s);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")};M.parseThrowStatement=function(e){if(this.next(),Ee.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 Kl=[];M.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type==="Identifier";return this.enterScope(t?Vs:0),this.checkLValPattern(e,t?qs:Ze),this.expect(f.parenR),e};M.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")};M.parseVarStatement=function(e,t,n){return this.next(),this.parseVar(e,!1,t,n),this.semicolon(),this.finishNode(e,"VariableDeclaration")};M.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(Pr),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")};M.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")};M.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")};M.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 l=this.type.isLoop?"loop":this.type===f._switch?"switch":null;for(var p=this.labels.length-1;p>=0;p--){var m=this.labels[p];if(m.statementStart===e.start)m.statementStart=this.start,m.kind=l;else break}return this.labels.push({name:t,kind:l,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")};M.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")};M.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")};M.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")};M.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")};M.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};M.parseVarId=function(e,t){e.id=t==="using"||t==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(e.id,t==="var"?Ar:Ze,!1)};var Kt=1,gr=2,Gs=4;M.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&gr)this.unexpected();e.generator=this.eat(f.star)}if(this.options.ecmaVersion>=8)e.async=!!r;if(t&Kt){if(e.id=t&Gs&&this.type!==f.name?null:this.parseIdent(),e.id&&!(t&gr))this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?Ar:Ze:Hs)}var o=this.yieldPos,s=this.awaitPos,l=this.awaitIdentPos;if(this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Cr(e.async,e.generator)),!(t&Kt))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=l,this.finishNode(e,t&Kt?"FunctionDeclaration":"FunctionExpression")};M.parseFunctionParams=function(e){this.expect(f.parenL),e.params=this.parseBindingList(f.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};M.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"&&zl(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")};M.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",l=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(f.braceL))return this.parseClassStaticBlock(n),n;if(this.isClassElementNameStart()||this.type===f.star)l=!0;else r="static"}if(n.static=l,!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 p=this.value;if(this.eatContextual("get")||this.eatContextual("set"))if(this.isClassElementNameStart())s=p;else r=p}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 m=!n.static&&vn(n,"constructor"),d=m&&e;if(m&&s!=="method")this.raise(n.key.start,"Constructor can't have get/set modifier");n.kind=m?"constructor":s,this.parseClassMethod(n,i,o,d)}else this.parseClassField(n);return n};M.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};M.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)};M.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&&vn(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")};M.parseClassField=function(e){if(vn(e,"constructor"))this.raise(e.key.start,"Classes can't have a field named 'constructor'");else if(e.static&&vn(e,"prototype"))this.raise(e.key.start,"Classes can't have a static field named 'prototype'");if(this.eat(f.eq))this.enterScope(Xt|kn),e.value=this.parseMaybeAssign(),this.exitScope();else e.value=null;return this.semicolon(),this.finishNode(e,"PropertyDefinition")};M.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;this.labels=[],this.enterScope(Tt|kn);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")};M.parseClassId=function(e,t){if(this.type===f.name){if(e.id=this.parseIdent(),t)this.checkLValSimple(e.id,Ze,!1)}else{if(t===!0)this.unexpected();e.id=null}};M.parseClassSuper=function(e){e.superClass=this.eat(f._extends)?this.parseExprSubscripts(null,!1):null};M.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared};M.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(!kt(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 zl(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 vn(e,t){var{computed:n,key:r}=e;return!n&&(r.type==="Identifier"&&r.name===t||r.type==="Literal"&&r.value===t)}M.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")};M.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")};M.parseExportDeclaration=function(e){return this.parseStatement(null)};M.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,Kt|Gs,!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}};M.checkExport=function(e,t,n){if(!e)return;if(typeof t!=="string")t=t.type==="Identifier"?t.name:t.value;if(kt(e,t))this.raiseRecoverable(n,"Duplicate export '"+t+"'");e[t]=!0};M.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,l=t.elements;s<l.length;s+=1){var p=l[s];if(p)this.checkPatternExport(e,p)}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)};M.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)}};M.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()};M.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")};M.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};M.parseImport=function(e){if(this.next(),this.type===f.string)e.specifiers=Kl,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")};M.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,Ze),this.finishNode(e,"ImportSpecifier")};M.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,Ze),this.finishNode(e,"ImportDefaultSpecifier")};M.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual("as"),e.local=this.parseIdent(),this.checkLValSimple(e.local,Ze),this.finishNode(e,"ImportNamespaceSpecifier")};M.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};M.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(kt(t,i))this.raiseRecoverable(r.key.start,"Duplicate attribute key '"+i+"'");t[i]=!0,e.push(r)}return e};M.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")};M.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===f.string){var e=this.parseLiteral(this.value);if(Hl.test(e.value))this.raise(e.start,"An export name cannot include a lone surrogate.");return e}return this.parseIdent(!0)};M.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)};M.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 je=pe.prototype;je.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};je.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};je.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")};je.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")};je.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()};je.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};je.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t};je.parseBindingListItem=function(e){return e};je.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")};je.checkLValSimple=function(e,t,n){if(t===void 0)t=Sn;var r=t!==Sn;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===Ze&&e.name==="let")this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name");if(n){if(kt(n,e.name))this.raiseRecoverable(e.start,"Argument name clash");n[e.name]=!0}if(t!==Us)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")}};je.checkLValPattern=function(e,t,n){if(t===void 0)t=Sn;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,l=e.elements;s<l.length;s+=1){var p=l[s];if(p)this.checkLValInnerPattern(p,t,n)}break;default:this.checkLValSimple(e,t,n)}};je.checkLValInnerPattern=function(e,t,n){if(t===void 0)t=Sn;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 Be=function(t,n,r,i,o){this.token=t,this.isExpr=!!n,this.preserveSpace=!!r,this.override=i,this.generator=!!o},oe={b_stat:new Be("{",!1),b_expr:new Be("{",!0),b_tmpl:new Be("${",!1),p_stat:new Be("(",!1),p_expr:new Be("(",!0),q_tmpl:new Be("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new Be("function",!1),f_expr:new Be("function",!0),f_expr_gen:new Be("function",!0,!1,null,!0),f_gen:new Be("function",!1,!1,null,!0)},wt=pe.prototype;wt.initialContext=function(){return[oe.b_stat]};wt.curContext=function(){return this.context[this.context.length-1]};wt.braceIsBlock=function(e){var t=this.curContext();if(t===oe.f_expr||t===oe.f_stat)return!0;if(e===f.colon&&(t===oe.b_stat||t===oe.b_expr))return!t.isExpr;if(e===f._return||e===f.name&&this.exprAllowed)return Ee.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===oe.b_stat;if(e===f._var||e===f._const||e===f.name)return!1;return!this.exprAllowed};wt.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};wt.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};wt.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===oe.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)?oe.b_stat:oe.b_expr),this.exprAllowed=!0};f.dollarBraceL.updateContext=function(){this.context.push(oe.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?oe.p_stat:oe.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()!==oe.p_stat)&&!(e===f._return&&Ee.test(this.input.slice(this.lastTokEnd,this.start)))&&!((e===f.colon||e===f.braceL)&&this.curContext()===oe.b_stat))this.context.push(oe.f_expr);else this.context.push(oe.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()===oe.q_tmpl)this.context.pop();else this.context.push(oe.q_tmpl);this.exprAllowed=!1};f.star.updateContext=function(e){if(e===f._function){var t=this.context.length-1;if(this.context[t]===oe.f_expr)this.context[t]=oe.f_expr_gen;else this.context[t]=oe.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 F=pe.prototype;F.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 l;if(o==="init")l=this.strict&&s.init||s.get||s.set;else l=s.init||s[o];if(l)this.raiseRecoverable(r.start,"Redefinition of property")}else s=t[i]={init:!1,get:!1,set:!1};s[o]=!0};F.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})};F.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 _n,r=!0;var l=this.start,p=this.startLoc;if(this.type===f.parenL||this.type===f.name)this.potentialArrowAt=this.start,this.potentialArrowInForAwait=e==="await";var m=this.parseMaybeConditional(e,t);if(n)m=n.call(this,m,l,p);if(this.type.isAssign){var d=this.startNodeAt(l,p);if(d.operator=this.value,this.type===f.eq)m=this.toAssignable(m,!1,t);if(!r)t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1;if(t.shorthandAssign>=m.start)t.shorthandAssign=-1;if(this.type===f.eq)this.checkLValPattern(m);else this.checkLValSimple(m);if(d.left=m,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 m};F.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};F.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)};F.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,l=this.type===f.coalesce;if(l)o=f.logicalAND.binop;var p=this.value;this.next();var m=this.start,d=this.startLoc,y=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,i),m,d,o,i),x=this.buildBinary(t,n,e,y,p,s||l);if(s&&this.type===f.coalesce||l&&(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(x,t,n,r,i)}}return e};F.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")};F.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 l=this.startNode(),p=this.type===f.incDec;if(l.operator=this.value,l.prefix=!0,this.next(),l.argument=this.parseMaybeUnary(null,!0,p,r),this.checkExpressionErrors(e,!0),p)this.checkLValSimple(l.argument);else if(this.strict&&l.operator==="delete"&&Ws(l.argument))this.raiseRecoverable(l.start,"Deleting local variable in strict mode");else if(l.operator==="delete"&&xr(l.argument))this.raiseRecoverable(l.start,"Private fields can not be deleted");else t=!0;s=this.finishNode(l,p?"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 m=this.startNodeAt(i,o);m.operator=this.value,m.prefix=!1,m.argument=s,this.checkLValSimple(s),this.next(),s=this.finishNode(m,"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 Ws(e){return e.type==="Identifier"||e.type==="ParenthesizedExpression"&&Ws(e.expression)}function xr(e){return e.type==="MemberExpression"&&e.property.type==="PrivateIdentifier"||e.type==="ChainExpression"&&xr(e.expression)||e.type==="ParenthesizedExpression"&&xr(e.expression)}F.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};F.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 l=this.parseSubscript(e,t,n,r,o,s,i);if(l.optional)s=!0;if(l===e||l.type==="ArrowFunctionExpression"){if(s){var p=this.startNodeAt(t,n);p.expression=l,l=this.finishNode(p,"ChainExpression")}return l}e=l}};F.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(f.arrow)};F.parseSubscriptAsyncArrow=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!0,r)};F.parseSubscript=function(e,t,n,r,i,o,s){var l=this.options.ecmaVersion>=11,p=l&&this.eat(f.questionDot);if(r&&p)this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var m=this.eat(f.bracketL);if(m||p&&this.type!==f.parenL&&this.type!==f.backQuote||this.eat(f.dot)){var d=this.startNodeAt(t,n);if(d.object=e,m)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=!!m,l)d.optional=p;e=this.finishNode(d,"MemberExpression")}else if(!r&&this.eat(f.parenL)){var y=new _n,x=this.yieldPos,E=this.awaitPos,P=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var w=this.parseExprList(f.parenR,this.options.ecmaVersion>=8,!1,y);if(i&&!p&&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=x,this.awaitPos=E,this.awaitIdentPos=P,this.parseSubscriptAsyncArrow(t,n,w,s)}this.checkExpressionErrors(y,!0),this.yieldPos=x||this.yieldPos,this.awaitPos=E||this.awaitPos,this.awaitIdentPos=P||this.awaitIdentPos;var A=this.startNodeAt(t,n);if(A.callee=e,A.arguments=w,l)A.optional=p;e=this.finishNode(A,"CallExpression")}else if(this.type===f.backQuote){if(p||o)this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var O=this.startNodeAt(t,n);O.tag=e,O.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(O,"TaggedTemplateExpression")}return e};F.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,l=this.containsEsc,p=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!l&&p.name==="async"&&!this.canInsertSemicolon()&&this.eat(f._function))return this.overrideContext(oe.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),[p],!1,t);if(this.options.ecmaVersion>=8&&p.name==="async"&&this.type===f.name&&!l&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc)){if(p=this.parseIdent(!1),this.canInsertSemicolon()||!this.eat(f.arrow))this.unexpected();return this.parseArrowExpression(this.startNodeAt(o,s),[p],!0,t)}}return p;case f.regexp:var m=this.value;return r=this.parseLiteral(m.value),r.regex={pattern:m.pattern,flags:m.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,y=this.parseParenAndDistinguishExpression(i,t);if(e){if(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(y))e.parenthesizedAssign=d;if(e.parenthesizedBind<0)e.parenthesizedBind=d}return y;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(oe.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()}};F.parseExprAtomDefault=function(){this.unexpected()};F.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()};F.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")};F.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")};F.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")};F.parseParenExpression=function(){this.expect(f.parenL);var e=this.parseExpression();return this.expect(f.parenR),e};F.shouldParseArrow=function(e){return!this.canInsertSemicolon()};F.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,l=this.startLoc,p=[],m=!0,d=!1,y=new _n,x=this.yieldPos,E=this.awaitPos,P;this.yieldPos=0,this.awaitPos=0;while(this.type!==f.parenR)if(m?m=!1:this.expect(f.comma),o&&this.afterTrailingComma(f.parenR,!0)){d=!0;break}else if(this.type===f.ellipsis){if(P=this.start,p.push(this.parseParenItem(this.parseRestBinding())),this.type===f.comma)this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else p.push(this.parseMaybeAssign(!1,y,this.parseParenItem));var w=this.lastTokEnd,A=this.lastTokEndLoc;if(this.expect(f.parenR),e&&this.shouldParseArrow(p)&&this.eat(f.arrow))return this.checkPatternErrors(y,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=x,this.awaitPos=E,this.parseParenArrowList(n,r,p,t);if(!p.length||d)this.unexpected(this.lastTokStart);if(P)this.unexpected(P);if(this.checkExpressionErrors(y,!0),this.yieldPos=x||this.yieldPos,this.awaitPos=E||this.awaitPos,p.length>1)i=this.startNodeAt(s,l),i.expressions=p,this.finishNodeAt(i,"SequenceExpression",w,A);else i=p[0]}else i=this.parseParenExpression();if(this.options.preserveParens){var O=this.startNodeAt(n,r);return O.expression=i,this.finishNode(O,"ParenthesizedExpression")}else return i};F.parseParenItem=function(e){return e};F.parseParenArrowList=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!1,r)};var Xl=[];F.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=Xl;return this.finishNode(e,"NewExpression")};F.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,`
|
|
21
21
|
`),cooked:null}}else n.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
|
|
22
|
-
`),cooked:this.value};return this.next(),n.tail=this.type===f.backQuote,this.finishNode(n,"TemplateElement")};V.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")};V.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)&&!be.test(this.input.slice(this.lastTokEnd,this.start))};V.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")};V.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")};V.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")};V.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()};V.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")};V.initFunction=function(e){if(e.id=null,this.options.ecmaVersion>=6)e.generator=e.expression=!1;if(this.options.ecmaVersion>=8)e.async=!1};V.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(Er(t,r.generator)|kn|(n?Ls: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")};V.parseArrowExpression=function(e,t,n,r){var i=this.yieldPos,o=this.awaitPos,s=this.awaitIdentPos;if(this.enterScope(Er(n,!1)|Tr),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")};V.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,Bs);e.body=this.parseBlock(!1,void 0,s&&!o),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=l}this.exitScope()};V.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};V.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,Sr,t?null:n)}};V.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};V.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&wn)&&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")}};V.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};V.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};V.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};V.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")};V.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 Cn=ae.prototype;Cn.raise=function(e,t){var n=xr(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};Cn.raiseRecoverable=Cn.raise;Cn.curPosition=function(){if(this.options.locations)return new At(this.curLine,this.pos-this.lineStart)};var lt=ae.prototype,jp=function(t){this.flags=t,this.var=[],this.lexical=[],this.functions=[]};lt.enterScope=function(e){this.scopeStack.push(new jp(e))};lt.exitScope=function(){this.scopeStack.pop()};lt.treatFunctionsAsVarInScope=function(e){return e.flags&bt||!this.inModule&&e.flags>};lt.declareName=function(e,t,n){var r=!1;if(t===Qe){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>)delete this.undefinedExports[e]}else if(t===Os){var o=this.currentScope();o.lexical.push(e)}else if(t===Ms){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&Ds&&l.lexical[0]===e)||!this.treatFunctionsAsVarInScope(l)&&l.functions.indexOf(e)>-1){r=!0;break}if(l.var.push(e),this.inModule&&l.flags>)delete this.undefinedExports[e];if(l.flags&wn)break}if(r)this.raiseRecoverable(n,"Identifier '"+e+"' has already been declared")};lt.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};lt.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};lt.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(wn|zt|Tt))return t}};lt.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(wn|zt|Tt)&&!(t.flags&Tr))return t}};var Xt=function(t,n,r){if(this.type="",this.start=n,this.end=0,t.options.locations)this.loc=new Kt(t,r);if(t.options.directSourceFile)this.sourceFile=t.options.directSourceFile;if(t.options.ranges)this.range=[n,0]},Jt=ae.prototype;Jt.startNode=function(){return new Xt(this,this.start,this.startLoc)};Jt.startNodeAt=function(e,t){return new Xt(this,e,t)};function js(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}Jt.finishNode=function(e,t){return js.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)};Jt.finishNodeAt=function(e,t,n,r){return js.call(this,e,t,n,r)};Jt.copyNode=function(e){var t=new Xt(this,e.start,this.startLoc);for(var n in e)t[n]=e[n];return t};var $p="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",$s="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",Hs=$s+" Extended_Pictographic",qs=Hs,Us=qs+" EBase EComp EMod EPres ExtPict",Gs=Us,Hp=Gs,qp={9:$s,10:Hs,11:qs,12:Us,13:Gs,14:Hp},Up="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",Gp={9:"",10:"",11:"",12:"",13:"",14:Up},Cs="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",Ws="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",Ks=Ws+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",zs=Ks+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",Xs=zs+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",Js=Xs+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",Wp=Js+" "+$p,Kp={9:Ws,10:Ks,11:zs,12:Xs,13:Js,14:Wp},Ys={};function zp(e){var t=Ys[e]={binary:pt(qp[e]+" "+Cs),binaryOfStrings:pt(Gp[e]),nonBinary:{General_Category:pt(Cs),Script:pt(Kp[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(Gt=0,Tn=[9,10,11,12,13,14];Gt<Tn.length;Gt+=1)yr=Tn[Gt],zp(yr);var yr,Gt,Tn,N=ae.prototype,An=function(t,n){this.parent=t,this.base=n||this};An.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};An.prototype.sibling=function(){return new An(this.parent,this.base)};var We=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=Ys[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};We.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};We.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)};We.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};We.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};We.prototype.current=function(t){if(t===void 0)t=!1;return this.at(this.pos,t)};We.prototype.lookahead=function(t){if(t===void 0)t=!1;return this.at(this.nextIndex(this.pos,t),t)};We.prototype.advance=function(t){if(t===void 0)t=!1;this.pos=this.nextIndex(this.pos,t)};We.prototype.eat=function(t,n){if(n===void 0)n=!1;if(this.current(n)===t)return this.advance(n),!0;return!1};We.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};N.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 Xp(e){for(var t in e)return!0;return!1}N.validateRegExpPattern=function(e){if(this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&Xp(e.groupNames))e.switchN=!0,this.regexp_pattern(e)};N.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")}};N.regexp_disjunction=function(e){var t=this.options.ecmaVersion>=16;if(t)e.branchID=new An(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")};N.regexp_alternative=function(e){while(e.pos<e.source.length&&this.regexp_eatTerm(e));};N.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};N.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};N.regexp_eatQuantifier=function(e,t){if(t===void 0)t=!1;if(this.regexp_eatQuantifierPrefix(e,t))return e.eat(63),!0;return!1};N.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)};N.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};N.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)};N.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1};N.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};N.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};N.regexp_eatModifiers=function(e){var t="",n=0;while((n=e.current())!==-1&&Jp(n))t+=Je(n),e.advance();return t};function Jp(e){return e===105||e===109||e===115}N.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)};N.regexp_eatInvalidBracedQuantifier=function(e){if(this.regexp_eatBracedQuantifier(e,!0))e.raise("Nothing to repeat");return!1};N.regexp_eatSyntaxCharacter=function(e){var t=e.current();if(Qs(t))return e.lastIntValue=t,e.advance(),!0;return!1};function Qs(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}N.regexp_eatPatternCharacters=function(e){var t=e.pos,n=0;while((n=e.current())!==-1&&!Qs(n))e.advance();return e.pos!==t};N.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};N.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}};N.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};N.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){e.lastStringValue+=Je(e.lastIntValue);while(this.regexp_eatRegExpIdentifierPart(e))e.lastStringValue+=Je(e.lastIntValue);return!0}return!1};N.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(Yp(r))return e.lastIntValue=r,!0;return e.pos=t,!1};function Yp(e){return xe(e,!0)||e===36||e===95}N.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(Qp(r))return e.lastIntValue=r,!0;return e.pos=t,!1};function Qp(e){return Ae(e,!0)||e===36||e===95||e===8204||e===8205}N.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};N.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};N.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};N.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)};N.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1};N.regexp_eatZero=function(e){if(e.current()===48&&!Nn(e.lookahead()))return e.lastIntValue=0,e.advance(),!0;return!1};N.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};N.regexp_eatControlLetter=function(e){var t=e.current();if(Zs(t))return e.lastIntValue=t%32,e.advance(),!0;return!1};function Zs(e){return e>=65&&e<=90||e>=97&&e<=122}N.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)&&Zp(e.lastIntValue))return!0;if(r)e.raise("Invalid unicode escape");e.pos=n}return!1};function Zp(e){return e>=0&&e<=1114111}N.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};N.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 ea=0,Ye=1,Fe=2;N.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(el(t))return e.lastIntValue=-1,e.advance(),Ye;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===Fe)e.raise("Invalid property name");return r}e.raise("Invalid property name")}return ea};function el(e){return e===100||e===68||e===115||e===83||e===119||e===87}N.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),Ye}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,i)}return ea};N.regexp_validateUnicodePropertyNameAndValue=function(e,t,n){if(!Pt(e.unicodeProperties.nonBinary,t))e.raise("Invalid property name");if(!e.unicodeProperties.nonBinary[t].test(n))e.raise("Invalid property value")};N.regexp_validateUnicodePropertyNameOrValue=function(e,t){if(e.unicodeProperties.binary.test(t))return Ye;if(e.switchV&&e.unicodeProperties.binaryOfStrings.test(t))return Fe;e.raise("Invalid property name")};N.regexp_eatUnicodePropertyName=function(e){var t=0;e.lastStringValue="";while(ta(t=e.current()))e.lastStringValue+=Je(t),e.advance();return e.lastStringValue!==""};function ta(e){return Zs(e)||e===95}N.regexp_eatUnicodePropertyValue=function(e){var t=0;e.lastStringValue="";while(tl(t=e.current()))e.lastStringValue+=Je(t),e.advance();return e.lastStringValue!==""};function tl(e){return ta(e)||Nn(e)}N.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)};N.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===Fe)e.raise("Negated character class may contain strings");return!0}return!1};N.regexp_classContents=function(e){if(e.current()===93)return Ye;if(e.switchV)return this.regexp_classSetExpression(e);return this.regexp_nonEmptyClassRanges(e),Ye};N.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")}}};N.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};N.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)};N.regexp_classSetExpression=function(e){var t=Ye,n;if(this.regexp_eatClassSetRange(e));else if(n=this.regexp_eatClassSetOperand(e)){if(n===Fe)t=Fe;var r=e.pos;while(e.eatChars([38,38])){if(e.current()!==38&&(n=this.regexp_eatClassSetOperand(e))){if(n!==Fe)t=Ye;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===Fe)t=Fe}};N.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};N.regexp_eatClassSetOperand=function(e){if(this.regexp_eatClassSetCharacter(e))return Ye;return this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)};N.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===Fe)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};N.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};N.regexp_classStringDisjunctionContents=function(e){var t=this.regexp_classString(e);while(e.eat(124))if(this.regexp_classString(e)===Fe)t=Fe;return t};N.regexp_classString=function(e){var t=0;while(this.regexp_eatClassSetCharacter(e))t++;return t===1?Ye:Fe};N.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()&&nl(n))return!1;if(rl(n))return!1;return e.advance(),e.lastIntValue=n,!0};function nl(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 rl(e){return e===40||e===41||e===45||e===47||e>=91&&e<=93||e>=123&&e<=125}N.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();if(il(t))return e.lastIntValue=t,e.advance(),!0;return!1};function il(e){return e===33||e===35||e===37||e===38||e===44||e===45||e>=58&&e<=62||e===64||e===96||e===126}N.regexp_eatClassControlLetter=function(e){var t=e.current();if(Nn(t)||t===95)return e.lastIntValue=t%32,e.advance(),!0;return!1};N.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};N.regexp_eatDecimalDigits=function(e){var t=e.pos,n=0;e.lastIntValue=0;while(Nn(n=e.current()))e.lastIntValue=10*e.lastIntValue+(n-48),e.advance();return e.pos!==t};function Nn(e){return e>=48&&e<=57}N.regexp_eatHexDigits=function(e){var t=e.pos,n=0;e.lastIntValue=0;while(na(n=e.current()))e.lastIntValue=16*e.lastIntValue+ra(n),e.advance();return e.pos!==t};function na(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function ra(e){if(e>=65&&e<=70)return 10+(e-65);if(e>=97&&e<=102)return 10+(e-97);return e-48}N.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};N.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}N.regexp_eatFixedHexDigits=function(e,t){var n=e.pos;e.lastIntValue=0;for(var r=0;r<t;++r){var i=e.current();if(!na(i))return e.pos=n,!1;e.lastIntValue=16*e.lastIntValue+ra(i),e.advance()}return!0};var In=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 Kt(t,t.startLoc,t.endLoc);if(t.options.ranges)this.range=[t.start,t.end]},z=ae.prototype;z.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 In(this));this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()};z.getToken=function(){return this.next(),new In(this)};if(typeof Symbol<"u")z[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===f.eof,value:t}}}};z.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())};z.readToken=function(e){if(xe(e,this.options.ecmaVersion>=6)||e===92)return this.readWord();return this.getTokenFromCode(e)};z.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};z.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)};z.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=_s(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())};z.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&&!xt(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())};z.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&&gr.test(String.fromCharCode(e)))++this.pos;else break e}}};z.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)};z.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)};z.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)};z.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)};z.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)};z.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)};z.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||be.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)};z.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)};z.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)};z.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)};z.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13){if(++this.pos,t=this.fullCharCodeAtPos(),xe(t,!0)||t===92)return this.finishToken(f.privateId,this.readWord1())}this.raise(this.pos,"Unexpected character '"+Je(t)+"'")};z.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 '"+Je(e)+"'")};z.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)};z.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(be.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 We(this));p.reset(n,i,s),this.validateRegExpFlags(p),this.validateRegExpPattern(p);var l=null;try{l=new RegExp(i,s)}catch(m){}return this.finishToken(f.regexp,{pattern:i,flags:s,value:l})};z.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,m=t==null?1/0:t;l<m;++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 sl(e,t){if(t)return parseInt(e,8);return parseFloat(e.replace(/_/g,""))}function sa(e){if(typeof BigInt!=="function")return null;return BigInt(e.replace(/_/g,""))}z.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=sa(this.input.slice(t,this.pos)),++this.pos;else if(xe(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");return this.finishToken(f.num,n)};z.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=sa(this.input.slice(t,this.pos));if(++this.pos,xe(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(xe(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");var o=sl(this.input.slice(t,this.pos),n);return this.finishToken(f.num,o)};z.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};z.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(xt(r))this.raise(this.start,"Unterminated string constant");++this.pos}}return t+=this.input.slice(n,this.pos++),this.finishToken(f.string,t)};var aa={};z.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===aa)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1};z.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw aa;else this.raise(e,t)};z.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(xt(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+=`
|
|
23
|
-
`;break;default:e+=String.fromCharCode(n);break}if(this.options.locations)++this.curLine,this.lineStart=this.pos;t=this.pos}else++this.pos}};
|
|
22
|
+
`),cooked:this.value};return this.next(),n.tail=this.type===f.backQuote,this.finishNode(n,"TemplateElement")};F.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")};F.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)&&!Ee.test(this.input.slice(this.lastTokEnd,this.start))};F.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")};F.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 l=this.containsEsc;if(this.parsePropertyName(n),!e&&!l&&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,l),this.finishNode(n,"Property")};F.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")};F.parsePropertyValue=function(e,t,n,r,i,o,s,l){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&&!l&&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()};F.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")};F.initFunction=function(e){if(e.id=null,this.options.ecmaVersion>=6)e.generator=e.expression=!1;if(this.options.ecmaVersion>=8)e.async=!1};F.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(Cr(t,r.generator)|kn|(n?js: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")};F.parseArrowExpression=function(e,t,n,r){var i=this.yieldPos,o=this.awaitPos,s=this.awaitIdentPos;if(this.enterScope(Cr(n,!1)|vr),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")};F.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 l=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);if(!o||l){if(s=this.strictDirective(this.end),s&&l)this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list")}var p=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,Us);e.body=this.parseBlock(!1,void 0,s&&!o),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=p}this.exitScope()};F.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};F.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,Ar,t?null:n)}};F.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};F.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&wn)&&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")}};F.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};F.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};F.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};F.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")};F.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 Cn=pe.prototype;Cn.raise=function(e,t){var n=Er(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};Cn.raiseRecoverable=Cn.raise;Cn.curPosition=function(){if(this.options.locations)return new Pt(this.curLine,this.pos-this.lineStart)};var pt=pe.prototype,Jl=function(t){this.flags=t,this.var=[],this.lexical=[],this.functions=[]};pt.enterScope=function(e){this.scopeStack.push(new Jl(e))};pt.exitScope=function(){this.scopeStack.pop()};pt.treatFunctionsAsVarInScope=function(e){return e.flags&bt||!this.inModule&&e.flags>};pt.declareName=function(e,t,n){var r=!1;if(t===Ze){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>)delete this.undefinedExports[e]}else if(t===qs){var o=this.currentScope();o.lexical.push(e)}else if(t===Hs){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 l=this.scopeStack.length-1;l>=0;--l){var p=this.scopeStack[l];if(p.lexical.indexOf(e)>-1&&!(p.flags&Vs&&p.lexical[0]===e)||!this.treatFunctionsAsVarInScope(p)&&p.functions.indexOf(e)>-1){r=!0;break}if(p.var.push(e),this.inModule&&p.flags>)delete this.undefinedExports[e];if(p.flags&wn)break}if(r)this.raiseRecoverable(n,"Identifier '"+e+"' has already been declared")};pt.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};pt.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};pt.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(wn|Xt|Tt))return t}};pt.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(wn|Xt|Tt)&&!(t.flags&vr))return t}};var Jt=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]},Yt=pe.prototype;Yt.startNode=function(){return new Jt(this,this.start,this.startLoc)};Yt.startNodeAt=function(e,t){return new Jt(this,e,t)};function Ks(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}Yt.finishNode=function(e,t){return Ks.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)};Yt.finishNodeAt=function(e,t,n,r){return Ks.call(this,e,t,n,r)};Yt.copyNode=function(e){var t=new Jt(this,e.start,this.startLoc);for(var n in e)t[n]=e[n];return t};var Yl="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",zs="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",Xs=zs+" Extended_Pictographic",Js=Xs,Ys=Js+" EBase EComp EMod EPres ExtPict",Qs=Ys,Ql=Qs,Zl={9:zs,10:Xs,11:Js,12:Ys,13:Qs,14:Ql},ep="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",tp={9:"",10:"",11:"",12:"",13:"",14:ep},Is="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",Zs="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=Zs+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",ta=ea+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",na=ta+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",ra=na+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",np=ra+" "+Yl,rp={9:Zs,10:ea,11:ta,12:na,13:ra,14:np},ia={};function ip(e){var t=ia[e]={binary:lt(Zl[e]+" "+Is),binaryOfStrings:lt(tp[e]),nonBinary:{General_Category:lt(Is),Script:lt(rp[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(Wt=0,Tn=[9,10,11,12,13,14];Wt<Tn.length;Wt+=1)br=Tn[Wt],ip(br);var br,Wt,Tn,L=pe.prototype,An=function(t,n){this.parent=t,this.base=n||this};An.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};An.prototype.sibling=function(){return new An(this.parent,this.base)};var Ke=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=ia[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};Ke.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};Ke.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)};Ke.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};Ke.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};Ke.prototype.current=function(t){if(t===void 0)t=!1;return this.at(this.pos,t)};Ke.prototype.lookahead=function(t){if(t===void 0)t=!1;return this.at(this.nextIndex(this.pos,t),t)};Ke.prototype.advance=function(t){if(t===void 0)t=!1;this.pos=this.nextIndex(this.pos,t)};Ke.prototype.eat=function(t,n){if(n===void 0)n=!1;if(this.current(n)===t)return this.advance(n),!0;return!1};Ke.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],l=this.at(r,n);if(l===-1||l!==s)return!1;r=this.nextIndex(r,n)}return this.pos=r,!0};L.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 sp(e){for(var t in e)return!0;return!1}L.validateRegExpPattern=function(e){if(this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&sp(e.groupNames))e.switchN=!0,this.regexp_pattern(e)};L.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")}};L.regexp_disjunction=function(e){var t=this.options.ecmaVersion>=16;if(t)e.branchID=new An(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")};L.regexp_alternative=function(e){while(e.pos<e.source.length&&this.regexp_eatTerm(e));};L.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};L.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};L.regexp_eatQuantifier=function(e,t){if(t===void 0)t=!1;if(this.regexp_eatQuantifierPrefix(e,t))return e.eat(63),!0;return!1};L.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)};L.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};L.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)};L.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1};L.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 l=0;l<s.length;l++){var p=s.charAt(l);if(s.indexOf(p,l+1)>-1||n.indexOf(p)>-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};L.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};L.regexp_eatModifiers=function(e){var t="",n=0;while((n=e.current())!==-1&&ap(n))t+=Ye(n),e.advance();return t};function ap(e){return e===105||e===109||e===115}L.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)};L.regexp_eatInvalidBracedQuantifier=function(e){if(this.regexp_eatBracedQuantifier(e,!0))e.raise("Nothing to repeat");return!1};L.regexp_eatSyntaxCharacter=function(e){var t=e.current();if(sa(t))return e.lastIntValue=t,e.advance(),!0;return!1};function sa(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}L.regexp_eatPatternCharacters=function(e){var t=e.pos,n=0;while((n=e.current())!==-1&&!sa(n))e.advance();return e.pos!==t};L.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};L.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}};L.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};L.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){e.lastStringValue+=Ye(e.lastIntValue);while(this.regexp_eatRegExpIdentifierPart(e))e.lastStringValue+=Ye(e.lastIntValue);return!0}return!1};L.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(op(r))return e.lastIntValue=r,!0;return e.pos=t,!1};function op(e){return Te(e,!0)||e===36||e===95}L.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(cp(r))return e.lastIntValue=r,!0;return e.pos=t,!1};function cp(e){return ke(e,!0)||e===36||e===95||e===8204||e===8205}L.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};L.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};L.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};L.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)};L.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1};L.regexp_eatZero=function(e){if(e.current()===48&&!Nn(e.lookahead()))return e.lastIntValue=0,e.advance(),!0;return!1};L.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};L.regexp_eatControlLetter=function(e){var t=e.current();if(aa(t))return e.lastIntValue=t%32,e.advance(),!0;return!1};function aa(e){return e>=65&&e<=90||e>=97&&e<=122}L.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)&&lp(e.lastIntValue))return!0;if(r)e.raise("Invalid unicode escape");e.pos=n}return!1};function lp(e){return e>=0&&e<=1114111}L.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};L.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 oa=0,Qe=1,Fe=2;L.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(pp(t))return e.lastIntValue=-1,e.advance(),Qe;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===Fe)e.raise("Invalid property name");return r}e.raise("Invalid property name")}return oa};function pp(e){return e===100||e===68||e===115||e===83||e===119||e===87}L.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),Qe}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,i)}return oa};L.regexp_validateUnicodePropertyNameAndValue=function(e,t,n){if(!kt(e.unicodeProperties.nonBinary,t))e.raise("Invalid property name");if(!e.unicodeProperties.nonBinary[t].test(n))e.raise("Invalid property value")};L.regexp_validateUnicodePropertyNameOrValue=function(e,t){if(e.unicodeProperties.binary.test(t))return Qe;if(e.switchV&&e.unicodeProperties.binaryOfStrings.test(t))return Fe;e.raise("Invalid property name")};L.regexp_eatUnicodePropertyName=function(e){var t=0;e.lastStringValue="";while(ca(t=e.current()))e.lastStringValue+=Ye(t),e.advance();return e.lastStringValue!==""};function ca(e){return aa(e)||e===95}L.regexp_eatUnicodePropertyValue=function(e){var t=0;e.lastStringValue="";while(up(t=e.current()))e.lastStringValue+=Ye(t),e.advance();return e.lastStringValue!==""};function up(e){return ca(e)||Nn(e)}L.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)};L.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===Fe)e.raise("Negated character class may contain strings");return!0}return!1};L.regexp_classContents=function(e){if(e.current()===93)return Qe;if(e.switchV)return this.regexp_classSetExpression(e);return this.regexp_nonEmptyClassRanges(e),Qe};L.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")}}};L.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||ua(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};L.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)};L.regexp_classSetExpression=function(e){var t=Qe,n;if(this.regexp_eatClassSetRange(e));else if(n=this.regexp_eatClassSetOperand(e)){if(n===Fe)t=Fe;var r=e.pos;while(e.eatChars([38,38])){if(e.current()!==38&&(n=this.regexp_eatClassSetOperand(e))){if(n!==Fe)t=Qe;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===Fe)t=Fe}};L.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};L.regexp_eatClassSetOperand=function(e){if(this.regexp_eatClassSetCharacter(e))return Qe;return this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)};L.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===Fe)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};L.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};L.regexp_classStringDisjunctionContents=function(e){var t=this.regexp_classString(e);while(e.eat(124))if(this.regexp_classString(e)===Fe)t=Fe;return t};L.regexp_classString=function(e){var t=0;while(this.regexp_eatClassSetCharacter(e))t++;return t===1?Qe:Fe};L.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()&&dp(n))return!1;if(hp(n))return!1;return e.advance(),e.lastIntValue=n,!0};function dp(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 hp(e){return e===40||e===41||e===45||e===47||e>=91&&e<=93||e>=123&&e<=125}L.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();if(fp(t))return e.lastIntValue=t,e.advance(),!0;return!1};function fp(e){return e===33||e===35||e===37||e===38||e===44||e===45||e>=58&&e<=62||e===64||e===96||e===126}L.regexp_eatClassControlLetter=function(e){var t=e.current();if(Nn(t)||t===95)return e.lastIntValue=t%32,e.advance(),!0;return!1};L.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};L.regexp_eatDecimalDigits=function(e){var t=e.pos,n=0;e.lastIntValue=0;while(Nn(n=e.current()))e.lastIntValue=10*e.lastIntValue+(n-48),e.advance();return e.pos!==t};function Nn(e){return e>=48&&e<=57}L.regexp_eatHexDigits=function(e){var t=e.pos,n=0;e.lastIntValue=0;while(la(n=e.current()))e.lastIntValue=16*e.lastIntValue+pa(n),e.advance();return e.pos!==t};function la(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function pa(e){if(e>=65&&e<=70)return 10+(e-65);if(e>=97&&e<=102)return 10+(e-97);return e-48}L.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};L.regexp_eatOctalDigit=function(e){var t=e.current();if(ua(t))return e.lastIntValue=t-48,e.advance(),!0;return e.lastIntValue=0,!1};function ua(e){return e>=48&&e<=55}L.regexp_eatFixedHexDigits=function(e,t){var n=e.pos;e.lastIntValue=0;for(var r=0;r<t;++r){var i=e.current();if(!la(i))return e.pos=n,!1;e.lastIntValue=16*e.lastIntValue+pa(i),e.advance()}return!0};var In=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]},W=pe.prototype;W.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 In(this));this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()};W.getToken=function(){return this.next(),new In(this)};if(typeof Symbol<"u")W[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===f.eof,value:t}}}};W.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())};W.readToken=function(e){if(Te(e,this.options.ecmaVersion>=6)||e===92)return this.readWord();return this.getTokenFromCode(e)};W.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};W.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)};W.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=Os(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())};W.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&&!xt(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())};W.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&&Tr.test(String.fromCharCode(e)))++this.pos;else break e}}};W.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)};W.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)};W.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)};W.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)};W.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)};W.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)};W.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||Ee.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)};W.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)};W.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)};W.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)};W.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13){if(++this.pos,t=this.fullCharCodeAtPos(),Te(t,!0)||t===92)return this.finishToken(f.privateId,this.readWord1())}this.raise(this.pos,"Unexpected character '"+Ye(t)+"'")};W.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 '"+Ye(e)+"'")};W.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)};W.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(Ee.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 l=this.regexpState||(this.regexpState=new Ke(this));l.reset(n,i,s),this.validateRegExpFlags(l),this.validateRegExpPattern(l);var p=null;try{p=new RegExp(i,s)}catch(m){}return this.finishToken(f.regexp,{pattern:i,flags:s,value:p})};W.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,l=0;for(var p=0,m=t==null?1/0:t;p<m;++p,++this.pos){var d=this.input.charCodeAt(this.pos),y=void 0;if(r&&d===95){if(i)this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals");if(l===95)this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore");if(p===0)this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits");l=d;continue}if(d>=97)y=d-97+10;else if(d>=65)y=d-65+10;else if(d>=48&&d<=57)y=d-48;else y=1/0;if(y>=e)break;l=d,s=s*e+y}if(r&&l===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 mp(e,t){if(t)return parseInt(e,8);return parseFloat(e.replace(/_/g,""))}function da(e){if(typeof BigInt!=="function")return null;return BigInt(e.replace(/_/g,""))}W.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=da(this.input.slice(t,this.pos)),++this.pos;else if(Te(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");return this.finishToken(f.num,n)};W.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=da(this.input.slice(t,this.pos));if(++this.pos,Te(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(Te(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");var o=mp(this.input.slice(t,this.pos),n);return this.finishToken(f.num,o)};W.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};W.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(xt(r))this.raise(this.start,"Unterminated string constant");++this.pos}}return t+=this.input.slice(n,this.pos++),this.finishToken(f.string,t)};var ha={};W.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===ha)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1};W.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw ha;else this.raise(e,t)};W.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(xt(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+=`
|
|
23
|
+
`;break;default:e+=String.fromCharCode(n);break}if(this.options.locations)++this.curLine,this.lineStart=this.pos;t=this.pos}else++this.pos}};W.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]===`
|
|
24
24
|
`)++this.pos;case`
|
|
25
|
-
`:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")};
|
|
26
|
-
`;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return Je(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(xt(t)){if(this.options.locations)this.lineStart=this.pos,++this.curLine;return""}return String.fromCharCode(t)}};z.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);if(n===null)this.invalidStringToken(t,"Bad character escape sequence");return n};z.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(Ae(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?xe:Ae)(s,r))this.invalidStringToken(o,"Invalid Unicode escape");e+=Je(s),n=this.pos}else break;t=!1}return e+this.input.slice(n,this.pos)};z.readWord=function(){var e=this.readWord1(),t=f.name;if(this.keywords.test(e))t=Pn[e];return this.finishToken(t,e)};var oa="8.18.0";ae.acorn={Parser:ae,version:oa,defaultOptions:En,Position:At,SourceLocation:Kt,getLineInfo:xr,Node:Xt,TokenType:Y,tokTypes:f,keywordTypes:Pn,TokContext:Be,tokContexts:se,isIdentifierChar:Ae,isIdentifierStart:xe,Token:In,isNewLine:xt,lineBreak:be,lineBreakG:ws,nonASCIIwhitespace:gr};function al(e,t){return ae.parse(e,t)}function ol(e,t,n){return ae.parseExpressionAt(e,t,n)}function cl(e,t){return ae.tokenizer(e,t)}var Ie=!0,pl=new WeakMap;function ll(e){let t=e.Parser.acorn||e,n=pl.get(t);if(!n){let p=function(B){return B===T.name||B===T.string||B===T.num||w.includes(B)||D.includes(B)},l=function(B){return B===T.name||w.includes(B)||D.includes(B)},m=function(B){return B===T.name||D.includes(B)},d=function(B){return B===A.abstract||B===A.declare||B===A.enum||B===A.module||B===A.namespace||B===A.interface||B===A.type},g=function(B){return B===A.keyof||B===A.readonly||B===A.unique},y=function(B){return B===T.invalidTemplate},{tokTypes:T,keywordTypes:k}=t,w=Object.values(k),A=s(),D=Object.values(A),K=o(),O=i(),q=new RegExp(`^(?:${Object.keys(A).join("|")})$`);K.jsxTagStart.updateContext=function(){this.context.push(O.tc_expr),this.context.push(O.tc_oTag),this.exprAllowed=!1},K.jsxTagEnd.updateContext=function(B){let oe=this.context.pop();if(oe===O.tc_oTag&&B===T.slash||oe===O.tc_cTag)this.context.pop(),this.exprAllowed=this.curContext()===O.tc_expr;else this.exprAllowed=!0},n={tokTypes:{...A,...K},tokContexts:{...O},keywordsRegExp:q,tokenIsLiteralPropertyName:p,tokenIsKeywordOrIdentifier:l,tokenIsIdentifier:m,tokenIsTSDeclarationStart:d,tokenIsTSTypeOperator:g,tokenIsTemplate:y}}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:Ie}),asserts:r("asserts",{startsExpr:Ie}),global:r("global",{startsExpr:Ie}),keyof:r("keyof",{startsExpr:Ie}),readonly:r("readonly",{startsExpr:Ie}),unique:r("unique",{startsExpr:Ie}),abstract:r("abstract",{startsExpr:Ie}),declare:r("declare",{startsExpr:Ie}),enum:r("enum",{startsExpr:Ie}),module:r("module",{startsExpr:Ie}),namespace:r("namespace",{startsExpr:Ie}),interface:r("interface",{startsExpr:Ie}),type:r("type",{startsExpr:Ie})}}}var ul=1048576,Yt=2097152,_t=1,Rn=2,dl=4,wr=8,hl=16,ma=64,ya=128,fl=256,ml=512,ga=1024,Jf=_t|Rn|wr|ya,Yf=_t|0|wr|0,Qf=_t|0|dl|0,Zf=_t|0|hl|0,em=0|Rn|0|ya,tm=0|Rn|0|0,yl=_t|Rn|wr|fl,nm=0|ga,rm=0|ma,im=_t|0|0|ma,sm=yl|ml,am=0|ga,xa=4,ba=2,Ta=1,om=ba|Ta,cm=ba|xa,pm=Ta|xa,gl=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/y,ca=new RegExp("(?=("+gl.source+"))\\1"+/(?=[\n\r\u2028\u2029]|\/\*(?!.*?\*\/)|$)/.source,"y"),Qt=class{constructor(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1}};function xl(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 pa(e,t){let{computed:n,key:r}=e;return!n&&(r.type==="Identifier"&&r.name===t||r.type==="Literal"&&r.value===t)}var I={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."},Ln={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 bl(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,Ln.UnexpectedLeadingDecorator)}parseDecorator(){let s=this.startNode();this.next(),this.decoratorStack.push([]);let p=this.start,l=this.startLoc,m;if(this.match(r.parenL)){let d=this.start,g=this.startLoc;if(this.next(),m=this.parseExpression(),this.expect(r.parenR),this.options.preserveParens){let y=this.startNodeAt(d,g);y.expression=m,m=this.finishNode(y,"ParenthesizedExpression")}}else{m=this.parseIdent(!1);while(this.eat(r.dot)){let d=this.startNodeAt(p,l);d.object=m,d.property=this.parseIdent(!0),d.computed=!1,m=this.finishNode(d,"MemberExpression")}}return s.expression=this.parseMaybeDecoratorArguments(m),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 la={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:"♦"},Tl=/^[\da-fA-F]+$/,El=/^\d+$/;function Zt(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 Zt(e.object)+"."+Zt(e.property)}function Sl(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 y=this.input.charCodeAt(this.pos);switch(y){case 60:case 123:if(this.pos===this.start){if(y===60&&this.exprAllowed)return++this.pos,this.finishToken(o.jsxTagStart);return this.getTokenFromCode(y)}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 `"+(y===62?">":"}")+'` or `{"'+this.input[this.pos]+'"}`?');default:if(s(y))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),y;if(++this.pos,g===13&&this.input.charCodeAt(this.pos)===10)++this.pos,y=d?`
|
|
25
|
+
`:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")};W.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return`
|
|
26
|
+
`;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return Ye(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(xt(t)){if(this.options.locations)this.lineStart=this.pos,++this.curLine;return""}return String.fromCharCode(t)}};W.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);if(n===null)this.invalidStringToken(t,"Bad character escape sequence");return n};W.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(ke(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?Te:ke)(s,r))this.invalidStringToken(o,"Invalid Unicode escape");e+=Ye(s),n=this.pos}else break;t=!1}return e+this.input.slice(n,this.pos)};W.readWord=function(){var e=this.readWord1(),t=f.name;if(this.keywords.test(e))t=Pn[e];return this.finishToken(t,e)};var fa="8.18.0";pe.acorn={Parser:pe,version:fa,defaultOptions:En,Position:Pt,SourceLocation:zt,getLineInfo:Er,Node:Jt,TokenType:J,tokTypes:f,keywordTypes:Pn,TokContext:Be,tokContexts:oe,isIdentifierChar:ke,isIdentifierStart:Te,Token:In,isNewLine:xt,lineBreak:Ee,lineBreakG:Ms,nonASCIIwhitespace:Tr};function yp(e,t){return pe.parse(e,t)}function gp(e,t,n){return pe.parseExpressionAt(e,t,n)}function xp(e,t){return pe.tokenizer(e,t)}var Ie=!0,bp=new WeakMap;function Tp(e){let t=e.Parser.acorn||e,n=bp.get(t);if(!n){let l=function(I){return I===E.name||I===E.string||I===E.num||w.includes(I)||O.includes(I)},p=function(I){return I===E.name||w.includes(I)||O.includes(I)},m=function(I){return I===E.name||O.includes(I)},d=function(I){return I===A.abstract||I===A.declare||I===A.enum||I===A.module||I===A.namespace||I===A.interface||I===A.type},y=function(I){return I===A.keyof||I===A.readonly||I===A.unique},x=function(I){return I===E.invalidTemplate},{tokTypes:E,keywordTypes:P}=t,w=Object.values(P),A=s(),O=Object.values(A),j=o(),N=i(),X=new RegExp(`^(?:${Object.keys(A).join("|")})$`);j.jsxTagStart.updateContext=function(){this.context.push(N.tc_expr),this.context.push(N.tc_oTag),this.exprAllowed=!1},j.jsxTagEnd.updateContext=function(I){let ce=this.context.pop();if(ce===N.tc_oTag&&I===E.slash||ce===N.tc_cTag)this.context.pop(),this.exprAllowed=this.curContext()===N.tc_expr;else this.exprAllowed=!0},n={tokTypes:{...A,...j},tokContexts:{...N},keywordsRegExp:X,tokenIsLiteralPropertyName:l,tokenIsKeywordOrIdentifier:p,tokenIsIdentifier:m,tokenIsTSDeclarationStart:d,tokenIsTSTypeOperator:y,tokenIsTemplate:x}}return n;function r(l,p={}){return new t.TokenType("name",p)}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:Ie}),asserts:r("asserts",{startsExpr:Ie}),global:r("global",{startsExpr:Ie}),keyof:r("keyof",{startsExpr:Ie}),readonly:r("readonly",{startsExpr:Ie}),unique:r("unique",{startsExpr:Ie}),abstract:r("abstract",{startsExpr:Ie}),declare:r("declare",{startsExpr:Ie}),enum:r("enum",{startsExpr:Ie}),module:r("module",{startsExpr:Ie}),namespace:r("namespace",{startsExpr:Ie}),interface:r("interface",{startsExpr:Ie}),type:r("type",{startsExpr:Ie})}}}var Ep=1048576,Qt=2097152,Nt=1,Rn=2,Sp=4,Ir=8,vp=16,Sa=64,va=128,Cp=256,Ap=512,Ca=1024,om=Nt|Rn|Ir|va,cm=Nt|0|Ir|0,lm=Nt|0|Sp|0,pm=Nt|0|vp|0,um=0|Rn|0|va,dm=0|Rn|0|0,Pp=Nt|Rn|Ir|Cp,hm=0|Ca,fm=0|Sa,mm=Nt|0|0|Sa,ym=Pp|Ap,gm=0|Ca,Aa=4,Pa=2,ka=1,xm=Pa|ka,bm=Pa|Aa,Tm=ka|Aa,kp=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/y,ma=new RegExp("(?=("+kp.source+"))\\1"+/(?=[\n\r\u2028\u2029]|\/\*(?!.*?\*\/)|$)/.source,"y"),Zt=class{constructor(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1}};function wp(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 ya(e,t){let{computed:n,key:r}=e;return!n&&(r.type==="Identifier"&&r.name===t||r.type==="Literal"&&r.value===t)}var R={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."},Ln={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 _p(e,t,n){let{tokTypes:r}=n,{tokTypes:i}=t;return class extends e{takeDecorators(s){let l=this.decoratorStack[this.decoratorStack.length-1];if(l.length)s.decorators=l,this.resetStartLocationFromNode(s,l[0]),this.decoratorStack[this.decoratorStack.length-1]=[]}parseDecorators(s){let l=this.decoratorStack[this.decoratorStack.length-1];while(this.match(i.at)){let p=this.parseDecorator();l.push(p)}if(this.match(r._export)){if(!s)this.unexpected()}else if(!this.canHaveLeadingDecorator())this.raise(this.start,Ln.UnexpectedLeadingDecorator)}parseDecorator(){let s=this.startNode();this.next(),this.decoratorStack.push([]);let l=this.start,p=this.startLoc,m;if(this.match(r.parenL)){let d=this.start,y=this.startLoc;if(this.next(),m=this.parseExpression(),this.expect(r.parenR),this.options.preserveParens){let x=this.startNodeAt(d,y);x.expression=m,m=this.finishNode(x,"ParenthesizedExpression")}}else{m=this.parseIdent(!1);while(this.eat(r.dot)){let d=this.startNodeAt(l,p);d.object=m,d.property=this.parseIdent(!0),d.computed=!1,m=this.finishNode(d,"MemberExpression")}}return s.expression=this.parseMaybeDecoratorArguments(m),this.decoratorStack.pop(),this.finishNode(s,"Decorator")}parseMaybeDecoratorArguments(s){if(this.eat(r.parenL)){let l=this.startNodeAtNode(s);return l.callee=s,l.arguments=this.parseExprList(r.parenR,!1),this.finishNode(l,"CallExpression")}return s}}}var ga={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:"♦"},Np=/^[\da-fA-F]+$/,Ip=/^\d+$/;function en(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 en(e.object)+"."+en(e.property)}function Dp(e,t,n,r){let i=e.tokTypes,o=t.tokTypes,{isNewLine:s,isIdentifierChar:l}=e,p=Object.assign({allowNamespaces:!0,allowNamespacedObjects:!0},r||{});return class extends n{jsx_readToken(){let d="",y=this.pos;for(;;){if(this.pos>=this.input.length)this.raise(this.start,"Unterminated JSX contents");let x=this.input.charCodeAt(this.pos);switch(x){case 60:case 123:if(this.pos===this.start){if(x===60&&this.exprAllowed)return++this.pos,this.finishToken(o.jsxTagStart);return this.getTokenFromCode(x)}return d+=this.input.slice(y,this.pos),this.finishToken(o.jsxText,d);case 38:d+=this.input.slice(y,this.pos),d+=this.jsx_readEntity(),y=this.pos;break;case 62:case 125:this.raise(this.pos,"Unexpected token `"+this.input[this.pos]+"`. Did you mean `"+(x===62?">":"}")+'` or `{"'+this.input[this.pos]+'"}`?');default:if(s(x))d+=this.input.slice(y,this.pos),d+=this.jsx_readNewLine(!0),y=this.pos;else++this.pos}}}jsx_readNewLine(d){let y=this.input.charCodeAt(this.pos),x;if(++this.pos,y===13&&this.input.charCodeAt(this.pos)===10)++this.pos,x=d?`
|
|
27
27
|
`:`\r
|
|
28
|
-
`;else y=String.fromCharCode(g);if(this.options.locations)++this.curLine,this.lineStart=this.pos;return y}jsx_readString(d){let g="",y=++this.pos;for(;;){if(this.pos>=this.input.length)this.raise(this.start,"Unterminated string constant");let T=this.input.charCodeAt(this.pos);if(T===d)break;if(T===38)g+=this.input.slice(y,this.pos),g+=this.jsx_readEntity(),y=this.pos;else if(s(T))g+=this.input.slice(y,this.pos),g+=this.jsx_readNewLine(!1),y=this.pos;else++this.pos}return g+=this.input.slice(y,this.pos++),this.finishToken(i.string,g)}jsx_readEntity(){let d="",g=0,y,T=this.input[this.pos];if(T!=="&")this.raise(this.pos,"Entity must start with an ampersand");let k=++this.pos;while(this.pos<this.input.length&&g++<10){if(T=this.input[this.pos++],T===";"){if(d[0]==="#"){let w;if(d[1]==="x"||d[1]==="X"){if(d=d.substr(2),Tl.test(d))w=parseInt(d,16)}else if(d=d.substr(1),El.test(d))w=parseInt(d,10);if(w!==void 0&&w<=1114111)y=String.fromCodePoint(w)}else if(Object.prototype.hasOwnProperty.call(la,d))y=la[d];break}d+=T}if(y===void 0)return this.pos=k,"&";return y}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,y=this.jsx_parseIdentifier();if(!l.allowNamespaces||!this.eat(i.colon))return y;var T=this.startNodeAt(d,g);return T.namespace=y,T.name=this.jsx_parseIdentifier(),this.finishNode(T,"JSXNamespacedName")}jsx_parseElementName(){if(this.type===o.jsxTagEnd)return"";let d=this.start,g=this.startLoc,y=this.jsx_parseNamespacedName();if(this.type===i.dot&&y.type==="JSXNamespacedName"&&!l.allowNamespacedObjects)this.unexpected();while(this.eat(i.dot)){let T=this.startNodeAt(d,g);T.object=y,T.property=this.jsx_parseIdentifier(),y=this.finishNode(T,"JSXMemberExpression")}return y}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 y=this.startNodeAt(d,g);y.attributes=[];let T=this.jsx_parseElementName();if(T)y.name=T;while(this.type!==i.slash&&this.type!==o.jsxTagEnd)y.attributes.push(this.jsx_parseAttribute());return y.selfClosing=this.eat(i.slash),this.expect(o.jsxTagEnd),this.finishNode(y,T?"JSXOpeningElement":"JSXOpeningFragment")}jsx_parseClosingElementAt(d,g){let y=this.startNodeAt(d,g),T=this.jsx_parseElementName();if(T)y.name=T;return this.expect(o.jsxTagEnd),this.finishNode(y,T?"JSXClosingElement":"JSXClosingFragment")}jsx_parseElementAt(d,g){let y=this.startNodeAt(d,g),T=[],k=this.jsx_parseOpeningElementAt(d,g),w=null;if(!k.selfClosing){e:for(;;)switch(this.type){case o.jsxTagStart:if(d=this.start,g=this.startLoc,this.next(),this.eat(i.slash)){w=this.jsx_parseClosingElementAt(d,g);break e}T.push(this.jsx_parseElementAt(d,g));break;case o.jsxText:T.push(this.parseExprAtom());break;case i.braceL:T.push(this.jsx_parseExpressionContainer());break;default:this.unexpected()}if(Zt(w.name)!==Zt(k.name))this.raise(w.start,"Expected corresponding JSX closing tag for <"+Zt(k.name)+">")}let A=k.name?"Element":"Fragment";if(y["opening"+A]=k,y["closing"+A]=w,y.children=T,this.type===i.relational&&this.value==="<")this.raise(this.start,"Adjacent JSX elements must be wrapped in an enclosing tag");return this.finishNode(y,"JSX"+A)}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 vl(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(),m;if(this.type===i.string)m=this.parseLiteral(this.value);else m=this.parseIdent(!0);if(this.next(),l.key=m,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 Ar=["onToken","onComment","onInsertedSemicolon","onTrailingComma"];function Ea(){return{_tag:"BufferedParserEvents",segments:[]}}var Cl=Ea();function ua(e){return e.segments.length>0}var Al=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??Cl}replay(e){if(!ua(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 Ar){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 Ar){let t=this.callbackWrappers[e];if(t)this.options[e]=t}}deactivateCallbacks(){for(let e of Ar){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(ua(t))e.segments.push(t)}outputFor(e){return e.output??=Ea()}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 wt(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 Pl(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 kl(e,t){e.setLookaheadTokenState(t.lookahead),e.context=wt(t.context,t.contextLength,"token context stack"),e.scopeStack=wt(t.scopeStack,t.scopeStackLength,"scope stack"),e.importsStack=wt(t.importsStack,t.importsStackLength,"import stack"),e.labels=wt(t.labels,t.labelsLength,"label stack"),e.privateNameStack=wt(t.privateNameStack,t.privateNameStackLength,"private-name stack"),e.decoratorStack=wt(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 wl(e){return{capture:()=>Pl(e),restore:(t)=>kl(e,t)}}function _l(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,m){super(p,l,m);this.parseEffects=new Al(this.options,wl(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,m,d){for(let g=this.labels.length-1;g>=0;g--){let y=this.labels[g];if(y.statementStart!==p.start)break;this.parseEffects?.willSet(y,"statementStart"),this.parseEffects?.willSet(y,"kind")}return this.parseEffects?.willAppend(this.labels),super.parseLabeledStatement(p,l,m,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,m){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 y=this.scopeStack[g];if(d.willAppend(y.var),this.inModule&&y.flags&i.SCOPE_TOP)d.willSet(this.undefinedExports,p);if(y.flags&o)break}return super.declareName(p,l,m)}checkLocalExport(p){return this.parseEffects?.willSet(this.undefinedExports,p.name),super.checkLocalExport(p)}}}var Pr=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;function da(e){if(!e)throw Error("Assert fail")}function Nl(e){return e==="accessor"}function Il(e){return e==="in"||e==="out"}var Dn=1,ha=2,Dl=4,X={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 kr(e,t){return X.SCOPE_FUNCTION|(e?X.SCOPE_ASYNC:0)|(t?X.SCOPE_GENERATOR:0)}function Ll(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 Sa(e.object)}function Rl(e){return e.type==="UnaryExpression"&&(e.operator==="-"||e.operator==="+")&&e.argument.type==="Literal"&&(typeof e.argument.value==="number"||typeof e.argument.value==="bigint")}function Sa(e){if(e.type==="Identifier")return!0;if(e.type!=="MemberExpression")return!1;if(e.computed)return!1;return Sa(e.object)}function fa(e){return e==="private"||e==="public"||e==="protected"}function Ml(e){return Boolean(e.startsExpr)}function Ol(e){if(e==null)throw Error(`Unexpected ${e} value.`);return e}function Bl(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 va(e){let{dts:t=!1}=e||{},n=!!e?.jsx;return function(r){let i=r.acorn||Cr,o=ll(i),{tokTypes:s,keywordTypes:p,isIdentifierStart:l,lineBreak:m,isNewLine:d,tokContexts:g,isIdentifierChar:y}=i,{tokTypes:T,tokContexts:k,keywordsRegExp:w,tokenIsLiteralPropertyName:A,tokenIsTemplate:D,tokenIsTSDeclarationStart:K,tokenIsIdentifier:O,tokenIsKeywordOrIdentifier:q,tokenIsTSTypeOperator:B}=o;function oe(a,c,u=a.length){for(let h=c;h<u;h++){let x=a.charCodeAt(h);if(d(x))return h<u-1&&x===13&&a.charCodeAt(h+1)===10?h+2:h+1}return-1}if(r=bl(r,o,i),e?.jsx)r=Sl(i,o,r,typeof e.jsx==="boolean"?{}:e.jsx);r=vl(r,o,i);let Pe=_l(r,{acornTokenTypes:s,typeScriptTokenTypes:T,scope:X});class ye extends Pe{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=(h)=>{this.tsParseModifiers({modified:h,allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:I.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===k.tc_expr)return this.jsx_readToken();if(c===k.tc_oTag||c===k.tc_cTag){if(l(a))return this.jsx_readWord();if(a==62)return++this.pos,this.finishToken(T.jsxTagEnd);if((a===34||a===39)&&c==k.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(T.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(T.at);return super.getTokenFromCode(a)}isAbstractClass(){return this.ts_isContextual(T.abstract)&&this.lookahead().type===s._class}isDeclareClass(){if(!this.ts_isContextual(T.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(),h;try{h=a(()=>{throw c})}catch(x){let E=x===c;if(!E&&!(x instanceof SyntaxError))throw this.parseEffects.rollback(u),x;let b={events:this.parseEffects.rollbackWithEvents(u),selected:!1};return E?{node:null,error:null,thrown:!1,aborted:!0,failState:b}:{node:null,error:x,thrown:!0,aborted:!1,failState:b}}return this.parseEffects.commit(u),{node:h,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(fa(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,I.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 O(this.type)}tsTryParseTypeOrTypePredicateAnnotation(){return this.match(s.colon)?this.tsParseTypeOrTypePredicateAnnotation(s.colon):void 0}tsTryParseGenericAsyncArrowFunction(a,c,u){if(!this.tsMatchLeftRelational())return;let h=this.maybeInArrowParameters;this.maybeInArrowParameters=!0;let x=this.tsTryParseAndCatch(()=>{let E=this.startNodeAt(a,c);return E.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(E),E.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(s.arrow),E});if(this.maybeInArrowParameters=h,!x)return;return this.parseArrowExpression(x,x.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 h=this.input.charCodeAt(u);return!(y(h)||(h&64512)===55296)}return!1}isAbstractConstructorSignature(){return this.ts_isContextual(T.abstract)&&this.lookahead().type===s._new}nextTokenStartSince(a){return Pr.lastIndex=a,Pr.test(this.input)?Pr.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,h=this.preValue,x=this.preToken,E=this.isLookahead;try{if(this.createLookaheadState(),this.isLookahead=!0,a!==void 0)for(let b=0;b<a;b++)this.nextToken();else this.nextToken();return this.getCurLookaheadState()}finally{this.setLookaheadTokenState(c),this.context=u,this.preValue=h,this.preToken=x,this.isLookahead=E}}readWord(){let a=this.readWord1(),c=s.name;if(this.keywords.test(a))c=p[a];else if(new RegExp(w).test(a))c=T[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 h,x=c;(h=oe(this.input,x,this.pos))>-1;)++this.curLine,x=this.lineStart=h;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 h=this.input.charCodeAt(this.pos+=a);while(this.pos<this.input.length&&!d(h))h=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 ca.lastIndex=this.end,ca.test(this.input)}addExtra(a,c,u,h=!0){if(!a)return;let x=a.extra=a.extra||{};if(h)x[c]=u;else Object.defineProperty(x,c,{enumerable:h,value:u})}isLiteralPropertyName(){return A(this.type)}hasPrecedingLineBreak(){return m.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(T.readonly);if(this.ts_isContextual(T.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 h=u.type;if(a===h){for(let x=0;x<c;x++)this.next();return!0}else return!1}ts_eatContextualWithState(a,c,u){if(w.test(a)){if(this.ts_isContextualWithState(u,T[a])){for(let h=0;h<c;h++)this.next();return!0}return!1}else{if(!this.isContextualWithState(a,u))return!1;for(let h=0;h<c;h++)this.next();return!0}}canHaveLeadingDecorator(){return this.match(s._class)||this.isAbstractClass()||this.isDeclareClass()}eatContextual(a){if(w.test(a)){if(this.ts_isContextual(T[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?X.BIND_TS_CONST_ENUM:X.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(ul),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(T.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(Yt),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===T.enum)return this.tsParseEnumDeclaration(a,{declare:!0});if(c===T.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===T.interface){let h=this.tsParseInterfaceDeclaration(a,{declare:!0});if(h)return h}if(O(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,h){let x=[],E=-1;for(;;){if(this.tsIsListTerminator(a))break;E=-1;let b=c();if(b==null)return;if(x.push(b),this.eat(s.comma)){E=this.lastTokStart;continue}if(this.tsIsListTerminator(a))break;if(u)this.expect(s.comma);return}if(h)h.value=E;return x}tsParseDelimitedList(a,c,u){return Ol(this.tsParseDelimitedListWorker(a,c,!0,u))}tsParseBracketedList(a,c,u,h,x){if(!h)if(u)this.expect(s.bracketL);else this.expect(s.relational);let E=this.tsParseDelimitedList(a,c,x);if(u)this.expect(s.bracketR);else this.expect(s.relational);return E}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(O(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,I.UnsupportedSignatureParameterKind({type:a.type}));return a})}tsParseTypePredicateAsserts(){if(this.type!==T.asserts)return!1;let a=this.containsEsc;if(this.next(),!O(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(),h=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(h){let S=this.tsParseTypeAnnotation(!1);return u.parameterName=h,u.typeAnnotation=S,u.asserts=!1,c.typeAnnotation=this.finishNode(u,"TSTypePredicate"),this.finishNode(c,"TSTypeAnnotation")}let x=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(x&&this.match(s._this)){let S=this.tsParseThisTypeOrThisTypePredicate();if(S.type==="TSThisType")u.parameterName=S,u.asserts=!0,u.typeAnnotation=null,S=this.finishNode(u,"TSTypePredicate");else this.resetStartLocationFromNode(S,u),S.asserts=!0;return c.typeAnnotation=S,this.finishNode(c,"TSTypeAnnotation")}let E=x&&this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!E){if(!x)return this.tsParseTypeAnnotation(!1,c);return u.parameterName=this.parseIdent(),u.asserts=x,u.typeAnnotation=null,c.typeAnnotation=this.finishNode(u,"TSTypePredicate"),this.finishNode(c,"TSTypeAnnotation")}let b=this.tsParseTypeAnnotation(!1);return u.parameterName=E,u.typeAnnotation=b,u.asserts=x,c.typeAnnotation=this.finishNode(u,"TSTypePredicate"),this.finishNode(c,"TSTypeAnnotation")})}tsFillSignature(a,c){let u=a===s.arrow,h="parameters",x="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,I.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 h=this.startNode(),x=this.eat(u),E=[];do E.push(c());while(this.eat(u));if(E.length===1&&!x)return E[0];return h.types=E,this.finishNode(h,a)}tsCheckTypeAnnotationForReadOnly(a){switch(a.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(a.start,I.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,I.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(!q(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),h;if(this.tsIsTupleElementLabel()){let x=this.startNode();x.label=this.parseIdent(!0),x.optional=this.eat(s.question),this.expect(s.colon),x.elementType=this.tsParseType(),h=this.finishNode(x,"TSNamedTupleMember")}else{h=this.tsParseType();let x=this.eat(s.question);if(this.eat(s.colon))this.raise(h.start,I.InvalidTupleMemberLabel);if(x){let E=this.startNodeAtNode(h);E.typeAnnotation=h,h=this.finishNode(E,"TSOptionalType")}}if(u){let x=this.startNodeAt(c,a);x.typeAnnotation=h,h=this.finishNode(x,"TSRestType")}return h}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:h}=u;if(c&&h!=="TSRestType"&&h!=="TSOptionalType"&&!(h==="TSNamedTupleMember"&&u.optional))this.raise(u.start,I.OptionalTypeBeforeRequired);if(c||=h==="TSNamedTupleMember"&&u.optional||h==="TSOptionalType",h==="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(q(a)||a===s._void||a===s._null){let c=a===s._void?"TSVoidKeyword":a===s._null?"TSNullKeyword":Bl(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 B(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(){da(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(),O(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:I.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,I.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(h){throw this.parseEffects.rollback(c),h}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:h,errorTemplate:x=I.InvalidModifierOnTypeMember}){let E={},b=(C,v,P,_)=>{if(v===P&&a[_])this.raise(C.column,I.InvalidModifiersOrder({orderedModifiers:[P,_]}))},S=(C,v,P,_)=>{if(a[P]&&v===_||a[_]&&v===P)this.raise(C.column,I.IncompatibleModifiers({modifiers:[P,_]}))};for(;;){let C=this.startLoc,v=this.tsParseModifier(c.concat(u??[]),h);if(!v)break;if(fa(v))if(a.accessibility)this.raise(this.start,I.DuplicateAccessibilityModifier());else b(C,v,v,"override"),b(C,v,v,"static"),b(C,v,v,"readonly"),b(C,v,v,"accessor"),E.accessibility=v,a.accessibility=v;else if(Il(v))if(a[v])this.raise(this.start,I.DuplicateModifier({modifier:v}));else b(C,v,"in","out"),E[v]=v,a[v]=!0;else if(Nl(v))if(a[v])this.raise(this.start,I.DuplicateModifier({modifier:v}));else S(C,v,"accessor","readonly"),S(C,v,"accessor","override"),E[v]=v,a[v]=!0;else if(v==="const")if(a[v])this.raise(this.start,I.DuplicateModifier({modifier:v}));else E[v]=v,a[v]=!0;else if(Object.hasOwnProperty.call(a,v))this.raise(this.start,I.DuplicateModifier({modifier:v}));else b(C,v,"static","readonly"),b(C,v,"static","override"),b(C,v,"override","readonly"),b(C,v,"abstract","override"),S(C,v,"declare","override"),S(C,v,"static","abstract"),E[v]=v,a[v]=!0;if(u?.includes(v))this.raise(this.start,x)}return E}tsParseInOutModifiers(a){this.tsParseModifiers({modified:a,allowedModifiers:["in","out"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:I.InvalidModifierOnTypeParameter})}tsParseClassTypeParameterModifiers(a){this.tsParseModifiers({modified:a,allowedModifiers:["const","in","out"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:I.InvalidModifierOnTypeParameter})}parseMaybeUnary(a,c,u,h){if(!e?.jsx&&this.tsMatchLeftRelational())return this.tsParseTypeAssertion();else return super.parseMaybeUnary(a,c,u,h)}tsParseTypeAssertion(){if(n)this.raise(this.start,I.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,I.EmptyTypeArguments);if(a&&this.curContext()!==k.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 h=this.startNode();if(h.expression=this.tsParseEntityName(),this.tsMatchLeftRelational())h.typeParameters=this.tsParseTypeArguments();return this.finishNode(h,"TSExpressionWithTypeArguments")});if(!u.length)this.raise(c,I.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,I.ReadonlyForMethodSignature);let h=u;if(h.kind&&this.tsMatchLeftRelational())this.raise(this.start,I.AccesorCannotHaveTypeParameters);this.tsFillSignature(s.colon,h),this.tsParseTypeMemberSemicolon();let x="parameters",E="typeAnnotation";if(h.kind==="get"){if(h[x].length>0){if(this.raise(this.start,"A 'get' accesor must not have any formal parameters."),this.isThisParam(h[x][0]))this.raise(this.start,I.AccesorCannotDeclareThisParameter)}}else if(h.kind==="set"){if(h[x].length!==1)this.raise(this.start,"A 'get' accesor must not have any formal parameters.");else{let b=h[x][0];if(this.isThisParam(b))this.raise(this.start,I.AccesorCannotDeclareThisParameter);if(b.type==="Identifier"&&b.optional)this.raise(this.start,I.SetAccesorCannotHaveOptionalParameter);if(b.type==="RestElement")this.raise(this.start,I.SetAccesorCannotHaveRestParameter)}if(h[E])this.raise(h[E].start,I.SetAccesorCannotHaveReturnType)}else h.kind="method";return this.finishNode(h,"TSMethodSignature")}else{let h=u;if(c)h.readonly=!0;let x=this.tsTryParseTypeAnnotation();if(x)h.typeAnnotation=x;return this.tsParseTypeMemberSemicolon(),this.finishNode(h,"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(O(this.type)){a.id=this.parseIdent(),this.checkLValSimple(a.id,X.BIND_TS_INTERFACE);let h=this.currentScope();this.maybeExportDefined(h,a.id.name)}else a.id=null,this.raise(this.start,I.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(T.interface)){if(!this.hasFollowingLineBreak())return a.abstract=!0,this.tsParseInterfaceDeclaration(a)}else this.unexpected(a.start)}tsIsDeclarationStart(){return K(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(Yt);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(O(a)){if(c&&!this.containsEsc||u)return!1;if((a===T.type||a===T.interface)&&!this.containsEsc){let E=this.lookahead();if(O(E.type)&&!this.isContextualWithState("from",E)||E.type===s.braceL)return!1}}else if(!this.match(s._default))return!1;let h=this.nextTokenStart(),x=this.isUnparsedContextual(h,"from");if(this.input.charCodeAt(h)===44||O(this.type)&&x)return!0;if(this.match(s._default)&&x){let E=this.input.charCodeAt(this.nextTokenStartSince(h+4));return E===34||E===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,X.BIND_TS_NAMESPACE);if(this.eat(s.dot)){let u=this.startNode();this.tsParseModuleOrNamespaceDeclaration(u,!0),a.body=u}else this.enterScope(Yt),a.body=this.tsParseModuleBlock(),super.exitScope();return this.finishNode(a,"TSModuleDeclaration")}checkLValSimple(a,c=X.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,X.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(T.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)||O(this.type)))return this.tsParseAbstractDeclaration(a);break;case"module":if(this.tsCheckLineTerminator(u)){if(this.match(s.string))return this.tsParseAmbientExternalModuleDeclaration(a);else if(O(this.type))return this.tsParseModuleOrNamespaceDeclaration(a)}break;case"namespace":if(this.tsCheckLineTerminator(u)&&O(this.type))return this.tsParseModuleOrNamespaceDeclaration(a);break;case"type":if(this.tsCheckLineTerminator(u)&&O(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,X.BIND_LEXICAL),super.expect(s.eq);let u=this.tsParseModuleReference();if(a.importKind==="type"&&u.type!=="TSExternalModuleReference")this.raise(u.start,I.ImportAliasHasImportType);return a.moduleReference=u,super.semicolon(),this.finishNode(a,"TSImportEqualsDeclaration")}isExportDefaultSpecifier(){if(this.tsIsDeclarationStart())return!1;let{type:a}=this;if(O(a)){if(this.isContextual("async")||this.isContextual("let"))return!1;if((a===T.type||a===T.interface)&&!this.containsEsc){let h=this.lookahead();if(O(h.type)&&!this.isContextualWithState("from",h)||h.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||O(this.type)&&u)return!0;if(this.match(s._default)&&u){let h=this.input.charCodeAt(this.nextTokenStartSince(c+4));return h===34||h===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,h,x){if(this.initFunction(a),this.ecmaVersion>=9||this.ecmaVersion>=6&&!h){if(this.type===s.star&&c&ha)this.unexpected();a.generator=this.eat(s.star)}if(this.ecmaVersion>=8)a.async=!!h;if(c&Dn)a.id=c&Dl&&this.type!==s.name?null:this.parseIdent();let E=this.yieldPos,b=this.awaitPos,S=this.awaitIdentPos,C=this.maybeInArrowParameters;if(this.maybeInArrowParameters=!1,this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(kr(a.async,a.generator)),!(c&Dn))a.id=this.type===s.name?this.parseIdent():null;this.parseFunctionParams(a);let v=c&Dn;if(this.parseFunctionBody(a,u,!1,x,{isFunctionDeclaration:v}),v&&this.isAmbientContext&&a.id){if(this.currentScope().flags&X.SCOPE_TOP)this.declareName(a.id.name,X.BIND_FLAGS_TS_EXPORT_ONLY,a.id.start)}if(this.yieldPos=E,this.awaitPos=b,this.awaitIdentPos=S,c&Dn&&a.id&&!(c&ha))if(a.body)this.checkLValSimple(a.id,this.strict||a.generator||a.async?this.treatFunctionsAsVar?X.BIND_VAR:X.BIND_LEXICAL:X.BIND_FUNCTION);else this.checkLValSimple(a.id,X.BIND_NONE);return this.maybeInArrowParameters=C,this.finishNode(a,v?"FunctionDeclaration":"FunctionExpression")}parseFunctionBody(a,c=!1,u=!1,h=!1,x){if(this.match(s.colon))a.returnType=this.tsParseTypeOrTypePredicateAnnotation(s.colon);let E=x?.isFunctionDeclaration?"TSDeclareFunction":x?.isClassMethod?"TSDeclareMethod":void 0;if(E&&!this.match(s.braceL)&&this.isLineTerminator())return this.exitScope(),this.finishNode(a,E);if(E==="TSDeclareFunction"&&this.isAmbientContext){if(this.raise(a.start,I.DeclareFunctionHasImplementation),a.declare)return super.parseFunctionBody(a,c,u,!1),this.finishNode(a,E)}return super.parseFunctionBody(a,c,u,h),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 b=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(b)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,h=this.startLoc,x=this.type===s._import;if(a.callee=this.parseSubscripts(this.parseExprAtom(),u,h,!0,!1),x&&a.callee.type==="ImportExpression")this.raise(u,"Cannot use new with import()");let{callee:E}=a;if(E.type==="TSInstantiationExpression"&&!E.extra?.parenthesized)a.typeArguments=E.typeArguments,a.callee=E.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,h,x){if(s._in.binop>h&&!this.hasPrecedingLineBreak()){let E;if(this.isContextual("as"))E="TSAsExpression";if(this.isContextual("satisfies"))E="TSSatisfiesExpression";if(E){let b=this.startNodeAt(c,u);b.expression=a;let S=this.tsTryNextParseConstantContext();if(S)b.typeAnnotation=S;else b.typeAnnotation=this.tsNextThenParseType();return this.finishNode(b,E),this.reScan_lt_gt(),this.parseExprOp(b,c,u,h,x)}}return super.parseExprOp(a,c,u,h,x)}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",O(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(O(c.type)&&u.type===s.eq){this.next();let h=this.tsParseImportEqualsDeclaration(a);return this.importOrExportOuterKind="value",h}}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,I.TypeImportCannotSpecifyDefaultAndNamed);return a}parseExportDefaultDeclaration(){if(this.isAbstractClass()){let a=this.startNode();return this.next(),a.abstract=!0,this.parseClass(a,!0)}if(this.match(T.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(T.type)&&this.lookaheadCharCode()!==61)a.importKind="type",this.importOrExportOuterKind="type",this.next();else a.importKind="value",this.importOrExportOuterKind="value";let h=this.tsParseImportEqualsDeclaration(a,!0);return this.importOrExportOuterKind=void 0,h}else if(this.ts_eatWithState(s.eq,2,u)){let h=a;return h.expression=this.parseExpression(),this.semicolon(),this.importOrExportOuterKind=void 0,this.finishNode(h,"TSExportAssignment")}else if(this.ts_eatContextualWithState("as",2,u)){let h=a;return this.expectContextual("namespace"),h.id=this.parseIdent(),this.semicolon(),this.importOrExportOuterKind=void 0,this.finishNode(h,"TSNamespaceExportDeclaration")}else{let h=this.lookahead(2).type;if(this.ts_isContextualWithState(u,T.type)&&(h===s.braceL||h===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 x of a.specifiers)if(this.checkUnreserved(x.local),this.checkLocalExport(x.local),x.local.type==="Literal")this.raise(x.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 h=super.parseMaybeDefault(a,c,u);if(h.type==="AssignmentPattern"&&h.typeAnnotation&&h.right.start<h.typeAnnotation.start)this.raise(h.typeAnnotation.start,I.TypeAnnotationAfterAssign);return h}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 h=a[u];if(h?.type==="TSTypeCastExpression")a[u]=this.typeCastToParameter(h)}return super.toAssignableList(a,c)}reportReservedArrowTypeParam(a){if(a.params.length===1&&!a.extra?.trailingComma&&n)this.raise(a.start,I.ReservedArrowTypeParam)}parseExprAtom(a,c,u){if(this.type===T.jsxText)return this.jsx_parseText();else if(this.type===T.jsxTagStart)return this.jsx_parseElement();else if(this.type===T.at)return this.parseDecorators(),this.parseExprAtom();else if(O(this.type)){let h=this.potentialArrowAt===this.start,x=this.start,E=this.startLoc,b=this.containsEsc,S=this.parseIdent(!1);if(this.ecmaVersion>=8&&!b&&S.name==="async"&&!this.canInsertSemicolon()&&this.eat(s._function))return this.overrideContext(g.f_expr),this.parseFunction(this.startNodeAt(x,E),0,!1,!0,c);if(h&&!this.canInsertSemicolon()){if(this.eat(s.arrow))return this.parseArrowExpression(this.startNodeAt(x,E),[S],!1,c);if(this.ecmaVersion>=8&&S.name==="async"&&this.type===s.name&&!b&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc)){if(S=this.parseIdent(!1),this.canInsertSemicolon()||!this.eat(s.arrow))this.unexpected();return this.parseArrowExpression(this.startNodeAt(x,E),[S],!0,c)}}return S}else return super.parseExprAtom(a,c,u)}parseExprAtomDefault(){if(O(this.type)){let a=this.potentialArrowAt===this.start,c=this.containsEsc,u=this.parseIdent();if(!c&&u.name==="async"&&!this.canInsertSemicolon()){let{type:h}=this;if(h===s._function)return this.next(),this.parseFunction(this.startNodeAtNode(u),void 0,!0,!0);else if(O(h))if(this.lookaheadCharCode()===61){let x=this.parseIdent(!1);if(this.canInsertSemicolon()||!this.eat(s.arrow))this.unexpected();return this.parseArrowExpression(this.startNodeAtNode(u),[x],!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(q(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:h}=this;this.next(),super.parseVar(a,!1,c,u||h),this.semicolon();let x=this.finishNode(a,"VariableDeclaration");if(!h)return x;for(let{id:E,init:b}of x.declarations){if(!b)continue;if(c!=="const"||!!E.typeAnnotation)this.raise(b.start,I.InitializerNotAllowedInAmbientContext);else if(b.type!=="Literal"&&(b.type!=="TemplateLiteral"||b.expressions.length>0)&&!Rl(b)&&!Ll(b))this.raise(b.start,I.ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference)}return x}parseStatement(a,c,u){if(this.match(T.at))this.parseDecorators(!0);if(this.match(s._const)&&this.isLookaheadContextual("enum")){let h=this.startNode();return this.expect(s._const),this.tsParseEnumDeclaration(h,{const:!0})}if(this.ts_isContextual(T.enum))return this.tsParseEnumDeclaration(this.startNode());if(this.ts_isContextual(T.interface)){let h=this.tsParseInterfaceDeclaration(this.startNode());if(h)return h}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,I.ClassMethodHasReadonly);if(a.declare&&this.match(s.parenL))this.raise(a.start,I.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(T.at))return!0;return super.shouldParseExportStatement()}parseConditional(a,c,u,h,x){if(this.eat(s.question)){let E=this.startNodeAt(c,u);return E.test=a,E.consequent=this.parseMaybeAssign(),this.expect(s.colon),E.alternate=this.parseMaybeAssign(h),this.finishNode(E,"ConditionalExpression")}return a}parseMaybeConditional(a,c){let u=this.start,h=this.startLoc,x=this.parseExprOps(a,c);if(this.checkExpressionErrors(c))return x;if(!this.maybeInArrowParameters||!this.match(s.question))return this.parseConditional(x,u,h,a,c);let E=this.tryParse(()=>this.parseConditional(x,u,h,a,c));if(!E.node){if(E.error)this.setOptionalParametersError(c,E.error);return x}return E.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 h=this.startNodeAt(c,u);return h.expression=a,h.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(h,"TSTypeCastExpression")}return a}parseExportDeclaration(a){if(!this.isAmbientContext&&this.ts_isContextual(T.declare))return this.tsInAmbientContext(()=>this.parseExportDeclaration(a));let c=this.start,u=this.startLoc,h=this.eatContextual("declare");if(h&&(this.ts_isContextual(T.declare)||!this.shouldParseExportStatement()))this.raise(this.start,I.ExpectedAmbientAfterExportDeclare);let E=O(this.type)&&this.tsTryParseExportDeclaration()||this.parseStatement(null);if(!E)return null;if(E.type==="TSInterfaceDeclaration"||E.type==="TSTypeAliasDeclaration"||h)a.exportKind="type";if(h)this.resetStartLocation(E,c,u),E.declare=!0;return E}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,I.PrivateElementHasAbstract);if(a.accessibility)this.raise(a.start,I.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,I.DeclareClassFieldHasInitializer);if(a.abstract&&this.match(s.eq)){let{key:u}=a;this.raise(this.start,I.AbstractPropertyHasInitializer({propertyName:u.type==="Identifier"&&!a.computed?u.name:`[${this.input.slice(u.start,u.end)}]`}))}}return super.parseClassField(a)}parseClassMethod(a,c,u,h){let x=a.kind==="constructor",E=a.key.type==="PrivateIdentifier",b=this.tsTryParseTypeParameters(this.tsParseConstModifier);if(E){if(b)a.typeParameters=b;if(a.accessibility)this.raise(a.start,I.PrivateMethodsHasAccessibility({modifier:a.accessibility}))}else if(b&&x)this.raise(b.start,I.ConstructorHasTypeParameters);let{declare:S=!1,kind:C}=a;if(S&&(C==="get"||C==="set"))this.raise(a.start,I.DeclareAccessor({kind:C}));if(b)a.typeParameters=b;let v=a.key;if(a.kind==="constructor"){if(c)this.raise(v.start,"Constructor can't be a generator");if(u)this.raise(v.start,"Constructor can't be an async method")}else if(a.static&&pa(a,"prototype"))this.raise(v.start,"Classes may not have a static property named prototype");let P=a.value=this.parseMethod(c,u,h,!0,a);if(a.kind==="get"&&P.params.length!==0)this.raiseRecoverable(P.start,"getter should have no params");if(a.kind==="set"&&P.params.length!==1)this.raiseRecoverable(P.start,"setter should have exactly one param");if(a.kind==="set"&&P.params[0].type==="RestElement")this.raiseRecoverable(P.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="",h=!1,x=!1,E="method",b=!1,S=["declare","private","public","protected","accessor","override","abstract","readonly","static"],C=this.tsParseModifiers({modified:c,allowedModifiers:S,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:I.InvalidModifierOnTypeParameterPositions});b=Boolean(C.static);let v=()=>{if(this.tsIsStartOfStaticBlocks()){if(this.next(),this.next(),this.tsHasSomeModifiers(c,S))this.raise(this.start,I.StaticBlockCannotHaveModifier);if(this.ecmaVersion>=13)return super.parseClassStaticBlock(c),c}else{let P=this.tsTryParseIndexSignature(c);if(P){if(c.abstract)this.raise(c.start,I.IndexSignatureHasAbstract);if(c.accessibility)this.raise(c.start,I.IndexSignatureHasAccessibility({modifier:c.accessibility}));if(c.declare)this.raise(c.start,I.IndexSignatureHasDeclare);if(c.override)this.raise(c.start,I.IndexSignatureHasOverride);return P}if(!this.inAbstractClass&&c.abstract)this.raise(c.start,I.NonAbstractClassHasAbstractMethod);if(c.override){if(!a)this.raise(c.start,I.OverrideNotInSubClass)}if(c.static=b,b){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())x=!0;else u="async";if(!u&&(this.ecmaVersion>=9||!x)&&this.eat(s.star))h=!0;if(!u&&!x&&!h){let _=this.value;if(this.eatContextual("get")||this.eatContextual("set"))if(this.isClassElementNameStart())E=_;else u=_}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||E!=="method"||h||x){let _=!c.static&&pa(c,"constructor"),R=_&&a;if(_&&E!=="method")this.raise(c.key.start,"Constructor can't have get/set modifier");c.kind=_?"constructor":E,this.parseClassMethod(c,h,x,R)}else this.parseClassField(c);return c}};if(c.declare)this.tsInAmbientContext(v);else v();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,h){if(this.match(s.colon))a.returnType=this.tsParseTypeAnnotation();let x=this.yieldPos,E=this.awaitPos,b=this.awaitIdentPos;this.enterScope(kr(u,!1)|X.SCOPE_ARROW),this.initFunction(a);let S=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,h),this.yieldPos=x,this.awaitPos=E,this.awaitIdentPos=b,this.maybeInArrowParameters=S,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 h=!1,x=-1,E=-1,b=-1;if(c)x=c.parenthesizedAssign,E=c.trailingComma,b=c.doubleProto,c.parenthesizedAssign=c.trailingComma=-1;else c=new Qt,h=!0;let S=this.start,C=this.startLoc;if(this.type===s.parenL||O(this.type))this.potentialArrowAt=this.start,this.potentialArrowInForAwait=a==="await";let v=this.parseMaybeConditional(a,c);if(u)v=u.call(this,v,S,C);if(this.type.isAssign){let P=this.startNodeAt(S,C);if(P.operator=this.value,this.type===s.eq)v=this.toAssignable(v,!0,c,!0);if(!h)c.parenthesizedAssign=c.trailingComma=c.doubleProto=-1;if(c.shorthandAssign>=v.start)c.shorthandAssign=-1;if(!this.maybeInArrowParameters)if(this.type===s.eq)this.checkLValPattern(v);else this.checkLValSimple(v);if(P.left=v,this.next(),P.right=this.parseMaybeAssign(a),b>-1)c.doubleProto=b;return this.finishNode(P,"AssignmentExpression")}else if(h)this.checkExpressionErrors(c,!0);if(x>-1)c.parenthesizedAssign=x;if(E>-1)c.trailingComma=E;return v}parseMaybeAssign(a,c,u){let h,x;if(e?.jsx&&(this.matchJsx("jsxTagStart")||this.tsMatchLeftRelational())){if(h=this.tryParse(()=>this.parseMaybeAssignOrigin(a,c,u)),!h.error)return h.node;let S=this.context,C=S[S.length-1],v=S[S.length-2];if(C===o.tokContexts.tc_oTag&&v===o.tokContexts.tc_expr)this.parseEffects.pop(S),this.parseEffects.pop(S);else if(C===o.tokContexts.tc_oTag||C===o.tokContexts.tc_expr)this.parseEffects.pop(S)}if(!h?.error&&!this.tsMatchLeftRelational())return this.parseMaybeAssignOrigin(a,c,u);let E,b=this.tryParse((S)=>{E=this.tsParseTypeParameters(this.tsParseConstModifier);let C=this.parseMaybeAssignOrigin(a,c,u);if(C.type!=="ArrowFunctionExpression"||C.extra?.parenthesized)S();if(E?.params.length!==0)this.resetStartLocationFromNode(C,E);return C.typeParameters=E,C});if(!b.error&&!b.aborted){if(E)this.reportReservedArrowTypeParam(E);return b.node}if(!h){if(da(!0),x=this.tryParse(()=>this.parseMaybeAssignOrigin(a,c,u)),!x.error)return x.node}if(h?.thrown)throw this.selectTryParseResult(h),h.error;if(b.thrown)throw this.selectTryParseResult(b),b.error;if(x?.thrown)throw this.selectTryParseResult(x),x.error;throw h?.error||b.error||x?.error}parseAssignableListItem(a){let c=[];while(this.match(T.at))c.push(this.parseDecorator());let u=this.start,h=this.startLoc,x,E=!1,b=!1;if(a!==void 0){let v={};if(this.tsParseModifiers({modified:v,allowedModifiers:["public","private","protected","override","readonly"]}),x=v.accessibility,b=v.override,E=v.readonly,a===!1&&(x||E||b))this.raise(h.column,I.UnexpectedParameterModifier)}let S=this.parseMaybeDefault(u,h);this.parseBindingListItem(S);let C=this.parseMaybeDefault(S.start,S.loc.start,S);if(c.length)C.decorators=c;if(x||E||b){let v=this.startNodeAt(u,h);if(x)v.accessibility=x;if(E)v.readonly=E;if(b)v.override=b;if(C.type!=="Identifier"&&C.type!=="AssignmentPattern")this.raise(v.start,I.UnsupportedParameterPropertyKind);return v.parameter=C,this.finishNode(v,"TSParameterProperty")}return C}checkLValInnerPattern(a,c=X.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,I.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((h,x)=>h.type!=="ObjectMethod"&&(x===u||h.type!=="SpreadElement")&&this.isAssignable(h))}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 Qt,h=!1){switch(a.type){case"ParenthesizedExpression":return this.toAssignableParenthesizedExpression(a,c,u,h);case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":if(c);else this.raise(a.start,I.UnexpectedTypeCastInParameter);let x=this.toAssignable(a.expression,c,u,h);if(h)return a.expression=x,a;return x;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,h=!1){switch(a.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":let x=this.toAssignable(a.expression,c,u,h);if(h)return a.expression=x,a;return x;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((h)=>{let x=this.tsParseTypeOrTypePredicateAnnotation(s.colon);if(this.canInsertSemicolon()||!this.match(s.arrow))h();return x});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,h){let x=this.startNodeAt(a,c);return x.returnType=this.shouldParseArrowReturnType,this.shouldParseArrowReturnType=void 0,this.parseArrowExpression(x,u,!1,h)}parseParenAndDistinguishExpression(a,c){let u=this.start,h=this.startLoc,x,E=this.ecmaVersion>=8;if(this.ecmaVersion>=6){let b=this.maybeInArrowParameters;this.maybeInArrowParameters=!0,this.next();let S=this.start,C=this.startLoc,v=[],P=!0,_=!1,R=new Qt,W=this.yieldPos,U=this.awaitPos,j;this.yieldPos=0,this.awaitPos=0;while(this.type!==s.parenR)if(P?P=!1:this.expect(s.comma),E&&this.afterTrailingComma(s.parenR,!0)){_=!0;break}else if(this.type===s.ellipsis){if(j=this.start,v.push(this.parseParenItem(this.parseRestBinding())),this.type===s.comma)this.raise(this.start,"Comma is not permitted after the rest element");break}else v.push(this.parseMaybeAssign(!1,R,this.parseParenItem));let H=this.lastTokEnd,M=this.lastTokEndLoc;if(this.expect(s.parenR),this.maybeInArrowParameters=b,a&&this.shouldParseArrow(v)&&this.eat(s.arrow))return this.checkPatternErrors(R,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=W,this.awaitPos=U,this.parseParenArrowList(u,h,v,c);if(!v.length||_)this.unexpected(this.lastTokStart);if(j)this.unexpected(j);if(this.checkExpressionErrors(R,!0),this.yieldPos=W||this.yieldPos,this.awaitPos=U||this.awaitPos,v.length>1)x=this.startNodeAt(S,C),x.expressions=v,this.finishNodeAt(x,"SequenceExpression",H,M);else x=v[0]}else x=this.parseParenExpression();if(this.options.preserveParens){let b=this.startNodeAt(u,h);return b.expression=x,this.finishNode(b,"ParenthesizedExpression")}else return x}parseTaggedTemplateExpression(a,c,u,h){let x=this.startNodeAt(c,u);if(x.tag=a,x.quasi=this.parseTemplate({isTagged:!0}),h)this.raise(c,"Tagged Template Literals are not allowed in optionalChain.");return this.finishNode(x,"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,h){let x=this.startNodeAt(a,c);return x.returnType=this.shouldParseAsyncArrowReturnType,this.shouldParseAsyncArrowReturnType=void 0,this.parseArrowExpression(x,u,!0,h)}parseExprList(a,c,u,h){let x=[],E=!0;while(!this.eat(a)){if(!E){if(this.expect(s.comma),c&&this.afterTrailingComma(a))break}else E=!1;let b;if(u&&this.type===s.comma)b=null;else if(this.type===s.ellipsis){if(b=this.parseSpread(h),this.maybeInArrowParameters&&this.match(s.colon))b.typeAnnotation=this.tsParseTypeAnnotation();if(h&&this.type===s.comma&&h.trailingComma<0)h.trailingComma=this.start}else b=this.parseMaybeAssign(!1,h,this.parseParenItem);x.push(b)}return x}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,h,x,E,b){let S=E;if(!this.hasPrecedingLineBreak()&&this.value==="!"&&this.match(s.prefix)){this.exprAllowed=!1,this.next();let R=this.startNodeAt(c,u);return R.expression=a,a=this.finishNode(R,"TSNonNullExpression"),a}let C=!1;if(this.match(s.questionDot)&&this.lookaheadCharCode()===60){if(h)return a;a.optional=!0,S=C=!0,this.next()}if(this.tsMatchLeftRelational()||this.match(s.bitShift)){let R,W=this.tsTryParseAndCatch(()=>{if(!h&&this.atPossibleAsyncArrow(a)){let M=this.tsTryParseGenericAsyncArrowFunction(c,u,b);if(M)return a=M,a}let U=this.tsParseTypeArgumentsInExpression();if(!U)return a;if(C&&!this.match(s.parenL))return R=this.curPosition(),a;if(D(this.type)||this.type===s.backQuote){let M=this.parseTaggedTemplateExpression(a,c,u,S);return M.typeArguments=U,M}if(!h&&this.eat(s.parenL)){let M=new Qt,ee=this.startNodeAt(c,u);if(ee.callee=a,ee.arguments=this.parseExprList(s.parenR,this.ecmaVersion>=8,!1,M),this.tsCheckForInvalidTypeCasts(ee.arguments),ee.typeArguments=U,S)ee.optional=C;return this.checkExpressionErrors(M,!0),a=this.finishNode(ee,"CallExpression"),a}let j=this.type;if(this.tsMatchRightRelational()||j===s.bitShift||j!==s.parenL&&Ml(j)&&!this.hasPrecedingLineBreak())return;let H=this.startNodeAt(c,u);return H.expression=a,H.typeArguments=U,this.finishNode(H,"TSInstantiationExpression")});if(R)this.unexpected(R);if(W){if(W.type==="TSInstantiationExpression"&&(this.match(s.dot)||this.match(s.questionDot)&&this.lookaheadCharCode()!==40))this.raise(this.start,I.InvalidPropertyAccessAfterInstantiationExpression);return a=W,a}}let v=this.ecmaVersion>=11,P=v&&this.eat(s.questionDot);if(h&&P)this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");let _=this.eat(s.bracketL);if(_||P&&this.type!==s.parenL&&this.type!==s.backQuote||this.eat(s.dot)){let R=this.startNodeAt(c,u);if(R.object=a,_)R.property=this.parseExpression(),this.expect(s.bracketR);else if(this.type===s.privateId&&a.type!=="Super")R.property=this.parsePrivateIdent();else R.property=this.parseIdent(this.options.allowReserved!=="never");if(R.computed=!!_,v)R.optional=P;a=this.finishNode(R,"MemberExpression")}else if(!h&&this.eat(s.parenL)){let R=this.maybeInArrowParameters;this.maybeInArrowParameters=!0;let W=new Qt,U=this.yieldPos,j=this.awaitPos,H=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;let M=this.parseExprList(s.parenR,this.ecmaVersion>=8,!1,W);if(x&&!P&&this.shouldParseAsyncArrow()){if(this.checkPatternErrors(W,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0)this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function");this.yieldPos=U,this.awaitPos=j,this.awaitIdentPos=H,a=this.parseSubscriptAsyncArrow(c,u,M,b)}else{this.checkExpressionErrors(W,!0),this.yieldPos=U||this.yieldPos,this.awaitPos=j||this.awaitPos,this.awaitIdentPos=H||this.awaitIdentPos;let ee=this.startNodeAt(c,u);if(ee.callee=a,ee.arguments=M,v)ee.optional=P;a=this.finishNode(ee,"CallExpression")}this.maybeInArrowParameters=R}else if(this.type===s.backQuote){if(P||S)this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");let R=this.startNodeAt(c,u);R.tag=a,R.quasi=this.parseTemplate({isTagged:!0}),a=this.finishNode(R,"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,h=a.value.params[0];if(u=h&&this.isThisParam(h)?u+1:u,a.value.params.length!==u){let E=a.value.start;if(a.kind==="get")this.raiseRecoverable(E,"getter should have no params");else this.raiseRecoverable(E,"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,h,x,E,b,S){if(this.tsMatchLeftRelational()){if(c)this.unexpected();a.kind="init",a.method=!0;let C=this.tsTryParseTypeParameters(this.tsParseConstModifier);if(a.value=this.parseMethod(u,h),C)a.value.typeParameters=C;return}return super.parsePropertyValue(a,c,u,h,x,E,b,S)}parseProperty(a,c){if(!a){let u=[];if(this.match(T.at))while(this.match(T.at))u.push(this.parseDecorator());let h=super.parseProperty(a,c);if(h.type==="SpreadElement"){if(u.length)this.raise(h.start,Ln.SpreadElementDecorator)}if(u.length)h.decorators=u,u=[];return h}return super.parseProperty(a,c)}parseCatchClauseParam(){let a=this.parseBindingAtom(),c=a.type==="Identifier";this.enterScope(c?X.SCOPE_SIMPLE_CATCH:0),this.checkLValPattern(a,c?X.BIND_SIMPLE_CATCH:X.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 h=this.strict;this.strict=!0,this.parseClassId(a,c),this.parseClassSuper(a);let x=this.enterClassBody(),E=this.startNode(),b=!1;E.body=[];let S=[];this.expect(s.braceL);while(this.type!==s.braceR){if(this.match(T.at)){S.push(this.parseDecorator());continue}let C=this.parseClassElement(a.superClass!==null);if(S.length)C.decorators=S,this.resetStartLocationFromNode(C,S[0]),S=[];if(C){if(E.body.push(C),C.type==="MethodDefinition"&&C.kind==="constructor"&&C.value.type==="FunctionExpression"){if(b)this.raiseRecoverable(C.start,"Duplicate constructor in the same class");if(b=!0,C.decorators&&C.decorators.length>0)this.raise(C.start,Ln.DecoratorConstructor)}else if(C.key&&C.key.type==="PrivateIdentifier"&&C.value?.type!=="TSDeclareMethod"){let v=C.key.name;if(this.parseEffects.modify(x,v,(_)=>xl(_,C)))this.raiseRecoverable(C.key.start,`Identifier '#${v}' has already been declared`)}}}if(this.strict=h,this.next(),S.length)this.raise(this.start,Ln.TrailingDecorator);return a.body=this.finishNode(E,"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,h,x){let E=this.startNode(),b=this.yieldPos,S=this.awaitPos,C=this.awaitIdentPos;if(this.initFunction(E),this.ecmaVersion>=6)E.generator=a;if(this.ecmaVersion>=8)E.async=!!c;if(this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(kr(c,E.generator)|X.SCOPE_SUPER|(u?X.SCOPE_DIRECT_SUPER:0)),this.expect(s.parenL),E.params=this.parseClassFunctionParams(),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(E,!1,!0,!1,{isClassMethod:h}),this.yieldPos=b,this.awaitPos=S,this.awaitIdentPos=C,x&&x.abstract){if(!!E.body){let{key:P}=x;this.raise(x.start,I.AbstractMethodHasImplementation({methodName:P.type==="Identifier"&&!x.computed?P.name:`[${this.input.slice(P.start,P.end)}]`}))}}return this.finishNode(E,"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 h=new this(u,a,c);if(t)h.isAmbientContext=!0;return h.nextToken(),h.parseExpression()}parseImportSpecifier(){if(this.ts_isContextual(T.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(T.type);if(!this.match(s.string)&&c){let h=this.startNode();return h.local=this.parseModuleExportName(),this.parseTypeOnlyImportExportSpecifier(h,!1,this.importOrExportOuterKind==="type"),this.finishNode(h,"ExportSpecifier"),this.checkExport(a,h.exported,h.exported.start),h}else{let h=super.parseExportSpecifier(a);return h.exportKind="value",h}}parseTypeOnlyImportExportSpecifier(a,c,u){let h=c?"imported":"local",x=c?"local":"exported",E=a[h],b,S=!1,C=!0,v=E.start;if(this.isContextual("as")){let _=this.parseIdent();if(this.isContextual("as")){let R=this.parseIdent();if(q(this.type))S=!0,E=_,b=c?this.parseIdent():this.parseModuleExportName(),C=!1;else b=R,C=!1}else if(q(this.type))C=!1,b=c?this.parseIdent():this.parseModuleExportName();else S=!0,E=_}else if(q(this.type))if(S=!0,c){if(E=super.parseIdent(!0),!this.isContextual("as"))this.checkUnreserved(E)}else E=this.parseModuleExportName();if(S&&u)this.raise(v,c?I.TypeModifierIsUsedInTypeImports:I.TypeModifierIsUsedInTypeExports);a[h]=E,a[x]=b;let P=c?"importKind":"exportKind";if(a[P]=S?"type":"value",C&&this.eatContextual("as"))a[x]=c?this.parseIdent():this.parseModuleExportName();if(!a[x])a[x]=this.copyNode(a[h]);if(c)this.checkLValSimple(a[x],X.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==k.tc_oTag)this.parseEffects.append(this.context,g.b_expr);else if(u==k.tc_expr)this.parseEffects.append(this.context,g.b_tmpl);else super.updateContext(a);this.exprAllowed=!0}else if(c===s.slash&&a===T.jsxTagStart)this.parseEffects.truncate(this.context,this.context.length-2),this.parseEffects.append(this.context,k.tc_cTag),this.exprAllowed=!1;else return super.updateContext(a)}jsx_parseOpeningElementAt(a,c){let u=this.startNodeAt(a,c),h=this.jsx_parseElementName();if(h)u.name=h;if(this.match(s.relational)||this.match(s.bitShift)){let x=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());if(x)u.typeArguments=x}u.attributes=[];while(this.type!==s.slash&&this.type!==T.jsxTagEnd)u.attributes.push(this.jsx_parseAttribute());return u.selfClosing=this.eat(s.slash),this.expect(T.jsxTagEnd),this.finishNode(u,h?"JSXOpeningElement":"JSXOpeningFragment")}enterScope(a){let c=a===Yt;if(c)this.parseEffects.append(this.importsStack,[]);let u=c?a|X.SCOPE_CLASS_STATIC_BLOCK:a;super.enterScope(u);let h=super.currentScope();h.types=[],h.enums=[],h.constEnums=[],h.classes=[],h.exportOnlyBindings=[]}exitScope(){if(super.currentScope().flags&Yt)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 h=0;h<u-1;h++)if(this.importsStack[h].indexOf(a)>-1)return!0}return!1}maybeExportDefined(a,c){if(this.inModule&&a.flags&X.SCOPE_TOP)this.parseEffects.remove(this.undefinedExports,c)}declareName(a,c,u){if(c&X.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 h=this.currentScope();if(c&X.BIND_FLAGS_TS_EXPORT_ONLY){this.maybeExportDefined(h,a),this.parseEffects.append(h.exportOnlyBindings,a);return}if(c===X.BIND_TS_TYPE||c===X.BIND_TS_INTERFACE){if(c===X.BIND_TS_TYPE&&h.types.includes(a))this.raise(u,`type '${a}' has already been declared.`);this.parseEffects.append(h.types,a)}else if(c&X.BIND_FLAGS_TS_ENUM){if(h.enums.includes(a))return;super.declareName(a,X.BIND_LEXICAL,u)}else super.declareName(a,c,u);if(c&X.BIND_FLAGS_TS_ENUM)this.parseEffects.append(h.enums,a);if(c&X.BIND_FLAGS_TS_CONST_ENUM)this.parseEffects.append(h.constEnums,a);if(c&X.BIND_FLAGS_CLASS)this.parseEffects.append(h.classes,a)}checkLocalExport(a){let{name:c}=a;if(this.hasImport(c))return;let u=this.scopeStack.length;for(let h=u-1;h>=0;h--){let x=this.scopeStack[h];if(x.types.indexOf(c)>-1||x.exportOnlyBindings.indexOf(c)>-1)return}super.checkLocalExport(a)}}return ye}}function Ca(e,t,n){let r=n._,i=!1,o=()=>{i=!0};function s(l,m,d){let g=null;m.push(l);for(let y in l){if(y==="type"||y==="__proto__")continue;let T=l[y];if(T&&typeof T==="object")if(Array.isArray(T)){let k=null,w=T.length;for(let A=0;A<w;A++){let D=T[A];if(D&&typeof D==="object"){let K=p(D,m,d);if(K)(k??=T.slice())[A]=K}}if(k)(g??={})[y]=k}else{let k=p(T,m,d);if(k)(g??={})[y]=k}}if(m.pop(),g)return Fl(l,g)}function p(l,m,d){if(i)return;if(!l.type)return;let g=n[l.type];if(!r&&!g)return s(l,m,d);let y,T,k=(A=d)=>T=s(l,m,A),w=(A,D=d)=>{m.push(l);let K=p(A,m,D)??A;return m.pop(),K};if(r){let A;if(y=r(l,{path:m,state:d,next:(D=d)=>(d=D,A=g?g(l,{path:m,state:D,next:k,stop:o,visit:w}):k(D),A),stop:o,visit:w}),!y&&A)y=A}else y=g(l,{path:m,state:d,next:k,stop:o,visit:w});if(!y&&T)y=T;if(y)return y}return p(e,[],t)??e}function Fl(e,t){let n={},r=Object.getOwnPropertyDescriptors(e);for(let i in r)Object.defineProperty(n,i,r[i]);for(let i in t)n[i]=t[i];return n}var Vl=/\n/,jl=/[ \t]/,$l=/^[,) \t]*$/,Mn="",Aa=[];function On(e,t){Mn=e,Aa=t}function Bn(e,t,n,r){let i=t;if(e&&Vl.test(i)){let o=n;while(o>0&&Mn[o-1]!==`
|
|
29
|
-
`)o-=1;let s=o;while(
|
|
30
|
-
|
|
31
|
-
`)}function Ir(e,t,n,r){let i=ql(n,r);if(i>=n.length)return;Nr(e,void 0,n,{index:i},t)}function ql(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 Nr(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=Object.keys(e);for(let s=0;s<o.length;s++){let p=o[s];if(p==="type"||p==="leadingComments")continue;let l=e[p];if(!l||typeof l!=="object")continue;if(Array.isArray(l)){for(let m of l)if(m&&typeof m==="object"&&typeof m.type==="string"){if(Nr(m,e,n,r,i),r.index>=n.length)return}}else if(typeof l.type==="string"){if(Nr(l,e,n,r,i),r.index>=n.length)return}}if(r.index<n.length){let s=n[r.index];if(t===void 0||e.end!==t.end){let p=i.slice(e.end??0,s.start);if((t?.type==="BlockStatement"||t?.type==="Program")&&_r(t.body,e)||t?.type==="ArrayExpression"&&_r(t.elements,e)||t?.type==="ObjectExpression"&&_r(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)<=s.start&&$l.test(p))r.index++}}}function _r(e,t){return!!e&&e.indexOf(t)===e.length-1}var Pa=ae,Ul=Pa.extend(va());function Dr(e){return e?Ul:Pa}var Gl={onComment:Bn,sourceType:"module",ecmaVersion:16},Wl={onComment:Bn,sourceType:"module",ecmaVersion:16,preserveParens:!0},Kl={onComment:Bn,sourceType:"module",ecmaVersion:16};function ka(e,t,n,r,i){if(n.length===i)return;Ir(e,t,n,r)}function wa(e,t,n){let r=n.length;On(e,n);let i=Dr(t).parse(e,Gl);if(n.length>0)Ir(i,e,n,r);return i}var zl={count:0};function Nt(e,t,n,r){zl.count+=1;let i=r.length;On(e,r);let o=Dr(n).parseExpressionAt(e,t,Wl);ka(o,e,r,t,i);let s=r.length>i?r.at(-1):void 0,p=s&&s.end>(o.end??0)?s.end:o.end??0,l=o.end??t;return{node:Xl(e,t,l,40)?Jl(o):o,end:p}}function Xl(e,t,n,r){for(let i=t;i<n;i++)if(e.charCodeAt(i)===r)return!0;return!1}function _a(e,t,n,r){let i=r.length,o=Dr(n);On(e,r);let s=new o(Kl,e,t);s.nextToken();let p=s.parseStatement(null,!0,Object.create(null));return ka(p,e,r,t,i),p}function Jl(e){return Ca(e,null,{ParenthesizedExpression(t,n){return n.visit(t.expression)}})}function Et(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 Lr{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 ut(`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 ut("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 ut("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&&Et(this.source.charCodeAt(this.index)))this.index++}requireWhitespace(){if(!Et(this.source.charCodeAt(this.index)))throw new ut("Expected whitespace",this.index);this.allowWhitespace()}readIdentifierName(){let e=this.index,t=e,n="",r=this.source.codePointAt(this.index);if(r!==void 0&&xe(r,!0)){t+=r<=65535?1:2;while(t<this.source.length){let i=this.source.codePointAt(t);if(i===void 0||!Ae(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 ut extends Error{position;constructor(e,t){super(`${e} (at index ${t})`);this.name="TemplateSyntaxError",this.position=t}}function Te(){return{type:"Fragment",nodes:[]}}var Yl=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"]),Ql=["&&","||","??"],Zl=["===","!==","==","!="];function Na(e,t){let n=e.codePointAt(t);if(n===void 0||!xe(n,!0))return t;let r=t+(n<=65535?1:2);while(r<e.length){let i=e.codePointAt(r);if(!Ae(i,!0))break;r+=i<=65535?1:2}return r}function eu(e,t){let n=t;while(n<e.length){let r=e.charCodeAt(n);if(r<48||r>57)break;n++}return n}function Fn(e,t){let n=t;while(n<e.length&&Et(e.charCodeAt(n)))n++;return n}function Ia(e,t){let n=eu(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||Ae(i,!0))return null}let r=e.slice(t,n);return{type:"Literal",start:t,end:n,value:Number(r),raw:r}}function Da(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 tu(e,t){let n=e.charCodeAt(t);if(n===34||n===39)return Da(e,t);let r=Na(e,t);if(r===t)return Ia(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(Yl.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,m=Na(e,l);if(m===l)return null;let d={type:"Identifier",start:l,end:m,name:e.slice(l,m)};o={type:"MemberExpression",start:t,end:m,object:o,property:d,computed:!1,optional:!1},s=m}else if(p===91){let l=s+1,m=e.charCodeAt(l),d=m===34||m===39?Da(e,l):Ia(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 Rr(e,t){if(e.charCodeAt(t)!==33||e.charCodeAt(t+1)===61)return tu(e,t);let n=Rr(e,Fn(e,t+1));if(!n)return null;return{type:"UnaryExpression",start:t,end:n.end,operator:"!",prefix:!0,argument:n}}function nu(e,t){for(let n of Zl)if(e.startsWith(n,t))return{operator:n,logical:!1};for(let n of Ql)if(e.startsWith(n,t))return{operator:n,logical:!0};return null}function La(e,t){let n=Fn(e,t);if(n>=e.length)return!1;let r=e.charCodeAt(n);return r===125||r===41}function ru(e){let t=e.source,n=Rr(t,e.index);if(!n)return null;if(La(t,n.end))return e.index=n.end,n;let r=Fn(t,n.end),i=nu(t,r);if(!i)return null;let o=Rr(t,Fn(t,r+i.operator.length));if(!o||!La(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 ue(e){let t=ru(e);if(t)return t;let{node:n,end:r}=Nt(e.source,e.index,e.isTypeScript,e.root.comments);return e.index=r,n}var iu={"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},Mr=iu;var su=[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 au(e,t){if(t&&!e.endsWith(";"))return`${e}\\b(?!=)`;return e}function Ra(e){let n=Object.keys(Mr).map((r)=>au(r,e));return new RegExp(`&(#(?:x[a-fA-F\\d]+|\\d+)(?:;)?|${n.join("|")})`,"g")}var Or,Br;function ou(e){if(e){if(!Br)Br=Ra(!0);return Br}if(!Or)Or=Ra(!1);return Or}var Ma=0;function cu(e){if(e===10)return 32;if(e<128)return e;if(e<=159)return su[e-128];if(e<55296)return e;if(e<=57343)return Ma;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 Ma}function Fr(e,t){if(e.indexOf("&")===-1)return e;return e.replace(ou(t),(n,r)=>{let i;if(r[0]!=="#")i=Mr[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(cu(i))})}class en extends Error{constructor(e){super(`sveld's template parser doesn't support ${e} yet.`);this.name="TemplateParseNotImplementedError"}}var pu=/<\/script\s*>/g,lu=/<\/script\s*>/y,uu=/[^\n]/g,du=new Set(["server","client","worker","test","default"]);function Oa(e,t,n){let r=e.index,i=e.readUntil(pu);if(e.index>=e.source.length)throw Error("sveld: unclosed <script> tag");let o=e.source.slice(0,r).replace(uu," ")+i;e.read(lu);let s=wa(o,e.isTypeScript,e.root.comments);s.start=r;let p="default";for(let l of n){if(du.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 m=l.value;if(m===!0||!Array.isArray(m)||m.length!==1||m[0].type!=="Text")throw Error("sveld: context attribute must be a plain string.");if(m[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 Ba(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 hu=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]);function Vr(e){return hu.has(e)||e.charCodeAt(0)===33&&e.toLowerCase()==="!doctype"}var fu="^[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}]*)?$",mu=new RegExp(fu,"u");function Fa(e){return mu.test(e)}var yu=/(?:"([^"]*)"|'([^'])*'|([^>\s]+))/y,qa=/["']/y,gu=/(\/>|[\s"'=<>`])/y,jr=/<\/textarea(\s[^>]*)?>/iy,xu=/^![a-zA-Z]+$/,bu=/^[a-zA-Z][a-zA-Z0-9]*:[a-zA-Z][a-zA-Z0-9-]*[a-zA-Z0-9]$/,Tu=/^(?:\p{Lu}[$\u200c\u200d\p{ID_Continue}.]*|\p{ID_Start}[$\u200c\u200d\p{ID_Continue}]*(?:\.[$\u200c\u200d\p{ID_Continue}]+)+)$/u,Ua={"svelte:head":"SvelteHead","svelte:options":"SvelteOptions","svelte:window":"SvelteWindow","svelte:document":"SvelteDocument","svelte:body":"SvelteBody"},Va={...Ua,"svelte:element":"SvelteElement","svelte:component":"SvelteComponent","svelte:self":"SvelteSelf","svelte:fragment":"SvelteFragment","svelte:boundary":"SvelteBoundary"};function Eu(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 Su(e){if(Eu(e))return!0;if(xu.test(e))return!0;if(bu.test(e))return!0;return Fa(e)}function vu(e){let t=e.charCodeAt(0);if(t>=97&&t<=122&&!e.includes("."))return!1;return!0}function Cu(e){return`Svelte${e.slice(7).split("-").map((n)=>n.charAt(0).toUpperCase()+n.slice(1)).join("")}`}function Au(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 Pu(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 ja(e){let{source:t,index:n}=e;if(n>=t.length)throw new ut("Unexpected end of input",t.length);let r=n;while(r<t.length){let i=t.charCodeAt(r);if(i===47||i===62||Et(i))break;r++}return e.index=r,{name:t.slice(n,r),start:n,end:r}}function Ga(e){let{source:t,index:n}=e;if(n>=t.length)throw new ut("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||Et(i))break;r++}return e.index=r,{name:t.slice(n,r),start:n,end:r}}function ku(e){let t=e.index;if(e.eat("//")){let n=e.readUntilString(`
|
|
32
|
-
`),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 wu(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 Wa(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=Fr(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 en("blocks/tags inside attribute value sequences");let s=e.index-1;o(s),e.allowWhitespace();let p=ue(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 en("unterminated attribute value / sequence (loose mode)")}function _u(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=Wa(e,()=>{if(t)return e.match(t);return!!e.matchRegex(gu)},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 $r(e,t,n,r){return{type:"Attribute",start:t,end:n,name:e,value:r}}function Nu(e){let t=e.index,n=Ga(e);if(!n.name)return null;let r=!0;if(e.eat("=")){e.allowWhitespace();let i=e.matchRegex(yu);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:Fr(i,!0)}]}if(e.matchRegex(qa))throw Error("sveld: expected '='");return $r(n.name,t,e.index,r)}function Iu(e){while(!0){let p=e.index;if(ku(e),e.index===p)break;e.allowWhitespace()}let t=e.index;if(e.eat("{")){if(e.allowWhitespace(),e.eat("@attach")){e.requireWhitespace();let m=ue(e);return e.allowWhitespace(),e.eat("}",!0),{type:"AttachTag",start:t,end:e.index,expression:m}}if(e.eat("...")){let m=ue(e);return e.allowWhitespace(),e.eat("}",!0),{type:"SpreadAttribute",start:t,end:e.index,expression:m}}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 $r(p.name,t,e.index,l)}let n=Ga(e);if(!n.name)return null;let r=e.index;e.allowWhitespace();let i=n.name.indexOf(":"),o=i!==-1&&wu(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=_u(e),r=e.index;else if(e.matchRegex(qa))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,m=null;if(l){if((Array.isArray(s)?s.length>1:!1)||l.type==="Text")throw Error("sveld: directive value must be a single expression");m=l.expression}let d={start:t,end:r,type:o,name:p,expression:m};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 $r(n.name,t,r,s)}function Ka(e){let t=e.index++,n=e.current();if(e.eat("!--")){let y=e.readUntilString("-->");e.eat("-->",!0),e.append({type:"Comment",start:t,end:e.index,data:y});return}if(e.eat("/")){let{name:y}=ja(e);if(e.allowWhitespace(),e.eat(">",!0),Vr(y))throw Error(`sveld: <${y}> is a void element and cannot have a closing tag`);while(n.name!==y){if(n.type==="RegularElement");else throw Error(`sveld: invalid closing tag </${y}>`);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=ja(e),i=vu(r.name)&&Tu.test(r.name);if(!Su(r.name)&&!i)throw Error(`sveld: "${r.name}" is not a valid element or component name`);if(r.name in Ua&&n.type!=="Root")throw Error(`sveld: <${r.name}> must be a top-level element`);let o;if(r.name in Va)o=Va[r.name];else if(r.name.startsWith("svelte:"))o=Cu(r.name);else if(i)o="Component";else if(r.name==="title"&&Au(e.stack))o="TitleElement";else if(r.name==="slot"&&!Pu(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"&&Ts(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",m=l?Nu:Iu,d;while(d=m(e))s.attributes.push(d),e.allowWhitespace();if(s.type==="SvelteComponent")s.expression=Ha($a(s));if(s.type==="SvelteElement"){let y=$a(s);if(y.value===!0)throw Error("sveld: <svelte:element> `this` attribute needs a value");if(Du(y))s.tag=Ha(y);else{let T=y.value[0];s.tag=T.type==="Text"?{type:"Literal",value:T.data,raw:`'${T.raw}'`,start:T.start,end:T.end}:T.expression}}if(l){if(e.eat(">",!0),r.name==="script"){let y=Oa(e,t,s.attributes);if(y.context==="module"){if(e.root.module)throw Error("sveld: duplicate <script module>");e.root.module=y}else{if(e.root.instance)throw Error("sveld: duplicate <script>");e.root.instance=y}}else{if(e.root.css)throw Error("sveld: duplicate <style>");e.root.css=Ba(e,t,s.attributes)}return}e.append(s);let g=e.eat("/")||Vr(r.name);if(e.eat(">",!0),g)s.end=e.index;else if(r.name==="textarea")s.fragment.nodes=Wa(e,()=>(jr.lastIndex=e.index,jr.test(e.source))),e.read(jr),s.end=e.index;else e.push(s,s.fragment)}function $a(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 Ha(e){return Array.isArray(e.value)?e.value[0].expression:e.value.expression}function Du(e){return e.value!==!0&&!Array.isArray(e.value)||Array.isArray(e.value)&&e.value.length===1&&e.value[0].type==="ExpressionTag"}function za(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=Xa(n);if(typeof r==="boolean")t.runes=r}if(n.name==="customElement"){let r=Mu(n);if(r!==void 0)t.customElement=r}}return t}function Xa(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 Lu=new Set(["String","Boolean","Number","Array","Object"]);function Hr(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 Ru(e){let t={};if(!e||typeof e!=="object"||e.type!=="ObjectExpression")return t;for(let[n,r]of Hr(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"&&Lu.has(i))t.type=i}return t}function Mu(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=Xa(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=Hr(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 Hr(p))o.props[d]=Ru(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 m=i.find(([d])=>d==="extend")?.[1];if(m!==void 0)o.extend=m;return o}var Ou=/<script\s+(?:[^>]*|(?:[^=>'"/]+=(?:"[^"]*"|'[^']*'|[^>\s]+)\s+)*)lang=(["'])?ts\1[^>]*>/;class qr extends Lr{root;stack=[];fragments=[];isTypeScript;lastAutoClosedTag;constructor(e,t){super(e);this.isTypeScript=Ou.test(e);let n=Te();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 Ur={"{":"}","(":")","[":"]"},Bu=new Set(Object.values(Ur));function tn(e,t,n=Ur){let r=n===Ur?Bu:new Set(Object.values(n)),i=[],o=t;while(o<e.source.length){let s=e.source[o++];if(s==="'"||s==='"'||s==="`"){o=Fu(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 Fu(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=tn(e,i)}throw Error("sveld: unterminated string constant")}var Ya=/[^\n]/g,Vu=/\?\s*:/g;function dt(e){let t=e.index,n=e.readIdentifierName();if(n.name!==""){let y=Ja(e);return{...n,typeAnnotation:y}}let r=e.source[e.index];if(r!=="{"&&r!=="[")throw Error("sveld: expected a binding pattern");let i=tn(e,t);e.index=i;let o=e.source.slice(t,i),s=e.source.slice(0,t).replace(Ya," "),p=s.indexOf(" ");s=s.slice(0,p)+s.slice(p+1);let l=`${s}(${o} = 1)`,{node:m}=Nt(l,t-1,e.isTypeScript,e.root.comments),d=m.left,g=Ja(e);if(g)d.typeAnnotation=g,d.end=g.end;return d}function Ja(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(Ya," ")+n+e.source.slice(e.index).replace(Vu,":"),{node:o}=Nt(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}=Nt(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 Qa=/\s*}/y,ju={"<":">"};function Za(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:ue(e),consequent:Te(),alternate:null};e.append(n),e.allowWhitespace(),e.eat("}",!0),e.push(n,n.consequent);return}if(e.eat("each")){e.requireWhitespace();let n=ue(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 m=l.typeAnnotation.start-2;while(m>=0&&!(e.source[m]==="a"&&e.source[m+1]==="s"))m-=1;e.index=m}}let r=null,i,o;if(e.eat("as"))e.requireWhitespace(),r=dt(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=ue(e),e.allowWhitespace(),e.eat(")",!0),e.allowWhitespace();e.eat("}",!0);let s={type:"EachBlock",start:t,end:-1,expression:n,body:Te(),context:r,index:i,key:o};e.append(s),e.push(s,s.body);return}if(e.eat("await")){e.requireWhitespace();let n=ue(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(Qa))e.requireWhitespace(),r.value=dt(e),e.allowWhitespace();r.then=Te()}else if(e.eat("catch")){if(!e.matchRegex(Qa))e.requireWhitespace(),r.error=dt(e),e.allowWhitespace();r.catch=Te()}else r.pending=Te();e.eat("}",!0),e.append(r),e.push(r,r.then??r.catch??r.pending);return}if(e.eat("key")){e.requireWhitespace();let n=ue(e);e.allowWhitespace(),e.eat("}",!0);let r={type:"KeyBlock",start:t,end:-1,expression:n,fragment:Te()};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=tn(e,o,ju);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:Te()};e.append(i),e.push(i,i.body);return}throw Error("sveld: expected if/each/await/key/snippet")}function eo(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=Te(),e.fragments.push(n.alternate),e.eat("if")){e.requireWhitespace();let r=ue(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:Te(),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=Te(),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=dt(e),e.allowWhitespace(),e.eat("}",!0);n.then=Te(),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=dt(e),e.allowWhitespace(),e.eat("}",!0);n.catch=Te(),e.fragments.pop(),e.fragments.push(n.catch);return}throw Error("sveld: expected {:then ...} or {:catch ...}")}throw Error("sveld: {:...} not valid here")}function to(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 $u=/(?:let|const)\b/y,Hu=/(?:var|interface|enum)\b/y,qu=/type\b/y;function no(e){let t=e.index;if(e.matchRegex(Hu))throw Error("sveld: `var`/`interface`/`enum` are not valid here");if(!e.matchRegex($u)&&!e.matchRegex(qu))return null;let n=e.root.comments.length,r=_a(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 Uu=/\s*}/y;function ro(e){let t=e.index;while(e.source[t]!=="{")t-=1;if(e.eat("html")){e.requireWhitespace();let n=ue(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(Uu))n=[];else{let i=ue(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=dt(e);e.allowWhitespace(),e.eat("=",!0),e.allowWhitespace();let r=ue(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=ue(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 io(e){let t=e.index;if(e.index+=1,e.allowWhitespace(),e.eat("#")){Za(e);return}if(e.eat(":")){eo(e);return}if(e.eat("@")){ro(e);return}if(e.match("/")&&!e.match("/*")&&!e.match("//")){e.eat("/"),to(e);return}let n=no(e);if(n){let o={type:"DeclarationTag",start:t,end:e.index,declaration:n};e.append(o);return}let r=ue(e);e.allowWhitespace(),e.eat("}",!0);let i={type:"ExpressionTag",start:t,end:e.index,expression:r};e.append(i)}function so(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 Gr(e){let t=e.trimEnd(),n=new qr(t,e.length);while(n.index<n.source.length)if(n.match("<"))Ka(n);else if(n.match("{"))io(n);else so(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=za(i)}return n.root}function ao(e){if(e==="var")return"let";if(e==="using"||e==="await using")return"const";return e}var Gu=null,oo=/^@component/,Wu=/\r/g,Ku=/^\{\s*\}$/;class de{ctx=Xn();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(de.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=ne(this.ctx,t),r=e.instance?.attributes?.find((s)=>s.name==="lang");if((r?de.getStaticAttributeValue(r)?.toLowerCase():void 0)!=="ts"){ie(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=de.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(ve(e))return e.name;if(rt(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 ct(this.ctx,this,n);let t=this.ctx.funcDecls.get(e);if(t)return ct(this.ctx,this,t);return}addModuleExport(e,t){if(Re(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)}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=bs(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=Xn()}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 de.SCRIPT_BLOCK_REGEX.lastIndex=0,e.replace(de.SCRIPT_BLOCK_REGEX,(t,n,r,i)=>{de.TS_DIRECTIVE_REGEX.lastIndex=0;let o=r.replace(de.TS_DIRECTIVE_REGEX,"");return n+o+i})}parseSvelteComponent(e,t){this.cleanup(),this.ctx.componentFilePath=t.filePath;let n=de.stripTypeScriptDirectivesFromScripts(e);this.ctx.source=n;let r=Gr(n);if(us(this,this.ctx,r),this.ctx.parsed=r,this.ctx.scriptLanguage==="ts")xn(this.ctx.parsed.module),xn(this.ctx.parsed.instance),xn(this.ctx.parsed.fragment);this.ctx.syntaxMode=ls(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;es(this.ctx,this,o);let s={type:"ComponentRoot",instance:this.ctx.parsed.instance,fragment:this.ctx.parsed.fragment};if(lr(this.ctx,this.ctx.parsed?.module),lr(this.ctx,this.ctx.parsed?.instance),this.ctx.parsed?.module)He(this.ctx.parsed?.module,{enter:(c)=>{if(c.type==="ImportDeclaration")bn(this.ctx,c);if(c.type==="FunctionDeclaration"){let u=c;if(u.id?.name)this.ctx.funcDecls.set(u.id.name,u)}if(c.type==="VariableDeclaration")this.ctx.vars.add(c);if(c.type==="ExportNamedDeclaration"){if(c.declaration==null&&c.specifiers.length===0)return;let u,h=!1;if(c.declaration==null&&c.specifiers[0]?.type==="ExportSpecifier"){let b=c.specifiers[0],S=b.local&&typeof b.local==="object"&&"name"in b.local?b.local.name:void 0,C=b.exported&&typeof b.exported==="object"&&"name"in b.exported?b.exported.name:void 0;if(!S||!C)return;let v;for(let P of Array.from(this.ctx.vars))if(P.declarations.some((_)=>_.id&&typeof _.id==="object"&&("type"in _.id)&&_.id.type==="Identifier"&&_.id.name===S)){v=P;break}if(!v){let P="source"in c&&c.source&&typeof c.source==="object"&&"value"in c.source?c.source.value:void 0,_=typeof P==="string"?`it re-exports from "${P}"`:this.ctx.valueImportBindingsByLocalName.has(S)?"it re-exports an imported binding":"no matching local declaration was found";ie(this.ctx,"export-unresolved",C,`export "${C}" was skipped because ${_}; sveld only resolves exports of a local declaration.`,ne(this.ctx,c));return}c.declaration=v,u=C,h=!0}if(c.declaration==null)return;if(!c.declaration||typeof c.declaration!=="object"||!("type"in c.declaration))return;let x=[];if(c.declaration.type==="FunctionDeclaration"){let b=c.declaration;if(!b.id?.name)return;let S=this.ctx.scriptLanguage==="ts"?nr(this.ctx,b):void 0;x.push({prop_name:b.id.name,kind:"function",isFunctionDeclaration:!0,value:void 0,typeSeed:S?.hasAnnotations?void 0:"() => any",explicitType:S?.hasAnnotations?S.signature:void 0,initializerIsFunction:!0,defaultValue:void 0,inferredTypeForSource:void 0,resolvedJSDoc:void 0})}else if(c.declaration.type==="VariableDeclaration"){let b=c.declaration,S=ao(b.kind),C=h?b.declarations.slice(0,1):b.declarations;for(let v of C){if(!v||typeof v!=="object"||!("id"in v))continue;let{id:P,init:_}=v;if(!P||typeof P!=="object"||!("name"in P))continue;let R=P.name,W=u??R,U=_==null?{isFunction:!1}:at(this,this.ctx,_),{value:j,type:H,isFunction:M,defaultValue:ee}=U,ce=U;if(ce.pendingCallDefault)this.ctx.pendingCallDefaultCandidates.push({propName:R,location:"moduleExports",...ce.pendingCallDefault});x.push({prop_name:W,kind:S,isFunctionDeclaration:!1,value:j,typeSeed:H,explicitType:this.getExplicitPropType(R),initializerIsFunction:M,defaultValue:ee,inferredTypeForSource:H,resolvedJSDoc:ce})}if(x.length===0)return}else return;let E=ct(this.ctx,this,c);for(let{prop_name:b,kind:S,isFunctionDeclaration:C,value:v,typeSeed:P,explicitType:_,initializerIsFunction:R,defaultValue:W,inferredTypeForSource:U,resolvedJSDoc:j}of x){let{type:H,typeSource:M,description:ee,params:ce,returnType:ke,isFunction:he}=qt({explicitType:_,typeSeed:P,inferredTypeForSource:U,jsdocType:E?.type,jsdocDescription:E?.description,jsdocParams:E?.params,jsdocReturnType:E?.returnType,resolvedType:j?.resolvedType,resolvedDescription:j?.resolvedDescription,resolvedParams:j?.resolvedParams,resolvedReturnType:j?.resolvedReturnType,initializerIsFunction:R,isFunctionDeclaration:C,typedefs:this.ctx.typedefs});this.addModuleExport(b,{name:b,kind:S,description:ee,deprecated:E?.deprecated,tags:E?.tags,...E?.internal?{internal:!0}:{},type:H,typeSource:M,value:v,defaultValue:W,params:ce,returnType:ke,isFunction:he,isFunctionDeclaration:C,isRequired:!1,constant:S==="const",reactive:!1,source:ne(this.ctx,c)})}}}});let p,l,m,d=new Set,g=new Set,y=[];rs(this,this.ctx),this.ctx.activeScopes.push(this.ctx.componentScope);let T=is(this.ctx);if(He(s,{enter:(c,u,h)=>{let x=ss(this,this.ctx,T,c);if(x)this.ctx.activeScopes.push(x);let E=c.type;if(c.type==="AssignmentExpression")cr(this.ctx,c.left);if(c.type==="UpdateExpression")cr(this.ctx,c.argument);if(c.type==="CallExpression"){let b=c,S=b.callee&&typeof b.callee==="object"&&"name"in b.callee?b.callee.name:void 0;if(S==="createEventDispatcher"){if(u&&typeof u==="object"&&"id"in u&&u.id&&typeof u.id==="object"&&"name"in u.id)p=u.id.name,l=u;m=b.typeArguments?.params?.[0]}if(S==="$host"){if(u&&typeof u==="object"&&"id"in u&&u.id&&typeof u.id==="object"&&"name"in u.id)d.add(u.id.name)}if(S==="setContext")Ii(this.ctx,this,c,u??void 0);if(S)y.push({name:S,arguments:b.arguments,node:b});if(di(b.callee)&&ve(b.callee.property)&&b.callee.property.name==="dispatchEvent"&&(Ue(b.callee.object,"$host")||ve(b.callee.object)&&d.has(b.callee.object.name))){let C=Oi(this.ctx,b);if(C)g.add(C)}}if(E==="SpreadAttribute"){let b=c;if(b.expression?.name==="$$restProps"||this.ctx.restPropLocals.has(b.expression?.name??""))ts(this.ctx,u)}if(c.type==="FunctionDeclaration"){let b=c;if(b.id?.name)this.ctx.funcDecls.set(b.id.name,b)}if(c.type==="ImportDeclaration")bn(this.ctx,c);if(c.type==="VariableDeclaration"){if(this.ctx.vars.add(c),u&&typeof u==="object"&&"type"in u&&u.type==="Program"&&c.declarations.some((b)=>Ue(it(b.init),"$props")))ds(this,this.ctx,c)}if(c.type==="ExportNamedDeclaration"){if(c.declaration==null&&c.specifiers.length===0)return;let b,S=!1;if(c.declaration==null&&c.specifiers[0]?.type==="ExportSpecifier"){let P=c.specifiers[0],_=P.local&&typeof P.local==="object"&&"name"in P.local?P.local.name:void 0,R=P.exported&&typeof P.exported==="object"&&"name"in P.exported?P.exported.name:void 0;if(!_||!R)return;let W;for(let U of Array.from(this.ctx.vars))if(U.declarations.some((j)=>j.id&&typeof j.id==="object"&&("type"in j.id)&&j.id.type==="Identifier"&&j.id.name===_)){W=U;break}if(c.declaration=W,b=R,S=!0,!W){let U="source"in c&&c.source&&typeof c.source==="object"&&"value"in c.source?c.source.value:void 0,j=typeof U==="string"?`it re-exports from "${U}"`:this.ctx.valueImportBindingsByLocalName.has(_)?"it re-exports an imported binding":"no matching local declaration was found";ie(this.ctx,"export-unresolved",R,`export "${R}" was skipped because ${j}; sveld only resolves exports of a local declaration.`,ne(this.ctx,c));return}}if(c.declaration==null)return;if(!c.declaration||typeof c.declaration!=="object"||!("type"in c.declaration))return;let C=[];if(c.declaration.type==="FunctionDeclaration"){let P=c.declaration;if(!P.id?.name)return;b??=P.id.name;let _=this.ctx.scriptLanguage==="ts"?nr(this.ctx,P):void 0;C.push({prop_name:b,kind:"function",isFunctionDeclaration:!0,value:void 0,typeSeed:_?.hasAnnotations?void 0:"() => any",explicitType:_?.hasAnnotations?_.signature:void 0,initializerIsFunction:!0,isRequired:!1,localName:P.id.name,defaultValue:void 0,inferredTypeForSource:void 0,resolvedJSDoc:void 0})}else if(c.declaration.type==="VariableDeclaration"){let P=c.declaration,_=ao(P.kind),R=S?P.declarations.slice(0,1):P.declarations;for(let W of R){if(!W||typeof W!=="object"||!("id"in W))continue;let{id:U,init:j}=W;if(!U||typeof U!=="object"||!("name"in U))continue;let H=U.name,M=b??H,ee=_==="let"&&j==null,ce=j==null?{isFunction:!1}:at(this,this.ctx,j),{value:ke,type:he,isFunction:ft,defaultValue:Mt}=ce,tt=ce;if(tt.pendingCallDefault)this.ctx.pendingCallDefaultCandidates.push({propName:M,location:"props",...tt.pendingCallDefault});C.push({prop_name:M,kind:_,isFunctionDeclaration:!1,value:ke,typeSeed:he,explicitType:this.getExplicitPropType(H),initializerIsFunction:ft,isRequired:ee,localName:H,defaultValue:Mt,inferredTypeForSource:he,resolvedJSDoc:tt})}if(C.length===0)return}else return;let v=ct(this.ctx,this,c);for(let{prop_name:P,kind:_,isFunctionDeclaration:R,value:W,typeSeed:U,explicitType:j,initializerIsFunction:H,isRequired:M,localName:ee,defaultValue:ce,inferredTypeForSource:ke,resolvedJSDoc:he}of C){let{type:ft,typeSource:Mt,description:tt,params:cn,returnType:pn,isFunction:Un}=qt({explicitType:j,typeSeed:U,inferredTypeForSource:ke,jsdocType:v?.type,jsdocDescription:v?.description,jsdocParams:v?.params,jsdocReturnType:v?.returnType,resolvedType:he?.resolvedType,resolvedDescription:he?.resolvedDescription,resolvedParams:he?.resolvedParams,resolvedReturnType:he?.resolvedReturnType,initializerIsFunction:H,isFunctionDeclaration:R,typedefs:this.ctx.typedefs});st(this.ctx,"prop-unknown-type",P,v?.sveldIgnore),Bt(this,this.ctx,P,{name:P,...ee!==void 0&&ee!==P?{localName:ee}:{},kind:_,description:tt,binding:v?.binding,deprecated:v?.deprecated,tags:v?.tags,...v?.internal?{internal:!0}:{},type:ft,typeSource:Mt,value:W,defaultValue:ce,params:cn,returnType:pn,isFunction:Un,isFunctionDeclaration:R,isRequired:M,constant:_==="const",reactive:this.ctx.reactive_vars.has(P),source:ne(this.ctx,c)})}}if(E==="Comment"){let S=c?.data?.trim()??"";if(oo.test(S))this.ctx.componentComment=S.replace(oo,"").replace(Wu,""),this.ctx.componentCommentSource=ne(this.ctx,c)}if(E==="SlotElement"){let b=c,S=b.attributes?.find((_)=>_.name==="name")?.value,C=(Array.isArray(S)?S[0]:void 0)?.data,v=(b.attributes||[]).filter((_)=>_.name!=="name").reduce((_,R)=>{let W={value:void 0,replace:!1},U=R.value;if(U===void 0||U===!0)return _;let j=Array.isArray(U)?U[0]:U;if(j){let{type:H,expression:M,raw:ee,start:ce,end:ke}=j;if(H==="Text"&&ee!==void 0)W.value=JSON.stringify(ee);else if(!Array.isArray(U)&&H==="ExpressionTag"&&M&&typeof M==="object"&&"type"in M&&M.type==="Identifier"&&"name"in M&&M.name===R.name)W.value=M.name,W.replace=!0;if(M&&typeof M==="object"&&"type"in M){if(M.type==="Literal"&&"value"in M){let he=M.value;W.value=typeof he==="string"?JSON.stringify(he):String(he)}else if(M.type==="MemberExpression")W.value=dn(this.ctx,this,M);else if(M.type!=="Identifier"){if(ce!==void 0&&ke!==void 0){if(M.type==="ObjectExpression"||M.type==="TemplateLiteral")W.value=re(this.ctx,ce+1,ke-1)}}}}if(R.name)_[R.name]=W;return _},{}),P=b.fragment?.nodes?.map(({start:_,end:R})=>{if(_===void 0||R===void 0)return"";return re(this.ctx,_,R)??""}).join("").trim();Ht(this.ctx,{slot_name:C,slot_props:v,slot_fallback:P,source:ne(this.ctx,c)})}if(E==="RenderTag"){let b=c,S=Xi(this.ctx,b.expression);if(S){let C,v=!1;if(S.arguments.length===0)C={};else if(S.arguments.length===1&&typeof S.arguments[0]==="object"&&S.arguments[0]&&"type"in S.arguments[0]&&S.arguments[0].type==="ObjectExpression"){let R=ir(this.ctx,this,S.arguments[0]);C=R.slot_props,v=R.hasUnresolvedSpread}else if(S.arguments.length===1)ie(this.ctx,"syntax-skipped",S.publicName,`{@render ${S.publicName}(...)} argument is not a plain object literal; the render call was not mapped to slot metadata.`,ne(this.ctx,c));let P=S.publicName==="children"?void 0:S.publicName,_=P===void 0?Gu:P;if(C!==void 0)Ht(this.ctx,{slot_name:P,slot_props:C,slot_props_unresolved_spread:v||void 0,source:ne(this.ctx,c)});if(C!==void 0||this.ctx.slots.has(_))this.ctx.snippetPropLocals.add(S.trackingName)}}if(E==="OnDirective"){let b=c;if(b.expression==null&&b.name){if(u!=null&&typeof u==="object"&&"name"in u){let S=typeof u.name==="string"?u.name:void 0,C="type"in u?String(u.type):void 0;if(S&&C){let v=Vt(C)?{type:"InlineComponent",name:S}:{type:"Element",name:S};this.ctx.forwardedEvents.set(b.name,v);let P=this.ctx.events.get(b.name),_=this.ctx.eventDescriptions.get(b.name),R=P?.deprecated,W=P?.internal;if(!P)this.ctx.events.set(b.name,{type:"forwarded",name:b.name,element:v,description:_,deprecated:R,...W?{internal:!0}:{},source:ne(this.ctx,c)});else if(P.type==="forwarded"&&_&&!P.description)this.ctx.events.set(b.name,{...P,description:_,deprecated:P.deprecated??R,...P.internal||W?{internal:!0}:{},source:P.source||ne(this.ctx,c)})}}}}if(E==="BindDirective"&&u&&typeof u==="object"&&"type"in u&&(jt(String(u.type))||Vt(String(u.type)))){let b=c;if(b.expression?.name){let S=Ut(this.ctx,b.expression.name);if(S)this.ctx.reactive_vars.add(S)}if(jt(String(u.type))&&b.name==="this"&&b.expression?.name&&"name"in u&&typeof u.name==="string"){let S=Ut(this.ctx,b.expression.name);if(!S)return;let C=u.name;if(this.ctx.bindings.has(S)){let v=this.ctx.bindings.get(S);if(v&&!v.elements.includes(C))this.ctx.bindings.set(S,{...v,elements:[...v.elements,C]})}else this.ctx.bindings.set(S,{elements:[C]})}}},leave:(c)=>{if(vt(c))this.ctx.activeScopes.pop(),as(T,c)}}),p!==void 0){hs(this,this.ctx,m,p,ne(this.ctx,l));for(let c of y)if(c.name===p){let u=c.arguments[0],h=u&&typeof u==="object"&&"value"in u?u.value:void 0,x=c.arguments[1],E=Di(this,x),b=E===void 0&&x&&typeof x==="object"&&"value"in x?x.value:void 0;if(h!=null)ot(this.ctx,{name:String(h),detail:E??(b==null?"":er(b)),has_argument:Boolean(x),source:ne(this.ctx,c.node)})}}let k=new Set(g);if(p!==void 0){for(let c of y)if(c.name===p){let u=c.arguments[0],h=u&&typeof u==="object"&&"value"in u?u.value:void 0;if(h!=null)k.add(String(h))}}this.ctx.forwardedEvents.forEach((c,u)=>{let h=this.ctx.events.get(u);if(h&&h.type==="dispatched"&&!k.has(u)){let x=this.ctx.eventDescriptions.get(u),E={type:"forwarded",name:u,element:c,description:x,deprecated:h.deprecated,tags:h.tags,source:h.source};if(h.internal)E.internal=!0;if(h.detail!==void 0&&h.detail!=="undefined")E.detail=h.detail;this.ctx.events.set(u,E)}}),fs(this.ctx,k);let w=this.ctx.syntaxMode==="runes"?new Set(Array.from(this.ctx.snippetPropLocals,(c)=>this.resolvePublicPropName(c))):new Set,A=de.mapToArray(this.ctx.props).filter((c)=>!w.has(c.name)).map((c)=>{if(this.ctx.bindings.has(c.name)){let u=this.ctx.bindings.get(c.name)?.elements.sort().map((h)=>yi(h)).join(" | ");return{...c,type:`null | ${u}`,typeSource:"inferred",reactive:c.reactive||this.ctx.reactive_vars.has(c.name)}}return{...c,reactive:c.reactive||this.ctx.reactive_vars.has(c.name)}});this.ctx.activeScopes.length=0;let D=de.mapToArray(this.ctx.slots).map((c)=>{let{slot_props_unresolved_spread:u,...h}=c;if(!c.slot_props)return h;if(typeof c.slot_props==="string")return Ku.test(c.slot_props)?{...h,slot_props:"Record<string, never>"}:h;let x=c.slot_props,E=[];for(let C of Object.keys(x)){if(x[C].replace&&x[C].value!==void 0)x[C].value=this.getPropTypeByLocalOrPublic(x[C].value);if(x[C].value===void 0)x[C].value="any";E.push(`${C}: ${x[C].value}`)}let b=u?" & Record<string, any>":"",S=E.length===0?u?"Record<string, any>":"Record<string, never>":E.length===1?`{ ${E[0]} }${b}`:`{
|
|
33
|
-
${
|
|
28
|
+
`;else x=String.fromCharCode(y);if(this.options.locations)++this.curLine,this.lineStart=this.pos;return x}jsx_readString(d){let y="",x=++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)y+=this.input.slice(x,this.pos),y+=this.jsx_readEntity(),x=this.pos;else if(s(E))y+=this.input.slice(x,this.pos),y+=this.jsx_readNewLine(!1),x=this.pos;else++this.pos}return y+=this.input.slice(x,this.pos++),this.finishToken(i.string,y)}jsx_readEntity(){let d="",y=0,x,E=this.input[this.pos];if(E!=="&")this.raise(this.pos,"Entity must start with an ampersand");let P=++this.pos;while(this.pos<this.input.length&&y++<10){if(E=this.input[this.pos++],E===";"){if(d[0]==="#"){let w;if(d[1]==="x"||d[1]==="X"){if(d=d.substr(2),Np.test(d))w=parseInt(d,16)}else if(d=d.substr(1),Ip.test(d))w=parseInt(d,10);if(w!==void 0&&w<=1114111)x=String.fromCodePoint(w)}else if(Object.prototype.hasOwnProperty.call(ga,d))x=ga[d];break}d+=E}if(x===void 0)return this.pos=P,"&";return x}jsx_readWord(){let d,y=this.pos;do d=this.input.charCodeAt(++this.pos);while(l(d)||d===45);return this.finishToken(o.jsxName,this.input.slice(y,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,y=this.startLoc,x=this.jsx_parseIdentifier();if(!p.allowNamespaces||!this.eat(i.colon))return x;var E=this.startNodeAt(d,y);return E.namespace=x,E.name=this.jsx_parseIdentifier(),this.finishNode(E,"JSXNamespacedName")}jsx_parseElementName(){if(this.type===o.jsxTagEnd)return"";let d=this.start,y=this.startLoc,x=this.jsx_parseNamespacedName();if(this.type===i.dot&&x.type==="JSXNamespacedName"&&!p.allowNamespacedObjects)this.unexpected();while(this.eat(i.dot)){let E=this.startNodeAt(d,y);E.object=x,E.property=this.jsx_parseIdentifier(),x=this.finishNode(E,"JSXMemberExpression")}return x}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,y){let x=this.startNodeAt(d,y);x.attributes=[];let E=this.jsx_parseElementName();if(E)x.name=E;while(this.type!==i.slash&&this.type!==o.jsxTagEnd)x.attributes.push(this.jsx_parseAttribute());return x.selfClosing=this.eat(i.slash),this.expect(o.jsxTagEnd),this.finishNode(x,E?"JSXOpeningElement":"JSXOpeningFragment")}jsx_parseClosingElementAt(d,y){let x=this.startNodeAt(d,y),E=this.jsx_parseElementName();if(E)x.name=E;return this.expect(o.jsxTagEnd),this.finishNode(x,E?"JSXClosingElement":"JSXClosingFragment")}jsx_parseElementAt(d,y){let x=this.startNodeAt(d,y),E=[],P=this.jsx_parseOpeningElementAt(d,y),w=null;if(!P.selfClosing){e:for(;;)switch(this.type){case o.jsxTagStart:if(d=this.start,y=this.startLoc,this.next(),this.eat(i.slash)){w=this.jsx_parseClosingElementAt(d,y);break e}E.push(this.jsx_parseElementAt(d,y));break;case o.jsxText:E.push(this.parseExprAtom());break;case i.braceL:E.push(this.jsx_parseExpressionContainer());break;default:this.unexpected()}if(en(w.name)!==en(P.name))this.raise(w.start,"Expected corresponding JSX closing tag for <"+en(P.name)+">")}let A=P.name?"Element":"Fragment";if(x["opening"+A]=P,x["closing"+A]=w,x.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(x,"JSX"+A)}jsx_parseText(){let d=this.parseLiteral(this.value);return d.type="JSXText",d}jsx_parseElement(){let d=this.start,y=this.startLoc;return this.next(),this.jsx_parseElementAt(d,y)}}}function Lp(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 l=this.parseImportAttributes();if(l)s.attributes=l}}parseImportAttributes(){this.expect(i.braceL);let s=this.parseWithEntries();return this.expect(i.braceR),s}parseWithEntries(){let s=[],l=new Set;do{if(this.type===i.braceR)break;let p=this.startNode(),m;if(this.type===i.string)m=this.parseLiteral(this.value);else m=this.parseIdent(!0);if(this.next(),p.key=m,l.has(p.key.name))this.raise(this.pos,"Duplicated key in attributes");if(l.add(p.key.name),this.type!==i.string)this.raise(this.pos,"Only string is supported as an attribute value");p.value=this.parseLiteral(this.value),s.push(this.finishNode(p,"ImportAttribute"))}while(this.eat(i.comma));return s}}}var wr=["onToken","onComment","onInsertedSemicolon","onTrailingComma"];function wa(){return{_tag:"BufferedParserEvents",segments:[]}}var Rp=wa();function xa(e){return e.segments.length>0}var Mp=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??Rp}replay(e){if(!xa(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 wr){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 wr){let t=this.callbackWrappers[e];if(t)this.options[e]=t}}deactivateCallbacks(){for(let e of wr){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(xa(t))e.segments.push(t)}outputFor(e){return e.output??=wa()}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 _t(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 Op(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 Bp(e,t){e.setLookaheadTokenState(t.lookahead),e.context=_t(t.context,t.contextLength,"token context stack"),e.scopeStack=_t(t.scopeStack,t.scopeStackLength,"scope stack"),e.importsStack=_t(t.importsStack,t.importsStackLength,"import stack"),e.labels=_t(t.labels,t.labelsLength,"label stack"),e.privateNameStack=_t(t.privateNameStack,t.privateNameStackLength,"private-name stack"),e.decoratorStack=_t(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 Fp(e){return{capture:()=>Op(e),restore:(t)=>Bp(e,t)}}function Vp(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(l,p,m){super(l,p,m);this.parseEffects=new Mp(this.options,Fp(this))}overrideContext(l){if(this.curContext()!==l)this.parseEffects?.willMutateTail(this.context,1);return super.overrideContext(l)}takeDecorators(l){let p=this.decoratorStack.length-1;if(this.decoratorStack[p].length>0)this.parseEffects?.willSet(this.decoratorStack,String(p));return super.takeDecorators(l)}parseDecorators(l){let p=this.decoratorStack[this.decoratorStack.length-1];return this.parseEffects?.willAppend(p),super.parseDecorators(l)}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(l,p,m,d){for(let y=this.labels.length-1;y>=0;y--){let x=this.labels[y];if(x.statementStart!==l.start)break;this.parseEffects?.willSet(x,"statementStart"),this.parseEffects?.willSet(x,"kind")}return this.parseEffects?.willAppend(this.labels),super.parseLabeledStatement(l,p,m,d)}enterClassBody(){return this.parseEffects?.willAppend(this.privateNameStack),super.enterClassBody()}exitClassBody(){let l=this.privateNameStack[this.privateNameStack.length-2];if(l)this.parseEffects?.willAppend(l.used);return this.parseEffects?.willMutateTail(this.privateNameStack,1),super.exitClassBody()}parsePrivateIdent(){if(this.options.checkPrivateFields&&this.privateNameStack.length>0){let l=this.privateNameStack[this.privateNameStack.length-1];this.parseEffects?.willAppend(l.used)}return super.parsePrivateIdent()}parseClassField(l){return this.parseEffects?.willSet(this.currentThisScope(),"inClassFieldInit"),super.parseClassField(l)}updateContext(l){let{type:p}=this;if(p===n.parenR||p===n.braceR||p===n.braceL||p===n.dollarBraceL||p===n.parenL||p===n._function||p===n._class||p===n.colon||p===n.backQuote||p===n.star||p===r.jsxTagStart||p===r.jsxTagEnd||p===n.slash&&l===r.jsxTagStart)this.parseEffects?.willMutateTail(this.context,2);return super.updateContext(l)}enterScope(l){return this.parseEffects?.willAppend(this.scopeStack),super.enterScope(l)}exitScope(){return this.parseEffects?.willMutateTail(this.scopeStack,1),super.exitScope()}declareName(l,p,m){let d=this.parseEffects;if(d?.active)if(p===i.BIND_LEXICAL){let y=this.currentScope();if(d.willAppend(y.lexical),this.inModule&&y.flags&i.SCOPE_TOP)d.willSet(this.undefinedExports,l)}else if(p===i.BIND_SIMPLE_CATCH)d.willAppend(this.currentScope().lexical);else if(p===i.BIND_FUNCTION)d.willAppend(this.currentScope().functions);else for(let y=this.scopeStack.length-1;y>=0;y--){let x=this.scopeStack[y];if(d.willAppend(x.var),this.inModule&&x.flags&i.SCOPE_TOP)d.willSet(this.undefinedExports,l);if(x.flags&o)break}return super.declareName(l,p,m)}checkLocalExport(l){return this.parseEffects?.willSet(this.undefinedExports,l.name),super.checkLocalExport(l)}}}var _r=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;function ba(e){if(!e)throw Error("Assert fail")}function jp(e){return e==="accessor"}function $p(e){return e==="in"||e==="out"}var Dn=1,Ta=2,Hp=4,K={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 Nr(e,t){return K.SCOPE_FUNCTION|(e?K.SCOPE_ASYNC:0)|(t?K.SCOPE_GENERATOR:0)}function qp(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 _a(e.object)}function Up(e){return e.type==="UnaryExpression"&&(e.operator==="-"||e.operator==="+")&&e.argument.type==="Literal"&&(typeof e.argument.value==="number"||typeof e.argument.value==="bigint")}function _a(e){if(e.type==="Identifier")return!0;if(e.type!=="MemberExpression")return!1;if(e.computed)return!1;return _a(e.object)}function Ea(e){return e==="private"||e==="public"||e==="protected"}function Gp(e){return Boolean(e.startsExpr)}function Wp(e){if(e==null)throw Error(`Unexpected ${e} value.`);return e}function Kp(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 Na(e){let{dts:t=!1}=e||{},n=!!e?.jsx;return function(r){let i=r.acorn||kr,o=Tp(i),{tokTypes:s,keywordTypes:l,isIdentifierStart:p,lineBreak:m,isNewLine:d,tokContexts:y,isIdentifierChar:x}=i,{tokTypes:E,tokContexts:P,keywordsRegExp:w,tokenIsLiteralPropertyName:A,tokenIsTemplate:O,tokenIsTSDeclarationStart:j,tokenIsIdentifier:N,tokenIsKeywordOrIdentifier:X,tokenIsTSTypeOperator:I}=o;function ce(a,c,u=a.length){for(let h=c;h<u;h++){let g=a.charCodeAt(h);if(d(g))return h<u-1&&g===13&&a.charCodeAt(h+1)===10?h+2:h+1}return-1}if(r=_p(r,o,i),e?.jsx)r=Dp(i,o,r,typeof e.jsx==="boolean"?{}:e.jsx);r=Lp(r,o,i);let ge=Vp(r,{acornTokenTypes:s,typeScriptTokenTypes:E,scope:K});class xe extends ge{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=(h)=>{this.tsParseModifiers({modified:h,allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:R.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===P.tc_expr)return this.jsx_readToken();if(c===P.tc_oTag||c===P.tc_cTag){if(p(a))return this.jsx_readWord();if(a==62)return++this.pos,this.finishToken(E.jsxTagEnd);if((a===34||a===39)&&c==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(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(),h;try{h=a(()=>{throw c})}catch(g){let T=g===c;if(!T&&!(g instanceof SyntaxError))throw this.parseEffects.rollback(u),g;let b={events:this.parseEffects.rollbackWithEvents(u),selected:!1};return T?{node:null,error:null,thrown:!1,aborted:!0,failState:b}:{node:null,error:g,thrown:!0,aborted:!1,failState:b}}return this.parseEffects.commit(u),{node:h,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(Ea(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,R.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 N(this.type)}tsTryParseTypeOrTypePredicateAnnotation(){return this.match(s.colon)?this.tsParseTypeOrTypePredicateAnnotation(s.colon):void 0}tsTryParseGenericAsyncArrowFunction(a,c,u){if(!this.tsMatchLeftRelational())return;let h=this.maybeInArrowParameters;this.maybeInArrowParameters=!0;let g=this.tsTryParseAndCatch(()=>{let T=this.startNodeAt(a,c);return T.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(T),T.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(s.arrow),T});if(this.maybeInArrowParameters=h,!g)return;return this.parseArrowExpression(g,g.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 h=this.input.charCodeAt(u);return!(x(h)||(h&64512)===55296)}return!1}isAbstractConstructorSignature(){return this.ts_isContextual(E.abstract)&&this.lookahead().type===s._new}nextTokenStartSince(a){return _r.lastIndex=a,_r.test(this.input)?_r.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,h=this.preValue,g=this.preToken,T=this.isLookahead;try{if(this.createLookaheadState(),this.isLookahead=!0,a!==void 0)for(let b=0;b<a;b++)this.nextToken();else this.nextToken();return this.getCurLookaheadState()}finally{this.setLookaheadTokenState(c),this.context=u,this.preValue=h,this.preToken=g,this.isLookahead=T}}readWord(){let a=this.readWord1(),c=s.name;if(this.keywords.test(a))c=l[a];else if(new RegExp(w).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 h,g=c;(h=ce(this.input,g,this.pos))>-1;)++this.curLine,g=this.lineStart=h;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 h=this.input.charCodeAt(this.pos+=a);while(this.pos<this.input.length&&!d(h))h=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 ma.lastIndex=this.end,ma.test(this.input)}addExtra(a,c,u,h=!0){if(!a)return;let g=a.extra=a.extra||{};if(h)g[c]=u;else Object.defineProperty(g,c,{enumerable:h,value:u})}isLiteralPropertyName(){return A(this.type)}hasPrecedingLineBreak(){return m.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 h=u.type;if(a===h){for(let g=0;g<c;g++)this.next();return!0}else return!1}ts_eatContextualWithState(a,c,u){if(w.test(a)){if(this.ts_isContextualWithState(u,E[a])){for(let h=0;h<c;h++)this.next();return!0}return!1}else{if(!this.isContextualWithState(a,u))return!1;for(let h=0;h<c;h++)this.next();return!0}}canHaveLeadingDecorator(){return this.match(s._class)||this.isAbstractClass()||this.isDeclareClass()}eatContextual(a){if(w.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?K.BIND_TS_CONST_ENUM:K.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(Ep),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(Qt),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 h=this.tsParseInterfaceDeclaration(a,{declare:!0});if(h)return h}if(N(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,h){let g=[],T=-1;for(;;){if(this.tsIsListTerminator(a))break;T=-1;let b=c();if(b==null)return;if(g.push(b),this.eat(s.comma)){T=this.lastTokStart;continue}if(this.tsIsListTerminator(a))break;if(u)this.expect(s.comma);return}if(h)h.value=T;return g}tsParseDelimitedList(a,c,u){return Wp(this.tsParseDelimitedListWorker(a,c,!0,u))}tsParseBracketedList(a,c,u,h,g){if(!h)if(u)this.expect(s.bracketL);else this.expect(s.relational);let T=this.tsParseDelimitedList(a,c,g);if(u)this.expect(s.bracketR);else this.expect(s.relational);return T}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(N(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,R.UnsupportedSignatureParameterKind({type:a.type}));return a})}tsParseTypePredicateAsserts(){if(this.type!==E.asserts)return!1;let a=this.containsEsc;if(this.next(),!N(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(),h=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(h){let v=this.tsParseTypeAnnotation(!1);return u.parameterName=h,u.typeAnnotation=v,u.asserts=!1,c.typeAnnotation=this.finishNode(u,"TSTypePredicate"),this.finishNode(c,"TSTypeAnnotation")}let g=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(g&&this.match(s._this)){let v=this.tsParseThisTypeOrThisTypePredicate();if(v.type==="TSThisType")u.parameterName=v,u.asserts=!0,u.typeAnnotation=null,v=this.finishNode(u,"TSTypePredicate");else this.resetStartLocationFromNode(v,u),v.asserts=!0;return c.typeAnnotation=v,this.finishNode(c,"TSTypeAnnotation")}let T=g&&this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!T){if(!g)return this.tsParseTypeAnnotation(!1,c);return u.parameterName=this.parseIdent(),u.asserts=g,u.typeAnnotation=null,c.typeAnnotation=this.finishNode(u,"TSTypePredicate"),this.finishNode(c,"TSTypeAnnotation")}let b=this.tsParseTypeAnnotation(!1);return u.parameterName=T,u.typeAnnotation=b,u.asserts=g,c.typeAnnotation=this.finishNode(u,"TSTypePredicate"),this.finishNode(c,"TSTypeAnnotation")})}tsFillSignature(a,c){let u=a===s.arrow,h="parameters",g="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,R.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 h=this.startNode(),g=this.eat(u),T=[];do T.push(c());while(this.eat(u));if(T.length===1&&!g)return T[0];return h.types=T,this.finishNode(h,a)}tsCheckTypeAnnotationForReadOnly(a){switch(a.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(a.start,R.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,R.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(!X(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),h;if(this.tsIsTupleElementLabel()){let g=this.startNode();g.label=this.parseIdent(!0),g.optional=this.eat(s.question),this.expect(s.colon),g.elementType=this.tsParseType(),h=this.finishNode(g,"TSNamedTupleMember")}else{h=this.tsParseType();let g=this.eat(s.question);if(this.eat(s.colon))this.raise(h.start,R.InvalidTupleMemberLabel);if(g){let T=this.startNodeAtNode(h);T.typeAnnotation=h,h=this.finishNode(T,"TSOptionalType")}}if(u){let g=this.startNodeAt(c,a);g.typeAnnotation=h,h=this.finishNode(g,"TSRestType")}return h}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:h}=u;if(c&&h!=="TSRestType"&&h!=="TSOptionalType"&&!(h==="TSNamedTupleMember"&&u.optional))this.raise(u.start,R.OptionalTypeBeforeRequired);if(c||=h==="TSNamedTupleMember"&&u.optional||h==="TSOptionalType",h==="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(X(a)||a===s._void||a===s._null){let c=a===s._void?"TSVoidKeyword":a===s._null?"TSNullKeyword":Kp(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 I(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(){ba(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(),N(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:R.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,R.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(h){throw this.parseEffects.rollback(c),h}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:h,errorTemplate:g=R.InvalidModifierOnTypeMember}){let T={},b=(C,S,k,_)=>{if(S===k&&a[_])this.raise(C.column,R.InvalidModifiersOrder({orderedModifiers:[k,_]}))},v=(C,S,k,_)=>{if(a[k]&&S===_||a[_]&&S===k)this.raise(C.column,R.IncompatibleModifiers({modifiers:[k,_]}))};for(;;){let C=this.startLoc,S=this.tsParseModifier(c.concat(u??[]),h);if(!S)break;if(Ea(S))if(a.accessibility)this.raise(this.start,R.DuplicateAccessibilityModifier());else b(C,S,S,"override"),b(C,S,S,"static"),b(C,S,S,"readonly"),b(C,S,S,"accessor"),T.accessibility=S,a.accessibility=S;else if($p(S))if(a[S])this.raise(this.start,R.DuplicateModifier({modifier:S}));else b(C,S,"in","out"),T[S]=S,a[S]=!0;else if(jp(S))if(a[S])this.raise(this.start,R.DuplicateModifier({modifier:S}));else v(C,S,"accessor","readonly"),v(C,S,"accessor","override"),T[S]=S,a[S]=!0;else if(S==="const")if(a[S])this.raise(this.start,R.DuplicateModifier({modifier:S}));else T[S]=S,a[S]=!0;else if(Object.hasOwnProperty.call(a,S))this.raise(this.start,R.DuplicateModifier({modifier:S}));else b(C,S,"static","readonly"),b(C,S,"static","override"),b(C,S,"override","readonly"),b(C,S,"abstract","override"),v(C,S,"declare","override"),v(C,S,"static","abstract"),T[S]=S,a[S]=!0;if(u?.includes(S))this.raise(this.start,g)}return T}tsParseInOutModifiers(a){this.tsParseModifiers({modified:a,allowedModifiers:["in","out"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:R.InvalidModifierOnTypeParameter})}tsParseClassTypeParameterModifiers(a){this.tsParseModifiers({modified:a,allowedModifiers:["const","in","out"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:R.InvalidModifierOnTypeParameter})}parseMaybeUnary(a,c,u,h){if(!e?.jsx&&this.tsMatchLeftRelational())return this.tsParseTypeAssertion();else return super.parseMaybeUnary(a,c,u,h)}tsParseTypeAssertion(){if(n)this.raise(this.start,R.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,R.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(c,"TSTypeParameterInstantiation")}tsParseHeritageClause(a){let c=this.start,u=this.tsParseDelimitedList("HeritageClauseElement",()=>{let h=this.startNode();if(h.expression=this.tsParseEntityName(),this.tsMatchLeftRelational())h.typeParameters=this.tsParseTypeArguments();return this.finishNode(h,"TSExpressionWithTypeArguments")});if(!u.length)this.raise(c,R.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,R.ReadonlyForMethodSignature);let h=u;if(h.kind&&this.tsMatchLeftRelational())this.raise(this.start,R.AccesorCannotHaveTypeParameters);this.tsFillSignature(s.colon,h),this.tsParseTypeMemberSemicolon();let g="parameters",T="typeAnnotation";if(h.kind==="get"){if(h[g].length>0){if(this.raise(this.start,"A 'get' accesor must not have any formal parameters."),this.isThisParam(h[g][0]))this.raise(this.start,R.AccesorCannotDeclareThisParameter)}}else if(h.kind==="set"){if(h[g].length!==1)this.raise(this.start,"A 'get' accesor must not have any formal parameters.");else{let b=h[g][0];if(this.isThisParam(b))this.raise(this.start,R.AccesorCannotDeclareThisParameter);if(b.type==="Identifier"&&b.optional)this.raise(this.start,R.SetAccesorCannotHaveOptionalParameter);if(b.type==="RestElement")this.raise(this.start,R.SetAccesorCannotHaveRestParameter)}if(h[T])this.raise(h[T].start,R.SetAccesorCannotHaveReturnType)}else h.kind="method";return this.finishNode(h,"TSMethodSignature")}else{let h=u;if(c)h.readonly=!0;let g=this.tsTryParseTypeAnnotation();if(g)h.typeAnnotation=g;return this.tsParseTypeMemberSemicolon(),this.finishNode(h,"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(N(this.type)){a.id=this.parseIdent(),this.checkLValSimple(a.id,K.BIND_TS_INTERFACE);let h=this.currentScope();this.maybeExportDefined(h,a.id.name)}else a.id=null,this.raise(this.start,R.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 j(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(Qt);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(N(a)){if(c&&!this.containsEsc||u)return!1;if((a===E.type||a===E.interface)&&!this.containsEsc){let T=this.lookahead();if(N(T.type)&&!this.isContextualWithState("from",T)||T.type===s.braceL)return!1}}else if(!this.match(s._default))return!1;let h=this.nextTokenStart(),g=this.isUnparsedContextual(h,"from");if(this.input.charCodeAt(h)===44||N(this.type)&&g)return!0;if(this.match(s._default)&&g){let T=this.input.charCodeAt(this.nextTokenStartSince(h+4));return T===34||T===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,K.BIND_TS_NAMESPACE);if(this.eat(s.dot)){let u=this.startNode();this.tsParseModuleOrNamespaceDeclaration(u,!0),a.body=u}else this.enterScope(Qt),a.body=this.tsParseModuleBlock(),super.exitScope();return this.finishNode(a,"TSModuleDeclaration")}checkLValSimple(a,c=K.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,K.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)||N(this.type)))return this.tsParseAbstractDeclaration(a);break;case"module":if(this.tsCheckLineTerminator(u)){if(this.match(s.string))return this.tsParseAmbientExternalModuleDeclaration(a);else if(N(this.type))return this.tsParseModuleOrNamespaceDeclaration(a)}break;case"namespace":if(this.tsCheckLineTerminator(u)&&N(this.type))return this.tsParseModuleOrNamespaceDeclaration(a);break;case"type":if(this.tsCheckLineTerminator(u)&&N(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,K.BIND_LEXICAL),super.expect(s.eq);let u=this.tsParseModuleReference();if(a.importKind==="type"&&u.type!=="TSExternalModuleReference")this.raise(u.start,R.ImportAliasHasImportType);return a.moduleReference=u,super.semicolon(),this.finishNode(a,"TSImportEqualsDeclaration")}isExportDefaultSpecifier(){if(this.tsIsDeclarationStart())return!1;let{type:a}=this;if(N(a)){if(this.isContextual("async")||this.isContextual("let"))return!1;if((a===E.type||a===E.interface)&&!this.containsEsc){let h=this.lookahead();if(N(h.type)&&!this.isContextualWithState("from",h)||h.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||N(this.type)&&u)return!0;if(this.match(s._default)&&u){let h=this.input.charCodeAt(this.nextTokenStartSince(c+4));return h===34||h===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,h,g){if(this.initFunction(a),this.ecmaVersion>=9||this.ecmaVersion>=6&&!h){if(this.type===s.star&&c&Ta)this.unexpected();a.generator=this.eat(s.star)}if(this.ecmaVersion>=8)a.async=!!h;if(c&Dn)a.id=c&Hp&&this.type!==s.name?null:this.parseIdent();let T=this.yieldPos,b=this.awaitPos,v=this.awaitIdentPos,C=this.maybeInArrowParameters;if(this.maybeInArrowParameters=!1,this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Nr(a.async,a.generator)),!(c&Dn))a.id=this.type===s.name?this.parseIdent():null;this.parseFunctionParams(a);let S=c&Dn;if(this.parseFunctionBody(a,u,!1,g,{isFunctionDeclaration:S}),S&&this.isAmbientContext&&a.id){if(this.currentScope().flags&K.SCOPE_TOP)this.declareName(a.id.name,K.BIND_FLAGS_TS_EXPORT_ONLY,a.id.start)}if(this.yieldPos=T,this.awaitPos=b,this.awaitIdentPos=v,c&Dn&&a.id&&!(c&Ta))if(a.body)this.checkLValSimple(a.id,this.strict||a.generator||a.async?this.treatFunctionsAsVar?K.BIND_VAR:K.BIND_LEXICAL:K.BIND_FUNCTION);else this.checkLValSimple(a.id,K.BIND_NONE);return this.maybeInArrowParameters=C,this.finishNode(a,S?"FunctionDeclaration":"FunctionExpression")}parseFunctionBody(a,c=!1,u=!1,h=!1,g){if(this.match(s.colon))a.returnType=this.tsParseTypeOrTypePredicateAnnotation(s.colon);let T=g?.isFunctionDeclaration?"TSDeclareFunction":g?.isClassMethod?"TSDeclareMethod":void 0;if(T&&!this.match(s.braceL)&&this.isLineTerminator())return this.exitScope(),this.finishNode(a,T);if(T==="TSDeclareFunction"&&this.isAmbientContext){if(this.raise(a.start,R.DeclareFunctionHasImplementation),a.declare)return super.parseFunctionBody(a,c,u,!1),this.finishNode(a,T)}return super.parseFunctionBody(a,c,u,h),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 b=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(b)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,h=this.startLoc,g=this.type===s._import;if(a.callee=this.parseSubscripts(this.parseExprAtom(),u,h,!0,!1),g&&a.callee.type==="ImportExpression")this.raise(u,"Cannot use new with import()");let{callee:T}=a;if(T.type==="TSInstantiationExpression"&&!T.extra?.parenthesized)a.typeArguments=T.typeArguments,a.callee=T.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,h,g){if(s._in.binop>h&&!this.hasPrecedingLineBreak()){let T;if(this.isContextual("as"))T="TSAsExpression";if(this.isContextual("satisfies"))T="TSSatisfiesExpression";if(T){let b=this.startNodeAt(c,u);b.expression=a;let v=this.tsTryNextParseConstantContext();if(v)b.typeAnnotation=v;else b.typeAnnotation=this.tsNextThenParseType();return this.finishNode(b,T),this.reScan_lt_gt(),this.parseExprOp(b,c,u,h,g)}}return super.parseExprOp(a,c,u,h,g)}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",N(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(N(c.type)&&u.type===s.eq){this.next();let h=this.tsParseImportEqualsDeclaration(a);return this.importOrExportOuterKind="value",h}}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,R.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 h=this.tsParseImportEqualsDeclaration(a,!0);return this.importOrExportOuterKind=void 0,h}else if(this.ts_eatWithState(s.eq,2,u)){let h=a;return h.expression=this.parseExpression(),this.semicolon(),this.importOrExportOuterKind=void 0,this.finishNode(h,"TSExportAssignment")}else if(this.ts_eatContextualWithState("as",2,u)){let h=a;return this.expectContextual("namespace"),h.id=this.parseIdent(),this.semicolon(),this.importOrExportOuterKind=void 0,this.finishNode(h,"TSNamespaceExportDeclaration")}else{let h=this.lookahead(2).type;if(this.ts_isContextualWithState(u,E.type)&&(h===s.braceL||h===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 g of a.specifiers)if(this.checkUnreserved(g.local),this.checkLocalExport(g.local),g.local.type==="Literal")this.raise(g.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 h=super.parseMaybeDefault(a,c,u);if(h.type==="AssignmentPattern"&&h.typeAnnotation&&h.right.start<h.typeAnnotation.start)this.raise(h.typeAnnotation.start,R.TypeAnnotationAfterAssign);return h}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 h=a[u];if(h?.type==="TSTypeCastExpression")a[u]=this.typeCastToParameter(h)}return super.toAssignableList(a,c)}reportReservedArrowTypeParam(a){if(a.params.length===1&&!a.extra?.trailingComma&&n)this.raise(a.start,R.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(N(this.type)){let h=this.potentialArrowAt===this.start,g=this.start,T=this.startLoc,b=this.containsEsc,v=this.parseIdent(!1);if(this.ecmaVersion>=8&&!b&&v.name==="async"&&!this.canInsertSemicolon()&&this.eat(s._function))return this.overrideContext(y.f_expr),this.parseFunction(this.startNodeAt(g,T),0,!1,!0,c);if(h&&!this.canInsertSemicolon()){if(this.eat(s.arrow))return this.parseArrowExpression(this.startNodeAt(g,T),[v],!1,c);if(this.ecmaVersion>=8&&v.name==="async"&&this.type===s.name&&!b&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc)){if(v=this.parseIdent(!1),this.canInsertSemicolon()||!this.eat(s.arrow))this.unexpected();return this.parseArrowExpression(this.startNodeAt(g,T),[v],!0,c)}}return v}else return super.parseExprAtom(a,c,u)}parseExprAtomDefault(){if(N(this.type)){let a=this.potentialArrowAt===this.start,c=this.containsEsc,u=this.parseIdent();if(!c&&u.name==="async"&&!this.canInsertSemicolon()){let{type:h}=this;if(h===s._function)return this.next(),this.parseFunction(this.startNodeAtNode(u),void 0,!0,!0);else if(N(h))if(this.lookaheadCharCode()===61){let g=this.parseIdent(!1);if(this.canInsertSemicolon()||!this.eat(s.arrow))this.unexpected();return this.parseArrowExpression(this.startNodeAtNode(u),[g],!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(X(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:h}=this;this.next(),super.parseVar(a,!1,c,u||h),this.semicolon();let g=this.finishNode(a,"VariableDeclaration");if(!h)return g;for(let{id:T,init:b}of g.declarations){if(!b)continue;if(c!=="const"||!!T.typeAnnotation)this.raise(b.start,R.InitializerNotAllowedInAmbientContext);else if(b.type!=="Literal"&&(b.type!=="TemplateLiteral"||b.expressions.length>0)&&!Up(b)&&!qp(b))this.raise(b.start,R.ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference)}return g}parseStatement(a,c,u){if(this.match(E.at))this.parseDecorators(!0);if(this.match(s._const)&&this.isLookaheadContextual("enum")){let h=this.startNode();return this.expect(s._const),this.tsParseEnumDeclaration(h,{const:!0})}if(this.ts_isContextual(E.enum))return this.tsParseEnumDeclaration(this.startNode());if(this.ts_isContextual(E.interface)){let h=this.tsParseInterfaceDeclaration(this.startNode());if(h)return h}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,R.ClassMethodHasReadonly);if(a.declare&&this.match(s.parenL))this.raise(a.start,R.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,h,g){if(this.eat(s.question)){let T=this.startNodeAt(c,u);return T.test=a,T.consequent=this.parseMaybeAssign(),this.expect(s.colon),T.alternate=this.parseMaybeAssign(h),this.finishNode(T,"ConditionalExpression")}return a}parseMaybeConditional(a,c){let u=this.start,h=this.startLoc,g=this.parseExprOps(a,c);if(this.checkExpressionErrors(c))return g;if(!this.maybeInArrowParameters||!this.match(s.question))return this.parseConditional(g,u,h,a,c);let T=this.tryParse(()=>this.parseConditional(g,u,h,a,c));if(!T.node){if(T.error)this.setOptionalParametersError(c,T.error);return g}return T.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 h=this.startNodeAt(c,u);return h.expression=a,h.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(h,"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,h=this.eatContextual("declare");if(h&&(this.ts_isContextual(E.declare)||!this.shouldParseExportStatement()))this.raise(this.start,R.ExpectedAmbientAfterExportDeclare);let T=N(this.type)&&this.tsTryParseExportDeclaration()||this.parseStatement(null);if(!T)return null;if(T.type==="TSInterfaceDeclaration"||T.type==="TSTypeAliasDeclaration"||h)a.exportKind="type";if(h)this.resetStartLocation(T,c,u),T.declare=!0;return T}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,R.PrivateElementHasAbstract);if(a.accessibility)this.raise(a.start,R.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,R.DeclareClassFieldHasInitializer);if(a.abstract&&this.match(s.eq)){let{key:u}=a;this.raise(this.start,R.AbstractPropertyHasInitializer({propertyName:u.type==="Identifier"&&!a.computed?u.name:`[${this.input.slice(u.start,u.end)}]`}))}}return super.parseClassField(a)}parseClassMethod(a,c,u,h){let g=a.kind==="constructor",T=a.key.type==="PrivateIdentifier",b=this.tsTryParseTypeParameters(this.tsParseConstModifier);if(T){if(b)a.typeParameters=b;if(a.accessibility)this.raise(a.start,R.PrivateMethodsHasAccessibility({modifier:a.accessibility}))}else if(b&&g)this.raise(b.start,R.ConstructorHasTypeParameters);let{declare:v=!1,kind:C}=a;if(v&&(C==="get"||C==="set"))this.raise(a.start,R.DeclareAccessor({kind:C}));if(b)a.typeParameters=b;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&&ya(a,"prototype"))this.raise(S.start,"Classes may not have a static property named prototype");let k=a.value=this.parseMethod(c,u,h,!0,a);if(a.kind==="get"&&k.params.length!==0)this.raiseRecoverable(k.start,"getter should have no params");if(a.kind==="set"&&k.params.length!==1)this.raiseRecoverable(k.start,"setter should have exactly one param");if(a.kind==="set"&&k.params[0].type==="RestElement")this.raiseRecoverable(k.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="",h=!1,g=!1,T="method",b=!1,v=["declare","private","public","protected","accessor","override","abstract","readonly","static"],C=this.tsParseModifiers({modified:c,allowedModifiers:v,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:R.InvalidModifierOnTypeParameterPositions});b=Boolean(C.static);let S=()=>{if(this.tsIsStartOfStaticBlocks()){if(this.next(),this.next(),this.tsHasSomeModifiers(c,v))this.raise(this.start,R.StaticBlockCannotHaveModifier);if(this.ecmaVersion>=13)return super.parseClassStaticBlock(c),c}else{let k=this.tsTryParseIndexSignature(c);if(k){if(c.abstract)this.raise(c.start,R.IndexSignatureHasAbstract);if(c.accessibility)this.raise(c.start,R.IndexSignatureHasAccessibility({modifier:c.accessibility}));if(c.declare)this.raise(c.start,R.IndexSignatureHasDeclare);if(c.override)this.raise(c.start,R.IndexSignatureHasOverride);return k}if(!this.inAbstractClass&&c.abstract)this.raise(c.start,R.NonAbstractClassHasAbstractMethod);if(c.override){if(!a)this.raise(c.start,R.OverrideNotInSubClass)}if(c.static=b,b){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())g=!0;else u="async";if(!u&&(this.ecmaVersion>=9||!g)&&this.eat(s.star))h=!0;if(!u&&!g&&!h){let _=this.value;if(this.eatContextual("get")||this.eatContextual("set"))if(this.isClassElementNameStart())T=_;else u=_}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||T!=="method"||h||g){let _=!c.static&&ya(c,"constructor"),D=_&&a;if(_&&T!=="method")this.raise(c.key.start,"Constructor can't have get/set modifier");c.kind=_?"constructor":T,this.parseClassMethod(c,h,g,D)}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,h){if(this.match(s.colon))a.returnType=this.tsParseTypeAnnotation();let g=this.yieldPos,T=this.awaitPos,b=this.awaitIdentPos;this.enterScope(Nr(u,!1)|K.SCOPE_ARROW),this.initFunction(a);let v=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,h),this.yieldPos=g,this.awaitPos=T,this.awaitIdentPos=b,this.maybeInArrowParameters=v,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 h=!1,g=-1,T=-1,b=-1;if(c)g=c.parenthesizedAssign,T=c.trailingComma,b=c.doubleProto,c.parenthesizedAssign=c.trailingComma=-1;else c=new Zt,h=!0;let v=this.start,C=this.startLoc;if(this.type===s.parenL||N(this.type))this.potentialArrowAt=this.start,this.potentialArrowInForAwait=a==="await";let S=this.parseMaybeConditional(a,c);if(u)S=u.call(this,S,v,C);if(this.type.isAssign){let k=this.startNodeAt(v,C);if(k.operator=this.value,this.type===s.eq)S=this.toAssignable(S,!0,c,!0);if(!h)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(k.left=S,this.next(),k.right=this.parseMaybeAssign(a),b>-1)c.doubleProto=b;return this.finishNode(k,"AssignmentExpression")}else if(h)this.checkExpressionErrors(c,!0);if(g>-1)c.parenthesizedAssign=g;if(T>-1)c.trailingComma=T;return S}parseMaybeAssign(a,c,u){let h,g;if(e?.jsx&&(this.matchJsx("jsxTagStart")||this.tsMatchLeftRelational())){if(h=this.tryParse(()=>this.parseMaybeAssignOrigin(a,c,u)),!h.error)return h.node;let v=this.context,C=v[v.length-1],S=v[v.length-2];if(C===o.tokContexts.tc_oTag&&S===o.tokContexts.tc_expr)this.parseEffects.pop(v),this.parseEffects.pop(v);else if(C===o.tokContexts.tc_oTag||C===o.tokContexts.tc_expr)this.parseEffects.pop(v)}if(!h?.error&&!this.tsMatchLeftRelational())return this.parseMaybeAssignOrigin(a,c,u);let T,b=this.tryParse((v)=>{T=this.tsParseTypeParameters(this.tsParseConstModifier);let C=this.parseMaybeAssignOrigin(a,c,u);if(C.type!=="ArrowFunctionExpression"||C.extra?.parenthesized)v();if(T?.params.length!==0)this.resetStartLocationFromNode(C,T);return C.typeParameters=T,C});if(!b.error&&!b.aborted){if(T)this.reportReservedArrowTypeParam(T);return b.node}if(!h){if(ba(!0),g=this.tryParse(()=>this.parseMaybeAssignOrigin(a,c,u)),!g.error)return g.node}if(h?.thrown)throw this.selectTryParseResult(h),h.error;if(b.thrown)throw this.selectTryParseResult(b),b.error;if(g?.thrown)throw this.selectTryParseResult(g),g.error;throw h?.error||b.error||g?.error}parseAssignableListItem(a){let c=[];while(this.match(E.at))c.push(this.parseDecorator());let u=this.start,h=this.startLoc,g,T=!1,b=!1;if(a!==void 0){let S={};if(this.tsParseModifiers({modified:S,allowedModifiers:["public","private","protected","override","readonly"]}),g=S.accessibility,b=S.override,T=S.readonly,a===!1&&(g||T||b))this.raise(h.column,R.UnexpectedParameterModifier)}let v=this.parseMaybeDefault(u,h);this.parseBindingListItem(v);let C=this.parseMaybeDefault(v.start,v.loc.start,v);if(c.length)C.decorators=c;if(g||T||b){let S=this.startNodeAt(u,h);if(g)S.accessibility=g;if(T)S.readonly=T;if(b)S.override=b;if(C.type!=="Identifier"&&C.type!=="AssignmentPattern")this.raise(S.start,R.UnsupportedParameterPropertyKind);return S.parameter=C,this.finishNode(S,"TSParameterProperty")}return C}checkLValInnerPattern(a,c=K.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,R.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((h,g)=>h.type!=="ObjectMethod"&&(g===u||h.type!=="SpreadElement")&&this.isAssignable(h))}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 Zt,h=!1){switch(a.type){case"ParenthesizedExpression":return this.toAssignableParenthesizedExpression(a,c,u,h);case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":if(c);else this.raise(a.start,R.UnexpectedTypeCastInParameter);let g=this.toAssignable(a.expression,c,u,h);if(h)return a.expression=g,a;return g;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,h=!1){switch(a.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":let g=this.toAssignable(a.expression,c,u,h);if(h)return a.expression=g,a;return g;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((h)=>{let g=this.tsParseTypeOrTypePredicateAnnotation(s.colon);if(this.canInsertSemicolon()||!this.match(s.arrow))h();return g});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,h){let g=this.startNodeAt(a,c);return g.returnType=this.shouldParseArrowReturnType,this.shouldParseArrowReturnType=void 0,this.parseArrowExpression(g,u,!1,h)}parseParenAndDistinguishExpression(a,c){let u=this.start,h=this.startLoc,g,T=this.ecmaVersion>=8;if(this.ecmaVersion>=6){let b=this.maybeInArrowParameters;this.maybeInArrowParameters=!0,this.next();let v=this.start,C=this.startLoc,S=[],k=!0,_=!1,D=new Zt,H=this.yieldPos,q=this.awaitPos,G;this.yieldPos=0,this.awaitPos=0;while(this.type!==s.parenR)if(k?k=!1:this.expect(s.comma),T&&this.afterTrailingComma(s.parenR,!0)){_=!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,D,this.parseParenItem));let re=this.lastTokEnd,V=this.lastTokEndLoc;if(this.expect(s.parenR),this.maybeInArrowParameters=b,a&&this.shouldParseArrow(S)&&this.eat(s.arrow))return this.checkPatternErrors(D,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=H,this.awaitPos=q,this.parseParenArrowList(u,h,S,c);if(!S.length||_)this.unexpected(this.lastTokStart);if(G)this.unexpected(G);if(this.checkExpressionErrors(D,!0),this.yieldPos=H||this.yieldPos,this.awaitPos=q||this.awaitPos,S.length>1)g=this.startNodeAt(v,C),g.expressions=S,this.finishNodeAt(g,"SequenceExpression",re,V);else g=S[0]}else g=this.parseParenExpression();if(this.options.preserveParens){let b=this.startNodeAt(u,h);return b.expression=g,this.finishNode(b,"ParenthesizedExpression")}else return g}parseTaggedTemplateExpression(a,c,u,h){let g=this.startNodeAt(c,u);if(g.tag=a,g.quasi=this.parseTemplate({isTagged:!0}),h)this.raise(c,"Tagged Template Literals are not allowed in optionalChain.");return this.finishNode(g,"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,h){let g=this.startNodeAt(a,c);return g.returnType=this.shouldParseAsyncArrowReturnType,this.shouldParseAsyncArrowReturnType=void 0,this.parseArrowExpression(g,u,!0,h)}parseExprList(a,c,u,h){let g=[],T=!0;while(!this.eat(a)){if(!T){if(this.expect(s.comma),c&&this.afterTrailingComma(a))break}else T=!1;let b;if(u&&this.type===s.comma)b=null;else if(this.type===s.ellipsis){if(b=this.parseSpread(h),this.maybeInArrowParameters&&this.match(s.colon))b.typeAnnotation=this.tsParseTypeAnnotation();if(h&&this.type===s.comma&&h.trailingComma<0)h.trailingComma=this.start}else b=this.parseMaybeAssign(!1,h,this.parseParenItem);g.push(b)}return g}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,h,g,T,b){let v=T;if(!this.hasPrecedingLineBreak()&&this.value==="!"&&this.match(s.prefix)){this.exprAllowed=!1,this.next();let D=this.startNodeAt(c,u);return D.expression=a,a=this.finishNode(D,"TSNonNullExpression"),a}let C=!1;if(this.match(s.questionDot)&&this.lookaheadCharCode()===60){if(h)return a;a.optional=!0,v=C=!0,this.next()}if(this.tsMatchLeftRelational()||this.match(s.bitShift)){let D,H=this.tsTryParseAndCatch(()=>{if(!h&&this.atPossibleAsyncArrow(a)){let V=this.tsTryParseGenericAsyncArrowFunction(c,u,b);if(V)return a=V,a}let q=this.tsParseTypeArgumentsInExpression();if(!q)return a;if(C&&!this.match(s.parenL))return D=this.curPosition(),a;if(O(this.type)||this.type===s.backQuote){let V=this.parseTaggedTemplateExpression(a,c,u,v);return V.typeArguments=q,V}if(!h&&this.eat(s.parenL)){let V=new Zt,Y=this.startNodeAt(c,u);if(Y.callee=a,Y.arguments=this.parseExprList(s.parenR,this.ecmaVersion>=8,!1,V),this.tsCheckForInvalidTypeCasts(Y.arguments),Y.typeArguments=q,v)Y.optional=C;return this.checkExpressionErrors(V,!0),a=this.finishNode(Y,"CallExpression"),a}let G=this.type;if(this.tsMatchRightRelational()||G===s.bitShift||G!==s.parenL&&Gp(G)&&!this.hasPrecedingLineBreak())return;let re=this.startNodeAt(c,u);return re.expression=a,re.typeArguments=q,this.finishNode(re,"TSInstantiationExpression")});if(D)this.unexpected(D);if(H){if(H.type==="TSInstantiationExpression"&&(this.match(s.dot)||this.match(s.questionDot)&&this.lookaheadCharCode()!==40))this.raise(this.start,R.InvalidPropertyAccessAfterInstantiationExpression);return a=H,a}}let S=this.ecmaVersion>=11,k=S&&this.eat(s.questionDot);if(h&&k)this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");let _=this.eat(s.bracketL);if(_||k&&this.type!==s.parenL&&this.type!==s.backQuote||this.eat(s.dot)){let D=this.startNodeAt(c,u);if(D.object=a,_)D.property=this.parseExpression(),this.expect(s.bracketR);else if(this.type===s.privateId&&a.type!=="Super")D.property=this.parsePrivateIdent();else D.property=this.parseIdent(this.options.allowReserved!=="never");if(D.computed=!!_,S)D.optional=k;a=this.finishNode(D,"MemberExpression")}else if(!h&&this.eat(s.parenL)){let D=this.maybeInArrowParameters;this.maybeInArrowParameters=!0;let H=new Zt,q=this.yieldPos,G=this.awaitPos,re=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;let V=this.parseExprList(s.parenR,this.ecmaVersion>=8,!1,H);if(g&&!k&&this.shouldParseAsyncArrow()){if(this.checkPatternErrors(H,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0)this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function");this.yieldPos=q,this.awaitPos=G,this.awaitIdentPos=re,a=this.parseSubscriptAsyncArrow(c,u,V,b)}else{this.checkExpressionErrors(H,!0),this.yieldPos=q||this.yieldPos,this.awaitPos=G||this.awaitPos,this.awaitIdentPos=re||this.awaitIdentPos;let Y=this.startNodeAt(c,u);if(Y.callee=a,Y.arguments=V,S)Y.optional=k;a=this.finishNode(Y,"CallExpression")}this.maybeInArrowParameters=D}else if(this.type===s.backQuote){if(k||v)this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");let D=this.startNodeAt(c,u);D.tag=a,D.quasi=this.parseTemplate({isTagged:!0}),a=this.finishNode(D,"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,h=a.value.params[0];if(u=h&&this.isThisParam(h)?u+1:u,a.value.params.length!==u){let T=a.value.start;if(a.kind==="get")this.raiseRecoverable(T,"getter should have no params");else this.raiseRecoverable(T,"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,h,g,T,b,v){if(this.tsMatchLeftRelational()){if(c)this.unexpected();a.kind="init",a.method=!0;let C=this.tsTryParseTypeParameters(this.tsParseConstModifier);if(a.value=this.parseMethod(u,h),C)a.value.typeParameters=C;return}return super.parsePropertyValue(a,c,u,h,g,T,b,v)}parseProperty(a,c){if(!a){let u=[];if(this.match(E.at))while(this.match(E.at))u.push(this.parseDecorator());let h=super.parseProperty(a,c);if(h.type==="SpreadElement"){if(u.length)this.raise(h.start,Ln.SpreadElementDecorator)}if(u.length)h.decorators=u,u=[];return h}return super.parseProperty(a,c)}parseCatchClauseParam(){let a=this.parseBindingAtom(),c=a.type==="Identifier";this.enterScope(c?K.SCOPE_SIMPLE_CATCH:0),this.checkLValPattern(a,c?K.BIND_SIMPLE_CATCH:K.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 h=this.strict;this.strict=!0,this.parseClassId(a,c),this.parseClassSuper(a);let g=this.enterClassBody(),T=this.startNode(),b=!1;T.body=[];let v=[];this.expect(s.braceL);while(this.type!==s.braceR){if(this.match(E.at)){v.push(this.parseDecorator());continue}let C=this.parseClassElement(a.superClass!==null);if(v.length)C.decorators=v,this.resetStartLocationFromNode(C,v[0]),v=[];if(C){if(T.body.push(C),C.type==="MethodDefinition"&&C.kind==="constructor"&&C.value.type==="FunctionExpression"){if(b)this.raiseRecoverable(C.start,"Duplicate constructor in the same class");if(b=!0,C.decorators&&C.decorators.length>0)this.raise(C.start,Ln.DecoratorConstructor)}else if(C.key&&C.key.type==="PrivateIdentifier"&&C.value?.type!=="TSDeclareMethod"){let S=C.key.name;if(this.parseEffects.modify(g,S,(_)=>wp(_,C)))this.raiseRecoverable(C.key.start,`Identifier '#${S}' has already been declared`)}}}if(this.strict=h,this.next(),v.length)this.raise(this.start,Ln.TrailingDecorator);return a.body=this.finishNode(T,"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,h,g){let T=this.startNode(),b=this.yieldPos,v=this.awaitPos,C=this.awaitIdentPos;if(this.initFunction(T),this.ecmaVersion>=6)T.generator=a;if(this.ecmaVersion>=8)T.async=!!c;if(this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Nr(c,T.generator)|K.SCOPE_SUPER|(u?K.SCOPE_DIRECT_SUPER:0)),this.expect(s.parenL),T.params=this.parseClassFunctionParams(),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(T,!1,!0,!1,{isClassMethod:h}),this.yieldPos=b,this.awaitPos=v,this.awaitIdentPos=C,g&&g.abstract){if(!!T.body){let{key:k}=g;this.raise(g.start,R.AbstractMethodHasImplementation({methodName:k.type==="Identifier"&&!g.computed?k.name:`[${this.input.slice(k.start,k.end)}]`}))}}return this.finishNode(T,"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 h=new this(u,a,c);if(t)h.isAmbientContext=!0;return h.nextToken(),h.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 h=this.startNode();return h.local=this.parseModuleExportName(),this.parseTypeOnlyImportExportSpecifier(h,!1,this.importOrExportOuterKind==="type"),this.finishNode(h,"ExportSpecifier"),this.checkExport(a,h.exported,h.exported.start),h}else{let h=super.parseExportSpecifier(a);return h.exportKind="value",h}}parseTypeOnlyImportExportSpecifier(a,c,u){let h=c?"imported":"local",g=c?"local":"exported",T=a[h],b,v=!1,C=!0,S=T.start;if(this.isContextual("as")){let _=this.parseIdent();if(this.isContextual("as")){let D=this.parseIdent();if(X(this.type))v=!0,T=_,b=c?this.parseIdent():this.parseModuleExportName(),C=!1;else b=D,C=!1}else if(X(this.type))C=!1,b=c?this.parseIdent():this.parseModuleExportName();else v=!0,T=_}else if(X(this.type))if(v=!0,c){if(T=super.parseIdent(!0),!this.isContextual("as"))this.checkUnreserved(T)}else T=this.parseModuleExportName();if(v&&u)this.raise(S,c?R.TypeModifierIsUsedInTypeImports:R.TypeModifierIsUsedInTypeExports);a[h]=T,a[g]=b;let k=c?"importKind":"exportKind";if(a[k]=v?"type":"value",C&&this.eatContextual("as"))a[g]=c?this.parseIdent():this.parseModuleExportName();if(!a[g])a[g]=this.copyNode(a[h]);if(c)this.checkLValSimple(a[g],K.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==P.tc_oTag)this.parseEffects.append(this.context,y.b_expr);else if(u==P.tc_expr)this.parseEffects.append(this.context,y.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,P.tc_cTag),this.exprAllowed=!1;else return super.updateContext(a)}jsx_parseOpeningElementAt(a,c){let u=this.startNodeAt(a,c),h=this.jsx_parseElementName();if(h)u.name=h;if(this.match(s.relational)||this.match(s.bitShift)){let g=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());if(g)u.typeArguments=g}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,h?"JSXOpeningElement":"JSXOpeningFragment")}enterScope(a){let c=a===Qt;if(c)this.parseEffects.append(this.importsStack,[]);let u=c?a|K.SCOPE_CLASS_STATIC_BLOCK:a;super.enterScope(u);let h=super.currentScope();h.types=[],h.enums=[],h.constEnums=[],h.classes=[],h.exportOnlyBindings=[]}exitScope(){if(super.currentScope().flags&Qt)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 h=0;h<u-1;h++)if(this.importsStack[h].indexOf(a)>-1)return!0}return!1}maybeExportDefined(a,c){if(this.inModule&&a.flags&K.SCOPE_TOP)this.parseEffects.remove(this.undefinedExports,c)}declareName(a,c,u){if(c&K.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 h=this.currentScope();if(c&K.BIND_FLAGS_TS_EXPORT_ONLY){this.maybeExportDefined(h,a),this.parseEffects.append(h.exportOnlyBindings,a);return}if(c===K.BIND_TS_TYPE||c===K.BIND_TS_INTERFACE){if(c===K.BIND_TS_TYPE&&h.types.includes(a))this.raise(u,`type '${a}' has already been declared.`);this.parseEffects.append(h.types,a)}else if(c&K.BIND_FLAGS_TS_ENUM){if(h.enums.includes(a))return;super.declareName(a,K.BIND_LEXICAL,u)}else super.declareName(a,c,u);if(c&K.BIND_FLAGS_TS_ENUM)this.parseEffects.append(h.enums,a);if(c&K.BIND_FLAGS_TS_CONST_ENUM)this.parseEffects.append(h.constEnums,a);if(c&K.BIND_FLAGS_CLASS)this.parseEffects.append(h.classes,a)}checkLocalExport(a){let{name:c}=a;if(this.hasImport(c))return;let u=this.scopeStack.length;for(let h=u-1;h>=0;h--){let g=this.scopeStack[h];if(g.types.indexOf(c)>-1||g.exportOnlyBindings.indexOf(c)>-1)return}super.checkLocalExport(a)}}return xe}}function Ia(e,t,n){let r=n._,i=!1,o=()=>{i=!0};function s(p,m,d){let y=null;m.push(p);for(let x in p){if(x==="type"||x==="__proto__")continue;let E=p[x];if(E&&typeof E==="object")if(Array.isArray(E)){let P=null,w=E.length;for(let A=0;A<w;A++){let O=E[A];if(O&&typeof O==="object"){let j=l(O,m,d);if(j)(P??=E.slice())[A]=j}}if(P)(y??={})[x]=P}else{let P=l(E,m,d);if(P)(y??={})[x]=P}}if(m.pop(),y)return zp(p,y)}function l(p,m,d){if(i)return;if(!p.type)return;let y=n[p.type];if(!r&&!y)return s(p,m,d);let x,E,P=(A=d)=>E=s(p,m,A),w=(A,O=d)=>{m.push(p);let j=l(A,m,O)??A;return m.pop(),j};if(r){let A;if(x=r(p,{path:m,state:d,next:(O=d)=>(d=O,A=y?y(p,{path:m,state:O,next:P,stop:o,visit:w}):P(O),A),stop:o,visit:w}),!x&&A)x=A}else x=y(p,{path:m,state:d,next:P,stop:o,visit:w});if(!x&&E)x=E;if(x)return x}return l(e,[],t)??e}function zp(e,t){let n={},r=Object.getOwnPropertyDescriptors(e);for(let i in r)Object.defineProperty(n,i,r[i]);for(let i in t)n[i]=t[i];return n}var Xp=/\n/,Jp=/[ \t]/,Yp=/^[,) \t]*$/,Mn="",Da=[];function On(e,t){Mn=e,Da=t}function Bn(e,t,n,r){let i=t;if(e&&Xp.test(i)){let o=n;while(o>0&&Mn[o-1]!==`
|
|
29
|
+
`)o-=1;let s=o;while(Jp.test(Mn[s]))s+=1;let l=Mn.slice(o,s);i=Qp(i,l)}Da.push({type:e?"Block":"Line",value:i,start:n,end:r})}function Qp(e,t){if(t==="")return e;return(e.startsWith(t)?e.slice(t.length):e).replaceAll(`
|
|
30
|
+
${t}`,`
|
|
31
|
+
`)}function Rr(e,t,n,r){let i=Zp(n,r);if(i>=n.length)return;Lr(e,void 0,n,{index:i},t)}function Zp(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 Lr(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,p=s===void 0||s>o?Object.keys(e):[];for(let m=0;m<p.length;m++){let d=p[m];if(d==="type"||d==="leadingComments")continue;let y=e[d];if(!y||typeof y!=="object")continue;if(Array.isArray(y)){for(let x of y)if(x&&typeof x==="object"&&typeof x.type==="string"){if(Lr(x,e,n,r,i),r.index>=n.length)return}}else if(typeof y.type==="string"){if(Lr(y,e,n,r,i),r.index>=n.length)return}}if(r.index<n.length){let m=n[r.index];if(t===void 0||e.end!==t.end){let d=i.slice(e.end??0,m.start);if((t?.type==="BlockStatement"||t?.type==="Program")&&Dr(t.body,e)||t?.type==="ArrayExpression"&&Dr(t.elements,e)||t?.type==="ObjectExpression"&&Dr(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)<=m.start&&Yp.test(d))r.index++}}}function Dr(e,t){return!!e&&e.indexOf(t)===e.length-1}var La=pe,eu=La.extend(Na());function Mr(e){return e?eu:La}var tu={onComment:Bn,sourceType:"module",ecmaVersion:16},nu={onComment:Bn,sourceType:"module",ecmaVersion:16,preserveParens:!0},ru={onComment:Bn,sourceType:"module",ecmaVersion:16};function Ra(e,t,n,r,i){if(n.length===i)return;Rr(e,t,n,r)}function Ma(e,t,n){let r=n.length;On(e,n);let i=Mr(t).parse(e,tu);if(n.length>0)Rr(i,e,n,r);return i}var iu={count:0};function It(e,t,n,r){iu.count+=1;let i=r.length;On(e,r);let o=Mr(n).parseExpressionAt(e,t,nu);Ra(o,e,r,t,i);let s=r.length>i?r.at(-1):void 0,l=s&&s.end>(o.end??0)?s.end:o.end??0,p=o.end??t;return{node:su(e,t,p,40)?au(o):o,end:l}}function su(e,t,n,r){for(let i=t;i<n;i++)if(e.charCodeAt(i)===r)return!0;return!1}function Oa(e,t,n,r){let i=r.length,o=Mr(n);On(e,r);let s=new o(ru,e,t);s.nextToken();let l=s.parseStatement(null,!0,Object.create(null));return Ra(l,e,r,t,i),l}function au(e){return Ia(e,null,{ParenthesizedExpression(t,n){return n.visit(t.expression)}})}function Et(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 Or{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 ut(`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 ut("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 ut("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&&Et(this.source.charCodeAt(this.index)))this.index++}requireWhitespace(){if(!Et(this.source.charCodeAt(this.index)))throw new ut("Expected whitespace",this.index);this.allowWhitespace()}readIdentifierName(){let e=this.index,t=e,n="",r=this.source.codePointAt(this.index);if(r!==void 0&&Te(r,!0)){t+=r<=65535?1:2;while(t<this.source.length){let i=this.source.codePointAt(t);if(i===void 0||!ke(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 ut extends Error{position;constructor(e,t){super(`${e} (at index ${t})`);this.name="TemplateSyntaxError",this.position=t}}function Se(){return{type:"Fragment",nodes:[]}}var ou=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"]),cu=["&&","||","??"],lu=["===","!==","==","!="];function Ba(e,t){let n=e.codePointAt(t);if(n===void 0||!Te(n,!0))return t;let r=t+(n<=65535?1:2);while(r<e.length){let i=e.codePointAt(r);if(!ke(i,!0))break;r+=i<=65535?1:2}return r}function pu(e,t){let n=t;while(n<e.length){let r=e.charCodeAt(n);if(r<48||r>57)break;n++}return n}function Fn(e,t){let n=t;while(n<e.length&&Et(e.charCodeAt(n)))n++;return n}function Fa(e,t){let n=pu(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||ke(i,!0))return null}let r=e.slice(t,n);return{type:"Literal",start:t,end:n,value:Number(r),raw:r}}function Va(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 uu(e,t){let n=e.charCodeAt(t);if(n===34||n===39)return Va(e,t);let r=Ba(e,t);if(r===t)return Fa(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(ou.has(i))return null;let o={type:"Identifier",start:t,end:r,name:i},s=r;while(s<e.length){let l=e.charCodeAt(s);if(l===46){let p=s+1,m=Ba(e,p);if(m===p)return null;let d={type:"Identifier",start:p,end:m,name:e.slice(p,m)};o={type:"MemberExpression",start:t,end:m,object:o,property:d,computed:!1,optional:!1},s=m}else if(l===91){let p=s+1,m=e.charCodeAt(p),d=m===34||m===39?Va(e,p):Fa(e,p);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 Br(e,t){if(e.charCodeAt(t)!==33||e.charCodeAt(t+1)===61)return uu(e,t);let n=Br(e,Fn(e,t+1));if(!n)return null;return{type:"UnaryExpression",start:t,end:n.end,operator:"!",prefix:!0,argument:n}}function du(e,t){for(let n of lu)if(e.startsWith(n,t))return{operator:n,logical:!1};for(let n of cu)if(e.startsWith(n,t))return{operator:n,logical:!0};return null}function ja(e,t){let n=Fn(e,t);if(n>=e.length)return!1;let r=e.charCodeAt(n);return r===125||r===41}function hu(e){let t=e.source,n=Br(t,e.index);if(!n)return null;if(ja(t,n.end))return e.index=n.end,n;let r=Fn(t,n.end),i=du(t,r);if(!i)return null;let o=Br(t,Fn(t,r+i.operator.length));if(!o||!ja(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 he(e){let t=hu(e);if(t)return t;let{node:n,end:r}=It(e.source,e.index,e.isTypeScript,e.root.comments);return e.index=r,n}var fu={"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},Fr=fu;var mu=[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 yu(e,t){if(t&&!e.endsWith(";"))return`${e}\\b(?!=)`;return e}function $a(e){let n=Object.keys(Fr).map((r)=>yu(r,e));return new RegExp(`&(#(?:x[a-fA-F\\d]+|\\d+)(?:;)?|${n.join("|")})`,"g")}var Vr,jr;function gu(e){if(e){if(!jr)jr=$a(!0);return jr}if(!Vr)Vr=$a(!1);return Vr}var Ha=0;function xu(e){if(e===10)return 32;if(e<128)return e;if(e<=159)return mu[e-128];if(e<55296)return e;if(e<=57343)return Ha;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 Ha}function $r(e,t){if(e.indexOf("&")===-1)return e;return e.replace(gu(t),(n,r)=>{let i;if(r[0]!=="#")i=Fr[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 tn extends Error{constructor(e){super(`sveld's template parser doesn't support ${e} yet.`);this.name="TemplateParseNotImplementedError"}}var bu=/<\/script\s*>/g,Tu=/<\/script\s*>/y,Eu=/[^\n]/g,Su=new Set(["server","client","worker","test","default"]);function qa(e,t,n){let r=e.index,i=e.readUntil(bu);if(e.index>=e.source.length)throw Error("sveld: unclosed <script> tag");let o=e.source.slice(0,r).replace(Eu," ")+i;e.read(Tu);let s=Ma(o,e.isTypeScript,e.root.comments);s.start=r;let l="default";for(let p of n){if(Su.has(p.name))throw Error(`sveld: "${p.name}" is a reserved <script> attribute name.`);if(p.name==="module"){if(p.value!==!0)throw Error("sveld: <script module> does not take a value.");l="module"}if(p.name==="context"){let m=p.value;if(m===!0||!Array.isArray(m)||m.length!==1||m[0].type!=="Text")throw Error("sveld: context attribute must be a plain string.");if(m[0].data!=="module")throw Error('sveld: only context="module" is valid.');l="module"}}return{type:"Script",start:t,end:e.index,context:l,content:s,attributes:n}}function Ua(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 vu=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]);function Hr(e){return vu.has(e)||e.charCodeAt(0)===33&&e.toLowerCase()==="!doctype"}var Cu="^[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}]*)?$",Au=new RegExp(Cu,"u");function Ga(e){return Au.test(e)}var Pu=/(?:"([^"]*)"|'([^'])*'|([^>\s]+))/y,Ja=/["']/y,ku=/(\/>|[\s"'=<>`])/y,qr=/<\/textarea(\s[^>]*)?>/iy,wu=/^![a-zA-Z]+$/,_u=/^[a-zA-Z][a-zA-Z0-9]*:[a-zA-Z][a-zA-Z0-9-]*[a-zA-Z0-9]$/,Nu=/^(?:\p{Lu}[$\u200c\u200d\p{ID_Continue}.]*|\p{ID_Start}[$\u200c\u200d\p{ID_Continue}]*(?:\.[$\u200c\u200d\p{ID_Continue}]+)+)$/u,Ya={"svelte:head":"SvelteHead","svelte:options":"SvelteOptions","svelte:window":"SvelteWindow","svelte:document":"SvelteDocument","svelte:body":"SvelteBody"},Wa={...Ya,"svelte:element":"SvelteElement","svelte:component":"SvelteComponent","svelte:self":"SvelteSelf","svelte:fragment":"SvelteFragment","svelte:boundary":"SvelteBoundary"};function Iu(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 Du(e){if(Iu(e))return!0;if(wu.test(e))return!0;if(_u.test(e))return!0;return Ga(e)}function Lu(e){let t=e.charCodeAt(0);if(t>=97&&t<=122&&!e.includes("."))return!1;return!0}function Ru(e){return`Svelte${e.slice(7).split("-").map((n)=>n.charAt(0).toUpperCase()+n.slice(1)).join("")}`}function Mu(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 Ou(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 Ka(e){let{source:t,index:n}=e;if(n>=t.length)throw new ut("Unexpected end of input",t.length);let r=n;while(r<t.length){let i=t.charCodeAt(r);if(i===47||i===62||Et(i))break;r++}return e.index=r,{name:t.slice(n,r),start:n,end:r}}function Qa(e){let{source:t,index:n}=e;if(n>=t.length)throw new ut("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||Et(i))break;r++}return e.index=r,{name:t.slice(n,r),start:n,end:r}}function Bu(e){let t=e.index;if(e.eat("//")){let n=e.readUntilString(`
|
|
32
|
+
`),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 Fu(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 Za(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=$r(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 tn("blocks/tags inside attribute value sequences");let s=e.index-1;o(s),e.allowWhitespace();let l=he(e);e.allowWhitespace(),e.eat("}",!0),i.push({type:"ExpressionTag",start:s,end:e.index,expression:l}),r={start:e.index,end:-1,type:"Text",raw:"",data:""}}else{let s=e.index+1;if(n!==void 0){let l=e.source;while(s<l.length){let p=l.charCodeAt(s);if(p===123||p===n)break;s++}}e.index=s}}throw new tn("unterminated attribute value / sequence (loose mode)")}function Vu(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=Za(e,()=>{if(t)return e.match(t);return!!e.matchRegex(ku)},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 Ur(e,t,n,r){return{type:"Attribute",start:t,end:n,name:e,value:r}}function ju(e){let t=e.index,n=Qa(e);if(!n.name)return null;let r=!0;if(e.eat("=")){e.allowWhitespace();let i=e.matchRegex(Pu);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:$r(i,!0)}]}if(e.matchRegex(Ja))throw Error("sveld: expected '='");return Ur(n.name,t,e.index,r)}function $u(e){while(!0){let l=e.index;if(Bu(e),e.index===l)break;e.allowWhitespace()}let t=e.index;if(e.eat("{")){if(e.allowWhitespace(),e.eat("@attach")){e.requireWhitespace();let m=he(e);return e.allowWhitespace(),e.eat("}",!0),{type:"AttachTag",start:t,end:e.index,expression:m}}if(e.eat("...")){let m=he(e);return e.allowWhitespace(),e.eat("}",!0),{type:"SpreadAttribute",start:t,end:e.index,expression:m}}let l=e.readIdentifierName();if(l.name==="")throw Error("sveld: empty attribute shorthand");e.allowWhitespace(),e.eat("}",!0);let p={type:"ExpressionTag",start:l.start,end:l.end,expression:l};return Ur(l.name,t,e.index,p)}let n=Qa(e);if(!n.name)return null;let r=e.index;e.allowWhitespace();let i=n.name.indexOf(":"),o=i!==-1&&Fu(n.name.slice(0,i)),s=!0;if(e.eat("="))if(e.allowWhitespace(),e.source[e.index]==="/"&&e.source[e.index+1]===">"){let l=e.index;e.index++,s=[{start:l,end:l+1,type:"Text",raw:"/",data:"/"}],r=e.index}else s=Vu(e),r=e.index;else if(e.matchRegex(Ja))throw Error("sveld: expected '='");if(o){let l=n.name.slice(i+1).split("|",1)[0];if(l==="")throw Error("sveld: directive missing a name");if(o==="StyleDirective")return{start:t,end:r,type:o,name:l,value:s};let p=s===!0?void 0:Array.isArray(s)?s[0]:s,m=null;if(p){if((Array.isArray(s)?s.length>1:!1)||p.type==="Text")throw Error("sveld: directive value must be a single expression");m=p.expression}let d={start:t,end:r,type:o,name:l,expression:m};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 Ur(n.name,t,r,s)}function eo(e){let t=e.index++,n=e.current();if(e.eat("!--")){let x=e.readUntilString("-->");e.eat("-->",!0),e.append({type:"Comment",start:t,end:e.index,data:x});return}if(e.eat("/")){let{name:x}=Ka(e);if(e.allowWhitespace(),e.eat(">",!0),Hr(x))throw Error(`sveld: <${x}> is a void element and cannot have a closing tag`);while(n.name!==x){if(n.type==="RegularElement");else throw Error(`sveld: invalid closing tag </${x}>`);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=Ka(e),i=Lu(r.name)&&Nu.test(r.name);if(!Du(r.name)&&!i)throw Error(`sveld: "${r.name}" is not a valid element or component name`);if(r.name in Ya&&n.type!=="Root")throw Error(`sveld: <${r.name}> must be a top-level element`);let o;if(r.name in Wa)o=Wa[r.name];else if(r.name.startsWith("svelte:"))o=Ru(r.name);else if(i)o="Component";else if(r.name==="title"&&Mu(e.stack))o="TitleElement";else if(r.name==="slot"&&!Ou(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"&&ks(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 l=e.current(),p=(r.name==="script"||r.name==="style")&&l.type==="Root",m=p?ju:$u,d;while(d=m(e))s.attributes.push(d),e.allowWhitespace();if(s.type==="SvelteComponent")s.expression=Xa(za(s));if(s.type==="SvelteElement"){let x=za(s);if(x.value===!0)throw Error("sveld: <svelte:element> `this` attribute needs a value");if(Hu(x))s.tag=Xa(x);else{let E=x.value[0];s.tag=E.type==="Text"?{type:"Literal",value:E.data,raw:`'${E.raw}'`,start:E.start,end:E.end}:E.expression}}if(p){if(e.eat(">",!0),r.name==="script"){let x=qa(e,t,s.attributes);if(x.context==="module"){if(e.root.module)throw Error("sveld: duplicate <script module>");e.root.module=x}else{if(e.root.instance)throw Error("sveld: duplicate <script>");e.root.instance=x}}else{if(e.root.css)throw Error("sveld: duplicate <style>");e.root.css=Ua(e,t,s.attributes)}return}e.append(s);let y=e.eat("/")||Hr(r.name);if(e.eat(">",!0),y)s.end=e.index;else if(r.name==="textarea")s.fragment.nodes=Za(e,()=>(qr.lastIndex=e.index,qr.test(e.source))),e.read(qr),s.end=e.index;else e.push(s,s.fragment)}function za(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 Xa(e){return Array.isArray(e.value)?e.value[0].expression:e.value.expression}function Hu(e){return e.value!==!0&&!Array.isArray(e.value)||Array.isArray(e.value)&&e.value.length===1&&e.value[0].type==="ExpressionTag"}function to(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=no(n);if(typeof r==="boolean")t.runes=r}if(n.name==="customElement"){let r=Gu(n);if(r!==void 0)t.customElement=r}}return t}function no(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 qu=new Set(["String","Boolean","Number","Array","Object"]);function Gr(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 Uu(e){let t={};if(!e||typeof e!=="object"||e.type!=="ObjectExpression")return t;for(let[n,r]of Gr(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"&&qu.has(i))t.type=i}return t}function Gu(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=no(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=Gr(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 l=i.find(([d])=>d==="props")?.[1];if(l&&typeof l==="object"&&l.type==="ObjectExpression"){o.props={};for(let[d,y]of Gr(l))o.props[d]=Uu(y)}let p=i.find(([d])=>d==="shadow")?.[1];if(p&&typeof p==="object"){let d=p;if(d.type==="Literal"&&(d.value==="open"||d.value==="none"))o.shadow=d.value;else if(d.type==="ObjectExpression")o.shadow=p}let m=i.find(([d])=>d==="extend")?.[1];if(m!==void 0)o.extend=m;return o}var Wu=/<script\s+(?:[^>]*|(?:[^=>'"/]+=(?:"[^"]*"|'[^']*'|[^>\s]+)\s+)*)lang=(["'])?ts\1[^>]*>/;class Wr extends Or{root;stack=[];fragments=[];isTypeScript;lastAutoClosedTag;constructor(e,t){super(e);this.isTypeScript=Wu.test(e);let n=Se();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 Kr={"{":"}","(":")","[":"]"},Ku=new Set(Object.values(Kr));function nn(e,t,n=Kr){let r=n===Kr?Ku:new Set(Object.values(n)),i=[],o=t;while(o<e.source.length){let s=e.source[o++];if(s==="'"||s==='"'||s==="`"){o=zu(e,o,s);continue}if(Object.hasOwn(n,s))i.push(s);else if(r.has(s)){let l=i.pop(),p=l?n[l]:void 0;if(s!==p)throw Error(`sveld: expected "${p}"`);if(i.length===0)return o}}throw Error("sveld: unexpected end of input")}function zu(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=nn(e,i)}throw Error("sveld: unterminated string constant")}var io=/[^\n]/g,Xu=/\?\s*:/g;function dt(e){let t=e.index,n=e.readIdentifierName();if(n.name!==""){let x=ro(e);return{...n,typeAnnotation:x}}let r=e.source[e.index];if(r!=="{"&&r!=="[")throw Error("sveld: expected a binding pattern");let i=nn(e,t);e.index=i;let o=e.source.slice(t,i),s=e.source.slice(0,t).replace(io," "),l=s.indexOf(" ");s=s.slice(0,l)+s.slice(l+1);let p=`${s}(${o} = 1)`,{node:m}=It(p,t-1,e.isTypeScript,e.root.comments),d=m.left,y=ro(e);if(y)d.typeAnnotation=y,d.end=y.end;return d}function ro(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(io," ")+n+e.source.slice(e.index).replace(Xu,":"),{node:o}=It(i,r,e.isTypeScript,e.root.comments),s=o;if(s.type==="AssignmentExpression"){let l=s.right.start;while(i[l]!=="=")l-=1;({node:o}=It(i.slice(0,l),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 so=/\s*}/y,Ju={"<":">"};function ao(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:he(e),consequent:Se(),alternate:null};e.append(n),e.allowWhitespace(),e.eat("}",!0),e.push(n,n.consequent);return}if(e.eat("each")){e.requireWhitespace();let n=he(e);if(e.allowWhitespace(),!e.match("as")){let l=n;if(l.type==="SequenceExpression"&&l.expressions)l=l.expressions[0];if(l.type==="TSAsExpression"){let p=l;n=p.expression;let m=p.typeAnnotation.start-2;while(m>=0&&!(e.source[m]==="a"&&e.source[m+1]==="s"))m-=1;e.index=m}}let r=null,i,o;if(e.eat("as"))e.requireWhitespace(),r=dt(e);if(e.allowWhitespace(),e.eat(",")){e.allowWhitespace();let l=e.readIdentifierName();if(!l.name)throw Error("sveld: expected an identifier");i=l.name,e.allowWhitespace()}if(e.eat("("))e.allowWhitespace(),o=he(e),e.allowWhitespace(),e.eat(")",!0),e.allowWhitespace();e.eat("}",!0);let s={type:"EachBlock",start:t,end:-1,expression:n,body:Se(),context:r,index:i,key:o};e.append(s),e.push(s,s.body);return}if(e.eat("await")){e.requireWhitespace();let n=he(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(so))e.requireWhitespace(),r.value=dt(e),e.allowWhitespace();r.then=Se()}else if(e.eat("catch")){if(!e.matchRegex(so))e.requireWhitespace(),r.error=dt(e),e.allowWhitespace();r.catch=Se()}else r.pending=Se();e.eat("}",!0),e.append(r),e.push(r,r.then??r.catch??r.pending);return}if(e.eat("key")){e.requireWhitespace();let n=he(e);e.allowWhitespace(),e.eat("}",!0);let r={type:"KeyBlock",start:t,end:-1,expression:n,fragment:Se()};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=nn(e,o,Ju);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:Se()};e.append(i),e.push(i,i.body);return}throw Error("sveld: expected if/each/await/key/snippet")}function oo(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=Se(),e.fragments.push(n.alternate),e.eat("if")){e.requireWhitespace();let r=he(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:Se(),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=Se(),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=dt(e),e.allowWhitespace(),e.eat("}",!0);n.then=Se(),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=dt(e),e.allowWhitespace(),e.eat("}",!0);n.catch=Se(),e.fragments.pop(),e.fragments.push(n.catch);return}throw Error("sveld: expected {:then ...} or {:catch ...}")}throw Error("sveld: {:...} not valid here")}function co(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 Yu=/(?:let|const)\b/y,Qu=/(?:var|interface|enum)\b/y,Zu=/type\b/y;function lo(e){let t=e.index;if(e.matchRegex(Qu))throw Error("sveld: `var`/`interface`/`enum` are not valid here");if(!e.matchRegex(Yu)&&!e.matchRegex(Zu))return null;let n=e.root.comments.length,r=Oa(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 ed=/\s*}/y;function po(e){let t=e.index;while(e.source[t]!=="{")t-=1;if(e.eat("html")){e.requireWhitespace();let n=he(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(ed))n=[];else{let i=he(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=dt(e);e.allowWhitespace(),e.eat("=",!0),e.allowWhitespace();let r=he(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=he(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 uo(e){let t=e.index;if(e.index+=1,e.allowWhitespace(),e.eat("#")){ao(e);return}if(e.eat(":")){oo(e);return}if(e.eat("@")){po(e);return}if(e.match("/")&&!e.match("/*")&&!e.match("//")){e.eat("/"),co(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=he(e);e.allowWhitespace(),e.eat("}",!0);let i={type:"ExpressionTag",start:t,end:e.index,expression:r};e.append(i)}function ho(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),l={type:"Text",start:t,end:e.index,raw:s,data:s};e.append(l)}function zr(e){let t=e.trimEnd(),n=new Wr(t,e.length);while(n.index<n.source.length)if(n.match("<"))eo(n);else if(n.match("{"))uo(n);else ho(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=to(i)}return n.root}function fo(e){if(e==="var")return"let";if(e==="using"||e==="await using")return"const";return e}var td=null,mo=/^@component/,nd=/\r/g,rd=/^\{\s*\}$/,id=new Set(["AssignmentExpression","UpdateExpression","CallExpression","SpreadAttribute","FunctionDeclaration","ImportDeclaration","VariableDeclaration","ExportNamedDeclaration","Comment","SlotElement","RenderTag","OnDirective","BindDirective"]);class fe{ctx=zn();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(fe.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=ie(this.ctx,t),r=e.instance?.attributes?.find((s)=>s.name==="lang");if((r?fe.getStaticAttributeValue(r)?.toLowerCase():void 0)!=="ts"){ae(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=fe.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(Ae(e))return e.name;if(rt(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 ct(this.ctx,this,n);let t=this.ctx.funcDecls.get(e);if(t)return ct(this.ctx,this,t);return}addModuleExport(e,t){if(Re(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)}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=Ps(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=zn()}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 fe.SCRIPT_BLOCK_REGEX.lastIndex=0,e.replace(fe.SCRIPT_BLOCK_REGEX,(t,n,r,i)=>{fe.TS_DIRECTIVE_REGEX.lastIndex=0;let o=r.replace(fe.TS_DIRECTIVE_REGEX,"");return n+o+i})}parseSvelteComponent(e,t){this.cleanup(),this.ctx.componentFilePath=t.filePath;let n=fe.stripTypeScriptDirectivesFromScripts(e);this.ctx.source=n;let r=zr(n);if(xs(this,this.ctx,r),this.ctx.parsed=r,this.ctx.scriptLanguage==="ts")xn(this.ctx.parsed.module),xn(this.ctx.parsed.instance),xn(this.ctx.parsed.fragment);this.ctx.syntaxMode=gs(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;hr(this.ctx,this.ctx.parsed?.module),hr(this.ctx,this.ctx.parsed?.instance),os(this.ctx,this,o);let s={type:"ComponentRoot",instance:this.ctx.parsed.instance,fragment:this.ctx.parsed.fragment};if(this.ctx.parsed?.module)Gt(this.ctx.parsed?.module,(c)=>{if(c.type==="ImportDeclaration")bn(this.ctx,c);if(c.type==="FunctionDeclaration"){let u=c;if(u.id?.name)this.ctx.funcDecls.set(u.id.name,u)}if(c.type==="VariableDeclaration")this.ctx.vars.add(c);if(c.type==="ExportNamedDeclaration"){if(c.declaration==null&&c.specifiers.length===0)return;let u,h=!1;if(c.declaration==null&&c.specifiers[0]?.type==="ExportSpecifier"){let b=c.specifiers[0],v=b.local&&typeof b.local==="object"&&"name"in b.local?b.local.name:void 0,C=b.exported&&typeof b.exported==="object"&&"name"in b.exported?b.exported.name:void 0;if(!v||!C)return;let S;for(let k of Array.from(this.ctx.vars))if(k.declarations.some((_)=>_.id&&typeof _.id==="object"&&("type"in _.id)&&_.id.type==="Identifier"&&_.id.name===v)){S=k;break}if(!S){let k="source"in c&&c.source&&typeof c.source==="object"&&"value"in c.source?c.source.value:void 0,_=typeof k==="string"?`it re-exports from "${k}"`:this.ctx.valueImportBindingsByLocalName.has(v)?"it re-exports an imported binding":"no matching local declaration was found";ae(this.ctx,"export-unresolved",C,`export "${C}" was skipped because ${_}; sveld only resolves exports of a local declaration.`,ie(this.ctx,c));return}c.declaration=S,u=C,h=!0}if(c.declaration==null)return;if(!c.declaration||typeof c.declaration!=="object"||!("type"in c.declaration))return;let g=[];if(c.declaration.type==="FunctionDeclaration"){let b=c.declaration;if(!b.id?.name)return;let v=this.ctx.scriptLanguage==="ts"?nr(this.ctx,b):void 0;g.push({prop_name:b.id.name,kind:"function",isFunctionDeclaration:!0,value:void 0,typeSeed:v?.hasAnnotations?void 0:"() => any",explicitType:v?.hasAnnotations?v.signature:void 0,initializerIsFunction:!0,defaultValue:void 0,inferredTypeForSource:void 0,resolvedJSDoc:void 0})}else if(c.declaration.type==="VariableDeclaration"){let b=c.declaration,v=fo(b.kind),C=h?b.declarations.slice(0,1):b.declarations;for(let S of C){if(!S||typeof S!=="object"||!("id"in S))continue;let{id:k,init:_}=S;if(!k||typeof k!=="object"||!("name"in k))continue;let D=k.name,H=u??D,q=_==null?{isFunction:!1}:at(this,this.ctx,_),{value:G,type:re,isFunction:V,defaultValue:Y}=q,le=q;if(le.pendingCallDefault)this.ctx.pendingCallDefaultCandidates.push({propName:D,location:"moduleExports",...le.pendingCallDefault});g.push({prop_name:H,kind:v,isFunctionDeclaration:!1,value:G,typeSeed:re,explicitType:this.getExplicitPropType(D),initializerIsFunction:V,defaultValue:Y,inferredTypeForSource:re,resolvedJSDoc:le})}if(g.length===0)return}else return;let T=ct(this.ctx,this,c);for(let{prop_name:b,kind:v,isFunctionDeclaration:C,value:S,typeSeed:k,explicitType:_,initializerIsFunction:D,defaultValue:H,inferredTypeForSource:q,resolvedJSDoc:G}of g){let{type:re,typeSource:V,description:Y,params:le,returnType:ee,isFunction:Q}=qt({explicitType:_,typeSeed:k,inferredTypeForSource:q,jsdocType:T?.type,jsdocDescription:T?.description,jsdocParams:T?.params,jsdocReturnType:T?.returnType,resolvedType:G?.resolvedType,resolvedDescription:G?.resolvedDescription,resolvedParams:G?.resolvedParams,resolvedReturnType:G?.resolvedReturnType,initializerIsFunction:D,isFunctionDeclaration:C,typedefs:this.ctx.typedefs});this.addModuleExport(b,{name:b,kind:v,description:Y,deprecated:T?.deprecated,tags:T?.tags,...T?.internal?{internal:!0}:{},type:re,typeSource:V,value:S,defaultValue:H,params:le,returnType:ee,isFunction:Q,isFunctionDeclaration:C,isRequired:!1,constant:v==="const",reactive:!1,source:ie(this.ctx,c)})}}});let l,p,m,d=new Set,y=new Set,x=[];ps(this,this.ctx),this.ctx.activeScopes.push(this.ctx.componentScope);let E=us(this.ctx);if(Gt(s,(c,u,h)=>{let g=ds(this,this.ctx,E,c);if(g)this.ctx.activeScopes.push(g);let T=c.type;if(!id.has(T))return;if(c.type==="AssignmentExpression")pr(this.ctx,c.left);if(c.type==="UpdateExpression")pr(this.ctx,c.argument);if(c.type==="CallExpression"){let b=c,v=b.callee&&typeof b.callee==="object"&&"name"in b.callee?b.callee.name:void 0;if(v==="createEventDispatcher"){if(u&&typeof u==="object"&&"id"in u&&u.id&&typeof u.id==="object"&&"name"in u.id)l=u.id.name,p=u;m=b.typeArguments?.params?.[0]}if(v==="$host"){if(u&&typeof u==="object"&&"id"in u&&u.id&&typeof u.id==="object"&&"name"in u.id)d.add(u.id.name)}if(v==="setContext")Bi(this.ctx,this,c,u??void 0);if(v)x.push({name:v,arguments:b.arguments,node:b});if(gi(b.callee)&&Ae(b.callee.property)&&b.callee.property.name==="dispatchEvent"&&(Ge(b.callee.object,"$host")||Ae(b.callee.object)&&d.has(b.callee.object.name))){let C=Hi(this.ctx,b);if(C)y.add(C)}}if(T==="SpreadAttribute"){let b=c;if(b.expression?.name==="$$restProps"||this.ctx.restPropLocals.has(b.expression?.name??""))cs(this.ctx,u)}if(c.type==="FunctionDeclaration"){let b=c;if(b.id?.name)this.ctx.funcDecls.set(b.id.name,b)}if(c.type==="ImportDeclaration")bn(this.ctx,c);if(c.type==="VariableDeclaration"){if(this.ctx.vars.add(c),u&&typeof u==="object"&&"type"in u&&u.type==="Program"&&c.declarations.some((b)=>Ge(it(b.init),"$props")))bs(this,this.ctx,c)}if(c.type==="ExportNamedDeclaration"){if(c.declaration==null&&c.specifiers.length===0)return;let b,v=!1;if(c.declaration==null&&c.specifiers[0]?.type==="ExportSpecifier"){let k=c.specifiers[0],_=k.local&&typeof k.local==="object"&&"name"in k.local?k.local.name:void 0,D=k.exported&&typeof k.exported==="object"&&"name"in k.exported?k.exported.name:void 0;if(!_||!D)return;let H;for(let q of Array.from(this.ctx.vars))if(q.declarations.some((G)=>G.id&&typeof G.id==="object"&&("type"in G.id)&&G.id.type==="Identifier"&&G.id.name===_)){H=q;break}if(c.declaration=H,b=D,v=!0,!H){let q="source"in c&&c.source&&typeof c.source==="object"&&"value"in c.source?c.source.value:void 0,G=typeof q==="string"?`it re-exports from "${q}"`:this.ctx.valueImportBindingsByLocalName.has(_)?"it re-exports an imported binding":"no matching local declaration was found";ae(this.ctx,"export-unresolved",D,`export "${D}" was skipped because ${G}; sveld only resolves exports of a local declaration.`,ie(this.ctx,c));return}}if(c.declaration==null)return;if(!c.declaration||typeof c.declaration!=="object"||!("type"in c.declaration))return;let C=[];if(c.declaration.type==="FunctionDeclaration"){let k=c.declaration;if(!k.id?.name)return;b??=k.id.name;let _=this.ctx.scriptLanguage==="ts"?nr(this.ctx,k):void 0;C.push({prop_name:b,kind:"function",isFunctionDeclaration:!0,value:void 0,typeSeed:_?.hasAnnotations?void 0:"() => any",explicitType:_?.hasAnnotations?_.signature:void 0,initializerIsFunction:!0,isRequired:!1,localName:k.id.name,defaultValue:void 0,inferredTypeForSource:void 0,resolvedJSDoc:void 0})}else if(c.declaration.type==="VariableDeclaration"){let k=c.declaration,_=fo(k.kind),D=v?k.declarations.slice(0,1):k.declarations;for(let H of D){if(!H||typeof H!=="object"||!("id"in H))continue;let{id:q,init:G}=H;if(!q||typeof q!=="object"||!("name"in q))continue;let re=q.name,V=b??re,Y=_==="let"&&G==null,le=G==null?{isFunction:!1}:at(this,this.ctx,G),{value:ee,type:Q,isFunction:ft,defaultValue:He}=le,Ue=le;if(Ue.pendingCallDefault)this.ctx.pendingCallDefaultCandidates.push({propName:V,location:"props",...Ue.pendingCallDefault});C.push({prop_name:V,kind:_,isFunctionDeclaration:!1,value:ee,typeSeed:Q,explicitType:this.getExplicitPropType(re),initializerIsFunction:ft,isRequired:Y,localName:re,defaultValue:He,inferredTypeForSource:Q,resolvedJSDoc:Ue})}if(C.length===0)return}else return;let S=ct(this.ctx,this,c);for(let{prop_name:k,kind:_,isFunctionDeclaration:D,value:H,typeSeed:q,explicitType:G,initializerIsFunction:re,isRequired:V,localName:Y,defaultValue:le,inferredTypeForSource:ee,resolvedJSDoc:Q}of C){let{type:ft,typeSource:He,description:Ue,params:ln,returnType:Ot,isFunction:Un}=qt({explicitType:G,typeSeed:q,inferredTypeForSource:ee,jsdocType:S?.type,jsdocDescription:S?.description,jsdocParams:S?.params,jsdocReturnType:S?.returnType,resolvedType:Q?.resolvedType,resolvedDescription:Q?.resolvedDescription,resolvedParams:Q?.resolvedParams,resolvedReturnType:Q?.resolvedReturnType,initializerIsFunction:re,isFunctionDeclaration:D,typedefs:this.ctx.typedefs});st(this.ctx,"prop-unknown-type",k,S?.sveldIgnore),Ft(this,this.ctx,k,{name:k,...Y!==void 0&&Y!==k?{localName:Y}:{},kind:_,description:Ue,binding:S?.binding,deprecated:S?.deprecated,tags:S?.tags,...S?.internal?{internal:!0}:{},type:ft,typeSource:He,value:H,defaultValue:le,params:ln,returnType:Ot,isFunction:Un,isFunctionDeclaration:D,isRequired:V,constant:_==="const",reactive:this.ctx.reactive_vars.has(k),source:ie(this.ctx,c)})}}if(T==="Comment"){let v=c?.data?.trim()??"";if(mo.test(v))this.ctx.componentComment=v.replace(mo,"").replace(nd,""),this.ctx.componentCommentSource=ie(this.ctx,c)}if(T==="SlotElement"){let b=c,v=b.attributes?.find((_)=>_.name==="name")?.value,C=(Array.isArray(v)?v[0]:void 0)?.data,S=(b.attributes||[]).filter((_)=>_.name!=="name").reduce((_,D)=>{let H={value:void 0,replace:!1},q=D.value;if(q===void 0||q===!0)return _;let G=Array.isArray(q)?q[0]:q;if(G){let{type:re,expression:V,raw:Y,start:le,end:ee}=G;if(re==="Text"&&Y!==void 0)H.value=JSON.stringify(Y);else if(!Array.isArray(q)&&re==="ExpressionTag"&&V&&typeof V==="object"&&"type"in V&&V.type==="Identifier"&&"name"in V&&V.name===D.name)H.value=V.name,H.replace=!0;if(V&&typeof V==="object"&&"type"in V){if(V.type==="Literal"&&"value"in V){let Q=V.value;H.value=typeof Q==="string"?JSON.stringify(Q):String(Q)}else if(V.type==="MemberExpression")H.value=un(this.ctx,this,V);else if(V.type!=="Identifier"){if(le!==void 0&&ee!==void 0){if(V.type==="ObjectExpression"||V.type==="TemplateLiteral")H.value=se(this.ctx,le+1,ee-1)}}}}if(D.name)_[D.name]=H;return _},{}),k=b.fragment?.nodes?.map(({start:_,end:D})=>{if(_===void 0||D===void 0)return"";return se(this.ctx,_,D)??""}).join("").trim();Ht(this.ctx,{slot_name:C,slot_props:S,slot_fallback:k,source:ie(this.ctx,c)})}if(T==="RenderTag"){let b=c,v=ts(this.ctx,b.expression);if(v){let C,S=!1;if(v.arguments.length===0)C={};else if(v.arguments.length===1&&typeof v.arguments[0]==="object"&&v.arguments[0]&&"type"in v.arguments[0]&&v.arguments[0].type==="ObjectExpression"){let D=sr(this.ctx,this,v.arguments[0]);C=D.slot_props,S=D.hasUnresolvedSpread}else if(v.arguments.length===1)ae(this.ctx,"syntax-skipped",v.publicName,`{@render ${v.publicName}(...)} argument is not a plain object literal; the render call was not mapped to slot metadata.`,ie(this.ctx,c));let k=v.publicName==="children"?void 0:v.publicName,_=k===void 0?td:k;if(C!==void 0)Ht(this.ctx,{slot_name:k,slot_props:C,slot_props_unresolved_spread:S||void 0,source:ie(this.ctx,c)});if(C!==void 0||this.ctx.slots.has(_))this.ctx.snippetPropLocals.add(v.trackingName)}}if(T==="OnDirective"){let b=c;if(b.expression==null&&b.name){if(u!=null&&typeof u==="object"&&"name"in u){let v=typeof u.name==="string"?u.name:void 0,C="type"in u?String(u.type):void 0;if(v&&C){let S=jt(C)?{type:"InlineComponent",name:v}:{type:"Element",name:v};this.ctx.forwardedEvents.set(b.name,S);let k=this.ctx.events.get(b.name),_=this.ctx.eventDescriptions.get(b.name),D=k?.deprecated,H=k?.internal;if(!k)this.ctx.events.set(b.name,{type:"forwarded",name:b.name,element:S,description:_,deprecated:D,...H?{internal:!0}:{},source:ie(this.ctx,c)});else if(k.type==="forwarded"&&_&&!k.description)this.ctx.events.set(b.name,{...k,description:_,deprecated:k.deprecated??D,...k.internal||H?{internal:!0}:{},source:k.source||ie(this.ctx,c)})}}}}if(T==="BindDirective"&&u&&typeof u==="object"&&"type"in u&&($t(String(u.type))||jt(String(u.type)))){let b=c;if(b.expression?.name){let v=Ut(this.ctx,b.expression.name);if(v)this.ctx.reactive_vars.add(v)}if($t(String(u.type))&&b.name==="this"&&b.expression?.name&&"name"in u&&typeof u.name==="string"){let v=Ut(this.ctx,b.expression.name);if(!v)return;let C=u.name;if(this.ctx.bindings.has(v)){let S=this.ctx.bindings.get(v);if(S&&!S.elements.includes(C))this.ctx.bindings.set(v,{...S,elements:[...S.elements,C]})}else this.ctx.bindings.set(v,{elements:[C]})}}},(c)=>{if(Ct(c))this.ctx.activeScopes.pop(),hs(E,c)}),l!==void 0){Ts(this,this.ctx,m,l,ie(this.ctx,p));for(let c of x)if(c.name===l){let u=c.arguments[0],h=u&&typeof u==="object"&&"value"in u?u.value:void 0,g=c.arguments[1],T=Fi(this,g),b=T===void 0&&g&&typeof g==="object"&&"value"in g?g.value:void 0;if(h!=null)ot(this.ctx,{name:String(h),detail:T??(b==null?"":er(b)),has_argument:Boolean(g),source:ie(this.ctx,c.node)})}}let P=new Set(y);if(l!==void 0){for(let c of x)if(c.name===l){let u=c.arguments[0],h=u&&typeof u==="object"&&"value"in u?u.value:void 0;if(h!=null)P.add(String(h))}}this.ctx.forwardedEvents.forEach((c,u)=>{let h=this.ctx.events.get(u);if(h&&h.type==="dispatched"&&!P.has(u)){let g=this.ctx.eventDescriptions.get(u),T={type:"forwarded",name:u,element:c,description:g,deprecated:h.deprecated,tags:h.tags,source:h.source};if(h.internal)T.internal=!0;if(h.detail!==void 0&&h.detail!=="undefined")T.detail=h.detail;this.ctx.events.set(u,T)}}),Es(this.ctx,P);let w=this.ctx.syntaxMode==="runes"?new Set(Array.from(this.ctx.snippetPropLocals,(c)=>this.resolvePublicPropName(c))):new Set,A=fe.mapToArray(this.ctx.props).filter((c)=>!w.has(c.name)).map((c)=>{if(this.ctx.bindings.has(c.name)){let u=this.ctx.bindings.get(c.name)?.elements.sort().map((h)=>Ei(h)).join(" | ");return{...c,type:`null | ${u}`,typeSource:"inferred",reactive:c.reactive||this.ctx.reactive_vars.has(c.name)}}return{...c,reactive:c.reactive||this.ctx.reactive_vars.has(c.name)}});this.ctx.activeScopes.length=0;let O=fe.mapToArray(this.ctx.slots).map((c)=>{let{slot_props_unresolved_spread:u,...h}=c;if(!c.slot_props)return h;if(typeof c.slot_props==="string")return rd.test(c.slot_props)?{...h,slot_props:"Record<string, never>"}:h;let g=c.slot_props,T=[];for(let C of Object.keys(g)){if(g[C].replace&&g[C].value!==void 0)g[C].value=this.getPropTypeByLocalOrPublic(g[C].value);if(g[C].value===void 0)g[C].value="any";T.push(`${C}: ${g[C].value}`)}let b=u?" & Record<string, any>":"",v=T.length===0?u?"Record<string, any>":"Record<string, never>":T.length===1?`{ ${T[0]} }${b}`:`{
|
|
33
|
+
${T.join(`;
|
|
34
34
|
`)};
|
|
35
|
-
}${b}`;return{...h,slot_props:
|
|
36
|
-
`);for(let{name:u,constraint:h}of this.ctx.deferredSlotBlockGenerics){let
|
|
37
|
-
`)){let w=
|
|
38
|
-
`);if(
|
|
39
|
-
`);s=d;continue}if(
|
|
40
|
-
`);i.push("}"),s=
|
|
41
|
-
`);s=
|
|
42
|
-
`),n=[],r=0,i=!1,o=0;for(let s=0;s<t.length;s++){let
|
|
43
|
-
`)}function
|
|
44
|
-
`}var
|
|
35
|
+
}${b}`;return{...h,slot_props:v}}).sort((c,u)=>{let h=c.name??"",g=u.name??"";if(h<g)return-1;if(h>g)return 1;return 0});if(this.ctx.deferredSlotBlockGenerics.length>0){let c=[...A.map((u)=>u.type??""),...O.map((u)=>u.slot_props??"")].join(`
|
|
36
|
+
`);for(let{name:u,constraint:h}of this.ctx.deferredSlotBlockGenerics){let g=u.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");if(!new RegExp(`\\b${g}\\b`).test(c))continue;this.accumulateGeneric(u,h)}}if(this.ctx.scriptGenericsAttribute){if(this.ctx.generics)ae(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=Ji(this.ctx.scriptGenericsAttribute.value)}let j=fe.mapToArray(this.ctx.moduleExports),N=fe.mapToArray(this.ctx.events).map((c)=>{switch(c.type){case"forwarded":return{...c,element:c.element.name};case"dispatched":return c;default:return c}}).sort((c,u)=>{let h=c.name.localeCompare(u.name);if(h!==0)return h;let g=c.type.localeCompare(u.type);if(g!==0)return g;if(c.type==="forwarded"&&u.type==="forwarded"){let T=c.element.localeCompare(u.element);if(T!==0)return T}return(c.detail??"").localeCompare(u.detail??"")}),X=fe.mapToArray(this.ctx.typedefs),I=fe.mapToArray(this.ctx.contexts),ce={props:new Map(this.ctx.pendingCallDefaultCandidates.filter((c)=>c.location==="props").map((c)=>[c.propName,c])),moduleExports:new Map(this.ctx.pendingCallDefaultCandidates.filter((c)=>c.location==="moduleExports").map((c)=>[c.propName,c]))};for(let c of A)if(c.typeSource==="unknown"){let u=ce.props.get(c.name);if(u)c.type="any";let h=u?u.importSource?`Prop "${c.name}" default calls "${u.calleeName}()" imported from "${u.importSource}"; falling back to "any" pending cross-file resolution.`:`Prop "${c.name}" default calls "${u.calleeName}()", but its return type could not be inferred; falling back to "any".`:`Prop "${c.name}" type could not be inferred; falling back to "${c.type??"any"}".`;ae(this.ctx,"prop-unknown-type",c.name,h,c.source)}for(let c of j)if(c.typeSource==="unknown"&&ce.moduleExports.has(c.name))c.type="any";for(let c of this.ctx.jsDocEventNames){if(P.has(c))continue;if(this.ctx.forwardedEvents.has(c))continue;if(this.ctx.props.has(`on${c}`))continue;ae(this.ctx,"event-no-source",c,`@event "${c}" has no matching dispatch or callback prop.`,this.ctx.jsDocEventSources.get(c))}if(this.ctx.rest_props?.type==="InlineComponent")ae(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 ge=X.filter((c)=>c.internal).map((c)=>c.name.split("<")[0]);if(ge.length>0){let c=ge.map((h)=>({name:h,regex:new RegExp(`\\b${h}\\b`)})),u=(h,g,T)=>{if(!g)return;for(let{name:b,regex:v}of c){if(!v.test(g))continue;ae(this.ctx,"internal-typedef-referenced",h,`"${h}" references "${b}", which is @internal and excluded from output; the generated .d.ts will contain a dangling reference to it.`,T)}};for(let h of A){if(h.internal)continue;u(h.name,h.type,h.source)}for(let h of j){if(h.internal)continue;u(h.name,h.type,h.source)}for(let h of X){if(h.internal)continue;u(h.name,h.ts)}for(let h of N){if(h.internal||h.type!=="dispatched")continue;u(h.name,h.detail,h.source)}for(let h of O){if(h.internal)continue;u(h.name??"default",h.slot_props,h.source)}for(let h of I){if(h.internal)continue;for(let g of h.properties)u(g.name,g.type)}}let xe={source:fn(this.ctx,0,this.ctx.source?.length),syntaxMode:this.ctx.syntaxMode,...this.ctx.scriptLanguage?{scriptLanguage:this.ctx.scriptLanguage}:{},props:A,moduleExports:j,slots:O,events:N,typedefs:X,generics:this.ctx.generics,rest_props:this.ctx.rest_props,extends:this.ctx.extends,componentComment:this.ctx.componentComment,componentCommentSource:this.ctx.componentCommentSource,contexts:I,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()},a=zi(this.ctx);if(a)xe[pn]=a;return xe}}var go="sveld",xo="0.37.1";var Xr="5.57.0";var To=1,bo=new WeakMap;function ht(e){return e.some((t)=>t.internal)?e.filter((t)=>!t.internal):e}function ad(e){return{...e,props:ht(e.props),moduleExports:ht(e.moduleExports),slots:ht(e.slots),events:ht(e.events),typedefs:ht(e.typedefs),...e.contexts?{contexts:ht(e.contexts).map((t)=>({...t,properties:ht(t.properties)}))}:{}}}function rn(e,t={}){let n=bo.get(e),r=n?.get(t.entryExports);if(r)return r;let i=Array.from(e,([,l])=>{let{diagnostics:p,...m}=l;return ad(m)}).sort((l,p)=>l.moduleName.localeCompare(p.moduleName)),o={schemaVersion:To,generator:{name:go,version:xo,svelteVersion:Xr},total:i.length,components:i},s=t.entryExports?ht(t.entryExports):void 0;if(s&&s.length>0)o.totalExports=s.length,o.exports=s;if(!n)n=new Map,bo.set(e,n);return n.set(t.entryExports,o),o}var od=/\binterface\s+[A-Za-z_$][\w$]*(\s*<[^{};]*>)?\s*$/;var cd=/[ \t]+$/,So=/\s/,ld=/\s{2}|[^\S ]/;function pd(e){return od.test(e.slice(-200))}var Eo=[""];function Jr(e){let t=Eo[e];if(t===void 0)t=" ".repeat(e),Eo[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 dd(e){if(e.length===0)return!1;let t=e[e.length-1];return t.charCodeAt(t.length-1)===10}function hd(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 fd(e){while(e.length>0){let t=e[e.length-1];if(!So.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 md(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 yd(e){if(!ld.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(So.test(o)){if(!r&&t.length>0)t+=" ",r=!0;continue}t+=o,r=!1}return t.trimEnd()}function gd(e){let t=new Int32Array(e.length).fill(-1),n=[],r=0;for(let i=0;i<e.length;i++){let o=e.charCodeAt(i);if(r===4){if(o===47&&e.charCodeAt(i-1)===42)r=0;continue}if(r===1){if(o===34&&e.charCodeAt(i-1)!==92)r=0;continue}if(r===2){if(o===39&&e.charCodeAt(i-1)!==92)r=0;continue}if(r===3){if(o===96&&e.charCodeAt(i-1)!==92)r=0;continue}if(o===47){if(e.charCodeAt(i+1)===42)r=4}else if(o===34)r=1;else if(o===39)r=2;else if(o===96)r=3;else if(o===123)n.push(i);else if(o===125&&n.length>0)t[n.pop()]=i}return t}function vo(e,t,n,r){let i=[],o=0,s=t;for(let l=t;l<n;l++){let p=e.charCodeAt(l);if(o===4){if(p===47&&e.charCodeAt(l-1)===42)o=0;continue}if(o===1){if(p===34&&e.charCodeAt(l-1)!==92)o=0;continue}if(o===2){if(p===39&&e.charCodeAt(l-1)!==92)o=0;continue}if(o===3){if(p===96&&e.charCodeAt(l-1)!==92)o=0;continue}if(p===47){if(e.charCodeAt(l+1)===42)o=4;continue}if(p===34){o=1;continue}if(p===39){o=2;continue}if(p===96){o=3;continue}if(p===123){let m=r[l];if(m===-1||m>=n)continue;if(s<l)i.push(e.slice(s,l));let d=l+1,y=e.slice(d,m);if(y.trim()===""){i.push("{}"),l=m,s=m+1;continue}let x=e.charCodeAt(d)===10;if(!x&&!y.includes("/*")&&!md(y)&&!pd(ud(i,200))){let E=vo(e,d,m,r),P=E.trim();if(!P.includes(`
|
|
37
|
+
`)){let w=P.endsWith(";")?P.slice(0,-1):P,A=`{ ${yd(w)} }`;if(A.length<=120){i.push(A),l=m,s=m+1;continue}}if(i.push("{"),E.charCodeAt(0)!==59)i.push(`
|
|
38
|
+
`);if(E.length>0)i.push(E);l=m-1,s=m;continue}if(i.push("{"),!x)i.push(`
|
|
39
|
+
`);s=d;continue}if(p===125){if(s<l)i.push(e.slice(s,l));if(hd(i),!dd(i))i.push(`
|
|
40
|
+
`);i.push("}"),s=l+1;continue}if(p===59){if(s<l)i.push(e.slice(s,l));if(fd(i),i.push(";"),e.charCodeAt(l+1)!==10)i.push(`
|
|
41
|
+
`);s=l+1}}if(s<n)i.push(e.slice(s,n));return i.join("")}function xd(e){return vo(e,0,e.length,gd(e))}function bd(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 Co(e){let t=e.charCodeAt(0);return t===125||t===93||t===41||t===62}function Td(e){let t=e.split(`
|
|
42
|
+
`),n=[],r=0,i=!1,o=0;for(let s=0;s<t.length;s++){let l=t[s].trim();if(l===""){n.push("");continue}if(i){if(n.push(`${Jr(o)} ${l}`),l.includes("*/"))i=!1;continue}if(l.startsWith("/**")&&!l.includes("*/")){n.push(Jr(r)+l),i=!0,o=r;continue}let p=bd(l),m=Math.max(0,r-(Co(p)?1:0));if(n.push(Jr(m)+p),p.startsWith("/**")&&p.includes("*/"))continue;let d=0;for(let y=0;y<p.length;y++){let x=p.charCodeAt(y);if(d!==0){if(x===d&&p.charCodeAt(y-1)!==92)d=0;continue}if(x===34||x===39||x===96)d=x;else if(x===123||x===40||x===91||x===60)r++;else if(x===125||x===41||x===93)r=Math.max(0,r-1);else if(x===62&&p.charCodeAt(y-1)!==61)r=Math.max(0,r-1)}}return n}function Ed(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n],i=r.charCodeAt(r.length-1);if(i===32||i===9)r=r.replace(cd,"");let o=t.length>0?t[t.length-1]:void 0,s=o==="";if(r===""){if(o===void 0||s)continue;let l=o.charCodeAt(o.length-1);if(l===123||l===40||l===91)continue;t.push(r);continue}if(s&&Co(r))t.pop();t.push(r)}while(t.length>0&&t[t.length-1]==="")t.pop();return t.join(`
|
|
43
|
+
`)}function Ao(e){return`${Ed(Td(xd(e)))}
|
|
44
|
+
`}var et="any",$e="",Sd="Record<string, any>",Qr="Record<string, never>",vd=/^[A-Za-z_$][A-Za-z0-9_$]*$/,Cd=/CustomEvent/,Ad=/^[A-Z]/,Pd=/\n/,_o=/=>/,kd=/(?:^|\n)@default\b/,Zr=/\n/g,wd=/\s+/g,Dt=/(^|[^.\w])Snippet(?:\s*<|\b)/,_d=/import\s+type\s+[^;]*\bSnippet\b[^;]*from\s+"svelte";/,Nd=/[.*+?^${}()|[\]\\]/g,Id=/^const\s+/;function ei(e){return e.replace(Id,"")}function Dd(e){if(!e)return;return e.replace(Zr,`
|
|
45
45
|
* `)}function Vn(e){if(!e)return"";return`/** ${e} */`}function jn(e){if(!e)return"";return`/**
|
|
46
|
-
* ${e.replace(
|
|
46
|
+
* ${e.replace(Zr,`
|
|
47
47
|
* `)}
|
|
48
|
-
*/`}function
|
|
48
|
+
*/`}function No(e){if(e===void 0)return;return e===!0?"@deprecated":`@deprecated ${e}`}function Ld(e){let t=No(e);if(t===void 0)return;return`* ${t.replace(Zr,`
|
|
49
49
|
* `)}
|
|
50
|
-
`}function
|
|
50
|
+
`}function Rd(e,t){if(!t)return[`@${e}`];if(!t.includes(`
|
|
51
51
|
`))return[`@${e} ${t}`];return[`@${e}`,...t.split(`
|
|
52
|
-
`)]}function
|
|
52
|
+
`)]}function ti(e){let t=[];for(let{name:n,body:r}of e??[])t.push(...Rd(n,r));return t}function sn(e,t,n){let r=No(n),i=ti(t),o=i.length>0;if(!e&&!o&&!r)return"";if(!o&&!r)return e?.includes(`
|
|
53
53
|
`)?jn(e):Vn(e);let s=[];if(e)s.push(...e.split(`
|
|
54
54
|
`));if(s.push(...i),r)s.push(...r.split(`
|
|
55
55
|
`));return`/**
|
|
56
56
|
* ${s.join(`
|
|
57
57
|
* `)}
|
|
58
|
-
*/`}function
|
|
59
|
-
`).join("")}function $n(e){if(e===void 0)return
|
|
60
|
-
`}function Hn(e){if(e.typedefs.length===0)return $e;return e.typedefs.map((t)=>{let n=
|
|
58
|
+
*/`}function Md(e){let t=ti(e);if(t.length===0)return"";return t.map((n)=>`* ${n}
|
|
59
|
+
`).join("")}function $n(e){if(e===void 0)return et;return`${e}
|
|
60
|
+
`}function Hn(e){if(e.typedefs.length===0)return $e;return e.typedefs.map((t)=>{let n=ti(t.tags),r;if(n.length===0)r=t.description?`${jn(t.description)}
|
|
61
61
|
`:"";else r=`/**
|
|
62
62
|
* ${(t.description?[...t.description.split(`
|
|
63
63
|
`),...n]:n).join(`
|
|
@@ -65,93 +65,93 @@ Defaulting to 2020, but this will stop working in the future.`);t.ecmaVersion=11
|
|
|
65
65
|
*/
|
|
66
66
|
`;return`${r}export ${t.ts}`}).join(`
|
|
67
67
|
|
|
68
|
-
`)}var
|
|
69
|
-
`:"",d=
|
|
68
|
+
`)}var Po=new Map;function Io(e,t){let n=Po.get(t);if(n===void 0){let r=t.replace(Nd,"\\$&");n=new RegExp(`\\b${r}\\b`),Po.set(t,n)}return n.test(e)}var ko,wo=[];function ni(e){if(e!==ko)ko=e,wo=We(e);return wo}function Od(e){if(e===null)return[];return e[0].split(",").map((t,n)=>({name:t.trim(),constraint:(ni(e[1]??"")[n]??t).trim()}))}function Bd(e,t){let n=Od(e).filter(({name:r})=>Io(t,r));if(n.length===0)return{declSuffix:$e,refSuffix:$e};return{declSuffix:`<${n.map(({constraint:r})=>ei(r)).join(", ")}>`,refSuffix:`<${n.map(({name:r})=>r).join(", ")}>`}}function Do(e){if(!e.contexts||e.contexts.length===0)return $e;let t=e.generics===null?[]:e.generics[0].split(",").map((n,r)=>({name:n.trim(),constraint:(ni(e.generics?.[1]??"")[r]??n).trim()}));return e.contexts.map((n)=>{let r=n.properties.map((p)=>{let m=p.description?`${Vn(p.description)}
|
|
69
|
+
`:"",d=p.optional?"?":"";return`${m}${p.name}${d}: ${p.type};`}).join(`
|
|
70
70
|
`),i=n.description?`${jn(n.description)}
|
|
71
|
-
`:"",o=t.filter(({name:
|
|
71
|
+
`:"",o=t.filter(({name:p})=>n.properties.some((m)=>Io(m.type,p))).map(({constraint:p})=>p),s=o.length>0?`<${o.map(ei).join(", ")}>`:"";if(n.properties.length===0)return n.hasUnresolvedSpread?`${i}export type ${n.typeName} = Record<string, any>;`:`${i}export type ${n.typeName} = Record<string, never>;`;let l=n.hasUnresolvedSpread?" & Record<string, any>":"";return`${i}export type ${n.typeName}${s} = {
|
|
72
72
|
${r}
|
|
73
|
-
}${
|
|
73
|
+
}${l};`}).join(`
|
|
74
74
|
|
|
75
|
-
`)}function
|
|
76
|
-
`}function
|
|
77
|
-
${e}*/`:$e}function
|
|
78
|
-
`].filter(Boolean).join(""),
|
|
79
|
-
${
|
|
80
|
-
${
|
|
81
|
-
`:"",
|
|
82
|
-
${
|
|
83
|
-
`:"",
|
|
84
|
-
${
|
|
85
|
-
`),
|
|
86
|
-
type $Props${
|
|
75
|
+
`)}function Lt(e){return vd.test(e)?e:JSON.stringify(e)}function Lo(e,t){if(!e)return;return`* ${t||e}
|
|
76
|
+
`}function ri(e,t,n){return[Lo(Dd(e)),Ld(t),Md(n)].filter(Boolean).join("")}function ii(e){return e.length>0?`/**
|
|
77
|
+
${e}*/`:$e}function Fd(e){let t=e.props.filter((A)=>!A.isFunctionDeclaration&&A.kind!=="const"),n=new Set([...t.map((A)=>A.name),...Array.from(e.canonicalPropNames??[])]),r=t.map((A)=>{let O=typeof A.value==="string"?A.value.replace(wd," "):A.value,N=kd.test(A.description??"")||A.value===void 0,X=[ri(A.description,A.deprecated,A.tags),Lo(A.constant,"@constant"),N?null:`* @default ${O}
|
|
78
|
+
`].filter(Boolean).join(""),I=A.constant&&!A.isFunction?A.value:A.type||et;return`
|
|
79
|
+
${ii(X)}
|
|
80
|
+
${Lt(A.name)}${A.isRequired?"":"?"}: ${I};`}),i=e.canonicalPropsType?r.filter((A,O)=>{let j=t[O];return j?!(e.canonicalPropNames?.has(j.name)??!1):!0}):r,o=(e.slots||[]).filter((A)=>!A.default&&A.name!=null&&!n.has(A.name)).map((A)=>{let O=A.name,j=Lt(O),N=sn(A.description,A.tags,A.deprecated),X=N?`${N}
|
|
81
|
+
`:"",ce=A.slot_props&&A.slot_props!=="Record<string, never>"?`(this: void, ...args: [${A.slot_props}]) => void`:"(this: void) => void";return`
|
|
82
|
+
${X}${j}?: ${ce};`}),s=(e.slots||[]).find((A)=>A.default||A.name===null),l=s&&!n.has("children")?(()=>{let A=sn(s.description,s.tags,s.deprecated),O=A?`${A}
|
|
83
|
+
`:"",N=s.slot_props&&s.slot_props!=="Record<string, never>"?`(this: void, ...args: [${s.slot_props}]) => void`:"(this: void) => void";return`
|
|
84
|
+
${O}children?: ${N};`})():"",p=e.events?Ud({events:e.events},n):[],m=[...o,l,...p].filter(Boolean),d=[...i,...m].join(`
|
|
85
|
+
`),y=`${e.moduleName}Props`,x=$e,E=e.generics?`<${ni(e.generics[1]).map((A)=>ei(A.trim())).join(", ")}>`:"",P=e.generics?`<${e.generics[0]}>`:"",w=e.canonicalPropsType?`
|
|
86
|
+
type $Props${E} = ${e.canonicalPropsType}${d.trim()===""?"":` & {${d}
|
|
87
87
|
}`};
|
|
88
88
|
`:`
|
|
89
|
-
type $Props${
|
|
89
|
+
type $Props${E} = {
|
|
90
90
|
${d}
|
|
91
91
|
};
|
|
92
|
-
`;if(e.rest_props?.type==="Element"){let A;if(e.rest_props.name==="svelte:element")if(e.rest_props.thisValue)A=`SvelteHTMLElements["${e.rest_props.thisValue}"]`;else A="HTMLAttributes<HTMLElement>";else A=e.rest_props.name.split("|").map((
|
|
92
|
+
`;if(e.rest_props?.type==="Element"){let A;if(e.rest_props.name==="svelte:element")if(e.rest_props.thisValue)A=`SvelteHTMLElements["${e.rest_props.thisValue}"]`;else A="HTMLAttributes<HTMLElement>";else A=e.rest_props.name.split("|").map((N)=>`SvelteHTMLElements["${N.trim()}"]`).join(" & ");let O="[key: `data-${string}`]: unknown;",j=e.rest_props.description?e.rest_props.description.includes(`
|
|
93
93
|
`)?`${jn(e.rest_props.description)}
|
|
94
94
|
`:`${Vn(e.rest_props.description)}
|
|
95
|
-
`:"";if(e.extends===void 0)
|
|
96
|
-
${
|
|
95
|
+
`:"";if(e.extends===void 0)x=`
|
|
96
|
+
${j}${A?`type $RestProps = ${A};
|
|
97
97
|
`:""}
|
|
98
|
-
${e.canonicalPropsType?`type $Props${
|
|
98
|
+
${e.canonicalPropsType?`type $Props${E} = (${e.canonicalPropsType}) & {${d}
|
|
99
99
|
|
|
100
|
-
${
|
|
101
|
-
};`:`type $Props${
|
|
100
|
+
${O}
|
|
101
|
+
};`:`type $Props${E} = {
|
|
102
102
|
${d}
|
|
103
103
|
|
|
104
|
-
${
|
|
104
|
+
${O}
|
|
105
105
|
};`}
|
|
106
106
|
|
|
107
|
-
export type ${
|
|
108
|
-
`;else
|
|
109
|
-
${
|
|
107
|
+
export type ${y}${E} = Omit<$RestProps, keyof $Props${P}> & $Props${P};
|
|
108
|
+
`;else x=`
|
|
109
|
+
${j}${A?`type $RestProps = ${A};
|
|
110
110
|
`:""}
|
|
111
|
-
${e.canonicalPropsType?`type $Props${
|
|
111
|
+
${e.canonicalPropsType?`type $Props${E} = (${e.canonicalPropsType}) & {${d}
|
|
112
112
|
|
|
113
|
-
${
|
|
114
|
-
};`:`type $Props${
|
|
113
|
+
${O}
|
|
114
|
+
};`:`type $Props${E} = {
|
|
115
115
|
${d}
|
|
116
116
|
|
|
117
|
-
${
|
|
117
|
+
${O}
|
|
118
118
|
};`}
|
|
119
119
|
|
|
120
|
-
export type ${
|
|
121
|
-
`}else if(d.trim()===""&&e.extends===void 0&&!e.canonicalPropsType)
|
|
122
|
-
export type ${
|
|
123
|
-
`;else if(e.canonicalPropsType)
|
|
120
|
+
export type ${y}${E} = Omit<$RestProps, keyof ($Props${P} & ${e.extends.interface})> & Omit<${e.extends.interface}, keyof $Props${P}> & $Props${P};
|
|
121
|
+
`}else if(d.trim()===""&&e.extends===void 0&&!e.canonicalPropsType)x=`
|
|
122
|
+
export type ${y}${E} = ${Qr};
|
|
123
|
+
`;else if(e.canonicalPropsType)x=`
|
|
124
124
|
${w}
|
|
125
|
-
export type ${
|
|
126
|
-
`;else if(e.extends===void 0)
|
|
127
|
-
export type ${
|
|
125
|
+
export type ${y}${E} = ${e.extends===void 0?"":`Omit<${e.extends.interface}, keyof $Props${P}> & `}$Props${P};
|
|
126
|
+
`;else if(e.extends===void 0)x=`
|
|
127
|
+
export type ${y}${E} = {
|
|
128
128
|
${d}
|
|
129
129
|
};
|
|
130
|
-
`;else
|
|
131
|
-
type $Props${
|
|
130
|
+
`;else x=`
|
|
131
|
+
type $Props${E} = {
|
|
132
132
|
${d}
|
|
133
133
|
};
|
|
134
134
|
|
|
135
|
-
export type ${
|
|
136
|
-
`;return{props_name:
|
|
135
|
+
export type ${y}${E} = Omit<${e.extends.interface}, keyof $Props${P}> & $Props${P};
|
|
136
|
+
`;return{props_name:y,prop_def:x}}function Vd(e){if(e.slots.length===0)return Qr;let t=e.slots.map(({name:n,slot_props:r,...i})=>{let o=i.default||n===null?"default":Lt(n??""),s=sn(i.description,i.tags,i.deprecated);return`${s?`${s}
|
|
137
137
|
`:""}${o}: ${$n(r)};`}).join(`
|
|
138
138
|
`);return e.slots.length===1?`{${t}}`:`{
|
|
139
139
|
${t}
|
|
140
|
-
}`}var
|
|
141
|
-
`;return`${r}${
|
|
140
|
+
}`}var jd=()=>"WindowEventMap",$d=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 Yr(e=et){if(Cd.test(e))return e;return`CustomEvent<${e}>`}function Hd(e){return $d.has(e)}function Ro(e){switch(e.type){case"dispatched":return Yr(e.detail);case"forwarded":{let t=e.element,r=!(t&&Ad.test(t))||Hd(e.name),i=e.detail!==void 0&&e.detail!=="undefined"&&!(e.detail==="null"&&r),o=e.detail==="null"&&!r;if(i||o)return Yr(e.detail);else if(r)return`${jd()}["${e.name}"]`;else return Yr()}default:return e}}function qd(e){if(e.events.length===0)return Sd;let t=e.events.map((n)=>{let r="",i=sn(n.description,n.tags,n.deprecated);if(i)r=`${i}
|
|
141
|
+
`;return`${r}${Lt(n.name)}: ${Ro(n)};
|
|
142
142
|
`}).join("");return e.events.length===1?`{${t}}`:`{
|
|
143
|
-
${t}}`}function
|
|
143
|
+
${t}}`}function Ud(e,t){return e.events.map((n)=>{let r=`on${n.name}`;if(t.has(r))return;let i="",o=sn(n.description,n.tags,n.deprecated);if(o)i=`${o}
|
|
144
144
|
`;return`
|
|
145
|
-
${i}${
|
|
146
|
-
${
|
|
147
|
-
${
|
|
148
|
-
`)}function
|
|
149
|
-
};`}}function
|
|
145
|
+
${i}${Lt(r)}?: (event: ${Ro(n)}) => void;`}).filter((n)=>n!==void 0)}function Gd(e){let t=e.type==="() => any";if(e.type&&_o.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||et;return`(${r}) => ${i}`}else if(e.returnType)return`() => ${e.returnType}`;else return e.type||et}function Mo(e){return e.props.filter((t)=>t.isFunctionDeclaration||t.kind==="const").map((t)=>{let n=ri(t.description,t.deprecated,t.tags),r=Gd(t);return`
|
|
146
|
+
${ii(n)}
|
|
147
|
+
${Lt(t.name)}: ${r};`}).join(`
|
|
148
|
+
`)}function Wd(e){let t=`${e.moduleName}Exports`,n=Mo({props:e.props});if(n.trim()==="")return{exports_name:t,exports_ref:t,exports_def:`export type ${t} = ${Qr};`};let{declSuffix:r,refSuffix:i}=Bd(e.generics,n);return{exports_name:t,exports_ref:`${t}${i}`,exports_def:`export type ${t}${r} = {${n}
|
|
149
|
+
};`}}function Kd(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 zd(e){let t=e.moduleName==="default"?"$$Component":e.moduleName,n=e.bindings===$e?'""':e.bindings;return`declare const ${t}: Component<
|
|
150
150
|
${e.propsRef},
|
|
151
151
|
${e.exportsRef},
|
|
152
152
|
${n}
|
|
153
153
|
>;
|
|
154
|
-
export default ${t};`}function
|
|
154
|
+
export default ${t};`}function Xd(e){let t=e.moduleName==="default"?"$$Component":e.moduleName,n=`${t}Component`,r=e.bindings===$e?'""':e.bindings;return`interface ${n} {
|
|
155
155
|
new ${e.generic}(
|
|
156
156
|
options: ComponentConstructorOptions<${e.propsRef}>
|
|
157
157
|
): SvelteComponent<${e.propsRef}> & ${e.exportsRef};
|
|
@@ -167,60 +167,60 @@ ${t}}`}function Ld(e,t){return e.events.map((n)=>{let r=`on${n.name}`;if(t.has(r
|
|
|
167
167
|
z_$$bindings?: ${r};
|
|
168
168
|
}
|
|
169
169
|
declare const ${t}: ${n};
|
|
170
|
-
export default ${t};`}function
|
|
170
|
+
export default ${t};`}function Jd(e){if(e.extends===void 0)return"";return`import type { ${e.extends.interface} } from ${e.extends.import};`}function Yd(e){if(!e.componentComment)return"";if(!Pd.test(e.componentComment))return Vn(e.componentComment.trim());return`/*${e.componentComment.split(`
|
|
171
171
|
`).map((t)=>`* ${t}`).join(`
|
|
172
172
|
`)}
|
|
173
|
-
*/`}function
|
|
174
|
-
`;else if(t.params&&t.params.length>0){let
|
|
175
|
-
`;else r=`export type ${t.name} = ${t.type||
|
|
176
|
-
${
|
|
173
|
+
*/`}function Qd(e){return e.moduleExports.map((t)=>{let n=ri(t.description,t.deprecated,t.tags),r,i=t.type&&_o.test(t.type),o=t.type==="() => any";if(t.kind==="const"&&!i)r=`export declare const ${t.name}: ${t.type||et};
|
|
174
|
+
`;else if(t.params&&t.params.length>0){let l=t.params.map((m)=>{let d=m.optional?"?":"";return`${m.name}${d}: ${m.type}`}).join(", "),p=t.returnType||et;r=`export declare function ${t.name}(${l}): ${p};`}else if(t.returnType)r=`export declare function ${t.name}(): ${t.returnType};`;else if(i&&t.type&&!o){let[s,l,...p]=t.type.split("=>"),m=p.map((d)=>` => ${d.trim()}`).join("");r=`export declare function ${t.name}${s.trimEnd()}: ${l.trim()}${m};`}else if(i&&t.type){let[s,l,...p]=t.type.split("=>"),m=p.map((d)=>` => ${d.trim()}`).join("");r=`export declare function ${t.name}${s.trimEnd()}: ${l.trim()}${m};`}else if(t.kind==="const")r=`export declare const ${t.name}: ${t.type||et};
|
|
175
|
+
`;else r=`export type ${t.name} = ${t.type||et};`;return`
|
|
176
|
+
${ii(n)}
|
|
177
177
|
${r}`}).join(`
|
|
178
|
-
`)}var
|
|
179
|
-
`))){let i=`${n}${r.join(", ")}> {}`;if(i.length<=
|
|
178
|
+
`)}var Zd=120;function eh(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(`
|
|
179
|
+
`))){let i=`${n}${r.join(", ")}> {}`;if(i.length<=Zd)return i}return`${n}
|
|
180
180
|
${e.genericProps},
|
|
181
181
|
${e.events},
|
|
182
182
|
${e.slots}
|
|
183
183
|
> {
|
|
184
184
|
${e.accessors}
|
|
185
|
-
}`}function
|
|
185
|
+
}`}function th(e,t){let n=Kn(e),{moduleName:r,typedefs:i,generics:o,props:s,moduleExports:l,slots:p,events:m,rest_props:d,extends:y,componentComment:x,contexts:E,syntaxMode:P}=e,w=t?.format==="component",A=o!==null,{props_name:O,prop_def:j}=Fd({moduleName:r,props:s,rest_props:d,extends:y,generics:o,slots:p,canonicalPropNames:new Set(n?.canonicalPropNames??[]),canonicalPropsType:n?.canonicalPropsType,events:w&&P==="legacy"?m:void 0}),N=o?`<${o[1]}>`:"",X=o?`${O}<${o[0]}>`:O,I=Qd({moduleExports:l}),ce=Hn({typedefs:i}),ge=Do({contexts:E,generics:o}),xe=(n?.typeImportStatements??[]).join(`
|
|
186
186
|
`),a=(n?.localTypeDeclarations??[]).join(`
|
|
187
187
|
|
|
188
|
-
`),{exports_ref:c,exports_def:u}=w?
|
|
189
|
-
`),
|
|
188
|
+
`),{exports_ref:c,exports_def:u}=w?Wd({props:s,moduleName:r,generics:o}):{exports_ref:$e,exports_def:$e},h=w?Kd({props:s}):$e,g=!_d.test(xe)&&(Dt.test(j)||Dt.test(I)||Dt.test(ce)||Dt.test(ge)||Dt.test(a)||Dt.test(u)),T=d?.type==="Element"&&(d.name!=="svelte:element"||d.name==="svelte:element"&&d.thisValue),b=d?.type==="Element"&&d.name==="svelte:element"&&!d.thisValue,C=[w?A?`import type { SvelteComponent, ComponentConstructorOptions, ComponentInternals${g?", Snippet":""} } from "svelte";`:`import type { Component${g?", Snippet":""} } from "svelte";`:`import { SvelteComponentTyped${g?", type Snippet":""} } from "svelte";`,T?'import type { SvelteHTMLElements } from "svelte/elements";':"",b?'import type { HTMLAttributes } from "svelte/elements";':"",xe,Jd({extends:y})].filter(Boolean).join(`
|
|
189
|
+
`),S=w?A?Xd({moduleName:r,generic:N,propsRef:X,exportsRef:c,bindings:h}):zd({moduleName:r,propsRef:X,exportsRef:c,bindings:h}):eh({moduleName:r,generic:N,genericProps:X,events:qd({events:m}),slots:Vd({slots:p}),accessors:Mo({props:s})}),k=[I,ce,a,ge,j,u,[Yd({componentComment:x}),S].filter(Boolean).join(`
|
|
190
190
|
`)].map((_)=>_.trim()).filter(Boolean).join(`
|
|
191
191
|
|
|
192
|
-
`);return
|
|
192
|
+
`);return Ao([C,k].filter(Boolean).join(`
|
|
193
193
|
|
|
194
|
-
`))}var
|
|
194
|
+
`))}var ai=/`/g,Oo=/\s+/g,qe="--",Bo=`| Prop name | Required | Kind | Reactive | Binding | Type | Default value | Description |
|
|
195
195
|
| :- | :- | :- | :- | :- | :- | :- | :- |
|
|
196
|
-
`,
|
|
196
|
+
`,Fo=`| Slot name | Default | Props | Fallback | Description |
|
|
197
197
|
| :- | :- | :- | :- | :- |
|
|
198
|
-
`,
|
|
198
|
+
`,Vo=`| Event name | Type | Detail | Description |
|
|
199
199
|
| :- | :- | :- | :- |
|
|
200
|
-
`,
|
|
200
|
+
`,oi=`| Name | Kind | Type | Description |
|
|
201
201
|
| :- | :- | :- | :- |
|
|
202
|
-
`,
|
|
202
|
+
`,jo=`| Part name | Description |
|
|
203
203
|
| :- | :- |
|
|
204
|
-
|
|
204
|
+
`,$o=`| Property name | Type | Default value | Description |
|
|
205
205
|
| :- | :- | :- | :- |
|
|
206
|
-
`,
|
|
207
|
-
`).replace(
|
|
206
|
+
`,on=/\|/g,nh=/</g,rh=/>/g,Rt=/\n/g,ih=/\{@link\s+([^{}\s|]+)(?:\|([^{}]+))?\}/g;function si(e){return e.replace(ih,(t,n,r)=>`[${r===void 0?n:r.trim()}](${n})`)}function tt(e){if(e===void 0)return qe;return`<code>${e.replace(on,"|")}</code>`}function an(e){return e.replace(nh,"<").replace(rh,">")}function ci(e){if(e===void 0)return qe;return`<code>${e.replace(ai,"\\`").replace(on,"|")}</code>`}function Mt(e,t){if(t===void 0)return e;let n=typeof t==="string"&&t.trim().length>0?`: ${an(t).replace(Rt," ").replace(on,"|")}`:"";return`<s>${e}</s><br />**Deprecated**${n}`}function qn(e){if(e===void 0||e.trim().length===0)return qe;return an(si(e)).replace(on,"|").replace(Rt,"<br />")}function Ho(e){if(e===void 0||e==="{}")return qe;return tt($n(e).replace(Rt," "))}function qo(e){if(e===void 0)return qe;return tt(an(e).replace(Rt,"<br />"))}function cn(e,t){let n=[];if(e!==void 0&&e.trim().length>0)n.push(an(si(e)));for(let{name:r,body:i}of t??[]){let o=i?.trim();n.push(o?`@${r} ${an(si(o))}`:`@${r}`)}if(n.length===0)return qe;return n.join(`
|
|
207
|
+
`).replace(on,"|").replace(Rt,"<br />")}function Uo(e){if(e===void 0)return qe;return tt(e.replace(Rt," "))}function pi(e,t,n){if(e.append("h1","Component Index"),e.append("h2","Components").tableOfContents(),e.append("divider"),n&&n.length>0)sh(e,n);let r=rn(t);for(let i of r.components)ch(e,i)}function sh(e,t){e.append("h2","Exports"),e.append("raw",oi);for(let n of t){let r=(n.type??n.value)?.replace(Oo," ").trim();e.append("raw",`| ${Mt(n.name,n.deprecated)} | ${`<code>${n.kind}</code>`} | ${tt(r)} | ${qn(n.description)} |
|
|
208
208
|
`)}e.append("raw",`
|
|
209
|
-
`),e.append("divider")}function
|
|
209
|
+
`),e.append("divider")}function ah(e){return e.kind==="const"||e.isFunctionDeclaration}function oh(e,t){e.append("h3","Module exports"),e.append("raw",oi);for(let n of t)e.append("raw",`| ${Mt(n.name,n.deprecated)} | ${`<code>${n.kind}</code>`} | ${tt(n.type)} | ${cn(n.description,n.tags)} |
|
|
210
210
|
`);e.append("raw",`
|
|
211
|
-
`)}function
|
|
212
|
-
`);else e.append("p",r??"None.")}function
|
|
211
|
+
`)}function li(e,t,n,r){if(t.length>0)n(),e.append("raw",`
|
|
212
|
+
`);else e.append("p",r??"None.")}function ch(e,t){if(e.append("h2",`\`${t.moduleName}\``),t.generics)e.append("p",`**Type parameters:** ${tt(`<${t.generics[1]}>`)}`);if(t.typedefs.length>0)e.append("h3","Types").append("raw",`\`\`\`ts
|
|
213
213
|
${Hn({typedefs:t.typedefs})}
|
|
214
214
|
\`\`\`
|
|
215
215
|
|
|
216
|
-
`);if(e.append("h3","Props"),
|
|
217
|
-
`)}}),t.moduleExports.length>0)
|
|
218
|
-
`)}),e.append("h3","Events"),
|
|
219
|
-
`)}),t.cssParts&&t.cssParts.length>0){e.append("h3","CSS Parts"),e.append("raw",
|
|
216
|
+
`);if(e.append("h3","Props"),li(e,t.props,()=>{e.append("raw",Bo);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=ah(i)?"accessor":i.kind;e.append("raw",`| ${Mt(i.name,i.deprecated)} | ${i.isRequired?"Yes":"No"} | ${`<code>${o}</code>`} | ${i.reactive?"Yes":"No"} | ${i.binding??"--"} | ${tt(i.type)} | ${ci(i.value)} | ${cn(i.description,i.tags)} |
|
|
217
|
+
`)}}),t.moduleExports.length>0)oh(e,t.moduleExports);if(e.append("h3","Slots"),li(e,t.slots,()=>{e.append("raw",Fo);for(let n of t.slots)e.append("raw",`| ${Mt(n.default?qe:n.name??qe,n.deprecated)} | ${n.default?"Yes":"No"} | ${Ho(n.slot_props)} | ${qo(n.fallback)} | ${cn(n.description,n.tags)} |
|
|
218
|
+
`)}),e.append("h3","Events"),li(e,t.events,()=>{e.append("raw",Vo);for(let n of t.events)e.append("raw",`| ${Mt(n.name,n.deprecated)} | ${n.type} | ${n.type==="dispatched"?Uo(n.detail):qe} | ${cn(n.description,n.tags)} |
|
|
219
|
+
`)}),t.cssParts&&t.cssParts.length>0){e.append("h3","CSS Parts"),e.append("raw",jo);for(let n of t.cssParts)e.append("raw",`| ${n.name} | ${qn(n.description)} |
|
|
220
220
|
`);e.append("raw",`
|
|
221
|
-
`)}if(t.cssProperties&&t.cssProperties.length>0){e.append("h3","CSS Custom Properties"),e.append("raw"
|
|
221
|
+
`)}if(t.cssProperties&&t.cssProperties.length>0){e.append("h3","CSS Custom Properties"),e.append("raw",$o);for(let n of t.cssProperties)e.append("raw",`| ${n.name} | ${tt(n.type)} | ${ci(n.default)} | ${qn(n.description)} |
|
|
222
222
|
`);e.append("raw",`
|
|
223
|
-
`)}}var
|
|
223
|
+
`)}}var lh=/^=>\s*/;function ph(e){let t=e.trim();if(!t.startsWith("("))return{parameters:[],returnTypeText:t||"any"};let n=0,r=-1;for(let l=0;l<t.length;l++)if(t[l]==="(")n++;else if(t[l]===")"){if(n--,n===0){r=l;break}}if(r===-1)return{parameters:[],returnTypeText:"any"};let i=t.slice(1,r).trim(),o=t.slice(r+1).trim().replace(lh,"");return{parameters:i===""?[]:We(i).map((l)=>{let p=l.trim(),m=p.startsWith("..."),d=m?p.slice(3):p,y=d.indexOf(":"),x=(y===-1?d:d.slice(0,y)).trim(),E=y===-1?void 0:d.slice(y+1).trim(),P=x.endsWith("?");return{name:P?x.slice(0,-1):x,...E?{type:{text:E}}:{},...P?{optional:!0}:{},...m?{rest:!0}:{}}}),returnTypeText:o||"any"}}function uh(e){if(e.params!==void 0||e.returnType!==void 0)return{parameters:(e.params??[]).map((n)=>({name:n.name,...n.type?{type:{text:n.type}}:{},...n.optional?{optional:!0}:{}})),returnTypeText:e.returnType??"any"};return e.type?ph(e.type):{parameters:[],returnTypeText:"any"}}function dh(e){return e.map((t)=>{if(t.isFunctionDeclaration){let{parameters:n,returnTypeText:r}=uh(t);return{kind:"method",name:t.name,static:!1,...n.length>0?{parameters:n}:{},return:{type:{text:r}},...t.description?{description:t.description}:{},...t.deprecated===void 0?{}:{deprecated:t.deprecated}}}return{kind:"field",name:t.name,...t.type?{type:{text:t.type}}:{},...t.value===void 0?{}:{default:t.value},...t.description?{description:t.description}:{},...t.deprecated===void 0?{}:{deprecated:t.deprecated},...t.kind==="const"?{readonly:!0}:{}}})}function hh(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(),l=n.get(s);if(l!==void 0){console.warn(`sveld: props "${l}" and "${i.name}" of component "${e.moduleName}" both map to the custom-element attribute "${s}"; only "${l}" is included.`);continue}n.set(s,i.name);let m=o?.type==="Array"||o?.type==="Object"?[i.description,"Serialized to/from JSON for the attribute."].filter(Boolean).join(" "):i.description;r.push({name:s,fieldName:i.name,...i.type?{type:{text:i.type}}:{},...i.value===void 0?{}:{default:i.value},...m?{description:m}:{},...o?.reflect?{reflects:!0}:{}})}return r}function fh(e){if(!e||e.length===0)return;return e.map((t)=>({name:t.name,...t.description?{description:t.description}:{}}))}function mh(e){if(!e||e.length===0)return;return e.map((t)=>({name:t.name,...t.type?{type:{text:t.type}}:{},...t.default===void 0?{}:{default:t.default},...t.description?{description:t.description}:{}}))}function yh(e){return e.filter((t)=>t.type==="dispatched").map((t)=>({name:t.name,type:{text:`CustomEvent<${t.detail??"unknown"}>`},...t.description?{description:t.description}:{},...t.deprecated===void 0?{}:{deprecated:t.deprecated}}))}function gh(e){return e.map((t)=>({name:t.default?"":t.name??"",...t.description?{description:t.description}:{},...t.deprecated===void 0?{}:{deprecated:t.deprecated}}))}function xh(e){let t=fh(e.cssParts),n=mh(e.cssProperties),r={kind:"class",name:e.moduleName,...e.componentComment?{description:e.componentComment}:{},members:dh(e.props),attributes:hh(e),events:yh(e.events),slots:gh(e.slots),...t?{cssParts:t}:{},...n?{cssProperties:n}:{}};if(e.customElementTag)r.tagName=e.customElementTag,r.customElement=!0;return r}function bh(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 Th(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:[xh(o)],exports:bh(o,s)}})}}var Eh=/[^\w\- ]+/g,Sh=/\s+/g;function vh(e,t){let n=e.toLowerCase().replace(ai,"").replace(Eh,"").replace(Sh,"-"),r=t.get(n)??0;return t.set(n,r+1),r===0?n:`${n}-${r}`}class ui{sourceParts=[];hasToC=!1;toc=[];get source(){return this.sourceParts.join("")}appendLineBreaks(){return this.sourceParts.push(`
|
|
224
224
|
|
|
225
|
-
`),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(""),t=new Map;return e.replace("<!-- __TOC__ -->",this.toc.map(({indent:n,raw:r})=>`${" ".repeat(n)}- [${r}](#${
|
|
226
|
-
`))}}class
|
|
225
|
+
`),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(""),t=new Map;return e.replace("<!-- __TOC__ -->",this.toc.map(({indent:n,raw:r})=>`${" ".repeat(n)}- [${r}](#${vh(r,t)})`).join(`
|
|
226
|
+
`))}}class di extends ui{onAppend;constructor(e){super();this.onAppend=e.onAppend}append(e,t){return super.append(e,t),this.onAppend?.call(this,e,this),this}}function Ch(e,t){let n=new di({onAppend:(r,i)=>{t?.onAppend?.call(null,r,i,e)}});return pi(n,e),n.end()}export{di as BrowserWriterMarkdown,To as COMPONENT_API_SCHEMA_VERSION,fe as ComponentParser,ec as asNormalizedPath,rn as buildComponentApiDocument,Th as buildCustomElementsManifest,$n as formatTsProps,Do as getContextDefs,Hn as getTypeDefs,pi as renderComponentsToMarkdown,Ch as writeMarkdownCore,th as writeTsDefinition};
|