sveld 0.37.2 → 0.37.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/browser.js CHANGED
@@ -1,157 +1,169 @@
1
- var ic=Object.defineProperty;var sc=(e)=>e;function ac(e,t){this[e]=sc.bind(null,t)}var oc=(e,t)=>{for(var n in t)ic(e,n,{get:t[n],enumerable:!0,configurable:!0,set:ac.bind(t,n)})};function cc(e){return e}function De(e){return typeof e==="object"&&e!==null}function Ei(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 Ci(e){return De(e)&&e.type==="MemberExpression"}function Xe(e){return De(e)&&e.type==="ObjectExpression"&&Array.isArray(e.properties)}function pc(e){return De(e)&&e.type==="CallExpression"}function Ge(e,t){if(!pc(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 vi(e){if(De(e)&&(e.type==="TSAsExpression"||e.type==="TSSatisfiesExpression")&&"typeAnnotation"in e)return e.typeAnnotation;return}function lc(e){return De(e)&&e.type==="NewExpression"}function Un(e,t){if(!lc(e))return!1;return!!e.callee&&De(e.callee)&&e.callee.type==="Identifier"&&e.callee.name===t}function Ai(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 Pi={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 uc(e){return e in Pi}function ki(e){if(uc(e))return Pi[e];return"HTMLElement"}var cn=Symbol("sveld.parsedComponentTypeScriptMetadata");function Gn(e){return e[cn]}var dc=/\w/;function fc(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 u=p.slice(t.length);if(u.length>0&&dc.test(u[0]))continue;let m=u.trimStart();if(m.startsWith("?"))m=m.slice(1).trimStart();if(m.startsWith(":"))return m.slice(1).trim()}return}function pn(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 fc(s,o)}function Wn(){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 Kn={"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"},hc={"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 wi(e){return{...e,code:Kn[e.kind],severity:hc[e.kind]}}function ae(e,t,n,r,i){e.diagnosticRecords.push(wi({component:e.componentFilePath,kind:t,name:n,message:r,...i?{source:i}:{},...mc(e,t,n)?{ignored:!0}:{}}))}function Ni(e,t){return`${e}:${t}`}function st(e,t,n,r){if(!r||r.length===0)return;let i=Ni(t,n),o=e.sveldIgnoreDirectives.get(i)??new Set;for(let s of r)o.add(s);e.sveldIgnoreDirectives.set(i,o)}function mc(e,t,n){let r=e.sveldIgnoreDirectives.get(Ni(t,n));if(!r)return!1;return r.has("")||r.has(Kn[t])}function yc(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 gc(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 xc=/^\{([\s\S]*)\}$/,bc=/^[A-Za-z_$][\w$]*$/;function ln(e){let t=e.trim(),n=xc.exec(t);if(!n)return null;let r=n[1].trim();if(r==="")return[];let i=[];for(let o of yc(r)){let s=o.trim();if(!s)continue;let p=gc(s);if(p===-1)return null;let u=s.slice(0,p).trim(),m=s.slice(p+1).trim();if(!m)return null;let d=!1;if(u.endsWith("?"))d=!0,u=u.slice(0,-1).trim();if(!bc.test(u))return null;i.push({name:u,type:m,optional:d})}return i}var zn=/[\r\n]+/g;function Tc(e){if(e.sourceLineStartOffsetsCache)return e.sourceLineStartOffsetsCache;let t=[0];if(e.source){let n=e.source.indexOf(`
1
+ var Tc=Object.defineProperty;var Ec=(e)=>e;function Sc(e,t){this[e]=Ec.bind(null,t)}var Cc=(e,t)=>{for(var n in t)Tc(e,n,{get:t[n],enumerable:!0,configurable:!0,set:Sc.bind(t,n)})};function vc(e){return e}function Fe(e){return typeof e==="object"&&e!==null}function _i(e){return Fe(e)&&e.type==="VariableDeclaration"&&Array.isArray(e.declarations)}function st(e){return Fe(e)&&e.type==="Literal"}function Ne(e){return Fe(e)&&e.type==="Identifier"&&typeof e.name==="string"}function Ii(e){return Fe(e)&&e.type==="MemberExpression"}function Qe(e){return Fe(e)&&e.type==="ObjectExpression"&&Array.isArray(e.properties)}function Ac(e){return Fe(e)&&e.type==="CallExpression"}function Ke(e,t){if(!Ac(e))return!1;return!!e.callee&&Fe(e.callee)&&e.callee.type==="Identifier"&&e.callee.name===t}function at(e){if(Fe(e)&&(e.type==="TSAsExpression"||e.type==="TSSatisfiesExpression")&&"expression"in e)return at(e.expression);return e}function Di(e){if(Fe(e)&&(e.type==="TSAsExpression"||e.type==="TSSatisfiesExpression")&&"typeAnnotation"in e)return e.typeAnnotation;return}function Pc(e){return Fe(e)&&e.type==="NewExpression"}function Yn(e,t){if(!Pc(e))return!1;return!!e.callee&&Fe(e.callee)&&e.callee.type==="Identifier"&&e.callee.name===t}function Li(e){if(!Fe(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 Ri={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 kc(e){return e in Ri}function Mi(e){if(kc(e))return Ri[e];return"HTMLElement"}var un=Symbol("sveld.parsedComponentTypeScriptMetadata");function Qn(e){return e[un]}var wc=/\w/;function Nc(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 u=p.slice(t.length);if(u.length>0&&wc.test(u[0]))continue;let m=u.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 Nc(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,functionDocCommentStarts:new Set,rest_props:void 0,extends:void 0,customElementTag:void 0,customElement:void 0,componentComment:void 0,componentCommentSource:void 0,generics:null,scriptGenericsAttribute:void 0,diagnosticRecords:[],componentFilePath:"",props:new Map,moduleExports:new Map,propLocalToPublicName:new Map,reactive_vars:new Set,funcDecls:new Map,vars:new Set,valueImportBindingsByLocalName:new Map,pendingCallDefaultCandidates:[],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 er={"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","module-export-conflict":"sveld/module-export-conflict","extend-props-target-missing":"sveld/extend-props-target-missing","extend-props-duplicate":"sveld/extend-props-duplicate","extend-props-override":"sveld/extend-props-override","jsdoc-unknown-tag":"sveld/jsdoc-unknown-tag","typedef-duplicate":"sveld/typedef-duplicate","property-duplicate":"sveld/property-duplicate","generics-conflict":"sveld/generics-conflict","event-description-ambiguous":"sveld/event-description-ambiguous","jsdoc-tag-dropped":"sveld/jsdoc-tag-dropped","internal-typedef-referenced":"sveld/internal-typedef-referenced","types-inline-unresolved":"sveld/types-inline-unresolved"},_c={"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","module-export-conflict":"warning","extend-props-target-missing":"error","extend-props-duplicate":"warning","extend-props-override":"warning","jsdoc-unknown-tag":"warning","typedef-duplicate":"warning","property-duplicate":"warning","generics-conflict":"warning","event-description-ambiguous":"warning","jsdoc-tag-dropped":"warning","internal-typedef-referenced":"error","types-inline-unresolved":"warning"};function Oi(e){return{...e,code:er[e.kind],severity:_c[e.kind]}}function ce(e,t,n,r,i){e.diagnosticRecords.push(Oi({component:e.componentFilePath,kind:t,name:n,message:r,...i?{source:i}:{},...Ic(e,t,n)?{ignored:!0}:{}}))}function Bi(e,t){return`${e}:${t}`}function ot(e,t,n,r){if(!r||r.length===0)return;let i=Bi(t,n),o=e.sveldIgnoreDirectives.get(i)??new Set;for(let s of r)o.add(s);e.sveldIgnoreDirectives.set(i,o)}function Ic(e,t,n){let r=e.sveldIgnoreDirectives.get(Bi(t,n));if(!r)return!1;return r.has("")||r.has(er[t])}function Dc(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 Rc=/^\{([\s\S]*)\}$/,Mc=/^[A-Za-z_$][\w$]*$/;function fn(e){let t=e.trim(),n=Rc.exec(t);if(!n)return null;let r=n[1].trim();if(r==="")return[];let i=[];for(let o of Dc(r)){let s=o.trim();if(!s)continue;let p=Lc(s);if(p===-1)return null;let u=s.slice(0,p).trim(),m=s.slice(p+1).trim();if(!m)return null;let f=!1;if(u.endsWith("?"))f=!0,u=u.slice(0,-1).trim();if(!Mc.test(u))return null;i.push({name:u,type:m,optional:f})}return i}var tr=/[\r\n]+/g;function Oc(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 _i(e,t){if(!e.source||t<0||t>e.source.length)return;let n=Tc(e),r=e.sourceLineHint;if(r!==void 0)for(let s=r;s<=r+1&&s<n.length;s++){let p=n[s],u=n[s+1]??Number.POSITIVE_INFINITY;if(t>=p&&t<u)return e.sourceLineHint=s,{line:s+1,column:t-p}}let i=0,o=n.length-1;while(i<=o){let s=i+o>>>1,p=n[s],u=n[s+1]??Number.POSITIVE_INFINITY;if(t<p)o=s-1;else if(t>=u)i=s+1;else return e.sourceLineHint=s,{line:s+1,column:t-p}}return}function un(e,t,n){if(t===void 0||n===void 0||n<t)return;let r=_i(e,t),i=_i(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 un(e,n,r)}function Le(e,t){if(!t||t.length===0)return;let n=[...t];while(n.length>1){let u=n[n.length-1];if(u.tag!==void 0||!u.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 un(e,o,p)}function se(e,t,n){return e.source?.slice(t,n)}function dn(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(zn," ")}function Re(e){return e===void 0||e===""?void 0:e}function Ot(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=Di(e,t,n);if(n.type==="ObjectExpression"||n.type==="BinaryExpression"||n.type==="ArrayExpression"||n.type==="ArrowFunctionExpression"||n.type==="FunctionExpression"){let u=n;if("start"in u&&"end"in u&&typeof u.start==="number"&&typeof u.end==="number")i=se(t,u.start,u.end)?.replace(zn," ");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=Mi(n),i=Ii(t,n)}else if(n.type==="UnaryExpression"){let u=n;if("start"in u&&"end"in u&&typeof u.start==="number"&&typeof u.end==="number")i=se(t,u.start,u.end);if(u.argument){if(typeof u.argument==="object"&&"type"in u.argument&&u.argument.type==="UnaryExpression")o=at(e,t,u.argument).type;else if(typeof u.argument==="object"&&"value"in u.argument)o=typeof u.argument.value}}else if(n.type==="NewExpression"){let u=n;if("start"in u&&"end"in u&&typeof u.start==="number"&&typeof u.end==="number")i=se(t,u.start,u.end);if(u.callee&&typeof u.callee==="object"&&"type"in u.callee&&u.callee.type==="Identifier"){let m=u.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 u=n;if("start"in u&&"end"in u&&typeof u.start==="number"&&typeof u.end==="number")i=se(t,u.start,u.end);let m=u.callee,d=m&&typeof m==="object"&&"type"in m&&m.type==="Identifier"?m.name:void 0;if((d==="$derived"||d==="$state")&&u.arguments.length===1&&r<5)return{...at(e,t,u.arguments[0],r+1),value:i,defaultValue:p};if(d){let y=Ec(e,t,d);if(y)return{value:i,type:void 0,isFunction:!1,defaultValue:p,resolvedType:y};if(t.funcDecls.has(d)||Cc(t,d))return{value:i,type:void 0,isFunction:!1,defaultValue:p,pendingCallDefault:{calleeName:d}};let T=t.valueImportBindingsByLocalName.get(d);if(T)return{value:i,type:void 0,isFunction:!1,defaultValue:p,pendingCallDefault:{calleeName:d,importSource:T.source,importedName:T.importedName}}}return{value:i,type:void 0,isFunction:!1,defaultValue:p,pendingCallDefault:{calleeName:d??Sc(t,m)}}}else if(n.type==="Identifier"){let u=n;if(r<5){let m=Li(t,u.name);if(m){let d=at(e,t,m,r+1),y=e.resolveLocalVarJSDoc(u.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(u.name)){let d=e.resolveLocalVarJSDoc(u.name),y=t.funcDecls.get(u.name);return{value:y?Ii(t,y):void 0,type:void 0,isFunction:!0,defaultValue:y?Di(e,t,y):void 0,resolvedType:d?.type??kc(d,y),resolvedDescription:d?.description,resolvedParams:d?.params,resolvedReturnType:d?.returnType}}}if("start"in u&&"end"in u&&typeof u.start==="number"&&typeof u.end==="number")i=se(t,u.start,u.end)}else if(n.type==="MemberExpression"){let u=n;if("start"in u&&"end"in u&&typeof u.start==="number"&&typeof u.end==="number")i=se(t,u.start,u.end);if(e.isNumericConstant(n))o="number"}else if(n.type==="TemplateLiteral"){let u=n;if("start"in u&&"end"in u&&typeof u.start==="number"&&typeof u.end==="number")i=se(t,u.start,u.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 Li(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 Bt(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 se(e,t.start,t.end)??"call";return"call"}function Ec(e,t,n){let r=e.resolveLocalVarJSDoc(n);if(r?.returnType)return r.returnType;let i=t.funcDecls.get(n)??Ri(t,n);if(!i)return;let o=Pc(t,i);if(o)return o;let s=vc(t,n);if(s)return s;let p=Oi(i);return p==="any"?void 0:p}function Cc(e,t){return Ri(e,t)!==void 0}function Ri(e,t){let n=Li(e,t);if(!n||typeof n!=="object"||!("type"in n))return;if(n.type==="ArrowFunctionExpression"||n.type==="FunctionExpression")return n;return}function vc(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 Ac(se(e,s.start,s.end))}return}function Ac(e){if(!e)return;let t=e.lastIndexOf("=>");if(t===-1)return;return e.slice(t+2).trim()||void 0}function Pc(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 kc(e,t){let n=e?.returnType??"any",r=e?.params;if(r&&r.length>0)return`(${r.map((o)=>`${o.name}${o.optional?"?":""}: ${o.type}`).join(", ")}) => ${n}`;if(e?.returnType)return`() => ${n}`;if(t)return Mi(t);return"(...args: any[]) => any"}function Mi(e){return`(${wc(e)}) => ${Oi(e)}`}function wc(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 Oi(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=Nc(t),n.length===0)return"any"}else n=[t];let r=null;for(let i of n){let o=_c(i);if(!o)return"any";if(r===null)r=o;else if(r!==o)return"any"}return r??"any"}function Nc(e){let t=[];return Xn(e,t),t}function Xn(e,t){if(!e||typeof e!=="object")return;let n=e;if(typeof n.type!=="string")return;if(n.type==="FunctionDeclaration"||n.type==="FunctionExpression"||n.type==="ArrowFunctionExpression")return;if(n.type==="ReturnStatement")t.push(n.argument??null);for(let r in n){if(r==="leadingComments")continue;let i=n[r];if(!i||typeof i!=="object")continue;if(Array.isArray(i))for(let o=0;o<i.length;o++)Xn(i[o],t);else Xn(i,t)}}function _c(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 Bi(e){if(Ge(e,"$bindable"))return{init:e.arguments[0],bindable:!0};return{init:e,bindable:!1}}function Ic(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 Ii(e,t){if(t.generator)return;let n=t.body;if(!n||typeof n!=="object"||!("type"in n))return;let r=Ic(e,t),i=t.async?"async ":"",o=(p,u)=>p&&typeof p==="object"&&("type"in p)&&p.type==="ObjectExpression"?`(${u})`:u;if(n.type!=="BlockStatement"){let p=dn(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 u=p.argument;if(u){let m=dn(e,u);if(m!==void 0)return`${i}(${r}) => ${o(u,m)}`}}}return}function Di(e,t,n){let r=dn(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=Jn(e,n);if(s.ok)o.value=s.value}return o}function Jn(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=Jn(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=Jn(e,i.value);if(!s.ok)return{ok:!1};r[o]=s.value}return{ok:!0,value:r}}return{ok:!1}}function Dc(e,t,n,r){if(!Ae(n))return null;let i=Bt(e,n.name);if(Xe(i))return ji(e,t,i,r).properties;let o=t.findVariableTypeAndDescription(n.name);if(!o)return null;let s=ln(o.type);if(!s)return null;return s.map((p)=>({name:p.name,type:p.type,optional:p.optional}))}function ji(e,t,n,r){let i=[],o=!1;for(let s of n.properties){if(s.type==="SpreadElement"){let y=Dc(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 p=t.getPropertyName(s.key);if(!p)continue;let u="any",m,d;if(Ae(s.value)){let y=s.value.name,T=t.findVariableTypeAndDescription(y);if(T)u=T.type,m=T.description,d=T.internal;else ae(e,"context-any-type",p,`Context "${r}" property "${p}" 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"))u=`(${s.value.params?.map((S)=>{if(Ae(S))return`${S.name||"arg"}: any`;return"arg: any"}).join(", ")||""}) => any`;else if(rt(s.value))u=s.value.value==null?"null":typeof s.value.value;i.push({name:p,type:u,description:m,optional:!1,...d?{internal:!0}:{}})}return{properties:i,hasUnresolvedSpread:o}}var Lc=/[-_.:/\s]+/;function Yn(e){return`${e.split(Lc).map((r)=>r.charAt(0).toUpperCase()+r.slice(1)).join("")}Context`}function Fi(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}=ji(e,t,n,r);return{key:r,typeName:Yn(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:Yn(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:Yn(r),properties:[{name:i,type:"any",description:void 0,optional:!1}]}}return null}function Vi(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 $i(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=Ai(r);return i==null?{kind:"unresolved"}:{kind:"resolved",key:i}}if(r.type==="CallExpression"||r.type==="NewExpression"){let i=Vi(r);return i==null?{kind:"unresolved"}:{kind:"resolved",key:i}}if(r.type==="Identifier"){if(n>=5)return{kind:"unresolved"};let i=Bt(e,r.name);if(i&&typeof i==="object"&&"type"in i){let s=i;if((s.type==="CallExpression"||s.type==="NewExpression")&&Vi(s)==="")return{kind:"resolved",key:r.name};return $i(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 Hi(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=$i(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 p=i.arguments[1];if(!p)return;let u=ie(e,n);if(s.kind==="pending"){let y=Fi(e,t,p,"");if(y)e.pendingContextKeyCandidates.push({importSource:s.importSource,importedName:s.importedName,properties:y.properties,description:y.description,source:u});return}let m=s.key,d=Fi(e,t,p,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.`,u);return}e.contexts.set(m,{...d,source:u})}var Rc=new Set(["Component","SvelteComponent","SvelteSelf"]),Mc=new Set(["RegularElement","SvelteElement"]);function Ft(e){return Rc.has(e)}function Vt(e){return Mc.has(e)}function qi(e,t){if(!t||typeof t!=="object"||!("type"in t))return;if(Xe(t))return Gi(e,t);if(t.type==="ArrayExpression")return Wi(e,t);return}function Ui(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 Gi(e,t);if(t.type==="ArrayExpression")return Wi(e,t);return"any"}function Gi(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:Ui(e,r.value)})}return fn(n)}function Wi(e,t){let n=new Set(t.elements.filter((r)=>r!=null).map((r)=>Ui(e,r)));if(n.size===0)return"any[]";if(n.size===1)return`${[...n][0]}[]`;return`(${[...n].join(" | ")})[]`}function Qn(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:u}){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,...p||y.internal?{internal:!0}:{},source:u||y.source});else if(y){let T=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:T,...y.internal||p?{internal:!0}:{},source:u||y.source})}else e.events.set(t,{type:"dispatched",name:t,detail:m,description:d,deprecated:o,tags:s,...p?{internal:!0}:{},source:u})}function Ki(e,t){let n=t.arguments[0],r=Un(n,"CustomEvent");if(!r&&!Un(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,u;if(Xe(s)){let m=s.properties.find((d)=>d.type==="Property"&&Ae(d.key)&&d.key.name==="detail");if(m?.type==="Property")p=!0,u=rt(m.value)?m.value.value:void 0}return ot(e,{name:String(o),detail:u==null?"":Qn(u),has_argument:p,source:ie(e,t)}),String(o)}function fn(e,t,n=!1){if(e.length===0)return"null";let r=e.map(({name:i,type:o,description:s,optional:p,default:u})=>{let m=p?"?":"",d=s||"";if(u&&d)d=`${d} @default ${u}`;else if(u)d=`@default ${u}`;if(d){if(n)return`/** ${d} */
4
- ${i}${m}: ${o};`;return`/** ${d} */ ${i}${m}: ${o};`}return`${i}${m}: ${o};`}).join(n?`
3
+ `,n+1)}return e.sourceLineStartOffsetsCache=t,t}function Fi(e,t){if(!e.source||t<0||t>e.source.length)return;let n=Oc(e),r=e.sourceLineHint;if(r!==void 0)for(let s=r;s<=r+1&&s<n.length;s++){let p=n[s],u=n[s+1]??Number.POSITIVE_INFINITY;if(t>=p&&t<u)return e.sourceLineHint=s,{line:s+1,column:t-p}}let i=0,o=n.length-1;while(i<=o){let s=i+o>>>1,p=n[s],u=n[s+1]??Number.POSITIVE_INFINITY;if(t<p)o=s-1;else if(t>=u)i=s+1;else return e.sourceLineHint=s,{line:s+1,column:t-p}}return}function hn(e,t,n){if(t===void 0||n===void 0||n<t)return;let r=Fi(e,t),i=Fi(e,n);if(!r||!i)return;return{start:r,end:i}}function se(e,t){if(!t||typeof t!=="object")return;let n="start"in t&&typeof t.start==="number"?t.start:void 0,r="end"in t&&typeof t.end==="number"?t.end:void 0;return hn(e,n,r)}function Me(e,t){if(!t||t.length===0)return;let n=[...t];while(n.length>1){let u=n[n.length-1];if(u.tag!==void 0||!u.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 hn(e,o,p)}function pe(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 pe(e,n,r)?.replace(tr," ")}function Ve(e){return e===void 0||e===""?void 0:e}function Vt(e,t,n,r){if(Ve(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 ct(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=$i(e,t,n);if(n.type==="ObjectExpression"||n.type==="BinaryExpression"||n.type==="ArrayExpression"||n.type==="ArrowFunctionExpression"||n.type==="FunctionExpression"){let u=n;if("start"in u&&"end"in u&&typeof u.start==="number"&&typeof u.end==="number")i=pe(t,u.start,u.end)?.replace(tr," ");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=qi(n),i=Vi(t,n)}else if(n.type==="UnaryExpression"){let u=n;if("start"in u&&"end"in u&&typeof u.start==="number"&&typeof u.end==="number")i=pe(t,u.start,u.end);if(u.argument){if(typeof u.argument==="object"&&"type"in u.argument&&u.argument.type==="UnaryExpression")o=ct(e,t,u.argument).type;else if(typeof u.argument==="object"&&"value"in u.argument)o=typeof u.argument.value}}else if(n.type==="NewExpression"){let u=n;if("start"in u&&"end"in u&&typeof u.start==="number"&&typeof u.end==="number")i=pe(t,u.start,u.end);if(u.callee&&typeof u.callee==="object"&&"type"in u.callee&&u.callee.type==="Identifier"){let m=u.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 u=n;if("start"in u&&"end"in u&&typeof u.start==="number"&&typeof u.end==="number")i=pe(t,u.start,u.end);let m=u.callee,f=m&&typeof m==="object"&&"type"in m&&m.type==="Identifier"?m.name:void 0;if((f==="$derived"||f==="$state")&&u.arguments.length===1&&r<5)return{...ct(e,t,u.arguments[0],r+1),value:i,defaultValue:p};if(f){let g=Fc(e,t,f);if(g)return{value:i,type:void 0,isFunction:!1,defaultValue:p,resolvedType:g};if(t.funcDecls.has(f)||Vc(t,f))return{value:i,type:void 0,isFunction:!1,defaultValue:p,pendingCallDefault:{calleeName:f}};let b=t.valueImportBindingsByLocalName.get(f);if(b)return{value:i,type:void 0,isFunction:!1,defaultValue:p,pendingCallDefault:{calleeName:f,importSource:b.source,importedName:b.importedName}}}return{value:i,type:void 0,isFunction:!1,defaultValue:p,pendingCallDefault:{calleeName:f??Bc(t,m)}}}else if(n.type==="Identifier"){let u=n;if(r<5){let m=ji(t,u.name);if(m){let f=ct(e,t,m,r+1),g=e.resolveLocalVarJSDoc(u.name);return{...f,resolvedType:g?.type??f.resolvedType,resolvedDescription:g?.description??f.resolvedDescription,resolvedParams:g?.params??f.resolvedParams,resolvedReturnType:g?.returnType??f.resolvedReturnType}}if(t.funcDecls.has(u.name)){let f=e.resolveLocalVarJSDoc(u.name),g=t.funcDecls.get(u.name);return{value:g?Vi(t,g):void 0,type:void 0,isFunction:!0,defaultValue:g?$i(e,t,g):void 0,resolvedType:f?.type??qc(f,g),resolvedDescription:f?.description,resolvedParams:f?.params,resolvedReturnType:f?.returnType}}}if("start"in u&&"end"in u&&typeof u.start==="number"&&typeof u.end==="number")i=pe(t,u.start,u.end)}else if(n.type==="MemberExpression"){let u=n;if("start"in u&&"end"in u&&typeof u.start==="number"&&typeof u.end==="number")i=pe(t,u.start,u.end);if(e.isNumericConstant(n))o="number"}else if(n.type==="TemplateLiteral"){let u=n;if("start"in u&&"end"in u&&typeof u.start==="number"&&typeof u.end==="number")i=pe(t,u.start,u.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 ji(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 $t(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 Bc(e,t){if(t&&typeof t==="object"&&"start"in t&&"end"in t&&typeof t.start==="number"&&typeof t.end==="number")return pe(e,t.start,t.end)??"call";return"call"}function Fc(e,t,n){let r=e.resolveLocalVarJSDoc(n);if(r?.returnType)return r.returnType;let i=t.funcDecls.get(n)??Hi(t,n);if(!i)return;let o=Hc(t,i);if(o)return o;let s=$c(t,n);if(s)return s;let p=Ui(i);return p==="any"?void 0:p}function Vc(e,t){return Hi(e,t)!==void 0}function Hi(e,t){let n=ji(e,t);if(!n||typeof n!=="object"||!("type"in n))return;if(n.type==="ArrowFunctionExpression"||n.type==="FunctionExpression")return n;return}function $c(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 jc(pe(e,s.start,s.end))}return}function jc(e){if(!e)return;let t=e.lastIndexOf("=>");if(t===-1)return;return e.slice(t+2).trim()||void 0}function Hc(e,t){let n=t.returnType;if(n?.type!=="TSTypeAnnotation")return;let r=n.typeAnnotation;if(!r||typeof r.start!=="number"||typeof r.end!=="number")return;return pe(e,r.start,r.end)}function qc(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 qi(t);return"(...args: any[]) => any"}function qi(e){return`(${Uc(e)}) => ${Ui(e)}`}function Uc(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 Ui(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=Gc(t),n.length===0)return"any"}else n=[t];let r=null;for(let i of n){let o=Wc(i);if(!o)return"any";if(r===null)r=o;else if(r!==o)return"any"}return r??"any"}function Gc(e){let t=[];return nr(e,t),t}function nr(e,t){if(!e||typeof e!=="object")return;let n=e;if(typeof n.type!=="string")return;if(n.type==="FunctionDeclaration"||n.type==="FunctionExpression"||n.type==="ArrowFunctionExpression")return;if(n.type==="ReturnStatement")t.push(n.argument??null);for(let r in n){if(r==="leadingComments")continue;let i=n[r];if(!i||typeof i!=="object")continue;if(Array.isArray(i))for(let o=0;o<i.length;o++)nr(i[o],t);else nr(i,t)}}function Wc(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 Gi(e){if(Ke(e,"$bindable"))return{init:e.arguments[0],bindable:!0};return{init:e,bindable:!1}}function Kc(e,t){let n=t.params;if(!Array.isArray(n)||n.length===0)return"";let r=n[0],i=n[n.length-1];if(typeof r.start!=="number"||typeof i.end!=="number")return"";return pe(e,r.start,i.end)??""}function Vi(e,t){if(t.generator)return;let n=t.body;if(!n||typeof n!=="object"||!("type"in n))return;let r=Kc(e,t),i=t.async?"async ":"",o=(p,u)=>p&&typeof p==="object"&&("type"in p)&&p.type==="ObjectExpression"?`(${u})`:u;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 u=p.argument;if(u){let m=mn(e,u);if(m!==void 0)return`${i}(${r}) => ${o(u,m)}`}}}return}function $i(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=rr(e,n);if(s.ok)o.value=s.value}return o}function rr(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=rr(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=rr(e,i.value);if(!s.ok)return{ok:!1};r[o]=s.value}return{ok:!0,value:r}}return{ok:!1}}function zc(e,t,n,r){if(!Ne(n))return null;let i=$t(e,n.name);if(Qe(i))return zi(e,t,i,r).properties;let o=t.findVariableTypeAndDescription(n.name);if(!o)return null;let s=fn(o.type);if(!s)return null;return s.map((p)=>({name:p.name,type:p.type,optional:p.optional}))}function zi(e,t,n,r){let i=[],o=!1;for(let s of n.properties){if(s.type==="SpreadElement"){let g=zc(e,t,s.argument,r);if(g)i.push(...g);else o=!0,ce(e,"spread-unresolved",r,`Context "${r}" spreads a value sveld can't resolve; its shape is widened to "Record<string, any>".`,se(e,s));continue}if(s.type!=="Property")continue;let p=t.getPropertyName(s.key);if(!p)continue;let u="any",m,f;if(Ne(s.value)){let g=s.value.name,b=t.findVariableTypeAndDescription(g);if(b)u=b.type,m=b.description,f=b.internal;else ce(e,"context-any-type",p,`Context "${r}" property "${p}" has no type annotation; defaulted to "any".`,se(e,s))}else if(s.value&&typeof s.value==="object"&&"type"in s.value&&(s.value.type==="ArrowFunctionExpression"||s.value.type==="FunctionExpression"))u=`(${s.value.params?.map((T)=>{if(Ne(T))return`${T.name||"arg"}: any`;return"arg: any"}).join(", ")||""}) => any`;else if(st(s.value))u=s.value.value==null?"null":typeof s.value.value;i.push({name:p,type:u,description:m,optional:!1,...f?{internal:!0}:{}})}return{properties:i,hasUnresolvedSpread:o}}var Xc=/[-_.:/\s]+/;function ir(e){return`${e.split(Xc).map((r)=>r.charAt(0).toUpperCase()+r.slice(1)).join("")}Context`}function Wi(e,t,n,r){if(!n||typeof n!=="object"||!("type"in n))return null;if(n.type==="ObjectExpression"){if(!Qe(n))return null;let{properties:i,hasUnresolvedSpread:o}=zi(e,t,n,r);return{key:r,typeName:ir(r),properties:i,description:void 0,...o?{hasUnresolvedSpread:o}:{}}}else if(Ne(n)){let i=n.name,o=t.findVariableTypeAndDescription(i);if(o)return{key:r,typeName:ir(r),properties:[{name:i,type:o.type,description:o.description,optional:!1}],description:void 0,...o.internal?{internal:!0}:{}};return ce(e,"context-any-type",i,`Context "${r}" variable "${i}" has no type annotation; defaulted to "any".`,se(e,n)),{key:r,typeName:ir(r),properties:[{name:i,type:"any",description:void 0,optional:!1}]}}return null}function Ki(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 Xi(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=Li(r);return i==null?{kind:"unresolved"}:{kind:"resolved",key:i}}if(r.type==="CallExpression"||r.type==="NewExpression"){let i=Ki(r);return i==null?{kind:"unresolved"}:{kind:"resolved",key:i}}if(r.type==="Identifier"){if(n>=5)return{kind:"unresolved"};let i=$t(e,r.name);if(i&&typeof i==="object"&&"type"in i){let s=i;if((s.type==="CallExpression"||s.type==="NewExpression")&&Ki(s)==="")return{kind:"resolved",key:r.name};return Xi(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 Ji(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=Xi(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 u=se(e,n);if(s.kind==="pending"){let g=Wi(e,t,p,"");if(g)e.pendingContextKeyCandidates.push({importSource:s.importSource,importedName:s.importedName,properties:g.properties,description:g.description,source:u});return}let m=s.key,f=Wi(e,t,p,m);if(!f)return;if(e.contexts.has(m)){ce(e,"context-duplicate-key",m,`setContext("${m}", ...) was called more than once; only the first call's shape is used.`,u);return}e.contexts.set(m,{...f,source:u})}var Jc=new Set(["Component","SvelteComponent","SvelteSelf"]),Yc=new Set(["RegularElement","SvelteElement"]);function jt(e){return Jc.has(e)}function Ht(e){return Yc.has(e)}var Qc=/\n/g;function Yi(e,t){if(!t||typeof t!=="object"||!("type"in t))return;if(Qe(t))return Zi(e,t);if(t.type==="ArrayExpression")return es(e,t);return}function Qi(e,t){if(!t||typeof t!=="object"||!("type"in t))return"any";if(Ne(t))return e.findVariableTypeAndDescription(t.name)?.type??"any";if(st(t)){let n=t.value;return n===null?"null":typeof n}if(Qe(t))return Zi(e,t);if(t.type==="ArrayExpression")return es(e,t);return"any"}function Zi(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:Qi(e,r.value)})}return yn(n)}function es(e,t){let n=new Set(t.elements.filter((r)=>r!=null).map((r)=>Qi(e,r)));if(n.size===0)return"any[]";if(n.size===1)return`${[...n][0]}[]`;return`(${[...n].join(" | ")})[]`}function sr(e){return typeof e==="string"?JSON.stringify(e):String(e)}function pt(e,{name:t,detail:n,has_argument:r,description:i,deprecated:o,tags:s,internal:p,source:u}){if(t===void 0)return;let m=!r&&!n?"null":Ve(n),f=i,g=e.events.get(t);if(g?.type==="forwarded")e.events.set(t,{type:"dispatched",name:t,detail:m,description:f||g.description,deprecated:o??g.deprecated,tags:s??g.tags,...p||g.internal?{internal:!0}:{},source:u||g.source});else if(g){let b=g.tags??s;e.events.set(t,{...g,detail:g.detail===void 0?m:g.detail,description:g.description||f,deprecated:g.deprecated??o,tags:b,...g.internal||p?{internal:!0}:{},source:u||g.source})}else e.events.set(t,{type:"dispatched",name:t,detail:m,description:f,deprecated:o,tags:s,...p?{internal:!0}:{},source:u})}function ts(e,t){let n=t.arguments[0],r=Yn(n,"CustomEvent");if(!r&&!Yn(n,"Event"))return;let i=n.arguments[0],o=st(i)?i.value:void 0;if(o==null)return;let s=r?n.arguments[1]:void 0,p=!1,u;if(Qe(s)){let m=s.properties.find((f)=>f.type==="Property"&&Ne(f.key)&&f.key.name==="detail");if(m?.type==="Property")p=!0,u=st(m.value)?m.value.value:void 0}return pt(e,{name:String(o),detail:u==null?"":sr(u),has_argument:p,source:se(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:u})=>{let m=p?"?":"",f=s||"";if(u&&f)f=`${f} @default ${u}`;else if(u)f=`@default ${u}`;if(f){if(n)return`${f.includes(`
4
+ `)?`/**
5
+ * ${f.split(`
6
+ `).join(`
7
+ * `)}
8
+ */`:`/** ${f} */`}
9
+ ${i}${m}: ${o};`;return`/** ${f.replace(Qc," ")} */ ${i}${m}: ${o};`}return`${i}${m}: ${o};`}).join(n?`
5
10
  `:" ");return n?`{
6
11
  ${r}
7
- }`:`{ ${r} }`}var Oc=/[A-Za-z_$][\w$]*/g;function Bc(e,t){if(!t)return!1;let n=new Set(t[0].split(",").map((r)=>r.trim()));for(let[r]of e.matchAll(Oc))if(n.has(r))return!0;return!1}function Zn(e,t){if(t===void 0)return;return e.runesPropsDeclarationMetadataByDeclaratorStart.get(t)}function zi(e,t,n){return Zn(e,t)?.props.get(n)}function Xi(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 Ji(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 Ji(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 Yi(e,t){let n=t?.start,r=t?.end;if(n===void 0||r===void 0)return;return se(e,n,r)?.trim()}function _e(e,t,n,r,i=new Set){if(!t?.type)return;switch(t.type){case"TSInterfaceDeclaration":_e(e,{type:"TSTypeLiteral",members:t.body?.body},n,r,i);return;case"TSTypeAliasDeclaration":case"TSParenthesizedType":case"TSTypeAnnotation":_e(e,t.typeAnnotation,n,r,i);return;case"TSIntersectionType":case"TSUnionType":for(let o of t.types??[])_e(e,o,n,r,i);return;case"TSTypeLiteral":for(let o of t.members??[]){if(o?.type!=="TSPropertySignature")continue;_e(e,o.typeAnnotation?.typeAnnotation,n,r,i)}return;case"TSTypeReference":{let o=Ji(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),_e(e,s.node,n,r,i),i.delete(o)}if("typeParameters"in t&&t.typeParameters&&typeof t.typeParameters==="object"){let s=t.typeParameters;for(let p of s.params??[])_e(e,p,n,r,i)}return}case"TSArrayType":case"TSRestType":case"TSOptionalType":case"TSIndexedAccessType":case"TSTypeOperator":case"TSExpressionWithTypeArguments":case"TSTupleType":case"TSConditionalType":case"TSInferType":case"TSMappedType":case"TSFunctionType":case"TSConstructorType":case"TSTypeQuery":case"TSImportType":case"TSLiteralType":case"TSTypePredicate":case"TSNamedTupleMember":break;default:break}for(let o in t){let s=t[o];if(!s||typeof s!=="object")continue;if(Array.isArray(s)){for(let p of s){if(!p||typeof p!=="object"||!("type"in p))continue;_e(e,p,n,r,i)}continue}if("type"in s)_e(e,s,n,r,i)}}function Fc(e,t){let n=new Map;for(let r of Array.from(t).sort()){let i=e.typeImportBindingsByLocalName.get(r),o=i?void 0:e.valueImportBindingsByLocalName.get(r),s=i??(o?{importedName:o.importedName,localName:o.localName,source:o.source,specifierType:"named"}:void 0);if(!s)continue;let p=n.get(s.source)??{default:[],named:[],namespace:[]};if(s.specifierType==="default")p.default.push(s.localName);else if(s.specifierType==="namespace")p.namespace.push(s.localName);else p.named.push({imported:s.importedName,local:s.localName});n.set(s.source,p)}return Array.from(n.entries()).sort(([r],[i])=>r.localeCompare(i)).map(([r,i])=>{if(i.namespace.length>0)return i.namespace.map((u)=>`import type * as ${u} from "${r}";`).join(`
8
- `);let o=i.named.map(({imported:u,local:m})=>{if(!u||u===m)return m;return`${u} as ${m}`}),s=i.default[0],p=o.length>0?`{ ${o.join(", ")} }`:"";if(s&&p)return`import type ${s}, ${p} from "${r}";`;if(s)return`import type ${s} from "${r}";`;return`import type ${p} from "${r}";`})}function Et(e,t){if(t)e.additionalTypeDependencyNodes.push(t)}function Vc(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 Qi(e,t){let n=Vc(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 er(e,t){let n=!1,r=[];for(let o of t.params??[]){if(o.type==="RestElement"){let y=o.argument?.name??"rest",T=mt(e,o.typeAnnotation);if(T)n=!0;Et(e,o.typeAnnotation?.typeAnnotation),r.push(`...${y}: ${T??"any[]"}`);continue}let s=o.type==="AssignmentPattern",p=s?o.left:o,u=p?.name??"arg",m=mt(e,p?.typeAnnotation);if(m)n=!0;Et(e,p?.typeAnnotation?.typeAnnotation);let d=s||o.optional===!0;r.push(`${u}${d?"?":""}: ${m??"any"}`)}let i=mt(e,t.returnType);if(i)n=!0;return Et(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)_e(e,d,o,s);let p=e.typedRunesPropsDeclarations.length===1?e.typedRunesPropsDeclarations[0]:void 0,u=p?.canonicalType;if(p&&u){for(let d of p.referencedImportedTypes)o.add(d);for(let d of p.referencedLocalTypes)s.add(d)}if(!u&&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{...u?{canonicalPropsType:u}:{},canonicalPropNames:p&&u?Array.from(p.props.keys()).sort():[],localTypeDeclarations:m,typeImportStatements:Fc(e,o),referencesComponentGenerics:u?Bc(u,e.generics):!1,...r}}var jc=/^[A-Za-z_$][\w$]*/,$c=/[A-Za-z_$][\w$]*/g,es=/^(?: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 ts(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(es.test(i))i=i.replace(es,"");return i.match(jc)?.[0]??r}).join(", "),t.join(", ")]}function ns(e,t,n){let r=e.scriptGenericsAttribute?.value;if(!r)return;for(let[i]of r.matchAll($c)){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),_e(e,o.node,t,n)}}var tr=/^\s+/,is=/\s/,Hc=/^@[^\s/]+(?=\s|$)/,qc=/^@(\S+)\s*/;function rs(e){let t=0;while(t<e.length){let n=e.charCodeAt(t);if(n!==32&&n!==9&&n!==13&&n!==10&&!is.test(e[t]))break;t++}return t}function Uc(e,t){let n=e.slice(rs(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,rs(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 Gc(e,t,n){let r=n>t&&e.charCodeAt(n-1)===13?n-1:n;return e.slice(t,r)}function Wc(e){let t=[],n=0;while(!0){let r=e.indexOf("/**",n);if(r===-1)break;let i=e.lastIndexOf(`
12
+ }`:`{ ${r} }`}var Zc=/[A-Za-z_$][\w$]*/g;function ep(e,t){if(!t)return!1;let n=new Set(t[0].split(",").map((r)=>r.trim()));for(let[r]of e.matchAll(Zc))if(n.has(r))return!0;return!1}function ar(e,t){if(t===void 0)return;return e.runesPropsDeclarationMetadataByDeclaratorStart.get(t)}function ns(e,t,n){return ar(e,t)?.props.get(n)}function rs(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 is(e){if(!e||typeof e!=="object"||!("type"in e))return;if(e.type==="Identifier"&&"name"in e&&typeof e.name==="string")return e.name;if(e.type==="TSQualifiedName"&&"left"in e&&e.left&&typeof e.left==="object")return is(e.left);return}function yt(e,t){let n=t?.start,r=t?.end;if(n===void 0||r===void 0)return;return pe(e,n+1,r)?.trim()}function ss(e,t){let n=t?.start,r=t?.end;if(n===void 0||r===void 0)return;return pe(e,n,r)?.trim()}function Oe(e,t,n,r,i=new Set){if(!t?.type)return;switch(t.type){case"TSInterfaceDeclaration":Oe(e,{type:"TSTypeLiteral",members:t.body?.body},n,r,i);return;case"TSTypeAliasDeclaration":case"TSParenthesizedType":case"TSTypeAnnotation":Oe(e,t.typeAnnotation,n,r,i);return;case"TSIntersectionType":case"TSUnionType":for(let o of t.types??[])Oe(e,o,n,r,i);return;case"TSTypeLiteral":for(let o of t.members??[]){if(o?.type!=="TSPropertySignature")continue;Oe(e,o.typeAnnotation?.typeAnnotation,n,r,i)}return;case"TSTypeReference":{let o=is(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),Oe(e,s.node,n,r,i),i.delete(o)}if("typeParameters"in t&&t.typeParameters&&typeof t.typeParameters==="object"){let s=t.typeParameters;for(let p of s.params??[])Oe(e,p,n,r,i)}return}case"TSArrayType":case"TSRestType":case"TSOptionalType":case"TSIndexedAccessType":case"TSTypeOperator":case"TSExpressionWithTypeArguments":case"TSTupleType":case"TSConditionalType":case"TSInferType":case"TSMappedType":case"TSFunctionType":case"TSConstructorType":case"TSTypeQuery":case"TSImportType":case"TSLiteralType":case"TSTypePredicate":case"TSNamedTupleMember":break;default:break}for(let o in t){let s=t[o];if(!s||typeof s!=="object")continue;if(Array.isArray(s)){for(let p of s){if(!p||typeof p!=="object"||!("type"in p))continue;Oe(e,p,n,r,i)}continue}if("type"in s)Oe(e,s,n,r,i)}}function tp(e,t){let n=new Map;for(let r of Array.from(t).sort()){let i=e.typeImportBindingsByLocalName.get(r),o=i?void 0:e.valueImportBindingsByLocalName.get(r),s=i??(o?{importedName:o.importedName,localName:o.localName,source:o.source,specifierType:"named"}:void 0);if(!s)continue;let p=n.get(s.source)??{default:[],named:[],namespace:[]};if(s.specifierType==="default")p.default.push(s.localName);else if(s.specifierType==="namespace")p.namespace.push(s.localName);else p.named.push({imported:s.importedName,local:s.localName});n.set(s.source,p)}return Array.from(n.entries()).sort(([r],[i])=>r.localeCompare(i)).map(([r,i])=>{if(i.namespace.length>0)return i.namespace.map((u)=>`import type * as ${u} from "${r}";`).join(`
13
+ `);let o=i.named.map(({imported:u,local:m})=>{if(!u||u===m)return m;return`${u} as ${m}`}),s=i.default[0],p=o.length>0?`{ ${o.join(", ")} }`:"";if(s&&p)return`import type ${s}, ${p} from "${r}";`;if(s)return`import type ${s} from "${r}";`;return`import type ${p} from "${r}";`})}function Pt(e,t){if(t)e.additionalTypeDependencyNodes.push(t)}function np(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 as(e,t){let n=np(t);if(n)return n;if(t.start===void 0||t.end===void 0)return;let r=pe(e,t.start,t.end)?.trim();return r?`declare ${r}`:void 0}function or(e,t){let n=!1,r=[];for(let o of t.params??[]){if(o.type==="RestElement"){let g=o.argument?.name??"rest",b=yt(e,o.typeAnnotation);if(b)n=!0;Pt(e,o.typeAnnotation?.typeAnnotation),r.push(`...${g}: ${b??"any[]"}`);continue}let s=o.type==="AssignmentPattern",p=s?o.left:o,u=p?.name??"arg",m=yt(e,p?.typeAnnotation);if(m)n=!0;Pt(e,p?.typeAnnotation?.typeAnnotation);let f=s||o.optional===!0;r.push(`${u}${f?"?":""}: ${m??"any"}`)}let i=yt(e,t.returnType);if(i)n=!0;return Pt(e,t.returnType?.typeAnnotation),{signature:`(${r.join(", ")}) => ${i??"any"}`,hasAnnotations:n}}function os(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 f of e.additionalTypeDependencyNodes)Oe(e,f,o,s);let p=e.typedRunesPropsDeclarations.length===1?e.typedRunesPropsDeclarations[0]:void 0,u=p?.canonicalType;if(p&&u){for(let f of p.referencedImportedTypes)o.add(f);for(let f of p.referencedLocalTypes)s.add(f)}if(!u&&o.size===0&&s.size===0)return i?{canonicalPropNames:[],localTypeDeclarations:[],typeImportStatements:[],...r}:void 0;let m=Array.from(s).map((f)=>e.localTypeDeclarationsByName.get(f)).filter((f)=>f!==void 0).sort((f,g)=>f.start-g.start).map((f)=>f.code);return{...u?{canonicalPropsType:u}:{},canonicalPropNames:p&&u?Array.from(p.props.keys()).sort():[],localTypeDeclarations:m,typeImportStatements:tp(e,o),referencesComponentGenerics:u?ep(u,e.generics):!1,...r}}var rp=/^[A-Za-z_$][\w$]*/,ip=/[A-Za-z_$][\w$]*/g,cs=/^(?:const|in|out)\s+/;function ze(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 ps(e){let t=ze(e).map((r)=>r.trim()).filter((r)=>r.length>0);if(t.length===0)return null;return[t.map((r)=>{let i=r;while(cs.test(i))i=i.replace(cs,"");return i.match(rp)?.[0]??r}).join(", "),t.join(", ")]}function ls(e,t,n){let r=e.scriptGenericsAttribute?.value;if(!r)return;for(let[i]of r.matchAll(ip)){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),Oe(e,o.node,t,n)}}var cr=/^\s+/,ds=/\s/,sp=/^@[^\s/]+(?=\s|$)/,ap=/^@(\S+)\s*/;function us(e){let t=0;while(t<e.length){let n=e.charCodeAt(t);if(n!==32&&n!==9&&n!==13&&n!==10&&!ds.test(e[t]))break;t++}return t}function op(e,t){let n=e.slice(us(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,us(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 cp(e,t,n){let r=n>t&&e.charCodeAt(n-1)===13?n-1:n;return e.slice(t,r)}function pp(e){let t=[],n=0;while(!0){let r=e.indexOf("/**",n);if(r===-1)break;let i=e.lastIndexOf(`
9
14
  `,r-1)+1;if(e.charCodeAt(r+3)===42||e.slice(i,r).trim()!==""){n=r+1;continue}let o=[],s=i,p=!1,u=0;while(s<=e.length){let m=e.indexOf(`
10
- `,s),d=m===-1?e.length:m,y=Gc(e,s,d),{indent:T,separator:S,content:P}=Uc(y,o.length===0);o.push({raw:y,start:s,number:o.length,indent:T,separator:S,content:P});let w=y.trimEnd();if(w.endsWith("*/")){p=!0,u=s+w.length,n=d;break}if(m===-1)break;s=m+1}if(!p)break;t.push({start:r,end:u,lines:o})}return t}function Kc(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 zc(e){let t=[[]],n=!1;for(let r of e){if(Hc.test(r.content)&&!n)t.push([r]);else t[t.length-1].push(r);if(Xc(r.content,"```")%2===1)n=!n}return t}function Xc(e,t){let n=0,r=e.indexOf(t);while(r!==-1)n++,r=e.indexOf(t,r+t.length);return n}function ss(e){return e.map((t)=>t.indent+t.content).join(`
11
- `)}function Jc(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 u=e[o].content,m=0;for(let d of u){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((u,m)=>{let d=n+m,y=e[d].content.slice(0,u);return e[d].content=e[d].content.slice(u).replace(tr,""),m===0?y:e[d].indent+y}).join(`
12
- `).slice(1,-1),endIndex:s}}function Yc(e){let t=e.content.match(tr)?.[0]??"",n=e.content.slice(t.length),r=0,i=0;for(let m of n){if(r===0&&is.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,p=!1,u;if(o.startsWith("[")&&o.endsWith("]")){p=!0;let d=o.slice(1,-1).split("=");if(s=d[0].trim(),d.length>1)u=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(tr,""),{name:s,optional:p,default:u}}function Qc(e){let t=e[0],n=t.content.match(qc),r=n?n[1]:"",i=n?t.content.slice(n[0].length):t.content,o=i.trimEnd(),s=e.slice(1).map((S)=>S.separator+S.content),p=(o?[o,...s]:s).join(`
13
- `);t.content=i,t.tag=r;let u=Jc(e,0),m=u?.type??"",d=0;if(u){d=u.endIndex;while(d<e.length-1&&e[d].content.trim()==="")d++}let y=Yc(e[d]),T=ss(e.slice(u?u.endIndex:0));return{tag:r,name:y?.name??"",type:m,optional:y?.optional??!1,default:y?.default,description:T,raw:p,lines:e}}function Zc(e,t,n){let r=Kc(e);r.forEach((s,p)=>{s.number=p});let i=zc(r),o=i.slice(1).map(Qc);return{description:ss(i[0]),tags:o,start:t,end:n,lines:r}}function nr(e){return Wc(e).map(({start:t,end:n,lines:r})=>Zc(r,t,n))}var ep=null;function tp(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=pn(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 np(e,t,n){if(!Ae(n))return null;let r=Bt(e,n.name);if(Xe(r))return rr(e,t,r).slot_props;let i=t.findVariableTypeAndDescription(n.name);if(!i)return null;let o=ln(i.type);if(!o)return null;let s={};for(let p of o)s[p.name]={value:p.type,replace:!1};return s}function rr(e,t,n){let r={},i=!1;for(let o of n.properties){if(o.type==="SpreadElement"){let p=np(e,t,o.argument);if(p)Object.assign(r,p);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]=tp(e,t,o.value)}return{slot_props:r,hasUnresolvedSpread:i}}function rp(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 as(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=rp(e,r.callee);if(!i)return null;return{...i,arguments:r.arguments}}function jt(e,{slot_name:t,slot_props:n,slot_props_unresolved_spread:r,slot_fallback:i,slot_description:o,slot_deprecated:s,slot_tags:p,slot_internal:u,source:m}){let d=t===void 0||t==="",y=d?ep:t??"",T=Re(i),S=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:T,slot_props:w.slot_props===void 0?S:w.slot_props,slot_props_unresolved_spread:w.slot_props_unresolved_spread||r,description:w.description||P,deprecated:w.deprecated??s,tags:w.tags||p,...w.internal||u?{internal:!0}:{},source:m||w.source})}else e.slots.set(y,{name:y,default:d,fallback:T,slot_props:S,slot_props_unresolved_spread:r,description:P,deprecated:s,tags:p,...u?{internal:!0}:{},source:m})}var ip=/\s*=\s*/;function os(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(ip," = ")).join(", ");return`${n}<${i}>`}var ir=/^\s*$/,sp=/;$/,ap=/^-\s*/;function Je(e){if(e===void 0)return;let t=e.replace(ap,"").trim();return t===""?"":t}function yt(e){if(!e||e.length===0)return;return e[0].content}var cs=new Set(["since","example","see"]),op=new Set(["bindable","default","required"]);function cp(e){let t=e.trim();return t===""?!0:t}function ps(e,t){return cp(`${e??""}${t?` ${t}`:""}`)}function pp(e){let t=e.trim().replace(sp,"").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 lp(e){let t=e;if(!t.startsWith("/*"))t=`/*${t}`;if(!t.endsWith("*/"))t+="*/";return t}var up=new Set(["type","param","returns","return","extends","extendProps","restProps","slot","snippet","event","typedef","callback","bindable","deprecated","ignore","internal","csspart","cssprop","cssproperty"]);function sr(e,t){let n=e.parsedJsDocByText.get(t);if(n===void 0)n=nr(t),e.parsedJsDocByText.set(t,n);return n}function ar(e){let t=e[0]?.tags??[],n,r=[],i,o,s,p=!1,u=[],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??=ps(y.name,y.description);else if(y.tag==="ignore"||y.tag==="internal")p=!0;else if(y.tag==="sveld-ignore")d.push(y.name);else if(cs.has(y.tag))m.push(y);else if(y.tag==="bindable"){if(y.type)continue;let T=`${y.name}${y.description?` ${y.description}`:""}`.trim();if(T==="readonly"||T==="writable")o??=T}else if(!up.has(y.tag))u.push(y);return{type:n,param:r,returns:i,binding:o,deprecated:s,internal:p,additional:u,passthrough:m,ignore:d,description:e[0]?.description}}function dp(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 fp(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 ls(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(ir.test(o))return i}return}function hp(e){let t=new Set;for(let n of e.funcDecls.values()){let{leadingComments:r,start:i}=n,o=ls(e,r,i);if(o)t.add(o.start)}return t}function ct(e,t,n){if(!n?.leadingComments)return;let r=ls(e,n.leadingComments,n.start);if(!r)return;return mp(e,t,[r])}function us(e,t,n){if(!n?.leadingComments)return;return ct(e,t,n)}function mp(e,t,n){if(!n)return;let r=fp(n);if(!r)return;let i=dp(e,r)??sr(e,lp(r.value)),{type:o,param:s,returns:p,binding:u,deprecated:m,internal:d,additional:y,passthrough:T,ignore:S,description:P}=ar(i),w,A,F,H;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(p)F=t.aliasType(p.type);let N=Re(P?.trim());if(N||y.length>0){let I=[];if(N)I.push(N);for(let pe of y){let ge=`@${pe.tag}${pe.name?` ${pe.name}`:""}${pe.description?` ${pe.description}`:""}`;I.push(ge)}H=I.join(`
14
- `)}let O=T.length>0?T.map((I)=>({name:I.tag,body:I.raw})):void 0;return{type:w,params:A,returnType:F,description:H,binding:u,deprecated:m,tags:O,sveldIgnore:S.length>0?S:void 0,internal:d}}function ds(e,t,n=e.source){if(!n)return;let r=!1,i=!1,o=!1,s=new Set,p=()=>{if(r&&i&&!o){o=!0;let 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.`)}},u=(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 F=We(e.generics[0]).map((H)=>H.trim()).indexOf(P.trim());if(F!==-1){let H=We(e.generics[1]).map((N)=>N.trim());H[F]=w,e.generics=[e.generics[0],H.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,F)=>{let H=P.findIndex((N)=>N.name===w.name);if(H===-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.`,F),P[H]=w}},T=hp(e),S=nr(n);for(let P of S)e.jsDocBlocksByStart.set(P.start,P);for(let{tags:P,description:w,lines:A,start:F}of S){let H=T.has(F),N,O,I,pe,ge=!1,xe,a,c=[],l=[],f=[],g,b,x,C,v=[],E=!1,k=[],_,D,q,U=[],W=!1,re=[],j,Y,le=!1,ee=!0,Q=[],ht,He=!1,Ue=new Map,on=new Set,Rt=new Set;for(let B of P)if(B.lines.length>0)on.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 Hn=(B)=>{if(!B||B.length===0)return;let Ce=B[0].number,G=[],we=[],ze=!1;for(let Z=Ce-1;Z>=0;Z--){if(on.has(Z))break;let Ne=Ue.get(Z);if(Ne)G.unshift(Ne),we.unshift(Z),ze=!0;else if(ze){let te=A[Z];if(!(!te||!te.tag&&(!te.content||te.content.trim()==="")))break}}if(G.length===0)return;for(let Z of we)Rt.add(Z);return G.join(`
15
- `).trim()},bi=()=>{if(N!==void 0){let B=O&&O!=="object"&&O!=="Object"?O:void 0,Ce;if(B)Ce=B;else if(f.length>0)Ce=fn(f,N,!0);else Ce=O||"";if(a!==void 0){let G;for(let Z of P){let Ne=Z.lines[0]?.number;if(typeof Ne!=="number")continue;if(Ne<=a)continue;if(Z.tag==="property"||Z.tag==="type")continue;G=Ne;break}let we=[],ze=Array.from(Ue.keys()).sort((Z,Ne)=>Z-Ne);for(let Z of ze){if(Z<=a)continue;if(G!==void 0&&Z>=G)continue;if(Rt.has(Z))continue;let te=Ue.get(Z)?.trim();if(te)we.push(te),Rt.add(Z)}if(we.length>0){let Z=we.join(`
15
+ `,s),f=m===-1?e.length:m,g=cp(e,s,f),{indent:b,separator:T,content:P}=op(g,o.length===0);o.push({raw:g,start:s,number:o.length,indent:b,separator:T,content:P});let k=g.trimEnd();if(k.endsWith("*/")){p=!0,u=s+k.length,n=f;break}if(m===-1)break;s=m+1}if(!p)break;t.push({start:r,end:u,lines:o})}return t}function lp(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 up(e){let t=[[]],n=!1;for(let r of e){if(sp.test(r.content)&&!n)t.push([r]);else t[t.length-1].push(r);if(dp(r.content,"```")%2===1)n=!n}return t}function dp(e,t){let n=0,r=e.indexOf(t);while(r!==-1)n++,r=e.indexOf(t,r+t.length);return n}function fs(e){return e.map((t)=>t.indent+t.content).join(`
16
+ `)}function fp(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 u=e[o].content,m=0;for(let f of u){if(f==="{")r++;else if(f==="}")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((u,m)=>{let f=n+m,g=e[f].content.slice(0,u);return e[f].content=e[f].content.slice(u).replace(cr,""),m===0?g:e[f].indent+g}).join(`
17
+ `).slice(1,-1),endIndex:s}}function hp(e){let t=e.content.match(cr)?.[0]??"",n=e.content.slice(t.length),r=0,i=0;for(let m of n){if(r===0&&ds.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,p=!1,u;if(o.startsWith("[")&&o.endsWith("]")){p=!0;let f=o.slice(1,-1).split("=");if(s=f[0].trim(),f.length>1)u=f.slice(1).join("=").trim();if(!s)return null}if(s.length>1&&(s[0]==='"'||s[0]==="'")&&s[s.length-1]===s[0])s=s.slice(1,-1);return e.content=n.slice(i).replace(cr,""),{name:s,optional:p,default:u}}function mp(e){let t=e[0],n=t.content.match(ap),r=n?n[1]:"",i=n?t.content.slice(n[0].length):t.content,o=i.trimEnd(),s=e.slice(1).map((T)=>T.separator+T.content),p=(o?[o,...s]:s).join(`
18
+ `);t.content=i,t.tag=r;let u=fp(e,0),m=u?.type??"",f=0;if(u){f=u.endIndex;while(f<e.length-1&&e[f].content.trim()==="")f++}let g=hp(e[f]),b=fs(e.slice(u?u.endIndex:0));return{tag:r,name:g?.name??"",type:m,optional:g?.optional??!1,default:g?.default,description:b,raw:p,lines:e}}function yp(e,t,n){let r=lp(e);r.forEach((s,p)=>{s.number=p});let i=up(r),o=i.slice(1).map(mp);return{description:fs(i[0]),tags:o,start:t,end:n,lines:r}}function pr(e){return pp(e).map(({start:t,end:n,lines:r})=>yp(r,t,n))}var gp=null;function xp(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=dn(e,t,n);else if((n.type==="ObjectExpression"||n.type==="TemplateLiteral")&&"start"in n&&"end"in n&&typeof n.start==="number"&&typeof n.end==="number")r.value=pe(e,n.start,n.end);return r}function bp(e,t,n){if(!Ne(n))return null;let r=$t(e,n.name);if(Qe(r))return lr(e,t,r).slot_props;let i=t.findVariableTypeAndDescription(n.name);if(!i)return null;let o=fn(i.type);if(!o)return null;let s={};for(let p of o)s[p.name]={value:p.type,replace:!1};return s}function lr(e,t,n){let r={},i=!1;for(let o of n.properties){if(o.type==="SpreadElement"){let p=bp(e,t,o.argument);if(p)Object.assign(r,p);else i=!0,ce(e,"spread-unresolved","slot_props",`Slot props spread a value sveld can't resolve; its shape is widened to "Record<string, any>".`,se(e,o));continue}if(o.type!=="Property"||o.computed)continue;let s=t.getPropertyName(o.key);if(!s)continue;r[s]=xp(e,t,o.value)}return{slot_props:r,hasUnresolvedSpread:i}}function Tp(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 hs(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=Tp(e,r.callee);if(!i)return null;return{...i,arguments:r.arguments}}function qt(e,{slot_name:t,slot_props:n,slot_props_unresolved_spread:r,slot_fallback:i,slot_description:o,slot_deprecated:s,slot_tags:p,slot_internal:u,source:m}){let f=t===void 0||t==="",g=f?gp:t??"",b=Ve(i),T=n===void 0||n===""?void 0:n,P=o?.trim()||void 0;if(e.slots.has(g)){let k=e.slots.get(g);if(k)e.slots.set(g,{...k,default:k.default??f,fallback:b,slot_props:k.slot_props===void 0?T:k.slot_props,slot_props_unresolved_spread:k.slot_props_unresolved_spread||r,description:k.description||P,deprecated:k.deprecated??s,tags:k.tags||p,...k.internal||u?{internal:!0}:{},source:m||k.source})}else e.slots.set(g,{name:g,default:f,fallback:b,slot_props:T,slot_props_unresolved_spread:r,description:P,deprecated:s,tags:p,...u?{internal:!0}:{},source:m})}function gn(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 xn(e){let t=e,n=t.type==="Program"?t.body:t.content?.body??t.body;return Array.isArray(n)?n:void 0}function ms(e){let t=new Map,n=e?xn(e):void 0;if(!n)return t;for(let r of n){let i=r;if(i.type!=="ImportDeclaration"||i.importKind==="type")continue;let o=i.source?.value;if(typeof o!=="string")continue;for(let s of i.specifiers??[]){let p=s.local?.name;if(!p||s.importKind==="type")continue;let u;if(s.type==="ImportDefaultSpecifier")u="default";else if(s.type==="ImportNamespaceSpecifier")u="*";else u=s.imported?.name??String(s.imported?.value??p);t.set(p,{from:o,imported:u})}}return t}function ur(e,t){if(!t)return;let n=xn(t);if(!n)return;for(let r of n){let i=r;if(i.type==="ImportDeclaration"){gn(e,i);continue}let o=i.type==="ExportNamedDeclaration"&&i.declaration?i.declaration:i;if(o.type==="FunctionDeclaration"){let s=o;if(s.id?.name)e.funcDecls.set(s.id.name,s)}}}var Ep=/\s*=\s*/;function ys(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=ze(r).map((o)=>o.trim().replace(Ep," = ")).join(", ");return`${n}<${i}>`}var fr=/^\s*$/,Sp=/;$/,Cp=/^-\s*/;function vp(e){return e.split(`
19
+ `).map((t)=>t.trim()).join(`
20
+ `)}function kt(e){if(e===void 0)return;let t=e.replace(Cp,"").trim();return t===""?"":t}var gs=new Set(["restProps","slot","snippet","event","typedef","callback"]),dr=new Set(["property","type"]);function bn(e){if(!e||e.length===0)return;return e[0].content}var xs=new Set(["since","example","see"]),Ap=new Set(["bindable","default","required"]);function Pp(e){let t=e.trim();return t===""?!0:t}function bs(e,t){return Pp(`${e??""}${t?` ${t}`:""}`)}function kp(e){let t=e.trim().replace(Sp,"").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 wp(e){let t=e;if(!t.startsWith("/*"))t=`/*${t}`;if(!t.endsWith("*/"))t+="*/";return t}var Np=new Set(["type","param","returns","return","extends","extendProps","restProps","slot","snippet","event","typedef","callback","bindable","deprecated","ignore","internal","csspart","cssprop","cssproperty"]);function hr(e,t){let n=e.parsedJsDocByText.get(t);if(n===void 0)n=pr(t),e.parsedJsDocByText.set(t,n);return n}function mr(e){let t=e[0]?.tags??[],n,r=[],i,o,s,p=!1,u=[],m=[],f=[];for(let g of t)if(g.tag==="type")n=g;else if(g.tag==="param")r.push(g);else if(g.tag==="returns"||g.tag==="return")i=g;else if(g.tag==="deprecated")s??=bs(g.name,g.description);else if(g.tag==="ignore"||g.tag==="internal")p=!0;else if(g.tag==="sveld-ignore")f.push(g.name);else if(xs.has(g.tag))m.push(g);else if(g.tag==="bindable"){if(g.type)continue;let b=`${g.name}${g.description?` ${g.description}`:""}`.trim();if(b==="readonly"||b==="writable")o??=b}else if(!Np.has(g.tag))u.push(g);return{type:n,param:r,returns:i,binding:o,deprecated:s,internal:p,additional:u,passthrough:m,ignore:f,description:e[0]?.description}}function _p(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 Ip(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 Ts(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(fr.test(o))return i}return}function Dp(e){let t=new Set,n=(i)=>{let{leadingComments:o,start:s}=i,p=Ts(e,o,s);if(p)t.add(p.start)};for(let i of e.funcDecls.values())n(i);let r=[{root:e.parsed?.module,isModule:!0},{root:e.parsed?.instance,isModule:!1}];for(let{root:i,isModule:o}of r)for(let s of(i&&xn(i))??[]){let p=s,u=p.type==="ExportNamedDeclaration",m=u?p.declaration:p;if(m?.type==="FunctionDeclaration"){if(u)n(p)}else if(m?.type==="VariableDeclaration"&&(o||!u)&&m.declarations?.length===1&&Lp.has(m.declarations[0].init?.type??""))n(p)}return t}var Lp=new Set(["ArrowFunctionExpression","FunctionExpression"]);function Ze(e,t,n){if(!n?.leadingComments)return;let r=Ts(e,n.leadingComments,n.start);if(!r)return;return Rp(e,t,[r])}function Es(e,t,n){if(!n?.leadingComments)return;return Ze(e,t,n)}function Ss(e,t,n){let r=e;if(t)r=`${e} extends ${t}`;if(n)r+=` = ${n}`;return r}function Rp(e,t,n){if(!n)return;let r=Ip(n);if(!r)return;let i=_p(e,r)??hr(e,wp(r.value)),{type:o,param:s,returns:p,binding:u,deprecated:m,internal:f,additional:g,passthrough:b,ignore:T,description:P}=mr(i),k,_,V,G;if(o)k=t.aliasType(o.type);if(s.length>0)_=s.filter((z)=>!z.name.includes(".")).map((z)=>({name:z.name,type:t.aliasType(z.type),description:kt(vp(z.description)),optional:z.optional||!1}));if(p)V=t.aliasType(p.type);let A,O=g;if(typeof r.start==="number"&&e.functionDocCommentStarts.has(r.start)){let z=g.filter((Y)=>Y.tag==="template"&&Y.name);if(z.length>0)A=z.map((Y)=>Ss(Y.name,t.aliasType(Y.type),Y.default)).join(", "),O=g.filter((Y)=>Y.tag!=="template")}let I=Ve(P?.trim());if(I||O.length>0){let z=[];if(I)z.push(I);for(let Y of O){let a=`@${Y.tag}${Y.name?` ${Y.name}`:""}${Y.description?` ${Y.description}`:""}`;z.push(a)}G=z.join(`
21
+ `)}let re=b.length>0?b.map((z)=>({name:z.tag,body:z.raw})):void 0;return{type:k,params:_,returnType:V,description:G,binding:u,deprecated:m,tags:re,sveldIgnore:T.length>0?T:void 0,internal:f,typeParameters:A}}function Cs(e,t,n=e.source){if(!n)return;let r=!1,i=!1,o=!1,s=new Set,p=()=>{if(r&&i&&!o){o=!0;let 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.`)}},u=(P,k)=>{if(s.has(P))ce(e,"generics-conflict",P,`Duplicate generic name "${P}".`,k);else s.add(P)},m=(P,k)=>{if(e.generics){let V=ze(e.generics[0]).map((G)=>G.trim()).indexOf(P.trim());if(V!==-1){let G=ze(e.generics[1]).map((A)=>A.trim());G[V]=k,e.generics=[e.generics[0],G.join(", ")];return}}t.accumulateGeneric(P,k)},f=(P,k)=>{if(e.typedefs.has(P))ce(e,"typedef-duplicate",P,`Duplicate typedef/callback name "${P}"; the later declaration overwrites the earlier one.`,k)},g=(P,k,_,V)=>{let G=P.findIndex((A)=>A.name===k.name);if(G===-1)P.push(k);else{let A=_?` of "${_}"`:"";ce(e,"property-duplicate",k.name,`Duplicate property "${k.name}"${A}; the later declaration overwrites the earlier one.`,V),P[G]=k}},b=n.includes("@template")?Dp(e):new Set;e.functionDocCommentStarts=b;let T=pr(n);for(let P of T)e.jsDocBlocksByStart.set(P.start,P);for(let{tags:P,description:k,lines:_,start:V}of T){let G=b.has(V),A,O,I,re,z=!1,Y,a,c=[],l=[],d=[],y,x,E,C,S=[],v=!1,w=[],N,D,H,U=[],Z=!1,ae=[],ie,F,fe=!1,Q=!0,ne=[],Le,Se=!1,Ye=new Map,St=new Set,mt=new Set;for(let B of P)if(B.lines.length>0)St.add(B.lines[0].number);let zn=new Set,Xn=!1;for(let B of _){if(!B.tag&&B.content&&B.content.trim()!=="}")Ye.set(B.number,B.content);if(B.tag!==void 0)Xn=!0;else if(Xn&&B.indent&&B.content.trim())zn.add(B.number);else Xn=!1}let fc=(B)=>{if(!B||B.length===0)return;let te=B[0].number,ye=[],q=[],Ce=!1;for(let ee=te-1;ee>=0;ee--){if(St.has(ee)||zn.has(ee))break;let he=Ye.get(ee);if(he)ye.unshift(he),q.unshift(ee),Ce=!0;else if(Ce){let ve=_[ee];if(!(!ve||!ve.tag&&(!ve.content||ve.content.trim()==="")))break}}if(ye.length===0)return;for(let ee of q)mt.add(ee);return ye.join(`
22
+ `).trim()},Ct=(B,te)=>{let ye=kt(bn(B)),q=te!==void 0&&gs.has(te.tag)&&!kt(bn(te.lines)),Ce=A!==void 0&&(te===void 0||!dr.has(te.tag)),ee=[];for(let he=1;he<B.length;he++){let ve=B[he];if((q||Ce)&&!zn.has(ve.number))continue;let oe=Ye.get(ve.number)?.trim();if(!oe||mt.has(ve.number))continue;ee.push(oe),mt.add(ve.number)}if(ee.length===0)return ye;return[ye,...ee].filter(Boolean).join(`
23
+ `)},hc=(B,te,ye,q)=>{if(A===void 0||I)return;if(q?.tag!=="event"&&!dr.has(q?.tag??""))return;if(kt(bn(ye)))return;let Ce=te?`@${B} "${te}"`:`@${B}`;ce(e,"event-description-ambiguous",A,`Text after @event "${A}" was used as the description of ${Ce}. Move it above the tag it describes, indent it as a continuation line, or give each event its own comment block.`,Me(e,ye))},ki=()=>{if(A!==void 0){let B=O&&O!=="object"&&O!=="Object"?O:void 0,te;if(B)te=B;else if(d.length>0)te=yn(d,A,!0);else te=O||"";if(a!==void 0){let ye;for(let ee of P){let he=ee.lines[0]?.number;if(typeof he!=="number")continue;if(he<=a)continue;if(dr.has(ee.tag))continue;ye=he;break}let q=[],Ce=Array.from(Ye.keys()).sort((ee,he)=>ee-he);for(let ee of Ce){if(ee<=a)continue;if(ye!==void 0&&ee>=ye)continue;if(mt.has(ee))continue;let ve=Ye.get(ee)?.trim();if(ve)q.push(ve),mt.add(ee)}if(q.length>0){let ee=q.join(`
16
24
  `);I=I?`${I}
17
- ${Z}`:Z}}ot(e,{name:N,detail:Ce,has_argument:!1,description:I,deprecated:pe,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,l),f.length=0,N=void 0,O=void 0,I=void 0,pe=void 0,ge=!1,xe=void 0,a=void 0,c=[],l=[]}},Ti=()=>{if(g!==void 0){let B,Ce;if(k.length>0)B=fn(k,void 0,!0),Ce=`type ${g} = ${B};`;else if(b)B=b,Ce=pp(B)?`interface ${g} ${B}`:`type ${g} = ${B};`;else B="{}",Ce=`type ${g} = ${B};`;d(g,C),e.typedefs.set(g,{type:B,name:g,description:Re(x),ts:Ce,tags:v.length>0?v:void 0,...E?{internal:!0}:{},source:C}),k.length=0,g=void 0,b=void 0,x=void 0,C=void 0,v=[],E=!1}},Si=()=>{if(_!==void 0){let G=`(${re.map(({name:ze,type:Z,optional:Ne})=>`${ze}${Ne?"?":""}: ${Z}`).join(", ")}) => ${j||"void"}`,we=`type ${_} = ${G};`;d(_,q),e.typedefs.set(_,{type:G,name:_,description:Re(D),ts:we,tags:U.length>0?U:void 0,...W?{internal:!0}:{},source:q}),re.length=0,j=void 0,_=void 0,D=void 0,q=void 0,U=[],W=!1}},Zo=P.some((B)=>B.tag==="slot"||B.tag==="snippet"),ec=P.some((B)=>B.tag==="extends"||B.tag==="extendProps"),tc=P.some((B)=>B.tag==="slot"||B.tag==="snippet"||B.tag==="event"||B.tag==="typedef"||B.tag==="callback");for(let{tag:B,type:Ce,name:G,description:we,optional:ze,default:Z,raw:Ne,lines:te}of P){let be=t.aliasType(Ce),Mt=Hn(te);switch(B){case"extends":case"extendProps":if(e.extends!==void 0)ae(e,"extend-props-duplicate",G,`A second @extends/@extendProps tag ("${G}") overwrote the first ("${e.extends.interface}"); only one is used.`,Le(e,te));if(e.extends={interface:G,import:be},ee)ee=!1;break;case"restProps":{let ne=G?we?`${G} ${we}`:G:we,nt=Je(ne)||Mt;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 ve=Je(yt(te));if(!ve&&ee&&!le&&w)ve=w,le=!0;if(!ve&&Q.length===0)ve=Mt;if(ee)ee=!1;let nt=be;if(!nt)nt="Record<string, never>",ae(e,"slot-missing-type",G||"default",`@${B}${G?` "${G}"`:""} is missing a required {Type} annotation; falling back to "${nt}".`,Le(e,te));jt(e,{slot_name:G,slot_props:nt,slot_description:ve||void 0,slot_deprecated:ht,slot_tags:Q.length>0?[...Q]:void 0,slot_internal:He||void 0,source:Le(e,te)}),Q.length=0,ht=void 0,He=!1;{let nc=G===void 0||G===""?null:G;Y=(rc)=>{let qn=e.slots.get(nc);if(qn)qn.tags=[...qn.tags??[],rc]}}break}case"csspart":{let ne=Je(yt(te));e.cssParts.push({name:G,...ne?{description:ne}:{}});break}case"cssprop":case"cssproperty":{let ne=Je(yt(te));e.cssProperties.push({name:G,...be?{type:be}:{},...Z===void 0?{}:{default:Z},...ne?{description:ne}:{}});break}case"event":{if(bi(),N=G,O=be,a=te.length>0?te[0].number:void 0,I=Je(yt(te))||Mt,!I&&ee&&!le&&w)I=w,le=!0;if(xe=Le(e,te),Q.length>0)c.push(...Q),Q.length=0;if(Y=(ve)=>c.push(ve),ee)ee=!1;break}case"type":if(N!==void 0)O=be;break;case"param":if(_!==void 0)re.push({name:G,type:be,optional:ze||!1});break;case"returns":case"return":if(_!==void 0)j=be;break;case"property":{let ne={name:G,type:be,description:Je(yt(te)),optional:ze||!1,default:Z};if(N!==void 0)y(f,ne,N,Le(e,te));else if(g!==void 0)y(k,ne,g,Le(e,te));break}case"typedef":{if(Ti(),g=os(G),b=be,C=Le(e,te),x=Je(yt(te))||Mt,!x&&ee&&!le&&w)x=w,le=!0;if(Q.length>0)v.push(...Q),Q.length=0;if(E=He,He=!1,Y=(ve)=>v.push(ve),ee)ee=!1;break}case"callback":{if(Si(),_=os(G),q=Le(e,te),D=Je(yt(te))||Mt,!D&&ee&&!le&&w)D=w,le=!0;if(Q.length>0)U.push(...Q),Q.length=0;if(W=He,He=!1,Y=(ve)=>U.push(ve),ee)ee=!1;break}case"generics":{let ne=be||G;for(let ve of We(G))u(ve.trim(),Le(e,te));if(r=!0,p(),m(G,ne),ee)ee=!1;break}case"template":{let ne=G;if(be)ne=`${G} extends ${be}`;if(Z)ne+=` = ${Z}`;if(Zo&&!ec){e.deferredSlotBlockGenerics.push({name:G,constraint:ne});break}if(H)break;if(u(G,Le(e,te)),i=!0,p(),m(G,ne),ee)ee=!1;break}case"deprecated":{let ne=ps(G,we);if(N===void 0)ht??=ne;else pe??=ne;break}case"ignore":case"internal":{if(N===void 0)He=!0;else ge=!0;break}case"sveld-ignore":if(N!==void 0)l.push(G);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:Ne};if(!cs.has(B)&&!op.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(bi(),Ti(),Si(),tc&&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 yp({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 $t(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=yp({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 gp(e){if(!e||typeof e!=="object"||!("type"in e))return;let t=String(e.type),n=Ft(t);if(!n&&!Vt(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 fs(e,t){let n=gp(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 Ht(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 cr(e,t){if(!t||typeof t!=="object"||!("type"in t))return;if(t.type==="Identifier"){let r=Ht(e,t.name);if(r)e.reactive_vars.add(r);return}let n=ue(t);for(let r of n){let i=Ht(e,r);if(i)e.reactive_vars.add(i)}}function qt(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 hs(e){if(!e||typeof e!=="object"||!("type"in e))return!1;let t=String(e.type);return t==="FunctionDeclaration"||t==="FunctionExpression"||t==="ArrowFunctionExpression"}function xp(e,t){let n=e.scopeDeclarations.get(t);if(!n)n=new Map,e.scopeDeclarations.set(t,n);return n}function bp(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(!Ei(t))return;let o=i?.allowRunesProps??!1,s=i?.forceProp??!1,p=t;for(let u of p.declarations){if(o&&Ge(it(u.init),"$props")){for(let y of bp(e,p,u))me(y.kind==="prop"?n:r,y.name,y.kind==="prop"?{kind:"prop",publicPropName:y.publicPropName}:{kind:"local"});continue}let m=p.kind==="var"?r:n,d=s?"prop":"local";for(let y of ue(u.id))me(m,y,d==="prop"?{kind:"prop",publicPropName:y}:{kind:"local"})}}function Tp(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 Sp(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)me(n,i.id.name,{kind:"local"});break;case"ClassDeclaration":if(i.id?.name)me(n,i.id.name,{kind:"local"});break}}}function Ep(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":or(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")or(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 ms(e,t){t.componentScope.clear(),t.scopeDeclarations=new Map,t.activeScopes.length=0,Ep(e,t,t.parsed?.instance)}function ys(e){return{varScopeStack:[e.componentScope]}}function gs(e,t,n,r){if(!qt(r))return;let i=xp(t,r),o=n.varScopeStack[n.varScopeStack.length-1]??t.componentScope;switch(String(r.type)){case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":Tp(r,i);break;case"BlockStatement":Sp(e,r.body,i,o);break;case"CatchClause":if("param"in r)for(let p of ue(r.param))me(i,p,{kind:"local"});break;case"EachBlock":{let p=r;for(let u of ue(p.context))me(i,u,{kind:"local"});if(typeof p.index==="string")me(i,p.index,{kind:"local"});else if(p.index&&"name"in p.index)me(i,p.index.name,{kind:"local"});break}case"AwaitBlock":{let p=r;for(let u of ue(p.value))me(i,u,{kind:"local"});for(let u of ue(p.error))me(i,u,{kind:"local"});break}}if(hs(r))n.varScopeStack.push(i);return i}function xs(e,t){if(hs(t))e.varScopeStack.pop()}function lr(e){return e==="TSTypeAnnotation"||e==="TSTypeAliasDeclaration"||e==="TSInterfaceDeclaration"||e==="TSTypeParameterDeclaration"||e==="TSTypeParameterInstantiation"}function ur(e,t,n,r){pr(e,null,null,t,n,r?.skipTypeOnlySubtrees===!0)}function pr(e,t,n,r,i,o){r(e,t,n);let s=e.type;if((s==="Identifier"||s==="Literal"||s==="Text")&&e.typeAnnotation===void 0){if(i)i(e);return}if(o&&s.charCodeAt(0)===84&&lr(s)){if(i)i(e);return}for(let p in e){if(p==="leadingComments")continue;let u=e[p];if(!u||typeof u!=="object")continue;if(Array.isArray(u))for(let m=0;m<u.length;m++){let d=u[m];if(d&&typeof d==="object"&&typeof d.type==="string")pr(d,e,p,r,i,o)}else if(typeof u.type==="string")pr(u,e,p,r,i,o)}if(i)i(e)}var Ss=new Set(["$state","$derived","$effect","$props","$bindable","$inspect","$host"]);function Cp(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 vp=Array.from(Ss);function bs(e){return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e===95||e===36}function Ap(e){if(e.includes("\\u"))return!0;for(let t of vp){let n=e.indexOf(t);while(n!==-1){if(!bs(e.charCodeAt(n-1))&&!bs(e.charCodeAt(n+t.length)))return!0;n=e.indexOf(t,n+1)}}return!1}function Pp(e,t){for(let n=t.length-1;n>=0;n-=1)if(t[n]?.has(e))return!0;return!1}function kp(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":hn(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 hn(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)hn([r],t);break}}}}function dr(e,t){if(!e||typeof e!=="object")return!1;return fr(e,void 0,[...t])}function fr(e,t,n){if(lr(e.type))return!1;let r=qt(e);if(r)n.push(kp(e));let i=!1;if(t&&e.type==="Identifier"&&e.name!==void 0&&Ss.has(e.name)&&!t.type.startsWith("TS")&&Cp(e,t)&&!Pp(e.name,n))i=!0;else for(let o in e){if(o==="leadingComments")continue;let s=e[o];if(!s||typeof s!=="object")continue;if(Array.isArray(s)){for(let p=0;p<s.length;p++){let u=s[p];if(u&&typeof u==="object"&&typeof u.type==="string"){if(fr(u,e,n)){i=!0;break}}}if(i)break}else if(typeof s.type==="string"){if(fr(s,e,n)){i=!0;break}}}if(r)n.pop();return i}function Ts(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 Es(e){if(e.runesOptionOverride!==void 0)return e.runesOptionOverride?"runes":"legacy";let t=e.parsed;if(!t)return"legacy";if(e.source!==void 0&&!Ap(e.source))return"legacy";let n=new Set;hn(Ts(t.module),n);let r=new Set;return hn(Ts(t.instance),r),dr(t.module,[n])||dr(t.instance,[n,r])||dr(t.fragment,[n,r])?"runes":"legacy"}var wp=/[A-Za-z_$][\w$]*/g;function Np(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,u=o[s];if(!p||u?.start===void 0||u?.end===void 0)continue;let m=se(e,u.start,u.end)?.trim();if(m)r.set(p,m)}return r}function _p(e,t){if(t.size===0)return e;return e.replace(wp,(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 u of p){if(u?.type!=="TSPropertySignature"||u.computed)continue;if(!u.key)continue;let m=e.getPropertyName(u.key);if(!m)continue;let d=u.typeAnnotation?.start,y=u.typeAnnotation?.end;if(d===void 0||y===void 0)continue;let T=se(t,d+1,y)?.trim();if(!T)continue;Et(t,u.typeAnnotation?.typeAnnotation),o.set(m,{type:T,optional:u.optional===!0,source:ie(t,u)})}};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[u,m]of p)o.set(u,m);break}case"TSTypeReference":{let p=Xi(n.typeName);if(!p||i.has(p))break;let u=r.get(p);if(!u)break;i.add(p);let m=Ct(e,t,u,r,i);i.delete(p);let d=Np(t,u,n);for(let[y,T]of m)o.set(y,d.size===0?T:{...T,type:_p(T.type,d)});break}case"TSIntersectionType":for(let p of n.types??[]){let u=Ct(e,t,p,r,i);for(let[m,d]of u)o.set(m,d)}break;case"TSParenthesizedType":{let p=Ct(e,t,n.typeAnnotation,r,i);for(let[u,m]of p)o.set(u,m);break}}return o}function Ip(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 Cs(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:Ip(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 u=p.local?.name;if(!u)continue;if(!(s.importKind==="type"||p.importKind==="type"))continue;let d,y;if(p.type==="ImportSpecifier")d="named",y=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(u,{importedName:y,localName:u,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:Qi(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 u=mt(t,p.id.typeAnnotation);if(u)t.explicitPropTypesByName.set(p.id.name,u),Et(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 u=mt(t,p.id.typeAnnotation);if(u)t.explicitVariableTypesByName.set(p.id.name,u)}}for(let s of o){if(!s||typeof s!=="object"||!("declarations"in s))continue;for(let p of s.declarations??[]){if(!Ge(it(p.init),"$props"))continue;let u=p.id?.typeAnnotation?void 0:vi(p.init),m=p.id?.typeAnnotation?.typeAnnotation??u,d=p.id?.typeAnnotation?mt(t,p.id.typeAnnotation):Yi(t,u),y=Ct(e,t,m,new Map(Array.from(t.localTypeDeclarationsByName.entries(),([P,w])=>[P,w.node]))),T=new Set,S=new Set;if(_e(t,m,T,S),ns(t,T,S),p.start!==void 0){let P={canonicalType:d,props:y,referencedImportedTypes:T,referencedLocalTypes:S};if(t.runesPropsDeclarationMetadataByDeclaratorStart.set(p.start,P),d)t.typedRunesPropsDeclarations.push(P)}}}}function vs(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=Zn(t,r.start);if(s)for(let[p,u]of s.props)Ot(e,t,p,{name:p,kind:"let",type:u.type,typeSource:"typescript",isFunction:!1,isFunctionDeclaration:!1,isRequired:!u.optional,constant:!1,reactive:!1,source:u.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 u,m;if(s.value.type==="Identifier")u=s.value.name;else{let c=s.value;u=c.left.name,m=c.right}if(!u)continue;if(e.trackPropLocalName(p,u),p==="children")t.snippetPropLocals.add(u);let d=us(t,e,s)??(o===1?i:void 0),y=zi(t,r.start,p),{init:T,bindable:S}=Bi(m),P=T==null?{isFunction:!1}:at(e,t,T),{value:w,type:A,isFunction:F,defaultValue:H}=P,N=y?.type===void 0&&d?.type===void 0?P.resolvedType:void 0;if(P.pendingCallDefault)t.pendingCallDefaultCandidates.push({propName:p,location:"props",...P.pendingCallDefault});let{type:O,typeSource:I,description:pe,params:ge,returnType:xe,isFunction:a}=$t({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:F,isFunctionDeclaration:!1,inferIsFunctionFromTypeSignature:!0});if(S)t.reactive_vars.add(p);st(t,"prop-unknown-type",p,d?.sveldIgnore),Ot(e,t,p,{name:p,...u===p?{}:{localName:u},kind:"let",description:pe,binding:d?.binding,deprecated:d?.deprecated,tags:d?.tags,...d?.internal?{internal:!0}:{},...S?{bindable:!0}:{},type:O,typeSource:I,value:w,defaultValue:H,params:ge,returnType:xe,isFunction:a,isFunctionDeclaration:!1,isRequired:!S&&T==null&&y?.optional!==!0,constant:!1,reactive:S,source:ie(t,s)})}}}function Dp(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 Lp(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 Rp=/^["']|["']$/g,Mp=/\?$/,Op=/^\{/,Bp=/\}$/;function Fp(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(Mp,"").replace(Rp,""),o=e.slice(n+1).trim();if(!i||!o)return;return{name:i,type:o}}}return}function As(e,t,n,r,i){if(n){let u=new Map(Array.from(t.localTypeDeclarationsByName.entries(),([d,y])=>[d,y.node])),m=Ct(e,t,n,u);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?Dp(o):void 0;if(!s)return;let p=s.trim().replace(Op,"").replace(Bp,"");for(let u of Lp(p)){let m=Fp(u);if(!m)continue;ot(t,{name:m.name,detail:m.type,has_argument:!0,source:i})}}function Ps(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 ks=new Set(["TSAsExpression","TSSatisfiesExpression","TSNonNullExpression","TSTypeAssertion","TSInstantiationExpression"]);function hr(e){return e!==null&&typeof e==="object"&&typeof e.type==="string"}function ws(e){if(!ks.has(e.type))return e;let t=e.expression;while(t&&ks.has(t.type))t=t.expression;return t??e}function mn(e){if(!hr(e))return;mr(e)}function mr(e){for(let t in e){if(t==="leadingComments")continue;let n=e[t];if(!n||typeof n!=="object")continue;if(Array.isArray(n))for(let r=0;r<n.length;r++){let i=n[r];if(!hr(i))continue;let o=ws(i);if(o!==i)n[r]=o;mr(o)}else if(hr(n)){let r=ws(n);if(r!==n)e[t]=r;mr(r)}}}function yn(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 yr(e,t){if(!t)return;let n=t,r=n.type==="Program"?n.body:n.content?.body??n.body;if(!Array.isArray(r))return;for(let i of r){let o=i;if(o.type==="ImportDeclaration"){yn(e,o);continue}let s=o.type==="ExportNamedDeclaration"&&o.declaration?o.declaration:o;if(s.type==="FunctionDeclaration"){let p=s;if(p.id?.name)e.funcDecls.set(p.id.name,p)}}}function Vp(e,t,n,r,i){for(let o of e){if(o.type!=="Block"||o.start<n||o.end>r)continue;let s=t.slice(o.start,o.end);i.push({end:o.end,isJsDoc:s.startsWith("/**")&&s.length>4,text:s})}}function Ns(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 jp(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)Ns(r.declaration,r.start,t);else Ns(r,r.start,t)}return t}function $p(e,t,n){let r;for(let i of e){if(i.end>t)break;if(!i.isJsDoc)continue;if(!ir.test(n.slice(i.end,t)))continue;r=i}return r}function _s(e,t){let n=new Map;if(!e.source)return n;let r=[e.parsed?.module,e.parsed?.instance],i=[],o=[],s=e.parsed?.comments??[];for(let p of r){let u=p?.content;if(!u?.body||u.start===void 0||u.end===void 0)continue;Vp(s,e.source,u.start,u.end,i),o.push(...jp(u.body))}i.sort((p,u)=>p.end-u.end);for(let p of o){let u=$p(i,p.start,e.source);if(!u)continue;let m=sr(e,u.text),{type:d,description:y,ignore:T,internal:S}=ar(m);if(T.length>0)st(e,"context-any-type",p.name,T);if(!d)continue;n.set(p.name,{type:t.aliasType(d.type),description:y||d.description,internal:S||void 0})}return n}var Hp={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 Is(e,t){let n=Hp[e];if(!n)return!1;if(!t)return!0;return(n.direct??n.descendant??[]).includes(t)}var _r={};oc(_r,{Node:()=>zt,Parser:()=>ce,Position:()=>vt,SourceLocation:()=>Wt,TokContext:()=>Be,Token:()=>wn,TokenType:()=>J,defaultOptions:()=>xn,getLineInfo:()=>vr,isIdentifierChar:()=>ke,isIdentifierStart:()=>Te,isNewLine:()=>xt,keywordTypes:()=>Cn,lineBreak:()=>Se,lineBreakG:()=>Vs,nonASCIIwhitespace:()=>Cr,parse:()=>vl,parseExpressionAt:()=>Al,tokContexts:()=>oe,tokTypes:()=>h,tokenizer:()=>Pl,version:()=>xa});var qp=[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],Os=[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],Up="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-᫝᫠-᫫ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・",Bs="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-࢏ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚ౜ౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ೜-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ƛ꟱-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",gr={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"},xr="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",Gp={5:xr,"5module":xr+" export import",6:xr+" const class extends export import super"},Fs=/^in(stanceof)?$/,Wp=new RegExp("["+Bs+"]"),Kp=new RegExp("["+Bs+Up+"]");function br(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&&Wp.test(String.fromCharCode(e));if(t===!1)return!1;return br(e,Os)}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&&Kp.test(String.fromCharCode(e));if(t===!1)return!1;return br(e,Os)||br(e,qp)}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},Cn={};function X(e,t){if(t===void 0)t={};return t.keyword=e,Cn[e]=new J(e,t)}var h={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:X("break"),_case:X("case",Oe),_catch:X("catch"),_continue:X("continue"),_debugger:X("debugger"),_default:X("default",Oe),_do:X("do",{isLoop:!0,beforeExpr:!0}),_else:X("else",Oe),_finally:X("finally"),_for:X("for",{isLoop:!0}),_function:X("function",Pe),_if:X("if"),_return:X("return",Oe),_switch:X("switch"),_throw:X("throw",Oe),_try:X("try"),_var:X("var"),_const:X("const"),_while:X("while",{isLoop:!0}),_with:X("with"),_new:X("new",{beforeExpr:!0,startsExpr:!0}),_this:X("this",Pe),_super:X("super",Pe),_class:X("class",Pe),_extends:X("extends",Oe),_export:X("export"),_import:X("import",Pe),_null:X("null",Pe),_true:X("true",Pe),_false:X("false",Pe),_in:X("in",{beforeExpr:!0,binop:7}),_instanceof:X("instanceof",{beforeExpr:!0,binop:7}),_typeof:X("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:X("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:X("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},Se=/\r\n?|\n|\u2028|\u2029/,Vs=new RegExp(Se.source,"g");function xt(e){return e===10||e===13||e===8232||e===8233}function js(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 Cr=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,de=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,$s=Object.prototype,{hasOwnProperty:zp,toString:Xp}=$s,At=Object.hasOwn||function(e,t){return zp.call(e,t)},Ds=Array.isArray||function(e){return Xp.call(e)==="[object Array]"},Ls=Object.create(null);function pt(e){return Ls[e]||(Ls[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 Jp=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,vt=function(t,n){this.line=t,this.column=n};vt.prototype.offset=function(t){return new vt(this.line,this.column+t)};var Wt=function(t,n,r){if(this.start=n,this.end=r,t.sourceFile!==null)this.source=t.sourceFile};function vr(e,t){for(var n=1,r=0;;){var i=js(e,r,t);if(i<0)return new vt(n,t-r);++n,r=i}}var xn={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},Rs=!1;function Yp(e){var t={};for(var n in xn)t[n]=e&&At(e,n)?e[n]:xn[n];if(t.ecmaVersion==="latest")t.ecmaVersion=1e8;else if(t.ecmaVersion==null){if(!Rs&&typeof console==="object"&&console.warn)Rs=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
18
- 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(Ds(t.onToken)){var r=t.onToken;t.onToken=function(i){return r.push(i)}}if(Ds(t.onComment))t.onComment=Qp(t,t.onComment);if(t.sourceType==="commonjs"&&t.allowAwaitOutsideFunction)throw Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return t}function Qp(e,t){return function(n,r,i,o,s,p){var u={type:n?"Block":"Line",value:r,start:i,end:o};if(e.locations)u.loc=new Wt(this,s,p);if(e.ranges)u.range=[i,o];t.push(u)}}var gt=1,bt=2,Ar=4,Hs=8,Pr=16,qs=32,vn=64,Us=128,Tt=256,Kt=512,Gs=1024,An=gt|bt|Tt;function kr(e,t){return bt|(e?Ar:0)|(t?Hs:0)}var bn=0,wr=1,Ze=2,Ws=3,Ks=4,zs=5,ce=function(t,n,r){this.options=t=Yp(t),this.sourceFile=t.sourceFile,this.keywords=pt(Gp[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var i="";if(t.allowReserved!==!0){if(i=gr[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module")i+=" await"}this.reservedWords=pt(i);var o=(i?i+" ":"")+gr.strict;if(this.reservedWordsStrict=pt(o),this.reservedWordsStrictBind=pt(o+" "+gr.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(`
19
- `,r-1)+1,this.options.locations)this.curLine=this.input.slice(0,this.lineStart).split(Se).length}else this.lineStart=0;if(this.type=h.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=t.sourceType==="module",this.strict=this.inModule||t.strict===!0||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&t.allowHashBang&&this.input.slice(0,2)==="#!")this.skipLineComment(2);this.scopeStack=[],this.enterScope(this.options.sourceType==="commonjs"?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}};ce.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&Hs)>0};Ve.inAsync.get=function(){return(this.currentVarScope().flags&Ar)>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|Kt))return!1;if(n&bt)return(n&Ar)>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&gt)return!0;return!1};Ve.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags;return(t&vn)>0||this.options.allowSuperOutsideMethod};Ve.allowDirectSuper.get=function(){return(this.currentThisScope().flags&Us)>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|Kt)||n&bt&&!(n&Pr))return!0}return!1};Ve.allowUsing.get=function(){var e=this.currentScope(),t=e.flags;if(t&Gs)return!1;if(!this.inModule&&t&gt)return!1;return!0};Ve.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&Tt)>0};ce.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};ce.parse=function(t,n){return new this(n,t).parse()};ce.parseExpressionAt=function(t,n,r){var i=new this(r,t,n);return i.nextToken(),i.parseExpression()};ce.tokenizer=function(t,n){return new this(n,t)};Object.defineProperties(ce.prototype,Ve);var ye=ce.prototype,Zp=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;ye.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){de.lastIndex=e,e+=de.exec(this.input)[0].length;var t=Zp.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==="}"||Se.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===h.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===h.eof||this.type===h.braceR||Se.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(h.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 Pn=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=ce.prototype;M.parseTopLevel=function(e){var t=Object.create(null);if(!e.body)e.body=[];while(this.type!==h.eof){var n=this.parseStatement(null,!0,t);e.body.push(n)}if(this.inModule)for(var r=0,i=Object.keys(this.undefinedExports);r<i.length;r+=1){var o=i[r];this.raiseRecoverable(this.undefinedExports[o].start,"Export '"+o+"' is not defined")}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType==="commonjs"?"script":this.options.sourceType,this.finishNode(e,"Program")};var Nr={kind:"loop"},el={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(!Fs.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!Se.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(Se.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&&Se.test(this.input.slice(i,r)))return!1}var p=this.fullCharCodeAt(r);if(!Te(p)&&p!==92)return!1;var u=r;do r+=p<=65535?1:2;while(ke(p=this.fullCharCodeAt(r)));if(p===92)return!0;var m=this.input.slice(u,r);if(Fs.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||(p=this.input.charCodeAt(r+1))===61||p===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=h._var,o="let";switch(r){case h._break:case h._continue:return this.parseBreakContinueStatement(i,r.keyword);case h._debugger:return this.parseDebuggerStatement(i);case h._do:return this.parseDoStatement(i);case h._for:return this.parseForStatement(i);case h._function:if(e&&(this.strict||e!=="if"&&e!=="label")&&this.options.ecmaVersion>=6)this.unexpected();return this.parseFunctionStatement(i,!1,!e);case h._class:if(e)this.unexpected();return this.parseClass(i,!0);case h._if:return this.parseIfStatement(i);case h._return:return this.parseReturnStatement(i);case h._switch:return this.parseSwitchStatement(i);case h._throw:return this.parseThrowStatement(i);case h._try:return this.parseTryStatement(i);case h._const:case h._var:if(o=o||this.value,e&&o!=="var")this.unexpected();return this.parseVarStatement(i,o);case h._while:return this.parseWhileStatement(i);case h._with:return this.parseWithStatement(i);case h.braceL:return this.parseBlock(!0,i);case h.semi:return this.parseEmptyStatement(i);case h._export:case h._import:if(this.options.ecmaVersion>10&&r===h._import){de.lastIndex=this.pos;var s=de.exec(this.input),p=this.pos+s[0].length,u=this.input.charCodeAt(p);if(u===40||u===46)return this.parseExpressionStatement(i,this.parseExpression())}if(!this.options.allowImportExportEverywhere){if(!t)this.raise(this.start,"'import' and 'export' may only appear at the top level");if(!this.inModule)this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")}return r===h._import?this.parseImport(i):this.parseExport(i,n);default:if(this.isAsyncFunction()){if(e)this.unexpected();return this.next(),this.parseFunctionStatement(i,!0,!e)}var 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===h.name&&y.type==="Identifier"&&this.eat(h.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(h.semi)||this.insertSemicolon())e.label=null;else if(this.type!==h.name)this.unexpected();else e.label=this.parseIdent(),this.semicolon();var r=0;for(;r<this.labels.length;++r){var i=this.labels[r];if(e.label==null||i.name===e.label.name){if(i.kind!=null&&(n||i.kind==="loop"))break;if(e.label&&n)break}}if(r===this.labels.length)this.raise(e.start,"Unsyntactic "+t);return this.finishNode(e,n?"BreakStatement":"ContinueStatement")};M.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")};M.parseDoStatement=function(e){if(this.next(),this.labels.push(Nr),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(h._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6)this.eat(h.semi);else this.semicolon();return this.finishNode(e,"DoWhileStatement")};M.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Nr),this.enterScope(0),this.expect(h.parenL),this.type===h.semi){if(t>-1)this.unexpected(t);return this.parseFor(e,null)}var n=this.isLet();if(this.type===h._var||this.type===h._const||n){var r=this.startNode(),i=n?"let":this.value;return this.next(),this.parseVar(r,!0,i),this.finishNode(r,"VariableDeclaration"),this.parseForAfterInit(e,r,t)}var o=this.isContextual("let"),s=!1,p=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(p){var u=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(u,!0,p),this.finishNode(u,"VariableDeclaration"),this.parseForAfterInit(e,u,t)}var m=this.containsEsc,d=new Pn,y=this.start,T=t>-1?this.parseExprSubscripts(d,"await"):this.parseExpression(!0,d);if(this.type===h._in||(s=this.options.ecmaVersion>=6&&this.isContextual("of"))){if(t>-1){if(this.type===h._in)this.unexpected(t);e.await=!0}else if(s&&this.options.ecmaVersion>=8){if(T.start===y&&!m&&T.type==="Identifier"&&T.name==="async")this.unexpected();else if(this.options.ecmaVersion>=9)e.await=!1}if(o&&s)this.raise(T.start,"The left-hand side of a for-of loop may not start with 'let'.");return this.toAssignable(T,!1,d),this.checkLValPattern(T),this.parseForIn(e,T)}else this.checkExpressionErrors(d,!0);if(t>-1)this.unexpected(t);return this.parseFor(e,T)};M.parseForAfterInit=function(e,t,n){if((this.type===h._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&t.declarations.length===1){if(this.type===h._in){if((t.kind==="using"||t.kind==="await using")&&!t.declarations[0].init)this.raise(this.start,"Using declaration is not allowed in for-in loops");if(this.options.ecmaVersion>=9&&n>-1)this.unexpected(n)}else if(this.options.ecmaVersion>=9)e.await=n>-1;return this.parseForIn(e,t)}if(n>-1)this.unexpected(n);return this.parseFor(e,t)};M.parseFunctionStatement=function(e,t,n){return this.next(),this.parseFunction(e,Gt|(n?0:Tr),!1,t)};M.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(h._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")};M.parseReturnStatement=function(e){if(!this.allowReturn)this.raise(this.start,"'return' outside of function");if(this.next(),this.eat(h.semi)||this.insertSemicolon())e.argument=null;else e.argument=this.parseExpression(),this.semicolon();return this.finishNode(e,"ReturnStatement")};M.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(h.braceL),this.labels.push(el),this.enterScope(Gs);var t;for(var n=!1;this.type!==h.braceR;)if(this.type===h._case||this.type===h._default){var r=this.type===h._case;if(t)this.finishNode(t,"SwitchCase");if(e.cases.push(t=this.startNode()),t.consequent=[],this.next(),r)t.test=this.parseExpression();else{if(n)this.raiseRecoverable(this.lastTokStart,"Multiple default clauses");n=!0,t.test=null}this.expect(h.colon)}else{if(!t)this.unexpected();t.consequent.push(this.parseStatement(null))}if(this.exitScope(),t)this.finishNode(t,"SwitchCase");return this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")};M.parseThrowStatement=function(e){if(this.next(),Se.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 tl=[];M.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type==="Identifier";return this.enterScope(t?qs:0),this.checkLValPattern(e,t?Ks:Ze),this.expect(h.parenR),e};M.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===h._catch){var t=this.startNode();if(this.next(),this.eat(h.parenL))t.param=this.parseCatchClauseParam();else{if(this.options.ecmaVersion<10)this.unexpected();t.param=null,this.enterScope(0)}t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}if(e.finalizer=this.eat(h._finally)?this.parseBlock():null,!e.handler&&!e.finalizer)this.raise(e.start,"Missing catch or finally clause");return this.finishNode(e,"TryStatement")};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(Nr),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 p=this.type.isLoop?"loop":this.type===h._switch?"switch":null;for(var u=this.labels.length-1;u>=0;u--){var m=this.labels[u];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")};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(h.braceL),e)this.enterScope(0);while(this.type!==h.braceR){var r=this.parseStatement(null);t.body.push(r)}if(n)this.strict=!1;if(this.next(),e)this.exitScope();return this.finishNode(t,"BlockStatement")};M.parseFor=function(e,t){return e.init=t,this.expect(h.semi),e.test=this.type===h.semi?null:this.parseExpression(),this.expect(h.semi),e.update=this.type===h.parenR?null:this.parseExpression(),this.expect(h.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")};M.parseForIn=function(e,t){var n=this.type===h._in;if(this.next(),t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!n||this.options.ecmaVersion<8||this.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier"))this.raise(t.start,(n?"for-in":"for-of")+" loop variable declaration may not have an initializer");return e.left=t,e.right=n?this.parseExpression():this.parseMaybeAssign(),this.expect(h.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,n?"ForInStatement":"ForOfStatement")};M.parseVar=function(e,t,n,r){e.declarations=[],e.kind=n;for(;;){var i=this.startNode();if(this.parseVarId(i,n),this.eat(h.eq))i.init=this.parseMaybeAssign(t);else if(!r&&n==="const"&&!(this.type===h._in||this.options.ecmaVersion>=6&&this.isContextual("of")))this.unexpected();else if(!r&&(n==="using"||n==="await using")&&this.options.ecmaVersion>=17&&this.type!==h._in&&!this.isContextual("of"))this.raise(this.lastTokEnd,"Missing initializer in "+n+" declaration");else if(!r&&i.id.type!=="Identifier"&&!(t&&(this.type===h._in||this.isContextual("of"))))this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value");else i.init=null;if(e.declarations.push(this.finishNode(i,"VariableDeclarator")),!this.eat(h.comma))break}return e};M.parseVarId=function(e,t){e.id=t==="using"||t==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(e.id,t==="var"?wr:Ze,!1)};var Gt=1,Tr=2,Xs=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===h.star&&t&Tr)this.unexpected();e.generator=this.eat(h.star)}if(this.options.ecmaVersion>=8)e.async=!!r;if(t&Gt){if(e.id=t&Xs&&this.type!==h.name?null:this.parseIdent(),e.id&&!(t&Tr))this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?wr:Ze:Ws)}var o=this.yieldPos,s=this.awaitPos,p=this.awaitIdentPos;if(this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(kr(e.async,e.generator)),!(t&Gt))e.id=this.type===h.name?this.parseIdent():null;return this.parseFunctionParams(e),this.parseFunctionBody(e,n,!1,i),this.yieldPos=o,this.awaitPos=s,this.awaitIdentPos=p,this.finishNode(e,t&Gt?"FunctionDeclaration":"FunctionExpression")};M.parseFunctionParams=function(e){this.expect(h.parenL),e.params=this.parseBindingList(h.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(h.braceL);while(this.type!==h.braceR){var s=this.parseClassElement(e.superClass!==null);if(s){if(i.body.push(s),s.type==="MethodDefinition"&&s.kind==="constructor"){if(o)this.raiseRecoverable(s.start,"Duplicate constructor in the same class");o=!0}else if(s.key&&s.key.type==="PrivateIdentifier"&&nl(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(h.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(h.braceL))return this.parseClassStaticBlock(n),n;if(this.isClassElementNameStart()||this.type===h.star)p=!0;else r="static"}if(n.static=p,!r&&t>=8&&this.eatContextual("async"))if((this.isClassElementNameStart()||this.type===h.star)&&!this.canInsertSemicolon())o=!0;else r="async";if(!r&&(t>=9||!o)&&this.eat(h.star))i=!0;if(!r&&!o&&!i){var u=this.value;if(this.eatContextual("get")||this.eatContextual("set"))if(this.isClassElementNameStart())s=u;else r=u}if(r)n.computed=!1,n.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),n.key.name=r,this.finishNode(n.key,"Identifier");else this.parseClassElementName(n);if(t<13||this.type===h.parenL||s!=="method"||i||o){var m=!n.static&&Tn(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===h.name||this.type===h.privateId||this.type===h.num||this.type===h.string||this.type===h.bracketL||this.type.keyword};M.parseClassElementName=function(e){if(this.type===h.privateId){if(this.value==="constructor")this.raise(this.start,"Classes can't have an element named '#constructor'");e.computed=!1,e.key=this.parsePrivateIdent()}else this.parsePropertyName(e)};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&&Tn(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(Tn(e,"constructor"))this.raise(e.key.start,"Classes can't have a field named 'constructor'");else if(e.static&&Tn(e,"prototype"))this.raise(e.key.start,"Classes can't have a static field named 'prototype'");if(this.eat(h.eq))this.enterScope(Kt|vn),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|vn);while(this.type!==h.braceR){var n=this.parseStatement(null);e.body.push(n)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")};M.parseClassId=function(e,t){if(this.type===h.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(h._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(!At(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 nl(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 Tn(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!==h.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(h.star))return this.parseExportAllDeclaration(e,t);if(this.eat(h._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement()){if(e.declaration=this.parseExportDeclaration(e),e.declaration.type==="VariableDeclaration")this.checkVariableExport(t,e.declaration.declarations);else this.checkExport(t,e.declaration.id,e.declaration.id.start);if(e.specifiers=[],e.source=null,this.options.ecmaVersion>=16)e.attributes=[]}else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from")){if(this.type!==h.string)this.unexpected();if(e.source=this.parseExprAtom(),this.options.ecmaVersion>=16)e.attributes=this.parseWithClause()}else{for(var n=0,r=e.specifiers;n<r.length;n+=1){var i=r[n];if(this.checkUnreserved(i.local),this.checkLocalExport(i.local),i.local.type==="Literal")this.raise(i.local.start,"A string literal cannot be used as an exported binding without `from`.")}if(e.source=null,this.options.ecmaVersion>=16)e.attributes=[]}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")};M.parseExportDeclaration=function(e){return this.parseStatement(null)};M.parseExportDefaultDeclaration=function(){var e;if(this.type===h._function||(e=this.isAsyncFunction())){var t=this.startNode();if(this.next(),e)this.next();return this.parseFunction(t,Gt|Xs,!1,e)}else if(this.type===h._class){var n=this.startNode();return this.parseClass(n,"nullableID")}else{var r=this.parseMaybeAssign();return this.semicolon(),r}};M.checkExport=function(e,t,n){if(!e)return;if(typeof t!=="string")t=t.type==="Identifier"?t.name:t.value;if(At(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,p=t.elements;s<p.length;s+=1){var u=p[s];if(u)this.checkPatternExport(e,u)}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(h.braceL);while(!this.eat(h.braceR)){if(!n){if(this.expect(h.comma),this.afterTrailingComma(h.braceR))break}else n=!1;t.push(this.parseExportSpecifier(e))}return t};M.parseImport=function(e){if(this.next(),this.type===h.string)e.specifiers=tl,e.source=this.parseExprAtom();else e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===h.string?this.parseExprAtom():this.unexpected();if(this.options.ecmaVersion>=16)e.attributes=this.parseWithClause();return this.semicolon(),this.finishNode(e,"ImportDeclaration")};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===h.name){if(e.push(this.parseImportDefaultSpecifier()),!this.eat(h.comma))return e}if(this.type===h.star)return e.push(this.parseImportNamespaceSpecifier()),e;this.expect(h.braceL);while(!this.eat(h.braceR)){if(!t){if(this.expect(h.comma),this.afterTrailingComma(h.braceR))break}else t=!1;e.push(this.parseImportSpecifier())}return e};M.parseWithClause=function(){var e=[];if(!this.eat(h._with))return e;this.expect(h.braceL);var t={},n=!0;while(!this.eat(h.braceR)){if(!n){if(this.expect(h.comma),this.afterTrailingComma(h.braceR))break}else n=!1;var r=this.parseImportAttribute(),i=r.key.type==="Identifier"?r.key.name:r.key.value;if(At(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===h.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(h.colon),this.type!==h.string)this.unexpected();return e.value=this.parseExprAtom(),this.finishNode(e,"ImportAttribute")};M.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===h.string){var e=this.parseLiteral(this.value);if(Jp.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=ce.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!==h.name)this.unexpected();return e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")};je.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case h.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(h.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case h.braceL:return this.parseObj(!0)}return this.parseIdent()};je.parseBindingList=function(e,t,n,r){var i=[],o=!0;while(!this.eat(e)){if(o)o=!1;else this.expect(h.comma);if(t&&this.type===h.comma)i.push(null);else if(n&&this.afterTrailingComma(e))break;else if(this.type===h.ellipsis){var s=this.parseRestBinding();if(this.parseBindingListItem(s),i.push(s),this.type===h.comma)this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");this.expect(e);break}else i.push(this.parseAssignableListItem(r))}return i};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(h.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=bn;var r=t!==bn;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(At(n,e.name))this.raiseRecoverable(e.start,"Argument name clash");n[e.name]=!0}if(t!==zs)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=bn;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 u=p[s];if(u)this.checkLValInnerPattern(u,t,n)}break;default:this.checkLValSimple(e,t,n)}};je.checkLValInnerPattern=function(e,t,n){if(t===void 0)t=bn;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)},Pt=ce.prototype;Pt.initialContext=function(){return[oe.b_stat]};Pt.curContext=function(){return this.context[this.context.length-1]};Pt.braceIsBlock=function(e){var t=this.curContext();if(t===oe.f_expr||t===oe.f_stat)return!0;if(e===h.colon&&(t===oe.b_stat||t===oe.b_expr))return!t.isExpr;if(e===h._return||e===h.name&&this.exprAllowed)return Se.test(this.input.slice(this.lastTokEnd,this.start));if(e===h._else||e===h.semi||e===h.eof||e===h.parenR||e===h.arrow)return!0;if(e===h.braceL)return t===oe.b_stat;if(e===h._var||e===h._const||e===h.name)return!1;return!this.exprAllowed};Pt.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};Pt.updateContext=function(e){var t,n=this.type;if(n.keyword&&e===h.dot)this.exprAllowed=!1;else if(t=n.updateContext)t.call(this,e);else this.exprAllowed=n.beforeExpr};Pt.overrideContext=function(e){if(this.curContext()!==e)this.context[this.context.length-1]=e};h.parenR.updateContext=h.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var e=this.context.pop();if(e===oe.b_stat&&this.curContext().token==="function")e=this.context.pop();this.exprAllowed=!e.isExpr};h.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?oe.b_stat:oe.b_expr),this.exprAllowed=!0};h.dollarBraceL.updateContext=function(){this.context.push(oe.b_tmpl),this.exprAllowed=!0};h.parenL.updateContext=function(e){var t=e===h._if||e===h._for||e===h._with||e===h._while;this.context.push(t?oe.p_stat:oe.p_expr),this.exprAllowed=!0};h.incDec.updateContext=function(){};h._function.updateContext=h._class.updateContext=function(e){if(e.beforeExpr&&e!==h._else&&!(e===h.semi&&this.curContext()!==oe.p_stat)&&!(e===h._return&&Se.test(this.input.slice(this.lastTokEnd,this.start)))&&!((e===h.colon||e===h.braceL)&&this.curContext()===oe.b_stat))this.context.push(oe.f_expr);else this.context.push(oe.f_stat);this.exprAllowed=!1};h.colon.updateContext=function(){if(this.curContext().token==="function")this.context.pop();this.exprAllowed=!0};h.backQuote.updateContext=function(){if(this.curContext()===oe.q_tmpl)this.context.pop();else this.context.push(oe.q_tmpl);this.exprAllowed=!1};h.star.updateContext=function(e){if(e===h._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};h.name.updateContext=function(e){var t=!1;if(this.options.ecmaVersion>=6&&e!==h.dot){if(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())t=!0}this.exprAllowed=t};var V=ce.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===h.comma){var s=n.startNodeAt(r,i);s.expressions=[o];while(n.eat(h.comma))s.expressions.push(n.parseMaybeAssign(e,t));return n.finishNode(s,"SequenceExpression")}return o})};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 Pn,r=!0;var p=this.start,u=this.startLoc;if(this.type===h.parenL||this.type===h.name)this.potentialArrowAt=this.start,this.potentialArrowInForAwait=e==="await";var m=this.parseMaybeConditional(e,t);if(n)m=n.call(this,m,p,u);if(this.type.isAssign){var d=this.startNodeAt(p,u);if(d.operator=this.value,this.type===h.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===h.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(h.question)){var o=this.startNodeAt(n,r);return o.test=i,o.consequent=this.parseMaybeAssign(),this.expect(h.colon),o.alternate=this.parseMaybeAssign(e),this.finishNode(o,"ConditionalExpression")}return i};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!==h._in)){if(o>r){var s=this.type===h.logicalOR||this.type===h.logicalAND,p=this.type===h.coalesce;if(p)o=h.logicalAND.binop;var u=this.value;this.next();var m=this.start,d=this.startLoc,y=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,i),m,d,o,i),T=this.buildBinary(t,n,e,y,u,s||p);if(s&&this.type===h.coalesce||p&&(this.type===h.logicalOR||this.type===h.logicalAND))this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses");return this.parseExprOp(T,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(),u=this.type===h.incDec;if(p.operator=this.value,p.prefix=!0,this.next(),p.argument=this.parseMaybeUnary(null,!0,u,r),this.checkExpressionErrors(e,!0),u)this.checkLValSimple(p.argument);else if(this.strict&&p.operator==="delete"&&Js(p.argument))this.raiseRecoverable(p.start,"Deleting local variable in strict mode");else if(p.operator==="delete"&&Sr(p.argument))this.raiseRecoverable(p.start,"Private fields can not be deleted");else t=!0;s=this.finishNode(p,u?"UpdateExpression":"UnaryExpression")}else if(!t&&this.type===h.privateId){if((r||this.privateNameStack.length===0)&&this.options.checkPrivateFields)this.unexpected();if(s=this.parsePrivateIdent(),this.type!==h._in)this.unexpected()}else{if(s=this.parseExprSubscripts(e,r),this.checkExpressionErrors(e))return s;while(this.type.postfix&&!this.canInsertSemicolon()){var 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(h.starstar))if(t)this.unexpected(this.lastTokStart);else return this.buildBinary(i,o,s,this.parseMaybeUnary(null,!1,!1,r),"**",!1);else return s};function Js(e){return e.type==="Identifier"||e.type==="ParenthesizedExpression"&&Js(e.expression)}function Sr(e){return e.type==="MemberExpression"&&e.property.type==="PrivateIdentifier"||e.type==="ChainExpression"&&Sr(e.expression)||e.type==="ParenthesizedExpression"&&Sr(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 u=this.startNodeAt(t,n);u.expression=p,p=this.finishNode(u,"ChainExpression")}return p}e=p}};V.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(h.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,u=p&&this.eat(h.questionDot);if(r&&u)this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var m=this.eat(h.bracketL);if(m||u&&this.type!==h.parenL&&this.type!==h.backQuote||this.eat(h.dot)){var d=this.startNodeAt(t,n);if(d.object=e,m)d.property=this.parseExpression(),this.expect(h.bracketR);else if(this.type===h.privateId&&e.type!=="Super")d.property=this.parsePrivateIdent();else d.property=this.parseIdent(this.options.allowReserved!=="never");if(d.computed=!!m,p)d.optional=u;e=this.finishNode(d,"MemberExpression")}else if(!r&&this.eat(h.parenL)){var y=new Pn,T=this.yieldPos,S=this.awaitPos,P=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var w=this.parseExprList(h.parenR,this.options.ecmaVersion>=8,!1,y);if(i&&!u&&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=T,this.awaitPos=S,this.awaitIdentPos=P,this.parseSubscriptAsyncArrow(t,n,w,s)}this.checkExpressionErrors(y,!0),this.yieldPos=T||this.yieldPos,this.awaitPos=S||this.awaitPos,this.awaitIdentPos=P||this.awaitIdentPos;var A=this.startNodeAt(t,n);if(A.callee=e,A.arguments=w,p)A.optional=u;e=this.finishNode(A,"CallExpression")}else if(this.type===h.backQuote){if(u||o)this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var F=this.startNodeAt(t,n);F.tag=e,F.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(F,"TaggedTemplateExpression")}return e};V.parseExprAtom=function(e,t,n){if(this.type===h.slash)this.readRegexp();var r,i=this.potentialArrowAt===this.start;switch(this.type){case h._super:if(!this.allowSuper)this.raise(this.start,"'super' keyword outside a method");if(r=this.startNode(),this.next(),this.type===h.parenL&&!this.allowDirectSuper)this.raise(r.start,"super() call outside constructor of a subclass");if(this.type!==h.dot&&this.type!==h.bracketL&&this.type!==h.parenL)this.unexpected();return this.finishNode(r,"Super");case h._this:return r=this.startNode(),this.next(),this.finishNode(r,"ThisExpression");case h.name:var o=this.start,s=this.startLoc,p=this.containsEsc,u=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!p&&u.name==="async"&&!this.canInsertSemicolon()&&this.eat(h._function))return this.overrideContext(oe.f_expr),this.parseFunction(this.startNodeAt(o,s),0,!1,!0,t);if(i&&!this.canInsertSemicolon()){if(this.eat(h.arrow))return this.parseArrowExpression(this.startNodeAt(o,s),[u],!1,t);if(this.options.ecmaVersion>=8&&u.name==="async"&&this.type===h.name&&!p&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc)){if(u=this.parseIdent(!1),this.canInsertSemicolon()||!this.eat(h.arrow))this.unexpected();return this.parseArrowExpression(this.startNodeAt(o,s),[u],!0,t)}}return u;case h.regexp:var m=this.value;return r=this.parseLiteral(m.value),r.regex={pattern:m.pattern,flags:m.flags},r;case h.num:case h.string:return this.parseLiteral(this.value);case h._null:case h._true:case h._false:return r=this.startNode(),r.value=this.type===h._null?null:this.type===h._true,r.raw=this.type.keyword,this.next(),this.finishNode(r,"Literal");case h.parenL:var 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 h.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(h.bracketR,!0,!0,e),this.finishNode(r,"ArrayExpression");case h.braceL:return this.overrideContext(oe.b_expr),this.parseObj(!1,e);case h._function:return r=this.startNode(),this.next(),this.parseFunction(r,0);case h._class:return this.parseClass(this.startNode(),!1);case h._new:return this.parseNew();case h.backQuote:return this.parseTemplate();case h._import:if(this.options.ecmaVersion>=11)return this.parseExprImport(n);else return this.unexpected();default:return this.parseExprAtomDefault()}};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===h.parenL&&!e)return this.parseDynamicImport(t);else if(this.type===h.dot){var n=this.startNodeAt(t.start,t.loc&&t.loc.start);return n.name="import",t.meta=this.finishNode(n,"Identifier"),this.parseImportMeta(t)}else this.unexpected()};V.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)if(!this.eat(h.parenR))if(this.expect(h.comma),!this.afterTrailingComma(h.parenR)){if(e.options=this.parseMaybeAssign(),!this.eat(h.parenR)){if(this.expect(h.comma),!this.afterTrailingComma(h.parenR))this.unexpected()}}else e.options=null;else e.options=null;else if(!this.eat(h.parenR)){var t=this.start;if(this.eat(h.comma)&&this.eat(h.parenR))this.raiseRecoverable(t,"Trailing comma is not allowed in import()");else this.unexpected(t)}return this.finishNode(e,"ImportExpression")};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(h.parenL);var e=this.parseExpression();return this.expect(h.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,u=[],m=!0,d=!1,y=new Pn,T=this.yieldPos,S=this.awaitPos,P;this.yieldPos=0,this.awaitPos=0;while(this.type!==h.parenR)if(m?m=!1:this.expect(h.comma),o&&this.afterTrailingComma(h.parenR,!0)){d=!0;break}else if(this.type===h.ellipsis){if(P=this.start,u.push(this.parseParenItem(this.parseRestBinding())),this.type===h.comma)this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else u.push(this.parseMaybeAssign(!1,y,this.parseParenItem));var w=this.lastTokEnd,A=this.lastTokEndLoc;if(this.expect(h.parenR),e&&this.shouldParseArrow(u)&&this.eat(h.arrow))return this.checkPatternErrors(y,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=T,this.awaitPos=S,this.parseParenArrowList(n,r,u,t);if(!u.length||d)this.unexpected(this.lastTokStart);if(P)this.unexpected(P);if(this.checkExpressionErrors(y,!0),this.yieldPos=T||this.yieldPos,this.awaitPos=S||this.awaitPos,u.length>1)i=this.startNodeAt(s,p),i.expressions=u,this.finishNodeAt(i,"SequenceExpression",w,A);else i=u[0]}else i=this.parseParenExpression();if(this.options.preserveParens){var F=this.startNodeAt(n,r);return F.expression=i,this.finishNode(F,"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 rl=[];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===h.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name="new",e.meta=this.finishNode(t,"Identifier"),this.next();var n=this.containsEsc;if(e.property=this.parseIdent(!0),e.property.name!=="target")this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'");if(n)this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters");if(!this.allowNewDotTarget)this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block");return this.finishNode(e,"MetaProperty")}var r=this.start,i=this.startLoc;if(e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),r,i,!0,!1),e.callee.type==="Super")this.raiseRecoverable(r,"Invalid use of 'super'");if(this.eat(h.parenL))e.arguments=this.parseExprList(h.parenR,this.options.ecmaVersion>=8,!1);else e.arguments=rl;return this.finishNode(e,"NewExpression")};V.parseTemplateElement=function(e){var t=e.isTagged,n=this.startNode();if(this.type===h.invalidTemplate){if(!t)this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal");n.value={raw:this.value.replace(/\r\n?/g,`
25
+ ${ee}`:ee}}pt(e,{name:A,detail:te,has_argument:!1,description:I,deprecated:re,tags:c.length>0?c:void 0,internal:z||void 0,source:Y}),e.eventDescriptions.set(A,I),e.jsDocEventNames.add(A),e.jsDocEventSources.set(A,Y),ot(e,"event-no-source",A,l),d.length=0,A=void 0,O=void 0,I=void 0,re=void 0,z=!1,Y=void 0,a=void 0,c=[],l=[]}},wi=()=>{if(y!==void 0){let B,te;if(w.length>0)B=yn(w,void 0,!0),te=`type ${y} = ${B};`;else if(x)B=x,te=kp(B)?`interface ${y} ${B}`:`type ${y} = ${B};`;else B="{}",te=`type ${y} = ${B};`;f(y,C),e.typedefs.set(y,{type:B,name:y,description:Ve(E),ts:te,tags:S.length>0?S:void 0,...v?{internal:!0}:{},source:C}),w.length=0,y=void 0,x=void 0,E=void 0,C=void 0,S=[],v=!1}},Ni=()=>{if(N!==void 0){let ye=`(${ae.map(({name:Ce,type:ee,optional:he})=>`${Ce}${he?"?":""}: ${ee}`).join(", ")}) => ${ie||"void"}`,q=`type ${N} = ${ye};`;f(N,H),e.typedefs.set(N,{type:ye,name:N,description:Ve(D),ts:q,tags:U.length>0?U:void 0,...Z?{internal:!0}:{},source:H}),ae.length=0,ie=void 0,N=void 0,D=void 0,H=void 0,U=[],Z=!1}},mc=P.some((B)=>B.tag==="slot"||B.tag==="snippet"),yc=P.some((B)=>B.tag==="extends"||B.tag==="extendProps"),gc=P.some((B)=>B.tag==="slot"||B.tag==="snippet"||B.tag==="event"||B.tag==="typedef"||B.tag==="callback");for(let B=0;B<P.length;B++){let{tag:te,type:ye,name:q,description:Ce,optional:ee,default:he,raw:ve,lines:oe}=P[B],vt=P[B+1],Re=t.aliasType(ye),At=gs.has(te)?fc(oe):void 0;if(At)hc(te,q,oe,P[B-1]);switch(te){case"extends":case"extendProps":if(e.extends!==void 0)ce(e,"extend-props-duplicate",q,`A second @extends/@extendProps tag ("${q}") overwrote the first ("${e.extends.interface}"); only one is used.`,Me(e,oe));if(e.extends={interface:q,import:Re},Q)Q=!1;break;case"restProps":{let le=q?Ce?`${q} ${Ce}`:q:Ce,it=kt(le)||At;if(!it&&Q&&!fe&&k)it=k,fe=!0;if(e.rest_props={type:"Element",name:Re,description:it||void 0},Q)Q=!1;break}case"slot":case"snippet":{let we=Ct(oe,vt);if(!we&&Q&&!fe&&k)we=k,fe=!0;if(!we&&ne.length===0)we=At;if(Q)Q=!1;let it=Re;if(!it)it="Record<string, never>",ce(e,"slot-missing-type",q||"default",`@${te}${q?` "${q}"`:""} is missing a required {Type} annotation; falling back to "${it}".`,Me(e,oe));qt(e,{slot_name:q,slot_props:it,slot_description:we||void 0,slot_deprecated:Le,slot_tags:ne.length>0?[...ne]:void 0,slot_internal:Se||void 0,source:Me(e,oe)}),ne.length=0,Le=void 0,Se=!1;{let xc=q===void 0||q===""?null:q;F=(bc)=>{let Jn=e.slots.get(xc);if(Jn)Jn.tags=[...Jn.tags??[],bc]}}break}case"csspart":{let le=Ct(oe,vt);e.cssParts.push({name:q,...le?{description:le}:{}});break}case"cssprop":case"cssproperty":{let le=Ct(oe,vt);e.cssProperties.push({name:q,...Re?{type:Re}:{},...he===void 0?{}:{default:he},...le?{description:le}:{}});break}case"event":{if(ki(),A=q,O=Re,a=oe.length>0?oe[0].number:void 0,I=kt(bn(oe))||At,!I&&Q&&!fe&&k)I=k,fe=!0;if(Y=Me(e,oe),ne.length>0)c.push(...ne),ne.length=0;if(F=(we)=>c.push(we),Q)Q=!1;break}case"type":if(A!==void 0)O=Re;break;case"param":if(N!==void 0)ae.push({name:q,type:Re,optional:ee||!1});break;case"returns":case"return":if(N!==void 0)ie=Re;break;case"property":{let le={name:q,type:Re,description:Ct(oe,vt),optional:ee||!1,default:he};if(A!==void 0)g(d,le,A,Me(e,oe));else if(y!==void 0)g(w,le,y,Me(e,oe));break}case"typedef":{if(wi(),y=ys(q),x=Re,C=Me(e,oe),E=Ct(oe,vt)||At,!E&&Q&&!fe&&k)E=k,fe=!0;if(ne.length>0)S.push(...ne),ne.length=0;if(v=Se,Se=!1,F=(we)=>S.push(we),Q)Q=!1;break}case"callback":{if(Ni(),N=ys(q),H=Me(e,oe),D=Ct(oe,vt)||At,!D&&Q&&!fe&&k)D=k,fe=!0;if(ne.length>0)U.push(...ne),ne.length=0;if(Z=Se,Se=!1,F=(we)=>U.push(we),Q)Q=!1;break}case"generics":{let le=Re||q;for(let we of ze(q))u(we.trim(),Me(e,oe));if(r=!0,p(),m(q,le),Q)Q=!1;break}case"template":{let le=Ss(q,Re,he);if(mc&&!yc){e.deferredSlotBlockGenerics.push({name:q,constraint:le});break}if(G)break;if(u(q,Me(e,oe)),i=!0,p(),m(q,le),Q)Q=!1;break}case"deprecated":{let le=bs(q,Ce);if(A===void 0)Le??=le;else re??=le;break}case"ignore":case"internal":{if(A===void 0)Se=!0;else z=!0;break}case"sveld-ignore":if(A!==void 0)l.push(q);break;case"enum":case"class":case"implements":case"this":case"namespace":case"memberof":case"module":case"file":case"overview":break;default:{let le={name:te,body:ve};if(!xs.has(te)&&!Ap.has(te))ce(e,"jsdoc-unknown-tag",te,`Unknown JSDoc tag "@${te}"; passed through unchanged. If this is a typo, fix the tag name.`,Me(e,oe));if(F)F(le);else ne.push(le)}break}}if(ki(),wi(),Ni(),gc&&ne.length>0){for(let B of ne)ce(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.`);ne.length=0}}}function Mp({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 Ut(e){let t=e.explicitType??e.jsdocType??e.resolvedType??e.typeSeed,n=e.jsdocParams??e.resolvedParams,r=e.jsdocReturnType??e.resolvedReturnType;if(e.isFunctionDeclaration&&t==="() => any"&&r){let u=e.jsdocTypeParameters?`<${e.jsdocTypeParameters}>`:"";t=n&&n.length>0?`${u}(${n.map((m)=>`${m.name}${m.optional?"?":""}: ${m.type}`).join(", ")}) => ${r}`:`${u}() => ${r}`}let i=e.jsdocDescription??e.resolvedDescription;if(i===void 0&&t!==void 0)i=e.typedefs?.get(t)?.description;let o=Mp({hasTypeScriptType:e.explicitType!==void 0,hasJSDocType:e.jsdocType!==void 0||e.jsdocParams!==void 0||e.jsdocReturnType!==void 0||e.resolvedType!==void 0,inferredType:e.inferredTypeForSource,finalType:t}),s=e.initializerIsFunction||e.isFunctionDeclaration||e.inferIsFunctionFromTypeSignature===!0&&(!!e.jsdocParams?.length||e.jsdocReturnType!==void 0||!!e.jsdocType?.includes("=>")||!!e.resolvedType?.includes("=>")||!!e.explicitType?.includes("=>")),p=s?e.jsdocTypeParameters:void 0;return{type:t,typeSource:o,description:i,params:n,returnType:r,isFunction:s,typeParameters:p}}function Op(e){if(!e||typeof e!=="object"||!("type"in e))return;let t=String(e.type),n=jt(t);if(!n&&!Ht(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 vs(e,t){let n=Op(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 Te(e,t,n){if(!t||e.has(t))return;e.set(t,n)}function Gt(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 me(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":me(e.left,t);break;case"ArrayPattern":for(let n of e.elements)me(n??void 0,t);break;case"ObjectPattern":for(let n of e.properties)if(n.type==="Property")me(n.value,t);else if(n.type==="RestElement")me(n.argument,t);break;case"RestElement":me(e.argument,t);break}return t}function gr(e,t){if(!t||typeof t!=="object"||!("type"in t))return;if(t.type==="Identifier"){let r=Gt(e,t.name);if(r)e.reactive_vars.add(r);return}let n=me(t);for(let r of n){let i=Gt(e,r);if(i)e.reactive_vars.add(i)}}function Wt(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 As(e){if(!e||typeof e!=="object"||!("type"in e))return!1;let t=String(e.type);return t==="FunctionDeclaration"||t==="FunctionExpression"||t==="ArrowFunctionExpression"}function Bp(e,t){let n=e.scopeDeclarations.get(t);if(!n)n=new Map,e.scopeDeclarations.set(t,n);return n}function Fp(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 yr(e,t,n,r,i){if(!_i(t))return;let o=i?.allowRunesProps??!1,s=i?.forceProp??!1,p=t;for(let u of p.declarations){if(o&&Ke(at(u.init),"$props")){for(let g of Fp(e,p,u))Te(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,f=s?"prop":"local";for(let g of me(u.id))Te(m,g,f==="prop"?{kind:"prop",publicPropName:g}:{kind:"local"})}}function Vp(e,t){if("id"in e&&e.id&&typeof e.id==="object"&&"name"in e.id&&typeof e.id.name==="string")Te(t,e.id.name,{kind:"local"});for(let n of e.params)for(let r of me(n))Te(t,r,{kind:"local"})}function $p(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":yr(e,i,n,r);break;case"FunctionDeclaration":if(i.id?.name)Te(n,i.id.name,{kind:"local"});break;case"ClassDeclaration":if(i.id?.name)Te(n,i.id.name,{kind:"local"});break}}}function jp(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)Te(t.componentScope,o.local.name,{kind:"local"});break;case"VariableDeclaration":yr(e,i,t.componentScope,t.componentScope,{allowRunesProps:!0});break;case"FunctionDeclaration":if(i.id?.name)Te(t.componentScope,i.id.name,{kind:"local"});break;case"ClassDeclaration":if(i.id?.name)Te(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")yr(e,i.declaration,t.componentScope,t.componentScope,{forceProp:!0});else if(i.declaration.type==="FunctionDeclaration"&&i.declaration.id?.name)Te(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,jp(e,t,t.parsed?.instance)}function ks(e){return{varScopeStack:[e.componentScope]}}function ws(e,t,n,r){if(!Wt(r))return;let i=Bp(t,r),o=n.varScopeStack[n.varScopeStack.length-1]??t.componentScope;switch(String(r.type)){case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":Vp(r,i);break;case"BlockStatement":$p(e,r.body,i,o);break;case"CatchClause":if("param"in r)for(let p of me(r.param))Te(i,p,{kind:"local"});break;case"EachBlock":{let p=r;for(let u of me(p.context))Te(i,u,{kind:"local"});if(typeof p.index==="string")Te(i,p.index,{kind:"local"});else if(p.index&&"name"in p.index)Te(i,p.index.name,{kind:"local"});break}case"AwaitBlock":{let p=r;for(let u of me(p.value))Te(i,u,{kind:"local"});for(let u of me(p.error))Te(i,u,{kind:"local"});break}}if(As(r))n.varScopeStack.push(i);return i}function Ns(e,t){if(As(t))e.varScopeStack.pop()}function br(e){return e==="TSTypeAnnotation"||e==="TSTypeAliasDeclaration"||e==="TSInterfaceDeclaration"||e==="TSTypeParameterDeclaration"||e==="TSTypeParameterInstantiation"}function Tr(e,t,n,r){xr(e,null,null,t,n,r?.skipTypeOnlySubtrees===!0)}function xr(e,t,n,r,i,o){r(e,t,n);let s=e.type;if((s==="Identifier"||s==="Literal"||s==="Text")&&e.typeAnnotation===void 0){if(i)i(e);return}if(o&&s.charCodeAt(0)===84&&br(s)){if(i)i(e);return}for(let p in e){if(p==="leadingComments")continue;let u=e[p];if(!u||typeof u!=="object")continue;if(Array.isArray(u))for(let m=0;m<u.length;m++){let f=u[m];if(f&&typeof f==="object"&&typeof f.type==="string")xr(f,e,p,r,i,o)}else if(typeof u.type==="string")xr(u,e,p,r,i,o)}if(i)i(e)}var Ds=new Set(["$state","$derived","$effect","$props","$bindable","$inspect","$host"]);function Hp(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 qp=Array.from(Ds);function _s(e){return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e===95||e===36}function Up(e){if(e.includes("\\u"))return!0;for(let t of qp){let n=e.indexOf(t);while(n!==-1){if(!_s(e.charCodeAt(n-1))&&!_s(e.charCodeAt(n+t.length)))return!0;n=e.indexOf(t,n+1)}}return!1}function Gp(e,t){for(let n=t.length-1;n>=0;n-=1)if(t[n]?.has(e))return!0;return!1}function Wp(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??[])me(r,t);break}case"BlockStatement":Tn(e.body,t);break;case"CatchClause":me(e.param,t);break;case"EachBlock":{let n=e;if(me(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;me(n.value,t),me(n.error,t);break}}return t}function Tn(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??[])me(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)Tn([r],t);break}}}}function Er(e,t){if(!e||typeof e!=="object")return!1;return Sr(e,void 0,[...t])}function Sr(e,t,n){if(br(e.type))return!1;let r=Wt(e);if(r)n.push(Wp(e));let i=!1;if(t&&e.type==="Identifier"&&e.name!==void 0&&Ds.has(e.name)&&!t.type.startsWith("TS")&&Hp(e,t)&&!Gp(e.name,n))i=!0;else for(let o in e){if(o==="leadingComments")continue;let s=e[o];if(!s||typeof s!=="object")continue;if(Array.isArray(s)){for(let p=0;p<s.length;p++){let u=s[p];if(u&&typeof u==="object"&&typeof u.type==="string"){if(Sr(u,e,n)){i=!0;break}}}if(i)break}else if(typeof s.type==="string"){if(Sr(s,e,n)){i=!0;break}}}if(r)n.pop();return i}function Is(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&&!Up(e.source))return"legacy";let n=new Set;Tn(Is(t.module),n);let r=new Set;return Tn(Is(t.instance),r),Er(t.module,[n])||Er(t.instance,[n,r])||Er(t.fragment,[n,r])?"runes":"legacy"}var Kp=/[A-Za-z_$][\w$]*/g;function zp(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,u=o[s];if(!p||u?.start===void 0||u?.end===void 0)continue;let m=pe(e,u.start,u.end)?.trim();if(m)r.set(p,m)}return r}function Xp(e,t){if(t.size===0)return e;return e.replace(Kp,(n)=>t.get(n)??n)}function wt(e,t,n,r,i=new Set){let o=new Map;if(!n?.type)return o;let s=(p)=>{for(let u of p){if(u?.type!=="TSPropertySignature"||u.computed)continue;if(!u.key)continue;let m=e.getPropertyName(u.key);if(!m)continue;let f=u.typeAnnotation?.start,g=u.typeAnnotation?.end;if(f===void 0||g===void 0)continue;let b=pe(t,f+1,g)?.trim();if(!b)continue;Pt(t,u.typeAnnotation?.typeAnnotation),o.set(m,{type:b,optional:u.optional===!0,source:se(t,u)})}};switch(n.type){case"TSTypeLiteral":s(n.members??[]);break;case"TSInterfaceDeclaration":s(n.body?.body??[]);break;case"TSTypeAliasDeclaration":{let p=wt(e,t,n.typeAnnotation,r,i);for(let[u,m]of p)o.set(u,m);break}case"TSTypeReference":{let p=rs(n.typeName);if(!p||i.has(p))break;let u=r.get(p);if(!u)break;i.add(p);let m=wt(e,t,u,r,i);i.delete(p);let f=zp(t,u,n);for(let[g,b]of m)o.set(g,f.size===0?b:{...b,type:Xp(b.type,f)});break}case"TSIntersectionType":for(let p of n.types??[]){let u=wt(e,t,p,r,i);for(let[m,f]of u)o.set(m,f)}break;case"TSParenthesizedType":{let p=wt(e,t,n.typeAnnotation,r,i);for(let[u,m]of p)o.set(u,m);break}}return o}function Jp(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 Rs(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:Jp(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 u=p.local?.name;if(!u)continue;if(!(s.importKind==="type"||p.importKind==="type"))continue;let f,g;if(p.type==="ImportSpecifier")f="named",g=p.imported?.type==="Identifier"?p.imported.name:typeof p.imported?.value==="string"?p.imported.value:void 0;else if(p.type==="ImportDefaultSpecifier")f="default";else if(p.type==="ImportNamespaceSpecifier")f="namespace";if(!f)continue;t.typeImportBindingsByLocalName.set(u,{importedName:g,localName:u,source:String(s.source.value),specifierType:f})}if((s.type==="TSInterfaceDeclaration"||s.type==="TSTypeAliasDeclaration")&&s.id?.name&&s.start!==void 0&&s.end!==void 0)t.localTypeDeclarationsByName.set(s.id.name,{code:pe(t,s.start,s.end)?.trim()??"",node:s,start:s.start});if(s.type==="TSEnumDeclaration"&&s.id?.name&&s.start!==void 0&&s.end!==void 0)t.localTypeDeclarationsByName.set(s.id.name,{code:as(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 u=yt(t,p.id.typeAnnotation);if(u)t.explicitPropTypesByName.set(p.id.name,u),Pt(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 u=yt(t,p.id.typeAnnotation);if(u)t.explicitVariableTypesByName.set(p.id.name,u)}}for(let s of o){if(!s||typeof s!=="object"||!("declarations"in s))continue;for(let p of s.declarations??[]){if(!Ke(at(p.init),"$props"))continue;let u=p.id?.typeAnnotation?void 0:Di(p.init),m=p.id?.typeAnnotation?.typeAnnotation??u,f=p.id?.typeAnnotation?yt(t,p.id.typeAnnotation):ss(t,u),g=wt(e,t,m,new Map(Array.from(t.localTypeDeclarationsByName.entries(),([P,k])=>[P,k.node]))),b=new Set,T=new Set;if(Oe(t,m,b,T),ls(t,b,T),p.start!==void 0){let P={canonicalType:f,props:g,referencedImportedTypes:b,referencedLocalTypes:T};if(t.runesPropsDeclarationMetadataByDeclaratorStart.set(p.start,P),f)t.typedRunesPropsDeclarations.push(P)}}}}function Ms(e,t,n){for(let r of n.declarations){if(!Ke(at(r.init),"$props"))continue;if(r.id.type==="Identifier"){t.wholePropsLocals.add(r.id.name),t.restPropLocals.add(r.id.name);let s=ar(t,r.start);if(s)for(let[p,u]of s.props)Vt(e,t,p,{name:p,kind:"let",type:u.type,typeSource:"typescript",isFunction:!1,isFunctionDeclaration:!1,isRequired:!u.optional,constant:!1,reactive:!1,source:u.source});continue}if(r.id.type!=="ObjectPattern")continue;let i=Ze(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 u,m;if(s.value.type==="Identifier")u=s.value.name;else{let c=s.value;u=c.left.name,m=c.right}if(!u)continue;if(e.trackPropLocalName(p,u),p==="children")t.snippetPropLocals.add(u);let f=Es(t,e,s)??(o===1?i:void 0),g=ns(t,r.start,p),{init:b,bindable:T}=Gi(m),P=b==null?{isFunction:!1}:ct(e,t,b),{value:k,type:_,isFunction:V,defaultValue:G}=P,A=g?.type===void 0&&f?.type===void 0?P.resolvedType:void 0;if(P.pendingCallDefault)t.pendingCallDefaultCandidates.push({propName:p,location:"props",...P.pendingCallDefault});let{type:O,typeSource:I,description:re,params:z,returnType:Y,isFunction:a}=Ut({explicitType:g?.type,typeSeed:_,inferredTypeForSource:_,jsdocType:f?.type,jsdocDescription:f?.description,jsdocParams:f?.params,jsdocReturnType:f?.returnType,resolvedType:A,resolvedDescription:P.resolvedDescription,resolvedParams:P.resolvedParams,resolvedReturnType:P.resolvedReturnType,initializerIsFunction:V,isFunctionDeclaration:!1,inferIsFunctionFromTypeSignature:!0});if(T)t.reactive_vars.add(p);ot(t,"prop-unknown-type",p,f?.sveldIgnore),Vt(e,t,p,{name:p,...u===p?{}:{localName:u},kind:"let",description:re,binding:f?.binding,deprecated:f?.deprecated,tags:f?.tags,...f?.internal?{internal:!0}:{},...T?{bindable:!0}:{},type:O,typeSource:I,value:k,defaultValue:G,params:z,returnType:Y,isFunction:a,isFunctionDeclaration:!1,isRequired:!T&&b==null&&g?.optional!==!0,constant:!1,reactive:T,source:se(t,s)})}}}function Yp(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 Qp(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 Zp=/^["']|["']$/g,el=/\?$/,tl=/^\{/,nl=/\}$/;function rl(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(el,"").replace(Zp,""),o=e.slice(n+1).trim();if(!i||!o)return;return{name:i,type:o}}}return}function Os(e,t,n,r,i){if(n){let u=new Map(Array.from(t.localTypeDeclarationsByName.entries(),([f,g])=>[f,g.node])),m=wt(e,t,n,u);for(let[f,g]of m)pt(t,{name:f,detail:g.type,has_argument:!0,source:g.source});return}let o=e.resolveLocalVarJSDoc(r)?.type,s=o?Yp(o):void 0;if(!s)return;let p=s.trim().replace(tl,"").replace(nl,"");for(let u of Qp(p)){let m=rl(u);if(!m)continue;pt(t,{name:m.name,detail:m.type,has_argument:!0,source:i})}}function Bs(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 Fs=new Set(["TSAsExpression","TSSatisfiesExpression","TSNonNullExpression","TSTypeAssertion","TSInstantiationExpression"]);function Cr(e){return e!==null&&typeof e==="object"&&typeof e.type==="string"}function Vs(e){if(!Fs.has(e.type))return e;let t=e.expression;while(t&&Fs.has(t.type))t=t.expression;return t??e}function En(e){if(!Cr(e))return;vr(e)}function vr(e){for(let t in e){if(t==="leadingComments")continue;let n=e[t];if(!n||typeof n!=="object")continue;if(Array.isArray(n))for(let r=0;r<n.length;r++){let i=n[r];if(!Cr(i))continue;let o=Vs(i);if(o!==i)n[r]=o;vr(o)}else if(Cr(n)){let r=Vs(n);if(r!==n)e[t]=r;vr(r)}}}function il(e,t,n,r,i){for(let o of e){if(o.type!=="Block"||o.start<n||o.end>r)continue;let s=t.slice(o.start,o.end);i.push({end:o.end,isJsDoc:s.startsWith("/**")&&s.length>4,text:s})}}function $s(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 sl(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)$s(r.declaration,r.start,t);else $s(r,r.start,t)}return t}function al(e,t,n){let r;for(let i of e){if(i.end>t)break;if(!i.isJsDoc)continue;if(!fr.test(n.slice(i.end,t)))continue;r=i}return r}function js(e,t){let n=new Map;if(!e.source)return n;let r=[e.parsed?.module,e.parsed?.instance],i=[],o=[],s=e.parsed?.comments??[];for(let p of r){let u=p?.content;if(!u?.body||u.start===void 0||u.end===void 0)continue;il(s,e.source,u.start,u.end,i),o.push(...sl(u.body))}i.sort((p,u)=>p.end-u.end);for(let p of o){let u=al(i,p.start,e.source);if(!u)continue;let m=hr(e,u.text),{type:f,description:g,ignore:b,internal:T}=mr(m);if(b.length>0)ot(e,"context-any-type",p.name,b);if(!f)continue;n.set(p.name,{type:t.aliasType(f.type),description:g||f.description,internal:T||void 0})}return n}var ol={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 Hs(e,t){let n=ol[e];if(!n)return!1;if(!t)return!0;return(n.direct??n.descendant??[]).includes(t)}var Fr={};Cc(Fr,{Node:()=>Yt,Parser:()=>de,Position:()=>Nt,SourceLocation:()=>Xt,TokContext:()=>He,Token:()=>Ln,TokenType:()=>J,defaultOptions:()=>Cn,getLineInfo:()=>Dr,isIdentifierChar:()=>Ie,isIdentifierStart:()=>Ae,isNewLine:()=>xt,keywordTypes:()=>wn,lineBreak:()=>Pe,lineBreakG:()=>Js,nonASCIIwhitespace:()=>Ir,parse:()=>ql,parseExpressionAt:()=>Ul,tokContexts:()=>ue,tokTypes:()=>h,tokenizer:()=>Gl,version:()=>Na});var cl=[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],Ks=[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],pl="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-᫝᫠-᫫ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・",zs="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-࢏ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚ౜ౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ೜-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ƛ꟱-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",Ar={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"},Pr="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",ll={5:Pr,"5module":Pr+" export import",6:Pr+" const class extends export import super"},Xs=/^in(stanceof)?$/,ul=new RegExp("["+zs+"]"),dl=new RegExp("["+zs+pl+"]");function kr(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 Ae(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&&ul.test(String.fromCharCode(e));if(t===!1)return!1;return kr(e,Ks)}function Ie(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&&dl.test(String.fromCharCode(e));if(t===!1)return!1;return kr(e,Ks)||kr(e,cl)}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 $e(e,t){return new J(e,{beforeExpr:!0,binop:t})}var je={beforeExpr:!0},_e={startsExpr:!0},wn={};function X(e,t){if(t===void 0)t={};return t.keyword=e,wn[e]=new J(e,t)}var h={num:new J("num",_e),regexp:new J("regexp",_e),string:new J("string",_e),name:new J("name",_e),privateId:new J("privateId",_e),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(",",je),semi:new J(";",je),colon:new J(":",je),dot:new J("."),question:new J("?",je),questionDot:new J("?."),arrow:new J("=>",je),template:new J("template"),invalidTemplate:new J("invalidTemplate"),ellipsis:new J("...",je),backQuote:new J("`",_e),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:$e("||",1),logicalAND:$e("&&",2),bitwiseOR:$e("|",3),bitwiseXOR:$e("^",4),bitwiseAND:$e("&",5),equality:$e("==/!=/===/!==",6),relational:$e("</>/<=/>=",7),bitShift:$e("<</>>/>>>",8),plusMin:new J("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:$e("%",10),star:$e("*",10),slash:$e("/",10),starstar:new J("**",{beforeExpr:!0}),coalesce:$e("??",1),_break:X("break"),_case:X("case",je),_catch:X("catch"),_continue:X("continue"),_debugger:X("debugger"),_default:X("default",je),_do:X("do",{isLoop:!0,beforeExpr:!0}),_else:X("else",je),_finally:X("finally"),_for:X("for",{isLoop:!0}),_function:X("function",_e),_if:X("if"),_return:X("return",je),_switch:X("switch"),_throw:X("throw",je),_try:X("try"),_var:X("var"),_const:X("const"),_while:X("while",{isLoop:!0}),_with:X("with"),_new:X("new",{beforeExpr:!0,startsExpr:!0}),_this:X("this",_e),_super:X("super",_e),_class:X("class",_e),_extends:X("extends",je),_export:X("export"),_import:X("import",_e),_null:X("null",_e),_true:X("true",_e),_false:X("false",_e),_in:X("in",{beforeExpr:!0,binop:7}),_instanceof:X("instanceof",{beforeExpr:!0,binop:7}),_typeof:X("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:X("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:X("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},Pe=/\r\n?|\n|\u2028|\u2029/,Js=new RegExp(Pe.source,"g");function xt(e){return e===10||e===13||e===8232||e===8233}function Ys(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 Ir=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,ge=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,Qs=Object.prototype,{hasOwnProperty:fl,toString:hl}=Qs,_t=Object.hasOwn||function(e,t){return fl.call(e,t)},qs=Array.isArray||function(e){return hl.call(e)==="[object Array]"},Us=Object.create(null);function lt(e){return Us[e]||(Us[e]=new RegExp("^(?:"+e.replace(/ /g,"|")+")$"))}function et(e){if(e<=65535)return String.fromCharCode(e);return e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320)}var ml=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,Nt=function(t,n){this.line=t,this.column=n};Nt.prototype.offset=function(t){return new Nt(this.line,this.column+t)};var Xt=function(t,n,r){if(this.start=n,this.end=r,t.sourceFile!==null)this.source=t.sourceFile};function Dr(e,t){for(var n=1,r=0;;){var i=Ys(e,r,t);if(i<0)return new Nt(n,t-r);++n,r=i}}var Cn={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},Gs=!1;function yl(e){var t={};for(var n in Cn)t[n]=e&&_t(e,n)?e[n]:Cn[n];if(t.ecmaVersion==="latest")t.ecmaVersion=1e8;else if(t.ecmaVersion==null){if(!Gs&&typeof console==="object"&&console.warn)Gs=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
26
+ Defaulting to 2020, but this will stop working in the future.`);t.ecmaVersion=11}else if(t.ecmaVersion>=2015)t.ecmaVersion-=2009;if(t.allowReserved==null)t.allowReserved=t.ecmaVersion<5;if(!e||e.allowHashBang==null)t.allowHashBang=t.ecmaVersion>=14;if(qs(t.onToken)){var r=t.onToken;t.onToken=function(i){return r.push(i)}}if(qs(t.onComment))t.onComment=gl(t,t.onComment);if(t.sourceType==="commonjs"&&t.allowAwaitOutsideFunction)throw Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return t}function gl(e,t){return function(n,r,i,o,s,p){var u={type:n?"Block":"Line",value:r,start:i,end:o};if(e.locations)u.loc=new Xt(this,s,p);if(e.ranges)u.range=[i,o];t.push(u)}}var gt=1,bt=2,Lr=4,Zs=8,Rr=16,ea=32,Nn=64,ta=128,Tt=256,Jt=512,na=1024,_n=gt|bt|Tt;function Mr(e,t){return bt|(e?Lr:0)|(t?Zs:0)}var vn=0,Or=1,nt=2,ra=3,ia=4,sa=5,de=function(t,n,r){this.options=t=yl(t),this.sourceFile=t.sourceFile,this.keywords=lt(ll[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var i="";if(t.allowReserved!==!0){if(i=Ar[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module")i+=" await"}this.reservedWords=lt(i);var o=(i?i+" ":"")+Ar.strict;if(this.reservedWordsStrict=lt(o),this.reservedWordsStrictBind=lt(o+" "+Ar.strictBind),this.input=String(n),this.containsEsc=!1,this.pos=r||0,this.curLine=1,t.startLocation)this.lineStart=this.pos-t.startLocation.column,this.curLine=t.startLocation.line;else if(r){if(this.lineStart=this.input.lastIndexOf(`
27
+ `,r-1)+1,this.options.locations)this.curLine=this.input.slice(0,this.lineStart).split(Pe).length}else this.lineStart=0;if(this.type=h.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=t.sourceType==="module",this.strict=this.inModule||t.strict===!0||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&t.allowHashBang&&this.input.slice(0,2)==="#!")this.skipLineComment(2);this.scopeStack=[],this.enterScope(this.options.sourceType==="commonjs"?bt:gt),this.regexpState=null,this.privateNameStack=[]},Ue={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}};de.prototype.parse=function(){var t=this,n=this.options.program||this.startNode();return this.nextToken(),this.catchStackOverflow(function(){return t.parseTopLevel(n)})};Ue.inFunction.get=function(){return(this.currentVarScope().flags&bt)>0};Ue.inGenerator.get=function(){return(this.currentVarScope().flags&Zs)>0};Ue.inAsync.get=function(){return(this.currentVarScope().flags&Lr)>0};Ue.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],n=t.flags;if(n&(Tt|Jt))return!1;if(n&bt)return(n&Lr)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};Ue.allowReturn.get=function(){if(this.inFunction)return!0;if(this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&gt)return!0;return!1};Ue.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags;return(t&Nn)>0||this.options.allowSuperOutsideMethod};Ue.allowDirectSuper.get=function(){return(this.currentThisScope().flags&ta)>0};Ue.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};Ue.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],n=t.flags;if(n&(Tt|Jt)||n&bt&&!(n&Rr))return!0}return!1};Ue.allowUsing.get=function(){var e=this.currentScope(),t=e.flags;if(t&na)return!1;if(!this.inModule&&t&gt)return!1;return!0};Ue.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&Tt)>0};de.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};de.parse=function(t,n){return new this(n,t).parse()};de.parseExpressionAt=function(t,n,r){var i=new this(r,t,n);return i.nextToken(),i.parseExpression()};de.tokenizer=function(t,n){return new this(n,t)};Object.defineProperties(de.prototype,Ue);var Ee=de.prototype,xl=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;Ee.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){ge.lastIndex=e,e+=ge.exec(this.input)[0].length;var t=xl.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])==="use strict"){ge.lastIndex=e+t[0].length;var n=ge.exec(this.input),r=n.index+n[0].length,i=this.input.charAt(r);return i===";"||i==="}"||Pe.test(n[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(i)||i==="!"&&this.input.charAt(r+1)==="=")}if(e+=t[0].length,ge.lastIndex=e,e+=ge.exec(this.input)[0].length,this.input[e]===";")e++}};Ee.eat=function(e){if(this.type===e)return this.next(),!0;else return!1};Ee.isContextual=function(e){return this.type===h.name&&this.value===e&&!this.containsEsc};Ee.eatContextual=function(e){if(!this.isContextual(e))return!1;return this.next(),!0};Ee.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}};Ee.expectContextual=function(e){if(!this.eatContextual(e))this.unexpected()};Ee.canInsertSemicolon=function(){return this.type===h.eof||this.type===h.braceR||Pe.test(this.input.slice(this.lastTokEnd,this.start))};Ee.insertSemicolon=function(){if(this.canInsertSemicolon()){if(this.options.onInsertedSemicolon)this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc);return!0}};Ee.semicolon=function(){if(!this.eat(h.semi)&&!this.insertSemicolon())this.unexpected()};Ee.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}};Ee.expect=function(e){this.eat(e)||this.unexpected()};Ee.unexpected=function(e){this.raise(e!=null?e:this.start,"Unexpected token")};var In=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};Ee.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")};Ee.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")};Ee.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")};Ee.isSimpleAssignTarget=function(e){if(e.type==="ParenthesizedExpression")return this.isSimpleAssignTarget(e.expression);return e.type==="Identifier"||e.type==="MemberExpression"};var M=de.prototype;M.parseTopLevel=function(e){var t=Object.create(null);if(!e.body)e.body=[];while(this.type!==h.eof){var n=this.parseStatement(null,!0,t);e.body.push(n)}if(this.inModule)for(var r=0,i=Object.keys(this.undefinedExports);r<i.length;r+=1){var o=i[r];this.raiseRecoverable(this.undefinedExports[o].start,"Export '"+o+"' is not defined")}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType==="commonjs"?"script":this.options.sourceType,this.finishNode(e,"Program")};var Br={kind:"loop"},bl={kind:"switch"};M.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;ge.lastIndex=this.pos;var t=ge.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(Ae(r)){var i=n;do n+=r<=65535?1:2;while(Ie(r=this.fullCharCodeAt(n)));if(r===92)return!0;var o=this.input.slice(i,n);if(!Xs.test(o))return!0}return!1};M.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;ge.lastIndex=this.pos;var e=ge.exec(this.input),t=this.pos+e[0].length,n;return!Pe.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)==="function"&&(t+8===this.input.length||!(Ie(n=this.fullCharCodeAt(t+8))||n===92))};M.isUsingKeyword=function(e,t){if(this.options.ecmaVersion<17||!this.isContextual(e?"await":"using"))return!1;ge.lastIndex=this.pos;var n=ge.exec(this.input),r=this.pos+n[0].length;if(Pe.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||Ie(o=this.fullCharCodeAt(i))||o===92)return!1;ge.lastIndex=i;var s=ge.exec(this.input);if(r=i+s[0].length,s&&Pe.test(this.input.slice(i,r)))return!1}var p=this.fullCharCodeAt(r);if(!Ae(p)&&p!==92)return!1;var u=r;do r+=p<=65535?1:2;while(Ie(p=this.fullCharCodeAt(r)));if(p===92)return!0;var m=this.input.slice(u,r);if(Xs.test(m))return!1;if(t&&!e&&m==="of"){ge.lastIndex=r;var f=ge.exec(this.input);if(r=r+f[0].length,this.input.charCodeAt(r)!==61||(p=this.input.charCodeAt(r+1))===61||p===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=h._var,o="let";switch(r){case h._break:case h._continue:return this.parseBreakContinueStatement(i,r.keyword);case h._debugger:return this.parseDebuggerStatement(i);case h._do:return this.parseDoStatement(i);case h._for:return this.parseForStatement(i);case h._function:if(e&&(this.strict||e!=="if"&&e!=="label")&&this.options.ecmaVersion>=6)this.unexpected();return this.parseFunctionStatement(i,!1,!e);case h._class:if(e)this.unexpected();return this.parseClass(i,!0);case h._if:return this.parseIfStatement(i);case h._return:return this.parseReturnStatement(i);case h._switch:return this.parseSwitchStatement(i);case h._throw:return this.parseThrowStatement(i);case h._try:return this.parseTryStatement(i);case h._const:case h._var:if(o=o||this.value,e&&o!=="var")this.unexpected();return this.parseVarStatement(i,o);case h._while:return this.parseWhileStatement(i);case h._with:return this.parseWithStatement(i);case h.braceL:return this.parseBlock(!0,i);case h.semi:return this.parseEmptyStatement(i);case h._export:case h._import:if(this.options.ecmaVersion>10&&r===h._import){ge.lastIndex=this.pos;var s=ge.exec(this.input),p=this.pos+s[0].length,u=this.input.charCodeAt(p);if(u===40||u===46)return this.parseExpressionStatement(i,this.parseExpression())}if(!this.options.allowImportExportEverywhere){if(!t)this.raise(this.start,"'import' and 'export' may only appear at the top level");if(!this.inModule)this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")}return r===h._import?this.parseImport(i):this.parseExport(i,n);default:if(this.isAsyncFunction()){if(e)this.unexpected();return this.next(),this.parseFunctionStatement(i,!0,!e)}var 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 f=this.value,g=this.parseExpression();if(r===h.name&&g.type==="Identifier"&&this.eat(h.colon))return this.parseLabeledStatement(i,f,g,e);else return this.parseExpressionStatement(i,g)}};M.parseBreakContinueStatement=function(e,t){var n=t==="break";if(this.next(),this.eat(h.semi)||this.insertSemicolon())e.label=null;else if(this.type!==h.name)this.unexpected();else e.label=this.parseIdent(),this.semicolon();var r=0;for(;r<this.labels.length;++r){var i=this.labels[r];if(e.label==null||i.name===e.label.name){if(i.kind!=null&&(n||i.kind==="loop"))break;if(e.label&&n)break}}if(r===this.labels.length)this.raise(e.start,"Unsyntactic "+t);return this.finishNode(e,n?"BreakStatement":"ContinueStatement")};M.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")};M.parseDoStatement=function(e){if(this.next(),this.labels.push(Br),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(h._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6)this.eat(h.semi);else this.semicolon();return this.finishNode(e,"DoWhileStatement")};M.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Br),this.enterScope(0),this.expect(h.parenL),this.type===h.semi){if(t>-1)this.unexpected(t);return this.parseFor(e,null)}var n=this.isLet();if(this.type===h._var||this.type===h._const||n){var r=this.startNode(),i=n?"let":this.value;return this.next(),this.parseVar(r,!0,i),this.finishNode(r,"VariableDeclaration"),this.parseForAfterInit(e,r,t)}var o=this.isContextual("let"),s=!1,p=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(p){var u=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(u,!0,p),this.finishNode(u,"VariableDeclaration"),this.parseForAfterInit(e,u,t)}var m=this.containsEsc,f=new In,g=this.start,b=t>-1?this.parseExprSubscripts(f,"await"):this.parseExpression(!0,f);if(this.type===h._in||(s=this.options.ecmaVersion>=6&&this.isContextual("of"))){if(t>-1){if(this.type===h._in)this.unexpected(t);e.await=!0}else if(s&&this.options.ecmaVersion>=8){if(b.start===g&&!m&&b.type==="Identifier"&&b.name==="async")this.unexpected();else if(this.options.ecmaVersion>=9)e.await=!1}if(o&&s)this.raise(b.start,"The left-hand side of a for-of loop may not start with 'let'.");return this.toAssignable(b,!1,f),this.checkLValPattern(b),this.parseForIn(e,b)}else this.checkExpressionErrors(f,!0);if(t>-1)this.unexpected(t);return this.parseFor(e,b)};M.parseForAfterInit=function(e,t,n){if((this.type===h._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&t.declarations.length===1){if(this.type===h._in){if((t.kind==="using"||t.kind==="await using")&&!t.declarations[0].init)this.raise(this.start,"Using declaration is not allowed in for-in loops");if(this.options.ecmaVersion>=9&&n>-1)this.unexpected(n)}else if(this.options.ecmaVersion>=9)e.await=n>-1;return this.parseForIn(e,t)}if(n>-1)this.unexpected(n);return this.parseFor(e,t)};M.parseFunctionStatement=function(e,t,n){return this.next(),this.parseFunction(e,zt|(n?0:wr),!1,t)};M.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(h._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")};M.parseReturnStatement=function(e){if(!this.allowReturn)this.raise(this.start,"'return' outside of function");if(this.next(),this.eat(h.semi)||this.insertSemicolon())e.argument=null;else e.argument=this.parseExpression(),this.semicolon();return this.finishNode(e,"ReturnStatement")};M.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(h.braceL),this.labels.push(bl),this.enterScope(na);var t;for(var n=!1;this.type!==h.braceR;)if(this.type===h._case||this.type===h._default){var r=this.type===h._case;if(t)this.finishNode(t,"SwitchCase");if(e.cases.push(t=this.startNode()),t.consequent=[],this.next(),r)t.test=this.parseExpression();else{if(n)this.raiseRecoverable(this.lastTokStart,"Multiple default clauses");n=!0,t.test=null}this.expect(h.colon)}else{if(!t)this.unexpected();t.consequent.push(this.parseStatement(null))}if(this.exitScope(),t)this.finishNode(t,"SwitchCase");return this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")};M.parseThrowStatement=function(e){if(this.next(),Pe.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 Tl=[];M.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type==="Identifier";return this.enterScope(t?ea:0),this.checkLValPattern(e,t?ia:nt),this.expect(h.parenR),e};M.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===h._catch){var t=this.startNode();if(this.next(),this.eat(h.parenL))t.param=this.parseCatchClauseParam();else{if(this.options.ecmaVersion<10)this.unexpected();t.param=null,this.enterScope(0)}t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}if(e.finalizer=this.eat(h._finally)?this.parseBlock():null,!e.handler&&!e.finalizer)this.raise(e.start,"Missing catch or finally clause");return this.finishNode(e,"TryStatement")};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(Br),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 p=this.type.isLoop?"loop":this.type===h._switch?"switch":null;for(var u=this.labels.length-1;u>=0;u--){var m=this.labels[u];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")};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(h.braceL),e)this.enterScope(0);while(this.type!==h.braceR){var r=this.parseStatement(null);t.body.push(r)}if(n)this.strict=!1;if(this.next(),e)this.exitScope();return this.finishNode(t,"BlockStatement")};M.parseFor=function(e,t){return e.init=t,this.expect(h.semi),e.test=this.type===h.semi?null:this.parseExpression(),this.expect(h.semi),e.update=this.type===h.parenR?null:this.parseExpression(),this.expect(h.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")};M.parseForIn=function(e,t){var n=this.type===h._in;if(this.next(),t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!n||this.options.ecmaVersion<8||this.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier"))this.raise(t.start,(n?"for-in":"for-of")+" loop variable declaration may not have an initializer");return e.left=t,e.right=n?this.parseExpression():this.parseMaybeAssign(),this.expect(h.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,n?"ForInStatement":"ForOfStatement")};M.parseVar=function(e,t,n,r){e.declarations=[],e.kind=n;for(;;){var i=this.startNode();if(this.parseVarId(i,n),this.eat(h.eq))i.init=this.parseMaybeAssign(t);else if(!r&&n==="const"&&!(this.type===h._in||this.options.ecmaVersion>=6&&this.isContextual("of")))this.unexpected();else if(!r&&(n==="using"||n==="await using")&&this.options.ecmaVersion>=17&&this.type!==h._in&&!this.isContextual("of"))this.raise(this.lastTokEnd,"Missing initializer in "+n+" declaration");else if(!r&&i.id.type!=="Identifier"&&!(t&&(this.type===h._in||this.isContextual("of"))))this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value");else i.init=null;if(e.declarations.push(this.finishNode(i,"VariableDeclarator")),!this.eat(h.comma))break}return e};M.parseVarId=function(e,t){e.id=t==="using"||t==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(e.id,t==="var"?Or:nt,!1)};var zt=1,wr=2,aa=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===h.star&&t&wr)this.unexpected();e.generator=this.eat(h.star)}if(this.options.ecmaVersion>=8)e.async=!!r;if(t&zt){if(e.id=t&aa&&this.type!==h.name?null:this.parseIdent(),e.id&&!(t&wr))this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?Or:nt:ra)}var o=this.yieldPos,s=this.awaitPos,p=this.awaitIdentPos;if(this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Mr(e.async,e.generator)),!(t&zt))e.id=this.type===h.name?this.parseIdent():null;return this.parseFunctionParams(e),this.parseFunctionBody(e,n,!1,i),this.yieldPos=o,this.awaitPos=s,this.awaitIdentPos=p,this.finishNode(e,t&zt?"FunctionDeclaration":"FunctionExpression")};M.parseFunctionParams=function(e){this.expect(h.parenL),e.params=this.parseBindingList(h.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(h.braceL);while(this.type!==h.braceR){var s=this.parseClassElement(e.superClass!==null);if(s){if(i.body.push(s),s.type==="MethodDefinition"&&s.kind==="constructor"){if(o)this.raiseRecoverable(s.start,"Duplicate constructor in the same class");o=!0}else if(s.key&&s.key.type==="PrivateIdentifier"&&El(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(h.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(h.braceL))return this.parseClassStaticBlock(n),n;if(this.isClassElementNameStart()||this.type===h.star)p=!0;else r="static"}if(n.static=p,!r&&t>=8&&this.eatContextual("async"))if((this.isClassElementNameStart()||this.type===h.star)&&!this.canInsertSemicolon())o=!0;else r="async";if(!r&&(t>=9||!o)&&this.eat(h.star))i=!0;if(!r&&!o&&!i){var u=this.value;if(this.eatContextual("get")||this.eatContextual("set"))if(this.isClassElementNameStart())s=u;else r=u}if(r)n.computed=!1,n.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),n.key.name=r,this.finishNode(n.key,"Identifier");else this.parseClassElementName(n);if(t<13||this.type===h.parenL||s!=="method"||i||o){var m=!n.static&&An(n,"constructor"),f=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,f)}else this.parseClassField(n);return n};M.isClassElementNameStart=function(){return this.type===h.name||this.type===h.privateId||this.type===h.num||this.type===h.string||this.type===h.bracketL||this.type.keyword};M.parseClassElementName=function(e){if(this.type===h.privateId){if(this.value==="constructor")this.raise(this.start,"Classes can't have an element named '#constructor'");e.computed=!1,e.key=this.parsePrivateIdent()}else this.parsePropertyName(e)};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&&An(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(An(e,"constructor"))this.raise(e.key.start,"Classes can't have a field named 'constructor'");else if(e.static&&An(e,"prototype"))this.raise(e.key.start,"Classes can't have a static field named 'prototype'");if(this.eat(h.eq))this.enterScope(Jt|Nn),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|Nn);while(this.type!==h.braceR){var n=this.parseStatement(null);e.body.push(n)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")};M.parseClassId=function(e,t){if(this.type===h.name){if(e.id=this.parseIdent(),t)this.checkLValSimple(e.id,nt,!1)}else{if(t===!0)this.unexpected();e.id=null}};M.parseClassSuper=function(e){e.superClass=this.eat(h._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(!_t(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 El(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 An(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!==h.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(h.star))return this.parseExportAllDeclaration(e,t);if(this.eat(h._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement()){if(e.declaration=this.parseExportDeclaration(e),e.declaration.type==="VariableDeclaration")this.checkVariableExport(t,e.declaration.declarations);else this.checkExport(t,e.declaration.id,e.declaration.id.start);if(e.specifiers=[],e.source=null,this.options.ecmaVersion>=16)e.attributes=[]}else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from")){if(this.type!==h.string)this.unexpected();if(e.source=this.parseExprAtom(),this.options.ecmaVersion>=16)e.attributes=this.parseWithClause()}else{for(var n=0,r=e.specifiers;n<r.length;n+=1){var i=r[n];if(this.checkUnreserved(i.local),this.checkLocalExport(i.local),i.local.type==="Literal")this.raise(i.local.start,"A string literal cannot be used as an exported binding without `from`.")}if(e.source=null,this.options.ecmaVersion>=16)e.attributes=[]}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")};M.parseExportDeclaration=function(e){return this.parseStatement(null)};M.parseExportDefaultDeclaration=function(){var e;if(this.type===h._function||(e=this.isAsyncFunction())){var t=this.startNode();if(this.next(),e)this.next();return this.parseFunction(t,zt|aa,!1,e)}else if(this.type===h._class){var n=this.startNode();return this.parseClass(n,"nullableID")}else{var r=this.parseMaybeAssign();return this.semicolon(),r}};M.checkExport=function(e,t,n){if(!e)return;if(typeof t!=="string")t=t.type==="Identifier"?t.name:t.value;if(_t(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,p=t.elements;s<p.length;s+=1){var u=p[s];if(u)this.checkPatternExport(e,u)}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(h.braceL);while(!this.eat(h.braceR)){if(!n){if(this.expect(h.comma),this.afterTrailingComma(h.braceR))break}else n=!1;t.push(this.parseExportSpecifier(e))}return t};M.parseImport=function(e){if(this.next(),this.type===h.string)e.specifiers=Tl,e.source=this.parseExprAtom();else e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===h.string?this.parseExprAtom():this.unexpected();if(this.options.ecmaVersion>=16)e.attributes=this.parseWithClause();return this.semicolon(),this.finishNode(e,"ImportDeclaration")};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,nt),this.finishNode(e,"ImportSpecifier")};M.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,nt),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,nt),this.finishNode(e,"ImportNamespaceSpecifier")};M.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===h.name){if(e.push(this.parseImportDefaultSpecifier()),!this.eat(h.comma))return e}if(this.type===h.star)return e.push(this.parseImportNamespaceSpecifier()),e;this.expect(h.braceL);while(!this.eat(h.braceR)){if(!t){if(this.expect(h.comma),this.afterTrailingComma(h.braceR))break}else t=!1;e.push(this.parseImportSpecifier())}return e};M.parseWithClause=function(){var e=[];if(!this.eat(h._with))return e;this.expect(h.braceL);var t={},n=!0;while(!this.eat(h.braceR)){if(!n){if(this.expect(h.comma),this.afterTrailingComma(h.braceR))break}else n=!1;var r=this.parseImportAttribute(),i=r.key.type==="Identifier"?r.key.name:r.key.value;if(_t(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===h.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(h.colon),this.type!==h.string)this.unexpected();return e.value=this.parseExprAtom(),this.finishNode(e,"ImportAttribute")};M.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===h.string){var e=this.parseLiteral(this.value);if(ml.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 Ge=de.prototype;Ge.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};Ge.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};Ge.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")};Ge.parseRestBinding=function(){var e=this.startNode();if(this.next(),this.options.ecmaVersion===6&&this.type!==h.name)this.unexpected();return e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")};Ge.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case h.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(h.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case h.braceL:return this.parseObj(!0)}return this.parseIdent()};Ge.parseBindingList=function(e,t,n,r){var i=[],o=!0;while(!this.eat(e)){if(o)o=!1;else this.expect(h.comma);if(t&&this.type===h.comma)i.push(null);else if(n&&this.afterTrailingComma(e))break;else if(this.type===h.ellipsis){var s=this.parseRestBinding();if(this.parseBindingListItem(s),i.push(s),this.type===h.comma)this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");this.expect(e);break}else i.push(this.parseAssignableListItem(r))}return i};Ge.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t};Ge.parseBindingListItem=function(e){return e};Ge.parseMaybeDefault=function(e,t,n){if(n=n||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(h.eq))return n;var r=this.startNodeAt(e,t);return r.left=n,r.right=this.parseMaybeAssign(),this.finishNode(r,"AssignmentPattern")};Ge.checkLValSimple=function(e,t,n){if(t===void 0)t=vn;var r=t!==vn;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===nt&&e.name==="let")this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name");if(n){if(_t(n,e.name))this.raiseRecoverable(e.start,"Argument name clash");n[e.name]=!0}if(t!==sa)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")}};Ge.checkLValPattern=function(e,t,n){if(t===void 0)t=vn;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 u=p[s];if(u)this.checkLValInnerPattern(u,t,n)}break;default:this.checkLValSimple(e,t,n)}};Ge.checkLValInnerPattern=function(e,t,n){if(t===void 0)t=vn;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 He=function(t,n,r,i,o){this.token=t,this.isExpr=!!n,this.preserveSpace=!!r,this.override=i,this.generator=!!o},ue={b_stat:new He("{",!1),b_expr:new He("{",!0),b_tmpl:new He("${",!1),p_stat:new He("(",!1),p_expr:new He("(",!0),q_tmpl:new He("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new He("function",!1),f_expr:new He("function",!0),f_expr_gen:new He("function",!0,!1,null,!0),f_gen:new He("function",!1,!1,null,!0)},It=de.prototype;It.initialContext=function(){return[ue.b_stat]};It.curContext=function(){return this.context[this.context.length-1]};It.braceIsBlock=function(e){var t=this.curContext();if(t===ue.f_expr||t===ue.f_stat)return!0;if(e===h.colon&&(t===ue.b_stat||t===ue.b_expr))return!t.isExpr;if(e===h._return||e===h.name&&this.exprAllowed)return Pe.test(this.input.slice(this.lastTokEnd,this.start));if(e===h._else||e===h.semi||e===h.eof||e===h.parenR||e===h.arrow)return!0;if(e===h.braceL)return t===ue.b_stat;if(e===h._var||e===h._const||e===h.name)return!1;return!this.exprAllowed};It.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};It.updateContext=function(e){var t,n=this.type;if(n.keyword&&e===h.dot)this.exprAllowed=!1;else if(t=n.updateContext)t.call(this,e);else this.exprAllowed=n.beforeExpr};It.overrideContext=function(e){if(this.curContext()!==e)this.context[this.context.length-1]=e};h.parenR.updateContext=h.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var e=this.context.pop();if(e===ue.b_stat&&this.curContext().token==="function")e=this.context.pop();this.exprAllowed=!e.isExpr};h.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?ue.b_stat:ue.b_expr),this.exprAllowed=!0};h.dollarBraceL.updateContext=function(){this.context.push(ue.b_tmpl),this.exprAllowed=!0};h.parenL.updateContext=function(e){var t=e===h._if||e===h._for||e===h._with||e===h._while;this.context.push(t?ue.p_stat:ue.p_expr),this.exprAllowed=!0};h.incDec.updateContext=function(){};h._function.updateContext=h._class.updateContext=function(e){if(e.beforeExpr&&e!==h._else&&!(e===h.semi&&this.curContext()!==ue.p_stat)&&!(e===h._return&&Pe.test(this.input.slice(this.lastTokEnd,this.start)))&&!((e===h.colon||e===h.braceL)&&this.curContext()===ue.b_stat))this.context.push(ue.f_expr);else this.context.push(ue.f_stat);this.exprAllowed=!1};h.colon.updateContext=function(){if(this.curContext().token==="function")this.context.pop();this.exprAllowed=!0};h.backQuote.updateContext=function(){if(this.curContext()===ue.q_tmpl)this.context.pop();else this.context.push(ue.q_tmpl);this.exprAllowed=!1};h.star.updateContext=function(e){if(e===h._function){var t=this.context.length-1;if(this.context[t]===ue.f_expr)this.context[t]=ue.f_expr_gen;else this.context[t]=ue.f_gen}this.exprAllowed=!0};h.name.updateContext=function(e){var t=!1;if(this.options.ecmaVersion>=6&&e!==h.dot){if(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())t=!0}this.exprAllowed=t};var j=de.prototype;j.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};j.parseExpression=function(e,t){var n=this;return this.catchStackOverflow(function(){var{start:r,startLoc:i}=n,o=n.parseMaybeAssign(e,t);if(n.type===h.comma){var s=n.startNodeAt(r,i);s.expressions=[o];while(n.eat(h.comma))s.expressions.push(n.parseMaybeAssign(e,t));return n.finishNode(s,"SequenceExpression")}return o})};j.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 In,r=!0;var p=this.start,u=this.startLoc;if(this.type===h.parenL||this.type===h.name)this.potentialArrowAt=this.start,this.potentialArrowInForAwait=e==="await";var m=this.parseMaybeConditional(e,t);if(n)m=n.call(this,m,p,u);if(this.type.isAssign){var f=this.startNodeAt(p,u);if(f.operator=this.value,this.type===h.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===h.eq)this.checkLValPattern(m);else this.checkLValSimple(m);if(f.left=m,this.next(),f.right=this.parseMaybeAssign(e),s>-1)t.doubleProto=s;return this.finishNode(f,"AssignmentExpression")}else if(r)this.checkExpressionErrors(t,!0);if(i>-1)t.parenthesizedAssign=i;if(o>-1)t.trailingComma=o;return m};j.parseMaybeConditional=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return i;if(!(i.type==="ArrowFunctionExpression"&&i.start===n)&&this.eat(h.question)){var o=this.startNodeAt(n,r);return o.test=i,o.consequent=this.parseMaybeAssign(),this.expect(h.colon),o.alternate=this.parseMaybeAssign(e),this.finishNode(o,"ConditionalExpression")}return i};j.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)};j.parseExprOp=function(e,t,n,r,i){var o=this.type.binop;if(o!=null&&(!i||this.type!==h._in)){if(o>r){var s=this.type===h.logicalOR||this.type===h.logicalAND,p=this.type===h.coalesce;if(p)o=h.logicalAND.binop;var u=this.value;this.next();var m=this.start,f=this.startLoc,g=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,i),m,f,o,i),b=this.buildBinary(t,n,e,g,u,s||p);if(s&&this.type===h.coalesce||p&&(this.type===h.logicalOR||this.type===h.logicalAND))this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses");return this.parseExprOp(b,t,n,r,i)}}return e};j.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")};j.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(),u=this.type===h.incDec;if(p.operator=this.value,p.prefix=!0,this.next(),p.argument=this.parseMaybeUnary(null,!0,u,r),this.checkExpressionErrors(e,!0),u)this.checkLValSimple(p.argument);else if(this.strict&&p.operator==="delete"&&oa(p.argument))this.raiseRecoverable(p.start,"Deleting local variable in strict mode");else if(p.operator==="delete"&&Nr(p.argument))this.raiseRecoverable(p.start,"Private fields can not be deleted");else t=!0;s=this.finishNode(p,u?"UpdateExpression":"UnaryExpression")}else if(!t&&this.type===h.privateId){if((r||this.privateNameStack.length===0)&&this.options.checkPrivateFields)this.unexpected();if(s=this.parsePrivateIdent(),this.type!==h._in)this.unexpected()}else{if(s=this.parseExprSubscripts(e,r),this.checkExpressionErrors(e))return s;while(this.type.postfix&&!this.canInsertSemicolon()){var 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(h.starstar))if(t)this.unexpected(this.lastTokStart);else return this.buildBinary(i,o,s,this.parseMaybeUnary(null,!1,!1,r),"**",!1);else return s};function oa(e){return e.type==="Identifier"||e.type==="ParenthesizedExpression"&&oa(e.expression)}function Nr(e){return e.type==="MemberExpression"&&e.property.type==="PrivateIdentifier"||e.type==="ChainExpression"&&Nr(e.expression)||e.type==="ParenthesizedExpression"&&Nr(e.expression)}j.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};j.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 u=this.startNodeAt(t,n);u.expression=p,p=this.finishNode(u,"ChainExpression")}return p}e=p}};j.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(h.arrow)};j.parseSubscriptAsyncArrow=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!0,r)};j.parseSubscript=function(e,t,n,r,i,o,s){var p=this.options.ecmaVersion>=11,u=p&&this.eat(h.questionDot);if(r&&u)this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var m=this.eat(h.bracketL);if(m||u&&this.type!==h.parenL&&this.type!==h.backQuote||this.eat(h.dot)){var f=this.startNodeAt(t,n);if(f.object=e,m)f.property=this.parseExpression(),this.expect(h.bracketR);else if(this.type===h.privateId&&e.type!=="Super")f.property=this.parsePrivateIdent();else f.property=this.parseIdent(this.options.allowReserved!=="never");if(f.computed=!!m,p)f.optional=u;e=this.finishNode(f,"MemberExpression")}else if(!r&&this.eat(h.parenL)){var g=new In,b=this.yieldPos,T=this.awaitPos,P=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var k=this.parseExprList(h.parenR,this.options.ecmaVersion>=8,!1,g);if(i&&!u&&this.shouldParseAsyncArrow()){if(this.checkPatternErrors(g,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0)this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function");return this.yieldPos=b,this.awaitPos=T,this.awaitIdentPos=P,this.parseSubscriptAsyncArrow(t,n,k,s)}this.checkExpressionErrors(g,!0),this.yieldPos=b||this.yieldPos,this.awaitPos=T||this.awaitPos,this.awaitIdentPos=P||this.awaitIdentPos;var _=this.startNodeAt(t,n);if(_.callee=e,_.arguments=k,p)_.optional=u;e=this.finishNode(_,"CallExpression")}else if(this.type===h.backQuote){if(u||o)this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var V=this.startNodeAt(t,n);V.tag=e,V.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(V,"TaggedTemplateExpression")}return e};j.parseExprAtom=function(e,t,n){if(this.type===h.slash)this.readRegexp();var r,i=this.potentialArrowAt===this.start;switch(this.type){case h._super:if(!this.allowSuper)this.raise(this.start,"'super' keyword outside a method");if(r=this.startNode(),this.next(),this.type===h.parenL&&!this.allowDirectSuper)this.raise(r.start,"super() call outside constructor of a subclass");if(this.type!==h.dot&&this.type!==h.bracketL&&this.type!==h.parenL)this.unexpected();return this.finishNode(r,"Super");case h._this:return r=this.startNode(),this.next(),this.finishNode(r,"ThisExpression");case h.name:var o=this.start,s=this.startLoc,p=this.containsEsc,u=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!p&&u.name==="async"&&!this.canInsertSemicolon()&&this.eat(h._function))return this.overrideContext(ue.f_expr),this.parseFunction(this.startNodeAt(o,s),0,!1,!0,t);if(i&&!this.canInsertSemicolon()){if(this.eat(h.arrow))return this.parseArrowExpression(this.startNodeAt(o,s),[u],!1,t);if(this.options.ecmaVersion>=8&&u.name==="async"&&this.type===h.name&&!p&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc)){if(u=this.parseIdent(!1),this.canInsertSemicolon()||!this.eat(h.arrow))this.unexpected();return this.parseArrowExpression(this.startNodeAt(o,s),[u],!0,t)}}return u;case h.regexp:var m=this.value;return r=this.parseLiteral(m.value),r.regex={pattern:m.pattern,flags:m.flags},r;case h.num:case h.string:return this.parseLiteral(this.value);case h._null:case h._true:case h._false:return r=this.startNode(),r.value=this.type===h._null?null:this.type===h._true,r.raw=this.type.keyword,this.next(),this.finishNode(r,"Literal");case h.parenL:var f=this.start,g=this.parseParenAndDistinguishExpression(i,t);if(e){if(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(g))e.parenthesizedAssign=f;if(e.parenthesizedBind<0)e.parenthesizedBind=f}return g;case h.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(h.bracketR,!0,!0,e),this.finishNode(r,"ArrayExpression");case h.braceL:return this.overrideContext(ue.b_expr),this.parseObj(!1,e);case h._function:return r=this.startNode(),this.next(),this.parseFunction(r,0);case h._class:return this.parseClass(this.startNode(),!1);case h._new:return this.parseNew();case h.backQuote:return this.parseTemplate();case h._import:if(this.options.ecmaVersion>=11)return this.parseExprImport(n);else return this.unexpected();default:return this.parseExprAtomDefault()}};j.parseExprAtomDefault=function(){this.unexpected()};j.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc)this.raiseRecoverable(this.start,"Escape sequence in keyword import");if(this.next(),this.type===h.parenL&&!e)return this.parseDynamicImport(t);else if(this.type===h.dot){var n=this.startNodeAt(t.start,t.loc&&t.loc.start);return n.name="import",t.meta=this.finishNode(n,"Identifier"),this.parseImportMeta(t)}else this.unexpected()};j.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)if(!this.eat(h.parenR))if(this.expect(h.comma),!this.afterTrailingComma(h.parenR)){if(e.options=this.parseMaybeAssign(),!this.eat(h.parenR)){if(this.expect(h.comma),!this.afterTrailingComma(h.parenR))this.unexpected()}}else e.options=null;else e.options=null;else if(!this.eat(h.parenR)){var t=this.start;if(this.eat(h.comma)&&this.eat(h.parenR))this.raiseRecoverable(t,"Trailing comma is not allowed in import()");else this.unexpected(t)}return this.finishNode(e,"ImportExpression")};j.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")};j.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")};j.parseParenExpression=function(){this.expect(h.parenL);var e=this.parseExpression();return this.expect(h.parenR),e};j.shouldParseArrow=function(e){return!this.canInsertSemicolon()};j.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,u=[],m=!0,f=!1,g=new In,b=this.yieldPos,T=this.awaitPos,P;this.yieldPos=0,this.awaitPos=0;while(this.type!==h.parenR)if(m?m=!1:this.expect(h.comma),o&&this.afterTrailingComma(h.parenR,!0)){f=!0;break}else if(this.type===h.ellipsis){if(P=this.start,u.push(this.parseParenItem(this.parseRestBinding())),this.type===h.comma)this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else u.push(this.parseMaybeAssign(!1,g,this.parseParenItem));var k=this.lastTokEnd,_=this.lastTokEndLoc;if(this.expect(h.parenR),e&&this.shouldParseArrow(u)&&this.eat(h.arrow))return this.checkPatternErrors(g,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=b,this.awaitPos=T,this.parseParenArrowList(n,r,u,t);if(!u.length||f)this.unexpected(this.lastTokStart);if(P)this.unexpected(P);if(this.checkExpressionErrors(g,!0),this.yieldPos=b||this.yieldPos,this.awaitPos=T||this.awaitPos,u.length>1)i=this.startNodeAt(s,p),i.expressions=u,this.finishNodeAt(i,"SequenceExpression",k,_);else i=u[0]}else i=this.parseParenExpression();if(this.options.preserveParens){var V=this.startNodeAt(n,r);return V.expression=i,this.finishNode(V,"ParenthesizedExpression")}else return i};j.parseParenItem=function(e){return e};j.parseParenArrowList=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!1,r)};var Sl=[];j.parseNew=function(){if(this.containsEsc)this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===h.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name="new",e.meta=this.finishNode(t,"Identifier"),this.next();var n=this.containsEsc;if(e.property=this.parseIdent(!0),e.property.name!=="target")this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'");if(n)this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters");if(!this.allowNewDotTarget)this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block");return this.finishNode(e,"MetaProperty")}var r=this.start,i=this.startLoc;if(e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),r,i,!0,!1),e.callee.type==="Super")this.raiseRecoverable(r,"Invalid use of 'super'");if(this.eat(h.parenL))e.arguments=this.parseExprList(h.parenR,this.options.ecmaVersion>=8,!1);else e.arguments=Sl;return this.finishNode(e,"NewExpression")};j.parseTemplateElement=function(e){var t=e.isTagged,n=this.startNode();if(this.type===h.invalidTemplate){if(!t)this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal");n.value={raw:this.value.replace(/\r\n?/g,`
20
28
  `),cooked:null}}else n.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
21
- `),cooked:this.value};return this.next(),n.tail=this.type===h.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===h.eof)this.raise(this.pos,"Unterminated template literal");this.expect(h.dollarBraceL),n.expressions.push(this.parseExpression()),this.expect(h.braceR),n.quasis.push(r=this.parseTemplateElement({isTagged:t}))}return this.next(),this.finishNode(n,"TemplateLiteral")};V.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===h.name||this.type===h.num||this.type===h.string||this.type===h.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===h.star)&&!Se.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(h.braceR)){if(!r){if(this.expect(h.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(h.braceR))break}else r=!1;var o=this.parseProperty(e,t);if(!e)this.checkPropClash(o,i,t);n.properties.push(o)}return this.finishNode(n,e?"ObjectPattern":"ObjectExpression")};V.parseProperty=function(e,t){var n=this.startNode(),r,i,o,s;if(this.options.ecmaVersion>=9&&this.eat(h.ellipsis)){if(e){if(n.argument=this.parseIdent(!1),this.type===h.comma)this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");return this.finishNode(n,"RestElement")}if(n.argument=this.parseMaybeAssign(!1,t),this.type===h.comma&&t&&t.trailingComma<0)t.trailingComma=this.start;return this.finishNode(n,"SpreadElement")}if(this.options.ecmaVersion>=6){if(n.method=!1,n.shorthand=!1,e||t)o=this.start,s=this.startLoc;if(!e)r=this.eat(h.star)}var 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(h.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===h.colon)this.unexpected();if(this.eat(h.colon))e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,s),e.kind="init";else if(this.options.ecmaVersion>=6&&this.type===h.parenL){if(t)this.unexpected();e.method=!0,e.value=this.parseMethod(n,r),e.kind="init"}else if(!t&&!p&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&(this.type!==h.comma&&this.type!==h.braceR&&this.type!==h.eq)){if(n||r)this.unexpected();this.parseGetterSetter(e)}else if(this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"){if(n||r)this.unexpected();if(this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos)this.awaitIdentPos=i;if(t)e.value=this.parseMaybeDefault(i,o,this.copyNode(e.key));else if(this.type===h.eq&&s){if(s.shorthandAssign<0)s.shorthandAssign=this.start;e.value=this.parseMaybeDefault(i,o,this.copyNode(e.key))}else e.value=this.copyNode(e.key);e.kind="init",e.shorthand=!0}else this.unexpected()};V.parsePropertyName=function(e){if(this.options.ecmaVersion>=6)if(this.eat(h.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(h.bracketR),e.key;else e.computed=!1;return e.key=this.type===h.num||this.type===h.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};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(kr(t,r.generator)|vn|(n?Us:0)),this.expect(h.parenL),r.params=this.parseBindingList(h.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(r,!1,!0,!1),this.yieldPos=i,this.awaitPos=o,this.awaitIdentPos=s,this.finishNode(r,"FunctionExpression")};V.parseArrowExpression=function(e,t,n,r){var i=this.yieldPos,o=this.awaitPos,s=this.awaitIdentPos;if(this.enterScope(kr(n,!1)|Pr),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!==h.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 u=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,zs);e.body=this.parseBlock(!1,void 0,s&&!o),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=u}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,wr,t?null:n)}};V.parseExprList=function(e,t,n,r){var i=[],o=!0;while(!this.eat(e)){if(!o){if(this.expect(h.comma),t&&this.afterTrailingComma(e))break}else o=!1;var s=void 0;if(n&&this.type===h.comma)s=null;else if(this.type===h.ellipsis){if(s=this.parseSpread(r),r&&this.type===h.comma&&r.trailingComma<0)r.trailingComma=this.start}else s=this.parseMaybeAssign(!1,r);i.push(s)}return i};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&An)&&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===h.name)e.name=this.value;else if(this.type.keyword){if(e.name=this.type.keyword,(e.name==="class"||e.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46))this.context.pop();this.type=h.name}else this.unexpected();return e};V.parsePrivateIdent=function(){var e=this.startNode();if(this.type===h.privateId)e.name=this.value;else this.unexpected();if(this.next(),this.finishNode(e,"PrivateIdentifier"),this.options.checkPrivateFields)if(this.privateNameStack.length===0)this.raise(e.start,"Private field '#"+e.name+"' must be declared in an enclosing class");else this.privateNameStack[this.privateNameStack.length-1].used.push(e);return e};V.parseYield=function(e){if(!this.yieldPos)this.yieldPos=this.start;var t=this.startNode();if(this.next(),this.type===h.semi||this.canInsertSemicolon()||this.type!==h.star&&!this.type.startsExpr)t.delegate=!1,t.argument=null;else t.delegate=this.eat(h.star),t.argument=this.parseMaybeAssign(e);return this.finishNode(t,"YieldExpression")};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 Sn=ce.prototype;Sn.raise=function(e,t){var n=vr(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};Sn.raiseRecoverable=Sn.raise;Sn.curPosition=function(){if(this.options.locations)return new vt(this.curLine,this.pos-this.lineStart)};var lt=ce.prototype,il=function(t){this.flags=t,this.var=[],this.lexical=[],this.functions=[]};lt.enterScope=function(e){this.scopeStack.push(new il(e))};lt.exitScope=function(){this.scopeStack.pop()};lt.treatFunctionsAsVarInScope=function(e){return e.flags&bt||!this.inModule&&e.flags&gt};lt.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&gt)delete this.undefinedExports[e]}else if(t===Ks){var o=this.currentScope();o.lexical.push(e)}else if(t===Ws){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 u=this.scopeStack[p];if(u.lexical.indexOf(e)>-1&&!(u.flags&qs&&u.lexical[0]===e)||!this.treatFunctionsAsVarInScope(u)&&u.functions.indexOf(e)>-1){r=!0;break}if(u.var.push(e),this.inModule&&u.flags&gt)delete this.undefinedExports[e];if(u.flags&An)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&(An|Kt|Tt))return t}};lt.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(An|Kt|Tt)&&!(t.flags&Pr))return t}};var zt=function(t,n,r){if(this.type="",this.start=n,this.end=0,t.options.locations)this.loc=new Wt(t,r);if(t.options.directSourceFile)this.sourceFile=t.options.directSourceFile;if(t.options.ranges)this.range=[n,0]},Xt=ce.prototype;Xt.startNode=function(){return new zt(this,this.start,this.startLoc)};Xt.startNodeAt=function(e,t){return new zt(this,e,t)};function Ys(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}Xt.finishNode=function(e,t){return Ys.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)};Xt.finishNodeAt=function(e,t,n,r){return Ys.call(this,e,t,n,r)};Xt.copyNode=function(e){var t=new zt(this,e.start,this.startLoc);for(var n in e)t[n]=e[n];return t};var sl="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",Qs="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",Zs=Qs+" Extended_Pictographic",ea=Zs,ta=ea+" EBase EComp EMod EPres ExtPict",na=ta,al=na,ol={9:Qs,10:Zs,11:ea,12:ta,13:na,14:al},cl="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",pl={9:"",10:"",11:"",12:"",13:"",14:cl},Ms="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",ra="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",ia=ra+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",sa=ia+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",aa=sa+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",oa=aa+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",ll=oa+" "+sl,ul={9:ra,10:ia,11:sa,12:aa,13:oa,14:ll},ca={};function dl(e){var t=ca[e]={binary:pt(ol[e]+" "+Ms),binaryOfStrings:pt(pl[e]),nonBinary:{General_Category:pt(Ms),Script:pt(ul[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(Ut=0,gn=[9,10,11,12,13,14];Ut<gn.length;Ut+=1)Er=gn[Ut],dl(Er);var Er,Ut,gn,L=ce.prototype,En=function(t,n){this.parent=t,this.base=n||this};En.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};En.prototype.sibling=function(){return new En(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=ca[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],p=this.at(r,n);if(p===-1||p!==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 fl(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&&fl(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 En(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 p=0;p<s.length;p++){var u=s.charAt(p);if(s.indexOf(u,p+1)>-1||n.indexOf(u)>-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&&hl(n))t+=Ye(n),e.advance();return t};function hl(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(pa(t))return e.lastIntValue=t,e.advance(),!0;return!1};function pa(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}L.regexp_eatPatternCharacters=function(e){var t=e.pos,n=0;while((n=e.current())!==-1&&!pa(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(ml(r))return e.lastIntValue=r,!0;return e.pos=t,!1};function ml(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(yl(r))return e.lastIntValue=r,!0;return e.pos=t,!1};function yl(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&&!kn(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(la(t))return e.lastIntValue=t%32,e.advance(),!0;return!1};function la(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)&&gl(e.lastIntValue))return!0;if(r)e.raise("Invalid unicode escape");e.pos=n}return!1};function gl(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 ua=0,Qe=1,Fe=2;L.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(xl(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 ua};function xl(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 ua};L.regexp_validateUnicodePropertyNameAndValue=function(e,t,n){if(!At(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(da(t=e.current()))e.lastStringValue+=Ye(t),e.advance();return e.lastStringValue!==""};function da(e){return la(e)||e===95}L.regexp_eatUnicodePropertyValue=function(e){var t=0;e.lastStringValue="";while(bl(t=e.current()))e.lastStringValue+=Ye(t),e.advance();return e.lastStringValue!==""};function bl(e){return da(e)||kn(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||ma(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()&&Tl(n))return!1;if(Sl(n))return!1;return e.advance(),e.lastIntValue=n,!0};function Tl(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 Sl(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(El(t))return e.lastIntValue=t,e.advance(),!0;return!1};function El(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(kn(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(kn(n=e.current()))e.lastIntValue=10*e.lastIntValue+(n-48),e.advance();return e.pos!==t};function kn(e){return e>=48&&e<=57}L.regexp_eatHexDigits=function(e){var t=e.pos,n=0;e.lastIntValue=0;while(fa(n=e.current()))e.lastIntValue=16*e.lastIntValue+ha(n),e.advance();return e.pos!==t};function fa(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function ha(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(ma(t))return e.lastIntValue=t-48,e.advance(),!0;return e.lastIntValue=0,!1};function ma(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(!fa(i))return e.pos=n,!1;e.lastIntValue=16*e.lastIntValue+ha(i),e.advance()}return!0};var wn=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 Wt(t,t.startLoc,t.endLoc);if(t.options.ranges)this.range=[t.start,t.end]},K=ce.prototype;K.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 wn(this));this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()};K.getToken=function(){return this.next(),new wn(this)};if(typeof Symbol<"u")K[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===h.eof,value:t}}}};K.nextToken=function(){var e=this.curContext();if(!e||!e.preserveSpace)this.skipSpace();if(this.start=this.pos,this.options.locations)this.startLoc=this.curPosition();if(this.pos>=this.input.length)return this.finishToken(h.eof);if(e.override)return e.override(this);else this.readToken(this.fullCharCodeAtPos())};K.readToken=function(e){if(Te(e,this.options.ecmaVersion>=6)||e===92)return this.readWord();return this.getTokenFromCode(e)};K.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};K.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)};K.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=js(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())};K.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())};K.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&&Cr.test(String.fromCharCode(e)))++this.pos;else break e}}};K.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)};K.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);if(this.options.ecmaVersion>=6&&e===46&&t===46)return this.pos+=3,this.finishToken(h.ellipsis);else return++this.pos,this.finishToken(h.dot)};K.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);if(this.exprAllowed)return++this.pos,this.readRegexp();if(e===61)return this.finishOp(h.assign,2);return this.finishOp(h.slash,1)};K.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,r=e===42?h.star:h.modulo;if(this.options.ecmaVersion>=7&&e===42&&t===42)++n,r=h.starstar,t=this.input.charCodeAt(this.pos+2);if(t===61)return this.finishOp(h.assign,n+1);return this.finishOp(r,n)};K.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(this.options.ecmaVersion>=12){var n=this.input.charCodeAt(this.pos+2);if(n===61)return this.finishOp(h.assign,3)}return this.finishOp(e===124?h.logicalOR:h.logicalAND,2)}if(t===61)return this.finishOp(h.assign,2);return this.finishOp(e===124?h.bitwiseOR:h.bitwiseAND,1)};K.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);if(e===61)return this.finishOp(h.assign,2);return this.finishOp(h.bitwiseXOR,1)};K.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||Se.test(this.input.slice(this.lastTokEnd,this.pos))))return this.skipLineComment(3),this.skipSpace(),this.nextToken();return this.finishOp(h.incDec,2)}if(t===61)return this.finishOp(h.assign,2);return this.finishOp(h.plusMin,1)};K.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),n=1;if(t===e){if(n=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+n)===61)return this.finishOp(h.assign,n+1);return this.finishOp(h.bitShift,n)}if(t===33&&e===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45)return this.skipLineComment(4),this.skipSpace(),this.nextToken();if(t===61)n=2;return this.finishOp(h.relational,n)};K.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===61)return this.finishOp(h.equality,this.input.charCodeAt(this.pos+2)===61?3:2);if(e===61&&t===62&&this.options.ecmaVersion>=6)return this.pos+=2,this.finishToken(h.arrow);return this.finishOp(e===61?h.eq:h.prefix,1)};K.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(t===46){var n=this.input.charCodeAt(this.pos+2);if(n<48||n>57)return this.finishOp(h.questionDot,2)}if(t===63){if(e>=12){var r=this.input.charCodeAt(this.pos+2);if(r===61)return this.finishOp(h.assign,3)}return this.finishOp(h.coalesce,2)}}return this.finishOp(h.question,1)};K.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(h.privateId,this.readWord1())}this.raise(this.pos,"Unexpected character '"+Ye(t)+"'")};K.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(h.parenL);case 41:return++this.pos,this.finishToken(h.parenR);case 59:return++this.pos,this.finishToken(h.semi);case 44:return++this.pos,this.finishToken(h.comma);case 91:return++this.pos,this.finishToken(h.bracketL);case 93:return++this.pos,this.finishToken(h.bracketR);case 123:return++this.pos,this.finishToken(h.braceL);case 125:return++this.pos,this.finishToken(h.braceR);case 58:return++this.pos,this.finishToken(h.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(h.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(t===120||t===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(t===111||t===79)return this.readRadixNumber(8);if(t===98||t===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(h.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+Ye(e)+"'")};K.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)};K.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(Se.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 Ke(this));p.reset(n,i,s),this.validateRegExpFlags(p),this.validateRegExpPattern(p);var u=null;try{u=new RegExp(i,s)}catch(m){}return this.finishToken(h.regexp,{pattern:i,flags:s,value:u})};K.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 u=0,m=t==null?1/0:t;u<m;++u,++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(p===95)this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore");if(u===0)this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits");p=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;p=d,s=s*e+y}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 Cl(e,t){if(t)return parseInt(e,8);return parseFloat(e.replace(/_/g,""))}function ya(e){if(typeof BigInt!=="function")return null;return BigInt(e.replace(/_/g,""))}K.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=ya(this.input.slice(t,this.pos)),++this.pos;else if(Te(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");return this.finishToken(h.num,n)};K.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=ya(this.input.slice(t,this.pos));if(++this.pos,Te(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");return this.finishToken(h.num,i)}if(n&&/[89]/.test(this.input.slice(t,this.pos)))n=!1;if(r===46&&!n)++this.pos,this.readInt(10),r=this.input.charCodeAt(this.pos);if((r===69||r===101)&&!n){if(r=this.input.charCodeAt(++this.pos),r===43||r===45)++this.pos;if(this.readInt(10)===null)this.raise(t,"Invalid number")}if(Te(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");var o=Cl(this.input.slice(t,this.pos),n);return this.finishToken(h.num,o)};K.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};K.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(h.string,t)};var ga={};K.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===ga)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1};K.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw ga;else this.raise(e,t)};K.readTmplToken=function(){var e="",t=this.pos;for(;;){if(this.pos>=this.input.length)this.raise(this.start,"Unterminated template");var n=this.input.charCodeAt(this.pos);if(n===96||n===36&&this.input.charCodeAt(this.pos+1)===123){if(this.pos===this.start&&(this.type===h.template||this.type===h.invalidTemplate))if(n===36)return this.pos+=2,this.finishToken(h.dollarBraceL);else return++this.pos,this.finishToken(h.backQuote);return e+=this.input.slice(t,this.pos),this.finishToken(h.template,e)}if(n===92)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(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+=`
22
- `;break;default:e+=String.fromCharCode(n);break}if(this.options.locations)++this.curLine,this.lineStart=this.pos;t=this.pos}else++this.pos}};K.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{")break;case"`":return this.finishToken(h.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":if(this.input[this.pos+1]===`
29
+ `),cooked:this.value};return this.next(),n.tail=this.type===h.backQuote,this.finishNode(n,"TemplateElement")};j.parseTemplate=function(e){if(e===void 0)e={};var t=e.isTagged;if(t===void 0)t=!1;var n=this.startNode();this.next(),n.expressions=[];var r=this.parseTemplateElement({isTagged:t});n.quasis=[r];while(!r.tail){if(this.type===h.eof)this.raise(this.pos,"Unterminated template literal");this.expect(h.dollarBraceL),n.expressions.push(this.parseExpression()),this.expect(h.braceR),n.quasis.push(r=this.parseTemplateElement({isTagged:t}))}return this.next(),this.finishNode(n,"TemplateLiteral")};j.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===h.name||this.type===h.num||this.type===h.string||this.type===h.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===h.star)&&!Pe.test(this.input.slice(this.lastTokEnd,this.start))};j.parseObj=function(e,t){var n=this.startNode(),r=!0,i={};n.properties=[],this.next();while(!this.eat(h.braceR)){if(!r){if(this.expect(h.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(h.braceR))break}else r=!1;var o=this.parseProperty(e,t);if(!e)this.checkPropClash(o,i,t);n.properties.push(o)}return this.finishNode(n,e?"ObjectPattern":"ObjectExpression")};j.parseProperty=function(e,t){var n=this.startNode(),r,i,o,s;if(this.options.ecmaVersion>=9&&this.eat(h.ellipsis)){if(e){if(n.argument=this.parseIdent(!1),this.type===h.comma)this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");return this.finishNode(n,"RestElement")}if(n.argument=this.parseMaybeAssign(!1,t),this.type===h.comma&&t&&t.trailingComma<0)t.trailingComma=this.start;return this.finishNode(n,"SpreadElement")}if(this.options.ecmaVersion>=6){if(n.method=!1,n.shorthand=!1,e||t)o=this.start,s=this.startLoc;if(!e)r=this.eat(h.star)}var 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(h.star),this.parsePropertyName(n);else i=!1;return this.parsePropertyValue(n,e,r,i,o,s,t,p),this.finishNode(n,"Property")};j.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")};j.parsePropertyValue=function(e,t,n,r,i,o,s,p){if((n||r)&&this.type===h.colon)this.unexpected();if(this.eat(h.colon))e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,s),e.kind="init";else if(this.options.ecmaVersion>=6&&this.type===h.parenL){if(t)this.unexpected();e.method=!0,e.value=this.parseMethod(n,r),e.kind="init"}else if(!t&&!p&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&(this.type!==h.comma&&this.type!==h.braceR&&this.type!==h.eq)){if(n||r)this.unexpected();this.parseGetterSetter(e)}else if(this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"){if(n||r)this.unexpected();if(this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos)this.awaitIdentPos=i;if(t)e.value=this.parseMaybeDefault(i,o,this.copyNode(e.key));else if(this.type===h.eq&&s){if(s.shorthandAssign<0)s.shorthandAssign=this.start;e.value=this.parseMaybeDefault(i,o,this.copyNode(e.key))}else e.value=this.copyNode(e.key);e.kind="init",e.shorthand=!0}else this.unexpected()};j.parsePropertyName=function(e){if(this.options.ecmaVersion>=6)if(this.eat(h.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(h.bracketR),e.key;else e.computed=!1;return e.key=this.type===h.num||this.type===h.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};j.initFunction=function(e){if(e.id=null,this.options.ecmaVersion>=6)e.generator=e.expression=!1;if(this.options.ecmaVersion>=8)e.async=!1};j.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(Mr(t,r.generator)|Nn|(n?ta:0)),this.expect(h.parenL),r.params=this.parseBindingList(h.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(r,!1,!0,!1),this.yieldPos=i,this.awaitPos=o,this.awaitIdentPos=s,this.finishNode(r,"FunctionExpression")};j.parseArrowExpression=function(e,t,n,r){var i=this.yieldPos,o=this.awaitPos,s=this.awaitIdentPos;if(this.enterScope(Mr(n,!1)|Rr),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")};j.parseFunctionBody=function(e,t,n,r){var i=t&&this.type!==h.braceL,o=this.strict,s=!1;if(i)e.body=this.parseMaybeAssign(r),e.expression=!0,this.checkParams(e,!1);else{var 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 u=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,sa);e.body=this.parseBlock(!1,void 0,s&&!o),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=u}this.exitScope()};j.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};j.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,Or,t?null:n)}};j.parseExprList=function(e,t,n,r){var i=[],o=!0;while(!this.eat(e)){if(!o){if(this.expect(h.comma),t&&this.afterTrailingComma(e))break}else o=!1;var s=void 0;if(n&&this.type===h.comma)s=null;else if(this.type===h.ellipsis){if(s=this.parseSpread(r),r&&this.type===h.comma&&r.trailingComma<0)r.trailingComma=this.start}else s=this.parseMaybeAssign(!1,r);i.push(s)}return i};j.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&_n)&&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")}};j.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};j.parseIdentNode=function(){var e=this.startNode();if(this.type===h.name)e.name=this.value;else if(this.type.keyword){if(e.name=this.type.keyword,(e.name==="class"||e.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46))this.context.pop();this.type=h.name}else this.unexpected();return e};j.parsePrivateIdent=function(){var e=this.startNode();if(this.type===h.privateId)e.name=this.value;else this.unexpected();if(this.next(),this.finishNode(e,"PrivateIdentifier"),this.options.checkPrivateFields)if(this.privateNameStack.length===0)this.raise(e.start,"Private field '#"+e.name+"' must be declared in an enclosing class");else this.privateNameStack[this.privateNameStack.length-1].used.push(e);return e};j.parseYield=function(e){if(!this.yieldPos)this.yieldPos=this.start;var t=this.startNode();if(this.next(),this.type===h.semi||this.canInsertSemicolon()||this.type!==h.star&&!this.type.startsExpr)t.delegate=!1,t.argument=null;else t.delegate=this.eat(h.star),t.argument=this.parseMaybeAssign(e);return this.finishNode(t,"YieldExpression")};j.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 Pn=de.prototype;Pn.raise=function(e,t){var n=Dr(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};Pn.raiseRecoverable=Pn.raise;Pn.curPosition=function(){if(this.options.locations)return new Nt(this.curLine,this.pos-this.lineStart)};var ut=de.prototype,Cl=function(t){this.flags=t,this.var=[],this.lexical=[],this.functions=[]};ut.enterScope=function(e){this.scopeStack.push(new Cl(e))};ut.exitScope=function(){this.scopeStack.pop()};ut.treatFunctionsAsVarInScope=function(e){return e.flags&bt||!this.inModule&&e.flags&gt};ut.declareName=function(e,t,n){var r=!1;if(t===nt){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&gt)delete this.undefinedExports[e]}else if(t===ia){var o=this.currentScope();o.lexical.push(e)}else if(t===ra){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 u=this.scopeStack[p];if(u.lexical.indexOf(e)>-1&&!(u.flags&ea&&u.lexical[0]===e)||!this.treatFunctionsAsVarInScope(u)&&u.functions.indexOf(e)>-1){r=!0;break}if(u.var.push(e),this.inModule&&u.flags&gt)delete this.undefinedExports[e];if(u.flags&_n)break}if(r)this.raiseRecoverable(n,"Identifier '"+e+"' has already been declared")};ut.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};ut.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};ut.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(_n|Jt|Tt))return t}};ut.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(_n|Jt|Tt)&&!(t.flags&Rr))return t}};var Yt=function(t,n,r){if(this.type="",this.start=n,this.end=0,t.options.locations)this.loc=new Xt(t,r);if(t.options.directSourceFile)this.sourceFile=t.options.directSourceFile;if(t.options.ranges)this.range=[n,0]},Qt=de.prototype;Qt.startNode=function(){return new Yt(this,this.start,this.startLoc)};Qt.startNodeAt=function(e,t){return new Yt(this,e,t)};function ca(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}Qt.finishNode=function(e,t){return ca.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)};Qt.finishNodeAt=function(e,t,n,r){return ca.call(this,e,t,n,r)};Qt.copyNode=function(e){var t=new Yt(this,e.start,this.startLoc);for(var n in e)t[n]=e[n];return t};var vl="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",pa="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",la=pa+" Extended_Pictographic",ua=la,da=ua+" EBase EComp EMod EPres ExtPict",fa=da,Al=fa,Pl={9:pa,10:la,11:ua,12:da,13:fa,14:Al},kl="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",wl={9:"",10:"",11:"",12:"",13:"",14:kl},Ws="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",ha="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",ma=ha+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",ya=ma+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",ga=ya+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",xa=ga+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",Nl=xa+" "+vl,_l={9:ha,10:ma,11:ya,12:ga,13:xa,14:Nl},ba={};function Il(e){var t=ba[e]={binary:lt(Pl[e]+" "+Ws),binaryOfStrings:lt(wl[e]),nonBinary:{General_Category:lt(Ws),Script:lt(_l[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(Kt=0,Sn=[9,10,11,12,13,14];Kt<Sn.length;Kt+=1)_r=Sn[Kt],Il(_r);var _r,Kt,Sn,L=de.prototype,kn=function(t,n){this.parent=t,this.base=n||this};kn.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};kn.prototype.sibling=function(){return new kn(this.parent,this.base)};var Xe=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=ba[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};Xe.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};Xe.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)};Xe.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};Xe.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};Xe.prototype.current=function(t){if(t===void 0)t=!1;return this.at(this.pos,t)};Xe.prototype.lookahead=function(t){if(t===void 0)t=!1;return this.at(this.nextIndex(this.pos,t),t)};Xe.prototype.advance=function(t){if(t===void 0)t=!1;this.pos=this.nextIndex(this.pos,t)};Xe.prototype.eat=function(t,n){if(n===void 0)n=!1;if(this.current(n)===t)return this.advance(n),!0;return!1};Xe.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};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 Dl(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&&Dl(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 kn(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 p=0;p<s.length;p++){var u=s.charAt(p);if(s.indexOf(u,p+1)>-1||n.indexOf(u)>-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&&Ll(n))t+=et(n),e.advance();return t};function Ll(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(Ta(t))return e.lastIntValue=t,e.advance(),!0;return!1};function Ta(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&&!Ta(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+=et(e.lastIntValue);while(this.regexp_eatRegExpIdentifierPart(e))e.lastStringValue+=et(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(Rl(r))return e.lastIntValue=r,!0;return e.pos=t,!1};function Rl(e){return Ae(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(Ml(r))return e.lastIntValue=r,!0;return e.pos=t,!1};function Ml(e){return Ie(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&&!Dn(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(Ea(t))return e.lastIntValue=t%32,e.advance(),!0;return!1};function Ea(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)&&Ol(e.lastIntValue))return!0;if(r)e.raise("Invalid unicode escape");e.pos=n}return!1};function Ol(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 Sa=0,tt=1,qe=2;L.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(Bl(t))return e.lastIntValue=-1,e.advance(),tt;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===qe)e.raise("Invalid property name");return r}e.raise("Invalid property name")}return Sa};function Bl(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),tt}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,i)}return Sa};L.regexp_validateUnicodePropertyNameAndValue=function(e,t,n){if(!_t(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 tt;if(e.switchV&&e.unicodeProperties.binaryOfStrings.test(t))return qe;e.raise("Invalid property name")};L.regexp_eatUnicodePropertyName=function(e){var t=0;e.lastStringValue="";while(Ca(t=e.current()))e.lastStringValue+=et(t),e.advance();return e.lastStringValue!==""};function Ca(e){return Ea(e)||e===95}L.regexp_eatUnicodePropertyValue=function(e){var t=0;e.lastStringValue="";while(Fl(t=e.current()))e.lastStringValue+=et(t),e.advance();return e.lastStringValue!==""};function Fl(e){return Ca(e)||Dn(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===qe)e.raise("Negated character class may contain strings");return!0}return!1};L.regexp_classContents=function(e){if(e.current()===93)return tt;if(e.switchV)return this.regexp_classSetExpression(e);return this.regexp_nonEmptyClassRanges(e),tt};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||Pa(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=tt,n;if(this.regexp_eatClassSetRange(e));else if(n=this.regexp_eatClassSetOperand(e)){if(n===qe)t=qe;var r=e.pos;while(e.eatChars([38,38])){if(e.current()!==38&&(n=this.regexp_eatClassSetOperand(e))){if(n!==qe)t=tt;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===qe)t=qe}};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 tt;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===qe)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)===qe)t=qe;return t};L.regexp_classString=function(e){var t=0;while(this.regexp_eatClassSetCharacter(e))t++;return t===1?tt:qe};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()&&Vl(n))return!1;if($l(n))return!1;return e.advance(),e.lastIntValue=n,!0};function Vl(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 $l(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(jl(t))return e.lastIntValue=t,e.advance(),!0;return!1};function jl(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(Dn(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(Dn(n=e.current()))e.lastIntValue=10*e.lastIntValue+(n-48),e.advance();return e.pos!==t};function Dn(e){return e>=48&&e<=57}L.regexp_eatHexDigits=function(e){var t=e.pos,n=0;e.lastIntValue=0;while(va(n=e.current()))e.lastIntValue=16*e.lastIntValue+Aa(n),e.advance();return e.pos!==t};function va(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function Aa(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(Pa(t))return e.lastIntValue=t-48,e.advance(),!0;return e.lastIntValue=0,!1};function Pa(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(!va(i))return e.pos=n,!1;e.lastIntValue=16*e.lastIntValue+Aa(i),e.advance()}return!0};var Ln=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 Xt(t,t.startLoc,t.endLoc);if(t.options.ranges)this.range=[t.start,t.end]},W=de.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 Ln(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 Ln(this)};if(typeof Symbol<"u")W[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===h.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(h.eof);if(e.override)return e.override(this);else this.readToken(this.fullCharCodeAtPos())};W.readToken=function(e){if(Ae(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=Ys(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&&Ir.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(h.ellipsis);else return++this.pos,this.finishToken(h.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(h.assign,2);return this.finishOp(h.slash,1)};W.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,r=e===42?h.star:h.modulo;if(this.options.ecmaVersion>=7&&e===42&&t===42)++n,r=h.starstar,t=this.input.charCodeAt(this.pos+2);if(t===61)return this.finishOp(h.assign,n+1);return this.finishOp(r,n)};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(h.assign,3)}return this.finishOp(e===124?h.logicalOR:h.logicalAND,2)}if(t===61)return this.finishOp(h.assign,2);return this.finishOp(e===124?h.bitwiseOR:h.bitwiseAND,1)};W.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);if(e===61)return this.finishOp(h.assign,2);return this.finishOp(h.bitwiseXOR,1)};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||Pe.test(this.input.slice(this.lastTokEnd,this.pos))))return this.skipLineComment(3),this.skipSpace(),this.nextToken();return this.finishOp(h.incDec,2)}if(t===61)return this.finishOp(h.assign,2);return this.finishOp(h.plusMin,1)};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(h.assign,n+1);return this.finishOp(h.bitShift,n)}if(t===33&&e===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45)return this.skipLineComment(4),this.skipSpace(),this.nextToken();if(t===61)n=2;return this.finishOp(h.relational,n)};W.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===61)return this.finishOp(h.equality,this.input.charCodeAt(this.pos+2)===61?3:2);if(e===61&&t===62&&this.options.ecmaVersion>=6)return this.pos+=2,this.finishToken(h.arrow);return this.finishOp(e===61?h.eq:h.prefix,1)};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(h.questionDot,2)}if(t===63){if(e>=12){var r=this.input.charCodeAt(this.pos+2);if(r===61)return this.finishOp(h.assign,3)}return this.finishOp(h.coalesce,2)}}return this.finishOp(h.question,1)};W.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13){if(++this.pos,t=this.fullCharCodeAtPos(),Ae(t,!0)||t===92)return this.finishToken(h.privateId,this.readWord1())}this.raise(this.pos,"Unexpected character '"+et(t)+"'")};W.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(h.parenL);case 41:return++this.pos,this.finishToken(h.parenR);case 59:return++this.pos,this.finishToken(h.semi);case 44:return++this.pos,this.finishToken(h.comma);case 91:return++this.pos,this.finishToken(h.bracketL);case 93:return++this.pos,this.finishToken(h.bracketR);case 123:return++this.pos,this.finishToken(h.braceL);case 125:return++this.pos,this.finishToken(h.braceR);case 58:return++this.pos,this.finishToken(h.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(h.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(t===120||t===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(t===111||t===79)return this.readRadixNumber(8);if(t===98||t===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(h.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+et(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(Pe.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 Xe(this));p.reset(n,i,s),this.validateRegExpFlags(p),this.validateRegExpPattern(p);var u=null;try{u=new RegExp(i,s)}catch(m){}return this.finishToken(h.regexp,{pattern:i,flags:s,value:u})};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,p=0;for(var u=0,m=t==null?1/0:t;u<m;++u,++this.pos){var f=this.input.charCodeAt(this.pos),g=void 0;if(r&&f===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(u===0)this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits");p=f;continue}if(f>=97)g=f-97+10;else if(f>=65)g=f-65+10;else if(f>=48&&f<=57)g=f-48;else g=1/0;if(g>=e)break;p=f,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 Hl(e,t){if(t)return parseInt(e,8);return parseFloat(e.replace(/_/g,""))}function ka(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=ka(this.input.slice(t,this.pos)),++this.pos;else if(Ae(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");return this.finishToken(h.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=ka(this.input.slice(t,this.pos));if(++this.pos,Ae(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");return this.finishToken(h.num,i)}if(n&&/[89]/.test(this.input.slice(t,this.pos)))n=!1;if(r===46&&!n)++this.pos,this.readInt(10),r=this.input.charCodeAt(this.pos);if((r===69||r===101)&&!n){if(r=this.input.charCodeAt(++this.pos),r===43||r===45)++this.pos;if(this.readInt(10)===null)this.raise(t,"Invalid number")}if(Ae(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");var o=Hl(this.input.slice(t,this.pos),n);return this.finishToken(h.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(h.string,t)};var wa={};W.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===wa)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1};W.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw wa;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===h.template||this.type===h.invalidTemplate))if(n===36)return this.pos+=2,this.finishToken(h.dollarBraceL);else return++this.pos,this.finishToken(h.backQuote);return e+=this.input.slice(t,this.pos),this.finishToken(h.template,e)}if(n===92)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(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+=`
30
+ `;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(h.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":if(this.input[this.pos+1]===`
23
31
  `)++this.pos;case`
24
- `:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")};K.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return`
25
- `;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)}};K.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);if(n===null)this.invalidStringToken(t,"Bad character escape sequence");return n};K.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)};K.readWord=function(){var e=this.readWord1(),t=h.name;if(this.keywords.test(e))t=Cn[e];return this.finishToken(t,e)};var xa="8.18.0";ce.acorn={Parser:ce,version:xa,defaultOptions:xn,Position:vt,SourceLocation:Wt,getLineInfo:vr,Node:zt,TokenType:J,tokTypes:h,keywordTypes:Cn,TokContext:Be,tokContexts:oe,isIdentifierChar:ke,isIdentifierStart:Te,Token:wn,isNewLine:xt,lineBreak:Se,lineBreakG:Vs,nonASCIIwhitespace:Cr};function vl(e,t){return ce.parse(e,t)}function Al(e,t,n){return ce.parseExpressionAt(e,t,n)}function Pl(e,t){return ce.tokenizer(e,t)}var Ie=!0,kl=new WeakMap;function wl(e){let t=e.Parser.acorn||e,n=kl.get(t);if(!n){let p=function(I){return I===S.name||I===S.string||I===S.num||w.includes(I)||F.includes(I)},u=function(I){return I===S.name||w.includes(I)||F.includes(I)},m=function(I){return I===S.name||F.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},T=function(I){return I===S.invalidTemplate},{tokTypes:S,keywordTypes:P}=t,w=Object.values(P),A=s(),F=Object.values(A),H=o(),N=i(),O=new RegExp(`^(?:${Object.keys(A).join("|")})$`);H.jsxTagStart.updateContext=function(){this.context.push(N.tc_expr),this.context.push(N.tc_oTag),this.exprAllowed=!1},H.jsxTagEnd.updateContext=function(I){let pe=this.context.pop();if(pe===N.tc_oTag&&I===S.slash||pe===N.tc_cTag)this.context.pop(),this.exprAllowed=this.curContext()===N.tc_expr;else this.exprAllowed=!0},n={tokTypes:{...A,...H},tokContexts:{...N},keywordsRegExp:O,tokenIsLiteralPropertyName:p,tokenIsKeywordOrIdentifier:u,tokenIsIdentifier:m,tokenIsTSDeclarationStart:d,tokenIsTSTypeOperator:y,tokenIsTemplate:T}}return n;function r(p,u={}){return new t.TokenType("name",u)}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 Nl=1048576,Jt=2097152,wt=1,In=2,_l=4,Rr=8,Il=16,Pa=64,ka=128,Dl=256,Ll=512,wa=1024,om=wt|In|Rr|ka,cm=wt|0|Rr|0,pm=wt|0|_l|0,lm=wt|0|Il|0,um=0|In|0|ka,dm=0|In|0|0,Rl=wt|In|Rr|Dl,fm=0|wa,hm=0|Pa,mm=wt|0|0|Pa,ym=Rl|Ll,gm=0|wa,Na=4,_a=2,Ia=1,xm=_a|Ia,bm=_a|Na,Tm=Ia|Na,Ml=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/y,ba=new RegExp("(?=("+Ml.source+"))\\1"+/(?=[\n\r\u2028\u2029]|\/\*(?!.*?\*\/)|$)/.source,"y"),Yt=class{constructor(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1}};function Ol(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 Ta(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."},_n={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 u=this.parseDecorator();p.push(u)}if(this.match(r._export)){if(!s)this.unexpected()}else if(!this.canHaveLeadingDecorator())this.raise(this.start,_n.UnexpectedLeadingDecorator)}parseDecorator(){let s=this.startNode();this.next(),this.decoratorStack.push([]);let p=this.start,u=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 T=this.startNodeAt(d,y);T.expression=m,m=this.finishNode(T,"ParenthesizedExpression")}}else{m=this.parseIdent(!1);while(this.eat(r.dot)){let d=this.startNodeAt(p,u);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 Sa={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:"♦"},Fl=/^[\da-fA-F]+$/,Vl=/^\d+$/;function Qt(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 Qt(e.object)+"."+Qt(e.property)}function jl(e,t,n,r){let i=e.tokTypes,o=t.tokTypes,{isNewLine:s,isIdentifierChar:p}=e,u=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 T=this.input.charCodeAt(this.pos);switch(T){case 60:case 123:if(this.pos===this.start){if(T===60&&this.exprAllowed)return++this.pos,this.finishToken(o.jsxTagStart);return this.getTokenFromCode(T)}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 `"+(T===62?"&gt;":"&rbrace;")+'` or `{"'+this.input[this.pos]+'"}`?');default:if(s(T))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),T;if(++this.pos,y===13&&this.input.charCodeAt(this.pos)===10)++this.pos,T=d?`
32
+ `: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`
33
+ `;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return et(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(Ie(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?Ae:Ie)(s,r))this.invalidStringToken(o,"Invalid Unicode escape");e+=et(s),n=this.pos}else break;t=!1}return e+this.input.slice(n,this.pos)};W.readWord=function(){var e=this.readWord1(),t=h.name;if(this.keywords.test(e))t=wn[e];return this.finishToken(t,e)};var Na="8.18.0";de.acorn={Parser:de,version:Na,defaultOptions:Cn,Position:Nt,SourceLocation:Xt,getLineInfo:Dr,Node:Yt,TokenType:J,tokTypes:h,keywordTypes:wn,TokContext:He,tokContexts:ue,isIdentifierChar:Ie,isIdentifierStart:Ae,Token:Ln,isNewLine:xt,lineBreak:Pe,lineBreakG:Js,nonASCIIwhitespace:Ir};function ql(e,t){return de.parse(e,t)}function Ul(e,t,n){return de.parseExpressionAt(e,t,n)}function Gl(e,t){return de.tokenizer(e,t)}var Be=!0,Wl=new WeakMap;function Kl(e){let t=e.Parser.acorn||e,n=Wl.get(t);if(!n){let p=function(I){return I===T.name||I===T.string||I===T.num||k.includes(I)||V.includes(I)},u=function(I){return I===T.name||k.includes(I)||V.includes(I)},m=function(I){return I===T.name||V.includes(I)},f=function(I){return I===_.abstract||I===_.declare||I===_.enum||I===_.module||I===_.namespace||I===_.interface||I===_.type},g=function(I){return I===_.keyof||I===_.readonly||I===_.unique},b=function(I){return I===T.invalidTemplate},{tokTypes:T,keywordTypes:P}=t,k=Object.values(P),_=s(),V=Object.values(_),G=o(),A=i(),O=new RegExp(`^(?:${Object.keys(_).join("|")})$`);G.jsxTagStart.updateContext=function(){this.context.push(A.tc_expr),this.context.push(A.tc_oTag),this.exprAllowed=!1},G.jsxTagEnd.updateContext=function(I){let re=this.context.pop();if(re===A.tc_oTag&&I===T.slash||re===A.tc_cTag)this.context.pop(),this.exprAllowed=this.curContext()===A.tc_expr;else this.exprAllowed=!0},n={tokTypes:{..._,...G},tokContexts:{...A},keywordsRegExp:O,tokenIsLiteralPropertyName:p,tokenIsKeywordOrIdentifier:u,tokenIsIdentifier:m,tokenIsTSDeclarationStart:f,tokenIsTSTypeOperator:g,tokenIsTemplate:b}}return n;function r(p,u={}){return new t.TokenType("name",u)}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:Be}),asserts:r("asserts",{startsExpr:Be}),global:r("global",{startsExpr:Be}),keyof:r("keyof",{startsExpr:Be}),readonly:r("readonly",{startsExpr:Be}),unique:r("unique",{startsExpr:Be}),abstract:r("abstract",{startsExpr:Be}),declare:r("declare",{startsExpr:Be}),enum:r("enum",{startsExpr:Be}),module:r("module",{startsExpr:Be}),namespace:r("namespace",{startsExpr:Be}),interface:r("interface",{startsExpr:Be}),type:r("type",{startsExpr:Be})}}}var zl=1048576,Zt=2097152,Lt=1,On=2,Xl=4,Hr=8,Jl=16,Ba=64,Fa=128,Yl=256,Ql=512,Va=1024,Rm=Lt|On|Hr|Fa,Mm=Lt|0|Hr|0,Om=Lt|0|Xl|0,Bm=Lt|0|Jl|0,Fm=0|On|0|Fa,Vm=0|On|0|0,Zl=Lt|On|Hr|Yl,$m=0|Va,jm=0|Ba,Hm=Lt|0|0|Ba,qm=Zl|Ql,Um=0|Va,$a=4,ja=2,Ha=1,Gm=ja|Ha,Wm=ja|$a,Km=Ha|$a,eu=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/y,_a=new RegExp("(?=("+eu.source+"))\\1"+/(?=[\n\r\u2028\u2029]|\/\*(?!.*?\*\/)|$)/.source,"y"),en=class{constructor(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1}};function tu(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 Ia(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."},Mn={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 nu(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 u=this.parseDecorator();p.push(u)}if(this.match(r._export)){if(!s)this.unexpected()}else if(!this.canHaveLeadingDecorator())this.raise(this.start,Mn.UnexpectedLeadingDecorator)}parseDecorator(){let s=this.startNode();this.next(),this.decoratorStack.push([]);let p=this.start,u=this.startLoc,m;if(this.match(r.parenL)){let f=this.start,g=this.startLoc;if(this.next(),m=this.parseExpression(),this.expect(r.parenR),this.options.preserveParens){let b=this.startNodeAt(f,g);b.expression=m,m=this.finishNode(b,"ParenthesizedExpression")}}else{m=this.parseIdent(!1);while(this.eat(r.dot)){let f=this.startNodeAt(p,u);f.object=m,f.property=this.parseIdent(!0),f.computed=!1,m=this.finishNode(f,"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 Da={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:"♦"},ru=/^[\da-fA-F]+$/,iu=/^\d+$/;function tn(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 tn(e.object)+"."+tn(e.property)}function su(e,t,n,r){let i=e.tokTypes,o=t.tokTypes,{isNewLine:s,isIdentifierChar:p}=e,u=Object.assign({allowNamespaces:!0,allowNamespacedObjects:!0},r||{});return class extends n{jsx_readToken(){let f="",g=this.pos;for(;;){if(this.pos>=this.input.length)this.raise(this.start,"Unterminated JSX contents");let b=this.input.charCodeAt(this.pos);switch(b){case 60:case 123:if(this.pos===this.start){if(b===60&&this.exprAllowed)return++this.pos,this.finishToken(o.jsxTagStart);return this.getTokenFromCode(b)}return f+=this.input.slice(g,this.pos),this.finishToken(o.jsxText,f);case 38:f+=this.input.slice(g,this.pos),f+=this.jsx_readEntity(),g=this.pos;break;case 62:case 125:this.raise(this.pos,"Unexpected token `"+this.input[this.pos]+"`. Did you mean `"+(b===62?"&gt;":"&rbrace;")+'` or `{"'+this.input[this.pos]+'"}`?');default:if(s(b))f+=this.input.slice(g,this.pos),f+=this.jsx_readNewLine(!0),g=this.pos;else++this.pos}}}jsx_readNewLine(f){let g=this.input.charCodeAt(this.pos),b;if(++this.pos,g===13&&this.input.charCodeAt(this.pos)===10)++this.pos,b=f?`
26
34
  `:`\r
27
- `;else T=String.fromCharCode(y);if(this.options.locations)++this.curLine,this.lineStart=this.pos;return T}jsx_readString(d){let y="",T=++this.pos;for(;;){if(this.pos>=this.input.length)this.raise(this.start,"Unterminated string constant");let S=this.input.charCodeAt(this.pos);if(S===d)break;if(S===38)y+=this.input.slice(T,this.pos),y+=this.jsx_readEntity(),T=this.pos;else if(s(S))y+=this.input.slice(T,this.pos),y+=this.jsx_readNewLine(!1),T=this.pos;else++this.pos}return y+=this.input.slice(T,this.pos++),this.finishToken(i.string,y)}jsx_readEntity(){let d="",y=0,T,S=this.input[this.pos];if(S!=="&")this.raise(this.pos,"Entity must start with an ampersand");let P=++this.pos;while(this.pos<this.input.length&&y++<10){if(S=this.input[this.pos++],S===";"){if(d[0]==="#"){let w;if(d[1]==="x"||d[1]==="X"){if(d=d.substr(2),Fl.test(d))w=parseInt(d,16)}else if(d=d.substr(1),Vl.test(d))w=parseInt(d,10);if(w!==void 0&&w<=1114111)T=String.fromCodePoint(w)}else if(Object.prototype.hasOwnProperty.call(Sa,d))T=Sa[d];break}d+=S}if(T===void 0)return this.pos=P,"&";return T}jsx_readWord(){let d,y=this.pos;do d=this.input.charCodeAt(++this.pos);while(p(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,T=this.jsx_parseIdentifier();if(!u.allowNamespaces||!this.eat(i.colon))return T;var S=this.startNodeAt(d,y);return S.namespace=T,S.name=this.jsx_parseIdentifier(),this.finishNode(S,"JSXNamespacedName")}jsx_parseElementName(){if(this.type===o.jsxTagEnd)return"";let d=this.start,y=this.startLoc,T=this.jsx_parseNamespacedName();if(this.type===i.dot&&T.type==="JSXNamespacedName"&&!u.allowNamespacedObjects)this.unexpected();while(this.eat(i.dot)){let S=this.startNodeAt(d,y);S.object=T,S.property=this.jsx_parseIdentifier(),T=this.finishNode(S,"JSXMemberExpression")}return T}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 T=this.startNodeAt(d,y);T.attributes=[];let S=this.jsx_parseElementName();if(S)T.name=S;while(this.type!==i.slash&&this.type!==o.jsxTagEnd)T.attributes.push(this.jsx_parseAttribute());return T.selfClosing=this.eat(i.slash),this.expect(o.jsxTagEnd),this.finishNode(T,S?"JSXOpeningElement":"JSXOpeningFragment")}jsx_parseClosingElementAt(d,y){let T=this.startNodeAt(d,y),S=this.jsx_parseElementName();if(S)T.name=S;return this.expect(o.jsxTagEnd),this.finishNode(T,S?"JSXClosingElement":"JSXClosingFragment")}jsx_parseElementAt(d,y){let T=this.startNodeAt(d,y),S=[],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}S.push(this.jsx_parseElementAt(d,y));break;case o.jsxText:S.push(this.parseExprAtom());break;case i.braceL:S.push(this.jsx_parseExpressionContainer());break;default:this.unexpected()}if(Qt(w.name)!==Qt(P.name))this.raise(w.start,"Expected corresponding JSX closing tag for <"+Qt(P.name)+">")}let A=P.name?"Element":"Fragment";if(T["opening"+A]=P,T["closing"+A]=w,T.children=S,this.type===i.relational&&this.value==="<")this.raise(this.start,"Adjacent JSX elements must be wrapped in an enclosing tag");return this.finishNode(T,"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 $l(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 u=this.startNode(),m;if(this.type===i.string)m=this.parseLiteral(this.value);else m=this.parseIdent(!0);if(this.next(),u.key=m,p.has(u.key.name))this.raise(this.pos,"Duplicated key in attributes");if(p.add(u.key.name),this.type!==i.string)this.raise(this.pos,"Only string is supported as an attribute value");u.value=this.parseLiteral(this.value),s.push(this.finishNode(u,"ImportAttribute"))}while(this.eat(i.comma));return s}}}var Ir=["onToken","onComment","onInsertedSemicolon","onTrailingComma"];function Da(){return{_tag:"BufferedParserEvents",segments:[]}}var Hl=Da();function Ea(e){return e.segments.length>0}var ql=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??Hl}replay(e){if(!Ea(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 Ir){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 Ir){let t=this.callbackWrappers[e];if(t)this.options[e]=t}}deactivateCallbacks(){for(let e of Ir){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(Ea(t))e.segments.push(t)}outputFor(e){return e.output??=Da()}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 kt(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 Ul(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 Gl(e,t){e.setLookaheadTokenState(t.lookahead),e.context=kt(t.context,t.contextLength,"token context stack"),e.scopeStack=kt(t.scopeStack,t.scopeStackLength,"scope stack"),e.importsStack=kt(t.importsStack,t.importsStackLength,"import stack"),e.labels=kt(t.labels,t.labelsLength,"label stack"),e.privateNameStack=kt(t.privateNameStack,t.privateNameStackLength,"private-name stack"),e.decoratorStack=kt(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:()=>Ul(e),restore:(t)=>Gl(e,t)}}function Kl(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,u,m){super(p,u,m);this.parseEffects=new ql(this.options,Wl(this))}overrideContext(p){if(this.curContext()!==p)this.parseEffects?.willMutateTail(this.context,1);return super.overrideContext(p)}takeDecorators(p){let u=this.decoratorStack.length-1;if(this.decoratorStack[u].length>0)this.parseEffects?.willSet(this.decoratorStack,String(u));return super.takeDecorators(p)}parseDecorators(p){let u=this.decoratorStack[this.decoratorStack.length-1];return this.parseEffects?.willAppend(u),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,u,m,d){for(let y=this.labels.length-1;y>=0;y--){let T=this.labels[y];if(T.statementStart!==p.start)break;this.parseEffects?.willSet(T,"statementStart"),this.parseEffects?.willSet(T,"kind")}return this.parseEffects?.willAppend(this.labels),super.parseLabeledStatement(p,u,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:u}=this;if(u===n.parenR||u===n.braceR||u===n.braceL||u===n.dollarBraceL||u===n.parenL||u===n._function||u===n._class||u===n.colon||u===n.backQuote||u===n.star||u===r.jsxTagStart||u===r.jsxTagEnd||u===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,u,m){let d=this.parseEffects;if(d?.active)if(u===i.BIND_LEXICAL){let y=this.currentScope();if(d.willAppend(y.lexical),this.inModule&&y.flags&i.SCOPE_TOP)d.willSet(this.undefinedExports,p)}else if(u===i.BIND_SIMPLE_CATCH)d.willAppend(this.currentScope().lexical);else if(u===i.BIND_FUNCTION)d.willAppend(this.currentScope().functions);else for(let y=this.scopeStack.length-1;y>=0;y--){let T=this.scopeStack[y];if(d.willAppend(T.var),this.inModule&&T.flags&i.SCOPE_TOP)d.willSet(this.undefinedExports,p);if(T.flags&o)break}return super.declareName(p,u,m)}checkLocalExport(p){return this.parseEffects?.willSet(this.undefinedExports,p.name),super.checkLocalExport(p)}}}var Dr=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;function Ca(e){if(!e)throw Error("Assert fail")}function zl(e){return e==="accessor"}function Xl(e){return e==="in"||e==="out"}var Nn=1,va=2,Jl=4,z={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 Lr(e,t){return z.SCOPE_FUNCTION|(e?z.SCOPE_ASYNC:0)|(t?z.SCOPE_GENERATOR:0)}function Yl(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 La(e.object)}function Ql(e){return e.type==="UnaryExpression"&&(e.operator==="-"||e.operator==="+")&&e.argument.type==="Literal"&&(typeof e.argument.value==="number"||typeof e.argument.value==="bigint")}function La(e){if(e.type==="Identifier")return!0;if(e.type!=="MemberExpression")return!1;if(e.computed)return!1;return La(e.object)}function Aa(e){return e==="private"||e==="public"||e==="protected"}function Zl(e){return Boolean(e.startsExpr)}function eu(e){if(e==null)throw Error(`Unexpected ${e} value.`);return e}function tu(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 Ra(e){let{dts:t=!1}=e||{},n=!!e?.jsx;return function(r){let i=r.acorn||_r,o=wl(i),{tokTypes:s,keywordTypes:p,isIdentifierStart:u,lineBreak:m,isNewLine:d,tokContexts:y,isIdentifierChar:T}=i,{tokTypes:S,tokContexts:P,keywordsRegExp:w,tokenIsLiteralPropertyName:A,tokenIsTemplate:F,tokenIsTSDeclarationStart:H,tokenIsIdentifier:N,tokenIsKeywordOrIdentifier:O,tokenIsTSTypeOperator:I}=o;function pe(a,c,l=a.length){for(let f=c;f<l;f++){let g=a.charCodeAt(f);if(d(g))return f<l-1&&g===13&&a.charCodeAt(f+1)===10?f+2:f+1}return-1}if(r=Bl(r,o,i),e?.jsx)r=jl(i,o,r,typeof e.jsx==="boolean"?{}:e.jsx);r=$l(r,o,i);let ge=Kl(r,{acornTokenTypes:s,typeScriptTokenTypes:S,scope:z});class xe extends ge{constructor(a,c,l){super(a,c,l);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=(f)=>{this.tsParseModifiers({modified:f,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(u(a))return this.jsx_readWord();if(a==62)return++this.pos,this.finishToken(S.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(S.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(S.at);return super.getTokenFromCode(a)}isAbstractClass(){return this.ts_isContextual(S.abstract)&&this.lookahead().type===s._class}isDeclareClass(){if(!this.ts_isContextual(S.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={},l=this.beginParseEffectScope(),f;try{f=a(()=>{throw c})}catch(g){let b=g===c;if(!b&&!(g instanceof SyntaxError))throw this.parseEffects.rollback(l),g;let x={events:this.parseEffects.rollbackWithEvents(l),selected:!1};return b?{node:null,error:null,thrown:!1,aborted:!0,failState:x}:{node:null,error:g,thrown:!0,aborted:!1,failState:x}}return this.parseEffects.commit(l),{node:f,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,l=this.lastTokEndLoc){if(a.end=c,a.loc.end=l,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((l)=>{if(Aa(l))return a.accessibility===l;return!!a[l]})}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,l){if(!this.tsMatchLeftRelational())return;let f=this.maybeInArrowParameters;this.maybeInArrowParameters=!0;let g=this.tsTryParseAndCatch(()=>{let b=this.startNodeAt(a,c);return b.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(b),b.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(s.arrow),b});if(this.maybeInArrowParameters=f,!g)return;return this.parseArrowExpression(g,g.params,!0,l)}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 l=a+c.length;if(this.input.slice(a,l)===c){let f=this.input.charCodeAt(l);return!(T(f)||(f&64512)===55296)}return!1}isAbstractConstructorSignature(){return this.ts_isContextual(S.abstract)&&this.lookahead().type===s._new}nextTokenStartSince(a){return Dr.lastIndex=a,Dr.test(this.input)?Dr.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(),l=this.context,f=this.preValue,g=this.preToken,b=this.isLookahead;try{if(this.createLookaheadState(),this.isLookahead=!0,a!==void 0)for(let x=0;x<a;x++)this.nextToken();else this.nextToken();return this.getCurLookaheadState()}finally{this.setLookaheadTokenState(c),this.context=l,this.preValue=f,this.preToken=g,this.isLookahead=b}}readWord(){let a=this.readWord1(),c=s.name;if(this.keywords.test(a))c=p[a];else if(new RegExp(w).test(a))c=S[a];return this.finishToken(c,a)}skipBlockComment(){let a;if(!this.isLookahead)a=this.options.onComment&&this.curPosition();let c=this.pos,l=this.input.indexOf("*/",this.pos+=2);if(l===-1)this.raise(this.pos-2,"Unterminated comment");if(this.pos=l+2,this.options.locations)for(let f,g=c;(f=pe(this.input,g,this.pos))>-1;)++this.curLine,g=this.lineStart=f;if(this.isLookahead)return;if(this.options.onComment)this.options.onComment(!0,this.input.slice(c+2,l),c,this.pos,a,this.curPosition())}skipLineComment(a){let c=this.pos,l;if(!this.isLookahead)l=this.options.onComment&&this.curPosition();let f=this.input.charCodeAt(this.pos+=a);while(this.pos<this.input.length&&!d(f))f=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,l,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 l=this.type;if(this.type=a,this.value=c,!this.isLookahead)this.updateContext(l)}resetStartLocation(a,c,l){if(a.start=c,a.loc.start=l,this.options.ranges)a.range[0]=c}isLineTerminator(){return this.eat(s.semi)||super.canInsertSemicolon()}hasFollowingLineBreak(){return ba.lastIndex=this.end,ba.test(this.input)}addExtra(a,c,l,f=!0){if(!a)return;let g=a.extra=a.extra||{};if(f)g[c]=l;else Object.defineProperty(g,c,{enumerable:f,value:l})}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(S.readonly);if(this.ts_isContextual(S.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,l){let f=l.type;if(a===f){for(let g=0;g<c;g++)this.next();return!0}else return!1}ts_eatContextualWithState(a,c,l){if(w.test(a)){if(this.ts_isContextualWithState(l,S[a])){for(let f=0;f<c;f++)this.next();return!0}return!1}else{if(!this.isContextualWithState(a,l))return!1;for(let f=0;f<c;f++)this.next();return!0}}canHaveLeadingDecorator(){return this.match(s._class)||this.isAbstractClass()||this.isDeclareClass()}eatContextual(a){if(w.test(a)){if(this.ts_isContextual(S[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 l=this.startNodeAtNode(c);l.left=c,l.right=this.parseIdent(a),c=this.finishNode(l,"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 l=c.const?z.BIND_TS_CONST_ENUM:z.BIND_TS_ENUM;return this.checkLValSimple(a.id,l),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(Nl),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(S.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(Jt),a.body=this.tsParseModuleBlock(),super.exitScope();else super.semicolon();return this.finishNode(a,"TSModuleDeclaration")}tsTryParseDeclare(a){if(this.isLineTerminator())return;let c=this.type,l;if(this.isContextual("let"))c=s._var,l="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===S.enum)return this.tsParseEnumDeclaration(a,{declare:!0});if(c===S.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,l||this.value,!0);return this.expect(s._const),this.tsParseEnumDeclaration(a,{const:!0,declare:!0})}if(c===S.interface){let f=this.tsParseInterfaceDeclaration(a,{declare:!0});if(f)return f}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,l,f){let g=[],b=-1;for(;;){if(this.tsIsListTerminator(a))break;b=-1;let x=c();if(x==null)return;if(g.push(x),this.eat(s.comma)){b=this.lastTokStart;continue}if(this.tsIsListTerminator(a))break;if(l)this.expect(s.comma);return}if(f)f.value=b;return g}tsParseDelimitedList(a,c,l){return eu(this.tsParseDelimitedListWorker(a,c,!0,l))}tsParseBracketedList(a,c,l,f,g){if(!f)if(l)this.expect(s.bracketL);else this.expect(s.relational);let b=this.tsParseDelimitedList(a,c,g);if(l)this.expect(s.bracketR);else this.expect(s.relational);return b}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!==S.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 l=this.startNode(),f=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(f){let C=this.tsParseTypeAnnotation(!1);return l.parameterName=f,l.typeAnnotation=C,l.asserts=!1,c.typeAnnotation=this.finishNode(l,"TSTypePredicate"),this.finishNode(c,"TSTypeAnnotation")}let g=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(g&&this.match(s._this)){let C=this.tsParseThisTypeOrThisTypePredicate();if(C.type==="TSThisType")l.parameterName=C,l.asserts=!0,l.typeAnnotation=null,C=this.finishNode(l,"TSTypePredicate");else this.resetStartLocationFromNode(C,l),C.asserts=!0;return c.typeAnnotation=C,this.finishNode(c,"TSTypeAnnotation")}let b=g&&this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!b){if(!g)return this.tsParseTypeAnnotation(!1,c);return l.parameterName=this.parseIdent(),l.asserts=g,l.typeAnnotation=null,c.typeAnnotation=this.finishNode(l,"TSTypePredicate"),this.finishNode(c,"TSTypeAnnotation")}let x=this.tsParseTypeAnnotation(!1);return l.parameterName=b,l.typeAnnotation=x,l.asserts=g,c.typeAnnotation=this.finishNode(l,"TSTypePredicate"),this.finishNode(c,"TSTypeAnnotation")})}tsFillSignature(a,c){let l=a===s.arrow,f="parameters",g="typeAnnotation";if(c.typeParameters=this.tsTryParseTypeParameters(),this.expect(s.parenL),c.parameters=this.tsParseBindingListForSignature(),l)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 l=this.startNode();if(a==="TSConstructorType"){if(l.abstract=!!c,c)this.next();this.next()}return this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(s.arrow,l)),this.finishNode(l,a)}tsParseUnionOrIntersectionType(a,c,l){let f=this.startNode(),g=this.eat(l),b=[];do b.push(c());while(this.eat(l));if(b.length===1&&!g)return b[0];return f.types=b,this.finishNode(f,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(!O(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,l=this.eat(s.ellipsis),f;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(),f=this.finishNode(g,"TSNamedTupleMember")}else{f=this.tsParseType();let g=this.eat(s.question);if(this.eat(s.colon))this.raise(f.start,R.InvalidTupleMemberLabel);if(g){let b=this.startNodeAtNode(f);b.typeAnnotation=f,f=this.finishNode(b,"TSOptionalType")}}if(l){let g=this.startNodeAt(c,a);g.typeAnnotation=f,f=this.finishNode(g,"TSRestType")}return f}tsParseTupleType(){let a=this.startNode();a.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let c=!1;return a.elementTypes.forEach((l)=>{let{type:f}=l;if(c&&f!=="TSRestType"&&f!=="TSOptionalType"&&!(f==="TSNamedTupleMember"&&l.optional))this.raise(l.start,R.OptionalTypeBeforeRequired);if(c||=f==="TSNamedTupleMember"&&l.optional||f==="TSOptionalType",f==="TSRestType")l=l.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(O(a)||a===s._void||a===s._null){let c=a===s._void?"TSVoidKeyword":a===s._null?"TSNullKeyword":tu(this.value);if(c!==void 0&&this.lookaheadCharCode()!==46){let l=this.startNode();return this.next(),this.finishNode(l,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(){Ca(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 l=this.tsTryParseTypeAnnotation();if(l)a.typeAnnotation=l;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 l={value:-1};if(c.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,a),!1,!0,l),c.params.length===0)this.raise(this.start,R.EmptyTypeParameters);if(l.value!==-1)this.addExtra(c,"trailingComma",l.value);return this.finishNode(c,"TSTypeParameterDeclaration")}tsTryParseTypeParameters(a){if(this.tsMatchLeftRelational())return this.tsParseTypeParameters(a)}tsTryParse(a){let c=this.beginParseEffectScope(),l;try{l=a()}catch(f){throw this.parseEffects.rollback(c),f}if(l!==void 0&&l!==!1)return this.parseEffects.commit(c),l;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 l=this.value;if(a.indexOf(l)!==-1&&!this.containsEsc){if(c&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return l}return}tsParseModifiersByMap({modified:a,map:c}){for(let l of Object.keys(c))a[l]=c[l]}tsParseModifiers({modified:a,allowedModifiers:c,disallowedModifiers:l,stopOnStartOfClassStaticBlock:f,errorTemplate:g=R.InvalidModifierOnTypeMember}){let b={},x=(v,E,k,_)=>{if(E===k&&a[_])this.raise(v.column,R.InvalidModifiersOrder({orderedModifiers:[k,_]}))},C=(v,E,k,_)=>{if(a[k]&&E===_||a[_]&&E===k)this.raise(v.column,R.IncompatibleModifiers({modifiers:[k,_]}))};for(;;){let v=this.startLoc,E=this.tsParseModifier(c.concat(l??[]),f);if(!E)break;if(Aa(E))if(a.accessibility)this.raise(this.start,R.DuplicateAccessibilityModifier());else x(v,E,E,"override"),x(v,E,E,"static"),x(v,E,E,"readonly"),x(v,E,E,"accessor"),b.accessibility=E,a.accessibility=E;else if(Xl(E))if(a[E])this.raise(this.start,R.DuplicateModifier({modifier:E}));else x(v,E,"in","out"),b[E]=E,a[E]=!0;else if(zl(E))if(a[E])this.raise(this.start,R.DuplicateModifier({modifier:E}));else C(v,E,"accessor","readonly"),C(v,E,"accessor","override"),b[E]=E,a[E]=!0;else if(E==="const")if(a[E])this.raise(this.start,R.DuplicateModifier({modifier:E}));else b[E]=E,a[E]=!0;else if(Object.hasOwnProperty.call(a,E))this.raise(this.start,R.DuplicateModifier({modifier:E}));else x(v,E,"static","readonly"),x(v,E,"static","override"),x(v,E,"override","readonly"),x(v,E,"abstract","override"),C(v,E,"declare","override"),C(v,E,"static","abstract"),b[E]=E,a[E]=!0;if(l?.includes(E))this.raise(this.start,g)}return b}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,l,f){if(!e?.jsx&&this.tsMatchLeftRelational())return this.tsParseTypeAssertion();else return super.parseMaybeUnary(a,c,l,f)}tsParseTypeAssertion(){if(n)this.raise(this.start,R.ReservedTypeAssertion);let a=this.tryParse(()=>{let c=this.startNode(),l=this.tsTryNextParseConstantContext();return c.typeAnnotation=l||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,l=this.tsParseDelimitedList("HeritageClauseElement",()=>{let f=this.startNode();if(f.expression=this.tsParseEntityName(),this.tsMatchLeftRelational())f.typeParameters=this.tsParseTypeArguments();return this.finishNode(f,"TSExpressionWithTypeArguments")});if(!l.length)this.raise(c,R.EmptyHeritageClauseType({token:a}));return l}tsParseTypeMemberSemicolon(){if(!this.eat(s.comma)&&!this.isLineTerminator())this.expect(s.semi)}tsTryParseAndCatch(a){let c=this.tryParse((l)=>a()||l());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 l=a;if(this.match(s.parenL)||this.tsMatchLeftRelational()){if(c)this.raise(a.start,R.ReadonlyForMethodSignature);let f=l;if(f.kind&&this.tsMatchLeftRelational())this.raise(this.start,R.AccesorCannotHaveTypeParameters);this.tsFillSignature(s.colon,f),this.tsParseTypeMemberSemicolon();let g="parameters",b="typeAnnotation";if(f.kind==="get"){if(f[g].length>0){if(this.raise(this.start,"A 'get' accesor must not have any formal parameters."),this.isThisParam(f[g][0]))this.raise(this.start,R.AccesorCannotDeclareThisParameter)}}else if(f.kind==="set"){if(f[g].length!==1)this.raise(this.start,"A 'get' accesor must not have any formal parameters.");else{let x=f[g][0];if(this.isThisParam(x))this.raise(this.start,R.AccesorCannotDeclareThisParameter);if(x.type==="Identifier"&&x.optional)this.raise(this.start,R.SetAccesorCannotHaveOptionalParameter);if(x.type==="RestElement")this.raise(this.start,R.SetAccesorCannotHaveRestParameter)}if(f[b])this.raise(f[b].start,R.SetAccesorCannotHaveReturnType)}else f.kind="method";return this.finishNode(f,"TSMethodSignature")}else{let f=l;if(c)f.readonly=!0;let g=this.tsTryParseTypeAnnotation();if(g)f.typeAnnotation=g;return this.tsParseTypeMemberSemicolon(),this.finishNode(f,"TSPropertySignature")}}tsParseTypeMember(){let a=this.startNode();if(this.match(s.parenL)||this.tsMatchLeftRelational())return this.tsParseSignatureMember("TSCallSignatureDeclaration",a);if(this.match(s._new)){let l=this.startNode();if(this.next(),this.match(s.parenL)||this.tsMatchLeftRelational())return this.tsParseSignatureMember("TSConstructSignatureDeclaration",a);else return a.key=this.createIdentifier(l,"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 l=[];while(!this.tsIsListTerminator(a))l.push(c());return l}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,z.BIND_TS_INTERFACE);let f=this.currentScope();this.maybeExportDefined(f,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 l=this.startNode();return l.body=this.tsParseInterfaceBody(),a.body=this.finishNode(l,"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(S.interface)){if(!this.hasFollowingLineBreak())return a.abstract=!0,this.tsParseInterfaceDeclaration(a)}else this.unexpected(a.start)}tsIsDeclarationStart(){return H(this.type)}tsParseExpressionStatement(a,c){switch(c.name){case"declare":{let l=this.tsTryParseDeclare(a);if(l)return l.declare=!0,l;break}case"global":if(this.match(s.braceL)){this.enterScope(Jt);let l=a;return l.global=!0,l.id=c,l.body=this.tsParseModuleBlock(),super.exitScope(),this.finishNode(l,"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(),l=this.isLet();if(N(a)){if(c&&!this.containsEsc||l)return!1;if((a===S.type||a===S.interface)&&!this.containsEsc){let b=this.lookahead();if(N(b.type)&&!this.isContextualWithState("from",b)||b.type===s.braceL)return!1}}else if(!this.match(s._default))return!1;let f=this.nextTokenStart(),g=this.isUnparsedContextual(f,"from");if(this.input.charCodeAt(f)===44||N(this.type)&&g)return!0;if(this.match(s._default)&&g){let b=this.input.charCodeAt(this.nextTokenStartSince(f+4));return b===34||b===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,z.BIND_TS_NAMESPACE);if(this.eat(s.dot)){let l=this.startNode();this.tsParseModuleOrNamespaceDeclaration(l,!0),a.body=l}else this.enterScope(Jt),a.body=this.tsParseModuleBlock(),super.exitScope();return this.finishNode(a,"TSModuleDeclaration")}checkLValSimple(a,c=z.BIND_NONE,l){while(a.type==="TSNonNullExpression"||a.type==="TSAsExpression"||a.type==="TSSatisfiesExpression"||a.type==="TSTypeAssertion")a=a.expression;return super.checkLValSimple(a,c,l)}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,z.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(S.interface)&&this.lookahead().type!==s.dot){let l=this.startNode();return this.next(),this.finishNode(l,"TSIntrinsicKeyword")}return this.tsParseType()}),this.semicolon(),this.finishNode(a,"TSTypeAliasDeclaration")}tsParseDeclaration(a,c,l){switch(c){case"abstract":if(this.tsCheckLineTerminator(l)&&(this.match(s._class)||N(this.type)))return this.tsParseAbstractDeclaration(a);break;case"module":if(this.tsCheckLineTerminator(l)){if(this.match(s.string))return this.tsParseAmbientExternalModuleDeclaration(a);else if(N(this.type))return this.tsParseModuleOrNamespaceDeclaration(a)}break;case"namespace":if(this.tsCheckLineTerminator(l)&&N(this.type))return this.tsParseModuleOrNamespaceDeclaration(a);break;case"type":if(this.tsCheckLineTerminator(l)&&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,z.BIND_LEXICAL),super.expect(s.eq);let l=this.tsParseModuleReference();if(a.importKind==="type"&&l.type!=="TSExternalModuleReference")this.raise(l.start,R.ImportAliasHasImportType);return a.moduleReference=l,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===S.type||a===S.interface)&&!this.containsEsc){let f=this.lookahead();if(N(f.type)&&!this.isContextualWithState("from",f)||f.type===s.braceL)return!1}}else if(!this.match(s._default))return!1;let c=this.nextTokenStart(),l=this.isUnparsedContextual(c,"from");if(this.input.charCodeAt(c)===44||N(this.type)&&l)return!0;if(this.match(s._default)&&l){let f=this.input.charCodeAt(this.nextTokenStartSince(c+4));return f===34||f===39}return!1}parseTemplate({isTagged:a=!1}={}){let c=this.startNode();this.next(),c.expressions=[];let l=this.parseTemplateElement({isTagged:a});c.quasis=[l];while(!l.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(l=this.parseTemplateElement({isTagged:a}))}return this.next(),this.finishNode(c,"TemplateLiteral")}parseFunction(a,c,l,f,g){if(this.initFunction(a),this.ecmaVersion>=9||this.ecmaVersion>=6&&!f){if(this.type===s.star&&c&va)this.unexpected();a.generator=this.eat(s.star)}if(this.ecmaVersion>=8)a.async=!!f;if(c&Nn)a.id=c&Jl&&this.type!==s.name?null:this.parseIdent();let b=this.yieldPos,x=this.awaitPos,C=this.awaitIdentPos,v=this.maybeInArrowParameters;if(this.maybeInArrowParameters=!1,this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Lr(a.async,a.generator)),!(c&Nn))a.id=this.type===s.name?this.parseIdent():null;this.parseFunctionParams(a);let E=c&Nn;if(this.parseFunctionBody(a,l,!1,g,{isFunctionDeclaration:E}),E&&this.isAmbientContext&&a.id){if(this.currentScope().flags&z.SCOPE_TOP)this.declareName(a.id.name,z.BIND_FLAGS_TS_EXPORT_ONLY,a.id.start)}if(this.yieldPos=b,this.awaitPos=x,this.awaitIdentPos=C,c&Nn&&a.id&&!(c&va))if(a.body)this.checkLValSimple(a.id,this.strict||a.generator||a.async?this.treatFunctionsAsVar?z.BIND_VAR:z.BIND_LEXICAL:z.BIND_FUNCTION);else this.checkLValSimple(a.id,z.BIND_NONE);return this.maybeInArrowParameters=v,this.finishNode(a,E?"FunctionDeclaration":"FunctionExpression")}parseFunctionBody(a,c=!1,l=!1,f=!1,g){if(this.match(s.colon))a.returnType=this.tsParseTypeOrTypePredicateAnnotation(s.colon);let b=g?.isFunctionDeclaration?"TSDeclareFunction":g?.isClassMethod?"TSDeclareMethod":void 0;if(b&&!this.match(s.braceL)&&this.isLineTerminator())return this.exitScope(),this.finishNode(a,b);if(b==="TSDeclareFunction"&&this.isAmbientContext){if(this.raise(a.start,R.DeclareFunctionHasImplementation),a.declare)return super.parseFunctionBody(a,c,l,!1),this.finishNode(a,b)}return super.parseFunctionBody(a,c,l,f),a}parseNew(){if(this.containsEsc)this.raiseRecoverable(this.start,"Escape sequence in keyword new");let a=this.startNode(),c=this.parseIdent(!0);if(this.ecmaVersion>=6&&this.eat(s.dot)){a.meta=c;let x=this.containsEsc;if(a.property=this.parseIdent(!0),a.property.name!=="target")this.raiseRecoverable(a.property.start,"The only valid meta property for new is 'new.target'");if(x)this.raiseRecoverable(a.start,"'new.target' must not contain escaped characters");if(!this.allowNewDotTarget)this.raiseRecoverable(a.start,"'new.target' can only be used in functions and class static block");return this.finishNode(a,"MetaProperty")}let l=this.start,f=this.startLoc,g=this.type===s._import;if(a.callee=this.parseSubscripts(this.parseExprAtom(),l,f,!0,!1),g&&a.callee.type==="ImportExpression")this.raise(l,"Cannot use new with import()");let{callee:b}=a;if(b.type==="TSInstantiationExpression"&&!b.extra?.parenthesized)a.typeArguments=b.typeArguments,a.callee=b.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,l,f,g){if(s._in.binop>f&&!this.hasPrecedingLineBreak()){let b;if(this.isContextual("as"))b="TSAsExpression";if(this.isContextual("satisfies"))b="TSSatisfiesExpression";if(b){let x=this.startNodeAt(c,l);x.expression=a;let C=this.tsTryNextParseConstantContext();if(C)x.typeAnnotation=C;else x.typeAnnotation=this.tsNextThenParseType();return this.finishNode(x,b),this.reScan_lt_gt(),this.parseExprOp(x,c,l,f,g)}}return super.parseExprOp(a,c,l,f,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 l=this.lookahead(2);if(l.type!==s.comma&&!this.isContextualWithState("from",l)&&l.type!==s.eq&&this.ts_eatContextualWithState("type",1,c))this.importOrExportOuterKind="type",a.importKind="type",c=this.lookahead(),l=this.lookahead(2);if(N(c.type)&&l.type===s.eq){this.next();let f=this.tsParseImportEqualsDeclaration(a);return this.importOrExportOuterKind="value",f}}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(S.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 l=this.lookahead();if(this.ts_eatWithState(s._import,2,l)){if(this.ts_isContextual(S.type)&&this.lookaheadCharCode()!==61)a.importKind="type",this.importOrExportOuterKind="type",this.next();else a.importKind="value",this.importOrExportOuterKind="value";let f=this.tsParseImportEqualsDeclaration(a,!0);return this.importOrExportOuterKind=void 0,f}else if(this.ts_eatWithState(s.eq,2,l)){let f=a;return f.expression=this.parseExpression(),this.semicolon(),this.importOrExportOuterKind=void 0,this.finishNode(f,"TSExportAssignment")}else if(this.ts_eatContextualWithState("as",2,l)){let f=a;return this.expectContextual("namespace"),f.id=this.parseIdent(),this.semicolon(),this.importOrExportOuterKind=void 0,this.finishNode(f,"TSNamespaceExportDeclaration")}else{let f=this.lookahead(2).type;if(this.ts_isContextualWithState(l,S.type)&&(f===s.braceL||f===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,l){if(!a)return;if(typeof c!=="string")c=c.type==="Identifier"?c.name:c.value;a[c]=!0}parseMaybeDefault(a,c,l){let f=super.parseMaybeDefault(a,c,l);if(f.type==="AssignmentPattern"&&f.typeAnnotation&&f.right.start<f.typeAnnotation.start)this.raise(f.typeAnnotation.start,R.TypeAnnotationAfterAssign);return f}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 l=0;l<a.length;l++){let f=a[l];if(f?.type==="TSTypeCastExpression")a[l]=this.typeCastToParameter(f)}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,l){if(this.type===S.jsxText)return this.jsx_parseText();else if(this.type===S.jsxTagStart)return this.jsx_parseElement();else if(this.type===S.at)return this.parseDecorators(),this.parseExprAtom();else if(N(this.type)){let f=this.potentialArrowAt===this.start,g=this.start,b=this.startLoc,x=this.containsEsc,C=this.parseIdent(!1);if(this.ecmaVersion>=8&&!x&&C.name==="async"&&!this.canInsertSemicolon()&&this.eat(s._function))return this.overrideContext(y.f_expr),this.parseFunction(this.startNodeAt(g,b),0,!1,!0,c);if(f&&!this.canInsertSemicolon()){if(this.eat(s.arrow))return this.parseArrowExpression(this.startNodeAt(g,b),[C],!1,c);if(this.ecmaVersion>=8&&C.name==="async"&&this.type===s.name&&!x&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc)){if(C=this.parseIdent(!1),this.canInsertSemicolon()||!this.eat(s.arrow))this.unexpected();return this.parseArrowExpression(this.startNodeAt(g,b),[C],!0,c)}}return C}else return super.parseExprAtom(a,c,l)}parseExprAtomDefault(){if(N(this.type)){let a=this.potentialArrowAt===this.start,c=this.containsEsc,l=this.parseIdent();if(!c&&l.name==="async"&&!this.canInsertSemicolon()){let{type:f}=this;if(f===s._function)return this.next(),this.parseFunction(this.startNodeAtNode(l),void 0,!0,!0);else if(N(f))if(this.lookaheadCharCode()===61){let g=this.parseIdent(!1);if(this.canInsertSemicolon()||!this.eat(s.arrow))this.unexpected();return this.parseArrowExpression(this.startNodeAtNode(l),[g],!0)}else return l}if(a&&this.match(s.arrow)&&!this.canInsertSemicolon())return this.next(),this.parseArrowExpression(this.startNodeAtNode(l),[l],!1);return l}else this.unexpected()}parseIdentNode(){let a=this.startNode();if(O(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,l=!1){let{isAmbientContext:f}=this;this.next(),super.parseVar(a,!1,c,l||f),this.semicolon();let g=this.finishNode(a,"VariableDeclaration");if(!f)return g;for(let{id:b,init:x}of g.declarations){if(!x)continue;if(c!=="const"||!!b.typeAnnotation)this.raise(x.start,R.InitializerNotAllowedInAmbientContext);else if(x.type!=="Literal"&&(x.type!=="TemplateLiteral"||x.expressions.length>0)&&!Ql(x)&&!Yl(x))this.raise(x.start,R.ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference)}return g}parseStatement(a,c,l){if(this.match(S.at))this.parseDecorators(!0);if(this.match(s._const)&&this.isLookaheadContextual("enum")){let f=this.startNode();return this.expect(s._const),this.tsParseEnumDeclaration(f,{const:!0})}if(this.ts_isContextual(S.enum))return this.tsParseEnumDeclaration(this.startNode());if(this.ts_isContextual(S.interface)){let f=this.tsParseInterfaceDeclaration(this.startNode());if(f)return f}return super.parseStatement(a,c,l)}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(S.at))return!0;return super.shouldParseExportStatement()}parseConditional(a,c,l,f,g){if(this.eat(s.question)){let b=this.startNodeAt(c,l);return b.test=a,b.consequent=this.parseMaybeAssign(),this.expect(s.colon),b.alternate=this.parseMaybeAssign(f),this.finishNode(b,"ConditionalExpression")}return a}parseMaybeConditional(a,c){let l=this.start,f=this.startLoc,g=this.parseExprOps(a,c);if(this.checkExpressionErrors(c))return g;if(!this.maybeInArrowParameters||!this.match(s.question))return this.parseConditional(g,l,f,a,c);let b=this.tryParse(()=>this.parseConditional(g,l,f,a,c));if(!b.node){if(b.error)this.setOptionalParametersError(c,b.error);return g}return b.node}parseParenItem(a){let c=this.start,l=this.startLoc;if(a=super.parseParenItem(a),this.eat(s.question))a.optional=!0,this.resetEndLocation(a);if(this.match(s.colon)){let f=this.startNodeAt(c,l);return f.expression=a,f.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(f,"TSTypeCastExpression")}return a}parseExportDeclaration(a){if(!this.isAmbientContext&&this.ts_isContextual(S.declare))return this.tsInAmbientContext(()=>this.parseExportDeclaration(a));let c=this.start,l=this.startLoc,f=this.eatContextual("declare");if(f&&(this.ts_isContextual(S.declare)||!this.shouldParseExportStatement()))this.raise(this.start,R.ExpectedAmbientAfterExportDeclare);let b=N(this.type)&&this.tsTryParseExportDeclaration()||this.parseStatement(null);if(!b)return null;if(b.type==="TSInterfaceDeclaration"||b.type==="TSTypeAliasDeclaration"||f)a.exportKind="type";if(f)this.resetStartLocation(b,c,l),b.declare=!0;return b}parseClassId(a,c){if(!c&&this.isContextual("implements"))return;super.parseClassId(a,c);let l=this.tsTryParseTypeParameters(this.tsParseClassTypeParameterModifiers.bind(this));if(l)a.typeParameters=l}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:l}=a;this.raise(this.start,R.AbstractPropertyHasInitializer({propertyName:l.type==="Identifier"&&!a.computed?l.name:`[${this.input.slice(l.start,l.end)}]`}))}}return super.parseClassField(a)}parseClassMethod(a,c,l,f){let g=a.kind==="constructor",b=a.key.type==="PrivateIdentifier",x=this.tsTryParseTypeParameters(this.tsParseConstModifier);if(b){if(x)a.typeParameters=x;if(a.accessibility)this.raise(a.start,R.PrivateMethodsHasAccessibility({modifier:a.accessibility}))}else if(x&&g)this.raise(x.start,R.ConstructorHasTypeParameters);let{declare:C=!1,kind:v}=a;if(C&&(v==="get"||v==="set"))this.raise(a.start,R.DeclareAccessor({kind:v}));if(x)a.typeParameters=x;let E=a.key;if(a.kind==="constructor"){if(c)this.raise(E.start,"Constructor can't be a generator");if(l)this.raise(E.start,"Constructor can't be an async method")}else if(a.static&&Ta(a,"prototype"))this.raise(E.start,"Classes may not have a static property named prototype");let k=a.value=this.parseMethod(c,l,f,!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(),l="",f=!1,g=!1,b="method",x=!1,C=["declare","private","public","protected","accessor","override","abstract","readonly","static"],v=this.tsParseModifiers({modified:c,allowedModifiers:C,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:R.InvalidModifierOnTypeParameterPositions});x=Boolean(v.static);let E=()=>{if(this.tsIsStartOfStaticBlocks()){if(this.next(),this.next(),this.tsHasSomeModifiers(c,C))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=x,x){if(!(this.isClassElementNameStart()||this.type===s.star))l="static"}if(!l&&this.ecmaVersion>=8&&this.eatContextual("async"))if((this.isClassElementNameStart()||this.type===s.star)&&!this.canInsertSemicolon())g=!0;else l="async";if(!l&&(this.ecmaVersion>=9||!g)&&this.eat(s.star))f=!0;if(!l&&!g&&!f){let _=this.value;if(this.eatContextual("get")||this.eatContextual("set"))if(this.isClassElementNameStart())b=_;else l=_}if(l)c.computed=!1,c.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),c.key.name=l,this.finishNode(c.key,"Identifier");else this.parseClassElementName(c);if(this.parsePostMemberNameModifiers(c),this.isClassMethod()||this.ecmaVersion<13||this.type===s.parenL||b!=="method"||f||g){let _=!c.static&&Ta(c,"constructor"),D=_&&a;if(_&&b!=="method")this.raise(c.key.start,"Constructor can't have get/set modifier");c.kind=_?"constructor":b,this.parseClassMethod(c,f,g,D)}else this.parseClassField(c);return c}};if(c.declare)this.tsInAmbientContext(E);else E();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 l=this.tsTryParseTypeAnnotation();if(l)a.id.typeAnnotation=l,this.resetEndLocation(a.id)}parseArrowExpression(a,c,l,f){if(this.match(s.colon))a.returnType=this.tsParseTypeAnnotation();let g=this.yieldPos,b=this.awaitPos,x=this.awaitIdentPos;this.enterScope(Lr(l,!1)|z.SCOPE_ARROW),this.initFunction(a);let C=this.maybeInArrowParameters;if(this.ecmaVersion>=8)a.async=!!l;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,f),this.yieldPos=g,this.awaitPos=b,this.awaitIdentPos=x,this.maybeInArrowParameters=C,this.finishNode(a,"ArrowFunctionExpression")}parseYield(a){if(!this.yieldPos)this.yieldPos=this.start;let c=this.startNode();this.next();let l=this.tsMatchLeftRelational();if(!(!this.match(s.semi)&&!this.canInsertSemicolon()&&(this.match(s.star)||this.type.startsExpr||l)))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,l){if(this.isContextual("yield"))if(this.inGenerator)return this.parseYield(a);else this.exprAllowed=!1;let f=!1,g=-1,b=-1,x=-1;if(c)g=c.parenthesizedAssign,b=c.trailingComma,x=c.doubleProto,c.parenthesizedAssign=c.trailingComma=-1;else c=new Yt,f=!0;let C=this.start,v=this.startLoc;if(this.type===s.parenL||N(this.type))this.potentialArrowAt=this.start,this.potentialArrowInForAwait=a==="await";let E=this.parseMaybeConditional(a,c);if(l)E=l.call(this,E,C,v);if(this.type.isAssign){let k=this.startNodeAt(C,v);if(k.operator=this.value,this.type===s.eq)E=this.toAssignable(E,!0,c,!0);if(!f)c.parenthesizedAssign=c.trailingComma=c.doubleProto=-1;if(c.shorthandAssign>=E.start)c.shorthandAssign=-1;if(!this.maybeInArrowParameters)if(this.type===s.eq)this.checkLValPattern(E);else this.checkLValSimple(E);if(k.left=E,this.next(),k.right=this.parseMaybeAssign(a),x>-1)c.doubleProto=x;return this.finishNode(k,"AssignmentExpression")}else if(f)this.checkExpressionErrors(c,!0);if(g>-1)c.parenthesizedAssign=g;if(b>-1)c.trailingComma=b;return E}parseMaybeAssign(a,c,l){let f,g;if(e?.jsx&&(this.matchJsx("jsxTagStart")||this.tsMatchLeftRelational())){if(f=this.tryParse(()=>this.parseMaybeAssignOrigin(a,c,l)),!f.error)return f.node;let C=this.context,v=C[C.length-1],E=C[C.length-2];if(v===o.tokContexts.tc_oTag&&E===o.tokContexts.tc_expr)this.parseEffects.pop(C),this.parseEffects.pop(C);else if(v===o.tokContexts.tc_oTag||v===o.tokContexts.tc_expr)this.parseEffects.pop(C)}if(!f?.error&&!this.tsMatchLeftRelational())return this.parseMaybeAssignOrigin(a,c,l);let b,x=this.tryParse((C)=>{b=this.tsParseTypeParameters(this.tsParseConstModifier);let v=this.parseMaybeAssignOrigin(a,c,l);if(v.type!=="ArrowFunctionExpression"||v.extra?.parenthesized)C();if(b?.params.length!==0)this.resetStartLocationFromNode(v,b);return v.typeParameters=b,v});if(!x.error&&!x.aborted){if(b)this.reportReservedArrowTypeParam(b);return x.node}if(!f){if(Ca(!0),g=this.tryParse(()=>this.parseMaybeAssignOrigin(a,c,l)),!g.error)return g.node}if(f?.thrown)throw this.selectTryParseResult(f),f.error;if(x.thrown)throw this.selectTryParseResult(x),x.error;if(g?.thrown)throw this.selectTryParseResult(g),g.error;throw f?.error||x.error||g?.error}parseAssignableListItem(a){let c=[];while(this.match(S.at))c.push(this.parseDecorator());let l=this.start,f=this.startLoc,g,b=!1,x=!1;if(a!==void 0){let E={};if(this.tsParseModifiers({modified:E,allowedModifiers:["public","private","protected","override","readonly"]}),g=E.accessibility,x=E.override,b=E.readonly,a===!1&&(g||b||x))this.raise(f.column,R.UnexpectedParameterModifier)}let C=this.parseMaybeDefault(l,f);this.parseBindingListItem(C);let v=this.parseMaybeDefault(C.start,C.loc.start,C);if(c.length)v.decorators=c;if(g||b||x){let E=this.startNodeAt(l,f);if(g)E.accessibility=g;if(b)E.readonly=b;if(x)E.override=x;if(v.type!=="Identifier"&&v.type!=="AssignmentPattern")this.raise(E.start,R.UnsupportedParameterPropertyKind);return E.parameter=v,this.finishNode(E,"TSParameterProperty")}return v}checkLValInnerPattern(a,c=z.BIND_NONE,l){switch(a.type){case"TSParameterProperty":this.checkLValInnerPattern(a.parameter,c,l);break;default:{super.checkLValInnerPattern(a,c,l);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 l=a.properties.length-1;return a.properties.every((f,g)=>f.type!=="ObjectMethod"&&(g===l||f.type!=="SpreadElement")&&this.isAssignable(f))}case"Property":case"ObjectProperty":return this.isAssignable(a.value);case"SpreadElement":return this.isAssignable(a.argument);case"ArrayExpression":return a.elements.every((l)=>l===null||this.isAssignable(l));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,l=new Yt,f=!1){switch(a.type){case"ParenthesizedExpression":return this.toAssignableParenthesizedExpression(a,c,l,f);case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":if(c);else this.raise(a.start,R.UnexpectedTypeCastInParameter);let g=this.toAssignable(a.expression,c,l,f);if(f)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,l);case"TSTypeCastExpression":return this.typeCastToParameter(a);default:return super.toAssignable(a,c,l)}return a}toAssignableParenthesizedExpression(a,c,l,f=!1){switch(a.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":let g=this.toAssignable(a.expression,c,l,f);if(f)return a.expression=g,a;return g;default:return super.toAssignable(a,c,l)}}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((l)=>this.isAssignable(l,!0));else c=!this.canInsertSemicolon();if(c){if(this.match(s.colon)){let l=this.tryParse((f)=>{let g=this.tsParseTypeOrTypePredicateAnnotation(s.colon);if(this.canInsertSemicolon()||!this.match(s.arrow))f();return g});if(l.aborted)return this.shouldParseArrowReturnType=void 0,!1;if(!l.thrown)this.shouldParseArrowReturnType=l.node}if(!this.match(s.arrow))return this.shouldParseArrowReturnType=void 0,!1;return!0}return this.shouldParseArrowReturnType=void 0,c}parseParenArrowList(a,c,l,f){let g=this.startNodeAt(a,c);return g.returnType=this.shouldParseArrowReturnType,this.shouldParseArrowReturnType=void 0,this.parseArrowExpression(g,l,!1,f)}parseParenAndDistinguishExpression(a,c){let l=this.start,f=this.startLoc,g,b=this.ecmaVersion>=8;if(this.ecmaVersion>=6){let x=this.maybeInArrowParameters;this.maybeInArrowParameters=!0,this.next();let C=this.start,v=this.startLoc,E=[],k=!0,_=!1,D=new Yt,q=this.yieldPos,U=this.awaitPos,W;this.yieldPos=0,this.awaitPos=0;while(this.type!==s.parenR)if(k?k=!1:this.expect(s.comma),b&&this.afterTrailingComma(s.parenR,!0)){_=!0;break}else if(this.type===s.ellipsis){if(W=this.start,E.push(this.parseParenItem(this.parseRestBinding())),this.type===s.comma)this.raise(this.start,"Comma is not permitted after the rest element");break}else E.push(this.parseMaybeAssign(!1,D,this.parseParenItem));let re=this.lastTokEnd,j=this.lastTokEndLoc;if(this.expect(s.parenR),this.maybeInArrowParameters=x,a&&this.shouldParseArrow(E)&&this.eat(s.arrow))return this.checkPatternErrors(D,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=q,this.awaitPos=U,this.parseParenArrowList(l,f,E,c);if(!E.length||_)this.unexpected(this.lastTokStart);if(W)this.unexpected(W);if(this.checkExpressionErrors(D,!0),this.yieldPos=q||this.yieldPos,this.awaitPos=U||this.awaitPos,E.length>1)g=this.startNodeAt(C,v),g.expressions=E,this.finishNodeAt(g,"SequenceExpression",re,j);else g=E[0]}else g=this.parseParenExpression();if(this.options.preserveParens){let x=this.startNodeAt(l,f);return x.expression=g,this.finishNode(x,"ParenthesizedExpression")}else return g}parseTaggedTemplateExpression(a,c,l,f){let g=this.startNodeAt(c,l);if(g.tag=a,g.quasi=this.parseTemplate({isTagged:!0}),f)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 l=this.tsParseTypeOrTypePredicateAnnotation(s.colon);if(this.canInsertSemicolon()||!this.match(s.arrow))c();return l});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,l,f){let g=this.startNodeAt(a,c);return g.returnType=this.shouldParseAsyncArrowReturnType,this.shouldParseAsyncArrowReturnType=void 0,this.parseArrowExpression(g,l,!0,f)}parseExprList(a,c,l,f){let g=[],b=!0;while(!this.eat(a)){if(!b){if(this.expect(s.comma),c&&this.afterTrailingComma(a))break}else b=!1;let x;if(l&&this.type===s.comma)x=null;else if(this.type===s.ellipsis){if(x=this.parseSpread(f),this.maybeInArrowParameters&&this.match(s.colon))x.typeAnnotation=this.tsParseTypeAnnotation();if(f&&this.type===s.comma&&f.trailingComma<0)f.trailingComma=this.start}else x=this.parseMaybeAssign(!1,f,this.parseParenItem);g.push(x)}return g}parseMaybeDecoratorArguments(a){let c=this.tsMatchLeftRelational()||this.match(s.bitShift)?this.tsParseTypeArgumentsInExpression():void 0;if(this.eat(s.parenL)){let l=this.startNodeAtNode(a);if(l.callee=a,l.arguments=this.parseExprList(s.parenR,!1),c)l.typeArguments=c;return this.finishNode(l,"CallExpression")}if(c){let l=this.startNodeAtNode(a);return l.expression=a,l.typeArguments=c,this.finishNode(l,"TSInstantiationExpression")}return a}parseSubscript(a,c,l,f,g,b,x){let C=b;if(!this.hasPrecedingLineBreak()&&this.value==="!"&&this.match(s.prefix)){this.exprAllowed=!1,this.next();let D=this.startNodeAt(c,l);return D.expression=a,a=this.finishNode(D,"TSNonNullExpression"),a}let v=!1;if(this.match(s.questionDot)&&this.lookaheadCharCode()===60){if(f)return a;a.optional=!0,C=v=!0,this.next()}if(this.tsMatchLeftRelational()||this.match(s.bitShift)){let D,q=this.tsTryParseAndCatch(()=>{if(!f&&this.atPossibleAsyncArrow(a)){let j=this.tsTryParseGenericAsyncArrowFunction(c,l,x);if(j)return a=j,a}let U=this.tsParseTypeArgumentsInExpression();if(!U)return a;if(v&&!this.match(s.parenL))return D=this.curPosition(),a;if(F(this.type)||this.type===s.backQuote){let j=this.parseTaggedTemplateExpression(a,c,l,C);return j.typeArguments=U,j}if(!f&&this.eat(s.parenL)){let j=new Yt,Y=this.startNodeAt(c,l);if(Y.callee=a,Y.arguments=this.parseExprList(s.parenR,this.ecmaVersion>=8,!1,j),this.tsCheckForInvalidTypeCasts(Y.arguments),Y.typeArguments=U,C)Y.optional=v;return this.checkExpressionErrors(j,!0),a=this.finishNode(Y,"CallExpression"),a}let W=this.type;if(this.tsMatchRightRelational()||W===s.bitShift||W!==s.parenL&&Zl(W)&&!this.hasPrecedingLineBreak())return;let re=this.startNodeAt(c,l);return re.expression=a,re.typeArguments=U,this.finishNode(re,"TSInstantiationExpression")});if(D)this.unexpected(D);if(q){if(q.type==="TSInstantiationExpression"&&(this.match(s.dot)||this.match(s.questionDot)&&this.lookaheadCharCode()!==40))this.raise(this.start,R.InvalidPropertyAccessAfterInstantiationExpression);return a=q,a}}let E=this.ecmaVersion>=11,k=E&&this.eat(s.questionDot);if(f&&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,l);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=!!_,E)D.optional=k;a=this.finishNode(D,"MemberExpression")}else if(!f&&this.eat(s.parenL)){let D=this.maybeInArrowParameters;this.maybeInArrowParameters=!0;let q=new Yt,U=this.yieldPos,W=this.awaitPos,re=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;let j=this.parseExprList(s.parenR,this.ecmaVersion>=8,!1,q);if(g&&!k&&this.shouldParseAsyncArrow()){if(this.checkPatternErrors(q,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0)this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function");this.yieldPos=U,this.awaitPos=W,this.awaitIdentPos=re,a=this.parseSubscriptAsyncArrow(c,l,j,x)}else{this.checkExpressionErrors(q,!0),this.yieldPos=U||this.yieldPos,this.awaitPos=W||this.awaitPos,this.awaitIdentPos=re||this.awaitIdentPos;let Y=this.startNodeAt(c,l);if(Y.callee=a,Y.arguments=j,E)Y.optional=k;a=this.finishNode(Y,"CallExpression")}this.maybeInArrowParameters=D}else if(this.type===s.backQuote){if(k||C)this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");let D=this.startNodeAt(c,l);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 l=a.kind==="get"?0:1,f=a.value.params[0];if(l=f&&this.isThisParam(f)?l+1:l,a.value.params.length!==l){let b=a.value.start;if(a.kind==="get")this.raiseRecoverable(b,"getter should have no params");else this.raiseRecoverable(b,"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,l,f,g,b,x,C){if(this.tsMatchLeftRelational()){if(c)this.unexpected();a.kind="init",a.method=!0;let v=this.tsTryParseTypeParameters(this.tsParseConstModifier);if(a.value=this.parseMethod(l,f),v)a.value.typeParameters=v;return}return super.parsePropertyValue(a,c,l,f,g,b,x,C)}parseProperty(a,c){if(!a){let l=[];if(this.match(S.at))while(this.match(S.at))l.push(this.parseDecorator());let f=super.parseProperty(a,c);if(f.type==="SpreadElement"){if(l.length)this.raise(f.start,_n.SpreadElementDecorator)}if(l.length)f.decorators=l,l=[];return f}return super.parseProperty(a,c)}parseCatchClauseParam(){let a=this.parseBindingAtom(),c=a.type==="Identifier";this.enterScope(c?z.SCOPE_SIMPLE_CATCH:0),this.checkLValPattern(a,c?z.BIND_SIMPLE_CATCH:z.BIND_LEXICAL);let l=this.tsTryParseTypeAnnotation();if(l)a.typeAnnotation=l,this.resetEndLocation(a);return this.expect(s.parenR),a}parseClass(a,c){let l=this.inAbstractClass;this.inAbstractClass=!!a.abstract;try{this.next(),this.takeDecorators(a);let f=this.strict;this.strict=!0,this.parseClassId(a,c),this.parseClassSuper(a);let g=this.enterClassBody(),b=this.startNode(),x=!1;b.body=[];let C=[];this.expect(s.braceL);while(this.type!==s.braceR){if(this.match(S.at)){C.push(this.parseDecorator());continue}let v=this.parseClassElement(a.superClass!==null);if(C.length)v.decorators=C,this.resetStartLocationFromNode(v,C[0]),C=[];if(v){if(b.body.push(v),v.type==="MethodDefinition"&&v.kind==="constructor"&&v.value.type==="FunctionExpression"){if(x)this.raiseRecoverable(v.start,"Duplicate constructor in the same class");if(x=!0,v.decorators&&v.decorators.length>0)this.raise(v.start,_n.DecoratorConstructor)}else if(v.key&&v.key.type==="PrivateIdentifier"&&v.value?.type!=="TSDeclareMethod"){let E=v.key.name;if(this.parseEffects.modify(g,E,(_)=>Ol(_,v)))this.raiseRecoverable(v.key.start,`Identifier '#${E}' has already been declared`)}}}if(this.strict=f,this.next(),C.length)this.raise(this.start,_n.TrailingDecorator);return a.body=this.finishNode(b,"ClassBody"),this.exitClassBody(),this.finishNode(a,c?"ClassDeclaration":"ClassExpression")}finally{this.inAbstractClass=l}}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,l,f,g){let b=this.startNode(),x=this.yieldPos,C=this.awaitPos,v=this.awaitIdentPos;if(this.initFunction(b),this.ecmaVersion>=6)b.generator=a;if(this.ecmaVersion>=8)b.async=!!c;if(this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Lr(c,b.generator)|z.SCOPE_SUPER|(l?z.SCOPE_DIRECT_SUPER:0)),this.expect(s.parenL),b.params=this.parseClassFunctionParams(),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(b,!1,!0,!1,{isClassMethod:f}),this.yieldPos=x,this.awaitPos=C,this.awaitIdentPos=v,g&&g.abstract){if(!!b.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(b,"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 l=new this(c,a);if(t)l.isAmbientContext=!0;return l.parse()}static parseExpressionAt(a,c,l){if(l.locations===!1)throw Error("You have to enable options.locations while using acorn-typescript");else l.locations=!0;let f=new this(l,a,c);if(t)f.isAmbientContext=!0;return f.nextToken(),f.parseExpression()}parseImportSpecifier(){if(this.ts_isContextual(S.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(S.type);if(!this.match(s.string)&&c){let f=this.startNode();return f.local=this.parseModuleExportName(),this.parseTypeOnlyImportExportSpecifier(f,!1,this.importOrExportOuterKind==="type"),this.finishNode(f,"ExportSpecifier"),this.checkExport(a,f.exported,f.exported.start),f}else{let f=super.parseExportSpecifier(a);return f.exportKind="value",f}}parseTypeOnlyImportExportSpecifier(a,c,l){let f=c?"imported":"local",g=c?"local":"exported",b=a[f],x,C=!1,v=!0,E=b.start;if(this.isContextual("as")){let _=this.parseIdent();if(this.isContextual("as")){let D=this.parseIdent();if(O(this.type))C=!0,b=_,x=c?this.parseIdent():this.parseModuleExportName(),v=!1;else x=D,v=!1}else if(O(this.type))v=!1,x=c?this.parseIdent():this.parseModuleExportName();else C=!0,b=_}else if(O(this.type))if(C=!0,c){if(b=super.parseIdent(!0),!this.isContextual("as"))this.checkUnreserved(b)}else b=this.parseModuleExportName();if(C&&l)this.raise(E,c?R.TypeModifierIsUsedInTypeImports:R.TypeModifierIsUsedInTypeExports);a[f]=b,a[g]=x;let k=c?"importKind":"exportKind";if(a[k]=C?"type":"value",v&&this.eatContextual("as"))a[g]=c?this.parseIdent():this.parseModuleExportName();if(!a[g])a[g]=this.copyNode(a[f]);if(c)this.checkLValSimple(a[g],z.BIND_LEXICAL)}raiseCommonCheck(a,c,l){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 l?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 l=this.curContext();if(l==P.tc_oTag)this.parseEffects.append(this.context,y.b_expr);else if(l==P.tc_expr)this.parseEffects.append(this.context,y.b_tmpl);else super.updateContext(a);this.exprAllowed=!0}else if(c===s.slash&&a===S.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 l=this.startNodeAt(a,c),f=this.jsx_parseElementName();if(f)l.name=f;if(this.match(s.relational)||this.match(s.bitShift)){let g=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());if(g)l.typeArguments=g}l.attributes=[];while(this.type!==s.slash&&this.type!==S.jsxTagEnd)l.attributes.push(this.jsx_parseAttribute());return l.selfClosing=this.eat(s.slash),this.expect(S.jsxTagEnd),this.finishNode(l,f?"JSXOpeningElement":"JSXOpeningFragment")}enterScope(a){let c=a===Jt;if(c)this.parseEffects.append(this.importsStack,[]);let l=c?a|z.SCOPE_CLASS_STATIC_BLOCK:a;super.enterScope(l);let f=super.currentScope();f.types=[],f.enums=[],f.constEnums=[],f.classes=[],f.exportOnlyBindings=[]}exitScope(){if(super.currentScope().flags&Jt)this.parseEffects.pop(this.importsStack);super.exitScope()}hasImport(a,c){let l=this.importsStack.length;if(this.importsStack[l-1].indexOf(a)>-1)return!0;if(!c&&l>1){for(let f=0;f<l-1;f++)if(this.importsStack[f].indexOf(a)>-1)return!0}return!1}maybeExportDefined(a,c){if(this.inModule&&a.flags&z.SCOPE_TOP)this.parseEffects.remove(this.undefinedExports,c)}declareName(a,c,l){if(c&z.BIND_FLAGS_TS_IMPORT){if(this.hasImport(a,!0))this.raise(l,`Identifier '${a}' has already been declared.`);this.parseEffects.append(this.importsStack[this.importsStack.length-1],a);return}let f=this.currentScope();if(c&z.BIND_FLAGS_TS_EXPORT_ONLY){this.maybeExportDefined(f,a),this.parseEffects.append(f.exportOnlyBindings,a);return}if(c===z.BIND_TS_TYPE||c===z.BIND_TS_INTERFACE){if(c===z.BIND_TS_TYPE&&f.types.includes(a))this.raise(l,`type '${a}' has already been declared.`);this.parseEffects.append(f.types,a)}else if(c&z.BIND_FLAGS_TS_ENUM){if(f.enums.includes(a))return;super.declareName(a,z.BIND_LEXICAL,l)}else super.declareName(a,c,l);if(c&z.BIND_FLAGS_TS_ENUM)this.parseEffects.append(f.enums,a);if(c&z.BIND_FLAGS_TS_CONST_ENUM)this.parseEffects.append(f.constEnums,a);if(c&z.BIND_FLAGS_CLASS)this.parseEffects.append(f.classes,a)}checkLocalExport(a){let{name:c}=a;if(this.hasImport(c))return;let l=this.scopeStack.length;for(let f=l-1;f>=0;f--){let g=this.scopeStack[f];if(g.types.indexOf(c)>-1||g.exportOnlyBindings.indexOf(c)>-1)return}super.checkLocalExport(a)}}return xe}}var nu=/\n/,ru=/[ \t]/,iu=/^[,) \t]*$/,Dn="",Ma=[];function Ln(e,t){Dn=e,Ma=t}function Rn(e,t,n,r){let i=t;if(e&&nu.test(i)){let o=n;while(o>0&&Dn[o-1]!==`
28
- `)o-=1;let s=o;while(ru.test(Dn[s]))s+=1;let p=Dn.slice(o,s);i=su(i,p)}Ma.push({type:e?"Block":"Line",value:i,start:n,end:r})}function su(e,t){if(t==="")return e;return(e.startsWith(t)?e.slice(t.length):e).replaceAll(`
35
+ `;else b=String.fromCharCode(g);if(this.options.locations)++this.curLine,this.lineStart=this.pos;return b}jsx_readString(f){let g="",b=++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===f)break;if(T===38)g+=this.input.slice(b,this.pos),g+=this.jsx_readEntity(),b=this.pos;else if(s(T))g+=this.input.slice(b,this.pos),g+=this.jsx_readNewLine(!1),b=this.pos;else++this.pos}return g+=this.input.slice(b,this.pos++),this.finishToken(i.string,g)}jsx_readEntity(){let f="",g=0,b,T=this.input[this.pos];if(T!=="&")this.raise(this.pos,"Entity must start with an ampersand");let P=++this.pos;while(this.pos<this.input.length&&g++<10){if(T=this.input[this.pos++],T===";"){if(f[0]==="#"){let k;if(f[1]==="x"||f[1]==="X"){if(f=f.substr(2),ru.test(f))k=parseInt(f,16)}else if(f=f.substr(1),iu.test(f))k=parseInt(f,10);if(k!==void 0&&k<=1114111)b=String.fromCodePoint(k)}else if(Object.prototype.hasOwnProperty.call(Da,f))b=Da[f];break}f+=T}if(b===void 0)return this.pos=P,"&";return b}jsx_readWord(){let f,g=this.pos;do f=this.input.charCodeAt(++this.pos);while(p(f)||f===45);return this.finishToken(o.jsxName,this.input.slice(g,this.pos))}jsx_parseIdentifier(){let f=this.startNode();if(this.type===o.jsxName)f.name=this.value;else if(this.type.keyword)f.name=this.type.keyword;else this.unexpected();return this.next(),this.finishNode(f,"JSXIdentifier")}jsx_parseNamespacedName(){let f=this.start,g=this.startLoc,b=this.jsx_parseIdentifier();if(!u.allowNamespaces||!this.eat(i.colon))return b;var T=this.startNodeAt(f,g);return T.namespace=b,T.name=this.jsx_parseIdentifier(),this.finishNode(T,"JSXNamespacedName")}jsx_parseElementName(){if(this.type===o.jsxTagEnd)return"";let f=this.start,g=this.startLoc,b=this.jsx_parseNamespacedName();if(this.type===i.dot&&b.type==="JSXNamespacedName"&&!u.allowNamespacedObjects)this.unexpected();while(this.eat(i.dot)){let T=this.startNodeAt(f,g);T.object=b,T.property=this.jsx_parseIdentifier(),b=this.finishNode(T,"JSXMemberExpression")}return b}jsx_parseAttributeValue(){switch(this.type){case i.braceL:let f=this.jsx_parseExpressionContainer();if(f.expression.type==="JSXEmptyExpression")this.raise(f.start,"JSX attributes must only be assigned a non-empty expression");return f;case o.jsxTagStart:case i.string:return this.parseExprAtom();default:this.raise(this.start,"JSX value should be either an expression or a quoted JSX text")}}jsx_parseEmptyExpression(){let f=this.startNodeAt(this.lastTokEnd,this.lastTokEndLoc);return this.finishNodeAt(f,"JSXEmptyExpression",this.start,this.startLoc)}jsx_parseExpressionContainer(){let f=this.startNode();if(this.next(),this.eat(i.ellipsis))return f.expression=this.parseExpression(),this.expect(i.braceR),this.finishNode(f,"JSXSpreadChild");return f.expression=this.type===i.braceR?this.jsx_parseEmptyExpression():this.parseExpression(),this.expect(i.braceR),this.finishNode(f,"JSXExpressionContainer")}jsx_parseAttribute(){let f=this.startNode();if(this.eat(i.braceL))return this.expect(i.ellipsis),f.argument=this.parseMaybeAssign(),this.expect(i.braceR),this.finishNode(f,"JSXSpreadAttribute");return f.name=this.jsx_parseNamespacedName(),f.value=this.eat(i.eq)?this.jsx_parseAttributeValue():null,this.finishNode(f,"JSXAttribute")}jsx_parseOpeningElementAt(f,g){let b=this.startNodeAt(f,g);b.attributes=[];let T=this.jsx_parseElementName();if(T)b.name=T;while(this.type!==i.slash&&this.type!==o.jsxTagEnd)b.attributes.push(this.jsx_parseAttribute());return b.selfClosing=this.eat(i.slash),this.expect(o.jsxTagEnd),this.finishNode(b,T?"JSXOpeningElement":"JSXOpeningFragment")}jsx_parseClosingElementAt(f,g){let b=this.startNodeAt(f,g),T=this.jsx_parseElementName();if(T)b.name=T;return this.expect(o.jsxTagEnd),this.finishNode(b,T?"JSXClosingElement":"JSXClosingFragment")}jsx_parseElementAt(f,g){let b=this.startNodeAt(f,g),T=[],P=this.jsx_parseOpeningElementAt(f,g),k=null;if(!P.selfClosing){e:for(;;)switch(this.type){case o.jsxTagStart:if(f=this.start,g=this.startLoc,this.next(),this.eat(i.slash)){k=this.jsx_parseClosingElementAt(f,g);break e}T.push(this.jsx_parseElementAt(f,g));break;case o.jsxText:T.push(this.parseExprAtom());break;case i.braceL:T.push(this.jsx_parseExpressionContainer());break;default:this.unexpected()}if(tn(k.name)!==tn(P.name))this.raise(k.start,"Expected corresponding JSX closing tag for <"+tn(P.name)+">")}let _=P.name?"Element":"Fragment";if(b["opening"+_]=P,b["closing"+_]=k,b.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(b,"JSX"+_)}jsx_parseText(){let f=this.parseLiteral(this.value);return f.type="JSXText",f}jsx_parseElement(){let f=this.start,g=this.startLoc;return this.next(),this.jsx_parseElementAt(f,g)}}}function au(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 u=this.startNode(),m;if(this.type===i.string)m=this.parseLiteral(this.value);else m=this.parseIdent(!0);if(this.next(),u.key=m,p.has(u.key.name))this.raise(this.pos,"Duplicated key in attributes");if(p.add(u.key.name),this.type!==i.string)this.raise(this.pos,"Only string is supported as an attribute value");u.value=this.parseLiteral(this.value),s.push(this.finishNode(u,"ImportAttribute"))}while(this.eat(i.comma));return s}}}var Vr=["onToken","onComment","onInsertedSemicolon","onTrailingComma"];function qa(){return{_tag:"BufferedParserEvents",segments:[]}}var ou=qa();function La(e){return e.segments.length>0}var cu=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??ou}replay(e){if(!La(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 Vr){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 Vr){let t=this.callbackWrappers[e];if(t)this.options[e]=t}}deactivateCallbacks(){for(let e of Vr){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(La(t))e.segments.push(t)}outputFor(e){return e.output??=qa()}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 Dt(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 pu(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 lu(e,t){e.setLookaheadTokenState(t.lookahead),e.context=Dt(t.context,t.contextLength,"token context stack"),e.scopeStack=Dt(t.scopeStack,t.scopeStackLength,"scope stack"),e.importsStack=Dt(t.importsStack,t.importsStackLength,"import stack"),e.labels=Dt(t.labels,t.labelsLength,"label stack"),e.privateNameStack=Dt(t.privateNameStack,t.privateNameStackLength,"private-name stack"),e.decoratorStack=Dt(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 uu(e){return{capture:()=>pu(e),restore:(t)=>lu(e,t)}}function du(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,u,m){super(p,u,m);this.parseEffects=new cu(this.options,uu(this))}overrideContext(p){if(this.curContext()!==p)this.parseEffects?.willMutateTail(this.context,1);return super.overrideContext(p)}takeDecorators(p){let u=this.decoratorStack.length-1;if(this.decoratorStack[u].length>0)this.parseEffects?.willSet(this.decoratorStack,String(u));return super.takeDecorators(p)}parseDecorators(p){let u=this.decoratorStack[this.decoratorStack.length-1];return this.parseEffects?.willAppend(u),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,u,m,f){for(let g=this.labels.length-1;g>=0;g--){let b=this.labels[g];if(b.statementStart!==p.start)break;this.parseEffects?.willSet(b,"statementStart"),this.parseEffects?.willSet(b,"kind")}return this.parseEffects?.willAppend(this.labels),super.parseLabeledStatement(p,u,m,f)}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:u}=this;if(u===n.parenR||u===n.braceR||u===n.braceL||u===n.dollarBraceL||u===n.parenL||u===n._function||u===n._class||u===n.colon||u===n.backQuote||u===n.star||u===r.jsxTagStart||u===r.jsxTagEnd||u===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,u,m){let f=this.parseEffects;if(f?.active)if(u===i.BIND_LEXICAL){let g=this.currentScope();if(f.willAppend(g.lexical),this.inModule&&g.flags&i.SCOPE_TOP)f.willSet(this.undefinedExports,p)}else if(u===i.BIND_SIMPLE_CATCH)f.willAppend(this.currentScope().lexical);else if(u===i.BIND_FUNCTION)f.willAppend(this.currentScope().functions);else for(let g=this.scopeStack.length-1;g>=0;g--){let b=this.scopeStack[g];if(f.willAppend(b.var),this.inModule&&b.flags&i.SCOPE_TOP)f.willSet(this.undefinedExports,p);if(b.flags&o)break}return super.declareName(p,u,m)}checkLocalExport(p){return this.parseEffects?.willSet(this.undefinedExports,p.name),super.checkLocalExport(p)}}}var $r=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;function Ra(e){if(!e)throw Error("Assert fail")}function fu(e){return e==="accessor"}function hu(e){return e==="in"||e==="out"}var Rn=1,Ma=2,mu=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 jr(e,t){return K.SCOPE_FUNCTION|(e?K.SCOPE_ASYNC:0)|(t?K.SCOPE_GENERATOR:0)}function yu(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 Ua(e.object)}function gu(e){return e.type==="UnaryExpression"&&(e.operator==="-"||e.operator==="+")&&e.argument.type==="Literal"&&(typeof e.argument.value==="number"||typeof e.argument.value==="bigint")}function Ua(e){if(e.type==="Identifier")return!0;if(e.type!=="MemberExpression")return!1;if(e.computed)return!1;return Ua(e.object)}function Oa(e){return e==="private"||e==="public"||e==="protected"}function xu(e){return Boolean(e.startsExpr)}function bu(e){if(e==null)throw Error(`Unexpected ${e} value.`);return e}function Tu(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 Ga(e){let{dts:t=!1}=e||{},n=!!e?.jsx;return function(r){let i=r.acorn||Fr,o=Kl(i),{tokTypes:s,keywordTypes:p,isIdentifierStart:u,lineBreak:m,isNewLine:f,tokContexts:g,isIdentifierChar:b}=i,{tokTypes:T,tokContexts:P,keywordsRegExp:k,tokenIsLiteralPropertyName:_,tokenIsTemplate:V,tokenIsTSDeclarationStart:G,tokenIsIdentifier:A,tokenIsKeywordOrIdentifier:O,tokenIsTSTypeOperator:I}=o;function re(a,c,l=a.length){for(let d=c;d<l;d++){let y=a.charCodeAt(d);if(f(y))return d<l-1&&y===13&&a.charCodeAt(d+1)===10?d+2:d+1}return-1}if(r=nu(r,o,i),e?.jsx)r=su(i,o,r,typeof e.jsx==="boolean"?{}:e.jsx);r=au(r,o,i);let z=du(r,{acornTokenTypes:s,typeScriptTokenTypes:T,scope:K});class Y extends z{constructor(a,c,l){super(a,c,l);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=(d)=>{this.tsParseModifiers({modified:d,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(u(a))return this.jsx_readWord();if(a==62)return++this.pos,this.finishToken(T.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(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={},l=this.beginParseEffectScope(),d;try{d=a(()=>{throw c})}catch(y){let x=y===c;if(!x&&!(y instanceof SyntaxError))throw this.parseEffects.rollback(l),y;let E={events:this.parseEffects.rollbackWithEvents(l),selected:!1};return x?{node:null,error:null,thrown:!1,aborted:!0,failState:E}:{node:null,error:y,thrown:!0,aborted:!1,failState:E}}return this.parseEffects.commit(l),{node:d,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,l=this.lastTokEndLoc){if(a.end=c,a.loc.end=l,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((l)=>{if(Oa(l))return a.accessibility===l;return!!a[l]})}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 A(this.type)}tsTryParseTypeOrTypePredicateAnnotation(){return this.match(s.colon)?this.tsParseTypeOrTypePredicateAnnotation(s.colon):void 0}tsTryParseGenericAsyncArrowFunction(a,c,l){if(!this.tsMatchLeftRelational())return;let d=this.maybeInArrowParameters;this.maybeInArrowParameters=!0;let y=this.tsTryParseAndCatch(()=>{let x=this.startNodeAt(a,c);return x.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(x),x.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(s.arrow),x});if(this.maybeInArrowParameters=d,!y)return;return this.parseArrowExpression(y,y.params,!0,l)}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 l=a+c.length;if(this.input.slice(a,l)===c){let d=this.input.charCodeAt(l);return!(b(d)||(d&64512)===55296)}return!1}isAbstractConstructorSignature(){return this.ts_isContextual(T.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(),l=this.context,d=this.preValue,y=this.preToken,x=this.isLookahead;try{if(this.createLookaheadState(),this.isLookahead=!0,a!==void 0)for(let E=0;E<a;E++)this.nextToken();else this.nextToken();return this.getCurLookaheadState()}finally{this.setLookaheadTokenState(c),this.context=l,this.preValue=d,this.preToken=y,this.isLookahead=x}}readWord(){let a=this.readWord1(),c=s.name;if(this.keywords.test(a))c=p[a];else if(new RegExp(k).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,l=this.input.indexOf("*/",this.pos+=2);if(l===-1)this.raise(this.pos-2,"Unterminated comment");if(this.pos=l+2,this.options.locations)for(let d,y=c;(d=re(this.input,y,this.pos))>-1;)++this.curLine,y=this.lineStart=d;if(this.isLookahead)return;if(this.options.onComment)this.options.onComment(!0,this.input.slice(c+2,l),c,this.pos,a,this.curPosition())}skipLineComment(a){let c=this.pos,l;if(!this.isLookahead)l=this.options.onComment&&this.curPosition();let d=this.input.charCodeAt(this.pos+=a);while(this.pos<this.input.length&&!f(d))d=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,l,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 l=this.type;if(this.type=a,this.value=c,!this.isLookahead)this.updateContext(l)}resetStartLocation(a,c,l){if(a.start=c,a.loc.start=l,this.options.ranges)a.range[0]=c}isLineTerminator(){return this.eat(s.semi)||super.canInsertSemicolon()}hasFollowingLineBreak(){return _a.lastIndex=this.end,_a.test(this.input)}addExtra(a,c,l,d=!0){if(!a)return;let y=a.extra=a.extra||{};if(d)y[c]=l;else Object.defineProperty(y,c,{enumerable:d,value:l})}isLiteralPropertyName(){return _(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,l){let d=l.type;if(a===d){for(let y=0;y<c;y++)this.next();return!0}else return!1}ts_eatContextualWithState(a,c,l){if(k.test(a)){if(this.ts_isContextualWithState(l,T[a])){for(let d=0;d<c;d++)this.next();return!0}return!1}else{if(!this.isContextualWithState(a,l))return!1;for(let d=0;d<c;d++)this.next();return!0}}canHaveLeadingDecorator(){return this.match(s._class)||this.isAbstractClass()||this.isDeclareClass()}eatContextual(a){if(k.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 l=this.startNodeAtNode(c);l.left=c,l.right=this.parseIdent(a),c=this.finishNode(l,"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 l=c.const?K.BIND_TS_CONST_ENUM:K.BIND_TS_ENUM;return this.checkLValSimple(a.id,l),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(zl),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(Zt),a.body=this.tsParseModuleBlock(),super.exitScope();else super.semicolon();return this.finishNode(a,"TSModuleDeclaration")}tsTryParseDeclare(a){if(this.isLineTerminator())return;let c=this.type,l;if(this.isContextual("let"))c=s._var,l="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,l||this.value,!0);return this.expect(s._const),this.tsParseEnumDeclaration(a,{const:!0,declare:!0})}if(c===T.interface){let d=this.tsParseInterfaceDeclaration(a,{declare:!0});if(d)return d}if(A(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,l,d){let y=[],x=-1;for(;;){if(this.tsIsListTerminator(a))break;x=-1;let E=c();if(E==null)return;if(y.push(E),this.eat(s.comma)){x=this.lastTokStart;continue}if(this.tsIsListTerminator(a))break;if(l)this.expect(s.comma);return}if(d)d.value=x;return y}tsParseDelimitedList(a,c,l){return bu(this.tsParseDelimitedListWorker(a,c,!0,l))}tsParseBracketedList(a,c,l,d,y){if(!d)if(l)this.expect(s.bracketL);else this.expect(s.relational);let x=this.tsParseDelimitedList(a,c,y);if(l)this.expect(s.bracketR);else this.expect(s.relational);return x}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(A(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!==T.asserts)return!1;let a=this.containsEsc;if(this.next(),!A(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 l=this.startNode(),d=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(d){let C=this.tsParseTypeAnnotation(!1);return l.parameterName=d,l.typeAnnotation=C,l.asserts=!1,c.typeAnnotation=this.finishNode(l,"TSTypePredicate"),this.finishNode(c,"TSTypeAnnotation")}let y=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(y&&this.match(s._this)){let C=this.tsParseThisTypeOrThisTypePredicate();if(C.type==="TSThisType")l.parameterName=C,l.asserts=!0,l.typeAnnotation=null,C=this.finishNode(l,"TSTypePredicate");else this.resetStartLocationFromNode(C,l),C.asserts=!0;return c.typeAnnotation=C,this.finishNode(c,"TSTypeAnnotation")}let x=y&&this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!x){if(!y)return this.tsParseTypeAnnotation(!1,c);return l.parameterName=this.parseIdent(),l.asserts=y,l.typeAnnotation=null,c.typeAnnotation=this.finishNode(l,"TSTypePredicate"),this.finishNode(c,"TSTypeAnnotation")}let E=this.tsParseTypeAnnotation(!1);return l.parameterName=x,l.typeAnnotation=E,l.asserts=y,c.typeAnnotation=this.finishNode(l,"TSTypePredicate"),this.finishNode(c,"TSTypeAnnotation")})}tsFillSignature(a,c){let l=a===s.arrow,d="parameters",y="typeAnnotation";if(c.typeParameters=this.tsTryParseTypeParameters(),this.expect(s.parenL),c.parameters=this.tsParseBindingListForSignature(),l)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 l=this.startNode();if(a==="TSConstructorType"){if(l.abstract=!!c,c)this.next();this.next()}return this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(s.arrow,l)),this.finishNode(l,a)}tsParseUnionOrIntersectionType(a,c,l){let d=this.startNode(),y=this.eat(l),x=[];do x.push(c());while(this.eat(l));if(x.length===1&&!y)return x[0];return d.types=x,this.finishNode(d,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(!O(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,l=this.eat(s.ellipsis),d;if(this.tsIsTupleElementLabel()){let y=this.startNode();y.label=this.parseIdent(!0),y.optional=this.eat(s.question),this.expect(s.colon),y.elementType=this.tsParseType(),d=this.finishNode(y,"TSNamedTupleMember")}else{d=this.tsParseType();let y=this.eat(s.question);if(this.eat(s.colon))this.raise(d.start,R.InvalidTupleMemberLabel);if(y){let x=this.startNodeAtNode(d);x.typeAnnotation=d,d=this.finishNode(x,"TSOptionalType")}}if(l){let y=this.startNodeAt(c,a);y.typeAnnotation=d,d=this.finishNode(y,"TSRestType")}return d}tsParseTupleType(){let a=this.startNode();a.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let c=!1;return a.elementTypes.forEach((l)=>{let{type:d}=l;if(c&&d!=="TSRestType"&&d!=="TSOptionalType"&&!(d==="TSNamedTupleMember"&&l.optional))this.raise(l.start,R.OptionalTypeBeforeRequired);if(c||=d==="TSNamedTupleMember"&&l.optional||d==="TSOptionalType",d==="TSRestType")l=l.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(O(a)||a===s._void||a===s._null){let c=a===s._void?"TSVoidKeyword":a===s._null?"TSNullKeyword":Tu(this.value);if(c!==void 0&&this.lookaheadCharCode()!==46){let l=this.startNode();return this.next(),this.finishNode(l,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(){Ra(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(),A(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 l=this.tsTryParseTypeAnnotation();if(l)a.typeAnnotation=l;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 l={value:-1};if(c.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,a),!1,!0,l),c.params.length===0)this.raise(this.start,R.EmptyTypeParameters);if(l.value!==-1)this.addExtra(c,"trailingComma",l.value);return this.finishNode(c,"TSTypeParameterDeclaration")}tsTryParseTypeParameters(a){if(this.tsMatchLeftRelational())return this.tsParseTypeParameters(a)}tsTryParse(a){let c=this.beginParseEffectScope(),l;try{l=a()}catch(d){throw this.parseEffects.rollback(c),d}if(l!==void 0&&l!==!1)return this.parseEffects.commit(c),l;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 l=this.value;if(a.indexOf(l)!==-1&&!this.containsEsc){if(c&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return l}return}tsParseModifiersByMap({modified:a,map:c}){for(let l of Object.keys(c))a[l]=c[l]}tsParseModifiers({modified:a,allowedModifiers:c,disallowedModifiers:l,stopOnStartOfClassStaticBlock:d,errorTemplate:y=R.InvalidModifierOnTypeMember}){let x={},E=(S,v,w,N)=>{if(v===w&&a[N])this.raise(S.column,R.InvalidModifiersOrder({orderedModifiers:[w,N]}))},C=(S,v,w,N)=>{if(a[w]&&v===N||a[N]&&v===w)this.raise(S.column,R.IncompatibleModifiers({modifiers:[w,N]}))};for(;;){let S=this.startLoc,v=this.tsParseModifier(c.concat(l??[]),d);if(!v)break;if(Oa(v))if(a.accessibility)this.raise(this.start,R.DuplicateAccessibilityModifier());else E(S,v,v,"override"),E(S,v,v,"static"),E(S,v,v,"readonly"),E(S,v,v,"accessor"),x.accessibility=v,a.accessibility=v;else if(hu(v))if(a[v])this.raise(this.start,R.DuplicateModifier({modifier:v}));else E(S,v,"in","out"),x[v]=v,a[v]=!0;else if(fu(v))if(a[v])this.raise(this.start,R.DuplicateModifier({modifier:v}));else C(S,v,"accessor","readonly"),C(S,v,"accessor","override"),x[v]=v,a[v]=!0;else if(v==="const")if(a[v])this.raise(this.start,R.DuplicateModifier({modifier:v}));else x[v]=v,a[v]=!0;else if(Object.hasOwnProperty.call(a,v))this.raise(this.start,R.DuplicateModifier({modifier:v}));else E(S,v,"static","readonly"),E(S,v,"static","override"),E(S,v,"override","readonly"),E(S,v,"abstract","override"),C(S,v,"declare","override"),C(S,v,"static","abstract"),x[v]=v,a[v]=!0;if(l?.includes(v))this.raise(this.start,y)}return x}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,l,d){if(!e?.jsx&&this.tsMatchLeftRelational())return this.tsParseTypeAssertion();else return super.parseMaybeUnary(a,c,l,d)}tsParseTypeAssertion(){if(n)this.raise(this.start,R.ReservedTypeAssertion);let a=this.tryParse(()=>{let c=this.startNode(),l=this.tsTryNextParseConstantContext();return c.typeAnnotation=l||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,l=this.tsParseDelimitedList("HeritageClauseElement",()=>{let d=this.startNode();if(d.expression=this.tsParseEntityName(),this.tsMatchLeftRelational())d.typeParameters=this.tsParseTypeArguments();return this.finishNode(d,"TSExpressionWithTypeArguments")});if(!l.length)this.raise(c,R.EmptyHeritageClauseType({token:a}));return l}tsParseTypeMemberSemicolon(){if(!this.eat(s.comma)&&!this.isLineTerminator())this.expect(s.semi)}tsTryParseAndCatch(a){let c=this.tryParse((l)=>a()||l());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 l=a;if(this.match(s.parenL)||this.tsMatchLeftRelational()){if(c)this.raise(a.start,R.ReadonlyForMethodSignature);let d=l;if(d.kind&&this.tsMatchLeftRelational())this.raise(this.start,R.AccesorCannotHaveTypeParameters);this.tsFillSignature(s.colon,d),this.tsParseTypeMemberSemicolon();let y="parameters",x="typeAnnotation";if(d.kind==="get"){if(d[y].length>0){if(this.raise(this.start,"A 'get' accesor must not have any formal parameters."),this.isThisParam(d[y][0]))this.raise(this.start,R.AccesorCannotDeclareThisParameter)}}else if(d.kind==="set"){if(d[y].length!==1)this.raise(this.start,"A 'get' accesor must not have any formal parameters.");else{let E=d[y][0];if(this.isThisParam(E))this.raise(this.start,R.AccesorCannotDeclareThisParameter);if(E.type==="Identifier"&&E.optional)this.raise(this.start,R.SetAccesorCannotHaveOptionalParameter);if(E.type==="RestElement")this.raise(this.start,R.SetAccesorCannotHaveRestParameter)}if(d[x])this.raise(d[x].start,R.SetAccesorCannotHaveReturnType)}else d.kind="method";return this.finishNode(d,"TSMethodSignature")}else{let d=l;if(c)d.readonly=!0;let y=this.tsTryParseTypeAnnotation();if(y)d.typeAnnotation=y;return this.tsParseTypeMemberSemicolon(),this.finishNode(d,"TSPropertySignature")}}tsParseTypeMember(){let a=this.startNode();if(this.match(s.parenL)||this.tsMatchLeftRelational())return this.tsParseSignatureMember("TSCallSignatureDeclaration",a);if(this.match(s._new)){let l=this.startNode();if(this.next(),this.match(s.parenL)||this.tsMatchLeftRelational())return this.tsParseSignatureMember("TSConstructSignatureDeclaration",a);else return a.key=this.createIdentifier(l,"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 l=[];while(!this.tsIsListTerminator(a))l.push(c());return l}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(A(this.type)){a.id=this.parseIdent(),this.checkLValSimple(a.id,K.BIND_TS_INTERFACE);let d=this.currentScope();this.maybeExportDefined(d,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 l=this.startNode();return l.body=this.tsParseInterfaceBody(),a.body=this.finishNode(l,"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 G(this.type)}tsParseExpressionStatement(a,c){switch(c.name){case"declare":{let l=this.tsTryParseDeclare(a);if(l)return l.declare=!0,l;break}case"global":if(this.match(s.braceL)){this.enterScope(Zt);let l=a;return l.global=!0,l.id=c,l.body=this.tsParseModuleBlock(),super.exitScope(),this.finishNode(l,"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(),l=this.isLet();if(A(a)){if(c&&!this.containsEsc||l)return!1;if((a===T.type||a===T.interface)&&!this.containsEsc){let x=this.lookahead();if(A(x.type)&&!this.isContextualWithState("from",x)||x.type===s.braceL)return!1}}else if(!this.match(s._default))return!1;let d=this.nextTokenStart(),y=this.isUnparsedContextual(d,"from");if(this.input.charCodeAt(d)===44||A(this.type)&&y)return!0;if(this.match(s._default)&&y){let x=this.input.charCodeAt(this.nextTokenStartSince(d+4));return x===34||x===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 l=this.startNode();this.tsParseModuleOrNamespaceDeclaration(l,!0),a.body=l}else this.enterScope(Zt),a.body=this.tsParseModuleBlock(),super.exitScope();return this.finishNode(a,"TSModuleDeclaration")}checkLValSimple(a,c=K.BIND_NONE,l){while(a.type==="TSNonNullExpression"||a.type==="TSAsExpression"||a.type==="TSSatisfiesExpression"||a.type==="TSTypeAssertion")a=a.expression;return super.checkLValSimple(a,c,l)}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(T.interface)&&this.lookahead().type!==s.dot){let l=this.startNode();return this.next(),this.finishNode(l,"TSIntrinsicKeyword")}return this.tsParseType()}),this.semicolon(),this.finishNode(a,"TSTypeAliasDeclaration")}tsParseDeclaration(a,c,l){switch(c){case"abstract":if(this.tsCheckLineTerminator(l)&&(this.match(s._class)||A(this.type)))return this.tsParseAbstractDeclaration(a);break;case"module":if(this.tsCheckLineTerminator(l)){if(this.match(s.string))return this.tsParseAmbientExternalModuleDeclaration(a);else if(A(this.type))return this.tsParseModuleOrNamespaceDeclaration(a)}break;case"namespace":if(this.tsCheckLineTerminator(l)&&A(this.type))return this.tsParseModuleOrNamespaceDeclaration(a);break;case"type":if(this.tsCheckLineTerminator(l)&&A(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 l=this.tsParseModuleReference();if(a.importKind==="type"&&l.type!=="TSExternalModuleReference")this.raise(l.start,R.ImportAliasHasImportType);return a.moduleReference=l,super.semicolon(),this.finishNode(a,"TSImportEqualsDeclaration")}isExportDefaultSpecifier(){if(this.tsIsDeclarationStart())return!1;let{type:a}=this;if(A(a)){if(this.isContextual("async")||this.isContextual("let"))return!1;if((a===T.type||a===T.interface)&&!this.containsEsc){let d=this.lookahead();if(A(d.type)&&!this.isContextualWithState("from",d)||d.type===s.braceL)return!1}}else if(!this.match(s._default))return!1;let c=this.nextTokenStart(),l=this.isUnparsedContextual(c,"from");if(this.input.charCodeAt(c)===44||A(this.type)&&l)return!0;if(this.match(s._default)&&l){let d=this.input.charCodeAt(this.nextTokenStartSince(c+4));return d===34||d===39}return!1}parseTemplate({isTagged:a=!1}={}){let c=this.startNode();this.next(),c.expressions=[];let l=this.parseTemplateElement({isTagged:a});c.quasis=[l];while(!l.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(l=this.parseTemplateElement({isTagged:a}))}return this.next(),this.finishNode(c,"TemplateLiteral")}parseFunction(a,c,l,d,y){if(this.initFunction(a),this.ecmaVersion>=9||this.ecmaVersion>=6&&!d){if(this.type===s.star&&c&Ma)this.unexpected();a.generator=this.eat(s.star)}if(this.ecmaVersion>=8)a.async=!!d;if(c&Rn)a.id=c&mu&&this.type!==s.name?null:this.parseIdent();let x=this.yieldPos,E=this.awaitPos,C=this.awaitIdentPos,S=this.maybeInArrowParameters;if(this.maybeInArrowParameters=!1,this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(jr(a.async,a.generator)),!(c&Rn))a.id=this.type===s.name?this.parseIdent():null;this.parseFunctionParams(a);let v=c&Rn;if(this.parseFunctionBody(a,l,!1,y,{isFunctionDeclaration:v}),v&&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=x,this.awaitPos=E,this.awaitIdentPos=C,c&Rn&&a.id&&!(c&Ma))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=S,this.finishNode(a,v?"FunctionDeclaration":"FunctionExpression")}parseFunctionBody(a,c=!1,l=!1,d=!1,y){if(this.match(s.colon))a.returnType=this.tsParseTypeOrTypePredicateAnnotation(s.colon);let x=y?.isFunctionDeclaration?"TSDeclareFunction":y?.isClassMethod?"TSDeclareMethod":void 0;if(x&&!this.match(s.braceL)&&this.isLineTerminator())return this.exitScope(),this.finishNode(a,x);if(x==="TSDeclareFunction"&&this.isAmbientContext){if(this.raise(a.start,R.DeclareFunctionHasImplementation),a.declare)return super.parseFunctionBody(a,c,l,!1),this.finishNode(a,x)}return super.parseFunctionBody(a,c,l,d),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 E=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(E)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 l=this.start,d=this.startLoc,y=this.type===s._import;if(a.callee=this.parseSubscripts(this.parseExprAtom(),l,d,!0,!1),y&&a.callee.type==="ImportExpression")this.raise(l,"Cannot use new with import()");let{callee:x}=a;if(x.type==="TSInstantiationExpression"&&!x.extra?.parenthesized)a.typeArguments=x.typeArguments,a.callee=x.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,l,d,y){if(s._in.binop>d&&!this.hasPrecedingLineBreak()){let x;if(this.isContextual("as"))x="TSAsExpression";if(this.isContextual("satisfies"))x="TSSatisfiesExpression";if(x){let E=this.startNodeAt(c,l);E.expression=a;let C=this.tsTryNextParseConstantContext();if(C)E.typeAnnotation=C;else E.typeAnnotation=this.tsNextThenParseType();return this.finishNode(E,x),this.reScan_lt_gt(),this.parseExprOp(E,c,l,d,y)}}return super.parseExprOp(a,c,l,d,y)}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",A(c.type)||this.match(s.star)||this.match(s.braceL)){let l=this.lookahead(2);if(l.type!==s.comma&&!this.isContextualWithState("from",l)&&l.type!==s.eq&&this.ts_eatContextualWithState("type",1,c))this.importOrExportOuterKind="type",a.importKind="type",c=this.lookahead(),l=this.lookahead(2);if(A(c.type)&&l.type===s.eq){this.next();let d=this.tsParseImportEqualsDeclaration(a);return this.importOrExportOuterKind="value",d}}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(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 l=this.lookahead();if(this.ts_eatWithState(s._import,2,l)){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 d=this.tsParseImportEqualsDeclaration(a,!0);return this.importOrExportOuterKind=void 0,d}else if(this.ts_eatWithState(s.eq,2,l)){let d=a;return d.expression=this.parseExpression(),this.semicolon(),this.importOrExportOuterKind=void 0,this.finishNode(d,"TSExportAssignment")}else if(this.ts_eatContextualWithState("as",2,l)){let d=a;return this.expectContextual("namespace"),d.id=this.parseIdent(),this.semicolon(),this.importOrExportOuterKind=void 0,this.finishNode(d,"TSNamespaceExportDeclaration")}else{let d=this.lookahead(2).type;if(this.ts_isContextualWithState(l,T.type)&&(d===s.braceL||d===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 y of a.specifiers)if(this.checkUnreserved(y.local),this.checkLocalExport(y.local),y.local.type==="Literal")this.raise(y.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,l){if(!a)return;if(typeof c!=="string")c=c.type==="Identifier"?c.name:c.value;a[c]=!0}parseMaybeDefault(a,c,l){let d=super.parseMaybeDefault(a,c,l);if(d.type==="AssignmentPattern"&&d.typeAnnotation&&d.right.start<d.typeAnnotation.start)this.raise(d.typeAnnotation.start,R.TypeAnnotationAfterAssign);return d}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 l=0;l<a.length;l++){let d=a[l];if(d?.type==="TSTypeCastExpression")a[l]=this.typeCastToParameter(d)}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,l){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(A(this.type)){let d=this.potentialArrowAt===this.start,y=this.start,x=this.startLoc,E=this.containsEsc,C=this.parseIdent(!1);if(this.ecmaVersion>=8&&!E&&C.name==="async"&&!this.canInsertSemicolon()&&this.eat(s._function))return this.overrideContext(g.f_expr),this.parseFunction(this.startNodeAt(y,x),0,!1,!0,c);if(d&&!this.canInsertSemicolon()){if(this.eat(s.arrow))return this.parseArrowExpression(this.startNodeAt(y,x),[C],!1,c);if(this.ecmaVersion>=8&&C.name==="async"&&this.type===s.name&&!E&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc)){if(C=this.parseIdent(!1),this.canInsertSemicolon()||!this.eat(s.arrow))this.unexpected();return this.parseArrowExpression(this.startNodeAt(y,x),[C],!0,c)}}return C}else return super.parseExprAtom(a,c,l)}parseExprAtomDefault(){if(A(this.type)){let a=this.potentialArrowAt===this.start,c=this.containsEsc,l=this.parseIdent();if(!c&&l.name==="async"&&!this.canInsertSemicolon()){let{type:d}=this;if(d===s._function)return this.next(),this.parseFunction(this.startNodeAtNode(l),void 0,!0,!0);else if(A(d))if(this.lookaheadCharCode()===61){let y=this.parseIdent(!1);if(this.canInsertSemicolon()||!this.eat(s.arrow))this.unexpected();return this.parseArrowExpression(this.startNodeAtNode(l),[y],!0)}else return l}if(a&&this.match(s.arrow)&&!this.canInsertSemicolon())return this.next(),this.parseArrowExpression(this.startNodeAtNode(l),[l],!1);return l}else this.unexpected()}parseIdentNode(){let a=this.startNode();if(O(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,l=!1){let{isAmbientContext:d}=this;this.next(),super.parseVar(a,!1,c,l||d),this.semicolon();let y=this.finishNode(a,"VariableDeclaration");if(!d)return y;for(let{id:x,init:E}of y.declarations){if(!E)continue;if(c!=="const"||!!x.typeAnnotation)this.raise(E.start,R.InitializerNotAllowedInAmbientContext);else if(E.type!=="Literal"&&(E.type!=="TemplateLiteral"||E.expressions.length>0)&&!gu(E)&&!yu(E))this.raise(E.start,R.ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference)}return y}parseStatement(a,c,l){if(this.match(T.at))this.parseDecorators(!0);if(this.match(s._const)&&this.isLookaheadContextual("enum")){let d=this.startNode();return this.expect(s._const),this.tsParseEnumDeclaration(d,{const:!0})}if(this.ts_isContextual(T.enum))return this.tsParseEnumDeclaration(this.startNode());if(this.ts_isContextual(T.interface)){let d=this.tsParseInterfaceDeclaration(this.startNode());if(d)return d}return super.parseStatement(a,c,l)}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(T.at))return!0;return super.shouldParseExportStatement()}parseConditional(a,c,l,d,y){if(this.eat(s.question)){let x=this.startNodeAt(c,l);return x.test=a,x.consequent=this.parseMaybeAssign(),this.expect(s.colon),x.alternate=this.parseMaybeAssign(d),this.finishNode(x,"ConditionalExpression")}return a}parseMaybeConditional(a,c){let l=this.start,d=this.startLoc,y=this.parseExprOps(a,c);if(this.checkExpressionErrors(c))return y;if(!this.maybeInArrowParameters||!this.match(s.question))return this.parseConditional(y,l,d,a,c);let x=this.tryParse(()=>this.parseConditional(y,l,d,a,c));if(!x.node){if(x.error)this.setOptionalParametersError(c,x.error);return y}return x.node}parseParenItem(a){let c=this.start,l=this.startLoc;if(a=super.parseParenItem(a),this.eat(s.question))a.optional=!0,this.resetEndLocation(a);if(this.match(s.colon)){let d=this.startNodeAt(c,l);return d.expression=a,d.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(d,"TSTypeCastExpression")}return a}parseExportDeclaration(a){if(!this.isAmbientContext&&this.ts_isContextual(T.declare))return this.tsInAmbientContext(()=>this.parseExportDeclaration(a));let c=this.start,l=this.startLoc,d=this.eatContextual("declare");if(d&&(this.ts_isContextual(T.declare)||!this.shouldParseExportStatement()))this.raise(this.start,R.ExpectedAmbientAfterExportDeclare);let x=A(this.type)&&this.tsTryParseExportDeclaration()||this.parseStatement(null);if(!x)return null;if(x.type==="TSInterfaceDeclaration"||x.type==="TSTypeAliasDeclaration"||d)a.exportKind="type";if(d)this.resetStartLocation(x,c,l),x.declare=!0;return x}parseClassId(a,c){if(!c&&this.isContextual("implements"))return;super.parseClassId(a,c);let l=this.tsTryParseTypeParameters(this.tsParseClassTypeParameterModifiers.bind(this));if(l)a.typeParameters=l}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:l}=a;this.raise(this.start,R.AbstractPropertyHasInitializer({propertyName:l.type==="Identifier"&&!a.computed?l.name:`[${this.input.slice(l.start,l.end)}]`}))}}return super.parseClassField(a)}parseClassMethod(a,c,l,d){let y=a.kind==="constructor",x=a.key.type==="PrivateIdentifier",E=this.tsTryParseTypeParameters(this.tsParseConstModifier);if(x){if(E)a.typeParameters=E;if(a.accessibility)this.raise(a.start,R.PrivateMethodsHasAccessibility({modifier:a.accessibility}))}else if(E&&y)this.raise(E.start,R.ConstructorHasTypeParameters);let{declare:C=!1,kind:S}=a;if(C&&(S==="get"||S==="set"))this.raise(a.start,R.DeclareAccessor({kind:S}));if(E)a.typeParameters=E;let v=a.key;if(a.kind==="constructor"){if(c)this.raise(v.start,"Constructor can't be a generator");if(l)this.raise(v.start,"Constructor can't be an async method")}else if(a.static&&Ia(a,"prototype"))this.raise(v.start,"Classes may not have a static property named prototype");let w=a.value=this.parseMethod(c,l,d,!0,a);if(a.kind==="get"&&w.params.length!==0)this.raiseRecoverable(w.start,"getter should have no params");if(a.kind==="set"&&w.params.length!==1)this.raiseRecoverable(w.start,"setter should have exactly one param");if(a.kind==="set"&&w.params[0].type==="RestElement")this.raiseRecoverable(w.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(),l="",d=!1,y=!1,x="method",E=!1,C=["declare","private","public","protected","accessor","override","abstract","readonly","static"],S=this.tsParseModifiers({modified:c,allowedModifiers:C,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:R.InvalidModifierOnTypeParameterPositions});E=Boolean(S.static);let v=()=>{if(this.tsIsStartOfStaticBlocks()){if(this.next(),this.next(),this.tsHasSomeModifiers(c,C))this.raise(this.start,R.StaticBlockCannotHaveModifier);if(this.ecmaVersion>=13)return super.parseClassStaticBlock(c),c}else{let w=this.tsTryParseIndexSignature(c);if(w){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 w}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=E,E){if(!(this.isClassElementNameStart()||this.type===s.star))l="static"}if(!l&&this.ecmaVersion>=8&&this.eatContextual("async"))if((this.isClassElementNameStart()||this.type===s.star)&&!this.canInsertSemicolon())y=!0;else l="async";if(!l&&(this.ecmaVersion>=9||!y)&&this.eat(s.star))d=!0;if(!l&&!y&&!d){let N=this.value;if(this.eatContextual("get")||this.eatContextual("set"))if(this.isClassElementNameStart())x=N;else l=N}if(l)c.computed=!1,c.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),c.key.name=l,this.finishNode(c.key,"Identifier");else this.parseClassElementName(c);if(this.parsePostMemberNameModifiers(c),this.isClassMethod()||this.ecmaVersion<13||this.type===s.parenL||x!=="method"||d||y){let N=!c.static&&Ia(c,"constructor"),D=N&&a;if(N&&x!=="method")this.raise(c.key.start,"Constructor can't have get/set modifier");c.kind=N?"constructor":x,this.parseClassMethod(c,d,y,D)}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 l=this.tsTryParseTypeAnnotation();if(l)a.id.typeAnnotation=l,this.resetEndLocation(a.id)}parseArrowExpression(a,c,l,d){if(this.match(s.colon))a.returnType=this.tsParseTypeAnnotation();let y=this.yieldPos,x=this.awaitPos,E=this.awaitIdentPos;this.enterScope(jr(l,!1)|K.SCOPE_ARROW),this.initFunction(a);let C=this.maybeInArrowParameters;if(this.ecmaVersion>=8)a.async=!!l;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,d),this.yieldPos=y,this.awaitPos=x,this.awaitIdentPos=E,this.maybeInArrowParameters=C,this.finishNode(a,"ArrowFunctionExpression")}parseYield(a){if(!this.yieldPos)this.yieldPos=this.start;let c=this.startNode();this.next();let l=this.tsMatchLeftRelational();if(!(!this.match(s.semi)&&!this.canInsertSemicolon()&&(this.match(s.star)||this.type.startsExpr||l)))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,l){if(this.isContextual("yield"))if(this.inGenerator)return this.parseYield(a);else this.exprAllowed=!1;let d=!1,y=-1,x=-1,E=-1;if(c)y=c.parenthesizedAssign,x=c.trailingComma,E=c.doubleProto,c.parenthesizedAssign=c.trailingComma=-1;else c=new en,d=!0;let C=this.start,S=this.startLoc;if(this.type===s.parenL||A(this.type))this.potentialArrowAt=this.start,this.potentialArrowInForAwait=a==="await";let v=this.parseMaybeConditional(a,c);if(l)v=l.call(this,v,C,S);if(this.type.isAssign){let w=this.startNodeAt(C,S);if(w.operator=this.value,this.type===s.eq)v=this.toAssignable(v,!0,c,!0);if(!d)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(w.left=v,this.next(),w.right=this.parseMaybeAssign(a),E>-1)c.doubleProto=E;return this.finishNode(w,"AssignmentExpression")}else if(d)this.checkExpressionErrors(c,!0);if(y>-1)c.parenthesizedAssign=y;if(x>-1)c.trailingComma=x;return v}parseMaybeAssign(a,c,l){let d,y;if(e?.jsx&&(this.matchJsx("jsxTagStart")||this.tsMatchLeftRelational())){if(d=this.tryParse(()=>this.parseMaybeAssignOrigin(a,c,l)),!d.error)return d.node;let C=this.context,S=C[C.length-1],v=C[C.length-2];if(S===o.tokContexts.tc_oTag&&v===o.tokContexts.tc_expr)this.parseEffects.pop(C),this.parseEffects.pop(C);else if(S===o.tokContexts.tc_oTag||S===o.tokContexts.tc_expr)this.parseEffects.pop(C)}if(!d?.error&&!this.tsMatchLeftRelational())return this.parseMaybeAssignOrigin(a,c,l);let x,E=this.tryParse((C)=>{x=this.tsParseTypeParameters(this.tsParseConstModifier);let S=this.parseMaybeAssignOrigin(a,c,l);if(S.type!=="ArrowFunctionExpression"||S.extra?.parenthesized)C();if(x?.params.length!==0)this.resetStartLocationFromNode(S,x);return S.typeParameters=x,S});if(!E.error&&!E.aborted){if(x)this.reportReservedArrowTypeParam(x);return E.node}if(!d){if(Ra(!0),y=this.tryParse(()=>this.parseMaybeAssignOrigin(a,c,l)),!y.error)return y.node}if(d?.thrown)throw this.selectTryParseResult(d),d.error;if(E.thrown)throw this.selectTryParseResult(E),E.error;if(y?.thrown)throw this.selectTryParseResult(y),y.error;throw d?.error||E.error||y?.error}parseAssignableListItem(a){let c=[];while(this.match(T.at))c.push(this.parseDecorator());let l=this.start,d=this.startLoc,y,x=!1,E=!1;if(a!==void 0){let v={};if(this.tsParseModifiers({modified:v,allowedModifiers:["public","private","protected","override","readonly"]}),y=v.accessibility,E=v.override,x=v.readonly,a===!1&&(y||x||E))this.raise(d.column,R.UnexpectedParameterModifier)}let C=this.parseMaybeDefault(l,d);this.parseBindingListItem(C);let S=this.parseMaybeDefault(C.start,C.loc.start,C);if(c.length)S.decorators=c;if(y||x||E){let v=this.startNodeAt(l,d);if(y)v.accessibility=y;if(x)v.readonly=x;if(E)v.override=E;if(S.type!=="Identifier"&&S.type!=="AssignmentPattern")this.raise(v.start,R.UnsupportedParameterPropertyKind);return v.parameter=S,this.finishNode(v,"TSParameterProperty")}return S}checkLValInnerPattern(a,c=K.BIND_NONE,l){switch(a.type){case"TSParameterProperty":this.checkLValInnerPattern(a.parameter,c,l);break;default:{super.checkLValInnerPattern(a,c,l);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 l=a.properties.length-1;return a.properties.every((d,y)=>d.type!=="ObjectMethod"&&(y===l||d.type!=="SpreadElement")&&this.isAssignable(d))}case"Property":case"ObjectProperty":return this.isAssignable(a.value);case"SpreadElement":return this.isAssignable(a.argument);case"ArrayExpression":return a.elements.every((l)=>l===null||this.isAssignable(l));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,l=new en,d=!1){switch(a.type){case"ParenthesizedExpression":return this.toAssignableParenthesizedExpression(a,c,l,d);case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":if(c);else this.raise(a.start,R.UnexpectedTypeCastInParameter);let y=this.toAssignable(a.expression,c,l,d);if(d)return a.expression=y,a;return y;case"MemberExpression":break;case"AssignmentExpression":if(!c&&a.left.type==="TSTypeCastExpression")a.left=this.typeCastToParameter(a.left);return super.toAssignable(a,c,l);case"TSTypeCastExpression":return this.typeCastToParameter(a);default:return super.toAssignable(a,c,l)}return a}toAssignableParenthesizedExpression(a,c,l,d=!1){switch(a.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":let y=this.toAssignable(a.expression,c,l,d);if(d)return a.expression=y,a;return y;default:return super.toAssignable(a,c,l)}}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((l)=>this.isAssignable(l,!0));else c=!this.canInsertSemicolon();if(c){if(this.match(s.colon)){let l=this.tryParse((d)=>{let y=this.tsParseTypeOrTypePredicateAnnotation(s.colon);if(this.canInsertSemicolon()||!this.match(s.arrow))d();return y});if(l.aborted)return this.shouldParseArrowReturnType=void 0,!1;if(!l.thrown)this.shouldParseArrowReturnType=l.node}if(!this.match(s.arrow))return this.shouldParseArrowReturnType=void 0,!1;return!0}return this.shouldParseArrowReturnType=void 0,c}parseParenArrowList(a,c,l,d){let y=this.startNodeAt(a,c);return y.returnType=this.shouldParseArrowReturnType,this.shouldParseArrowReturnType=void 0,this.parseArrowExpression(y,l,!1,d)}parseParenAndDistinguishExpression(a,c){let l=this.start,d=this.startLoc,y,x=this.ecmaVersion>=8;if(this.ecmaVersion>=6){let E=this.maybeInArrowParameters;this.maybeInArrowParameters=!0,this.next();let C=this.start,S=this.startLoc,v=[],w=!0,N=!1,D=new en,H=this.yieldPos,U=this.awaitPos,Z;this.yieldPos=0,this.awaitPos=0;while(this.type!==s.parenR)if(w?w=!1:this.expect(s.comma),x&&this.afterTrailingComma(s.parenR,!0)){N=!0;break}else if(this.type===s.ellipsis){if(Z=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,D,this.parseParenItem));let ae=this.lastTokEnd,ie=this.lastTokEndLoc;if(this.expect(s.parenR),this.maybeInArrowParameters=E,a&&this.shouldParseArrow(v)&&this.eat(s.arrow))return this.checkPatternErrors(D,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=H,this.awaitPos=U,this.parseParenArrowList(l,d,v,c);if(!v.length||N)this.unexpected(this.lastTokStart);if(Z)this.unexpected(Z);if(this.checkExpressionErrors(D,!0),this.yieldPos=H||this.yieldPos,this.awaitPos=U||this.awaitPos,v.length>1)y=this.startNodeAt(C,S),y.expressions=v,this.finishNodeAt(y,"SequenceExpression",ae,ie);else y=v[0]}else y=this.parseParenExpression();if(this.options.preserveParens){let E=this.startNodeAt(l,d);return E.expression=y,this.finishNode(E,"ParenthesizedExpression")}else return y}parseTaggedTemplateExpression(a,c,l,d){let y=this.startNodeAt(c,l);if(y.tag=a,y.quasi=this.parseTemplate({isTagged:!0}),d)this.raise(c,"Tagged Template Literals are not allowed in optionalChain.");return this.finishNode(y,"TaggedTemplateExpression")}shouldParseAsyncArrow(){if(this.match(s.colon)){let a=this.tryParse((c)=>{let l=this.tsParseTypeOrTypePredicateAnnotation(s.colon);if(this.canInsertSemicolon()||!this.match(s.arrow))c();return l});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,l,d){let y=this.startNodeAt(a,c);return y.returnType=this.shouldParseAsyncArrowReturnType,this.shouldParseAsyncArrowReturnType=void 0,this.parseArrowExpression(y,l,!0,d)}parseExprList(a,c,l,d){let y=[],x=!0;while(!this.eat(a)){if(!x){if(this.expect(s.comma),c&&this.afterTrailingComma(a))break}else x=!1;let E;if(l&&this.type===s.comma)E=null;else if(this.type===s.ellipsis){if(E=this.parseSpread(d),this.maybeInArrowParameters&&this.match(s.colon))E.typeAnnotation=this.tsParseTypeAnnotation();if(d&&this.type===s.comma&&d.trailingComma<0)d.trailingComma=this.start}else E=this.parseMaybeAssign(!1,d,this.parseParenItem);y.push(E)}return y}parseMaybeDecoratorArguments(a){let c=this.tsMatchLeftRelational()||this.match(s.bitShift)?this.tsParseTypeArgumentsInExpression():void 0;if(this.eat(s.parenL)){let l=this.startNodeAtNode(a);if(l.callee=a,l.arguments=this.parseExprList(s.parenR,!1),c)l.typeArguments=c;return this.finishNode(l,"CallExpression")}if(c){let l=this.startNodeAtNode(a);return l.expression=a,l.typeArguments=c,this.finishNode(l,"TSInstantiationExpression")}return a}parseSubscript(a,c,l,d,y,x,E){let C=x;if(!this.hasPrecedingLineBreak()&&this.value==="!"&&this.match(s.prefix)){this.exprAllowed=!1,this.next();let D=this.startNodeAt(c,l);return D.expression=a,a=this.finishNode(D,"TSNonNullExpression"),a}let S=!1;if(this.match(s.questionDot)&&this.lookaheadCharCode()===60){if(d)return a;a.optional=!0,C=S=!0,this.next()}if(this.tsMatchLeftRelational()||this.match(s.bitShift)){let D,H=this.tsTryParseAndCatch(()=>{if(!d&&this.atPossibleAsyncArrow(a)){let ie=this.tsTryParseGenericAsyncArrowFunction(c,l,E);if(ie)return a=ie,a}let U=this.tsParseTypeArgumentsInExpression();if(!U)return a;if(S&&!this.match(s.parenL))return D=this.curPosition(),a;if(V(this.type)||this.type===s.backQuote){let ie=this.parseTaggedTemplateExpression(a,c,l,C);return ie.typeArguments=U,ie}if(!d&&this.eat(s.parenL)){let ie=new en,F=this.startNodeAt(c,l);if(F.callee=a,F.arguments=this.parseExprList(s.parenR,this.ecmaVersion>=8,!1,ie),this.tsCheckForInvalidTypeCasts(F.arguments),F.typeArguments=U,C)F.optional=S;return this.checkExpressionErrors(ie,!0),a=this.finishNode(F,"CallExpression"),a}let Z=this.type;if(this.tsMatchRightRelational()||Z===s.bitShift||Z!==s.parenL&&xu(Z)&&!this.hasPrecedingLineBreak())return;let ae=this.startNodeAt(c,l);return ae.expression=a,ae.typeArguments=U,this.finishNode(ae,"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 v=this.ecmaVersion>=11,w=v&&this.eat(s.questionDot);if(d&&w)this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");let N=this.eat(s.bracketL);if(N||w&&this.type!==s.parenL&&this.type!==s.backQuote||this.eat(s.dot)){let D=this.startNodeAt(c,l);if(D.object=a,N)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=!!N,v)D.optional=w;a=this.finishNode(D,"MemberExpression")}else if(!d&&this.eat(s.parenL)){let D=this.maybeInArrowParameters;this.maybeInArrowParameters=!0;let H=new en,U=this.yieldPos,Z=this.awaitPos,ae=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;let ie=this.parseExprList(s.parenR,this.ecmaVersion>=8,!1,H);if(y&&!w&&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=U,this.awaitPos=Z,this.awaitIdentPos=ae,a=this.parseSubscriptAsyncArrow(c,l,ie,E)}else{this.checkExpressionErrors(H,!0),this.yieldPos=U||this.yieldPos,this.awaitPos=Z||this.awaitPos,this.awaitIdentPos=ae||this.awaitIdentPos;let F=this.startNodeAt(c,l);if(F.callee=a,F.arguments=ie,v)F.optional=w;a=this.finishNode(F,"CallExpression")}this.maybeInArrowParameters=D}else if(this.type===s.backQuote){if(w||C)this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");let D=this.startNodeAt(c,l);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 l=a.kind==="get"?0:1,d=a.value.params[0];if(l=d&&this.isThisParam(d)?l+1:l,a.value.params.length!==l){let x=a.value.start;if(a.kind==="get")this.raiseRecoverable(x,"getter should have no params");else this.raiseRecoverable(x,"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,l,d,y,x,E,C){if(this.tsMatchLeftRelational()){if(c)this.unexpected();a.kind="init",a.method=!0;let S=this.tsTryParseTypeParameters(this.tsParseConstModifier);if(a.value=this.parseMethod(l,d),S)a.value.typeParameters=S;return}return super.parsePropertyValue(a,c,l,d,y,x,E,C)}parseProperty(a,c){if(!a){let l=[];if(this.match(T.at))while(this.match(T.at))l.push(this.parseDecorator());let d=super.parseProperty(a,c);if(d.type==="SpreadElement"){if(l.length)this.raise(d.start,Mn.SpreadElementDecorator)}if(l.length)d.decorators=l,l=[];return d}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 l=this.tsTryParseTypeAnnotation();if(l)a.typeAnnotation=l,this.resetEndLocation(a);return this.expect(s.parenR),a}parseClass(a,c){let l=this.inAbstractClass;this.inAbstractClass=!!a.abstract;try{this.next(),this.takeDecorators(a);let d=this.strict;this.strict=!0,this.parseClassId(a,c),this.parseClassSuper(a);let y=this.enterClassBody(),x=this.startNode(),E=!1;x.body=[];let C=[];this.expect(s.braceL);while(this.type!==s.braceR){if(this.match(T.at)){C.push(this.parseDecorator());continue}let S=this.parseClassElement(a.superClass!==null);if(C.length)S.decorators=C,this.resetStartLocationFromNode(S,C[0]),C=[];if(S){if(x.body.push(S),S.type==="MethodDefinition"&&S.kind==="constructor"&&S.value.type==="FunctionExpression"){if(E)this.raiseRecoverable(S.start,"Duplicate constructor in the same class");if(E=!0,S.decorators&&S.decorators.length>0)this.raise(S.start,Mn.DecoratorConstructor)}else if(S.key&&S.key.type==="PrivateIdentifier"&&S.value?.type!=="TSDeclareMethod"){let v=S.key.name;if(this.parseEffects.modify(y,v,(N)=>tu(N,S)))this.raiseRecoverable(S.key.start,`Identifier '#${v}' has already been declared`)}}}if(this.strict=d,this.next(),C.length)this.raise(this.start,Mn.TrailingDecorator);return a.body=this.finishNode(x,"ClassBody"),this.exitClassBody(),this.finishNode(a,c?"ClassDeclaration":"ClassExpression")}finally{this.inAbstractClass=l}}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,l,d,y){let x=this.startNode(),E=this.yieldPos,C=this.awaitPos,S=this.awaitIdentPos;if(this.initFunction(x),this.ecmaVersion>=6)x.generator=a;if(this.ecmaVersion>=8)x.async=!!c;if(this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(jr(c,x.generator)|K.SCOPE_SUPER|(l?K.SCOPE_DIRECT_SUPER:0)),this.expect(s.parenL),x.params=this.parseClassFunctionParams(),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(x,!1,!0,!1,{isClassMethod:d}),this.yieldPos=E,this.awaitPos=C,this.awaitIdentPos=S,y&&y.abstract){if(!!x.body){let{key:w}=y;this.raise(y.start,R.AbstractMethodHasImplementation({methodName:w.type==="Identifier"&&!y.computed?w.name:`[${this.input.slice(w.start,w.end)}]`}))}}return this.finishNode(x,"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 l=new this(c,a);if(t)l.isAmbientContext=!0;return l.parse()}static parseExpressionAt(a,c,l){if(l.locations===!1)throw Error("You have to enable options.locations while using acorn-typescript");else l.locations=!0;let d=new this(l,a,c);if(t)d.isAmbientContext=!0;return d.nextToken(),d.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 d=this.startNode();return d.local=this.parseModuleExportName(),this.parseTypeOnlyImportExportSpecifier(d,!1,this.importOrExportOuterKind==="type"),this.finishNode(d,"ExportSpecifier"),this.checkExport(a,d.exported,d.exported.start),d}else{let d=super.parseExportSpecifier(a);return d.exportKind="value",d}}parseTypeOnlyImportExportSpecifier(a,c,l){let d=c?"imported":"local",y=c?"local":"exported",x=a[d],E,C=!1,S=!0,v=x.start;if(this.isContextual("as")){let N=this.parseIdent();if(this.isContextual("as")){let D=this.parseIdent();if(O(this.type))C=!0,x=N,E=c?this.parseIdent():this.parseModuleExportName(),S=!1;else E=D,S=!1}else if(O(this.type))S=!1,E=c?this.parseIdent():this.parseModuleExportName();else C=!0,x=N}else if(O(this.type))if(C=!0,c){if(x=super.parseIdent(!0),!this.isContextual("as"))this.checkUnreserved(x)}else x=this.parseModuleExportName();if(C&&l)this.raise(v,c?R.TypeModifierIsUsedInTypeImports:R.TypeModifierIsUsedInTypeExports);a[d]=x,a[y]=E;let w=c?"importKind":"exportKind";if(a[w]=C?"type":"value",S&&this.eatContextual("as"))a[y]=c?this.parseIdent():this.parseModuleExportName();if(!a[y])a[y]=this.copyNode(a[d]);if(c)this.checkLValSimple(a[y],K.BIND_LEXICAL)}raiseCommonCheck(a,c,l){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 l?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 l=this.curContext();if(l==P.tc_oTag)this.parseEffects.append(this.context,g.b_expr);else if(l==P.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,P.tc_cTag),this.exprAllowed=!1;else return super.updateContext(a)}jsx_parseOpeningElementAt(a,c){let l=this.startNodeAt(a,c),d=this.jsx_parseElementName();if(d)l.name=d;if(this.match(s.relational)||this.match(s.bitShift)){let y=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());if(y)l.typeArguments=y}l.attributes=[];while(this.type!==s.slash&&this.type!==T.jsxTagEnd)l.attributes.push(this.jsx_parseAttribute());return l.selfClosing=this.eat(s.slash),this.expect(T.jsxTagEnd),this.finishNode(l,d?"JSXOpeningElement":"JSXOpeningFragment")}enterScope(a){let c=a===Zt;if(c)this.parseEffects.append(this.importsStack,[]);let l=c?a|K.SCOPE_CLASS_STATIC_BLOCK:a;super.enterScope(l);let d=super.currentScope();d.types=[],d.enums=[],d.constEnums=[],d.classes=[],d.exportOnlyBindings=[]}exitScope(){if(super.currentScope().flags&Zt)this.parseEffects.pop(this.importsStack);super.exitScope()}hasImport(a,c){let l=this.importsStack.length;if(this.importsStack[l-1].indexOf(a)>-1)return!0;if(!c&&l>1){for(let d=0;d<l-1;d++)if(this.importsStack[d].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,l){if(c&K.BIND_FLAGS_TS_IMPORT){if(this.hasImport(a,!0))this.raise(l,`Identifier '${a}' has already been declared.`);this.parseEffects.append(this.importsStack[this.importsStack.length-1],a);return}let d=this.currentScope();if(c&K.BIND_FLAGS_TS_EXPORT_ONLY){this.maybeExportDefined(d,a),this.parseEffects.append(d.exportOnlyBindings,a);return}if(c===K.BIND_TS_TYPE||c===K.BIND_TS_INTERFACE){if(c===K.BIND_TS_TYPE&&d.types.includes(a))this.raise(l,`type '${a}' has already been declared.`);this.parseEffects.append(d.types,a)}else if(c&K.BIND_FLAGS_TS_ENUM){if(d.enums.includes(a))return;super.declareName(a,K.BIND_LEXICAL,l)}else super.declareName(a,c,l);if(c&K.BIND_FLAGS_TS_ENUM)this.parseEffects.append(d.enums,a);if(c&K.BIND_FLAGS_TS_CONST_ENUM)this.parseEffects.append(d.constEnums,a);if(c&K.BIND_FLAGS_CLASS)this.parseEffects.append(d.classes,a)}checkLocalExport(a){let{name:c}=a;if(this.hasImport(c))return;let l=this.scopeStack.length;for(let d=l-1;d>=0;d--){let y=this.scopeStack[d];if(y.types.indexOf(c)>-1||y.exportOnlyBindings.indexOf(c)>-1)return}super.checkLocalExport(a)}}return Y}}var Eu=/\n/,Su=/[ \t]/,Cu=/^[,) \t]*$/,Bn="",Wa=[];function Fn(e,t){Bn=e,Wa=t}function Vn(e,t,n,r){let i=t;if(e&&Eu.test(i)){let o=n;while(o>0&&Bn[o-1]!==`
36
+ `)o-=1;let s=o;while(Su.test(Bn[s]))s+=1;let p=Bn.slice(o,s);i=vu(i,p)}Wa.push({type:e?"Block":"Line",value:i,start:n,end:r})}function vu(e,t){if(t==="")return e;return(e.startsWith(t)?e.slice(t.length):e).replaceAll(`
29
37
  ${t}`,`
30
- `)}function Br(e,t,n,r){let i=au(n,r);if(i>=n.length)return;Or(e,void 0,n,{index:i},t)}function au(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 Or(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,u=s===void 0||s>o?Object.keys(e):[];for(let m=0;m<u.length;m++){let d=u[m];if(d==="type"||d==="leadingComments")continue;let y=e[d];if(!y||typeof y!=="object")continue;if(Array.isArray(y)){for(let T of y)if(T&&typeof T==="object"&&typeof T.type==="string"){if(Or(T,e,n,r,i),r.index>=n.length)return}}else if(typeof y.type==="string"){if(Or(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")&&Mr(t.body,e)||t?.type==="ArrayExpression"&&Mr(t.elements,e)||t?.type==="ObjectExpression"&&Mr(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&&iu.test(d))r.index++}}}function Mr(e,t){return!!e&&e.indexOf(t)===e.length-1}var Mn={sawParenthesized:!1},Fa=(e)=>class extends e{parseParenAndDistinguishExpression(t,n){let r=super.parseParenAndDistinguishExpression(t,n);if(r.type==="ParenthesizedExpression")Mn.sawParenthesized=!0;return r}parseDecorator(){return Mn.sawParenthesized=!0,super.parseDecorator()}},ou=ce.extend(Fa),cu=ce.extend(Ra(),Fa);function $r(e){return e?cu:ou}var pu={onComment:Rn,sourceType:"module",ecmaVersion:16},Va={onComment:Rn,sourceType:"module",ecmaVersion:16,preserveParens:!0},lu={onComment:Rn,sourceType:"module",ecmaVersion:16},Oa={...Va,startLocation:null},Fr=/\r\n?|\n|\u2028|\u2029/g;function uu(e,t){if(t?.breakEnds)return t.breakEnds;let n=[];Fr.lastIndex=0;while(Fr.test(e))n.push(Fr.lastIndex);if(t)t.breakEnds=n;return n}function du(e,t,n){let r=e.lastIndexOf(`
31
- `,t-1)+1,i=uu(e,n),o=0,s=i.length;while(o<s){let p=o+s>>>1;if(i[p]<=r)o=p+1;else s=p}return{line:o+1,column:t-r}}function ja(e,t,n,r,i){if(n.length===i)return;Br(e,t,n,r)}function $a(e,t,n){let r=n.length;Ln(e,n);let i=$r(t).parse(e,pu);if(n.length>0)Br(i,e,n,r);return i}var fu={count:0};function Nt(e,t,n,r,i){fu.count+=1;let o=r.length;Ln(e,r),Mn.sawParenthesized=!1;let s=Va;if(n)Oa.startLocation=du(e,t,i),s=Oa;let p=$r(n).parseExpressionAt(e,t,s);ja(p,e,r,t,o);let u=r.length>o?r.at(-1):void 0,m=u&&u.end>(p.end??0)?u.end:p.end??0;return{node:Mn.sawParenthesized?hu(p):p,end:m}}function Ha(e,t,n,r){let i=r.length,o=$r(n);Ln(e,r);let s=new o(lu,e,t);s.nextToken();let p=s.parseStatement(null,!0,Object.create(null));return ja(p,e,r,t,i),p}function Ba(e){return e!==null&&typeof e==="object"&&typeof e.type==="string"}function Vr(e){let t=e;while(t.type==="ParenthesizedExpression"&&t.expression)t=t.expression;return t}function hu(e){let t=Vr(e);return jr(t),t}function jr(e){for(let t in e){let n=e[t];if(!n||typeof n!=="object")continue;if(Array.isArray(n))for(let r=0;r<n.length;r++){let i=n[r];if(!Ba(i))continue;let o=Vr(i);if(o!==i)n[r]=o;jr(o)}else if(Ba(n)){let r=Vr(n);if(r!==n)e[t]=r;jr(r)}}}function St(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 Hr{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&&St(this.source.charCodeAt(this.index)))this.index++}requireWhitespace(){if(!St(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 Ee(){return{type:"Fragment",nodes:[]}}var mu=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"]),yu=["&&","||","??"],gu=["===","!==","==","!="];function qa(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 xu(e,t){let n=t;while(n<e.length){let r=e.charCodeAt(n);if(r<48||r>57)break;n++}return n}function On(e,t){let n=t;while(n<e.length&&St(e.charCodeAt(n)))n++;return n}function Ua(e,t){let n=xu(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 Ga(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 bu(e,t){let n=e.charCodeAt(t);if(n===34||n===39)return Ga(e,t);let r=qa(e,t);if(r===t)return Ua(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(mu.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 u=s+1,m=qa(e,u);if(m===u)return null;let d={type:"Identifier",start:u,end:m,name:e.slice(u,m)};o={type:"MemberExpression",start:t,end:m,object:o,property:d,computed:!1,optional:!1},s=m}else if(p===91){let u=s+1,m=e.charCodeAt(u),d=m===34||m===39?Ga(e,u):Ua(e,u);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 qr(e,t){if(e.charCodeAt(t)!==33||e.charCodeAt(t+1)===61)return bu(e,t);let n=qr(e,On(e,t+1));if(!n)return null;return{type:"UnaryExpression",start:t,end:n.end,operator:"!",prefix:!0,argument:n}}function Tu(e,t){for(let n of gu)if(e.startsWith(n,t))return{operator:n,logical:!1};for(let n of yu)if(e.startsWith(n,t))return{operator:n,logical:!0};return null}function Wa(e,t){let n=On(e,t);if(n>=e.length)return!1;let r=e.charCodeAt(n);return r===125||r===41}function Su(e){let t=e.source,n=qr(t,e.index);if(!n)return null;if(Wa(t,n.end))return e.index=n.end,n;let r=On(t,n.end),i=Tu(t,r);if(!i)return null;let o=qr(t,On(t,r+i.operator.length));if(!o||!Wa(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 fe(e){let t=Su(e);if(t)return t;let{node:n,end:r}=Nt(e.source,e.index,e.isTypeScript,e.root.comments,e.lineTable);return e.index=r,n}var Eu={"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},Ur=Eu;var Cu=[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 vu(e,t){if(t&&!e.endsWith(";"))return`${e}\\b(?!=)`;return e}function Ka(e){let n=Object.keys(Ur).map((r)=>vu(r,e));return new RegExp(`&(#(?:x[a-fA-F\\d]+|\\d+)(?:;)?|${n.join("|")})`,"g")}var Gr,Wr;function Au(e){if(e){if(!Wr)Wr=Ka(!0);return Wr}if(!Gr)Gr=Ka(!1);return Gr}var za=0;function Pu(e){if(e===10)return 32;if(e<128)return e;if(e<=159)return Cu[e-128];if(e<55296)return e;if(e<=57343)return za;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 za}function Kr(e,t){if(e.indexOf("&")===-1)return e;return e.replace(Au(t),(n,r)=>{let i;if(r[0]!=="#")i=Ur[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(Pu(i))})}class Zt extends Error{constructor(e){super(`sveld's template parser doesn't support ${e} yet.`);this.name="TemplateParseNotImplementedError"}}var ku=/<\/script\s*>/g,wu=/<\/script\s*>/y,Nu=/[^\n]/g,_u=new Set(["server","client","worker","test","default"]);function Xa(e,t,n){let r=e.index,i=e.readUntil(ku);if(e.index>=e.source.length)throw Error("sveld: unclosed <script> tag");let o=e.source.slice(0,r).replace(Nu," ")+i;e.read(wu);let s=$a(o,e.isTypeScript,e.root.comments);s.start=r;let p="default";for(let u of n){if(_u.has(u.name))throw Error(`sveld: "${u.name}" is a reserved <script> attribute name.`);if(u.name==="module"){if(u.value!==!0)throw Error("sveld: <script module> does not take a value.");p="module"}if(u.name==="context"){let m=u.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 Ja(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 Iu=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]);function zr(e){return Iu.has(e)||e.charCodeAt(0)===33&&e.toLowerCase()==="!doctype"}var Du="^[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}]*)?$",Lu=new RegExp(Du,"u");function Ya(e){return Lu.test(e)}var Ru=/(?:"([^"]*)"|'([^'])*'|([^>\s]+))/y,no=/["']/y,Mu=/(\/>|[\s"'=<>`])/y,Xr=/<\/textarea(\s[^>]*)?>/iy,Ou=/^![a-zA-Z]+$/,Bu=/^[a-zA-Z][a-zA-Z0-9]*:[a-zA-Z][a-zA-Z0-9-]*[a-zA-Z0-9]$/,Fu=/^(?:\p{Lu}[$\u200c\u200d\p{ID_Continue}.]*|\p{ID_Start}[$\u200c\u200d\p{ID_Continue}]*(?:\.[$\u200c\u200d\p{ID_Continue}]+)+)$/u,ro={"svelte:head":"SvelteHead","svelte:options":"SvelteOptions","svelte:window":"SvelteWindow","svelte:document":"SvelteDocument","svelte:body":"SvelteBody"},Qa={...ro,"svelte:element":"SvelteElement","svelte:component":"SvelteComponent","svelte:self":"SvelteSelf","svelte:fragment":"SvelteFragment","svelte:boundary":"SvelteBoundary"};function Vu(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 ju(e){if(Vu(e))return!0;if(Ou.test(e))return!0;if(Bu.test(e))return!0;return Ya(e)}function $u(e){let t=e.charCodeAt(0);if(t>=97&&t<=122&&!e.includes("."))return!1;return!0}function Hu(e){return`Svelte${e.slice(7).split("-").map((n)=>n.charAt(0).toUpperCase()+n.slice(1)).join("")}`}function qu(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 Uu(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 Za(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||St(i))break;r++}return e.index=r,{name:t.slice(n,r),start:n,end:r}}function io(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||St(i))break;r++}return e.index=r,{name:t.slice(n,r),start:n,end:r}}function Gu(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 so(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=Kr(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 Zt("blocks/tags inside attribute value sequences");let s=e.index-1;o(s),e.allowWhitespace();let p=fe(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 u=p.charCodeAt(s);if(u===123||u===n)break;s++}}e.index=s}}throw new Zt("unterminated attribute value / sequence (loose mode)")}function Ku(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=so(e,()=>{if(t)return e.match(t);return!!e.matchRegex(Mu)},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 Jr(e,t,n,r){return{type:"Attribute",start:t,end:n,name:e,value:r}}function zu(e){let t=e.index,n=io(e);if(!n.name)return null;let r=!0;if(e.eat("=")){e.allowWhitespace();let i=e.matchRegex(Ru);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:Kr(i,!0)}]}if(e.matchRegex(no))throw Error("sveld: expected '='");return Jr(n.name,t,e.index,r)}function Xu(e){while(!0){let p=e.index;if(Gu(e),e.index===p)break;e.allowWhitespace()}let t=e.index;if(e.eat("{")){if(e.allowWhitespace(),e.eat("@attach")){e.requireWhitespace();let m=fe(e);return e.allowWhitespace(),e.eat("}",!0),{type:"AttachTag",start:t,end:e.index,expression:m}}if(e.eat("...")){let m=fe(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 u={type:"ExpressionTag",start:p.start,end:p.end,expression:p};return Jr(p.name,t,e.index,u)}let n=io(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=Ku(e),r=e.index;else if(e.matchRegex(no))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 u=s===!0?void 0:Array.isArray(s)?s[0]:s,m=null;if(u){if((Array.isArray(s)?s.length>1:!1)||u.type==="Text")throw Error("sveld: directive value must be a single expression");m=u.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 Jr(n.name,t,r,s)}function ao(e){let t=e.index++,n=e.current();if(e.eat("!--")){let T=e.readUntilString("-->");e.eat("-->",!0),e.append({type:"Comment",start:t,end:e.index,data:T});return}if(e.eat("/")){let{name:T}=Za(e);if(e.allowWhitespace(),e.eat(">",!0),zr(T))throw Error(`sveld: <${T}> is a void element and cannot have a closing tag`);while(n.name!==T){if(n.type==="RegularElement");else throw Error(`sveld: invalid closing tag </${T}>`);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=Za(e),i=$u(r.name)&&Fu.test(r.name);if(!ju(r.name)&&!i)throw Error(`sveld: "${r.name}" is not a valid element or component name`);if(r.name in ro&&n.type!=="Root")throw Error(`sveld: <${r.name}> must be a top-level element`);let o;if(r.name in Qa)o=Qa[r.name];else if(r.name.startsWith("svelte:"))o=Hu(r.name);else if(i)o="Component";else if(r.name==="title"&&qu(e.stack))o="TitleElement";else if(r.name==="slot"&&!Uu(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"&&Is(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(),u=(r.name==="script"||r.name==="style")&&p.type==="Root",m=u?zu:Xu,d;while(d=m(e))s.attributes.push(d),e.allowWhitespace();if(s.type==="SvelteComponent")s.expression=to(eo(s));if(s.type==="SvelteElement"){let T=eo(s);if(T.value===!0)throw Error("sveld: <svelte:element> `this` attribute needs a value");if(Ju(T))s.tag=to(T);else{let S=T.value[0];s.tag=S.type==="Text"?{type:"Literal",value:S.data,raw:`'${S.raw}'`,start:S.start,end:S.end}:S.expression}}if(u){if(e.eat(">",!0),r.name==="script"){let T=Xa(e,t,s.attributes);if(T.context==="module"){if(e.root.module)throw Error("sveld: duplicate <script module>");e.root.module=T}else{if(e.root.instance)throw Error("sveld: duplicate <script>");e.root.instance=T}}else{if(e.root.css)throw Error("sveld: duplicate <style>");e.root.css=Ja(e,t,s.attributes)}return}e.append(s);let y=e.eat("/")||zr(r.name);if(e.eat(">",!0),y)s.end=e.index;else if(r.name==="textarea")s.fragment.nodes=so(e,()=>(Xr.lastIndex=e.index,Xr.test(e.source))),e.read(Xr),s.end=e.index;else e.push(s,s.fragment)}function eo(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 to(e){return Array.isArray(e.value)?e.value[0].expression:e.value.expression}function Ju(e){return e.value!==!0&&!Array.isArray(e.value)||Array.isArray(e.value)&&e.value.length===1&&e.value[0].type==="ExpressionTag"}function oo(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=co(n);if(typeof r==="boolean")t.runes=r}if(n.name==="customElement"){let r=Zu(n);if(r!==void 0)t.customElement=r}}return t}function co(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 Yu=new Set(["String","Boolean","Number","Array","Object"]);function Yr(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 Qu(e){let t={};if(!e||typeof e!=="object"||e.type!=="ObjectExpression")return t;for(let[n,r]of Yr(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"&&Yu.has(i))t.type=i}return t}function Zu(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=co(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=Yr(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,y]of Yr(p))o.props[d]=Qu(y)}let u=i.find(([d])=>d==="shadow")?.[1];if(u&&typeof u==="object"){let d=u;if(d.type==="Literal"&&(d.value==="open"||d.value==="none"))o.shadow=d.value;else if(d.type==="ObjectExpression")o.shadow=u}let m=i.find(([d])=>d==="extend")?.[1];if(m!==void 0)o.extend=m;return o}var ed=/<script\s+(?:[^>]*|(?:[^=>'"/]+=(?:"[^"]*"|'[^']*'|[^>\s]+)\s+)*)lang=(["'])?ts\1[^>]*>/;class Qr extends Hr{root;stack=[];fragments=[];isTypeScript;lineTable={};lastAutoClosedTag;constructor(e,t){super(e);this.isTypeScript=ed.test(e);let n=Ee();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 Zr={"{":"}","(":")","[":"]"},td=new Set(Object.values(Zr));function en(e,t,n=Zr){let r=n===Zr?td:new Set(Object.values(n)),i=[],o=t;while(o<e.source.length){let s=e.source[o++];if(s==="'"||s==='"'||s==="`"){o=nd(e,o,s);continue}if(Object.hasOwn(n,s))i.push(s);else if(r.has(s)){let p=i.pop(),u=p?n[p]:void 0;if(s!==u)throw Error(`sveld: expected "${u}"`);if(i.length===0)return o}}throw Error("sveld: unexpected end of input")}function nd(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=en(e,i)}throw Error("sveld: unterminated string constant")}var lo=/[^\n]/g,rd=/\?\s*:/g;function dt(e){let t=e.index,n=e.readIdentifierName();if(n.name!==""){let T=po(e);return{...n,typeAnnotation:T}}let r=e.source[e.index];if(r!=="{"&&r!=="[")throw Error("sveld: expected a binding pattern");let i=en(e,t);e.index=i;let o=e.source.slice(t,i),s=e.source.slice(0,t).replace(lo," "),p=s.indexOf(" ");s=s.slice(0,p)+s.slice(p+1);let u=`${s}(${o} = 1)`,{node:m}=Nt(u,t-1,e.isTypeScript,e.root.comments),d=m.left,y=po(e);if(y)d.typeAnnotation=y,d.end=y.end;return d}function po(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(lo," ")+n+e.source.slice(e.index).replace(rd,":"),{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 uo=/\s*}/y,id={"<":">"};function fo(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:fe(e),consequent:Ee(),alternate:null};e.append(n),e.allowWhitespace(),e.eat("}",!0),e.push(n,n.consequent);return}if(e.eat("each")){e.requireWhitespace();let n=fe(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 u=p;n=u.expression;let m=u.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=fe(e),e.allowWhitespace(),e.eat(")",!0),e.allowWhitespace();e.eat("}",!0);let s={type:"EachBlock",start:t,end:-1,expression:n,body:Ee(),context:r,index:i,key:o};e.append(s),e.push(s,s.body);return}if(e.eat("await")){e.requireWhitespace();let n=fe(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(uo))e.requireWhitespace(),r.value=dt(e),e.allowWhitespace();r.then=Ee()}else if(e.eat("catch")){if(!e.matchRegex(uo))e.requireWhitespace(),r.error=dt(e),e.allowWhitespace();r.catch=Ee()}else r.pending=Ee();e.eat("}",!0),e.append(r),e.push(r,r.then??r.catch??r.pending);return}if(e.eat("key")){e.requireWhitespace();let n=fe(e);e.allowWhitespace(),e.eat("}",!0);let r={type:"KeyBlock",start:t,end:-1,expression:n,fragment:Ee()};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=en(e,o,id);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:Ee()};e.append(i),e.push(i,i.body);return}throw Error("sveld: expected if/each/await/key/snippet")}function ho(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=Ee(),e.fragments.push(n.alternate),e.eat("if")){e.requireWhitespace();let r=fe(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:Ee(),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=Ee(),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=Ee(),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=Ee(),e.fragments.pop(),e.fragments.push(n.catch);return}throw Error("sveld: expected {:then ...} or {:catch ...}")}throw Error("sveld: {:...} not valid here")}function mo(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 sd=/(?:let|const)\b/y,ad=/(?:var|interface|enum)\b/y,od=/type\b/y;function yo(e){let t=e.index;if(e.matchRegex(ad))throw Error("sveld: `var`/`interface`/`enum` are not valid here");if(!e.matchRegex(sd)&&!e.matchRegex(od))return null;let n=e.root.comments.length,r=Ha(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 cd=/\s*}/y;function go(e){let t=e.index;while(e.source[t]!=="{")t-=1;if(e.eat("html")){e.requireWhitespace();let n=fe(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(cd))n=[];else{let i=fe(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=fe(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=fe(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 xo(e){let t=e.index;if(e.index+=1,e.allowWhitespace(),e.eat("#")){fo(e);return}if(e.eat(":")){ho(e);return}if(e.eat("@")){go(e);return}if(e.match("/")&&!e.match("/*")&&!e.match("//")){e.eat("/"),mo(e);return}let n=yo(e);if(n){let o={type:"DeclarationTag",start:t,end:e.index,declaration:n};e.append(o);return}let r=fe(e);e.allowWhitespace(),e.eat("}",!0);let i={type:"ExpressionTag",start:t,end:e.index,expression:r};e.append(i)}function bo(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 ei(e){let t=e.trimEnd(),n=new Qr(t,e.length);while(n.index<n.source.length)if(n.match("<"))ao(n);else if(n.match("{"))xo(n);else bo(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=oo(i)}return n.root}function To(e){if(e==="var")return"let";if(e==="using"||e==="await using")return"const";return e}var pd=null,So=/^@component/,ld=/\r/g,ud=/^\{\s*\}$/,dd=new Set(["AssignmentExpression","UpdateExpression","CallExpression","SpreadAttribute","FunctionDeclaration","ImportDeclaration","VariableDeclaration","ExportNamedDeclaration","Comment","SlotElement","RenderTag","OnDirective","BindDirective"]);class he{ctx=Wn();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(he.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?he.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=he.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=_s(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=Wn()}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 he.SCRIPT_BLOCK_REGEX.lastIndex=0,e.replace(he.SCRIPT_BLOCK_REGEX,(t,n,r,i)=>{he.TS_DIRECTIVE_REGEX.lastIndex=0;let o=r.replace(he.TS_DIRECTIVE_REGEX,"");return n+o+i})}parseSvelteComponent(e,t){this.cleanup(),this.ctx.componentFilePath=t.filePath;let n=he.stripTypeScriptDirectivesFromScripts(e);this.ctx.source=n;let r=ei(n);if(Cs(this,this.ctx,r),this.ctx.parsed=r,this.ctx.scriptLanguage==="ts")mn(this.ctx.parsed.module),mn(this.ctx.parsed.instance),mn(this.ctx.parsed.fragment);this.ctx.syntaxMode=Es(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;yr(this.ctx,this.ctx.parsed?.module),yr(this.ctx,this.ctx.parsed?.instance),ds(this.ctx,this,o);let s={type:"ComponentRoot",instance:this.ctx.parsed.instance,fragment:this.ctx.parsed.fragment};if(this.ctx.parsed?.module)ur(this.ctx.parsed?.module,(c)=>{if(c.type==="ImportDeclaration")yn(this.ctx,c);if(c.type==="FunctionDeclaration"){let l=c;if(l.id?.name)this.ctx.funcDecls.set(l.id.name,l)}if(c.type==="VariableDeclaration")this.ctx.vars.add(c);if(c.type==="ExportNamedDeclaration"){if(c.declaration==null&&c.specifiers.length===0)return;let l,f=!1;if(c.declaration==null&&c.specifiers[0]?.type==="ExportSpecifier"){let x=c.specifiers[0],C=x.local&&typeof x.local==="object"&&"name"in x.local?x.local.name:void 0,v=x.exported&&typeof x.exported==="object"&&"name"in x.exported?x.exported.name:void 0;if(!C||!v)return;let E;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===C)){E=k;break}if(!E){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(C)?"it re-exports an imported binding":"no matching local declaration was found";ae(this.ctx,"export-unresolved",v,`export "${v}" was skipped because ${_}; sveld only resolves exports of a local declaration.`,ie(this.ctx,c));return}c.declaration=E,l=v,f=!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 x=c.declaration;if(!x.id?.name)return;let C=this.ctx.scriptLanguage==="ts"?er(this.ctx,x):void 0;g.push({prop_name:x.id.name,kind:"function",isFunctionDeclaration:!0,value:void 0,typeSeed:C?.hasAnnotations?void 0:"() => any",explicitType:C?.hasAnnotations?C.signature:void 0,initializerIsFunction:!0,defaultValue:void 0,inferredTypeForSource:void 0,resolvedJSDoc:void 0})}else if(c.declaration.type==="VariableDeclaration"){let x=c.declaration,C=To(x.kind),v=f?x.declarations.slice(0,1):x.declarations;for(let E of v){if(!E||typeof E!=="object"||!("id"in E))continue;let{id:k,init:_}=E;if(!k||typeof k!=="object"||!("name"in k))continue;let D=k.name,q=l??D,U=_==null?{isFunction:!1}:at(this,this.ctx,_),{value:W,type:re,isFunction:j,defaultValue:Y}=U,le=U;if(le.pendingCallDefault)this.ctx.pendingCallDefaultCandidates.push({propName:D,location:"moduleExports",...le.pendingCallDefault});g.push({prop_name:q,kind:C,isFunctionDeclaration:!1,value:W,typeSeed:re,explicitType:this.getExplicitPropType(D),initializerIsFunction:j,defaultValue:Y,inferredTypeForSource:re,resolvedJSDoc:le})}if(g.length===0)return}else return;let b=ct(this.ctx,this,c);for(let{prop_name:x,kind:C,isFunctionDeclaration:v,value:E,typeSeed:k,explicitType:_,initializerIsFunction:D,defaultValue:q,inferredTypeForSource:U,resolvedJSDoc:W}of g){let{type:re,typeSource:j,description:Y,params:le,returnType:ee,isFunction:Q}=$t({explicitType:_,typeSeed:k,inferredTypeForSource:U,jsdocType:b?.type,jsdocDescription:b?.description,jsdocParams:b?.params,jsdocReturnType:b?.returnType,resolvedType:W?.resolvedType,resolvedDescription:W?.resolvedDescription,resolvedParams:W?.resolvedParams,resolvedReturnType:W?.resolvedReturnType,initializerIsFunction:D,isFunctionDeclaration:v,typedefs:this.ctx.typedefs});this.addModuleExport(x,{name:x,kind:C,description:Y,deprecated:b?.deprecated,tags:b?.tags,...b?.internal?{internal:!0}:{},type:re,typeSource:j,value:E,defaultValue:q,params:le,returnType:ee,isFunction:Q,isFunctionDeclaration:v,isRequired:!1,constant:C==="const",reactive:!1,source:ie(this.ctx,c)})}}});let p,u,m,d=new Set,y=new Set,T=[];ms(this,this.ctx),this.ctx.activeScopes.push(this.ctx.componentScope);let S=ys(this.ctx);if(ur(s,(c,l,f)=>{let g=gs(this,this.ctx,S,c);if(g)this.ctx.activeScopes.push(g);let b=c.type;if(!dd.has(b))return;if(c.type==="AssignmentExpression")cr(this.ctx,c.left);if(c.type==="UpdateExpression")cr(this.ctx,c.argument);if(c.type==="CallExpression"){let x=c,C=x.callee&&typeof x.callee==="object"&&"name"in x.callee?x.callee.name:void 0;if(C==="createEventDispatcher"){if(l&&typeof l==="object"&&"id"in l&&l.id&&typeof l.id==="object"&&"name"in l.id)p=l.id.name,u=l;m=x.typeArguments?.params?.[0]}if(C==="$host"){if(l&&typeof l==="object"&&"id"in l&&l.id&&typeof l.id==="object"&&"name"in l.id)d.add(l.id.name)}if(C==="setContext")Hi(this.ctx,this,c,l??void 0);if(C)T.push({name:C,arguments:x.arguments,node:x});if(Ci(x.callee)&&Ae(x.callee.property)&&x.callee.property.name==="dispatchEvent"&&(Ge(x.callee.object,"$host")||Ae(x.callee.object)&&d.has(x.callee.object.name))){let v=Ki(this.ctx,x);if(v)y.add(v)}}if(b==="SpreadAttribute"){let x=c;if(x.expression?.name==="$$restProps"||this.ctx.restPropLocals.has(x.expression?.name??""))fs(this.ctx,l)}if(c.type==="FunctionDeclaration"){let x=c;if(x.id?.name)this.ctx.funcDecls.set(x.id.name,x)}if(c.type==="ImportDeclaration")yn(this.ctx,c);if(c.type==="VariableDeclaration"){if(this.ctx.vars.add(c),l&&typeof l==="object"&&"type"in l&&l.type==="Program"&&c.declarations.some((x)=>Ge(it(x.init),"$props")))vs(this,this.ctx,c)}if(c.type==="ExportNamedDeclaration"){if(c.declaration==null&&c.specifiers.length===0)return;let x,C=!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 q;for(let U of Array.from(this.ctx.vars))if(U.declarations.some((W)=>W.id&&typeof W.id==="object"&&("type"in W.id)&&W.id.type==="Identifier"&&W.id.name===_)){q=U;break}if(c.declaration=q,x=D,C=!0,!q){let U="source"in c&&c.source&&typeof c.source==="object"&&"value"in c.source?c.source.value:void 0,W=typeof U==="string"?`it re-exports from "${U}"`: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 ${W}; 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 v=[];if(c.declaration.type==="FunctionDeclaration"){let k=c.declaration;if(!k.id?.name)return;x??=k.id.name;let _=this.ctx.scriptLanguage==="ts"?er(this.ctx,k):void 0;v.push({prop_name:x,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,_=To(k.kind),D=C?k.declarations.slice(0,1):k.declarations;for(let q of D){if(!q||typeof q!=="object"||!("id"in q))continue;let{id:U,init:W}=q;if(!U||typeof U!=="object"||!("name"in U))continue;let re=U.name,j=x??re,Y=_==="let"&&W==null,le=W==null?{isFunction:!1}:at(this,this.ctx,W),{value:ee,type:Q,isFunction:ht,defaultValue:He}=le,Ue=le;if(Ue.pendingCallDefault)this.ctx.pendingCallDefaultCandidates.push({propName:j,location:"props",...Ue.pendingCallDefault});v.push({prop_name:j,kind:_,isFunctionDeclaration:!1,value:ee,typeSeed:Q,explicitType:this.getExplicitPropType(re),initializerIsFunction:ht,isRequired:Y,localName:re,defaultValue:He,inferredTypeForSource:Q,resolvedJSDoc:Ue})}if(v.length===0)return}else return;let E=ct(this.ctx,this,c);for(let{prop_name:k,kind:_,isFunctionDeclaration:D,value:q,typeSeed:U,explicitType:W,initializerIsFunction:re,isRequired:j,localName:Y,defaultValue:le,inferredTypeForSource:ee,resolvedJSDoc:Q}of v){let{type:ht,typeSource:He,description:Ue,params:on,returnType:Rt,isFunction:Hn}=$t({explicitType:W,typeSeed:U,inferredTypeForSource:ee,jsdocType:E?.type,jsdocDescription:E?.description,jsdocParams:E?.params,jsdocReturnType:E?.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,E?.sveldIgnore),Ot(this,this.ctx,k,{name:k,...Y!==void 0&&Y!==k?{localName:Y}:{},kind:_,description:Ue,binding:E?.binding,deprecated:E?.deprecated,tags:E?.tags,...E?.internal?{internal:!0}:{},type:ht,typeSource:He,value:q,defaultValue:le,params:on,returnType:Rt,isFunction:Hn,isFunctionDeclaration:D,isRequired:j,constant:_==="const",reactive:this.ctx.reactive_vars.has(k),source:ie(this.ctx,c)})}}if(b==="Comment"){let C=c?.data?.trim()??"";if(So.test(C))this.ctx.componentComment=C.replace(So,"").replace(ld,""),this.ctx.componentCommentSource=ie(this.ctx,c)}if(b==="SlotElement"){let x=c,C=x.attributes?.find((_)=>_.name==="name")?.value,v=(Array.isArray(C)?C[0]:void 0)?.data,E=(x.attributes||[]).filter((_)=>_.name!=="name").reduce((_,D)=>{let q={value:void 0,replace:!1},U=D.value;if(U===void 0||U===!0)return _;let W=Array.isArray(U)?U[0]:U;if(W){let{type:re,expression:j,raw:Y,start:le,end:ee}=W;if(re==="Text"&&Y!==void 0)q.value=JSON.stringify(Y);else if(!Array.isArray(U)&&re==="ExpressionTag"&&j&&typeof j==="object"&&"type"in j&&j.type==="Identifier"&&"name"in j&&j.name===D.name)q.value=j.name,q.replace=!0;if(j&&typeof j==="object"&&"type"in j){if(j.type==="Literal"&&"value"in j){let Q=j.value;q.value=typeof Q==="string"?JSON.stringify(Q):String(Q)}else if(j.type==="MemberExpression")q.value=pn(this.ctx,this,j);else if(j.type!=="Identifier"){if(le!==void 0&&ee!==void 0){if(j.type==="ObjectExpression"||j.type==="TemplateLiteral")q.value=se(this.ctx,le+1,ee-1)}}}}if(D.name)_[D.name]=q;return _},{}),k=x.fragment?.nodes?.map(({start:_,end:D})=>{if(_===void 0||D===void 0)return"";return se(this.ctx,_,D)??""}).join("").trim();jt(this.ctx,{slot_name:v,slot_props:E,slot_fallback:k,source:ie(this.ctx,c)})}if(b==="RenderTag"){let x=c,C=as(this.ctx,x.expression);if(C){let v,E=!1;if(C.arguments.length===0)v={};else if(C.arguments.length===1&&typeof C.arguments[0]==="object"&&C.arguments[0]&&"type"in C.arguments[0]&&C.arguments[0].type==="ObjectExpression"){let D=rr(this.ctx,this,C.arguments[0]);v=D.slot_props,E=D.hasUnresolvedSpread}else if(C.arguments.length===1)ae(this.ctx,"syntax-skipped",C.publicName,`{@render ${C.publicName}(...)} argument is not a plain object literal; the render call was not mapped to slot metadata.`,ie(this.ctx,c));let k=C.publicName==="children"?void 0:C.publicName,_=k===void 0?pd:k;if(v!==void 0)jt(this.ctx,{slot_name:k,slot_props:v,slot_props_unresolved_spread:E||void 0,source:ie(this.ctx,c)});if(v!==void 0||this.ctx.slots.has(_))this.ctx.snippetPropLocals.add(C.trackingName)}}if(b==="OnDirective"){let x=c;if(x.expression==null&&x.name){if(l!=null&&typeof l==="object"&&"name"in l){let C=typeof l.name==="string"?l.name:void 0,v="type"in l?String(l.type):void 0;if(C&&v){let E=Ft(v)?{type:"InlineComponent",name:C}:{type:"Element",name:C};this.ctx.forwardedEvents.set(x.name,E);let k=this.ctx.events.get(x.name),_=this.ctx.eventDescriptions.get(x.name),D=k?.deprecated,q=k?.internal;if(!k)this.ctx.events.set(x.name,{type:"forwarded",name:x.name,element:E,description:_,deprecated:D,...q?{internal:!0}:{},source:ie(this.ctx,c)});else if(k.type==="forwarded"&&_&&!k.description)this.ctx.events.set(x.name,{...k,description:_,deprecated:k.deprecated??D,...k.internal||q?{internal:!0}:{},source:k.source||ie(this.ctx,c)})}}}}if(b==="BindDirective"&&l&&typeof l==="object"&&"type"in l&&(Vt(String(l.type))||Ft(String(l.type)))){let x=c;if(x.expression?.name){let C=Ht(this.ctx,x.expression.name);if(C)this.ctx.reactive_vars.add(C)}if(Vt(String(l.type))&&x.name==="this"&&x.expression?.name&&"name"in l&&typeof l.name==="string"){let C=Ht(this.ctx,x.expression.name);if(!C)return;let v=l.name;if(this.ctx.bindings.has(C)){let E=this.ctx.bindings.get(C);if(E&&!E.elements.includes(v))this.ctx.bindings.set(C,{...E,elements:[...E.elements,v]})}else this.ctx.bindings.set(C,{elements:[v]})}}},(c)=>{if(qt(c))this.ctx.activeScopes.pop(),xs(S,c)},{skipTypeOnlySubtrees:!0}),p!==void 0){As(this,this.ctx,m,p,ie(this.ctx,u));for(let c of T)if(c.name===p){let l=c.arguments[0],f=l&&typeof l==="object"&&"value"in l?l.value:void 0,g=c.arguments[1],b=qi(this,g),x=b===void 0&&g&&typeof g==="object"&&"value"in g?g.value:void 0;if(f!=null)ot(this.ctx,{name:String(f),detail:b??(x==null?"":Qn(x)),has_argument:Boolean(g),source:ie(this.ctx,c.node)})}}let P=new Set(y);if(p!==void 0){for(let c of T)if(c.name===p){let l=c.arguments[0],f=l&&typeof l==="object"&&"value"in l?l.value:void 0;if(f!=null)P.add(String(f))}}this.ctx.forwardedEvents.forEach((c,l)=>{let f=this.ctx.events.get(l);if(f&&f.type==="dispatched"&&!P.has(l)){let g=this.ctx.eventDescriptions.get(l),b={type:"forwarded",name:l,element:c,description:g,deprecated:f.deprecated,tags:f.tags,source:f.source};if(f.internal)b.internal=!0;if(f.detail!==void 0&&f.detail!=="undefined")b.detail=f.detail;this.ctx.events.set(l,b)}}),Ps(this.ctx,P);let w=this.ctx.syntaxMode==="runes"?new Set(Array.from(this.ctx.snippetPropLocals,(c)=>this.resolvePublicPropName(c))):new Set,A=he.mapToArray(this.ctx.props).filter((c)=>!w.has(c.name)).map((c)=>{if(this.ctx.bindings.has(c.name)){let l=this.ctx.bindings.get(c.name)?.elements.sort().map((f)=>ki(f)).join(" | ");return{...c,type:`null | ${l}`,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 F=he.mapToArray(this.ctx.slots).map((c)=>{let{slot_props_unresolved_spread:l,...f}=c;if(!c.slot_props)return f;if(typeof c.slot_props==="string")return ud.test(c.slot_props)?{...f,slot_props:"Record<string, never>"}:f;let g=c.slot_props,b=[];for(let v of Object.keys(g)){if(g[v].replace&&g[v].value!==void 0)g[v].value=this.getPropTypeByLocalOrPublic(g[v].value);if(g[v].value===void 0)g[v].value="any";b.push(`${v}: ${g[v].value}`)}let x=l?" & Record<string, any>":"",C=b.length===0?l?"Record<string, any>":"Record<string, never>":b.length===1?`{ ${b[0]} }${x}`:`{
33
- ${b.join(`;
38
+ `)}function Gr(e,t,n,r){let i=Au(n,r);if(i>=n.length)return;Ur(e,void 0,n,{index:i},t)}function Au(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 Ur(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,u=s===void 0||s>o?Object.keys(e):[];for(let m=0;m<u.length;m++){let f=u[m];if(f==="type"||f==="leadingComments")continue;let g=e[f];if(!g||typeof g!=="object")continue;if(Array.isArray(g)){for(let b of g)if(b&&typeof b==="object"&&typeof b.type==="string"){if(Ur(b,e,n,r,i),r.index>=n.length)return}}else if(typeof g.type==="string"){if(Ur(g,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 f=i.slice(e.end??0,m.start);if((t?.type==="BlockStatement"||t?.type==="Program")&&qr(t.body,e)||t?.type==="ArrayExpression"&&qr(t.elements,e)||t?.type==="ObjectExpression"&&qr(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&&Cu.test(f))r.index++}}}function qr(e,t){return!!e&&e.indexOf(t)===e.length-1}var $n={sawParenthesized:!1},Xa=(e)=>class extends e{parseParenAndDistinguishExpression(t,n){let r=super.parseParenAndDistinguishExpression(t,n);if(r.type==="ParenthesizedExpression")$n.sawParenthesized=!0;return r}parseDecorator(){return $n.sawParenthesized=!0,super.parseDecorator()}},Pu=de.extend(Xa),ku=de.extend(Ga(),Xa);function Xr(e){return e?ku:Pu}var wu={onComment:Vn,sourceType:"module",ecmaVersion:16},Ja={onComment:Vn,sourceType:"module",ecmaVersion:16,preserveParens:!0},Nu={onComment:Vn,sourceType:"module",ecmaVersion:16},Ka={...Ja,startLocation:null},Wr=/\r\n?|\n|\u2028|\u2029/g;function _u(e,t){if(t?.breakEnds)return t.breakEnds;let n=[];Wr.lastIndex=0;while(Wr.test(e))n.push(Wr.lastIndex);if(t)t.breakEnds=n;return n}function Iu(e,t,n){let r=e.lastIndexOf(`
39
+ `,t-1)+1,i=_u(e,n),o=0,s=i.length;while(o<s){let p=o+s>>>1;if(i[p]<=r)o=p+1;else s=p}return{line:o+1,column:t-r}}function Ya(e,t,n,r,i){if(n.length===i)return;Gr(e,t,n,r)}function Qa(e,t,n){let r=n.length;Fn(e,n);let i=Xr(t).parse(e,wu);if(n.length>0)Gr(i,e,n,r);return i}var Du={count:0};function Rt(e,t,n,r,i){Du.count+=1;let o=r.length;Fn(e,r),$n.sawParenthesized=!1;let s=Ja;if(n)Ka.startLocation=Iu(e,t,i),s=Ka;let p=Xr(n).parseExpressionAt(e,t,s);Ya(p,e,r,t,o);let u=r.length>o?r.at(-1):void 0,m=u&&u.end>(p.end??0)?u.end:p.end??0;return{node:$n.sawParenthesized?Lu(p):p,end:m}}function Za(e,t,n,r){let i=r.length,o=Xr(n);Fn(e,r);let s=new o(Nu,e,t);s.nextToken();let p=s.parseStatement(null,!0,Object.create(null));return Ya(p,e,r,t,i),p}function za(e){return e!==null&&typeof e==="object"&&typeof e.type==="string"}function Kr(e){let t=e;while(t.type==="ParenthesizedExpression"&&t.expression)t=t.expression;return t}function Lu(e){let t=Kr(e);return zr(t),t}function zr(e){for(let t in e){let n=e[t];if(!n||typeof n!=="object")continue;if(Array.isArray(n))for(let r=0;r<n.length;r++){let i=n[r];if(!za(i))continue;let o=Kr(i);if(o!==i)n[r]=o;zr(o)}else if(za(n)){let r=Kr(n);if(r!==n)e[t]=r;zr(r)}}}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 Jr{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 dt(`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 dt("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 dt("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 dt("Expected whitespace",this.index);this.allowWhitespace()}readIdentifierName(){let e=this.index,t=e,n="",r=this.source.codePointAt(this.index);if(r!==void 0&&Ae(r,!0)){t+=r<=65535?1:2;while(t<this.source.length){let i=this.source.codePointAt(t);if(i===void 0||!Ie(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 dt extends Error{position;constructor(e,t){super(`${e} (at index ${t})`);this.name="TemplateSyntaxError",this.position=t}}function ke(){return{type:"Fragment",nodes:[]}}var Ru=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"]),Mu=["&&","||","??"],Ou=["===","!==","==","!="];function eo(e,t){let n=e.codePointAt(t);if(n===void 0||!Ae(n,!0))return t;let r=t+(n<=65535?1:2);while(r<e.length){let i=e.codePointAt(r);if(!Ie(i,!0))break;r+=i<=65535?1:2}return r}function Bu(e,t){let n=t;while(n<e.length){let r=e.charCodeAt(n);if(r<48||r>57)break;n++}return n}function jn(e,t){let n=t;while(n<e.length&&Et(e.charCodeAt(n)))n++;return n}function to(e,t){let n=Bu(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||Ie(i,!0))return null}let r=e.slice(t,n);return{type:"Literal",start:t,end:n,value:Number(r),raw:r}}function no(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 Fu(e,t){let n=e.charCodeAt(t);if(n===34||n===39)return no(e,t);let r=eo(e,t);if(r===t)return to(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(Ru.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 u=s+1,m=eo(e,u);if(m===u)return null;let f={type:"Identifier",start:u,end:m,name:e.slice(u,m)};o={type:"MemberExpression",start:t,end:m,object:o,property:f,computed:!1,optional:!1},s=m}else if(p===91){let u=s+1,m=e.charCodeAt(u),f=m===34||m===39?no(e,u):to(e,u);if(!f||e.charCodeAt(f.end)!==93)return null;o={type:"MemberExpression",start:t,end:f.end+1,object:o,property:f,computed:!0,optional:!1},s=f.end+1}else break}return o}function Yr(e,t){if(e.charCodeAt(t)!==33||e.charCodeAt(t+1)===61)return Fu(e,t);let n=Yr(e,jn(e,t+1));if(!n)return null;return{type:"UnaryExpression",start:t,end:n.end,operator:"!",prefix:!0,argument:n}}function Vu(e,t){for(let n of Ou)if(e.startsWith(n,t))return{operator:n,logical:!1};for(let n of Mu)if(e.startsWith(n,t))return{operator:n,logical:!0};return null}function ro(e,t){let n=jn(e,t);if(n>=e.length)return!1;let r=e.charCodeAt(n);return r===125||r===41}function $u(e){let t=e.source,n=Yr(t,e.index);if(!n)return null;if(ro(t,n.end))return e.index=n.end,n;let r=jn(t,n.end),i=Vu(t,r);if(!i)return null;let o=Yr(t,jn(t,r+i.operator.length));if(!o||!ro(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 xe(e){let t=$u(e);if(t)return t;let{node:n,end:r}=Rt(e.source,e.index,e.isTypeScript,e.root.comments,e.lineTable);return e.index=r,n}var ju={"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},Qr=ju;var Hu=[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 qu(e,t){if(t&&!e.endsWith(";"))return`${e}\\b(?!=)`;return e}function io(e){let n=Object.keys(Qr).map((r)=>qu(r,e));return new RegExp(`&(#(?:x[a-fA-F\\d]+|\\d+)(?:;)?|${n.join("|")})`,"g")}var Zr,ei;function Uu(e){if(e){if(!ei)ei=io(!0);return ei}if(!Zr)Zr=io(!1);return Zr}var so=0;function Gu(e){if(e===10)return 32;if(e<128)return e;if(e<=159)return Hu[e-128];if(e<55296)return e;if(e<=57343)return so;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 so}function ti(e,t){if(e.indexOf("&")===-1)return e;return e.replace(Uu(t),(n,r)=>{let i;if(r[0]!=="#")i=Qr[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(Gu(i))})}class nn extends Error{constructor(e){super(`sveld's template parser doesn't support ${e} yet.`);this.name="TemplateParseNotImplementedError"}}var Wu=/<\/script\s*>/g,Ku=/<\/script\s*>/y,zu=/[^\n]/g,Xu=new Set(["server","client","worker","test","default"]);function ao(e,t,n){let r=e.index,i=e.readUntil(Wu);if(e.index>=e.source.length)throw Error("sveld: unclosed <script> tag");let o=e.source.slice(0,r).replace(zu," ")+i;e.read(Ku);let s=Qa(o,e.isTypeScript,e.root.comments);s.start=r;let p="default";for(let u of n){if(Xu.has(u.name))throw Error(`sveld: "${u.name}" is a reserved <script> attribute name.`);if(u.name==="module"){if(u.value!==!0)throw Error("sveld: <script module> does not take a value.");p="module"}if(u.name==="context"){let m=u.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 oo(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 Ju=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]);function ni(e){return Ju.has(e)||e.charCodeAt(0)===33&&e.toLowerCase()==="!doctype"}var Yu="^[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}]*)?$",Qu=new RegExp(Yu,"u");function co(e){return Qu.test(e)}var Zu=/(?:"([^"]*)"|'([^'])*'|([^>\s]+))/y,ho=/["']/y,ed=/(\/>|[\s"'=<>`])/y,ri=/<\/textarea(\s[^>]*)?>/iy,td=/^![a-zA-Z]+$/,nd=/^[a-zA-Z][a-zA-Z0-9]*:[a-zA-Z][a-zA-Z0-9-]*[a-zA-Z0-9]$/,rd=/^(?:\p{Lu}[$\u200c\u200d\p{ID_Continue}.]*|\p{ID_Start}[$\u200c\u200d\p{ID_Continue}]*(?:\.[$\u200c\u200d\p{ID_Continue}]+)+)$/u,mo={"svelte:head":"SvelteHead","svelte:options":"SvelteOptions","svelte:window":"SvelteWindow","svelte:document":"SvelteDocument","svelte:body":"SvelteBody"},po={...mo,"svelte:element":"SvelteElement","svelte:component":"SvelteComponent","svelte:self":"SvelteSelf","svelte:fragment":"SvelteFragment","svelte:boundary":"SvelteBoundary"};function id(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 sd(e){if(id(e))return!0;if(td.test(e))return!0;if(nd.test(e))return!0;return co(e)}function ad(e){let t=e.charCodeAt(0);if(t>=97&&t<=122&&!e.includes("."))return!1;return!0}function od(e){return`Svelte${e.slice(7).split("-").map((n)=>n.charAt(0).toUpperCase()+n.slice(1)).join("")}`}function cd(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 pd(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 lo(e){let{source:t,index:n}=e;if(n>=t.length)throw new dt("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 yo(e){let{source:t,index:n}=e;if(n>=t.length)throw new dt("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 ld(e){let t=e.index;if(e.eat("//")){let n=e.readUntilString(`
40
+ `),r=e.index;e.root.comments.push({type:"Line",value:n,start:t,end:r});return}if(e.eat("/*")){let n=e.readUntilString("*/");e.eat("*/");let r=e.index;e.root.comments.push({type:"Block",value:n,start:t,end:r})}}function ud(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 go(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=ti(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 nn("blocks/tags inside attribute value sequences");let s=e.index-1;o(s),e.allowWhitespace();let p=xe(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 u=p.charCodeAt(s);if(u===123||u===n)break;s++}}e.index=s}}throw new nn("unterminated attribute value / sequence (loose mode)")}function dd(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=go(e,()=>{if(t)return e.match(t);return!!e.matchRegex(ed)},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 ii(e,t,n,r){return{type:"Attribute",start:t,end:n,name:e,value:r}}function fd(e){let t=e.index,n=yo(e);if(!n.name)return null;let r=!0;if(e.eat("=")){e.allowWhitespace();let i=e.matchRegex(Zu);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:ti(i,!0)}]}if(e.matchRegex(ho))throw Error("sveld: expected '='");return ii(n.name,t,e.index,r)}function hd(e){while(!0){let p=e.index;if(ld(e),e.index===p)break;e.allowWhitespace()}let t=e.index;if(e.eat("{")){if(e.allowWhitespace(),e.eat("@attach")){e.requireWhitespace();let m=xe(e);return e.allowWhitespace(),e.eat("}",!0),{type:"AttachTag",start:t,end:e.index,expression:m}}if(e.eat("...")){let m=xe(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 u={type:"ExpressionTag",start:p.start,end:p.end,expression:p};return ii(p.name,t,e.index,u)}let n=yo(e);if(!n.name)return null;let r=e.index;e.allowWhitespace();let i=n.name.indexOf(":"),o=i!==-1&&ud(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=dd(e),r=e.index;else if(e.matchRegex(ho))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 u=s===!0?void 0:Array.isArray(s)?s[0]:s,m=null;if(u){if((Array.isArray(s)?s.length>1:!1)||u.type==="Text")throw Error("sveld: directive value must be a single expression");m=u.expression}let f={start:t,end:r,type:o,name:p,expression:m};if((f.type==="BindDirective"||f.type==="ClassDirective")&&!f.expression)f.expression={start:t+i+1,end:r,type:"Identifier",name:f.name};return f}return ii(n.name,t,r,s)}function xo(e){let t=e.index++,n=e.current();if(e.eat("!--")){let b=e.readUntilString("-->");e.eat("-->",!0),e.append({type:"Comment",start:t,end:e.index,data:b});return}if(e.eat("/")){let{name:b}=lo(e);if(e.allowWhitespace(),e.eat(">",!0),ni(b))throw Error(`sveld: <${b}> is a void element and cannot have a closing tag`);while(n.name!==b){if(n.type==="RegularElement");else throw Error(`sveld: invalid closing tag </${b}>`);n.end=t,e.pop(),n=e.current()}if(n.end=e.index,e.pop(),e.lastAutoClosedTag&&e.stack.length<e.lastAutoClosedTag.depth)e.lastAutoClosedTag=void 0;return}let r=lo(e),i=ad(r.name)&&rd.test(r.name);if(!sd(r.name)&&!i)throw Error(`sveld: "${r.name}" is not a valid element or component name`);if(r.name in mo&&n.type!=="Root")throw Error(`sveld: <${r.name}> must be a top-level element`);let o;if(r.name in po)o=po[r.name];else if(r.name.startsWith("svelte:"))o=od(r.name);else if(i)o="Component";else if(r.name==="title"&&cd(e.stack))o="TitleElement";else if(r.name==="slot"&&!pd(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"&&Hs(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(),u=(r.name==="script"||r.name==="style")&&p.type==="Root",m=u?fd:hd,f;while(f=m(e))s.attributes.push(f),e.allowWhitespace();if(s.type==="SvelteComponent")s.expression=fo(uo(s));if(s.type==="SvelteElement"){let b=uo(s);if(b.value===!0)throw Error("sveld: <svelte:element> `this` attribute needs a value");if(md(b))s.tag=fo(b);else{let T=b.value[0];s.tag=T.type==="Text"?{type:"Literal",value:T.data,raw:`'${T.raw}'`,start:T.start,end:T.end}:T.expression}}if(u){if(e.eat(">",!0),r.name==="script"){let b=ao(e,t,s.attributes);if(b.context==="module"){if(e.root.module)throw Error("sveld: duplicate <script module>");e.root.module=b}else{if(e.root.instance)throw Error("sveld: duplicate <script>");e.root.instance=b}}else{if(e.root.css)throw Error("sveld: duplicate <style>");e.root.css=oo(e,t,s.attributes)}return}e.append(s);let g=e.eat("/")||ni(r.name);if(e.eat(">",!0),g)s.end=e.index;else if(r.name==="textarea")s.fragment.nodes=go(e,()=>(ri.lastIndex=e.index,ri.test(e.source))),e.read(ri),s.end=e.index;else e.push(s,s.fragment)}function uo(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 fo(e){return Array.isArray(e.value)?e.value[0].expression:e.value.expression}function md(e){return e.value!==!0&&!Array.isArray(e.value)||Array.isArray(e.value)&&e.value.length===1&&e.value[0].type==="ExpressionTag"}function bo(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=To(n);if(typeof r==="boolean")t.runes=r}if(n.name==="customElement"){let r=xd(n);if(r!==void 0)t.customElement=r}}return t}function To(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 yd=new Set(["String","Boolean","Number","Array","Object"]);function si(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 gd(e){let t={};if(!e||typeof e!=="object"||e.type!=="ObjectExpression")return t;for(let[n,r]of si(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"&&yd.has(i))t.type=i}return t}function xd(e){let{value:t}=e;if(t===!0)return;let n=Array.isArray(t)?t[0]:t;if(!n)return;if(n.type==="Text"){let f=To(e);return typeof f==="string"?{tag:f}:void 0}let r=n.expression;if(r.type==="Literal"&&r.value===null)return;if(r.type!=="ObjectExpression")return;let i=si(r),o={},s=i.find(([f])=>f==="tag")?.[1];if(s&&typeof s==="object"&&s.type==="Literal"&&typeof s.value==="string")o.tag=s.value;let p=i.find(([f])=>f==="props")?.[1];if(p&&typeof p==="object"&&p.type==="ObjectExpression"){o.props={};for(let[f,g]of si(p))o.props[f]=gd(g)}let u=i.find(([f])=>f==="shadow")?.[1];if(u&&typeof u==="object"){let f=u;if(f.type==="Literal"&&(f.value==="open"||f.value==="none"))o.shadow=f.value;else if(f.type==="ObjectExpression")o.shadow=u}let m=i.find(([f])=>f==="extend")?.[1];if(m!==void 0)o.extend=m;return o}var bd=/<script\s+(?:[^>]*|(?:[^=>'"/]+=(?:"[^"]*"|'[^']*'|[^>\s]+)\s+)*)lang=(["'])?ts\1[^>]*>/;class ai extends Jr{root;stack=[];fragments=[];isTypeScript;lineTable={};lastAutoClosedTag;constructor(e,t){super(e);this.isTypeScript=bd.test(e);let n=ke();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 oi={"{":"}","(":")","[":"]"},Td=new Set(Object.values(oi));function rn(e,t,n=oi){let r=n===oi?Td:new Set(Object.values(n)),i=[],o=t;while(o<e.source.length){let s=e.source[o++];if(s==="'"||s==='"'||s==="`"){o=Ed(e,o,s);continue}if(Object.hasOwn(n,s))i.push(s);else if(r.has(s)){let p=i.pop(),u=p?n[p]:void 0;if(s!==u)throw Error(`sveld: expected "${u}"`);if(i.length===0)return o}}throw Error("sveld: unexpected end of input")}function Ed(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=rn(e,i)}throw Error("sveld: unterminated string constant")}var So=/[^\n]/g,Sd=/\?\s*:/g;function ft(e){let t=e.index,n=e.readIdentifierName();if(n.name!==""){let b=Eo(e);return{...n,typeAnnotation:b}}let r=e.source[e.index];if(r!=="{"&&r!=="[")throw Error("sveld: expected a binding pattern");let i=rn(e,t);e.index=i;let o=e.source.slice(t,i),s=e.source.slice(0,t).replace(So," "),p=s.indexOf(" ");s=s.slice(0,p)+s.slice(p+1);let u=`${s}(${o} = 1)`,{node:m}=Rt(u,t-1,e.isTypeScript,e.root.comments),f=m.left,g=Eo(e);if(g)f.typeAnnotation=g,f.end=g.end;return f}function Eo(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(So," ")+n+e.source.slice(e.index).replace(Sd,":"),{node:o}=Rt(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}=Rt(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 Co=/\s*}/y,Cd={"<":">"};function vo(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:xe(e),consequent:ke(),alternate:null};e.append(n),e.allowWhitespace(),e.eat("}",!0),e.push(n,n.consequent);return}if(e.eat("each")){e.requireWhitespace();let n=xe(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 u=p;n=u.expression;let m=u.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=ft(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=xe(e),e.allowWhitespace(),e.eat(")",!0),e.allowWhitespace();e.eat("}",!0);let s={type:"EachBlock",start:t,end:-1,expression:n,body:ke(),context:r,index:i,key:o};e.append(s),e.push(s,s.body);return}if(e.eat("await")){e.requireWhitespace();let n=xe(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(Co))e.requireWhitespace(),r.value=ft(e),e.allowWhitespace();r.then=ke()}else if(e.eat("catch")){if(!e.matchRegex(Co))e.requireWhitespace(),r.error=ft(e),e.allowWhitespace();r.catch=ke()}else r.pending=ke();e.eat("}",!0),e.append(r),e.push(r,r.then??r.catch??r.pending);return}if(e.eat("key")){e.requireWhitespace();let n=xe(e);e.allowWhitespace(),e.eat("}",!0);let r={type:"KeyBlock",start:t,end:-1,expression:n,fragment:ke()};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=rn(e,o,Cd);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:ke()};e.append(i),e.push(i,i.body);return}throw Error("sveld: expected if/each/await/key/snippet")}function Ao(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=ke(),e.fragments.push(n.alternate),e.eat("if")){e.requireWhitespace();let r=xe(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:ke(),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=ke(),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=ft(e),e.allowWhitespace(),e.eat("}",!0);n.then=ke(),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=ft(e),e.allowWhitespace(),e.eat("}",!0);n.catch=ke(),e.fragments.pop(),e.fragments.push(n.catch);return}throw Error("sveld: expected {:then ...} or {:catch ...}")}throw Error("sveld: {:...} not valid here")}function Po(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 vd=/(?:let|const)\b/y,Ad=/(?:var|interface|enum)\b/y,Pd=/type\b/y;function ko(e){let t=e.index;if(e.matchRegex(Ad))throw Error("sveld: `var`/`interface`/`enum` are not valid here");if(!e.matchRegex(vd)&&!e.matchRegex(Pd))return null;let n=e.root.comments.length,r=Za(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 kd=/\s*}/y;function wo(e){let t=e.index;while(e.source[t]!=="{")t-=1;if(e.eat("html")){e.requireWhitespace();let n=xe(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(kd))n=[];else{let i=xe(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=ft(e);e.allowWhitespace(),e.eat("=",!0),e.allowWhitespace();let r=xe(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=xe(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 No(e){let t=e.index;if(e.index+=1,e.allowWhitespace(),e.eat("#")){vo(e);return}if(e.eat(":")){Ao(e);return}if(e.eat("@")){wo(e);return}if(e.match("/")&&!e.match("/*")&&!e.match("//")){e.eat("/"),Po(e);return}let n=ko(e);if(n){let o={type:"DeclarationTag",start:t,end:e.index,declaration:n};e.append(o);return}let r=xe(e);e.allowWhitespace(),e.eat("}",!0);let i={type:"ExpressionTag",start:t,end:e.index,expression:r};e.append(i)}function _o(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 ci(e){let t=e.trimEnd(),n=new ai(t,e.length);while(n.index<n.source.length)if(n.match("<"))xo(n);else if(n.match("{"))No(n);else _o(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=bo(i)}return n.root}function pi(e){if(e?.type==="Identifier")return e.name;return typeof e?.value==="string"?e.value:void 0}function Io(e){if(e==="var")return"let";if(e==="using"||e==="await using")return"const";return e}var wd=null,Do=/^@component/,Nd=/\r/g,_d=/^\{\s*\}$/,Id=new Set(["AssignmentExpression","UpdateExpression","CallExpression","SpreadAttribute","FunctionDeclaration","ImportDeclaration","VariableDeclaration","ExportNamedDeclaration","Comment","SlotElement","RenderTag","OnDirective","BindDirective"]);class be{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(be.getStaticAttributeValue(i)?.toLowerCase()==="ts")return"ts"}return n?"js":void 0}resolveScriptGenericsAttribute(e){let t=e.instance?.attributes?.find((s)=>s.name==="generics");if(!t)return;let n=se(this.ctx,t),r=e.instance?.attributes?.find((s)=>s.name==="lang");if((r?be.getStaticAttributeValue(r)?.toLowerCase():void 0)!=="ts"){ce(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=be.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(Ne(e))return e.name;if(st(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 Ze(this.ctx,this,n);let t=this.ctx.funcDecls.get(e);if(t)return Ze(this.ctx,this,t);return}addModuleExport(e,t){if(Ve(e)===void 0)return;if(this.ctx.moduleExports.has(e)){let n=this.ctx.moduleExports.get(e);this.ctx.moduleExports.set(e,{...n,...t})}else this.ctx.moduleExports.set(e,t)}resolveExportSpecifier(e,t){let n=pi(t.local),r=pi(t.exported);if(!n||!r)return;if(e.source!=null)return{localName:n,exportedName:r};for(let i of this.ctx.vars){let o=i.declarations.find((s)=>s.id.type==="Identifier"&&s.id.name===n);if(o)return{localName:n,exportedName:r,declaration:i,declarator:o}}return{localName:n,exportedName:r}}recordUnresolvedExportSpecifier(e,t,n){let r=e.source?.value,i=typeof r==="string"?`it re-exports from "${r}"`:this.ctx.valueImportBindingsByLocalName.has(t)?"it re-exports an imported binding":"no matching local declaration was found";ce(this.ctx,"export-unresolved",n,`export "${n}" was skipped because ${i}; sveld only resolves exports of a local declaration.`,se(this.ctx,e))}aliasType(e){if(e==="*")return"any";return e.trim()}findVariableTypeAndDescription(e){let t=this.getPropByLocalOrPublic(e);if(t?.type)return{type:t.type,description:t.description,internal:t.internal};if(!this.ctx.variableInfoCacheBuilt)this.ctx.variableInfoCache=js(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 be.SCRIPT_BLOCK_REGEX.lastIndex=0,e.replace(be.SCRIPT_BLOCK_REGEX,(t,n,r,i)=>{be.TS_DIRECTIVE_REGEX.lastIndex=0;let o=r.replace(be.TS_DIRECTIVE_REGEX,"");return n+o+i})}parseSvelteComponent(e,t){this.cleanup(),this.ctx.componentFilePath=t.filePath;let n=be.stripTypeScriptDirectivesFromScripts(e);this.ctx.source=n;let r=ci(n);if(Rs(this,this.ctx,r),this.ctx.parsed=r,this.ctx.scriptLanguage==="ts")En(this.ctx.parsed.module),En(this.ctx.parsed.instance),En(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;ur(this.ctx,this.ctx.parsed?.module),ur(this.ctx,this.ctx.parsed?.instance),Cs(this.ctx,this,o);let s={type:"ComponentRoot",instance:this.ctx.parsed.instance,fragment:this.ctx.parsed.fragment};if(this.ctx.parsed?.module){let l=ms(this.ctx.parsed.module),d=(x,E,C)=>{let S=Ze(this.ctx,this,x);this.addModuleExport(E==="*"?`* from ${C.from}`:E,{name:E,kind:"re-export",description:S?.description,deprecated:S?.deprecated,tags:S?.tags,...S?.internal?{internal:!0}:{},isFunction:!1,isFunctionDeclaration:!1,isRequired:!1,constant:!1,reactive:!1,reExport:C,source:se(this.ctx,x)})},y=(x,E,C)=>{let S=[];if(E.type==="FunctionDeclaration"){let w=E;if(!w.id?.name)return;let N=this.ctx.scriptLanguage==="ts"?or(this.ctx,w):void 0;S.push({prop_name:w.id.name,kind:"function",isFunctionDeclaration:!0,value:void 0,typeSeed:N?.hasAnnotations?void 0:"() => any",explicitType:N?.hasAnnotations?N.signature:void 0,initializerIsFunction:!0,defaultValue:void 0,inferredTypeForSource:void 0,resolvedJSDoc:void 0})}else if(E.type==="VariableDeclaration"){let w=E,N=Io(w.kind),D=C?.declarator?[C.declarator]:w.declarations;for(let H of D){if(!H||typeof H!=="object"||!("id"in H))continue;let{id:U,init:Z}=H;if(!U||typeof U!=="object"||!("name"in U))continue;let ae=U.name,ie=C?.exportedName??ae,F=Z==null?{isFunction:!1}:ct(this,this.ctx,Z),{value:fe,type:Q,isFunction:ne,defaultValue:Le}=F,Se=F;if(Se.pendingCallDefault)this.ctx.pendingCallDefaultCandidates.push({propName:ae,location:"moduleExports",...Se.pendingCallDefault});S.push({prop_name:ie,kind:N,isFunctionDeclaration:!1,value:fe,typeSeed:Q,explicitType:this.getExplicitPropType(ae),initializerIsFunction:ne,defaultValue:Le,inferredTypeForSource:Q,resolvedJSDoc:Se})}if(S.length===0)return}else return;let v=Ze(this.ctx,this,x);for(let{prop_name:w,kind:N,isFunctionDeclaration:D,value:H,typeSeed:U,explicitType:Z,initializerIsFunction:ae,defaultValue:ie,inferredTypeForSource:F,resolvedJSDoc:fe}of S){let{type:Q,typeSource:ne,description:Le,params:Se,returnType:Ye,isFunction:St,typeParameters:mt}=Ut({explicitType:Z,typeSeed:U,inferredTypeForSource:F,jsdocType:v?.type,jsdocDescription:v?.description,jsdocParams:v?.params,jsdocReturnType:v?.returnType,jsdocTypeParameters:v?.typeParameters,resolvedType:fe?.resolvedType,resolvedDescription:fe?.resolvedDescription,resolvedParams:fe?.resolvedParams,resolvedReturnType:fe?.resolvedReturnType,initializerIsFunction:ae,isFunctionDeclaration:D,typedefs:this.ctx.typedefs});this.addModuleExport(w,{name:w,kind:N,description:Le,deprecated:v?.deprecated,tags:v?.tags,...v?.internal?{internal:!0}:{},type:Q,typeSource:ne,value:H,defaultValue:ie,params:Se,returnType:Ye,typeParameters:mt,isFunction:St,isFunctionDeclaration:D,isRequired:!1,constant:N==="const",reactive:!1,source:se(this.ctx,x)})}};Tr(this.ctx.parsed?.module,(x)=>{if(x.type==="ImportDeclaration")gn(this.ctx,x);if(x.type==="FunctionDeclaration"){let E=x;if(E.id?.name)this.ctx.funcDecls.set(E.id.name,E)}if(x.type==="VariableDeclaration")this.ctx.vars.add(x);if(x.type==="ExportNamedDeclaration"){if(x.declaration!=null){y(x,x.declaration);return}let E=x.source?.value;for(let C of x.specifiers){let S=this.resolveExportSpecifier(x,C);if(!S)continue;if(S.exportedName==="default"){ce(this.ctx,"module-export-conflict",S.exportedName,`export "default" was skipped because it collides with the component's own default export.`,se(this.ctx,x));continue}let v=typeof E==="string"?{from:E,imported:S.localName}:l.get(S.localName);if(S.declaration)y(x,S.declaration,S);else if(v)d(x,S.exportedName,v);else this.recordUnresolvedExportSpecifier(x,S.localName,S.exportedName)}}if(x.type==="ExportAllDeclaration"&&typeof x.source.value==="string"){let E=(x.exported&&pi(x.exported))??"*";d(x,E,{from:x.source.value,imported:"*"})}})}let p,u,m,f=new Set,g=new Set,b=[];Ps(this,this.ctx),this.ctx.activeScopes.push(this.ctx.componentScope);let T=ks(this.ctx),P=(l,d,y)=>{let x=[];if(d.type==="FunctionDeclaration"){let C=d;if(!C.id?.name)return;let S=C.id.name,v=this.ctx.scriptLanguage==="ts"?or(this.ctx,C):void 0;x.push({prop_name:S,kind:"function",isFunctionDeclaration:!0,value:void 0,typeSeed:v?.hasAnnotations?void 0:"() => any",explicitType:v?.hasAnnotations?v.signature:void 0,initializerIsFunction:!0,isRequired:!1,localName:C.id.name,defaultValue:void 0,inferredTypeForSource:void 0,resolvedJSDoc:void 0})}else if(d.type==="VariableDeclaration"){let C=d,S=Io(C.kind),v=y?.declarator?[y.declarator]:C.declarations;for(let w of v){if(!w||typeof w!=="object"||!("id"in w))continue;let{id:N,init:D}=w;if(!N||typeof N!=="object"||!("name"in N))continue;let H=N.name,U=y?.exportedName??H,Z=S==="let"&&D==null,ae=D==null?{isFunction:!1}:ct(this,this.ctx,D),{value:ie,type:F,isFunction:fe,defaultValue:Q}=ae,ne=ae;if(ne.pendingCallDefault)this.ctx.pendingCallDefaultCandidates.push({propName:U,location:"props",...ne.pendingCallDefault});x.push({prop_name:U,kind:S,isFunctionDeclaration:!1,value:ie,typeSeed:F,explicitType:this.getExplicitPropType(H),initializerIsFunction:fe,isRequired:Z,localName:H,defaultValue:Q,inferredTypeForSource:F,resolvedJSDoc:ne})}if(x.length===0)return}else return;let E=Ze(this.ctx,this,l);for(let{prop_name:C,kind:S,isFunctionDeclaration:v,value:w,typeSeed:N,explicitType:D,initializerIsFunction:H,isRequired:U,localName:Z,defaultValue:ae,inferredTypeForSource:ie,resolvedJSDoc:F}of x){let{type:fe,typeSource:Q,description:ne,params:Le,returnType:Se,isFunction:Ye,typeParameters:St}=Ut({explicitType:D,typeSeed:N,inferredTypeForSource:ie,jsdocType:E?.type,jsdocDescription:E?.description,jsdocParams:E?.params,jsdocReturnType:E?.returnType,jsdocTypeParameters:E?.typeParameters,resolvedType:F?.resolvedType,resolvedDescription:F?.resolvedDescription,resolvedParams:F?.resolvedParams,resolvedReturnType:F?.resolvedReturnType,initializerIsFunction:H,isFunctionDeclaration:v,typedefs:this.ctx.typedefs});ot(this.ctx,"prop-unknown-type",C,E?.sveldIgnore),Vt(this,this.ctx,C,{name:C,...Z!==void 0&&Z!==C?{localName:Z}:{},kind:S,description:ne,binding:E?.binding,deprecated:E?.deprecated,tags:E?.tags,...E?.internal?{internal:!0}:{},type:fe,typeSource:Q,value:w,defaultValue:ae,params:Le,returnType:Se,typeParameters:St,isFunction:Ye,isFunctionDeclaration:v,isRequired:U,constant:S==="const",reactive:this.ctx.reactive_vars.has(C),source:se(this.ctx,l)})}};if(Tr(s,(l,d,y)=>{let x=ws(this,this.ctx,T,l);if(x)this.ctx.activeScopes.push(x);let E=l.type;if(!Id.has(E))return;if(l.type==="AssignmentExpression")gr(this.ctx,l.left);if(l.type==="UpdateExpression")gr(this.ctx,l.argument);if(l.type==="CallExpression"){let C=l,S=C.callee&&typeof C.callee==="object"&&"name"in C.callee?C.callee.name:void 0;if(S==="createEventDispatcher"){if(d&&typeof d==="object"&&"id"in d&&d.id&&typeof d.id==="object"&&"name"in d.id)p=d.id.name,u=d;m=C.typeArguments?.params?.[0]}if(S==="$host"){if(d&&typeof d==="object"&&"id"in d&&d.id&&typeof d.id==="object"&&"name"in d.id)f.add(d.id.name)}if(S==="setContext")Ji(this.ctx,this,l,d??void 0);if(S)b.push({name:S,arguments:C.arguments,node:C});if(Ii(C.callee)&&Ne(C.callee.property)&&C.callee.property.name==="dispatchEvent"&&(Ke(C.callee.object,"$host")||Ne(C.callee.object)&&f.has(C.callee.object.name))){let v=ts(this.ctx,C);if(v)g.add(v)}}if(E==="SpreadAttribute"){let C=l;if(C.expression?.name==="$$restProps"||this.ctx.restPropLocals.has(C.expression?.name??""))vs(this.ctx,d)}if(l.type==="FunctionDeclaration"){let C=l;if(C.id?.name)this.ctx.funcDecls.set(C.id.name,C)}if(l.type==="ImportDeclaration")gn(this.ctx,l);if(l.type==="VariableDeclaration"){if(this.ctx.vars.add(l),d&&typeof d==="object"&&"type"in d&&d.type==="Program"&&l.declarations.some((C)=>Ke(at(C.init),"$props")))Ms(this,this.ctx,l)}if(l.type==="ExportNamedDeclaration"){if(l.declaration!=null){P(l,l.declaration);return}for(let C of l.specifiers){let S=this.resolveExportSpecifier(l,C);if(!S)continue;if(S.declaration)P(l,S.declaration,S);else this.recordUnresolvedExportSpecifier(l,S.localName,S.exportedName)}}if(E==="Comment"){let S=l?.data?.trim()??"";if(Do.test(S))this.ctx.componentComment=S.replace(Do,"").replace(Nd,""),this.ctx.componentCommentSource=se(this.ctx,l)}if(E==="SlotElement"){let C=l,S=C.attributes?.find((D)=>D.name==="name")?.value,v=(Array.isArray(S)?S[0]:void 0)?.data,w=(C.attributes||[]).filter((D)=>D.name!=="name").reduce((D,H)=>{let U={value:void 0,replace:!1},Z=H.value;if(Z===void 0||Z===!0)return D;let ae=Array.isArray(Z)?Z[0]:Z;if(ae){let{type:ie,expression:F,raw:fe,start:Q,end:ne}=ae;if(ie==="Text"&&fe!==void 0)U.value=JSON.stringify(fe);else if(!Array.isArray(Z)&&ie==="ExpressionTag"&&F&&typeof F==="object"&&"type"in F&&F.type==="Identifier"&&"name"in F&&F.name===H.name)U.value=F.name,U.replace=!0;if(F&&typeof F==="object"&&"type"in F){if(F.type==="Literal"&&"value"in F){let Le=F.value;U.value=typeof Le==="string"?JSON.stringify(Le):String(Le)}else if(F.type==="MemberExpression")U.value=dn(this.ctx,this,F);else if(F.type!=="Identifier"){if(Q!==void 0&&ne!==void 0){if(F.type==="ObjectExpression"||F.type==="TemplateLiteral")U.value=pe(this.ctx,Q+1,ne-1)}}}}if(H.name)D[H.name]=U;return D},{}),N=C.fragment?.nodes?.map(({start:D,end:H})=>{if(D===void 0||H===void 0)return"";return pe(this.ctx,D,H)??""}).join("").trim();qt(this.ctx,{slot_name:v,slot_props:w,slot_fallback:N,source:se(this.ctx,l)})}if(E==="RenderTag"){let C=l,S=hs(this.ctx,C.expression);if(S){let v,w=!1;if(S.arguments.length===0)v={};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 H=lr(this.ctx,this,S.arguments[0]);v=H.slot_props,w=H.hasUnresolvedSpread}else if(S.arguments.length===1)ce(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.`,se(this.ctx,l));let N=S.publicName==="children"?void 0:S.publicName,D=N===void 0?wd:N;if(v!==void 0)qt(this.ctx,{slot_name:N,slot_props:v,slot_props_unresolved_spread:w||void 0,source:se(this.ctx,l)});if(v!==void 0||this.ctx.slots.has(D))this.ctx.snippetPropLocals.add(S.trackingName)}}if(E==="OnDirective"){let C=l;if(C.expression==null&&C.name){if(d!=null&&typeof d==="object"&&"name"in d){let S=typeof d.name==="string"?d.name:void 0,v="type"in d?String(d.type):void 0;if(S&&v){let w=jt(v)?{type:"InlineComponent",name:S}:{type:"Element",name:S};this.ctx.forwardedEvents.set(C.name,w);let N=this.ctx.events.get(C.name),D=this.ctx.eventDescriptions.get(C.name),H=N?.deprecated,U=N?.internal;if(!N)this.ctx.events.set(C.name,{type:"forwarded",name:C.name,element:w,description:D,deprecated:H,...U?{internal:!0}:{},source:se(this.ctx,l)});else if(N.type==="forwarded"&&D&&!N.description)this.ctx.events.set(C.name,{...N,description:D,deprecated:N.deprecated??H,...N.internal||U?{internal:!0}:{},source:N.source||se(this.ctx,l)})}}}}if(E==="BindDirective"&&d&&typeof d==="object"&&"type"in d&&(Ht(String(d.type))||jt(String(d.type)))){let C=l;if(C.expression?.name){let S=Gt(this.ctx,C.expression.name);if(S)this.ctx.reactive_vars.add(S)}if(Ht(String(d.type))&&C.name==="this"&&C.expression?.name&&"name"in d&&typeof d.name==="string"){let S=Gt(this.ctx,C.expression.name);if(!S)return;let v=d.name;if(this.ctx.bindings.has(S)){let w=this.ctx.bindings.get(S);if(w&&!w.elements.includes(v))this.ctx.bindings.set(S,{...w,elements:[...w.elements,v]})}else this.ctx.bindings.set(S,{elements:[v]})}}},(l)=>{if(Wt(l))this.ctx.activeScopes.pop(),Ns(T,l)},{skipTypeOnlySubtrees:!0}),p!==void 0){Os(this,this.ctx,m,p,se(this.ctx,u));for(let l of b)if(l.name===p){let d=l.arguments[0],y=d&&typeof d==="object"&&"value"in d?d.value:void 0,x=l.arguments[1],E=Yi(this,x),C=E===void 0&&x&&typeof x==="object"&&"value"in x?x.value:void 0;if(y!=null)pt(this.ctx,{name:String(y),detail:E??(C==null?"":sr(C)),has_argument:Boolean(x),source:se(this.ctx,l.node)})}}let k=new Set(g);if(p!==void 0){for(let l of b)if(l.name===p){let d=l.arguments[0],y=d&&typeof d==="object"&&"value"in d?d.value:void 0;if(y!=null)k.add(String(y))}}this.ctx.forwardedEvents.forEach((l,d)=>{let y=this.ctx.events.get(d);if(y&&y.type==="dispatched"&&!k.has(d)){let x=this.ctx.eventDescriptions.get(d),E={type:"forwarded",name:d,element:l,description:x,deprecated:y.deprecated,tags:y.tags,source:y.source};if(y.internal)E.internal=!0;if(y.detail!==void 0&&y.detail!=="undefined")E.detail=y.detail;this.ctx.events.set(d,E)}}),Bs(this.ctx,k);let _=this.ctx.syntaxMode==="runes"?new Set(Array.from(this.ctx.snippetPropLocals,(l)=>this.resolvePublicPropName(l))):new Set,V=be.mapToArray(this.ctx.props).filter((l)=>!_.has(l.name)).map((l)=>{if(this.ctx.bindings.has(l.name)){let d=this.ctx.bindings.get(l.name)?.elements.sort().map((y)=>Mi(y)).join(" | ");return{...l,type:`null | ${d}`,typeSource:"inferred",reactive:l.reactive||this.ctx.reactive_vars.has(l.name)}}return{...l,reactive:l.reactive||this.ctx.reactive_vars.has(l.name)}});this.ctx.activeScopes.length=0;let G=be.mapToArray(this.ctx.slots).map((l)=>{let{slot_props_unresolved_spread:d,...y}=l;if(!l.slot_props)return y;if(typeof l.slot_props==="string")return _d.test(l.slot_props)?{...y,slot_props:"Record<string, never>"}:y;let x=l.slot_props,E=[];for(let v of Object.keys(x)){if(x[v].replace&&x[v].value!==void 0)x[v].value=this.getPropTypeByLocalOrPublic(x[v].value);if(x[v].value===void 0)x[v].value="any";E.push(`${v}: ${x[v].value}`)}let C=d?" & Record<string, any>":"",S=E.length===0?d?"Record<string, any>":"Record<string, never>":E.length===1?`{ ${E[0]} }${C}`:`{
41
+ ${E.join(`;
34
42
  `)};
35
- }${x}`;return{...f,slot_props:C}}).sort((c,l)=>{let f=c.name??"",g=l.name??"";if(f<g)return-1;if(f>g)return 1;return 0});if(this.ctx.deferredSlotBlockGenerics.length>0){let c=[...A.map((l)=>l.type??""),...F.map((l)=>l.slot_props??"")].join(`
36
- `);for(let{name:l,constraint:f}of this.ctx.deferredSlotBlockGenerics){let g=l.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");if(!new RegExp(`\\b${g}\\b`).test(c))continue;this.accumulateGeneric(l,f)}}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=ts(this.ctx.scriptGenericsAttribute.value)}let H=he.mapToArray(this.ctx.moduleExports),N=he.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,l)=>{let f=c.name.localeCompare(l.name);if(f!==0)return f;let g=c.type.localeCompare(l.type);if(g!==0)return g;if(c.type==="forwarded"&&l.type==="forwarded"){let b=c.element.localeCompare(l.element);if(b!==0)return b}return(c.detail??"").localeCompare(l.detail??"")}),O=he.mapToArray(this.ctx.typedefs),I=he.mapToArray(this.ctx.contexts),pe={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 l=pe.props.get(c.name);if(l)c.type="any";let f=l?l.importSource?`Prop "${c.name}" default calls "${l.calleeName}()" imported from "${l.importSource}"; falling back to "any" pending cross-file resolution.`:`Prop "${c.name}" default calls "${l.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,f,c.source)}for(let c of H)if(c.typeSource==="unknown"&&pe.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=O.filter((c)=>c.internal).map((c)=>c.name.split("<")[0]);if(ge.length>0){let c=ge.map((f)=>({name:f,regex:new RegExp(`\\b${f}\\b`)})),l=(f,g,b)=>{if(!g)return;for(let{name:x,regex:C}of c){if(!C.test(g))continue;ae(this.ctx,"internal-typedef-referenced",f,`"${f}" references "${x}", which is @internal and excluded from output; the generated .d.ts will contain a dangling reference to it.`,b)}};for(let f of A){if(f.internal)continue;l(f.name,f.type,f.source)}for(let f of H){if(f.internal)continue;l(f.name,f.type,f.source)}for(let f of O){if(f.internal)continue;l(f.name,f.ts)}for(let f of N){if(f.internal||f.type!=="dispatched")continue;l(f.name,f.detail,f.source)}for(let f of F){if(f.internal)continue;l(f.name??"default",f.slot_props,f.source)}for(let f of I){if(f.internal)continue;for(let g of f.properties)l(g.name,g.type)}}let xe={source:un(this.ctx,0,this.ctx.source?.length),syntaxMode:this.ctx.syntaxMode,...this.ctx.scriptLanguage?{scriptLanguage:this.ctx.scriptLanguage}:{},props:A,moduleExports:H,slots:F,events:N,typedefs:O,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[cn]=a;return xe}}var Co="sveld",vo="0.37.2";var ti="5.57.0";var Po=1,Ao=new WeakMap;function ft(e){return e.some((t)=>t.internal)?e.filter((t)=>!t.internal):e}function hd(e){return{...e,props:ft(e.props),moduleExports:ft(e.moduleExports),slots:ft(e.slots),events:ft(e.events),typedefs:ft(e.typedefs),...e.contexts?{contexts:ft(e.contexts).map((t)=>({...t,properties:ft(t.properties)}))}:{}}}function tn(e,t={}){let n=Ao.get(e),r=n?.get(t.entryExports);if(r)return r;let i=Array.from(e,([,p])=>{let{diagnostics:u,...m}=p;return hd(m)}).sort((p,u)=>p.moduleName.localeCompare(u.moduleName)),o={schemaVersion:Po,generator:{name:Co,version:vo,svelteVersion:ti},total:i.length,components:i},s=t.entryExports?ft(t.entryExports):void 0;if(s&&s.length>0)o.totalExports=s.length,o.exports=s;if(!n)n=new Map,Ao.set(e,n);return n.set(t.entryExports,o),o}var md=/\binterface\s+[A-Za-z_$][\w$]*(\s*<[^{};]*>)?\s*$/;var No=/\s/,yd=/\s{2}|[^\S ]/,gd=/["'`{}/]/g,xd=/["'`{};/]/g;function bd(e){return md.test(e.slice(-200))}var ko=[""];function Td(e){let t=ko[e];if(t===void 0)t=" ".repeat(e),ko[e]=t;return t}function Sd(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 Ed(e){if(e.length===0)return!1;let t=e[e.length-1];return t.charCodeAt(t.length-1)===10}function Cd(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 vd(e){while(e.length>0){let t=e[e.length-1];if(!No.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 Ad(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 Pd(e){if(!yd.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(No.test(o)){if(!r&&t.length>0)t+=" ",r=!0;continue}t+=o,r=!1}return t.trimEnd()}function _o(e,t){let n=e[t],r=e.indexOf(n,t+1);while(r!==-1&&e.charCodeAt(r-1)===92)r=e.indexOf(n,r+1);return r}function Io(e,t){let n=e.indexOf("*/",t+1);return n===-1?-1:n+1}function kd(e){let t=new Map,n=[],r=gd,i=0;while(i<e.length){if(r.lastIndex=i,!r.test(e))break;i=r.lastIndex-1;let o=e.charCodeAt(i);if(o===47){if(e.charCodeAt(i+1)===42){let s=Io(e,i);if(s===-1)break;i=s}}else if(o===34||o===39||o===96){let s=_o(e,i);if(s===-1)break;i=s}else if(o===123)n.push(i);else if(o===125&&n.length>0)t.set(n.pop(),i);i++}return t}function wd(e,t,n){for(let r=t;r<n;r++)if(!ni(e.charCodeAt(r)))return!1;return!0}function ni(e){if(e<=32)return e===32||e>=9&&e<=13;if(e<160)return!1;return e===160||e===5760||e>=8192&&e<=8202||e===8232||e===8233||e===8239||e===8287||e===12288||e===65279}function Do(e,t,n,r){let i=[],o=xd,s=t,p=t;while(p<n){if(o.lastIndex=p,!o.test(e))break;if(p=o.lastIndex-1,p>=n)break;let u=e.charCodeAt(p);if(u===47){if(e.charCodeAt(p+1)===42){let m=Io(e,p);if(m===-1)break;p=m}p++;continue}if(u===34||u===39||u===96){let m=_o(e,p);if(m===-1)break;p=m+1;continue}if(u===123){let m=r.get(p);if(m===void 0||m>=n){p++;continue}if(s<p)i.push(e.slice(s,p));let d=p+1;if(wd(e,d,m)){i.push("{}"),p=m+1,s=p;continue}let y=e.slice(d,m),T=e.charCodeAt(d)===10;if(!T&&!y.includes("/*")&&!Ad(y)&&!bd(Sd(i,200))){let S=Do(e,d,m,r),P=S.trim();if(!P.includes(`
37
- `)){let w=P.endsWith(";")?P.slice(0,-1):P,A=`{ ${Pd(w)} }`;if(A.length<=120){i.push(A),p=m+1,s=p;continue}}if(i.push("{"),S.charCodeAt(0)!==59)i.push(`
38
- `);if(S.length>0)i.push(S);p=m,s=m;continue}if(i.push("{"),!T)i.push(`
39
- `);p=d,s=d;continue}if(u===125){if(s<p)i.push(e.slice(s,p));if(Cd(i),!Ed(i))i.push(`
40
- `);i.push("}"),p++,s=p;continue}if(s<p)i.push(e.slice(s,p));if(vd(i),i.push(";"),e.charCodeAt(p+1)!==10)i.push(`
41
- `);p++,s=p}if(s<n)i.push(e.slice(s,n));return i.join("")}function Nd(e){return Do(e,0,e.length,kd(e))}function _d(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 Id(e){return e===125||e===93||e===41||e===62}function Dd(e,t,n){return n-t>=3&&e.charCodeAt(t)===47&&e.charCodeAt(t+1)===42&&e.charCodeAt(t+2)===42}function wo(e,t,n){let r=e.indexOf("*/",t);return r!==-1&&r+2<=n}function Ld(e){let t=[],n=[],r=e.length,i=0,o=!1,s=0,p=0;while(p<=r){let d=e.indexOf(`
42
- `,p);if(d===-1)d=r;let y=d+1,T=p,S=d;while(T<S&&ni(e.charCodeAt(T)))T++;while(S>T&&ni(e.charCodeAt(S-1)))S--;if(T===S){let N=n.length>0?n[n.length-1]:void 0;if(N!==void 0&&N!==""){let O=N.charCodeAt(N.length-1);if(O!==123&&O!==40&&O!==91)t.push(0),n.push("")}p=y;continue}if(o){if(t.push(s),n.push(` ${e.slice(T,S)}`),wo(e,T,S))o=!1;p=y;continue}let P=Dd(e,T,S),w=P&&wo(e,T,S);if(P&&!w){t.push(i),n.push(e.slice(T,S)),o=!0,s=i,p=y;continue}let A=Id(e.charCodeAt(T)),F=Math.max(0,i-(A?1:0));if(A&&F===0&&n.length>0&&n[n.length-1]==="")t.pop(),n.pop();if(t.push(F),n.push(_d(e.slice(T,S))),p=y,w)continue;let H=0;for(let N=T;N<S;N++){let O=e.charCodeAt(N);if(H!==0){if(O===H&&e.charCodeAt(N-1)!==92)H=0;continue}if(O===34||O===39||O===96)H=O;else if(O===123||O===40||O===91||O===60)i++;else if(O===125||O===41||O===93)i=Math.max(0,i-1);else if(O===62&&e.charCodeAt(N-1)!==61)i=Math.max(0,i-1)}}let u=n.length;while(u>0&&n[u-1]==="")u--;let m=[];for(let d=0;d<u;d++){if(d>0)m.push(`
43
- `);let y=t[d];if(y>0)m.push(Td(y));m.push(n[d])}return m.join("")}function Lo(e){return`${Ld(Nd(e))}
44
- `}var et="any",$e="",Rd="Record<string, any>",ii="Record<string, never>",Md=/^[A-Za-z_$][A-Za-z0-9_$]*$/,Od=/CustomEvent/,Bd=/^[A-Z]/,Fd=/\n/,Bo=/=>/,Vd=/(?:^|\n)@default\b/,si=/\n/g,jd=/\s+/g,_t=/(^|[^.\w])Snippet(?:\s*<|\b)/,$d=/import\s+type\s+[^;]*\bSnippet\b[^;]*from\s+"svelte";/,Hd=/[.*+?^${}()|[\]\\]/g,qd=/^const\s+/;function ai(e){return e.replace(qd,"")}function Ud(e){if(!e)return;return e.replace(si,`
45
- * `)}function Bn(e){if(!e)return"";return`/** ${e} */`}function Fn(e){if(!e)return"";return`/**
46
- * ${e.replace(si,`
43
+ }${C}`;return{...y,slot_props:S}}).sort((l,d)=>{let y=l.name??"",x=d.name??"";if(y<x)return-1;if(y>x)return 1;return 0});if(this.ctx.deferredSlotBlockGenerics.length>0){let l=[...V.map((d)=>d.type??""),...G.map((d)=>d.slot_props??"")].join(`
44
+ `);for(let{name:d,constraint:y}of this.ctx.deferredSlotBlockGenerics){let x=d.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");if(!new RegExp(`\\b${x}\\b`).test(l))continue;this.accumulateGeneric(d,y)}}if(this.ctx.scriptGenericsAttribute){if(this.ctx.generics)ce(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=ps(this.ctx.scriptGenericsAttribute.value)}let A=be.mapToArray(this.ctx.moduleExports),O=be.mapToArray(this.ctx.events).map((l)=>{switch(l.type){case"forwarded":return{...l,element:l.element.name};case"dispatched":return l;default:return l}}).sort((l,d)=>{let y=l.name.localeCompare(d.name);if(y!==0)return y;let x=l.type.localeCompare(d.type);if(x!==0)return x;if(l.type==="forwarded"&&d.type==="forwarded"){let E=l.element.localeCompare(d.element);if(E!==0)return E}return(l.detail??"").localeCompare(d.detail??"")}),I=be.mapToArray(this.ctx.typedefs),re=be.mapToArray(this.ctx.contexts),z={props:new Map(this.ctx.pendingCallDefaultCandidates.filter((l)=>l.location==="props").map((l)=>[l.propName,l])),moduleExports:new Map(this.ctx.pendingCallDefaultCandidates.filter((l)=>l.location==="moduleExports").map((l)=>[l.propName,l]))};for(let l of V)if(l.typeSource==="unknown"){let d=z.props.get(l.name);if(d)l.type="any";let y=d?d.importSource?`Prop "${l.name}" default calls "${d.calleeName}()" imported from "${d.importSource}"; falling back to "any" pending cross-file resolution.`:`Prop "${l.name}" default calls "${d.calleeName}()", but its return type could not be inferred; falling back to "any".`:`Prop "${l.name}" type could not be inferred; falling back to "${l.type??"any"}".`;ce(this.ctx,"prop-unknown-type",l.name,y,l.source)}for(let l of A)if(l.typeSource==="unknown"&&z.moduleExports.has(l.name))l.type="any";for(let l of this.ctx.jsDocEventNames){if(k.has(l))continue;if(this.ctx.forwardedEvents.has(l))continue;if(this.ctx.props.has(`on${l}`))continue;ce(this.ctx,"event-no-source",l,`@event "${l}" has no matching dispatch or callback prop.`,this.ctx.jsDocEventSources.get(l))}if(this.ctx.rest_props?.type==="InlineComponent")ce(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 Y=I.filter((l)=>l.internal).map((l)=>l.name.split("<")[0]);if(Y.length>0){let l=Y.map((y)=>({name:y,regex:new RegExp(`\\b${y}\\b`)})),d=(y,x,E)=>{if(!x)return;for(let{name:C,regex:S}of l){if(!S.test(x))continue;ce(this.ctx,"internal-typedef-referenced",y,`"${y}" references "${C}", which is @internal and excluded from output; the generated .d.ts will contain a dangling reference to it.`,E)}};for(let y of V){if(y.internal)continue;d(y.name,y.type,y.source)}for(let y of A){if(y.internal)continue;d(y.name,y.type,y.source)}for(let y of I){if(y.internal)continue;d(y.name,y.ts)}for(let y of O){if(y.internal||y.type!=="dispatched")continue;d(y.name,y.detail,y.source)}for(let y of G){if(y.internal)continue;d(y.name??"default",y.slot_props,y.source)}for(let y of re){if(y.internal)continue;for(let x of y.properties)d(x.name,x.type)}}let a={source:hn(this.ctx,0,this.ctx.source?.length),syntaxMode:this.ctx.syntaxMode,...this.ctx.scriptLanguage?{scriptLanguage:this.ctx.scriptLanguage}:{},props:V,moduleExports:A,slots:G,events:O,typedefs:I,generics:this.ctx.generics,rest_props:this.ctx.rest_props,extends:this.ctx.extends,componentComment:this.ctx.componentComment,componentCommentSource:this.ctx.componentCommentSource,contexts:re,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()},c=os(this.ctx);if(c)a[un]=c;return a}}var Ro="sveld",Mo="0.37.4";var li="5.57.0";var Bo=1,Oo=new WeakMap;function ht(e){return e.some((t)=>t.internal)?e.filter((t)=>!t.internal):e}function Ld(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 sn(e,t={}){let n=Oo.get(e),r=n?.get(t.entryExports);if(r)return r;let i=Array.from(e,([,p])=>{let{diagnostics:u,...m}=p;return Ld(m)}).sort((p,u)=>p.moduleName.localeCompare(u.moduleName)),o={schemaVersion:Bo,generator:{name:Ro,version:Mo,svelteVersion:li},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,Oo.set(e,n);return n.set(t.entryExports,o),o}var Rd=/\binterface\s+[A-Za-z_$][\w$]*(\s*<[^{};]*>)?\s*$/;var $o=/\s/,Md=/\s{2}|[^\S ]/,Od=/["'`{}/]/g,Bd=/["'`{};/]/g;function Fd(e){return Rd.test(e.slice(-200))}var Fo=[""];function Vd(e){let t=Fo[e];if(t===void 0)t=" ".repeat(e),Fo[e]=t;return t}function $d(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 jd(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 qd(e){while(e.length>0){let t=e[e.length-1];if(!$o.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 Ud(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 Gd(e){if(!Md.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($o.test(o)){if(!r&&t.length>0)t+=" ",r=!0;continue}t+=o,r=!1}return t.trimEnd()}function jo(e,t){let n=e[t],r=e.indexOf(n,t+1);while(r!==-1&&e.charCodeAt(r-1)===92)r=e.indexOf(n,r+1);return r}function Ho(e,t){let n=e.indexOf("*/",t+1);return n===-1?-1:n+1}function Wd(e){let t=new Map,n=[],r=Od,i=0;while(i<e.length){if(r.lastIndex=i,!r.test(e))break;i=r.lastIndex-1;let o=e.charCodeAt(i);if(o===47){if(e.charCodeAt(i+1)===42){let s=Ho(e,i);if(s===-1)break;i=s}}else if(o===34||o===39||o===96){let s=jo(e,i);if(s===-1)break;i=s}else if(o===123)n.push(i);else if(o===125&&n.length>0)t.set(n.pop(),i);i++}return t}function Kd(e,t,n){for(let r=t;r<n;r++)if(!ui(e.charCodeAt(r)))return!1;return!0}function ui(e){if(e<=32)return e===32||e>=9&&e<=13;if(e<160)return!1;return e===160||e===5760||e>=8192&&e<=8202||e===8232||e===8233||e===8239||e===8287||e===12288||e===65279}function qo(e,t,n,r){let i=[],o=Bd,s=t,p=t;while(p<n){if(o.lastIndex=p,!o.test(e))break;if(p=o.lastIndex-1,p>=n)break;let u=e.charCodeAt(p);if(u===47){if(e.charCodeAt(p+1)===42){let m=Ho(e,p);if(m===-1)break;p=m}p++;continue}if(u===34||u===39||u===96){let m=jo(e,p);if(m===-1)break;p=m+1;continue}if(u===123){let m=r.get(p);if(m===void 0||m>=n){p++;continue}if(s<p)i.push(e.slice(s,p));let f=p+1;if(Kd(e,f,m)){i.push("{}"),p=m+1,s=p;continue}let g=e.slice(f,m),b=e.charCodeAt(f)===10;if(!b&&!g.includes("/*")&&!Ud(g)&&!Fd($d(i,200))){let T=qo(e,f,m,r),P=T.trim();if(!P.includes(`
45
+ `)){let k=P.endsWith(";")?P.slice(0,-1):P,_=`{ ${Gd(k)} }`;if(_.length<=120){i.push(_),p=m+1,s=p;continue}}if(i.push("{"),T.charCodeAt(0)!==59)i.push(`
46
+ `);if(T.length>0)i.push(T);p=m,s=m;continue}if(i.push("{"),!b)i.push(`
47
+ `);p=f,s=f;continue}if(u===125){if(s<p)i.push(e.slice(s,p));if(Hd(i),!jd(i))i.push(`
48
+ `);i.push("}"),p++,s=p;continue}if(s<p)i.push(e.slice(s,p));if(qd(i),i.push(";"),e.charCodeAt(p+1)!==10)i.push(`
49
+ `);p++,s=p}if(s<n)i.push(e.slice(s,n));return i.join("")}function zd(e){return qo(e,0,e.length,Wd(e))}function Xd(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 Jd(e){return e===125||e===93||e===41||e===62}function Yd(e,t,n){return n-t>=3&&e.charCodeAt(t)===47&&e.charCodeAt(t+1)===42&&e.charCodeAt(t+2)===42}function Vo(e,t,n){let r=e.indexOf("*/",t);return r!==-1&&r+2<=n}function Qd(e){let t=[],n=[],r=e.length,i=0,o=!1,s=0,p=0;while(p<=r){let f=e.indexOf(`
50
+ `,p);if(f===-1)f=r;let g=f+1,b=p,T=f;while(b<T&&ui(e.charCodeAt(b)))b++;while(T>b&&ui(e.charCodeAt(T-1)))T--;if(b===T){let A=n.length>0?n[n.length-1]:void 0;if(A!==void 0&&A!==""){let O=A.charCodeAt(A.length-1);if(O!==123&&O!==40&&O!==91)t.push(0),n.push("")}p=g;continue}if(o){if(t.push(s),n.push(` ${e.slice(b,T)}`),Vo(e,b,T))o=!1;p=g;continue}let P=Yd(e,b,T),k=P&&Vo(e,b,T);if(P&&!k){t.push(i),n.push(e.slice(b,T)),o=!0,s=i,p=g;continue}let _=Jd(e.charCodeAt(b)),V=Math.max(0,i-(_?1:0));if(_&&V===0&&n.length>0&&n[n.length-1]==="")t.pop(),n.pop();if(t.push(V),n.push(Xd(e.slice(b,T))),p=g,k)continue;let G=0;for(let A=b;A<T;A++){let O=e.charCodeAt(A);if(G!==0){if(O===G&&e.charCodeAt(A-1)!==92)G=0;continue}if(O===34||O===39||O===96)G=O;else if(O===123||O===40||O===91||O===60)i++;else if(O===125||O===41||O===93)i=Math.max(0,i-1);else if(O===62&&e.charCodeAt(A-1)!==61)i=Math.max(0,i-1)}}let u=n.length;while(u>0&&n[u-1]==="")u--;let m=[];for(let f=0;f<u;f++){if(f>0)m.push(`
51
+ `);let g=t[f];if(g>0)m.push(Vd(g));m.push(n[f])}return m.join("")}function Uo(e){return`${Qd(zd(e))}
52
+ `}var rt="any",De="",Zd="Record<string, any>",fi="Record<string, never>",hi=/^[A-Za-z_$][A-Za-z0-9_$]*$/,ef=/CustomEvent/,tf=/^[A-Z]/,nf=/\n/,Xo=/=>/,rf=/(?:^|\n)@default\b/,mi=/\n/g,sf=/\s+/g,Mt=/(^|[^.\w])Snippet(?:\s*<|\b)/,af=/import\s+type\s+[^;]*\bSnippet\b[^;]*from\s+"svelte";/,of=/[.*+?^${}()|[\]\\]/g,cf=/^const\s+/,pf=/\{name\}/g;function yi(e){return e.replace(cf,"")}function lf(e){if(!e)return;return e.replace(mi,`
53
+ * `)}function Hn(e){if(!e)return"";return`/** ${e} */`}function qn(e){if(!e)return"";return`/**
54
+ * ${e.replace(mi,`
47
55
  * `)}
48
- */`}function Fo(e){if(e===void 0)return;return e===!0?"@deprecated":`@deprecated ${e}`}function Gd(e){let t=Fo(e);if(t===void 0)return;return`* ${t.replace(si,`
56
+ */`}function Jo(e){if(e===void 0)return;return e===!0?"@deprecated":`@deprecated ${e}`}function uf(e){let t=Jo(e);if(t===void 0)return;return`* ${t.replace(mi,`
49
57
  * `)}
50
- `}function Wd(e,t){if(!t)return[`@${e}`];if(!t.includes(`
58
+ `}function df(e,t){if(!t)return[`@${e}`];if(!t.includes(`
51
59
  `))return[`@${e} ${t}`];return[`@${e}`,...t.split(`
52
- `)]}function oi(e){let t=[];for(let{name:n,body:r}of e??[])t.push(...Wd(n,r));return t}function nn(e,t,n){let r=Fo(n),i=oi(t),o=i.length>0;if(!e&&!o&&!r)return"";if(!o&&!r)return e?.includes(`
53
- `)?Fn(e):Bn(e);let s=[];if(e)s.push(...e.split(`
60
+ `)]}function gi(e){let t=[];for(let{name:n,body:r}of e??[])t.push(...df(n,r));return t}function an(e,t,n){let r=Jo(n),i=gi(t),o=i.length>0;if(!e&&!o&&!r)return"";if(!o&&!r)return e?.includes(`
61
+ `)?qn(e):Hn(e);let s=[];if(e)s.push(...e.split(`
54
62
  `));if(s.push(...i),r)s.push(...r.split(`
55
63
  `));return`/**
56
64
  * ${s.join(`
57
65
  * `)}
58
- */`}function Kd(e){let t=oi(e);if(t.length===0)return"";return t.map((n)=>`* ${n}
59
- `).join("")}function Vn(e){if(e===void 0)return et;return`${e}
60
- `}function jn(e){if(e.typedefs.length===0)return $e;return e.typedefs.map((t)=>{let n=oi(t.tags),r;if(n.length===0)r=t.description?`${Fn(t.description)}
61
- `:"";else r=`/**
62
- * ${(t.description?[...t.description.split(`
63
- `),...n]:n).join(`
66
+ */`}function ff(e){let t=gi(e);if(t.length===0)return"";return t.map((n)=>`* ${n}
67
+ `).join("")}function Un(e){if(e===void 0)return rt;return`${e}
68
+ `}function Gn(e,t={export:!0},n="all"){if(e.typedefs.length===0)return De;let r=t.export?"export ":"";return e.typedefs.map((i)=>{let o=De;if(n!=="none"){let s=n==="all"?gi(i.tags):[];if(s.length===0)o=i.description?`${qn(i.description)}
69
+ `:"";else o=`/**
70
+ * ${(i.description?[...i.description.split(`
71
+ `),...s]:s).join(`
64
72
  * `)}
65
73
  */
66
- `;return`${r}export ${t.ts}`}).join(`
74
+ `}return`${o}${r}${i.ts}`}).join(`
67
75
 
68
- `)}var Ro=new Map;function Vo(e,t){let n=Ro.get(t);if(n===void 0){let r=t.replace(Hd,"\\$&");n=new RegExp(`\\b${r}\\b`),Ro.set(t,n)}return n.test(e)}var Mo,Oo=[];function ci(e){if(e!==Mo)Mo=e,Oo=We(e);return Oo}function zd(e){if(e===null)return[];return e[0].split(",").map((t,n)=>({name:t.trim(),constraint:(ci(e[1]??"")[n]??t).trim()}))}function Xd(e,t){let n=zd(e).filter(({name:r})=>Vo(t,r));if(n.length===0)return{declSuffix:$e,refSuffix:$e};return{declSuffix:`<${n.map(({constraint:r})=>ai(r)).join(", ")}>`,refSuffix:`<${n.map(({name:r})=>r).join(", ")}>`}}function jo(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:(ci(e.generics?.[1]??"")[r]??n).trim()}));return e.contexts.map((n)=>{let r=n.properties.map((u)=>{let m=u.description?`${Bn(u.description)}
69
- `:"",d=u.optional?"?":"";return`${m}${u.name}${d}: ${u.type};`}).join(`
70
- `),i=n.description?`${Fn(n.description)}
71
- `:"",o=t.filter(({name:u})=>n.properties.some((m)=>Vo(m.type,u))).map(({constraint:u})=>u),s=o.length>0?`<${o.map(ai).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 p=n.hasUnresolvedSpread?" & Record<string, any>":"";return`${i}export type ${n.typeName}${s} = {
72
- ${r}
73
- }${p};`}).join(`
74
-
75
- `)}function It(e){return Md.test(e)?e:JSON.stringify(e)}function $o(e,t){if(!e)return;return`* ${t||e}
76
- `}function pi(e,t,n){return[$o(Ud(e)),Gd(t),Kd(n)].filter(Boolean).join("")}function li(e){return e.length>0?`/**
77
- ${e}*/`:$e}function Jd(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 F=typeof A.value==="string"?A.value.replace(jd," "):A.value,N=Vd.test(A.description??"")||A.value===void 0,O=[pi(A.description,A.deprecated,A.tags),$o(A.constant,"@constant"),N?null:`* @default ${F}
78
- `].filter(Boolean).join(""),I=A.constant&&!A.isFunction?A.value:A.type||et;return`
79
- ${li(O)}
80
- ${It(A.name)}${A.isRequired?"":"?"}: ${I};`}),i=e.canonicalPropsType?r.filter((A,F)=>{let H=t[F];return H?!(e.canonicalPropNames?.has(H.name)??!1):!0}):r,o=(e.slots||[]).filter((A)=>!A.default&&A.name!=null&&!n.has(A.name)).map((A)=>{let F=A.name,H=It(F),N=nn(A.description,A.tags,A.deprecated),O=N?`${N}
81
- `:"",pe=A.slot_props&&A.slot_props!=="Record<string, never>"?`(this: void, ...args: [${A.slot_props}]) => void`:"(this: void) => void";return`
82
- ${O}${H}?: ${pe};`}),s=(e.slots||[]).find((A)=>A.default||A.name===null),p=s&&!n.has("children")?(()=>{let A=nn(s.description,s.tags,s.deprecated),F=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
- ${F}children?: ${N};`})():"",u=e.events?nf({events:e.events},n):[],m=[...o,p,...u].filter(Boolean),d=[...i,...m].join(`
85
- `),y=`${e.moduleName}Props`,T=$e,S=e.generics?`<${ci(e.generics[1]).map((A)=>ai(A.trim())).join(", ")}>`:"",P=e.generics?`<${e.generics[0]}>`:"",w=e.canonicalPropsType?`
86
- type $Props${S} = ${e.canonicalPropsType}${d.trim()===""?"":` & {${d}
76
+ `)}var Go=new Map;function Yo(e,t){let n=Go.get(t);if(n===void 0){let r=t.replace(of,"\\$&");n=new RegExp(`\\b${r}\\b`),Go.set(t,n)}return n.test(e)}var Wo,Ko=[];function xi(e){if(e!==Wo)Wo=e,Ko=ze(e);return Ko}function hf(e){if(e===null)return[];return e[0].split(",").map((t,n)=>({name:t.trim(),constraint:(xi(e[1]??"")[n]??t).trim()}))}function mf(e,t){let n=hf(e).filter(({name:r})=>Yo(t,r));if(n.length===0)return{declSuffix:De,refSuffix:De};return{declSuffix:`<${n.map(({constraint:r})=>yi(r)).join(", ")}>`,refSuffix:`<${n.map(({name:r})=>r).join(", ")}>`}}function Qo(e,t={export:!0},n="all"){if(!e.contexts||e.contexts.length===0)return De;let r=t.export?"export ":"",i=e.generics===null?[]:e.generics[0].split(",").map((o,s)=>({name:o.trim(),constraint:(xi(e.generics?.[1]??"")[s]??o).trim()}));return e.contexts.map((o)=>{let s=o.properties.map((g)=>{let b=n!=="none"&&g.description?`${Hn(g.description)}
77
+ `:"",T=g.optional?"?":"";return`${b}${g.name}${T}: ${g.type};`}).join(`
78
+ `),p=n!=="none"&&o.description?`${qn(o.description)}
79
+ `:"",u=i.filter(({name:g})=>o.properties.some((b)=>Yo(b.type,g))).map(({constraint:g})=>g),m=u.length>0?`<${u.map(yi).join(", ")}>`:"";if(o.properties.length===0)return o.hasUnresolvedSpread?`${p}${r}type ${o.typeName} = Record<string, any>;`:`${p}${r}type ${o.typeName} = Record<string, never>;`;let f=o.hasUnresolvedSpread?" & Record<string, any>":"";return`${p}${r}type ${o.typeName}${m} = {
80
+ ${s}
81
+ }${f};`}).join(`
82
+
83
+ `)}function Ot(e){return hi.test(e)?e:JSON.stringify(e)}function Zo(e,t){if(!e)return;return`* ${t||e}
84
+ `}function Wn(e,t,n,r="all"){if(r==="none")return De;return[Zo(lf(e)),uf(t),r==="all"?ff(n):void 0].filter(Boolean).join("")}function on(e){return e.length>0?`/**
85
+ ${e}*/`:De}function yf(e,t={export:!0},n="all"){let r=t.export?"export ":"",i=e.props.filter((A)=>!A.isFunctionDeclaration&&A.kind!=="const"),o=new Set([...i.map((A)=>A.name),...Array.from(e.canonicalPropNames??[])]),s=i.map((A)=>{let O=typeof A.value==="string"?A.value.replace(sf," "):A.value,re=rf.test(A.description??"")||A.value===void 0,z=[Wn(A.description,A.deprecated,A.tags,n),n==="all"?Zo(A.constant,"@constant"):null,n==="all"&&!re?`* @default ${O}
86
+ `:null].filter(Boolean).join(""),Y=A.constant&&!A.isFunction?A.value:A.type||rt;return`
87
+ ${on(z)}
88
+ ${Ot(A.name)}${A.isRequired?"":"?"}: ${Y};`}),p=e.canonicalPropsType?s.filter((A,O)=>{let I=i[O];return I?!(e.canonicalPropNames?.has(I.name)??!1):!0}):s,u=(e.slots||[]).filter((A)=>!A.default&&A.name!=null&&!o.has(A.name)).map((A)=>{let O=A.name,I=Ot(O),re=an(A.description,A.tags,A.deprecated),z=re?`${re}
89
+ `:"",a=A.slot_props&&A.slot_props!=="Record<string, never>"?`(this: void, ...args: [${A.slot_props}]) => void`:"(this: void) => void";return`
90
+ ${z}${I}?: ${a};`}),m=(e.slots||[]).find((A)=>A.default||A.name===null),f=m&&!o.has("children")?(()=>{let A=an(m.description,m.tags,m.deprecated),O=A?`${A}
91
+ `:"",re=m.slot_props&&m.slot_props!=="Record<string, never>"?`(this: void, ...args: [${m.slot_props}]) => void`:"(this: void) => void";return`
92
+ ${O}children?: ${re};`})():"",g=e.events?Sf({events:e.events},o):[],b=[...u,f,...g].filter(Boolean),T=[...p,...b].join(`
93
+ `),P=Rf(e.moduleName,t.typeNames),k=De,_=e.generics?`<${xi(e.generics[1]).map((A)=>yi(A.trim())).join(", ")}>`:"",V=e.generics?`<${e.generics[0]}>`:"",G=e.canonicalPropsType?`
94
+ type $Props${_} = ${e.canonicalPropsType}${T.trim()===""?"":` & {${T}
87
95
  }`};
88
96
  `:`
89
- type $Props${S} = {
90
- ${d}
97
+ type $Props${_} = {
98
+ ${T}
91
99
  };
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 F="[key: `data-${string}`]: unknown;",H=e.rest_props.description?e.rest_props.description.includes(`
93
- `)?`${Fn(e.rest_props.description)}
94
- `:`${Bn(e.rest_props.description)}
95
- `:"";if(e.extends===void 0)T=`
96
- ${H}${A?`type $RestProps = ${A};
100
+ `;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((re)=>`SvelteHTMLElements["${re.trim()}"]`).join(" & ");let O="[key: `data-${string}`]: unknown;",I=e.rest_props.description?e.rest_props.description.includes(`
101
+ `)?`${qn(e.rest_props.description)}
102
+ `:`${Hn(e.rest_props.description)}
103
+ `:"";if(e.extends===void 0)k=`
104
+ ${I}${A?`type $RestProps = ${A};
97
105
  `:""}
98
- ${e.canonicalPropsType?`type $Props${S} = (${e.canonicalPropsType}) & {${d}
106
+ ${e.canonicalPropsType?`type $Props${_} = (${e.canonicalPropsType}) & {${T}
99
107
 
100
- ${F}
101
- };`:`type $Props${S} = {
102
- ${d}
108
+ ${O}
109
+ };`:`type $Props${_} = {
110
+ ${T}
103
111
 
104
- ${F}
112
+ ${O}
105
113
  };`}
106
114
 
107
- export type ${y}${S} = Omit<$RestProps, keyof $Props${P}> & $Props${P};
108
- `;else T=`
109
- ${H}${A?`type $RestProps = ${A};
115
+ ${r}type ${P}${_} = Omit<$RestProps, keyof $Props${V}> & $Props${V};
116
+ `;else k=`
117
+ ${I}${A?`type $RestProps = ${A};
110
118
  `:""}
111
- ${e.canonicalPropsType?`type $Props${S} = (${e.canonicalPropsType}) & {${d}
119
+ ${e.canonicalPropsType?`type $Props${_} = (${e.canonicalPropsType}) & {${T}
112
120
 
113
- ${F}
114
- };`:`type $Props${S} = {
115
- ${d}
121
+ ${O}
122
+ };`:`type $Props${_} = {
123
+ ${T}
116
124
 
117
- ${F}
125
+ ${O}
118
126
  };`}
119
127
 
120
- export type ${y}${S} = 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)T=`
122
- export type ${y}${S} = ${ii};
123
- `;else if(e.canonicalPropsType)T=`
124
- ${w}
125
- export type ${y}${S} = ${e.extends===void 0?"":`Omit<${e.extends.interface}, keyof $Props${P}> & `}$Props${P};
126
- `;else if(e.extends===void 0)T=`
127
- export type ${y}${S} = {
128
- ${d}
128
+ ${r}type ${P}${_} = Omit<$RestProps, keyof ($Props${V} & ${e.extends.interface})> & Omit<${e.extends.interface}, keyof $Props${V}> & $Props${V};
129
+ `}else if(T.trim()===""&&e.extends===void 0&&!e.canonicalPropsType)k=`
130
+ ${r}type ${P}${_} = ${fi};
131
+ `;else if(e.canonicalPropsType)k=`
132
+ ${G}
133
+ ${r}type ${P}${_} = ${e.extends===void 0?"":`Omit<${e.extends.interface}, keyof $Props${V}> & `}$Props${V};
134
+ `;else if(e.extends===void 0)k=t.propsDeclaration==="interface"&&T.trim()!==""?`
135
+ ${r}interface ${P}${_} {
136
+ ${T}
137
+ }
138
+ `:`
139
+ ${r}type ${P}${_} = {
140
+ ${T}
129
141
  };
130
- `;else T=`
131
- type $Props${S} = {
132
- ${d}
142
+ `;else k=`
143
+ type $Props${_} = {
144
+ ${T}
133
145
  };
134
146
 
135
- export type ${y}${S} = Omit<${e.extends.interface}, keyof $Props${P}> & $Props${P};
136
- `;return{props_name:y,prop_def:T}}function Yd(e){if(e.slots.length===0)return ii;let t=e.slots.map(({name:n,slot_props:r,...i})=>{let o=i.default||n===null?"default":It(n??""),s=nn(i.description,i.tags,i.deprecated);return`${s?`${s}
137
- `:""}${o}: ${Vn(r)};`}).join(`
147
+ ${r}type ${P}${_} = Omit<${e.extends.interface}, keyof $Props${V}> & $Props${V};
148
+ `;return{props_name:P,prop_def:k}}function gf(e){if(e.slots.length===0)return fi;let t=e.slots.map(({name:n,slot_props:r,...i})=>{let o=i.default||n===null?"default":Ot(n??""),s=an(i.description,i.tags,i.deprecated);return`${s?`${s}
149
+ `:""}${o}: ${Un(r)};`}).join(`
138
150
  `);return e.slots.length===1?`{${t}}`:`{
139
151
  ${t}
140
- }`}var Qd=()=>"WindowEventMap",Zd=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 ri(e=et){if(Od.test(e))return e;return`CustomEvent<${e}>`}function ef(e){return Zd.has(e)}function Ho(e){switch(e.type){case"dispatched":return ri(e.detail);case"forwarded":{let t=e.element,r=!(t&&Bd.test(t))||ef(e.name),i=e.detail!==void 0&&e.detail!=="undefined"&&!(e.detail==="null"&&r),o=e.detail==="null"&&!r;if(i||o)return ri(e.detail);else if(r)return`${Qd()}["${e.name}"]`;else return ri()}default:return e}}function tf(e){if(e.events.length===0)return Rd;let t=e.events.map((n)=>{let r="",i=nn(n.description,n.tags,n.deprecated);if(i)r=`${i}
141
- `;return`${r}${It(n.name)}: ${Ho(n)};
152
+ }`}var xf=()=>"WindowEventMap",bf=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 di(e=rt){if(ef.test(e))return e;return`CustomEvent<${e}>`}function Tf(e){return bf.has(e)}function ec(e){switch(e.type){case"dispatched":return di(e.detail);case"forwarded":{let t=e.element,r=!(t&&tf.test(t))||Tf(e.name),i=e.detail!==void 0&&e.detail!=="undefined"&&!(e.detail==="null"&&r),o=e.detail==="null"&&!r;if(i||o)return di(e.detail);else if(r)return`${xf()}["${e.name}"]`;else return di()}default:return e}}function Ef(e){if(e.events.length===0)return Zd;let t=e.events.map((n)=>{let r="",i=an(n.description,n.tags,n.deprecated);if(i)r=`${i}
153
+ `;return`${r}${Ot(n.name)}: ${ec(n)};
142
154
  `}).join("");return e.events.length===1?`{${t}}`:`{
143
- ${t}}`}function nf(e,t){return e.events.map((n)=>{let r=`on${n.name}`;if(t.has(r))return;let i="",o=nn(n.description,n.tags,n.deprecated);if(o)i=`${o}
155
+ ${t}}`}function Sf(e,t){return e.events.map((n)=>{let r=`on${n.name}`;if(t.has(r))return;let i="",o=an(n.description,n.tags,n.deprecated);if(o)i=`${o}
144
156
  `;return`
145
- ${i}${It(r)}?: (event: ${Ho(n)}) => void;`}).filter((n)=>n!==void 0)}function rf(e){let t=e.type==="() => any";if(e.type&&Bo.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 qo(e){return e.props.filter((t)=>t.isFunctionDeclaration||t.kind==="const").map((t)=>{let n=pi(t.description,t.deprecated,t.tags),r=rf(t);return`
146
- ${li(n)}
147
- ${It(t.name)}: ${r};`}).join(`
148
- `)}function sf(e){let t=`${e.moduleName}Exports`,n=qo({props:e.props});if(n.trim()==="")return{exports_name:t,exports_ref:t,exports_def:`export type ${t} = ${ii};`};let{declSuffix:r,refSuffix:i}=Xd(e.generics,n);return{exports_name:t,exports_ref:`${t}${i}`,exports_def:`export type ${t}${r} = {${n}
149
- };`}}function af(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 of(e){let t=e.moduleName==="default"?"$$Component":e.moduleName,n=e.bindings===$e?'""':e.bindings;return`declare const ${t}: Component<
157
+ ${i}${Ot(r)}?: (event: ${ec(n)}) => void;`}).filter((n)=>n!==void 0)}function Cf(e){let t=e.type==="() => any";if(e.type&&Xo.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||rt;return`(${r}) => ${i}`}else if(e.returnType)return`() => ${e.returnType}`;else return e.type||rt}function tc(e,t="all"){return e.props.filter((n)=>n.isFunctionDeclaration||n.kind==="const").map((n)=>{let r=Wn(n.description,n.deprecated,n.tags,t),i=Cf(n);return`
158
+ ${on(r)}
159
+ ${Ot(n.name)}: ${i};`}).join(`
160
+ `)}function vf(e,t={export:!0},n="all"){let r=t.export?"export ":"",i=Mf(e.moduleName,t.typeNames),o=tc({props:e.props},n);if(o.trim()==="")return{exports_name:i,exports_ref:i,exports_def:`${r}type ${i} = ${fi};`};let{declSuffix:s,refSuffix:p}=mf(e.generics,o);return{exports_name:i,exports_ref:`${i}${p}`,exports_def:`${r}type ${i}${s} = {${o}
161
+ };`}}function Af(e){let t=e.props.filter((n)=>n.bindable===!0||n.binding==="writable").map((n)=>JSON.stringify(n.name));return t.length===0?De:t.join(" | ")}function Pf(e){let t=e.moduleName==="default"?"$$Component":e.moduleName,n=e.bindings===De?'""':e.bindings;return`declare const ${t}: Component<
150
162
  ${e.propsRef},
151
163
  ${e.exportsRef},
152
164
  ${n}
153
165
  >;
154
- export default ${t};`}function cf(e){let t=e.moduleName==="default"?"$$Component":e.moduleName,n=`${t}Component`,r=e.bindings===$e?'""':e.bindings;return`interface ${n} {
166
+ export default ${t};`}function kf(e){let t=e.moduleName==="default"?"$$Component":e.moduleName,n=`${t}Component`,r=e.bindings===De?'""':e.bindings;return`interface ${n} {
155
167
  new ${e.generic}(
156
168
  options: ComponentConstructorOptions<${e.propsRef}>
157
169
  ): SvelteComponent<${e.propsRef}> & ${e.exportsRef};
@@ -167,60 +179,66 @@ ${t}}`}function nf(e,t){return e.events.map((n)=>{let r=`on${n.name}`;if(t.has(r
167
179
  z_$$bindings?: ${r};
168
180
  }
169
181
  declare const ${t}: ${n};
170
- export default ${t};`}function pf(e){if(e.extends===void 0)return"";return`import type { ${e.extends.interface} } from ${e.extends.import};`}function lf(e){if(!e.componentComment)return"";if(!Fd.test(e.componentComment))return Bn(e.componentComment.trim());return`/*${e.componentComment.split(`
171
- `).map((t)=>`* ${t}`).join(`
182
+ export default ${t};`}function wf(e){if(e.extends===void 0)return"";return`import type { ${e.extends.interface} } from ${e.extends.import};`}function Nf(e,t="all"){if(t==="none"||!e.componentComment)return"";if(!nf.test(e.componentComment))return Hn(e.componentComment.trim());return`/*${e.componentComment.split(`
183
+ `).map((n)=>`* ${n}`).join(`
172
184
  `)}
173
- */`}function uf(e){return e.moduleExports.map((t)=>{let n=pi(t.description,t.deprecated,t.tags),r,i=t.type&&Bo.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 p=t.params.map((m)=>{let d=m.optional?"?":"";return`${m.name}${d}: ${m.type}`}).join(", "),u=t.returnType||et;r=`export declare function ${t.name}(${p}): ${u};`}else if(t.returnType)r=`export declare function ${t.name}(): ${t.returnType};`;else if(i&&t.type&&!o){let[s,p,...u]=t.type.split("=>"),m=u.map((d)=>` => ${d.trim()}`).join("");r=`export declare function ${t.name}${s.trimEnd()}: ${p.trim()}${m};`}else if(i&&t.type){let[s,p,...u]=t.type.split("=>"),m=u.map((d)=>` => ${d.trim()}`).join("");r=`export declare function ${t.name}${s.trimEnd()}: ${p.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
- ${li(n)}
177
- ${r}`}).join(`
178
- `)}var df=120;function ff(e){let n=`export default class ${e.moduleName==="default"?"":e.moduleName}${e.generic} extends SvelteComponentTyped<`,r=[e.genericProps,e.events,e.slots];if(e.accessors.trim()===""&&r.every((i)=>!i.includes(`
179
- `))){let i=`${n}${r.join(", ")}> {}`;if(i.length<=df)return i}return`${n}
185
+ */`}function zo(e){return hi.test(e)?e:JSON.stringify(e)}function _f(e,t){let n=[],r=new Map;for(let i of e.moduleExports){if(i.kind!=="re-export"||!i.reExport)continue;let{from:o,imported:s}=i.reExport,p=Wn(i.description,i.deprecated,i.tags,t),u=zo(i.name);if(s==="*"){let g=i.name==="*"?"*":`* as ${u}`;n.push(`${on(p)}
186
+ export ${g} from ${JSON.stringify(o)};`);continue}let m=`${o}\x00${p}`,f=r.get(m);if(!f)f={comments:p,from:o,specifiers:[]},r.set(m,f),n.push(m);f.specifiers.push(s===i.name?u:`${zo(s)} as ${u}`)}return n.map((i)=>{let o=r.get(i);if(!o)return i;return`${on(o.comments)}
187
+ export { ${o.specifiers.join(", ")} } from ${JSON.stringify(o.from)};`}).join(`
188
+
189
+ `)}function If(e,t="all"){let n=_f(e,t),r=e.moduleExports.filter((i)=>i.kind!=="re-export").map((i)=>{let o=Wn(i.description,i.deprecated,i.tags,t),s,p=i.type&&Xo.test(i.type),u=i.type==="() => any",m=i.typeParameters?`<${i.typeParameters}>`:"";if(i.kind==="const"&&!p)s=`export declare const ${i.name}: ${i.type||rt};
190
+ `;else if(i.params&&i.params.length>0){let g=i.params.map((T)=>{let P=T.optional?"?":"";return`${T.name}${P}: ${T.type}`}).join(", "),b=i.returnType||rt;s=`export declare function ${i.name}${m}(${g}): ${b};`}else if(i.returnType)s=`export declare function ${i.name}${m}(): ${i.returnType};`;else if(p&&i.type&&!u){let[f,g,...b]=i.type.split("=>"),T=b.map((P)=>` => ${P.trim()}`).join("");s=`export declare function ${i.name}${f.trimEnd()}: ${g.trim()}${T};`}else if(p&&i.type){let[f,g,...b]=i.type.split("=>"),T=b.map((P)=>` => ${P.trim()}`).join("");s=`export declare function ${i.name}${f.trimEnd()}: ${g.trim()}${T};`}else if(i.kind==="const")s=`export declare const ${i.name}: ${i.type||rt};
191
+ `;else s=`export type ${i.name} = ${i.type||rt};`;return`
192
+ ${on(o)}
193
+ ${s}`}).join(`
194
+ `);return[n,r].filter(Boolean).join(`
195
+
196
+ `)}var Df=120;function Lf(e){let n=`export default class ${e.moduleName==="default"?"":e.moduleName}${e.generic} extends SvelteComponentTyped<`,r=[e.genericProps,e.events,e.slots];if(e.accessors.trim()===""&&r.every((i)=>!i.includes(`
197
+ `))){let i=`${n}${r.join(", ")}> {}`;if(i.length<=Df)return i}return`${n}
180
198
  ${e.genericProps},
181
199
  ${e.events},
182
200
  ${e.slots}
183
201
  > {
184
202
  ${e.accessors}
185
- }`}function hf(e,t){let n=Gn(e),{moduleName:r,typedefs:i,generics:o,props:s,moduleExports:p,slots:u,events:m,rest_props:d,extends:y,componentComment:T,contexts:S,syntaxMode:P}=e,w=t?.format==="component",A=o!==null,{props_name:F,prop_def:H}=Jd({moduleName:r,props:s,rest_props:d,extends:y,generics:o,slots:u,canonicalPropNames:new Set(n?.canonicalPropNames??[]),canonicalPropsType:n?.canonicalPropsType,events:w&&P==="legacy"?m:void 0}),N=o?`<${o[1]}>`:"",O=o?`${F}<${o[0]}>`:F,I=uf({moduleExports:p}),pe=jn({typedefs:i}),ge=jo({contexts:S,generics:o}),xe=(n?.typeImportStatements??[]).join(`
186
- `),a=(n?.localTypeDeclarations??[]).join(`
203
+ }`}function nc(e,t,n){let r=n.replace(pf,t);if(!n.includes("{name}")||!hi.test(r))throw Error(`sveld: typesOptions.typeNames.${e} must contain "{name}" and produce a valid identifier; got "${n}".`);return r}function Rf(e,t){return nc("props",e,t?.props??"{name}Props")}function Mf(e,t){return nc("exports",e,t?.exports??"{name}Exports")}function Of(e,t,n){if(e===void 0||e===!0)return{...t};if(e===!1)return{props:!1,exports:!1,typedefs:!1,contexts:!1};return{props:e.props??n,exports:e.exports??n,typedefs:e.typedefs??n,contexts:e.contexts??n}}var Bf={props:!0,exports:!0,typedefs:!0,contexts:!0};function Ff(e){let t=Of(e?.exportTypes,Bf,!0);if(e?.forceExportProps===!0)t.props=!0;return t}function Vf(e,t){let n=Qn(e),{moduleName:r,typedefs:i,generics:o,props:s,moduleExports:p,slots:u,events:m,rest_props:f,extends:g,componentComment:b,contexts:T,syntaxMode:P}=e,k=t?.format==="component",_=o!==null,V=Ff(t),G=t?.comments??"all",{props_name:A,prop_def:O}=yf({moduleName:r,props:s,rest_props:f,extends:g,generics:o,slots:u,canonicalPropNames:new Set(n?.canonicalPropNames??[]),canonicalPropsType:n?.canonicalPropsType,events:k&&P==="legacy"?m:void 0},{export:V.props,typeNames:t?.typeNames,propsDeclaration:t?.propsDeclaration},G),I=o?`<${o[1]}>`:"",re=o?`${A}<${o[0]}>`:A,z=If({moduleExports:p},G),Y=Gn({typedefs:i},{export:V.typedefs},G),a=Qo({contexts:T,generics:o},{export:V.contexts},G),c=new Set(t?.inlined?.droppedImportStatements??[]),l=(n?.typeImportStatements??[]).filter((U)=>!c.has(U)).join(`
204
+ `),d=[...t?.inlined?.declarations??[],...n?.localTypeDeclarations??[]].join(`
187
205
 
188
- `),{exports_ref:c,exports_def:l}=w?sf({props:s,moduleName:r,generics:o}):{exports_ref:$e,exports_def:$e},f=w?af({props:s}):$e,g=!$d.test(xe)&&(_t.test(H)||_t.test(I)||_t.test(pe)||_t.test(ge)||_t.test(a)||_t.test(l)),b=d?.type==="Element"&&(d.name!=="svelte:element"||d.name==="svelte:element"&&d.thisValue),x=d?.type==="Element"&&d.name==="svelte:element"&&!d.thisValue,v=[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";`,b?'import type { SvelteHTMLElements } from "svelte/elements";':"",x?'import type { HTMLAttributes } from "svelte/elements";':"",xe,pf({extends:y})].filter(Boolean).join(`
189
- `),E=w?A?cf({moduleName:r,generic:N,propsRef:O,exportsRef:c,bindings:f}):of({moduleName:r,propsRef:O,exportsRef:c,bindings:f}):ff({moduleName:r,generic:N,genericProps:O,events:tf({events:m}),slots:Yd({slots:u}),accessors:qo({props:s})}),k=[I,pe,a,ge,H,l,[lf({componentComment:T}),E].filter(Boolean).join(`
190
- `)].map((_)=>_.trim()).filter(Boolean).join(`
206
+ `),{exports_ref:y,exports_def:x}=k?vf({props:s,moduleName:r,generics:o},{export:V.exports,typeNames:t?.typeNames},G):{exports_ref:De,exports_def:De},E=k?Af({props:s}):De,C=!af.test(l)&&(Mt.test(O)||Mt.test(z)||Mt.test(Y)||Mt.test(a)||Mt.test(d)||Mt.test(x)),S=f?.type==="Element"&&(f.name!=="svelte:element"||f.name==="svelte:element"&&f.thisValue),v=f?.type==="Element"&&f.name==="svelte:element"&&!f.thisValue,N=[k?_?`import type { SvelteComponent, ComponentConstructorOptions, ComponentInternals${C?", Snippet":""} } from "svelte";`:`import type { Component${C?", Snippet":""} } from "svelte";`:`import { SvelteComponentTyped${C?", type Snippet":""} } from "svelte";`,S?'import type { SvelteHTMLElements } from "svelte/elements";':"",v?'import type { HTMLAttributes } from "svelte/elements";':"",l,wf({extends:g})].filter(Boolean).join(`
207
+ `),D=k?_?kf({moduleName:r,generic:I,propsRef:re,exportsRef:y,bindings:E}):Pf({moduleName:r,propsRef:re,exportsRef:y,bindings:E}):Lf({moduleName:r,generic:I,genericProps:re,events:Ef({events:m}),slots:gf({slots:u}),accessors:tc({props:s},G)}),H=[z,Y,d,a,O,x,[Nf({componentComment:b},G),D].filter(Boolean).join(`
208
+ `)].map((U)=>U.trim()).filter(Boolean).join(`
191
209
 
192
- `);return Lo([v,k].filter(Boolean).join(`
210
+ `);return Uo([N,H].filter(Boolean).join(`
193
211
 
194
- `))}var di=/`/g,Uo=/\s+/g,qe="--",Go=`| Prop name | Required | Kind | Reactive | Binding | Type | Default value | Description |
212
+ `))}var Ti=/`/g,rc=/\s+/g,We="--",ic=`| Prop name | Required | Kind | Reactive | Binding | Type | Default value | Description |
195
213
  | :- | :- | :- | :- | :- | :- | :- | :- |
196
- `,Wo=`| Slot name | Default | Props | Fallback | Description |
214
+ `,sc=`| Slot name | Default | Props | Fallback | Description |
197
215
  | :- | :- | :- | :- | :- |
198
- `,Ko=`| Event name | Type | Detail | Description |
216
+ `,ac=`| Event name | Type | Detail | Description |
199
217
  | :- | :- | :- | :- |
200
- `,fi=`| Name | Kind | Type | Description |
218
+ `,Ei=`| Name | Kind | Type | Description |
201
219
  | :- | :- | :- | :- |
202
- `,zo=`| Part name | Description |
220
+ `,oc=`| Part name | Description |
203
221
  | :- | :- |
204
- `,Xo=`| Property name | Type | Default value | Description |
222
+ `,cc=`| Property name | Type | Default value | Description |
205
223
  | :- | :- | :- | :- |
206
- `,sn=/\|/g,mf=/</g,yf=/>/g,Dt=/\n/g,gf=/\{@link\s+([^{}\s|]+)(?:\|([^{}]+))?\}/g;function ui(e){return e.replace(gf,(t,n,r)=>`[${r===void 0?n:r.trim()}](${n})`)}function tt(e){if(e===void 0)return qe;return`<code>${e.replace(sn,"&#124;")}</code>`}function rn(e){return e.replace(mf,"&lt;").replace(yf,"&gt;")}function hi(e){if(e===void 0)return qe;return`<code>${e.replace(di,"\\`").replace(sn,"&#124;")}</code>`}function Lt(e,t){if(t===void 0)return e;let n=typeof t==="string"&&t.trim().length>0?`: ${rn(t).replace(Dt," ").replace(sn,"&#124;")}`:"";return`<s>${e}</s><br />**Deprecated**${n}`}function $n(e){if(e===void 0||e.trim().length===0)return qe;return rn(ui(e)).replace(sn,"&#124;").replace(Dt,"<br />")}function Jo(e){if(e===void 0||e==="{}")return qe;return tt(Vn(e).replace(Dt," "))}function Yo(e){if(e===void 0)return qe;return tt(rn(e).replace(Dt,"<br />"))}function an(e,t){let n=[];if(e!==void 0&&e.trim().length>0)n.push(rn(ui(e)));for(let{name:r,body:i}of t??[]){let o=i?.trim();n.push(o?`@${r} ${rn(ui(o))}`:`@${r}`)}if(n.length===0)return qe;return n.join(`
207
- `).replace(sn,"&#124;").replace(Dt,"<br />")}function Qo(e){if(e===void 0)return qe;return tt(e.replace(Dt," "))}function yi(e,t,n){if(e.append("h1","Component Index"),e.append("h2","Components").tableOfContents(),e.append("divider"),n&&n.length>0)xf(e,n);let r=tn(t);for(let i of r.components)Sf(e,i)}function xf(e,t){e.append("h2","Exports"),e.append("raw",fi);for(let n of t){let r=(n.type??n.value)?.replace(Uo," ").trim();e.append("raw",`| ${Lt(n.name,n.deprecated)} | ${`<code>${n.kind}</code>`} | ${tt(r)} | ${$n(n.description)} |
224
+ `,pn=/\|/g,$f=/</g,jf=/>/g,Bt=/\n/g,Hf=/^[A-Za-z_$][\w$]*$/,qf=/\{@link\s+([^{}\s|]+)(?:\|([^{}]+))?\}/g;function bi(e){return e.replace(qf,(t,n,r)=>`[${r===void 0?n:r.trim()}](${n})`)}function Je(e){if(e===void 0)return We;return`<code>${e.replace(pn,"&#124;")}</code>`}function pc(e){if(!e.reExport)return Je(e.type);let{from:t,imported:n}=e.reExport,r=n==="*"?"":Hf.test(n)?`.${n}`:`[${JSON.stringify(n)}]`;return Je(`typeof import(${JSON.stringify(t)})${r}`)}function cn(e){return e.replace($f,"&lt;").replace(jf,"&gt;")}function Si(e){if(e===void 0)return We;return`<code>${e.replace(Ti,"\\`").replace(pn,"&#124;")}</code>`}function Ft(e,t){if(t===void 0)return e;let n=typeof t==="string"&&t.trim().length>0?`: ${cn(t).replace(Bt," ").replace(pn,"&#124;")}`:"";return`<s>${e}</s><br />**Deprecated**${n}`}function Kn(e){if(e===void 0||e.trim().length===0)return We;return cn(bi(e)).replace(pn,"&#124;").replace(Bt,"<br />")}function lc(e){if(e===void 0||e==="{}")return We;return Je(Un(e).replace(Bt," "))}function uc(e){if(e===void 0)return We;return Je(cn(e).replace(Bt,"<br />"))}function ln(e,t){let n=[];if(e!==void 0&&e.trim().length>0)n.push(cn(bi(e)));for(let{name:r,body:i}of t??[]){let o=i?.trim();n.push(o?`@${r} ${cn(bi(o))}`:`@${r}`)}if(n.length===0)return We;return n.join(`
225
+ `).replace(pn,"&#124;").replace(Bt,"<br />")}function dc(e){if(e===void 0)return We;return Je(e.replace(Bt," "))}function vi(e,t,n){if(e.append("h1","Component Index"),e.append("h2","Components").tableOfContents(),e.append("divider"),n&&n.length>0)Uf(e,n);let r=sn(t);for(let i of r.components)Kf(e,i)}function Uf(e,t){e.append("h2","Exports"),e.append("raw",Ei);for(let n of t){let r=(n.type??n.value)?.replace(rc," ").trim();e.append("raw",`| ${Ft(n.name,n.deprecated)} | ${`<code>${n.kind}</code>`} | ${Je(r)} | ${Kn(n.description)} |
208
226
  `)}e.append("raw",`
209
- `),e.append("divider")}function bf(e){return e.kind==="const"||e.isFunctionDeclaration}function Tf(e,t){e.append("h3","Module exports"),e.append("raw",fi);for(let n of t)e.append("raw",`| ${Lt(n.name,n.deprecated)} | ${`<code>${n.kind}</code>`} | ${tt(n.type)} | ${an(n.description,n.tags)} |
227
+ `),e.append("divider")}function Gf(e){return e.kind==="const"||e.isFunctionDeclaration}function Wf(e,t){e.append("h3","Module exports"),e.append("raw",Ei);for(let n of t)e.append("raw",`| ${Ft(n.name,n.deprecated)} | ${`<code>${n.kind}</code>`} | ${pc(n)} | ${ln(n.description,n.tags)} |
210
228
  `);e.append("raw",`
211
- `)}function mi(e,t,n,r){if(t.length>0)n(),e.append("raw",`
212
- `);else e.append("p",r??"None.")}function Sf(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
- ${jn({typedefs:t.typedefs})}
229
+ `)}function Ci(e,t,n,r){if(t.length>0)n(),e.append("raw",`
230
+ `);else e.append("p",r??"None.")}function Kf(e,t){if(e.append("h2",`\`${t.moduleName}\``),t.generics)e.append("p",`**Type parameters:** ${Je(`<${t.generics[1]}>`)}`);if(t.typedefs.length>0)e.append("h3","Types").append("raw",`\`\`\`ts
231
+ ${Gn({typedefs:t.typedefs})}
214
232
  \`\`\`
215
233
 
216
- `);if(e.append("h3","Props"),mi(e,t.props,()=>{e.append("raw",Go);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=bf(i)?"accessor":i.kind;e.append("raw",`| ${Lt(i.name,i.deprecated)} | ${i.isRequired?"Yes":"No"} | ${`<code>${o}</code>`} | ${i.reactive?"Yes":"No"} | ${i.binding??"--"} | ${tt(i.type)} | ${hi(i.value)} | ${an(i.description,i.tags)} |
217
- `)}}),t.moduleExports.length>0)Tf(e,t.moduleExports);if(e.append("h3","Slots"),mi(e,t.slots,()=>{e.append("raw",Wo);for(let n of t.slots)e.append("raw",`| ${Lt(n.default?qe:n.name??qe,n.deprecated)} | ${n.default?"Yes":"No"} | ${Jo(n.slot_props)} | ${Yo(n.fallback)} | ${an(n.description,n.tags)} |
218
- `)}),e.append("h3","Events"),mi(e,t.events,()=>{e.append("raw",Ko);for(let n of t.events)e.append("raw",`| ${Lt(n.name,n.deprecated)} | ${n.type} | ${n.type==="dispatched"?Qo(n.detail):qe} | ${an(n.description,n.tags)} |
219
- `)}),t.cssParts&&t.cssParts.length>0){e.append("h3","CSS Parts"),e.append("raw",zo);for(let n of t.cssParts)e.append("raw",`| ${n.name} | ${$n(n.description)} |
234
+ `);if(e.append("h3","Props"),Ci(e,t.props,()=>{e.append("raw",ic);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=Gf(i)?"accessor":i.kind;e.append("raw",`| ${Ft(i.name,i.deprecated)} | ${i.isRequired?"Yes":"No"} | ${`<code>${o}</code>`} | ${i.reactive?"Yes":"No"} | ${i.binding??"--"} | ${Je(i.type)} | ${Si(i.value)} | ${ln(i.description,i.tags)} |
235
+ `)}}),t.moduleExports.length>0)Wf(e,t.moduleExports);if(e.append("h3","Slots"),Ci(e,t.slots,()=>{e.append("raw",sc);for(let n of t.slots)e.append("raw",`| ${Ft(n.default?We:n.name??We,n.deprecated)} | ${n.default?"Yes":"No"} | ${lc(n.slot_props)} | ${uc(n.fallback)} | ${ln(n.description,n.tags)} |
236
+ `)}),e.append("h3","Events"),Ci(e,t.events,()=>{e.append("raw",ac);for(let n of t.events)e.append("raw",`| ${Ft(n.name,n.deprecated)} | ${n.type} | ${n.type==="dispatched"?dc(n.detail):We} | ${ln(n.description,n.tags)} |
237
+ `)}),t.cssParts&&t.cssParts.length>0){e.append("h3","CSS Parts"),e.append("raw",oc);for(let n of t.cssParts)e.append("raw",`| ${n.name} | ${Kn(n.description)} |
220
238
  `);e.append("raw",`
221
- `)}if(t.cssProperties&&t.cssProperties.length>0){e.append("h3","CSS Custom Properties"),e.append("raw",Xo);for(let n of t.cssProperties)e.append("raw",`| ${n.name} | ${tt(n.type)} | ${hi(n.default)} | ${$n(n.description)} |
239
+ `)}if(t.cssProperties&&t.cssProperties.length>0){e.append("h3","CSS Custom Properties"),e.append("raw",cc);for(let n of t.cssProperties)e.append("raw",`| ${n.name} | ${Je(n.type)} | ${Si(n.default)} | ${Kn(n.description)} |
222
240
  `);e.append("raw",`
223
- `)}}var Ef=/^=>\s*/;function Cf(e){let t=e.trim();if(!t.startsWith("("))return{parameters:[],returnTypeText:t||"any"};let n=0,r=-1;for(let p=0;p<t.length;p++)if(t[p]==="(")n++;else if(t[p]===")"){if(n--,n===0){r=p;break}}if(r===-1)return{parameters:[],returnTypeText:"any"};let i=t.slice(1,r).trim(),o=t.slice(r+1).trim().replace(Ef,"");return{parameters:i===""?[]:We(i).map((p)=>{let u=p.trim(),m=u.startsWith("..."),d=m?u.slice(3):u,y=d.indexOf(":"),T=(y===-1?d:d.slice(0,y)).trim(),S=y===-1?void 0:d.slice(y+1).trim(),P=T.endsWith("?"),w={name:P?T.slice(0,-1):T};if(S)w.type={text:S};if(P)w.optional=!0;if(m)w.rest=!0;return w}),returnTypeText:o||"any"}}function vf(e){if(e.params!==void 0||e.returnType!==void 0)return{parameters:(e.params??[]).map((n)=>{let r={name:n.name};if(n.type)r.type={text:n.type};if(n.optional)r.optional=!0;return r}),returnTypeText:e.returnType??"any"};return e.type?Cf(e.type):{parameters:[],returnTypeText:"any"}}function Af(e){return e.map((t)=>{if(t.isFunctionDeclaration){let{parameters:r,returnTypeText:i}=vf(t),o={kind:"method",name:t.name,static:!1};if(r.length>0)o.parameters=r;if(o.return={type:{text:i}},t.description)o.description=t.description;if(t.deprecated!==void 0)o.deprecated=t.deprecated;return o}let n={kind:"field",name:t.name};if(t.type)n.type={text:t.type};if(t.value!==void 0)n.default=t.value;if(t.description)n.description=t.description;if(t.deprecated!==void 0)n.deprecated=t.deprecated;if(t.kind==="const")n.readonly=!0;return n})}function Pf(e){let t=e.customElement?.props,n=new Map,r=[];for(let i of e.props){if(i.isFunctionDeclaration)continue;let o=t?.[i.name];if(o?.attribute===!1)continue;let s=o?.attribute||i.name.toLowerCase(),p=n.get(s);if(p!==void 0){console.warn(`sveld: props "${p}" and "${i.name}" of component "${e.moduleName}" both map to the custom-element attribute "${s}"; only "${p}" is included.`);continue}n.set(s,i.name);let m=o?.type==="Array"||o?.type==="Object"?[i.description,"Serialized to/from JSON for the attribute."].filter(Boolean).join(" "):i.description,d={name:s,fieldName:i.name};if(i.type)d.type={text:i.type};if(i.value!==void 0)d.default=i.value;if(m)d.description=m;if(o?.reflect)d.reflects=!0;r.push(d)}return r}function kf(e){if(!e||e.length===0)return;return e.map((t)=>{let n={name:t.name};if(t.description)n.description=t.description;return n})}function wf(e){if(!e||e.length===0)return;return e.map((t)=>{let n={name:t.name};if(t.type)n.type={text:t.type};if(t.default!==void 0)n.default=t.default;if(t.description)n.description=t.description;return n})}function Nf(e){return e.filter((t)=>t.type==="dispatched").map((t)=>{let n={name:t.name,type:{text:`CustomEvent<${t.detail??"unknown"}>`}};if(t.description)n.description=t.description;if(t.deprecated!==void 0)n.deprecated=t.deprecated;return n})}function _f(e){return e.map((t)=>{let n={name:t.default?"":t.name??""};if(t.description)n.description=t.description;if(t.deprecated!==void 0)n.deprecated=t.deprecated;return n})}function If(e){let t=kf(e.cssParts),n=wf(e.cssProperties),r=Af(e.props),i=Pf(e),o=Nf(e.events),s=_f(e.slots),p=e.moduleName,u=e.componentComment?{kind:"class",name:p,description:e.componentComment,members:r,attributes:i,events:o,slots:s}:{kind:"class",name:p,members:r,attributes:i,events:o,slots:s};if(t)u.cssParts=t;if(n)u.cssProperties=n;if(e.customElementTag)u.tagName=e.customElementTag,u.customElement=!0;return u}function Df(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 Lf(e,t={}){let n=tn(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:[If(o)],exports:Df(o,s)}})}}var Rf=/[^\w\- ]+/g,Mf=/\s+/g;function Of(e,t){let n=e.toLowerCase().replace(di,"").replace(Rf,"").replace(Mf,"-"),r=t.get(n)??0;return t.set(n,r+1),r===0?n:`${n}-${r}`}class gi{sourceParts=[];hasToC=!1;toc=[];get source(){return this.sourceParts.join("")}appendLineBreaks(){return this.sourceParts.push(`
241
+ `)}}var zf=/^=>\s*/;function Xf(e){let t=e.trim();if(!t.startsWith("("))return{parameters:[],returnTypeText:t||"any"};let n=0,r=-1;for(let p=0;p<t.length;p++)if(t[p]==="(")n++;else if(t[p]===")"){if(n--,n===0){r=p;break}}if(r===-1)return{parameters:[],returnTypeText:"any"};let i=t.slice(1,r).trim(),o=t.slice(r+1).trim().replace(zf,"");return{parameters:i===""?[]:ze(i).map((p)=>{let u=p.trim(),m=u.startsWith("..."),f=m?u.slice(3):u,g=f.indexOf(":"),b=(g===-1?f:f.slice(0,g)).trim(),T=g===-1?void 0:f.slice(g+1).trim(),P=b.endsWith("?"),k={name:P?b.slice(0,-1):b};if(T)k.type={text:T};if(P)k.optional=!0;if(m)k.rest=!0;return k}),returnTypeText:o||"any"}}function Jf(e){if(e.params!==void 0||e.returnType!==void 0)return{parameters:(e.params??[]).map((n)=>{let r={name:n.name};if(n.type)r.type={text:n.type};if(n.optional)r.optional=!0;return r}),returnTypeText:e.returnType??"any"};return e.type?Xf(e.type):{parameters:[],returnTypeText:"any"}}function Yf(e){return e.map((t)=>{if(t.isFunctionDeclaration){let{parameters:r,returnTypeText:i}=Jf(t),o={kind:"method",name:t.name,static:!1};if(r.length>0)o.parameters=r;if(o.return={type:{text:i}},t.description)o.description=t.description;if(t.deprecated!==void 0)o.deprecated=t.deprecated;return o}let n={kind:"field",name:t.name};if(t.type)n.type={text:t.type};if(t.value!==void 0)n.default=t.value;if(t.description)n.description=t.description;if(t.deprecated!==void 0)n.deprecated=t.deprecated;if(t.kind==="const")n.readonly=!0;return n})}function Qf(e){let t=e.customElement?.props,n=new Map,r=[];for(let i of e.props){if(i.isFunctionDeclaration)continue;let o=t?.[i.name];if(o?.attribute===!1)continue;let s=o?.attribute||i.name.toLowerCase(),p=n.get(s);if(p!==void 0){console.warn(`sveld: props "${p}" and "${i.name}" of component "${e.moduleName}" both map to the custom-element attribute "${s}"; only "${p}" is included.`);continue}n.set(s,i.name);let m=o?.type==="Array"||o?.type==="Object"?[i.description,"Serialized to/from JSON for the attribute."].filter(Boolean).join(" "):i.description,f={name:s,fieldName:i.name};if(i.type)f.type={text:i.type};if(i.value!==void 0)f.default=i.value;if(m)f.description=m;if(o?.reflect)f.reflects=!0;r.push(f)}return r}function Zf(e){if(!e||e.length===0)return;return e.map((t)=>{let n={name:t.name};if(t.description)n.description=t.description;return n})}function eh(e){if(!e||e.length===0)return;return e.map((t)=>{let n={name:t.name};if(t.type)n.type={text:t.type};if(t.default!==void 0)n.default=t.default;if(t.description)n.description=t.description;return n})}function th(e){return e.filter((t)=>t.type==="dispatched").map((t)=>{let n={name:t.name,type:{text:`CustomEvent<${t.detail??"unknown"}>`}};if(t.description)n.description=t.description;if(t.deprecated!==void 0)n.deprecated=t.deprecated;return n})}function nh(e){return e.map((t)=>{let n={name:t.default?"":t.name??""};if(t.description)n.description=t.description;if(t.deprecated!==void 0)n.deprecated=t.deprecated;return n})}function rh(e){let t=Zf(e.cssParts),n=eh(e.cssProperties),r=Yf(e.props),i=Qf(e),o=th(e.events),s=nh(e.slots),p=e.moduleName,u=e.componentComment?{kind:"class",name:p,description:e.componentComment,members:r,attributes:i,events:o,slots:s}:{kind:"class",name:p,members:r,attributes:i,events:o,slots:s};if(t)u.cssParts=t;if(n)u.cssProperties=n;if(e.customElementTag)u.tagName=e.customElementTag,u.customElement=!0;return u}function ih(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 sh(e,t={}){let n=sn(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:[rh(o)],exports:ih(o,s)}})}}var ah=/[^\w\- ]+/g,oh=/\s+/g;function ch(e,t){let n=e.toLowerCase().replace(Ti,"").replace(ah,"").replace(oh,"-"),r=t.get(n)??0;return t.set(n,r+1),r===0?n:`${n}-${r}`}class Ai{sourceParts=[];hasToC=!1;toc=[];get source(){return this.sourceParts.join("")}appendLineBreaks(){return this.sourceParts.push(`
224
242
 
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("");if(!this.hasToC)return e;let t="<!-- __TOC__ -->",n=e.indexOf(t);if(n===-1)return e;let r=new Map,i=this.toc.map(({indent:o,raw:s})=>`${" ".repeat(o)}- [${s}](#${Of(s,r)})`).join(`
226
- `);return e.slice(0,n)+i+e.slice(n+t.length)}}class xi extends gi{onAppend;constructor(e){super();this.onAppend=e.onAppend}append(e,t){return super.append(e,t),this.onAppend?.call(this,e,this),this}}function Bf(e,t){let n=new xi({onAppend:(r,i)=>{t?.onAppend?.call(null,r,i,e)}});return yi(n,e),n.end()}export{xi as BrowserWriterMarkdown,Po as COMPONENT_API_SCHEMA_VERSION,he as ComponentParser,cc as asNormalizedPath,tn as buildComponentApiDocument,Lf as buildCustomElementsManifest,Vn as formatTsProps,jo as getContextDefs,jn as getTypeDefs,yi as renderComponentsToMarkdown,Bf as writeMarkdownCore,hf as writeTsDefinition};
243
+ `),this}append(e,t){switch(e){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":{let n=Number(e.slice(-1));if(this.sourceParts.push(`${"#".repeat(n)} ${t}`),this.hasToC&&e==="h2")this.toc.push({indent:0,raw:t??""});break}case"quote":this.sourceParts.push(`> ${t}`);break;case"p":this.sourceParts.push(t??"");break;case"divider":this.sourceParts.push("---");break;case"raw":this.sourceParts.push(t??"");break}if(e!=="raw")this.appendLineBreaks();return this}tableOfContents(){return this.sourceParts.push("<!-- __TOC__ -->"),this.hasToC=!0,this.appendLineBreaks(),this}end(){let e=this.sourceParts.join("");if(!this.hasToC)return e;let t="<!-- __TOC__ -->",n=e.indexOf(t);if(n===-1)return e;let r=new Map,i=this.toc.map(({indent:o,raw:s})=>`${" ".repeat(o)}- [${s}](#${ch(s,r)})`).join(`
244
+ `);return e.slice(0,n)+i+e.slice(n+t.length)}}class Pi extends Ai{onAppend;constructor(e){super();this.onAppend=e.onAppend}append(e,t){return super.append(e,t),this.onAppend?.call(this,e,this),this}}function ph(e,t){let n=new Pi({onAppend:(r,i)=>{t?.onAppend?.call(null,r,i,e)}});return vi(n,e),n.end()}export{Pi as BrowserWriterMarkdown,Bo as COMPONENT_API_SCHEMA_VERSION,be as ComponentParser,vc as asNormalizedPath,sn as buildComponentApiDocument,sh as buildCustomElementsManifest,Un as formatTsProps,Qo as getContextDefs,Gn as getTypeDefs,vi as renderComponentsToMarkdown,ph as writeMarkdownCore,Vf as writeTsDefinition};