sveld 0.38.1 → 0.38.2
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/browser.d.ts +9 -48
- package/browser.js +174 -194
- package/chunk-261qwh99.js +5 -0
- package/chunk-28h1esfd.js +29 -0
- package/chunk-80eafzch.js +1 -0
- package/chunk-rn01dzny.js +234 -0
- package/cli-entry.js +2 -2
- package/index.d.ts +12 -53
- package/index.js +1 -1
- package/package.json +1 -1
- package/chunk-x0hkebcs.js +0 -29
- package/chunk-y5gqpp8d.js +0 -5
- package/chunk-ymq8jc0f.js +0 -254
- package/chunk-ynrmtc58.js +0 -1
package/browser.js
CHANGED
|
@@ -1,171 +1,152 @@
|
|
|
1
|
-
function
|
|
2
|
-
`,
|
|
3
|
-
|
|
4
|
-
`)}function eu(e,t){let n=t;while(n<e.length-1&&e[n].content.trim()==="")n++;if(e[n].content[0]!=="{")return null;let r=e.slice(n).map((l)=>l.content).join(`
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
`)
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
`).
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
`)
|
|
14
|
-
`);while(
|
|
15
|
-
|
|
16
|
-
`);let o=i.named.map(({imported:p,local:l})=>{if(!p||p===l)return l;return`${p} as ${l}`}),a=i.default[0],s=o.length>0?`{ ${o.join(", ")} }`:"";if(a&&s)return`import type ${a}, ${s} from "${r}";`;if(a)return`import type ${a} from "${r}";`;return`import type ${s} from "${r}";`})}function Us(e,t,n,r,i,o){let a=Ys(t);if(a){if(e.typeImportBindingsByLocalName.has(a)||e.valueImportBindingsByLocalName.has(a))r.add(a);let s=e.localTypeDeclarationsByName.get(a);if(s&&!o.has(a))i.add(a),o.add(a),Z(e,s.node,r,i,o),o.delete(a)}for(let s of n??[])Z(e,s,r,i,o)}function Js(e,t,n,r,i){for(let o of t){if(o.type!=="TSPropertySignature")continue;Z(e,o.typeAnnotation?.typeAnnotation,n,r,i)}}function F(e,t){if(t)e.additionalTypeDependencyNodes.push(t)}function Du(e){if(!e.const)return;let t=e.id.name,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 Qs(e,t){let n=Du(t);if(n)return n;let r=N(e,t.start,t.end)?.trim();return r?`declare ${r}`:void 0}function wr(e,t){let n=[];for(let r of t.params){let i=r.type==="TSParameterProperty"?r.parameter:r;if(i.type==="RestElement"){F(e,i.typeAnnotation?.typeAnnotation),n.push({name:i.argument.type==="Identifier"?i.argument.name:"rest",type:Ee(e,i.typeAnnotation),optional:!1,rest:!0});continue}let o=i.type==="AssignmentPattern",a=o?i.left:i,s="typeAnnotation"in a?a.typeAnnotation:void 0;F(e,s?.typeAnnotation),n.push({name:a.type==="Identifier"?a.name:"arg",type:Ee(e,s),optional:o||"optional"in i&&i.optional===!0,rest:!1})}F(e,t.returnType?.typeAnnotation);for(let r of t.typeParameters?.params??[])F(e,r.constraint),F(e,r.default);return{params:n,returnType:Ee(e,t.returnType),typeParameters:Oe(e,t.typeParameters)||void 0}}function Zs(e,t){let{params:n,returnType:r,typeParameters:i}=wr(e,t),o=n.map(({name:s,type:p,optional:l,rest:c})=>c?`...${s}: ${p??"any[]"}`:`${s}${l?"?":""}: ${p??"any"}`),a=r!==void 0||i!==void 0||n.some((s)=>s.type!==void 0);return{signature:`${i??""}(${o.join(", ")}) => ${r??"any"}`,hasAnnotations:a}}function eo(e){let t=e.pendingCallDefaultCandidates.length>0?e.pendingCallDefaultCandidates.slice():void 0,n=e.pendingConstDefaultCandidates.length>0?e.pendingConstDefaultCandidates.slice():void 0,r=e.pendingContextKeyCandidates.length>0?e.pendingContextKeyCandidates.slice():void 0,i=e.pendingDispatchEscapeCandidates.length>0?e.pendingDispatchEscapeCandidates.slice():void 0;if(!t&&!n&&!r&&!i)return;let o=e.deferredEventNoSourceDiagnostics.length>0?e.deferredEventNoSourceDiagnostics.slice():void 0,a=i&&e.untypedJsDocEventNames.size>0?Array.from(e.untypedJsDocEventNames):void 0;return{...t?{pendingCallDefaultCandidates:t}:{},...n?{pendingConstDefaultCandidates:n}:{},...r?{pendingContextKeyCandidates:r}:{},...i?{pendingDispatchEscapeCandidates:i}:{},...o?{deferredEventNoSourceDiagnostics:o}:{},...a?{untypedJsDocEventNames:a}:{}}}function to(e){let t=new Set,n=new Set;for(let p of e.additionalTypeDependencyNodes)Z(e,p,t,n);let r=Array.from(e.localTypeDeclarationsByName.values()).filter((p)=>p.exported).sort((p,l)=>p.start-l.start);for(let p of r)Z(e,p.node,t,n);let i=r.map((p)=>`export ${p.code}`),o=e.typedRunesPropsDeclarations.length===1?e.typedRunesPropsDeclarations[0]:void 0,a=o?.canonicalType;if(o&&a){for(let p of o.referencedImportedTypes)t.add(p);for(let p of o.referencedLocalTypes)n.add(p)}if(!a&&t.size===0&&n.size===0&&i.length===0)return;let s=Array.from(n).map((p)=>e.localTypeDeclarationsByName.get(p)).filter((p)=>p!==void 0&&!p.exported).sort((p,l)=>p.start-l.start).map((p)=>p.code);return{...a?{canonicalPropsType:a}:{},canonicalPropNames:o&&a?Array.from(o.props.keys()).sort():[],localTypeDeclarations:s,...i.length>0?{moduleTypeDeclarations:i}:{},typeImportStatements:Au(e,t)}}function bt(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{imported:o}=r,a=o.type==="Identifier"?o.name:typeof o.value==="string"?o.value:i;e.valueImportBindingsByLocalName.set(i,{localName:i,importedName:a,source:n})}}function xt(e){return[e.importedName,...e.members??[]].join(".")}function Pr(e,t){let n=[],r=t;while(r.type==="MemberExpression"){if(r.computed||!_(r.property))return;n.unshift(r.property.name),r=r.object}if(!_(r))return;let i=r.name,o=(s,p,l)=>l.length>0?{source:s,importedName:p,members:l}:{source:s,importedName:p},a=e.valueImportBindingsByLocalName.get(i);if(a)return o(a.source,a.importedName,n);for(let s of[e.parsed?.instance,e.parsed?.module])for(let p of s?.content.body??[]){if(p.type!=="ImportDeclaration")continue;let l=p,c=l.source.value;if(l.importKind==="type"||typeof c!=="string")continue;let d=l.specifiers.find((f)=>f.local.name===i);if(d?.type==="ImportDefaultSpecifier")return o(c,"default",n);if(d?.type==="ImportNamespaceSpecifier"&&n.length>0)return o(c,n[0],n.slice(1))}return}function ln(e,t){if(!Xe(t))return;return Pr(e,t)}function no(e){let t=new Map;for(let n of e.content.body){if(n.type!=="ImportDeclaration")continue;let r=n;if(r.importKind==="type")continue;let i=r.source.value;if(typeof i!=="string")continue;for(let o of r.specifiers){let a=o.local.name;if(!a||o.type==="ImportSpecifier"&&o.importKind==="type")continue;let s;if(o.type==="ImportDefaultSpecifier")s="default";else if(o.type==="ImportNamespaceSpecifier")s="*";else if(o.imported.type==="Identifier")s=o.imported.name;else s=String(o.imported.value??a);t.set(a,{from:i,imported:s})}}return t}function Ar(e,t){for(let n of t?.content.body??[]){if(n.type==="ImportDeclaration"){bt(e,n);continue}let r=n.type==="ExportNamedDeclaration"&&n.declaration?n.declaration:n;if(r.type==="FunctionDeclaration"&&r.id?.name)e.funcDecls.set(r.id.name,r)}}function Ze(e,t,n){if(X(t)===void 0)return;if(Xt(e,t),e.props.has(t)){let r=e.props.get(t);e.props.set(t,{...r,...n})}else e.props.set(t,n)}function cn(e,t,n,r){if(t.pendingCallDefault)e.pendingCallDefaultCandidates.push({propName:n,location:r,...t.pendingCallDefault});if(t.pendingConstDefault)e.pendingConstDefaultCandidates.push({propName:n,location:r,...t.pendingConstDefault})}var Nu=/[^\S\r\n]*[\r\n]\s*/g;function Te(e,t,n=0){let r,i,o=!1;if(!t||typeof t!=="object"||!("type"in t))return{value:r,type:i,isFunction:o};let a=so(e,t);if(t.type==="ObjectExpression"||t.type==="BinaryExpression"||t.type==="ArrayExpression"||t.type==="ArrowFunctionExpression"||t.type==="FunctionExpression"){let s=t;if("start"in s&&"end"in s&&typeof s.start==="number"&&typeof s.end==="number")r=N(e,s.start,s.end)?.replace(on," ");if(o=t.type==="ArrowFunctionExpression"||t.type==="FunctionExpression",t.type==="BinaryExpression")i=te(e,t,n);else if(t.type==="ObjectExpression"||t.type==="ArrayExpression"){let{start:p,end:l}=s;i=Dr(t)?_u(e,p,l,r):void 0}if(t.type==="ArrowFunctionExpression"||t.type==="FunctionExpression")i=ao(t),r=io(e,t)}else if(t.type==="UnaryExpression"){let s=t;if("start"in s&&"end"in s&&typeof s.start==="number"&&typeof s.end==="number")r=N(e,s.start,s.end);i=te(e,s,n)}else if(t.type==="LogicalExpression"||t.type==="ConditionalExpression"||t.type==="SequenceExpression"){let{start:s,end:p}=t,l=s===void 0||p===void 0?void 0:N(e,s,p)?.replace(Nu," ");r=l!==void 0&&t.type==="SequenceExpression"?`(${l})`:l,i=te(e,t,n)}else if(t.type==="NewExpression"){let s=t;if("start"in s&&"end"in s&&typeof s.start==="number"&&typeof s.end==="number")r=N(e,s.start,s.end);if(s.callee&&typeof s.callee==="object"&&"type"in s.callee&&s.callee.type==="Identifier"){let p=s.callee.name;if(p==="Date")i="Date";else if(p==="Map")i="Map<any, any>";else if(p==="Set")i="Set<any>";else if(p==="WeakMap")i="WeakMap<object, any>";else if(p==="WeakSet")i="WeakSet<object>";else if(p==="Array")i="any[]";else if(p==="RegExp"||p==="Regexp")i="RegExp";else if(p==="Error")i="Error";else i=p}}else if(t.type==="CallExpression"){let s=t;if("start"in s&&"end"in s&&typeof s.start==="number"&&typeof s.end==="number")r=N(e,s.start,s.end);let p=s.callee,l=p&&typeof p==="object"&&"type"in p&&p.type==="Identifier"?p.name:void 0;if((l==="$derived"||l==="$state")&&s.arguments.length===1&&n<5)return{...Te(e,s.arguments[0],n+1),value:r,defaultValue:a};if(l){let c=Ru(e,l);if(c)return{value:r,type:void 0,isFunction:!1,defaultValue:a,resolvedType:c};if(e.funcDecls.has(l)||Mu(e,l))return{value:r,type:void 0,isFunction:!1,defaultValue:a,pendingCallDefault:{calleeName:l}};let d=e.valueImportBindingsByLocalName.get(l);if(d)return{value:r,type:void 0,isFunction:!1,defaultValue:a,pendingCallDefault:{calleeName:l,importSource:d.source,importedName:d.importedName}}}return{value:r,type:void 0,isFunction:!1,defaultValue:a,pendingCallDefault:{calleeName:l??Iu(e,p)}}}else if(t.type==="Identifier"){let s=t;if(n<5){let l=dn(e,s.name);if(l){let c=Te(e,l,n+1),d=$e(e,s.name);return{...c,resolvedType:d?.type??c.resolvedType,resolvedDescription:d?.description??c.resolvedDescription,resolvedParams:d?.params??c.resolvedParams,resolvedReturnType:d?.returnType??c.resolvedReturnType}}if(e.funcDecls.has(s.name)){let c=$e(e,s.name),d=e.funcDecls.get(s.name);return{value:d?io(e,d):void 0,type:void 0,isFunction:!0,defaultValue:d?so(e,d):void 0,resolvedType:c?.type??Bu(c,d),resolvedDescription:c?.description,resolvedParams:c?.params,resolvedReturnType:c?.returnType}}}if("start"in s&&"end"in s&&typeof s.start==="number"&&typeof s.end==="number")r=N(e,s.start,s.end);let p=e.valueImportBindingsByLocalName.get(s.name);if(p)return{value:r,type:i,isFunction:o,defaultValue:a,pendingConstDefault:{importSource:p.source,importedName:p.importedName}}}else if(t.type==="MemberExpression"){let s=t;if("start"in s&&"end"in s&&typeof s.start==="number"&&typeof s.end==="number")r=N(e,s.start,s.end);if(Wu(t))i="number";let p=ln(e,t);if(p)return{value:r,type:i,isFunction:o,defaultValue:a,pendingConstDefault:{importSource:p.source,importedName:p.importedName,...p.members?{members:p.members}:{}}}}else if(t.type==="TemplateLiteral"){let s=t;if("start"in s&&"end"in s&&typeof s.start==="number"&&typeof s.end==="number")r=N(e,s.start,s.end);i="string"}else if("raw"in t&&typeof t.raw==="string")r=t.raw,i=vt(t);return{value:r,type:i,isFunction:o,defaultValue:a}}function vt(e){if("regex"in e&&e.regex)return"RegExp";if("bigint"in e&&e.bigint)return"bigint";return e.value==null?void 0:typeof e.value}var $u=new Set(["-","*","/","%","**","<<",">>",">>>","&","|","^"]),Lu=new Set(["==","!=","===","!==","<","<=",">",">=","in","instanceof"]);function te(e,t,n){if(!t||typeof t!=="object"||!("type"in t))return;switch(t.type){case"UnaryExpression":{let r=t;if(r.operator==="!"||r.operator==="delete")return"boolean";if(r.operator==="typeof")return"string";if(r.operator==="void")return;if(r.operator==="+")return"number";return te(e,r.argument,n)==="bigint"?"bigint":"number"}case"BinaryExpression":{let r=t;if(Lu.has(r.operator))return"boolean";let i=te(e,r.left,n),o=te(e,r.right,n);if(i==="bigint"&&o==="bigint")return"bigint";if($u.has(r.operator))return"number";if(r.operator!=="+")return;if(i==="string"||o==="string")return"string";if(i==="number"&&o==="number")return"number";return}case"LogicalExpression":{let r=t;return ro([te(e,r.left,n),te(e,r.right,n)])}case"ConditionalExpression":{let r=t;return ro([te(e,r.consequent,n),te(e,r.alternate,n)])}case"SequenceExpression":{let r=t.expressions;return te(e,r[r.length-1],n)}case"Identifier":{let r=t.name;if(r==="NaN"||r==="Infinity")return"number";if(r==="undefined")return;let i=Ne(e,r)?.type;if(i)return i;if(n>=5)return;return te(e,dn(e,r),n+1)}default:{if(n>=5)return;let r=Te(e,t,n+1);return r.type??r.resolvedType}}}function ro(e){let t=new Set;for(let n of e){if(n===void 0)return;t.add(n.includes("=>")?`(${n})`:n)}return t.size===1?e[0]:[...t].join(" | ")}function _u(e,t,n,r){if(r===void 0||t===void 0||n===void 0)return r;let i=e.parsed?.comments??[],o="",a=t;for(let s of i){if(s.start<t||s.end>n)continue;o+=N(e,a,s.start)??"",a=s.end}if(a===t)return r;return o+=N(e,a,n)??"",o.replace(on," ")}function Dr(e){if(!e||typeof e!=="object"||!("type"in e))return!1;switch(e.type){case"Literal":return!(("regex"in e)&&e.regex);case"TemplateLiteral":return e.expressions.length===0;case"Identifier":return e.name==="undefined";case"UnaryExpression":{let t=e,n=t.argument;return t.operator==="-"&&n?.type==="Literal"&&(typeof n.value==="number"||typeof n.value==="bigint")}case"ArrayExpression":return e.elements.every((t)=>t!==null&&Dr(t));case"ObjectExpression":return e.properties.every((t)=>t.type==="Property"&&t.kind==="init"&&!t.computed&&!t.method&&!t.shorthand&&(t.key.type==="Identifier"||t.key.type==="Literal")&&Dr(t.value));default:return!1}}function un(e,t){let n=dn(e,t);if(!n||typeof n!=="object"||!("type"in n))return;if(n.type==="CallExpression"){let r=n,i=Q(e,r.callee);if(i==="$state"||i==="$state.raw"||i==="$derived"){let o=r.typeArguments?.params[0];if(o)return F(e,o),Q(e,o);if(i==="$state.raw")return Te(e,r.arguments[0],1).type}}return Te(e,n).type}function dn(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 et(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 Iu(e,t){if(t&&typeof t==="object"&&"start"in t&&"end"in t&&typeof t.start==="number"&&typeof t.end==="number")return N(e,t.start,t.end)??"call";return"call"}function Ru(e,t){let n=$e(e,t);if(n?.returnType)return n.returnType;let r=e.funcDecls.get(t)??oo(e,t);if(!r)return;let i=qu(e,r);if(i)return i;let o=ju(e,t);if(o)return o;let a=po(r);return a==="any"?void 0:a}function Mu(e,t){return oo(e,t)!==void 0}function oo(e,t){let n=dn(e,t);if(!n||typeof n!=="object"||!("type"in n))return;if(n.type==="ArrowFunctionExpression"||n.type==="FunctionExpression")return n;return}function ju(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?.typeAnnotation;if(!o)return;return Is(N(e,o.start,o.end))}return}function qu(e,t){let n=t.returnType?.typeAnnotation;if(!n)return;return N(e,n.start,n.end)}function Bu(e,t){let n=e?.returnType??"any",r=e?.params;if(r&&r.length>0)return`(${Ae(r)}) => ${n}`;if(e?.returnType)return`() => ${n}`;if(t)return ao(t);return"(...args: any[]) => any"}function ao(e){return`(${Ou(e)}) => ${po(e)}`}function Ou(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 po(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=Fu(t),n.length===0)return"any"}else n=[t];let r=null;for(let i of n){let o=Vu(i);if(!o)return"any";if(r===null)r=o;else if(r!==o)return"any"}return r??"any"}function Fu(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 Vu(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 lo(e){if(he(e,"$bindable"))return{init:e.arguments[0],bindable:!0};return{init:e,bindable:!1}}function Hu(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 N(e,r.start,i.end)??""}function io(e,t){if(t.generator)return;let n=t.body;if(!n||typeof n!=="object"||!("type"in n))return;let r=Hu(e,t),i=t.async?"async ":"",o=(s,p)=>s&&typeof s==="object"&&("type"in s)&&s.type==="ObjectExpression"?`(${p})`:p;if(n.type!=="BlockStatement"){let s=Q(e,n);return s===void 0?void 0:`${i}(${r}) => ${o(n,s)}`}let a=n.body;if(a.length===0)return`${i}(${r}) => {}`;if(a.length===1){let s=a[0];if(s&&typeof s==="object"&&"type"in s&&s.type==="ReturnStatement"){let p=s.argument;if(p){let l=Q(e,p);if(l!==void 0)return`${i}(${r}) => ${o(p,l)}`}}}return}function so(e,t){let n=Q(e,t);if(!n||!t||typeof t!=="object"||!("type"in t))return;let r="expression";if(t.type==="Literal"||t.type==="UnaryExpression")r="literal";else if(t.type==="TemplateLiteral")r=t.expressions.length===0?"literal":"expression";else if(t.type==="ArrayExpression")r="array";else if(t.type==="ObjectExpression")r="object";else if(t.type==="ArrowFunctionExpression"||t.type==="FunctionExpression"||t.type==="FunctionDeclaration")r="function";let i={raw:n,kind:r};if(r==="literal"||r==="array"||r==="object"){let o=$r(t);if(o.ok)i.value=o.value}return i}function $r(e){if(!e||typeof e!=="object"||!("type"in e))return{ok:!1};if(e.type==="Literal"){let t=e.value;return typeof t==="bigint"||"regex"in e?{ok:!1}:{ok:!0,value:t}}if(e.type==="UnaryExpression"){let t=e,n=t.argument;if(!n||typeof n!=="object"||!("type"in n)||n.type!=="Literal")return{ok:!1};let r=n.value;if(typeof r==="number"){if(t.operator==="-")return{ok:!0,value:-r};if(t.operator==="+")return{ok:!0,value:r}}if(typeof r==="boolean"&&t.operator==="!")return{ok:!0,value:!r};return{ok:!1}}if(e.type==="TemplateLiteral"){let t=e;if(t.expressions.length>0||t.quasis.length!==1)return{ok:!1};return{ok:!0,value:t.quasis[0].value.cooked??t.quasis[0].value.raw}}if(e.type==="ArrayExpression"){let t=e,n=[];for(let r of t.elements){if(!r)return{ok:!1};let i=$r(r);if(!i.ok)return{ok:!1};n.push(i.value)}return{ok:!0,value:n}}if(e.type==="ObjectExpression"){let t=e,n={};for(let r of t.properties){if(r.type!=="Property"||r.computed)return{ok:!1};let i=G(r.key);if(!i)return{ok:!1};let o=$r(r.value);if(!o.ok)return{ok:!1};n[i]=o.value}return{ok:!0,value:n}}return{ok:!1}}var Gu=new Set(["POSITIVE_INFINITY","NEGATIVE_INFINITY","MAX_VALUE","MIN_VALUE","MAX_SAFE_INTEGER","MIN_SAFE_INTEGER","EPSILON","NaN"]),zu=new Set(["PI","E","LN2","LN10","LOG2E","LOG10E","SQRT2","SQRT1_2"]);function Wu(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 Gu.has(r);if(n==="Math")return zu.has(r);return!1}function W(e,t,n){if(!t||e.has(t))return;e.set(t,n)}function Et(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 Tt(e,t){for(let n=e.activeScopes.length-1;n>=0;n-=1){let r=e.activeScopes[n];if(r===e.componentScope)return!1;if(r?.has(t))return!0}return!1}function fn(e,t){let n=t;while(Xe(n))n=n.object;return _(n)&&Tt(e,n.name)}function M(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":M(e.left,t);break;case"ArrayPattern":for(let n of e.elements)M(n??void 0,t);break;case"ObjectPattern":for(let n of e.properties)if(n.type==="Property")M(n.value,t);else if(n.type==="RestElement")M(n.argument,t);break;case"RestElement":M(e.argument,t);break}return t}function _r(e,t){if(!t||typeof t!=="object"||!("type"in t))return;if(t.type==="Identifier"){let r=Et(e,t.name);if(r)e.reactive_vars.add(r);return}let n=M(t);for(let r of n){let i=Et(e,r);if(i)e.reactive_vars.add(i)}}function St(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 co(e){if(!e||typeof e!=="object"||!("type"in e))return!1;let t=String(e.type);return t==="FunctionDeclaration"||t==="FunctionExpression"||t==="ArrowFunctionExpression"}function Uu(e,t){let n=e.scopeDeclarations.get(t);if(!n)n=new Map,e.scopeDeclarations.set(t,n);return n}function Ju(e){let t=[];if(e.id.type==="Identifier")return t.push({kind:"local",name:e.id.name}),t;if(e.id.type!=="ObjectPattern")return t;for(let n of e.id.properties){if(n.type==="RestElement"){if(n.argument.type==="Identifier")t.push({kind:"local",name:n.argument.name});continue}if(n.computed)continue;let r=G(n.key);if(!r)continue;let i;if(n.value.type==="Identifier")i=n.value.name;else if(n.value.type==="AssignmentPattern"&&n.value.left.type==="Identifier")i=n.value.left.name;if(!i)continue;t.push({kind:"prop",name:i,publicPropName:r})}return t}function Lr(e,t,n,r){if(!$s(e))return;let i=r?.allowRunesProps??!1,o=r?.forceProp??!1,a=e;for(let s of a.declarations){if(i&&he(Pe(s.init),"$props")){for(let c of Ju(s))W(c.kind==="prop"?t:n,c.name,c.kind==="prop"?{kind:"prop",publicPropName:c.publicPropName}:{kind:"local"});continue}let p=a.kind==="var"?n:t,l=o?"prop":"local";for(let c of M(s.id))W(p,c,l==="prop"?{kind:"prop",publicPropName:c}:{kind:"local"})}}function Ku(e,t){if("id"in e&&e.id&&typeof e.id==="object"&&"name"in e.id&&typeof e.id.name==="string")W(t,e.id.name,{kind:"local"});for(let n of e.params){let r=n.type==="TSParameterProperty"?n.parameter:n;for(let i of M(r))W(t,i,{kind:"local"})}}function Xu(e,t,n){if(!Array.isArray(e))return;for(let r of e){if(!r||typeof r!=="object"||!("type"in r))continue;switch(r.type){case"VariableDeclaration":Lr(r,t,n);break;case"FunctionDeclaration":if(r.id?.name)W(t,r.id.name,{kind:"local"});break;case"ClassDeclaration":if(r.id?.name)W(t,r.id.name,{kind:"local"});break}}}function Yu(e,t){for(let{local:n,exported:r}of t){if(n.type!=="Identifier")continue;let i=r.type==="Identifier"?r.name:String(r.value);if(e.componentScope.get(n.name)?.kind==="prop")continue;e.componentScope.set(n.name,{kind:"prop",publicPropName:i})}}function Qu(e,t){for(let n of t?.content.body??[])switch(n.type){case"ImportDeclaration":for(let r of n.specifiers)if(r.local.name)W(e.componentScope,r.local.name,{kind:"local"});break;case"VariableDeclaration":Lr(n,e.componentScope,e.componentScope,{allowRunesProps:!0});break;case"FunctionDeclaration":if(n.id?.name)W(e.componentScope,n.id.name,{kind:"local"});break;case"ClassDeclaration":if(n.id?.name)W(e.componentScope,n.id.name,{kind:"local"});break;case"ExportNamedDeclaration":if(!n.declaration){if(n.source==null)Yu(e,n.specifiers);break}if(n.declaration.type==="VariableDeclaration")Lr(n.declaration,e.componentScope,e.componentScope,{forceProp:!0});else if(n.declaration.type==="FunctionDeclaration"&&n.declaration.id?.name)W(e.componentScope,n.declaration.id.name,{kind:"prop",publicPropName:n.declaration.id.name});break}}function uo(e){e.componentScope.clear(),e.scopeDeclarations=new Map,e.activeScopes.length=0,Qu(e,e.parsed?.instance)}function fo(e){return{varScopeStack:[e.componentScope]}}function ho(e,t,n){if(!St(n))return;let r=Uu(e,n),i=t.varScopeStack[t.varScopeStack.length-1]??e.componentScope;switch(n.type){case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":Ku(n,r);break;case"BlockStatement":Xu(n.body,r,i);break;case"CatchClause":for(let o of M(n.param))W(r,o,{kind:"local"});break;case"EachBlock":for(let o of M(n.context))W(r,o,{kind:"local"});if(typeof n.index==="string")W(r,n.index,{kind:"local"});break;case"AwaitBlock":for(let o of M(n.value))W(r,o,{kind:"local"});for(let o of M(n.error))W(r,o,{kind:"local"});break}if(co(n))t.varScopeStack.push(r);return r}function mo(e,t){if(co(t))e.varScopeStack.pop()}function Ir(e,t){let n=Ne(e,t);if(n&&n.type===e.explicitVariableTypesByName.get(t))F(e,e.explicitVariableTypeNodesByName.get(t));return n}function hn(e,t,n=!0){let r=Ir(e,t);if(r||!n)return r;let i=un(e,t);return i?{type:i,...zs(e,t)}:null}function Zu(e,t,n){if(!_(t))return null;let r=et(e,t.name);if(ee(r))return To(e,r,n).properties;let i=hn(e,t.name);return i?ve(i.type):null}function ed(e,t){return e.properties.some((n)=>n.type==="Property"&&n.kind==="get"&&G(n.key)===t)}function go(e,t,n){if(!t||typeof t!=="object"||!(n in t))return;let r=t[n];if(!r||typeof r!=="object"||!("typeAnnotation"in r))return;return Q(e,r.typeAnnotation)}function td(e){let t=e?.body.body;if(t?.length!==1||t[0].type!=="ReturnStatement")return;return t[0].argument??void 0}function nd(e,t,n,r,i){if(_(i)){let o=hn(e,i.name);if(o)return o;return P(e,"context-any-type",n,`Context "${t}" property "${n}" has no type annotation; defaulted to "any".`,C(e,r)),{type:"any"}}if(i?.type==="ArrowFunctionExpression"||i?.type==="FunctionExpression")return{type:`(${i.params.map((a)=>`${_(a)?a.name||"arg":"arg"}: any`).join(", ")}) => any`};if(Be(i))return{type:vt(i)??"null"};return{type:"any"}}function To(e,t,n){let r=[],i=!1;for(let o of t.properties){if(o.type==="SpreadElement"){let c=Zu(e,o.argument,n);if(c)r.push(...c);else i=!0,P(e,"spread-unresolved",n,`Context "${n}" spreads a value sveld can't resolve; its shape is widened to "Record<string, any>".`,C(e,o));continue}if(o.type!=="Property")continue;let a=G(o.key);if(!a)continue;if(o.kind==="set"&&ed(t,a))continue;let s=o.kind==="get"||o.kind==="set"?o.value:void 0,p=s?o.kind==="get"?go(e,s,"returnType"):go(e,s.params[0],"typeAnnotation"):void 0,l=p?{type:p}:nd(e,n,a,o,o.kind==="get"?td(s):o.kind==="set"?void 0:o.value);r.push({name:a,type:l.type,description:l.description,optional:!1,...l.internal?{internal:!0}:{}})}return{properties:r,hasUnresolvedSpread:i}}function yo(e,t,n){let{properties:r,hasUnresolvedSpread:i}=To(e,t,n);return{key:n,typeName:sn(n),properties:r,description:void 0,...i?{hasUnresolvedSpread:i}:{}}}function bo(e,t,n){if(ee(t))return yo(e,t,n);else if(_(t)){let r=t.name,i=hn(e,r,!1),o=i?void 0:et(e,r);if(ee(o))return yo(e,o,n);let a=i??hn(e,r);if(a){let s=ve(a.type);return{key:n,typeName:sn(n),...s?{}:{type:a.type},properties:s??[],description:a.description,...a.internal?{internal:!0}:{}}}return P(e,"context-any-type",r,`Context "${n}" variable "${r}" has no type annotation; defaulted to "any".`,C(e,t)),{key:n,typeName:sn(n),type:"any",properties:[]}}return null}function xo(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 vo(e){return{kind:"pending",importSource:e.source,importedName:e.importedName,...e.members?{members:e.members}:{}}}function So(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=_s(r);return i==null?{kind:"unresolved"}:{kind:"resolved",key:i}}if(r.type==="CallExpression"||r.type==="NewExpression"){let i=xo(r);return i==null?{kind:"unresolved"}:{kind:"resolved",key:i}}if(r.type==="Identifier"){if(n>=5)return{kind:"unresolved"};let i=et(e,r.name);if(i&&typeof i==="object"&&"type"in i){let a=i;if((a.type==="CallExpression"||a.type==="NewExpression")&&xo(a)==="")return{kind:"resolved",key:r.name};return So(e,a,n+1)}let o=n===0&&Tt(e,r.name)?void 0:e.valueImportBindingsByLocalName.get(r.name);return o?vo(o):{kind:"unresolved"}}if(r.type==="MemberExpression"){let i=n===0&&fn(e,r)?void 0:ln(e,r);if(i)return vo(i)}return{kind:"unresolved"}}function Eo(e,t,n,r,i){let o=Q(e,r)??"";P(e,"context-value-unresolved",t,`setContext(${n}, ${o}): the value isn't an object literal or a variable, so sveld can't describe its shape; the context is skipped.`,i)}function ko(e,t){if(!t||typeof t!=="object"||!("type"in t)||t.type!=="CallExpression")return;let n=t,r=n.arguments[0];if(!r)return;let i=So(e,r);if(i.kind==="unresolved"||i.kind==="resolved"&&!i.key){let l=Q(e,r)??"";P(e,"context-key-unresolved",l,`setContext key \`${l}\` isn't a string literal, const-bound string, Symbol(), or imported \`export const\` string; the context is skipped.`,C(e,t));return}let o=n.arguments[1];if(!o)return;let a=C(e,t);if(i.kind==="pending"){let l=xt(i),c=bo(e,o,l);if(c)e.pendingContextKeyCandidates.push({importSource:i.importSource,importedName:i.importedName,...i.members?{members:i.members}:{},...c.type===void 0?{}:{type:c.type},properties:c.properties,description:c.description,...c.hasUnresolvedSpread?{hasUnresolvedSpread:!0}:{},...c.internal?{internal:!0}:{},source:a});else Eo(e,l,l,o,a);return}let s=i.key,p=bo(e,o,s);if(!p){Eo(e,s,JSON.stringify(s),o,a);return}if(e.contexts.has(s)){P(e,"context-duplicate-key",s,`setContext("${s}", ...) was called more than once; only the first call's shape is used.`,a);return}e.contexts.set(s,{...p,source:a})}var rd=new Set(["Component","SvelteComponent","SvelteSelf"]),id=new Set(["RegularElement","SvelteElement"]);function kt(e){return rd.has(e)}function Ct(e){return id.has(e)}var sd=/\n/g,od=/^[A-Za-z_$][\w$]*$/;function Rr(e,t){return{variableType:(n)=>{if(t?.has(n))return;return Ir(e,n)?.type??un(e,n)}}}function wt(e,t,n){if(!t||typeof t!=="object"||!("type"in t))return n;if(_(t)){if(!Tt(e,t.name))return n;let i=n??new Set;return i.add(t.name),i}let r=n;if(ee(t)){for(let i of t.properties)if(i.type==="Property")r=wt(e,i.value,r)}else if(t.type==="ArrayExpression")for(let i of t.elements)r=wt(e,i,r);return r}function Mr(e,t){if(_(t))return e.variableType(t.name);return ad(e,t)}function ad(e,t){if(!t||typeof t!=="object"||!("type"in t))return;if(ee(t))return wo(e,t);if(t.type==="ArrayExpression")return Po(e,t);return}function Co(e,t){if(!t||typeof t!=="object"||!("type"in t))return"any";if(_(t))return e.variableType(t.name)??"any";if(Be(t))return vt(t)??"null";if(ee(t))return wo(e,t);if(t.type==="ArrayExpression")return Po(e,t);return"any"}function wo(e,t){if(t.properties.length===0)return"Record<string, never>";let n=[],r=!1;for(let i of t.properties){let o=i.type==="Property"&&!i.computed?G(i.key):void 0;if(i.type!=="Property"||!o){r=!0;continue}n.push({name:o,type:Co(e,i.value)})}if(!r)return Pt(n);if(n.length===0)return"Record<string, any>";return Pt([...n,{name:"[key: string]",type:"any"}])}function Po(e,t){let n=new Set(t.elements.filter((r)=>r!=null).map((r)=>Co(e,r)));if(n.size===0)return"any[]";if(n.size===1)return`${[...n][0]}[]`;return`(${[...n].join(" | ")})[]`}function Ao(e,t){for(let[n,r]of e.arguments.entries()){if(_(r)&&r.name===t)return{argumentIndex:n};if(!ee(r))continue;for(let i of r.properties){if(i.type!=="Property"||!_(i.value))continue;if(i.value.name!==t)continue;let o=!i.computed&&_(i.key)?i.key.name:void 0;return{argumentIndex:n,property:o??""}}}return}function jr(e){return typeof e==="string"?JSON.stringify(e):String(e)}function Le(e,{name:t,detail:n,has_argument:r,description:i,deprecated:o,tags:a,internal:s,source:p}){if(t===void 0)return;let l=!r&&!n?"null":X(n),c=i,d=e.events.get(t);if(d?.type==="forwarded")e.events.set(t,{type:"dispatched",name:t,detail:l,description:c||d.description,deprecated:o??d.deprecated,tags:a??d.tags,...s||d.internal?{internal:!0}:{},source:p||d.source});else if(d){let f=d.tags??a,h=e.untypedJsDocEventNames.delete(t);e.events.set(t,{...d,detail:d.detail===void 0||h?l:d.detail,description:d.description||c,deprecated:d.deprecated??o,tags:f,...d.internal||s?{internal:!0}:{},source:p||d.source})}else e.events.set(t,{type:"dispatched",name:t,detail:l,description:c,deprecated:o,tags:a,...s?{internal:!0}:{},source:p})}function Do(e,t){let n=t.arguments[0],r=cr(n,"CustomEvent");if(!r&&!cr(n,"Event"))return;let i=n.arguments[0],o=Be(i)?i.value:void 0;if(o==null)return;let a=r?n.arguments[1]:void 0,s=!1,p;if(ee(a)){let l=a.properties.find((c)=>c.type==="Property"&&_(c.key)&&c.key.name==="detail");if(l?.type==="Property")s=!0,p=l.value}return{name:String(o),detail:p,hasArgument:s,nestedBoundNames:wt(e,p),source:C(e,t)}}function No(e,t){let n=Mr(Rr(e,t.nestedBoundNames),t.detail),r=n===void 0&&Be(t.detail)?t.detail.value:void 0;Le(e,{name:t.name,detail:n??(r==null?"":jr(r)),has_argument:t.hasArgument,source:t.source})}function Pt(e,t,n=!1){if(e.length===0)return"null";let r=e.map(({name:i,type:o,description:a,optional:s,default:p})=>{let l=s?"?":"",c=od.test(i)||i.startsWith("[")?i:JSON.stringify(i),d=a||"";if(p&&d)d=`${d} @default ${p}`;else if(p)d=`@default ${p}`;if(d=ye(d),d){if(n)return`${d.includes(`
|
|
1
|
+
function Ju(e){return e}var Pe=Symbol("sveld.parsedComponentTypeScriptMetadata");function yo(e){return e[Pe]}var Gi=Array(2048).fill(void 0);function Ku(){Gi.fill(void 0)}function go(e,t,n,i){let r=i&2047,s=Gi[r];if(s!==void 0&&s.length===n-t&&e.startsWith(s,t))return s;let a=e.slice(t,n);return Gi[r]=a,a}var yt="",ge=[0],qe=0,mt=0,Fe;function xo(e){Ku(),yt=e,ge=[0],qe=0,mt=0,Fe=void 0}function Ui(e){while(qe<=e){let t=yt.indexOf(`
|
|
2
|
+
`,qe);if(t===-1){qe=Number.POSITIVE_INFINITY;return}qe=t+1,ge.push(qe)}}function Xu(e){let t=[0],n=e.indexOf(`
|
|
3
|
+
`);while(n!==-1)t.push(n+1),n=e.indexOf(`
|
|
4
|
+
`,n+1);return t}function Ji(e,t,n){let i=0,r=e.length-1;if(t>=e[n])i=n;else r=n-1;if(i<r&&t<e[i+1])r=i;while(i<r){let s=i+r+1>>>1;if(e[s]<=t)i=s;else r=s-1}return i}function xe(e){return Ui(e),mt=Ji(ge,e,mt),{line:mt+1,column:e-ge[mt],character:e}}var zi=/\r\n?|\n|\u2028|\u2029/g,Yu=/[\r\u2028\u2029]/;function bo(e){if(Fe===void 0){Fe=Yu.test(yt)?[]:null,zi.lastIndex=0;while(Fe!==null&&zi.exec(yt)!==null)Fe.push(zi.lastIndex)}if(Fe===null)return Ui(e),Ji(ge,e,mt);let t=0,n=Fe.length;while(t<n){let i=t+n>>>1;if(Fe[i]<=e)t=i+1;else n=i}return t}function et(e){let{line:t,column:n}=xe(e);return{line:t,column:n}}function vo(e){while(ge.length<=e+1&&qe!==Number.POSITIVE_INFINITY)Ui(qe);if(e>=ge.length)return;let t=e+1<ge.length?ge[e+1]-1:yt.length;return yt.slice(ge[e],t)}function Ki(e){let t,n=0;return(i)=>(t??=Xu(e),n=Ji(t,i,n),{line:n+1,column:i-t[n]})}function De(e){return typeof e==="object"&&e!==null&&typeof tt(e).type==="string"}function tt(e){return e}function Rt(e,t){let n=tt(e);for(let i in n){let r=n[i];if(Array.isArray(r)){for(let s=0;s<r.length;s++)if(De(r[s]))r[s]=t(r[s])}else if(De(r))n[i]=t(r)}}function Sn(e,...t){if(!t.some((n)=>n===e.type))throw Error(`expected ${t.join(" or ")}, got ${e.type}`)}function Xi(e){let t=[];return nt(e,t),t}function nt(e,t){switch(e.type){case"Identifier":t.push(e);return;case"ObjectPattern":for(let n of e.properties)nt(n.type==="RestElement"?n.argument:n.value,t);return;case"ArrayPattern":for(let n of e.elements)if(n!==null)nt(n,t);return;case"RestElement":nt(e.argument,t);return;case"AssignmentPattern":nt(e.left,t);return;case"TSParameterProperty":nt(e.parameter,t);return;case"TSAsExpression":case"TSNonNullExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":nt(e.expression,t)}}function Yi(e,t){if(e.type!=="Identifier")return!1;if(t===null)return!0;switch(t.type){case"MemberExpression":return t.computed||e===t.object;case"MethodDefinition":return t.computed;case"Property":case"PropertyDefinition":return t.computed||e===t.value;case"ExportSpecifier":case"ImportSpecifier":return e===t.local;case"MetaProperty":case"ImportAttribute":case"ExportAllDeclaration":case"LabeledStatement":case"BreakStatement":case"ContinueStatement":return!1;case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":case"TSInstantiationExpression":case"TSExportAssignment":return e===t.expression;case"TSEnumMember":return e===t.initializer;case"TSParameterProperty":case"TSEnumDeclaration":case"TSImportEqualsDeclaration":return!0;default:return!t.type.startsWith("TS")}}var gt={Root:["module","instance","fragment","css"],Script:["attributes","content"],Fragment:["nodes"],Text:[],Comment:[],ExpressionTag:["expression"],HtmlTag:["expression"],ConstTag:["declaration"],DeclarationTag:["declaration"],DebugTag:["identifiers"],RenderTag:["expression"],AttachTag:["expression"],Attribute:["value"],SpreadAttribute:["expression"],AnimateDirective:["expression"],BindDirective:["expression"],ClassDirective:["expression"],LetDirective:["expression"],OnDirective:["expression"],StyleDirective:["value"],TransitionDirective:["expression"],UseDirective:["expression"],Component:["attributes","fragment"],TitleElement:["attributes","fragment"],SlotElement:["attributes","fragment"],RegularElement:["attributes","fragment"],SvelteBody:["attributes","fragment"],SvelteBoundary:["attributes","fragment"],SvelteComponent:["expression","attributes","fragment"],SvelteDocument:["attributes","fragment"],SvelteElement:["tag","attributes","fragment"],SvelteFragment:["attributes","fragment"],SvelteHead:["attributes","fragment"],SvelteOptions:["attributes","fragment"],SvelteSelf:["attributes","fragment"],SvelteWindow:["attributes","fragment"],IfBlock:["test","consequent","alternate"],EachBlock:["expression","context","key","body","fallback"],AwaitBlock:["expression","pending","value","then","error","catch"],KeyBlock:["expression","fragment"],SnippetBlock:["expression","parameters","body"],StyleSheet:["attributes","children"],Rule:["prelude","block"],Atrule:["block"],SelectorList:["children"],ComplexSelector:["children"],RelativeSelector:["combinator","selectors"],Combinator:[],TypeSelector:[],IdSelector:[],ClassSelector:[],AttributeSelector:[],PseudoElementSelector:["args"],PseudoClassSelector:["args"],Percentage:[],Nth:[],NestingSelector:[],Block:["children"],Declaration:[],Program:["body"],ExpressionStatement:["expression"],BlockStatement:["body"],StaticBlock:["body"],EmptyStatement:[],DebuggerStatement:[],WithStatement:["object","body"],ReturnStatement:["argument"],LabeledStatement:["label","body"],BreakStatement:["label"],ContinueStatement:["label"],IfStatement:["test","consequent","alternate"],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],CatchClause:["param","body"],WhileStatement:["test","body"],DoWhileStatement:["body","test"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","typeParameters","params","returnType","body"],FunctionExpression:["id","typeParameters","params","returnType","body"],ArrowFunctionExpression:["typeParameters","params","returnType","body"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],ClassDeclaration:["decorators","id","typeParameters","superClass","superTypeParameters","implements","body"],ClassExpression:["decorators","id","typeParameters","superClass","superTypeParameters","implements","body"],ClassBody:["body"],MethodDefinition:["decorators","key","typeParameters","value"],PropertyDefinition:["decorators","key","typeAnnotation","value"],Property:["decorators","key","value"],ThisExpression:[],Super:[],Literal:[],Identifier:["decorators","typeAnnotation"],PrivateIdentifier:[],ArrayExpression:["elements"],ObjectExpression:["properties"],UnaryExpression:["argument"],UpdateExpression:["argument"],BinaryExpression:["left","right"],LogicalExpression:["left","right"],AssignmentExpression:["left","right"],MemberExpression:["object","property"],ConditionalExpression:["test","consequent","alternate"],CallExpression:["callee","typeArguments","arguments"],NewExpression:["callee","typeArguments","arguments"],SequenceExpression:["expressions"],TemplateLiteral:["quasis","expressions"],TaggedTemplateExpression:["tag","typeArguments","quasi"],TemplateElement:[],SpreadElement:["argument"],RestElement:["decorators","argument","typeAnnotation"],YieldExpression:["argument"],AwaitExpression:["argument"],ImportExpression:["source","options","arguments"],ChainExpression:["expression"],MetaProperty:["meta","property"],ObjectPattern:["decorators","properties","typeAnnotation"],ArrayPattern:["decorators","elements","typeAnnotation"],AssignmentPattern:["decorators","left","right"],ImportDeclaration:["specifiers","source","attributes"],ImportSpecifier:["imported","local"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportAttribute:["key","value"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ExportDefaultDeclaration:["declaration"],ExportAllDeclaration:["exported","source","attributes"],Decorator:["expression"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterDeclaration:["params"],TSTypeParameterInstantiation:["params"],TSTypeParameter:["constraint","default"],TSAnyKeyword:[],TSBigIntKeyword:[],TSBooleanKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSNamedTupleMember:["label","elementType"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","nameType","typeAnnotation"],TSLiteralType:["literal"],TSTypeReference:["typeName","typeArguments"],TSQualifiedName:["left","right"],TSTypeQuery:["exprName","typeArguments"],TSImportType:["argument","qualifier","typeArguments"],TSTypeLiteral:["members"],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation"],TSFunctionType:["typeParameters","parameters","typeAnnotation"],TSConstructorType:["typeParameters","parameters","typeAnnotation"],TSIndexSignature:["decorators","parameters","typeAnnotation"],TSTypePredicate:["parameterName","typeAnnotation"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSDeclareFunction:["id","typeParameters","params","returnType"],TSDeclareMethod:["typeParameters","params","returnType"],TSParameterProperty:["parameter"],TSAsExpression:["expression","typeAnnotation"],TSSatisfiesExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSNonNullExpression:["expression"],TSInstantiationExpression:["expression","typeArguments"]};var Qu=Object.assign(Object.create(null),gt),Zu=[],Mt=Symbol("sveast.walk.stop"),ee=Symbol("sveast.walk.skip");function J(e,t,n){En(e,null,null,null,t,n===void 0||n===gt?ed:(i)=>Object.hasOwn(n,i.type)?n[i.type]:void 0)}function En(e,t,n,i,r,s){let a=s(e);if(a===void 0)throw Error(`unknown node type: ${e.type}`);let o=r.enter?.(e,t,n,i);if(o===Mt)return!0;if(o!==ee){if(o!==e&&De(o))return td(o,t,n,i,r,s);let l=tt(e);for(let p=0;p<a.length;p++){let c=a[p],d=l[c];if(Array.isArray(d))for(let f=0;f<d.length;f++){let h=d[f];if(De(h)&&En(h,e,c,f,r,s))return!0}else if(De(d)&&En(d,e,c,null,r,s))return!0}}return r.leave?.(e,t,n,i)===Mt}function ed(e){let t=e.type;if(t==="Identifier")return e.typeAnnotation===void 0&&e.decorators===void 0?Zu:gt.Identifier;if(t==="Literal")return gt.Literal;if(t==="Text")return gt.Text;return Qu[t]}function td(e,t,n,i,r,s){if(t===null||n===null)throw Error("walk can't replace the node it was called with");let a=tt(t),o=a[n];if(i===null)a[n]=e;else if(Array.isArray(o))o[i]=e;return En(e,t,n,i,r,s)}function be(e){return typeof e==="object"&&e!==null}function To(e){return be(e)&&e.type==="VariableDeclaration"&&Array.isArray(e.declarations)}function it(e){return be(e)&&e.type==="Literal"}function A(e){return be(e)&&e.type==="Identifier"&&typeof e.name==="string"}function Ve(e){return be(e)&&e.type==="MemberExpression"}function ne(e){return be(e)&&e.type==="ObjectExpression"&&Array.isArray(e.properties)}function nd(e){return be(e)&&e.type==="CallExpression"}function ve(e,t){return nd(e)&&A(e.callee)&&e.callee.name===t}function Qi(e){return e?.type==="TSAsExpression"||e?.type==="TSSatisfiesExpression"?Qi(e.expression):e}function So(e){return e?.type==="TSAsExpression"||e?.type==="TSSatisfiesExpression"?e.typeAnnotation:void 0}function id(e){return be(e)&&e.type==="NewExpression"}function Zi(e,t){return id(e)&&A(e.callee)&&e.callee.name===t}function Eo(e){if(!be(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)return t[0]?.value?.cooked??null}return null}function z(e){if(A(e))return e.name;if(it(e))return e.value==null?void 0:String(e.value);return}function xt(e,t,n=0,i=e.length,r=0){let s=r;for(let a=n;a<i;a++){let o=e.charCodeAt(a);if(o===34||o===39||o===96){a=rd(e,a,i);continue}if(o===123||o===40||o===91||o===60)s++;else if(o===125||o===41||o===93||o===62&&e.charCodeAt(a-1)!==61){if(s>0)s--}if(t?.(a,s)===!0)break}return s}function rd(e,t,n){let i=e.charCodeAt(t);for(let r=t+1;r<n;r++){let s=e.charCodeAt(r);if(s===92)r++;else if(s===i)return r}return n-1}function G(e,t){let n=[],i=0;return xt(e,(r,s)=>{if(s===0&&t.includes(e[r]))n.push(e.slice(i,r)),i=r+1;return!1}),n.push(e.slice(i)),n}function Cn(e,t){let n=-1;return xt(e,(i,r)=>{if(r===0&&t.includes(e[i]))n=i;return n!==-1}),n}function sd(e){let t=-1;return xt(e,(n,i)=>{if(i===0&&e[n]==="="&&e[n+1]===">")t=n;return t!==-1}),t}function rt(e,t){let n=-1;return xt(e,(i,r)=>{if(r===0)n=i;return n!==-1},t),n}function er(e){let t=e.trim();return t.startsWith("[")&&rt(t,0)===t.length-1}function Co(e){if(!e)return;let t=sd(e);if(t===-1)return;return e.slice(t+2).trim()||void 0}function tr(){return{syntaxMode:"legacy",scriptLanguage:void 0,source:void 0,parsed:void 0,runesOptionOverride:void 0,sourceLocator:void 0,parsedJsDocByText:new Map,jsDocBlocksByStart:new Map,functionDocCommentStarts:new Set,rest_props:void 0,extends:void 0,customElementTag:void 0,customElement:void 0,componentComment:void 0,componentCommentSource:void 0,generics:null,scriptGenericsAttribute:void 0,diagnosticRecords:[],componentFilePath:"",props:new Map,moduleExports:new Map,propLocalToPublicName:new Map,reactive_vars:new Set,funcDecls:new Map,vars:new Set,valueImportBindingsByLocalName:new Map,pendingCallDefaultCandidates:[],pendingConstDefaultCandidates:[],pendingContextKeyCandidates:[],pendingDispatchEscapeCandidates:[],deferredEventNoSourceDiagnostics:[],runesPropsDeclarationMetadataByDeclaratorStart:new Map,typedRunesPropsDeclarations:[],explicitPropTypesByName:new Map,explicitVariableTypesByName:new Map,explicitVariableTypeNodesByName:new Map,typeImportBindingsByLocalName:new Map,localTypeDeclarationsByName:new Map,additionalTypeDependencyNodes:[],wholePropsLocals:new Set,restPropLocals:new Set,componentScope:new Map,scopeDeclarations:new Map,activeScopes:[],slots:new Map,snippetPropLocals:new Set,jsDocSlots:new Map,renderedSlots:new Set,slotsUntracked:!1,cssParts:[],cssProperties:[],deferredSlotBlockGenerics:[],events:new Map,eventDescriptions:new Map,forwardedEvents:new Map,jsDocEventNames:new Set,untypedJsDocEventNames:new Set,jsDocEventSources:new Map,bindings:new Map,contexts:new Map,typedefs:new Map,typedefMembersByName:new Map,variableInfoCache:new Map,variableInfoCacheBuilt:!1,sveldIgnoreDirectives:new Map}}function nr(e,t){return e.propLocalToPublicName.get(t)??t}function kn(e,t,n=t){e.propLocalToPublicName.set(n,t)}function ir(e,t){return e.props.get(nr(e,t))}function Bt(e,t){return ir(e,t)?.type}var od={"prop-unknown-type":"warning","context-any-type":"warning","slot-missing-type":"warning","slot-not-rendered":"warning","event-no-source":"warning","dispatch-escapes":"warning","example-compile-error":"error","example-syntax-error":"error","syntax-skipped":"error","type-syntax-error":"error","rest-props-unresolved":"warning","context-duplicate-key":"warning","context-key-unresolved":"warning","context-value-unresolved":"warning","spread-unresolved":"warning","export-unresolved":"warning","module-export-conflict":"warning","extend-props-target-missing":"error","extend-props-duplicate":"warning","extend-props-override":"warning","jsdoc-unknown-tag":"warning","typedef-duplicate":"warning","property-duplicate":"warning","generics-conflict":"warning","event-description-ambiguous":"warning","jsdoc-tag-dropped":"warning","internal-typedef-referenced":"error","cross-file-unresolved":"warning","export-ambiguous":"warning"};function wn(e){return{...e,code:rr[e.kind],severity:od[e.kind]}}var ad={"prop-unknown-type":"Props without inferred types","context-any-type":"Context values typed as `any`","slot-missing-type":"@slot/@snippet tags missing a {Type} annotation","slot-not-rendered":"@slot/@snippet tags for slots the component doesn't render","event-no-source":"@event tags with no dispatch or callback","dispatch-escapes":"Dispatchers passed to functions sveld can't follow","example-compile-error":"@example blocks that failed to compile","example-syntax-error":"@example blocks that failed to parse","syntax-skipped":"Component syntax sveld skipped","type-syntax-error":"JSDoc types that aren't valid TypeScript","rest-props-unresolved":"$$restProps spread only onto components","context-duplicate-key":"Duplicate setContext keys","context-key-unresolved":"setContext keys sveld couldn't resolve","context-value-unresolved":"setContext values sveld couldn't describe","spread-unresolved":"Unresolved spreads widened to Record<string, any>","export-unresolved":"Unresolved named export specifiers","module-export-conflict":"Module-script exports colliding with generated names","extend-props-target-missing":"@extends/@extendProps targets that couldn't be verified","extend-props-duplicate":"Duplicate @extends/@extendProps tags","extend-props-override":"Own props overriding an @extends target's prop","jsdoc-unknown-tag":"Unknown JSDoc tags","typedef-duplicate":"Duplicate @typedef/@callback names","property-duplicate":"Duplicate @property names","generics-conflict":"Duplicate @generics/@template names","event-description-ambiguous":"Text after an @event read as the next tag's description","jsdoc-tag-dropped":"Passthrough JSDoc tags that couldn't attach","internal-typedef-referenced":"Public types referencing an @internal typedef","cross-file-unresolved":"Imports a standalone parse couldn't read","export-ambiguous":"Ambiguous `export *` names left out of the entry exports"},ld=Object.keys(ad),rr=Object.fromEntries(ld.map((e)=>[e,`sveld/${e}`]));function P(e,t,n,i,r){e.diagnosticRecords.push(sr(e,t,n,i,r))}function sr(e,t,n,i,r){return wn({component:e.componentFilePath,kind:t,name:n,message:i,...r?{source:r}:{},...or(e,t,n)?{ignored:!0}:{}})}function ko(e,t){return`${e}:${t}`}function Te(e,t,n,i){if(!i||i.length===0)return;let r=ko(t,n),s=e.sveldIgnoreDirectives.get(r)??new Set;for(let a of i)s.add(a);e.sveldIgnoreDirectives.set(r,s)}function or(e,t,n){let i=e.sveldIgnoreDirectives.get(ko(t,n));if(!i)return!1;return i.has("")||i.has(rr[t])}var ar="/**",wo="*",An="*/",pd="```",lr=/^\s+/,Ao=/\s/,cd=/^@[^\s/]+(?=\s|$)/,ud=/^@(\S+)\s*/,dd=new Set(["extends","extendProps","generics","template","typedef"]);function Ot(e){let t=0;while(t<e.length){let n=e.charCodeAt(t);if(n!==32&&n!==9&&n!==13&&n!==10&&!Ao.test(e[t]))break;t++}return t}function fd(e,t){let n=e.slice(Ot(e)),i=!1;if(t)n=n.slice(ar.length),i=!0;else if(n.startsWith(wo)&&!n.startsWith(An))n=n.slice(wo.length),i=!0;let r=n.slice(0,Ot(n));n=n.slice(r.length);let s=n.trimEnd(),a=s.endsWith(An)?s.slice(0,-An.length).trimEnd():n;return{indent:i?r.slice(1):r,content:a}}function hd(e,t,n){let i=n>t&&e.charCodeAt(n-1)===13?n-1:n;return e.slice(t,i)}function md(e){let t=[],n=0;while(!0){let i=e.indexOf(ar,n);if(i===-1)break;let r=e.lastIndexOf(`
|
|
5
|
+
`,i-1)+1;if(e.charCodeAt(i+ar.length)===42||e.slice(r,i).trim()!==""){n=i+1;continue}let s=[],a=r,o=!1,l=0;while(a<=e.length){let p=e.indexOf(`
|
|
6
|
+
`,a),c=p===-1?e.length:p,d=hd(e,a,c),{indent:f,content:h}=fd(d,s.length===0);s.push({raw:d,start:a,number:s.length,indent:f,content:h});let m=d.trimEnd();if(m.endsWith(An)){o=!0,l=a+m.length,n=c;break}if(p===-1)break;a=p+1}if(!o)break;t.push({start:i,end:l,lines:s})}return t}function yd(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 gd(e){let t=[[]],n=!1;for(let i of e){if(cd.test(i.content)&&!n)t.push([i]);else t[t.length-1].push(i);if(jt(i.content))n=!n}return t}function jt(e){return xd(e,pd)%2===1}function xd(e,t){let n=0,i=e.indexOf(t);while(i!==-1)n++,i=e.indexOf(t,i+t.length);return n}function Po(e){return e.map((t)=>t.indent+t.content).join(`
|
|
7
|
+
`)}function bd(e){let t=0;while(t<e.length-1&&e[t].content.trim()==="")t++;if(e[t].content[0]!=="{")return null;let n=e.slice(t).map((l)=>l.content).join(`
|
|
8
|
+
`),i=rt(n,0);if(i===-1)return null;let r=[],s=i+1;for(let l=t;s>0;l++){let p=e[l].content.length;r.push(Math.min(s,p)),s-=p+1}let a=t+r.length-1;return{type:r.map((l,p)=>{let c=t+p,d=e[c].content.slice(0,l);if(e[c].content=e[c].content.slice(l).replace(lr,""),c>0)e[c].continuesType=!0;return p===0?d:e[c].indent+d}).join(`
|
|
9
|
+
`).slice(1,-1),endIndex:a}}function vd(e){let t=e.content.match(lr)?.[0]??"",n=e.content.slice(t.length),i=0,r=0;for(let p of n){if(i===0&&Ao.test(p))break;if(p==="[")i++;if(p==="]")i--;r++}let s=i===0?n.slice(0,r):"";if(!s)return null;let a=s,o=!1,l;if(s.startsWith("[")&&s.endsWith("]")){o=!0;let c=s.slice(1,-1).split("=");if(a=c[0].trim(),c.length>1)l=c.slice(1).join("=").trim();if(!a)return null}if(a.length>1&&(a[0]==='"'||a[0]==="'")&&a[a.length-1]===a[0])a=a.slice(1,-1);return e.content=n.slice(r).replace(lr,""),{name:a,optional:o,default:l}}function Td(e){let t=e[0],n=t.content.match(ud),i=n?n[1]:"",r=n?t.content.slice(n[0].length):t.content,s=r.trimEnd(),a=e.slice(1).map((h)=>h.indent+h.content),o=(s?[s,...a]:a).join(`
|
|
10
|
+
`);t.content=r,t.tag=i;let l=bd(e),p=l?.type??"",c=l?.endIndex??0;if(dd.has(i))while(c<e.length-1&&e[c].content.trim()==="")c++;let d=vd(e[c]),f=Po(e.slice(c));return{tag:i,name:d?.name??"",type:p,optional:d?.optional??!1,default:d?.default,description:f,text:o,lines:e}}function Sd(e,t,n){let i=yd(e);i.forEach((a,o)=>{a.number=o});let r=gd(i),s=r.slice(1).map(Td);return{description:Po(r[0]),tags:s,start:t,end:n,lines:i}}function Pn(e){return md(e).map(({start:t,end:n,lines:i})=>Sd(i,t,n))}var Ed=/\s/;function pr(e,t,n){let i=t;while(i<n){let r=e[i];if(r==="/"&&e[i+1]==="/"){let s=e.indexOf(`
|
|
11
|
+
`,i+2);if(s===-1||s>=n)return!0;i=s+1}else if(r==="/"&&e[i+1]==="*"&&e[i+2]!=="*"){let s=e.indexOf("*/",i+2);if(s===-1||s+2>n)return!1;i=s+2}else if(r===" "||r===`
|
|
12
|
+
`||r==="\t"||r==="\r"||Ed.test(r))i++;else return!1}return!0}var Cd=/^-\s*/;function Dn(e){let t=[],n,i=!1;for(let r of e){let s=jt(r);if(n!==void 0){if(s)t.push(r.trim()),n=void 0;else t.push(r.slice(Math.min(n,Ot(r))).trimEnd());continue}let a=r.trim();if(a===""){i=t.length>0;continue}if(i)t.push("");if(i=!1,t.push(a),s)n=Ot(r)}return t.join(`
|
|
13
|
+
`).trimEnd()}function Ne(e){return e?.replace(Cd,"").trim()}function No(e){let t=e.name?`${e.name} ${e.description}`:e.description;return Ne(Dn(t.split(`
|
|
14
|
+
`)))}function cr(e){let t=0;while(e[t+1]?.continuesType)t++;return t}var Nn=new Set(["since","example","see"]),ur=new Set(["bindable","default","required"]);function kd(e){return e.length>0?e.map((t)=>({name:t.tag,body:t.text})):void 0}function $n(e){let t=e.trim();return t===""?!0:t}function wd(e){let t=e.startsWith("/*")?e:`/*${e}`;return t.endsWith("*/")?t:`${t}*/`}function He(e){return e==="*"?"any":e.trim()}var Ad=new Set(["type","param","returns","return","extends","extendProps","restProps","slot","snippet","event","typedef","callback","bindable","deprecated","ignore","internal","csspart","cssprop","cssproperty"]);function dr(e,t){let n=e.parsedJsDocByText.get(t);if(n===void 0)n=Pn(t),e.parsedJsDocByText.set(t,n);return n}function fr(e){let t=e[0]?.tags??[],n,i=[],r,s,a,o=!1,l=[],p=[],c=[];for(let d of t)if(d.tag==="type")n=d;else if(d.tag==="param")i.push(d);else if(d.tag==="returns"||d.tag==="return")r=d;else if(d.tag==="deprecated")a??=$n(d.text);else if(d.tag==="ignore"||d.tag==="internal")o=!0;else if(d.tag==="sveld-ignore")c.push(d.name);else if(Nn.has(d.tag))p.push(d);else if(d.tag==="bindable"){if(d.type)continue;let f=`${d.name}${d.description?` ${d.description}`:""}`.trim();if(f==="readonly"||f==="writable")s??=f}else if(!Ad.has(d.tag))l.push(d);return{type:n,param:i,returns:r,binding:s,deprecated:a,internal:o,additional:l,passthrough:p,ignore:c,description:e[0]?.description}}function Pd(e,t){let n=e.jsDocBlocksByStart.get(t.start);return n?.end===t.end?[n]:void 0}function $o(e,t,n){if(!t||t.length===0||n===void 0||!e.source)return;for(let i=t.length-1;i>=0;i--){let r=t[i];if(!r||typeof r!=="object"||!("value"in r)||!("end"in r))continue;if(typeof r.end!=="number"||!("start"in r)||typeof r.start!=="number")continue;if("type"in r&&r.type==="Line"||!String(r.value).startsWith("*"))continue;if(pr(e.source,r.end,n))return r}return}var Dd=new Set(["ArrowFunctionExpression","FunctionExpression"]);function Lo(e){let t=new Set,n=(r)=>{let{leadingComments:s,start:a}=r,o=$o(e,s,a);if(o)t.add(o.start)};for(let r of e.funcDecls.values())n(r);let i=[{root:e.parsed?.module,isModule:!0},{root:e.parsed?.instance,isModule:!1}];for(let{root:r,isModule:s}of i)for(let a of r?.content.body??[]){let o=a.type==="ExportNamedDeclaration",l=a.type==="ExportNamedDeclaration"?a.declaration:a;if(l?.type==="FunctionDeclaration"){if(o)n(a)}else if(l?.type==="ClassDeclaration"&&s){n(o?a:l);for(let p of l.body.body)if(p.type==="MethodDefinition")n(p)}else if(l?.type==="VariableDeclaration"&&(s||!o||l.kind==="const")&&l.declarations.length===1&&Dd.has(l.declarations[0].init?.type??""))n(a)}return t}function q(e,t){let n=$o(e,t?.leadingComments,t?.start);return n&&Ld(e,n)}function Nd(e,t,n){let i=e;if(t)i=`${e} extends ${t}`;if(n)i+=` = ${n}`;return i}var $d=/^[^\s,]+/,Do=/^\s*,\s*([^\s,]+)/;function hr(e,t){let n=e.optional?e.name:$d.exec(e.name)?.[0];if(!n)return[];let i=[{name:n,constraint:Nd(n,t,e.default)}],r=`${e.optional?"":e.name.slice(n.length)} ${e.description}`;for(let s=Do.exec(r);s;s=Do.exec(r))i.push({name:s[1],constraint:s[1]}),r=r.slice(s[0].length);return i}function Ld(e,t){let n=Pd(e,t)??dr(e,wd(t.value)),{type:i,param:r,returns:s,binding:a,deprecated:o,internal:l,additional:p,passthrough:c,ignore:d,description:f}=fr(n),h=r.length>0?r.filter((S)=>!S.name.includes(".")).map((S)=>({name:S.name,type:He(S.type),description:Ne(Dn(S.description.split(`
|
|
15
|
+
`))),optional:S.optional})):void 0,m,y=p;if(e.functionDocCommentStarts.has(t.start)){let S=p.filter((w)=>w.tag==="template"&&w.name);if(S.length>0)m=S.flatMap((w)=>hr(w,He(w.type))).map(({constraint:w})=>w).join(", "),y=p.filter((w)=>w.tag!=="template")}let g=f?.trim(),N=[...g?[g]:[],...y.map((S)=>`@${S.tag}${S.text?` ${S.text}`:""}`)];return{type:i?He(i.type):void 0,params:h,returnType:s?He(s.type):void 0,description:N.length>0?N.join(`
|
|
16
|
+
`):void 0,binding:a,deprecated:o,tags:kd(c),sveldIgnore:d.length>0?d:void 0,internal:l,typeParameters:m}}function _d(e,t,n,i,r){for(let s of e){if(s.type!=="Block"||s.start<n||s.end>i)continue;r.push({start:s.start,end:s.end,isJsDoc:s.end-s.start>4&&t.startsWith("/**",s.start)})}}function Id(e,t){for(let n of e){let{start:i}=n,r=n.type==="ExportNamedDeclaration"?n.declaration:n;if(r?.type==="FunctionDeclaration"){if(r.id?.name)t.push({name:r.id.name,start:i})}else if(r?.type==="VariableDeclaration"){for(let s of r.declarations)if(s.id.type==="Identifier"&&s.id.name)t.push({name:s.id.name,start:i})}}}function Rd(e,t,n){let i=0,r=e.length;while(i<r){let s=i+r>>>1;if(e[s].end<=t)i=s+1;else r=s}for(let s=i-1;s>=0;s--){let a=e[s];if(!a.isJsDoc)continue;return pr(n,a.end,t)?a:void 0}return}function Md(e){let t=new Map;if(!e.source)return t;let n=[],i=[],r=e.parsed?.comments??[];for(let s of[e.parsed?.module,e.parsed?.instance]){let a=s?.content;if(!a)continue;_d(r,e.source,a.start,a.end,n),Id(a.body,i)}n.sort((s,a)=>s.end-a.end);for(let s of i){let a=Rd(n,s.start,e.source);if(!a)continue;let o=dr(e,e.source.slice(a.start,a.end)),{type:l,description:p,ignore:c,internal:d}=fr(o);if(c.length>0)Te(e,"context-any-type",s.name,c);if(!l&&!p&&!d)continue;t.set(s.name,{type:l?He(l.type):void 0,description:p||l&&No(l),internal:d||void 0})}return t}function _o(e,t){if(!e.variableInfoCacheBuilt)e.variableInfoCache=Md(e),e.variableInfoCacheBuilt=!0;return e.variableInfoCache.get(t)}function We(e,t){let n=ir(e,t);if(n?.type)return{type:n.type,description:n.description,internal:n.internal};let i=_o(e,t),r=e.explicitVariableTypesByName.get(t);if(r)return{type:r,description:i?.description,internal:i?.internal};if(!i?.type)return null;return{type:i.type,description:i.description,internal:i.internal}}function Io(e,t){let n=_o(e,t);return{...n?.description?{description:n.description}:{},...n?.internal?{internal:!0}:{}}}function ze(e,t){for(let n of e.vars)if(n.declarations.some((i)=>i.id.type==="Identifier"&&i.id.name===t))return q(e,n);return q(e,e.funcDecls.get(t))}var Bd=/\w/;function Od(e,t){let n=e.trim();if(!n.startsWith("{")||!n.endsWith("}"))return;let i=G(n.slice(1,-1),";,").map((r)=>r.trim());for(let r of i){if(!r.startsWith(t))continue;let s=r.slice(t.length);if(Bd.test(s.charAt(0)))continue;let a=s.trimStart();if(a.startsWith("?"))a=a.slice(1).trimStart();if(a.startsWith(":"))return a.slice(1).trim()}return}function Ln(e,t){if(t.computed||t.object.type!=="Identifier"||t.property.type!=="Identifier")return;let n=t.object.name,i=t.property.name;if(e.wholePropsLocals.has(n))return Bt(e,i);let r=Bt(e,n)??We(e,n)?.type;if(!r)return;return Od(r,i)}var jd=/(?:_|[^\p{ID_Continue}$])+/u,Fd=/^[\p{ID_Start}$]/u;function _n(e){let i=`${e.split(jd).map((r)=>r.charAt(0).toUpperCase()+r.slice(1)).join("")}Context`;return Fd.test(i)?i:`_${i}`}var qd=/^\{([\s\S]*)\}$/,Vd=/^[A-Za-z_$][\w$]*$/;function $e(e){let t=e.trim(),n=qd.exec(t);if(!n)return null;let i=n[1].trim();if(i==="")return[];let r=[];for(let s of G(i,";,")){let a=s.trim();if(!a)continue;let o=Cn(a,":");if(o===-1)return null;let l=a.slice(0,o).trim(),p=a.slice(o+1).trim();if(!p)return null;let c=!1;if(l.endsWith("?"))c=!0,l=l.slice(0,-1).trim();if(!Vd.test(l))return null;r.push({name:l,type:p,optional:c})}return r}var mr=/[\r\n]+/g;function Ro(e,t){if(!e.source||t<0||t>e.source.length)return;return e.sourceLocator??=Ki(e.source),e.sourceLocator(t)}function In(e,t,n){if(t===void 0||n===void 0||n<t)return;let i=Ro(e,t),r=Ro(e,n);if(!i||!r)return;return{start:i,end:r}}function Mo(e){if(!be(e))return{};return{start:typeof e.start==="number"?e.start:void 0,end:typeof e.end==="number"?e.end:void 0}}function C(e,t){let{start:n,end:i}=Mo(t);return In(e,n,i)}function ie(e,t){if(!t||t.length===0)return;let n=[...t];while(n.length>1){let l=n[n.length-1];if(l.tag!==void 0||!l.raw.trim().endsWith("*/"))break;n.pop()}let i=n[0],r=i.raw.indexOf(`@${i.tag??""}`),s=i.start+Math.max(r,0),a=n[n.length-1],o=a.start+a.raw.length;return In(e,s,o)}function M(e,t,n){return e.source?.slice(t,n)}function Se(e,t){let{start:n,end:i}=Mo(t);if(n===void 0||i===void 0)return;return M(e,n,i)}function K(e,t){return Se(e,t)?.replace(mr," ")}var Hd=/\*\//g;function Le(e){return e.replace(Hd,"*\\/")}function Ee(e){return e.map((t)=>`${t.name}${t.optional?"?":""}: ${t.type}`).join(", ")}var Wd=new Intl.Collator("en");function _e(e,t){return Wd.compare(e,t)}function jo(e,t){if(t===void 0)return;return e.runesPropsDeclarationMetadataByDeclaratorStart.get(t)}function Fo(e){return e.type==="Identifier"?e.name:e.right.name}function qo(e){return e.type==="Identifier"?e.name:qo(e.left)}function Vo(e,t,n){let i=t?.start,r=t?.end;if(i===void 0||r===void 0)return;return M(e,i+n,r)?.trim()}function Ie(e,t){return Vo(e,t,1)}function st(e,t){return Vo(e,t,0)}function Re(e,t,n,i,r=new Set){if(!t)return;let s=(a)=>Re(e,a,n,i,r);J(t,{enter(a){switch(a.type){case"TSInterfaceDeclaration":for(let o of a.extends??[])Bo(e,o.expression,o.typeParameters?.params,n,i,r);return Oo(a.body.body,s),ee;case"TSTypeAliasDeclaration":case"TSTypeAnnotation":return s(a.typeAnnotation),ee;case"TSTypeLiteral":return Oo(a.members,s),ee;case"TSTypeReference":return Bo(e,a.typeName,a.typeArguments?.params,n,i,r),ee}}})}function zd(e,t){let n=new Map;for(let i of Array.from(t).sort()){let r=e.typeImportBindingsByLocalName.get(i),s=r?void 0:e.valueImportBindingsByLocalName.get(i),a=r??(s?{importedName:s.importedName,localName:s.localName,source:s.source,specifierType:"named"}:void 0);if(!a)continue;let o=n.get(a.source)??{default:[],named:[],namespace:[]};if(a.specifierType==="default")o.default.push(a.localName);else if(a.specifierType==="namespace")o.namespace.push(a.localName);else o.named.push({imported:a.importedName,local:a.localName});n.set(a.source,o)}return Array.from(n.entries()).sort(([i],[r])=>_e(i,r)).map(([i,r])=>{if(r.namespace.length>0)return r.namespace.map((l)=>`import type * as ${l} from "${i}";`).join(`
|
|
17
|
+
`);let s=r.named.map(({imported:l,local:p})=>{if(!l||l===p)return p;return`${l} as ${p}`}),a=r.default[0],o=s.length>0?`{ ${s.join(", ")} }`:"";if(a&&o)return`import type ${a}, ${o} from "${i}";`;if(a)return`import type ${a} from "${i}";`;return`import type ${o} from "${i}";`})}function Bo(e,t,n,i,r,s){let a=qo(t);if(e.typeImportBindingsByLocalName.has(a)||e.valueImportBindingsByLocalName.has(a))i.add(a);let o=e.localTypeDeclarationsByName.get(a);if(o&&!s.has(a))r.add(a),s.add(a),Re(e,o.node,i,r,s),s.delete(a);for(let l of n??[])Re(e,l,i,r,s)}function Oo(e,t){for(let n of e)if(n.type==="TSPropertySignature")t(n.typeAnnotation?.typeAnnotation)}function V(e,t){if(t)e.additionalTypeDependencyNodes.push(t)}function Gd(e){if(!e.const)return;let t=e.id.name,n=[];for(let i of e.members){let r=i.initializer;if(r?.type!=="Literal")return;let s=r.value;if(typeof s==="string")n.push(JSON.stringify(s));else if(typeof s==="number")n.push(String(s));else return}if(n.length===0)return;return`type ${t} = ${n.join(" | ")};`}function Ho(e,t){let n=Gd(t);if(n)return n;let i=M(e,t.start,t.end)?.trim();return i?`declare ${i}`:void 0}function yr(e,t){let n=[];for(let i of t.params){let r=i.type==="TSParameterProperty"?i.parameter:i;if(r.type==="RestElement"){V(e,r.typeAnnotation?.typeAnnotation),n.push({name:r.argument.type==="Identifier"?r.argument.name:"rest",type:Ie(e,r.typeAnnotation),optional:!1,rest:!0});continue}let s=r.type==="AssignmentPattern",a=s?r.left:r,o="typeAnnotation"in a?a.typeAnnotation:void 0;V(e,o?.typeAnnotation),n.push({name:a.type==="Identifier"?a.name:"arg",type:Ie(e,o),optional:s||"optional"in r&&r.optional===!0,rest:!1})}V(e,t.returnType?.typeAnnotation);for(let i of t.typeParameters?.params??[])V(e,i.constraint),V(e,i.default);return{params:n,returnType:Ie(e,t.returnType),typeParameters:st(e,t.typeParameters)||void 0}}function Wo(e,t){let{params:n,returnType:i,typeParameters:r}=yr(e,t),s=n.map(({name:o,type:l,optional:p,rest:c})=>c?`...${o}: ${l??"any[]"}`:`${o}${p?"?":""}: ${l??"any"}`),a=i!==void 0||r!==void 0||n.some((o)=>o.type!==void 0);return{signature:`${r??""}(${s.join(", ")}) => ${i??"any"}`,hasAnnotations:a}}function Ft(e){return e.length>0?e.slice():void 0}function zo(e){let t=Ft(e.pendingCallDefaultCandidates),n=Ft(e.pendingConstDefaultCandidates),i=Ft(e.pendingContextKeyCandidates),r=Ft(e.pendingDispatchEscapeCandidates);if(!t&&!n&&!i&&!r)return;let s=Ft(e.deferredEventNoSourceDiagnostics),a=r&&e.untypedJsDocEventNames.size>0?Array.from(e.untypedJsDocEventNames):void 0;return{...t?{pendingCallDefaultCandidates:t}:{},...n?{pendingConstDefaultCandidates:n}:{},...i?{pendingContextKeyCandidates:i}:{},...r?{pendingDispatchEscapeCandidates:r}:{},...s?{deferredEventNoSourceDiagnostics:s}:{},...a?{untypedJsDocEventNames:a}:{}}}function Go(e){let t=new Set,n=new Set;for(let l of e.additionalTypeDependencyNodes)Re(e,l,t,n);let i=Array.from(e.localTypeDeclarationsByName.values()).filter((l)=>l.exported).sort((l,p)=>l.start-p.start);for(let l of i)Re(e,l.node,t,n);let r=i.map((l)=>`export ${l.code}`),s=e.typedRunesPropsDeclarations.length===1?e.typedRunesPropsDeclarations[0]:void 0,a=s?.canonicalType;if(s&&a){for(let l of s.referencedImportedTypes)t.add(l);for(let l of s.referencedLocalTypes)n.add(l)}if(!a&&t.size===0&&n.size===0&&r.length===0)return;let o=Array.from(n).map((l)=>e.localTypeDeclarationsByName.get(l)).filter((l)=>l!==void 0&&!l.exported).sort((l,p)=>l.start-p.start).map((l)=>l.code);return{...a?{canonicalPropsType:a}:{},canonicalPropNames:s&&a?Array.from(s.props.keys()).sort():[],localTypeDeclarations:o,...r.length>0?{moduleTypeDeclarations:r}:{},typeImportStatements:zd(e,t)}}function qt(e,t){let n=t.source.value;if(typeof n!=="string"||t.importKind==="type")return;for(let i of t.specifiers){if(i.type!=="ImportSpecifier"||i.importKind==="type")continue;let r=i.local.name,{imported:s}=i,a=s.type==="Identifier"?s.name:typeof s.value==="string"?s.value:r;e.valueImportBindingsByLocalName.set(r,{localName:r,importedName:a,source:n})}}function Vt(e){return[e.importedName,...e.members??[]].join(".")}function gr(e,t){let n=[],i=t;while(Ve(i)){if(i.computed||!A(i.property))return;n.unshift(i.property.name),i=i.object}if(!A(i))return;let r=i.name,s=(o,l,p)=>p.length>0?{source:o,importedName:l,members:p}:{source:o,importedName:l},a=e.valueImportBindingsByLocalName.get(r);if(a)return s(a.source,a.importedName,n);for(let o of[e.parsed?.instance,e.parsed?.module])for(let l of o?.content.body??[]){if(l.type!=="ImportDeclaration")continue;let p=l.source.value;if(l.importKind==="type"||typeof p!=="string")continue;let c=l.specifiers.find((d)=>d.local.name===r);if(c?.type==="ImportDefaultSpecifier")return s(p,"default",n);if(c?.type==="ImportNamespaceSpecifier"&&n.length>0)return s(p,n[0],n.slice(1))}return}function Rn(e,t){if(!Ve(t))return;return gr(e,t)}function Uo(e){let t=new Map;for(let n of e.content.body){if(n.type!=="ImportDeclaration"||n.importKind==="type")continue;let i=n.source.value;if(typeof i!=="string")continue;for(let r of n.specifiers){if(r.type==="ImportSpecifier"&&r.importKind==="type")continue;let s=r.local.name,a;if(r.type==="ImportDefaultSpecifier")a="default";else if(r.type==="ImportNamespaceSpecifier")a="*";else if(r.imported.type==="Identifier")a=r.imported.name;else a=String(r.imported.value??s);t.set(s,{from:i,imported:a})}}return t}function xr(e,t){for(let n of t?.content.body??[]){if(n.type==="ImportDeclaration"){qt(e,n);continue}let i=n.type==="ExportNamedDeclaration"&&n.declaration?n.declaration:n;if(i.type==="FunctionDeclaration"&&i.id?.name)e.funcDecls.set(i.id.name,i)}}function Mn(e){return e==="TSTypeAnnotation"||e==="TSTypeAliasDeclaration"||e==="TSInterfaceDeclaration"||e==="TSTypeParameterDeclaration"||e==="TSTypeParameterInstantiation"}function Jo(e){let t=[];return J(e,{enter(n){if(n.type==="FunctionDeclaration"||n.type==="FunctionExpression"||n.type==="ArrowFunctionExpression")return ee;if(n.type==="ReturnStatement")t.push(n.argument??null)}}),t}function bt(e,t,n){if(!t)return;kn(e,t);let i=e.props.get(t);e.props.set(t,i?{...i,...n}:n)}function Bn(e,t,n,i){if(t.pendingCallDefault)e.pendingCallDefaultCandidates.push({propName:n,location:i,...t.pendingCallDefault});if(t.pendingConstDefault)e.pendingConstDefaultCandidates.push({propName:n,location:i,...t.pendingConstDefault})}var Ud=/[^\S\r\n]*[\r\n]\s*/g,Jd=new Map([["Date","Date"],["Map","Map<any, any>"],["Set","Set<any>"],["WeakMap","WeakMap<object, any>"],["WeakSet","WeakSet<object>"],["Array","any[]"],["RegExp","RegExp"],["Regexp","RegExp"],["Error","Error"]]);function Me(e,t,n=0){let i,r,s=!1;if(!t||typeof t!=="object"||!("type"in t))return{value:i,type:r,isFunction:s};let a=Yo(e,t);if(t.type==="ObjectExpression"||t.type==="BinaryExpression"||t.type==="ArrayExpression"||t.type==="ArrowFunctionExpression"||t.type==="FunctionExpression"){if(i=K(e,t),s=t.type==="ArrowFunctionExpression"||t.type==="FunctionExpression",t.type==="BinaryExpression")r=re(e,t,n);else if(t.type==="ObjectExpression"||t.type==="ArrayExpression"){let{start:o,end:l}=t;r=br(t)?Yd(e,o,l,i):void 0}else if(s)r=Zo(t),i=Xo(e,t)}else if(t.type==="UnaryExpression")i=Se(e,t),r=re(e,t,n);else if(t.type==="LogicalExpression"||t.type==="ConditionalExpression"||t.type==="SequenceExpression"){let o=Se(e,t)?.replace(Ud," ");i=o!==void 0&&t.type==="SequenceExpression"?`(${o})`:o,r=re(e,t,n)}else if(t.type==="NewExpression"){i=Se(e,t);let o=t.callee;if(A(o))r=Jd.get(o.name)??o.name}else if(t.type==="CallExpression"){let o=t;i=Se(e,t);let l=o.callee,p=A(l)?l.name:void 0;if((p==="$derived"||p==="$state")&&o.arguments.length===1&&n<5)return{...Me(e,o.arguments[0],n+1),value:i,defaultValue:a};if(p){let c=Qd(e,p);if(c)return{value:i,type:void 0,isFunction:!1,defaultValue:a,resolvedType:c};if(e.funcDecls.has(p)||Qo(e,p))return{value:i,type:void 0,isFunction:!1,defaultValue:a,pendingCallDefault:{calleeName:p}};let d=e.valueImportBindingsByLocalName.get(p);if(d)return{value:i,type:void 0,isFunction:!1,defaultValue:a,pendingCallDefault:{calleeName:p,importSource:d.source,importedName:d.importedName}}}return{value:i,type:void 0,isFunction:!1,defaultValue:a,pendingCallDefault:{calleeName:p??Se(e,l)??"call"}}}else if(t.type==="Identifier"){let o=t;if(n<5){let p=Wt(e,o.name);if(p){let c=Me(e,p,n+1),d=ze(e,o.name);return{...c,resolvedType:d?.type??c.resolvedType,resolvedDescription:d?.description??c.resolvedDescription,resolvedParams:d?.params??c.resolvedParams,resolvedReturnType:d?.returnType??c.resolvedReturnType}}if(e.funcDecls.has(o.name)){let c=ze(e,o.name),d=e.funcDecls.get(o.name);return{value:d?Xo(e,d):void 0,type:void 0,isFunction:!0,defaultValue:d?Yo(e,d):void 0,resolvedType:c?.type??tf(c,d),resolvedDescription:c?.description,resolvedParams:c?.params,resolvedReturnType:c?.returnType}}}i=Se(e,o);let l=e.valueImportBindingsByLocalName.get(o.name);if(l)return{value:i,type:r,isFunction:s,defaultValue:a,pendingConstDefault:{importSource:l.source,importedName:l.importedName}}}else if(t.type==="MemberExpression"){if(i=Se(e,t),lf(t))r="number";let o=Rn(e,t);if(o)return{value:i,type:r,isFunction:s,defaultValue:a,pendingConstDefault:{importSource:o.source,importedName:o.importedName,...o.members?{members:o.members}:{}}}}else if(t.type==="TemplateLiteral")i=Se(e,t),r="string";else if("raw"in t&&typeof t.raw==="string")i=t.raw,r=Ht(t);return{value:i,type:r,isFunction:s,defaultValue:a}}function Ht(e){if("regex"in e&&e.regex)return"RegExp";if("bigint"in e&&e.bigint)return"bigint";return e.value==null?void 0:typeof e.value}var Kd=new Set(["-","*","/","%","**","<<",">>",">>>","&","|","^"]),Xd=new Set(["==","!=","===","!==","<","<=",">",">=","in","instanceof"]);function re(e,t,n){if(!t||typeof t!=="object"||!("type"in t))return;switch(t.type){case"UnaryExpression":{let i=t;if(i.operator==="!"||i.operator==="delete")return"boolean";if(i.operator==="typeof")return"string";if(i.operator==="void")return;if(i.operator==="+")return"number";return re(e,i.argument,n)==="bigint"?"bigint":"number"}case"BinaryExpression":{let i=t;if(Xd.has(i.operator))return"boolean";let r=re(e,i.left,n),s=re(e,i.right,n);if(r==="bigint"&&s==="bigint")return"bigint";if(Kd.has(i.operator))return"number";if(i.operator!=="+")return;if(r==="string"||s==="string")return"string";if(r==="number"&&s==="number")return"number";return}case"LogicalExpression":{let i=t;return Ko([re(e,i.left,n),re(e,i.right,n)])}case"ConditionalExpression":{let i=t;return Ko([re(e,i.consequent,n),re(e,i.alternate,n)])}case"SequenceExpression":{let i=t.expressions;return re(e,i[i.length-1],n)}case"Identifier":{let i=t.name;if(i==="NaN"||i==="Infinity")return"number";if(i==="undefined")return;let r=We(e,i)?.type;if(r)return r;if(n>=5)return;return re(e,Wt(e,i),n+1)}default:{if(n>=5)return;let i=Me(e,t,n+1);return i.type??i.resolvedType}}}function Ko(e){let t=new Set;for(let n of e){if(n===void 0)return;t.add(n.includes("=>")?`(${n})`:n)}return t.size===1?e[0]:[...t].join(" | ")}function Yd(e,t,n,i){if(i===void 0||t===void 0||n===void 0)return i;let r=e.parsed?.comments??[],s="",a=t;for(let o of r){if(o.start<t||o.end>n)continue;s+=M(e,a,o.start)??"",a=o.end}if(a===t)return i;return s+=M(e,a,n)??"",s.replace(mr," ")}function br(e){if(!e||typeof e!=="object"||!("type"in e))return!1;switch(e.type){case"Literal":return!(("regex"in e)&&e.regex);case"TemplateLiteral":return e.expressions.length===0;case"Identifier":return e.name==="undefined";case"UnaryExpression":{let t=e,n=t.argument;return t.operator==="-"&&n?.type==="Literal"&&(typeof n.value==="number"||typeof n.value==="bigint")}case"ArrayExpression":return e.elements.every((t)=>t!==null&&br(t));case"ObjectExpression":return e.properties.every((t)=>t.type==="Property"&&t.kind==="init"&&!t.computed&&!t.method&&!t.shorthand&&(t.key.type==="Identifier"||t.key.type==="Literal")&&br(t.value));default:return!1}}function On(e,t){let n=Wt(e,t);if(!n||typeof n!=="object"||!("type"in n))return;if(n.type==="CallExpression"){let i=n,r=K(e,i.callee);if(r==="$state"||r==="$state.raw"||r==="$derived"){let s=i.typeArguments?.params[0];if(s)return V(e,s),K(e,s);if(r==="$state.raw")return Me(e,i.arguments[0],1).type}}return Me(e,n).type}function Wt(e,t,n=!1){for(let i of e.vars){if(n&&i.kind!=="const")continue;for(let r of i.declarations)if(A(r.id)&&r.id.name===t&&r.init)return r.init}return}function vt(e,t){return Wt(e,t,!0)}function Qd(e,t){let n=ze(e,t);if(n?.returnType)return n.returnType;let i=e.funcDecls.get(t)??Qo(e,t);if(!i)return;let r=ef(e,i);if(r)return r;let s=Zd(e,t);if(s)return s;let a=ea(i);return a==="any"?void 0:a}function Qo(e,t){let n=Wt(e,t);if(!n||typeof n!=="object"||!("type"in n))return;if(n.type==="ArrowFunctionExpression"||n.type==="FunctionExpression")return n;return}function Zd(e,t){for(let n of e.vars)for(let i of n.declarations){let r=i.id;if(!A(r)||r.name!==t)continue;let s=r.typeAnnotation?.typeAnnotation;if(!s)return;return Co(M(e,s.start,s.end))}return}function ef(e,t){let n=t.returnType?.typeAnnotation;return n&&M(e,n.start,n.end)}function tf(e,t){let n=e?.returnType??"any",i=e?.params;if(i&&i.length>0)return`(${Ee(i)}) => ${n}`;if(e?.returnType)return`() => ${n}`;return t?Zo(t):"(...args: any[]) => any"}function Zo(e){return`(${nf(e)}) => ${ea(e)}`}function nf(e){let t=e.params;if(!Array.isArray(t)||t.length===0)return"...args: any[]";let n=[];for(let i of t){if(!A(i))return"...args: any[]";n.push(`${i.name}: any`)}return n.join(", ")}function ea(e){if(e.async||e.generator)return"any";let{body:t}=e,n=t.type==="BlockStatement"?Jo(t):[t],i=new Set(n.map(rf)),[r]=i;return i.size===1&&r?r:"any"}function rf(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(!A(t))return null;if(t.name==="String")return"string";if(t.name==="Number")return"number";if(t.name==="Boolean")return"boolean";return null}default:return null}}function ta(e){return ve(e,"$bindable")?{init:e.arguments[0],bindable:!0}:{init:e,bindable:!1}}function sf(e,t){let n=t.params;if(!Array.isArray(n)||n.length===0)return"";let i=n[0],r=n[n.length-1];if(typeof i.start!=="number"||typeof r.end!=="number")return"";return M(e,i.start,r.end)??""}function Xo(e,t){if(t.generator)return;let{body:n}=t,i=sf(e,t),r=t.async?"async ":"",s=(l,p)=>l.type==="ObjectExpression"?`(${p})`:p;if(n.type!=="BlockStatement"){let l=K(e,n);return l===void 0?void 0:`${r}(${i}) => ${s(n,l)}`}let a=n.body;if(a.length===0)return`${r}(${i}) => {}`;let[o]=a;if(a.length===1&&o.type==="ReturnStatement"&&o.argument){let l=K(e,o.argument);if(l!==void 0)return`${r}(${i}) => ${s(o.argument,l)}`}return}function Yo(e,t){let n=K(e,t);if(!n||!t||typeof t!=="object"||!("type"in t))return;let i="expression";if(t.type==="Literal"||t.type==="UnaryExpression")i="literal";else if(t.type==="TemplateLiteral")i=t.expressions.length===0?"literal":"expression";else if(t.type==="ArrayExpression")i="array";else if(t.type==="ObjectExpression")i="object";else if(t.type==="ArrowFunctionExpression"||t.type==="FunctionExpression"||t.type==="FunctionDeclaration")i="function";let r={raw:n,kind:i};if(i==="literal"||i==="array"||i==="object"){let s=vr(t);if(s.ok)r.value=s.value}return r}function vr(e){if(!e||typeof e!=="object"||!("type"in e))return{ok:!1};if(e.type==="Literal"){let t=e.value;return typeof t==="bigint"||"regex"in e?{ok:!1}:{ok:!0,value:t}}if(e.type==="UnaryExpression"){let{operator:t,argument:n}=e;if(n?.type!=="Literal")return{ok:!1};let{value:i}=n;if(typeof i==="number"){if(t==="-")return{ok:!0,value:-i};if(t==="+")return{ok:!0,value:i}}if(typeof i==="boolean"&&t==="!")return{ok:!0,value:!i};return{ok:!1}}if(e.type==="TemplateLiteral"){let t=e;if(t.expressions.length>0||t.quasis.length!==1)return{ok:!1};return{ok:!0,value:t.quasis[0].value.cooked??t.quasis[0].value.raw}}if(e.type==="ArrayExpression"){let t=e,n=[];for(let i of t.elements){if(!i)return{ok:!1};let r=vr(i);if(!r.ok)return{ok:!1};n.push(r.value)}return{ok:!0,value:n}}if(e.type==="ObjectExpression"){let t=e,n={};for(let i of t.properties){if(i.type!=="Property"||i.computed)return{ok:!1};let r=z(i.key);if(!r)return{ok:!1};let s=vr(i.value);if(!s.ok)return{ok:!1};n[r]=s.value}return{ok:!0,value:n}}return{ok:!1}}var of=new Set(["POSITIVE_INFINITY","NEGATIVE_INFINITY","MAX_VALUE","MIN_VALUE","MAX_SAFE_INTEGER","MIN_SAFE_INTEGER","EPSILON","NaN"]),af=new Set(["PI","E","LN2","LN10","LOG2E","LOG10E","SQRT2","SQRT1_2"]);function lf(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,i=t.property&&"name"in t.property?t.property.name:void 0;if(!n||!i)return!1;if(n==="Number")return of.has(i);if(n==="Math")return af.has(i);return!1}function te(e,t,n){if(!t||e.has(t))return;e.set(t,n)}function jn(e,t){for(let n=e.activeScopes.length-1;n>=0;n-=1){let i=e.activeScopes[n]?.get(t);if(!i)continue;return i.kind==="prop"?i.publicPropName:void 0}return}function zt(e,t){for(let n=e.activeScopes.length-1;n>=0;n-=1){let i=e.activeScopes[n];if(i===e.componentScope)return!1;if(i?.has(t))return!0}return!1}function Fn(e,t){let n=t;while(Ve(n))n=n.object;return A(n)&&zt(e,n.name)}function B(e,t=new Set){if(e)for(let n of Xi(e))t.add(n.name);return t}function Sr(e,t){if(!t||typeof t!=="object"||!("type"in t))return;if(t.type==="Identifier"){let n=jn(e,t.name);if(n)e.reactive_vars.add(n);return}if(t.type!=="ObjectPattern"&&t.type!=="ArrayPattern")return;for(let n of B(t)){let i=jn(e,n);if(i)e.reactive_vars.add(i)}}function Tt(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 na(e){if(!e||typeof e!=="object"||!("type"in e))return!1;let t=String(e.type);return t==="FunctionDeclaration"||t==="FunctionExpression"||t==="ArrowFunctionExpression"}function pf(e,t){let n=e.scopeDeclarations.get(t);if(!n)n=new Map,e.scopeDeclarations.set(t,n);return n}function cf(e){let t=[];if(e.id.type==="Identifier")return t.push({kind:"local",name:e.id.name}),t;if(e.id.type!=="ObjectPattern")return t;for(let n of e.id.properties){if(n.type==="RestElement"){if(n.argument.type==="Identifier")t.push({kind:"local",name:n.argument.name});continue}if(n.computed)continue;let i=z(n.key);if(!i)continue;let r=n.value.type==="AssignmentPattern"?n.value.left:n.value;if(r.type!=="Identifier"||!r.name)continue;t.push({kind:"prop",name:r.name,publicPropName:i})}return t}function Tr(e,t,n,i){if(!To(e))return;let r=e.kind==="var"?n:t;for(let s of e.declarations){if(i?.allowRunesProps&&ve(s.init,"$props")){for(let a of cf(s))te(a.kind==="prop"?t:n,a.name,a.kind==="prop"?{kind:"prop",publicPropName:a.publicPropName}:{kind:"local"});continue}for(let a of B(s.id))te(r,a,i?.forceProp?{kind:"prop",publicPropName:a}:{kind:"local"})}}function uf(e,t){if(e.id)te(t,e.id.name,{kind:"local"});for(let n of e.params){let i=n.type==="TSParameterProperty"?n.parameter:n;for(let r of B(i))te(t,r,{kind:"local"})}}function df(e,t,n){if(!Array.isArray(e))return;for(let i of e){if(!i||typeof i!=="object"||!("type"in i))continue;switch(i.type){case"VariableDeclaration":Tr(i,t,n);break;case"FunctionDeclaration":case"ClassDeclaration":if(i.id?.name)te(t,i.id.name,{kind:"local"});break}}}function ff(e,t){for(let{local:n,exported:i}of t){if(n.type!=="Identifier")continue;let r=i.type==="Identifier"?i.name:String(i.value);if(e.componentScope.get(n.name)?.kind==="prop")continue;e.componentScope.set(n.name,{kind:"prop",publicPropName:r})}}function hf(e,t){for(let n of t?.content.body??[])switch(n.type){case"ImportDeclaration":for(let i of n.specifiers)if(i.local.name)te(e.componentScope,i.local.name,{kind:"local"});break;case"VariableDeclaration":Tr(n,e.componentScope,e.componentScope,{allowRunesProps:!0});break;case"FunctionDeclaration":case"ClassDeclaration":if(n.id?.name)te(e.componentScope,n.id.name,{kind:"local"});break;case"ExportNamedDeclaration":if(!n.declaration){if(n.source==null)ff(e,n.specifiers);break}if(n.declaration.type==="VariableDeclaration")Tr(n.declaration,e.componentScope,e.componentScope,{forceProp:!0});else if(n.declaration.type==="FunctionDeclaration"&&n.declaration.id?.name)te(e.componentScope,n.declaration.id.name,{kind:"prop",publicPropName:n.declaration.id.name});break}}function ia(e){e.componentScope.clear(),e.scopeDeclarations=new Map,e.activeScopes.length=0,hf(e,e.parsed?.instance)}function ra(e){return{varScopeStack:[e.componentScope]}}function sa(e,t,n){if(!Tt(n))return;let i=pf(e,n),r=t.varScopeStack[t.varScopeStack.length-1]??e.componentScope;switch(n.type){case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":uf(n,i);break;case"BlockStatement":df(n.body,i,r);break;case"CatchClause":for(let s of B(n.param))te(i,s,{kind:"local"});break;case"EachBlock":for(let s of B(n.context))te(i,s,{kind:"local"});if(typeof n.index==="string")te(i,n.index,{kind:"local"});break;case"AwaitBlock":for(let s of B(n.value))te(i,s,{kind:"local"});for(let s of B(n.error))te(i,s,{kind:"local"});break}if(na(n))t.varScopeStack.push(i);return i}function oa(e,t){if(na(t))e.varScopeStack.pop()}function Er(e,t){let n=We(e,t);if(n&&n.type===e.explicitVariableTypesByName.get(t))V(e,e.explicitVariableTypeNodesByName.get(t));return n}function qn(e,t,n=!0){let i=Er(e,t);if(i||!n)return i;let r=On(e,t);return r?{type:r,...Io(e,t)}:null}function mf(e,t,n){if(!A(t))return null;let i=vt(e,t.name);if(ne(i))return fa(e,i,n).properties;let r=qn(e,t.name);return r?$e(r.type):null}function yf(e,t){return e.properties.some((n)=>n.type==="Property"&&n.kind==="get"&&z(n.key)===t)}function aa(e,t,n){if(!t||typeof t!=="object"||!(n in t))return;let i=t[n];if(!i||typeof i!=="object"||!("typeAnnotation"in i))return;return K(e,i.typeAnnotation)}function gf(e){let t=e?.body.body;if(t?.length!==1||t[0].type!=="ReturnStatement")return;return t[0].argument??void 0}function xf(e,t,n,i,r){if(A(r)){let s=qn(e,r.name);if(s)return s;return P(e,"context-any-type",n,`Context "${t}" property "${n}" has no type annotation; defaulted to "any".`,C(e,i)),{type:"any"}}if(r?.type==="ArrowFunctionExpression"||r?.type==="FunctionExpression")return{type:`(${r.params.map((a)=>`${A(a)?a.name||"arg":"arg"}: any`).join(", ")}) => any`};if(it(r))return{type:Ht(r)??"null"};return{type:"any"}}function fa(e,t,n){let i=[],r=!1;for(let s of t.properties){if(s.type==="SpreadElement"){let c=mf(e,s.argument,n);if(c)i.push(...c);else r=!0,P(e,"spread-unresolved",n,`Context "${n}" spreads a value sveld can't resolve; its shape is widened to "Record<string, any>".`,C(e,s));continue}if(s.type!=="Property")continue;let a=z(s.key);if(!a)continue;if(s.kind==="set"&&yf(t,a))continue;let o=s.kind==="get"||s.kind==="set"?s.value:void 0,l=o?s.kind==="get"?aa(e,o,"returnType"):aa(e,o.params[0],"typeAnnotation"):void 0,p=l?{type:l}:xf(e,n,a,s,s.kind==="get"?gf(o):s.kind==="set"?void 0:s.value);i.push({name:a,type:p.type,description:p.description,optional:!1,...p.internal?{internal:!0}:{}})}return{properties:i,hasUnresolvedSpread:r}}function la(e,t,n){let{properties:i,hasUnresolvedSpread:r}=fa(e,t,n);return{key:n,typeName:_n(n),properties:i,description:void 0,...r?{hasUnresolvedSpread:r}:{}}}function pa(e,t,n){if(ne(t))return la(e,t,n);if(!A(t))return null;let i=t.name,r=qn(e,i,!1),s=r?void 0:vt(e,i);if(ne(s))return la(e,s,n);let a=r??qn(e,i);if(a){let o=$e(a.type);return{key:n,typeName:_n(n),...o?{}:{type:a.type},properties:o??[],description:a.description,...a.internal?{internal:!0}:{}}}return P(e,"context-any-type",i,`Context "${n}" variable "${i}" has no type annotation; defaulted to "any".`,C(e,t)),{key:n,typeName:_n(n),type:"any",properties:[]}}function ca(e){let t=e.callee,n=t.type==="Identifier"&&t.name==="Symbol",i=t.type==="MemberExpression"&&!t.computed&&t.object.type==="Identifier"&&t.object.name==="Symbol"&&t.property.type==="Identifier"&&t.property.name==="for";if(!n&&!i)return null;let r=e.arguments[0];if(r?.type==="Literal"&&typeof r.value==="string")return r.value;if(r?.type==="TemplateLiteral"&&r.quasis.length===1)return r.quasis[0].value.cooked??"";return""}function ua(e){return{kind:"pending",importSource:e.source,importedName:e.importedName,...e.members?{members:e.members}:{}}}function ha(e,t,n=0){if(!t||typeof t!=="object"||!("type"in t))return{kind:"unresolved"};let i=t;if(i.type==="Literal"||i.type==="TemplateLiteral"){let r=Eo(i);return r==null?{kind:"unresolved"}:{kind:"resolved",key:r}}if(i.type==="CallExpression"||i.type==="NewExpression"){let r=ca(i);return r==null?{kind:"unresolved"}:{kind:"resolved",key:r}}if(i.type==="Identifier"){if(n>=5)return{kind:"unresolved"};let r=vt(e,i.name);if(r&&typeof r==="object"&&"type"in r){let a=r;if((a.type==="CallExpression"||a.type==="NewExpression")&&ca(a)==="")return{kind:"resolved",key:i.name};return ha(e,a,n+1)}let s=n===0&&zt(e,i.name)?void 0:e.valueImportBindingsByLocalName.get(i.name);return s?ua(s):{kind:"unresolved"}}if(i.type==="MemberExpression"){let r=n===0&&Fn(e,i)?void 0:Rn(e,i);if(r)return ua(r)}return{kind:"unresolved"}}function da(e,t,n,i,r){let s=K(e,i)??"";P(e,"context-value-unresolved",t,`setContext(${n}, ${s}): the value isn't an object literal or a variable, so sveld can't describe its shape; the context is skipped.`,r)}function ma(e,t){let n=t.arguments[0];if(!n)return;let i=ha(e,n);if(i.kind==="unresolved"||i.kind==="resolved"&&!i.key){let l=K(e,n)??"";P(e,"context-key-unresolved",l,`setContext key \`${l}\` isn't a string literal, const-bound string, Symbol(), or imported \`export const\` string; the context is skipped.`,C(e,t));return}let r=t.arguments[1];if(!r)return;let s=C(e,t);if(i.kind==="pending"){let l=Vt(i),p=pa(e,r,l);if(p)e.pendingContextKeyCandidates.push({importSource:i.importSource,importedName:i.importedName,...i.members?{members:i.members}:{},...p.type===void 0?{}:{type:p.type},properties:p.properties,description:p.description,...p.hasUnresolvedSpread?{hasUnresolvedSpread:!0}:{},...p.internal?{internal:!0}:{},source:s});else da(e,l,l,r,s);return}let a=i.key,o=pa(e,r,a);if(!o){da(e,a,JSON.stringify(a),r,s);return}if(e.contexts.has(a)){P(e,"context-duplicate-key",a,`setContext("${a}", ...) was called more than once; only the first call's shape is used.`,s);return}e.contexts.set(a,{...o,source:s})}var bf=new Set(["Component","SvelteComponent","SvelteSelf"]),vf=new Set(["RegularElement","SvelteElement"]);function St(e){return bf.has(e)}function Gt(e){return vf.has(e)}var Tf=/\n/g,Sf=/^[A-Za-z_$][\w$]*$/;function Cr(e,t){return{variableType:(n)=>{if(t?.has(n))return;return Er(e,n)?.type??On(e,n)}}}function Ut(e,t,n){if(!t||typeof t!=="object"||!("type"in t))return n;if(A(t)){if(!zt(e,t.name))return n;let r=n??new Set;return r.add(t.name),r}let i=n;if(ne(t)){for(let r of t.properties)if(r.type==="Property")i=Ut(e,r.value,i)}else if(t.type==="ArrayExpression")for(let r of t.elements)i=Ut(e,r,i);return i}function kr(e,t){if(A(t))return e.variableType(t.name);return Ef(e,t)}function Ef(e,t){if(!t||typeof t!=="object"||!("type"in t))return;if(ne(t))return ga(e,t);if(t.type==="ArrayExpression")return xa(e,t);return}function ya(e,t){if(!t||typeof t!=="object"||!("type"in t))return"any";if(A(t))return e.variableType(t.name)??"any";if(it(t))return Ht(t)??"null";if(ne(t))return ga(e,t);if(t.type==="ArrayExpression")return xa(e,t);return"any"}function ga(e,t){if(t.properties.length===0)return"Record<string, never>";let n=[],i=!1;for(let r of t.properties){let s=r.type==="Property"&&!r.computed?z(r.key):void 0;if(r.type!=="Property"||!s){i=!0;continue}n.push({name:s,type:ya(e,r.value)})}if(!i)return Jt(n);if(n.length===0)return"Record<string, any>";return Jt([...n,{name:"[key: string]",type:"any"}])}function xa(e,t){let n=new Set(t.elements.filter((i)=>i!=null).map((i)=>ya(e,i)));if(n.size===0)return"any[]";if(n.size===1)return`${[...n][0]}[]`;return`(${[...n].join(" | ")})[]`}function ba(e,t){for(let[n,i]of e.arguments.entries()){if(A(i)&&i.name===t)return{argumentIndex:n};if(!ne(i))continue;for(let r of i.properties){if(r.type!=="Property"||!A(r.value))continue;if(r.value.name!==t)continue;let s=!r.computed&&A(r.key)?r.key.name:void 0;return{argumentIndex:n,property:s??""}}}return}function wr(e){return typeof e==="string"?JSON.stringify(e):String(e)}function Ge(e,{name:t,detail:n,has_argument:i,description:r,deprecated:s,tags:a,internal:o,source:l}){if(t===void 0)return;let p=!i&&!n?"null":n||void 0,c=e.events.get(t);if(c?.type==="forwarded")e.events.set(t,{type:"dispatched",name:t,detail:p,description:r||c.description,deprecated:s??c.deprecated,tags:a??c.tags,...o||c.internal?{internal:!0}:{},source:l||c.source});else if(c){let d=e.untypedJsDocEventNames.delete(t);e.events.set(t,{...c,detail:c.detail===void 0||d?p:c.detail,description:c.description||r,deprecated:c.deprecated??s,tags:c.tags??a,...c.internal||o?{internal:!0}:{},source:l||c.source})}else e.events.set(t,{type:"dispatched",name:t,detail:p,description:r,deprecated:s,tags:a,...o?{internal:!0}:{},source:l})}function va(e,t){let n=t.arguments[0],i=Zi(n,"CustomEvent");if(!i&&!Zi(n,"Event"))return;let r=n.arguments[0],s=it(r)?r.value:void 0;if(s==null)return;let a=i?n.arguments[1]:void 0,o=!1,l;if(ne(a)){let p=a.properties.find((c)=>c.type==="Property"&&A(c.key)&&c.key.name==="detail");if(p?.type==="Property")o=!0,l=p.value}return{name:String(s),detail:l,hasArgument:o,nestedBoundNames:Ut(e,l),source:C(e,t)}}function Ta(e,t){let n=kr(Cr(e,t.nestedBoundNames),t.detail),i=n===void 0&&it(t.detail)?t.detail.value:void 0;Ge(e,{name:t.name,detail:n??(i==null?"":wr(i)),has_argument:t.hasArgument,source:t.source})}function Jt(e,t=!1){if(e.length===0)return"null";let n=e.map(({name:i,type:r,description:s,optional:a,default:o})=>{let l=a?"?":"",p=Sf.test(i)||i.startsWith("[")?i:JSON.stringify(i),c=o?`@default ${o}`:"",d=Le(s&&c?`${s} ${c}`:s||c);if(d){if(t)return`${d.includes(`
|
|
17
18
|
`)?`/**
|
|
18
19
|
${d.split(`
|
|
19
20
|
`).map((h)=>h?` * ${h}`:" *").join(`
|
|
20
21
|
`)}
|
|
21
22
|
*/`:`/** ${d} */`}
|
|
22
|
-
${
|
|
23
|
-
`:" ");return
|
|
24
|
-
${
|
|
25
|
-
}`:`{ ${r} }`}function pd({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 mn(e){let t=e.explicitType??e.jsdocType??e.resolvedType??e.typeSeed,n=e.jsdocParams??e.resolvedParams,r=e.jsdocReturnType??e.resolvedReturnType;if((e.isFunctionDeclaration?t==="() => any":e.initializerIsFunction&&t===e.typeSeed)&&r){let l=e.jsdocTypeParameters?`<${e.jsdocTypeParameters}>`:"";t=n&&n.length>0?`${l}(${Ae(n)}) => ${r}`:`${l}() => ${r}`}let o=e.jsdocDescription??e.resolvedDescription;if(o===void 0&&t!==void 0)o=e.typedefs?.get(t)?.description;let a=pd({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:a,description:o,params:n,returnType:r,isFunction:s,typeParameters:p}}function gn(e){if(e?.type==="Identifier")return e.name;return typeof e?.value==="string"?e.value:void 0}function $o(e,t){for(let n of e?.body??[]){let r=n.type==="ExportNamedDeclaration"&&n.declaration?n.declaration:n;if(r.type==="VariableDeclaration"){let i=r.declarations.find((o)=>o.id.type==="Identifier"?o.id.name===t:M(o.id).has(t));if(i)return{declaration:r,declarator:i,statement:n}}else if((r.type==="FunctionDeclaration"||r.type==="ClassDeclaration")&&r.id?.name===t)return{declaration:r,statement:n}}return}function ld(e,t){for(let n of e?.body??[]){if(n.type!=="LabeledStatement"||n.label.name!=="$")continue;if(n.body.type!=="ExpressionStatement")continue;let r=n.body.expression;if(r.type!=="AssignmentExpression"||r.operator!=="=")continue;if(r.left.type.startsWith("TS"))continue;if(!M(r.left).has(t))continue;let i={type:"VariableDeclarator",id:r.left,init:r.right,start:r.start,end:r.end};return{declaration:{type:"VariableDeclaration",kind:"let",declarations:[i],start:n.start,end:n.end},declarator:i,statement:n}}return}function cd(e){if(e==="var")return"let";if(e==="using"||e==="await using")return"const";return e}function qr(e,t,n,r,i){let o=gn(n.local),a=gn(n.exported);if(!o||!a)return;if(t.source!=null)return{localName:o,exportedName:a};let s=$o(r,o);if(!s&&i==="instance")s=$o(e.parsed?.module?.content,o)??ld(r,o);return{localName:o,exportedName:a,...s}}function Br(e,t,n,r){let i=t.source?.value,o=typeof i==="string"?`it re-exports from "${i}"`:e.valueImportBindingsByLocalName.has(n)?"it re-exports an imported binding":"no matching local declaration was found";P(e,"export-unresolved",r,`export "${r}" was skipped because ${o}; sveld only resolves exports of a local declaration.`,C(e,t))}function yn(e,t,n){if(!n)return V(e,t);let r=t.specifiers.length===1?V(e,t):void 0,i=V(e,n.statement);if(!r||!i)return r??i;let o=Object.fromEntries(Object.entries(r).filter(([,a])=>a!==void 0));return{...i,...o,internal:r.internal||i.internal}}function Or(e,t,n,r){let i=[];if(t.type==="FunctionDeclaration"){let p=t;if(!p.id)return i;let l=e.scriptLanguage==="ts"?Zs(e,p):void 0;return i.push({prop_name:n?.exportedName??p.id.name,kind:"function",isFunctionDeclaration:!0,value:void 0,typeSeed:l?.hasAnnotations?void 0:"() => any",explicitType:l?.hasAnnotations?l.signature:void 0,initializerIsFunction:!0,isRequired:!1,localName:p.id.name,defaultValue:void 0,inferredTypeForSource:void 0,resolvedJSDoc:void 0}),i}if(t.type!=="VariableDeclaration")return i;let o=t,a=cd(o.kind),s=n?.declarator?[n.declarator]:o.declarations;for(let p of s){if(!p||typeof p!=="object"||!("id"in p))continue;let{id:l,init:c}=p;if(!l||typeof l!=="object")continue;if(l.type!=="Identifier"){for(let S of M(l)){if(n&&n.localName!==S)continue;i.push({prop_name:n?.exportedName??S,kind:a,isFunctionDeclaration:!1,value:void 0,typeSeed:void 0,explicitType:void 0,initializerIsFunction:!1,isRequired:!1,localName:S,defaultValue:void 0,inferredTypeForSource:void 0,resolvedJSDoc:void 0})}continue}let d=l.name,f=n?.exportedName??d,h=c==null?{isFunction:!1}:Te(e,c),{value:g,type:m,isFunction:y,defaultValue:T}=h;cn(e,h,f,r),i.push({prop_name:f,kind:a,isFunctionDeclaration:!1,value:g,typeSeed:m,explicitType:e.explicitPropTypesByName.get(d),initializerIsFunction:y,isRequired:a==="let"&&c==null,localName:d,defaultValue:T,inferredTypeForSource:m,resolvedJSDoc:h})}return i}function Fr(e,t,n){let{resolvedJSDoc:r}=t;return mn({explicitType:t.explicitType,typeSeed:t.typeSeed,inferredTypeForSource:t.inferredTypeForSource,jsdocType:n?.type,jsdocDescription:n?.description,jsdocParams:n?.params,jsdocReturnType:n?.returnType,jsdocTypeParameters:n?.typeParameters,resolvedType:r?.resolvedType,resolvedDescription:r?.resolvedDescription,resolvedParams:r?.resolvedParams,resolvedReturnType:r?.resolvedReturnType,initializerIsFunction:t.initializerIsFunction,isFunctionDeclaration:t.isFunctionDeclaration,typedefs:e.typedefs})}function ud(e,t,n){P(e,"export-unresolved",n,`export "${n}" was skipped because a class can't be a prop; export it from the module script instead.`,C(e,t))}function Lo(e,t,n,r){if(n.type==="ClassDeclaration"){if(n.id)ud(e,t,r?.exportedName??n.id.name);return}let i=Or(e,n,r,"props");if(i.length===0)return;let o=yn(e,t,r);for(let a of i){let{prop_name:s,kind:p,localName:l}=a,{type:c,typeSource:d,description:f,params:h,returnType:g,isFunction:m,typeParameters:y}=Fr(e,a,o);me(e,"prop-unknown-type",s,o?.sveldIgnore),Ze(e,s,{name:s,...l!==void 0&&l!==s?{localName:l}:{},kind:p,description:f,binding:o?.binding,deprecated:o?.deprecated,tags:o?.tags,...o?.internal?{internal:!0}:{},type:c,typeSource:d,value:a.value,defaultValue:a.defaultValue,params:h,returnType:g,typeParameters:y,isFunction:m,isFunctionDeclaration:a.isFunctionDeclaration,isRequired:a.isRequired,constant:p==="const",reactive:e.reactive_vars.has(s),source:C(e,t)})}}function _o(e,t,n){if(t.declaration!=null){Lo(e,t,t.declaration);return}for(let r of t.specifiers){let i=qr(e,t,r,n,"instance");if(!i)continue;if(i.declaration)Lo(e,t,i.declaration,i);else Br(e,t,i.localName,i.exportedName)}}function dd(e){if(!e||typeof e!=="object"||!("type"in e))return;let t=String(e.type),n=kt(t);if(!n&&!Ct(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 Io(e,t){let n=dd(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}var fd=/^[A-Za-z_$][\w$]*/,hd=/[A-Za-z_$][\w$]*/g,Ro=/^(?:const|in|out)\s+/;function Mo(e){let t=z(e,",").map((r)=>r.trim()).filter((r)=>r.length>0);if(t.length===0)return null;return[t.map((r)=>{let i=r;while(Ro.test(i))i=i.replace(Ro,"");return i.match(fd)?.[0]??r}).join(", "),t.join(", ")]}function jo(e,t,n){let r=e.scriptGenericsAttribute?.value;if(!r)return;for(let[i]of r.matchAll(hd)){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),Z(e,o.node,t,n)}}function bn(e,t,n){if(e.generics)e.generics=[`${e.generics[0]}, ${t}`,`${e.generics[1]}, ${n}`];else e.generics=[t,n]}function Vr(e){if(!Array.isArray(e.value))return;return e.value.map((t)=>t.type==="Text"?t.data:"").join("").trim()}function qo(e){let t=[e.instance,e.module].filter((r)=>r!==void 0),n=!1;for(let r of t){let i=r.attributes.find((a)=>a.name==="lang");if(!i){n=!0;continue}if(Vr(i)?.toLowerCase()==="ts")return"ts"}return n?"js":void 0}function Bo(e,t){let n=t.instance?.attributes.find((s)=>s.name==="generics");if(!n)return;let r=C(e,n),i=t.instance?.attributes.find((s)=>s.name==="lang");if((i?Vr(i)?.toLowerCase():void 0)!=="ts"){P(e,"syntax-skipped","generics",'<script generics="..."> requires lang="ts"; the generics attribute was ignored because the script is not TypeScript.',r);return}let a=Vr(n);if(!a)return;return{value:a,source:r}}var md=/[A-Za-z_$][\w$]*/g;function gd(e,t,n){let r=new Map,i=t.type==="TSInterfaceDeclaration"||t.type==="TSTypeAliasDeclaration"?t.typeParameters?.params:void 0,o=n.typeArguments?.params;if(!i?.length||!o?.length)return r;for(let a=0;a<i.length;a++){let s=i[a]?.name,p=o[a];if(!s||p?.start===void 0||p?.end===void 0)continue;let l=N(e,p.start,p.end)?.trim();if(l)r.set(s,l)}return r}function yd(e,t){if(t.size===0)return e;return e.replace(md,(n)=>t.get(n)??n)}function tt(e,t,n,r=new Set){let i=new Map;if(!t?.type)return i;let o=(a)=>{for(let s of a){if(s?.type!=="TSPropertySignature"||s.computed)continue;if(!s.key)continue;let p=G(s.key);if(!p)continue;let l=s.typeAnnotation?.start,c=s.typeAnnotation?.end;if(l===void 0||c===void 0)continue;let d=N(e,l+1,c)?.trim();if(!d)continue;F(e,s.typeAnnotation?.typeAnnotation);let f=kr(e,s);i.set(p,{type:d,optional:s.optional===!0,source:C(e,s),...f?{jsdoc:f}:{}})}};switch(t.type){case"TSTypeLiteral":o(t.members??[]);break;case"TSInterfaceDeclaration":o(t.body?.body??[]);break;case"TSTypeAliasDeclaration":{let a=tt(e,t.typeAnnotation,n,r);for(let[s,p]of a)i.set(s,p);break}case"TSTypeReference":{let a=Xs(t.typeName);if(!a||r.has(a))break;let s=n.get(a);if(!s)break;r.add(a);let p=tt(e,s,n,r);r.delete(a);let l=gd(e,s,t);for(let[c,d]of p)i.set(c,l.size===0?d:{...d,type:yd(d.type,l)});break}case"TSIntersectionType":for(let a of t.types??[]){let s=tt(e,a,n,r);for(let[p,l]of s)i.set(p,l)}break;case"TSParenthesizedType":{let a=tt(e,t.typeAnnotation,n,r);for(let[s,p]of a)i.set(s,p);break}}return i}function Oo(e){return e?.content.body??[]}function bd(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 Hr(e,t,n){if(t.type==="ImportDeclaration"&&t.source?.value)for(let r of t.specifiers??[]){let i=r.local?.name;if(!i)continue;if(!(t.importKind==="type"||r.type==="ImportSpecifier"&&r.importKind==="type"))continue;let a,s;if(r.type==="ImportSpecifier")a="named",s=r.imported?.type==="Identifier"?r.imported.name:typeof r.imported?.value==="string"?r.imported.value:void 0;else if(r.type==="ImportDefaultSpecifier")a="default";else if(r.type==="ImportNamespaceSpecifier")a="namespace";if(!a)continue;e.typeImportBindingsByLocalName.set(i,{importedName:s,localName:i,source:String(t.source.value),specifierType:a})}if(t.type==="TSEnumDeclaration"||t.type==="TSInterfaceDeclaration"||t.type==="TSTypeAliasDeclaration"){let r=t.type==="TSEnumDeclaration"?Qs(e,t):N(e,t.start,t.end)?.trim();e.localTypeDeclarationsByName.set(t.id.name,{code:r??"",node:t,start:t.start,...n?{exported:n}:{}})}}function Vo(e,t){if(e.runesPropsDeclarationMetadataByDeclaratorStart.clear(),e.explicitPropTypesByName.clear(),e.explicitVariableTypesByName.clear(),e.explicitVariableTypeNodesByName.clear(),e.typeImportBindingsByLocalName.clear(),e.localTypeDeclarationsByName.clear(),e.additionalTypeDependencyNodes.length=0,e.typedRunesPropsDeclarations.length=0,!e.source)return;e.scriptLanguage=qo(t);let n=t.options?.customElement;e.customElementTag=n?.tag,e.customElement=n?{...n.tag===void 0?{}:{tag:n.tag},...n.shadow==="open"||n.shadow==="none"?{shadow:n.shadow}:{},...n.props?{props:bd(n.props)}:{},...n.extend===void 0?{}:{extend:!0}}:void 0,e.runesOptionOverride=t.options?.runes,e.scriptGenericsAttribute=Bo(e,t);let r=Oo(t.module),i=new Set;for(let a of r){if(!a?.type)continue;if(a.type==="ExportNamedDeclaration"&&a.declaration)Hr(e,a.declaration,!0);else if(a.type==="ExportNamedDeclaration"&&!a.source)for(let s of a.specifiers){if(s.local.type!=="Identifier"||s.exported.type!=="Identifier")continue;if(s.local.name===s.exported.name)i.add(s.local.name)}else Hr(e,a,!1)}for(let a of i){let s=e.localTypeDeclarationsByName.get(a);if(s)s.exported=!0}let o=Oo(t.instance);for(let a of o){if(!a?.type)continue;if(Hr(e,a,!1),a.type==="ExportNamedDeclaration"&&a.declaration?.type==="VariableDeclaration")for(let s of a.declaration.declarations??[]){if(s.id?.type!=="Identifier"||!s.id.name)continue;let p=Ee(e,s.id.typeAnnotation);if(p)e.explicitPropTypesByName.set(s.id.name,p),F(e,s.id.typeAnnotation?.typeAnnotation)}else if(a.type==="VariableDeclaration")for(let s of a.declarations??[]){if(s.id?.type!=="Identifier"||!s.id.name)continue;let p=Ee(e,s.id.typeAnnotation);if(p){e.explicitVariableTypesByName.set(s.id.name,p);let l=s.id.typeAnnotation?.typeAnnotation;if(l)e.explicitVariableTypeNodesByName.set(s.id.name,l)}}}for(let a of o){if(!a||typeof a!=="object"||!("declarations"in a))continue;for(let s of a.declarations??[]){if(!he(Pe(s.init),"$props"))continue;let p="typeAnnotation"in s.id?s.id.typeAnnotation:void 0,l=p?void 0:Ls(s.init),c=p?.typeAnnotation??l,d=p?Ee(e,p):Oe(e,l),f=tt(e,c,new Map(Array.from(e.localTypeDeclarationsByName.entries(),([m,y])=>[m,y.node]))),h=new Set,g=new Set;if(Z(e,c,h,g),jo(e,h,g),s.start!==void 0){let m={canonicalType:d,props:f,referencedImportedTypes:h,referencedLocalTypes:g};if(e.runesPropsDeclarationMetadataByDeclaratorStart.set(s.start,m),d)e.typedRunesPropsDeclarations.push(m)}}}}function Fo(e,t){let n=t?.trim();if(!n)return;let r=e.typedefMembersByName.get(n)??ve(n);return r?new Map(r.map((i)=>[i.name,i])):void 0}function Ho(e,t){for(let n of t.declarations){if(!he(Pe(n.init),"$props"))continue;if(n.id.type==="Identifier"){e.wholePropsLocals.add(n.id.name),e.restPropLocals.add(n.id.name);let a=pn(e,n.start),s=a?.props.size?void 0:Fo(e,V(e,t)?.type);for(let p of s?.values()??[])Ze(e,p.name,{name:p.name,kind:"let",description:p.description,type:p.type,typeSource:"jsdoc",isFunction:p.type.includes("=>"),isFunctionDeclaration:!1,isRequired:!p.optional,constant:!1,reactive:!1});if(a)for(let[p,l]of a.props)Ze(e,p,{name:p,kind:"let",description:l.jsdoc?.description,deprecated:l.jsdoc?.deprecated,tags:l.jsdoc?.tags,type:l.type,typeSource:"typescript",isFunction:!1,isFunctionDeclaration:!1,isRequired:!l.optional,constant:!1,reactive:!1,source:l.source});continue}if(n.id.type!=="ObjectPattern")continue;let r=V(e,t),i=pn(e,n.start)?.props.size?void 0:Fo(e,r?.type),o=n.id.properties.filter((a)=>{if(a.type!=="Property"||a.computed)return!1;if(!G(a.key))return!1;if(a.value.type==="Identifier")return!0;return a.value.type==="AssignmentPattern"&&a.value.left.type==="Identifier"}).length;for(let a of n.id.properties){if(a.type==="RestElement"){if(a.argument.type==="Identifier")e.restPropLocals.add(a.argument.name);continue}let s=G(a.key);if(!s)continue;let p,l;if(a.value.type==="Identifier")p=a.value.name;else{let ht=a.value;p=ht.left.name,l=ht.right}if(!p)continue;if(Xt(e,s,p),s==="children")e.snippetPropLocals.add(p);let c=i?.get(s),d=Ks(e,n.start,s),f=kr(e,a)??d?.jsdoc??(o===1&&!i?r:void 0),{init:h,bindable:g}=lo(l),m=h==null?{isFunction:!1}:Te(e,h),{value:y,type:T,isFunction:S,defaultValue:D}=m,b=d?.type===void 0&&f?.type===void 0?m.resolvedType:void 0;cn(e,m,s,"props");let{type:L,typeSource:R,description:qe,params:Wt,returnType:Ut,isFunction:Jt}=mn({explicitType:d?.type,typeSeed:T,inferredTypeForSource:T,jsdocType:f?.type??c?.type,jsdocDescription:f?.description??c?.description,jsdocParams:f?.params,jsdocReturnType:f?.returnType,resolvedType:b,resolvedDescription:m.resolvedDescription,resolvedParams:m.resolvedParams,resolvedReturnType:m.resolvedReturnType,initializerIsFunction:S,isFunctionDeclaration:!1,inferIsFunctionFromTypeSignature:!0});if(g)e.reactive_vars.add(s);me(e,"prop-unknown-type",s,f?.sveldIgnore),Ze(e,s,{name:s,...p===s?{}:{localName:p},kind:"let",description:qe,binding:f?.binding,deprecated:f?.deprecated,tags:f?.tags,...f?.internal?{internal:!0}:{},...g?{bindable:!0}:{},type:L,typeSource:R,value:y,defaultValue:D,params:Wt,returnType:Ut,isFunction:Jt,isFunctionDeclaration:!1,isRequired:!g&&h==null&&d?.optional!==!0&&c?.optional!==!0,constant:!1,reactive:g,source:C(e,a)})}}}function xd(e){let n=e.indexOf("EventDispatcher");if(n===-1)return;let r=n+15;while(e[r]===" ")r++;if(e[r]!=="<")return;let i=Qe(e,r);return i===-1?void 0:e.slice(r+1,i)}var vd=/^["']|["']$/g,Ed=/\?$/,Td=/^\{/,Sd=/\}$/;function kd(e){let t=Kt(e,":");if(t===-1)return;let n=e.slice(0,t).trim().replace(Ed,"").replace(vd,""),r=e.slice(t+1).trim();if(!n||!r)return;return{name:n,type:r}}function Go(e,t,n,r){if(t){let s=new Map(Array.from(e.localTypeDeclarationsByName.entries(),([l,c])=>[l,c.node])),p=tt(e,t,s);for(let[l,c]of p)Le(e,{name:l,detail:c.type,has_argument:!0,source:c.source});return}let i=$e(e,n)?.type,o=i?xd(i):void 0;if(!o)return;let a=o.trim().replace(Td,"").replace(Sd,"");for(let s of z(a,";,")){let p=kd(s.trim());if(!p)continue;Le(e,{name:p.name,detail:p.type,has_argument:!0,source:r})}}function zo(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 a=o.type!==void 0||o.params!==void 0||o.returnType!==void 0,s=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:a?o.type:s,typeSource:a?o.typeSource:"inferred",isFunction:!0}),e.events.delete(n)}}var At=null;function Cd(e,t){let n={value:void 0,replace:!1};if(!t||typeof t!=="object"||!("type"in t))return n;if(t.type==="Identifier")n.value=t.name,n.replace=!0;else if(t.type==="Literal")n.value=String(t.value);else if(t.type==="MemberExpression")n.value=rn(e,t);else if((t.type==="ObjectExpression"||t.type==="TemplateLiteral")&&"start"in t&&"end"in t&&typeof t.start==="number"&&typeof t.end==="number")n.value=N(e,t.start,t.end);return n}function wd(e,t){if(!_(t))return null;let n=et(e,t.name);if(ee(n))return Gr(e,n).slot_props;let r=Ne(e,t.name);if(!r)return null;let i=ve(r.type);if(!i)return null;let o={};for(let a of i)o[a.name]={value:a.type,replace:!1};return o}function Gr(e,t){let n={},r=!1;for(let i of t.properties){if(i.type==="SpreadElement"){let a=wd(e,i.argument);if(a)Object.assign(n,a);else r=!0,P(e,"spread-unresolved","slot_props",`Slot props spread a value sveld can't resolve; its shape is widened to "Record<string, any>".`,C(e,i));continue}if(i.type!=="Property"||i.computed)continue;let o=G(i.key);if(!o)continue;n[o]=Cd(e,i.value)}return{slot_props:n,hasUnresolvedSpread:r}}function Pd(e,t){if(!t||typeof t!=="object"||!("type"in t))return null;if(t.type==="Identifier"){let o=t,a=e.propLocalToPublicName.get(o.name);if(!a)return null;return{publicName:a,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 Wo(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=Pd(e,r.callee);if(!i)return null;return{...i,arguments:r.arguments}}function Dt(e,{slot_name:t,slot_props:n,slot_props_unresolved_spread:r,slot_fallback:i,slot_description:o,slot_deprecated:a,slot_tags:s,slot_internal:p,source:l}){let c=t===void 0||t==="",d=c?At:t??"",f=X(i),h=n===void 0||n===""?void 0:n,g=o?.trim()||void 0;if(e.slots.has(d)){let m=e.slots.get(d);if(m)e.slots.set(d,{...m,default:m.default??c,fallback:f,slot_props:m.slot_props===void 0?h:m.slot_props,slot_props_unresolved_spread:m.slot_props_unresolved_spread||r,description:m.description||g,deprecated:m.deprecated??a,tags:m.tags||s,...m.internal||p?{internal:!0}:{},source:l||m.source})}else e.slots.set(d,{name:d,default:c,fallback:f,slot_props:h,slot_props_unresolved_spread:r,description:g,deprecated:a,tags:s,...p?{internal:!0}:{},source:l})}function Wr(e){return e==="TSTypeAnnotation"||e==="TSTypeAliasDeclaration"||e==="TSInterfaceDeclaration"||e==="TSTypeParameterDeclaration"||e==="TSTypeParameterInstantiation"}function xn(e,t,n,r){zr(e,null,null,t,n,r?.skipTypeOnlySubtrees===!0)}function zr(e,t,n,r,i,o){r(e,t,n);let a=e,s=e.type;if((s==="Identifier"||s==="Literal"||s==="Text")&&a.typeAnnotation===void 0){if(i)i(e);return}if(o&&s.charCodeAt(0)===84&&Wr(s)){if(i)i(e);return}for(let p in a){if(p==="leadingComments")continue;let l=a[p];if(!l||typeof l!=="object")continue;if(Array.isArray(l))for(let c=0;c<l.length;c++){let d=l[c];if(d&&typeof d==="object"&&typeof d.type==="string")zr(d,e,p,r,i,o)}else if(typeof l.type==="string")zr(l,e,p,r,i,o)}if(i)i(e)}var Uo=/^@component/,Ad=/\r/g,Dd=new Set(["AssignmentExpression","UpdateExpression","CallExpression","SpreadAttribute","FunctionDeclaration","ImportDeclaration","VariableDeclaration","ExportNamedDeclaration","Comment","SlotElement","RenderTag","OnDirective","BindDirective"]);function Jo(e){return e&&"id"in e&&e.id&&"name"in e.id?e.id.name:void 0}function Nd(e,t,n,r){let i=n.callee.type==="Identifier"?n.callee.name:void 0;if(i==="createEventDispatcher"){let o=Jo(r);if(o!==void 0)t.dispatcherName=o,t.dispatcherDeclaratorNode=r;t.dispatcherTypeArgument=n.typeArguments?.params?.[0]}if(i==="$host"){let o=Jo(r);if(o!==void 0)t.hostLocalNames.add(o)}if(i==="setContext")ko(e,n);if(n.arguments.length>0){if(t.callsWithArguments.push(n),fn(e,n.callee))t.locallyBoundCalls.add(n)}if(i)t.callees.push({name:i,arguments:n.arguments,node:n,nestedBoundDetailNames:wt(e,n.arguments[1])});if(Xe(n.callee)&&_(n.callee.property)&&n.callee.property.name==="dispatchEvent"&&(he(n.callee.object,"$host")||_(n.callee.object)&&t.hostLocalNames.has(n.callee.object.name))){let o=Do(e,n);if(o)t.hostDispatchedEventNames.add(o.name),t.hostDispatches.push(o)}}function $d(e,t){let n=t,r=n.attributes?.find((s)=>s.name==="name")?.value,i=(Array.isArray(r)?r[0]:void 0)?.data,o=(n.attributes||[]).filter((s)=>s.name!=="name").reduce((s,p)=>{let l={value:void 0,replace:!1},c=p.value;if(c===void 0||c===!0)return s;let d=Array.isArray(c)?c[0]:c;if(d){let{type:f,expression:h,raw:g,start:m,end:y}=d;if(f==="Text"&&g!==void 0)l.value=JSON.stringify(g);else if(!Array.isArray(c)&&f==="ExpressionTag"&&h&&typeof h==="object"&&"type"in h&&h.type==="Identifier"&&"name"in h&&h.name===p.name)l.value=h.name,l.replace=!0;if(h&&typeof h==="object"&&"type"in h){if(h.type==="Literal"&&"value"in h){let T=h.value;l.value=typeof T==="string"?JSON.stringify(T):String(T)}else if(h.type==="MemberExpression")l.value=rn(e,h);else if(h.type!=="Identifier"){if(m!==void 0&&y!==void 0){if(h.type==="ObjectExpression"||h.type==="TemplateLiteral")l.value=N(e,m+1,y-1)}}}}if(p.name)s[p.name]=l;return s},{}),a=t.fragment.nodes.map(({start:s,end:p})=>N(e,s,p)??"").join("").trim();Dt(e,{slot_name:i,slot_props:o,slot_fallback:a,source:C(e,t)})}function Ld(e,t){let n=Wo(e,t.expression);if(!n)return;let r,i=!1;if(n.arguments.length===0)r={};else if(n.arguments.length===1&&typeof n.arguments[0]==="object"&&n.arguments[0]&&"type"in n.arguments[0]&&n.arguments[0].type==="ObjectExpression"){let s=Gr(e,n.arguments[0]);r=s.slot_props,i=s.hasUnresolvedSpread}let o=n.publicName==="children"?void 0:n.publicName,a=o===void 0?At:o;if(r!==void 0)Dt(e,{slot_name:o,slot_props:r,slot_props_unresolved_spread:i||void 0,source:C(e,t)});if(r!==void 0||e.slots.has(a))e.snippetPropLocals.add(n.trackingName)}function _d(e,t,n){let r=t.name;if(t.expression!=null||!r)return;if(n==null||!("name"in n))return;let i=typeof n.name==="string"?n.name:void 0,o=n.type;if(!i||!o)return;let a=kt(o)?{type:"InlineComponent",name:i}:{type:"Element",name:i};e.forwardedEvents.set(r,a);let s=e.events.get(r),p=e.eventDescriptions.get(r),l=s?.deprecated,c=s?.internal;if(!s)e.events.set(r,{type:"forwarded",name:r,element:a,description:p,deprecated:l,...c?{internal:!0}:{},source:C(e,t)});else if(s.type==="forwarded"&&p&&!s.description)e.events.set(r,{...s,description:p,deprecated:s.deprecated??l,...s.internal||c?{internal:!0}:{},source:s.source||C(e,t)})}function Id(e,t,n){if(!(n&&(Ct(n.type)||kt(n.type))))return;let r=t.expression.type==="Identifier"?t.expression.name:void 0;if(r){let i=Et(e,r);if(i)e.reactive_vars.add(i)}if(Ct(n.type)&&t.name==="this"&&r&&"name"in n&&typeof n.name==="string"){let i=Et(e,r);if(!i)return;let o=n.name;if(e.bindings.has(i)){let a=e.bindings.get(i);if(a&&!a.elements.includes(o))e.bindings.set(i,{...a,elements:[...a.elements,o]})}else e.bindings.set(i,{elements:[o]})}}function Ko(e){let t={dispatcherName:void 0,dispatcherDeclaratorNode:void 0,dispatcherTypeArgument:void 0,hostLocalNames:new Set,hostDispatchedEventNames:new Set,hostDispatches:[],callees:[],callsWithArguments:[],locallyBoundCalls:new Set},n={type:"ComponentRoot",instance:e.parsed?.instance,fragment:e.parsed?.fragment};uo(e),e.activeScopes.push(e.componentScope);let r=fo(e);return xn(n,(i,o)=>{let a=ho(e,r,i);if(a)e.activeScopes.push(a);if(!Dd.has(i.type))return;switch(i.type){case"AssignmentExpression":_r(e,i.left);break;case"UpdateExpression":_r(e,i.argument);break;case"CallExpression":Nd(e,t,i,o);break;case"SpreadAttribute":{let s=i.expression.type==="Identifier"?i.expression.name:void 0;if(s==="$$restProps"||e.restPropLocals.has(s??""))Io(e,o);break}case"FunctionDeclaration":if(i.id?.name)e.funcDecls.set(i.id.name,i);break;case"ImportDeclaration":bt(e,i);break;case"VariableDeclaration":if(e.vars.add(i),o?.type==="Program"&&i.declarations.some((s)=>he(Pe(s.init),"$props")))Ho(e,i);break;case"ExportNamedDeclaration":_o(e,i,o?.type==="Program"?o:null);break;case"Comment":{let s=i.data.trim();if(Uo.test(s))e.componentComment=s.replace(Uo,"").replace(Ad,""),e.componentCommentSource=C(e,i);break}case"SlotElement":$d(e,i);break;case"RenderTag":Ld(e,i);break;case"OnDirective":_d(e,i,o);break;case"BindDirective":Id(e,i,o);break}},(i)=>{if(St(i))e.activeScopes.pop(),mo(r,i)},{skipTypeOnlySubtrees:!0}),t}var Rd=[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],aa=[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],Md="·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ--ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・",pa="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ--ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",Ur={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},Jr="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",jd={5:Jr,"5module":Jr+" export import",6:Jr+" const class extends export import super"},la=/^in(stanceof)?$/,qd=new RegExp("["+pa+"]"),Bd=new RegExp("["+pa+Md+"]");function ei(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 ce(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&&qd.test(String.fromCharCode(e));if(t===!1)return!1;return ei(e,aa)}function Se(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&&Bd.test(String.fromCharCode(e));if(t===!1)return!1;return ei(e,aa)||ei(e,Rd)}var A=function(e,t){if(t===void 0)t={};this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};function ne(e,t){return new A(e,{beforeExpr:!0,binop:t})}var re={beforeExpr:!0},U={startsExpr:!0},si={};function w(e,t){if(t===void 0)t={};return t.keyword=e,si[e]=new A(e,t)}var u={num:new A("num",U),regexp:new A("regexp",U),string:new A("string",U),name:new A("name",U),privateId:new A("privateId",U),eof:new A("eof"),bracketL:new A("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new A("]"),braceL:new A("{",{beforeExpr:!0,startsExpr:!0}),braceR:new A("}"),parenL:new A("(",{beforeExpr:!0,startsExpr:!0}),parenR:new A(")"),comma:new A(",",re),semi:new A(";",re),colon:new A(":",re),dot:new A("."),question:new A("?",re),questionDot:new A("?."),arrow:new A("=>",re),template:new A("template"),invalidTemplate:new A("invalidTemplate"),ellipsis:new A("...",re),backQuote:new A("`",U),dollarBraceL:new A("${",{beforeExpr:!0,startsExpr:!0}),eq:new A("=",{beforeExpr:!0,isAssign:!0}),assign:new A("_=",{beforeExpr:!0,isAssign:!0}),incDec:new A("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new A("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:ne("||",1),logicalAND:ne("&&",2),bitwiseOR:ne("|",3),bitwiseXOR:ne("^",4),bitwiseAND:ne("&",5),equality:ne("==/!=/===/!==",6),relational:ne("</>/<=/>=",7),bitShift:ne("<</>>/>>>",8),plusMin:new A("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:ne("%",10),star:ne("*",10),slash:ne("/",10),starstar:new A("**",{beforeExpr:!0}),coalesce:ne("??",1),_break:w("break"),_case:w("case",re),_catch:w("catch"),_continue:w("continue"),_debugger:w("debugger"),_default:w("default",re),_do:w("do",{isLoop:!0,beforeExpr:!0}),_else:w("else",re),_finally:w("finally"),_for:w("for",{isLoop:!0}),_function:w("function",U),_if:w("if"),_return:w("return",re),_switch:w("switch"),_throw:w("throw",re),_try:w("try"),_var:w("var"),_const:w("const"),_while:w("while",{isLoop:!0}),_with:w("with"),_new:w("new",{beforeExpr:!0,startsExpr:!0}),_this:w("this",U),_super:w("super",U),_class:w("class",U),_extends:w("extends",re),_export:w("export"),_import:w("import",U),_null:w("null",U),_true:w("true",U),_false:w("false",U),_in:w("in",{beforeExpr:!0,binop:7}),_instanceof:w("instanceof",{beforeExpr:!0,binop:7}),_typeof:w("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:w("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:w("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},J=/\r\n?|\n|\u2028|\u2029/,Od=new RegExp(J.source,"g");function nt(e){return e===10||e===13||e===8232||e===8233}function ca(e,t,n){if(n===void 0)n=e.length;for(var r=t;r<n;r++){var i=e.charCodeAt(r);if(nt(i))return r<n-1&&i===13&&e.charCodeAt(r+1)===10?r+2:r+1}return-1}var ua=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,q=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,Fd=Object.prototype,{hasOwnProperty:Vd,toString:Hd}=Fd,_t=Object.hasOwn||function(e,t){return Vd.call(e,t)},Xo=Array.isArray||function(e){return Hd.call(e)==="[object Array]"},Yo=Object.create(null);function vn(e){return Yo[e]||(Yo[e]=new RegExp("^(?:"+e.replace(/ /g,"|")+")$"))}function wn(e){if(e<=65535)return String.fromCharCode(e);return e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320)}var Gd=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,Lt=function(e,t){this.line=e,this.column=t};Lt.prototype.offset=function(e){return new Lt(this.line,this.column+e)};var Pn=function(e,t,n){if(this.start=t,this.end=n,e.sourceFile!==null)this.source=e.sourceFile};function da(e,t){for(var n=1,r=0;;){var i=ca(e,r,t);if(i<0)return new Lt(n,t-r);++n,r=i}}var ti={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},Qo=!1;function zd(e){var t={};for(var n in ti)t[n]=e&&_t(e,n)?e[n]:ti[n];if(t.ecmaVersion==="latest")t.ecmaVersion=1e8;else if(t.ecmaVersion==null){if(!Qo&&typeof console==="object"&&console.warn)Qo=!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(
|
|
27
|
-
`,n-1)+1,this.options.locations)this.curLine=this.input.slice(0,this.lineStart).split(J).length}else this.lineStart=0;if(this.type=u.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=e.sourceType==="module",this.strict=this.inModule||e.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&&e.allowHashBang&&this.input.slice(0,2)==="#!")this.skipLineComment(2);this.scopeStack=[],this.enterScope(this.options.sourceType==="commonjs"?Ve:Fe),this.regexpState=null,this.privateNameStack=[]},ie={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}};j.prototype.parse=function(){var e=this,t=this.options.program||this.startNode();return this.nextToken(),this.catchStackOverflow(function(){return e.parseTopLevel(t)})};ie.inFunction.get=function(){return(this.currentVarScope().flags&Ve)>0};ie.inGenerator.get=function(){return(this.currentVarScope().flags&fa)>0};ie.inAsync.get=function(){return(this.currentVarScope().flags&oi)>0};ie.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],n=t.flags;if(n&(He|It))return!1;if(n&Ve)return(n&oi)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};ie.allowReturn.get=function(){if(this.inFunction)return!0;if(this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&Fe)return!0;return!1};ie.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags;return(t&An)>0||this.options.allowSuperOutsideMethod};ie.allowDirectSuper.get=function(){return(this.currentThisScope().flags&ma)>0};ie.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};ie.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],n=t.flags;if(n&(He|It)||n&Ve&&!(n&ai))return!0}return!1};ie.allowUsing.get=function(){var e=this.currentScope(),t=e.flags;if(t&ga)return!1;if(!this.inModule&&t&Fe)return!1;return!0};ie.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&He)>0};j.extend=function(){var e=[],t=arguments.length;while(t--)e[t]=arguments[t];var n=this;for(var r=0;r<e.length;r++)n=e[r](n);return n};j.parse=function(e,t){return new this(t,e).parse()};j.parseExpressionAt=function(e,t,n){var r=new this(n,e,t);return r.nextToken(),r.parseExpression()};j.tokenizer=function(e,t){return new this(t,e)};Object.defineProperties(j.prototype,ie);var H=j.prototype,Ud=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;H.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){q.lastIndex=e,e+=q.exec(this.input)[0].length;var t=Ud.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])==="use strict"){q.lastIndex=e+t[0].length;var n=q.exec(this.input),r=n.index+n[0].length,i=this.input.charAt(r);return i===";"||i==="}"||J.test(n[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(i)||i==="!"&&this.input.charAt(r+1)==="=")}if(e+=t[0].length,q.lastIndex=e,e+=q.exec(this.input)[0].length,this.input[e]===";")e++}};H.eat=function(e){if(this.type===e)return this.next(),!0;else return!1};H.isContextual=function(e){return this.type===u.name&&this.value===e&&!this.containsEsc};H.eatContextual=function(e){if(!this.isContextual(e))return!1;return this.next(),!0};H.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}};H.expectContextual=function(e){if(!this.eatContextual(e))this.unexpected()};H.canInsertSemicolon=function(){return this.type===u.eof||this.type===u.braceR||J.test(this.input.slice(this.lastTokEnd,this.start))};H.insertSemicolon=function(){if(this.canInsertSemicolon()){if(this.options.onInsertedSemicolon)this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc);return!0}};H.semicolon=function(){if(!this.eat(u.semi)&&!this.insertSemicolon())this.unexpected()};H.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}};H.expect=function(e){this.eat(e)||this.unexpected()};H.unexpected=function(e){this.raise(e!=null?e:this.start,"Unexpected token")};var Nn=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};H.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")};H.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")};H.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")};H.isSimpleAssignTarget=function(e){if(e.type==="ParenthesizedExpression")return this.isSimpleAssignTarget(e.expression);return e.type==="Identifier"||e.type==="MemberExpression"};var x=j.prototype;x.parseTopLevel=function(e){var t=Object.create(null);if(!e.body)e.body=[];while(this.type!==u.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 ci={kind:"loop"},Jd={kind:"switch"};x.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;q.lastIndex=this.pos;var t=q.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(ce(r)){var i=n;do n+=r<=65535?1:2;while(Se(r=this.fullCharCodeAt(n)));if(r===92)return!0;var o=this.input.slice(i,n);if(!la.test(o))return!0}return!1};x.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;q.lastIndex=this.pos;var e=q.exec(this.input),t=this.pos+e[0].length,n;return!J.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)==="function"&&(t+8===this.input.length||!(Se(n=this.fullCharCodeAt(t+8))||n===92))};x.isUsingKeyword=function(e,t){if(this.options.ecmaVersion<17||!this.isContextual(e?"await":"using"))return!1;q.lastIndex=this.pos;var n=q.exec(this.input),r=this.pos+n[0].length;if(J.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||Se(o=this.fullCharCodeAt(i))||o===92)return!1;q.lastIndex=i;var a=q.exec(this.input);if(r=i+a[0].length,a&&J.test(this.input.slice(i,r)))return!1}var s=this.fullCharCodeAt(r);if(!ce(s)&&s!==92)return!1;var p=r;do r+=s<=65535?1:2;while(Se(s=this.fullCharCodeAt(r)));if(s===92)return!0;var l=this.input.slice(p,r);if(la.test(l))return!1;if(t&&!e&&l==="of"){q.lastIndex=r;var c=q.exec(this.input);if(r=r+c[0].length,this.input.charCodeAt(r)!==61||(s=this.input.charCodeAt(r+1))===61||s===62)return!1}return!0};x.isAwaitUsing=function(e){return this.isUsingKeyword(!0,e)};x.isUsing=function(e){return this.isUsingKeyword(!1,e)};x.parseStatement=function(e,t,n){var r=this.type,i=this.startNode(),o;if(this.isLet(e))r=u._var,o="let";switch(r){case u._break:case u._continue:return this.parseBreakContinueStatement(i,r.keyword);case u._debugger:return this.parseDebuggerStatement(i);case u._do:return this.parseDoStatement(i);case u._for:return this.parseForStatement(i);case u._function:if(e&&(this.strict||e!=="if"&&e!=="label")&&this.options.ecmaVersion>=6)this.unexpected();return this.parseFunctionStatement(i,!1,!e);case u._class:if(e)this.unexpected();return this.parseClass(i,!0);case u._if:return this.parseIfStatement(i);case u._return:return this.parseReturnStatement(i);case u._switch:return this.parseSwitchStatement(i);case u._throw:return this.parseThrowStatement(i);case u._try:return this.parseTryStatement(i);case u._const:case u._var:if(o=o||this.value,e&&o!=="var")this.unexpected();return this.parseVarStatement(i,o);case u._while:return this.parseWhileStatement(i);case u._with:return this.parseWithStatement(i);case u.braceL:return this.parseBlock(!0,i);case u.semi:return this.parseEmptyStatement(i);case u._export:case u._import:if(this.options.ecmaVersion>10&&r===u._import){q.lastIndex=this.pos;var a=q.exec(this.input),s=this.pos+a[0].length,p=this.input.charCodeAt(s);if(p===40||p===46)return this.parseExpressionStatement(i,this.parseExpression())}if(!this.options.allowImportExportEverywhere){if(!t)this.raise(this.start,"'import' and 'export' may only appear at the top level");if(!this.inModule)this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")}return r===u._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 l=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(l){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(l==="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,l),this.semicolon(),this.finishNode(i,"VariableDeclaration")}var c=this.value,d=this.parseExpression();if(r===u.name&&d.type==="Identifier"&&this.eat(u.colon))return this.parseLabeledStatement(i,c,d,e);else return this.parseExpressionStatement(i,d)}};x.parseBreakContinueStatement=function(e,t){var n=t==="break";if(this.next(),this.eat(u.semi)||this.insertSemicolon())e.label=null;else if(this.type!==u.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")};x.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")};x.parseDoStatement=function(e){if(this.next(),this.labels.push(ci),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(u._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6)this.eat(u.semi);else this.semicolon();return this.finishNode(e,"DoWhileStatement")};x.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(ci),this.enterScope(0),this.expect(u.parenL),this.type===u.semi){if(t>-1)this.unexpected(t);return this.parseFor(e,null)}var n=this.isLet();if(this.type===u._var||this.type===u._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"),a=!1,s=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(s){var p=this.startNode();if(this.next(),s==="await using"){if(!this.canAwait)this.raise(this.start,"Await using cannot appear outside of async function");this.next()}return this.parseVar(p,!0,s),this.finishNode(p,"VariableDeclaration"),this.parseForAfterInit(e,p,t)}var l=this.containsEsc,c=new Nn,d=this.start,f=t>-1?this.parseExprSubscripts(c,"await"):this.parseExpression(!0,c);if(this.type===u._in||(a=this.options.ecmaVersion>=6&&this.isContextual("of"))){if(t>-1){if(this.type===u._in)this.unexpected(t);e.await=!0}else if(a&&this.options.ecmaVersion>=8){if(f.start===d&&!l&&f.type==="Identifier"&&f.name==="async")this.unexpected();else if(this.options.ecmaVersion>=9)e.await=!1}if(o&&a)this.raise(f.start,"The left-hand side of a for-of loop may not start with 'let'.");return this.toAssignable(f,!1,c),this.checkLValPattern(f),this.parseForIn(e,f)}else this.checkExpressionErrors(c,!0);if(t>-1)this.unexpected(t);return this.parseFor(e,f)};x.parseForAfterInit=function(e,t,n){if((this.type===u._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&t.declarations.length===1){if(this.type===u._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)};x.parseFunctionStatement=function(e,t,n){return this.next(),this.parseFunction(e,$t|(n?0:ni),!1,t)};x.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(u._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")};x.parseReturnStatement=function(e){if(!this.allowReturn)this.raise(this.start,"'return' outside of function");if(this.next(),this.eat(u.semi)||this.insertSemicolon())e.argument=null;else e.argument=this.parseExpression(),this.semicolon();return this.finishNode(e,"ReturnStatement")};x.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(u.braceL),this.labels.push(Jd),this.enterScope(ga);var t;for(var n=!1;this.type!==u.braceR;)if(this.type===u._case||this.type===u._default){var r=this.type===u._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(u.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")};x.parseThrowStatement=function(e){if(this.next(),J.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 Kd=[];x.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type==="Identifier";return this.enterScope(t?ha:0),this.checkLValPattern(e,t?ba:ke),this.expect(u.parenR),e};x.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===u._catch){var t=this.startNode();if(this.next(),this.eat(u.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(u._finally)?this.parseBlock():null,!e.handler&&!e.finalizer)this.raise(e.start,"Missing catch or finally clause");return this.finishNode(e,"TryStatement")};x.parseVarStatement=function(e,t,n){return this.next(),this.parseVar(e,!1,t,n),this.semicolon(),this.finishNode(e,"VariableDeclaration")};x.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(ci),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")};x.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")};x.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")};x.parseLabeledStatement=function(e,t,n,r){for(var i=0,o=this.labels;i<o.length;i+=1){var a=o[i];if(a.name===t)this.raise(n.start,"Label '"+t+"' is already declared")}var s=this.type.isLoop?"loop":this.type===u._switch?"switch":null;for(var p=this.labels.length-1;p>=0;p--){var l=this.labels[p];if(l.statementStart===e.start)l.statementStart=this.start,l.kind=s;else break}return this.labels.push({name:t,kind:s,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")};x.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")};x.parseBlock=function(e,t,n){if(e===void 0)e=!0;if(t===void 0)t=this.startNode();if(t.body=[],this.expect(u.braceL),e)this.enterScope(0);while(this.type!==u.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")};x.parseFor=function(e,t){return e.init=t,this.expect(u.semi),e.test=this.type===u.semi?null:this.parseExpression(),this.expect(u.semi),e.update=this.type===u.parenR?null:this.parseExpression(),this.expect(u.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")};x.parseForIn=function(e,t){var n=this.type===u._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(u.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,n?"ForInStatement":"ForOfStatement")};x.parseVar=function(e,t,n,r){e.declarations=[],e.kind=n;for(;;){var i=this.startNode();if(this.parseVarId(i,n),this.eat(u.eq))i.init=this.parseMaybeAssign(t);else if(!r&&n==="const"&&!(this.type===u._in||this.options.ecmaVersion>=6&&this.isContextual("of")))this.unexpected();else if(!r&&(n==="using"||n==="await using")&&this.options.ecmaVersion>=17&&this.type!==u._in&&!this.isContextual("of"))this.raise(this.lastTokEnd,"Missing initializer in "+n+" declaration");else if(!r&&i.id.type!=="Identifier"&&!(t&&(this.type===u._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(u.comma))break}return e};x.parseVarId=function(e,t){e.id=t==="using"||t==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(e.id,t==="var"?li:ke,!1)};var $t=1,ni=2,va=4;x.parseFunction=function(e,t,n,r,i){if(this.initFunction(e),this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!r){if(this.type===u.star&&t&ni)this.unexpected();e.generator=this.eat(u.star)}if(this.options.ecmaVersion>=8)e.async=!!r;if(t&$t){if(e.id=t&va&&this.type!==u.name?null:this.parseIdent(),e.id&&!(t&ni))this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?li:ke:ya)}var o=this.yieldPos,a=this.awaitPos,s=this.awaitIdentPos;if(this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(pi(e.async,e.generator)),!(t&$t))e.id=this.type===u.name?this.parseIdent():null;return this.parseFunctionParams(e),this.parseFunctionBody(e,n,!1,i),this.yieldPos=o,this.awaitPos=a,this.awaitIdentPos=s,this.finishNode(e,t&$t?"FunctionDeclaration":"FunctionExpression")};x.parseFunctionParams=function(e){this.expect(u.parenL),e.params=this.parseBindingList(u.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};x.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(u.braceL);while(this.type!==u.braceR){var a=this.parseClassElement(e.superClass!==null);if(a){if(i.body.push(a),a.type==="MethodDefinition"&&a.kind==="constructor"){if(o)this.raiseRecoverable(a.start,"Duplicate constructor in the same class");o=!0}else if(a.key&&a.key.type==="PrivateIdentifier"&&Xd(r,a))this.raiseRecoverable(a.key.start,"Identifier '#"+a.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")};x.parseClassElement=function(e){if(this.eat(u.semi))return null;var t=this.options.ecmaVersion,n=this.startNode(),r="",i=!1,o=!1,a="method",s=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(u.braceL))return this.parseClassStaticBlock(n),n;if(this.isClassElementNameStart()||this.type===u.star)s=!0;else r="static"}if(n.static=s,!r&&t>=8&&this.eatContextual("async"))if((this.isClassElementNameStart()||this.type===u.star)&&!this.canInsertSemicolon())o=!0;else r="async";if(!r&&(t>=9||!o)&&this.eat(u.star))i=!0;if(!r&&!o&&!i){var p=this.value;if(this.eatContextual("get")||this.eatContextual("set"))if(this.isClassElementNameStart())a=p;else r=p}if(r)n.computed=!1,n.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),n.key.name=r,this.finishNode(n.key,"Identifier");else this.parseClassElementName(n);if(t<13||this.type===u.parenL||a!=="method"||i||o){var l=!n.static&&kn(n,"constructor"),c=l&&e;if(l&&a!=="method")this.raise(n.key.start,"Constructor can't have get/set modifier");n.kind=l?"constructor":a,this.parseClassMethod(n,i,o,c)}else this.parseClassField(n);return n};x.isClassElementNameStart=function(){return this.type===u.name||this.type===u.privateId||this.type===u.num||this.type===u.string||this.type===u.bracketL||this.type.keyword};x.parseClassElementName=function(e){if(this.type===u.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)};x.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&&kn(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")};x.parseClassField=function(e){if(kn(e,"constructor"))this.raise(e.key.start,"Classes can't have a field named 'constructor'");else if(e.static&&kn(e,"prototype"))this.raise(e.key.start,"Classes can't have a static field named 'prototype'");if(this.eat(u.eq))this.enterScope(It|An),e.value=this.parseMaybeAssign(),this.exitScope();else e.value=null;return this.semicolon(),this.finishNode(e,"PropertyDefinition")};x.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;this.labels=[],this.enterScope(He|An);while(this.type!==u.braceR){var n=this.parseStatement(null);e.body.push(n)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")};x.parseClassId=function(e,t){if(this.type===u.name){if(e.id=this.parseIdent(),t)this.checkLValSimple(e.id,ke,!1)}else{if(t===!0)this.unexpected();e.id=null}};x.parseClassSuper=function(e){e.superClass=this.eat(u._extends)?this.parseExprSubscripts(null,!1):null};x.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared};x.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 a=n[o];if(!_t(t,a.name))if(i)i.used.push(a);else this.raiseRecoverable(a.start,"Private field '#"+a.name+"' must be declared in an enclosing class")}};function Xd(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 kn(e,t){var{computed:n,key:r}=e;return!n&&(r.type==="Identifier"&&r.name===t||r.type==="Literal"&&r.value===t)}x.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!==u.string)this.unexpected();if(e.source=this.parseExprAtom(),this.options.ecmaVersion>=16)e.attributes=this.parseWithClause();return this.semicolon(),this.finishNode(e,"ExportAllDeclaration")};x.parseExport=function(e,t){if(this.next(),this.eat(u.star))return this.parseExportAllDeclaration(e,t);if(this.eat(u._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!==u.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")};x.parseExportDeclaration=function(e){return this.parseStatement(null)};x.parseExportDefaultDeclaration=function(){var e;if(this.type===u._function||(e=this.isAsyncFunction())){var t=this.startNode();if(this.next(),e)this.next();return this.parseFunction(t,$t|va,!1,e)}else if(this.type===u._class){var n=this.startNode();return this.parseClass(n,"nullableID")}else{var r=this.parseMaybeAssign();return this.semicolon(),r}};x.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};x.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 a=0,s=t.elements;a<s.length;a+=1){var p=s[a];if(p)this.checkPatternExport(e,p)}else if(n==="Property")this.checkPatternExport(e,t.value);else if(n==="AssignmentPattern")this.checkPatternExport(e,t.left);else if(n==="RestElement")this.checkPatternExport(e,t.argument)};x.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)}};x.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()};x.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")};x.parseExportSpecifiers=function(e){var t=[],n=!0;this.expect(u.braceL);while(!this.eat(u.braceR)){if(!n){if(this.expect(u.comma),this.afterTrailingComma(u.braceR))break}else n=!1;t.push(this.parseExportSpecifier(e))}return t};x.parseImport=function(e){if(this.next(),this.type===u.string)e.specifiers=Kd,e.source=this.parseExprAtom();else e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===u.string?this.parseExprAtom():this.unexpected();if(this.options.ecmaVersion>=16)e.attributes=this.parseWithClause();return this.semicolon(),this.finishNode(e,"ImportDeclaration")};x.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,ke),this.finishNode(e,"ImportSpecifier")};x.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,ke),this.finishNode(e,"ImportDefaultSpecifier")};x.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual("as"),e.local=this.parseIdent(),this.checkLValSimple(e.local,ke),this.finishNode(e,"ImportNamespaceSpecifier")};x.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===u.name){if(e.push(this.parseImportDefaultSpecifier()),!this.eat(u.comma))return e}if(this.type===u.star)return e.push(this.parseImportNamespaceSpecifier()),e;this.expect(u.braceL);while(!this.eat(u.braceR)){if(!t){if(this.expect(u.comma),this.afterTrailingComma(u.braceR))break}else t=!1;e.push(this.parseImportSpecifier())}return e};x.parseWithClause=function(){var e=[];if(!this.eat(u._with))return e;this.expect(u.braceL);var t={},n=!0;while(!this.eat(u.braceR)){if(!n){if(this.expect(u.comma),this.afterTrailingComma(u.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};x.parseImportAttribute=function(){var e=this.startNode();if(e.key=this.type===u.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(u.colon),this.type!==u.string)this.unexpected();return e.value=this.parseExprAtom(),this.finishNode(e,"ImportAttribute")};x.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===u.string){var e=this.parseLiteral(this.value);if(Gd.test(e.value))this.raise(e.start,"An export name cannot include a lone surrogate.");return e}return this.parseIdent(!0)};x.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)};x.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 se=j.prototype;se.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};se.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};se.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")};se.parseRestBinding=function(){var e=this.startNode();if(this.next(),this.options.ecmaVersion===6&&this.type!==u.name)this.unexpected();return e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")};se.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case u.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(u.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case u.braceL:return this.parseObj(!0)}return this.parseIdent()};se.parseBindingList=function(e,t,n,r){var i=[],o=!0;while(!this.eat(e)){if(o)o=!1;else this.expect(u.comma);if(t&&this.type===u.comma)i.push(null);else if(n&&this.afterTrailingComma(e))break;else if(this.type===u.ellipsis){var a=this.parseRestBinding();if(this.parseBindingListItem(a),i.push(a),this.type===u.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};se.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t};se.parseBindingListItem=function(e){return e};se.parseMaybeDefault=function(e,t,n){if(n=n||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(u.eq))return n;var r=this.startNodeAt(e,t);return r.left=n,r.right=this.parseMaybeAssign(),this.finishNode(r,"AssignmentPattern")};se.checkLValSimple=function(e,t,n){if(t===void 0)t=Sn;var r=t!==Sn;switch(e.type){case"Identifier":if(this.strict&&this.reservedWordsStrictBind.test(e.name))this.raiseRecoverable(e.start,(r?"Binding ":"Assigning to ")+e.name+" in strict mode");if(r){if(t===ke&&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!==xa)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")}};se.checkLValPattern=function(e,t,n){if(t===void 0)t=Sn;switch(e.type){case"ObjectPattern":for(var r=0,i=e.properties;r<i.length;r+=1){var o=i[r];this.checkLValInnerPattern(o,t,n)}break;case"ArrayPattern":for(var a=0,s=e.elements;a<s.length;a+=1){var p=s[a];if(p)this.checkLValInnerPattern(p,t,n)}break;default:this.checkLValSimple(e,t,n)}};se.checkLValInnerPattern=function(e,t,n){if(t===void 0)t=Sn;switch(e.type){case"Property":this.checkLValInnerPattern(e.value,t,n);break;case"AssignmentPattern":this.checkLValPattern(e.left,t,n);break;case"RestElement":this.checkLValPattern(e.argument,t,n);break;default:this.checkLValPattern(e,t,n)}};var le=function(e,t,n,r,i){this.token=e,this.isExpr=!!t,this.preserveSpace=!!n,this.override=r,this.generator=!!i},I={b_stat:new le("{",!1),b_expr:new le("{",!0),b_tmpl:new le("${",!1),p_stat:new le("(",!1),p_expr:new le("(",!0),q_tmpl:new le("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new le("function",!1),f_expr:new le("function",!0),f_expr_gen:new le("function",!0,!1,null,!0),f_gen:new le("function",!1,!1,null,!0)},rt=j.prototype;rt.initialContext=function(){return[I.b_stat]};rt.curContext=function(){return this.context[this.context.length-1]};rt.braceIsBlock=function(e){var t=this.curContext();if(t===I.f_expr||t===I.f_stat)return!0;if(e===u.colon&&(t===I.b_stat||t===I.b_expr))return!t.isExpr;if(e===u._return||e===u.name&&this.exprAllowed)return J.test(this.input.slice(this.lastTokEnd,this.start));if(e===u._else||e===u.semi||e===u.eof||e===u.parenR||e===u.arrow)return!0;if(e===u.braceL)return t===I.b_stat;if(e===u._var||e===u._const||e===u.name)return!1;return!this.exprAllowed};rt.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if(t.token==="function")return t.generator}return!1};rt.updateContext=function(e){var t,n=this.type;if(n.keyword&&e===u.dot)this.exprAllowed=!1;else if(t=n.updateContext)t.call(this,e);else this.exprAllowed=n.beforeExpr};rt.overrideContext=function(e){if(this.curContext()!==e)this.context[this.context.length-1]=e};u.parenR.updateContext=u.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var e=this.context.pop();if(e===I.b_stat&&this.curContext().token==="function")e=this.context.pop();this.exprAllowed=!e.isExpr};u.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?I.b_stat:I.b_expr),this.exprAllowed=!0};u.dollarBraceL.updateContext=function(){this.context.push(I.b_tmpl),this.exprAllowed=!0};u.parenL.updateContext=function(e){var t=e===u._if||e===u._for||e===u._with||e===u._while;this.context.push(t?I.p_stat:I.p_expr),this.exprAllowed=!0};u.incDec.updateContext=function(){};u._function.updateContext=u._class.updateContext=function(e){if(e.beforeExpr&&e!==u._else&&!(e===u.semi&&this.curContext()!==I.p_stat)&&!(e===u._return&&J.test(this.input.slice(this.lastTokEnd,this.start)))&&!((e===u.colon||e===u.braceL)&&this.curContext()===I.b_stat))this.context.push(I.f_expr);else this.context.push(I.f_stat);this.exprAllowed=!1};u.colon.updateContext=function(){if(this.curContext().token==="function")this.context.pop();this.exprAllowed=!0};u.backQuote.updateContext=function(){if(this.curContext()===I.q_tmpl)this.context.pop();else this.context.push(I.q_tmpl);this.exprAllowed=!1};u.star.updateContext=function(e){if(e===u._function){var t=this.context.length-1;if(this.context[t]===I.f_expr)this.context[t]=I.f_expr_gen;else this.context[t]=I.f_gen}this.exprAllowed=!0};u.name.updateContext=function(e){var t=!1;if(this.options.ecmaVersion>=6&&e!==u.dot){if(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())t=!0}this.exprAllowed=t};var E=j.prototype;E.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 a=t[i];if(a){var s;if(o==="init")s=this.strict&&a.init||a.get||a.set;else s=a.init||a[o];if(s)this.raiseRecoverable(r.start,"Redefinition of property")}else a=t[i]={init:!1,get:!1,set:!1};a[o]=!0};E.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===u.comma){var a=n.startNodeAt(r,i);a.expressions=[o];while(n.eat(u.comma))a.expressions.push(n.parseMaybeAssign(e,t));return n.finishNode(a,"SequenceExpression")}return o})};E.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,a=-1;if(t)i=t.parenthesizedAssign,o=t.trailingComma,a=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1;else t=new Nn,r=!0;var s=this.start,p=this.startLoc;if(this.type===u.parenL||this.type===u.name)this.potentialArrowAt=this.start,this.potentialArrowInForAwait=e==="await";var l=this.parseMaybeConditional(e,t);if(n)l=n.call(this,l,s,p);if(this.type.isAssign){var c=this.startNodeAt(s,p);if(c.operator=this.value,this.type===u.eq)l=this.toAssignable(l,!1,t);if(!r)t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1;if(t.shorthandAssign>=l.start)t.shorthandAssign=-1;if(this.type===u.eq)this.checkLValPattern(l);else this.checkLValSimple(l);if(c.left=l,this.next(),c.right=this.parseMaybeAssign(e),a>-1)t.doubleProto=a;return this.finishNode(c,"AssignmentExpression")}else if(r)this.checkExpressionErrors(t,!0);if(i>-1)t.parenthesizedAssign=i;if(o>-1)t.trailingComma=o;return l};E.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(u.question)){var o=this.startNodeAt(n,r);return o.test=i,o.consequent=this.parseMaybeAssign(),this.expect(u.colon),o.alternate=this.parseMaybeAssign(e),this.finishNode(o,"ConditionalExpression")}return i};E.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)};E.parseExprOp=function(e,t,n,r,i){var o=this.type.binop;if(o!=null&&(!i||this.type!==u._in)){if(o>r){var a=this.type===u.logicalOR||this.type===u.logicalAND,s=this.type===u.coalesce;if(s)o=u.logicalAND.binop;var p=this.value;this.next();var l=this.start,c=this.startLoc,d=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,i),l,c,o,i),f=this.buildBinary(t,n,e,d,p,a||s);if(a&&this.type===u.coalesce||s&&(this.type===u.logicalOR||this.type===u.logicalAND))this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses");return this.parseExprOp(f,t,n,r,i)}}return e};E.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 a=this.startNodeAt(e,t);return a.left=n,a.operator=i,a.right=r,this.finishNode(a,o?"LogicalExpression":"BinaryExpression")};E.parseMaybeUnary=function(e,t,n,r){var i=this.start,o=this.startLoc,a;if(this.isContextual("await")&&this.canAwait)a=this.parseAwait(r),t=!0;else if(this.type.prefix){var s=this.startNode(),p=this.type===u.incDec;if(s.operator=this.value,s.prefix=!0,this.next(),s.argument=this.parseMaybeUnary(null,!0,p,r),this.checkExpressionErrors(e,!0),p)this.checkLValSimple(s.argument);else if(this.strict&&s.operator==="delete"&&Ea(s.argument))this.raiseRecoverable(s.start,"Deleting local variable in strict mode");else if(s.operator==="delete"&&ri(s.argument))this.raiseRecoverable(s.start,"Private fields can not be deleted");else t=!0;a=this.finishNode(s,p?"UpdateExpression":"UnaryExpression")}else if(!t&&this.type===u.privateId){if((r||this.privateNameStack.length===0)&&this.options.checkPrivateFields)this.unexpected();if(a=this.parsePrivateIdent(),this.type!==u._in)this.unexpected()}else{if(a=this.parseExprSubscripts(e,r),this.checkExpressionErrors(e))return a;while(this.type.postfix&&!this.canInsertSemicolon()){var l=this.startNodeAt(i,o);l.operator=this.value,l.prefix=!1,l.argument=a,this.checkLValSimple(a),this.next(),a=this.finishNode(l,"UpdateExpression")}}if(!n&&!(a.type==="ArrowFunctionExpression"&&a.start===i)&&this.eat(u.starstar))if(t)this.unexpected(this.lastTokStart);else return this.buildBinary(i,o,a,this.parseMaybeUnary(null,!1,!1,r),"**",!1);else return a};function Ea(e){return e.type==="Identifier"||e.type==="ParenthesizedExpression"&&Ea(e.expression)}function ri(e){return e.type==="MemberExpression"&&e.property.type==="PrivateIdentifier"||e.type==="ChainExpression"&&ri(e.expression)||e.type==="ParenthesizedExpression"&&ri(e.expression)}E.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};E.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,a=!1;while(!0){var s=this.parseSubscript(e,t,n,r,o,a,i);if(s.optional)a=!0;if(s===e||s.type==="ArrowFunctionExpression"){if(a){var p=this.startNodeAt(t,n);p.expression=s,s=this.finishNode(p,"ChainExpression")}return s}e=s}};E.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(u.arrow)};E.parseSubscriptAsyncArrow=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!0,r)};E.parseSubscript=function(e,t,n,r,i,o,a){var s=this.options.ecmaVersion>=11,p=s&&this.eat(u.questionDot);if(r&&p)this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var l=this.eat(u.bracketL);if(l||p&&this.type!==u.parenL&&this.type!==u.backQuote||this.eat(u.dot)){var c=this.startNodeAt(t,n);if(c.object=e,l)c.property=this.parseExpression(),this.expect(u.bracketR);else if(this.type===u.privateId&&e.type!=="Super")c.property=this.parsePrivateIdent();else c.property=this.parseIdent(this.options.allowReserved!=="never");if(c.computed=!!l,s)c.optional=p;e=this.finishNode(c,"MemberExpression")}else if(!r&&this.eat(u.parenL)){var d=new Nn,f=this.yieldPos,h=this.awaitPos,g=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var m=this.parseExprList(u.parenR,this.options.ecmaVersion>=8,!1,d);if(i&&!p&&this.shouldParseAsyncArrow()){if(this.checkPatternErrors(d,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0)this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function");return this.yieldPos=f,this.awaitPos=h,this.awaitIdentPos=g,this.parseSubscriptAsyncArrow(t,n,m,a)}this.checkExpressionErrors(d,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=h||this.awaitPos,this.awaitIdentPos=g||this.awaitIdentPos;var y=this.startNodeAt(t,n);if(y.callee=e,y.arguments=m,s)y.optional=p;e=this.finishNode(y,"CallExpression")}else if(this.type===u.backQuote){if(p||o)this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var T=this.startNodeAt(t,n);T.tag=e,T.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(T,"TaggedTemplateExpression")}return e};E.parseExprAtom=function(e,t,n){if(this.type===u.slash)this.readRegexp();var r,i=this.potentialArrowAt===this.start;switch(this.type){case u._super:if(!this.allowSuper)this.raise(this.start,"'super' keyword outside a method");if(r=this.startNode(),this.next(),this.type===u.parenL&&!this.allowDirectSuper)this.raise(r.start,"super() call outside constructor of a subclass");if(this.type!==u.dot&&this.type!==u.bracketL&&this.type!==u.parenL)this.unexpected();return this.finishNode(r,"Super");case u._this:return r=this.startNode(),this.next(),this.finishNode(r,"ThisExpression");case u.name:var o=this.start,a=this.startLoc,s=this.containsEsc,p=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!s&&p.name==="async"&&!this.canInsertSemicolon()&&this.eat(u._function))return this.overrideContext(I.f_expr),this.parseFunction(this.startNodeAt(o,a),0,!1,!0,t);if(i&&!this.canInsertSemicolon()){if(this.eat(u.arrow))return this.parseArrowExpression(this.startNodeAt(o,a),[p],!1,t);if(this.options.ecmaVersion>=8&&p.name==="async"&&this.type===u.name&&!s&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc)){if(p=this.parseIdent(!1),this.canInsertSemicolon()||!this.eat(u.arrow))this.unexpected();return this.parseArrowExpression(this.startNodeAt(o,a),[p],!0,t)}}return p;case u.regexp:var l=this.value;return r=this.parseLiteral(l.value),r.regex={pattern:l.pattern,flags:l.flags},r;case u.num:case u.string:return this.parseLiteral(this.value);case u._null:case u._true:case u._false:return r=this.startNode(),r.value=this.type===u._null?null:this.type===u._true,r.raw=this.type.keyword,this.next(),this.finishNode(r,"Literal");case u.parenL:var c=this.start,d=this.parseParenAndDistinguishExpression(i,t);if(e){if(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(d))e.parenthesizedAssign=c;if(e.parenthesizedBind<0)e.parenthesizedBind=c}return d;case u.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(u.bracketR,!0,!0,e),this.finishNode(r,"ArrayExpression");case u.braceL:return this.overrideContext(I.b_expr),this.parseObj(!1,e);case u._function:return r=this.startNode(),this.next(),this.parseFunction(r,0);case u._class:return this.parseClass(this.startNode(),!1);case u._new:return this.parseNew();case u.backQuote:return this.parseTemplate();case u._import:if(this.options.ecmaVersion>=11)return this.parseExprImport(n);else return this.unexpected();default:return this.parseExprAtomDefault()}};E.parseExprAtomDefault=function(){this.unexpected()};E.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc)this.raiseRecoverable(this.start,"Escape sequence in keyword import");if(this.next(),this.type===u.parenL&&!e)return this.parseDynamicImport(t);else if(this.type===u.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()};E.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)if(!this.eat(u.parenR))if(this.expect(u.comma),!this.afterTrailingComma(u.parenR)){if(e.options=this.parseMaybeAssign(),!this.eat(u.parenR)){if(this.expect(u.comma),!this.afterTrailingComma(u.parenR))this.unexpected()}}else e.options=null;else e.options=null;else if(!this.eat(u.parenR)){var t=this.start;if(this.eat(u.comma)&&this.eat(u.parenR))this.raiseRecoverable(t,"Trailing comma is not allowed in import()");else this.unexpected(t)}return this.finishNode(e,"ImportExpression")};E.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")};E.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")};E.parseParenExpression=function(){this.expect(u.parenL);var e=this.parseExpression();return this.expect(u.parenR),e};E.shouldParseArrow=function(e){return!this.canInsertSemicolon()};E.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 a=this.start,s=this.startLoc,p=[],l=!0,c=!1,d=new Nn,f=this.yieldPos,h=this.awaitPos,g;this.yieldPos=0,this.awaitPos=0;while(this.type!==u.parenR)if(l?l=!1:this.expect(u.comma),o&&this.afterTrailingComma(u.parenR,!0)){c=!0;break}else if(this.type===u.ellipsis){if(g=this.start,p.push(this.parseParenItem(this.parseRestBinding())),this.type===u.comma)this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else p.push(this.parseMaybeAssign(!1,d,this.parseParenItem));var m=this.lastTokEnd,y=this.lastTokEndLoc;if(this.expect(u.parenR),e&&this.shouldParseArrow(p)&&this.eat(u.arrow))return this.checkPatternErrors(d,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=f,this.awaitPos=h,this.parseParenArrowList(n,r,p,t);if(!p.length||c)this.unexpected(this.lastTokStart);if(g)this.unexpected(g);if(this.checkExpressionErrors(d,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=h||this.awaitPos,p.length>1)i=this.startNodeAt(a,s),i.expressions=p,this.finishNodeAt(i,"SequenceExpression",m,y);else i=p[0]}else i=this.parseParenExpression();if(this.options.preserveParens){var T=this.startNodeAt(n,r);return T.expression=i,this.finishNode(T,"ParenthesizedExpression")}else return i};E.parseParenItem=function(e){return e};E.parseParenArrowList=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!1,r)};var Yd=[];E.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===u.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(u.parenL))e.arguments=this.parseExprList(u.parenR,this.options.ecmaVersion>=8,!1);else e.arguments=Yd;return this.finishNode(e,"NewExpression")};E.parseTemplateElement=function(e){var t=e.isTagged,n=this.startNode();if(this.type===u.invalidTemplate){if(!t)this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal");n.value={raw:this.value.replace(/\r\n?/g,`
|
|
23
|
+
${p}${l}: ${r};`;return`/** ${d.replace(Tf," ")} */ ${p}${l}: ${r};`}return`${p}${l}: ${r};`}).join(t?`
|
|
24
|
+
`:" ");return t?`{
|
|
25
|
+
${n}
|
|
26
|
+
}`:`{ ${n} }`}function Cf({hasTypeScriptType:e,hasJSDocType:t,inferredType:n,finalType:i}){if(e)return"typescript";if(t)return"jsdoc";if(n!==void 0)return"default";if(i!==void 0)return"inferred";return"unknown"}function Vn(e){let t=e.explicitType??e.jsdocType??e.resolvedType??e.typeSeed,n=e.jsdocParams??e.resolvedParams,i=e.jsdocReturnType??e.resolvedReturnType;if((e.isFunctionDeclaration?t==="() => any":e.initializerIsFunction&&t===e.typeSeed)&&i)t=`${e.jsdocTypeParameters?`<${e.jsdocTypeParameters}>`:""}(${Ee(n??[])}) => ${i}`;let s=e.jsdocDescription??e.resolvedDescription;if(s===void 0&&t!==void 0)s=e.typedefs?.get(t)?.description;let a=Cf({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}),o=e.initializerIsFunction||e.isFunctionDeclaration||e.inferIsFunctionFromTypeSignature===!0&&(!!e.jsdocParams?.length||e.jsdocReturnType!==void 0||!!e.jsdocType?.includes("=>")||!!e.resolvedType?.includes("=>")||!!e.explicitType?.includes("=>")),l=o?e.jsdocTypeParameters:void 0;return{type:t,typeSource:a,description:s,params:n,returnType:i,isFunction:o,typeParameters:l}}function Hn(e){if(e?.type==="Identifier")return e.name;return typeof e?.value==="string"?e.value:void 0}function Sa(e,t){for(let n of e?.body??[]){let i=n.type==="ExportNamedDeclaration"&&n.declaration?n.declaration:n;if(i.type==="VariableDeclaration"){let r=i.declarations.find((s)=>s.id.type==="Identifier"?s.id.name===t:B(s.id).has(t));if(r)return{declaration:i,declarator:r,statement:n}}else if((i.type==="FunctionDeclaration"||i.type==="ClassDeclaration")&&i.id?.name===t)return{declaration:i,statement:n}}return}function kf(e,t){for(let n of e?.body??[]){if(n.type!=="LabeledStatement"||n.label.name!=="$")continue;if(n.body.type!=="ExpressionStatement")continue;let i=n.body.expression;if(i.type!=="AssignmentExpression"||i.operator!=="=")continue;if(i.left.type.startsWith("TS"))continue;if(!B(i.left).has(t))continue;let r={type:"VariableDeclarator",id:i.left,init:i.right,start:i.start,end:i.end};return{declaration:{type:"VariableDeclaration",kind:"let",declarations:[r],start:n.start,end:n.end},declarator:r,statement:n}}return}function wf(e){if(e==="var")return"let";if(e==="using"||e==="await using")return"const";return e}function Ar(e,t,n,i,r){let s=Hn(n.local),a=Hn(n.exported);if(!s||!a)return;if(t.source!=null)return{localName:s,exportedName:a};let o=Sa(i,s);if(!o&&r==="instance")o=Sa(e.parsed?.module?.content,s)??kf(i,s);return{localName:s,exportedName:a,...o}}function Pr(e,t,n,i){let r=t.source?.value,s=typeof r==="string"?`it re-exports from "${r}"`:e.valueImportBindingsByLocalName.has(n)?"it re-exports an imported binding":"no matching local declaration was found";P(e,"export-unresolved",i,`export "${i}" was skipped because ${s}; sveld only resolves exports of a local declaration.`,C(e,t))}function Wn(e,t,n){if(!n)return q(e,t);let i=t.specifiers.length===1?q(e,t):void 0,r=q(e,n.statement);if(!i||!r)return i??r;let s=Object.fromEntries(Object.entries(i).filter(([,a])=>a!==void 0));return{...r,...s,internal:i.internal||r.internal}}function Dr(e,t,n,i){let r=[];if(t.type==="FunctionDeclaration"){if(!t.id)return r;let o=e.scriptLanguage==="ts"?Wo(e,t):void 0;return r.push({prop_name:n?.exportedName??t.id.name,kind:"function",isFunctionDeclaration:!0,value:void 0,typeSeed:o?.hasAnnotations?void 0:"() => any",explicitType:o?.hasAnnotations?o.signature:void 0,initializerIsFunction:!0,isRequired:!1,localName:t.id.name,defaultValue:void 0,inferredTypeForSource:void 0,resolvedJSDoc:void 0}),r}if(t.type!=="VariableDeclaration")return r;let s=wf(t.kind),a=n?.declarator?[n.declarator]:t.declarations;for(let{id:o,init:l}of a){if(o.type!=="Identifier"){for(let g of B(o)){if(n&&n.localName!==g)continue;r.push({prop_name:n?.exportedName??g,kind:s,isFunctionDeclaration:!1,value:void 0,typeSeed:void 0,explicitType:void 0,initializerIsFunction:!1,isRequired:!1,localName:g,defaultValue:void 0,inferredTypeForSource:void 0,resolvedJSDoc:void 0})}continue}let p=o.name,c=n?.exportedName??p,d=l==null?{isFunction:!1}:Me(e,l),{value:f,type:h,isFunction:m,defaultValue:y}=d;Bn(e,d,c,i),r.push({prop_name:c,kind:s,isFunctionDeclaration:!1,value:f,typeSeed:h,explicitType:e.explicitPropTypesByName.get(p),initializerIsFunction:m,isRequired:s==="let"&&l==null,localName:p,defaultValue:y,inferredTypeForSource:h,resolvedJSDoc:d})}return r}function Nr(e,t,n){let{resolvedJSDoc:i}=t;return Vn({explicitType:t.explicitType,typeSeed:t.typeSeed,inferredTypeForSource:t.inferredTypeForSource,jsdocType:n?.type,jsdocDescription:n?.description,jsdocParams:n?.params,jsdocReturnType:n?.returnType,jsdocTypeParameters:n?.typeParameters,resolvedType:i?.resolvedType,resolvedDescription:i?.resolvedDescription,resolvedParams:i?.resolvedParams,resolvedReturnType:i?.resolvedReturnType,initializerIsFunction:t.initializerIsFunction,isFunctionDeclaration:t.isFunctionDeclaration,typedefs:e.typedefs})}function Af(e,t,n){P(e,"export-unresolved",n,`export "${n}" was skipped because a class can't be a prop; export it from the module script instead.`,C(e,t))}function Ea(e,t,n,i){if(n.type==="ClassDeclaration"){if(n.id)Af(e,t,i?.exportedName??n.id.name);return}let r=Dr(e,n,i,"props");if(r.length===0)return;let s=Wn(e,t,i);for(let a of r){let{prop_name:o,kind:l,localName:p}=a,{type:c,typeSource:d,description:f,params:h,returnType:m,isFunction:y,typeParameters:g}=Nr(e,a,s);Te(e,"prop-unknown-type",o,s?.sveldIgnore),bt(e,o,{name:o,...p!==void 0&&p!==o?{localName:p}:{},kind:l,description:f,binding:s?.binding,deprecated:s?.deprecated,tags:s?.tags,...s?.internal?{internal:!0}:{},type:c,typeSource:d,value:a.value,defaultValue:a.defaultValue,params:h,returnType:m,typeParameters:g,isFunction:y,isFunctionDeclaration:a.isFunctionDeclaration,isRequired:a.isRequired,constant:l==="const",reactive:e.reactive_vars.has(o),source:C(e,t)})}}function Ca(e,t,n){if(t.declaration!=null){Ea(e,t,t.declaration);return}for(let i of t.specifiers){let r=Ar(e,t,i,n,"instance");if(!r)continue;if(r.declaration)Ea(e,t,r.declaration,r);else Pr(e,t,r.localName,r.exportedName)}}function Pf(e){if(!e||typeof e!=="object"||!("type"in e))return;let t=String(e.type),n=St(t);if(!n&&!Gt(t))return;let i="name"in e&&typeof e.name==="string"?e.name:void 0;if(!i)return;if(n)return{type:"InlineComponent",name:i};let r={type:"Element",name:i};if(i==="svelte:element"&&"tag"in e&&e.tag&&typeof e.tag==="object"){let s=e.tag;if(s.type==="Literal"&&typeof s.value==="string")r.thisValue=s.value}return r}function ka(e,t){let n=Pf(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}var Df=/^[A-Za-z_$][\w$]*/,Nf=/[A-Za-z_$][\w$]*/g,$f=/^(?:(?:const|in|out)\s+)+/;function wa(e){let t=G(e,",").map((i)=>i.trim()).filter((i)=>i.length>0);if(t.length===0)return null;return[t.map((i)=>i.replace($f,"").match(Df)?.[0]??i).join(", "),t.join(", ")]}function Aa(e,t,n){let i=e.scriptGenericsAttribute?.value;if(!i)return;for(let[r]of i.matchAll(Nf)){if(e.typeImportBindingsByLocalName.has(r))t.add(r);if(n.has(r))continue;let s=e.localTypeDeclarationsByName.get(r);if(!s)continue;n.add(r),Re(e,s.node,t,n)}}function zn(e,t,n){if(e.generics)e.generics=[`${e.generics[0]}, ${t}`,`${e.generics[1]}, ${n}`];else e.generics=[t,n]}function $r(e){if(!Array.isArray(e.value))return;return e.value.map((t)=>t.type==="Text"?t.data:"").join("").trim()}function Pa(e){let t=[e.instance,e.module].filter((i)=>i!==void 0),n=!1;for(let i of t){let r=i.attributes.find((s)=>s.name==="lang");if(!r){n=!0;continue}if($r(r)?.toLowerCase()==="ts")return"ts"}return n?"js":void 0}function Da(e,t){let n=t.instance?.attributes.find((o)=>o.name==="generics");if(!n)return;let i=C(e,n),r=t.instance?.attributes.find((o)=>o.name==="lang");if((r?$r(r)?.toLowerCase():void 0)!=="ts"){P(e,"syntax-skipped","generics",'<script generics="..."> requires lang="ts"; the generics attribute was ignored because the script is not TypeScript.',i);return}let a=$r(n);if(!a)return;return{value:a,source:i}}var Lf=/[A-Za-z_$][\w$]*/g;function _f(e,t,n){let i=new Map,r=t.type==="TSInterfaceDeclaration"||t.type==="TSTypeAliasDeclaration"?t.typeParameters?.params:void 0,s=n.typeArguments?.params;if(!r?.length||!s?.length)return i;for(let a=0;a<r.length;a++){let o=r[a]?.name,l=s[a];if(!o||l?.start===void 0||l?.end===void 0)continue;let p=M(e,l.start,l.end)?.trim();if(p)i.set(o,p)}return i}function If(e,t){if(t.size===0)return e;return e.replace(Lf,(n)=>t.get(n)??n)}function Gn(e,t,n,i=new Set){let r=new Map;if(!t?.type)return r;let s=(o)=>{for(let l of o){if(l?.type!=="TSPropertySignature"||l.computed||!l.key)continue;let p=z(l.key);if(!p)continue;let c=l.typeAnnotation?.start,d=l.typeAnnotation?.end;if(c===void 0||d===void 0)continue;let f=M(e,c+1,d)?.trim();if(!f)continue;V(e,l.typeAnnotation?.typeAnnotation);let h=q(e,l);r.set(p,{type:f,optional:l.optional===!0,source:C(e,l),...h?{jsdoc:h}:{}})}},a=(o)=>{let l=Gn(e,o,n,i);for(let[p,c]of l)r.set(p,c)};switch(t.type){case"TSTypeLiteral":s(t.members??[]);break;case"TSInterfaceDeclaration":s(t.body?.body??[]);break;case"TSTypeAliasDeclaration":case"TSParenthesizedType":a(t.typeAnnotation);break;case"TSTypeReference":{let o=Fo(t.typeName);if(!o||i.has(o))break;let l=n.get(o);if(!l)break;i.add(o);let p=Gn(e,l,n,i);i.delete(o);let c=_f(e,l,t);for(let[d,f]of p)r.set(d,c.size===0?f:{...f,type:If(f.type,c)});break}case"TSIntersectionType":for(let o of t.types??[])a(o);break}return r}function $a(e){return new Map(Array.from(e.localTypeDeclarationsByName,([t,n])=>[t,n.node]))}function Rf(e){let t={};for(let[n,i]of Object.entries(e))t[n]={...i.attribute===void 0?{}:{attribute:i.attribute},...i.reflect===void 0?{}:{reflect:i.reflect},...i.type===void 0?{}:{type:i.type}};return t}function Lr(e,t,n){if(t.type==="ImportDeclaration"&&t.source?.value)for(let i of t.specifiers??[]){let r=i.local?.name;if(!r)continue;if(!(t.importKind==="type"||i.type==="ImportSpecifier"&&i.importKind==="type"))continue;let a,o;if(i.type==="ImportSpecifier")a="named",o=i.imported?.type==="Identifier"?i.imported.name:typeof i.imported?.value==="string"?i.imported.value:void 0;else if(i.type==="ImportDefaultSpecifier")a="default";else if(i.type==="ImportNamespaceSpecifier")a="namespace";if(!a)continue;e.typeImportBindingsByLocalName.set(r,{importedName:o,localName:r,source:String(t.source.value),specifierType:a})}if(t.type==="TSEnumDeclaration"||t.type==="TSInterfaceDeclaration"||t.type==="TSTypeAliasDeclaration"){let i=t.type==="TSEnumDeclaration"?Ho(e,t):M(e,t.start,t.end)?.trim();e.localTypeDeclarationsByName.set(t.id.name,{code:i??"",node:t,start:t.start,...n?{exported:n}:{}})}}function La(e,t){if(e.runesPropsDeclarationMetadataByDeclaratorStart.clear(),e.explicitPropTypesByName.clear(),e.explicitVariableTypesByName.clear(),e.explicitVariableTypeNodesByName.clear(),e.typeImportBindingsByLocalName.clear(),e.localTypeDeclarationsByName.clear(),e.additionalTypeDependencyNodes.length=0,e.typedRunesPropsDeclarations.length=0,!e.source)return;e.scriptLanguage=Pa(t);let n=t.options?.customElement;e.customElementTag=n?.tag,e.customElement=n?{...n.tag===void 0?{}:{tag:n.tag},...n.shadow==="open"||n.shadow==="none"?{shadow:n.shadow}:{},...n.props?{props:Rf(n.props)}:{},...n.extend===void 0?{}:{extend:!0}}:void 0,e.runesOptionOverride=t.options?.runes,e.scriptGenericsAttribute=Da(e,t);let i=new Set;for(let s of t.module?.content.body??[]){if(!s?.type)continue;if(s.type==="ExportNamedDeclaration"&&s.declaration)Lr(e,s.declaration,!0);else if(s.type==="ExportNamedDeclaration"&&!s.source)for(let a of s.specifiers){if(a.local.type!=="Identifier"||a.exported.type!=="Identifier")continue;if(a.local.name===a.exported.name)i.add(a.local.name)}else Lr(e,s,!1)}for(let s of i){let a=e.localTypeDeclarationsByName.get(s);if(a)a.exported=!0}let r=t.instance?.content.body??[];for(let s of r){if(!s?.type)continue;if(Lr(e,s,!1),s.type==="ExportNamedDeclaration"&&s.declaration?.type==="VariableDeclaration")for(let a of s.declaration.declarations??[]){if(a.id?.type!=="Identifier"||!a.id.name)continue;let o=Ie(e,a.id.typeAnnotation);if(o)e.explicitPropTypesByName.set(a.id.name,o),V(e,a.id.typeAnnotation?.typeAnnotation)}else if(s.type==="VariableDeclaration")for(let a of s.declarations??[]){if(a.id?.type!=="Identifier"||!a.id.name)continue;let o=Ie(e,a.id.typeAnnotation);if(o){e.explicitVariableTypesByName.set(a.id.name,o);let l=a.id.typeAnnotation?.typeAnnotation;if(l)e.explicitVariableTypeNodesByName.set(a.id.name,l)}}}for(let s of r){if(!s||typeof s!=="object"||!("declarations"in s))continue;for(let a of s.declarations??[]){if(!ve(Qi(a.init),"$props"))continue;let o="typeAnnotation"in a.id?a.id.typeAnnotation:void 0,l=o?void 0:So(a.init),p=o?.typeAnnotation??l,c=o?Ie(e,o):st(e,l),d=Gn(e,p,$a(e)),f=new Set,h=new Set;if(Re(e,p,f,h),Aa(e,f,h),a.start!==void 0){let m={canonicalType:c,props:d,referencedImportedTypes:f,referencedLocalTypes:h};if(e.runesPropsDeclarationMetadataByDeclaratorStart.set(a.start,m),c)e.typedRunesPropsDeclarations.push(m)}}}}function Na(e,t){let n=t?.trim();if(!n)return;let i=e.typedefMembersByName.get(n)??$e(n);return i?new Map(i.map((r)=>[r.name,r])):void 0}function _a(e,t){for(let n of t.declarations){if(!ve(n.init,"$props"))continue;let i=jo(e,n.start);if(n.id.type==="Identifier"){e.wholePropsLocals.add(n.id.name),e.restPropLocals.add(n.id.name);let o=i?.props.size?void 0:Na(e,q(e,t)?.type);for(let l of o?.values()??[])bt(e,l.name,{name:l.name,kind:"let",description:l.description,type:l.type,typeSource:"jsdoc",isFunction:l.type.includes("=>"),isFunctionDeclaration:!1,isRequired:!l.optional,constant:!1,reactive:!1});for(let[l,p]of i?.props??[])bt(e,l,{name:l,kind:"let",description:p.jsdoc?.description,deprecated:p.jsdoc?.deprecated,tags:p.jsdoc?.tags,type:p.type,typeSource:"typescript",isFunction:!1,isFunctionDeclaration:!1,isRequired:!p.optional,constant:!1,reactive:!1,source:p.source});continue}if(n.id.type!=="ObjectPattern")continue;let r=q(e,t),s=i?.props.size?void 0:Na(e,r?.type),a=n.id.properties.filter((o)=>{if(o.type!=="Property"||o.computed)return!1;if(!z(o.key))return!1;if(o.value.type==="Identifier")return!0;return o.value.type==="AssignmentPattern"&&o.value.left.type==="Identifier"}).length;for(let o of n.id.properties){if(o.type==="RestElement"){if(o.argument.type==="Identifier")e.restPropLocals.add(o.argument.name);continue}let l=z(o.key);if(!l)continue;let p,c;if(o.value.type==="Identifier")p=o.value.name;else{let It=o.value;p=It.left.name,c=It.right}if(!p)continue;if(kn(e,l,p),l==="children")e.snippetPropLocals.add(p);let d=s?.get(l),f=i?.props.get(l),h=q(e,o)??f?.jsdoc??(a===1&&!s?r:void 0),{init:m,bindable:y}=ta(c),g=m==null?{isFunction:!1}:Me(e,m),{value:N,type:S,isFunction:w,defaultValue:v}=g,ye=f?.type===void 0&&h?.type===void 0?g.resolvedType:void 0;Bn(e,g,l,"props");let{type:Ae,typeSource:Ze,description:xn,params:bn,returnType:vn,isFunction:Tn}=Vn({explicitType:f?.type,typeSeed:S,inferredTypeForSource:S,jsdocType:h?.type??d?.type,jsdocDescription:h?.description??d?.description,jsdocParams:h?.params,jsdocReturnType:h?.returnType,resolvedType:ye,resolvedDescription:g.resolvedDescription,resolvedParams:g.resolvedParams,resolvedReturnType:g.resolvedReturnType,initializerIsFunction:w,isFunctionDeclaration:!1,inferIsFunctionFromTypeSignature:!0});if(y)e.reactive_vars.add(l);Te(e,"prop-unknown-type",l,h?.sveldIgnore),bt(e,l,{name:l,...p===l?{}:{localName:p},kind:"let",description:xn,binding:h?.binding,deprecated:h?.deprecated,tags:h?.tags,...h?.internal?{internal:!0}:{},...y?{bindable:!0}:{},type:Ae,typeSource:Ze,value:N,defaultValue:v,params:bn,returnType:vn,isFunction:Tn,isFunctionDeclaration:!1,isRequired:!y&&m==null&&f?.optional!==!0&&d?.optional!==!0,constant:!1,reactive:y,source:C(e,o)})}}}function Mf(e){let n=e.indexOf("EventDispatcher");if(n===-1)return;let i=n+15;while(e[i]===" ")i++;if(e[i]!=="<")return;let r=rt(e,i);return r===-1?void 0:e.slice(i+1,r)}var Bf=/^["']|["']$/g,Of=/\?$/,jf=/^\{/,Ff=/\}$/;function qf(e){let t=Cn(e,":");if(t===-1)return;let n=e.slice(0,t).trim().replace(Of,"").replace(Bf,""),i=e.slice(t+1).trim();if(!n||!i)return;return{name:n,type:i}}function Ia(e,t,n,i){if(t){for(let[o,l]of Gn(e,t,$a(e)))Ge(e,{name:o,detail:l.type,has_argument:!0,source:l.source});return}let r=ze(e,n)?.type,s=r?Mf(r):void 0;if(!s)return;let a=s.trim().replace(jf,"").replace(Ff,"");for(let o of G(a,";,")){let l=qf(o.trim());if(!l)continue;Ge(e,{name:l.name,detail:l.type,has_argument:!0,source:i})}}function Ra(e,t){if(e.syntaxMode!=="runes")return;for(let[n,i]of Array.from(e.events.entries())){if(i.type!=="dispatched")continue;if(t.has(n)||e.forwardedEvents.has(n))continue;let r=`on${n}`,s=e.props.get(r);if(!s)continue;let a=s.type!==void 0||s.params!==void 0||s.returnType!==void 0,o=i.detail===void 0||i.detail==="undefined"||i.detail==="null"?"() => void":`(detail: ${i.detail}) => void`;e.props.set(r,{...s,description:s.description??i.description,type:a?s.type:o,typeSource:a?s.typeSource:"inferred",isFunction:!0}),e.events.delete(n)}}var Ue=null;function Et(e){return!e||e==="default"?Ue:e}function Vf(e,t){let n={value:void 0,replace:!1};if(t.type==="Identifier")n.value=t.name,n.replace=!0;else if(t.type==="Literal")n.value=String(t.value);else if(t.type==="MemberExpression")n.value=Ln(e,t);else if(t.type==="ObjectExpression"||t.type==="TemplateLiteral")n.value=M(e,t.start,t.end);return n}function Hf(e,t){if(!A(t))return null;let n=vt(e,t.name);if(ne(n))return _r(e,n).slot_props;let i=We(e,t.name);if(!i)return null;let r=$e(i.type);if(!r)return null;let s={};for(let a of r)s[a.name]={value:a.type,replace:!1};return s}function _r(e,t){let n={},i=!1;for(let r of t.properties){if(r.type==="SpreadElement"){let a=Hf(e,r.argument);if(a)Object.assign(n,a);else i=!0,P(e,"spread-unresolved","slot_props",`Slot props spread a value sveld can't resolve; its shape is widened to "Record<string, any>".`,C(e,r));continue}if(r.type!=="Property"||r.computed)continue;let s=z(r.key);if(!s)continue;n[s]=Vf(e,r.value)}return{slot_props:n,hasUnresolvedSpread:i}}function Wf(e,t){if(t.type==="Identifier"){let r=e.propLocalToPublicName.get(t.name);return r?{publicName:r,trackingName:t.name}:null}if(t.type!=="MemberExpression")return null;if(t.object.type!=="Identifier"||!e.wholePropsLocals.has(t.object.name))return null;let{property:n}=t,i;if(!t.computed&&n.type==="Identifier")i=n.name;else if(n.type==="Literal"&&n.value!=null)i=String(n.value);return i?{publicName:i,trackingName:i}:null}function Ir(e){return e.type==="ChainExpression"?e.expression:e}function Ma(e,t){let n=Ir(t),i=Wf(e,n.callee);return i&&{...i,arguments:n.arguments}}function Kt(e,{slot_name:t,slot_props:n,slot_props_unresolved_spread:i,slot_fallback:r,slot_description:s,slot_deprecated:a,slot_tags:o,slot_internal:l,source:p}){let c=Et(t),d=c===Ue,f=r||void 0,h=n===void 0||n===""?void 0:n,m=s?.trim()||void 0,y=e.slots.get(c);if(y)e.slots.set(c,{...y,default:y.default??d,fallback:f,slot_props:y.slot_props===void 0?h:y.slot_props,slot_props_unresolved_spread:y.slot_props_unresolved_spread||i,description:y.description||m,deprecated:y.deprecated??a,tags:y.tags||o,...y.internal||l?{internal:!0}:{},source:p||y.source});else e.slots.set(c,{name:c,default:d,fallback:f,slot_props:h,slot_props_unresolved_spread:i,description:m,deprecated:a,tags:o,...l?{internal:!0}:{},source:p})}var Ba=/^@component/,zf=/\r/g,Gf=new Set(["AssignmentExpression","UpdateExpression","CallExpression","SpreadAttribute","FunctionDeclaration","ImportDeclaration","VariableDeclaration","ExportNamedDeclaration","Comment","SlotElement","RenderTag","OnDirective","BindDirective"]);function Oa(e){return e&&"id"in e&&e.id&&"name"in e.id?e.id.name:void 0}function Uf(e,t,n,i){let r=n.callee.type==="Identifier"?n.callee.name:void 0;if(r==="createEventDispatcher"){let s=Oa(i);if(s!==void 0)t.dispatcherName=s,t.dispatcherDeclaratorNode=i;t.dispatcherTypeArgument=n.typeArguments?.params?.[0]}if(r==="$host"){let s=Oa(i);if(s!==void 0)t.hostLocalNames.add(s)}if(r==="setContext")ma(e,n);if(n.arguments.length>0){if(t.callsWithArguments.push(n),Fn(e,n.callee))t.locallyBoundCalls.add(n)}if(r)t.callees.push({name:r,arguments:n.arguments,node:n,nestedBoundDetailNames:Ut(e,n.arguments[1])});if(Ve(n.callee)&&A(n.callee.property)&&n.callee.property.name==="dispatchEvent"&&(ve(n.callee.object,"$host")||A(n.callee.object)&&t.hostLocalNames.has(n.callee.object.name))){let s=va(e,n);if(s)t.hostDispatchedEventNames.add(s.name),t.hostDispatches.push(s)}}function Jf(e,t,n){let i={value:void 0,replace:!1},r=Array.isArray(n)?n[0]:n;if(r?.type==="Text")i.value=JSON.stringify(r.raw);else if(r?.type==="ExpressionTag"){let{expression:s}=r;if(s.type==="Identifier"){if(!Array.isArray(n)&&s.name===t)i.value=s.name,i.replace=!0}else if(s.type==="Literal")i.value=typeof s.value==="string"?JSON.stringify(s.value):String(s.value);else if(s.type==="MemberExpression")i.value=Ln(e,s);else if(s.type==="ObjectExpression"||s.type==="TemplateLiteral")i.value=M(e,r.start+1,r.end-1)}return i}function Kf(e,t){let n=t.attributes.find((l)=>("name"in l)&&l.name==="name"),i=n&&"value"in n?n.value:void 0,r=Array.isArray(i)?i[0]:void 0,s=r?.type==="Text"?r.data:void 0,a={};for(let l of t.attributes){if(!("value"in l)||l.name==="name"||l.value===!0)continue;a[l.name]=Jf(e,l.name,l.value)}let o=t.fragment.nodes.map(({start:l,end:p})=>M(e,l,p)??"").join("").trim();e.renderedSlots.add(Et(s)),Kt(e,{slot_name:s,slot_props:a,slot_fallback:o,source:C(e,t)})}function Xf(e,t){let n=Ma(e,t.expression);if(!n){let{callee:l}=Ir(t.expression);if(Ve(l)&&A(l.object)&&e.wholePropsLocals.has(l.object.name))e.slotsUntracked=!0;return}let[i,...r]=n.arguments,s,a=!1;if(i===void 0)s={};else if(r.length===0&&i.type==="ObjectExpression"){let l=_r(e,i);s=l.slot_props,a=l.hasUnresolvedSpread}let o=n.publicName==="children"?void 0:n.publicName;if(e.renderedSlots.add(Et(o)),s!==void 0)Kt(e,{slot_name:o,slot_props:s,slot_props_unresolved_spread:a||void 0,source:C(e,t)});if(s!==void 0||e.slots.has(o??Ue))e.snippetPropLocals.add(n.trackingName)}function Yf(e,t,n){let i=t.name;if(t.expression!=null||!i)return;if(n==null||!("name"in n)||typeof n.name!=="string"||!n.name)return;let r=St(n.type)?{type:"InlineComponent",name:n.name}:{type:"Element",name:n.name};e.forwardedEvents.set(i,r);let s=e.events.get(i),a=e.eventDescriptions.get(i);if(!s)e.events.set(i,{type:"forwarded",name:i,element:r,description:a,deprecated:void 0,source:C(e,t)});else if(s.type==="forwarded"&&a&&!s.description)e.events.set(i,{...s,description:a,deprecated:s.deprecated,source:s.source||C(e,t)})}function Qf(e,t,n){if(!n||!(Gt(n.type)||St(n.type)))return;if(t.expression.type!=="Identifier")return;let i=jn(e,t.expression.name);if(!i)return;if(e.reactive_vars.add(i),t.name!=="this"||!Gt(n.type)||!("name"in n))return;if(typeof n.name!=="string")return;let r=n.name,s=e.bindings.get(i);if(!s)e.bindings.set(i,{elements:[r]});else if(!s.elements.includes(r))e.bindings.set(i,{...s,elements:[...s.elements,r]})}function ja(e){let t={dispatcherName:void 0,dispatcherDeclaratorNode:void 0,dispatcherTypeArgument:void 0,hostLocalNames:new Set,hostDispatchedEventNames:new Set,hostDispatches:[],callees:[],callsWithArguments:[],locallyBoundCalls:new Set};ia(e),e.activeScopes.push(e.componentScope);let n=ra(e),i={enter(r,s){if(Mn(r.type))return ee;let a=sa(e,n,r);if(a)e.activeScopes.push(a);if(!Gf.has(r.type))return;switch(r.type){case"AssignmentExpression":Sr(e,r.left);break;case"UpdateExpression":Sr(e,r.argument);break;case"CallExpression":Uf(e,t,r,s);break;case"SpreadAttribute":{let o=r.expression.type==="Identifier"?r.expression.name:void 0,l=e.restPropLocals.has(o??"");if(o==="$$restProps"||l)ka(e,s);if((o==="$$props"||l)&&s&&St(s.type))e.slotsUntracked=!0;break}case"FunctionDeclaration":if(r.id?.name)e.funcDecls.set(r.id.name,r);break;case"ImportDeclaration":qt(e,r);break;case"VariableDeclaration":if(e.vars.add(r),s?.type==="Program"&&r.declarations.some((o)=>ve(o.init,"$props")))_a(e,r);break;case"ExportNamedDeclaration":Ca(e,r,s?.type==="Program"?s:null);break;case"Comment":{let o=r.data.trim();if(Ba.test(o))e.componentComment=o.replace(Ba,"").replace(zf,""),e.componentCommentSource=C(e,r);break}case"SlotElement":Kf(e,r);break;case"RenderTag":Xf(e,r);break;case"OnDirective":Yf(e,r,s);break;case"BindDirective":Qf(e,r,s);break}},leave(r){if(Tt(r))e.activeScopes.pop(),oa(n,r)}};if(e.parsed?.instance)J(e.parsed.instance,i);if(e.parsed?.fragment)J(e.parsed.fragment,i);return t}var Rr={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},Mr="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",Zf={5:Mr,"5module":Mr+" export import",6:Mr+" const class extends export import super"},Wa=/^in(stanceof)?$/,eh=/\p{ID_Start}/u,th=/[\p{ID_Continue}\u200c\u200d]/u;function de(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&&t===!1)return!1;return e>=170&&eh.test(String.fromCodePoint(e))}function Be(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&&t===!1)return!1;return e>=170&&th.test(String.fromCodePoint(e))}var D=function(e,t){if(t===void 0)t={};this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};function se(e,t){return new D(e,{beforeExpr:!0,binop:t})}var oe={beforeExpr:!0},X={startsExpr:!0},Fr={};function k(e,t){if(t===void 0)t={};return t.keyword=e,Fr[e]=new D(e,t)}var u={num:new D("num",X),regexp:new D("regexp",X),string:new D("string",X),name:new D("name",X),privateId:new D("privateId",X),eof:new D("eof"),bracketL:new D("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new D("]"),braceL:new D("{",{beforeExpr:!0,startsExpr:!0}),braceR:new D("}"),parenL:new D("(",{beforeExpr:!0,startsExpr:!0}),parenR:new D(")"),comma:new D(",",oe),semi:new D(";",oe),colon:new D(":",oe),dot:new D("."),question:new D("?",oe),questionDot:new D("?."),arrow:new D("=>",oe),template:new D("template"),invalidTemplate:new D("invalidTemplate"),ellipsis:new D("...",oe),backQuote:new D("`",X),dollarBraceL:new D("${",{beforeExpr:!0,startsExpr:!0}),eq:new D("=",{beforeExpr:!0,isAssign:!0}),assign:new D("_=",{beforeExpr:!0,isAssign:!0}),incDec:new D("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new D("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:se("||",1),logicalAND:se("&&",2),bitwiseOR:se("|",3),bitwiseXOR:se("^",4),bitwiseAND:se("&",5),equality:se("==/!=/===/!==",6),relational:se("</>/<=/>=",7),bitShift:se("<</>>/>>>",8),plusMin:new D("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:se("%",10),star:se("*",10),slash:se("/",10),starstar:new D("**",{beforeExpr:!0}),coalesce:se("??",1),_break:k("break"),_case:k("case",oe),_catch:k("catch"),_continue:k("continue"),_debugger:k("debugger"),_default:k("default",oe),_do:k("do",{isLoop:!0,beforeExpr:!0}),_else:k("else",oe),_finally:k("finally"),_for:k("for",{isLoop:!0}),_function:k("function",X),_if:k("if"),_return:k("return",oe),_switch:k("switch"),_throw:k("throw",oe),_try:k("try"),_var:k("var"),_const:k("const"),_while:k("while",{isLoop:!0}),_with:k("with"),_new:k("new",{beforeExpr:!0,startsExpr:!0}),_this:k("this",X),_super:k("super",X),_class:k("class",X),_extends:k("extends",oe),_export:k("export"),_import:k("import",X),_null:k("null",X),_true:k("true",X),_false:k("false",X),_in:k("in",{beforeExpr:!0,binop:7}),_instanceof:k("instanceof",{beforeExpr:!0,binop:7}),_typeof:k("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:k("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:k("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},Y=/\r\n?|\n|\u2028|\u2029/,nh=new RegExp(Y.source,"g");function Ct(e){return e===10||e===13||e===8232||e===8233}function za(e,t,n){if(n===void 0)n=e.length;for(var i=t;i<n;i++){var r=e.charCodeAt(i);if(Ct(r))return i<n-1&&r===13&&e.charCodeAt(i+1)===10?i+2:i+1}return-1}var Ga=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,O=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,ih=Object.prototype,{hasOwnProperty:rh,toString:sh}=ih,Qt=Object.hasOwn||function(e,t){return rh.call(e,t)},Fa=Array.isArray||function(e){return sh.call(e)==="[object Array]"},qa=Object.create(null);function Un(e){return qa[e]||(qa[e]=new RegExp("^(?:"+e.replace(/ /g,"|")+")$"))}function Yn(e){if(e<=65535)return String.fromCharCode(e);return e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320)}var oh=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,Yt=function(e,t){this.line=e,this.column=t};Yt.prototype.offset=function(e){return new Yt(this.line,this.column+e)};var Qn=function(e,t,n){if(this.start=t,this.end=n,e.sourceFile!==null)this.source=e.sourceFile};function Ua(e,t){for(var n=1,i=0;;){var r=za(e,i,t);if(r<0)return new Yt(n,t-i);++n,i=r}}var Br={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},Va=!1;function ah(e){var t={};for(var n in Br)t[n]=e&&Qt(e,n)?e[n]:Br[n];if(t.ecmaVersion==="latest")t.ecmaVersion=1e8;else if(t.ecmaVersion==null){if(!Va&&typeof console==="object"&&console.warn)Va=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
|
|
27
|
+
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(Fa(t.onToken)){var i=t.onToken;t.onToken=function(r){return i.push(r)}}if(Fa(t.onComment))t.onComment=lh(t,t.onComment);if(t.sourceType==="commonjs"&&t.allowAwaitOutsideFunction)throw Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return t}function lh(e,t){return function(n,i,r,s,a,o){var l={type:n?"Block":"Line",value:i,start:r,end:s};if(e.locations)l.loc=new Qn(this,a,o);if(e.ranges)l.range=[r,s];t.push(l)}}var ot=1,at=2,qr=4,Ja=8,Vr=16,Ka=32,Zn=64,Xa=128,lt=256,Zt=512,Ya=1024,ei=ot|at|lt;function Hr(e,t){return at|(e?qr:0)|(t?Ja:0)}var Jn=0,Wr=1,Oe=2,Qa=3,Za=4,el=5,R=function(e,t,n){this.options=e=ah(e),this.sourceFile=e.sourceFile,this.keywords=Un(Zf[e.ecmaVersion>=6?6:e.sourceType==="module"?"5module":5]);var i="";if(e.allowReserved!==!0){if(i=Rr[e.ecmaVersion>=6?6:e.ecmaVersion===5?5:3],e.sourceType==="module")i+=" await"}this.reservedWords=Un(i);var r=(i?i+" ":"")+Rr.strict;if(this.reservedWordsStrict=Un(r),this.reservedWordsStrictBind=Un(r+" "+Rr.strictBind),this.input=String(t),this.containsEsc=!1,this.pos=n||0,this.curLine=1,e.startLocation)this.lineStart=this.pos-e.startLocation.column,this.curLine=e.startLocation.line;else if(n){if(this.lineStart=this.input.lastIndexOf(`
|
|
28
|
+
`,n-1)+1,this.options.locations)this.curLine=this.input.slice(0,this.lineStart).split(Y).length}else this.lineStart=0;if(this.type=u.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=e.sourceType==="module",this.strict=this.inModule||e.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&&e.allowHashBang&&this.input.slice(0,2)==="#!")this.skipLineComment(2);this.scopeStack=[],this.enterScope(this.options.sourceType==="commonjs"?at:ot),this.regexpState=null,this.privateNameStack=[]},ae={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}};R.prototype.parse=function(){var e=this,t=this.options.program||this.startNode();return this.nextToken(),this.catchStackOverflow(function(){return e.parseTopLevel(t)})};ae.inFunction.get=function(){return(this.currentVarScope().flags&at)>0};ae.inGenerator.get=function(){return(this.currentVarScope().flags&Ja)>0};ae.inAsync.get=function(){return(this.currentVarScope().flags&qr)>0};ae.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],n=t.flags;if(n&(lt|Zt))return!1;if(n&at)return(n&qr)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};ae.allowReturn.get=function(){if(this.inFunction)return!0;if(this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&ot)return!0;return!1};ae.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags;return(t&Zn)>0||this.options.allowSuperOutsideMethod};ae.allowDirectSuper.get=function(){return(this.currentThisScope().flags&Xa)>0};ae.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};ae.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],n=t.flags;if(n&(lt|Zt)||n&at&&!(n&Vr))return!0}return!1};ae.allowUsing.get=function(){var e=this.currentScope(),t=e.flags;if(t&Ya)return!1;if(!this.inModule&&t&ot)return!1;return!0};ae.inClassStaticBlock.get=function(){return(this.currentVarScope().flags<)>0};R.extend=function(){var e=[],t=arguments.length;while(t--)e[t]=arguments[t];var n=this;for(var i=0;i<e.length;i++)n=e[i](n);return n};R.parse=function(e,t){return new this(t,e).parse()};R.parseExpressionAt=function(e,t,n){var i=new this(n,e,t);return i.nextToken(),i.parseExpression()};R.tokenizer=function(e,t){return new this(t,e)};Object.defineProperties(R.prototype,ae);var W=R.prototype,ph=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;W.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){O.lastIndex=e,e+=O.exec(this.input)[0].length;var t=ph.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])==="use strict"){O.lastIndex=e+t[0].length;var n=O.exec(this.input),i=n.index+n[0].length,r=this.input.charAt(i);return r===";"||r==="}"||Y.test(n[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(r)||r==="!"&&this.input.charAt(i+1)==="=")}if(e+=t[0].length,O.lastIndex=e,e+=O.exec(this.input)[0].length,this.input[e]===";")e++}};W.eat=function(e){if(this.type===e)return this.next(),!0;else return!1};W.isContextual=function(e){return this.type===u.name&&this.value===e&&!this.containsEsc};W.eatContextual=function(e){if(!this.isContextual(e))return!1;return this.next(),!0};W.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}};W.expectContextual=function(e){if(!this.eatContextual(e))this.unexpected()};W.canInsertSemicolon=function(){return this.type===u.eof||this.type===u.braceR||Y.test(this.input.slice(this.lastTokEnd,this.start))};W.insertSemicolon=function(){if(this.canInsertSemicolon()){if(this.options.onInsertedSemicolon)this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc);return!0}};W.semicolon=function(){if(!this.eat(u.semi)&&!this.insertSemicolon())this.unexpected()};W.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}};W.expect=function(e){this.eat(e)||this.unexpected()};W.unexpected=function(e){this.raise(e!=null?e:this.start,"Unexpected token")};var ti=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};W.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")};W.checkExpressionErrors=function(e,t){if(!e)return!1;var{shorthandAssign:n,doubleProto:i}=e;if(!t)return n>=0||i>=0;if(n>=0)this.raise(n,"Shorthand property assignments are valid only in destructuring patterns");if(i>=0)this.raiseRecoverable(i,"Redefinition of __proto__ property")};W.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")};W.isSimpleAssignTarget=function(e){if(e.type==="ParenthesizedExpression")return this.isSimpleAssignTarget(e.expression);return e.type==="Identifier"||e.type==="MemberExpression"};var x=R.prototype;x.parseTopLevel=function(e){var t=Object.create(null);if(!e.body)e.body=[];while(this.type!==u.eof){var n=this.parseStatement(null,!0,t);e.body.push(n)}if(this.inModule)for(var i=0,r=Object.keys(this.undefinedExports);i<r.length;i+=1){var s=r[i];this.raiseRecoverable(this.undefinedExports[s].start,"Export '"+s+"' 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 zr={kind:"loop"},ch={kind:"switch"};x.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;O.lastIndex=this.pos;var t=O.exec(this.input),n=this.pos+t[0].length,i=this.fullCharCodeAt(n);if(i===91||i===92)return!0;if(e)return!1;if(i===123)return!0;if(de(i)){var r=n;do n+=i<=65535?1:2;while(Be(i=this.fullCharCodeAt(n)));if(i===92)return!0;var s=this.input.slice(r,n);if(!Wa.test(s))return!0}return!1};x.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;O.lastIndex=this.pos;var e=O.exec(this.input),t=this.pos+e[0].length,n;return!Y.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)==="function"&&(t+8===this.input.length||!(Be(n=this.fullCharCodeAt(t+8))||n===92))};x.isUsingKeyword=function(e,t){if(this.options.ecmaVersion<17||!this.isContextual(e?"await":"using"))return!1;O.lastIndex=this.pos;var n=O.exec(this.input),i=this.pos+n[0].length;if(Y.test(this.input.slice(this.pos,i)))return!1;if(e){var r=i+5,s;if(this.input.slice(i,r)!=="using"||r===this.input.length||Be(s=this.fullCharCodeAt(r))||s===92)return!1;O.lastIndex=r;var a=O.exec(this.input);if(i=r+a[0].length,a&&Y.test(this.input.slice(r,i)))return!1}var o=this.fullCharCodeAt(i);if(!de(o)&&o!==92)return!1;var l=i;do i+=o<=65535?1:2;while(Be(o=this.fullCharCodeAt(i)));if(o===92)return!0;var p=this.input.slice(l,i);if(Wa.test(p))return!1;if(t&&!e&&p==="of"){O.lastIndex=i;var c=O.exec(this.input);if(i=i+c[0].length,this.input.charCodeAt(i)!==61||(o=this.input.charCodeAt(i+1))===61||o===62)return!1}return!0};x.isAwaitUsing=function(e){return this.isUsingKeyword(!0,e)};x.isUsing=function(e){return this.isUsingKeyword(!1,e)};x.parseStatement=function(e,t,n){var i=this.type,r=this.startNode(),s;if(this.isLet(e))i=u._var,s="let";switch(i){case u._break:case u._continue:return this.parseBreakContinueStatement(r,i.keyword);case u._debugger:return this.parseDebuggerStatement(r);case u._do:return this.parseDoStatement(r);case u._for:return this.parseForStatement(r);case u._function:if(e&&(this.strict||e!=="if"&&e!=="label")&&this.options.ecmaVersion>=6)this.unexpected();return this.parseFunctionStatement(r,!1,!e);case u._class:if(e)this.unexpected();return this.parseClass(r,!0);case u._if:return this.parseIfStatement(r);case u._return:return this.parseReturnStatement(r);case u._switch:return this.parseSwitchStatement(r);case u._throw:return this.parseThrowStatement(r);case u._try:return this.parseTryStatement(r);case u._const:case u._var:if(s=s||this.value,e&&s!=="var")this.unexpected();return this.parseVarStatement(r,s);case u._while:return this.parseWhileStatement(r);case u._with:return this.parseWithStatement(r);case u.braceL:return this.parseBlock(!0,r);case u.semi:return this.parseEmptyStatement(r);case u._export:case u._import:if(this.options.ecmaVersion>10&&i===u._import){O.lastIndex=this.pos;var a=O.exec(this.input),o=this.pos+a[0].length,l=this.input.charCodeAt(o);if(l===40||l===46)return this.parseExpressionStatement(r,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 i===u._import?this.parseImport(r):this.parseExport(r,n);default:if(this.isAsyncFunction()){if(e)this.unexpected();return this.next(),this.parseFunctionStatement(r,!0,!e)}var p=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(p){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(p==="await using"){if(!this.canAwait)this.raise(this.start,"Await using cannot appear outside of async function");this.next()}return this.next(),this.parseVar(r,!1,p),this.semicolon(),this.finishNode(r,"VariableDeclaration")}var c=this.value,d=this.parseExpression();if(i===u.name&&d.type==="Identifier"&&this.eat(u.colon))return this.parseLabeledStatement(r,c,d,e);else return this.parseExpressionStatement(r,d)}};x.parseBreakContinueStatement=function(e,t){var n=t==="break";if(this.next(),this.eat(u.semi)||this.insertSemicolon())e.label=null;else if(this.type!==u.name)this.unexpected();else e.label=this.parseIdent(),this.semicolon();var i=0;for(;i<this.labels.length;++i){var r=this.labels[i];if(e.label==null||r.name===e.label.name){if(r.kind!=null&&(n||r.kind==="loop"))break;if(e.label&&n)break}}if(i===this.labels.length)this.raise(e.start,"Unsyntactic "+t);return this.finishNode(e,n?"BreakStatement":"ContinueStatement")};x.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")};x.parseDoStatement=function(e){if(this.next(),this.labels.push(zr),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(u._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6)this.eat(u.semi);else this.semicolon();return this.finishNode(e,"DoWhileStatement")};x.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(zr),this.enterScope(0),this.expect(u.parenL),this.type===u.semi){if(t>-1)this.unexpected(t);return this.parseFor(e,null)}var n=this.isLet();if(this.type===u._var||this.type===u._const||n){var i=this.startNode(),r=n?"let":this.value;return this.next(),this.parseVar(i,!0,r),this.finishNode(i,"VariableDeclaration"),this.parseForAfterInit(e,i,t)}var s=this.isContextual("let"),a=!1,o=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(o){var l=this.startNode();if(this.next(),o==="await using"){if(!this.canAwait)this.raise(this.start,"Await using cannot appear outside of async function");this.next()}return this.parseVar(l,!0,o),this.finishNode(l,"VariableDeclaration"),this.parseForAfterInit(e,l,t)}var p=this.containsEsc,c=new ti,d=this.start,f=t>-1?this.parseExprSubscripts(c,"await"):this.parseExpression(!0,c);if(this.type===u._in||(a=this.options.ecmaVersion>=6&&this.isContextual("of"))){if(t>-1){if(this.type===u._in)this.unexpected(t);e.await=!0}else if(a&&this.options.ecmaVersion>=8){if(f.start===d&&!p&&f.type==="Identifier"&&f.name==="async")this.unexpected();else if(this.options.ecmaVersion>=9)e.await=!1}if(s&&a)this.raise(f.start,"The left-hand side of a for-of loop may not start with 'let'.");return this.toAssignable(f,!1,c),this.checkLValPattern(f),this.parseForIn(e,f)}else this.checkExpressionErrors(c,!0);if(t>-1)this.unexpected(t);return this.parseFor(e,f)};x.parseForAfterInit=function(e,t,n){if((this.type===u._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&t.declarations.length===1){if(this.type===u._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)};x.parseFunctionStatement=function(e,t,n){return this.next(),this.parseFunction(e,Xt|(n?0:Or),!1,t)};x.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(u._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")};x.parseReturnStatement=function(e){if(!this.allowReturn)this.raise(this.start,"'return' outside of function");if(this.next(),this.eat(u.semi)||this.insertSemicolon())e.argument=null;else e.argument=this.parseExpression(),this.semicolon();return this.finishNode(e,"ReturnStatement")};x.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(u.braceL),this.labels.push(ch),this.enterScope(Ya);var t;for(var n=!1;this.type!==u.braceR;)if(this.type===u._case||this.type===u._default){var i=this.type===u._case;if(t)this.finishNode(t,"SwitchCase");if(e.cases.push(t=this.startNode()),t.consequent=[],this.next(),i)t.test=this.parseExpression();else{if(n)this.raiseRecoverable(this.lastTokStart,"Multiple default clauses");n=!0,t.test=null}this.expect(u.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")};x.parseThrowStatement=function(e){if(this.next(),Y.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 uh=[];x.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type==="Identifier";return this.enterScope(t?Ka:0),this.checkLValPattern(e,t?Za:Oe),this.expect(u.parenR),e};x.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===u._catch){var t=this.startNode();if(this.next(),this.eat(u.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(u._finally)?this.parseBlock():null,!e.handler&&!e.finalizer)this.raise(e.start,"Missing catch or finally clause");return this.finishNode(e,"TryStatement")};x.parseVarStatement=function(e,t,n){return this.next(),this.parseVar(e,!1,t,n),this.semicolon(),this.finishNode(e,"VariableDeclaration")};x.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(zr),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")};x.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")};x.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")};x.parseLabeledStatement=function(e,t,n,i){for(var r=0,s=this.labels;r<s.length;r+=1){var a=s[r];if(a.name===t)this.raise(n.start,"Label '"+t+"' is already declared")}var o=this.type.isLoop?"loop":this.type===u._switch?"switch":null;for(var l=this.labels.length-1;l>=0;l--){var p=this.labels[l];if(p.statementStart===e.start)p.statementStart=this.start,p.kind=o;else break}return this.labels.push({name:t,kind:o,statementStart:this.start}),e.body=this.parseStatement(i?i.indexOf("label")===-1?i+"label":i:"label"),this.labels.pop(),e.label=n,this.finishNode(e,"LabeledStatement")};x.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")};x.parseBlock=function(e,t,n){if(e===void 0)e=!0;if(t===void 0)t=this.startNode();if(t.body=[],this.expect(u.braceL),e)this.enterScope(0);while(this.type!==u.braceR){var i=this.parseStatement(null);t.body.push(i)}if(n)this.strict=!1;if(this.next(),e)this.exitScope();return this.finishNode(t,"BlockStatement")};x.parseFor=function(e,t){return e.init=t,this.expect(u.semi),e.test=this.type===u.semi?null:this.parseExpression(),this.expect(u.semi),e.update=this.type===u.parenR?null:this.parseExpression(),this.expect(u.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")};x.parseForIn=function(e,t){var n=this.type===u._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(u.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,n?"ForInStatement":"ForOfStatement")};x.parseVar=function(e,t,n,i){e.declarations=[],e.kind=n;for(;;){var r=this.startNode();if(this.parseVarId(r,n),this.eat(u.eq))r.init=this.parseMaybeAssign(t);else if(!i&&n==="const"&&!(this.type===u._in||this.options.ecmaVersion>=6&&this.isContextual("of")))this.unexpected();else if(!i&&(n==="using"||n==="await using")&&this.options.ecmaVersion>=17&&this.type!==u._in&&!this.isContextual("of"))this.raise(this.lastTokEnd,"Missing initializer in "+n+" declaration");else if(!i&&r.id.type!=="Identifier"&&!(t&&(this.type===u._in||this.isContextual("of"))))this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value");else r.init=null;if(e.declarations.push(this.finishNode(r,"VariableDeclarator")),!this.eat(u.comma))break}return e};x.parseVarId=function(e,t){e.id=t==="using"||t==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(e.id,t==="var"?Wr:Oe,!1)};var Xt=1,Or=2,tl=4;x.parseFunction=function(e,t,n,i,r){if(this.initFunction(e),this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!i){if(this.type===u.star&&t&Or)this.unexpected();e.generator=this.eat(u.star)}if(this.options.ecmaVersion>=8)e.async=!!i;if(t&Xt){if(e.id=t&tl&&this.type!==u.name?null:this.parseIdent(),e.id&&!(t&Or))this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?Wr:Oe:Qa)}var s=this.yieldPos,a=this.awaitPos,o=this.awaitIdentPos;if(this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Hr(e.async,e.generator)),!(t&Xt))e.id=this.type===u.name?this.parseIdent():null;return this.parseFunctionParams(e),this.parseFunctionBody(e,n,!1,r),this.yieldPos=s,this.awaitPos=a,this.awaitIdentPos=o,this.finishNode(e,t&Xt?"FunctionDeclaration":"FunctionExpression")};x.parseFunctionParams=function(e){this.expect(u.parenL),e.params=this.parseBindingList(u.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};x.parseClass=function(e,t){this.next();var n=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var i=this.enterClassBody(),r=this.startNode(),s=!1;r.body=[],this.expect(u.braceL);while(this.type!==u.braceR){var a=this.parseClassElement(e.superClass!==null);if(a){if(r.body.push(a),a.type==="MethodDefinition"&&a.kind==="constructor"){if(s)this.raiseRecoverable(a.start,"Duplicate constructor in the same class");s=!0}else if(a.key&&a.key.type==="PrivateIdentifier"&&dh(i,a))this.raiseRecoverable(a.key.start,"Identifier '#"+a.key.name+"' has already been declared")}}return this.strict=n,this.next(),e.body=this.finishNode(r,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")};x.parseClassElement=function(e){if(this.eat(u.semi))return null;var t=this.options.ecmaVersion,n=this.startNode(),i="",r=!1,s=!1,a="method",o=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(u.braceL))return this.parseClassStaticBlock(n),n;if(this.isClassElementNameStart()||this.type===u.star)o=!0;else i="static"}if(n.static=o,!i&&t>=8&&this.eatContextual("async"))if((this.isClassElementNameStart()||this.type===u.star)&&!this.canInsertSemicolon())s=!0;else i="async";if(!i&&(t>=9||!s)&&this.eat(u.star))r=!0;if(!i&&!s&&!r){var l=this.value;if(this.eatContextual("get")||this.eatContextual("set"))if(this.isClassElementNameStart())a=l;else i=l}if(i)n.computed=!1,n.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),n.key.name=i,this.finishNode(n.key,"Identifier");else this.parseClassElementName(n);if(t<13||this.type===u.parenL||a!=="method"||r||s){var p=!n.static&&Kn(n,"constructor"),c=p&&e;if(p&&a!=="method")this.raise(n.key.start,"Constructor can't have get/set modifier");n.kind=p?"constructor":a,this.parseClassMethod(n,r,s,c)}else this.parseClassField(n);return n};x.isClassElementNameStart=function(){return this.type===u.name||this.type===u.privateId||this.type===u.num||this.type===u.string||this.type===u.bracketL||this.type.keyword};x.parseClassElementName=function(e){if(this.type===u.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)};x.parseClassMethod=function(e,t,n,i){var r=e.key;if(e.kind==="constructor"){if(t)this.raise(r.start,"Constructor can't be a generator");if(n)this.raise(r.start,"Constructor can't be an async method")}else if(e.static&&Kn(e,"prototype"))this.raise(r.start,"Classes may not have a static property named prototype");var s=e.value=this.parseMethod(t,n,i);if(e.kind==="get"&&s.params.length!==0)this.raiseRecoverable(s.start,"getter should have no params");if(e.kind==="set"&&s.params.length!==1)this.raiseRecoverable(s.start,"setter should have exactly one param");if(e.kind==="set"&&s.params[0].type==="RestElement")this.raiseRecoverable(s.params[0].start,"Setter cannot use rest params");return this.finishNode(e,"MethodDefinition")};x.parseClassField=function(e){if(Kn(e,"constructor"))this.raise(e.key.start,"Classes can't have a field named 'constructor'");else if(e.static&&Kn(e,"prototype"))this.raise(e.key.start,"Classes can't have a static field named 'prototype'");if(this.eat(u.eq))this.enterScope(Zt|Zn),e.value=this.parseMaybeAssign(),this.exitScope();else e.value=null;return this.semicolon(),this.finishNode(e,"PropertyDefinition")};x.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;this.labels=[],this.enterScope(lt|Zn);while(this.type!==u.braceR){var n=this.parseStatement(null);e.body.push(n)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")};x.parseClassId=function(e,t){if(this.type===u.name){if(e.id=this.parseIdent(),t)this.checkLValSimple(e.id,Oe,!1)}else{if(t===!0)this.unexpected();e.id=null}};x.parseClassSuper=function(e){e.superClass=this.eat(u._extends)?this.parseExprSubscripts(null,!1):null};x.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared};x.exitClassBody=function(){var e=this.privateNameStack.pop(),{declared:t,used:n}=e;if(!this.options.checkPrivateFields)return;var i=this.privateNameStack.length,r=i===0?null:this.privateNameStack[i-1];for(var s=0;s<n.length;++s){var a=n[s];if(!Qt(t,a.name))if(r)r.used.push(a);else this.raiseRecoverable(a.start,"Private field '#"+a.name+"' must be declared in an enclosing class")}};function dh(e,t){var n=t.key.name,i=e[n],r="true";if(t.type==="MethodDefinition"&&(t.kind==="get"||t.kind==="set"))r=(t.static?"s":"i")+t.kind;if(i==="iget"&&r==="iset"||i==="iset"&&r==="iget"||i==="sget"&&r==="sset"||i==="sset"&&r==="sget")return e[n]="true",!1;else if(!i)return e[n]=r,!1;else return!0}function Kn(e,t){var{computed:n,key:i}=e;return!n&&(i.type==="Identifier"&&i.name===t||i.type==="Literal"&&i.value===t)}x.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!==u.string)this.unexpected();if(e.source=this.parseExprAtom(),this.options.ecmaVersion>=16)e.attributes=this.parseWithClause();return this.semicolon(),this.finishNode(e,"ExportAllDeclaration")};x.parseExport=function(e,t){if(this.next(),this.eat(u.star))return this.parseExportAllDeclaration(e,t);if(this.eat(u._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!==u.string)this.unexpected();if(e.source=this.parseExprAtom(),this.options.ecmaVersion>=16)e.attributes=this.parseWithClause()}else{for(var n=0,i=e.specifiers;n<i.length;n+=1){var r=i[n];if(this.checkUnreserved(r.local),this.checkLocalExport(r.local),r.local.type==="Literal")this.raise(r.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")};x.parseExportDeclaration=function(e){return this.parseStatement(null)};x.parseExportDefaultDeclaration=function(){var e;if(this.type===u._function||(e=this.isAsyncFunction())){var t=this.startNode();if(this.next(),e)this.next();return this.parseFunction(t,Xt|tl,!1,e)}else if(this.type===u._class){var n=this.startNode();return this.parseClass(n,"nullableID")}else{var i=this.parseMaybeAssign();return this.semicolon(),i}};x.checkExport=function(e,t,n){if(!e)return;if(typeof t!=="string")t=t.type==="Identifier"?t.name:t.value;if(Qt(e,t))this.raiseRecoverable(n,"Duplicate export '"+t+"'");e[t]=!0};x.checkPatternExport=function(e,t){var n=t.type;if(n==="Identifier")this.checkExport(e,t,t.start);else if(n==="ObjectPattern")for(var i=0,r=t.properties;i<r.length;i+=1){var s=r[i];this.checkPatternExport(e,s)}else if(n==="ArrayPattern")for(var a=0,o=t.elements;a<o.length;a+=1){var l=o[a];if(l)this.checkPatternExport(e,l)}else if(n==="Property")this.checkPatternExport(e,t.value);else if(n==="AssignmentPattern")this.checkPatternExport(e,t.left);else if(n==="RestElement")this.checkPatternExport(e,t.argument)};x.checkVariableExport=function(e,t){if(!e)return;for(var n=0,i=t;n<i.length;n+=1){var r=i[n];this.checkPatternExport(e,r.id)}};x.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()};x.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")};x.parseExportSpecifiers=function(e){var t=[],n=!0;this.expect(u.braceL);while(!this.eat(u.braceR)){if(!n){if(this.expect(u.comma),this.afterTrailingComma(u.braceR))break}else n=!1;t.push(this.parseExportSpecifier(e))}return t};x.parseImport=function(e){if(this.next(),this.type===u.string)e.specifiers=uh,e.source=this.parseExprAtom();else e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===u.string?this.parseExprAtom():this.unexpected();if(this.options.ecmaVersion>=16)e.attributes=this.parseWithClause();return this.semicolon(),this.finishNode(e,"ImportDeclaration")};x.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,Oe),this.finishNode(e,"ImportSpecifier")};x.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,Oe),this.finishNode(e,"ImportDefaultSpecifier")};x.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual("as"),e.local=this.parseIdent(),this.checkLValSimple(e.local,Oe),this.finishNode(e,"ImportNamespaceSpecifier")};x.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===u.name){if(e.push(this.parseImportDefaultSpecifier()),!this.eat(u.comma))return e}if(this.type===u.star)return e.push(this.parseImportNamespaceSpecifier()),e;this.expect(u.braceL);while(!this.eat(u.braceR)){if(!t){if(this.expect(u.comma),this.afterTrailingComma(u.braceR))break}else t=!1;e.push(this.parseImportSpecifier())}return e};x.parseWithClause=function(){var e=[];if(!this.eat(u._with))return e;this.expect(u.braceL);var t={},n=!0;while(!this.eat(u.braceR)){if(!n){if(this.expect(u.comma),this.afterTrailingComma(u.braceR))break}else n=!1;var i=this.parseImportAttribute(),r=i.key.type==="Identifier"?i.key.name:i.key.value;if(Qt(t,r))this.raiseRecoverable(i.key.start,"Duplicate attribute key '"+r+"'");t[r]=!0,e.push(i)}return e};x.parseImportAttribute=function(){var e=this.startNode();if(e.key=this.type===u.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(u.colon),this.type!==u.string)this.unexpected();return e.value=this.parseExprAtom(),this.finishNode(e,"ImportAttribute")};x.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===u.string){var e=this.parseLiteral(this.value);if(oh.test(e.value))this.raise(e.start,"An export name cannot include a lone surrogate.");return e}return this.parseIdent(!0)};x.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)};x.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 le=R.prototype;le.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 i=0,r=e.properties;i<r.length;i+=1){var s=r[i];if(this.toAssignable(s,t),s.type==="RestElement"&&(s.argument.type==="ArrayPattern"||s.argument.type==="ObjectPattern"))this.raise(s.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};le.toAssignableList=function(e,t){var n=e.length;for(var i=0;i<n;i++){var r=e[i];if(r)this.toAssignable(r,t)}if(n){var s=e[n-1];if(this.options.ecmaVersion===6&&t&&s&&s.type==="RestElement"&&s.argument.type!=="Identifier")this.unexpected(s.argument.start)}return e};le.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")};le.parseRestBinding=function(){var e=this.startNode();if(this.next(),this.options.ecmaVersion===6&&this.type!==u.name)this.unexpected();return e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")};le.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case u.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(u.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case u.braceL:return this.parseObj(!0)}return this.parseIdent()};le.parseBindingList=function(e,t,n,i){var r=[],s=!0;while(!this.eat(e)){if(s)s=!1;else this.expect(u.comma);if(t&&this.type===u.comma)r.push(null);else if(n&&this.afterTrailingComma(e))break;else if(this.type===u.ellipsis){var a=this.parseRestBinding();if(this.parseBindingListItem(a),r.push(a),this.type===u.comma)this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");this.expect(e);break}else r.push(this.parseAssignableListItem(i))}return r};le.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t};le.parseBindingListItem=function(e){return e};le.parseMaybeDefault=function(e,t,n){if(n=n||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(u.eq))return n;var i=this.startNodeAt(e,t);return i.left=n,i.right=this.parseMaybeAssign(),this.finishNode(i,"AssignmentPattern")};le.checkLValSimple=function(e,t,n){if(t===void 0)t=Jn;var i=t!==Jn;switch(e.type){case"Identifier":if(this.strict&&this.reservedWordsStrictBind.test(e.name))this.raiseRecoverable(e.start,(i?"Binding ":"Assigning to ")+e.name+" in strict mode");if(i){if(t===Oe&&e.name==="let")this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name");if(n){if(Qt(n,e.name))this.raiseRecoverable(e.start,"Argument name clash");n[e.name]=!0}if(t!==el)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(i)this.raiseRecoverable(e.start,"Binding member expression");break;case"ParenthesizedExpression":if(i)this.raiseRecoverable(e.start,"Binding parenthesized expression");return this.checkLValSimple(e.expression,t,n);default:this.raise(e.start,(i?"Binding":"Assigning to")+" rvalue")}};le.checkLValPattern=function(e,t,n){if(t===void 0)t=Jn;switch(e.type){case"ObjectPattern":for(var i=0,r=e.properties;i<r.length;i+=1){var s=r[i];this.checkLValInnerPattern(s,t,n)}break;case"ArrayPattern":for(var a=0,o=e.elements;a<o.length;a+=1){var l=o[a];if(l)this.checkLValInnerPattern(l,t,n)}break;default:this.checkLValSimple(e,t,n)}};le.checkLValInnerPattern=function(e,t,n){if(t===void 0)t=Jn;switch(e.type){case"Property":this.checkLValInnerPattern(e.value,t,n);break;case"AssignmentPattern":this.checkLValPattern(e.left,t,n);break;case"RestElement":this.checkLValPattern(e.argument,t,n);break;default:this.checkLValPattern(e,t,n)}};var ue=function(e,t,n,i,r){this.token=e,this.isExpr=!!t,this.preserveSpace=!!n,this.override=i,this.generator=!!r},I={b_stat:new ue("{",!1),b_expr:new ue("{",!0),b_tmpl:new ue("${",!1),p_stat:new ue("(",!1),p_expr:new ue("(",!0),q_tmpl:new ue("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new ue("function",!1),f_expr:new ue("function",!0),f_expr_gen:new ue("function",!0,!1,null,!0),f_gen:new ue("function",!1,!1,null,!0)},kt=R.prototype;kt.initialContext=function(){return[I.b_stat]};kt.curContext=function(){return this.context[this.context.length-1]};kt.braceIsBlock=function(e){var t=this.curContext();if(t===I.f_expr||t===I.f_stat)return!0;if(e===u.colon&&(t===I.b_stat||t===I.b_expr))return!t.isExpr;if(e===u._return||e===u.name&&this.exprAllowed)return Y.test(this.input.slice(this.lastTokEnd,this.start));if(e===u._else||e===u.semi||e===u.eof||e===u.parenR||e===u.arrow)return!0;if(e===u.braceL)return t===I.b_stat;if(e===u._var||e===u._const||e===u.name)return!1;return!this.exprAllowed};kt.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if(t.token==="function")return t.generator}return!1};kt.updateContext=function(e){var t,n=this.type;if(n.keyword&&e===u.dot)this.exprAllowed=!1;else if(t=n.updateContext)t.call(this,e);else this.exprAllowed=n.beforeExpr};kt.overrideContext=function(e){if(this.curContext()!==e)this.context[this.context.length-1]=e};u.parenR.updateContext=u.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var e=this.context.pop();if(e===I.b_stat&&this.curContext().token==="function")e=this.context.pop();this.exprAllowed=!e.isExpr};u.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?I.b_stat:I.b_expr),this.exprAllowed=!0};u.dollarBraceL.updateContext=function(){this.context.push(I.b_tmpl),this.exprAllowed=!0};u.parenL.updateContext=function(e){var t=e===u._if||e===u._for||e===u._with||e===u._while;this.context.push(t?I.p_stat:I.p_expr),this.exprAllowed=!0};u.incDec.updateContext=function(){};u._function.updateContext=u._class.updateContext=function(e){if(e.beforeExpr&&e!==u._else&&!(e===u.semi&&this.curContext()!==I.p_stat)&&!(e===u._return&&Y.test(this.input.slice(this.lastTokEnd,this.start)))&&!((e===u.colon||e===u.braceL)&&this.curContext()===I.b_stat))this.context.push(I.f_expr);else this.context.push(I.f_stat);this.exprAllowed=!1};u.colon.updateContext=function(){if(this.curContext().token==="function")this.context.pop();this.exprAllowed=!0};u.backQuote.updateContext=function(){if(this.curContext()===I.q_tmpl)this.context.pop();else this.context.push(I.q_tmpl);this.exprAllowed=!1};u.star.updateContext=function(e){if(e===u._function){var t=this.context.length-1;if(this.context[t]===I.f_expr)this.context[t]=I.f_expr_gen;else this.context[t]=I.f_gen}this.exprAllowed=!0};u.name.updateContext=function(e){var t=!1;if(this.options.ecmaVersion>=6&&e!==u.dot){if(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())t=!0}this.exprAllowed=t};var T=R.prototype;T.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 i=e.key,r;switch(i.type){case"Identifier":r=i.name;break;case"Literal":r=String(i.value);break;default:return}var s=e.kind;if(this.options.ecmaVersion>=6){if(r==="__proto__"&&s==="init"){if(t.proto)if(n){if(n.doubleProto<0)n.doubleProto=i.start}else this.raiseRecoverable(i.start,"Redefinition of __proto__ property");t.proto=!0}return}r="$"+r;var a=t[r];if(a){var o;if(s==="init")o=this.strict&&a.init||a.get||a.set;else o=a.init||a[s];if(o)this.raiseRecoverable(i.start,"Redefinition of property")}else a=t[r]={init:!1,get:!1,set:!1};a[s]=!0};T.parseExpression=function(e,t){var n=this;return this.catchStackOverflow(function(){var{start:i,startLoc:r}=n,s=n.parseMaybeAssign(e,t);if(n.type===u.comma){var a=n.startNodeAt(i,r);a.expressions=[s];while(n.eat(u.comma))a.expressions.push(n.parseMaybeAssign(e,t));return n.finishNode(a,"SequenceExpression")}return s})};T.parseMaybeAssign=function(e,t,n){if(this.isContextual("yield"))if(this.inGenerator)return this.parseYield(e);else this.exprAllowed=!1;var i=!1,r=-1,s=-1,a=-1;if(t)r=t.parenthesizedAssign,s=t.trailingComma,a=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1;else t=new ti,i=!0;var o=this.start,l=this.startLoc;if(this.type===u.parenL||this.type===u.name)this.potentialArrowAt=this.start,this.potentialArrowInForAwait=e==="await";var p=this.parseMaybeConditional(e,t);if(n)p=n.call(this,p,o,l);if(this.type.isAssign){var c=this.startNodeAt(o,l);if(c.operator=this.value,this.type===u.eq)p=this.toAssignable(p,!1,t);if(!i)t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1;if(t.shorthandAssign>=p.start)t.shorthandAssign=-1;if(this.type===u.eq)this.checkLValPattern(p);else this.checkLValSimple(p);if(c.left=p,this.next(),c.right=this.parseMaybeAssign(e),a>-1)t.doubleProto=a;return this.finishNode(c,"AssignmentExpression")}else if(i)this.checkExpressionErrors(t,!0);if(r>-1)t.parenthesizedAssign=r;if(s>-1)t.trailingComma=s;return p};T.parseMaybeConditional=function(e,t){var n=this.start,i=this.startLoc,r=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return r;if(!(r.type==="ArrowFunctionExpression"&&r.start===n)&&this.eat(u.question)){var s=this.startNodeAt(n,i);return s.test=r,s.consequent=this.parseMaybeAssign(),this.expect(u.colon),s.alternate=this.parseMaybeAssign(e),this.finishNode(s,"ConditionalExpression")}return r};T.parseExprOps=function(e,t){var n=this.start,i=this.startLoc,r=this.parseMaybeUnary(t,!1,!1,e);if(this.checkExpressionErrors(t))return r;return r.start===n&&r.type==="ArrowFunctionExpression"?r:this.parseExprOp(r,n,i,-1,e)};T.parseExprOp=function(e,t,n,i,r){var s=this.type.binop;if(s!=null&&(!r||this.type!==u._in)){if(s>i){var a=this.type===u.logicalOR||this.type===u.logicalAND,o=this.type===u.coalesce;if(o)s=u.logicalAND.binop;var l=this.value;this.next();var p=this.start,c=this.startLoc,d=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,r),p,c,s,r),f=this.buildBinary(t,n,e,d,l,a||o);if(a&&this.type===u.coalesce||o&&(this.type===u.logicalOR||this.type===u.logicalAND))this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses");return this.parseExprOp(f,t,n,i,r)}}return e};T.buildBinary=function(e,t,n,i,r,s){if(i.type==="PrivateIdentifier")this.raise(i.start,"Private identifier can only be left side of binary expression");var a=this.startNodeAt(e,t);return a.left=n,a.operator=r,a.right=i,this.finishNode(a,s?"LogicalExpression":"BinaryExpression")};T.parseMaybeUnary=function(e,t,n,i){var r=this.start,s=this.startLoc,a;if(this.isContextual("await")&&this.canAwait)a=this.parseAwait(i),t=!0;else if(this.type.prefix){var o=this.startNode(),l=this.type===u.incDec;if(o.operator=this.value,o.prefix=!0,this.next(),o.argument=this.parseMaybeUnary(null,!0,l,i),this.checkExpressionErrors(e,!0),l)this.checkLValSimple(o.argument);else if(this.strict&&o.operator==="delete"&&nl(o.argument))this.raiseRecoverable(o.start,"Deleting local variable in strict mode");else if(o.operator==="delete"&&jr(o.argument))this.raiseRecoverable(o.start,"Private fields can not be deleted");else t=!0;a=this.finishNode(o,l?"UpdateExpression":"UnaryExpression")}else if(!t&&this.type===u.privateId){if((i||this.privateNameStack.length===0)&&this.options.checkPrivateFields)this.unexpected();if(a=this.parsePrivateIdent(),this.type!==u._in)this.unexpected()}else{if(a=this.parseExprSubscripts(e,i),this.checkExpressionErrors(e))return a;while(this.type.postfix&&!this.canInsertSemicolon()){var p=this.startNodeAt(r,s);p.operator=this.value,p.prefix=!1,p.argument=a,this.checkLValSimple(a),this.next(),a=this.finishNode(p,"UpdateExpression")}}if(!n&&!(a.type==="ArrowFunctionExpression"&&a.start===r)&&this.eat(u.starstar))if(t)this.unexpected(this.lastTokStart);else return this.buildBinary(r,s,a,this.parseMaybeUnary(null,!1,!1,i),"**",!1);else return a};function nl(e){return e.type==="Identifier"||e.type==="ParenthesizedExpression"&&nl(e.expression)}function jr(e){return e.type==="MemberExpression"&&e.property.type==="PrivateIdentifier"||e.type==="ChainExpression"&&jr(e.expression)||e.type==="ParenthesizedExpression"&&jr(e.expression)}T.parseExprSubscripts=function(e,t){var n=this.start,i=this.startLoc,r=this.parseExprAtom(e,t);if(r.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return r;var s=this.parseSubscripts(r,n,i,!1,t);if(e&&s.type==="MemberExpression"){if(e.parenthesizedAssign>=s.start)e.parenthesizedAssign=-1;if(e.parenthesizedBind>=s.start)e.parenthesizedBind=-1;if(e.trailingComma>=s.start)e.trailingComma=-1}return s};T.parseSubscripts=function(e,t,n,i,r){var s=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,a=!1;while(!0){var o=this.parseSubscript(e,t,n,i,s,a,r);if(o.optional)a=!0;if(o===e||o.type==="ArrowFunctionExpression"){if(a){var l=this.startNodeAt(t,n);l.expression=o,o=this.finishNode(l,"ChainExpression")}return o}e=o}};T.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(u.arrow)};T.parseSubscriptAsyncArrow=function(e,t,n,i){return this.parseArrowExpression(this.startNodeAt(e,t),n,!0,i)};T.parseSubscript=function(e,t,n,i,r,s,a){var o=this.options.ecmaVersion>=11,l=o&&this.eat(u.questionDot);if(i&&l)this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var p=this.eat(u.bracketL);if(p||l&&this.type!==u.parenL&&this.type!==u.backQuote||this.eat(u.dot)){var c=this.startNodeAt(t,n);if(c.object=e,p)c.property=this.parseExpression(),this.expect(u.bracketR);else if(this.type===u.privateId&&e.type!=="Super")c.property=this.parsePrivateIdent();else c.property=this.parseIdent(this.options.allowReserved!=="never");if(c.computed=!!p,o)c.optional=l;e=this.finishNode(c,"MemberExpression")}else if(!i&&this.eat(u.parenL)){var d=new ti,f=this.yieldPos,h=this.awaitPos,m=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var y=this.parseExprList(u.parenR,this.options.ecmaVersion>=8,!1,d);if(r&&!l&&this.shouldParseAsyncArrow()){if(this.checkPatternErrors(d,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0)this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function");return this.yieldPos=f,this.awaitPos=h,this.awaitIdentPos=m,this.parseSubscriptAsyncArrow(t,n,y,a)}this.checkExpressionErrors(d,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=h||this.awaitPos,this.awaitIdentPos=m||this.awaitIdentPos;var g=this.startNodeAt(t,n);if(g.callee=e,g.arguments=y,o)g.optional=l;e=this.finishNode(g,"CallExpression")}else if(this.type===u.backQuote){if(l||s)this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var N=this.startNodeAt(t,n);N.tag=e,N.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(N,"TaggedTemplateExpression")}return e};T.parseExprAtom=function(e,t,n){if(this.type===u.slash)this.readRegexp();var i,r=this.potentialArrowAt===this.start;switch(this.type){case u._super:if(!this.allowSuper)this.raise(this.start,"'super' keyword outside a method");if(i=this.startNode(),this.next(),this.type===u.parenL&&!this.allowDirectSuper)this.raise(i.start,"super() call outside constructor of a subclass");if(this.type!==u.dot&&this.type!==u.bracketL&&this.type!==u.parenL)this.unexpected();return this.finishNode(i,"Super");case u._this:return i=this.startNode(),this.next(),this.finishNode(i,"ThisExpression");case u.name:var s=this.start,a=this.startLoc,o=this.containsEsc,l=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!o&&l.name==="async"&&!this.canInsertSemicolon()&&this.eat(u._function))return this.overrideContext(I.f_expr),this.parseFunction(this.startNodeAt(s,a),0,!1,!0,t);if(r&&!this.canInsertSemicolon()){if(this.eat(u.arrow))return this.parseArrowExpression(this.startNodeAt(s,a),[l],!1,t);if(this.options.ecmaVersion>=8&&l.name==="async"&&this.type===u.name&&!o&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc)){if(l=this.parseIdent(!1),this.canInsertSemicolon()||!this.eat(u.arrow))this.unexpected();return this.parseArrowExpression(this.startNodeAt(s,a),[l],!0,t)}}return l;case u.regexp:var p=this.value;return i=this.parseLiteral(p.value),i.regex={pattern:p.pattern,flags:p.flags},i;case u.num:case u.string:return this.parseLiteral(this.value);case u._null:case u._true:case u._false:return i=this.startNode(),i.value=this.type===u._null?null:this.type===u._true,i.raw=this.type.keyword,this.next(),this.finishNode(i,"Literal");case u.parenL:var c=this.start,d=this.parseParenAndDistinguishExpression(r,t);if(e){if(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(d))e.parenthesizedAssign=c;if(e.parenthesizedBind<0)e.parenthesizedBind=c}return d;case u.bracketL:return i=this.startNode(),this.next(),i.elements=this.parseExprList(u.bracketR,!0,!0,e),this.finishNode(i,"ArrayExpression");case u.braceL:return this.overrideContext(I.b_expr),this.parseObj(!1,e);case u._function:return i=this.startNode(),this.next(),this.parseFunction(i,0);case u._class:return this.parseClass(this.startNode(),!1);case u._new:return this.parseNew();case u.backQuote:return this.parseTemplate();case u._import:if(this.options.ecmaVersion>=11)return this.parseExprImport(n);else return this.unexpected();default:return this.parseExprAtomDefault()}};T.parseExprAtomDefault=function(){this.unexpected()};T.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc)this.raiseRecoverable(this.start,"Escape sequence in keyword import");if(this.next(),this.type===u.parenL&&!e)return this.parseDynamicImport(t);else if(this.type===u.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()};T.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)if(!this.eat(u.parenR))if(this.expect(u.comma),!this.afterTrailingComma(u.parenR)){if(e.options=this.parseMaybeAssign(),!this.eat(u.parenR)){if(this.expect(u.comma),!this.afterTrailingComma(u.parenR))this.unexpected()}}else e.options=null;else e.options=null;else if(!this.eat(u.parenR)){var t=this.start;if(this.eat(u.comma)&&this.eat(u.parenR))this.raiseRecoverable(t,"Trailing comma is not allowed in import()");else this.unexpected(t)}return this.finishNode(e,"ImportExpression")};T.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")};T.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")};T.parseParenExpression=function(){this.expect(u.parenL);var e=this.parseExpression();return this.expect(u.parenR),e};T.shouldParseArrow=function(e){return!this.canInsertSemicolon()};T.parseParenAndDistinguishExpression=function(e,t){var n=this.start,i=this.startLoc,r,s=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var a=this.start,o=this.startLoc,l=[],p=!0,c=!1,d=new ti,f=this.yieldPos,h=this.awaitPos,m;this.yieldPos=0,this.awaitPos=0;while(this.type!==u.parenR)if(p?p=!1:this.expect(u.comma),s&&this.afterTrailingComma(u.parenR,!0)){c=!0;break}else if(this.type===u.ellipsis){if(m=this.start,l.push(this.parseParenItem(this.parseRestBinding())),this.type===u.comma)this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else l.push(this.parseMaybeAssign(!1,d,this.parseParenItem));var y=this.lastTokEnd,g=this.lastTokEndLoc;if(this.expect(u.parenR),e&&this.shouldParseArrow(l)&&this.eat(u.arrow))return this.checkPatternErrors(d,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=f,this.awaitPos=h,this.parseParenArrowList(n,i,l,t);if(!l.length||c)this.unexpected(this.lastTokStart);if(m)this.unexpected(m);if(this.checkExpressionErrors(d,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=h||this.awaitPos,l.length>1)r=this.startNodeAt(a,o),r.expressions=l,this.finishNodeAt(r,"SequenceExpression",y,g);else r=l[0]}else r=this.parseParenExpression();if(this.options.preserveParens){var N=this.startNodeAt(n,i);return N.expression=r,this.finishNode(N,"ParenthesizedExpression")}else return r};T.parseParenItem=function(e){return e};T.parseParenArrowList=function(e,t,n,i){return this.parseArrowExpression(this.startNodeAt(e,t),n,!1,i)};var fh=[];T.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===u.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 i=this.start,r=this.startLoc;if(e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),i,r,!0,!1),e.callee.type==="Super")this.raiseRecoverable(i,"Invalid use of 'super'");if(this.eat(u.parenL))e.arguments=this.parseExprList(u.parenR,this.options.ecmaVersion>=8,!1);else e.arguments=fh;return this.finishNode(e,"NewExpression")};T.parseTemplateElement=function(e){var t=e.isTagged,n=this.startNode();if(this.type===u.invalidTemplate){if(!t)this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal");n.value={raw:this.value.replace(/\r\n?/g,`
|
|
28
29
|
`),cooked:null}}else n.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
|
|
29
|
-
`),cooked:this.value};return this.next(),n.tail=this.type===u.backQuote,this.finishNode(n,"TemplateElement")};E.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===u.eof)this.raise(this.pos,"Unterminated template literal");this.expect(u.dollarBraceL),n.expressions.push(this.parseExpression()),this.expect(u.braceR),n.quasis.push(r=this.parseTemplateElement({isTagged:t}))}return this.next(),this.finishNode(n,"TemplateLiteral")};E.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===u.name||this.type===u.num||this.type===u.string||this.type===u.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===u.star)&&!J.test(this.input.slice(this.lastTokEnd,this.start))};E.parseObj=function(e,t){var n=this.startNode(),r=!0,i={};n.properties=[],this.next();while(!this.eat(u.braceR)){if(!r){if(this.expect(u.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(u.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")};E.parseProperty=function(e,t){var n=this.startNode(),r,i,o,a;if(this.options.ecmaVersion>=9&&this.eat(u.ellipsis)){if(e){if(n.argument=this.parseIdent(!1),this.type===u.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===u.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,a=this.startLoc;if(!e)r=this.eat(u.star)}var s=this.containsEsc;if(this.parsePropertyName(n),!e&&!s&&this.options.ecmaVersion>=8&&!r&&this.isAsyncProp(n))i=!0,r=this.options.ecmaVersion>=9&&this.eat(u.star),this.parsePropertyName(n);else i=!1;return this.parsePropertyValue(n,e,r,i,o,a,t,s),this.finishNode(n,"Property")};E.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")};E.parsePropertyValue=function(e,t,n,r,i,o,a,s){if((n||r)&&this.type===u.colon)this.unexpected();if(this.eat(u.colon))e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,a),e.kind="init";else if(this.options.ecmaVersion>=6&&this.type===u.parenL){if(t)this.unexpected();e.method=!0,e.value=this.parseMethod(n,r),e.kind="init"}else if(!t&&!s&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&(this.type!==u.comma&&this.type!==u.braceR&&this.type!==u.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===u.eq&&a){if(a.shorthandAssign<0)a.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()};E.parsePropertyName=function(e){if(this.options.ecmaVersion>=6)if(this.eat(u.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(u.bracketR),e.key;else e.computed=!1;return e.key=this.type===u.num||this.type===u.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};E.initFunction=function(e){if(e.id=null,this.options.ecmaVersion>=6)e.generator=e.expression=!1;if(this.options.ecmaVersion>=8)e.async=!1};E.parseMethod=function(e,t,n){var r=this.startNode(),i=this.yieldPos,o=this.awaitPos,a=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(pi(t,r.generator)|An|(n?ma:0)),this.expect(u.parenL),r.params=this.parseBindingList(u.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(r,!1,!0,!1),this.yieldPos=i,this.awaitPos=o,this.awaitIdentPos=a,this.finishNode(r,"FunctionExpression")};E.parseArrowExpression=function(e,t,n,r){var i=this.yieldPos,o=this.awaitPos,a=this.awaitIdentPos;if(this.enterScope(pi(n,!1)|ai),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=a,this.finishNode(e,"ArrowFunctionExpression")};E.parseFunctionBody=function(e,t,n,r){var i=t&&this.type!==u.braceL,o=this.strict,a=!1;if(i)e.body=this.parseMaybeAssign(r),e.expression=!0,this.checkParams(e,!1);else{var s=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);if(!o||s){if(a=this.strictDirective(this.end),a&&s)this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list")}var p=this.labels;if(this.labels=[],a)this.strict=!0;if(this.checkParams(e,!o&&!a&&!t&&!n&&this.isSimpleParamList(e.params)),this.strict&&e.id)this.checkLValSimple(e.id,xa);e.body=this.parseBlock(!1,void 0,a&&!o),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=p}this.exitScope()};E.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};E.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,li,t?null:n)}};E.parseExprList=function(e,t,n,r){var i=[],o=!0;while(!this.eat(e)){if(!o){if(this.expect(u.comma),t&&this.afterTrailingComma(e))break}else o=!1;var a=void 0;if(n&&this.type===u.comma)a=null;else if(this.type===u.ellipsis){if(a=this.parseSpread(r),r&&this.type===u.comma&&r.trailingComma<0)r.trailingComma=this.start}else a=this.parseMaybeAssign(!1,r);i.push(a)}return i};E.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&Dn)&&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")}};E.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};E.parseIdentNode=function(){var e=this.startNode();if(this.type===u.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=u.name}else this.unexpected();return e};E.parsePrivateIdent=function(){var e=this.startNode();if(this.type===u.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};E.parseYield=function(e){if(!this.yieldPos)this.yieldPos=this.start;var t=this.startNode();if(this.next(),this.type===u.semi||this.canInsertSemicolon()||this.type!==u.star&&!this.type.startsExpr)t.delegate=!1,t.argument=null;else t.delegate=this.eat(u.star),t.argument=this.parseMaybeAssign(e);return this.finishNode(t,"YieldExpression")};E.parseAwait=function(e){if(!this.awaitPos)this.awaitPos=this.start;var t=this.startNode();return this.next(),t.argument=this.parseMaybeUnary(null,!0,!1,e),this.finishNode(t,"AwaitExpression")};var Cn=j.prototype;Cn.raise=function(e,t){var n=da(this.input,e);if(t+=" ("+n.line+":"+n.column+")",this.sourceFile)t+=" in "+this.sourceFile;var r=SyntaxError(t);throw r.pos=e,r.loc=n,r.raisedAt=this.pos,r};Cn.raiseRecoverable=Cn.raise;Cn.curPosition=function(){if(this.options.locations)return new Lt(this.curLine,this.pos-this.lineStart)};var _e=j.prototype,Qd=function(e){this.flags=e,this.var=[],this.lexical=[],this.functions=[]};_e.enterScope=function(e){this.scopeStack.push(new Qd(e))};_e.exitScope=function(){this.scopeStack.pop()};_e.treatFunctionsAsVarInScope=function(e){return e.flags&Ve||!this.inModule&&e.flags&Fe};_e.declareName=function(e,t,n){var r=!1;if(t===ke){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&Fe)delete this.undefinedExports[e]}else if(t===ba){var o=this.currentScope();o.lexical.push(e)}else if(t===ya){var a=this.currentScope();if(this.treatFunctionsAsVar)r=a.lexical.indexOf(e)>-1;else r=a.lexical.indexOf(e)>-1||a.var.indexOf(e)>-1;a.functions.push(e)}else for(var s=this.scopeStack.length-1;s>=0;--s){var p=this.scopeStack[s];if(p.lexical.indexOf(e)>-1&&!(p.flags&ha&&p.lexical[0]===e)||!this.treatFunctionsAsVarInScope(p)&&p.functions.indexOf(e)>-1){r=!0;break}if(p.var.push(e),this.inModule&&p.flags&Fe)delete this.undefinedExports[e];if(p.flags&Dn)break}if(r)this.raiseRecoverable(n,"Identifier '"+e+"' has already been declared")};_e.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};_e.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};_e.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(Dn|It|He))return t}};_e.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(Dn|It|He)&&!(t.flags&ai))return t}};var $n=function(e,t,n){if(this.type="",this.start=t,this.end=0,e.options.locations)this.loc=new Pn(e,n);if(e.options.directSourceFile)this.sourceFile=e.options.directSourceFile;if(e.options.ranges)this.range=[t,0]},Rt=j.prototype;Rt.startNode=function(){return new $n(this,this.start,this.startLoc)};Rt.startNodeAt=function(e,t){return new $n(this,e,t)};function Ta(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}Rt.finishNode=function(e,t){return Ta.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)};Rt.finishNodeAt=function(e,t,n,r){return Ta.call(this,e,t,n,r)};Rt.copyNode=function(e){var t=new $n(this,e.start,this.startLoc);for(var n in e)t[n]=e[n];return t};var Sa=function(){};Sa.prototype.reset=function(){};j.prototype.validateRegExpFlags=function(){};j.prototype.validateRegExpPattern=function(){};var ui=function(e){if(this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations)this.loc=new Pn(e,e.startLoc,e.endLoc);if(e.options.ranges)this.range=[e.start,e.end]},k=j.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 ui(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 ui(this)};if(typeof Symbol<"u")k[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===u.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(u.eof);if(e.override)return e.override(this);else this.readToken(this.fullCharCodeAtPos())};k.readToken=function(e){if(ce(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=ca(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&&!nt(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&&ua.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(u.ellipsis);else return++this.pos,this.finishToken(u.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(u.assign,2);return this.finishOp(u.slash,1)};k.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,r=e===42?u.star:u.modulo;if(this.options.ecmaVersion>=7&&e===42&&t===42)++n,r=u.starstar,t=this.input.charCodeAt(this.pos+2);if(t===61)return this.finishOp(u.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(u.assign,3)}return this.finishOp(e===124?u.logicalOR:u.logicalAND,2)}if(t===61)return this.finishOp(u.assign,2);return this.finishOp(e===124?u.bitwiseOR:u.bitwiseAND,1)};k.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);if(e===61)return this.finishOp(u.assign,2);return this.finishOp(u.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||J.test(this.input.slice(this.lastTokEnd,this.pos))))return this.skipLineComment(3),this.skipSpace(),this.nextToken();return this.finishOp(u.incDec,2)}if(t===61)return this.finishOp(u.assign,2);return this.finishOp(u.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(u.assign,n+1);return this.finishOp(u.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(u.relational,n)};k.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===61)return this.finishOp(u.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(u.arrow);return this.finishOp(e===61?u.eq:u.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(u.questionDot,2)}if(t===63){if(e>=12){var r=this.input.charCodeAt(this.pos+2);if(r===61)return this.finishOp(u.assign,3)}return this.finishOp(u.coalesce,2)}}return this.finishOp(u.question,1)};k.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13){if(++this.pos,t=this.fullCharCodeAtPos(),ce(t,!0)||t===92)return this.finishToken(u.privateId,this.readWord1())}this.raise(this.pos,"Unexpected character '"+wn(t)+"'")};k.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(u.parenL);case 41:return++this.pos,this.finishToken(u.parenR);case 59:return++this.pos,this.finishToken(u.semi);case 44:return++this.pos,this.finishToken(u.comma);case 91:return++this.pos,this.finishToken(u.bracketL);case 93:return++this.pos,this.finishToken(u.bracketR);case 123:return++this.pos,this.finishToken(u.braceL);case 125:return++this.pos,this.finishToken(u.braceR);case 58:return++this.pos,this.finishToken(u.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(u.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(u.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+wn(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(J.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,a=this.readWord1();if(this.containsEsc)this.unexpected(o);var s=this.regexpState||(this.regexpState=new Sa(this));s.reset(n,i,a),this.validateRegExpFlags(s),this.validateRegExpPattern(s);var p=null;try{p=new RegExp(i,a)}catch(l){}return this.finishToken(u.regexp,{pattern:i,flags:a,value:p})};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,a=0,s=0;for(var p=0,l=t==null?1/0:t;p<l;++p,++this.pos){var c=this.input.charCodeAt(this.pos),d=void 0;if(r&&c===95){if(i)this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals");if(s===95)this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore");if(p===0)this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits");s=c;continue}if(c>=97)d=c-97+10;else if(c>=65)d=c-65+10;else if(c>=48&&c<=57)d=c-48;else d=1/0;if(d>=e)break;s=c,a=a*e+d}if(r&&s===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 a};function Zd(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,""))}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=ka(this.input.slice(t,this.pos)),++this.pos;else if(ce(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");return this.finishToken(u.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=ka(this.input.slice(t,this.pos));if(++this.pos,ce(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");return this.finishToken(u.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(ce(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");var o=Zd(this.input.slice(t,this.pos),n);return this.finishToken(u.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(nt(r))this.raise(this.start,"Unterminated string constant");++this.pos}}return t+=this.input.slice(n,this.pos++),this.finishToken(u.string,t)};var Ca={};k.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===Ca)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1};k.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw Ca;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===u.template||this.type===u.invalidTemplate))if(n===36)return this.pos+=2,this.finishToken(u.dollarBraceL);else return++this.pos,this.finishToken(u.backQuote);return e+=this.input.slice(t,this.pos),this.finishToken(u.template,e)}if(n===92)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(nt(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}};
|
|
30
|
+
`),cooked:this.value};return this.next(),n.tail=this.type===u.backQuote,this.finishNode(n,"TemplateElement")};T.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 i=this.parseTemplateElement({isTagged:t});n.quasis=[i];while(!i.tail){if(this.type===u.eof)this.raise(this.pos,"Unterminated template literal");this.expect(u.dollarBraceL),n.expressions.push(this.parseExpression()),this.expect(u.braceR),n.quasis.push(i=this.parseTemplateElement({isTagged:t}))}return this.next(),this.finishNode(n,"TemplateLiteral")};T.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===u.name||this.type===u.num||this.type===u.string||this.type===u.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===u.star)&&!Y.test(this.input.slice(this.lastTokEnd,this.start))};T.parseObj=function(e,t){var n=this.startNode(),i=!0,r={};n.properties=[],this.next();while(!this.eat(u.braceR)){if(!i){if(this.expect(u.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(u.braceR))break}else i=!1;var s=this.parseProperty(e,t);if(!e)this.checkPropClash(s,r,t);n.properties.push(s)}return this.finishNode(n,e?"ObjectPattern":"ObjectExpression")};T.parseProperty=function(e,t){var n=this.startNode(),i,r,s,a;if(this.options.ecmaVersion>=9&&this.eat(u.ellipsis)){if(e){if(n.argument=this.parseIdent(!1),this.type===u.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===u.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)s=this.start,a=this.startLoc;if(!e)i=this.eat(u.star)}var o=this.containsEsc;if(this.parsePropertyName(n),!e&&!o&&this.options.ecmaVersion>=8&&!i&&this.isAsyncProp(n))r=!0,i=this.options.ecmaVersion>=9&&this.eat(u.star),this.parsePropertyName(n);else r=!1;return this.parsePropertyValue(n,e,i,r,s,a,t,o),this.finishNode(n,"Property")};T.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 i=e.value.start;if(e.kind==="get")this.raiseRecoverable(i,"getter should have no params");else this.raiseRecoverable(i,"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")};T.parsePropertyValue=function(e,t,n,i,r,s,a,o){if((n||i)&&this.type===u.colon)this.unexpected();if(this.eat(u.colon))e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,a),e.kind="init";else if(this.options.ecmaVersion>=6&&this.type===u.parenL){if(t)this.unexpected();e.method=!0,e.value=this.parseMethod(n,i),e.kind="init"}else if(!t&&!o&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&(this.type!==u.comma&&this.type!==u.braceR&&this.type!==u.eq)){if(n||i)this.unexpected();this.parseGetterSetter(e)}else if(this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"){if(n||i)this.unexpected();if(this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos)this.awaitIdentPos=r;if(t)e.value=this.parseMaybeDefault(r,s,this.copyNode(e.key));else if(this.type===u.eq&&a){if(a.shorthandAssign<0)a.shorthandAssign=this.start;e.value=this.parseMaybeDefault(r,s,this.copyNode(e.key))}else e.value=this.copyNode(e.key);e.kind="init",e.shorthand=!0}else this.unexpected()};T.parsePropertyName=function(e){if(this.options.ecmaVersion>=6)if(this.eat(u.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(u.bracketR),e.key;else e.computed=!1;return e.key=this.type===u.num||this.type===u.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};T.initFunction=function(e){if(e.id=null,this.options.ecmaVersion>=6)e.generator=e.expression=!1;if(this.options.ecmaVersion>=8)e.async=!1};T.parseMethod=function(e,t,n){var i=this.startNode(),r=this.yieldPos,s=this.awaitPos,a=this.awaitIdentPos;if(this.initFunction(i),this.options.ecmaVersion>=6)i.generator=e;if(this.options.ecmaVersion>=8)i.async=!!t;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Hr(t,i.generator)|Zn|(n?Xa:0)),this.expect(u.parenL),i.params=this.parseBindingList(u.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(i,!1,!0,!1),this.yieldPos=r,this.awaitPos=s,this.awaitIdentPos=a,this.finishNode(i,"FunctionExpression")};T.parseArrowExpression=function(e,t,n,i){var r=this.yieldPos,s=this.awaitPos,a=this.awaitIdentPos;if(this.enterScope(Hr(n,!1)|Vr),this.initFunction(e),this.options.ecmaVersion>=8)e.async=!!n;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,i),this.yieldPos=r,this.awaitPos=s,this.awaitIdentPos=a,this.finishNode(e,"ArrowFunctionExpression")};T.parseFunctionBody=function(e,t,n,i){var r=t&&this.type!==u.braceL,s=this.strict,a=!1;if(r)e.body=this.parseMaybeAssign(i),e.expression=!0,this.checkParams(e,!1);else{var o=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);if(!s||o){if(a=this.strictDirective(this.end),a&&o)this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list")}var l=this.labels;if(this.labels=[],a)this.strict=!0;if(this.checkParams(e,!s&&!a&&!t&&!n&&this.isSimpleParamList(e.params)),this.strict&&e.id)this.checkLValSimple(e.id,el);e.body=this.parseBlock(!1,void 0,a&&!s),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=l}this.exitScope()};T.isSimpleParamList=function(e){for(var t=0,n=e;t<n.length;t+=1){var i=n[t];if(i.type!=="Identifier")return!1}return!0};T.checkParams=function(e,t){var n=Object.create(null);for(var i=0,r=e.params;i<r.length;i+=1){var s=r[i];this.checkLValInnerPattern(s,Wr,t?null:n)}};T.parseExprList=function(e,t,n,i){var r=[],s=!0;while(!this.eat(e)){if(!s){if(this.expect(u.comma),t&&this.afterTrailingComma(e))break}else s=!1;var a=void 0;if(n&&this.type===u.comma)a=null;else if(this.type===u.ellipsis){if(a=this.parseSpread(i),i&&this.type===u.comma&&i.trailingComma<0)i.trailingComma=this.start}else a=this.parseMaybeAssign(!1,i);r.push(a)}return r};T.checkUnreserved=function(e){var{start:t,end:n,name:i}=e;if(this.inGenerator&&i==="yield")this.raiseRecoverable(t,"Cannot use 'yield' as identifier inside a generator");if(this.inAsync&&i==="await")this.raiseRecoverable(t,"Cannot use 'await' as identifier inside an async function");if(!(this.currentThisScope().flags&ei)&&i==="arguments")this.raiseRecoverable(t,"Cannot use 'arguments' in class field initializer");if(this.inClassStaticBlock&&(i==="arguments"||i==="await"))this.raise(t,"Cannot use "+i+" in class static initialization block");if(this.keywords.test(i))this.raise(t,"Unexpected keyword '"+i+"'");if(this.options.ecmaVersion<6&&this.input.slice(t,n).indexOf("\\")!==-1)return;var r=this.strict?this.reservedWordsStrict:this.reservedWords;if(r.test(i)){if(!this.inAsync&&i==="await")this.raiseRecoverable(t,"Cannot use keyword 'await' outside an async function");this.raiseRecoverable(t,"The keyword '"+i+"' is reserved")}};T.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};T.parseIdentNode=function(){var e=this.startNode();if(this.type===u.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=u.name}else this.unexpected();return e};T.parsePrivateIdent=function(){var e=this.startNode();if(this.type===u.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};T.parseYield=function(e){if(!this.yieldPos)this.yieldPos=this.start;var t=this.startNode();if(this.next(),this.type===u.semi||this.canInsertSemicolon()||this.type!==u.star&&!this.type.startsExpr)t.delegate=!1,t.argument=null;else t.delegate=this.eat(u.star),t.argument=this.parseMaybeAssign(e);return this.finishNode(t,"YieldExpression")};T.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 Xn=R.prototype;Xn.raise=function(e,t){var n=Ua(this.input,e);if(t+=" ("+n.line+":"+n.column+")",this.sourceFile)t+=" in "+this.sourceFile;var i=SyntaxError(t);throw i.pos=e,i.loc=n,i.raisedAt=this.pos,i};Xn.raiseRecoverable=Xn.raise;Xn.curPosition=function(){if(this.options.locations)return new Yt(this.curLine,this.pos-this.lineStart)};var Je=R.prototype,hh=function(e){this.flags=e,this.var=[],this.lexical=[],this.functions=[]};Je.enterScope=function(e){this.scopeStack.push(new hh(e))};Je.exitScope=function(){this.scopeStack.pop()};Je.treatFunctionsAsVarInScope=function(e){return e.flags&at||!this.inModule&&e.flags&ot};Je.declareName=function(e,t,n){var i=!1;if(t===Oe){var r=this.currentScope();if(i=r.lexical.indexOf(e)>-1||r.functions.indexOf(e)>-1||r.var.indexOf(e)>-1,r.lexical.push(e),this.inModule&&r.flags&ot)delete this.undefinedExports[e]}else if(t===Za){var s=this.currentScope();s.lexical.push(e)}else if(t===Qa){var a=this.currentScope();if(this.treatFunctionsAsVar)i=a.lexical.indexOf(e)>-1;else i=a.lexical.indexOf(e)>-1||a.var.indexOf(e)>-1;a.functions.push(e)}else for(var o=this.scopeStack.length-1;o>=0;--o){var l=this.scopeStack[o];if(l.lexical.indexOf(e)>-1&&!(l.flags&Ka&&l.lexical[0]===e)||!this.treatFunctionsAsVarInScope(l)&&l.functions.indexOf(e)>-1){i=!0;break}if(l.var.push(e),this.inModule&&l.flags&ot)delete this.undefinedExports[e];if(l.flags&ei)break}if(i)this.raiseRecoverable(n,"Identifier '"+e+"' has already been declared")};Je.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};Je.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};Je.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(ei|Zt|lt))return t}};Je.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(ei|Zt|lt)&&!(t.flags&Vr))return t}};var ni=function(e,t,n){if(this.type="",this.start=t,this.end=0,e.options.locations)this.loc=new Qn(e,n);if(e.options.directSourceFile)this.sourceFile=e.options.directSourceFile;if(e.options.ranges)this.range=[t,0]},en=R.prototype;en.startNode=function(){return new ni(this,this.start,this.startLoc)};en.startNodeAt=function(e,t){return new ni(this,e,t)};function il(e,t,n,i){if(e.type=t,e.end=n,this.options.locations)e.loc.end=i;if(this.options.ranges)e.range[1]=n;return e}en.finishNode=function(e,t){return il.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)};en.finishNodeAt=function(e,t,n,i){return il.call(this,e,t,n,i)};en.copyNode=function(e){var t=new ni(this,e.start,this.startLoc);for(var n in e)t[n]=e[n];return t};var rl=function(){};rl.prototype.reset=function(){};R.prototype.validateRegExpFlags=function(){};R.prototype.validateRegExpPattern=function(){};var Gr=function(e){if(this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations)this.loc=new Qn(e,e.startLoc,e.endLoc);if(e.options.ranges)this.range=[e.start,e.end]},E=R.prototype;E.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 Gr(this));this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()};E.getToken=function(){return this.next(),new Gr(this)};if(typeof Symbol<"u")E[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===u.eof,value:t}}}};E.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(u.eof);if(e.override)return e.override(this);else this.readToken(this.fullCharCodeAtPos())};E.readToken=function(e){if(de(e,this.options.ecmaVersion>=6)||e===92)return this.readWord();return this.getTokenFromCode(e)};E.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};E.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)};E.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 i=void 0,r=t;(i=za(this.input,r,this.pos))>-1;)++this.curLine,r=this.lineStart=i;if(this.options.onComment)this.options.onComment(!0,this.input.slice(t+2,n),t,this.pos,e,this.curPosition())};E.skipLineComment=function(e){var t=this.pos,n=this.options.onComment&&this.curPosition(),i=this.input.charCodeAt(this.pos+=e);while(this.pos<this.input.length&&!Ct(i))i=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())};E.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&&Ga.test(String.fromCharCode(e)))++this.pos;else break e}}};E.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)};E.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(u.ellipsis);else return++this.pos,this.finishToken(u.dot)};E.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(u.assign,2);return this.finishOp(u.slash,1)};E.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,i=e===42?u.star:u.modulo;if(this.options.ecmaVersion>=7&&e===42&&t===42)++n,i=u.starstar,t=this.input.charCodeAt(this.pos+2);if(t===61)return this.finishOp(u.assign,n+1);return this.finishOp(i,n)};E.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(u.assign,3)}return this.finishOp(e===124?u.logicalOR:u.logicalAND,2)}if(t===61)return this.finishOp(u.assign,2);return this.finishOp(e===124?u.bitwiseOR:u.bitwiseAND,1)};E.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);if(e===61)return this.finishOp(u.assign,2);return this.finishOp(u.bitwiseXOR,1)};E.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||Y.test(this.input.slice(this.lastTokEnd,this.pos))))return this.skipLineComment(3),this.skipSpace(),this.nextToken();return this.finishOp(u.incDec,2)}if(t===61)return this.finishOp(u.assign,2);return this.finishOp(u.plusMin,1)};E.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(u.assign,n+1);return this.finishOp(u.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(u.relational,n)};E.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===61)return this.finishOp(u.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(u.arrow);return this.finishOp(e===61?u.eq:u.prefix,1)};E.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(u.questionDot,2)}if(t===63){if(e>=12){var i=this.input.charCodeAt(this.pos+2);if(i===61)return this.finishOp(u.assign,3)}return this.finishOp(u.coalesce,2)}}return this.finishOp(u.question,1)};E.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13){if(++this.pos,t=this.fullCharCodeAtPos(),de(t,!0)||t===92)return this.finishToken(u.privateId,this.readWord1())}this.raise(this.pos,"Unexpected character '"+Yn(t)+"'")};E.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(u.parenL);case 41:return++this.pos,this.finishToken(u.parenR);case 59:return++this.pos,this.finishToken(u.semi);case 44:return++this.pos,this.finishToken(u.comma);case 91:return++this.pos,this.finishToken(u.bracketL);case 93:return++this.pos,this.finishToken(u.bracketR);case 123:return++this.pos,this.finishToken(u.braceL);case 125:return++this.pos,this.finishToken(u.braceR);case 58:return++this.pos,this.finishToken(u.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(u.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(u.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+Yn(e)+"'")};E.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)};E.readRegexp=function(){var e,t,n=this.pos;for(;;){if(this.pos>=this.input.length)this.raise(n,"Unterminated regular expression");var i=this.input.charAt(this.pos);if(Y.test(i))this.raise(n,"Unterminated regular expression");if(!e){if(i==="[")t=!0;else if(i==="]"&&t)t=!1;else if(i==="/"&&!t)break;e=i==="\\"}else e=!1;++this.pos}var r=this.input.slice(n,this.pos);++this.pos;var s=this.pos,a=this.readWord1();if(this.containsEsc)this.unexpected(s);var o=this.regexpState||(this.regexpState=new rl(this));o.reset(n,r,a),this.validateRegExpFlags(o),this.validateRegExpPattern(o);var l=null;try{l=new RegExp(r,a)}catch(p){}return this.finishToken(u.regexp,{pattern:r,flags:a,value:l})};E.readInt=function(e,t,n){var i=this.options.ecmaVersion>=12&&t===void 0,r=n&&this.input.charCodeAt(this.pos)===48,s=this.pos,a=0,o=0;for(var l=0,p=t==null?1/0:t;l<p;++l,++this.pos){var c=this.input.charCodeAt(this.pos),d=void 0;if(i&&c===95){if(r)this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals");if(o===95)this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore");if(l===0)this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits");o=c;continue}if(c>=97)d=c-97+10;else if(c>=65)d=c-65+10;else if(c>=48&&c<=57)d=c-48;else d=1/0;if(d>=e)break;o=c,a=a*e+d}if(i&&o===95)this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits");if(this.pos===s||t!=null&&this.pos-s!==t)return null;return a};function mh(e,t){if(t)return parseInt(e,8);return parseFloat(e.replace(/_/g,""))}function sl(e){if(typeof BigInt!=="function")return null;return BigInt(e.replace(/_/g,""))}E.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=sl(this.input.slice(t,this.pos)),++this.pos;else if(de(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");return this.finishToken(u.num,n)};E.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 i=this.input.charCodeAt(this.pos);if(!n&&!e&&this.options.ecmaVersion>=11&&i===110){var r=sl(this.input.slice(t,this.pos));if(++this.pos,de(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");return this.finishToken(u.num,r)}if(n&&/[89]/.test(this.input.slice(t,this.pos)))n=!1;if(i===46&&!n)++this.pos,this.readInt(10),i=this.input.charCodeAt(this.pos);if((i===69||i===101)&&!n){if(i=this.input.charCodeAt(++this.pos),i===43||i===45)++this.pos;if(this.readInt(10)===null)this.raise(t,"Invalid number")}if(de(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");var s=mh(this.input.slice(t,this.pos),n);return this.finishToken(u.num,s)};E.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};E.readString=function(e){var t="",n=++this.pos;for(;;){if(this.pos>=this.input.length)this.raise(this.start,"Unterminated string constant");var i=this.input.charCodeAt(this.pos);if(i===e)break;if(i===92)t+=this.input.slice(n,this.pos),t+=this.readEscapedChar(!1),n=this.pos;else if(i===8232||i===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(Ct(i))this.raise(this.start,"Unterminated string constant");++this.pos}}return t+=this.input.slice(n,this.pos++),this.finishToken(u.string,t)};var ol={};E.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===ol)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1};E.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw ol;else this.raise(e,t)};E.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===u.template||this.type===u.invalidTemplate))if(n===36)return this.pos+=2,this.finishToken(u.dollarBraceL);else return++this.pos,this.finishToken(u.backQuote);return e+=this.input.slice(t,this.pos),this.finishToken(u.template,e)}if(n===92)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(Ct(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+=`
|
|
31
|
+
`;break;default:e+=String.fromCharCode(n);break}if(this.options.locations)++this.curLine,this.lineStart=this.pos;t=this.pos}else++this.pos}};E.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(u.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":if(this.input[this.pos+1]===`
|
|
31
32
|
`)++this.pos;case`
|
|
32
|
-
`:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")};
|
|
33
|
-
`;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return wn(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(nt(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(Se(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 a=this.readCodePoint();if(!(t?ce:Se)(a,r))this.invalidStringToken(o,"Invalid Unicode escape");e+=wn(a),n=this.pos}else break;t=!1}return e+this.input.slice(n,this.pos)};k.readWord=function(){var e=this.readWord1(),t=u.name;if(this.keywords.test(e))t=si[e];return this.finishToken(t,e)};var ef="8.18.0";j.acorn={Parser:j,version:ef,defaultOptions:ti,Position:Lt,SourceLocation:Pn,getLineInfo:da,Node:$n,TokenType:A,tokTypes:u,keywordTypes:si,TokContext:le,tokContexts:I,isIdentifierChar:Se,isIdentifierStart:ce,Token:ui,isNewLine:nt,lineBreak:J,lineBreakG:Od,nonASCIIwhitespace:ua};function di(e){return(t)=>e(t)}function fi(...e){return j.extend(...e)}var Kr=/(?:\s|\/\/.*|\/\*[\s\S]*?\*\/)*/g,tf=new Map([["any","TSAnyKeyword"],["bigint","TSBigIntKeyword"],["boolean","TSBooleanKeyword"],["never","TSNeverKeyword"],["null","TSNullKeyword"],["number","TSNumberKeyword"],["object","TSObjectKeyword"],["string","TSStringKeyword"],["symbol","TSSymbolKeyword"],["undefined","TSUndefinedKeyword"],["unknown","TSUnknownKeyword"],["void","TSVoidKeyword"]]),nf=new Set("public private protected readonly declare abstract override static accessor".split(" ")),rf=new Set("public private protected readonly override".split(" ")),sf=new Set("var let const function class abstract enum interface type namespace module global".split(" ")),of=new Set("var let const function class interface enum".split(" ")),Zo=new Set(["TSAsExpression","TSSatisfiesExpression","TSNonNullExpression","TSTypeAssertion"]),ea=1,af=32,pf=256,lf=0,cf=1,Nt=2,uf=3,df=4,Xr=6,ta=7,wa=256,ii=1024,ff=8|ii,hf=Nt|wa,na=1,mf=2,ra=40,gf=41,yf=44,ia=46,sa=58,En=61,oa=60,Tn=123,bf=91,Yr=42,xf=35,Qr=34,Zr=39,vf=SyntaxError("speculative parse failed"),Ln=di((e)=>{let{tokTypes:t,keywordTypes:n,isIdentifierChar:r,isIdentifierStart:i}=e.acorn,o=new e.acorn.TokenType("@");class a extends e{inType=!1;$5=!1;$6=!1;$8=null;$o=null;$p=!1;$q=!1;$i=null;$b=[[]];$r=0;$12=0;constructor(s,p,l){super(s,p,l);let c=this.options.onComment;if(typeof c==="function")this.options.onComment=(d,f,h,g,m,y)=>{if(h<this.$12)return;this.$12=g,c.call(this,d,f,h,g,m,y)}}getTokenFromCode(s){if(s===64)return++this.pos,this.finishToken(o);return super.getTokenFromCode(s)}readToken_lt_gt(s){if(this.inType)return this.finishOp(t.relational,1);return super.readToken_lt_gt(s)}$9(s){let p=this.inType;this.inType=!0;let l=s();if(this.inType=p,!p&&this.type===t.relational)this.pos=this.start,this.nextToken();return l}$1(){return this.type===t.relational&&this.value==="<"}$k(){if(this.type===t.bitShift&&this.value==="<<")this.pos=this.start+1,this.finishToken(t.relational,"<");return this.$1()}$c(){return this.type===t.relational&&this.value===">"}$s(){return this.type===t.prefix&&this.value==="!"}hasPrecedingLineBreak(){return this.$13(this.lastTokEnd,this.start)}$13(s,p){for(let l=s;l<p;l++){let c=this.input.charCodeAt(l);if(c===10||c===13||c===8232||c===8233)return!0}return!1}$d(s=this.pos){return Kr.lastIndex=s,Kr.exec(this.input),Kr.lastIndex}$2(){return this.input.charCodeAt(this.$d())}$3(){let s=this.$d(),p=s;while(p<this.input.length&&r(this.input.charCodeAt(p)))p++;return this.input.slice(s,p)}$a(){return!this.$13(this.pos,this.$d())}$14(){return this.$a()&&i(this.$2())&&!Object.hasOwn(n,this.$3())}$15(){return{pos:this.pos,type:this.type,value:this.value,start:this.start,end:this.end,startLoc:this.startLoc,endLoc:this.endLoc,lastTokStart:this.lastTokStart,lastTokEnd:this.lastTokEnd,lastTokStartLoc:this.lastTokStartLoc,lastTokEndLoc:this.lastTokEndLoc,curLine:this.curLine,lineStart:this.lineStart,context:this.context.slice(),exprAllowed:this.exprAllowed,containsEsc:this.containsEsc,inType:this.inType,$5:this.$5,$6:this.$6,$8:this.$8,scopes:this.scopeStack.length,privateNames:this.privateNameStack.length,labels:this.labels,labelCount:this.labels.length,strict:this.strict,yieldPos:this.yieldPos,awaitPos:this.awaitPos,awaitIdentPos:this.awaitIdentPos,potentialArrowAt:this.potentialArrowAt,potentialArrowInForAwait:this.potentialArrowInForAwait}}$16(s){this.pos=s.pos,this.type=s.type,this.value=s.value,this.start=s.start,this.end=s.end,this.startLoc=s.startLoc,this.endLoc=s.endLoc,this.lastTokStart=s.lastTokStart,this.lastTokEnd=s.lastTokEnd,this.lastTokStartLoc=s.lastTokStartLoc,this.lastTokEndLoc=s.lastTokEndLoc,this.curLine=s.curLine,this.lineStart=s.lineStart,this.context=s.context,this.exprAllowed=s.exprAllowed,this.containsEsc=s.containsEsc,this.inType=s.inType,this.$5=s.$5,this.$6=s.$6,this.$8=s.$8,this.scopeStack.length=s.scopes,this.privateNameStack.length=s.privateNames,this.labels=s.labels,this.labels.length=s.labelCount,this.strict=s.strict,this.yieldPos=s.yieldPos,this.awaitPos=s.awaitPos,this.awaitIdentPos=s.awaitIdentPos,this.potentialArrowAt=s.potentialArrowAt,this.potentialArrowInForAwait=s.potentialArrowInForAwait}raise(s,p){if(this.$r>0)throw vf;return super.raise(s,p)}$1y(s,p){try{super.raise(s,p)}catch(l){if(l instanceof SyntaxError)l.$1z=!0;throw l}throw Error("unreachable")}$f(s,p=!1){let l=this.$15();this.$r++;try{let c=s();if(p||c===void 0)this.$16(l);return c}catch(c){if(!(c instanceof SyntaxError)||!p&&c.$1z)throw c;this.$16(l);return}finally{this.$r--}}$t(s){return this.$f(s,!0)===!0}$17(s){if(s.end=this.lastTokEnd,this.options.locations)s.loc.end=this.lastTokEndLoc}$l(s,p){if(s.start=p.start,this.options.locations)s.loc.start=p.loc.start}$4(s=!1){let p=this.startNode();return p.typeAnnotation=this.$9(()=>(this.next(),s?this.$20():this.$0())),this.finishNode(p,"TSTypeAnnotation")}$g(s,p){if(p&&this.eat(t.question))s.optional=!0,this.$17(s);if(this.type===t.colon)s.typeAnnotation=this.$4(),this.$17(s);return s}$20(){if(this.type!==t.name&&this.type!==t._this)return this.$0();if(this.isContextual("asserts")&&this.$a()&&i(this.$2())){let s=this.startNode();if(this.next(),s.parameterName=this.type===t._this?this.$u():this.parseIdent(),this.isContextual("is")&&!this.hasPrecedingLineBreak())return this.$v(s,!0);return s.asserts=!0,s.typeAnnotation=null,this.finishNode(s,"TSTypePredicate")}if(this.$3()==="is"&&this.$a()){let s=this.startNode();return s.parameterName=this.type===t._this?this.$u():this.parseIdent(!0),this.$v(s,!1)}return this.$0()}$v(s,p){this.next();let l=this.startNode();return l.typeAnnotation=this.$0(),s.typeAnnotation=this.finishNode(l,"TSTypeAnnotation"),s.asserts=p,this.finishNode(s,"TSTypePredicate")}$u(){let s=this.startNode();return this.next(),this.finishNode(s,"TSThisType")}parseWholeType(){this.inType=!0,this.nextToken();let s=this.$0();if(this.type!==t.eof)this.unexpected();return s}$0(){let s=this.$18();if(this.$5||this.type!==t._extends||this.hasPrecedingLineBreak())return s;let p=this.startNodeAt(s.start,s.loc?.start);return this.next(),p.checkType=s,p.extendsType=this.$h(!0,()=>this.$18()),this.expect(t.question),p.trueType=this.$h(!1,()=>this.$0()),this.expect(t.colon),p.falseType=this.$h(!1,()=>this.$0()),this.finishNode(p,"TSConditionalType")}$h(s,p){let l=this.$5;this.$5=s;let c=p();return this.$5=l,c}$18(){if(this.$21())return this.$19("TSFunctionType");if(this.type===t._new||this.isContextual("abstract")&&this.$3()==="new")return this.$19("TSConstructorType");return this.$1a("TSUnionType",t.bitwiseOR,()=>this.$1a("TSIntersectionType",t.bitwiseAND,()=>this.$1b()))}$19(s){let p=this.startNode();if(s==="TSConstructorType"){if(p.abstract=this.isContextual("abstract"),p.abstract)this.next();this.next()}return this.$h(!1,()=>this.$m(p,t.arrow)),this.finishNode(p,s)}$m(s,p){if(this.$1())s.typeParameters=this.$7();if(this.expect(t.parenL),s.parameters=this.parseBindingList(t.parenR,!1,!0),this.type===p)s.typeAnnotation=this.$4(!0);else if(p===t.arrow)this.unexpected()}$21(){if(this.$1())return!0;if(this.type!==t.parenL)return!1;return this.$t(()=>{if(this.next(),this.type===t.parenR||this.type===t.ellipsis)return!0;if(this.type===t.name||this.type===t._this)this.next();else if(this.type===t.braceL||this.type===t.bracketL)this.parseBindingAtom();else return!1;let s=this.type;if(s===t.colon||s===t.comma||s===t.question||s===t.eq)return!0;if(s!==t.parenR)return!1;return this.next(),this.type===t.arrow})}$1a(s,p,l){let c=this.startNode(),d=this.eat(p),f=[];do f.push(l());while(this.eat(p));if(f.length===1&&!d)return f[0];return c.types=f,this.finishNode(c,s)}$1b(){if(this.type===t.name&&!this.containsEsc){let s=this.value;if(s==="keyof"||s==="unique"||s==="readonly"){let p=this.startNode();return this.next(),p.operator=s,p.typeAnnotation=this.$1b(),this.finishNode(p,"TSTypeOperator")}if(s==="infer"){let p=this.startNode();this.next();let l=this.startNode();l.name=this.$w();let c=this.$f(()=>this.$22());if(c)l.constraint=c;return p.typeParameter=this.finishNode(l,"TSTypeParameter"),this.finishNode(p,"TSInferType")}}return this.$h(!1,()=>this.$23())}$22(){if(!this.eat(t._extends))return;let s=this.$h(!0,()=>this.$0());if(this.$5||this.type!==t.question)return s;return}$w(){if(this.type!==t.name&&!this.type.keyword)this.unexpected();let s=this.type===t.name?this.value:this.type.keyword;return this.next(),s}$23(){let s=this.$24();while(!this.hasPrecedingLineBreak()&&this.eat(t.bracketL)){let p=this.startNodeAt(s.start,s.loc?.start);if(this.eat(t.bracketR))p.elementType=s,s=this.finishNode(p,"TSArrayType");else p.objectType=s,p.indexType=this.$0(),this.expect(t.bracketR),s=this.finishNode(p,"TSIndexedAccessType")}return s}$24(){switch(this.type){case t.name:case t._void:case t._null:{let s=tf.get(this.value);if(s&&(this.type!==t.name||!this.containsEsc&&this.$2()!==ia)){let p=this.startNode();return this.next(),this.finishNode(p,s)}return this.$1c()}case t.string:case t.num:case t._true:case t._false:{let s=this.startNode();return s.literal=this.parseExprAtom(),this.finishNode(s,"TSLiteralType")}case t.plusMin:{if(this.value!=="-")break;let s=this.startNode(),p=this.startNode();if(this.next(),this.type!==t.num)this.unexpected();return p.operator="-",p.prefix=!0,p.argument=this.parseExprAtom(),s.literal=this.finishNode(p,"UnaryExpression"),this.finishNode(s,"TSLiteralType")}case t.backQuote:return this.$25();case t._this:{let s=this.$u();if(this.isContextual("is")&&!this.hasPrecedingLineBreak()){let p=this.startNodeAt(s.start,s.loc?.start);return p.parameterName=s,this.$v(p,!1)}return s}case t._typeof:return this.$26();case t._import:return this.$1d();case t.braceL:return this.$27()?this.$28():this.$29();case t.bracketL:return this.$2a();case t.parenL:{let s=this.startNode();return this.next(),s.typeAnnotation=this.$0(),this.expect(t.parenR),this.finishNode(s,"TSParenthesizedType")}default:if(this.type.keyword)return this.$1c()}return this.unexpected()}$1c(){let s=this.startNode();if(s.typeName=this.$j(),!this.hasPrecedingLineBreak()&&this.$1())s.typeArguments=this.$e();return this.finishNode(s,"TSTypeReference")}$j(){let s=this.parseIdent(!0);while(this.eat(t.dot)){let p=this.startNodeAt(s.start,s.loc?.start);p.left=s,p.right=this.parseIdent(!0),s=this.finishNode(p,"TSQualifiedName")}return s}$26(){let s=this.startNode();if(this.next(),s.exprName=this.type===t._import?this.$1d():this.$j(),!this.hasPrecedingLineBreak()&&this.$1())s.typeArguments=this.$e();return this.finishNode(s,"TSTypeQuery")}$1d(){let s=this.startNode();if(this.next(),s.argument=this.$1e(),this.eat(t.dot))s.qualifier=this.$j();if(this.$1())s.typeArguments=this.$e();return this.finishNode(s,"TSImportType")}$x(){if(this.type!==t.string)this.unexpected();return this.parseExprAtom()}$1e(){this.expect(t.parenL);let s=this.$x();return this.expect(t.parenR),s}$25(){let s=this.startNode(),p=this.startNode();this.next(),p.expressions=[];let l=this.parseTemplateElement({isTagged:!1});p.quasis=[l];while(!l.tail){if(this.type===t.eof)this.raise(this.pos,"Unterminated template literal");this.expect(t.dollarBraceL),p.expressions.push(this.$0()),this.expect(t.braceR),l=this.parseTemplateElement({isTagged:!1}),p.quasis.push(l)}return this.next(),s.literal=this.finishNode(p,"TemplateLiteral"),this.finishNode(s,"TSLiteralType")}$27(){return this.$t(()=>{if(this.next(),this.type===t.plusMin)return this.next(),this.isContextual("readonly");if(this.isContextual("readonly"))this.next();if(this.type!==t.bracketL)return!1;if(this.next(),this.type!==t.name)return!1;return this.next(),this.type===t._in})}$28(){let s=this.startNode();if(this.expect(t.braceL),this.type===t.plusMin)s.readonly=this.value,this.next(),this.expectContextual("readonly");else if(this.eatContextual("readonly"))s.readonly=!0;this.expect(t.bracketL);let p=this.startNode();if(p.name=this.$w(),this.expect(t._in),p.constraint=this.$0(),s.typeParameter=this.finishNode(p,"TSTypeParameter"),s.nameType=this.eatContextual("as")?this.$0():null,this.expect(t.bracketR),this.type===t.plusMin)s.optional=this.value,this.next(),this.expect(t.question);else if(this.eat(t.question))s.optional=!0;if(this.eat(t.colon))s.typeAnnotation=this.$0();return this.semicolon(),this.expect(t.braceR),this.finishNode(s,"TSMappedType")}$29(){let s=this.startNode();return s.members=this.$1f(),this.finishNode(s,"TSTypeLiteral")}$1f(){this.expect(t.braceL);let s=[];while(!this.eat(t.braceR))s.push(this.$2b());return s}$2b(){let s=this.startNode(),p="TSPropertySignature",l=this.type===t._new?this.$2():-1;if(this.type===t.parenL||this.$1())p="TSCallSignatureDeclaration",this.$m(s,t.colon);else if(l===ra||l===oa)p="TSConstructSignatureDeclaration",this.next(),this.$m(s,t.colon);else{let c=this.type===t._new?this.parseIdent(!0):null;if(this.isContextual("readonly")&&this.$n(!0))this.next(),s.readonly=!0;if(this.type===t.bracketL&&this.$1g())return this.$1h(s);let d="method";if(c)s.key=c;else{if((this.isContextual("get")||this.isContextual("set"))&&this.$n(!1))d=this.value,this.next();this.parsePropertyName(s)}if(this.eat(t.question))s.optional=!0;if(this.type===t.parenL||this.$1()){if(p="TSMethodSignature",d!=="method")s.kind=d;this.$m(s,t.colon),s.kind=d}else if(this.type===t.colon)s.typeAnnotation=this.$4()}return this.$1i(),this.finishNode(s,p)}$1i(){if(!this.eat(t.comma))this.semicolon()}$1g(){return this.$t(()=>{if(this.next(),this.type!==t.name)return!1;return this.next(),this.type===t.colon})}$1h(s){if(this.expect(t.bracketL),s.parameters=[this.$g(this.parseIdent(),!1)],this.expect(t.bracketR),this.type===t.colon)s.typeAnnotation=this.$4();return this.$1i(),this.finishNode(s,"TSIndexSignature")}$2a(){let s=this.startNode();this.expect(t.bracketL),s.elementTypes=[];while(!this.eat(t.bracketR))if(s.elementTypes.push(this.$2c()),this.type!==t.bracketR)this.expect(t.comma);return this.finishNode(s,"TSTupleType")}$2c(){let s=this.start,p=this.startLoc,l=this.eat(t.ellipsis),c;if((this.type===t.name||this.type.keyword)&&this.$2d()){let d=this.startNode();d.label=this.parseIdent(!0),d.optional=this.eat(t.question),this.expect(t.colon),d.elementType=this.$0(),c=this.finishNode(d,"TSNamedTupleMember")}else if(c=this.$0(),this.eat(t.question)){let d=this.startNodeAt(c.start,c.loc?.start);d.typeAnnotation=c,c=this.finishNode(d,"TSOptionalType")}if(l){let d=this.startNodeAt(s,p);d.typeAnnotation=c,c=this.finishNode(d,"TSRestType")}return c}$2d(){let s=this.$d();if(this.input.charCodeAt(s)===63)s=this.$d(s+1);return this.input.charCodeAt(s)===sa}$7(){return this.$9(()=>{let s=this.startNode();this.next(),s.params=[];while(!this.$c()){let p=this.startNode();while((this.type===t._const||this.type===t._in||this.isContextual("out"))&&i(this.$2()))p[this.value]=!0,this.next();if(p.name=this.$w(),this.eat(t._extends))p.constraint=this.$0();if(this.eat(t.eq))p.default=this.$0();if(s.params.push(this.finishNode(p,"TSTypeParameter")),!this.$c()){if(this.expect(t.comma),this.$c())s.extra={trailingComma:this.lastTokStart}}}if(this.next(),s.params.length===0)this.$1y(this.start,"Type parameter list cannot be empty.");return this.finishNode(s,"TSTypeParameterDeclaration")})}$e(){return this.$9(()=>{let s=this.startNode();this.next(),s.params=[];while(!this.$c())if(s.params.push(this.$0()),!this.$c())this.expect(t.comma);if(s.params.length===0)this.unexpected();return this.next(),this.finishNode(s,"TSTypeParameterInstantiation")})}$1j(){let s=[];do{let p=this.startNode();if(p.expression=this.$j(),this.$1())p.typeParameters=this.$e();s.push(this.finishNode(p,"TSExpressionWithTypeArguments"))}while(this.eat(t.comma));return s}$1k(s=!1){if(this.type!==t.name||this.containsEsc){if(this.type===t._const&&this.$3()==="enum")return this.$y(this.startNode());return}if(!this.$2e(this.value))return;if(this.value==="declare")return this.$2f(s);return this.$1l(this.startNode(),this.value)}$2e(s){switch(s){case"interface":case"type":case"namespace":return this.$14();case"enum":return i(this.$2());case"abstract":return this.$a()&&this.$3()==="class";case"module":{let p=this.$2();return this.$a()&&(p===Qr||p===Zr||i(p))}case"declare":return this.$a()&&sf.has(this.$3());case"global":return this.$a()&&this.$2()===Tn}return!1}$1l(s,p){switch(p){case"interface":return this.$1m(s);case"type":return this.$2g(s);case"enum":return this.$y(s);case"abstract":return this.$1n(s,!0);case"global":return s.global=!0,s.id=this.parseIdent(),s.body=this.$z(),this.finishNode(s,"TSModuleDeclaration")}return this.$2h(s)}$2f(s){let p=this.$6;this.$6=!0;let l=this.startNode();this.next();let c=this.value;if(c==="const"&&this.$3()==="enum")l.const=!0;if(!s&&of.has(c))l.declare=!0;let d;if(l.const)d=this.$y(l);else if(c==="var"||c==="let"||c==="const")d=this.parseVarStatement(l,c,!0);else if(c==="function")this.next(),d=this.parseFunction(l,na,!1,!1);else if(c==="class")d=this.parseClass(l,!0);else d=this.$1l(l,c);return d.declare=!0,this.$6=p,d}$1n(s,p){return this.next(),s.abstract=!0,this.parseClass(s,p)}$1m(s){if(this.next(),s.id=this.parseIdent(),this.checkLValSimple(s.id,ta),this.$1())s.typeParameters=this.$7();return this.$9(()=>{if(this.eat(t._extends))s.extends=this.$1j();let p=this.startNode();p.body=this.$1f(),s.body=this.finishNode(p,"TSInterfaceBody")}),this.finishNode(s,"TSInterfaceDeclaration")}$2g(s){if(this.next(),s.id=this.parseIdent(),this.checkLValSimple(s.id,Xr),this.$1())s.typeParameters=this.$7();return s.typeAnnotation=this.$9(()=>(this.expect(t.eq),this.$0())),this.semicolon(),this.finishNode(s,"TSTypeAliasDeclaration")}$y(s){if(this.type===t._const)s.const=!0,this.next();this.next(),s.id=this.parseIdent(),this.checkLValSimple(s.id,hf),this.expect(t.braceL),s.members=[];while(!this.eat(t.braceR)){let p=this.startNode();if(p.id=this.type===t.string?this.parseExprAtom():this.parseIdent(!0),this.eat(t.eq))p.initializer=this.parseMaybeAssign();if(s.members.push(this.finishNode(p,"TSEnumMember")),this.type!==t.braceR)this.expect(t.comma)}return this.finishNode(s,"TSEnumDeclaration")}$2h(s){if(this.next(),this.type===t.string){if(s.id=this.parseExprAtom(),this.type===t.braceL)s.body=this.$z();else this.semicolon();return this.finishNode(s,"TSModuleDeclaration")}return s.id=this.parseIdent(),this.checkLValSimple(s.id,ff),this.$1o(s)}$1o(s){if(this.eat(t.dot)){let p=this.startNode();p.id=this.parseIdent(),s.body=this.$1o(p)}else s.body=this.$z();return this.finishNode(s,"TSModuleDeclaration")}$z(){this.enterScope(pf);let s=this.startNode();this.enterScope(0),this.expect(t.braceL),s.body=[];while(!this.eat(t.braceR))s.body.push(this.parseStatement(null,!0));return this.exitScope(),this.exitScope(),this.finishNode(s,"TSModuleBlock")}$1p(s,p){if(s.isExport=p,s.id=this.parseIdent(),this.checkLValSimple(s.id,Nt),this.expect(t.eq),this.isContextual("require")&&this.$2()===ra){let l=this.startNode();this.next(),l.expression=this.$1e(),s.moduleReference=this.finishNode(l,"TSExternalModuleReference")}else s.moduleReference=this.$j();return this.semicolon(),this.finishNode(s,"TSImportEqualsDeclaration")}$2i(){let s=this.$d();if(this.input.charCodeAt(s)!==En)return!1;let p=this.input.charCodeAt(s+1);return p!==En&&p!==62}parseStatement(s,p,l){if(this.type===o)this.$1q(!0);let c=this.$1k();if(c)return c;return super.parseStatement(s,p,l)}parseVarStatement(s,p,l){return super.parseVarStatement(s,p,l||this.$6)}parseVarId(s,p){if(super.parseVarId(s,p),s.id.type==="Identifier"&&this.$s()&&!this.hasPrecedingLineBreak())this.next(),s.definite=!0;this.$g(s.id,!1)}parseCatchClauseParam(){let s=this.$g(this.parseBindingAtom(),!1),p=s.type==="Identifier";return this.enterScope(p?af:0),this.checkLValPattern(s,p?df:Nt),this.expect(t.parenR),s}parseImport(s){if(this.next(),s.importKind="value",this.type===t.string)s.specifiers=[],s.source=this.parseExprAtom();else{if(this.isContextual("type")){let p=this.$2();if(p===Tn||p===Yr||i(p)&&this.$3()!=="from")s.importKind="type",this.next()}if(this.type===t.name&&this.$2i())return this.$1p(s,!1);s.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),s.source=this.$x()}return this.$1r(s),this.semicolon(),this.finishNode(s,"ImportDeclaration")}parseWithClause(){if(this.isContextual("assert")&&!this.hasPrecedingLineBreak())this.type=t._with;return this.type===t._with?super.parseWithClause():void 0}$1r(s){let p=this.parseWithClause();if(p)s.attributes=p}parseImportSpecifier(){return this.$1s("importKind",()=>super.parseImportSpecifier())}parseExportSpecifier(s){return this.$1s("exportKind",()=>super.parseExportSpecifier(s))}$1s(s,p){let l=this.isContextual("type")?this.$2():-1;if(l===Qr||l===Zr||i(l)&&this.$3()!=="as"){let d=this.startNode();this.next();let f=p();return this.$l(f,d),f[s]="type",f}let c=p();return c[s]="value",c}parseExport(s,p){if(this.next(),this.eat(t._import)){if(s.importKind="value",this.isContextual("type")&&i(this.$2())&&this.$3()!=="from")s.importKind="type",this.next();return this.$1p(s,!0)}if(this.eat(t.eq))return s.expression=this.parseExpression(),this.semicolon(),this.finishNode(s,"TSExportAssignment");if(this.eatContextual("as"))return this.expectContextual("namespace"),s.id=this.parseIdent(),this.semicolon(),this.finishNode(s,"TSNamespaceExportDeclaration");if(s.exportKind="value",this.isContextual("type")){let d=this.$2();if(d===Tn||d===Yr)s.exportKind="type",this.next()}if(this.eat(t.star))return this.parseExportAllDeclaration(s,p);if(this.eat(t._default)){if(this.isContextual("interface")&&this.$14())s.declaration=this.$1m(this.startNode());else if(this.isContextual("abstract")&&this.$3()==="class")s.declaration=this.$1n(this.startNode(),"nullableID");else s.declaration=this.parseExportDefaultDeclaration();return this.finishNode(s,"ExportDefaultDeclaration")}let l=this.isContextual("declare"),c=this.$1k(!0);if(c||this.shouldParseExportStatement()){if(s.declaration=c??this.parseStatement(null),l||s.declaration.type==="TSInterfaceDeclaration"||s.declaration.type==="TSTypeAliasDeclaration")s.exportKind="type";return s.specifiers=[],s.source=null,this.finishNode(s,"ExportNamedDeclaration")}if(s.declaration=null,s.specifiers=this.parseExportSpecifiers(p),this.eatContextual("from"))s.source=this.$x(),this.$1r(s);else{for(let d of s.specifiers)if(this.checkUnreserved(d.local),this.checkLocalExport(d.local),d.local.type==="Literal")this.raise(d.local.start,"A string literal cannot be used as an exported binding without `from`.");s.source=null}return this.semicolon(),this.finishNode(s,"ExportNamedDeclaration")}parseFunction(s,p,l,c,d){let f=p&na;if(f)this.$i=s;super.parseFunction(s,p,l,c,d),this.$i=null;let h=!s.body;if(h)s.type="TSDeclareFunction";if(f&&s.id){if(h){if(this.$6&&this.currentScope().flags&ea)this.declareName(s.id.name,ii,s.id.start);this.checkLValSimple(s.id,lf)}else if(!(p&mf)){let g=uf;if(this.strict||s.generator||s.async)g=this.treatFunctionsAsVar?cf:Nt;this.checkLValSimple(s.id,g)}}return s}parseFunctionParams(s){if(this.$1())s.typeParameters=this.$7();if(super.parseFunctionParams(s),this.type===t.colon)s.returnType=this.$4(!0)}parseFunctionBody(s,p,l,c){if(l&&this.type===t.colon)s.returnType=this.$4(!0);if(p||this.type===t.braceL){super.parseFunctionBody(s,p,l,c);return}this.semicolon(),this.exitScope()}parseMethod(s,p,l){let c=this.$o;this.$o=null;let d=super.parseMethod(s,p,l);if(!d.body)d.type="TSDeclareMethod";if(c)d.typeParameters=c;return d}parseBindingList(s,p,l,c){let d=c===!0||this.$p;return this.$p=!1,super.parseBindingList(s,p,l,d)}$n(s){if(!s&&!this.$a())return!1;let p=this.$2();return p===bf||p===Tn||p===Yr||p===ia||p===xf||p===Qr||p===Zr||p>=48&&p<=57||i(p)}parseAssignableListItem(s){let p=this.$10(),l=this.start,c=this.startLoc,d,f=!1,h=!1;if(s)while(this.type===t.name&&rf.has(this.value)&&!this.containsEsc&&this.$n(!1)){if(this.value==="readonly")f=!0;else if(this.value==="override")h=!0;else d=this.value;this.next()}let g;if(this.type===t._this)g=this.startNode(),g.name="this",this.next(),this.finishNode(g,"Identifier");else g=this.parseBindingAtom();let m=this.type===t.eq?this.parseMaybeDefault(l,c,g):this.parseMaybeDefault(g.start,g.loc?.start,this.$g(g,!0));if(p.length>0)m.decorators=p;if(!d&&!f&&!h)return m;let y=this.startNodeAt(l,c);if(d)y.accessibility=d;if(f)y.readonly=!0;if(h)y.override=!0;return y.parameter=m,this.finishNode(y,"TSParameterProperty")}parseBindingListItem(s){if(s.type==="RestElement")this.$g(s,!0);return s}checkLValSimple(s,p,l){if(this.$i&&s===this.$i.id){this.$i=null;return}if(!p&&Zo.has(s.type)){this.checkLValSimple(s.expression,p,l);return}switch(s.type){case"TSParameterProperty":this.checkLValInnerPattern(s.parameter,p,l);return;case"Identifier":if(s.name==="this")return}super.checkLValSimple(s,p,l)}toAssignable(s,p,l){if(s&&!p&&Zo.has(s.type))return s;return super.toAssignable(s,p,l)}declareName(s,p,l){let c=this.currentScope();if(p&ii){this.$1t(c,s),c.$1u??=[],c.$1u.push(s);return}if(p===Xr||p===ta){if(c.$11??=[],p===Xr&&c.$11.includes(s))this.raise(l,`type '${s}' has already been declared.`);c.$11.push(s),this.$1t(c,s);return}if(p&wa){if(c.$1v??=[],c.$1v.includes(s))return;super.declareName(s,Nt,l),c.$1v.push(s);return}super.declareName(s,p,l)}$1t(s,p){if(this.inModule&&s.flags&ea)delete this.undefinedExports[p]}checkLocalExport(s){for(let p=this.scopeStack.length-1;p>=0;p--){let l=this.scopeStack[p];if(l.$11?.includes(s.name)||l.$1u?.includes(s.name))return}super.checkLocalExport(s)}checkExport(){}raiseRecoverable(s,p){if(p==="Duplicate constructor in the same class")return;super.raiseRecoverable(s,p)}$10(){let s=[];while(this.type===o)s.push(this.$1w());return s}$1q(s){let p=this.$b[this.$b.length-1];while(this.type===o)p.push(this.$1w());if(this.type===t._export){if(!s)this.unexpected()}else if(this.type!==t._class&&!((this.isContextual("abstract")||this.isContextual("declare"))&&this.$3()==="class"))this.raise(this.start,"Leading decorators must be attached to a class declaration.")}$1w(){let s=this.startNode();this.next(),this.$b.push([]);let p=this.start,l=this.startLoc,c;if(this.type===t.parenL){if(this.next(),c=this.parseExpression(),this.expect(t.parenR),this.options.preserveParens){let f=this.startNodeAt(p,l);f.expression=c,c=this.finishNode(f,"ParenthesizedExpression")}}else{c=this.parseIdent(!1);while(this.eat(t.dot)){let f=this.startNodeAt(p,l);f.object=c,f.property=this.parseIdent(!0),f.computed=!1,c=this.finishNode(f,"MemberExpression")}}let d=this.$k()?this.$e():void 0;if(this.eat(t.parenL)){let f=this.startNodeAt(c.start,c.loc?.start);if(f.callee=c,f.arguments=this.parseExprList(t.parenR,!1,!1),d)f.typeArguments=d;c=this.finishNode(f,"CallExpression")}else if(d){let f=this.startNodeAt(c.start,c.loc?.start);f.expression=c,f.typeArguments=d,c=this.finishNode(f,"TSInstantiationExpression")}return s.expression=c,this.$b.pop(),this.finishNode(s,"Decorator")}shouldParseExportStatement(){return this.type===o||super.shouldParseExportStatement()}parseExprAtom(s,p,l){if(this.type===o)this.$1q(!1);return super.parseExprAtom(s,p,l)}parseProperty(s,p){if(s||this.type!==o)return super.parseProperty(s,p);let l=this.$10(),c=super.parseProperty(s,p);if(c.type==="SpreadElement")this.raise(c.start,"Decorators can't be used with SpreadElement");return c.decorators=l,c}parseClassId(s,p){let l=this.$b.length-1,c=this.$b[l];if(c.length>0)s.decorators=c,this.$l(s,c[0]),this.$b[l]=[];if(!this.isContextual("implements")||p===!0)super.parseClassId(s,p);if(this.$1())s.typeParameters=this.$7()}parseClassSuper(s){if(super.parseClassSuper(s),s.superClass&&this.$1())s.superTypeParameters=this.$e();if(this.eatContextual("implements"))s.implements=this.$9(()=>this.$1j())}parseClassElement(s){if(this.type===o){let h=this.$10();if(this.type===t.braceR)this.raise(this.start,"Decorators must be attached to a class element.");let g=this.parseClassElement(s);return g.decorators=h,this.$l(g,h[0]),g}if(this.eat(t.semi))return null;let p=this.startNode();while(this.type===t.name&&nf.has(this.value)&&!this.containsEsc&&this.$n(this.value==="static")){let h=this.value;if(this.next(),h==="static"&&this.type===t.braceL)return this.next(),this.parseClassStaticBlock(p),p;if(h==="public"||h==="private"||h==="protected")p.accessibility=h;else p[h]=!0}if(this.type===t.bracketL&&this.$1g())return this.$1h(p);p.static??=!1;let l="",c=!1,d=!1,f="method";if(this.eatContextual("async"))if((this.isClassElementNameStart()||this.type===t.star)&&!this.canInsertSemicolon())d=!0;else l="async";if(!l&&this.eat(t.star))c=!0;if(!l&&!d&&!c){let h=this.value;if(this.eatContextual("get")||this.eatContextual("set"))if(this.isClassElementNameStart())f=h;else l=h}if(l)p.computed=!1,p.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),p.key.name=l,this.finishNode(p.key,"Identifier");else this.parseClassElementName(p);if(this.eat(t.question))p.optional=!0;if(this.type===t.parenL||this.$1()||f!=="method"||c||d){let h=p.key,g=!p.static&&!p.computed&&(h.type==="Identifier"&&h.name==="constructor"||h.type==="Literal"&&h.value==="constructor");if(p.kind=g?"constructor":f,this.$1())p.typeParameters=this.$7();this.$p=g,this.parseClassMethod(p,c,d,g&&s)}else{if(!p.optional&&this.$s())this.next(),p.definite=!0;if(this.type===t.colon)p.typeAnnotation=this.$4();this.parseClassField(p)}return p}parseMaybeAssign(s,p,l){if(this.$k()){let c=this.$f(()=>{let d=this.$7(),f=super.parseMaybeAssign(s,p,l);if(f.type!=="ArrowFunctionExpression")return;return f.typeParameters=d,this.$l(f,d),f});if(c)return c}return super.parseMaybeAssign(s,p,l)}parseMaybeUnary(s,p,l,c){if(this.$k()){let d=this.startNode();return d.typeAnnotation=this.$9(()=>{this.next();let f=this.$0();if(!this.$c())this.unexpected();return this.next(),f}),d.expression=this.parseMaybeUnary(null,!1,!1,c),this.finishNode(d,"TSTypeAssertion")}return super.parseMaybeUnary(s,p,l,c)}parseMaybeConditional(s,p){let l=this.start,c=this.startLoc,d=this.parseExprOps(s,p);if(this.checkExpressionErrors(p))return d;if(this.type===t.question&&!(d.type==="ArrowFunctionExpression"&&d.start===l)&&!this.$2j()){this.next();let f=this.startNodeAt(l,c);return f.test=d,f.consequent=this.parseMaybeAssign(),this.expect(t.colon),f.alternate=this.parseMaybeAssign(s),this.finishNode(f,"ConditionalExpression")}return d}$2j(){let s=this.$d(),p=this.input.charCodeAt(s);if(p===sa||p===yf||p===gf)return!0;return p===En&&this.input.charCodeAt(s+1)!==En}parseParenItem(s){return this.$g(s,!0)}$1x(){if(this.type!==t.colon)return!0;let s=this.$f(()=>{let p=this.$4(!0);return this.type===t.arrow&&!this.canInsertSemicolon()?p:void 0});if(!s)return!1;return this.$8=s,!0}shouldParseArrow(s){return this.$1x()&&super.shouldParseArrow(s)}shouldParseAsyncArrow(){return this.$1x()&&super.shouldParseAsyncArrow()}parseArrowExpression(s,p,l,c){if(this.$8)s.returnType=this.$8,this.$8=null;return super.parseArrowExpression(s,p,l,c)}parseExprList(s,p,l,c){if(!this.$q)return super.parseExprList(s,p,l,c);this.$q=!1;let d=[],f=!0;while(!this.eat(s)){if(f)f=!1;else if(this.expect(t.comma),p&&this.afterTrailingComma(s))break;if(this.type===t.ellipsis){let h=this.parseSpread(c);if(this.eat(t.question))h.optional=!0;if(this.type===t.colon)h.typeAnnotation=this.$4();d.push(h)}else d.push(this.parseMaybeAssign(!1,c,this.parseParenItem))}return d}parseSubscript(s,p,l,c,d,f,h){if(this.$s()&&!this.hasPrecedingLineBreak()){let m=this.startNodeAt(p,l);return this.exprAllowed=!1,this.next(),m.expression=s,this.finishNode(m,"TSNonNullExpression")}if(d&&this.$1()){let m=this.$f(()=>this.$2k(p,l,h));if(m)return m}let g=this.type===t.questionDot&&this.$2()===oa;if(this.$1()||g||this.type===t.bitShift&&this.value==="<<"){let m=this.$f(()=>{if(g)this.next();this.$k();let y=this.$e();if(this.type===t.parenL&&!c)return y;if(this.type===t.backQuote)return g?void 0:y;if(g)return;if(this.$c()||this.type===t.bitShift||this.type.startsExpr&&this.type!==t.parenL&&!this.hasPrecedingLineBreak())return;return y});if(m){let y=this.startNodeAt(p,l);if(this.type===t.parenL&&!c){if(this.next(),y.callee=s,y.arguments=this.parseExprList(t.parenR,!0,!1),y.typeArguments=m,g)s.optional=!0;if(g||f)y.optional=g;return this.finishNode(y,"CallExpression")}if(this.type===t.backQuote)return y.tag=s,y.quasi=this.parseTemplate({isTagged:!0}),y.typeArguments=m,this.finishNode(y,"TaggedTemplateExpression");return y.expression=s,y.typeArguments=m,this.finishNode(y,"TSInstantiationExpression")}}if(d&&this.type===t.parenL)this.$q=!0;return super.parseSubscript(s,p,l,c,d,f,h)}$2k(s,p,l){let c=this.startNodeAt(s,p);if(c.typeParameters=this.$7(),this.expect(t.parenL),c.params=this.parseBindingList(t.parenR,!1,!0),this.type===t.colon)c.returnType=this.$4(!0);if(this.type!==t.arrow||this.canInsertSemicolon())return;return this.next(),this.parseArrowExpression(c,c.params,!0,l)}parseDynamicImport(s){if(this.next(),s.source=this.parseMaybeAssign(),this.eat(t.comma)&&this.type!==t.parenR)s.arguments=[this.parseExpression()];return this.expect(t.parenR),this.finishNode(s,"ImportExpression")}parseNew(){let s=super.parseNew();if(s.callee?.type!=="TSInstantiationExpression")return s;let p=this.startNodeAt(s.start,s.loc?.start);return p.callee=s.callee.expression,p.typeArguments=s.callee.typeArguments,p.arguments=s.arguments,this.finishNodeAt(p,"NewExpression",s.end,s.loc?.end)}parseExprOp(s,p,l,c,d){if(t._in.binop>c&&this.type===t.name&&(this.value==="as"||this.value==="satisfies")&&!this.containsEsc&&!this.hasPrecedingLineBreak()){let f=this.value==="satisfies",h=this.startNodeAt(p,l);return h.expression=s,h.typeAnnotation=this.$9(()=>{if(this.next(),!f&&this.type===t._const){let g=this.startNode();return g.typeName=this.parseIdent(!0),this.finishNode(g,"TSTypeReference")}return this.$0()}),this.finishNode(h,f?"TSSatisfiesExpression":"TSAsExpression"),this.parseExprOp(h,p,l,c,d)}return super.parseExprOp(s,p,l,c,d)}parseGetterSetter(s){s.kind=s.key.name,super.parseGetterSetter(s)}parsePropertyValue(s,p,l,c,d,f,h,g){if(!p&&this.$1()){if(this.$o=this.$7(),this.type!==t.parenL)this.unexpected();s.kind="init"}return super.parsePropertyValue(s,p,l,c,d,f,h,g)}}return a});var hi=new Set("abstract accessor arguments as asserts async await break case catch class const continue debugger declare default delete do else enum eval export extends false finally for function get global if implements import in infer instanceof interface intrinsic is keyof let module namespace new null of out override package private protected public readonly return satisfies set static super switch this throw true try type typeof unique var void while with yield".split(" ")),Ef=new Set("any bigint boolean false never null number object string symbol true undefined unknown void".split(" ")),Tf=new Set("get set new readonly static public private protected".split(" "));function Aa(e){return e>=97&&e<=122||e>=65&&e<=90||e===95||e===36}function _n(e){return e>=48&&e<=57}function Pa(e){return Aa(e)||_n(e)}class Da{text;pos=0;constructor(e){this.text=e}readAll(){if(!this.type())return!1;return this.peek(),this.pos===this.text.length}peek(){let e=this.text,t=this.pos,n=e.charCodeAt(t);while(n===32||n===9)n=e.charCodeAt(++t);return this.pos=t,n}eat(e){if(this.peek()!==e.charCodeAt(0))return!1;return this.pos++,!0}word(){if(!Aa(this.peek()))return;let e=this.pos,t=e+1;while(Pa(this.text.charCodeAt(t)))t++;return this.pos=t,this.text.slice(e,t)}name(){let e=this.word();return e!==void 0&&!hi.has(e)}string(){let e=this.peek();if(e!==34&&e!==39)return!1;let t=this.text;for(let n=this.pos+1;n<t.length;n++){let r=t.charCodeAt(n);if(r===e)return this.pos=n+1,!0;if(r===92||r===10||r===13||r===8232||r===8233)return!1}return!1}number(){let e=this.text,t=this.pos;if(e.charCodeAt(t)===45)t++;let n=t;while(_n(e.charCodeAt(t)))t++;if(t===n||t-n>1&&e.charCodeAt(n)===48)return!1;if(e.charCodeAt(t)===46){let i=++t;while(_n(e.charCodeAt(t)))t++;if(t===i)return!1}let r=e.charCodeAt(t);if(Pa(r)||r===46)return!1;return this.pos=t,!0}type(){if(this.peek()===40){let e=this.pos;if(this.functionType())return!0;this.pos=e}do do if(!this.operatorType())return!1;while(this.eat("&"));while(this.eat("|"));return!0}operatorType(){let e=this.pos;if(this.word()==="keyof")return this.operatorType();if(this.pos=e,!this.primaryType())return!1;while(this.eat("[")){if(this.eat("]"))continue;if(!this.type()||!this.eat("]"))return!1}return!0}primaryType(){let e=this.peek();if(e===40)return this.pos++,this.type()&&this.eat(")");if(e===123)return this.objectType();if(e===91)return this.tupleType();if(e===34||e===39)return this.string();if(e===45||_n(e))return this.number();let t=this.word();if(t===void 0)return!1;if(t==="typeof")return this.typeQuery();if(t==="import")return this.importType(!0);if(Ef.has(t)){let n=this.peek();return n!==46&&n!==60}if(hi.has(t))return!1;while(this.eat("."))if(this.word()===void 0)return!1;return!this.eat("<")||this.typeArguments()}typeArguments(){do if(!this.type())return!1;while(this.eat(","));return this.eat(">")}typeQuery(){let e=this.pos;if(this.word()==="import")return this.importType(!1);this.pos=e;do if(!this.name())return!1;while(this.eat("."));return!0}importType(e){if(!this.eat("(")||!this.string()||!this.eat(")"))return!1;while(this.eat("."))if(!this.name())return!1;return!e||!this.eat("<")||this.typeArguments()}objectType(){this.pos++;while(!this.eat("}")){if(!this.typeMember())return!1;if(!this.eat(";")&&!this.eat(",")&&this.peek()!==125)return!1}return!0}typeMember(){let e=this.peek();if(this.eat("[")){let t=this.peek();if(t===34||t===39){if(!this.string()||!this.eat("]"))return!1}else return this.name()&&this.eat(":")&&this.type()&&this.eat("]")&&this.eat(":")&&this.type()}else if(e===34||e===39){if(!this.string())return!1}else{let t=this.word();if(t===void 0||Tf.has(t))return!1}return this.eat("?"),this.eat(":")&&this.type()}tupleType(){if(this.pos++,this.eat("]"))return!0;do if(!this.type())return!1;while(this.eat(","));return this.eat("]")}functionType(){if(this.pos++,!this.eat(")")){let e=new Set;for(;;){this.peek();let t=this.text.startsWith("...",this.pos);if(t)this.pos+=3;let n=this.word();if(n===void 0||hi.has(n)||e.has(n))return!1;if(e.add(n),!t)this.eat("?");if(!this.eat(":")||!this.type())return!1;if(t||!this.eat(","))break}if(!this.eat(")"))return!1}if(this.peek(),!this.text.startsWith("=>",this.pos))return!1;return this.pos+=2,this.type()}}function Sf(e){return new Da(e).readAll()}var kf=j.extend(Ln);function Mt(e,t={}){return Sf(e)||Cf(e,t.inline??!1)}function Cf(e,t){let n=!1,r=new kf(t?{ecmaVersion:16,sourceType:"module",onComment:(i,o,a,s)=>{if(!i&&s===e.length)n=!0}}:{ecmaVersion:16,sourceType:"module"},e);try{return r.parseWholeType(),!n}catch(i){if(i instanceof SyntaxError)return!1;throw i}}var Rn="",Ce,jt=0;function La(e){Rn=e,Ce=void 0,jt=0}function Ie(e){if(!Ce){Ce=[0];let r=Rn.indexOf(`
|
|
34
|
-
|
|
35
|
-
`,r+1)}let
|
|
36
|
-
`)
|
|
37
|
-
|
|
38
|
-
${
|
|
39
|
-
`)
|
|
40
|
-
|
|
41
|
-
`,n
|
|
42
|
-
`,n);while(i
|
|
43
|
-
`,n)}return r+e.slice(n)}function _f(e,t,n){let r=0,i=t.length;while(r<i){let o=r+i>>>1;if(t[o].start<n)r=o+1;else i=o}if(r>=t.length)return;if(B=t.slice(r).map(({type:o,value:a,start:s,end:p})=>({type:o,value:a,start:s,end:p})),O=0,gi(e,void 0,!1),O<B.length&&(B[O].start>=e.end||e.type==="Program")){e.trailingComments??=[];while(O<B.length)e.trailingComments.push(B[O++])}}var B=[],O=0,If=new Map([["BlockStatement","body"],["Program","body"],["ArrayExpression","elements"],["ObjectExpression","properties"]]);function Na(e,t){for(let n=e;n<t;n++){let r=it.charCodeAt(n);if(r!==44&&r!==41&&r!==32&&r!==9)return!0}return!1}function gi(e,t,n){while(O<B.length&&B[O].start<e.start)e.leadingComments??=[],e.leadingComments.push(B[O++]);if(O>=B.length)return;let r=B[O].start;if(r<e.end||!Na(e.end,r)){let i=Sp(e),o=If.get(e.type),a=o===void 0?void 0:i[o],s=Array.isArray(a)&&a.length===0;for(let p in i){if(O>=B.length)return;if(p==="type")continue;let l=i[p];if(Array.isArray(l)){let c=p===o;for(let d=0;d<l.length;d++){let f=l[d];if(Mn(f))gi(f,e,c?d===l.length-1:s)}}else if(Mn(l))gi(l,e,s)}if(O>=B.length)return}if(t!==void 0&&e.end===t.end)return;if(n)while(O<B.length){if(t&&B[O].start>=t.end)break;e.trailingComments??=[],e.trailingComments.push(B[O++])}else if(e.end<=B[O].start&&!Na(e.end,B[O].start))e.trailingComments=[B[O++]]}var yi=!1,$a=new Map;function In(e){if(!(e instanceof RegExp))return e;let t=$a.get(e);if(!t){let n=new Set(e.source.slice(4,-2).split("|"));t={test:(r)=>n.has(r)},$a.set(e,t)}return t}var Cp=di((e)=>{let{keywordTypes:t,tokTypes:n}=e.acorn,r=new Map("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 const class extends export import super".split(" ").map((i)=>[i,t[i]]));return class extends e{constructor(i,o,a){super(i,o,a);this.keywords=In(this.keywords),this.reservedWords=In(this.reservedWords),this.reservedWordsStrict=In(this.reservedWordsStrict),this.reservedWordsStrictBind=In(this.reservedWordsStrictBind)}parseParenAndDistinguishExpression(i,o){let a=super.parseParenAndDistinguishExpression(i,o);if(a.type==="ParenthesizedExpression")yi=!0;return a}checkLocalExport(){}skipSpace(){let i=this.input,o=this.options.locations,a=this.pos,s=i.charCodeAt(a);for(;;)if(s===32||s===9)s=i.charCodeAt(++a);else if(s===10){if(s=i.charCodeAt(++a),o)this.curLine++,this.lineStart=a}else break;if(this.pos=a,s===47||s<33||s>=128)super.skipSpace()}readWord1(){let i=this.input,o=this.pos,a=o,s=i.charCodeAt(a);while(s>=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||s===95||s===36)s=i.charCodeAt(++a);if(s>=128||s===92)return super.readWord1();return this.containsEsc=!1,this.pos=a,i.slice(o,a)}readWord(){let i=this.readWord1();return this.finishToken(r.get(i)??n.name,i)}}}),Rf=fi(Cp),Mf=fi(Ln,Cp),jf=/ \(\d+:\d+\)$/;function Bn(e){return e}function wp(e){return e instanceof SyntaxError&&"pos"in e&&typeof e.pos==="number"}function Ci(e,t,n,r,i,o=e.root.comments.length){let a=e.root.comments;Nf(t,a);let s={onComment:$f,sourceType:"module",ecmaVersion:16,locations:e.loc,preserveParens:r};if(e.lfOnly)s.startLocation=Ie(n);let p;try{p=i(e.isTypeScript?Mf:Rf,s)}catch(l){if(!wp(l))throw l;Df(l.pos,l.message.replace(jf,""))}if(a.length>o)_f(Bn(p),a,n);return p}function Pp(e,t,n=0){return Bn(Ci(e,t,0,!1,(r,i)=>{if(n>0&&i.locations)i.startLocation=Ie(n);let o=new r(i,t,n).parse();return o.start=0,o},0))}var qf={count:0};function st(e,t,n,r=!1){qf.count+=1,yi=!1;let i=Bn(Ci(e,t,n,!0,(s,p)=>s.parseExpressionAt(t,n,p))),o=e.root.comments.at(-1),a=o&&o.end>i.end?o.end:i.end;return{node:yi&&!r?Dp(i):i,end:a}}function Ap(e,t,n){return Bn(Ci(e,t,n,!1,(r,i)=>{let o=new r(i,t,n);try{return o.nextToken(),o.parseStatement(null,!0,Object.create(null))}catch(a){if(wp(a)&&a.pos===t.length)oe(t.length);throw a}}))}function Dp(e){let t=e;while(t.type==="ParenthesizedExpression")t=t.expression;return qn(t,Dp),t}var Np={li:["li"],dt:["dt","dd"],dd:["dt","dd"],p:"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".split(" "),rt:["rt","rp"],rp:["rt","rp"],optgroup:["optgroup"],option:["option","optgroup"],thead:["tbody","tfoot"],tbody:["tbody","tfoot"],tfoot:["tbody"],tr:["tr","tbody"],td:["td","th","tr"],th:["td","th","tr"]};function Bf(e,t){return Object.hasOwn(Np,e)&&Np[e].includes(t)}var Xp=new Set("arguments await break case catch class const continue debugger default delete do else enum eval export extends false finally for function if implements import in instanceof interface let new null package private protected public return static super switch this throw true try typeof var void while with yield".split(" ")),wi=/<!--[\s\S]*?-->|<script\s+(?:[^>]*|(?:[^=>'"/]+=(?:"[^"]*"|'[^']*'|[^>\s]+)\s+)*)lang=(["'])?([^"' >]+)\1[^>]*>/y,Of=/\r(?!\n)|[\u2028\u2029]/;function ze(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}function Ft(e,t){let n=t;while(n<e.length&&ze(e.charCodeAt(n)))n++;return n}function Di(e,t){let n=e.codePointAt(t);if(n===void 0||!ce(n,!0))return t;let r=t+(n<=65535?1:2),i=e.codePointAt(r);while(i!==void 0&&Se(i,!0))r+=i<=65535?1:2,i=e.codePointAt(r);return r}function Ff(e){let t=e.indexOf("<");while(t!==-1){let n=e.charCodeAt(t+1);if(n===33||n===115){wi.lastIndex=t;let r=wi.exec(e);if(r){if(n===115)return r[2]==="ts";t=e.indexOf("<",wi.lastIndex);continue}}t=e.indexOf("<",t+1)}return!1}class Yp{source;index=0;loc;lfOnly;isTypeScript;css;root;stack;fragments;metaTags=new Set;lastAutoClosedTag;nextAngle=-1;nextBrace=-1;constructor(e,t,n={}){this.source=e,this.loc=n.loc??!1,this.lfOnly=this.loc&&!Of.test(e),this.isTypeScript=Ff(e),this.css=n.css??!0,this.root={type:"Root",start:0,end:t,css:null,js:[],options:null,fragment:{type:"Fragment",nodes:[]},comments:[]},this.stack=[this.root],this.fragments=[this.root.fragment]}match(e){if(e.length===1)return this.source.charCodeAt(this.index)===e.charCodeAt(0);return this.source.startsWith(e,this.index)}matchRegex(e){return e.lastIndex=this.index,e.exec(this.source)?.[0]??null}eat(e,t=!1){if(this.match(e))return this.index+=e.length,!0;if(t)Re(this.index,e);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)oe(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(){this.index=Ft(this.source,this.index)}requireWhitespace(){if(!ze(this.source.charCodeAt(this.index)))Qa(this.index);this.allowWhitespace()}eatClosingBrace(){this.allowWhitespace(),this.eat("}",!0)}sourceLocation(e,t){return this.loc?{start:Ie(e),end:Ie(t)}:void 0}readIdentifierName(){let e=this.index,t=Di(this.source,e),n=this.source.slice(e,t);if(this.index=t,Xp.has(n))vp(e,n);let r={type:"Identifier",name:n,start:e,end:t};if(this.loc)r.loc=this.sourceLocation(e,t);return r}current(){return this.stack[this.stack.length-1]}append(e){this.fragments[this.fragments.length-1].nodes.push(e)}open(e,t){this.append(e),this.stack.push(e),this.fragments.push(t)}setFragment(e){this.fragments[this.fragments.length-1]=e}close(){this.stack.pop(),this.fragments.pop()}}var Vf=["===","!==","==","!=","&&","||","??"];function Ni(e,t,n,r){return{type:"Literal",start:t,end:n,value:r,raw:e.slice(t,n)}}function $p(e,t){let n=e.charCodeAt(t);if(n===34||n===39){for(let i=t+1;i<e.length;i++){let o=e.charCodeAt(i);if(o===n)return Ni(e,t,i+1,e.slice(t+1,i));if(o===92||o===10||o===13)return null}return null}let r=t;for(;r<e.length;r++){let i=e.charCodeAt(r);if(i<48||i>57)break}if(r===t||n===48&&r-t>1)return null;return Ni(e,t,r,Number(e.slice(t,r)))}function Hf(e,t){let n=Di(e,t);if(n===t)return $p(e,t);let r=e.slice(t,n);if(r==="true"||r==="false"||r==="null")return Ni(e,t,n,r==="null"?null:r==="true");if(Xp.has(r))return null;let i={type:"Identifier",start:t,end:n,name:r};for(let o=n;;){let a=e.charCodeAt(o),s,p;if(a===46){if(p=Di(e,o+1),p===o+1)return null;s={type:"Identifier",start:o+1,end:p,name:e.slice(o+1,p)}}else if(a===91){if(s=$p(e,o+1),!s||e.charCodeAt(s.end)!==93)return null;p=s.end+1}else return i;i={type:"MemberExpression",start:t,end:p,object:i,property:s,computed:a===91,optional:!1},o=p}}function $i(e,t){if(e.charCodeAt(t)!==33||e.charCodeAt(t+1)===61)return Hf(e,t);let n=$i(e,Ft(e,t+1));if(!n)return null;return{type:"UnaryExpression",start:t,end:n.end,operator:"!",prefix:!0,argument:n}}function Lp(e,t){let n=Ft(e,t);if(n>=e.length)return!1;let r=e.charCodeAt(n);return r===125||r===41}function Gf(e,t){let n=$i(e,t);if(!n||Lp(e,n.end))return n;let r=Ft(e,n.end),i=Vf.find((s)=>e.startsWith(s,r));if(!i)return null;let o=$i(e,Ft(e,r+i.length));if(!o||!Lp(e,o.end))return null;let{end:a}=o;if(i==="&&"||i==="||"||i==="??")return{type:"LogicalExpression",start:n.start,end:a,left:n,operator:i,right:o};return{type:"BinaryExpression",start:n.start,end:a,left:n,operator:i,right:o}}function ot(e){if(e.loc={start:qt(e.start),end:qt(e.end)},e.type==="MemberExpression")ot(e.object),ot(e.property);else if(e.type==="UnaryExpression")ot(e.argument);else if(e.type==="BinaryExpression"||e.type==="LogicalExpression")ot(e.left),ot(e.right)}function K(e){let t=!e.loc||e.lfOnly?Gf(e.source,e.index):null;if(t){if(e.index=t.end,e.loc)ot(t);return t}let{node:n,end:r}=st(e,e.source,e.index);return e.index=r,n}var zf="AElig:5i AElig;:5i AMP:12 AMP;:12 Aacute:5d Aacute;:5d Abreve;:76 Acirc:5e Acirc;:5e Acy;:sw Afr;:2kn8 Agrave:5c Agrave;:5c Alpha;:pd Amacr;:74 And;:8cz Aogon;:78 Aopf;:2koo ApplyFunction;:6e9 Aring:5h Aring;:5h Ascr;:2kkc Assign;:6s4 Atilde:5f Atilde;:5f Auml:5g Auml;:5g Backslash;:6qe Barv;:8h3 Barwed;:6x2 Bcy;:sx Because;:6r9 Bernoullis;:6jw Beta;:pe Bfr;:2kn9 Bopf;:2kop Breve;:k8 Bscr;:6jw Bumpeq;:6ry CHcy;:tj COPY:4p COPY;:4p Cacute;:7a Cap;:6vm CapitalDifferentialD;:6kl Cayleys;:6jx Ccaron;:7g Ccedil:5j Ccedil;:5j Ccirc;:7c Cconint;:6r4 Cdot;:7e Cedilla;:54 CenterDot;:53 Cfr;:6jx Chi;:pz CircleDot;:6u1 CircleMinus;:6ty CirclePlus;:6tx CircleTimes;:6tz ClockwiseContourIntegral;:6r6 CloseCurlyDoubleQuote;:6cd CloseCurlyQuote;:6c9 Colon;:6rb Colone;:8dw Congruent;:6sh Conint;:6r3 ContourIntegral;:6r2 Copf;:6iq Coproduct;:6q8 CounterClockwiseContourIntegral;:6r7 Cross;:8bz Cscr;:2kke Cup;:6vn CupCap;:6rx DD;:6kl DDotrahd;:841 DJcy;:si DScy;:sl DZcy;:sv Dagger;:6ch Darr;:6n5 Dashv;:8h0 Dcaron;:7i Dcy;:t0 Del;:6pz Delta;:pg Dfr;:2knb DiacriticalAcute;:50 DiacriticalDot;:k9 DiacriticalDoubleAcute;:kd DiacriticalGrave;:2o DiacriticalTilde;:kc Diamond;:6v8 DifferentialD;:6km Dopf;:2kor Dot;:4o DotDot;:6ho DotEqual;:6s0 DoubleContourIntegral;:6r3 DoubleDot;:4o DoubleDownArrow;:6oj DoubleLeftArrow;:6og DoubleLeftRightArrow;:6ok DoubleLeftTee;:8h0 DoubleLongLeftArrow;:7w8 DoubleLongLeftRightArrow;:7wa DoubleLongRightArrow;:7w9 DoubleRightArrow;:6oi DoubleRightTee;:6ug DoubleUpArrow;:6oh DoubleUpDownArrow;:6ol DoubleVerticalBar;:6qt DownArrow;:6mr DownArrowBar;:843 DownArrowUpArrow;:6ph DownBreve;:lt DownLeftRightVector;:85s DownLeftTeeVector;:866 DownLeftVector;:6nx DownLeftVectorBar;:85y DownRightTeeVector;:867 DownRightVector;:6o1 DownRightVectorBar;:85z DownTee;:6uc DownTeeArrow;:6nb Downarrow;:6oj Dscr;:2kkf Dstrok;:7k ENG;:96 ETH:5s ETH;:5s Eacute:5l Eacute;:5l Ecaron;:7u Ecirc:5m Ecirc;:5m Ecy;:tp Edot;:7q Efr;:2knc Egrave:5k Egrave;:5k Element;:6q0 Emacr;:7m EmptySmallSquare;:7i3 EmptyVerySmallSquare;:7fv Eogon;:7s Eopf;:2kos Epsilon;:ph Equal;:8dx EqualTilde;:6rm Equilibrium;:6oc Escr;:6k0 Esim;:8dv Eta;:pj Euml:5n Euml;:5n Exists;:6pv ExponentialE;:6kn Fcy;:tg Ffr;:2knd FilledSmallSquare;:7i4 FilledVerySmallSquare;:7fu Fopf;:2kot ForAll;:6ps Fouriertrf;:6k1 Fscr;:6k1 GJcy;:sj GT:1q GT;:1q Gamma;:pf Gammad;:rg Gbreve;:7y Gcedil;:82 Gcirc;:7w Gcy;:sz Gdot;:80 Gfr;:2kne Gg;:6vt Gopf;:2kou GreaterEqual;:6sl GreaterEqualLess;:6vv GreaterFullEqual;:6sn GreaterGreater;:8f6 GreaterLess;:6t3 GreaterSlantEqual;:8e6 GreaterTilde;:6sz Gscr;:2kki Gt;:6sr HARDcy;:tm Hacek;:jr Hat;:2m Hcirc;:84 Hfr;:6j0 HilbertSpace;:6iz Hopf;:6j1 HorizontalLine;:7b4 Hscr;:6iz Hstrok;:86 HumpDownHump;:6ry HumpEqual;:6rz IEcy;:t1 IJlig;:8i IOcy;:sh Iacute:5p Iacute;:5p Icirc:5q Icirc;:5q Icy;:t4 Idot;:8g Ifr;:6j5 Igrave:5o Igrave;:5o Im;:6j5 Imacr;:8a ImaginaryI;:6ko Implies;:6oi Int;:6r0 Integral;:6qz Intersection;:6v6 InvisibleComma;:6eb InvisibleTimes;:6ea Iogon;:8e Iopf;:2kow Iota;:pl Iscr;:6j4 Itilde;:88 Iukcy;:sm Iuml:5r Iuml;:5r Jcirc;:8k Jcy;:t5 Jfr;:2knh Jopf;:2kox Jscr;:2kkl Jsercy;:so Jukcy;:sk KHcy;:th KJcy;:ss Kappa;:pm Kcedil;:8m Kcy;:t6 Kfr;:2kni Kopf;:2koy Kscr;:2kkm LJcy;:sp LT:1o LT;:1o Lacute;:8p Lambda;:pn Lang;:7vu Laplacetrf;:6j6 Larr;:6n2 Lcaron;:8t Lcedil;:8r Lcy;:t7 LeftAngleBracket;:7vs LeftArrow;:6mo LeftArrowBar;:6p0 LeftArrowRightArrow;:6o6 LeftCeiling;:6x4 LeftDoubleBracket;:7vq LeftDownTeeVector;:869 LeftDownVector;:6o3 LeftDownVectorBar;:861 LeftFloor;:6x6 LeftRightArrow;:6ms LeftRightVector;:85q LeftTee;:6ub LeftTeeArrow;:6n8 LeftTeeVector;:862 LeftTriangle;:6uq LeftTriangleBar;:89b LeftTriangleEqual;:6us LeftUpDownVector;:85t LeftUpTeeVector;:868 LeftUpVector;:6nz LeftUpVectorBar;:860 LeftVector;:6nw LeftVectorBar;:85u Leftarrow;:6og Leftrightarrow;:6ok LessEqualGreater;:6vu LessFullEqual;:6sm LessGreater;:6t2 LessLess;:8f5 LessSlantEqual;:8e5 LessTilde;:6sy Lfr;:2knj Ll;:6vs Lleftarrow;:6oq Lmidot;:8v LongLeftArrow;:7w5 LongLeftRightArrow;:7w7 LongRightArrow;:7w6 Longleftarrow;:7w8 Longleftrightarrow;:7wa Longrightarrow;:7w9 Lopf;:2koz LowerLeftArrow;:6mx LowerRightArrow;:6mw Lscr;:6j6 Lsh;:6nk Lstrok;:8x Lt;:6sq Map;:83p Mcy;:t8 MediumSpace;:6e7 Mellintrf;:6k3 Mfr;:2knk MinusPlus;:6qb Mopf;:2kp0 Mscr;:6k3 Mu;:po NJcy;:sq Nacute;:8z Ncaron;:93 Ncedil;:91 Ncy;:t9 NegativeMediumSpace;:6bv NegativeThickSpace;:6bv NegativeThinSpace;:6bv NegativeVeryThinSpace;:6bv NestedGreaterGreater;:6sr NestedLessLess;:6sq NewLine;:a Nfr;:2knl NoBreak;:6e8 NonBreakingSpace;:4g Nopf;:6j9 Not;:8h8 NotCongruent;:6si NotCupCap;:6st NotDoubleVerticalBar;:6qu NotElement;:6q1 NotEqual;:6sg NotEqualTilde;:6rm NotExists;:6pw NotGreater;:6sv NotGreaterEqual;:6sx NotGreaterFullEqual;:6sn NotGreaterGreater;:6sr NotGreaterLess;:6t5 NotGreaterSlantEqual;:8e6 NotGreaterTilde;:6t1 NotHumpDownHump;:6ry NotHumpEqual;:6rz NotLeftTriangle;:6wa NotLeftTriangleBar;:89b NotLeftTriangleEqual;:6wc NotLess;:6su NotLessEqual;:6sw NotLessGreater;:6t4 NotLessLess;:6sq NotLessSlantEqual;:8e5 NotLessTilde;:6t0 NotNestedGreaterGreater;:8f6 NotNestedLessLess;:8f5 NotPrecedes;:6tc NotPrecedesEqual;:8fj NotPrecedesSlantEqual;:6w0 NotReverseElement;:6q4 NotRightTriangle;:6wb NotRightTriangleBar;:89c NotRightTriangleEqual;:6wd NotSquareSubset;:6tr NotSquareSubsetEqual;:6w2 NotSquareSuperset;:6ts NotSquareSupersetEqual;:6w3 NotSubset;:6te NotSubsetEqual;:6tk NotSucceeds;:6td NotSucceedsEqual;:8fk NotSucceedsSlantEqual;:6w1 NotSucceedsTilde;:6tb NotSuperset;:6tf NotSupersetEqual;:6tl NotTilde;:6rl NotTildeEqual;:6ro NotTildeFullEqual;:6rr NotTildeTilde;:6rt NotVerticalBar;:6qs Nscr;:2kkp Ntilde:5t Ntilde;:5t Nu;:pp OElig;:9e Oacute:5v Oacute;:5v Ocirc:5w Ocirc;:5w Ocy;:ta Odblac;:9c Ofr;:2knm Ograve:5u Ograve;:5u Omacr;:98 Omega;:q1 Omicron;:pr Oopf;:2kp2 OpenCurlyDoubleQuote;:6cc OpenCurlyQuote;:6c8 Or;:8d0 Oscr;:2kkq Oslash:60 Oslash;:60 Otilde:5x Otilde;:5x Otimes;:8c7 Ouml:5y Ouml;:5y OverBar;:6da OverBrace;:732 OverBracket;:71w OverParenthesis;:730 PartialD;:6pu Pcy;:tb Pfr;:2knn Phi;:py Pi;:ps PlusMinus;:4x Poincareplane;:6j0 Popf;:6jd Pr;:8fv Precedes;:6t6 PrecedesEqual;:8fj PrecedesSlantEqual;:6t8 PrecedesTilde;:6ta Prime;:6cz Product;:6q7 Proportion;:6rb Proportional;:6ql Pscr;:2kkr Psi;:q0 QUOT:y QUOT;:y Qfr;:2kno Qopf;:6je Qscr;:2kks RBarr;:840 REG:4u REG;:4u Racute;:9g Rang;:7vv Rarr;:6n4 Rarrtl;:846 Rcaron;:9k Rcedil;:9i Rcy;:tc Re;:6jg ReverseElement;:6q3 ReverseEquilibrium;:6ob ReverseUpEquilibrium;:86n Rfr;:6jg Rho;:pt RightAngleBracket;:7vt RightArrow;:6mq RightArrowBar;:6p1 RightArrowLeftArrow;:6o4 RightCeiling;:6x5 RightDoubleBracket;:7vr RightDownTeeVector;:865 RightDownVector;:6o2 RightDownVectorBar;:85x RightFloor;:6x7 RightTee;:6ua RightTeeArrow;:6na RightTeeVector;:863 RightTriangle;:6ur RightTriangleBar;:89c RightTriangleEqual;:6ut RightUpDownVector;:85r RightUpTeeVector;:864 RightUpVector;:6ny RightUpVectorBar;:85w RightVector;:6o0 RightVectorBar;:85v Rightarrow;:6oi Ropf;:6jh RoundImplies;:86o Rrightarrow;:6or Rscr;:6jf Rsh;:6nl RuleDelayed;:8ac SHCHcy;:tl SHcy;:tk SOFTcy;:to Sacute;:9m Sc;:8fw Scaron;:9s Scedil;:9q Scirc;:9o Scy;:td Sfr;:2knq ShortDownArrow;:6mr ShortLeftArrow;:6mo ShortRightArrow;:6mq ShortUpArrow;:6mp Sigma;:pv SmallCircle;:6qg Sopf;:2kp6 Sqrt;:6qi Square;:7fl SquareIntersection;:6tv SquareSubset;:6tr SquareSubsetEqual;:6tt SquareSuperset;:6ts SquareSupersetEqual;:6tu SquareUnion;:6tw Sscr;:2kku Star;:6va Sub;:6vk Subset;:6vk SubsetEqual;:6ti Succeeds;:6t7 SucceedsEqual;:8fk SucceedsSlantEqual;:6t9 SucceedsTilde;:6tb SuchThat;:6q3 Sum;:6q9 Sup;:6vl Superset;:6tf SupersetEqual;:6tj Supset;:6vl THORN:66 THORN;:66 TRADE;:6jm TSHcy;:sr TScy;:ti Tab;:9 Tau;:pw Tcaron;:9w Tcedil;:9u Tcy;:te Tfr;:2knr Therefore;:6r8 Theta;:pk ThickSpace;:6e7 ThinSpace;:6bt Tilde;:6rg TildeEqual;:6rn TildeFullEqual;:6rp TildeTilde;:6rs Topf;:2kp7 TripleDot;:6hn Tscr;:2kkv Tstrok;:9y Uacute:62 Uacute;:62 Uarr;:6n3 Uarrocir;:85l Ubrcy;:su Ubreve;:a4 Ucirc:63 Ucirc;:63 Ucy;:tf Udblac;:a8 Ufr;:2kns Ugrave:61 Ugrave;:61 Umacr;:a2 UnderBar;:2n UnderBrace;:733 UnderBracket;:71x UnderParenthesis;:731 Union;:6v7 UnionPlus;:6tq Uogon;:aa Uopf;:2kp8 UpArrow;:6mp UpArrowBar;:842 UpArrowDownArrow;:6o5 UpDownArrow;:6mt UpEquilibrium;:86m UpTee;:6ud UpTeeArrow;:6n9 Uparrow;:6oh Updownarrow;:6ol UpperLeftArrow;:6mu UpperRightArrow;:6mv Upsi;:r6 Upsilon;:px Uring;:a6 Uscr;:2kkw Utilde;:a0 Uuml:64 Uuml;:64 VDash;:6uj Vbar;:8h7 Vcy;:sy Vdash;:6uh Vdashl;:8h2 Vee;:6v5 Verbar;:6c6 Vert;:6c6 VerticalBar;:6qr VerticalLine;:3g VerticalSeparator;:7rs VerticalTilde;:6rk VeryThinSpace;:6bu Vfr;:2knt Vopf;:2kp9 Vscr;:2kkx Vvdash;:6ui Wcirc;:ac Wedge;:6v4 Wfr;:2knu Wopf;:2kpa Wscr;:2kky Xfr;:2knv Xi;:pq Xopf;:2kpb Xscr;:2kkz YAcy;:tr YIcy;:sn YUcy;:tq Yacute:65 Yacute;:65 Ycirc;:ae Ycy;:tn Yfr;:2knw Yopf;:2kpc Yscr;:2kl0 Yuml;:ag ZHcy;:t2 Zacute;:ah Zcaron;:al Zcy;:t3 Zdot;:aj ZeroWidthSpace;:6bv Zeta;:pi Zfr;:6js Zopf;:6jo Zscr;:2kl1 aacute:69 aacute;:69 abreve;:77 ac;:6ri acE;:6ri acd;:6rj acirc:6a acirc;:6a acute:50 acute;:50 acy;:ts aelig:6e aelig;:6e af;:6e9 afr;:2kny agrave:68 agrave;:68 alefsym;:6k5 aleph;:6k5 alpha;:q9 amacr;:75 amalg;:8cf amp:12 amp;:12 and;:6qv andand;:8d1 andd;:8d8 andslope;:8d4 andv;:8d6 ang;:6qo ange;:884 angle;:6qo angmsd;:6qp angmsdaa;:888 angmsdab;:889 angmsdac;:88a angmsdad;:88b angmsdae;:88c angmsdaf;:88d angmsdag;:88e angmsdah;:88f angrt;:6qn angrtvb;:6v2 angrtvbd;:87x angsph;:6qq angst;:5h angzarr;:70c aogon;:79 aopf;:2kpe ap;:6rs apE;:8ds apacir;:8dr ape;:6ru apid;:6rv apos;:13 approx;:6rs approxeq;:6ru aring:6d aring;:6d ascr;:2kl2 ast;:16 asymp;:6rs asympeq;:6rx atilde:6b atilde;:6b auml:6c auml;:6c awconint;:6r7 awint;:8b5 bNot;:8h9 backcong;:6rw backepsilon;:s6 backprime;:6d1 backsim;:6rh backsimeq;:6vh barvee;:6v1 barwed;:6x1 barwedge;:6x1 bbrk;:71x bbrktbrk;:71y bcong;:6rw bcy;:tt bdquo;:6ce becaus;:6r9 because;:6r9 bemptyv;:88g bepsi;:s6 bernou;:6jw beta;:qa beth;:6k6 between;:6ss bfr;:2knz bigcap;:6v6 bigcirc;:7hr bigcup;:6v7 bigodot;:8ao bigoplus;:8ap bigotimes;:8aq bigsqcup;:8au bigstar;:7id bigtriangledown;:7gd bigtriangleup;:7g3 biguplus;:8as bigvee;:6v5 bigwedge;:6v4 bkarow;:83x blacklozenge;:8a3 blacksquare;:7fu blacktriangle;:7g4 blacktriangledown;:7ge blacktriangleleft;:7gi blacktriangleright;:7g8 blank;:74z blk12;:7f6 blk14;:7f5 blk34;:7f7 block;:7ew bne;:1p bnequiv;:6sh bnot;:6xc bopf;:2kpf bot;:6ud bottom;:6ud bowtie;:6vc boxDL;:7dj boxDR;:7dg boxDl;:7di boxDr;:7df boxH;:7dc boxHD;:7dy boxHU;:7e1 boxHd;:7dw boxHu;:7dz boxUL;:7dp boxUR;:7dm boxUl;:7do boxUr;:7dl boxV;:7dd boxVH;:7e4 boxVL;:7dv boxVR;:7ds boxVh;:7e3 boxVl;:7du boxVr;:7dr boxbox;:895 boxdL;:7dh boxdR;:7de boxdl;:7bk boxdr;:7bg boxh;:7b4 boxhD;:7dx boxhU;:7e0 boxhd;:7cc boxhu;:7ck boxminus;:6u7 boxplus;:6u6 boxtimes;:6u8 boxuL;:7dn boxuR;:7dk boxul;:7bs boxur;:7bo boxv;:7b6 boxvH;:7e2 boxvL;:7dt boxvR;:7dq boxvh;:7cs boxvl;:7c4 boxvr;:7bw bprime;:6d1 breve;:k8 brvbar:4m brvbar;:4m bscr;:2kl3 bsemi;:6dr bsim;:6rh bsime;:6vh bsol;:2k bsolb;:891 bsolhsub;:7uw bull;:6ci bullet;:6ci bump;:6ry bumpE;:8fi bumpe;:6rz bumpeq;:6rz cacute;:7b cap;:6qx capand;:8ck capbrcup;:8cp capcap;:8cr capcup;:8cn capdot;:8cg caps;:6qx caret;:6dd caron;:jr ccaps;:8ct ccaron;:7h ccedil:6f ccedil;:6f ccirc;:7d ccups;:8cs ccupssm;:8cw cdot;:7f cedil:54 cedil;:54 cemptyv;:88i cent:4i cent;:4i centerdot;:53 cfr;:2ko0 chcy;:uf check;:7pv checkmark;:7pv chi;:qv cir;:7gr cirE;:88z circ;:jq circeq;:6s7 circlearrowleft;:6nu circlearrowright;:6nv circledR;:4u circledS;:79k circledast;:6u3 circledcirc;:6u2 circleddash;:6u5 cire;:6s7 cirfnint;:8b4 cirmid;:8hb cirscir;:88y clubs;:7kz clubsuit;:7kz colon;:1m colone;:6s4 coloneq;:6s4 comma;:18 commat;:1s comp;:6pt compfn;:6qg complement;:6pt complexes;:6iq cong;:6rp congdot;:8dp conint;:6r2 copf;:2kpg coprod;:6q8 copy:4p copy;:4p copysr;:6jb crarr;:6np cross;:7pz cscr;:2kl4 csub;:8gf csube;:8gh csup;:8gg csupe;:8gi ctdot;:6wf cudarrl;:854 cudarrr;:851 cuepr;:6vy cuesc;:6vz cularr;:6nq cularrp;:859 cup;:6qy cupbrcap;:8co cupcap;:8cm cupcup;:8cq cupdot;:6tp cupor;:8cl cups;:6qy curarr;:6nr curarrm;:858 curlyeqprec;:6vy curlyeqsucc;:6vz curlyvee;:6vi curlywedge;:6vj curren:4k curren;:4k curvearrowleft;:6nq curvearrowright;:6nr cuvee;:6vi cuwed;:6vj cwconint;:6r6 cwint;:6r5 cylcty;:6y5 dArr;:6oj dHar;:86d dagger;:6cg daleth;:6k8 darr;:6mr dash;:6c0 dashv;:6ub dbkarow;:83z dblac;:kd dcaron;:7j dcy;:tw dd;:6km ddagger;:6ch ddarr;:6oa ddotseq;:8dz deg:4w deg;:4w delta;:qc demptyv;:88h dfisht;:873 dfr;:2ko1 dharl;:6o3 dharr;:6o2 diam;:6v8 diamond;:6v8 diamondsuit;:7l2 diams;:7l2 die;:4o digamma;:rh disin;:6wi div;:6v divide:6v divide;:6v divideontimes;:6vb divonx;:6vb djcy;:uq dlcorn;:6xq dlcrop;:6x9 dollar;:10 dopf;:2kph dot;:k9 doteq;:6s0 doteqdot;:6s1 dotminus;:6rc dotplus;:6qc dotsquare;:6u9 doublebarwedge;:6x2 downarrow;:6mr downdownarrows;:6oa downharpoonleft;:6o3 downharpoonright;:6o2 drbkarow;:840 drcorn;:6xr drcrop;:6x8 dscr;:2kl5 dscy;:ut dsol;:8ae dstrok;:7l dtdot;:6wh dtri;:7gf dtrif;:7ge duarr;:6ph duhar;:86n dwangle;:886 dzcy;:v3 dzigrarr;:7wf eDDot;:8dz eDot;:6s1 eacute:6h eacute;:6h easter;:8dq ecaron;:7v ecir;:6s6 ecirc:6i ecirc;:6i ecolon;:6s5 ecy;:ul edot;:7r ee;:6kn efDot;:6s2 efr;:2ko2 eg;:8ey egrave:6g egrave;:6g egs;:8eu egsdot;:8ew el;:8ex elinters;:73b ell;:6j7 els;:8et elsdot;:8ev emacr;:7n empty;:6px emptyset;:6px emptyv;:6px emsp13;:6bo emsp14;:6bp emsp;:6bn eng;:97 ensp;:6bm eogon;:7t eopf;:2kpi epar;:6vp eparsl;:89v eplus;:8dt epsi;:qd epsilon;:qd epsiv;:s5 eqcirc;:6s6 eqcolon;:6s5 eqsim;:6rm eqslantgtr;:8eu eqslantless;:8et equals;:1p equest;:6sf equiv;:6sh equivDD;:8e0 eqvparsl;:89x erDot;:6s3 erarr;:86p escr;:6jz esdot;:6s0 esim;:6rm eta;:qf eth:6o eth;:6o euml:6j euml;:6j euro;:6gc excl;:x exist;:6pv expectation;:6k0 exponentiale;:6kn fallingdotseq;:6s2 fcy;:uc female;:7k0 ffilig;:1dkz fflig;:1dkw ffllig;:1dl0 ffr;:2ko3 filig;:1dkx fjlig;:2u flat;:7l9 fllig;:1dky fltns;:7g1 fnof;:b6 fopf;:2kpj forall;:6ps fork;:6vo forkv;:8gp fpartint;:8b1 frac12:59 frac12;:59 frac13;:6kz frac14:58 frac14;:58 frac15;:6l1 frac16;:6l5 frac18;:6l7 frac23;:6l0 frac25;:6l2 frac34:5a frac34;:5a frac35;:6l3 frac38;:6l8 frac45;:6l4 frac56;:6l6 frac58;:6l9 frac78;:6la frasl;:6dg frown;:6xu fscr;:2kl7 gE;:6sn gEl;:8ek gacute;:dx gamma;:qb gammad;:rh gap;:8ee gbreve;:7z gcirc;:7x gcy;:tv gdot;:81 ge;:6sl gel;:6vv geq;:6sl geqq;:6sn geqslant;:8e6 ges;:8e6 gescc;:8fd gesdot;:8e8 gesdoto;:8ea gesdotol;:8ec gesl;:6vv gesles;:8es gfr;:2ko4 gg;:6sr ggg;:6vt gimel;:6k7 gjcy;:ur gl;:6t3 glE;:8eq gla;:8f9 glj;:8f8 gnE;:6sp gnap;:8ei gnapprox;:8ei gne;:8eg gneq;:8eg gneqq;:6sp gnsim;:6w7 gopf;:2kpk grave;:2o gscr;:6iy gsim;:6sz gsime;:8em gsiml;:8eo gt:1q gt;:1q gtcc;:8fb gtcir;:8e2 gtdot;:6vr gtlPar;:87p gtquest;:8e4 gtrapprox;:8ee gtrarr;:86w gtrdot;:6vr gtreqless;:6vv gtreqqless;:8ek gtrless;:6t3 gtrsim;:6sz gvertneqq;:6sp gvnE;:6sp hArr;:6ok hairsp;:6bu half;:59 hamilt;:6iz hardcy;:ui harr;:6ms harrcir;:85k harrw;:6nh hbar;:6j3 hcirc;:85 hearts;:7l1 heartsuit;:7l1 hellip;:6cm hercon;:6ux hfr;:2ko5 hksearow;:84l hkswarow;:84m hoarr;:6pr homtht;:6rf hookleftarrow;:6nd hookrightarrow;:6ne hopf;:2kpl horbar;:6c5 hscr;:2kl9 hslash;:6j3 hstrok;:87 hybull;:6df hyphen;:6c0 iacute:6l iacute;:6l ic;:6eb icirc:6m icirc;:6m icy;:u0 iecy;:tx iexcl:4h iexcl;:4h iff;:6ok ifr;:2ko6 igrave:6k igrave;:6k ii;:6ko iiiint;:8b0 iiint;:6r1 iinfin;:89o iiota;:6jt ijlig;:8j imacr;:8b image;:6j5 imagline;:6j4 imagpart;:6j5 imath;:8h imof;:6uv imped;:c5 in;:6q0 incare;:6it infin;:6qm infintie;:89p inodot;:8h int;:6qz intcal;:6uy integers;:6jo intercal;:6uy intlarhk;:8bb intprod;:8cc iocy;:up iogon;:8f iopf;:2kpm iota;:qh iprod;:8cc iquest:5b iquest;:5b iscr;:2kla isin;:6q0 isinE;:6wp isindot;:6wl isins;:6wk isinsv;:6wj isinv;:6q0 it;:6ea itilde;:89 iukcy;:uu iuml:6n iuml;:6n jcirc;:8l jcy;:u1 jfr;:2ko7 jmath;:fr jopf;:2kpn jscr;:2klb jsercy;:uw jukcy;:us kappa;:qi kappav;:s0 kcedil;:8n kcy;:u2 kfr;:2ko8 kgreen;:8o khcy;:ud kjcy;:v0 kopf;:2kpo kscr;:2klc lAarr;:6oq lArr;:6og lAtail;:84b lBarr;:83y lE;:6sm lEg;:8ej lHar;:86a lacute;:8q laemptyv;:88k lagran;:6j6 lambda;:qj lang;:7vs langd;:87l langle;:7vs lap;:8ed laquo:4r laquo;:4r larr;:6mo larrb;:6p0 larrbfs;:84f larrfs;:84d larrhk;:6nd larrlp;:6nf larrpl;:855 larrsim;:86r larrtl;:6n6 lat;:8ff latail;:849 late;:8fh lates;:8fh lbarr;:83w lbbrk;:7si lbrace;:3f lbrack;:2j lbrke;:87f lbrksld;:87j lbrkslu;:87h lcaron;:8u lcedil;:8s lceil;:6x4 lcub;:3f lcy;:u3 ldca;:852 ldquo;:6cc ldquor;:6ce ldrdhar;:86f ldrushar;:85n ldsh;:6nm le;:6sk leftarrow;:6mo leftarrowtail;:6n6 leftharpoondown;:6nx leftharpoonup;:6nw leftleftarrows;:6o7 leftrightarrow;:6ms leftrightarrows;:6o6 leftrightharpoons;:6ob leftrightsquigarrow;:6nh leftthreetimes;:6vf leg;:6vu leq;:6sk leqq;:6sm leqslant;:8e5 les;:8e5 lescc;:8fc lesdot;:8e7 lesdoto;:8e9 lesdotor;:8eb lesg;:6vu lesges;:8er lessapprox;:8ed lessdot;:6vq lesseqgtr;:6vu lesseqqgtr;:8ej lessgtr;:6t2 lesssim;:6sy lfisht;:870 lfloor;:6x6 lfr;:2ko9 lg;:6t2 lgE;:8ep lhard;:6nx lharu;:6nw lharul;:86i lhblk;:7es ljcy;:ux ll;:6sq llarr;:6o7 llcorner;:6xq llhard;:86j lltri;:7i2 lmidot;:8w lmoust;:71s lmoustache;:71s lnE;:6so lnap;:8eh lnapprox;:8eh lne;:8ef lneq;:8ef lneqq;:6so lnsim;:6w6 loang;:7vw loarr;:6pp lobrk;:7vq longleftarrow;:7w5 longleftrightarrow;:7w7 longmapsto;:7wc longrightarrow;:7w6 looparrowleft;:6nf looparrowright;:6ng lopar;:879 lopf;:2kpp loplus;:8bx lotimes;:8c4 lowast;:6qf lowbar;:2n loz;:7gq lozenge;:7gq lozf;:8a3 lpar;:14 lparlt;:87n lrarr;:6o6 lrcorner;:6xr lrhar;:6ob lrhard;:86l lrm;:6by lrtri;:6v3 lsaquo;:6d5 lscr;:2kld lsh;:6nk lsim;:6sy lsime;:8el lsimg;:8en lsqb;:2j lsquo;:6c8 lsquor;:6ca lstrok;:8y lt:1o lt;:1o ltcc;:8fa ltcir;:8e1 ltdot;:6vq lthree;:6vf ltimes;:6vd ltlarr;:86u ltquest;:8e3 ltrPar;:87q ltri;:7gj ltrie;:6us ltrif;:7gi lurdshar;:85m luruhar;:86e lvertneqq;:6so lvnE;:6so mDDot;:6re macr:4v macr;:4v male;:7k2 malt;:7q8 maltese;:7q8 map;:6na mapsto;:6na mapstodown;:6nb mapstoleft;:6n8 mapstoup;:6n9 marker;:7fy mcomma;:8bt mcy;:u4 mdash;:6c4 measuredangle;:6qp mfr;:2koa mho;:6jr micro:51 micro;:51 mid;:6qr midast;:16 midcir;:8hc middot:53 middot;:53 minus;:6qa minusb;:6u7 minusd;:6rc minusdu;:8bu mlcp;:8gr mldr;:6cm mnplus;:6qb models;:6uf mopf;:2kpq mp;:6qb mscr;:2kle mstpos;:6ri mu;:qk multimap;:6uw mumap;:6uw nGg;:6vt nGt;:6sr nGtv;:6sr nLeftarrow;:6od nLeftrightarrow;:6oe nLl;:6vs nLt;:6sq nLtv;:6sq nRightarrow;:6of nVDash;:6un nVdash;:6um nabla;:6pz nacute;:90 nang;:6qo nap;:6rt napE;:8ds napid;:6rv napos;:95 napprox;:6rt natur;:7la natural;:7la naturals;:6j9 nbsp:4g nbsp;:4g nbump;:6ry nbumpe;:6rz ncap;:8cj ncaron;:94 ncedil;:92 ncong;:6rr ncongdot;:8dp ncup;:8ci ncy;:u5 ndash;:6c3 ne;:6sg neArr;:6on nearhk;:84k nearr;:6mv nearrow;:6mv nedot;:6s0 nequiv;:6si nesear;:84o nesim;:6rm nexist;:6pw nexists;:6pw nfr;:2kob ngE;:6sn nge;:6sx ngeq;:6sx ngeqq;:6sn ngeqslant;:8e6 nges;:8e6 ngsim;:6t1 ngt;:6sv ngtr;:6sv nhArr;:6oe nharr;:6ni nhpar;:8he ni;:6q3 nis;:6ws nisd;:6wq niv;:6q3 njcy;:uy nlArr;:6od nlE;:6sm nlarr;:6my nldr;:6cl nle;:6sw nleftarrow;:6my nleftrightarrow;:6ni nleq;:6sw nleqq;:6sm nleqslant;:8e5 nles;:8e5 nless;:6su nlsim;:6t0 nlt;:6su nltri;:6wa nltrie;:6wc nmid;:6qs nopf;:2kpr not:4s not;:4s notin;:6q1 notinE;:6wp notindot;:6wl notinva;:6q1 notinvb;:6wn notinvc;:6wm notni;:6q4 notniva;:6q4 notnivb;:6wu notnivc;:6wt npar;:6qu nparallel;:6qu nparsl;:8hp npart;:6pu npolint;:8b8 npr;:6tc nprcue;:6w0 npre;:8fj nprec;:6tc npreceq;:8fj nrArr;:6of nrarr;:6mz nrarrc;:84z nrarrw;:6n1 nrightarrow;:6mz nrtri;:6wb nrtrie;:6wd nsc;:6td nsccue;:6w1 nsce;:8fk nscr;:2klf nshortmid;:6qs nshortparallel;:6qu nsim;:6rl nsime;:6ro nsimeq;:6ro nsmid;:6qs nspar;:6qu nsqsube;:6w2 nsqsupe;:6w3 nsub;:6tg nsubE;:8g5 nsube;:6tk nsubset;:6te nsubseteq;:6tk nsubseteqq;:8g5 nsucc;:6td nsucceq;:8fk nsup;:6th nsupE;:8g6 nsupe;:6tl nsupset;:6tf nsupseteq;:6tl nsupseteqq;:8g6 ntgl;:6t5 ntilde:6p ntilde;:6p ntlg;:6t4 ntriangleleft;:6wa ntrianglelefteq;:6wc ntriangleright;:6wb ntrianglerighteq;:6wd nu;:ql num;:z numero;:6ja numsp;:6br nvDash;:6ul nvHarr;:83o nvap;:6rx nvdash;:6uk nvge;:6sl nvgt;:1q nvinfin;:89q nvlArr;:83m nvle;:6sk nvlt;:1o nvltrie;:6us nvrArr;:83n nvrtrie;:6ut nvsim;:6rg nwArr;:6om nwarhk;:84j nwarr;:6mu nwarrow;:6mu nwnear;:84n oS;:79k oacute:6r oacute;:6r oast;:6u3 ocir;:6u2 ocirc:6s ocirc;:6s ocy;:u6 odash;:6u5 odblac;:9d odiv;:8c8 odot;:6u1 odsold;:88s oelig;:9f ofcir;:88v ofr;:2koc ogon;:kb ograve:6q ograve;:6q ogt;:88x ohbar;:88l ohm;:q1 oint;:6r2 olarr;:6nu olcir;:88u olcross;:88r oline;:6da olt;:88w omacr;:99 omega;:qx omicron;:qn omid;:88m ominus;:6ty oopf;:2kps opar;:88n operp;:88p oplus;:6tx or;:6qw orarr;:6nv ord;:8d9 order;:6k4 orderof;:6k4 ordf:4q ordf;:4q ordm:56 ordm;:56 origof;:6uu oror;:8d2 orslope;:8d3 orv;:8d7 oscr;:6k4 oslash:6w oslash;:6w osol;:6u0 otilde:6t otilde;:6t otimes;:6tz otimesas;:8c6 ouml:6u ouml;:6u ovbar;:6yl par;:6qt para:52 para;:52 parallel;:6qt parsim;:8hf parsl;:8hp part;:6pu pcy;:u7 percnt;:11 period;:1a permil;:6cw perp;:6ud pertenk;:6cx pfr;:2kod phi;:qu phiv;:r9 phmmat;:6k3 phone;:7im pi;:qo pitchfork;:6vo piv;:ra planck;:6j3 planckh;:6j2 plankv;:6j3 plus;:17 plusacir;:8bn plusb;:6u6 pluscir;:8bm plusdo;:6qc plusdu;:8bp pluse;:8du plusmn:4x plusmn;:4x plussim;:8bq plustwo;:8br pm;:4x pointint;:8b9 popf;:2kpt pound:4j pound;:4j pr;:6t6 prE;:8fn prap;:8fr prcue;:6t8 pre;:8fj prec;:6t6 precapprox;:8fr preccurlyeq;:6t8 preceq;:8fj precnapprox;:8ft precneqq;:8fp precnsim;:6w8 precsim;:6ta prime;:6cy primes;:6jd prnE;:8fp prnap;:8ft prnsim;:6w8 prod;:6q7 profalar;:6y6 profline;:6xe profsurf;:6xf prop;:6ql propto;:6ql prsim;:6ta prurel;:6uo pscr;:2klh psi;:qw puncsp;:6bs qfr;:2koe qint;:8b0 qopf;:2kpu qprime;:6dz qscr;:2kli quaternions;:6j1 quatint;:8ba quest;:1r questeq;:6sf quot:y quot;:y rAarr;:6or rArr;:6oi rAtail;:84c rBarr;:83z rHar;:86c race;:6rh racute;:9h radic;:6qi raemptyv;:88j rang;:7vt rangd;:87m range;:885 rangle;:7vt raquo:57 raquo;:57 rarr;:6mq rarrap;:86t rarrb;:6p1 rarrbfs;:84g rarrc;:84z rarrfs;:84e rarrhk;:6ne rarrlp;:6ng rarrpl;:85h rarrsim;:86s rarrtl;:6n7 rarrw;:6n1 ratail;:84a ratio;:6ra rationals;:6je rbarr;:83x rbbrk;:7sj rbrace;:3h rbrack;:2l rbrke;:87g rbrksld;:87i rbrkslu;:87k rcaron;:9l rcedil;:9j rceil;:6x5 rcub;:3h rcy;:u8 rdca;:853 rdldhar;:86h rdquo;:6cd rdquor;:6cd rdsh;:6nn real;:6jg realine;:6jf realpart;:6jg reals;:6jh rect;:7fx reg:4u reg;:4u rfisht;:871 rfloor;:6x7 rfr;:2kof rhard;:6o1 rharu;:6o0 rharul;:86k rho;:qp rhov;:s1 rightarrow;:6mq rightarrowtail;:6n7 rightharpoondown;:6o1 rightharpoonup;:6o0 rightleftarrows;:6o4 rightleftharpoons;:6oc rightrightarrows;:6o9 rightsquigarrow;:6n1 rightthreetimes;:6vg ring;:ka risingdotseq;:6s3 rlarr;:6o4 rlhar;:6oc rlm;:6bz rmoust;:71t rmoustache;:71t rnmid;:8ha roang;:7vx roarr;:6pq robrk;:7vr ropar;:87a ropf;:2kpv roplus;:8by rotimes;:8c5 rpar;:15 rpargt;:87o rppolint;:8b6 rrarr;:6o9 rsaquo;:6d6 rscr;:2klj rsh;:6nl rsqb;:2l rsquo;:6c9 rsquor;:6c9 rthree;:6vg rtimes;:6ve rtri;:7g9 rtrie;:6ut rtrif;:7g8 rtriltri;:89a ruluhar;:86g rx;:6ji sacute;:9n sbquo;:6ca sc;:6t7 scE;:8fo scap;:8fs scaron;:9t sccue;:6t9 sce;:8fk scedil;:9r scirc;:9p scnE;:8fq scnap;:8fu scnsim;:6w9 scpolint;:8b7 scsim;:6tb scy;:u9 sdot;:6v9 sdotb;:6u9 sdote;:8di seArr;:6oo searhk;:84l searr;:6mw searrow;:6mw sect:4n sect;:4n semi;:1n seswar;:84p setminus;:6qe setmn;:6qe sext;:7qu sfr;:2kog sfrown;:6xu sharp;:7lb shchcy;:uh shcy;:ug shortmid;:6qr shortparallel;:6qt shy:4t shy;:4t sigma;:qr sigmaf;:qq sigmav;:qq sim;:6rg simdot;:8dm sime;:6rn simeq;:6rn simg;:8f2 simgE;:8f4 siml;:8f1 simlE;:8f3 simne;:6rq simplus;:8bo simrarr;:86q slarr;:6mo smallsetminus;:6qe smashp;:8c3 smeparsl;:89w smid;:6qr smile;:6xv smt;:8fe smte;:8fg smtes;:8fg softcy;:uk sol;:1b solb;:890 solbar;:6yn sopf;:2kpw spades;:7kw spadesuit;:7kw spar;:6qt sqcap;:6tv sqcaps;:6tv sqcup;:6tw sqcups;:6tw sqsub;:6tr sqsube;:6tt sqsubset;:6tr sqsubseteq;:6tt sqsup;:6ts sqsupe;:6tu sqsupset;:6ts sqsupseteq;:6tu squ;:7fl square;:7fl squarf;:7fu squf;:7fu srarr;:6mq sscr;:2klk ssetmn;:6qe ssmile;:6xv sstarf;:6va star;:7ie starf;:7id straightepsilon;:s5 straightphi;:r9 strns;:4v sub;:6te subE;:8g5 subdot;:8fx sube;:6ti subedot;:8g3 submult;:8g1 subnE;:8gb subne;:6tm subplus;:8fz subrarr;:86x subset;:6te subseteq;:6ti subseteqq;:8g5 subsetneq;:6tm subsetneqq;:8gb subsim;:8g7 subsub;:8gl subsup;:8gj succ;:6t7 succapprox;:8fs succcurlyeq;:6t9 succeq;:8fk succnapprox;:8fu succneqq;:8fq succnsim;:6w9 succsim;:6tb sum;:6q9 sung;:7l6 sup1:55 sup1;:55 sup2:4y sup2;:4y sup3:4z sup3;:4z sup;:6tf supE;:8g6 supdot;:8fy supdsub;:8go supe;:6tj supedot;:8g4 suphsol;:7ux suphsub;:8gn suplarr;:86z supmult;:8g2 supnE;:8gc supne;:6tn supplus;:8g0 supset;:6tf supseteq;:6tj supseteqq;:8g6 supsetneq;:6tn supsetneqq;:8gc supsim;:8g8 supsub;:8gk supsup;:8gm swArr;:6op swarhk;:84m swarr;:6mx swarrow;:6mx swnwar;:84q szlig:67 szlig;:67 target;:6xi tau;:qs tbrk;:71w tcaron;:9x tcedil;:9v tcy;:ua tdot;:6hn telrec;:6xh tfr;:2koh there4;:6r8 therefore;:6r8 theta;:qg thetasym;:r5 thetav;:r5 thickapprox;:6rs thicksim;:6rg thinsp;:6bt thkap;:6rs thksim;:6rg thorn:72 thorn;:72 tilde;:kc times:5z times;:5z timesb;:6u8 timesbar;:8c1 timesd;:8c0 tint;:6r1 toea;:84o top;:6uc topbot;:6ye topcir;:8hd topf;:2kpx topfork;:8gq tosa;:84p tprime;:6d0 trade;:6jm triangle;:7g5 triangledown;:7gf triangleleft;:7gj trianglelefteq;:6us triangleq;:6sc triangleright;:7g9 trianglerighteq;:6ut tridot;:7ho trie;:6sc triminus;:8ca triplus;:8c9 trisb;:899 tritime;:8cb trpezium;:736 tscr;:2kll tscy;:ue tshcy;:uz tstrok;:9z twixt;:6ss twoheadleftarrow;:6n2 twoheadrightarrow;:6n4 uArr;:6oh uHar;:86b uacute:6y uacute;:6y uarr;:6mp ubrcy;:v2 ubreve;:a5 ucirc:6z ucirc;:6z ucy;:ub udarr;:6o5 udblac;:a9 udhar;:86m ufisht;:872 ufr;:2koi ugrave:6x ugrave;:6x uharl;:6nz uharr;:6ny uhblk;:7eo ulcorn;:6xo ulcorner;:6xo ulcrop;:6xb ultri;:7i0 umacr;:a3 uml:4o uml;:4o uogon;:ab uopf;:2kpy uparrow;:6mp updownarrow;:6mt upharpoonleft;:6nz upharpoonright;:6ny uplus;:6tq upsi;:qt upsih;:r6 upsilon;:qt upuparrows;:6o8 urcorn;:6xp urcorner;:6xp urcrop;:6xa uring;:a7 urtri;:7i1 uscr;:2klm utdot;:6wg utilde;:a1 utri;:7g5 utrif;:7g4 uuarr;:6o8 uuml:70 uuml;:70 uwangle;:887 vArr;:6ol vBar;:8h4 vBarv;:8h5 vDash;:6ug vangrt;:87w varepsilon;:s5 varkappa;:s0 varnothing;:6px varphi;:r9 varpi;:ra varpropto;:6ql varr;:6mt varrho;:s1 varsigma;:qq varsubsetneq;:6tm varsubsetneqq;:8gb varsupsetneq;:6tn varsupsetneqq;:8gc vartheta;:r5 vartriangleleft;:6uq vartriangleright;:6ur vcy;:tu vdash;:6ua vee;:6qw veebar;:6uz veeeq;:6sa vellip;:6we verbar;:3g vert;:3g vfr;:2koj vltri;:6uq vnsub;:6te vnsup;:6tf vopf;:2kpz vprop;:6ql vrtri;:6ur vscr;:2kln vsubnE;:8gb vsubne;:6tm vsupnE;:8gc vsupne;:6tn vzigzag;:87u wcirc;:ad wedbar;:8db wedge;:6qv wedgeq;:6s9 weierp;:6jc wfr;:2kok wopf;:2kq0 wp;:6jc wr;:6rk wreath;:6rk wscr;:2klo xcap;:6v6 xcirc;:7hr xcup;:6v7 xdtri;:7gd xfr;:2kol xhArr;:7wa xharr;:7w7 xi;:qm xlArr;:7w8 xlarr;:7w5 xmap;:7wc xnis;:6wr xodot;:8ao xopf;:2kq1 xoplus;:8ap xotime;:8aq xrArr;:7w9 xrarr;:7w6 xscr;:2klp xsqcup;:8au xuplus;:8as xutri;:7g3 xvee;:6v5 xwedge;:6v4 yacute:71 yacute;:71 yacy;:un ycirc;:af ycy;:uj yen:4l yen;:4l yfr;:2kom yicy;:uv yopf;:2kq2 yscr;:2klq yucy;:um yuml:73 yuml;:73 zacute;:ai zcaron;:am zcy;:tz zdot;:ak zeetrf;:6js zeta;:qe zfr;:2kon zhcy;:ty zigrarr;:6ot zopf;:2kq3 zscr;:2klr zwj;:6bx zwnj;:6bw",Wf=[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],Ot,Li=0;function Uf(){if(Ot)return Ot;Ot=new Map;for(let e of zf.split(" ")){let t=e.indexOf(":");Ot.set(e.slice(0,t),Number.parseInt(e.slice(t+1),36)),Li=Math.max(Li,t)}return Ot}var Ri=(e)=>e>=48&&e<=57,Jf=(e)=>Ri(e)||e>=65&&e<=70||e>=97&&e<=102,_p=(e)=>Ri(e)||e>=65&&e<=90||e>=97&&e<=122,Fn=0;function Kf(e,t,n){if(e.charCodeAt(t)===35){let o=(e.charCodeAt(t+1)|32)===120,a=t+(o?2:1),s=a;while(s<e.length&&(o?Jf:Ri)(e.charCodeAt(s)))s++;if(s===a)return 0;return Fn=e.charCodeAt(s)===59?s+1:s,Number.parseInt(e.slice(a,s),o?16:10)}let r=Uf(),i=t;while(i-t<Li&&_p(e.charCodeAt(i)))i++;if(e.charCodeAt(i)===59){let o=r.get(e.slice(t,i+1));if(o!==void 0)return Fn=i+1,o}for(let o=i;o>t;o--){let a=r.get(e.slice(t,o));if(a===void 0)continue;if(n){let s=e.charCodeAt(o);if(_p(s)||s===95||s===61)continue}return Fn=o,a}return 0}function Xf(e,t){if(e===10&&!t)return 32;if(e<128)return e;if(e<=159)return Wf[e-128];if(e>=55296&&e<=57343)return 0;if(e<=196607)return e;if(e>=917504&&e<=917631||e>=917760&&e<=917999)return e;return 0}function Mi(e,t){let n=e.indexOf("&");if(n===-1)return e;let r="",i=0;while(n!==-1){let o=Kf(e,n+1,t);if(o)r+=e.slice(i,n)+String.fromCodePoint(Xf(o,t)),i=Fn;n=e.indexOf("&",o?i:n+1)}return r+e.slice(i)}var Ip=/<\/script\s*>/g,Yf=new Set(["server","client","worker","test","default"]);function Qf(e,t,n){let{source:r,index:i}=e;if(i>=r.length)oe(r.length);Ip.lastIndex=i;let o=Ip.exec(r);if(!o)vi(r.length,"script");e.index=o.index+o[0].length;let a=Pp(e,r.slice(0,o.index),i);if(a.start=i,a.loc)Object.assign(a.loc.start,qt(t)),Object.assign(a.loc.end,qt(e.index));let s="default";for(let p of n){if(Yf.has(p.name))rp(p,p.name);if(p.name==="module"){if(p.value!==!0)tp(p,p.name);s="module"}if(p.name==="context"){let l=p.value;if(l===!0||!Array.isArray(l)||l.length!==1||l[0].type!=="Text"||l[0].data!=="module")np(p);s="module"}}return{type:"Script",start:t,end:e.index,context:s,content:a,attributes:n}}var Zf=/(even|odd|\+?(\d+|\d*n(\s*[+-]\s*\d+)?)|-\d*n(\s*\+\s*\d+))((?=\s*[,)])|\s+of(\s+|(?=[.#[*:&])))/y,eh=/\d+(\.\d+)?%/y,th=/\\[0-9a-fA-F]{1,6}(\r\n|\s)?/y,nh=/\s*>/y,Me=-1,ji=34,rh=35,ih=36,sh=38,qi=39,oh=40,ah=41,Vt=42,ph=43,lh=45,ch=46,Bi=47,_i=58,uh=59,Qp=60,Rp=61,dh=62,fh=91,Wn=92,hh=93,mh=94,Zp=123,Ii=124,gh=125,el=126,Vn=[];function yh(e,t,n){let r=e.index;Vn=[];let i=e.css?xh(e):bh(e),o=e.index;return e.eat("</style",!0),e.read(nh),{type:"StyleSheet",start:t,end:e.index,attributes:n,children:i,comments:Vn,content:{start:r,end:o,styles:e.source.slice(r,o),comment:null}}}function bh(e){let{source:t,index:n}=e;while(n<t.length){let r=t.charCodeAt(n);if(r===Bi&&t.charCodeAt(n+1)===Vt){let i=t.indexOf("*/",n+2);n=i===-1?t.length:i+2}else if(r===ji||r===qi){n++;while(n<t.length){let i=t.charCodeAt(n);if(i===r||i===10)break;n+=i===Wn?2:1}n++}else if(r===Qp&&t.startsWith("</style",n))break;else n++}return e.index=Math.min(n,t.length),[]}function xh(e){let t=[];for(;;){if(at(e,!0),e.match("</style")||e.index>=e.source.length)break;t.push(e.match("@")?tl(e):nl(e))}return t}function tl(e){let t=e.index;e.eat("@",!0);let n=Ge(e),r=Oi(e,!0),i=null;if(e.match("{"))i=sl(e);else e.eat(";",!0);return{type:"Atrule",start:t,end:e.index,name:n,prelude:r,block:i}}function nl(e){let t=e.index;return{type:"Rule",prelude:rl(e,!1),block:sl(e),start:t,end:e.index}}function rl(e,t){let n=[];at(e,!0);let r=e.index;while(e.index<e.source.length){n.push(vh(e,t));let i=e.index;if(at(e,!0),e.match(t?")":"{"))return{type:"SelectorList",start:r,end:i,children:n};e.eat(",",!0),at(e,!0)}return oe(e.source.length)}function Mp(e,t){return{type:"RelativeSelector",combinator:e,selectors:[],start:t,end:-1}}function vh(e,t){let{source:n,index:r}=e,i=[],o=Mp(null,e.index);while(e.index<n.length){let a=e.index,s=n.charCodeAt(a),p=o.selectors;if(s===sh)e.index++,p.push({type:"NestingSelector",name:"&",start:a,end:e.index});else if(s===Vt)e.index++,p.push(jp(e,a,"*"));else if(s===rh)e.index++,p.push({type:"IdSelector",name:Ge(e),start:a,end:e.index});else if(s===ch)e.index++,p.push({type:"ClassSelector",name:Ge(e),start:a,end:e.index});else if(s===_i){let f=n.charCodeAt(a+1)===_i;e.index+=f?2:1;let h=Ge(e),g=null;if(e.eat("("))g=rl(e,!0),e.eat(")",!0);if(f)p.push({type:"PseudoElementSelector",name:h,start:a,end:e.index,...g&&{args:g}});else p.push({type:"PseudoClassSelector",name:h,args:g,start:a,end:e.index})}else if(s===fh)e.index++,p.push(Eh(e,a));else{let f=t?e.read(Zf):null,h=!f&&Hn(s)?e.read(eh):null;if(f)p.push({type:"Nth",value:f,start:a,end:e.index});else if(h)p.push({type:"Percentage",value:h,start:a,end:e.index});else if(il(n,a)===0){let g=Ge(e);p.push(jp(e,a,g))}}let l=e.index;at(e,!1);let c=e.match(",")||e.match(t?")":"{");if(e.index=l,c)return o.end=l,i.push(o),{type:"ComplexSelector",start:r,end:l,children:i};let d=Th(e);if(d){if(o.selectors.length>0)o.end=l,i.push(o);if(o=Mp(d,d.start),e.allowWhitespace(),e.match(",")||e.match(t?")":"{"))Ha(e.index)}}return oe(n.length)}function jp(e,t,n){let r=n,i;if(e.eat("|"))i=r,r=e.eat("*")?"*":Ge(e);return{type:"TypeSelector",name:r,...i!==void 0&&{namespace:i},start:t,end:e.index}}function Eh(e,t){let n=e.source;e.allowWhitespace();let r=Ge(e);e.allowWhitespace();let i=null,o=null,a=n.charCodeAt(e.index);if(a===Rp)o="=";else if((a===el||a===mh||a===ih||a===Vt||a===Ii)&&n.charCodeAt(e.index+1)===Rp)o=n.slice(e.index,e.index+2);if(o)e.index+=o.length,e.allowWhitespace(),i=wh(e);e.allowWhitespace();let s=e.index;while(al(n.charCodeAt(e.index)))e.index++;let p=e.index>s?n.slice(s,e.index):null;return e.allowWhitespace(),e.eat("]",!0),{type:"AttributeSelector",start:t,end:e.index,name:r,matcher:o,value:i,flags:p}}function il(e,t){let n=e.charCodeAt(t);if(n===ph||n===el||n===dh)return 1;if(n===Ii&&e.charCodeAt(t+1)===Ii)return 2;return 0}function Th(e){let t=e.index;e.allowWhitespace();let n=e.index,r=il(e.source,n);if(r>0){e.index+=r;let i=e.index;return e.allowWhitespace(),{type:"Combinator",name:e.source.slice(n,i),start:n,end:i}}if(e.index!==t)return{type:"Combinator",name:" ",start:t,end:e.index};return null}function sl(e){let t=e.index;e.eat("{",!0);let n=[];while(e.index<e.source.length){if(at(e,!0),e.match("}"))break;n.push(Sh(e))}return e.eat("}",!0),{type:"Block",start:t,end:e.index,children:n}}function Sh(e){if(e.match("@"))return tl(e);let t=e.index;Oi(e,!1);let n=e.source.charCodeAt(e.index);return e.index=t,n===Zp?nl(e):kh(e)}function kh(e){let{source:t,index:n}=e;if(n>=t.length)oe(t.length);let r=n;while(r<t.length){let p=t.charCodeAt(r);if(p===_i||ze(p))break;r++}let i=t.slice(n,r);e.index=r,e.allowWhitespace(),e.eat(":");let o=e.index;e.allowWhitespace();let a=Oi(e,!0);if(!a&&!i.startsWith("--"))Va({start:n,end:o});let s=e.index;if(!e.match("}"))e.eat(";",!0);return{type:"Declaration",start:n,end:s,property:i,value:a}}function Oi(e,t){let n=e.source,r=n.length,i="",o=e.index,a=null,s=!1,p=!1,l=Me,c=e.index;while(c<r){let d=n.charCodeAt(c);if(s){s=!1,c++;continue}if(d===Wn){s=!0,c++;continue}if(d===l)l=Me;else if(d===ah)p=!1;else if(l===Me&&(d===ji||d===qi))l=d;else if(d===oh){if(Ch(n,i,o,c))p=!0}else if((d===uh||d===Zp||d===gh)&&!p&&l===Me){if(e.index=c,!t)return"";if(i+=n.slice(o,c),a){let f=i.length-i.trimStart().length;for(let h of a)h.position=Math.max(0,(h.position??0)-f)}return i.trim()}else if(d===Bi&&!p&&l===Me&&n.charCodeAt(c+1)===Vt){i+=n.slice(o,c),e.index=c;let f=ol(e);if(t)f.position=i.length,Vn.push(f),a??=[],a.push(f);c=e.index,o=c;continue}c++}return e.index=r,oe(r)}function Ch(e,t,n,r){if(r-n>=3)return e.charCodeAt(r-3)===117&&e.charCodeAt(r-2)===114&&e.charCodeAt(r-1)===108;return(t+e.slice(n,r)).endsWith("url")}function wh(e){let t=e.source,n=Me;if(e.eat('"'))n=ji;else if(e.eat("'"))n=qi;let r=e.index,i=!1,o=r;while(o<t.length){let a=t.charCodeAt(o);if(i)i=!1;else if(a===Wn)i=!0;else if(n===Me?a===hh||ze(a):a===n)return e.index=n===Me?o:o+1,t.slice(r,o).trim();o++}return e.index=o,oe(t.length)}function Ge(e){let{source:t,index:n}=e,r=t.charCodeAt(n);if(Hn(r)||r===lh&&Hn(t.charCodeAt(n+1)))bi(n);let i="",o=n,a=n;while(a<t.length){let s=t.charCodeAt(a);if(s===Wn){i+=t.slice(o,a),e.index=a;let p=e.matchRegex(th);if(p){let l=String.fromCodePoint(Number.parseInt(p.slice(1),16));i+=l==="\\"?"\\\\":l,a+=p.length}else i+=`\\${t[a+1]}`,a+=2;o=a}else if(s>=160||Ph(s))a++;else break}if(i+=t.slice(o,a),e.index=a,i==="")bi(n);return i}function at(e,t){let n=e.source;e.allowWhitespace();for(;;){let r=n.charCodeAt(e.index);if(r===Bi&&n.charCodeAt(e.index+1)===Vt){let i=ol(e);if(t)Vn.push(i)}else if(r===Qp&&e.eat("<!--"))e.readUntil("-->"),e.eat("-->",!0);else break;e.allowWhitespace()}}function ol(e){let t=e.index;e.eat("/*",!0);let n=e.readUntil("*/");return e.eat("*/",!0),{type:"CSSComment",value:n,start:t,end:e.index}}function Hn(e){return e>=48&&e<=57}function al(e){return e>=65&&e<=90||e>=97&&e<=122}function Ph(e){return al(e)||Hn(e)||e===95||e===45}var Pi=/<\/textarea(\s[^>]*)?>/iy,Ah=/^![a-zA-Z]+$/,Dh=/^[a-zA-Z][a-zA-Z0-9]*:[a-zA-Z][a-zA-Z0-9-]*[a-zA-Z0-9]$/,Nh=/^[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}]*)?$/u,Ai="\\u200C\\u200D",$h=new RegExp(`^(?:\\p{Lu}[$${Ai}\\p{ID_Continue}.]*|\\p{ID_Start}[$${Ai}\\p{ID_Continue}]*(?:\\.[$${Ai}\\p{ID_Continue}]+)+)$`,"u"),Lh=new Set("area base br col command embed hr img input keygen link meta param source track wbr".split(" ")),_h=new Map([["use","UseDirective"],["animate","AnimateDirective"],["bind","BindDirective"],["class","ClassDirective"],["style","StyleDirective"],["on","OnDirective"],["let","LetDirective"],["in","TransitionDirective"],["out","TransitionDirective"],["transition","TransitionDirective"]]),Fi=new Map([["svelte:head",["SvelteHead",!0]],["svelte:options",["SvelteOptions",!0]],["svelte:window",["SvelteWindow",!0]],["svelte:document",["SvelteDocument",!0]],["svelte:body",["SvelteBody",!0]],["svelte:element",["SvelteElement",!1]],["svelte:component",["SvelteComponent",!1]],["svelte:self",["SvelteSelf",!1]],["svelte:fragment",["SvelteFragment",!1]],["svelte:boundary",["SvelteBoundary",!1]]]),qp=[...Fi.keys()],Ih=`${qp.slice(0,-1).join(", ")} or ${qp.at(-1)}`,pl=47,Gn=62,ll=61,Rh=34,Mh=39,Bp=123,pt=(e)=>e===Rh||e===Mh;function jh(e,t,n){let r=t;for(;r<e.length;r++){let i=e.charCodeAt(r);if(ze(i)||i===pl||i===Gn)break;if(n&&(pt(i)||i===ll))break}return r}function Un(e,t){let n=e.index;if(n>=e.source.length)oe(e.source.length);let r=jh(e.source,n,t);return e.index=r,{name:e.source.slice(n,r),start:n,end:r,loc:e.sourceLocation(n,r)}}var Ht=(e,t,n,r=n)=>({start:e,end:t,type:"Text",raw:n,data:r});function cl(e){return Lh.has(e)||e.charCodeAt(0)===33&&e.toLowerCase()==="!doctype"}function qh(e){let t=e.charCodeAt(0);if(t>=97&&t<=122&&!e.includes("."))return!1;return $h.test(e)}function Bh(e){let t=!0;for(let n=0;n<e.length&&t;n++){let r=e.charCodeAt(n);t=r>=97&&r<=122||n>0&&r>=48&&r<=57}return t&&e.length>0||Ah.test(e)||Dh.test(e)||Nh.test(e)}function Op(e,t){for(let n=e.length-1;n>=0;n--){let r=t(e[n]);if(r!==void 0)return r}return!1}function Oh(e,t,n){let r=Fi.get(t);if(r)return r[0];if(n)return"Component";if(t==="title"){if(Op(e.stack,({type:i})=>{if(i==="SvelteHead")return!0;return i==="RegularElement"||i==="Component"?!1:void 0}))return"TitleElement"}if(t==="slot"){if(!Op(e.stack,(i)=>i.type==="RegularElement"&&i.attributes.some((o)=>o.type==="Attribute"&&o.name==="shadowrootmode")?!0:void 0))return"SlotElement"}return"RegularElement"}function Fh(e){let t=e.index++;if(e.eat("!--")){let n=e.readUntil("-->");e.eat("-->",!0),e.append({type:"Comment",start:t,end:e.index,data:n})}else if(e.eat("/"))Vh(e,t);else Gh(e,t)}function Vh(e,t){let{name:n}=Un(e,!1);if(e.allowWhitespace(),e.eat(">",!0),cl(n))Tp(t);let r=e.current();while(!("name"in r)||r.name!==n){if(r.type!=="RegularElement"){let i=e.lastAutoClosedTag;if(i?.tag===n)Ja(t,n,i.reason);Ua(t,n)}r.end=t,e.close(),r=e.current()}if(r.end=e.index,e.close(),e.stack.length<(e.lastAutoClosedTag?.depth??0))e.lastAutoClosedTag=void 0}function Hh(e,t,n){return{type:e,start:t,end:-1,name:n}}function Gh(e,t){let n=Un(e,!1),{name:r}=n,i=Fi.get(r);if(!i&&r.startsWith("svelte:"))cp(n,Ih);let o=qh(r);if(!o&&!Bh(r))bp(n);if(i?.[1]){if(e.metaTags.has(r))ap(t,r);if(e.current().type!=="Root")lp(t,r);e.metaTags.add(r)}let a=Hh(Oh(e,r,o),t,r);if(e.loc)a.name_loc=n.loc;a.attributes=[],a.fragment={type:"Fragment",nodes:[]},e.allowWhitespace();let s=e.current();if(s.type==="RegularElement"&&Bf(s.name,r))s.end=t,e.close(),e.lastAutoClosedTag={tag:s.name,reason:r,depth:e.stack.length};if((r==="script"||r==="style")&&e.current().type==="Root"){let p=[];a.attributes=p,Gp(e,p,Xh),Wh(e,a,t,p);return}if(Gp(e,a.attributes,Qh),a.type==="SvelteComponent"){let p=Fp(a);if(!p)op(t);if(!Vp(p.value))sp(p.start);a.expression=Hp(p.value)}else if(a.type==="SvelteElement"){let p=Fp(a);if(!p)Si(t);if(p.value===!0)Si(p);a.tag=Vp(p.value)?Hp(p.value):Kh(p.value[0])}if(!e.eat("/")&&!cl(r))if(e.eat(">",!0),r==="textarea")a.fragment.nodes=dl(e,(p,l)=>(Pi.lastIndex=l,Pi.test(p)),"inside <textarea>"),e.read(Pi);else if(r==="script"||r==="style")a.fragment.nodes.push(zh(e,`</${r}>`));else{e.open(a,a.fragment);return}else e.eat(">",!0);a.end=e.index,e.append(a)}function zh(e,t){let n=e.index,r=e.source.indexOf(t,n);e.index=r===-1?e.source.length:r;let i=Ht(n,e.index,e.source.slice(n,e.index));return e.eat(t,!0),i}function Wh(e,t,n,r){e.eat(">",!0);let i=Uh(e.root.fragment.nodes,n);if(t.name==="style"){let s=yh(e,n,r);if(s.content.comment=i,e.root.css)ip(n);e.root.css=s;return}let o=Qf(e,n,r);if(i)o.content.leadingComments=[{type:"Line",value:i.data}];let a=o.context==="module"?"module":"instance";if(e.root[a])ep(n);e.root[a]=o}function Uh(e,t){let n=e.length-1;if(n<0||e[n].end!==t)return null;for(let r=n;r>=0;r--){let i=e[r];if(i.type==="Comment")return i;if(i.type!=="Text"||i.data.trim())return null}return null}var Jh=(e)=>e.type==="Attribute"&&e.name==="this";function Fp(e){let t=e.attributes.find(Jh);if(t)e.attributes.splice(e.attributes.indexOf(t),1);return t}function Vp(e){if(e===!0)return!1;if(!Array.isArray(e))return!0;return e.length===1&&e[0].type==="ExpressionTag"}function Hp(e){return(Array.isArray(e)?e[0]:e).expression}function Kh(e){if(e.type!=="Text")return e.expression;return{type:"Literal",value:e.data,raw:`'${e.raw}'`,start:e.start,end:e.end}}function Gp(e,t,n){let r=new Set;for(;;){let i=n(e);if(!i)return;let{type:o}=i;if(o==="Attribute"||o==="BindDirective"||o==="StyleDirective"||o==="ClassDirective"){let a=`${o==="BindDirective"?"Attribute":o}${i.name}`;if(r.has(a))_a(i);if(i.name!=="this")r.add(a)}t.push(i),e.allowWhitespace()}}function Vi(e,t,n,r,i){return e.loc?{type:"Attribute",start:n,end:r,name:t.name,name_loc:t.loc,value:i}:{type:"Attribute",start:n,end:r,name:t.name,value:i}}function ul(e){if(pt(e.source.charCodeAt(e.index)))Re(e.index,"=")}function Xh(e){let t=e.index,n=Un(e,!0);if(!n.name)return null;let r=!0;if(e.eat("=")){e.allowWhitespace();let{source:i}=e,o=e.index,a=-1;if(pt(i.charCodeAt(o))){let l=i.indexOf(i[o],o+1);if(l!==-1)a=l+1}if(a===-1){a=o;while(a<i.length&&i.charCodeAt(a)!==Gn&&!ze(i.charCodeAt(a)))a++;if(a===o)Ei(o)}e.index=a;let s=pt(i.charCodeAt(o))?1:0,p=i.slice(o+s,a-s);r=[Ht(a-p.length-s,a-s,p,Mi(p,!0))]}return ul(e),Vi(e,n,t,e.index,r)}function Yh(e){let t=e.index,n=e.match("/*");if(!n&&!e.match("//"))return!1;e.index+=2;let r=e.readUntil(n?"*/":`
|
|
44
|
-
`);if(n)e.eat("*/");let i={type:n?"Block":"Line",start:t,end:e.index,value:r},o=e.sourceLocation(t,e.index);if(o)i.loc=o;return e.root.comments.push(i),!0}function Qh(e){while(Yh(e))e.allowWhitespace();let t=e.index;if(e.eat("{"))return Zh(e,t);let n=Un(e,!0);if(!n.name)return null;let r=e.index;e.allowWhitespace();let i=!0;if(e.eat("=")){if(e.allowWhitespace(),e.match("/>"))i=[Ht(e.index,e.index+1,"/")],e.index++;else i=nm(e);r=e.index}else ul(e);let o=n.name.indexOf(":"),a=o>0?_h.get(n.name.slice(0,o)):void 0;return a?tm(e,a,n,o,t,r,i):Vi(e,n,t,r,i)}function Zh(e,t){if(e.allowWhitespace(),e.eat("@attach")){e.requireWhitespace();let i=K(e);return e.eatClosingBrace(),{type:"AttachTag",start:t,end:e.index,expression:i}}if(e.eat("...")){let i=K(e);return e.eatClosingBrace(),{type:"SpreadAttribute",start:t,end:e.index,expression:i}}let n=e.readIdentifierName();if(n.name==="")Ia(t);e.eatClosingBrace();let r={type:"ExpressionTag",start:n.start,end:n.end,expression:n};return Vi(e,n,t,e.index,r)}function em(e){if(e===!0)return;return Array.isArray(e)?e[0]:e}function tm(e,t,n,r,i,o,a){let[s,...p]=n.name.slice(r+1).split("|");if(s==="")Wa({start:i,end:i+r+1},n.name);let l={start:i,end:o,type:t,name:s};if(e.loc)l.name_loc=n.loc;if(t==="StyleDirective")return l.modifiers=p,l.value=a,l;let c=em(a);if(c&&(Array.isArray(a)&&a.length>1||c.type==="Text"))za(c.start);if(l.expression=c?.expression??null,l.modifiers=p,t==="TransitionDirective"){let d=n.name.slice(0,r);l.intro=d!=="out",l.outro=d!=="in"}if((t==="BindDirective"||t==="ClassDirective")&&!l.expression)l.expression={start:i+r+1,end:o,type:"Identifier",name:s};return l}function nm(e){let t=e.source.charCodeAt(e.index),n=pt(t);if(n){if(e.index++,e.source.charCodeAt(e.index)===t)return e.index++,[Ht(e.index-1,e.index-1,"")]}let r;try{r=dl(e,n?(i,o)=>i.charCodeAt(o)===t:rm,"in attribute value",n?t:void 0)}catch(i){let o=i instanceof v?i.position?.[0]:void 0;if(i instanceof v&&i.code==="js_parse_error"&&o!==void 0&&e.source.startsWith("/>",o-1))e.index=o,Re(o,n?String.fromCharCode(t):"}");throw i}if(n)e.index++;else if(r.length===0)Ei(e.index);return n||r.length>1||r[0].type==="Text"?r:r[0]}function rm(e,t){let n=e.charCodeAt(t);return ze(n)||pt(n)||n===ll||n===60||n===Gn||n===96||n===pl&&e.charCodeAt(t+1)===Gn}function dl(e,t,n,r){let{source:i}=e,o=[],a=e.index,s=(p)=>{if(p<=a)return;let l=i.slice(a,p);o.push(Ht(a,p,l,Mi(l,!0)))};while(e.index<i.length){let p=e.index;if(t(i,p))return s(p),o;if(i.charCodeAt(p)!==Bp){if(e.index++,r!==void 0)while(e.index<i.length&&i.charCodeAt(e.index)!==Bp&&i.charCodeAt(e.index)!==r)e.index++;continue}e.index++;let l=i.charCodeAt(e.index);if(l===35||l===64){e.index++;let d=e.index;while(e.index<i.length&&i.charCodeAt(e.index)>=97&&i.charCodeAt(e.index)<=122)e.index++;let f=i.slice(d,e.index);(l===35?qa:xp)(p,f,n)}s(p),e.allowWhitespace();let c=K(e);e.eatClosingBrace(),o.push({type:"ExpressionTag",start:p,end:e.index,expression:c}),a=e.index}oe(i.length)}var im=new Map([["html","html"],["svg","svg"],["mathml","mathml"],["http://www.w3.org/2000/svg","svg"],["http://www.w3.org/1998/Math/MathML","mathml"]]),sm=new Map([["type",(e,t)=>{if(t!=="String"&&t!=="Number"&&t!=="Boolean"&&t!=="Array"&&t!=="Object")return!1;return e.type=t,!0}],["reflect",(e,t)=>{if(typeof t!=="boolean")return!1;return e.reflect=t,!0}],["attribute",(e,t)=>{if(typeof t!=="string")return!1;return e.attribute=t,!0}]]),zp="[a-z0-9_.\\xB7\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u203F-\\u2040\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\u{10000}-\\u{EFFFF}-]",om=new RegExp(`^[a-z]${zp}*-${zp}*$`,"u"),am=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" ")),On=(e)=>(t,n)=>{let r=zn(n);if(typeof r!=="boolean")jn(n,"true or false");t[e]=r},pm=new Map([["runes",On("runes")],["immutable",On("immutable")],["preserveWhitespace",On("preserveWhitespace")],["accessors",On("accessors")],["namespace",(e,t)=>{let n=im.get(zn(t));if(!n)jn(t,'"html", "mathml" or "svg"');e.namespace=n}],["css",(e,t)=>{if(zn(t)!=="injected")jn(t,'"injected"');e.css="injected"}],["tag",(e,t)=>up(t)],["customElement",(e,t)=>{let n=um(t);if(n)e.customElement=n}]]);function lm(e){let t=[],n={start:e.start,end:e.end,attributes:t};for(let r of e.attributes){if(r.type!=="Attribute")dp(r);t.push(r);let i=pm.get(r.name);if(!i)yp(r,r.name);i(n,r)}return n}function zn({value:e}){if(e===!0)return!0;let t=Array.isArray(e)?e:[e];if(t.length===0)return!0;if(t.length>1)return null;let[n]=t;if(n.type==="Text")return n.data;return n.expression.type==="Literal"?n.expression.value:null}function Wp(e,t){if(typeof t!=="string")ki(e);if(!t)return;if(!om.test(t))ki(e);if(am.has(t))gp(e)}function cm(e,t){let n=new Map;for(let r of e.properties){if(r.type!=="Property"||r.computed||r.key.type!=="Identifier")t();if(!n.has(r.key.name))n.set(r.key.name,r.value)}return n}function um(e){let t=()=>fp(e);if(e.value===!0)t();let n=Array.isArray(e.value)?e.value[0]:e.value;if(n.type==="Text"){let c=zn(e);return Wp(e,c),{tag:c}}let{expression:r}=n;if(r.type!=="ObjectExpression"){if(r.type==="Literal"&&r.value===null)return;t()}let i=cm(r,t),o={},a=i.get("tag");if(a){let c=a.type==="Literal"?a.value:void 0;Wp(null,c),o.tag=c}let s=i.get("props");if(s){let c=()=>hp(e);if(s.type!=="ObjectExpression")c();o.props={};for(let d of s.properties){if(d.type!=="Property"||d.computed||d.key.type!=="Identifier"||d.value.type!=="ObjectExpression")c();let f={};o.props[d.key.name]=f;for(let h of d.value.properties){if(h.type!=="Property"||h.computed||h.key.type!=="Identifier"||h.value.type!=="Literal")c();if(!sm.get(h.key.name)?.(f,h.value.value))c()}}}let p=i.get("shadow");if(p)if(p.type==="ObjectExpression")o.shadow=p;else if(p.type==="Literal"&&(p.value==="open"||p.value==="none"))o.shadow=p.value;else mp(e);let l=i.get("extend");if(l)o.extend=l;return o}var dm={"{":"}","(":")","[":"]"};function Hi(e,t,n=dm){let r=Object.values(n),i=[],o=t;while(o<e.length){let a=e[o++];if(a==="'"||a==='"'||a==="`")o=fm(e,o,a);else if(Object.hasOwn(n,a))i.push(a);else if(r.includes(a)){let s=n[i.pop()??""];if(a!==s)Re(o-1,s);if(i.length===0)return o}}oe(e.length)}function fm(e,t,n){let r=t;while(r<e.length){let i=e[r++];if(i===n)return r;if(i==="\\")r++;else if(n==="`"&&i==="$"&&e[r]==="{")r=Hi(e,r)}Ep(t)}var hm=/\?\s*:/g;function Jn(e){let t=e.index,n=e.readIdentifierName();if(n.name!==""){let s=Up(e);return{...n,typeAnnotation:s}}let r=e.source[e.index];if(r!=="{"&&r!=="[")Xa(e.index);e.index=Hi(e.source,t);let{node:i}=st(e,`${e.source.slice(0,e.index)} = 1`,t);Bt(i,"AssignmentExpression");let o=i.left;Bt(o,"ObjectPattern","ArrayPattern");let a=Up(e);if(o.typeAnnotation=a,a)o.end=a.end;return o}function Up(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)+n+e.source.slice(e.index).replace(hm,":"),o=st(e,i,r).node;if(o.type==="AssignmentExpression"){let a=o.right.start;while(i[a]!=="=")a-=1;o=st(e,i.slice(0,a),r).node}if(o.type==="SequenceExpression")o=o.expressions[0];return Bt(o,"TSAsExpression"),e.index=o.end,{type:"TSTypeAnnotation",start:t,end:e.index,typeAnnotation:o.typeAnnotation}}var mm=/\s*}/y,gm={IfBlock:"if",EachBlock:"each",KeyBlock:"key",AwaitBlock:"await",SnippetBlock:"snippet"},we=()=>({type:"Fragment",nodes:[]});function ym(e,t){if(e.eat("if")){e.requireWhitespace();let n=K(e);e.eatClosingBrace();let r=we();e.open({type:"IfBlock",elseif:!1,start:t,end:-1,test:n,consequent:r,alternate:null},r)}else if(e.eat("each"))xm(e,t);else if(e.eat("await")){e.requireWhitespace();let n=K(e);e.allowWhitespace();let r={type:"AwaitBlock",start:t,end:-1,expression:n,value:null,error:null,pending:null,then:null,catch:null},i=we();if(e.eat("then"))r.value=Jp(e),r.then=i;else if(e.eat("catch"))r.error=Jp(e),r.catch=i;else r.pending=i;e.eat("}",!0),e.open(r,i)}else if(e.eat("key")){e.requireWhitespace();let n=K(e);e.eatClosingBrace();let r=we();e.open({type:"KeyBlock",start:t,end:-1,expression:n,fragment:r},r)}else if(e.eat("snippet"))vm(e,t);else Ka(e.index)}function Jp(e){if(e.matchRegex(mm))return e.allowWhitespace(),null;e.requireWhitespace();let t=Jn(e);return e.allowWhitespace(),t}function bm(e){let t={assertion:null},n=e.end,r=(o)=>{if(o.type==="TSAsExpression"&&o.end===e.end)return t.assertion=o,n=o.expression.end,o.expression;return qn(o,r),o},i=e;if(e.type==="TSAsExpression")t.assertion=e,i=e.expression,n=i.end;else qn(e,r);return i.end=n,{expression:i,assertion:t.assertion}}function xm(e,t){e.requireWhitespace();let n=e.source,r;while(!r)try{r=K(e)}catch(p){let l=((p instanceof v?p.position:void 0)?.[0]??t)-2;while(l>t&&e.source.slice(l,l+2)!=="as")l-=1;if(l<=t)throw e.source=n,p;e.source=n.slice(0,l)}if(e.source=n,e.allowWhitespace(),!e.match("as")){if(r.type==="SequenceExpression")r=r.expressions[0];let p=bm(r);if(r=p.expression,p.assertion){let l=p.assertion.typeAnnotation.start-2;while(e.source.slice(l,l+2)!=="as")l-=1;e.index=l}}let i=null,o,a;if(e.eat("as"))e.requireWhitespace(),i=Jn(e);else e.index=r.end;if(e.allowWhitespace(),e.eat(",")){if(e.allowWhitespace(),o=e.readIdentifierName().name,!o)Ti(e.index);e.allowWhitespace()}if(e.eat("("))e.allowWhitespace(),a=K(e),e.allowWhitespace(),e.eat(")",!0),e.allowWhitespace();e.eat("}",!0);let s=we();e.open({type:"EachBlock",start:t,end:-1,expression:r,body:s,context:i,index:o,key:a},s)}function vm(e,t){e.requireWhitespace();let n=e.readIdentifierName();if(n.name==="")Ti(e.index);e.allowWhitespace();let r=e.index,i;if(e.isTypeScript&&e.match("<")){let p=Hi(e.source,r,{"<":">"});i=e.source.slice(r+1,p-1),e.index=p}e.allowWhitespace(),e.eat("(",!0);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);let{node:a}=st(e,`${e.source.slice(0,e.index)} => {}`,r,!0);Bt(a,"ArrowFunctionExpression"),e.eatClosingBrace();let s=we();e.open({type:"SnippetBlock",start:t,end:-1,expression:n,typeParams:i,parameters:a.params,body:s},s)}function Em(e,t){let n=e.index-1,r=e.current();if(r.type==="IfBlock"){if(!e.eat("else"))Re(n,"{:else} or {:else if}");if(e.eat("if"))ja(n);if(e.allowWhitespace(),r.alternate=we(),e.setFragment(r.alternate),e.eat("if")){e.requireWhitespace();let i=K(e);e.eatClosingBrace();let o=we();e.open({start:t,end:-1,type:"IfBlock",elseif:!0,test:i,consequent:o,alternate:null},o)}else e.eatClosingBrace()}else if(r.type==="EachBlock"){if(!e.eat("else"))Re(n,"{:else}");e.eatClosingBrace(),r.fallback=we(),e.setFragment(r.fallback)}else if(r.type==="AwaitBlock"){let i;if(e.eat("then"))i="then";else if(e.eat("catch"))i="catch";else Re(n,"{:then ...} or {:catch ...}");if(r[i])Ra(n,`{:${i}}`);if(!e.eat("}")){e.requireWhitespace();let a=Jn(e);if(i==="then")r.value=a;else r.error=a;e.eatClosingBrace()}let o=we();r[i]=o,e.setFragment(o)}else Ma(n)}function Tm(e){let t=e.current(),n=gm[t.type];if(!n)Oa(e.index-1);e.eat(n,!0),e.eatClosingBrace();while(t.type==="IfBlock"&&t.elseif)t.end=e.index,e.close(),t=e.current();t.end=e.index,e.close()}var Sm=/\s*}/y;function km(e){return e.type==="CallExpression"||e.type==="ChainExpression"&&e.expression.type==="CallExpression"}function Cm(e,t){if(e.eat("html")){e.requireWhitespace();let n=K(e);e.eatClosingBrace(),e.append({type:"HtmlTag",start:t,end:e.index,expression:n})}else if(e.eat("debug")){let n=[];if(!e.read(Sm)){let r=K(e),i=r.type==="SequenceExpression"?r.expressions:[r];for(let o of i){if(o.type!=="Identifier")Ga(o.start);n.push(o)}e.eatClosingBrace()}e.append({type:"DebugTag",start:t,end:e.index,identifiers:n})}else if(e.eat("const")){e.requireWhitespace();let n=Jn(e);e.allowWhitespace(),e.eat("=",!0),e.allowWhitespace();let r=e.index,i=K(e),o=e.index;if(i.type==="SequenceExpression"&&!e.source.slice(r,i.start).includes("("))Fa(i);e.eatClosingBrace();let a={type:"VariableDeclarator",id:n,init:i,start:n.start,end:o};e.append({type:"ConstTag",start:t,end:e.index,declaration:{type:"VariableDeclaration",kind:"const",declarations:[a],start:t+2,end:e.index-1}})}else if(e.eat("render")){e.requireWhitespace();let n=K(e);if(!km(n))Za(n);e.eatClosingBrace(),e.append({type:"RenderTag",start:t,end:e.index,expression:n})}else Ya(e.index)}var wm=/(?:var|interface|enum)\b/y,Pm=/(?:let|const|type)\b/y;function Am(e){let t=e.index;if(e.index+=1,e.allowWhitespace(),e.eat("#"))ym(e,t);else if(e.eat(":"))Em(e,t);else if(e.eat("@"))Cm(e,t);else if(e.match("/")&&!e.match("/*")&&!e.match("//"))e.index+=1,Tm(e);else if(!Dm(e,t)){let n=K(e);e.eatClosingBrace(),e.append({type:"ExpressionTag",start:t,end:e.index,expression:n})}}function Dm(e,t){let n=e.index,r=e.matchRegex(wm);if(r)xi({start:n,end:n+r.length});if(!e.matchRegex(Pm))return!1;let i=e.root.comments.length,o=Ap(e,e.source,n);if(o.type==="ExpressionStatement")return e.root.comments.length=i,!1;if(o.type!=="VariableDeclaration"||o.kind!=="let"&&o.kind!=="const")xi(o);return e.index=o.end,e.eatClosingBrace(),e.append({type:"DeclarationTag",start:t,end:e.index,declaration:o}),!0}function Nm(e){let{source:t,index:n}=e;if(e.nextAngle<n)e.nextAngle=Kp(t,"<",n);if(e.nextBrace<n)e.nextBrace=Kp(t,"{",n);let r=Math.min(e.nextAngle,e.nextBrace);e.index=r;let i=t.slice(n,r);e.append({type:"Text",start:n,end:r,raw:i,data:Mi(i,!1)})}function Kp(e,t,n){let r=e.indexOf(t,n);return r===-1?e.length:r}function Gi(e,t){let n=e.charCodeAt(0)===65279?e.slice(1):e;La(n);let r=new Yp(n.trimEnd(),n.length,t);while(r.index<r.source.length)if(r.match("<"))Fh(r);else if(r.match("{"))Am(r);else Nm(r);if(r.stack.length>1){let s=r.current();if(s.end=s.start+1,s.type==="RegularElement")vi(s,s.name);Ba(s)}let{nodes:i}=r.root.fragment,o=i.findIndex((s)=>s.type==="SvelteOptions"),a=i[o];if(a?.type==="SvelteOptions"){i.splice(o,1),r.root.options=lm(a);let{nodes:s}=a.fragment;if(s.length>0)pp({start:s[0].start,end:s[s.length-1].end},a.name)}return r.root}var fl={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 $m(e){return e in fl}function hl(e){if($m(e))return fl[e];return"HTMLElement"}var ml=new Map;function gl(e){let t=ml.get(e);if(t!==void 0)return t;let n=Mt(e,{inline:!0});return ml.set(e,n),n}function yl(e,t){let n=be(e.name,t.name);if(n!==0)return n;let r=be(e.type,t.type);if(r!==0)return r;if(e.type==="forwarded"&&t.type==="forwarded"){let i=be(e.element,t.element);if(i!==0)return i}return be(e.detail??"",t.detail??"")}var Lm=/^\{\s*\}$/;function lt(e){return Array.from(e,([t,n])=>n)}function _m(e,t){let{dispatcherName:n,callees:r}=t;for(let o of t.hostDispatches)No(e,o);if(n!==void 0){Go(e,t.dispatcherTypeArgument,n,C(e,t.dispatcherDeclaratorNode));for(let o of r)if(o.name===n){let a=o.arguments[0],s=a&&typeof a==="object"&&"value"in a?a.value:void 0,p=o.arguments[1],l=Mr(Rr(e,o.nestedBoundDetailNames),p),c=l===void 0&&p&&typeof p==="object"&&"value"in p?p.value:void 0,d=c===null&&p.raw==="null";if(s!=null)Le(e,{name:String(s),detail:l??(d?"null":c==null?"":jr(c)),has_argument:Boolean(p),source:C(e,o.node)})}}let i=new Set(t.hostDispatchedEventNames);if(n!==void 0){for(let o of r)if(o.name===n){let a=o.arguments[0],s=a&&typeof a==="object"&&"value"in a?a.value:void 0;if(s!=null)i.add(String(s))}}return e.forwardedEvents.forEach((o,a)=>{let s=e.events.get(a);if(s&&s.type==="dispatched"&&!i.has(a)){let p=e.eventDescriptions.get(a),l={type:"forwarded",name:a,element:o,description:p,deprecated:s.deprecated,tags:s.tags,source:s.source};if(s.internal)l.internal=!0;if(s.detail!==void 0&&s.detail!=="undefined")l.detail=s.detail;e.events.set(a,l)}}),i}function Im(e){let t=e.syntaxMode==="runes"?new Set(Array.from(e.snippetPropLocals,(n)=>dr(e,n))):new Set;return lt(e.props).filter((n)=>!(t.has(n.name)&&e.slots.has(n.name==="children"?At:n.name))).map((n)=>{if(e.bindings.has(n.name)){let r=e.bindings.get(n.name)?.elements.sort().map((i)=>hl(i)).join(" | ");return{...n,type:`null | ${r}`,typeSource:"inferred",reactive:n.reactive||e.reactive_vars.has(n.name)}}return{...n,reactive:n.reactive||e.reactive_vars.has(n.name)}})}function Rm(e){return lt(e.slots).map((t)=>{let{slot_props_unresolved_spread:n,...r}=t;if(!t.slot_props)return r;if(typeof t.slot_props==="string")return Lm.test(t.slot_props)?{...r,slot_props:"Record<string, never>"}:r;let i=t.slot_props,o=[];for(let p of Object.keys(i)){if(i[p].replace&&i[p].value!==void 0)i[p].value=mt(e,i[p].value);if(i[p].value===void 0)i[p].value="any";o.push(`${p}: ${i[p].value}`)}let a=n?" & Record<string, any>":"",s=o.length===0?n?"Record<string, any>":"Record<string, never>":o.length===1?`{ ${o[0]} }${a}`:`{
|
|
45
|
-
${
|
|
33
|
+
`:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")};E.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return`
|
|
34
|
+
`;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return Yn(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 i=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],r=parseInt(i,8);if(r>255)i=i.slice(0,-1),r=parseInt(i,8);if(this.pos+=i.length-1,t=this.input.charCodeAt(this.pos),(i!=="0"||t===56||t===57)&&(this.strict||e))this.invalidStringToken(this.pos-1-i.length,e?"Octal literal in template string":"Octal literal in strict mode");return String.fromCharCode(r)}if(Ct(t)){if(this.options.locations)this.lineStart=this.pos,++this.curLine;return""}return String.fromCharCode(t)}};E.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);if(n===null)this.invalidStringToken(t,"Bad character escape sequence");return n};E.readWord1=function(){this.containsEsc=!1;var e="",t=!0,n=this.pos,i=this.options.ecmaVersion>=6;while(this.pos<this.input.length){var r=this.fullCharCodeAtPos();if(Be(r,i))this.pos+=r<=65535?1:2;else if(r===92){this.containsEsc=!0,e+=this.input.slice(n,this.pos);var s=this.pos;if(this.input.charCodeAt(++this.pos)!==117)this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX");++this.pos;var a=this.readCodePoint();if(!(t?de:Be)(a,i))this.invalidStringToken(s,"Invalid Unicode escape");e+=Yn(a),n=this.pos}else break;t=!1}return e+this.input.slice(n,this.pos)};E.readWord=function(){var e=this.readWord1(),t=u.name;if(this.keywords.test(e))t=Fr[e];return this.finishToken(t,e)};var yh="8.18.0";R.acorn={Parser:R,version:yh,defaultOptions:Br,Position:Yt,SourceLocation:Qn,getLineInfo:Ua,Node:ni,TokenType:D,tokTypes:u,keywordTypes:Fr,TokContext:ue,tokContexts:I,isIdentifierChar:Be,isIdentifierStart:de,Token:Gr,isNewLine:Ct,lineBreak:Y,lineBreakG:nh,nonASCIIwhitespace:Ga};function tn(e){return(t)=>e(t)}function ii(...e){return R.extend(...e)}function nn(e,t,n){for(let i=t;i<n;i++){let r=e.charCodeAt(i);if(r===10||r===13||r===8232||r===8233)return!0}return!1}var Ha=new WeakMap;function Q(e,t){if(e===void 0)return!1;if(e.length<16)return e.includes(t);let n=Ha.get(e);if(n===void 0||n.length>e.length)n={names:new Set,length:0},Ha.set(e,n);while(n.length<e.length)n.names.add(e[n.length++]);return n.names.has(t)}var Ur=/(?:\s|\/\/.*|\/\*[\s\S]*?\*\/)*/g,gh=new Map([["any","TSAnyKeyword"],["bigint","TSBigIntKeyword"],["boolean","TSBooleanKeyword"],["never","TSNeverKeyword"],["null","TSNullKeyword"],["number","TSNumberKeyword"],["object","TSObjectKeyword"],["string","TSStringKeyword"],["symbol","TSSymbolKeyword"],["undefined","TSUndefinedKeyword"],["unknown","TSUnknownKeyword"],["void","TSVoidKeyword"]]),xh=new Set("public private protected readonly declare abstract override static accessor".split(" ")),bh=new Set("public private protected readonly override".split(" ")),vh=new Set("var let const function class abstract enum interface type namespace module global".split(" ")),Th=new Set("var let const function class interface enum".split(" ")),al=new Set(["TSAsExpression","TSSatisfiesExpression","TSNonNullExpression","TSTypeAssertion"]),ll=1,Sh=32,Eh=256,Ch=0,kh=1,rn=2,wh=3,Ah=4,Jr=6,pl=7,ml=256,Qr=1024,Ph=8|Qr,Dh=rn|ml,cl=1,Nh=2,ul=40,$h=41,Lh=44,dl=46,fl=58,ri=61,hl=60,si=123,_h=91,Kr=42,Ih=35,Xr=34,Yr=39,Rh=SyntaxError("speculative parse failed"),oi=tn((e)=>{let{tokTypes:t,keywordTypes:n,isIdentifierChar:i,isIdentifierStart:r}=e.acorn,s=new e.acorn.TokenType("@");class a extends e{inType=!1;$4=!1;$5=!1;$7=null;$k=null;$l=!1;$m=!1;$f=null;$9=[[]];$n=0;$t=0;$o=-1;constructor(o,l,p){super(o,l,p);let c=this.options.onComment;if(typeof c==="function")this.options.onComment=(d,f,h,m,y,g)=>{if(h<this.$t)return;this.$t=m,c.call(this,d,f,h,m,y,g)}}reset(){this.inType=!1,this.$4=!1,this.$5=!1,this.$7=null,this.$k=null,this.$l=!1,this.$m=!1,this.$f=null,this.$9=[[]],this.$n=0,this.$t=0,this.$o=-1}getTokenFromCode(o){if(o===64)return++this.pos,this.finishToken(s);return super.getTokenFromCode(o)}readToken_lt_gt(o){if(this.inType)return this.finishOp(t.relational,1);return super.readToken_lt_gt(o)}$a(o){let l=this.inType;this.inType=!0;let p=o();if(this.inType=l,!l&&this.type===t.relational)this.pos=this.start,this.nextToken();return p}$1(){return this.type===t.relational&&this.value==="<"}$p(){if(this.type===t.bitShift&&this.value==="<<")this.pos=this.start+1,this.finishToken(t.relational,"<");return this.$1()}$c(){return this.type===t.relational&&this.value===">"}$u(){return this.type===t.prefix&&this.value==="!"}hasPrecedingLineBreak(){return nn(this.input,this.lastTokEnd,this.start)}$d(o=this.pos){return Ur.lastIndex=o,Ur.exec(this.input),Ur.lastIndex}$2(){return this.input.charCodeAt(this.$d())}$3(){let o=this.$d(),l=o;while(l<this.input.length&&i(this.input.charCodeAt(l)))l++;return this.input.slice(o,l)}$b(){return!nn(this.input,this.pos,this.$d())}$14(){return this.$b()&&r(this.$2())&&!Object.hasOwn(n,this.$3())}$15(){return{pos:this.pos,type:this.type,value:this.value,start:this.start,end:this.end,startLoc:this.startLoc,endLoc:this.endLoc,lastTokStart:this.lastTokStart,lastTokEnd:this.lastTokEnd,lastTokStartLoc:this.lastTokStartLoc,lastTokEndLoc:this.lastTokEndLoc,curLine:this.curLine,lineStart:this.lineStart,context:this.context.slice(),exprAllowed:this.exprAllowed,containsEsc:this.containsEsc,inType:this.inType,$4:this.$4,$5:this.$5,$7:this.$7,scopes:this.scopeStack.length,privateNames:this.privateNameStack.length,labels:this.labels,labelCount:this.labels.length,strict:this.strict,yieldPos:this.yieldPos,awaitPos:this.awaitPos,awaitIdentPos:this.awaitIdentPos,potentialArrowAt:this.potentialArrowAt,potentialArrowInForAwait:this.potentialArrowInForAwait}}$16(o){this.pos=o.pos,this.type=o.type,this.value=o.value,this.start=o.start,this.end=o.end,this.startLoc=o.startLoc,this.endLoc=o.endLoc,this.lastTokStart=o.lastTokStart,this.lastTokEnd=o.lastTokEnd,this.lastTokStartLoc=o.lastTokStartLoc,this.lastTokEndLoc=o.lastTokEndLoc,this.curLine=o.curLine,this.lineStart=o.lineStart,this.context=o.context,this.exprAllowed=o.exprAllowed,this.containsEsc=o.containsEsc,this.inType=o.inType,this.$4=o.$4,this.$5=o.$5,this.$7=o.$7,this.scopeStack.length=o.scopes,this.privateNameStack.length=o.privateNames,this.labels=o.labels,this.labels.length=o.labelCount,this.strict=o.strict,this.yieldPos=o.yieldPos,this.awaitPos=o.awaitPos,this.awaitIdentPos=o.awaitIdentPos,this.potentialArrowAt=o.potentialArrowAt,this.potentialArrowInForAwait=o.potentialArrowInForAwait}raise(o,l){if(this.$n>0)throw Rh;return super.raise(o,l)}$1y(o,l){try{super.raise(o,l)}catch(p){if(p instanceof SyntaxError)p.$1z=!0;throw p}throw Error("unreachable")}$g(o,l=!1){let p=this.$15();this.$n++;try{let c=o();if(l||c===void 0)this.$16(p);return c}catch(c){if(!(c instanceof SyntaxError)||!l&&c.$1z)throw c;this.$16(p);return}finally{this.$n--}}$v(o){return this.$g(o,!0)===!0}$17(o){if(o.end=this.lastTokEnd,this.options.locations)o.loc.end=this.lastTokEndLoc}$q(o,l){if(o.start=l.start,this.options.locations)o.loc.start=l.loc.start}$6(o=!1){let l=this.startNode();return l.typeAnnotation=this.$a(()=>(this.next(),o?this.$20():this.$0())),this.finishNode(l,"TSTypeAnnotation")}$h(o,l){if(l&&this.eat(t.question))o.optional=!0,this.$17(o);if(this.type===t.colon)o.typeAnnotation=this.$6(),this.$17(o);return o}$20(){if(this.type!==t.name&&this.type!==t._this)return this.$0();if(this.isContextual("asserts")&&this.$b()&&r(this.$2())){let o=this.startNode();if(this.next(),o.parameterName=this.type===t._this?this.$w():this.parseIdent(),this.isContextual("is")&&!this.hasPrecedingLineBreak())return this.$x(o,!0);return o.asserts=!0,o.typeAnnotation=null,this.finishNode(o,"TSTypePredicate")}if(this.$3()==="is"&&this.$b()){let o=this.startNode();return o.parameterName=this.type===t._this?this.$w():this.parseIdent(!0),this.$x(o,!1)}return this.$0()}$x(o,l){this.next();let p=this.startNode();return p.typeAnnotation=this.$0(),o.typeAnnotation=this.finishNode(p,"TSTypeAnnotation"),o.asserts=l,this.finishNode(o,"TSTypePredicate")}$w(){let o=this.startNode();return this.next(),this.finishNode(o,"TSThisType")}parseWholeType(){this.inType=!0,this.nextToken();let o=this.$0();if(this.type!==t.eof)this.unexpected();return o}$0(){let o=this.$18();if(this.$4||this.type!==t._extends||this.hasPrecedingLineBreak())return o;let l=this.startNodeAt(o.start,o.loc?.start);return this.next(),l.checkType=o,l.extendsType=this.$i(!0,()=>this.$18()),this.expect(t.question),l.trueType=this.$i(!1,()=>this.$0()),this.expect(t.colon),l.falseType=this.$i(!1,()=>this.$0()),this.finishNode(l,"TSConditionalType")}$i(o,l){let p=this.$4;this.$4=o;let c=l();return this.$4=p,c}$18(){if(this.$21())return this.$19("TSFunctionType");if(this.type===t._new||this.isContextual("abstract")&&this.$3()==="new")return this.$19("TSConstructorType");return this.$1a("TSUnionType",t.bitwiseOR,()=>this.$1a("TSIntersectionType",t.bitwiseAND,()=>this.$1b()))}$19(o){let l=this.startNode();if(o==="TSConstructorType"){if(l.abstract=this.isContextual("abstract"),l.abstract)this.next();this.next()}return this.$i(!1,()=>this.$r(l,t.arrow)),this.finishNode(l,o)}$r(o,l){if(this.$1())o.typeParameters=this.$8();if(this.expect(t.parenL),o.parameters=this.parseBindingList(t.parenR,!1,!0),this.type===l)o.typeAnnotation=this.$6(!0);else if(l===t.arrow)this.unexpected()}$21(){if(this.$1())return!0;if(this.type!==t.parenL)return!1;return this.$v(()=>{if(this.next(),this.type===t.parenR||this.type===t.ellipsis)return!0;if(this.type===t.name||this.type===t._this)this.next();else if(this.type===t.braceL||this.type===t.bracketL)this.parseBindingAtom();else return!1;let o=this.type;if(o===t.colon||o===t.comma||o===t.question||o===t.eq)return!0;if(o!==t.parenR)return!1;return this.next(),this.type===t.arrow})}$1a(o,l,p){let c=this.startNode(),d=this.eat(l),f=[];do f.push(p());while(this.eat(l));if(f.length===1&&!d)return f[0];return c.types=f,this.finishNode(c,o)}$1b(){if(this.type===t.name&&!this.containsEsc){let o=this.value;if(o==="keyof"||o==="unique"||o==="readonly"){let l=this.startNode();return this.next(),l.operator=o,l.typeAnnotation=this.$1b(),this.finishNode(l,"TSTypeOperator")}if(o==="infer"){let l=this.startNode();this.next();let p=this.startNode();p.name=this.$y();let c=this.$g(()=>this.$22());if(c)p.constraint=c;return l.typeParameter=this.finishNode(p,"TSTypeParameter"),this.finishNode(l,"TSInferType")}}return this.$i(!1,()=>this.$23())}$22(){if(!this.eat(t._extends))return;let o=this.$i(!0,()=>this.$0());return this.$4||this.type!==t.question?o:void 0}$y(){if(this.type!==t.name&&!this.type.keyword)this.unexpected();let o=this.type===t.name?this.value:this.type.keyword;return this.next(),o}$23(){let o=this.$24();while(!this.hasPrecedingLineBreak()&&this.eat(t.bracketL)){let l=this.startNodeAt(o.start,o.loc?.start);if(this.eat(t.bracketR))l.elementType=o,o=this.finishNode(l,"TSArrayType");else l.objectType=o,l.indexType=this.$0(),this.expect(t.bracketR),o=this.finishNode(l,"TSIndexedAccessType")}return o}$24(){switch(this.type){case t.name:case t._void:case t._null:{let o=gh.get(this.value);if(o&&(this.type!==t.name||!this.containsEsc&&this.$2()!==dl)){let l=this.startNode();return this.next(),this.finishNode(l,o)}return this.$1c()}case t.string:case t.num:case t._true:case t._false:{let o=this.startNode();return o.literal=this.parseExprAtom(),this.finishNode(o,"TSLiteralType")}case t.plusMin:{if(this.value!=="-")break;let o=this.startNode(),l=this.startNode();if(this.next(),this.type!==t.num)this.unexpected();return l.operator="-",l.prefix=!0,l.argument=this.parseExprAtom(),o.literal=this.finishNode(l,"UnaryExpression"),this.finishNode(o,"TSLiteralType")}case t.backQuote:return this.$25();case t._this:{let o=this.$w();if(this.isContextual("is")&&!this.hasPrecedingLineBreak()){let l=this.startNodeAt(o.start,o.loc?.start);return l.parameterName=o,this.$x(l,!1)}return o}case t._typeof:return this.$26();case t._import:return this.$1d();case t.braceL:return this.$27()?this.$28():this.$29();case t.bracketL:return this.$2a();case t.parenL:{let o=this.startNode();return this.next(),o.typeAnnotation=this.$0(),this.expect(t.parenR),this.finishNode(o,"TSParenthesizedType")}default:if(this.type.keyword)return this.$1c()}return this.unexpected()}$1c(){let o=this.startNode();if(o.typeName=this.$j(),!this.hasPrecedingLineBreak()&&this.$1())o.typeArguments=this.$e();return this.finishNode(o,"TSTypeReference")}$j(){let o=this.parseIdent(!0);while(this.eat(t.dot)){let l=this.startNodeAt(o.start,o.loc?.start);l.left=o,l.right=this.parseIdent(!0),o=this.finishNode(l,"TSQualifiedName")}return o}$26(){let o=this.startNode();if(this.next(),o.exprName=this.type===t._import?this.$1d():this.$j(),!this.hasPrecedingLineBreak()&&this.$1())o.typeArguments=this.$e();return this.finishNode(o,"TSTypeQuery")}$1d(){let o=this.startNode();if(this.next(),o.argument=this.$1e(),this.eat(t.dot))o.qualifier=this.$j();if(this.$1())o.typeArguments=this.$e();return this.finishNode(o,"TSImportType")}$z(){if(this.type!==t.string)this.unexpected();return this.parseExprAtom()}$1e(){this.expect(t.parenL);let o=this.$z();return this.expect(t.parenR),o}$25(){let o=this.startNode(),l=this.startNode();this.next(),l.expressions=[];let p=this.parseTemplateElement({isTagged:!1});l.quasis=[p];while(!p.tail){if(this.type===t.eof)this.raise(this.pos,"Unterminated template literal");this.expect(t.dollarBraceL),l.expressions.push(this.$0()),this.expect(t.braceR),p=this.parseTemplateElement({isTagged:!1}),l.quasis.push(p)}return this.next(),o.literal=this.finishNode(l,"TemplateLiteral"),this.finishNode(o,"TSLiteralType")}$27(){return this.$v(()=>{if(this.next(),this.type===t.plusMin)return this.next(),this.isContextual("readonly");if(this.isContextual("readonly"))this.next();if(this.type!==t.bracketL)return!1;if(this.next(),this.type!==t.name)return!1;return this.next(),this.type===t._in})}$28(){let o=this.startNode();if(this.expect(t.braceL),this.type===t.plusMin)o.readonly=this.value,this.next(),this.expectContextual("readonly");else if(this.eatContextual("readonly"))o.readonly=!0;this.expect(t.bracketL);let l=this.startNode();if(l.name=this.$y(),this.expect(t._in),l.constraint=this.$0(),o.typeParameter=this.finishNode(l,"TSTypeParameter"),o.nameType=this.eatContextual("as")?this.$0():null,this.expect(t.bracketR),this.type===t.plusMin)o.optional=this.value,this.next(),this.expect(t.question);else if(this.eat(t.question))o.optional=!0;if(this.eat(t.colon))o.typeAnnotation=this.$0();return this.semicolon(),this.expect(t.braceR),this.finishNode(o,"TSMappedType")}$29(){let o=this.startNode();return o.members=this.$1f(),this.finishNode(o,"TSTypeLiteral")}$1f(){this.expect(t.braceL);let o=[];while(!this.eat(t.braceR))o.push(this.$2b());return o}$2b(){let o=this.startNode(),l="TSPropertySignature",p=this.type===t._new?this.$2():-1;if(this.type===t.parenL||this.$1())l="TSCallSignatureDeclaration",this.$r(o,t.colon);else if(p===ul||p===hl)l="TSConstructSignatureDeclaration",this.next(),this.$r(o,t.colon);else{let c=this.type===t._new?this.parseIdent(!0):null;if(this.isContextual("readonly")&&this.$s(!0))this.next(),o.readonly=!0;if(this.type===t.bracketL&&this.$1g())return this.$1h(o);let d="method";if(c)o.key=c;else{if((this.isContextual("get")||this.isContextual("set"))&&this.$s(!1))d=this.value,this.next();this.parsePropertyName(o)}if(this.eat(t.question))o.optional=!0;if(this.type===t.parenL||this.$1()){if(l="TSMethodSignature",d!=="method")o.kind=d;this.$r(o,t.colon),o.kind=d}else if(this.type===t.colon)o.typeAnnotation=this.$6()}return this.$1i(),this.finishNode(o,l)}$1i(){if(!this.eat(t.comma))this.semicolon()}$1g(){return this.$v(()=>{if(this.next(),this.type!==t.name)return!1;return this.next(),this.type===t.colon})}$1h(o){if(this.expect(t.bracketL),o.parameters=[this.$h(this.parseIdent(),!1)],this.expect(t.bracketR),this.type===t.colon)o.typeAnnotation=this.$6();return this.$1i(),this.finishNode(o,"TSIndexSignature")}$2a(){let o=this.startNode();this.expect(t.bracketL),o.elementTypes=[];while(!this.eat(t.bracketR))if(o.elementTypes.push(this.$2c()),this.type!==t.bracketR)this.expect(t.comma);return this.finishNode(o,"TSTupleType")}$2c(){let o=this.start,l=this.startLoc,p=this.eat(t.ellipsis),c;if((this.type===t.name||this.type.keyword)&&this.$2d()){let d=this.startNode();d.label=this.parseIdent(!0),d.optional=this.eat(t.question),this.expect(t.colon),d.elementType=this.$0(),c=this.finishNode(d,"TSNamedTupleMember")}else if(c=this.$0(),this.eat(t.question)){let d=this.startNodeAt(c.start,c.loc?.start);d.typeAnnotation=c,c=this.finishNode(d,"TSOptionalType")}if(p){let d=this.startNodeAt(o,l);d.typeAnnotation=c,c=this.finishNode(d,"TSRestType")}return c}$2d(){let o=this.$d();if(this.input.charCodeAt(o)===63)o=this.$d(o+1);return this.input.charCodeAt(o)===fl}$8(){return this.$a(()=>{let o=this.startNode();this.next(),o.params=[];while(!this.$c()){let l=this.startNode();while((this.type===t._const||this.type===t._in||this.isContextual("out"))&&r(this.$2()))l[this.value]=!0,this.next();if(l.name=this.$y(),this.eat(t._extends))l.constraint=this.$0();if(this.eat(t.eq))l.default=this.$0();if(o.params.push(this.finishNode(l,"TSTypeParameter")),!this.$c()){if(this.expect(t.comma),this.$c())o.extra={trailingComma:this.lastTokStart}}}if(this.next(),o.params.length===0)this.$1y(this.start,"Type parameter list cannot be empty.");return this.finishNode(o,"TSTypeParameterDeclaration")})}$e(){return this.$a(()=>{let o=this.startNode();this.next(),o.params=[];while(!this.$c())if(o.params.push(this.$0()),!this.$c())this.expect(t.comma);if(o.params.length===0)this.unexpected();return this.next(),this.finishNode(o,"TSTypeParameterInstantiation")})}$1j(){let o=[];do{let l=this.startNode();if(l.expression=this.$j(),this.$1())l.typeParameters=this.$e();o.push(this.finishNode(l,"TSExpressionWithTypeArguments"))}while(this.eat(t.comma));return o}$1k(o=!1){if(this.type!==t.name||this.containsEsc){if(this.type===t._const&&this.$3()==="enum")return this.$10(this.startNode());return}if(!this.$2e(this.value))return;if(this.value==="declare")return this.$2f(o);return this.$1l(this.startNode(),this.value)}$2e(o){switch(o){case"interface":case"type":case"namespace":return this.$14();case"enum":return r(this.$2());case"abstract":return this.$b()&&this.$3()==="class";case"module":{let l=this.$2();return this.$b()&&(l===Xr||l===Yr||r(l))}case"declare":return this.$b()&&vh.has(this.$3());case"global":return this.$b()&&this.$2()===si}return!1}$1l(o,l){switch(l){case"interface":return this.$1m(o);case"type":return this.$2g(o);case"enum":return this.$10(o);case"abstract":return this.$1n(o,!0);case"global":return o.global=!0,o.id=this.parseIdent(),o.body=this.$11(),this.finishNode(o,"TSModuleDeclaration")}return this.$2h(o)}$2f(o){let l=this.$5;this.$5=!0;let p=this.startNode();this.next();let c=this.value;if(c==="const"&&this.$3()==="enum")p.const=!0;if(!o&&Th.has(c))p.declare=!0;let d;if(p.const)d=this.$10(p);else if(c==="var"||c==="let"||c==="const")d=this.parseVarStatement(p,c,!0);else if(c==="function")this.next(),d=this.parseFunction(p,cl,!1,!1);else if(c==="class")d=this.parseClass(p,!0);else d=this.$1l(p,c);return d.declare=!0,this.$5=l,d}$1n(o,l){return this.next(),o.abstract=!0,this.parseClass(o,l)}$1m(o){if(this.next(),o.id=this.parseIdent(),this.checkLValSimple(o.id,pl),this.$1())o.typeParameters=this.$8();return this.$a(()=>{if(this.eat(t._extends))o.extends=this.$1j();let l=this.startNode();l.body=this.$1f(),o.body=this.finishNode(l,"TSInterfaceBody")}),this.finishNode(o,"TSInterfaceDeclaration")}$2g(o){if(this.next(),o.id=this.parseIdent(),this.checkLValSimple(o.id,Jr),this.$1())o.typeParameters=this.$8();return o.typeAnnotation=this.$a(()=>(this.expect(t.eq),this.$0())),this.semicolon(),this.finishNode(o,"TSTypeAliasDeclaration")}$10(o){if(this.type===t._const)o.const=!0,this.next();this.next(),o.id=this.parseIdent(),this.checkLValSimple(o.id,Dh),this.expect(t.braceL),o.members=[];while(!this.eat(t.braceR)){let l=this.startNode();if(l.id=this.type===t.string?this.parseExprAtom():this.parseIdent(!0),this.eat(t.eq))l.initializer=this.parseMaybeAssign();if(o.members.push(this.finishNode(l,"TSEnumMember")),this.type!==t.braceR)this.expect(t.comma)}return this.finishNode(o,"TSEnumDeclaration")}$2h(o){if(this.next(),this.type===t.string){if(o.id=this.parseExprAtom(),this.type===t.braceL)o.body=this.$11();else this.semicolon();return this.finishNode(o,"TSModuleDeclaration")}return o.id=this.parseIdent(),this.checkLValSimple(o.id,Ph),this.$1o(o)}$1o(o){if(this.eat(t.dot)){let l=this.startNode();l.id=this.parseIdent(),o.body=this.$1o(l)}else o.body=this.$11();return this.finishNode(o,"TSModuleDeclaration")}$11(){this.enterScope(Eh);let o=this.startNode();this.enterScope(0),this.expect(t.braceL),o.body=[];while(!this.eat(t.braceR))o.body.push(this.parseStatement(null,!0));return this.exitScope(),this.exitScope(),this.finishNode(o,"TSModuleBlock")}$1p(o,l){if(o.isExport=l,o.id=this.parseIdent(),this.checkLValSimple(o.id,rn),this.expect(t.eq),this.isContextual("require")&&this.$2()===ul){let p=this.startNode();this.next(),p.expression=this.$1e(),o.moduleReference=this.finishNode(p,"TSExternalModuleReference")}else o.moduleReference=this.$j();return this.semicolon(),this.finishNode(o,"TSImportEqualsDeclaration")}$2i(){let o=this.$d();if(this.input.charCodeAt(o)!==ri)return!1;let l=this.input.charCodeAt(o+1);return l!==ri&&l!==62}parseStatement(o,l,p){if(this.type===s)this.$1q(!0);let c=this.$1k();if(c)return c;return super.parseStatement(o,l,p)}parseVarStatement(o,l,p){return super.parseVarStatement(o,l,p||this.$5)}parseVarId(o,l){if(super.parseVarId(o,l),o.id.type==="Identifier"&&this.$u()&&!this.hasPrecedingLineBreak())this.next(),o.definite=!0;this.$h(o.id,!1)}parseCatchClauseParam(){let o=this.$h(this.parseBindingAtom(),!1),l=o.type==="Identifier";return this.enterScope(l?Sh:0),this.checkLValPattern(o,l?Ah:rn),this.expect(t.parenR),o}parseImport(o){if(this.next(),o.importKind="value",this.type===t.string)o.specifiers=[],o.source=this.parseExprAtom();else{if(this.isContextual("type")){let l=this.$2();if(l===si||l===Kr||r(l)&&this.$3()!=="from")o.importKind="type",this.next()}if(this.type===t.name&&this.$2i())return this.$1p(o,!1);o.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),o.source=this.$z()}return this.$1r(o),this.semicolon(),this.finishNode(o,"ImportDeclaration")}parseWithClause(){if(this.isContextual("assert")&&!this.hasPrecedingLineBreak())this.type=t._with;return this.type===t._with?super.parseWithClause():void 0}$1r(o){let l=this.parseWithClause();if(l)o.attributes=l}parseImportSpecifier(){return this.$1s("importKind",()=>super.parseImportSpecifier())}parseExportSpecifier(o){return this.$1s("exportKind",()=>super.parseExportSpecifier(o))}$1s(o,l){let p=this.isContextual("type")?this.$2():-1;if(p===Xr||p===Yr||r(p)&&this.$3()!=="as"){let d=this.startNode();this.next();let f=l();return this.$q(f,d),f[o]="type",f}let c=l();return c[o]="value",c}parseExport(o,l){if(this.next(),this.eat(t._import)){if(o.importKind="value",this.isContextual("type")&&r(this.$2())&&this.$3()!=="from")o.importKind="type",this.next();return this.$1p(o,!0)}if(this.eat(t.eq))return o.expression=this.parseExpression(),this.semicolon(),this.finishNode(o,"TSExportAssignment");if(this.eatContextual("as"))return this.expectContextual("namespace"),o.id=this.parseIdent(),this.semicolon(),this.finishNode(o,"TSNamespaceExportDeclaration");if(o.exportKind="value",this.isContextual("type")){let d=this.$2();if(d===si||d===Kr)o.exportKind="type",this.next()}if(this.eat(t.star))return this.parseExportAllDeclaration(o,l);if(this.eat(t._default)){if(this.isContextual("interface")&&this.$14())o.declaration=this.$1m(this.startNode());else if(this.isContextual("abstract")&&this.$3()==="class")o.declaration=this.$1n(this.startNode(),"nullableID");else o.declaration=this.parseExportDefaultDeclaration();return this.finishNode(o,"ExportDefaultDeclaration")}let p=this.isContextual("declare"),c=this.$1k(!0);if(c||this.shouldParseExportStatement()){if(o.declaration=c??this.parseStatement(null),p||o.declaration.type==="TSInterfaceDeclaration"||o.declaration.type==="TSTypeAliasDeclaration")o.exportKind="type";return o.specifiers=[],o.source=null,this.finishNode(o,"ExportNamedDeclaration")}if(o.declaration=null,o.specifiers=this.parseExportSpecifiers(l),this.eatContextual("from"))o.source=this.$z(),this.$1r(o);else{for(let d of o.specifiers)if(this.checkUnreserved(d.local),this.checkLocalExport(d.local),d.local.type==="Literal")this.raise(d.local.start,"A string literal cannot be used as an exported binding without `from`.");o.source=null}return this.semicolon(),this.finishNode(o,"ExportNamedDeclaration")}parseFunction(o,l,p,c,d){let f=l&cl;if(f)this.$f=o,this.$o=o.start;super.parseFunction(o,l,p,c,d),this.$f=null;let h=!o.body;if(h)o.type="TSDeclareFunction";if(f&&o.id){if(h){if(this.$5&&this.currentScope().flags&ll)this.declareName(o.id.name,Qr,o.id.start);this.checkLValSimple(o.id,Ch)}else if(!(l&Nh)){let m=wh;if(this.strict||o.generator||o.async)m=this.treatFunctionsAsVar?kh:rn;this.checkLValSimple(o.id,m)}}return o}parseFunctionParams(o){if(this.$1())o.typeParameters=this.$8();if(super.parseFunctionParams(o),this.type===t.colon)o.returnType=this.$6(!0)}parseFunctionBody(o,l,p,c){if(p&&this.type===t.colon)o.returnType=this.$6(!0);if(l||this.type===t.braceL||o.start!==this.$o){super.parseFunctionBody(o,l,p,c);return}this.semicolon(),this.exitScope()}parseMethod(o,l,p){let c=this.$k;this.$k=null;let d=super.parseMethod(o,l,p);if(!d.body)d.type="TSDeclareMethod";if(c)d.typeParameters=c;return d}parseBindingList(o,l,p,c){let d=c===!0||this.$l;return this.$l=!1,super.parseBindingList(o,l,p,d)}$s(o){if(!o&&!this.$b())return!1;let l=this.$2();return l===_h||l===si||l===Kr||l===dl||l===Ih||l===Xr||l===Yr||l>=48&&l<=57||r(l)}parseAssignableListItem(o){let l=this.$12(),p=this.start,c=this.startLoc,d,f=!1,h=!1;if(o)while(this.type===t.name&&bh.has(this.value)&&!this.containsEsc&&this.$s(!1)){if(this.value==="readonly")f=!0;else if(this.value==="override")h=!0;else d=this.value;this.next()}let m;if(this.type===t._this)m=this.startNode(),m.name="this",this.next(),this.finishNode(m,"Identifier");else m=this.parseBindingAtom();let y=this.type===t.eq?this.parseMaybeDefault(p,c,m):this.parseMaybeDefault(m.start,m.loc?.start,this.$h(m,!0));if(l.length>0)y.decorators=l;if(!d&&!f&&!h)return y;let g=this.startNodeAt(p,c);if(d)g.accessibility=d;if(f)g.readonly=!0;if(h)g.override=!0;return g.parameter=y,this.finishNode(g,"TSParameterProperty")}parseBindingListItem(o){if(o.type==="RestElement")this.$h(o,!0);return o}checkLValSimple(o,l,p){if(this.$f&&o===this.$f.id){this.$f=null;return}if(!l&&al.has(o.type)){this.checkLValSimple(o.expression,l,p);return}switch(o.type){case"TSParameterProperty":this.checkLValInnerPattern(o.parameter,l,p);return;case"Identifier":if(o.name==="this")return}super.checkLValSimple(o,l,p)}toAssignable(o,l,p){if(o&&!l&&al.has(o.type))return o;return super.toAssignable(o,l,p)}declareName(o,l,p){let c=this.currentScope();if(l&Qr){this.$1t(c,o),c.$1u??=[],c.$1u.push(o);return}if(l===Jr||l===pl){if(c.$13??=[],l===Jr&&Q(c.$13,o))this.raise(p,`type '${o}' has already been declared.`);c.$13.push(o),this.$1t(c,o);return}if(l&ml){if(c.$1v??=[],Q(c.$1v,o))return;super.declareName(o,rn,p),c.$1v.push(o);return}super.declareName(o,l,p)}$1t(o,l){if(this.inModule&&o.flags&ll)delete this.undefinedExports[l]}checkLocalExport(o){for(let l=this.scopeStack.length-1;l>=0;l--){let p=this.scopeStack[l];if(Q(p.$13,o.name)||Q(p.$1u,o.name))return}super.checkLocalExport(o)}checkExport(){}raiseRecoverable(o,l){if(l==="Duplicate constructor in the same class")return;super.raiseRecoverable(o,l)}$12(){let o=[];while(this.type===s)o.push(this.$1w());return o}$1q(o){let l=this.$9[this.$9.length-1];while(this.type===s)l.push(this.$1w());if(this.type===t._export){if(!o)this.unexpected()}else if(this.type!==t._class&&!((this.isContextual("abstract")||this.isContextual("declare"))&&this.$3()==="class"))this.raise(this.start,"Leading decorators must be attached to a class declaration.")}$1w(){let o=this.startNode();this.next(),this.$9.push([]);let l=this.start,p=this.startLoc,c;if(this.type===t.parenL){if(this.next(),c=this.parseExpression(),this.expect(t.parenR),this.options.preserveParens){let f=this.startNodeAt(l,p);f.expression=c,c=this.finishNode(f,"ParenthesizedExpression")}}else{c=this.parseIdent(!1);while(this.eat(t.dot)){let f=this.startNodeAt(l,p);f.object=c,f.property=this.parseIdent(!0),f.computed=!1,c=this.finishNode(f,"MemberExpression")}}let d=this.$p()?this.$e():void 0;if(this.eat(t.parenL)){let f=this.startNodeAt(c.start,c.loc?.start);if(f.callee=c,f.arguments=this.parseExprList(t.parenR,!1,!1),d)f.typeArguments=d;c=this.finishNode(f,"CallExpression")}else if(d){let f=this.startNodeAt(c.start,c.loc?.start);f.expression=c,f.typeArguments=d,c=this.finishNode(f,"TSInstantiationExpression")}return o.expression=c,this.$9.pop(),this.finishNode(o,"Decorator")}shouldParseExportStatement(){return this.type===s||super.shouldParseExportStatement()}parseExprAtom(o,l,p){if(this.type===s)this.$1q(!1);return super.parseExprAtom(o,l,p)}parseProperty(o,l){if(o||this.type!==s)return super.parseProperty(o,l);let p=this.$12(),c=super.parseProperty(o,l);if(c.type==="SpreadElement")this.raise(c.start,"Decorators can't be used with SpreadElement");return c.decorators=p,c}parseClassId(o,l){let p=this.$9.length-1,c=this.$9[p];if(c.length>0)o.decorators=c,this.$q(o,c[0]),this.$9[p]=[];if(!this.isContextual("implements")||l===!0)super.parseClassId(o,l);if(this.$1())o.typeParameters=this.$8()}parseClassSuper(o){if(super.parseClassSuper(o),o.superClass&&this.$1())o.superTypeParameters=this.$e();if(this.eatContextual("implements"))o.implements=this.$a(()=>this.$1j())}parseClassElement(o){if(this.type===s){let h=this.$12();if(this.type===t.braceR)this.raise(this.start,"Decorators must be attached to a class element.");let m=this.parseClassElement(o);return m.decorators=h,this.$q(m,h[0]),m}if(this.eat(t.semi))return null;let l=this.startNode();while(this.type===t.name&&xh.has(this.value)&&!this.containsEsc&&this.$s(this.value==="static")){let h=this.value;if(this.next(),h==="static"&&this.type===t.braceL)return this.next(),this.parseClassStaticBlock(l),l;if(h==="public"||h==="private"||h==="protected")l.accessibility=h;else l[h]=!0}if(this.type===t.bracketL&&this.$1g())return this.$1h(l);l.static??=!1;let p="",c=!1,d=!1,f="method";if(this.eatContextual("async"))if((this.isClassElementNameStart()||this.type===t.star)&&!this.canInsertSemicolon())d=!0;else p="async";if(!p&&this.eat(t.star))c=!0;if(!p&&!d&&!c){let h=this.value;if(this.eatContextual("get")||this.eatContextual("set"))if(this.isClassElementNameStart())f=h;else p=h}if(p)l.computed=!1,l.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),l.key.name=p,this.finishNode(l.key,"Identifier");else this.parseClassElementName(l);if(this.eat(t.question))l.optional=!0;if(this.type===t.parenL||this.$1()||f!=="method"||c||d){let h=l.key,m=!l.static&&!l.computed&&(h.type==="Identifier"&&h.name==="constructor"||h.type==="Literal"&&h.value==="constructor");if(l.kind=m?"constructor":f,this.$1())l.typeParameters=this.$8();this.$l=m,this.$o=this.start,this.parseClassMethod(l,c,d,m&&o)}else{if(!l.optional&&this.$u())this.next(),l.definite=!0;if(this.type===t.colon)l.typeAnnotation=this.$6();this.parseClassField(l)}return l}parseMaybeAssign(o,l,p){if(this.$p()){let c=this.$g(()=>{let d=this.$8(),f=super.parseMaybeAssign(o,l,p);if(f.type!=="ArrowFunctionExpression")return;return f.typeParameters=d,this.$q(f,d),f});if(c)return c}return super.parseMaybeAssign(o,l,p)}parseMaybeUnary(o,l,p,c){if(this.$p()){let d=this.startNode();return d.typeAnnotation=this.$a(()=>{this.next();let f=this.$0();if(!this.$c())this.unexpected();return this.next(),f}),d.expression=this.parseMaybeUnary(null,!1,!1,c),this.finishNode(d,"TSTypeAssertion")}return super.parseMaybeUnary(o,l,p,c)}parseMaybeConditional(o,l){let p=this.start,c=this.startLoc,d=this.parseExprOps(o,l);if(this.checkExpressionErrors(l))return d;if(this.type===t.question&&!(d.type==="ArrowFunctionExpression"&&d.start===p)&&!this.$2j()){this.next();let f=this.startNodeAt(p,c);return f.test=d,f.consequent=this.parseMaybeAssign(),this.expect(t.colon),f.alternate=this.parseMaybeAssign(o),this.finishNode(f,"ConditionalExpression")}return d}$2j(){let o=this.$d(),l=this.input.charCodeAt(o);if(l===fl||l===Lh||l===$h)return!0;return l===ri&&this.input.charCodeAt(o+1)!==ri}parseParenItem(o){return this.$h(o,!0)}$1x(){if(this.type!==t.colon)return!0;let o=this.$g(()=>{let l=this.$6(!0);return this.type===t.arrow&&!this.canInsertSemicolon()?l:void 0});if(!o)return!1;return this.$7=o,!0}shouldParseArrow(o){return this.$1x()&&super.shouldParseArrow(o)}shouldParseAsyncArrow(){return this.$1x()&&super.shouldParseAsyncArrow()}parseArrowExpression(o,l,p,c){if(this.$7)o.returnType=this.$7,this.$7=null;return super.parseArrowExpression(o,l,p,c)}parseExprList(o,l,p,c){if(!this.$m)return super.parseExprList(o,l,p,c);this.$m=!1;let d=[],f=!0;while(!this.eat(o)){if(f)f=!1;else if(this.expect(t.comma),l&&this.afterTrailingComma(o))break;if(this.type===t.ellipsis){let h=this.parseSpread(c);if(this.eat(t.question))h.optional=!0;if(this.type===t.colon)h.typeAnnotation=this.$6();d.push(h)}else d.push(this.parseMaybeAssign(!1,c,this.parseParenItem))}return d}parseSubscript(o,l,p,c,d,f,h){if(this.$u()&&!this.hasPrecedingLineBreak()){let y=this.startNodeAt(l,p);return this.exprAllowed=!1,this.next(),y.expression=o,this.finishNode(y,"TSNonNullExpression")}if(d&&this.$1()){let y=this.$g(()=>this.$2k(l,p,h));if(y)return y}let m=this.type===t.questionDot&&this.$2()===hl;if(this.$1()||m||this.type===t.bitShift&&this.value==="<<"){let y=this.$g(()=>{if(m)this.next();this.$p();let g=this.$e();if(this.type===t.parenL&&!c)return g;if(this.type===t.backQuote)return m?void 0:g;if(m)return;if(this.$c()||this.type===t.bitShift||this.type.startsExpr&&this.type!==t.parenL&&!this.hasPrecedingLineBreak())return;return g});if(y){let g=this.startNodeAt(l,p);if(this.type===t.parenL&&!c){if(this.next(),g.callee=o,g.arguments=this.parseExprList(t.parenR,!0,!1),g.typeArguments=y,m)o.optional=!0;if(m||f)g.optional=m;return this.finishNode(g,"CallExpression")}if(this.type===t.backQuote)return g.tag=o,g.quasi=this.parseTemplate({isTagged:!0}),g.typeArguments=y,this.finishNode(g,"TaggedTemplateExpression");return g.expression=o,g.typeArguments=y,this.finishNode(g,"TSInstantiationExpression")}}if(d&&this.type===t.parenL)this.$m=!0;return super.parseSubscript(o,l,p,c,d,f,h)}$2k(o,l,p){let c=this.startNodeAt(o,l);if(c.typeParameters=this.$8(),this.expect(t.parenL),c.params=this.parseBindingList(t.parenR,!1,!0),this.type===t.colon)c.returnType=this.$6(!0);if(this.type!==t.arrow||this.canInsertSemicolon())return;return this.next(),this.parseArrowExpression(c,c.params,!0,p)}parseDynamicImport(o){if(this.next(),o.source=this.parseMaybeAssign(),this.eat(t.comma)&&this.type!==t.parenR)o.arguments=[this.parseExpression()];return this.expect(t.parenR),this.finishNode(o,"ImportExpression")}parseNew(){let o=super.parseNew();if(o.callee?.type!=="TSInstantiationExpression")return o;let l=this.startNodeAt(o.start,o.loc?.start);return l.callee=o.callee.expression,l.typeArguments=o.callee.typeArguments,l.arguments=o.arguments,this.finishNodeAt(l,"NewExpression",o.end,o.loc?.end)}parseExprOp(o,l,p,c,d){if(t._in.binop>c&&this.type===t.name&&(this.value==="as"||this.value==="satisfies")&&!this.containsEsc&&!this.hasPrecedingLineBreak()){let f=this.value==="satisfies",h=this.startNodeAt(l,p);return h.expression=o,h.typeAnnotation=this.$a(()=>{if(this.next(),!f&&this.type===t._const){let m=this.startNode();return m.typeName=this.parseIdent(!0),this.finishNode(m,"TSTypeReference")}return this.$0()}),this.finishNode(h,f?"TSSatisfiesExpression":"TSAsExpression"),this.parseExprOp(h,l,p,c,d)}return super.parseExprOp(o,l,p,c,d)}parseGetterSetter(o){o.kind=o.key.name,super.parseGetterSetter(o)}parsePropertyValue(o,l,p,c,d,f,h,m){if(!l&&this.$1()){if(this.$k=this.$8(),this.type!==t.parenL)this.unexpected();o.kind="init"}return super.parsePropertyValue(o,l,p,c,d,f,h,m)}}return a});var Zr=new Set("abstract accessor arguments as asserts async await break case catch class const continue debugger declare default delete do else enum eval export extends false finally for function get global if implements import in infer instanceof interface intrinsic is keyof let module namespace new null of out override package private protected public readonly return satisfies set static super switch this throw true try type typeof unique var void while with yield".split(" ")),Mh=new Set("any bigint boolean false never null number object string symbol true undefined unknown void".split(" ")),Bh=new Set("get set new readonly static public private protected".split(" "));function yl(e){return e>=97&&e<=122||e>=65&&e<=90||e===95||e===36}function ai(e){return e>=48&&e<=57}function es(e){return yl(e)||ai(e)}class gl{text;pos=0;constructor(e){this.text=e}readAll(){if(!this.type())return!1;return this.peek(),this.pos===this.text.length}peek(){let e=this.text,t=this.pos,n=e.charCodeAt(t);while(n===32||n===9)n=e.charCodeAt(++t);return this.pos=t,n}eat(e){if(this.peek()!==e.charCodeAt(0))return!1;return this.pos++,!0}word(){let e=this.pos;return this.skipWord()?this.text.slice(e,this.pos):void 0}skipWord(){if(!yl(this.peek()))return!1;let e=this.pos+1;while(es(this.text.charCodeAt(e)))e++;return this.pos=e,!0}keyword(e){this.peek();let t=this.pos+e.length;if(!this.text.startsWith(e,this.pos)||es(this.text.charCodeAt(t)))return!1;return this.pos=t,!0}name(){let e=this.word();return e!==void 0&&!Zr.has(e)}string(){let e=this.peek();if(e!==34&&e!==39)return!1;let t=this.text;for(let n=this.pos+1;n<t.length;n++){let i=t.charCodeAt(n);if(i===e)return this.pos=n+1,!0;if(i===92||i===10||i===13||i===8232||i===8233)return!1}return!1}number(){let e=this.text,t=this.pos;if(e.charCodeAt(t)===45)t++;let n=t;while(ai(e.charCodeAt(t)))t++;if(t===n||t-n>1&&e.charCodeAt(n)===48)return!1;if(e.charCodeAt(t)===46){let r=++t;while(ai(e.charCodeAt(t)))t++;if(t===r)return!1}let i=e.charCodeAt(t);if(es(i)||i===46)return!1;return this.pos=t,!0}type(){if(this.peek()===40){let e=this.pos;if(this.functionType())return!0;this.pos=e}do do if(!this.operatorType())return!1;while(this.eat("&"));while(this.eat("|"));return!0}operatorType(){if(this.keyword("keyof"))return this.operatorType();if(!this.primaryType())return!1;while(this.eat("[")){if(this.eat("]"))continue;if(!this.type()||!this.eat("]"))return!1}return!0}primaryType(){let e=this.peek();if(e===40)return this.pos++,this.type()&&this.eat(")");if(e===123)return this.objectType();if(e===91)return this.tupleType();if(e===34||e===39)return this.string();if(e===45||ai(e))return this.number();let t=this.word();if(t===void 0)return!1;if(t==="typeof")return this.typeQuery();if(t==="import")return this.importType(!0);if(Mh.has(t)){let n=this.peek();return n!==46&&n!==60}if(Zr.has(t))return!1;while(this.eat("."))if(!this.skipWord())return!1;return!this.eat("<")||this.typeArguments()}typeArguments(){do if(!this.type())return!1;while(this.eat(","));return this.eat(">")}typeQuery(){if(this.keyword("import"))return this.importType(!1);do if(!this.name())return!1;while(this.eat("."));return!0}importType(e){if(!this.eat("(")||!this.string()||!this.eat(")"))return!1;while(this.eat("."))if(!this.name())return!1;return!e||!this.eat("<")||this.typeArguments()}objectType(){this.pos++;while(!this.eat("}")){if(!this.typeMember())return!1;if(!this.eat(";")&&!this.eat(",")&&this.peek()!==125)return!1}return!0}typeMember(){let e=this.peek();if(this.eat("[")){let t=this.peek();if(t===34||t===39){if(!this.string()||!this.eat("]"))return!1}else return this.name()&&this.eat(":")&&this.type()&&this.eat("]")&&this.eat(":")&&this.type()}else if(e===34||e===39){if(!this.string())return!1}else{let t=this.word();if(t===void 0||Bh.has(t))return!1}return this.eat("?"),this.eat(":")&&this.type()}tupleType(){if(this.pos++,this.eat("]"))return!0;do if(!this.type())return!1;while(this.eat(","));return this.eat("]")}functionType(){if(this.pos++,!this.eat(")")){let e=new Set;for(;;){this.peek();let t=this.text.startsWith("...",this.pos);if(t)this.pos+=3;let n=this.word();if(n===void 0||Zr.has(n)||e.has(n))return!1;if(e.add(n),!t)this.eat("?");if(!this.eat(":")||!this.type())return!1;if(t||!this.eat(","))break}if(!this.eat(")"))return!1}if(this.peek(),!this.text.startsWith("=>",this.pos))return!1;return this.pos+=2,this.type()}}function Oh(e){return new gl(e).readAll()}var jh=R.extend(oi);function sn(e,t={}){return Oh(e)||Fh(e,t.inline??!1)}function Fh(e,t){let n=!1,i=new jh(t?{ecmaVersion:16,sourceType:"module",onComment:(r,s,a,o)=>{if(!r&&o===e.length)n=!0}}:{ecmaVersion:16,sourceType:"module"},e);try{return i.parseWholeType(),!n}catch(r){if(r instanceof SyntaxError)return!1;throw r}}var ts=/<!--[\s\S]*?-->|<script\s+(?:[^>]*|(?:[^=>'"/]+=(?:"[^"]*"|'[^']*'|[^>\s]+)\s+)*)lang=(["'])?([^"' >]+)\1[^>]*>/y;function pi(e){return e.charCodeAt(0)===65279?e.slice(1):e}function Ke(e){return e>=48&&e<=57}function U(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}function _(e,t){let n=t;while(n<e.length&&U(e.charCodeAt(n)))n++;return n}function ci(e){let t=e.indexOf("<");while(t!==-1){let n=e.charCodeAt(t+1);if(n===33||n===115){ts.lastIndex=t;let i=ts.exec(e);if(i){if(n===115)return i[2]==="ts";t=e.indexOf("<",ts.lastIndex);continue}}t=e.indexOf("<",t+1)}return!1}function ui(e,t){let n=e.indexOf("</script",t);while(n!==-1){if(e.charCodeAt(_(e,n+8))===li)return n;n=e.indexOf("</script",n+8)}return-1}function di(e,t){return _(e,t+8)+1}var qh=new Set("area base br col command embed hr img input keygen link meta param source track wbr".split(" "));function on(e){return qh.has(e)||e.charCodeAt(0)===33&&e.toLowerCase()==="!doctype"}function fi(e,t){let n=t;while(n<e.length){let i=e.charCodeAt(n);if(i===47&&e.charCodeAt(n+1)===42){let r=e.indexOf("*/",n+2);n=r===-1?e.length:r+2}else if(i===34||i===39){n++;while(n<e.length){let r=e.charCodeAt(n);if(r===i||r===10)break;n+=r===92?2:1}n++}else if(i===60&&e.startsWith("</style",n))break;else n++}return Math.min(n,e.length)}var Vh=34,Hh=39,xl=47,bl=61,li=62,fe=(e)=>e===Vh||e===Hh;function pt(e,t,n){let i=t;for(;i<e.length;i++){let r=e.charCodeAt(i);if(U(r)||r===xl||r===li)break;if(n&&(fe(r)||r===bl))break}return i}function hi(e,t){let n=e.charCodeAt(t);return U(n)||fe(n)||n===bl||n===60||n===li||n===96||n===xl&&e.charCodeAt(t+1)===li}var vl=0,L=1,an=2,H=3,Wh=0;var zh=2,Tl=3,Cl=4,ln=4,Gh=5,Uh=6,Jh={await:L,case:L,default:L,delete:L,extends:L,in:L,instanceof:L,new:L,of:L,return:L,throw:L,typeof:L,void:L,yield:L,do:an,else:an,finally:an,try:an,for:ln,if:ln,while:ln,with:ln,import:Gh,export:Uh},kl=10,ns=Array(is(128,0)).fill(null);for(let e of Object.entries(Jh)){let t=is(e[0].charCodeAt(0),e[0].length),n=ns[t]??[];n.push(e),ns[t]=n}function is(e,t){return e*(kl+1)+t}function Kh(e,t,n){let i=e.charCodeAt(t);if(i>=128||n-t>kl)return H;let r=is(i,n-t),s=ns[r];if(s===null)return H;for(let a=0;a<s.length;a++)if(e.startsWith(s[a][0],t))return s[a][1];return H}var wl=new Uint8Array(128);for(let e of["az","AZ","09","__","$$","\\\\"])for(let t=e.charCodeAt(0);t<=e.charCodeAt(1);t++)wl[t]=1;function rs(e){return e>=128?!U(e):wl[e]===1}function Al(e,t,n){let i=e.length,r=[],s=t,a=L,o=!1;while(s<i){let l=e.charCodeAt(s);if(l===32||l===10||U(l)){s++;continue}if(l===47){let c=Yh(e,s);if(c!==-1){s=c;continue}}let p=o;if(o=!1,rs(l)||l===35){let c=s;if(s=Qh(e,s+1),!p&&n?.(c,s))return-1;let d=p?H:Kh(e,c,s);a=d===L||d===an||d===ln?L:H;continue}switch(s++,l){case 34:case 39:s=Zh(e,s,l),a=H;break;case 96:s=El(e,s,r),a=e.charCodeAt(s-1)===123?L:H;break;case 47:{let c=a===H?-1:em(e,s);if(c===-1)a=L;else s=Sl(e,c),a=H;break}case 40:r.push(Wh),a=L;break;case 41:if(r.length===0)return s-1;r.pop(),a=H;break;case 123:r.push(a===L?Tl:zh),a=vl;break;case 125:{if(r.length===0)return s-1;let c=r.pop();if(c===Cl)s=El(e,s,r),a=e.charCodeAt(s-1)===123?L:H;else a=c===Tl?H:vl;break}case 93:a=H;break;case 46:if(Ke(e.charCodeAt(s)))s=Sl(e,s),a=H;else if(e.startsWith("..",s))s+=2,a=L;else o=!0,a=L;break;case 63:if(e.charCodeAt(s)===46&&!Ke(e.charCodeAt(s+1)))s++,o=!0;a=L;break;case 33:a=a===H&&!U(e.charCodeAt(s-2))?H:L;break;case 43:case 45:if(e.charCodeAt(s)===l&&a===H)s++;else a=L;break;case 61:if(e.charCodeAt(s)===62)s++;a=L;break;default:a=L}}return i}function Pl(e){return e===10||e===13||e===8232||e===8233}function Xh(e,t){for(let n=t;n<e.length;n++)if(Pl(e.charCodeAt(n)))return n;return e.length}function Yh(e,t){let n=e.charCodeAt(t+1);if(n===47)return Xh(e,t+2);if(n!==42)return-1;let i=e.indexOf("*/",t+2);return i===-1?e.length:i+2}function Qh(e,t){let n=t;while(n<e.length){let i=e.charCodeAt(n);if(i===92)n+=2;else if(rs(i))n++;else break}return n}function Sl(e,t){let n=t;while(n<e.length&&rs(e.charCodeAt(n)))n++;return n}function Zh(e,t,n){for(let i=t;i<e.length;i++){let r=e.charCodeAt(i);if(r===n)return i+1;if(r===92)i+=e.startsWith(`\r
|
|
35
|
+
`,i+1)?2:1;else if(r===10||r===13)return i}return e.length}function El(e,t,n){for(let i=t;i<e.length;i++){let r=e.charCodeAt(i);if(r===96)return i+1;if(r===92)i++;else if(r===36&&e.charCodeAt(i+1)===123)return n.push(Cl),i+2}return e.length}function em(e,t){let n=!1;for(let i=t;i<e.length;i++){let r=e.charCodeAt(i);if(Pl(r))return-1;if(r===92)i++;else if(r===91)n=!0;else if(r===93)n=!1;else if(r===47&&!n)return i+1}return-1}var Dl={li:["li"],dt:["dt","dd"],dd:["dt","dd"],p:"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".split(" "),rt:["rt","rp"],rp:["rt","rp"],optgroup:["optgroup"],option:["option","optgroup"],thead:["tbody","tfoot"],tbody:["tbody","tfoot"],tfoot:["tbody"],tr:["tr","tbody"],td:["td","th","tr"],th:["td","th","tr"]};function mi(e,t){return Object.hasOwn(Dl,e)&&Dl[e].includes(t)}var Nl="{",_l=60,os=62,ct=47,Il=61,cn=123,$l=/\s*>/y,ss=/<\/textarea(\s[^>]*)?>/iy,tm=["cript","tyle","velte:options"],Ll="</svelte:options";function yi(e){let t=pi(e).trimEnd();return nm(t,ci(t),null)}function nm(e,t,n){let i={typescript:t,instance:null,module:null,css:null,options:null},r=im(e),s=[],a=0;while(a<=r){let o=e.charCodeAt(a);if(o===_l)a=om(e,a,s,i,n);else if(o===cn)a=sm(e,a,s);else a++}return i}function im(e){let t=-1,n=e.indexOf("<s");while(n!==-1){let i=rm(e,n+2);if(i!==-1){let r=e.charCodeAt(i);if(i===e.length||U(r)||r===ct||r===os)t=n}n=e.indexOf("<s",n+2)}return t}function rm(e,t){for(let n of tm)if(e.startsWith(n,t))return t+n.length;return-1}function un(e,t){return Math.min(Al(e,t)+1,e.length)}function sm(e,t,n){let i=_(e,t+1),r=e.charCodeAt(i),s=e.charCodeAt(i+1);if(r===35||r===58||r===64||r===ct&&s!==ct&&s!==42){i++;while(i<e.length){let a=e.charCodeAt(i);if(a<97||a>122)break;i++}if(r===35)n.push(Nl);else if(r===ct){let a=n.lastIndexOf(Nl);if(a!==-1)n.length=a}}return un(e,i)}function om(e,t,n,i,r){if(e.startsWith("!--",t+1)){let c=e.indexOf("-->",t+4),d=c===-1?e.length:c+3;if(r&&n.length===0)r.comments.push(t,d);return d}if(e.charCodeAt(t+1)===ct){let c=t+2,d=e.slice(c,pt(e,c,!1)),f=n.lastIndexOf(d);if(f!==-1)n.length=f;return pn(e,_(e,c+d.length))}let s=e.slice(t+1,pt(e,t+1,!1)),a=_(e,t+1+s.length),o=n[n.length-1];if(o!==void 0&&mi(o,s))n.pop();let l=n.length===0;if(r&&l&&(s==="script"||s==="style"||s==="svelte:options"))r.tags.push(t);if(l&&(s==="script"||s==="style")){let c=[];if(a=pn(e,pm(e,a,c)),s==="script"){let f=am(e,t,a,c);if(f.context==="module")i.module??=f;else i.instance??=f;return f.end}let d=lm(e,t,a,c);return i.css??=d,d.end}let p=l&&s==="svelte:options"?[]:null;if(a=cm(e,a,p),e.charCodeAt(a)===ct||on(s)){if(e.charCodeAt(a)===ct)a++;a=pn(e,a)}else{if(a=pn(e,a),s==="textarea")return dm(e,a);if(s==="script"||s==="style"){let c=`</${s}>`,d=e.indexOf(c,a);return d===-1?e.length:d+c.length}if(p&&e.startsWith(Ll,a))a=pn(e,_(e,a+Ll.length));else return n.push(s),a}if(p)i.options??={start:t,end:a,attributes:p};return a}function pn(e,t){return e.charCodeAt(t)===os?t+1:t}function am(e,t,n,i){let r=ui(e,n),s=r===-1?e.length:r,a=i.some((o)=>o.name==="module"||o.name==="context");return{start:t,end:r===-1?e.length:di(e,r),context:a?"module":"default",attributes:i,content:{start:n,end:s}}}function lm(e,t,n,i){let r=fi(e,n),s=r;if(e.startsWith("</style",s)){s+=7,$l.lastIndex=s;let a=$l.exec(e);if(a)s+=a[0].length}return{start:t,end:s,attributes:i,content:{start:n,end:r}}}function pm(e,t,n){let i=t;for(;;){let r=i,s=pt(e,i,!0);if(s===r)return i;i=s;let a=!0;if(e.charCodeAt(i)===Il){let o=_(e,i+1),l=e.charCodeAt(o),p=-1;if(fe(l)){let d=e.indexOf(e[o],o+1);if(d!==-1)p=d+1}if(p===-1){p=o;while(p<e.length&&e.charCodeAt(p)!==os&&!U(e.charCodeAt(p)))p++}let c=fe(l)?1:0;a=e.slice(o+c,p-c),i=p}n.push({name:e.slice(r,s),value:a,start:r,end:i}),i=_(e,i)}}function cm(e,t,n){let i=t;for(;;){for(;;){if(e.startsWith("/*",i)){let l=e.indexOf("*/",i+2);i=l===-1?e.length:l+2}else if(e.startsWith("//",i)){let l=e.indexOf(`
|
|
36
|
+
`,i+2);i=l===-1?e.length:l}else break;i=_(e,i)}let r=i;if(e.charCodeAt(i)===cn){i=_(e,un(e,i+1));continue}let s=pt(e,i,!0);if(s===r)return i;let a=s,o=!0;if(i=_(e,s),e.charCodeAt(i)===Il){let l=_(e,i+1);a=e.startsWith("/>",l)?l+1:um(e,l),o=fe(e.charCodeAt(l))?e.slice(l+1,Math.max(l+1,a-1)):e.slice(l,a),i=_(e,a)}n?.push({name:e.slice(r,s),value:o,start:r,end:a})}}function um(e,t){let n=e.charCodeAt(t);if(fe(n)){let r=t+1;while(r<e.length){let s=e.charCodeAt(r);if(s===n)return r+1;r=s===cn?un(e,r+1):r+1}return e.length}let i=t;while(i<e.length&&!hi(e,i))i=e.charCodeAt(i)===cn?un(e,i+1):i+1;return i}function dm(e,t){let n=t;while(n<e.length){let i=e.charCodeAt(n);if(i===_l){if(ss.lastIndex=n,ss.test(e))return ss.lastIndex}n=i===cn?un(e,n+1):n+1}return e.length}function gi(){throw Error('sveast: parsing TypeScript needs `typescript` from "sveast/typescript": createParser({ typescript }) or createModuleParser({ typescript })')}var fm=/^\t+/;class b extends Error{name="ParseError";code;reason;position;start;end;frame;constructor(e,t,n){super(`${n}
|
|
37
|
+
https://svelte.dev/e/${t}`);this.code=t,this.reason=n;let i=typeof e==="number"?e:e?.start,r=typeof e==="number"?e:e?.end;if(i!==void 0)this.position=[i,r??i],this.start=xe(this.position[0]),this.end=xe(this.position[1]),this.frame=hm(this.start.line-1,this.end.column)}}var Rl=(e)=>e.replace(fm,(t)=>" ".repeat(t.length));function hm(e,t){let n=Math.max(0,e-2),i=[];for(let s=n;s<e+3;s++){let a=vo(s);if(a===void 0)break;i.push(a)}let r=String(n+i.length+1).length;return i.map((s,a)=>{let o=`${String(n+a+1).padStart(r," ")}: ${Rl(s)}`;if(n+a!==e)return o;return`${o}
|
|
38
|
+
${" ".repeat(r+2+Rl(s.slice(0,t)).length)}^`}).join(`
|
|
39
|
+
`)}function Ol(e){throw new b(e,"attribute_duplicate","Attributes need to be unique")}function jl(e){throw new b(e,"attribute_empty_shorthand","Attribute shorthand cannot be empty")}function Fl(e,t){throw new b(e,"block_duplicate_clause",`${t} cannot appear more than once within a block`)}function ql(e){throw new b(e,"block_invalid_continuation_placement","{:...} block is invalid at this position (did you forget to close the preceding element or block?)")}function Vl(e){throw new b(e,"block_invalid_elseif","'elseif' should be 'else if'")}function Hl(e,t,n){throw new b(e,"block_invalid_placement",`{#${t} ...} block cannot be ${n}`)}function Wl(e){throw new b(e,"block_unclosed","Block was left open")}function zl(e){throw new b(e,"block_unexpected_close","Unexpected block closing tag")}function Gl(e){throw new b(e,"const_tag_invalid_expression","{@const ...} must consist of a single variable declaration")}function Ul(e){throw new b(e,"css_empty_declaration","Declaration cannot be empty")}function ps(e){throw new b(e,"css_expected_identifier","Expected a valid CSS identifier")}function Jl(e){throw new b(e,"css_selector_invalid","Invalid selector")}function Kl(e){throw new b(e,"debug_tag_invalid_arguments","{@debug ...} arguments must be identifiers, not arbitrary expressions")}function cs(e){throw new b(e,"declaration_tag_invalid_type","Declaration tags must be `let` or `const` declarations")}function Xl(e){throw new b(e,"directive_invalid_value","Directive value must be a JavaScript expression enclosed in curly braces")}function Yl(e,t){throw new b(e,"directive_missing_name",`\`${t}\` name cannot be empty`)}function Ql(e,t){throw new b(e,"element_invalid_closing_tag",`\`</${t}>\` attempted to close an element that was not open`)}function Zl(e,t,n){throw new b(e,"element_invalid_closing_tag_autoclosed",`\`</${t}>\` attempted to close element that was already automatically closed by \`<${n}>\` (cannot nest \`<${n}>\` inside \`<${t}>\`)`)}function us(e,t){throw new b(e,"element_unclosed",`\`<${t}>\` was left open`)}function ds(e){throw new b(e,"expected_attribute_value","Expected attribute value")}function ep(e){throw new b(e,"expected_block_type","Expected 'if', 'each', 'await', 'key' or 'snippet'")}function fs(e){throw new b(e,"expected_identifier","Expected an identifier")}function tp(e){throw new b(e,"expected_pattern","Expected identifier or destructure pattern")}function np(e){throw new b(e,"expected_tag","Expected 'html', 'render', 'attach', 'const', or 'debug'")}function Xe(e,t){throw new b(e,"expected_token",`Expected token ${t}`)}function ip(e){throw new b(e,"expected_whitespace","Expected whitespace")}function mm(e,t){throw new b(e,"js_parse_error",`${t}`)}function rp(e){throw new b(e,"render_tag_invalid_expression","`{@render ...}` tags can only contain call expressions")}function sp(e){throw new b(e,"script_duplicate","A component can have a single top-level `<script>` element and/or a single top-level `<script module>` element")}function op(e,t){throw new b(e,"script_invalid_attribute_value",`If the \`${t}\` attribute is supplied, it must be a boolean attribute`)}function ap(e){throw new b(e,"script_invalid_context",'If the context attribute is supplied, its value must be "module"')}function lp(e,t){throw new b(e,"script_reserved_attribute",`The \`${t}\` attribute is reserved and cannot be used`)}function pp(e){throw new b(e,"style_duplicate","A component can have a single top-level `<style>` element")}function cp(e){throw new b(e,"svelte_component_invalid_this","Invalid component definition — must be an `{expression}`")}function up(e){throw new b(e,"svelte_component_missing_this","`<svelte:component>` must have a 'this' attribute")}function hs(e){throw new b(e,"svelte_element_missing_this","`<svelte:element>` must have a 'this' attribute with a value")}function dp(e,t){throw new b(e,"svelte_meta_duplicate",`A component can only have one \`<${t}>\` element`)}function fp(e,t){throw new b(e,"svelte_meta_invalid_content",`<${t}> cannot have children`)}function hp(e,t){throw new b(e,"svelte_meta_invalid_placement",`\`<${t}>\` tags cannot be inside elements or blocks`)}function mp(e,t){throw new b(e,"svelte_meta_invalid_tag",`Valid \`<svelte:...>\` tag names are ${t}`)}function yp(e){throw new b(e,"svelte_options_deprecated_tag",'"tag" option is deprecated — use "customElement" instead')}function gp(e){throw new b(e,"svelte_options_invalid_attribute","`<svelte:options>` can only receive static attributes")}function bi(e,t){throw new b(e,"svelte_options_invalid_attribute_value",`Value must be ${t}, if specified`)}function xp(e){throw new b(e,"svelte_options_invalid_customelement",'"customElement" must be a string literal defining a valid custom element name or an object of the form { tag?: string; shadow?: "open" | "none" | `ShadowRootInit`; props?: { [key: string]: { attribute?: string; reflect?: boolean; type: .. } } }')}function bp(e){throw new b(e,"svelte_options_invalid_customelement_props",'"props" must be a statically analyzable object literal of the form "{ [key: string]: { attribute?: string; reflect?: boolean; type?: "String" | "Boolean" | "Number" | "Array" | "Object" }"')}function vp(e){throw new b(e,"svelte_options_invalid_customelement_shadow",'"shadow" must be either "open", "none" or `ShadowRootInit` object.')}function ms(e){throw new b(e,"svelte_options_invalid_tagname","Tag name must be lowercase and hyphenated")}function Tp(e){throw new b(e,"svelte_options_reserved_tagname","Tag name is reserved")}function Sp(e,t){throw new b(e,"svelte_options_unknown_attribute",`\`<svelte:options>\` unknown attribute '${t}'`)}function Ep(e){throw new b(e,"tag_invalid_name","Expected a valid element or component name. Components must have a valid variable name or dot notation expression")}function Cp(e,t,n){throw new b(e,"tag_invalid_placement",`{@${t} ...} tag cannot be ${n}`)}function pe(e){throw new b(e,"unexpected_eof","Unexpected end of input")}function kp(e,t){throw new b(e,"unexpected_reserved_word",`'${t}' is a reserved word in JavaScript and cannot be used here`)}function wp(e){throw new b(e,"unterminated_string_constant","Unterminated string constant")}function Ap(e){throw new b(e,"void_element_invalid_content","Void elements cannot have children or closing tags")}var wt="",Pp=[],vi=0,j=[],F=0;function ym(e,t){wt=e,Pp=t,vi=0}function gm(){return vi}function xm(e,t,n,i){vi=i}function bm(e,t,n,i,r,s){vi=i;let a=t;if(e&&a.includes(`
|
|
40
|
+
`)){let l=wt.lastIndexOf(`
|
|
41
|
+
`,n-1)+1,p=l,c=wt.charCodeAt(p);while(c===32||c===9)c=wt.charCodeAt(++p);if(p>l)a=vm(a,wt.slice(l,p))}let o={type:e?"Block":"Line",value:a,start:n,end:i};if(r&&s)o.loc={start:r,end:s};Pp.push(o)}function vm(e,t){let n=e.startsWith(t)?t.length:0,i="",r=e.indexOf(`
|
|
42
|
+
`,n);while(r!==-1){if(i+=e.slice(n,r+1),n=r+1,e.startsWith(t,n))n+=t.length;r=e.indexOf(`
|
|
43
|
+
`,n)}return i+e.slice(n)}function Tm(e,t,n){let i=0,r=t.length;while(i<r){let s=i+r>>>1;if(t[s].start<n)i=s+1;else r=s}if(i>=t.length)return;if(j=t.slice(i).map(({type:s,value:a,start:o,end:l})=>({type:s,value:a,start:o,end:l})),F=0,ls(e,void 0,!1),F<j.length&&(j[F].start>=e.end||e.type==="Program")){e.trailingComments??=[];while(F<j.length)e.trailingComments.push(j[F++])}}var Sm=new Map([["BlockStatement","body"],["Program","body"],["ArrayExpression","elements"],["ObjectExpression","properties"]]);function Ml(e,t){for(let n=e;n<t;n++){let i=wt.charCodeAt(n);if(i!==44&&i!==41&&i!==32&&i!==9)return!0}return!1}function ls(e,t,n){while(F<j.length&&j[F].start<e.start)e.leadingComments??=[],e.leadingComments.push(j[F++]);if(F>=j.length)return;let i=j[F].start;if(i<e.end||!Ml(e.end,i)){let r=tt(e),s=Sm.get(e.type),a=s===void 0?void 0:r[s],o=Array.isArray(a)&&a.length===0;for(let l in r){if(F>=j.length)return;if(l==="type")continue;let p=r[l];if(Array.isArray(p)){let c=l===s;for(let d=0;d<p.length;d++){let f=p[d];if(De(f))ls(f,e,c?d===p.length-1:o)}}else if(De(p))ls(p,e,o)}if(F>=j.length)return}if(t!==void 0&&e.end===t.end)return;if(n)while(F<j.length){if(t&&j[F].start>=t.end)break;e.trailingComments??=[],e.trailingComments.push(j[F++])}else if(e.end<=j[F].start&&!Ml(e.end,j[F].start))e.trailingComments=[j[F++]]}var Ti=new Set("arguments await break case catch class const continue debugger default delete do else enum eval export extends false finally for function if implements import in instanceof interface let new null package private protected public return static super switch this throw true try typeof var void while with yield".split(" ")),Si=!1,dn=1,Em=2,Cm=32,km=256,wm=dn|Em|km,Am=2,Pm=3,Dm=4,Nm=/\r\n?|\n|\u2028|\u2029/,Bl=new Map;function xi(e){if(!(e instanceof RegExp))return e;let t=Bl.get(e);if(!t){let n=new Set(e.source.slice(4,-2).split("|"));t={test:(i)=>n.has(i)},Bl.set(e,t)}return t}var ys=tn((e)=>class extends e{declareName(t,n,i){let r=!1;if(n===Am){let s=this.currentScope();if(r=Q(s.lexical,t)||Q(s.functions,t)||Q(s.var,t),s.lexical.push(t),this.inModule&&s.flags&dn)delete this.undefinedExports[t]}else if(n===Dm)this.currentScope().lexical.push(t);else if(n===Pm){let s=this.currentScope();r=this.treatFunctionsAsVar?Q(s.lexical,t):Q(s.lexical,t)||Q(s.var,t),s.functions.push(t)}else for(let s=this.scopeStack.length-1;s>=0;--s){let a=this.scopeStack[s];if(Q(a.lexical,t)&&!(a.flags&Cm&&a.lexical[0]===t)||!this.treatFunctionsAsVarInScope(a)&&Q(a.functions,t)){r=!0;break}if(a.var.push(t),this.inModule&&a.flags&dn)delete this.undefinedExports[t];if(a.flags&wm)break}if(r)this.raiseRecoverable(i,`Identifier '${t}' has already been declared`)}}),gs=tn((e)=>{let{keywordTypes:t,tokTypes:n}=e.acorn,i=new Map("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 const class extends export import super".split(" ").map((s)=>[s,t[s]])),r;return class extends e{constructor(s,a,o){super(s,a,o);this.keywords=xi(this.keywords),this.reservedWords=xi(this.reservedWords),this.reservedWordsStrict=xi(this.reservedWordsStrict),this.reservedWordsStrictBind=xi(this.reservedWordsStrictBind),r??=this.context[0]}reset(s,a,o){if(super.reset?.(s,a,o),this.input=s,this.containsEsc=!1,this.pos=a,o)this.lineStart=a-o.column,this.curLine=o.line;else this.lineStart=s.lastIndexOf(`
|
|
44
|
+
`,a-1)+1,this.curLine=this.options.locations?s.slice(0,this.lineStart).split(Nm).length:1;this.type=n.eof,this.value=null,this.start=this.end=a,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=a;let l=this.context;if(l.length!==1||l[0]!==r)this.context=this.initialContext();if(this.exprAllowed=!0,this.strict=!0,this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels.length>0)this.labels=[];for(let d in this.undefinedExports){this.undefinedExports=Object.create(null);break}let p=this.scopeStack,c=p[0];if(p.length!==1||c.flags!==dn||c.var.length>0||c.lexical.length>0||c.functions.length>0||c.tsTypes!==void 0||c.tsExportOnly!==void 0||c.tsEnums!==void 0)this.scopeStack=[],this.enterScope(dn);if(this.regexpState=null,this.privateNameStack.length>0)this.privateNameStack=[];this.inTemplateElement=!1}parseParenAndDistinguishExpression(s,a){let o=super.parseParenAndDistinguishExpression(s,a);if(o.type==="ParenthesizedExpression")Si=!0;return o}checkUnreserved(s){if(Ti.has(s.name))super.checkUnreserved(s)}canInsertSemicolon(){let s=this.type;return s===n.eof||s===n.braceR||nn(this.input,this.lastTokEnd,this.start)}checkLocalExport(){}skipSpace(){let s=this.input,a=this.options.locations,o=this.pos,l=s.charCodeAt(o);for(;;)if(l===32||l===9)l=s.charCodeAt(++o);else if(l===10){if(l=s.charCodeAt(++o),a)this.curLine++,this.lineStart=o}else break;if(this.pos=o,l===47||l<33||l>=128)super.skipSpace()}readWord1(){let s=this.input,a=this.pos,o=a,l=s.charCodeAt(o),p=0;while(l>=97&&l<=122||l>=65&&l<=90||l>=48&&l<=57||l===95||l===36)p=Math.imul(p,31)+l|0,l=s.charCodeAt(++o);if(l>=128||l===92)return super.readWord1();return this.containsEsc=!1,this.pos=o,go(s,a,o,p)}readWord(){let s=this.readWord1();return this.finishToken(i.get(s)??n.name,s)}}}),Dp=ii(ys,gs),$m=/ \(\d+:\d+\)$/;function fn(e){return e}function Np(e){return e instanceof SyntaxError&&"pos"in e&&typeof e.pos==="number"}function xs(e,t,n,i,r,s=e.root.comments.length){let a=e.root.comments;ym(t,a);let o={onComment:e.comments?bm:xm,sourceType:"module",ecmaVersion:16,locations:e.loc,preserveParens:i};if(e.lfOnly)o.startLocation=xe(n);let l=e.isTypeScript?e.typescript:Dp;if(!l)gi();let p;try{p=r(l,o)}catch(c){if(!Np(c))throw c;mm(c.pos,c.message.replace($m,""))}if(a.length>s)Tm(fn(p),a,n);return p}function $p(e,t,n=0){return fn(xs(e,t,0,!1,(i,r)=>{if(n>0&&r.locations)r.startLocation=xe(n);let s=new i(r,t,n).parse();return s.start=0,s},0))}function Lm(e,t){if(!t)return{line:1,column:0};let{column:n}=xe(e);return{line:bo(e-n)+1,column:n}}var _m={count:0},as,Im=(e)=>e.parseExpression();function Rm(e,t,n,i,r){let s=as;if(as=void 0,s?.ParserClass===e&&s.onComment===t.onComment&&s.locations===t.locations&&s.parser.reset)s.parser.reset(n,i,t.startLocation);else s={ParserClass:e,onComment:t.onComment,locations:t.locations,parser:new e(t,n,i)};let a=s.parser;a.nextToken();let o=r(a);return a.input="",as=s,o}function Lp(e,t,n,i){return _m.count+=1,Si=!1,xs(e,t,n,!0,(r,s)=>(s.startLocation??=Lm(n,s.locations),Rm(r,s,t,n,i)))}function At(e,t,n,i=!1){let r=fn(Lp(e,t,n,Im)),s=Math.max(r.end,gm());return{node:Si&&!i?bs(r):r,end:s}}function _p(e,t,n){let i=e.root.comments.length,r=!0,s=Lp(e,t,n,(o)=>{let l={shorthandAssign:-1,trailingComma:-1,parenthesizedAssign:-1,parenthesizedBind:-1,doubleProto:-1},p=o.parseMaybeConditional(void 0,l);if(o.type!==Dp.acorn.tokTypes.eof)return r=!1,p;let c=o.toAssignable(p,!1,l);return o.checkLValPattern(c),c});if(!r){e.root.comments.length=i;return}let a=fn(s);return Si?bs(a):a}function Ip(e,t,n){return fn(xs(e,t,n,!1,(i,r)=>{let s=new i(r,t,n);try{return s.nextToken(),s.parseStatement(null,!0,Object.create(null))}catch(a){if(Np(a)&&a.pos===t.length)pe(t.length);throw a}}))}function bs(e){let t=e;while(t.type==="ParenthesizedExpression")t=t.expression;return Rt(t,bs),t}var Mm=[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],Bm=/[:!]/;function vs(e){let t;return()=>(t??=Om(e),t)}function Om(e){let t=new Map,n=0,i="";for(let r of e.split(" ")){let s=r.search(Bm);i=i.slice(0,Number.parseInt(r[0],36))+r.slice(1,s);let a=Number.parseInt(r.slice(s+1),36);if(t.set(`${i};`,a),r[s]==="!")t.set(i,a);n=Math.max(n,i.length+1)}return{table:t,longest:n}}var XT=vs("0amp!12 1pos:13 0gt!1q 0lt!1o 0quot!y"),Ts=(e)=>e>=48&&e<=57,jm=(e)=>Ts(e)||e>=65&&e<=70||e>=97&&e<=102,Rp=(e)=>Ts(e)||e>=65&&e<=90||e>=97&&e<=122,Ei=0;function Fm(e,t,n,i){if(e.charCodeAt(t)===35){let o=(e.charCodeAt(t+1)|32)===120,l=t+(o?2:1),p=l;while(p<e.length&&(o?jm:Ts)(e.charCodeAt(p)))p++;if(p===l)return 0;return Ei=e.charCodeAt(p)===59?p+1:p,Number.parseInt(e.slice(l,p),o?16:10)}let{table:r,longest:s}=i(),a=t;while(a-t<s&&Rp(e.charCodeAt(a)))a++;if(e.charCodeAt(a)===59){let o=r.get(e.slice(t,a+1));if(o!==void 0)return Ei=a+1,o}for(let o=a;o>t;o--){let l=r.get(e.slice(t,o));if(l===void 0)continue;if(n){let p=e.charCodeAt(o);if(Rp(p)||p===95||p===61)continue}return Ei=o,l}return 0}function qm(e,t){if(e===10&&!t)return 32;if(e<128)return e;if(e<=159)return Mm[e-128];if(e>=55296&&e<=57343)return 0;if(e<=196607)return e;if(e>=917504&&e<=917631||e>=917760&&e<=917999)return e;return 0}function Ci(e,t,n){let i=e.indexOf("&");if(i===-1)return e;let r="",s=0;while(i!==-1){let a=Fm(e,i+1,t,n);if(a)r+=e.slice(s,i)+String.fromCodePoint(qm(a,t)),s=Ei;i=e.indexOf("&",a?s:i+1)}return r+e.slice(s)}var Vm=/\r(?!\n)|[\u2028\u2029]/,Zp=/\s*}/y;function Cs(e,t){let n=e.codePointAt(t);if(n===void 0||!de(n,!0))return t;let i=t+(n<=65535?1:2),r=e.codePointAt(i);while(r!==void 0&&Be(r,!0))i+=r<=65535?1:2,r=e.codePointAt(i);return i}class ec{source;index=0;loc;lfOnly;isTypeScript;typescript;entityNames;css;script;comments;root;stack;fragments;metaTags=new Set;lastAutoClosedTag;nextAngle=-1;nextBrace=-1;constructor(e,t,n,i={}){if(this.source=e,this.loc=i.loc??!1,this.lfOnly=this.loc&&!Vm.test(e),this.isTypeScript=ci(e),this.typescript=n.typescript,this.isTypeScript&&!this.typescript)gi();this.entityNames=n.entityNames,this.css=i.css??!0,this.script=i.script??!0,this.comments=i.comments??!0,this.root={type:"Root",start:0,end:t,css:null,js:[],options:null,fragment:{type:"Fragment",nodes:[]},comments:[]},this.stack=[this.root],this.fragments=[this.root.fragment]}match(e){if(e.length===1)return this.source.charCodeAt(this.index)===e.charCodeAt(0);return this.source.startsWith(e,this.index)}matchRegex(e){return e.lastIndex=this.index,e.exec(this.source)?.[0]??null}eat(e,t=!1){if(this.match(e))return this.index+=e.length,!0;if(t)Xe(this.index,e);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)pe(this.source.length);let t=this.source.indexOf(e,this.index),n=t===-1?this.source.length:t,i=this.source.slice(this.index,n);return this.index=n,i}allowWhitespace(){this.index=_(this.source,this.index)}requireWhitespace(){if(!U(this.source.charCodeAt(this.index)))ip(this.index);this.allowWhitespace()}eatClosingBrace(){this.allowWhitespace(),this.eat("}",!0)}sourceLocation(e,t){return this.loc?{start:xe(e),end:xe(t)}:void 0}readIdentifierName(){let e=this.index,t=Cs(this.source,e),n=this.source.slice(e,t);if(this.index=t,Ti.has(n))kp(e,n);let i={type:"Identifier",name:n,start:e,end:t};if(this.loc)i.loc=this.sourceLocation(e,t);return i}current(){return this.stack[this.stack.length-1]}append(e){this.fragments[this.fragments.length-1].nodes.push(e)}open(e,t){this.append(e),this.stack.push(e),this.fragments.push(t)}setFragment(e){this.fragments[this.fragments.length-1]=e}close(){this.stack.pop(),this.fragments.pop()}}var Hm={"||":1,"??":1,"&&":2,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"+":9,"-":9,"*":10,"/":10,"%":10};function ks(e,t,n,i){return{type:"Literal",start:t,end:n,value:i,raw:e.slice(t,n)}}function Mp(e,t){let n=e.charCodeAt(t);if(n===34||n===39){for(let r=t+1;r<e.length;r++){let s=e.charCodeAt(r);if(s===n)return ks(e,t,r+1,e.slice(t+1,r));if(s===92||s===10||s===13)return null}return null}let i=t;for(;i<e.length;i++){let r=e.charCodeAt(i);if(r<48||r>57)break}if(i===t||n===48&&i-t>1)return null;return ks(e,t,i,Number(e.slice(t,i)))}function Wm(e,t,n){let i=Cs(e,t);if(i===t)return Mp(e,t);let r=e.slice(t,i);if(r==="true"||r==="false"||r==="null")return ks(e,t,i,r==="null"?null:r==="true");if(Ti.has(r))return null;let s={type:"Identifier",start:t,end:i,name:r};for(let a=i;;){let o=e.charCodeAt(a);if(o===40){let c=zm(e,a+1,n);if(!c)return null;s={type:"CallExpression",start:t,end:c.end,callee:s,arguments:c.arguments,optional:!1},a=c.end;continue}let l,p;if(o===46){if(p=Cs(e,a+1),p===a+1)return null;l={type:"Identifier",start:a+1,end:p,name:e.slice(a+1,p)}}else if(o===91){if(l=Mp(e,a+1),!l||e.charCodeAt(l.end)!==93)return null;p=l.end+1}else return s;s={type:"MemberExpression",start:t,end:p,object:s,property:l,computed:o===91,optional:!1},a=p}}function zm(e,t,n){let i=[],r=_(e,t);if(e.charCodeAt(r)===41)return{arguments:i,end:r+1};for(;;){let s=wi(e,r,n);if(!s)return null;i.push(s),r=_(e,s.end);let a=e.charCodeAt(r);if(a===41)return{arguments:i,end:r+1};if(a!==44)return null;if(r=_(e,r+1),e.charCodeAt(r)===41)return null}}function Ns(e,t,n){let i=e.charCodeAt(t),r=e.charCodeAt(t+1);if(!(i===33&&r!==61)&&!(i===45&&r!==45&&r!==61))return Wm(e,t,n);let s=Ns(e,_(e,t+1),n);if(!s)return null;return{type:"UnaryExpression",start:t,end:s.end,operator:i===33?"!":"-",prefix:!0,argument:s}}function Bp(e,t,n){let i=e.charCodeAt(t),r=e.charCodeAt(t+1);switch(i){case 124:return r===124&&e.charCodeAt(t+2)!==61?"||":null;case 38:return r===38&&e.charCodeAt(t+2)!==61?"&&":null;case 63:return r===63&&e.charCodeAt(t+2)!==61?"??":null;case 61:if(r!==61)return null;return e.charCodeAt(t+2)===61?"===":"==";case 33:if(r!==61)return null;return e.charCodeAt(t+2)===61?"!==":"!=";case 60:case 62:if(n||r===i)return null;if(r===61)return i===60?"<=":">=";return i===60?"<":">";case 43:return r===43||r===61?null:"+";case 45:return r===45||r===61?null:"-";case 42:return r===42||r===61?null:"*";case 47:return r===47||r===42||r===61?null:"/";case 37:return r===61?null:"%";default:return null}}function ws(e,t,n,i){if(tc(e.charCodeAt(t.end)))return t;let r=_(e,t.end),s=Bp(e,r,i);if(s===null)return t;let a=Hm[s];if(a<=n)return t;let o=Ns(e,_(e,r+s.length),i);if(!o)return null;let l=ws(e,o,s==="??"?2:a,i);if(!l)return null;let p;if(s==="||"||s==="&&"||s==="??"){let c=Bp(e,_(e,l.end),i);if(s==="??"?c==="||"||c==="&&":c==="??")return null;p={type:"LogicalExpression",start:t.start,end:l.end,left:t,operator:s,right:l}}else p={type:"BinaryExpression",start:t.start,end:l.end,left:t,operator:s,right:l};return ws(e,p,n,i)}function wi(e,t,n){let i=Ns(e,t,n);if(!i)return null;let r=ws(e,i,-1,n);if(!r||tc(e.charCodeAt(r.end)))return r;let s=_(e,r.end);if(e.charCodeAt(s)!==63)return r;let a=e.charCodeAt(s+1);if(a===46||a===63)return null;let o=wi(e,_(e,s+1),n);if(!o)return null;let l=_(e,o.end);if(e.charCodeAt(l)!==58)return null;let p=wi(e,_(e,l+1),n);if(!p)return null;return{type:"ConditionalExpression",start:r.start,end:p.end,test:r,consequent:o,alternate:p}}function tc(e){return e===125||e===41||e===44||e===58}function Gm(e,t){let n=e.charCodeAt(_(e,t));return n===125||n===41}function Um(e,t,n){let i=wi(e,t,n);return i&&Gm(e,i.end)?i:null}function he(e){switch(e.loc={start:et(e.start),end:et(e.end)},e.type){case"MemberExpression":he(e.object),he(e.property);break;case"CallExpression":he(e.callee);for(let t of e.arguments)he(t);break;case"UnaryExpression":he(e.argument);break;case"BinaryExpression":case"LogicalExpression":he(e.left),he(e.right);break;case"ConditionalExpression":he(e.test),he(e.consequent),he(e.alternate);break}}function Z(e){let t=!e.loc||e.lfOnly?Um(e.source,e.index,e.isTypeScript):null;if(t){if(e.index=t.end,e.loc)he(t);return t}let{node:n,end:i}=At(e,e.source,e.index);return e.index=i,n}var Jm=new Set(["server","client","worker","test","default"]);function Km(e,t,n){let{source:i,index:r}=e;if(r>=i.length)pe(i.length);let s=ui(i,r);if(s===-1)us(i.length,"script");e.index=di(i,s);let a=e.script?$p(e,i.slice(0,s),r):{type:"Program",start:r,end:s,body:[],sourceType:"module"};if(a.start=r,a.loc)Object.assign(a.loc.start,et(t)),Object.assign(a.loc.end,et(e.index));else if(e.loc)a.loc={start:et(t),end:et(e.index)};let o="default";for(let l of n){if(Jm.has(l.name))lp(l,l.name);if(l.name==="module"){if(l.value!==!0)op(l,l.name);o="module"}if(l.name==="context"){let p=l.value;if(!Array.isArray(p)||p.length!==1||p[0].type!=="Text"||p[0].data!=="module")ap(l);o="module"}}return{type:"Script",start:t,end:e.index,context:o,content:a,attributes:n}}var Xm=/(even|odd|\+?(\d+|\d*n(\s*[+-]\s*\d+)?)|-\d*n(\s*\+\s*\d+))((?=\s*[,)])|\s+of(\s+|(?=[.#[*:&])))/y,Ym=/\d+(\.\d+)?%/y,Qm=/\\[0-9a-fA-F]{1,6}(\r\n|\s)?/y,Zm=/\s*>/y,Ye=-1,nc=34,ey=35,ty=36,ny=38,ic=39,iy=40,ry=41,Di=42,sy=43,oy=45,ay=46,rc=47,As=58,ly=59,py=60,Op=61,cy=62,uy=91,$s=92,dy=93,fy=94,sc=123,Ps=124,hy=125,oc=126,Ai=[];function my(e,t,n){let i=e.index;Ai=[];let r=e.css?gy(e):yy(e),s=e.index;return e.eat("</style",!0),e.read(Zm),{type:"StyleSheet",start:t,end:e.index,attributes:n,children:r,comments:Ai,content:{start:i,end:s,styles:e.source.slice(i,s),comment:null}}}function yy(e){return e.index=fi(e.source,e.index),[]}function gy(e){let t=[];for(;;){if(Pt(e,!0),e.match("</style")||e.index>=e.source.length)break;t.push(e.match("@")?ac(e):lc(e))}return t}function ac(e){let t=e.index;e.eat("@",!0);let n=ut(e),i=Ls(e,!0),r=null;if(e.match("{"))r=uc(e);else e.eat(";",!0);return{type:"Atrule",start:t,end:e.index,name:n,prelude:i,block:r}}function lc(e){let t=e.index;return{type:"Rule",prelude:pc(e,!1),block:uc(e),start:t,end:e.index}}function pc(e,t){let n=[];Pt(e,!0);let i=e.index;while(e.index<e.source.length){n.push(xy(e,t));let r=e.index;if(Pt(e,!0),e.match(t?")":"{"))return{type:"SelectorList",start:i,end:r,children:n};e.eat(",",!0),Pt(e,!0)}return pe(e.source.length)}function jp(e,t){return{type:"RelativeSelector",combinator:e,selectors:[],start:t,end:-1}}function xy(e,t){let{source:n,index:i}=e,r=[],s=jp(null,e.index);while(e.index<n.length){let a=e.index,o=n.charCodeAt(a),l=s.selectors;if(o===ny)e.index++,l.push({type:"NestingSelector",name:"&",start:a,end:e.index});else if(o===Di)e.index++,l.push(Fp(e,a,"*"));else if(o===ey)e.index++,l.push({type:"IdSelector",name:ut(e),start:a,end:e.index});else if(o===ay)e.index++,l.push({type:"ClassSelector",name:ut(e),start:a,end:e.index});else if(o===As){let f=n.charCodeAt(a+1)===As;e.index+=f?2:1;let h=ut(e),m=null;if(e.eat("("))m=pc(e,!0),e.eat(")",!0);if(f)l.push({type:"PseudoElementSelector",name:h,start:a,end:e.index,...m&&{args:m}});else l.push({type:"PseudoClassSelector",name:h,args:m,start:a,end:e.index})}else if(o===uy)e.index++,l.push(by(e,a));else{let f=t?e.read(Xm):null,h=!f&&Ke(o)?e.read(Ym):null;if(f)l.push({type:"Nth",value:f,start:a,end:e.index});else if(h)l.push({type:"Percentage",value:h,start:a,end:e.index});else if(cc(n,a)===0){let m=ut(e);l.push(Fp(e,a,m))}}let p=e.index;Pt(e,!1);let c=e.match(",")||e.match(t?")":"{");if(e.index=p,c)return s.end=p,r.push(s),{type:"ComplexSelector",start:i,end:p,children:r};let d=vy(e);if(d){if(s.selectors.length>0)s.end=p,r.push(s);if(s=jp(d,d.start),e.allowWhitespace(),e.match(",")||e.match(t?")":"{"))Jl(e.index)}}return pe(n.length)}function Fp(e,t,n){let i=n,r;if(e.eat("|"))r=i,i=e.eat("*")?"*":ut(e);return{type:"TypeSelector",name:i,...r!==void 0&&{namespace:r},start:t,end:e.index}}function by(e,t){let n=e.source;e.allowWhitespace();let i=ut(e);e.allowWhitespace();let r=null,s=null,a=n.charCodeAt(e.index);if(a===Op)s="=";else if((a===oc||a===fy||a===ty||a===Di||a===Ps)&&n.charCodeAt(e.index+1)===Op)s=n.slice(e.index,e.index+2);if(s)e.index+=s.length,e.allowWhitespace(),r=Cy(e);e.allowWhitespace();let o=e.index;while(fc(n.charCodeAt(e.index)))e.index++;let l=e.index>o?n.slice(o,e.index):null;return e.allowWhitespace(),e.eat("]",!0),{type:"AttributeSelector",start:t,end:e.index,name:i,matcher:s,value:r,flags:l}}function cc(e,t){let n=e.charCodeAt(t);if(n===sy||n===oc||n===cy)return 1;if(n===Ps&&e.charCodeAt(t+1)===Ps)return 2;return 0}function vy(e){let t=e.index;e.allowWhitespace();let n=e.index,i=cc(e.source,n);if(i>0){e.index+=i;let r=e.index;return e.allowWhitespace(),{type:"Combinator",name:e.source.slice(n,r),start:n,end:r}}if(e.index!==t)return{type:"Combinator",name:" ",start:t,end:e.index};return null}function uc(e){let t=e.index;e.eat("{",!0);let n=[];while(e.index<e.source.length){if(Pt(e,!0),e.match("}"))break;n.push(Ty(e))}return e.eat("}",!0),{type:"Block",start:t,end:e.index,children:n}}function Ty(e){if(e.match("@"))return ac(e);let t=e.index;Ls(e,!1);let n=e.source.charCodeAt(e.index);return e.index=t,n===sc?lc(e):Sy(e)}function Sy(e){let{source:t,index:n}=e;if(n>=t.length)pe(t.length);let i=n;while(i<t.length){let l=t.charCodeAt(i);if(l===As||U(l))break;i++}let r=t.slice(n,i);e.index=i,e.allowWhitespace(),e.eat(":");let s=e.index;e.allowWhitespace();let a=Ls(e,!0);if(!a&&!r.startsWith("--"))Ul({start:n,end:s});let o=e.index;if(!e.match("}"))e.eat(";",!0);return{type:"Declaration",start:n,end:o,property:r,value:a}}function Ls(e,t){let n=e.source,i=n.length,r="",s=e.index,a=null,o=!1,l=!1,p=Ye,c=e.index;while(c<i){let d=n.charCodeAt(c);if(o){o=!1,c++;continue}if(d===$s){o=!0,c++;continue}if(d===p)p=Ye;else if(d===ry)l=!1;else if(p===Ye&&(d===nc||d===ic))p=d;else if(d===iy){if(Ey(n,r,s,c))l=!0}else if((d===ly||d===sc||d===hy)&&!l&&p===Ye){if(e.index=c,!t)return"";if(r+=n.slice(s,c),a){let f=r.length-r.trimStart().length;for(let h of a)h.position=Math.max(0,(h.position??0)-f)}return r.trim()}else if(d===rc&&!l&&p===Ye&&n.charCodeAt(c+1)===Di){r+=n.slice(s,c),e.index=c;let f=dc(e);if(t)f.position=r.length,Ai.push(f),a??=[],a.push(f);c=e.index,s=c;continue}c++}return e.index=i,pe(i)}function Ey(e,t,n,i){if(i-n>=3)return e.charCodeAt(i-3)===117&&e.charCodeAt(i-2)===114&&e.charCodeAt(i-1)===108;return(t+e.slice(n,i)).endsWith("url")}function Cy(e){let t=e.source,n=Ye;if(e.eat('"'))n=nc;else if(e.eat("'"))n=ic;let i=e.index,r=!1,s=i;while(s<t.length){let a=t.charCodeAt(s);if(r)r=!1;else if(a===$s)r=!0;else if(n===Ye?a===dy||U(a):a===n)return e.index=n===Ye?s:s+1,t.slice(i,s).trim();s++}return e.index=s,pe(t.length)}function ut(e){let{source:t,index:n}=e,i=t.charCodeAt(n);if(Ke(i)||i===oy&&Ke(t.charCodeAt(n+1)))ps(n);let r="",s=n,a=n;while(a<t.length){let o=t.charCodeAt(a);if(o===$s){r+=t.slice(s,a),e.index=a;let l=e.matchRegex(Qm);if(l){let p=String.fromCodePoint(Number.parseInt(l.slice(1),16));r+=p==="\\"?"\\\\":p,a+=l.length}else r+=`\\${t[a+1]}`,a+=2;s=a}else if(o>=160||ky(o))a++;else break}if(r+=t.slice(s,a),e.index=a,r==="")ps(n);return r}function Pt(e,t){let n=e.source;e.allowWhitespace();for(;;){let i=n.charCodeAt(e.index);if(i===rc&&n.charCodeAt(e.index+1)===Di){let r=dc(e);if(t)Ai.push(r)}else if(i===py&&e.eat("<!--"))e.readUntil("-->"),e.eat("-->",!0);else break;e.allowWhitespace()}}function dc(e){let t=e.index;e.eat("/*",!0);let n=e.readUntil("*/");return e.eat("*/",!0),{type:"CSSComment",value:n,start:t,end:e.index}}function fc(e){return e>=65&&e<=90||e>=97&&e<=122}function ky(e){return fc(e)||Ke(e)||e===95||e===45}var Ss=/<\/textarea(\s[^>]*)?>/iy,wy=/^![a-zA-Z]+$/,Ay=/^[a-zA-Z][a-zA-Z0-9]*:[a-zA-Z][a-zA-Z0-9-]*[a-zA-Z0-9]$/,Py=/^[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}]*)?$/u,Es="\\u200C\\u200D",Dy=new RegExp(`^(?:\\p{Lu}[$${Es}\\p{ID_Continue}.]*|\\p{ID_Start}[$${Es}\\p{ID_Continue}]*(?:\\.[$${Es}\\p{ID_Continue}]+)+)$`,"u"),Ny=new Map([["use","UseDirective"],["animate","AnimateDirective"],["bind","BindDirective"],["class","ClassDirective"],["style","StyleDirective"],["on","OnDirective"],["let","LetDirective"],["in","TransitionDirective"],["out","TransitionDirective"],["transition","TransitionDirective"]]),_s=new Map([["svelte:head",["SvelteHead",!0]],["svelte:options",["SvelteOptions",!0]],["svelte:window",["SvelteWindow",!0]],["svelte:document",["SvelteDocument",!0]],["svelte:body",["SvelteBody",!0]],["svelte:element",["SvelteElement",!1]],["svelte:component",["SvelteComponent",!1]],["svelte:self",["SvelteSelf",!1]],["svelte:fragment",["SvelteFragment",!1]],["svelte:boundary",["SvelteBoundary",!1]]]),qp=[..._s.keys()],$y=`${qp.slice(0,-1).join(", ")} or ${qp.at(-1)}`,Ly=62,Vp=123;function Ni(e,t){let n=e.index;if(n>=e.source.length)pe(e.source.length);let i=pt(e.source,n,t);return e.index=i,{name:e.source.slice(n,i),start:n,end:i,loc:e.sourceLocation(n,i)}}var hn=(e,t,n,i=n)=>({start:e,end:t,type:"Text",raw:n,data:i});function _y(e){let t=e.charCodeAt(0);if(t>=97&&t<=122&&!e.includes("."))return!1;return Dy.test(e)}function Iy(e){let t=!0;for(let n=0;n<e.length&&t;n++){let i=e.charCodeAt(n);t=i>=97&&i<=122||n>0&&i>=48&&i<=57}return t&&e.length>0||wy.test(e)||Ay.test(e)||Py.test(e)}function Hp(e,t){for(let n=e.length-1;n>=0;n--){let i=t(e[n]);if(i!==void 0)return i}return!1}function Ry(e,t,n){let i=_s.get(t);if(i)return i[0];if(n)return"Component";if(t==="title"){if(Hp(e.stack,({type:r})=>{if(r==="SvelteHead")return!0;return r==="RegularElement"||r==="Component"?!1:void 0}))return"TitleElement"}if(t==="slot"){if(!Hp(e.stack,(r)=>r.type==="RegularElement"&&r.attributes.some((s)=>s.type==="Attribute"&&s.name==="shadowrootmode")?!0:void 0))return"SlotElement"}return"RegularElement"}function My(e){let t=e.index++;if(e.eat("!--")){let n=e.readUntil("-->");e.eat("-->",!0),e.append({type:"Comment",start:t,end:e.index,data:n})}else if(e.eat("/"))By(e,t);else jy(e,t)}function By(e,t){let{name:n}=Ni(e,!1);if(e.allowWhitespace(),e.eat(">",!0),on(n))Ap(t);let i=e.current();while(!("name"in i)||i.name!==n){if(i.type!=="RegularElement"){let r=e.lastAutoClosedTag;if(r?.tag===n)Zl(t,n,r.reason);Ql(t,n)}i.end=t,e.close(),i=e.current()}if(i.end=e.index,e.close(),e.stack.length<(e.lastAutoClosedTag?.depth??0))e.lastAutoClosedTag=void 0}function Oy(e,t,n){return{type:e,start:t,end:-1,name:n}}function jy(e,t){let n=Ni(e,!1),{name:i}=n,r=_s.get(i);if(!r&&i.startsWith("svelte:"))mp(n,$y);let s=_y(i);if(!s&&!Iy(i))Ep(n);if(r?.[1]){if(e.metaTags.has(i))dp(t,i);if(e.current().type!=="Root")hp(t,i);e.metaTags.add(i)}let a=Oy(Ry(e,i,s),t,i);if(e.loc)a.name_loc=n.loc;a.attributes=[],a.fragment={type:"Fragment",nodes:[]},e.allowWhitespace();let o=e.current();if(o.type==="RegularElement"&&mi(o.name,i))o.end=t,e.close(),e.lastAutoClosedTag={tag:o.name,reason:i,depth:e.stack.length};if((i==="script"||i==="style")&&e.current().type==="Root"){let l=[];a.attributes=l,Up(e,l,zy),qy(e,a,t,l);return}if(Up(e,a.attributes,Uy),a.type==="SvelteComponent"){let l=Wp(a);if(!l)up(t);if(!zp(l.value))cp(l.start);a.expression=Gp(l.value)}else if(a.type==="SvelteElement"){let l=Wp(a);if(!l)hs(t);if(l.value===!0)hs(l);a.tag=zp(l.value)?Gp(l.value):Wy(l.value[0])}if(!e.eat("/")&&!on(i))if(e.eat(">",!0),i==="textarea")a.fragment.nodes=mc(e,(l,p)=>(Ss.lastIndex=p,Ss.test(l)),"inside <textarea>"),e.read(Ss);else if(i==="script"||i==="style")a.fragment.nodes.push(Fy(e,`</${i}>`));else{e.open(a,a.fragment);return}else e.eat(">",!0);a.end=e.index,e.append(a)}function Fy(e,t){let n=e.index,i=e.source.indexOf(t,n);e.index=i===-1?e.source.length:i;let r=hn(n,e.index,e.source.slice(n,e.index));return e.eat(t,!0),r}function qy(e,t,n,i){e.eat(">",!0);let r=Vy(e.root.fragment.nodes,n);if(t.name==="style"){let o=my(e,n,i);if(o.content.comment=r,e.root.css)pp(n);e.root.css=o;return}let s=Km(e,n,i);if(r&&e.comments)s.content.leadingComments=[{type:"Line",value:r.data}];let a=s.context==="module"?"module":"instance";if(e.root[a])sp(n);e.root[a]=s}function Vy(e,t){let n=e.length-1;if(n<0||e[n].end!==t)return null;for(let i=n;i>=0;i--){let r=e[i];if(r.type==="Comment")return r;if(r.type!=="Text"||r.data.trim())return null}return null}var Hy=(e)=>e.type==="Attribute"&&e.name==="this";function Wp(e){let t=e.attributes.find(Hy);if(t)e.attributes.splice(e.attributes.indexOf(t),1);return t}function zp(e){if(e===!0)return!1;if(!Array.isArray(e))return!0;return e.length===1&&e[0].type==="ExpressionTag"}function Gp(e){return(Array.isArray(e)?e[0]:e).expression}function Wy(e){if(e.type!=="Text")return e.expression;return{type:"Literal",value:e.data,raw:`'${e.raw}'`,start:e.start,end:e.end}}function Up(e,t,n){let i=new Set;for(;;){let r=n(e);if(!r)return;let{type:s}=r;if(s==="Attribute"||s==="BindDirective"||s==="StyleDirective"||s==="ClassDirective"){let a=`${s==="BindDirective"?"Attribute":s}${r.name}`;if(i.has(a))Ol(r);if(r.name!=="this")i.add(a)}t.push(r),e.allowWhitespace()}}function Is(e,t,n,i,r){return e.loc?{type:"Attribute",start:n,end:i,name:t.name,name_loc:t.loc,value:r}:{type:"Attribute",start:n,end:i,name:t.name,value:r}}function hc(e){if(fe(e.source.charCodeAt(e.index)))Xe(e.index,"=")}function zy(e){let t=e.index,n=Ni(e,!0);if(!n.name)return null;let i=!0;if(e.eat("=")){e.allowWhitespace();let{source:r}=e,s=e.index,a=fe(r.charCodeAt(s)),o=-1;if(a){let c=r.indexOf(r[s],s+1);if(c!==-1)o=c+1}if(o===-1){o=s;while(o<r.length&&r.charCodeAt(o)!==Ly&&!U(r.charCodeAt(o)))o++;if(o===s)ds(s)}e.index=o;let l=a?1:0,p=r.slice(s+l,o-l);i=[hn(o-p.length-l,o-l,p,Ci(p,!0,e.entityNames))]}return hc(e),Is(e,n,t,e.index,i)}function Gy(e){let t=e.index,n=e.match("/*");if(!n&&!e.match("//"))return!1;e.index+=2;let i=e.readUntil(n?"*/":`
|
|
45
|
+
`);if(n)e.eat("*/");let r={type:n?"Block":"Line",start:t,end:e.index,value:i},s=e.sourceLocation(t,e.index);if(s)r.loc=s;if(e.comments)e.root.comments.push(r);return!0}function Uy(e){while(Gy(e))e.allowWhitespace();let t=e.index;if(e.eat("{"))return Jy(e,t);let n=Ni(e,!0);if(!n.name)return null;let i=e.index;e.allowWhitespace();let r=!0;if(e.eat("=")){if(e.allowWhitespace(),e.match("/>"))r=[hn(e.index,e.index+1,"/")],e.index++;else r=Yy(e);i=e.index}else hc(e);let s=n.name.indexOf(":"),a=s>0?Ny.get(n.name.slice(0,s)):void 0;return a?Xy(e,a,n,s,t,i,r):Is(e,n,t,i,r)}function Jy(e,t){if(e.allowWhitespace(),e.eat("@attach")){e.requireWhitespace();let r=Z(e);return e.eatClosingBrace(),{type:"AttachTag",start:t,end:e.index,expression:r}}if(e.eat("...")){let r=Z(e);return e.eatClosingBrace(),{type:"SpreadAttribute",start:t,end:e.index,expression:r}}let n=e.readIdentifierName();if(n.name==="")jl(t);e.eatClosingBrace();let i={type:"ExpressionTag",start:n.start,end:n.end,expression:n};return Is(e,n,t,e.index,i)}function Ky(e){if(e===!0)return;return Array.isArray(e)?e[0]:e}function Xy(e,t,n,i,r,s,a){let[o,...l]=n.name.slice(i+1).split("|");if(o==="")Yl({start:r,end:r+i+1},n.name);let p={start:r,end:s,type:t,name:o};if(e.loc)p.name_loc=n.loc;if(t==="StyleDirective")return p.modifiers=l,p.value=a,p;let c=Ky(a);if(c&&(Array.isArray(a)&&a.length>1||c.type==="Text"))Xl(c.start);if(p.expression=c?.expression??null,p.modifiers=l,t==="TransitionDirective"){let d=n.name.slice(0,i);p.intro=d!=="out",p.outro=d!=="in"}if((t==="BindDirective"||t==="ClassDirective")&&!p.expression)p.expression={start:r+i+1,end:s,type:"Identifier",name:o};return p}function Yy(e){let t=e.source.charCodeAt(e.index),n=fe(t);if(n){if(e.index++,e.source.charCodeAt(e.index)===t)return e.index++,[hn(e.index-1,e.index-1,"")]}let i;try{i=mc(e,n?(r,s)=>r.charCodeAt(s)===t:hi,"in attribute value",n?t:void 0)}catch(r){let s=r instanceof b&&r.code==="js_parse_error"?r.position?.[0]:void 0;if(s!==void 0&&e.source.startsWith("/>",s-1))e.index=s,Xe(s,n?String.fromCharCode(t):"}");throw r}if(n)e.index++;else if(i.length===0)ds(e.index);return n||i.length>1||i[0].type==="Text"?i:i[0]}function mc(e,t,n,i){let{source:r}=e,s=[],a=e.index,o=(l)=>{if(l<=a)return;let p=r.slice(a,l);s.push(hn(a,l,p,Ci(p,!0,e.entityNames)))};while(e.index<r.length){let l=e.index;if(t(r,l))return o(l),s;if(r.charCodeAt(l)!==Vp){if(e.index++,i!==void 0)while(e.index<r.length&&r.charCodeAt(e.index)!==Vp&&r.charCodeAt(e.index)!==i)e.index++;continue}e.index++;let p=r.charCodeAt(e.index);if(p===35||p===64){e.index++;let d=e.index;while(e.index<r.length&&r.charCodeAt(e.index)>=97&&r.charCodeAt(e.index)<=122)e.index++;let f=r.slice(d,e.index);(p===35?Hl:Cp)(l,f,n)}o(l),e.allowWhitespace();let c=Z(e);e.eatClosingBrace(),s.push({type:"ExpressionTag",start:l,end:e.index,expression:c}),a=e.index}pe(r.length)}var Qy=new Map([["html","html"],["svg","svg"],["mathml","mathml"],["http://www.w3.org/2000/svg","svg"],["http://www.w3.org/1998/Math/MathML","mathml"]]),Zy=new Map([["type",(e,t)=>{if(t!=="String"&&t!=="Number"&&t!=="Boolean"&&t!=="Array"&&t!=="Object")return!1;return e.type=t,!0}],["reflect",(e,t)=>{if(typeof t!=="boolean")return!1;return e.reflect=t,!0}],["attribute",(e,t)=>{if(typeof t!=="string")return!1;return e.attribute=t,!0}]]),Jp="[a-z0-9_.\\xB7\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u203F-\\u2040\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\u{10000}-\\u{EFFFF}-]",eg=new RegExp(`^[a-z]${Jp}*-${Jp}*$`,"u"),tg=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" ")),ki=(e)=>(t,n)=>{let i=Pi(n);if(typeof i!=="boolean")bi(n,"true or false");t[e]=i},ng=new Map([["runes",ki("runes")],["immutable",ki("immutable")],["preserveWhitespace",ki("preserveWhitespace")],["accessors",ki("accessors")],["namespace",(e,t)=>{let n=Qy.get(Pi(t));if(!n)bi(t,'"html", "mathml" or "svg"');e.namespace=n}],["css",(e,t)=>{if(Pi(t)!=="injected")bi(t,'"injected"');e.css="injected"}],["tag",(e,t)=>yp(t)],["customElement",(e,t)=>{let n=sg(t);if(n)e.customElement=n}]]);function ig(e){let t=[],n={start:e.start,end:e.end,attributes:t};for(let i of e.attributes){if(i.type!=="Attribute")gp(i);t.push(i);let r=ng.get(i.name);if(!r)Sp(i,i.name);r(n,i)}return n}function Pi({value:e}){if(e===!0)return!0;let t=Array.isArray(e)?e:[e];if(t.length===0)return!0;if(t.length>1)return null;let[n]=t;if(n.type==="Text")return n.data;return n.expression.type==="Literal"?n.expression.value:null}function Kp(e,t){if(typeof t!=="string")ms(e);if(!t)return;if(!eg.test(t))ms(e);if(tg.has(t))Tp(e)}function Ds(e){return e.type==="Property"&&!e.computed&&e.key.type==="Identifier"}function rg(e,t){let n=new Map;for(let i of e.properties){if(!Ds(i))t();if(!n.has(i.key.name))n.set(i.key.name,i.value)}return n}function sg(e){let t=()=>xp(e);if(e.value===!0)t();let n=Array.isArray(e.value)?e.value[0]:e.value;if(n.type==="Text"){let c=Pi(e);return Kp(e,c),{tag:c}}let{expression:i}=n;if(i.type!=="ObjectExpression"){if(i.type==="Literal"&&i.value===null)return;t()}let r=rg(i,t),s={},a=r.get("tag");if(a){let c=a.type==="Literal"?a.value:void 0;Kp(null,c),s.tag=c}let o=r.get("props");if(o){let c=()=>bp(e);if(o.type!=="ObjectExpression")c();s.props={};for(let d of o.properties){if(!Ds(d)||d.value.type!=="ObjectExpression")c();let f={};s.props[d.key.name]=f;for(let h of d.value.properties){if(!Ds(h)||h.value.type!=="Literal")c();if(!Zy.get(h.key.name)?.(f,h.value.value))c()}}}let l=r.get("shadow");if(l)if(l.type==="ObjectExpression")s.shadow=l;else if(l.type==="Literal"&&(l.value==="open"||l.value==="none"))s.shadow=l.value;else vp(e);let p=r.get("extend");if(p)s.extend=p;return s}var og={"{":"}","(":")","[":"]"};function Rs(e,t,n=og){let i=Object.values(n),r=[],s=t;while(s<e.length){let a=e[s++];if(a==="'"||a==='"'||a==="`")s=ag(e,s,a);else if(Object.hasOwn(n,a))r.push(a);else if(i.includes(a)){let o=n[r.pop()??""];if(a!==o)Xe(s-1,o);if(r.length===0)return s}}pe(e.length)}function ag(e,t,n){let i=t;while(i<e.length){let r=e[i++];if(r===n)return i;if(r==="\\")i++;else if(n==="`"&&r==="$"&&e[i]==="{")i=Rs(e,i)}wp(t)}var lg=/\?\s*:/g;function $i(e){let t=e.index,n=e.readIdentifierName();if(n.name!=="")return{...n,typeAnnotation:Xp(e)};let i=e.source[e.index];if(i!=="{"&&i!=="[")tp(e.index);e.index=Rs(e.source,t);let r=_p(e,e.source.slice(0,e.index),t)??pg(e,t);Sn(r,"ObjectPattern","ArrayPattern");let s=Xp(e);if(r.typeAnnotation=s,s)r.end=s.end;return r}function pg(e,t){let{node:n}=At(e,`${e.source.slice(0,e.index)} = 1`,t);return Sn(n,"AssignmentExpression"),n.left}function Xp(e){let t=e.index;if(e.allowWhitespace(),!e.eat(":")){e.index=t;return}let n="_ as ",i=e.index-n.length,r=e.source.slice(0,i)+n+e.source.slice(e.index).replace(lg,":"),s=At(e,r,i).node;if(s.type==="AssignmentExpression"){let a=s.right.start;while(r[a]!=="=")a-=1;s=At(e,r.slice(0,a),i).node}if(s.type==="SequenceExpression")s=s.expressions[0];return Sn(s,"TSAsExpression"),e.index=s.end,{type:"TSTypeAnnotation",start:t,end:e.index,typeAnnotation:s.typeAnnotation}}var cg={IfBlock:"if",EachBlock:"each",KeyBlock:"key",AwaitBlock:"await",SnippetBlock:"snippet"},je=()=>({type:"Fragment",nodes:[]});function ug(e,t){if(e.eat("if")){e.requireWhitespace();let n=Z(e);e.eatClosingBrace();let i=je();e.open({type:"IfBlock",elseif:!1,start:t,end:-1,test:n,consequent:i,alternate:null},i)}else if(e.eat("each"))fg(e,t);else if(e.eat("await")){e.requireWhitespace();let n=Z(e);e.allowWhitespace();let i={type:"AwaitBlock",start:t,end:-1,expression:n,value:null,error:null,pending:null,then:null,catch:null},r=je();if(e.eat("then"))i.value=Yp(e),i.then=r;else if(e.eat("catch"))i.error=Yp(e),i.catch=r;else i.pending=r;e.eat("}",!0),e.open(i,r)}else if(e.eat("key")){e.requireWhitespace();let n=Z(e);e.eatClosingBrace();let i=je();e.open({type:"KeyBlock",start:t,end:-1,expression:n,fragment:i},i)}else if(e.eat("snippet"))hg(e,t);else ep(e.index)}function Yp(e){if(e.matchRegex(Zp))return e.allowWhitespace(),null;e.requireWhitespace();let t=$i(e);return e.allowWhitespace(),t}function dg(e){let t={assertion:null},n=e.end,i=(s)=>{if(s.type==="TSAsExpression"&&s.end===e.end)return t.assertion=s,n=s.expression.end,s.expression;return Rt(s,i),s},r=e;if(e.type==="TSAsExpression")t.assertion=e,r=e.expression,n=r.end;else Rt(e,i);return r.end=n,{expression:r,assertion:t.assertion}}function fg(e,t){e.requireWhitespace();let n=e.source,i;while(!i)try{i=Z(e)}catch(l){let p=((l instanceof b?l.position:void 0)?.[0]??t)-2;while(p>t&&e.source.slice(p,p+2)!=="as")p-=1;if(p<=t)throw e.source=n,l;e.source=n.slice(0,p)}if(e.source=n,e.allowWhitespace(),!e.match("as")){if(i.type==="SequenceExpression")i=i.expressions[0];let l=dg(i);if(i=l.expression,l.assertion){let p=l.assertion.typeAnnotation.start-2;while(e.source.slice(p,p+2)!=="as")p-=1;e.index=p}}let r=null,s,a;if(e.eat("as"))e.requireWhitespace(),r=$i(e);else e.index=i.end;if(e.allowWhitespace(),e.eat(",")){if(e.allowWhitespace(),s=e.readIdentifierName().name,!s)fs(e.index);e.allowWhitespace()}if(e.eat("("))e.allowWhitespace(),a=Z(e),e.allowWhitespace(),e.eat(")",!0),e.allowWhitespace();e.eat("}",!0);let o=je();e.open({type:"EachBlock",start:t,end:-1,expression:i,body:o,context:r,index:s,key:a},o)}function hg(e,t){e.requireWhitespace();let n=e.readIdentifierName();if(n.name==="")fs(e.index);e.allowWhitespace();let i=e.index,r;if(e.isTypeScript&&e.match("<")){let l=Rs(e.source,i,{"<":">"});r=e.source.slice(i+1,l-1),e.index=l}e.allowWhitespace(),e.eat("(",!0);let s=1;while(e.index<e.source.length&&(!e.match(")")||s!==1)){if(e.match("("))s++;if(e.match(")"))s--;e.index+=1}e.eat(")",!0);let{node:a}=At(e,`${e.source.slice(0,e.index)} => {}`,i,!0);e.eatClosingBrace();let o=je();e.open({type:"SnippetBlock",start:t,end:-1,expression:n,typeParams:r,parameters:a.type==="ArrowFunctionExpression"?a.params:void 0,body:o},o)}function mg(e,t){let n=e.index-1,i=e.current();if(i.type==="IfBlock"){if(!e.eat("else"))Xe(n,"{:else} or {:else if}");if(e.eat("if"))Vl(n);if(e.allowWhitespace(),i.alternate=je(),e.setFragment(i.alternate),e.eat("if")){e.requireWhitespace();let r=Z(e);e.eatClosingBrace();let s=je();e.open({start:t,end:-1,type:"IfBlock",elseif:!0,test:r,consequent:s,alternate:null},s)}else e.eatClosingBrace()}else if(i.type==="EachBlock"){if(!e.eat("else"))Xe(n,"{:else}");e.eatClosingBrace(),i.fallback=je(),e.setFragment(i.fallback)}else if(i.type==="AwaitBlock"){let r;if(e.eat("then"))r="then";else if(e.eat("catch"))r="catch";else Xe(n,"{:then ...} or {:catch ...}");if(i[r])Fl(n,`{:${r}}`);if(!e.eat("}")){e.requireWhitespace();let a=$i(e);if(r==="then")i.value=a;else i.error=a;e.eatClosingBrace()}let s=je();i[r]=s,e.setFragment(s)}else ql(n)}function yg(e){let t=e.current(),n=cg[t.type];if(!n)zl(e.index-1);e.eat(n,!0),e.eatClosingBrace();while(t.type==="IfBlock"&&t.elseif)t.end=e.index,e.close(),t=e.current();t.end=e.index,e.close()}function gg(e){return e.type==="CallExpression"||e.type==="ChainExpression"&&e.expression.type==="CallExpression"}function xg(e,t){if(e.eat("html")){e.requireWhitespace();let n=Z(e);e.eatClosingBrace(),e.append({type:"HtmlTag",start:t,end:e.index,expression:n})}else if(e.eat("debug")){let n=[];if(!e.read(Zp)){let i=Z(e),r=i.type==="SequenceExpression"?i.expressions:[i];for(let s of r){if(s.type!=="Identifier")Kl(s.start);n.push(s)}e.eatClosingBrace()}e.append({type:"DebugTag",start:t,end:e.index,identifiers:n})}else if(e.eat("const")){e.requireWhitespace();let n=$i(e);e.allowWhitespace(),e.eat("=",!0),e.allowWhitespace();let i=e.index,r=Z(e),s=e.index;if(r.type==="SequenceExpression"&&!e.source.slice(i,r.start).includes("("))Gl(r);e.eatClosingBrace();let a={type:"VariableDeclarator",id:n,init:r,start:n.start,end:s};e.append({type:"ConstTag",start:t,end:e.index,declaration:{type:"VariableDeclaration",kind:"const",declarations:[a],start:t+2,end:e.index-1}})}else if(e.eat("render")){e.requireWhitespace();let n=Z(e);if(!gg(n))rp(n);e.eatClosingBrace(),e.append({type:"RenderTag",start:t,end:e.index,expression:n})}else np(e.index)}var bg=/(?:var|interface|enum)\b/y,vg=/(?:let|const|type)\b/y;function Tg(e){let t=e.index;if(e.index+=1,e.allowWhitespace(),e.eat("#"))ug(e,t);else if(e.eat(":"))mg(e,t);else if(e.eat("@"))xg(e,t);else if(e.match("/")&&!e.match("/*")&&!e.match("//"))e.index+=1,yg(e);else if(!Sg(e,t)){let n=Z(e);e.eatClosingBrace(),e.append({type:"ExpressionTag",start:t,end:e.index,expression:n})}}function Sg(e,t){let n=e.index,i=e.matchRegex(bg);if(i)cs({start:n,end:n+i.length});if(!e.matchRegex(vg))return!1;let r=e.root.comments.length,s=Ip(e,e.source,n);if(s.type==="ExpressionStatement")return e.root.comments.length=r,!1;if(s.type!=="VariableDeclaration"||s.kind!=="let"&&s.kind!=="const")cs(s);return e.index=s.end,e.eatClosingBrace(),e.append({type:"DeclarationTag",start:t,end:e.index,declaration:s}),!0}function Eg(e){let{source:t,index:n}=e;if(e.nextAngle<n)e.nextAngle=Qp(t,"<",n);if(e.nextBrace<n)e.nextBrace=Qp(t,"{",n);let i=Math.min(e.nextAngle,e.nextBrace);e.index=i;let r=t.slice(n,i);e.append({type:"Text",start:n,end:i,raw:r,data:Ci(r,!1,e.entityNames)})}function Qp(e,t,n){let i=e.indexOf(t,n);return i===-1?e.length:i}function yc(e,t,n){let i=Cg(e,t,n);while(i.index<i.source.length)wg(i);return kg(i)}function Cg(e,t,n){let i=pi(e);return xo(i),new ec(i.trimEnd(),i.length,n,t)}function kg(e){if(e.stack.length>1){let r=e.current();if(r.end=r.start+1,r.type==="RegularElement")us(r,r.name);Wl(r)}let{nodes:t}=e.root.fragment,n=t.findIndex((r)=>r.type==="SvelteOptions"),i=t[n];if(i?.type==="SvelteOptions"){t.splice(n,1),e.root.options=ig(i);let{nodes:r}=i.fragment;if(r.length>0)fp({start:r[0].start,end:r[r.length-1].end},i.name)}return e.root}function wg(e){if(e.match("<"))My(e);else if(e.match("{"))Tg(e);else Eg(e)}var Ag="0AElig!5i 1MP!12 1acute!5d 1breve:76 1circ!5e 2y:sw 1fr:2kn8 1grave!5c 1lpha:pd 1macr:74 1nd:8cz 1ogon:78 2pf:2koo 1pplyFunction:6e9 1ring!5h 1scr:2kkc 2sign:6s4 1tilde!5f 1uml!5g 0Backslash:6qe 2rv:8h3 3wed:6x2 1cy:sx 1ecause:6r9 2rnoullis:6jw 2ta:pe 1fr:2kn9 1opf:2kop 1reve:k8 1scr:6jw 1umpeq:6ry 0CHcy:tj 1OPY!4p 1acute:7a 2p:6vm 3italDifferentialD:6kl 2yleys:6jx 1caron:7g 2edil!5j 2irc:7c 2onint:6r4 1dot:7e 1edilla:54 2nterDot:53 1fr:6jx 1hi:pz 1ircleDot:6u1 6Minus:6ty 6Plus:6tx 6Times:6tz 1lockwiseContourIntegral:6r6 3seCurlyDoubleQuote:6cd aQuote:6c9 1olon:6rb 5e:8dw 2ngruent:6sh 3int:6r3 3tourIntegral:6r2 2pf:6iq 3roduct:6q8 2unterClockwiseContourIntegral:6r7 1ross:8bz 1scr:2kke 1up:6vn 3Cap:6rx 0DD:6kl 2otrahd:841 1Jcy:si 1Scy:sl 1Zcy:sv 1agger:6ch 2rr:6n5 2shv:8h0 1caron:7i 2y:t0 1el:6pz 3ta:pg 1fr:2knb 1iacriticalAcute:50 bDot:k9 dubleAcute:kd bGrave:2o bTilde:kc 3mond:6v8 2fferentialD:6km 1opf:2kor 2t:4o 3Dot:6ho 3Equal:6s0 2ubleContourIntegral:6r3 6Dot:4o 8wnArrow:6oj 6LeftArrow:6og aRightArrow:6ok aTee:8h0 7ongLeftArrow:7w8 eRightArrow:7wa aRightArrow:7w9 6RightArrow:6oi bTee:6ug 6UpArrow:6oh 8DownArrow:6ol 6VerticalBar:6qt 2wnArrow:6mr 9Bar:843 9UpArrow:6ph 4Breve:lt 4LeftRightVector:85s 8TeeVector:866 8Vector:6nx eBar:85y 4RightTeeVector:867 9Vector:6o1 fBar:85z 4Tee:6uc 7Arrow:6nb 4arrow:6oj 1scr:2kkf 2trok:7k 0ENG:96 1TH!5s 1acute!5l 1caron:7u 2irc!5m 2y:tp 1dot:7q 1fr:2knc 1grave!5k 1lement:6q0 1macr:7m 2ptySmallSquare:7i3 5VerySmallSquare:7fv 1ogon:7s 2pf:2kos 1psilon:ph 1qual:8dx 5Tilde:6rm 3ilibrium:6oc 1scr:6k0 2im:8dv 1ta:pj 1uml!5n 1xists:6pv 2ponentialE:6kn 0Fcy:tg 1fr:2knd 1illedSmallSquare:7i4 6VerySmallSquare:7fu 1opf:2kot 2rAll:6ps 2uriertrf:6k1 1scr:6k1 0GJcy:sj 1T!1q 1amma:pf 5d:rg 1breve:7y 1cedil:82 2irc:7w 2y:sz 1dot:80 1fr:2kne 1g:6vt 1opf:2kou 1reaterEqual:6sl cLess:6vv 7FullEqual:6sn 7Greater:8f6 7Less:6t3 7SlantEqual:8e6 7Tilde:6sz 1scr:2kki 1t:6sr 0HARDcy:tm 1acek:jr 2t:2m 1circ:84 1fr:6j0 1ilbertSpace:6iz 1opf:6j1 2rizontalLine:7b4 1scr:6iz 2trok:86 1umpDownHump:6ry 4Equal:6rz 0IEcy:t1 1Jlig:8i 1Ocy:sh 1acute!5p 1circ!5q 2y:t4 1dot:8g 1fr:6j5 1grave!5o 1m:6j5 2acr:8a 3ginaryI:6ko 2plies:6oi 1nt:6r0 3egral:6qz 4rsection:6v6 2visibleComma:6eb 9Times:6ea 1ogon:8e 2pf:2kow 2ta:pl 1scr:6j4 1tilde:88 1ukcy:sm 2ml!5r 0Jcirc:8k 2y:t5 1fr:2knh 1opf:2kox 1scr:2kkl 2ercy:so 1ukcy:sk 0KHcy:th 1Jcy:ss 1appa:pm 1cedil:8m 2y:t6 1fr:2kni 1opf:2koy 1scr:2kkm 0LJcy:sp 1T!1o 1acute:8p 2mbda:pn 2ng:7vu 2placetrf:6j6 2rr:6n2 1caron:8t 2edil:8r 2y:t7 1eftAngleBracket:7vs 5rrow:6mo 9Bar:6p0 9RightArrow:6o6 4Ceiling:6x4 4DoubleBracket:7vq 6wnTeeVector:869 8Vector:6o3 eBar:861 4Floor:6x6 4RightArrow:6ms 9Vector:85q 4Tee:6ub 7Arrow:6n8 7Vector:862 5riangle:6uq cBar:89b cEqual:6us 4UpDownVector:85t 6TeeVector:868 6Vector:6nz cBar:860 4Vector:6nw aBar:85u 4arrow:6og 4rightarrow:6ok 2ssEqualGreater:6vu 4FullEqual:6sm 4Greater:6t2 4Less:8f5 4SlantEqual:8e5 4Tilde:6sy 1fr:2knj 1l:6vs 2eftarrow:6oq 1midot:8v 1ongLeftArrow:7w5 8RightArrow:7w7 4RightArrow:7w6 4leftarrow:7w8 8rightarrow:7wa 4rightarrow:7w9 2pf:2koz 2werLeftArrow:6mx 5RightArrow:6mw 1scr:6j6 2h:6nk 2trok:8x 1t:6sq 0Map:83p 1cy:t8 1ediumSpace:6e7 2llintrf:6k3 1fr:2knk 1inusPlus:6qb 1opf:2kp0 1scr:6k3 1u:po 0NJcy:sq 1acute:8z 1caron:93 2edil:91 2y:t9 1egativeMediumSpace:6bv 8ThickSpace:6bv bnSpace:6bv 8VeryThinSpace:6bv 2stedGreaterGreater:6sr 6LessLess:6sq 2wLine:a 1fr:2knl 1oBreak:6e8 2nBreakingSpace:4g 2pf:6j9 2t:8h8 3Congruent:6si 4upCap:6st 3DoubleVerticalBar:6qu 3Element:6q1 4qual:6sg 8Tilde:6rm 4xists:6pw 3Greater:6sv aEqual:6sx aFullEqual:6sn aGreater:6sr aLess:6t5 aSlantEqual:8e6 aTilde:6t1 3HumpDownHump:6ry 7Equal:6rz 3LeftTriangle:6wa fBar:89b fEqual:6wc 5ss:6su 7Equal:6sw 7Greater:6t4 7Less:6sq 7SlantEqual:8e5 7Tilde:6t0 3NestedGreaterGreater:8f6 9LessLess:8f5 3Precedes:6tc bEqual:8fj bSlantEqual:6w0 3ReverseElement:6q4 4ightTriangle:6wb gBar:89c gEqual:6wd 3SquareSubset:6tr fEqual:6w2 bperset:6ts hEqual:6w3 4ubset:6te 9Equal:6tk 5cceeds:6td bEqual:8fk bSlantEqual:6w1 bTilde:6tb 5perset:6tf bEqual:6tl 3Tilde:6rl 8Equal:6ro 8FullEqual:6rr 8Tilde:6rt 3VerticalBar:6qs 1scr:2kkp 1tilde!5t 1u:pp 0OElig:9e 1acute!5v 1circ!5w 2y:ta 1dblac:9c 1fr:2knm 1grave!5u 1macr:98 2ega:q1 2icron:pr 1opf:2kp2 1penCurlyDoubleQuote:6cc 9Quote:6c8 1r:8d0 1scr:2kkq 2lash!60 1tilde!5x 3mes:8c7 1uml!5y 1verBar:6da 5race:732 8ket:71w 4Parenthesis:730 0PartialD:6pu 1cy:tb 1fr:2knn 1hi:py 1i:ps 1lusMinus:4x 1oincareplane:6j0 2pf:6jd 1r:8fv 2ecedes:6t6 8Equal:8fj 8SlantEqual:6t8 8Tilde:6ta 2ime:6cz 2oduct:6q7 3portion:6rb aal:6ql 1scr:2kkr 2i:q0 0QUOT!y 1fr:2kno 1opf:6je 1scr:2kks 0RBarr:840 1EG!4u 1acute:9g 2ng:7vv 2rr:6n4 4tl:846 1caron:9k 2edil:9i 2y:tc 1e:6jg 2verseElement:6q3 8quilibrium:6ob 7UpEquilibrium:86n 1fr:6jg 1ho:pt 1ightAngleBracket:7vt 6rrow:6mq aBar:6p1 aLeftArrow:6o4 5Ceiling:6x5 5DoubleBracket:7vr 7wnTeeVector:865 9Vector:6o2 fBar:85x 5Floor:6x7 5Tee:6ua 8Arrow:6na 8Vector:863 6riangle:6ur dBar:89c dEqual:6ut 5UpDownVector:85r 7TeeVector:864 7Vector:6ny dBar:85w 5Vector:6o0 bBar:85v 5arrow:6oi 1opf:6jh 2undImplies:86o 1rightarrow:6or 1scr:6jf 2h:6nl 1uleDelayed:8ac 0SHCHcy:tl 2cy:tk 1OFTcy:to 1acute:9m 1c:8fw 2aron:9s 2edil:9q 2irc:9o 2y:td 1fr:2knq 1hortDownArrow:6mr 5LeftArrow:6mo 5RightArrow:6mq 5UpArrow:6mp 1igma:pv 1mallCircle:6qg 1opf:2kp6 1qrt:6qi 2uare:7fl 6Intersection:6tv 6Subset:6tr cEqual:6tt 8perset:6ts eEqual:6tu 6Union:6tw 1scr:2kku 1tar:6va 1ub:6vk 3set:6vk 6Equal:6ti 2cceeds:6t7 8Equal:8fk 8SlantEqual:6t9 8Tilde:6tb 3hThat:6q3 2m:6q9 2p:6vl 3erset:6tf 8Equal:6tj 3set:6vl 0THORN!66 1RADE:6jm 1SHcy:sr 2cy:ti 1ab:9 2u:pw 1caron:9w 2edil:9u 2y:te 1fr:2knr 1herefore:6r8 3ta:pk 2ickSpace:6e7 3nSpace:6bt 1ilde:6rg 5Equal:6rn 5FullEqual:6rp 5Tilde:6rs 1opf:2kp7 1ripleDot:6hn 1scr:2kkv 2trok:9y 0Uacute!62 2rr:6n3 4ocir:85l 1brcy:su 3eve:a4 1circ!63 2y:tf 1dblac:a8 1fr:2kns 1grave!61 1macr:a2 1nderBar:2n 6race:733 9ket:71x 5Parenthesis:731 2ion:6v7 5Plus:6tq 1ogon:aa 2pf:2kp8 1pArrow:6mp 7Bar:842 7DownArrow:6o5 2DownArrow:6mt 2Equilibrium:86m 2Tee:6ud 5Arrow:6n9 2arrow:6oh 2downarrow:6ol 2perLeftArrow:6mu 5RightArrow:6mv 2si:r6 4lon:px 1ring:a6 1scr:2kkw 1tilde:a0 1uml!64 0VDash:6uj 1bar:8h7 1cy:sy 1dash:6uh 5l:8h2 1ee:6v5 2rbar:6c6 3t:6c6 4icalBar:6qr 8Line:3g 8Separator:7rs 8Tilde:6rk 3yThinSpace:6bu 1fr:2knt 1opf:2kp9 1scr:2kkx 1vdash:6ui 0Wcirc:ac 1edge:6v4 1fr:2knu 1opf:2kpa 1scr:2kky 0Xfr:2knv 1i:pq 1opf:2kpb 1scr:2kkz 0YAcy:tr 1Icy:sn 1Ucy:tq 1acute!65 1circ:ae 2y:tn 1fr:2knw 1opf:2kpc 1scr:2kl0 1uml:ag 0ZHcy:t2 1acute:ah 1caron:al 2y:t3 1dot:aj 1eroWidthSpace:6bv 2ta:pi 1fr:6js 1opf:6jo 1scr:2kl1 0aacute!69 1breve:77 1c:6ri 2E:6ri 2d:6rj 2irc!6a 2ute!50 2y:ts 1elig!6e 1f:6e9 2r:2kny 1grave!68 1lefsym:6k5 3ph:6k5 2pha:q9 1macr:75 3lg:8cf 2p!12 1nd:6qv 3and:8d1 3d:8d8 3slope:8d4 3v:8d6 2g:6qo 3e:884 3le:6qo 3msd:6qp 6aa:888 7b:889 7c:88a 7d:88b 7e:88c 7f:88d 7g:88e 7h:88f 3rt:6qn 5vb:6v2 7d:87x 3sph:6qq 4t:5h 3zarr:70c 1ogon:79 2pf:2kpe 1p:6rs 2E:8ds 2acir:8dr 2e:6ru 2id:6rv 2os:13 2prox:6rs 6eq:6ru 1ring!6d 1scr:2kl2 2t:16 2ymp:6rs 5eq:6rx 1tilde!6b 1uml!6c 1wconint:6r7 2int:8b5 0bNot:8h9 1ackcong:6rw 4epsilon:s6 4prime:6d1 4sim:6rh 7eq:6vh 2rvee:6v1 3wed:6x1 6ge:6x1 1brk:71x 4tbrk:71y 1cong:6rw 2y:tt 1dquo:6ce 1ecaus:6r9 6e:6r9 2mptyv:88g 2psi:s6 2rnou:6jw 2ta:qa 3h:6k6 3ween:6ss 1fr:2knz 1igcap:6v6 4irc:7hr 4up:6v7 3odot:8ao 4plus:8ap 4times:8aq 3sqcup:8au 4tar:7id 3triangledown:7gd bup:7g3 3uplus:8as 3vee:6v5 3wedge:6v4 1karow:83x 1lacklozenge:8a3 5square:7fu 5triangle:7g4 ddown:7ge dleft:7gi dright:7g8 3nk:74z 2k12:7f6 44:7f5 334:7f7 2ock:7ew 1ne:1p 3quiv:6sh 2ot:6xc 1opf:2kpf 2t:6ud 3tom:6ud 2wtie:6vc 2xDL:7dj 4R:7dg 4l:7di 4r:7df 3H:7dc 4D:7dy 4U:7e1 4d:7dw 4u:7dz 3UL:7dp 4R:7dm 4l:7do 4r:7dl 3V:7dd 4H:7e4 4L:7dv 4R:7ds 4h:7e3 4l:7du 4r:7dr 3box:895 3dL:7dh 4R:7de 4l:7bk 4r:7bg 3h:7b4 4D:7dx 4U:7e0 4d:7cc 4u:7ck 3minus:6u7 3plus:6u6 3times:6u8 3uL:7dn 4R:7dk 4l:7bs 4r:7bo 3v:7b6 4H:7e2 4L:7dt 4R:7dq 4h:7cs 4l:7c4 4r:7bw 1prime:6d1 1reve:k8 2vbar!4m 1scr:2kl3 2emi:6dr 2im:6rh 4e:6vh 2ol:2k 4b:891 4hsub:7uw 1ull:6ci 4et:6ci 2mp:6ry 4E:8fi 4e:6rz 5q:6rz 0cacute:7b 2p:6qx 3and:8ck 3brcup:8cp 3cap:8cr 4up:8cn 3dot:8cg 3s:6qx 2ret:6dd 3on:jr 1caps:8ct 3ron:7h 2edil!6f 2irc:7d 2ups:8cs 5sm:8cw 1dot:7f 1edil!54 2mptyv:88i 2nt!4i 4erdot:53 1fr:2ko0 1hcy:uf 2eck:7pv 5mark:7pv 2i:qv 1ir:7gr 3E:88z 3c:jq 4eq:6s7 4learrowleft:6nu bright:6nv 6dR:4u 7S:79k 7ast:6u3 7circ:6u2 7dash:6u5 3e:6s7 3fnint:8b4 3mid:8hb 3scir:88y 1lubs:7kz 5uit:7kz 1olon:1m 5e:6s4 6q:6s4 2mma:18 5t:1s 3p:6pt 4fn:6qg 4lement:6pt 6xes:6iq 2ng:6rp 4dot:8dp 3int:6r2 2pf:2kpg 3rod:6q8 3y!4p 4sr:6jb 1rarr:6np 2oss:7pz 1scr:2kl4 2ub:8gf 4e:8gh 3p:8gg 4e:8gi 1tdot:6wf 1udarrl:854 6r:851 2epr:6vy 3sc:6vz 2larr:6nq 6p:859 2p:6qy 3brcap:8co 3cap:8cm 4up:8cq 3dot:6tp 3or:8cl 3s:6qy 2rarr:6nr 6m:858 3lyeqprec:6vy 7succ:6vz 5vee:6vi 5wedge:6vj 3ren!4k 3vearrowleft:6nq aright:6nr 2vee:6vi 2wed:6vj 1wconint:6r6 2int:6r5 1ylcty:6y5 0dArr:6oj 1Har:86d 1agger:6cg 2leth:6k8 2rr:6mr 2sh:6c0 4v:6ub 1bkarow:83z 2lac:kd 1caron:7j 2y:tw 1d:6km 2agger:6ch 3rr:6oa 2otseq:8dz 1eg!4w 2lta:qc 2mptyv:88h 1fisht:873 2r:2ko1 1harl:6o3 4r:6o2 1iam:6v8 4ond:6v8 7suit:7l2 4s:7l2 2e:4o 2gamma:rh 2sin:6wi 2v:6v 3ide!6v 6ontimes:6vb 3onx:6vb 1jcy:uq 1lcorn:6xq 3rop:6x9 1ollar:10 2pf:2kph 2t:k9 3eq:6s0 5dot:6s1 3minus:6rc 3plus:6qc 3square:6u9 2ublebarwedge:6x2 2wnarrow:6mr 4downarrows:6oa 4harpoonleft:6o3 bright:6o2 1rbkarow:840 2corn:6xr 3rop:6x8 1scr:2kl5 3y:ut 2ol:8ae 2trok:7l 1tdot:6wh 2ri:7gf 4f:7ge 1uarr:6ph 2har:86n 1wangle:886 1zcy:v3 2igrarr:7wf 0eDDot:8dz 2ot:6s1 1acute!6h 2ster:8dq 1caron:7v 2ir:6s6 4c!6i 2olon:6s5 2y:ul 1dot:7r 1e:6kn 1fDot:6s2 2r:2ko2 1g:8ey 2rave!6g 2s:8eu 3dot:8ew 1l:8ex 2inters:73b 2l:6j7 2s:8et 3dot:8ev 1macr:7n 2pty:6px 5set:6px 5v:6px 2sp:6bn 413:6bo 54:6bp 1ng:97 2sp:6bm 1ogon:7t 2pf:2kpi 1par:6vp 4sl:89v 2lus:8dt 2si:qd 4lon:qd 4v:s5 1qcirc:6s6 3olon:6s5 2sim:6rm 3lantgtr:8eu 7less:8et 2uals:1p 3est:6sf 3iv:6sh 5DD:8e0 2vparsl:89x 1rDot:6s3 2arr:86p 1scr:6jz 2dot:6s0 2im:6rm 1ta:qf 2h!6o 1uml!6j 2ro:6gc 1xcl:x 2ist:6pv 2pectation:6k0 3onentiale:6kn 0fallingdotseq:6s2 1cy:uc 1emale:7k0 1filig:1dkz 2lig:1dkw 3lig:1dl0 2r:2ko3 1ilig:1dkx 1jlig:2u 1lat:7l9 2lig:1dky 2tns:7g1 1nof:b6 1opf:2kpj 2rall:6ps 3k:6vo 4v:8gp 1partint:8b1 1rac12!59 53:6kz 54!58 55:6l1 56:6l5 58:6l7 423:6l0 55:6l2 434!5a 55:6l3 58:6l8 445:6l4 456:6l6 58:6l9 478:6la 3sl:6dg 2own:6xu 1scr:2kl7 0gE:6sn 2l:8ek 1acute:dx 2mma:qb 5d:rh 2p:8ee 1breve:7z 1circ:7x 2y:tv 1dot:81 1e:6sl 2l:6vv 2q:6sl 3q:6sn 3slant:8e6 2s:8e6 3cc:8fd 3dot:8e8 6o:8ea 7l:8ec 3l:6vv 4es:8es 1fr:2ko4 1g:6sr 2g:6vt 1imel:6k7 1jcy:ur 1l:6t3 2E:8eq 2a:8f9 2j:8f8 1nE:6sp 2ap:8ei 4prox:8ei 2e:8eg 3q:8eg 4q:6sp 2sim:6w7 1opf:2kpk 1rave:2o 1scr:6iy 2im:6sz 4e:8em 4l:8eo 1t!1q 2cc:8fb 3ir:8e2 2dot:6vr 2lPar:87p 2quest:8e4 2rapprox:8ee 4rr:86w 3dot:6vr 3eqless:6vv 5qless:8ek 3less:6t3 3sim:6sz 1vertneqq:6sp 2nE:6sp 0hArr:6ok 1airsp:6bu 2lf:59 2milt:6iz 2rdcy:ui 3r:6ms 4cir:85k 4w:6nh 1bar:6j3 1circ:85 1earts:7l1 6uit:7l1 2llip:6cm 2rcon:6ux 1fr:2ko5 1ksearow:84l 3warow:84m 1oarr:6pr 2mtht:6rf 2okleftarrow:6nd 4rightarrow:6ne 2pf:2kpl 2rbar:6c5 1scr:2kl9 2lash:6j3 2trok:87 1ybull:6df 2phen:6c0 0iacute!6l 1c:6eb 2irc!6m 2y:u0 1ecy:tx 2xcl!4h 1ff:6ok 2r:2ko6 1grave!6k 1i:6ko 2iint:8b0 3nt:6r1 2nfin:89o 2ota:6jt 1jlig:8j 1macr:8b 3ge:6j5 4line:6j4 4part:6j5 3th:8h 2of:6uv 2ped:c5 1n:6q0 2care:6it 2fin:6qm 5tie:89p 2odot:8h 2t:6qz 3cal:6uy 3egers:6jo 4rcal:6uy 3larhk:8bb 3prod:8cc 1ocy:up 2gon:8f 2pf:2kpm 2ta:qh 1prod:8cc 1quest!5b 1scr:2kla 2in:6q0 4E:6wp 4dot:6wl 4s:6wk 5v:6wj 4v:6q0 1t:6ea 2ilde:89 1ukcy:uu 2ml!6n 0jcirc:8l 2y:u1 1fr:2ko7 1math:fr 1opf:2kpn 1scr:2klb 2ercy:uw 1ukcy:us 0kappa:qi 5v:s0 1cedil:8n 2y:u2 1fr:2ko8 1green:8o 1hcy:ud 1jcy:v0 1opf:2kpo 1scr:2klc 0lAarr:6oq 2rr:6og 2tail:84b 1Barr:83y 1E:6sm 2g:8ej 1Har:86a 1acute:8q 2emptyv:88k 2gran:6j6 2mbda:qj 2ng:7vs 4d:87l 4le:7vs 2p:8ed 2quo!4r 2rr:6mo 4b:6p0 5fs:84f 4fs:84d 4hk:6nd 4lp:6nf 4pl:855 4sim:86r 4tl:6n6 2t:8ff 3ail:849 3e:8fh 4s:8fh 1barr:83w 2brk:7si 2race:3f 5k:2j 3ke:87f 4sld:87j 6u:87h 1caron:8u 2edil:8s 3il:6x4 2ub:3f 2y:u3 1dca:852 2quo:6cc 5r:6ce 2rdhar:86f 3ushar:85n 2sh:6nm 1e:6sk 2ftarrow:6mo 9tail:6n6 4harpoondown:6nx bup:6nw 4leftarrows:6o7 4rightarrow:6ms es:6o6 9harpoons:6ob 9squigarrow:6nh 4threetimes:6vf 2g:6vu 2q:6sk 3q:6sm 3slant:8e5 2s:8e5 3cc:8fc 3dot:8e7 6o:8e9 7r:8eb 3g:6vu 4es:8er 3sapprox:8ed 4dot:6vq 4eqgtr:6vu 6qgtr:8ej 4gtr:6t2 4sim:6sy 1fisht:870 2loor:6x6 2r:2ko9 1g:6t2 2E:8ep 1hard:6nx 4u:6nw 5l:86i 2blk:7es 1jcy:ux 1l:6sq 2arr:6o7 2corner:6xq 2hard:86j 2tri:7i2 1midot:8w 2oust:71s 6ache:71s 1nE:6so 2ap:8eh 4prox:8eh 2e:8ef 3q:8ef 4q:6so 2sim:6w6 1oang:7vw 3rr:6pp 2brk:7vq 2ngleftarrow:7w5 8rightarrow:7w7 4mapsto:7wc 4rightarrow:7w6 2oparrowleft:6nf 9right:6ng 2par:879 3f:2kpp 3lus:8bx 2times:8c4 2wast:6qf 3bar:2n 2z:7gq 3enge:7gq 3f:8a3 1par:14 4lt:87n 1rarr:6o6 2corner:6xr 2har:6ob 5d:86l 2m:6by 2tri:6v3 1saquo:6d5 2cr:2kld 2h:6nk 2im:6sy 4e:8el 4g:8en 2qb:2j 3uo:6c8 5r:6ca 2trok:8y 1t!1o 2cc:8fa 3ir:8e1 2dot:6vq 2hree:6vf 2imes:6vd 2larr:86u 2quest:8e3 2rPar:87q 3i:7gj 4e:6us 4f:7gi 1urdshar:85m 3uhar:86e 1vertneqq:6so 2nE:6so 0mDDot:6re 1acr!4v 2le:7k2 3t:7q8 4ese:7q8 2p:6na 3sto:6na 6down:6nb 6left:6n8 6up:6n9 2rker:7fy 1comma:8bt 2y:u4 1dash:6c4 1easuredangle:6qp 1fr:2koa 1ho:6jr 1icro!51 2d:6qr 3ast:16 3cir:8hc 3dot!53 2nus:6qa 5b:6u7 5d:6rc 6u:8bu 1lcp:8gr 2dr:6cm 1nplus:6qb 1odels:6uf 2pf:2kpq 1p:6qb 1scr:2kle 2tpos:6ri 1u:qk 2ltimap:6uw 2map:6uw 0nGg:6vt 2t:6sr 3v:6sr 1Leftarrow:6od 5rightarrow:6oe 2l:6vs 2t:6sq 3v:6sq 1Rightarrow:6of 1VDash:6un 2dash:6um 1abla:6pz 2cute:90 2ng:6qo 2p:6rt 3E:8ds 3id:6rv 3os:95 3prox:6rt 2tur:7la 5al:7la 7s:6j9 1bsp!4g 2ump:6ry 5e:6rz 1cap:8cj 3ron:94 2edil:92 2ong:6rr 5dot:8dp 2up:8ci 2y:u5 1dash:6c3 1e:6sg 2Arr:6on 2arhk:84k 4r:6mv 5ow:6mv 2dot:6s0 2quiv:6si 2sear:84o 3im:6rm 2xist:6pw 6s:6pw 1fr:2kob 1gE:6sn 2e:6sx 3q:6sx 4q:6sn 4slant:8e6 3s:8e6 2sim:6t1 2t:6sv 3r:6sv 1hArr:6oe 2arr:6ni 2par:8he 1i:6q3 2s:6ws 3d:6wq 2v:6q3 1jcy:uy 1lArr:6od 2E:6sm 2arr:6my 2dr:6cl 2e:6sw 3ftarrow:6my 5rightarrow:6ni 3q:6sw 4q:6sm 4slant:8e5 3s:8e5 4s:6su 2sim:6t0 2t:6su 3ri:6wa 5e:6wc 1mid:6qs 1opf:2kpr 2t!4s 3in:6q1 5E:6wp 5dot:6wl 5va:6q1 6b:6wn 6c:6wm 3ni:6q4 5va:6q4 6b:6wu 6c:6wt 1par:6qu 4allel:6qu 4sl:8hp 4t:6pu 2olint:8b8 2r:6tc 3cue:6w0 3e:8fj 4c:6tc 5eq:8fj 1rArr:6of 2arr:6mz 5c:84z 5w:6n1 2ightarrow:6mz 2tri:6wb 5e:6wd 1sc:6td 3cue:6w1 3e:8fk 3r:2klf 2hortmid:6qs 6parallel:6qu 2im:6rl 4e:6ro 5q:6ro 2mid:6qs 2par:6qu 2qsube:6w2 5pe:6w3 2ub:6tg 4E:8g5 4e:6tk 4set:6te 7eq:6tk 9q:8g5 3cc:6td 5eq:8fk 3p:6th 4E:8g6 4e:6tl 4set:6tf 7eq:6tl 9q:8g6 1tgl:6t5 2ilde!6p 2lg:6t4 2riangleleft:6wa deq:6wc 9right:6wb eeq:6wd 1u:ql 2m:z 3ero:6ja 3sp:6br 1vDash:6ul 2Harr:83o 2ap:6rx 2dash:6uk 2ge:6sl 3t:1q 2infin:89q 2lArr:83m 3e:6sk 3t:1o 4rie:6us 2rArr:83n 3trie:6ut 2sim:6rg 1wArr:6om 2arhk:84j 4r:6mu 5ow:6mu 2near:84n 0oS:79k 1acute!6r 2st:6u3 1cir:6u2 4c!6s 2y:u6 1dash:6u5 2blac:9d 2iv:8c8 2ot:6u1 2sold:88s 1elig:9f 1fcir:88v 2r:2koc 1gon:kb 2rave!6q 2t:88x 1hbar:88l 2m:q1 1int:6r2 1larr:6nu 2cir:88u 3ross:88r 2ine:6da 2t:88w 1macr:99 2ega:qx 2icron:qn 3d:88m 3nus:6ty 1opf:2kps 1par:88n 2erp:88p 2lus:6tx 1r:6qw 2arr:6nv 2d:8d9 3er:6k4 5of:6k4 3f!4q 3m!56 2igof:6uu 2or:8d2 2slope:8d3 2v:8d7 1scr:6k4 2lash!6w 2ol:6u0 1tilde!6t 3mes:6tz 6as:8c6 1uml!6u 1vbar:6yl 0par:6qt 3a!52 4llel:6qt 3sim:8hf 4l:8hp 3t:6pu 1cy:u7 1ercnt:11 3iod:1a 3mil:6cw 3p:6ud 3tenk:6cx 1fr:2kod 1hi:qu 3v:r9 2mmat:6k3 2one:7im 1i:qo 2tchfork:6vo 2v:ra 1lanck:6j3 6h:6j2 4kv:6j3 2us:17 4acir:8bn 4b:6u6 4cir:8bm 4do:6qc 5u:8bp 4e:8du 4mn!4x 4sim:8bq 4two:8br 1m:4x 1ointint:8b9 2pf:2kpt 2und!4j 1r:6t6 2E:8fn 2ap:8fr 2cue:6t8 2e:8fj 3c:6t6 4approx:8fr 4curlyeq:6t8 4eq:8fj 4napprox:8ft 5eqq:8fp 5sim:6w8 4sim:6ta 2ime:6cy 5s:6jd 2nE:8fp 3ap:8ft 3sim:6w8 2od:6q7 3falar:6y6 4line:6xe 4surf:6xf 3p:6ql 4to:6ql 2sim:6ta 2urel:6uo 1scr:2klh 2i:qw 1uncsp:6bs 0qfr:2koe 1int:8b0 1opf:2kpu 1prime:6dz 1scr:2kli 1uaternions:6j1 4int:8ba 2est:1r 5eq:6sf 2ot!y 0rAarr:6or 2rr:6oi 2tail:84c 1Barr:83z 1Har:86c 1ace:6rh 3ute:9h 2dic:6qi 2emptyv:88j 2ng:7vt 4d:87m 4e:885 4le:7vt 2quo!57 2rr:6mq 4ap:86t 4b:6p1 5fs:84g 4c:84z 4fs:84e 4hk:6ne 4lp:6ng 4pl:85h 4sim:86s 4tl:6n7 4w:6n1 2tail:84a 3io:6ra 5nals:6je 1barr:83x 2brk:7sj 2race:3h 5k:2l 3ke:87g 4sld:87i 6u:87k 1caron:9l 2edil:9j 3il:6x5 2ub:3h 2y:u8 1dca:853 2ldhar:86h 2quo:6cd 5r:6cd 2sh:6nn 1eal:6jg 4ine:6jf 4part:6jg 4s:6jh 2ct:7fx 2g!4u 1fisht:871 2loor:6x7 2r:2kof 1hard:6o1 4u:6o0 5l:86k 2o:qp 3v:s1 1ightarrow:6mq atail:6n7 5harpoondown:6o1 cup:6o0 5leftarrows:6o4 9harpoons:6oc 5rightarrows:6o9 5squigarrow:6n1 5threetimes:6vg 2ng:ka 2singdotseq:6s3 1larr:6o4 2har:6oc 2m:6bz 1moust:71t 6ache:71t 1nmid:8ha 1oang:7vx 3rr:6pq 2brk:7vr 2par:87a 3f:2kpv 3lus:8by 2times:8c5 1par:15 4gt:87o 2polint:8b6 1rarr:6o9 1saquo:6d6 2cr:2klj 2h:6nl 2qb:2l 3uo:6c9 5r:6c9 1three:6vg 2imes:6ve 2ri:7g9 4e:6ut 4f:7g8 4ltri:89a 1uluhar:86g 1x:6ji 0sacute:9n 1bquo:6ca 1c:6t7 2E:8fo 2ap:8fs 3ron:9t 2cue:6t9 2e:8fk 3dil:9r 2irc:9p 2nE:8fq 3ap:8fu 3sim:6w9 2polint:8b7 2sim:6tb 2y:u9 1dot:6v9 4b:6u9 4e:8di 1eArr:6oo 2arhk:84l 4r:6mw 5ow:6mw 2ct!4n 2mi:1n 2swar:84p 2tminus:6qe 4n:6qe 2xt:7qu 1fr:2kog 3own:6xu 1harp:7lb 2chcy:uh 3y:ug 2ortmid:6qr 5parallel:6qt 2y!4t 1igma:qr 5f:qq 5v:qq 2m:6rg 3dot:8dm 3e:6rn 4q:6rn 3g:8f2 4E:8f4 3l:8f1 4E:8f3 3ne:6rq 3plus:8bo 3rarr:86q 1larr:6mo 1mallsetminus:6qe 3shp:8c3 2eparsl:89w 2id:6qr 3le:6xv 2t:8fe 3e:8fg 4s:8fg 1oftcy:uk 2l:1b 3b:890 4ar:6yn 2pf:2kpw 1pades:7kw 6uit:7kw 3r:6qt 1qcap:6tv 5s:6tv 3up:6tw 5s:6tw 2sub:6tr 5e:6tt 5set:6tr 8eq:6tt 4p:6ts 5e:6tu 5set:6ts 8eq:6tu 2u:7fl 3are:7fl 5f:7fu 3f:7fu 1rarr:6mq 1scr:2klk 2etmn:6qe 2mile:6xv 2tarf:6va 1tar:7ie 4f:7id 2raightepsilon:s5 8phi:r9 3ns:4v 1ub:6te 3E:8g5 3dot:8fx 3e:6ti 4dot:8g3 3mult:8g1 3nE:8gb 4e:6tm 3plus:8fz 3rarr:86x 3set:6te 6eq:6ti 8q:8g5 6neq:6tm 9q:8gb 4im:8g7 4ub:8gl 5p:8gj 2cc:6t7 4approx:8fs 4curlyeq:6t9 4eq:8fk 4napprox:8fu 5eqq:8fq 5sim:6w9 4sim:6tb 2m:6q9 2ng:7l6 2p:6tf 31!55 32!4y 33!4z 3E:8g6 3dot:8fy 4sub:8go 3e:6tj 4dot:8g4 3hsol:7ux 5ub:8gn 3larr:86z 3mult:8g2 3nE:8gc 4e:6tn 3plus:8g0 3set:6tf 6eq:6tj 8q:8g6 6neq:6tn 9q:8gc 4im:8g8 4ub:8gk 5p:8gm 1wArr:6op 2arhk:84m 4r:6mx 5ow:6mx 2nwar:84q 1zlig!67 0target:6xi 2u:qs 1brk:71w 1caron:9x 2edil:9v 2y:ua 1dot:6hn 1elrec:6xh 1fr:2koh 1here4:6r8 5fore:6r8 3ta:qg 5sym:r5 5v:r5 2ickapprox:6rs 5sim:6rg 3nsp:6bt 2kap:6rs 3sim:6rg 2orn!72 1ilde:kc 2mes!5z 5b:6u8 6ar:8c1 5d:8c0 2nt:6r1 1oea:84o 2p:6uc 3bot:6ye 3cir:8hd 3f:2kpx 4ork:8gq 2sa:84p 1prime:6d0 1rade:6jm 2iangle:7g5 8down:7gf 8left:7gj ceq:6us 8q:6sc 8right:7g9 deq:6ut 3dot:7ho 3e:6sc 3minus:8ca 3plus:8c9 3sb:899 3time:8cb 2pezium:736 1scr:2kll 3y:ue 2hcy:uz 2trok:9z 1wixt:6ss 2oheadleftarrow:6n2 7rightarrow:6n4 0uArr:6oh 1Har:86b 1acute!6y 2rr:6mp 1brcy:v2 3eve:a5 1circ!6z 2y:ub 1darr:6o5 2blac:a9 2har:86m 1fisht:872 2r:2koi 1grave!6x 1harl:6nz 4r:6ny 2blk:7eo 1lcorn:6xo 6er:6xo 3rop:6xb 2tri:7i0 1macr:a3 2l!4o 1ogon:ab 2pf:2kpy 1parrow:6mp 2downarrow:6mt 2harpoonleft:6nz 9right:6ny 2lus:6tq 2si:qt 4h:r6 4lon:qt 2uparrows:6o8 1rcorn:6xp 6er:6xp 3rop:6xa 2ing:a7 2tri:7i1 1scr:2klm 1tdot:6wg 2ilde:a1 2ri:7g5 4f:7g4 1uarr:6o8 2ml!70 1wangle:887 0vArr:6ol 1Bar:8h4 4v:8h5 1Dash:6ug 1angrt:87w 2repsilon:s5 3kappa:s0 3nothing:6px 3phi:r9 4i:ra 4ropto:6ql 3r:6mt 4ho:s1 3sigma:qq 4ubsetneq:6tm cq:8gb 5psetneq:6tn cq:8gc 3theta:r5 4riangleleft:6uq bright:6ur 1cy:tu 1dash:6ua 1ee:6qw 3bar:6uz 3eq:6sa 2llip:6we 2rbar:3g 3t:3g 1fr:2koj 1ltri:6uq 1nsub:6te 4p:6tf 1opf:2kpz 1prop:6ql 1rtri:6ur 1scr:2kln 2ubnE:8gb 5e:6tm 3pnE:8gc 5e:6tn 1zigzag:87u 0wcirc:ad 1edbar:8db 3ge:6qv 5q:6s9 2ierp:6jc 1fr:2kok 1opf:2kq0 1p:6jc 1r:6rk 2eath:6rk 1scr:2klo 0xcap:6v6 2irc:7hr 2up:6v7 1dtri:7gd 1fr:2kol 1hArr:7wa 2arr:7w7 1i:qm 1lArr:7w8 2arr:7w5 1map:7wc 1nis:6wr 1odot:8ao 2pf:2kq1 3lus:8ap 2time:8aq 1rArr:7w9 2arr:7w6 1scr:2klp 2qcup:8au 1uplus:8as 2tri:7g3 1vee:6v5 1wedge:6v4 0yacute!71 3y:un 1circ:af 2y:uj 1en!4l 1fr:2kom 1icy:uv 1opf:2kq2 1scr:2klq 1ucy:um 2ml!73 0zacute:ai 1caron:am 2y:tz 1dot:ak 1eetrf:6js 2ta:qe 1fr:2kon 1hcy:ty 1igrarr:6ot 1opf:2kq3 1scr:2klr 1wj:6bx 2nj:6bw",gc=vs(Ag);var xc=ii(ys,oi,gs);var Pg={typescript:xc,entityNames:gc};function Li(e,t){return yc(e,t,Pg)}var bc={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 Dg(e){return e in bc}function vc(e){return Dg(e)?bc[e]:"HTMLElement"}var Tc=new Map;function Sc(e){let t=Tc.get(e);if(t!==void 0)return t;let n=sn(e,{inline:!0});return Tc.set(e,n),n}function Ec(e,t){let n=_e(e.name,t.name);if(n!==0)return n;let i=_e(e.type,t.type);if(i!==0)return i;if(e.type==="forwarded"&&t.type==="forwarded"){let r=_e(e.element,t.element);if(r!==0)return r}return _e(e.detail??"",t.detail??"")}var Ng=/^\{\s*\}$/;function Dt(e){return Array.from(e.values())}function Cc(e){return e&&typeof e==="object"&&"value"in e?e.value:void 0}function $g(e,t){let{dispatcherName:n,callees:i}=t,r=new Set(t.hostDispatchedEventNames);for(let s of t.hostDispatches)Ta(e,s);if(n!==void 0){Ia(e,t.dispatcherTypeArgument,n,C(e,t.dispatcherDeclaratorNode));for(let s of i){if(s.name!==n)continue;let a=Cc(s.arguments[0]),o=s.arguments[1],l=kr(Cr(e,s.nestedBoundDetailNames),o);if(a==null)continue;let p=l===void 0?Cc(o):void 0,c=p===null&&o.raw==="null";Ge(e,{name:String(a),detail:l??(c?"null":p==null?"":wr(p)),has_argument:Boolean(o),source:C(e,s.node)}),r.add(String(a))}}return e.forwardedEvents.forEach((s,a)=>{let o=e.events.get(a);if(o&&o.type==="dispatched"&&!r.has(a)){let l=e.eventDescriptions.get(a),p={type:"forwarded",name:a,element:s,description:l,deprecated:o.deprecated,tags:o.tags,source:o.source};if(o.internal)p.internal=!0;if(o.detail!==void 0&&o.detail!=="undefined")p.detail=o.detail;e.events.set(a,p)}}),r}function Lg(e){let t=e.syntaxMode==="runes"?new Set(Array.from(e.snippetPropLocals,(n)=>nr(e,n))):new Set;return Dt(e.props).filter((n)=>!(t.has(n.name)&&e.slots.has(n.name==="children"?Ue:n.name))).map((n)=>{let i=n.reactive||e.reactive_vars.has(n.name),r=e.bindings.get(n.name);if(!r)return{...n,reactive:i};let s=r.elements.sort().map((a)=>vc(a)).join(" | ");return{...n,type:`null | ${s}`,typeSource:"inferred",reactive:i}})}function _g(e){return Dt(e.slots).map((t)=>{let{slot_props_unresolved_spread:n,...i}=t;if(!t.slot_props)return i;if(typeof t.slot_props==="string")return Ng.test(t.slot_props)?{...i,slot_props:"Record<string, never>"}:i;let r=[];for(let[o,l]of Object.entries(t.slot_props)){if(l.replace&&l.value!==void 0)l.value=Bt(e,l.value);l.value??="any",r.push(`${o}: ${l.value}`)}let s=n?" & Record<string, any>":"",a=r.length===0?n?"Record<string, any>":"Record<string, never>":r.length===1?`{ ${r[0]} }${s}`:`{
|
|
46
|
+
${r.join(`;
|
|
46
47
|
`)};
|
|
47
|
-
}${
|
|
48
|
-
`);for(let{name:i,constraint:o}of e.deferredSlotBlockGenerics){let a=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");if(!new RegExp(`\\b${a}\\b`).test(r))continue;bn(e,i,o)}}if(e.scriptGenericsAttribute){if(e.generics)P(e,"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.',e.scriptGenericsAttribute.source);e.generics=Mo(e.scriptGenericsAttribute.value)}}function jm(e){return lt(e.events).map((t)=>{switch(t.type){case"forwarded":return{...t,element:t.element.name};case"dispatched":return t;default:return t}}).sort(yl)}function qm(e,t,n){let r={props:new Map(e.pendingCallDefaultCandidates.filter((i)=>i.location==="props").map((i)=>[i.propName,i])),moduleExports:new Map(e.pendingCallDefaultCandidates.filter((i)=>i.location==="moduleExports").map((i)=>[i.propName,i]))};for(let i of t)if(i.typeSource==="unknown"){let o=r.props.get(i.name);if(o)i.type="any";let a=o?o.importSource?`Prop "${i.name}" default calls "${o.calleeName}()" imported from "${o.importSource}"; falling back to "any" pending cross-file resolution.`:`Prop "${i.name}" default calls "${o.calleeName}()", but its return type could not be inferred; falling back to "any".`:`Prop "${i.name}" type could not be inferred; falling back to "${i.type??"any"}".`;P(e,"prop-unknown-type",i.name,a,i.source)}for(let i of n)if(i.typeSource==="unknown"&&r.moduleExports.has(i.name))i.type="any"}function Kn(e,t,n,r){if(t===void 0||gl(t))return!0;let i=Mt(t)?"has a `//` comment, which would comment out the code after it in the .d.ts":"is not valid TypeScript";return P(e,"type-syntax-error",n,`Type \`${t}\` of "${n}" ${i}; falling back to "any".`,r),!1}function Bm(e,t,n,r,i){for(let o of t)if(o.typeSource==="jsdoc"&&!Kn(e,o.type,o.name,o.source))o.type="any";for(let o of n)if(o.type==="dispatched"&&!Kn(e,o.detail,o.name,o.source))o.detail="any";for(let o of r)if(!Kn(e,o.slot_props,o.name??"default",o.source))o.slot_props="any";for(let o of i)if(!Kn(e,o.type,o.name,o.source))o.type="any",o.ts=`type ${o.name} = any;`}function Om(e,t){let{dispatcherName:n}=t,r=[];if(n===void 0)return r;let i=[];for(let a of t.callsWithArguments){let s=Ao(a,n);if(s)i.push({call:a,...s})}if(i.length>0)me(e,"dispatch-escapes",n,$e(e,n)?.sveldIgnore);let o=gr(e,"dispatch-escapes",n);for(let{call:a,argumentIndex:s,property:p}of i){let l=t.locallyBoundCalls.has(a)?void 0:Pr(e,a.callee);if(!l){r.push(a);continue}let c=C(e,a);e.pendingDispatchEscapeCandidates.push({importSource:l.source,importedName:l.importedName,...l.members?{members:l.members}:{},calleeText:Q(e,a.callee)??l.importedName,dispatcherName:n,argumentIndex:s,...p===void 0?{}:{property:p},...c?{source:c}:{},...o?{ignored:o}:{}})}return r}function Fm(e,t,n){for(let r of e.jsDocEventNames){if(t.has(r))continue;if(e.forwardedEvents.has(r))continue;if(e.props.has(`on${r}`))continue;if(n.length>0)continue;let i=mr(e,"event-no-source",r,`@event "${r}" has no matching dispatch or callback prop.`,e.jsDocEventSources.get(r));if(e.pendingDispatchEscapeCandidates.length>0)e.deferredEventNoSourceDiagnostics.push(i);else e.diagnosticRecords.push(i)}}function Vm(e,t){let n=t.typedefs.filter((o)=>o.internal).map((o)=>o.name.split("<")[0]);if(n.length===0)return;let r=n.map((o)=>({name:o,regex:new RegExp(`\\b${o}\\b`)})),i=(o,a,s)=>{if(!a)return;for(let{name:p,regex:l}of r){if(!l.test(a))continue;P(e,"internal-typedef-referenced",o,`"${o}" references "${p}", which is @internal and excluded from output; the generated .d.ts will contain a dangling reference to it.`,s)}};for(let o of t.props){if(o.internal)continue;i(o.name,o.type,o.source)}for(let o of t.moduleExports){if(o.internal)continue;i(o.name,o.type,o.source)}for(let o of t.typedefs){if(o.internal)continue;i(o.name,o.ts)}for(let o of t.events){if(o.internal||o.type!=="dispatched")continue;i(o.name,o.detail,o.source)}for(let o of t.slots){if(o.internal)continue;i(o.name??"default",o.slot_props,o.source)}for(let o of t.contexts){if(o.internal)continue;if(o.type!==void 0)i(o.typeName,o.type,o.source);for(let a of o.properties)i(a.name,a.type)}}function bl(e,t){let n=_m(e,t);zo(e,n);let r=Im(e);e.activeScopes.length=0;let i=Rm(e);Mm(e,r,i);let o=lt(e.moduleExports),a=jm(e),s=lt(e.typedefs),p=lt(e.contexts);qm(e,r,o),Bm(e,r,a,i,s);let l=Om(e,t);Fm(e,n,l);let{dispatcherName:c}=t;for(let g of l){let m=Q(e,g.callee)??"";P(e,"dispatch-escapes",c??"",`\`${c}\` is passed to \`${m}\`, which sveld can't follow: it only reads a function imported from another module, by name, as its default export, or through a namespace import. Document the events dispatched there with @event tags.`,C(e,g))}if(e.rest_props?.type==="InlineComponent")P(e,"rest-props-unresolved","$$restProps",`$$restProps is only spread onto component "${e.rest_props.name}"; sveld cannot infer its rest-prop type. Spread onto a plain element or add an @restProps tag.`);Vm(e,{props:r,moduleExports:o,typedefs:s,events:a,slots:i,contexts:p});let d={source:an(e,0,e.source?.length),syntaxMode:e.syntaxMode,...e.scriptLanguage?{scriptLanguage:e.scriptLanguage}:{},props:r,moduleExports:o,slots:i,events:a,typedefs:s,generics:e.generics,rest_props:e.rest_props,extends:e.extends,componentComment:e.componentComment,componentCommentSource:e.componentCommentSource,contexts:p,customElementTag:e.customElementTag,customElement:e.customElement,...e.cssParts.length>0?{cssParts:e.cssParts.slice()}:{},...e.cssProperties.length>0?{cssProperties:e.cssProperties.slice()}:{},diagnostics:e.diagnosticRecords.slice()},f=to(e);if(f)d[ge]=f;let h=eo(e);return h?{component:d,pending:h}:{component:d}}function Hm(e){if(e.computed)return;if(e.key.type==="Identifier")return e.key.name;if(e.key.type==="Literal"&&(typeof e.key.value==="string"||typeof e.key.value==="number"))return String(e.key.value);return}function xl(e){return e==="private"||e==="protected"}function ct(e){return{...e?.description?{description:e.description}:{},...e?.deprecated===void 0?{}:{deprecated:e.deprecated},...e?.tags?{tags:e.tags}:{}}}function El(e){return e?.slice(1,-1).trim()||void 0}function zi(e,t,n){let r=wr(e,t),i=new Map((n?.params??[]).map((p)=>[p.name,p])),o=r.params.map(({name:p,type:l,optional:c,rest:d})=>{let f=i.get(p);return{name:d?`...${p}`:p,type:l??f?.type??(d?"any[]":"any"),...f?.description?{description:f.description}:{},...!d&&(c||f?.optional)?{optional:!0}:{}}}),a=r.returnType??n?.returnType??(t.async?"Promise<any>":void 0),s=El(r.typeParameters)??n?.typeParameters;return{...o.length>0?{params:o}:{},...a?{returnType:a}:{},...s?{typeParameters:s}:{}}}function Tl(e,t){let n=[],r=new Map,i=new Set,o=new Set,a,s=-1;for(let c of t.body.body){if(c.type!=="MethodDefinition"&&c.type!=="PropertyDefinition")continue;if(xl(c.accessibility))continue;let d=Hm(c);if(d===void 0)continue;let f=V(e,c);if(f?.internal)continue;let h=`${c.static?"static ":""}${d}`,g={...c.static?{static:!0}:{},...c.optional?{optional:!0}:{},...c.abstract?{abstract:!0}:{}};if(c.type!=="MethodDefinition"){if(F(e,c.typeAnnotation?.typeAnnotation),!c.static)o.add(d);n.push({kind:"property",name:d,type:Ee(e,c.typeAnnotation)??f?.type??"any",...g,...c.readonly?{readonly:!0}:{},...ct(f)});continue}let m=c.value,y=c.typeParameters?{...m,typeParameters:c.typeParameters}:m;if(c.kind==="constructor"){let T=zi(e,y,f);n.push({kind:"constructor",name:"constructor",params:T.params,...ct(f)}),s=n.length,a=y.type==="FunctionExpression"?y.body.body:void 0,y.params.forEach((S,D)=>{if(S.type!=="TSParameterProperty"||xl(S.accessibility))return;let b=T.params?.[D];if(!b)return;o.add(b.name),n.push({kind:"property",name:b.name,type:b.type,...S.readonly?{readonly:!0}:{},...b.description?{description:b.description}:{}})});continue}if(c.kind==="get"||c.kind==="set"){let T=zi(e,y,f),S=c.kind==="get"?T.returnType??f?.type:T.params?.[0]?.type??f?.type,D=r.get(h);if(D){if(c.kind==="set")D.readonly=void 0;if(S&&S!=="any"&&(D.type==="any"||c.kind==="get"))D.type=S;if(!D.description&&!D.deprecated)Object.assign(D,ct(f));continue}let b={kind:"property",name:d,type:S??"any",...g,...c.kind==="get"?{readonly:!0}:{},...ct(f)};r.set(h,b),n.push(b);continue}if(y.type==="TSDeclareMethod"&&!c.abstract)i.add(h);else if(y.type!=="TSDeclareMethod"&&i.has(h))continue;n.push({kind:"method",name:d,...g,...zi(e,y,f),...ct(f)})}if(e.scriptLanguage!=="ts"&&a)n.splice(s,0,...zm(e,a,o));for(let c of t.typeParameters?.params??[])F(e,c.constraint),F(e,c.default);let p=El(Oe(e,t.typeParameters)),l=Gm(e,t);return{members:n,...p?{typeParameters:p}:{},...l}}function Gm(e,t){let n={},r=t.superClass;if(r){if(n.extends=Oe(e,{start:r.start,end:t.superTypeParameters?.end??r.end}),r.type==="Identifier")vl(e,r,t.superTypeParameters)}let i=(t.implements??[]).map((o)=>(vl(e,o.expression,o.typeParameters),Oe(e,o))).filter((o)=>Boolean(o));if(i.length>0)n.implements=i;return n}function vl(e,t,n){F(e,{type:"TSTypeReference",typeName:t,start:t.start,end:n?.end??t.end,...n?{typeArguments:n}:{}})}function zm(e,t,n){let r=[];for(let i of t){let o=i.type==="ExpressionStatement"?i.expression:void 0;if(o?.type!=="AssignmentExpression"||o.operator!=="=")continue;let a=o.left;if(a.type!=="MemberExpression"||a.computed||a.object.type!=="ThisExpression")continue;let s=a.property.type==="Identifier"?a.property.name:void 0;if(!s||n.has(s))continue;n.add(s);let p=V(e,i);if(p?.internal)continue;r.push({kind:"property",name:s,type:p?.type??"any",...ct(p)})}return r}var Wm=/^[A-Za-z_$][\w$]*(?=\s*(?:<|$))/;function Wi(e,t,n){if(X(t)===void 0)return;if(e.moduleExports.has(t)){let r=e.moduleExports.get(t);e.moduleExports.set(t,{...r,...n})}else e.moduleExports.set(t,n)}function Sl(e,t,n,r){let i=V(e,t);Wi(e,n==="*"?`* from ${r.from}`:n,{name:n,kind:"re-export",description:i?.description,deprecated:i?.deprecated,tags:i?.tags,...i?.internal?{internal:!0}:{},isFunction:!1,isFunctionDeclaration:!1,isRequired:!1,constant:!1,reactive:!1,reExport:r,source:C(e,t)})}function kl(e,t){P(e,"module-export-conflict","default",`export "default" was skipped because it collides with the component's own default export.`,C(e,t))}function Um(e,t,n,r){let i=n.id?.name;if(!i)return;let o=r?.exportedName??i,a=yn(e,t,r),{members:s,typeParameters:p,extends:l,implements:c}=Tl(e,n),d=p??a?.typeParameters;Wi(e,o,{name:o,...i===o?{}:{localName:i},kind:"class",description:a?.description,deprecated:a?.deprecated,tags:a?.tags,...a?.internal?{internal:!0}:{},type:`typeof ${i}`,...d?{typeParameters:d}:{},members:s,...n.abstract?{abstract:!0}:{},...l?{extends:l}:{},...c?{implements:c}:{},isFunction:!1,isFunctionDeclaration:!1,isRequired:!1,constant:!1,reactive:!1,source:C(e,t)})}function Cl(e,t,n,r){if(n.type==="ClassDeclaration"){Um(e,t,n,r);return}let i=Or(e,n,r,"moduleExports");if(i.length===0)return;let o=yn(e,t,r);for(let a of i){let{prop_name:s,kind:p}=a,{type:l,typeSource:c,description:d,params:f,returnType:h,isFunction:g,typeParameters:m}=Fr(e,a,o);Wi(e,s,{name:s,kind:p,description:d,deprecated:o?.deprecated,tags:o?.tags,...o?.internal?{internal:!0}:{},type:l,typeSource:c,value:a.value,defaultValue:a.defaultValue,params:f,returnType:h,typeParameters:m,isFunction:g,isFunctionDeclaration:a.isFunctionDeclaration,isRequired:!1,constant:p==="const",reactive:!1,source:C(e,t)})}}function Jm(e){let t=Array.from(e.moduleExports.values()).filter((r)=>r.kind==="class"),n=new Set(t.map((r)=>r.localName??r.name));for(let r of t){if(!r.extends)continue;let i=Wm.exec(r.extends)?.[0];if(i&&(n.has(i)||e.valueImportBindingsByLocalName.has(i)||e.typeImportBindingsByLocalName.has(i)))continue;P(e,"export-unresolved",r.name,`class "${r.name}" extends \`${r.extends}\`, which isn't imported or an exported class, so the .d.ts declares it without \`extends\` and its inherited members are missing. Export the base class from the module script.`,r.source),r.extends=void 0}}function wl(e){let t=e.parsed?.module;if(!t)return;let n=no(t);xn(t,(r,i)=>{if(r.type==="ImportDeclaration")bt(e,r);if(r.type==="FunctionDeclaration"&&r.id?.name)e.funcDecls.set(r.id.name,r);if(r.type==="VariableDeclaration")e.vars.add(r);if(r.type==="ExportNamedDeclaration"){if(r.declaration!=null){Cl(e,r,r.declaration);return}let o=r.source?.value,a=i?.type==="Program"?i:null;for(let s of r.specifiers){let p=qr(e,r,s,a,"module");if(!p)continue;if(p.exportedName==="default"){kl(e,r);continue}let l=typeof o==="string"?{from:o,imported:p.localName}:n.get(p.localName);if(p.declaration)Cl(e,r,p.declaration,p);else if(l)Sl(e,r,p.exportedName,l);else if(!e.localTypeDeclarationsByName.get(p.localName)?.exported)Br(e,r,p.localName,p.exportedName)}}if(r.type==="ExportAllDeclaration"&&typeof r.source.value==="string"){let o=(r.exported&&gn(r.exported))??"*";if(o==="default"){kl(e,r);return}Sl(e,r,o,{from:r.source.value,imported:"*"})}}),Jm(e)}function Pl(e){return Gi(e,{css:!1})}function Km(e,t){let n=e.length+1,r=t.length+1,i=Array.from({length:n},()=>Array(r).fill(0));for(let o=0;o<n;o++)i[o][0]=o;for(let o=0;o<r;o++)i[0][o]=o;for(let o=1;o<n;o++)for(let a=1;a<r;a++){let s=e[o-1]===t[a-1]?0:1;if(i[o][a]=Math.min(i[o-1][a]+1,i[o][a-1]+1,i[o-1][a-1]+s),o>1&&a>1&&e[o-1]===t[a-2]&&e[o-2]===t[a-1])i[o][a]=Math.min(i[o][a],i[o-2][a-2]+1)}return i[n-1][r-1]}function Al(e,t,n=3){let r,i=Number.POSITIVE_INFINITY;for(let o of t){let a=Km(e,o);if(a<i)r=o,i=a}if(r===void 0||i>n)return;return r}var Xm=/\s*=\s*/;function Ym(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=z(r,",").map((o)=>o.trim().replace(Xm," = ")).join(", ");return`${n}<${i}>`}var Qm=new Set(["restProps","slot","snippet","event","typedef","callback"]),Ui=new Set(["property","type"]),Zm=new Set(["slot","snippet","typedef","callback"]);function Xn(e){if(!e||e.length===0)return;return e[vr(e)].content}function Dl(e){return!e||!e.tag&&!e.continuesType&&e.content.trim()===""}function eg(e){return e.text.split(`
|
|
49
|
-
`).length===e.lines.length}function
|
|
48
|
+
}${s}`;return{...i,slot_props:a}}).sort((t,n)=>{let i=t.name??"",r=n.name??"";if(i<r)return-1;if(i>r)return 1;return 0})}function Ig(e,t,n){if(e.deferredSlotBlockGenerics.length>0){let i=[...t.map((r)=>r.type??""),...n.map((r)=>r.slot_props??"")].join(`
|
|
49
|
+
`);for(let{name:r,constraint:s}of e.deferredSlotBlockGenerics){let a=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");if(!new RegExp(`\\b${a}\\b`).test(i))continue;zn(e,r,s)}}if(e.scriptGenericsAttribute){if(e.generics)P(e,"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.',e.scriptGenericsAttribute.source);e.generics=wa(e.scriptGenericsAttribute.value)}}function Rg(e){return Dt(e.events).map((t)=>{switch(t.type){case"forwarded":return{...t,element:t.element.name};case"dispatched":return t;default:return t}}).sort(Ec)}function Mg(e,t,n){let i={props:new Map(e.pendingCallDefaultCandidates.filter((r)=>r.location==="props").map((r)=>[r.propName,r])),moduleExports:new Map(e.pendingCallDefaultCandidates.filter((r)=>r.location==="moduleExports").map((r)=>[r.propName,r]))};for(let r of t)if(r.typeSource==="unknown"){let s=i.props.get(r.name);if(s)r.type="any";let a=s?s.importSource?`Prop "${r.name}" default calls "${s.calleeName}()" imported from "${s.importSource}"; falling back to "any" pending cross-file resolution.`:`Prop "${r.name}" default calls "${s.calleeName}()", but its return type could not be inferred; falling back to "any".`:`Prop "${r.name}" type could not be inferred; falling back to "${r.type??"any"}".`;P(e,"prop-unknown-type",r.name,a,r.source)}for(let r of n)if(r.typeSource==="unknown"&&i.moduleExports.has(r.name))r.type="any"}function _i(e,t,n,i){if(t===void 0||Sc(t))return!0;let r=sn(t)?"has a `//` comment, which would comment out the code after it in the .d.ts":"is not valid TypeScript";return P(e,"type-syntax-error",n,`Type \`${t}\` of "${n}" ${r}; falling back to "any".`,i),!1}function Bg(e,t,n,i,r){for(let s of t)if(s.typeSource==="jsdoc"&&!_i(e,s.type,s.name,s.source))s.type="any";for(let s of n)if(s.type==="dispatched"&&!_i(e,s.detail,s.name,s.source))s.detail="any";for(let s of i)if(!_i(e,s.slot_props,s.name??"default",s.source))s.slot_props="any";for(let s of r)if(!_i(e,s.type,s.name,s.source))s.type="any",s.ts=`type ${s.name} = any;`}function Og(e,t){let{dispatcherName:n}=t,i=[];if(n===void 0)return i;let r=[];for(let a of t.callsWithArguments){let o=ba(a,n);if(o)r.push({call:a,...o})}if(r.length>0)Te(e,"dispatch-escapes",n,ze(e,n)?.sveldIgnore);let s=or(e,"dispatch-escapes",n);for(let{call:a,argumentIndex:o,property:l}of r){let p=t.locallyBoundCalls.has(a)?void 0:gr(e,a.callee);if(!p){i.push(a);continue}let c=C(e,a);e.pendingDispatchEscapeCandidates.push({importSource:p.source,importedName:p.importedName,...p.members?{members:p.members}:{},calleeText:K(e,a.callee)??p.importedName,dispatcherName:n,argumentIndex:o,...l===void 0?{}:{property:l},...c?{source:c}:{},...s?{ignored:s}:{}})}return i}function jg(e,t,n){for(let i of e.jsDocEventNames){if(t.has(i))continue;if(e.forwardedEvents.has(i))continue;if(e.props.has(`on${i}`))continue;if(n.length>0)continue;let r=sr(e,"event-no-source",i,`@event "${i}" has no matching dispatch or callback prop.`,e.jsDocEventSources.get(i));if(e.pendingDispatchEscapeCandidates.length>0)e.deferredEventNoSourceDiagnostics.push(r);else e.diagnosticRecords.push(r)}}function Fg(e){if(e.slotsUntracked)return;let t=e.syntaxMode==="runes";for(let[n,{tag:i,source:r}]of e.jsDocSlots){let s=n??"children";if(e.renderedSlots.has(n)||t&&e.props.has(s))continue;let a=n===Ue?"default <slot>":`<slot name="${n}">`,o=t?`{@render ${s}()} or "${s}" prop`:a,l=n===Ue?`@${i} documents the default slot, but the component has no ${o}.`:`@${i} "${n}" has no matching ${o} in the component.`;P(e,"slot-not-rendered",n??"default",l,r)}}function qg(e,t){let n=t.typedefs.filter((s)=>s.internal).map((s)=>s.name.split("<")[0]);if(n.length===0)return;let i=n.map((s)=>({name:s,regex:new RegExp(`\\b${s}\\b`)})),r=(s,a,o)=>{if(!a)return;for(let{name:l,regex:p}of i){if(!p.test(a))continue;P(e,"internal-typedef-referenced",s,`"${s}" references "${l}", which is @internal and excluded from output; the generated .d.ts will contain a dangling reference to it.`,o)}};for(let s of t.props){if(s.internal)continue;r(s.name,s.type,s.source)}for(let s of t.moduleExports){if(s.internal)continue;r(s.name,s.type,s.source)}for(let s of t.typedefs){if(s.internal)continue;r(s.name,s.ts)}for(let s of t.events){if(s.internal||s.type!=="dispatched")continue;r(s.name,s.detail,s.source)}for(let s of t.slots){if(s.internal)continue;r(s.name??"default",s.slot_props,s.source)}for(let s of t.contexts){if(s.internal)continue;if(s.type!==void 0)r(s.typeName,s.type,s.source);for(let a of s.properties)r(a.name,a.type)}}function kc(e,t){let n=$g(e,t);Ra(e,n);let i=Lg(e);e.activeScopes.length=0;let r=_g(e);Ig(e,i,r);let s=Dt(e.moduleExports),a=Rg(e),o=Dt(e.typedefs),l=Dt(e.contexts);Mg(e,i,s),Bg(e,i,a,r,o);let p=Og(e,t);jg(e,n,p),Fg(e);let{dispatcherName:c}=t;for(let m of p){let y=K(e,m.callee)??"";P(e,"dispatch-escapes",c??"",`\`${c}\` is passed to \`${y}\`, which sveld can't follow: it only reads a function imported from another module, by name, as its default export, or through a namespace import. Document the events dispatched there with @event tags.`,C(e,m))}if(e.rest_props?.type==="InlineComponent")P(e,"rest-props-unresolved","$$restProps",`$$restProps is only spread onto component "${e.rest_props.name}"; sveld cannot infer its rest-prop type. Spread onto a plain element or add an @restProps tag.`);qg(e,{props:i,moduleExports:s,typedefs:o,events:a,slots:r,contexts:l});let d={source:In(e,0,e.source?.length),syntaxMode:e.syntaxMode,...e.scriptLanguage?{scriptLanguage:e.scriptLanguage}:{},props:i,moduleExports:s,slots:r,events:a,typedefs:o,generics:e.generics,rest_props:e.rest_props,extends:e.extends,componentComment:e.componentComment,componentCommentSource:e.componentCommentSource,contexts:l,customElementTag:e.customElementTag,customElement:e.customElement,...e.cssParts.length>0?{cssParts:e.cssParts.slice()}:{},...e.cssProperties.length>0?{cssProperties:e.cssProperties.slice()}:{},diagnostics:e.diagnosticRecords.slice()},f=Go(e);if(f)d[Pe]=f;let h=zo(e);return h?{component:d,pending:h}:{component:d}}function Vg(e){if(e.computed)return;if(e.key.type==="Identifier")return e.key.name;if(e.key.type==="Literal"&&(typeof e.key.value==="string"||typeof e.key.value==="number"))return String(e.key.value);return}function wc(e){return e==="private"||e==="protected"}function Nt(e){return{...e?.description?{description:e.description}:{},...e?.deprecated===void 0?{}:{deprecated:e.deprecated},...e?.tags?{tags:e.tags}:{}}}function Pc(e){return e?.slice(1,-1).trim()||void 0}function Ms(e,t,n){let i=yr(e,t),r=new Map((n?.params??[]).map((l)=>[l.name,l])),s=i.params.map(({name:l,type:p,optional:c,rest:d})=>{let f=r.get(l);return{name:d?`...${l}`:l,type:p??f?.type??(d?"any[]":"any"),...f?.description?{description:f.description}:{},...!d&&(c||f?.optional)?{optional:!0}:{}}}),a=i.returnType??n?.returnType??(t.async?"Promise<any>":void 0),o=Pc(i.typeParameters)??n?.typeParameters;return{...s.length>0?{params:s}:{},...a?{returnType:a}:{},...o?{typeParameters:o}:{}}}function Dc(e,t){let n=[],i=new Map,r=new Set,s=new Set,a,o=-1;for(let c of t.body.body){if(c.type!=="MethodDefinition"&&c.type!=="PropertyDefinition")continue;if(wc(c.accessibility))continue;let d=Vg(c);if(d===void 0)continue;let f=q(e,c);if(f?.internal)continue;let h=`${c.static?"static ":""}${d}`,m={...c.static?{static:!0}:{},...c.optional?{optional:!0}:{},...c.abstract?{abstract:!0}:{}};if(c.type!=="MethodDefinition"){if(V(e,c.typeAnnotation?.typeAnnotation),!c.static)s.add(d);n.push({kind:"property",name:d,type:Ie(e,c.typeAnnotation)??f?.type??"any",...m,...c.readonly?{readonly:!0}:{},...Nt(f)});continue}let y=c.typeParameters?{...c.value,typeParameters:c.typeParameters}:c.value;if(c.kind==="constructor"){let g=Ms(e,y,f);n.push({kind:"constructor",name:"constructor",params:g.params,...Nt(f)}),o=n.length,a=y.type==="FunctionExpression"?y.body.body:void 0,y.params.forEach((N,S)=>{if(N.type!=="TSParameterProperty"||wc(N.accessibility))return;let w=g.params?.[S];if(!w)return;s.add(w.name),n.push({kind:"property",name:w.name,type:w.type,...N.readonly?{readonly:!0}:{},...w.description?{description:w.description}:{}})});continue}if(c.kind==="get"||c.kind==="set"){let g=Ms(e,y,f),N=c.kind==="get"?g.returnType??f?.type:g.params?.[0]?.type??f?.type,S=i.get(h);if(S){if(c.kind==="set")S.readonly=void 0;if(N&&N!=="any"&&(S.type==="any"||c.kind==="get"))S.type=N;if(!S.description&&!S.deprecated)Object.assign(S,Nt(f));continue}let w={kind:"property",name:d,type:N??"any",...m,...c.kind==="get"?{readonly:!0}:{},...Nt(f)};i.set(h,w),n.push(w);continue}if(y.type==="TSDeclareMethod"&&!c.abstract)r.add(h);else if(y.type!=="TSDeclareMethod"&&r.has(h))continue;n.push({kind:"method",name:d,...m,...Ms(e,y,f),...Nt(f)})}if(e.scriptLanguage!=="ts"&&a)n.splice(o,0,...Wg(e,a,s));for(let c of t.typeParameters?.params??[])V(e,c.constraint),V(e,c.default);let l=Pc(st(e,t.typeParameters)),p=Hg(e,t);return{members:n,...l?{typeParameters:l}:{},...p}}function Hg(e,t){let n={},i=t.superClass;if(i){if(n.extends=st(e,{start:i.start,end:t.superTypeParameters?.end??i.end}),i.type==="Identifier")Ac(e,i,t.superTypeParameters)}let r=(t.implements??[]).map((s)=>(Ac(e,s.expression,s.typeParameters),st(e,s))).filter((s)=>Boolean(s));if(r.length>0)n.implements=r;return n}function Ac(e,t,n){V(e,{type:"TSTypeReference",typeName:t,start:t.start,end:n?.end??t.end,...n?{typeArguments:n}:{}})}function Wg(e,t,n){let i=[];for(let r of t){let s=r.type==="ExpressionStatement"?r.expression:void 0;if(s?.type!=="AssignmentExpression"||s.operator!=="=")continue;let a=s.left;if(a.type!=="MemberExpression"||a.computed||a.object.type!=="ThisExpression")continue;let o=a.property.type==="Identifier"?a.property.name:void 0;if(!o||n.has(o))continue;n.add(o);let l=q(e,r);if(l?.internal)continue;i.push({kind:"property",name:o,type:l?.type??"any",...Nt(l)})}return i}var zg=/^[A-Za-z_$][\w$]*(?=\s*(?:<|$))/;function Bs(e,t,n){if(!t)return;let i=e.moduleExports.get(t);e.moduleExports.set(t,i?{...i,...n}:n)}function Nc(e,t,n,i){let r=q(e,t);Bs(e,n==="*"?`* from ${i.from}`:n,{name:n,kind:"re-export",description:r?.description,deprecated:r?.deprecated,tags:r?.tags,...r?.internal?{internal:!0}:{},isFunction:!1,isFunctionDeclaration:!1,isRequired:!1,constant:!1,reactive:!1,reExport:i,source:C(e,t)})}function $c(e,t){P(e,"module-export-conflict","default",`export "default" was skipped because it collides with the component's own default export.`,C(e,t))}function Gg(e,t,n,i){let r=n.id?.name;if(!r)return;let s=i?.exportedName??r,a=Wn(e,t,i),{members:o,typeParameters:l,extends:p,implements:c}=Dc(e,n),d=l??a?.typeParameters;Bs(e,s,{name:s,...r===s?{}:{localName:r},kind:"class",description:a?.description,deprecated:a?.deprecated,tags:a?.tags,...a?.internal?{internal:!0}:{},type:`typeof ${r}`,...d?{typeParameters:d}:{},members:o,...n.abstract?{abstract:!0}:{},...p?{extends:p}:{},...c?{implements:c}:{},isFunction:!1,isFunctionDeclaration:!1,isRequired:!1,constant:!1,reactive:!1,source:C(e,t)})}function Lc(e,t,n,i){if(n.type==="ClassDeclaration"){Gg(e,t,n,i);return}let r=Dr(e,n,i,"moduleExports");if(r.length===0)return;let s=Wn(e,t,i);for(let a of r){let{prop_name:o,kind:l}=a,{type:p,typeSource:c,description:d,params:f,returnType:h,isFunction:m,typeParameters:y}=Nr(e,a,s);Bs(e,o,{name:o,kind:l,description:d,deprecated:s?.deprecated,tags:s?.tags,...s?.internal?{internal:!0}:{},type:p,typeSource:c,value:a.value,defaultValue:a.defaultValue,params:f,returnType:h,typeParameters:y,isFunction:m,isFunctionDeclaration:a.isFunctionDeclaration,isRequired:!1,constant:l==="const",reactive:!1,source:C(e,t)})}}function Ug(e){let t=Array.from(e.moduleExports.values()).filter((i)=>i.kind==="class"),n=new Set(t.map((i)=>i.localName??i.name));for(let i of t){if(!i.extends)continue;let r=zg.exec(i.extends)?.[0];if(r&&(n.has(r)||e.valueImportBindingsByLocalName.has(r)||e.typeImportBindingsByLocalName.has(r)))continue;P(e,"export-unresolved",i.name,`class "${i.name}" extends \`${i.extends}\`, which isn't imported or an exported class, so the .d.ts declares it without \`extends\` and its inherited members are missing. Export the base class from the module script.`,i.source),i.extends=void 0}}function _c(e){let t=e.parsed?.module;if(!t)return;let n=Uo(t);J(t,{enter(i,r){if(i.type==="ImportDeclaration")qt(e,i);if(i.type==="FunctionDeclaration"&&i.id?.name)e.funcDecls.set(i.id.name,i);if(i.type==="VariableDeclaration")e.vars.add(i);if(i.type==="ExportNamedDeclaration"){if(i.declaration!=null){Lc(e,i,i.declaration);return}let s=i.source?.value,a=r?.type==="Program"?r:null;for(let o of i.specifiers){let l=Ar(e,i,o,a,"module");if(!l)continue;if(l.exportedName==="default"){$c(e,i);continue}let p=typeof s==="string"?{from:s,imported:l.localName}:n.get(l.localName);if(l.declaration)Lc(e,i,l.declaration,l);else if(p)Nc(e,i,l.exportedName,p);else if(!e.localTypeDeclarationsByName.get(l.localName)?.exported)Pr(e,i,l.localName,l.exportedName)}}if(i.type==="ExportAllDeclaration"&&typeof i.source.value==="string"){let s=(i.exported&&Hn(i.exported))??"*";if(s==="default"){$c(e,i);return}Nc(e,i,s,{from:i.source.value,imported:"*"})}}}),Ug(e)}function Ic(e){return Li(e,{css:!1})}function Jg(e,t){let n=e.length+1,i=t.length+1,r=Array.from({length:n},()=>Array(i).fill(0));for(let s=0;s<n;s++)r[s][0]=s;for(let s=0;s<i;s++)r[0][s]=s;for(let s=1;s<n;s++)for(let a=1;a<i;a++){let o=e[s-1]===t[a-1]?0:1;if(r[s][a]=Math.min(r[s-1][a]+1,r[s][a-1]+1,r[s-1][a-1]+o),s>1&&a>1&&e[s-1]===t[a-2]&&e[s-2]===t[a-1])r[s][a]=Math.min(r[s][a],r[s-2][a-2]+1)}return r[n-1][i-1]}function Rc(e,t,n=3){let i,r=Number.POSITIVE_INFINITY;for(let s of t){let a=Jg(e,s);if(a<r)i=s,r=a}return r<=n?i:void 0}var Kg=/\s*=\s*/;function Xg(e){let t=e.indexOf("<");if(t===-1||!e.endsWith(">"))return e;let n=e.slice(0,t),i=e.slice(t+1,-1),r=G(i,",").map((s)=>s.trim().replace(Kg," = ")).join(", ");return`${n}<${r}>`}var Yg=new Set(["restProps","slot","snippet","event","typedef","callback"]),Os=new Set(["property","type"]),Mc=new Set(["slot","snippet","typedef","callback"]);function Ii(e){if(!e||e.length===0)return;return e[cr(e)].content}function Bc(e){return!e||!e.tag&&!e.continuesType&&e.content.trim()===""}function Qg(e){return e.text.split(`
|
|
50
|
+
`).length===e.lines.length}function js(e,t){if(t<=0)return e;return e.split(`
|
|
50
51
|
`).slice(0,-t).join(`
|
|
51
|
-
`).trimEnd()}var
|
|
52
|
-
`):[],r=t?.line;for(let i of e){if(r!==void 0&&i-r>1){let a=r+1;while(a<i&&Dl(this.lines[a]))a++;if(a===i)for(let s=r+1;s<i;s++)n.push("")}let o=this.lines[i];n.push(o.indent+o.content),r=i}return en(n)}getPrecedingDescription(e){if(e.length===0)return;let t=e[0].number,n=[],r=!1;for(let i=t-1;i>=0;i--){if(this.tagLineNumbers.has(i)||this.indentedContinuationLines.has(i)||this.consumedDescriptionLines.has(i))break;if(this.lineDescriptions.has(i))n.unshift(i),r=!0;else if(r&&!Dl(this.lines[i]))break}if(n.length===0)return;for(let i of n)this.consumedDescriptionLines.add(i);return this.trimBodyAbove?.(n[0]),this.joinBlockLines(n)}claimBodyLines(e,t){if(!eg(e)){for(let r=1;r<e.lines.length;r++)this.consumedDescriptionLines.add(e.lines[r].number);return}let n=e.lines[e.lines.length-1].number;this.trimThisBody=(r)=>t(n-r+1)}getTagDescription(e,t,n=!1){let r=xe(Xn(e)),i=t!==void 0&&Qm.has(t.tag)&&!xe(Xn(t.lines)),o=n&&(t===void 0||!Ui.has(t.tag)),a=[];for(let s=1;s<e.length;s++){let p=e[s];if((i||o)&&!this.indentedContinuationLines.has(p.number))continue;if(!this.lineDescriptions.get(p.number)?.trim()||this.consumedDescriptionLines.has(p.number))continue;a.push(p.number),this.consumedDescriptionLines.add(p.number)}if(a.length===0)return r;return this.joinBlockLines(a,{text:r??"",line:e[vr(e)].number})}flagDescriptionAfterEvent(e,t,n,r){if(this.eventName===void 0||this.eventDescription)return;if(this.eventTagLine!==void 0&&this.indentedContinuationLines.has(this.eventTagLine+1))return;if(r?.tag!=="event"&&!Ui.has(r?.tag??""))return;if(xe(Xn(n)))return;let i=t?`@${e} "${t}"`:`@${e}`;P(this.ctx,"event-description-ambiguous",this.eventName,`Text after @event "${this.eventName}" was used as the description of ${i}. Move it above the tag it describes, indent it as a continuation line, or give each event its own comment block.`,Y(this.ctx,n))}takePrecedingDescription(e){let{tag:t,name:n,lines:r}=this.tags[e],i=this.getPrecedingDescription(r);if(i)this.flagDescriptionAfterEvent(t,n,r,this.tags[e-1]);return i}finalizeEvent(){if(this.eventName===void 0)return;let{ctx:e}=this,t=this.eventType&&this.eventType!=="object"&&this.eventType!=="Object"?this.eventType:void 0,n;if(t)n=t;else if(this.eventProperties.length>0)n=Pt(this.eventProperties,this.eventName,!0);else n=this.eventType||"";if(this.eventTagLine!==void 0){let i;for(let s of this.tags){let p=s.lines[0]?.number;if(typeof p!=="number")continue;if(p<=this.eventTagLine)continue;if(Ui.has(s.tag))continue;i=p;break}let o=[],a=Array.from(this.lineDescriptions.keys()).sort((s,p)=>s-p);for(let s of a){if(s<=this.eventTagLine)continue;if(i!==void 0&&s>=i)continue;if(this.consumedDescriptionLines.has(s))continue;if(this.lineDescriptions.get(s)?.trim())o.push(s),this.consumedDescriptionLines.add(s)}if(o.length>0)this.eventDescription=this.joinBlockLines(o,this.eventDescription?{text:this.eventDescription,line:this.eventTagLine}:void 0)}let r=n===""&&(!e.events.has(this.eventName)||e.untypedJsDocEventNames.has(this.eventName));if(Le(e,{name:this.eventName,detail:n,has_argument:!1,description:this.eventDescription,deprecated:this.eventDeprecated,tags:this.eventTags.length>0?this.eventTags:void 0,internal:this.eventInternal||void 0,source:this.eventSource}),r)e.untypedJsDocEventNames.add(this.eventName);e.eventDescriptions.set(this.eventName,this.eventDescription),e.jsDocEventNames.add(this.eventName),e.jsDocEventSources.set(this.eventName,this.eventSource),me(e,"event-no-source",this.eventName,this.eventIgnores),this.eventProperties.length=0,this.eventName=void 0,this.eventType=void 0,this.eventDescription=void 0,this.eventDeprecated=void 0,this.eventInternal=!1,this.eventSource=void 0,this.eventTagLine=void 0,this.eventTags=[],this.eventIgnores=[]}finalizeTypedef(){if(this.typedefName===void 0)return;let{ctx:e}=this,t,n;if(this.typedefProperties.length>0)t=Pt(this.typedefProperties,void 0,!0),n=`type ${this.typedefName} = ${t};`;else if(this.typedefType)t=this.typedefType,n=ig(t)?`interface ${this.typedefName} ${t}`:`type ${this.typedefName} = ${t};`;else t="{}",n=`type ${this.typedefName} = ${t};`;let r=this.typedefProperties.length>0?this.typedefProperties.filter(({name:i})=>!i.includes(".")&&!i.startsWith("[")).map(({name:i,type:o,optional:a,description:s})=>({name:i,type:o,optional:a===!0,...s?{description:s}:{}})):ve(t);if(r)e.typedefMembersByName.set(this.typedefName,r);_l(e,this.typedefName,this.typedefSource),e.typedefs.set(this.typedefName,{type:t,name:this.typedefName,description:X(this.typedefDescription),ts:n,tags:this.typedefTags.length>0?this.typedefTags:void 0,...this.typedefInternal?{internal:!0}:{},source:this.typedefSource}),this.typedefProperties.length=0,this.typedefName=void 0,this.typedefType=void 0,this.typedefDescription=void 0,this.typedefSource=void 0,this.typedefTags=[],this.typedefInternal=!1}finalizeCallback(){if(this.callbackName===void 0)return;let e=this.callbackParams.map(({name:i,type:o,optional:a})=>`${i}${a?"?":""}: ${o}`).join(", "),t=this.callbackReturnType||"void",n=`(${e}) => ${t}`,r=`type ${this.callbackName} = ${n};`;_l(this.ctx,this.callbackName,this.callbackSource),this.ctx.typedefs.set(this.callbackName,{type:n,name:this.callbackName,description:X(this.callbackDescription),ts:r,tags:this.callbackTags.length>0?this.callbackTags:void 0,...this.callbackInternal?{internal:!0}:{},source:this.callbackSource}),this.callbackParams.length=0,this.callbackReturnType=void 0,this.callbackName=void 0,this.callbackDescription=void 0,this.callbackSource=void 0,this.callbackTags=[],this.callbackInternal=!1}readExtends(e,t){let{name:n,lines:r}=this.tags[e];if(this.ctx.extends!==void 0)P(this.ctx,"extend-props-duplicate",n,`A second @extends/@extendProps tag ("${n}") overwrote the first ("${this.ctx.extends.interface}"); only one is used.`,Y(this.ctx,r));this.ctx.extends={interface:n,import:t},this.isFirstTag=!1}readRestProps(e,t){let{name:n,description:r}=this.tags[e],i=n?r?`${n} ${r}`:n:r,o=xe(i),a=this.orCommentDescription(o||this.takePrecedingDescription(e)),s={type:"Element",name:t,description:a||void 0};if(this.ctx.rest_props=s,o)this.claimBodyLines(this.tags[e],(p)=>{s.description=xe(Ji(i,p))||void 0});this.isFirstTag=!1}readSlot(e,t){let{tag:n,name:r,lines:i}=this.tags[e],o=this.orCommentDescription(this.getTagDescription(i,this.tags[e+1]));if(!o&&this.pendingTags.length===0)o=this.takePrecedingDescription(e);this.isFirstTag=!1;let a=t;if(!a)a="Record<string, never>",P(this.ctx,"slot-missing-type",r||"default",`@${n}${r?` "${r}"`:""} is missing a required {Type} annotation; falling back to "${a}".`,Y(this.ctx,i));Dt(this.ctx,{slot_name:r,slot_props:a,slot_description:o||void 0,slot_deprecated:this.pendingDeprecated,slot_tags:this.pendingTags.length>0?[...this.pendingTags]:void 0,slot_internal:this.pendingInternal||void 0,source:Y(this.ctx,i)}),this.pendingTags.length=0,this.pendingDeprecated=void 0,this.pendingInternal=!1;let s=r===void 0||r===""?null:r;this.attachTrailingTag=(p)=>{let l=this.ctx.slots.get(s);if(l)l.tags=[...l.tags??[],p]}}readEvent(e,t){let{name:n,lines:r}=this.tags[e],i=xe(Xn(r))||this.takePrecedingDescription(e);if(this.finalizeEvent(),this.eventName=n,this.eventType=t,this.eventTagLine=r.length>0?r[0].number:void 0,this.eventDescription=this.orCommentDescription(i),this.eventSource=Y(this.ctx,r),this.pendingTags.length>0)this.eventTags.push(...this.pendingTags),this.pendingTags.length=0;this.attachTrailingTag=(o)=>this.eventTags.push(o),this.isFirstTag=!1}readProperty(e,t){let{name:n,optional:r,default:i,lines:o}=this.tags[e],a={name:n,type:t,description:this.getTagDescription(o,this.tags[e+1],this.eventName!==void 0),optional:r||!1,default:i};if(this.eventName!==void 0)Il(this.ctx,this.eventProperties,a,this.eventName,Y(this.ctx,o));else if(this.typedefName!==void 0&&pg(this.typedefType))Il(this.ctx,this.typedefProperties,a,this.typedefName,Y(this.ctx,o))}readTypedef(e,t){let{name:n,lines:r}=this.tags[e];if(this.finalizeTypedef(),this.typedefName=this.typeDeclarationName(n),this.typedefType=t,this.typedefSource=Y(this.ctx,r),this.typedefDescription=this.orCommentDescription(this.getTagDescription(r,this.tags[e+1])||this.takePrecedingDescription(e)),this.pendingTags.length>0)this.typedefTags.push(...this.pendingTags),this.pendingTags.length=0;this.typedefInternal=this.pendingInternal,this.pendingInternal=!1,this.attachTrailingTag=(i)=>this.typedefTags.push(i),this.isFirstTag=!1}readCallback(e){let{name:t,lines:n}=this.tags[e];if(this.finalizeCallback(),this.callbackName=this.typeDeclarationName(t),this.callbackSource=Y(this.ctx,n),this.callbackDescription=this.orCommentDescription(this.getTagDescription(n,this.tags[e+1])||this.takePrecedingDescription(e)),this.pendingTags.length>0)this.callbackTags.push(...this.pendingTags),this.pendingTags.length=0;this.callbackInternal=this.pendingInternal,this.pendingInternal=!1,this.attachTrailingTag=(r)=>this.callbackTags.push(r),this.isFirstTag=!1}readGenerics(e,t){let{name:n,lines:r}=this.tags[e],i=t||n;for(let o of z(n,","))$l(this.ctx,this.generics,o.trim(),Y(this.ctx,r));this.generics.usedGenericsTag=!0,Nl(this.ctx,this.generics),Ll(this.ctx,n,i),this.isFirstTag=!1}readTemplate(e,t){let{tags:n}=this,r=Cr(n[e],t),i=e+1;while(n[i]?.tag==="template")i++;let o=n[i];if((o?.tag==="typedef"||o?.tag==="callback")&&!o.name.includes("<")&&ag(n,i,r)){this.pendingTypeParameters.push(...r.map(({constraint:a})=>a));return}if(this.hasSlotOrSnippetTag&&!this.hasExtendsTag){this.ctx.deferredSlotBlockGenerics.push(...r);return}if(this.documentsFunction)return;for(let a of r)$l(this.ctx,this.generics,a.name,Y(this.ctx,n[e].lines)),Ll(this.ctx,a.name,a.constraint);this.generics.usedTemplateTag=!0,Nl(this.ctx,this.generics),this.isFirstTag=!1}readDeprecated(e){let{text:t}=this.tags[e],n=this.eventName!==void 0;if(n?this.eventDeprecated!==void 0:this.pendingDeprecated!==void 0)return;let r=(i)=>{if(n)this.eventDeprecated=i;else this.pendingDeprecated=i};r(nn(t)),this.claimBodyLines(this.tags[e],(i)=>{r(nn(Ji(t,i)))})}readPassthrough(e){let{tag:t,text:n,lines:r}=this.tags[e],i={name:t,body:n};if(this.claimBodyLines(this.tags[e],(o)=>{i.body=Ji(n,o)}),!tn.has(t)&&!Er.has(t)){let o=tg.has(t)?void 0:Al(t,ng,t.length<=4?1:2);P(this.ctx,"jsdoc-unknown-tag",t,o?`Unknown JSDoc tag "@${t}"; did you mean "@${o}"? Passed through unchanged.`:`Unknown JSDoc tag "@${t}"; passed through unchanged. If this is a typo, fix the tag name.`,Y(this.ctx,r))}if(this.attachTrailingTag)this.attachTrailingTag(i);else this.pendingTags.push(i)}read(){let{tags:e}=this;for(let n=0;n<e.length;n++){let{tag:r,type:i,name:o,optional:a}=e[n],s=De(i);switch(this.trimBodyAbove=this.trimThisBody,this.trimThisBody=void 0,r){case"extends":case"extendProps":this.readExtends(n,s);break;case"restProps":this.readRestProps(n,s);break;case"slot":case"snippet":this.readSlot(n,s);break;case"csspart":{let p=this.getTagDescription(e[n].lines,e[n+1]);this.ctx.cssParts.push({name:o,...p?{description:p}:{}});break}case"cssprop":case"cssproperty":{let p=this.getTagDescription(e[n].lines,e[n+1]),l=e[n].default;this.ctx.cssProperties.push({name:o,...s?{type:s}:{},...l===void 0?{}:{default:l},...p?{description:p}:{}});break}case"event":this.readEvent(n,s);break;case"type":if(this.eventName!==void 0)this.eventType=s;break;case"param":if(this.callbackName!==void 0)this.callbackParams.push({name:o,type:s,optional:a||!1});break;case"returns":case"return":if(this.callbackName!==void 0)this.callbackReturnType=s;break;case"property":this.readProperty(n,s);break;case"typedef":this.readTypedef(n,s);break;case"callback":this.readCallback(n);break;case"generics":this.readGenerics(n,s);break;case"template":this.readTemplate(n,s);break;case"deprecated":this.readDeprecated(n);break;case"ignore":case"internal":if(this.eventName===void 0)this.pendingInternal=!0;else this.eventInternal=!0;break;case"sveld-ignore":if(this.eventName!==void 0)this.eventIgnores.push(o);break;case"enum":case"class":case"implements":case"this":case"namespace":case"memberof":case"module":case"file":case"overview":break;default:this.readPassthrough(n);break}if(Zm.has(r))this.finalizeEvent()}if(this.finalizeEvent(),this.finalizeTypedef(),this.finalizeCallback(),e.some((n)=>n.tag==="slot"||n.tag==="snippet"||n.tag==="event"||n.tag==="typedef"||n.tag==="callback")&&this.pendingTags.length>0){for(let n of this.pendingTags)P(this.ctx,"jsdoc-tag-dropped",n.name,`@${n.name} could not attach to a @slot/@snippet/@event/@typedef/@callback tag in the same comment block and was dropped.`);this.pendingTags.length=0}}}function Ml(e,t=e.source){if(!t)return;let n={usedGenericsTag:!1,usedTemplateTag:!1,warnedMixedGenericsTags:!1,seenGenericNames:new Set},r=t.includes("@template")?Vs(e):new Set;e.functionDocCommentStarts=r;let i=Zt(t);for(let o of i)e.jsDocBlocksByStart.set(o.start,o);for(let o of i)new Rl(e,n,o,r.has(o.start)).read()}var ql=new Set(["$state","$derived","$effect","$props","$bindable","$inspect","$host"]);function lg(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 cg=Array.from(ql);function jl(e){return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e===95||e===36}function ug(e){if(e.includes("\\u"))return!0;for(let t of cg){let n=e.indexOf(t);while(n!==-1){if(!jl(e.charCodeAt(n-1))&&!jl(e.charCodeAt(n+t.length)))return!0;n=e.indexOf(t,n+1)}}return!1}function dg(e,t){for(let n=t.length-1;n>=0;n-=1)if(t[n]?.has(e))return!0;return!1}function fg(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??[])M(r,t);break}case"BlockStatement":Yn(e.body,t);break;case"CatchClause":M(e.param,t);break;case"EachBlock":{let n=e;if(M(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;M(n.value,t),M(n.error,t);break}}return t}function Yn(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??[])M(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)Yn([r],t);break}}}}function Ki(e,t){if(!e||typeof e!=="object")return!1;return Xi(e,void 0,[...t])}function Xi(e,t,n){if(Wr(e.type))return!1;let r=St(e);if(r)n.push(fg(e));let i=!1;if(t&&e.type==="Identifier"&&e.name!==void 0&&ql.has(e.name)&&!t.type.startsWith("TS")&&lg(e,t)&&!dg(e.name,n))i=!0;else for(let o in e){if(o==="leadingComments")continue;let a=e[o];if(!a||typeof a!=="object")continue;if(Array.isArray(a)){for(let s=0;s<a.length;s++){let p=a[s];if(p&&typeof p==="object"&&typeof p.type==="string"){if(Xi(p,e,n)){i=!0;break}}}if(i)break}else if(typeof a.type==="string"){if(Xi(a,e,n)){i=!0;break}}}if(r)n.pop();return i}function Bl(e){if(e.runesOptionOverride!==void 0)return e.runesOptionOverride?"runes":"legacy";let t=e.parsed;if(!t)return"legacy";if(e.source!==void 0&&!ug(e.source))return"legacy";let n=new Set;Yn(t.module?.content.body,n);let r=new Set;return Yn(t.instance?.content.body,r),Ki(t.module,[n])||Ki(t.instance,[n,r])||Ki(t.fragment,[n,r])?"runes":"legacy"}var Ol=new Set(["TSAsExpression","TSSatisfiesExpression","TSNonNullExpression","TSTypeAssertion","TSInstantiationExpression"]);function Yi(e){return e!==null&&typeof e==="object"&&typeof e.type==="string"}function Fl(e){if(!Ol.has(e.type))return e;let t=e.expression;while(t&&Ol.has(t.type))t=t.expression;return t??e}function Qn(e){if(!Yi(e))return;Qi(e)}function Qi(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(!Yi(i))continue;let o=Fl(i);if(o!==i)n[r]=o;Qi(o)}else if(Yi(n)){let r=Fl(n);if(r!==n)e[t]=r;Qi(r)}}}var Vl=/(<script[^>]*>)([\s\S]*?)(<\/script>)/gi,Hl=/\/\/(?<!^[ \t]*\*.*\/\/)\s*@ts-[^\n\r]*/gm;function hg(e){if(!e.includes("@ts-"))return e;return Vl.lastIndex=0,e.replace(Vl,(t,n,r,i)=>{Hl.lastIndex=0;let o=r.replace(Hl,"");return n+o+i})}function Gl(e,t,n){e.componentFilePath=n;let r=hg(t);e.source=r;let i=Pl(r);if(Vo(e,i),e.parsed=i,e.scriptLanguage==="ts")Qn(i.module),Qn(i.instance),Qn(i.fragment);e.syntaxMode=Bl(e);let o=i.css,a=o?r.slice(0,o.start)+" ".repeat(o.end-o.start)+r.slice(o.end):r;Ar(e,i.module),Ar(e,i.instance),Ml(e,a)}class Zi{ctx=ur();cleanup(){this.ctx=ur()}parseSvelteComponent(e,t){let{component:n,pending:r}=this.parse(e,t);if(r)n[ge]={...n[ge]??{canonicalPropNames:[],localTypeDeclarations:[],typeImportStatements:[]},...r};return n}parse(e,t){this.cleanup();let n=this.ctx;Gl(n,e,t.filePath),wl(n);let r=Ko(n);return bl(n,r)}}var mg=/\.$/,es="resolving it needs file access (generateBundle or the CLI)";function gg(e,t={}){let n=e[ge];if(!n)return e;let{pendingCallDefaultCandidates:r,pendingConstDefaultCandidates:i,pendingContextKeyCandidates:o,pendingDispatchEscapeCandidates:a,deferredEventNoSourceDiagnostics:s,untypedJsDocEventNames:p,...l}=n,c=(r??[]).filter((b)=>b.importSource!==void 0);if(c.length===0&&!i&&!o&&!a&&!s)return e;let d=e.filePath,f=t.filePath??(typeof d==="string"?d:""),h=[],g=(b,L,R,qe)=>{h.push(Yt({component:f,kind:"cross-file-unresolved",name:b,message:L,...R?{source:R}:{},...qe?{ignored:qe}:{}}))},m=(b,L)=>(b==="props"?e.props:e.moduleExports).find((R)=>R.name===L)?.source,y=(b)=>b==="props"?"Prop":"Module export";for(let b of o??[]){let L=xt(b);g(L,`setContext key \`${L}\` is imported from "${b.importSource}"; ${es}, so the context is omitted.`,b.source)}for(let b of i??[])g(b.propName,`${y(b.location)} "${b.propName}" defaults to \`${xt(b)}\` imported from "${b.importSource}"; ${es}, so the default shows the identifier and its type isn't read.`,m(b.location,b.propName));for(let b of c)g(b.propName,`${y(b.location)} "${b.propName}" defaults to \`${b.calleeName}()\` imported from "${b.importSource}"; ${es}, so its return type isn't read and the prop falls back to "any".`,m(b.location,b.propName));for(let b of a??[])g(b.calleeText,`\`${b.dispatcherName}\` is passed to \`${b.calleeText}\`, imported from "${b.importSource}"; reading the events it dispatches needs file access (generateBundle or the CLI), so they're omitted.`,b.source,b.ignored);let T=Array.from(new Set((a??[]).map((b)=>`\`${b.calleeText}\``))).join(", "),S=(s??[]).map((b)=>T?{...b,message:`${b.message.replace(mg,"")} in this file; ${T} may dispatch it, but imported helpers aren't read without file access.`}:b),D={...e,diagnostics:[...e.diagnostics??[],...S,...h]};return D[ge]=l,D}var Wl="sveld",Ul="0.38.1";var ts="5.57.1";var Jl=1;function je(e){return e.some((t)=>t.internal)?e.filter((t)=>!t.internal):e}function bg(e){return{...e,props:je(e.props),moduleExports:je(e.moduleExports),slots:je(e.slots),events:je(e.events),typedefs:je(e.typedefs),...e.contexts?{contexts:je(e.contexts).map((t)=>({...t,properties:je(t.properties)}))}:{}}}function ns(e,t={}){let n=Array.from(e,([,o])=>{let{diagnostics:a,...s}=o;return bg(s)}).sort((o,a)=>be(o.moduleName,a.moduleName)),r={schemaVersion:Jl,generator:{name:Wl,version:Ul,svelteVersion:ts},total:n.length,components:n},i=t.entryExports?je(t.entryExports):void 0;if(i&&i.length>0)r.totalExports=i.length,r.exports=i;return r}var xg=" ",vg=120,Eg=/\binterface\s+[A-Za-z_$][\w$]*(\s*<[^{};]*>)?\s*$/,Tg=200,Ql=/\s/,Sg=/\s{2}|[^\S ]/,kg=/["'`{}/]/g,Cg=/["'`{};/]/g,Zl=9,rs=10,wg=13,Gt=32,er=34,Pg=38,tr=39,Ag=40,Dg=41,Zn=42,Kl=46,ss=47,ec=59,Ng=62,$g=91,os=92,Lg=93,nr=96,as=123,_g=124,ps=125;function Ig(e){return Eg.test(e.slice(-200))}var Xl=[""];function Rg(e){let t=Xl[e];if(t===void 0)t=xg.repeat(e),Xl[e]=t;return t}function Mg(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 jg(e){if(e.length===0)return!1;let t=e[e.length-1];return t.charCodeAt(t.length-1)===rs}function qg(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!==Gt&&r!==Zl)break;n--}if(n===t.length)return;if(n===0){e.pop();continue}e[e.length-1]=t.slice(0,n);return}}function Bg(e){while(e.length>0){let t=e[e.length-1];if(!Ql.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 Og(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)!==os)t=0;continue}if(i===er||i===tr||i===nr){t=i;continue}if(i===ec&&++n>=2)return!0}return!1}function Fg(e){if(!Sg.test(e))return e.trimEnd();let t="",n=null,r=!1;for(let i=0;i<e.length;i++){let o=e[i],a=e[i-1];if(n){if(t+=o,n==="double"&&o==='"'&&a!=="\\"||n==="single"&&o==="'"&&a!=="\\"||n==="template"&&o==="`"&&a!=="\\")n=null;r=!1;continue}if(o==='"'||o==="'"||o==="`"){n=o==='"'?"double":o==="'"?"single":"template",t+=o,r=!1;continue}if(Ql.test(o)){if(!r&&t.length>0)t+=" ",r=!0;continue}t+=o,r=!1}return t.trimEnd()}function tc(e,t){let n=e[t],r=e.indexOf(n,t+1);while(r!==-1&&e.charCodeAt(r-1)===os)r=e.indexOf(n,r+1);return r}function nc(e,t){let n=e.indexOf("*/",t+1);return n===-1?-1:n+1}function Vg(e){let t=new Map,n=[],r=kg,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===ss){if(e.charCodeAt(i+1)===Zn){let a=nc(e,i);if(a===-1)break;i=a}}else if(o===er||o===tr||o===nr){let a=tc(e,i);if(a===-1)break;i=a}else if(o===as)n.push(i);else if(o===ps&&n.length>0)t.set(n.pop(),i);i++}return t}function Hg(e,t,n){for(let r=t;r<n;r++)if(!is(e.charCodeAt(r)))return!1;return!0}function is(e){if(e<=Gt)return e===Gt||e>=Zl&&e<=wg;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 rc(e,t,n,r){let i=[],o=Cg,a=t,s=t;while(s<n){if(o.lastIndex=s,!o.test(e))break;if(s=o.lastIndex-1,s>=n)break;let p=e.charCodeAt(s);if(p===ss){if(e.charCodeAt(s+1)===Zn){let l=nc(e,s);if(l===-1)break;s=l}s++;continue}if(p===er||p===tr||p===nr){let l=tc(e,s);if(l===-1)break;s=l+1;continue}if(p===as){let l=r.get(s);if(l===void 0||l>=n){s++;continue}if(a<s)i.push(e.slice(a,s));let c=s+1;if(Hg(e,c,l)){i.push("{}"),s=l+1,a=s;continue}let d=e.slice(c,l),f=e.charCodeAt(c)===rs;if(!f&&!d.includes("/*")&&!Og(d)&&!Ig(Mg(i,Tg))){let h=rc(e,c,l,r),g=h.trim();if(!g.includes(`
|
|
53
|
-
`)){let m
|
|
54
|
-
`);if(h.length>0)
|
|
55
|
-
`);
|
|
56
|
-
`);
|
|
57
|
-
`);
|
|
58
|
-
`,
|
|
59
|
-
`);let d=t[c];if(d>0)
|
|
60
|
-
`}var
|
|
61
|
-
* `)}function
|
|
62
|
-
* ${
|
|
52
|
+
`).trimEnd()}var Zg=new Set(["abstract","access","alias","alpha","arg","argument","async","augments","author","beta","borrows","const","constructs","copyright","defaultValue","description","emits","experimental","exports","external","fires","function","global","import","inner","instance","kind","lends","license","link","listens","member","name","override","package","private","prop","protected","public","readonly","remarks","requires","satisfies","sealed","static","summary","throws","todo","tutorial","typeParam","version","virtual","yields"]),ex=[...Nn,...ur,"type","param","returns","typedef","property","callback","template","generics","slot","snippet","event","restProps","extends","extendProps","deprecated","ignore","internal","sveld-ignore","csspart","cssprop"],tx=/;$/;function nx(e){let t=e.trim().replace(tx,"").trimEnd();if(!t.startsWith("{")||!t.endsWith("}"))return!1;return rt(t,0)===t.length-1}var ix=/[\w$]+/g,rx=new Set(["property","param","returns","return"]);function sx(e,t,n){let i=[e[t].type];for(let s=t+1;rx.has(e[s]?.tag);s++)i.push(e[s].type);let r=new Set(i.join(" ").match(ix));return n.some(({name:s})=>r.has(s))}function ox(e){let t=e?.trim();return!t||t==="object"||t==="Object"}function Oc(e,t){if(t.usedGenericsTag&&t.usedTemplateTag&&!t.warnedMixedGenericsTags){t.warnedMixedGenericsTags=!0;let n=e.componentFilePath?` in ${e.componentFilePath}`:"";console.warn(`Warning: Both @generics and @template tags are used to declare component generics${n}; their declarations are combined in the order encountered.`)}}function jc(e,t,n,i){if(t.seenGenericNames.has(n))P(e,"generics-conflict",n,`Duplicate generic name "${n}".`,i);else t.seenGenericNames.add(n)}function Fc(e,t,n){if(e.generics){let r=G(e.generics[0],",").map((s)=>s.trim()).indexOf(t.trim());if(r!==-1){let s=G(e.generics[1],",").map((a)=>a.trim());s[r]=n,e.generics=[e.generics[0],s.join(", ")];return}}zn(e,t,n)}function qc(e,{name:t,type:n,ts:i,description:r,tags:s,internal:a,source:o}){if(e.typedefs.has(t))P(e,"typedef-duplicate",t,`Duplicate typedef/callback name "${t}"; the later declaration overwrites the earlier one.`,o);e.typedefs.set(t,{type:n,name:t,description:r||void 0,ts:i,tags:s.length>0?s:void 0,...a?{internal:!0}:{},source:o})}function Vc(e,t,n,i,r){let s=t.findIndex((a)=>a.name===n.name);if(s===-1)t.push(n);else{let a=i?` of "${i}"`:"";P(e,"property-duplicate",n.name,`Duplicate property "${n.name}"${a}; the later declaration overwrites the earlier one.`,r),t[s]=n}}class Hc{tags;lines;commentDescription;commentDescriptionUsed=!1;isFirstTag=!0;eventName;eventType;eventDescription;eventDeprecated;eventInternal=!1;eventSource;eventTagLine;eventTags=[];eventIgnores=[];eventProperties=[];typedefName;typedefType;typedefDescription;typedefSource;typedefTags=[];typedefInternal=!1;typedefProperties=[];callbackName;callbackDescription;callbackSource;callbackTags=[];callbackInternal=!1;callbackParams=[];callbackReturnType;attachTrailingTag;pendingTags=[];pendingDeprecated;pendingInternal=!1;pendingTypeParameters=[];lineDescriptions=new Map;tagLineNumbers=new Set;consumedDescriptionLines=new Set;indentedContinuationLines=new Set;trimBodyAbove;trimThisBody;hasSlotOrSnippetTag;hasExtendsTag;ctx;generics;documentsFunction;constructor(e,t,n,i){this.ctx=e,this.generics=t,this.documentsFunction=i;let{tags:r,lines:s}=n;this.tags=r,this.lines=s,this.commentDescription=n.description,this.hasSlotOrSnippetTag=r.some((l)=>l.tag==="slot"||l.tag==="snippet"),this.hasExtendsTag=r.some((l)=>l.tag==="extends"||l.tag==="extendProps");for(let l of r)if(l.lines.length>0)this.tagLineNumbers.add(l.lines[0].number);for(let l of s)if(l.continuesType)this.tagLineNumbers.add(l.number);let a=!1,o=!1;for(let l of s){if(!l.tag&&!l.continuesType&&l.content&&(o||l.content.trim()!=="}"))this.lineDescriptions.set(l.number,l.content);if(l.tag!==void 0||l.continuesType)a=!0;else if(!l.content.trim());else if(a&&(l.indent||o))this.indentedContinuationLines.add(l.number);else a=!1;if(jt(l.content))o=!o}}orCommentDescription(e){if(e||!this.isFirstTag||this.commentDescriptionUsed||!this.commentDescription)return e;return this.commentDescriptionUsed=!0,this.commentDescription}typeDeclarationName(e){if(this.pendingTypeParameters.length===0)return Xg(e);let t=`${e}<${this.pendingTypeParameters.join(", ")}>`;return this.pendingTypeParameters.length=0,t}joinBlockLines(e,t){let n=t?t.text.split(`
|
|
53
|
+
`):[],i=t?.line;for(let r of e){if(i!==void 0&&r-i>1){let a=i+1;while(a<r&&Bc(this.lines[a]))a++;if(a===r)for(let o=i+1;o<r;o++)n.push("")}let s=this.lines[r];n.push(s.indent+s.content),i=r}return Dn(n)}getPrecedingDescription(e){if(e.length===0)return;let t=e[0].number,n=[],i=!1;for(let r=t-1;r>=0;r--){if(this.tagLineNumbers.has(r)||this.indentedContinuationLines.has(r)||this.consumedDescriptionLines.has(r))break;if(this.lineDescriptions.has(r))n.unshift(r),i=!0;else if(i&&!Bc(this.lines[r]))break}if(n.length===0)return;for(let r of n)this.consumedDescriptionLines.add(r);return this.trimBodyAbove?.(n[0]),this.joinBlockLines(n)}claimBodyLines(e,t){if(!Qg(e)){for(let i=1;i<e.lines.length;i++)this.consumedDescriptionLines.add(e.lines[i].number);return}let n=e.lines[e.lines.length-1].number;this.trimThisBody=(i)=>t(n-i+1)}getTagDescription(e,t,n=!1){let i=Ne(Ii(e)),r=t!==void 0&&Yg.has(t.tag)&&!Ne(Ii(t.lines)),s=n&&(t===void 0||!Os.has(t.tag)),a=[];for(let o=1;o<e.length;o++){let l=e[o];if((r||s)&&!this.indentedContinuationLines.has(l.number))continue;if(!this.lineDescriptions.get(l.number)?.trim()||this.consumedDescriptionLines.has(l.number))continue;a.push(l.number),this.consumedDescriptionLines.add(l.number)}if(a.length===0)return i;return this.joinBlockLines(a,{text:i??"",line:e[cr(e)].number})}flagDescriptionAfterEvent(e,t,n,i){if(this.eventName===void 0||this.eventDescription)return;if(this.eventTagLine!==void 0&&this.indentedContinuationLines.has(this.eventTagLine+1))return;if(i?.tag!=="event"&&!Os.has(i?.tag??""))return;if(Ne(Ii(n)))return;let r=t?`@${e} "${t}"`:`@${e}`;P(this.ctx,"event-description-ambiguous",this.eventName,`Text after @event "${this.eventName}" was used as the description of ${r}. Move it above the tag it describes, indent it as a continuation line, or give each event its own comment block.`,ie(this.ctx,n))}takePrecedingDescription(e){let{tag:t,name:n,lines:i}=this.tags[e],r=this.getPrecedingDescription(i);if(r)this.flagDescriptionAfterEvent(t,n,i,this.tags[e-1]);return r}finalizeEvent(){if(this.eventName===void 0)return;let{ctx:e}=this,n=(this.eventType&&this.eventType!=="object"&&this.eventType!=="Object"?this.eventType:void 0)??(this.eventProperties.length>0?Jt(this.eventProperties,!0):this.eventType||""),i=this.eventTagLine;if(i!==void 0){let s=this.tags.find((o)=>{let l=o.lines[0]?.number;return l!==void 0&&l>i&&!Os.has(o.tag)})?.lines[0].number,a=Array.from(this.lineDescriptions.keys()).sort((o,l)=>o-l).filter((o)=>o>i&&(s===void 0||o<s)&&!this.consumedDescriptionLines.has(o)&&this.lineDescriptions.get(o)?.trim());for(let o of a)this.consumedDescriptionLines.add(o);if(a.length>0)this.eventDescription=this.joinBlockLines(a,this.eventDescription?{text:this.eventDescription,line:i}:void 0)}let r=n===""&&(!e.events.has(this.eventName)||e.untypedJsDocEventNames.has(this.eventName));if(Ge(e,{name:this.eventName,detail:n,has_argument:!1,description:this.eventDescription,deprecated:this.eventDeprecated,tags:this.eventTags.length>0?this.eventTags:void 0,internal:this.eventInternal||void 0,source:this.eventSource}),r)e.untypedJsDocEventNames.add(this.eventName);e.eventDescriptions.set(this.eventName,this.eventDescription),e.jsDocEventNames.add(this.eventName),e.jsDocEventSources.set(this.eventName,this.eventSource),Te(e,"event-no-source",this.eventName,this.eventIgnores),this.eventProperties.length=0,this.eventName=void 0,this.eventType=void 0,this.eventDescription=void 0,this.eventDeprecated=void 0,this.eventInternal=!1,this.eventSource=void 0,this.eventTagLine=void 0,this.eventTags=[],this.eventIgnores=[]}finalizeTypedef(){if(this.typedefName===void 0)return;let{ctx:e}=this,t=this.typedefProperties.length>0,n=t?Jt(this.typedefProperties,!0):this.typedefType||"{}",i=!t&&this.typedefType&&nx(n)?`interface ${this.typedefName} ${n}`:`type ${this.typedefName} = ${n};`,r=t?this.typedefProperties.filter(({name:s})=>!s.includes(".")&&!s.startsWith("[")).map(({name:s,type:a,optional:o,description:l})=>({name:s,type:a,optional:o===!0,...l?{description:l}:{}})):$e(n);if(r)e.typedefMembersByName.set(this.typedefName,r);qc(e,{name:this.typedefName,type:n,ts:i,description:this.typedefDescription,tags:this.typedefTags,internal:this.typedefInternal,source:this.typedefSource}),this.typedefProperties.length=0,this.typedefName=void 0,this.typedefType=void 0,this.typedefDescription=void 0,this.typedefSource=void 0,this.typedefTags=[],this.typedefInternal=!1}finalizeCallback(){if(this.callbackName===void 0)return;let e=`(${Ee(this.callbackParams)}) => ${this.callbackReturnType||"void"}`;qc(this.ctx,{name:this.callbackName,type:e,ts:`type ${this.callbackName} = ${e};`,description:this.callbackDescription,tags:this.callbackTags,internal:this.callbackInternal,source:this.callbackSource}),this.callbackParams.length=0,this.callbackReturnType=void 0,this.callbackName=void 0,this.callbackDescription=void 0,this.callbackSource=void 0,this.callbackTags=[],this.callbackInternal=!1}readExtends(e,t){let{name:n,lines:i}=this.tags[e];if(this.ctx.extends!==void 0)P(this.ctx,"extend-props-duplicate",n,`A second @extends/@extendProps tag ("${n}") overwrote the first ("${this.ctx.extends.interface}"); only one is used.`,ie(this.ctx,i));this.ctx.extends={interface:n,import:t},this.isFirstTag=!1}readRestProps(e,t){let{name:n,description:i}=this.tags[e],r=n?i?`${n} ${i}`:n:i,s=Ne(r),a=this.orCommentDescription(s||this.takePrecedingDescription(e)),o={type:"Element",name:t,description:a||void 0};if(this.ctx.rest_props=o,s)this.claimBodyLines(this.tags[e],(l)=>{o.description=Ne(js(r,l))||void 0});this.isFirstTag=!1}readSlot(e,t){let{tag:n,name:i,lines:r}=this.tags[e],s=i==="-"||n==="snippet"&&i==="children"?void 0:i,a=this.orCommentDescription(this.getTagDescription(r,this.tags[e+1]));if(!a&&this.pendingTags.length===0)a=this.takePrecedingDescription(e);this.isFirstTag=!1;let o=t||"Record<string, never>",l=ie(this.ctx,r);if(!t)P(this.ctx,"slot-missing-type",s||"default",`@${n}${s?` "${s}"`:""} is missing a required {Type} annotation; falling back to "${o}".`,l);let p=this.pendingTags.splice(0),c=Et(s);this.ctx.jsDocSlots.set(c,{tag:n,source:l}),Kt(this.ctx,{slot_name:s,slot_props:o,slot_description:a||void 0,slot_deprecated:this.pendingDeprecated,slot_tags:p.length>0?p:void 0,slot_internal:this.pendingInternal||void 0,source:l}),this.pendingDeprecated=void 0,this.pendingInternal=!1,this.attachTrailingTag=(d)=>{let f=this.ctx.slots.get(c);if(f)f.tags=[...f.tags??[],d]}}readEvent(e,t){let{name:n,lines:i}=this.tags[e],r=Ne(Ii(i))||this.takePrecedingDescription(e);this.finalizeEvent(),this.eventName=n,this.eventType=t,this.eventTagLine=i.length>0?i[0].number:void 0,this.eventDescription=this.orCommentDescription(r),this.eventSource=ie(this.ctx,i),this.eventTags.push(...this.pendingTags.splice(0)),this.attachTrailingTag=(s)=>this.eventTags.push(s),this.isFirstTag=!1}readProperty(e,t){let{name:n,optional:i,default:r,lines:s}=this.tags[e],a={name:n,type:t,description:this.getTagDescription(s,this.tags[e+1],this.eventName!==void 0),optional:i||!1,default:r};if(this.eventName!==void 0)Vc(this.ctx,this.eventProperties,a,this.eventName,ie(this.ctx,s));else if(this.typedefName!==void 0&&ox(this.typedefType))Vc(this.ctx,this.typedefProperties,a,this.typedefName,ie(this.ctx,s))}readTypedef(e,t){let{name:n,lines:i}=this.tags[e];this.finalizeTypedef(),this.typedefName=this.typeDeclarationName(n),this.typedefType=t,this.typedefSource=ie(this.ctx,i),this.typedefDescription=this.orCommentDescription(this.getTagDescription(i,this.tags[e+1])||this.takePrecedingDescription(e)),this.typedefTags.push(...this.pendingTags.splice(0)),this.typedefInternal=this.pendingInternal,this.pendingInternal=!1,this.attachTrailingTag=(r)=>this.typedefTags.push(r),this.isFirstTag=!1}readCallback(e){let{name:t,lines:n}=this.tags[e];this.finalizeCallback(),this.callbackName=this.typeDeclarationName(t),this.callbackSource=ie(this.ctx,n),this.callbackDescription=this.orCommentDescription(this.getTagDescription(n,this.tags[e+1])||this.takePrecedingDescription(e)),this.callbackTags.push(...this.pendingTags.splice(0)),this.callbackInternal=this.pendingInternal,this.pendingInternal=!1,this.attachTrailingTag=(i)=>this.callbackTags.push(i),this.isFirstTag=!1}readGenerics(e,t){let{name:n,lines:i}=this.tags[e],r=ie(this.ctx,i);for(let s of G(n,","))jc(this.ctx,this.generics,s.trim(),r);this.generics.usedGenericsTag=!0,Oc(this.ctx,this.generics),Fc(this.ctx,n,t||n),this.isFirstTag=!1}readTemplate(e,t){let{tags:n}=this,i=hr(n[e],t),r=e+1;while(n[r]?.tag==="template")r++;let s=n[r];if((s?.tag==="typedef"||s?.tag==="callback")&&!s.name.includes("<")&&sx(n,r,i)){this.pendingTypeParameters.push(...i.map(({constraint:o})=>o));return}if(this.hasSlotOrSnippetTag&&!this.hasExtendsTag){this.ctx.deferredSlotBlockGenerics.push(...i);return}if(this.documentsFunction)return;let a=ie(this.ctx,n[e].lines);for(let o of i)jc(this.ctx,this.generics,o.name,a),Fc(this.ctx,o.name,o.constraint);this.generics.usedTemplateTag=!0,Oc(this.ctx,this.generics),this.isFirstTag=!1}readDeprecated(e){let{text:t}=this.tags[e],n=this.eventName!==void 0;if(n?this.eventDeprecated!==void 0:this.pendingDeprecated!==void 0)return;let i=(r)=>{if(n)this.eventDeprecated=r;else this.pendingDeprecated=r};i($n(t)),this.claimBodyLines(this.tags[e],(r)=>{i($n(js(t,r)))})}readPassthrough(e){let{tag:t,text:n,lines:i}=this.tags[e],r={name:t,body:n};if(this.claimBodyLines(this.tags[e],(s)=>{r.body=js(n,s)}),!Nn.has(t)&&!ur.has(t)){let s=Zg.has(t)?void 0:Rc(t,ex,t.length<=4?1:2);P(this.ctx,"jsdoc-unknown-tag",t,s?`Unknown JSDoc tag "@${t}"; did you mean "@${s}"? Passed through unchanged.`:`Unknown JSDoc tag "@${t}"; passed through unchanged. If this is a typo, fix the tag name.`,ie(this.ctx,i))}if(this.attachTrailingTag)this.attachTrailingTag(r);else this.pendingTags.push(r)}read(){let{tags:e}=this;for(let n=0;n<e.length;n++){let{tag:i,type:r,name:s,optional:a}=e[n],o=He(r);switch(this.trimBodyAbove=this.trimThisBody,this.trimThisBody=void 0,i){case"extends":case"extendProps":this.readExtends(n,o);break;case"restProps":this.readRestProps(n,o);break;case"slot":case"snippet":this.readSlot(n,o);break;case"csspart":{let l=this.getTagDescription(e[n].lines,e[n+1]);this.ctx.cssParts.push({name:s,...l?{description:l}:{}});break}case"cssprop":case"cssproperty":{let l=this.getTagDescription(e[n].lines,e[n+1]),p=e[n].default;this.ctx.cssProperties.push({name:s,...o?{type:o}:{},...p===void 0?{}:{default:p},...l?{description:l}:{}});break}case"event":this.readEvent(n,o);break;case"type":if(this.eventName!==void 0)this.eventType=o;break;case"param":if(this.callbackName!==void 0)this.callbackParams.push({name:s,type:o,optional:a||!1});break;case"returns":case"return":if(this.callbackName!==void 0)this.callbackReturnType=o;break;case"property":this.readProperty(n,o);break;case"typedef":this.readTypedef(n,o);break;case"callback":this.readCallback(n);break;case"generics":this.readGenerics(n,o);break;case"template":this.readTemplate(n,o);break;case"deprecated":this.readDeprecated(n);break;case"ignore":case"internal":if(this.eventName===void 0)this.pendingInternal=!0;else this.eventInternal=!0;break;case"sveld-ignore":if(this.eventName!==void 0)this.eventIgnores.push(s);break;case"enum":case"class":case"implements":case"this":case"namespace":case"memberof":case"module":case"file":case"overview":break;default:this.readPassthrough(n);break}if(Mc.has(i))this.finalizeEvent()}if(this.finalizeEvent(),this.finalizeTypedef(),this.finalizeCallback(),this.pendingTags.length===0)return;if(!e.some((n)=>n.tag==="event"||Mc.has(n.tag)))return;for(let n of this.pendingTags)P(this.ctx,"jsdoc-tag-dropped",n.name,`@${n.name} could not attach to a @slot/@snippet/@event/@typedef/@callback tag in the same comment block and was dropped.`)}}function Wc(e,t=e.source){if(!t)return;let n={usedGenericsTag:!1,usedTemplateTag:!1,warnedMixedGenericsTags:!1,seenGenericNames:new Set},i=t.includes("@template")?Lo(e):new Set;e.functionDocCommentStarts=i;let r=Pn(t);for(let s of r)e.jsDocBlocksByStart.set(s.start,s);for(let s of r)new Hc(e,n,s,i.has(s.start)).read()}var Gc=new Set(["$state","$derived","$effect","$props","$bindable","$inspect","$host"]),ax=Array.from(Gc);function zc(e){return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e===95||e===36}function lx(e){if(e.includes("\\u"))return!0;for(let t of ax){let n=e.indexOf(t);while(n!==-1){if(!zc(e.charCodeAt(n-1))&&!zc(e.charCodeAt(n+t.length)))return!0;n=e.indexOf(t,n+1)}}return!1}function px(e,t){for(let n=t.length-1;n>=0;n-=1)if(t[n]?.has(e))return!0;return!1}function cx(e){let t=new Set;switch(e.type){case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":if(e.type!=="ArrowFunctionExpression"&&e.id)t.add(e.id.name);for(let n of e.params)B(n,t);break;case"BlockStatement":Ri(e.body,t);break;case"CatchClause":B(e.param,t);break;case"EachBlock":if(B(e.context,t),e.index)t.add(e.index);break;case"AwaitBlock":B(e.value,t),B(e.error,t);break}return t}function Ri(e,t){for(let n of e??[])switch(n.type){case"ImportDeclaration":for(let i of n.specifiers)t.add(i.local.name);break;case"VariableDeclaration":for(let i of n.declarations)B(i.id,t);break;case"FunctionDeclaration":case"ClassDeclaration":if(n.id?.name)t.add(n.id.name);break;case"ExportNamedDeclaration":if(n.declaration)Ri([n.declaration],t);break}}function Fs(e,t){if(!e)return!1;let n=[...t],i=!1;return J(e,{enter(r,s){if(Mn(r.type))return ee;if(Tt(r))n.push(cx(r));if(r.type==="Identifier"&&Gc.has(r.name)&&Yi(r,s)&&!px(r.name,n))return i=!0,Mt},leave(r){if(Tt(r))n.pop()}}),i}function Uc(e){if(e.runesOptionOverride!==void 0)return e.runesOptionOverride?"runes":"legacy";let t=e.parsed;if(!t)return"legacy";if(e.source!==void 0&&!lx(e.source))return"legacy";let n=new Set;Ri(t.module?.content.body,n);let i=new Set;return Ri(t.instance?.content.body,i),Fs(t.module,[n])||Fs(t.instance,[n,i])||Fs(t.fragment,[n,i])?"runes":"legacy"}var ux=new Set(["TSAsExpression","TSSatisfiesExpression","TSNonNullExpression","TSTypeAssertion","TSInstantiationExpression"]);function Mi(e){if(!e)return;J(e,{enter(t){if(ux.has(t.type)&&"expression"in t&&t.expression)return t.expression}})}var dx=/\/\/(?<!^[ \t]*\*.*\/\/)\s*@ts-[^\n\r]*/gm;function fx(e){if(!e.includes("@ts-"))return e;let t=e.charCodeAt(0)===65279?1:0,{instance:n,module:i}=yi(e),r=[n,i].flatMap((o)=>o?[o.content]:[]).sort((o,l)=>o.start-l.start),s="",a=0;for(let{start:o,end:l}of r)s+=e.slice(a,o+t),s+=e.slice(o+t,l+t).replace(dx,""),a=l+t;return s+e.slice(a)}function Jc(e,t,n){e.componentFilePath=n;let i=fx(t);e.source=i;let r=Ic(i);if(La(e,r),e.parsed=r,e.scriptLanguage==="ts")Mi(r.module),Mi(r.instance),Mi(r.fragment);e.syntaxMode=Uc(e);let s=r.css,a=s?i.slice(0,s.start)+" ".repeat(s.end-s.start)+i.slice(s.end):i;xr(e,r.module),xr(e,r.instance),Wc(e,a)}class qs{ctx=tr();cleanup(){this.ctx=tr()}parseSvelteComponent(e,t){let{component:n,pending:i}=this.parse(e,t);if(i)n[Pe]={...n[Pe]??{canonicalPropNames:[],localTypeDeclarations:[],typeImportStatements:[]},...i};return n}parse(e,t){this.cleanup();let n=this.ctx;Jc(n,e,t.filePath),_c(n);let i=ja(n);return kc(n,i)}}var hx=/\.$/,Vs="resolving it needs file access (generateBundle or the CLI)";function mx(e,t={}){let n=e[Pe];if(!n)return e;let{pendingCallDefaultCandidates:i,pendingConstDefaultCandidates:r,pendingContextKeyCandidates:s,pendingDispatchEscapeCandidates:a,deferredEventNoSourceDiagnostics:o,untypedJsDocEventNames:l,...p}=n,c=(i??[]).filter((v)=>v.importSource!==void 0);if(c.length===0&&!r&&!s&&!a&&!o)return e;let d=e.filePath,f=t.filePath??(typeof d==="string"?d:""),h=[],m=(v,ye,Ae,Ze)=>{h.push(wn({component:f,kind:"cross-file-unresolved",name:v,message:ye,...Ae?{source:Ae}:{},...Ze?{ignored:Ze}:{}}))},y=(v,ye)=>(v==="props"?e.props:e.moduleExports).find((Ae)=>Ae.name===ye)?.source,g=(v)=>v==="props"?"Prop":"Module export";for(let v of s??[]){let ye=Vt(v);m(ye,`setContext key \`${ye}\` is imported from "${v.importSource}"; ${Vs}, so the context is omitted.`,v.source)}for(let v of r??[])m(v.propName,`${g(v.location)} "${v.propName}" defaults to \`${Vt(v)}\` imported from "${v.importSource}"; ${Vs}, so the default shows the identifier and its type isn't read.`,y(v.location,v.propName));for(let v of c)m(v.propName,`${g(v.location)} "${v.propName}" defaults to \`${v.calleeName}()\` imported from "${v.importSource}"; ${Vs}, so its return type isn't read and the prop falls back to "any".`,y(v.location,v.propName));for(let v of a??[])m(v.calleeText,`\`${v.dispatcherName}\` is passed to \`${v.calleeText}\`, imported from "${v.importSource}"; reading the events it dispatches needs file access (generateBundle or the CLI), so they're omitted.`,v.source,v.ignored);let N=Array.from(new Set((a??[]).map((v)=>`\`${v.calleeText}\``))).join(", "),S=(o??[]).map((v)=>N?{...v,message:`${v.message.replace(hx,"")} in this file; ${N} may dispatch it, but imported helpers aren't read without file access.`}:v),w={...e,diagnostics:[...e.diagnostics??[],...S,...h]};return w[Pe]=p,w}var Xc="sveld",Yc="0.38.2";var Hs="5.57.1";var Qc=1;function Qe(e){return e.some((t)=>t.internal)?e.filter((t)=>!t.internal):e}function gx(e){return{...e,props:Qe(e.props),moduleExports:Qe(e.moduleExports),slots:Qe(e.slots),events:Qe(e.events),typedefs:Qe(e.typedefs),...e.contexts?{contexts:Qe(e.contexts).map((t)=>({...t,properties:Qe(t.properties)}))}:{}}}function Ws(e,t={}){let n=Array.from(e.values(),(s)=>{let{diagnostics:a,...o}=s;return gx(o)}).sort((s,a)=>_e(s.moduleName,a.moduleName)),i={schemaVersion:Qc,generator:{name:Xc,version:Yc,svelteVersion:Hs},total:n.length,components:n},r=t.entryExports?Qe(t.entryExports):void 0;if(r&&r.length>0)i.totalExports=r.length,i.exports=r;return i}var xx=" ",bx=120,vx=/\binterface\s+[A-Za-z_$][\w$]*(\s*<[^{};]*>)?\s*$/,Tx=200,nu=/\s/,Sx=/\s{2}|[^\S ]/,Ex=/["'`{}/]/g,Cx=/["'`{};/]/g,iu=9,zs=10,kx=13,mn=32,Oi=34,wx=38,ji=39,Ax=40,Px=41,Bi=42,Zc=46,Us=47,ru=59,Dx=62,Nx=91,Js=92,$x=93,Fi=96,Ks=123,Lx=124,Xs=125;function _x(e){return vx.test(Rx(e,Tx))}var eu=[""];function Ix(e){let t=eu[e];if(t===void 0)t=xx.repeat(e),eu[e]=t;return t}function Rx(e,t){let n="";for(let i=e.length-1;i>=0&&n.length<t;i--)n=e[i]+n;return n.length>t?n.slice(-t):n}function Mx(e){if(e.length===0)return!1;let t=e[e.length-1];return t.charCodeAt(t.length-1)===zs}function Bx(e){while(e.length>0){let t=e[e.length-1],n=t.length;while(n>0){let i=t.charCodeAt(n-1);if(i!==mn&&i!==iu)break;n--}if(n===t.length)return;if(n===0){e.pop();continue}e[e.length-1]=t.slice(0,n);return}}function Ox(e){while(e.length>0){let t=e[e.length-1];if(!nu.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 jx(e){if(e.includes("{"))return!1;let t=0,n=0;for(let i=0;i<e.length;i++){let r=e.charCodeAt(i);if(t!==0){if(r===t&&e.charCodeAt(i-1)!==Js)t=0;continue}if(r===Oi||r===ji||r===Fi){t=r;continue}if(r===ru&&++n>=2)return!0}return!1}function Fx(e){if(!Sx.test(e))return e.trimEnd();let t="",n=null,i=!1;for(let r=0;r<e.length;r++){let s=e[r],a=e[r-1];if(n){if(t+=s,n==="double"&&s==='"'&&a!=="\\"||n==="single"&&s==="'"&&a!=="\\"||n==="template"&&s==="`"&&a!=="\\")n=null;i=!1;continue}if(s==='"'||s==="'"||s==="`"){n=s==='"'?"double":s==="'"?"single":"template",t+=s,i=!1;continue}if(nu.test(s)){if(!i&&t.length>0)t+=" ",i=!0;continue}t+=s,i=!1}return t.trimEnd()}function su(e,t){let n=e[t],i=e.indexOf(n,t+1);while(i!==-1&&e.charCodeAt(i-1)===Js)i=e.indexOf(n,i+1);return i}function ou(e,t){let n=e.indexOf("*/",t+1);return n===-1?-1:n+1}function qx(e){let t=new Map,n=[],i=Ex,r=0;while(r<e.length){if(i.lastIndex=r,!i.test(e))break;r=i.lastIndex-1;let s=e.charCodeAt(r);if(s===Us){if(e.charCodeAt(r+1)===Bi){let a=ou(e,r);if(a===-1)break;r=a}}else if(s===Oi||s===ji||s===Fi){let a=su(e,r);if(a===-1)break;r=a}else if(s===Ks)n.push(r);else if(s===Xs&&n.length>0)t.set(n.pop(),r);r++}return t}function Vx(e,t,n){for(let i=t;i<n;i++)if(!Gs(e.charCodeAt(i)))return!1;return!0}function Gs(e){if(e<=mn)return e===mn||e>=iu&&e<=kx;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 au(e,t,n,i){let r=[],s=Cx,a=t,o=t;while(o<n){if(s.lastIndex=o,!s.test(e))break;if(o=s.lastIndex-1,o>=n)break;let l=e.charCodeAt(o);if(l===Us){if(e.charCodeAt(o+1)===Bi){let p=ou(e,o);if(p===-1)break;o=p}o++;continue}if(l===Oi||l===ji||l===Fi){let p=su(e,o);if(p===-1)break;o=p+1;continue}if(l===Ks){let p=i.get(o);if(p===void 0||p>=n){o++;continue}if(a<o)r.push(e.slice(a,o));let c=o+1;if(Vx(e,c,p)){r.push("{}"),o=p+1,a=o;continue}let d=e.slice(c,p),f=e.charCodeAt(c)===zs;if(!f&&!d.includes("/*")&&!jx(d)&&!_x(r)){let h=au(e,c,p,i),m=h.trim();if(!m.includes(`
|
|
54
|
+
`)){let y=m.endsWith(";")?m.slice(0,-1):m,g=`{ ${Fx(y)} }`;if(g.length<=bx){r.push(g),o=p+1,a=o;continue}}if(r.push("{"),h.charCodeAt(0)!==ru)r.push(`
|
|
55
|
+
`);if(h.length>0)r.push(h);o=p,a=p;continue}if(r.push("{"),!f)r.push(`
|
|
56
|
+
`);o=c,a=c;continue}if(l===Xs){if(a<o)r.push(e.slice(a,o));if(Bx(r),!Mx(r))r.push(`
|
|
57
|
+
`);r.push("}"),o++,a=o;continue}if(a<o)r.push(e.slice(a,o));if(Ox(r),r.push(";"),e.charCodeAt(o+1)!==zs)r.push(`
|
|
58
|
+
`);o++,a=o}if(a<n)r.push(e.slice(a,n));return r.join("")}function Hx(e){if(!e.includes(" "))return e;let t="",n=0;for(let i=0;i<e.length;i++){let r=e.charCodeAt(i);if(n!==0){if(t+=e[i],r===n&&e.charCodeAt(i-1)!==Js)n=0;continue}if(r===Oi||r===ji||r===Fi){n=r,t+=e[i];continue}if(r===mn&&t.charCodeAt(t.length-1)===mn)continue;t+=e[i]}return t}function Wx(e){return e===Xs||e===$x||e===Px||e===Dx}function zx(e,t,n){return n-t>=3&&e.charCodeAt(t)===Us&&e.charCodeAt(t+1)===Bi&&e.charCodeAt(t+2)===Bi}function tu(e,t,n){let i=e.indexOf("*/",t);return i!==-1&&i+2<=n}function Gx(e,t,n){let i=e.charCodeAt(t);if(i===Lx||i===wx)return!0;return i===Zc&&t+1<n&&e.charCodeAt(t+1)!==Zc}function Ux(e){let t=[],n=[],i=e.length,r=0,s=!1,a=0,o=0;while(o<=i){let c=e.indexOf(`
|
|
59
|
+
`,o);if(c===-1)c=i;let d=c+1,f=o,h=c;while(f<h&&Gs(e.charCodeAt(f)))f++;while(h>f&&Gs(e.charCodeAt(h-1)))h--;if(f===h){let S=n.length>0?n[n.length-1]:void 0;if(S!==void 0&&S!==""){let w=S.charCodeAt(S.length-1);if(w!==Ks&&w!==Ax&&w!==Nx)t.push(0),n.push("")}o=d;continue}if(s){if(t.push(a),n.push(` ${e.slice(f,h)}`),tu(e,f,h))s=!1;o=d;continue}let m=zx(e,f,h),y=m&&tu(e,f,h);if(m&&!y){t.push(r),n.push(e.slice(f,h)),s=!0,a=r,o=d;continue}let g=Wx(e.charCodeAt(f)),N=Math.max(0,r-(g?1:0))+(Gx(e,f,h)?1:0);if(g&&N===0&&n.length>0&&n[n.length-1]==="")t.pop(),n.pop();if(t.push(N),n.push(Hx(e.slice(f,h))),o=d,y)continue;r=xt(e,void 0,f,h,r)}let l=n.length;while(l>0&&n[l-1]==="")l--;let p=[];for(let c=0;c<l;c++){if(c>0)p.push(`
|
|
60
|
+
`);let d=t[c];if(d>0)p.push(Ix(d));p.push(n[c])}return p.join("")}function lu(e){return`${Ux(au(e,0,e.length,qx(e)))}
|
|
61
|
+
`}var Ce="any",ke="",Jx="Record<string, any>",yn="Record<string, never>",hu=/^[A-Za-z_$][A-Za-z0-9_$]*$/,Kx=/CustomEvent/,Xx=/^[A-Z]/,Yx=/\n/,mu=/=>/,Qx=/(?:^|\n)@default\b/,Qs=/\n/g,Zx=/^([ \t]*\*) +$/gm,eb=/\s+/g,$t=/(^|[^.\w])Snippet(?:\s*<|\b)/,tb=/import\s+type\s+[^;]*\bSnippet\b[^;]*from\s+"svelte";/,nb=/[.*+?^${}()|[\]\\]/g,ib=/^const\s+/,rb=/^export /,sb=/[^\w$]/g;function yu(e){return e.replace(ib,"")}function ob(e){if(!e)return;return e.replace(Qs,`
|
|
62
|
+
* `)}function Zs(e){if(!e)return"";return`/** ${Le(e)} */`}function eo(e){if(!e)return"";return`/**
|
|
63
|
+
* ${Le(e).replace(Qs,`
|
|
63
64
|
* `)}
|
|
64
|
-
*/`}function
|
|
65
|
+
*/`}function gu(e){return e?.includes(`
|
|
66
|
+
`)?eo(e):Zs(e)}function xu(e){if(e===void 0)return;return e===!0?"@deprecated":`@deprecated ${e}`}function ab(e){let t=xu(e);if(t===void 0)return;return`* ${t.replace(Qs,`
|
|
65
67
|
* `)}
|
|
66
|
-
`}function
|
|
68
|
+
`}function lb(e,t){if(!t)return[`@${e}`];if(!t.includes(`
|
|
67
69
|
`))return[`@${e} ${t}`];return[`@${e}`,...t.split(`
|
|
68
|
-
`)]}function
|
|
69
|
-
`)
|
|
70
|
-
`));if(a.push(...i),r)a.push(...r.split(`
|
|
70
|
+
`)]}function to(e){let t=[];for(let{name:n,body:i}of e??[])t.push(...lb(n,i));return t}function no(e,t,n){let i=xu(n),r=to(t);if(!(r.length>0)&&!i)return gu(e);let a=[];if(e)a.push(...e.split(`
|
|
71
|
+
`));if(a.push(...r),i)a.push(...i.split(`
|
|
71
72
|
`));return`/**
|
|
72
|
-
* ${
|
|
73
|
+
* ${Le(a.join(`
|
|
73
74
|
* `))}
|
|
74
|
-
*/`}function
|
|
75
|
-
`).join("")}function
|
|
76
|
-
`}function
|
|
77
|
-
`:"";else{let
|
|
78
|
-
`),...
|
|
79
|
-
* ${
|
|
75
|
+
*/`}function pb(e){let t=to(e);if(t.length===0)return"";return t.map((n)=>`* ${n}
|
|
76
|
+
`).join("")}function qi(e){if(e===void 0)return Ce;return`${e}
|
|
77
|
+
`}function Vi(e){if(e.typedefs.length===0)return ke;return e.typedefs.map((t)=>{let n,i=to(t.tags);if(i.length===0)n=t.description?`${eo(t.description)}
|
|
78
|
+
`:"";else{let r=t.description?[...t.description.split(`
|
|
79
|
+
`),...i]:i;n=`/**
|
|
80
|
+
* ${Le(r.join(`
|
|
80
81
|
* `))}
|
|
81
82
|
*/
|
|
82
|
-
`}return`${n}export ${t.ts}`.replace(
|
|
83
|
-
|
|
84
|
-
`)}var
|
|
85
|
-
`:"",
|
|
86
|
-
`),i=
|
|
87
|
-
`:"",
|
|
88
|
-
|
|
83
|
+
`}return`${n}export ${t.ts}`.replace(Zx,"$1")}).join(`
|
|
84
|
+
|
|
85
|
+
`)}var pu=new Map;function cb(e,t){let n=pu.get(t);if(n===void 0){let i=t.replace(nb,"\\$&");n=new RegExp(`\\b${i}\\b`),pu.set(t,n)}return n.test(e)}var cu,uu=[];function bu(e){if(e!==cu)cu=e,uu=G(e,",");return uu}function ub(e){if(e===null)return[];return e[0].split(",").map((t,n)=>({name:t.trim(),constraint:(bu(e[1]??"")[n]??t).trim()}))}function vu(e,t){let n=ub(e).filter(({name:i})=>cb(t,i));if(n.length===0)return{declSuffix:ke,refSuffix:ke};return{declSuffix:`<${n.map(({constraint:i})=>yu(i)).join(", ")}>`,refSuffix:`<${n.map(({name:i})=>i).join(", ")}>`}}function Tu(e){if(!e.contexts||e.contexts.length===0)return ke;return e.contexts.map((t)=>{let n=t.properties.map((a)=>{let o=a.description?`${Zs(a.description)}
|
|
86
|
+
`:"",l=a.optional?"?":"";return`${o}${a.name}${l}: ${a.type};`}).join(`
|
|
87
|
+
`),i=t.description?`${eo(t.description)}
|
|
88
|
+
`:"",{declSuffix:r}=vu(e.generics,[t.type??"",...t.properties.map((a)=>a.type)].join(`
|
|
89
|
+
`));if(t.type!==void 0)return`${i}export type ${t.typeName}${r} = ${t.type};`;if(t.properties.length===0)return`${i}export type ${t.typeName} = ${t.hasUnresolvedSpread?"Record<string, any>":yn};`;let s=t.hasUnresolvedSpread?" & Record<string, any>":"";return`${i}export type ${t.typeName}${r} = {
|
|
90
|
+
${n}
|
|
89
91
|
}${s};`}).join(`
|
|
90
92
|
|
|
91
|
-
`)}function
|
|
92
|
-
`}function
|
|
93
|
-
${
|
|
94
|
-
|
|
95
|
-
${
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
${
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
93
|
+
`)}function we(e){return hu.test(e)?e:JSON.stringify(e)}function Su(e,t){if(!e)return;return`* ${t||e}
|
|
94
|
+
`}function Lt(e,t,n){return[Su(ob(e)),ab(t),pb(n)].filter(Boolean).join("")}function dt(e){return e.length>0?`/**
|
|
95
|
+
${Le(e)}*/`:ke}function du(e,t){let n=no(t.description,t.tags,t.deprecated),i=n?`${n}
|
|
96
|
+
`:"",r=!t.slot_props||t.slot_props===yn?"[]":fb(t.slot_props),s=r==="[]"?"(this: void) => void":`(this: void, ...args: ${r}) => void`;return`
|
|
97
|
+
${i}${e}?: ${s};`}function db(e){let t=e.props.filter((f)=>!f.isFunctionDeclaration&&f.kind!=="const"),n=new Set([...t.map((f)=>f.name),...Array.from(e.canonicalPropNames??[])]),r=(e.canonicalPropsType?t.filter((f)=>!e.canonicalPropNames?.has(f.name)):t).map((f)=>{let h=typeof f.value==="string"?f.value.replace(eb," "):f.value,m=Qx.test(f.description??"")||f.value===void 0||f.value==="undefined",y=[Lt(f.description,f.deprecated,f.tags),Su(f.constant,"@constant"),m?null:`* @default ${h}
|
|
98
|
+
`].filter(Boolean).join(""),g=f.constant&&!f.isFunction?f.value:f.type||Ce;return`
|
|
99
|
+
${dt(y)}
|
|
100
|
+
${we(f.name)}${f.isRequired?"":"?"}: ${g};`});for(let f of e.slots)if(!f.default&&f.name!=null&&!n.has(f.name))r.push(du(we(f.name),f));let s=e.slots.find((f)=>f.default||f.name===null);if(s&&!n.has("children"))r.push(du("children",s));let a=r.join(`
|
|
101
|
+
`),o=Nb(e.moduleName),l=e.generics?`<${bu(e.generics[1]).map((f)=>yu(f.trim())).join(", ")}>`:"",p=e.generics?`<${e.generics[0]}>`:"",c=e.extends===void 0?"":`Omit<${e.extends.interface}, keyof $Props${p}> & `;if(e.rest_props?.type==="Element"){let{name:f,thisValue:h,description:m}=e.rest_props,y;if(f!=="svelte:element")y=f.split("|").map((v)=>`SvelteHTMLElements["${v.trim()}"]`).join(" & ");else if(h)y=`SvelteHTMLElements["${h}"]`;else y="HTMLAttributes<HTMLElement>";let g="[key: `data-${string}`]: unknown;",N=m?`${gu(m)}
|
|
102
|
+
`:"",S=e.canonicalPropsType?`type $Props${l} = (${e.canonicalPropsType}) & {${a}
|
|
103
|
+
|
|
104
|
+
${g}
|
|
105
|
+
};`:`type $Props${l} = {
|
|
106
|
+
${a}
|
|
107
|
+
|
|
108
|
+
${g}
|
|
109
|
+
};`,w=e.extends===void 0?`keyof $Props${p}`:`keyof ($Props${p} & ${e.extends.interface})`;return{props_name:o,prop_def:`
|
|
110
|
+
${N}type $RestProps = ${y};
|
|
111
|
+
|
|
112
|
+
${S}
|
|
113
|
+
|
|
114
|
+
export type ${o}${l} = Omit<$RestProps, ${w}> & ${c}$Props${p};
|
|
115
|
+
`}}let d;if(e.canonicalPropsType)d=`
|
|
116
|
+
${`
|
|
117
|
+
type $Props${l} = ${e.canonicalPropsType}${a.trim()===""?"":` & {${a}
|
|
103
118
|
}`};
|
|
119
|
+
`}
|
|
120
|
+
export type ${o}${l} = ${c}$Props${p};
|
|
121
|
+
`;else if(e.extends===void 0)d=a.trim()===""?`
|
|
122
|
+
export type ${o}${l} = ${yn};
|
|
104
123
|
`:`
|
|
105
|
-
type $
|
|
106
|
-
${
|
|
124
|
+
export type ${o}${l} = {
|
|
125
|
+
${a}
|
|
107
126
|
};
|
|
108
|
-
`;if(e.rest_props?.type==="Element"){let m;if(e.rest_props.name==="svelte:element")if(e.rest_props.thisValue)m=`SvelteHTMLElements["${e.rest_props.thisValue}"]`;else m="HTMLAttributes<HTMLElement>";else m=e.rest_props.name.split("|").map((S)=>`SvelteHTMLElements["${S.trim()}"]`).join(" & ");let y="[key: `data-${string}`]: unknown;",T=e.rest_props.description?e.rest_props.description.includes(`
|
|
109
|
-
`)?`${sr(e.rest_props.description)}
|
|
110
|
-
`:`${ir(e.rest_props.description)}
|
|
111
|
-
`:"";if(e.extends===void 0)d=`
|
|
112
|
-
${T}${m?`type $RestProps = ${m};
|
|
113
|
-
`:""}
|
|
114
|
-
${e.canonicalPropsType?`type $Props${f} = (${e.canonicalPropsType}) & {${l}
|
|
115
|
-
|
|
116
|
-
${y}
|
|
117
|
-
};`:`type $Props${f} = {
|
|
118
|
-
${l}
|
|
119
|
-
|
|
120
|
-
${y}
|
|
121
|
-
};`}
|
|
122
|
-
|
|
123
|
-
export type ${c}${f} = Omit<$RestProps, keyof $Props${h}> & $Props${h};
|
|
124
127
|
`;else d=`
|
|
125
|
-
${
|
|
126
|
-
|
|
127
|
-
${e.canonicalPropsType?`type $Props${f} = (${e.canonicalPropsType}) & {${l}
|
|
128
|
-
|
|
129
|
-
${y}
|
|
130
|
-
};`:`type $Props${f} = {
|
|
131
|
-
${l}
|
|
132
|
-
|
|
133
|
-
${y}
|
|
134
|
-
};`}
|
|
135
|
-
|
|
136
|
-
export type ${c}${f} = Omit<$RestProps, keyof ($Props${h} & ${e.extends.interface})> & Omit<${e.extends.interface}, keyof $Props${h}> & $Props${h};
|
|
137
|
-
`}else if(l.trim()===""&&e.extends===void 0&&!e.canonicalPropsType)d=`
|
|
138
|
-
export type ${c}${f} = ${ds};
|
|
139
|
-
`;else if(e.canonicalPropsType)d=`
|
|
140
|
-
${g}
|
|
141
|
-
export type ${c}${f} = ${e.extends===void 0?"":`Omit<${e.extends.interface}, keyof $Props${h}> & `}$Props${h};
|
|
142
|
-
`;else if(e.extends===void 0)d=`
|
|
143
|
-
export type ${c}${f} = {
|
|
144
|
-
${l}
|
|
145
|
-
};
|
|
146
|
-
`;else d=`
|
|
147
|
-
type $Props${f} = {
|
|
148
|
-
${l}
|
|
128
|
+
type $Props${l} = {
|
|
129
|
+
${a}
|
|
149
130
|
};
|
|
150
131
|
|
|
151
|
-
export type ${
|
|
152
|
-
`;return{props_name:
|
|
153
|
-
`:""}${
|
|
154
|
-
`);return
|
|
155
|
-
${
|
|
156
|
-
}`}var
|
|
157
|
-
|
|
132
|
+
export type ${o}${l} = ${c}$Props${p};
|
|
133
|
+
`;return{props_name:o,prop_def:d}}function fb(e){return er(e)?e:`[${e}]`}function hb(e){let t=e.slots.filter((i)=>!er(i.slot_props??""));if(t.length===0)return yn;let n=t.map(({name:i,slot_props:r,...s})=>{let a=s.default||i===null?"default":we(i??""),o=no(s.description,s.tags,s.deprecated);return`${o?`${o}
|
|
134
|
+
`:""}${a}: ${qi(r)};`}).join(`
|
|
135
|
+
`);return t.length===1?`{${n}}`:`{
|
|
136
|
+
${n}
|
|
137
|
+
}`}var mb=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 Ys(e=Ce){if(Kx.test(e))return e;return`CustomEvent<${e}>`}function yb(e){switch(e.type){case"dispatched":return Ys(e.detail);case"forwarded":{let t=e.element,i=!(t&&Xx.test(t))||mb.has(e.name),r=e.detail!==void 0&&e.detail!=="undefined"&&!(e.detail==="null"&&i),s=e.detail==="null"&&!i;if(r||s)return Ys(e.detail);return i?`WindowEventMap["${e.name}"]`:Ys()}default:return e}}function fu(e){if(e.events.length===0)return Jx;let t=e.events.map((n)=>{let i=no(n.description,n.tags,n.deprecated);return`${i?`${i}
|
|
138
|
+
`:""}${we(n.name)}: ${yb(n)};
|
|
158
139
|
`}).join("");return e.events.length===1?`{${t}}`:`{
|
|
159
|
-
${t}}`}function
|
|
160
|
-
${
|
|
161
|
-
${
|
|
162
|
-
`)}function
|
|
163
|
-
};`}}function
|
|
140
|
+
${t}}`}function gb(e){let t=e.type==="() => any";if(e.type&&mu.test(e.type)&&!t)return e.type;if(e.params&&e.params.length>0)return`(${Ee(e.params)}) => ${e.returnType||Ce}`;if(e.returnType)return`() => ${e.returnType}`;return e.type||Ce}function Eu(e){return e.props.filter((t)=>t.isFunctionDeclaration||t.kind==="const").map((t)=>{let n=Lt(t.description,t.deprecated,t.tags);return`
|
|
141
|
+
${dt(n)}
|
|
142
|
+
${we(t.name)}: ${gb(t)};`}).join(`
|
|
143
|
+
`)}function xb(e){let t=$b(e.moduleName),n=Eu({props:e.props});if(n.trim()==="")return{exports_name:t,exports_ref:t,exports_def:`export type ${t} = ${yn};`};let{declSuffix:i,refSuffix:r}=vu(e.generics,n);return{exports_name:t,exports_ref:`${t}${r}`,exports_def:`export type ${t}${i} = {${n}
|
|
144
|
+
};`}}function bb(e){return e.props.filter((t)=>t.bindable===!0||t.binding==="writable").map((t)=>JSON.stringify(t.name)).join(" | ")}function Cu(e){return e==="default"?"$$Component":e}function vb(e){let t=Cu(e.moduleName),n=e.bindings===ke?'""':e.bindings;return`declare const ${t}: Component<
|
|
164
145
|
${e.propsRef},
|
|
165
146
|
${e.exportsRef},
|
|
166
147
|
${n}
|
|
167
148
|
>;
|
|
168
|
-
export default ${t};`}function
|
|
149
|
+
export default ${t};`}function Tb(e){let t=Cu(e.moduleName),n=`${t}Component`,i=e.bindings===ke?'""':e.bindings,r=e.eventsRef?`$on?<K extends keyof ${e.eventsRef} & string>(type: K, callback: (e: ${e.eventsRef}[K]) => void): () => void;`:"$on?(type: string, callback: (e: any) => void): () => void;";return`interface ${n} {
|
|
169
150
|
new ${e.generic}(
|
|
170
151
|
options: ComponentConstructorOptions<${e.propsRef}>
|
|
171
152
|
): SvelteComponent<${e.propsRef}${e.eventsRef?`, ${e.eventsRef}`:""}> & ${e.exportsRef};
|
|
@@ -174,92 +155,91 @@ ${t}}`}function vy(e){let t=e.type==="() => any";if(e.type&&lc.test(e.type)&&!t)
|
|
|
174
155
|
internals: ComponentInternals,
|
|
175
156
|
props: ${e.propsRef}
|
|
176
157
|
): {
|
|
177
|
-
${
|
|
158
|
+
${r}
|
|
178
159
|
$set?(props: Partial<${e.propsRef}>): void;
|
|
179
160
|
} & ${e.exportsRef};
|
|
180
161
|
element?: typeof HTMLElement;
|
|
181
|
-
z_$$bindings?: ${
|
|
162
|
+
z_$$bindings?: ${i};
|
|
182
163
|
}
|
|
183
164
|
declare const ${t}: ${n};
|
|
184
|
-
export default ${t};`}function
|
|
165
|
+
export default ${t};`}function Sb(e){if(e.extends===void 0)return"";return`import type { ${e.extends.interface} } from ${e.extends.import};`}function Eb(e){if(!e.componentComment)return"";if(!Yx.test(e.componentComment))return Zs(e.componentComment.trim());return`/*${Le(e.componentComment).split(`
|
|
185
166
|
`).map((t)=>`* ${t}`).join(`
|
|
186
167
|
`)}
|
|
187
|
-
*/`}function
|
|
188
|
-
export ${c} from ${JSON.stringify(
|
|
189
|
-
export { ${
|
|
168
|
+
*/`}function Cb(e){let t=[],n=new Map;for(let i of e.moduleExports){if(i.kind!=="re-export"||!i.reExport)continue;let{from:r,imported:s}=i.reExport,a=Lt(i.description,i.deprecated,i.tags),o=we(i.name);if(s==="*"){let c=i.name==="*"?"*":`* as ${o}`;t.push(`${dt(a)}
|
|
169
|
+
export ${c} from ${JSON.stringify(r)};`);continue}let l=`${r}\x00${a}`,p=n.get(l);if(!p)p={comments:a,from:r,specifiers:[]},n.set(l,p),t.push(l);p.specifiers.push(s===i.name?o:`${we(s)} as ${o}`)}return t.map((i)=>{let r=n.get(i);if(!r)return i;return`${dt(r.comments)}
|
|
170
|
+
export { ${r.specifiers.join(", ")} } from ${JSON.stringify(r.from)};`}).join(`
|
|
190
171
|
|
|
191
|
-
`)}function
|
|
172
|
+
`)}function io(e){let t=[e.static?"static ":"",e.abstract?"abstract ":"",e.readonly?"readonly ":""].join(""),n=e.optional?"?":"";if(e.kind==="property")return`${t}${we(e.name)}${n}: ${e.type??Ce}`;let i=Ee(e.params??[]);if(e.kind==="constructor")return`constructor(${i})`;let r=e.typeParameters?`<${e.typeParameters}>`:"";return`${t}${we(e.name)}${n}${r}(${i}): ${e.returnType??Ce}`}function kb(e,t){let n=e.localName??e.name,i=n!==e.name,r=`export { ${n}${i?` as ${we(e.name)}`:""} };`;if(t.has(n))return r;t.add(n);let s=e.typeParameters?`<${e.typeParameters}>`:"",a=(e.members??[]).map((c)=>[dt(Lt(c.description,c.deprecated,c.tags)),`${io(c)};`].filter(Boolean).join(`
|
|
192
173
|
`)).join(`
|
|
193
174
|
|
|
194
|
-
`),
|
|
195
|
-
${[
|
|
175
|
+
`),o=`${e.extends?` extends ${e.extends}`:""}${e.implements?.length?` implements ${e.implements.join(", ")}`:""}`,l=`${i?"":"export "}declare ${e.abstract?"abstract ":""}class ${n}${s}${o}`;return`
|
|
176
|
+
${[dt(Lt(e.description,e.deprecated,e.tags)),a?`${l} {
|
|
196
177
|
${a}
|
|
197
|
-
}`:`${
|
|
198
|
-
`)}`}function
|
|
199
|
-
`;else if(a.params&&a.params.length>0)
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
${
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
`)
|
|
207
|
-
`))){let i=`${n}${r.join(", ")}> {}`;if(i.length<=$y)return i}return`${n}
|
|
178
|
+
}`:`${l} {}`,i?r:""].filter(Boolean).join(`
|
|
179
|
+
`)}`}function wb(e){let t=Cb(e),n=new Set,i=e.moduleExports.filter((r)=>r.kind!=="re-export").map((r)=>{if(r.kind==="class")return kb(r,n);let s=!hu.test(r.name),a=s?{...r,name:Ab(r.name)}:r,o=Lt(a.description,a.deprecated,a.tags),l,p=a.type!==void 0&&mu.test(a.type),c=a.typeParameters?`<${a.typeParameters}>`:"";if(a.kind==="const"&&!p)l=`export declare const ${a.name}: ${a.type||Ce};
|
|
180
|
+
`;else if(a.params&&a.params.length>0)l=`export declare function ${a.name}${c}(${Ee(a.params)}): ${a.returnType||Ce};`;else if(a.returnType)l=`export declare function ${a.name}${c}(): ${a.returnType};`;else if(p&&a.type){let[d,f,...h]=a.type.split("=>"),m=h.map((y)=>` => ${y.trim()}`).join("");l=`export declare function ${a.name}${d.trimEnd()}: ${f.trim()}${m};`}else l=`export declare let ${a.name}: ${a.type||Ce};`;if(s)l=`${l.replace(rb,"").trimEnd()}
|
|
181
|
+
export { ${a.name} as ${JSON.stringify(r.name)} };`;return`
|
|
182
|
+
${dt(o)}
|
|
183
|
+
${l}`}).join(`
|
|
184
|
+
`);return[t,i].filter(Boolean).join(`
|
|
185
|
+
|
|
186
|
+
`)}function Ab(e){return`__export_${e.replace(sb,"_")}`}var Pb=120;function Db(e){let n=`export default class ${e.moduleName==="default"?"":e.moduleName}${e.generic} extends SvelteComponentTyped<`,i=[e.genericProps,e.events,e.slots];if(e.accessors.trim()===""&&i.every((r)=>!r.includes(`
|
|
187
|
+
`))){let r=`${n}${i.join(", ")}> {}`;if(r.length<=Pb)return r}return`${n}
|
|
208
188
|
${e.genericProps},
|
|
209
189
|
${e.events},
|
|
210
190
|
${e.slots}
|
|
211
191
|
> {
|
|
212
192
|
${e.accessors}
|
|
213
|
-
}`}function
|
|
214
|
-
`),
|
|
193
|
+
}`}function Nb(e){return`${e}Props`}function $b(e){return`${e}Exports`}function Lb(e,t){let n=yo(e),{moduleName:i,typedefs:r,generics:s,props:a,moduleExports:o,slots:l,events:p,rest_props:c,extends:d,componentComment:f,contexts:h}=e,m=t?.format==="component",y=s!==null,{props_name:g,prop_def:N}=db({moduleName:i,props:a,rest_props:c,extends:d,generics:s,slots:l,canonicalPropNames:new Set(n?.canonicalPropNames??[]),canonicalPropsType:n?.canonicalPropsType}),S=s?`<${s[1]}>`:"",w=s?`${g}<${s[0]}>`:g,v=m&&p.length>0?`type $Events${S} = ${fu({events:p})};`:"",ye=s?`$Events<${s[0]}>`:"$Events",Ae=m&&(y||v!==""),Ze=wb({moduleExports:o}),xn=Vi({typedefs:r}),bn=Tu({contexts:h,generics:s}),vn=(n?.typeImportStatements??[]).join(`
|
|
194
|
+
`),Tn=[...n?.localTypeDeclarations??[],...n?.moduleTypeDeclarations??[]].join(`
|
|
215
195
|
|
|
216
|
-
`),{exports_ref:
|
|
217
|
-
`),
|
|
218
|
-
`)].map((
|
|
196
|
+
`),{exports_ref:It,exports_def:ho}=m?xb({props:a,moduleName:i,generics:s}):{exports_ref:ke,exports_def:ke},mo=m?bb({props:a}):ke,Wi=!tb.test(vn)&&($t.test(N)||$t.test(Ze)||$t.test(xn)||$t.test(bn)||$t.test(Tn)||$t.test(ho)),Vu=c?.type==="Element"&&(c.name!=="svelte:element"||c.thisValue),Hu=c?.type==="Element"&&c.name==="svelte:element"&&!c.thisValue,Wu=[m?Ae?`import type { SvelteComponent, ComponentConstructorOptions, ComponentInternals${Wi?", Snippet":""} } from "svelte";`:`import type { Component${Wi?", Snippet":""} } from "svelte";`:`import { SvelteComponentTyped${Wi?", type Snippet":""} } from "svelte";`,Vu?'import type { SvelteHTMLElements } from "svelte/elements";':"",Hu?'import type { HTMLAttributes } from "svelte/elements";':"",vn,Sb({extends:d})].filter(Boolean).join(`
|
|
197
|
+
`),zu=m?Ae?Tb({moduleName:i,generic:S,propsRef:w,exportsRef:It,bindings:mo,...v?{eventsRef:ye}:{}}):vb({moduleName:i,propsRef:w,exportsRef:It,bindings:mo}):Db({moduleName:i,generic:S,genericProps:w,events:fu({events:p}),slots:hb({slots:l}),accessors:Eu({props:a})}),Gu=[Ze,xn,Tn,bn,N,ho,v,[Eb({componentComment:f}),zu].filter(Boolean).join(`
|
|
198
|
+
`)].map((Uu)=>Uu.trim()).filter(Boolean).join(`
|
|
219
199
|
|
|
220
|
-
`);return
|
|
200
|
+
`);return lu([Wu,Gu].filter(Boolean).join(`
|
|
221
201
|
|
|
222
|
-
`))}var
|
|
202
|
+
`))}var ku=/`/g,wu=/\s+/g,me="--",Au=`| Prop name | Required | Kind | Reactive | Binding | Type | Default value | Description |
|
|
223
203
|
| :- | :- | :- | :- | :- | :- | :- | :- |
|
|
224
|
-
`,
|
|
204
|
+
`,Pu=`| Slot name | Default | Props | Fallback | Description |
|
|
225
205
|
| :- | :- | :- | :- | :- |
|
|
226
|
-
`,
|
|
206
|
+
`,Du=`| Event name | Type | Detail | Description |
|
|
227
207
|
| :- | :- | :- | :- |
|
|
228
|
-
`,
|
|
208
|
+
`,oo=`| Name | Kind | Type | Description |
|
|
229
209
|
| :- | :- | :- | :- |
|
|
230
|
-
`,
|
|
210
|
+
`,_b=`| Member | Signature | Description |
|
|
231
211
|
| :- | :- | :- |
|
|
232
|
-
`,
|
|
212
|
+
`,Nu=`| Part name | Description |
|
|
233
213
|
| :- | :- |
|
|
234
|
-
|
|
214
|
+
`,$u=`| Property name | Type | Default value | Description |
|
|
235
215
|
| :- | :- | :- | :- |
|
|
236
|
-
`,
|
|
237
|
-
`)?e.replace(
|
|
238
|
-
`))});if(!
|
|
239
|
-
`),
|
|
240
|
-
`)}),
|
|
241
|
-
`).replace(
|
|
242
|
-
`);if(a)
|
|
243
|
-
|
|
244
|
-
`);if(!
|
|
216
|
+
`,ao=/\|/g,Ib=/</g,Rb=/>/g,ft=/\n/g,Mb=/^[A-Za-z_$][\w$]*$/,Bb=/\s*\n\s*/g,Ob=/&(?=#?\w+;)|<(?=[A-Za-z/!?])|[|`*]|\\(?=[!-/:-@[-`{-~])|(?<![A-Za-z0-9])_|_(?![A-Za-z0-9])/g,jb=/[&<|`*\\_]/;function lo(e){if(!jb.test(e))return e;return e.replace(Ob,(t)=>t==="&"?"&":t==="<"?"<":t==="_"?"_":`&#${t.charCodeAt(0)};`)}function Lu(e){return`<code>${lo(e.includes(`
|
|
217
|
+
`)?e.replace(Bb," "):e)}</code>`}var Fb=/\{@link\s+([^{}\s|]+)(?:\|([^{}]+))?\}/g;function qb(e){if(!e.includes("{@link"))return e;return e.replace(Fb,(t,n,i)=>`[${i===void 0?n:i.trim()}](${n})`)}function ro(e){return e.includes("```")||e.includes("~~~")}function so(e){return Mu(qb(e))}var Vb=/^([ \t]*)(`{3,}|~{3,})(.*)$/,Hb=/^\n/,Wb=/\n$/;function _u(e){let t=(s)=>({kind:"prose",text:so(s.join(`
|
|
218
|
+
`))});if(!ro(e))return[t([e])];let n=e.split(`
|
|
219
|
+
`),i=[],r=[];for(let s=0;s<n.length;s++){let a=Vb.exec(n[s]),[,o="",l="",p=""]=a??[];if(!a||l[0]==="`"&&p.includes("`")){r.push(n[s]);continue}if(r.push(""),r.length>1)i.push(t(r));let c=[],d=new RegExp(`^[ \\t]*${l[0]}{${l.length},}[ \\t]*$`);for(s++;s<n.length&&!d.test(n[s]);s++){let f=n[s],h=0;while(h<o.length&&(f[h]===" "||f[h]==="\t"))h++;c.push(f.slice(h))}i.push({kind:"code",code:c.join(`
|
|
220
|
+
`)}),r=[""]}if(r.length>1||i.length===0)i.push(t(r));return i}function Iu(e){let t="";for(let n=0;n<e.length;n++){let i=e[n];if(i.kind==="code"){t+=`<pre><code>${lo(i.code).replace(ft,"<br />")}</code></pre>`;continue}let r=i.text;if(e[n-1]?.kind==="code")r=r.replace(Hb,"");if(e[n+1]?.kind==="code")r=r.replace(Wb,"");t+=r.replace(ao,"|").replace(ft,"<br />")}return t}function ce(e){if(e===void 0)return me;return Lu(e)}function Ru(e){if(!e.reExport)return ce(e.type);let{from:t,imported:n}=e.reExport,i=n==="*"?"":Mb.test(n)?`.${n}`:`[${JSON.stringify(n)}]`;return ce(`typeof import(${JSON.stringify(t)})${i}`)}function Mu(e){if(!e.includes("<")&&!e.includes(">"))return e;return e.replace(Ib,"<").replace(Rb,">")}function po(e){if(e===void 0)return me;return Lu(e)}function ht(e,t){if(t===void 0)return e;let n=typeof t==="string"&&t.trim().length>0?`: ${Mu(t).replace(ft," ").replace(ao,"|")}`:"";return`<s>${e}</s><br />**Deprecated**${n}`}function Hi(e){if(e===void 0||e.trim().length===0)return me;return Iu(_u(e))}function Bu(e){if(e===void 0||e==="{}")return me;return ce(qi(e).replace(ft," "))}function Ou(e){if(e===void 0)return me;return`<code>${lo(e).replace(ft,"<br />")}</code>`}function _t(e,t){let n=e!==void 0&&e.trim().length>0;if(!(n&&ro(e))&&!t?.some(({body:a})=>a&&ro(a))){let a=n?[so(e)]:[];for(let{name:o,body:l}of t??[]){let p=l?.trim();a.push(p?`@${o} ${so(p)}`:`@${o}`)}if(a.length===0)return me;return a.join(`
|
|
221
|
+
`).replace(ao,"|").replace(ft,"<br />")}let i=[],r=(a)=>{let o=i.at(-1);if(o?.kind==="prose")o.text+=a;else i.push({kind:"prose",text:a})},s=(a,o)=>{if(i.length>0)r(`
|
|
222
|
+
`);if(a)r(a);for(let l of _u(o))if(l.kind==="prose")r(l.text);else i.push(l)};if(n)s("",e);for(let{name:a,body:o}of t??[]){let l=o?.trim();s(l?`@${a} `:`@${a}`,l??"")}if(i.length===0)return me;return Iu(i)}function ju(e){if(e===void 0)return me;return ce(e.replace(ft," "))}function zb(e){let t=[e.extends?`Extends ${ce(e.extends)}.`:"",e.implements?.length?`Implements ${e.implements.map((n)=>ce(n)).join(", ")}.`:""].filter(Boolean);return t.length>0?t.join(" "):void 0}function Fu(e,t){let n=new Set;for(let i of t){if(i.kind!=="class")continue;let r=zb(i);if(!i.members?.length&&!r)continue;let s=i.localName??i.name;if(n.has(s))continue;if(n.add(s),e.append("h4",`\`${s}\` members`),r)e.append("raw",`${r}
|
|
223
|
+
|
|
224
|
+
`);if(!i.members?.length)continue;e.append("raw",_b);for(let a of i.members)e.append("raw",`| ${ht(a.name,a.deprecated)} | ${ce(io(a))} | ${_t(a.description,a.tags)} |
|
|
245
225
|
`);e.append("raw",`
|
|
246
|
-
`)}}var
|
|
226
|
+
`)}}var Gb=/[^\w\- ]+/g,Ub=/\s+/g,co="<!-- __TOC__ -->";function Jb(e,t){let n=e.toLowerCase().replace(ku,"").replace(Gb,"").replace(Ub,"-"),i=t.get(n)??0;return t.set(n,i+1),i===0?n:`${n}-${i}`}class gn{sourceParts=[];hasToC=!1;toc=[];onAppend;constructor(e={}){this.onAppend=e.onAppend}get source(){return this.sourceParts.join("")}appendLineBreaks(){return this.sourceParts.push(`
|
|
247
227
|
|
|
248
|
-
`),this}append(e,t){switch(e){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":{
|
|
249
|
-
`);return e.slice(0,
|
|
228
|
+
`),this}append(e,t){switch(e){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":{if(this.sourceParts.push(`${"#".repeat(Number(e.slice(-1)))} ${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.onAppend?.call(this,e,this),this}tableOfContents(){return this.sourceParts.push(co),this.hasToC=!0,this.appendLineBreaks(),this}end(){let e=this.sourceParts.join("");if(!this.hasToC)return e;let t=e.indexOf(co);if(t===-1)return e;let n=new Map,i=this.toc.map(({indent:r,raw:s})=>`${" ".repeat(r)}- [${s}](#${Jb(s,n)})`).join(`
|
|
229
|
+
`);return e.slice(0,t)+i+e.slice(t+co.length)}}class qu extends gn{}function fo(e,t,n){if(e.append("h1","Component Index"),e.append("h2","Components").tableOfContents(),e.append("divider"),n&&n.length>0)Kb(e,n);for(let i of Ws(t).components)Qb(e,i)}function Kb(e,t){e.append("h2","Exports"),e.append("raw",oo);for(let n of t){let i=(n.type??n.value)?.replace(wu," ").trim();e.append("raw",`| ${ht(n.name,n.deprecated)} | <code>${n.kind}</code> | ${ce(i)} | ${Hi(n.description)} |
|
|
250
230
|
`)}e.append("raw",`
|
|
251
|
-
`),e.append("divider")}function
|
|
231
|
+
`),e.append("divider")}function Xb(e){return e.kind==="const"||e.isFunctionDeclaration}function Yb(e,t){e.append("h3","Module exports"),e.append("raw",oo);for(let n of t)e.append("raw",`| ${ht(n.name,n.deprecated)} | <code>${n.kind}</code> | ${Ru(n)} | ${_t(n.description,n.tags)} |
|
|
252
232
|
`);e.append("raw",`
|
|
253
|
-
`),
|
|
254
|
-
`);else e.append("p",
|
|
255
|
-
${
|
|
233
|
+
`),Fu(e,t)}function uo(e,t,n){if(t.length>0)n(),e.append("raw",`
|
|
234
|
+
`);else e.append("p","None.")}function Qb(e,t){if(e.append("h2",`\`${t.moduleName}\``),t.generics)e.append("p",`**Type parameters:** ${ce(`<${t.generics[1]}>`)}`);if(t.typedefs.length>0)e.append("h3","Types").append("raw",`\`\`\`ts
|
|
235
|
+
${Vi({typedefs:t.typedefs})}
|
|
256
236
|
\`\`\`
|
|
257
237
|
|
|
258
|
-
`);if(e.append("h3","Props"),
|
|
259
|
-
`)}}),t.moduleExports.length>0)
|
|
260
|
-
`)}),e.append("h3","Events"),
|
|
261
|
-
`)}),t.cssParts&&t.cssParts.length>0){e.append("h3","CSS Parts"),e.append("raw",
|
|
238
|
+
`);if(e.append("h3","Props"),uo(e,t.props,()=>{e.append("raw",Au);let n=(r)=>r.reactive?0:r.constant?2:1,i=t.props.map((r,s)=>({prop:r,index:s})).sort((r,s)=>n(r.prop)-n(s.prop)||r.index-s.index).map(({prop:r})=>r);for(let r of i){let s=Xb(r)?"accessor":r.kind;e.append("raw",`| ${ht(r.name,r.deprecated)} | ${r.isRequired?"Yes":"No"} | <code>${s}</code> | ${r.reactive?"Yes":"No"} | ${r.binding??"--"} | ${ce(r.type)} | ${po(r.value)} | ${_t(r.description,r.tags)} |
|
|
239
|
+
`)}}),t.moduleExports.length>0)Yb(e,t.moduleExports);if(e.append("h3","Slots"),uo(e,t.slots,()=>{e.append("raw",Pu);for(let n of t.slots)e.append("raw",`| ${ht(n.default?me:n.name??me,n.deprecated)} | ${n.default?"Yes":"No"} | ${Bu(n.slot_props)} | ${Ou(n.fallback)} | ${_t(n.description,n.tags)} |
|
|
240
|
+
`)}),e.append("h3","Events"),uo(e,t.events,()=>{e.append("raw",Du);for(let n of t.events)e.append("raw",`| ${ht(n.name,n.deprecated)} | ${n.type} | ${ju(n.detail)} | ${_t(n.description,n.tags)} |
|
|
241
|
+
`)}),t.cssParts&&t.cssParts.length>0){e.append("h3","CSS Parts"),e.append("raw",Nu);for(let n of t.cssParts)e.append("raw",`| ${n.name} | ${Hi(n.description)} |
|
|
262
242
|
`);e.append("raw",`
|
|
263
|
-
`)}if(t.cssProperties&&t.cssProperties.length>0){e.append("h3","CSS Custom Properties"),e.append("raw"
|
|
243
|
+
`)}if(t.cssProperties&&t.cssProperties.length>0){e.append("h3","CSS Custom Properties"),e.append("raw",$u);for(let n of t.cssProperties)e.append("raw",`| ${n.name} | ${ce(n.type)} | ${po(n.default)} | ${Hi(n.description)} |
|
|
264
244
|
`);e.append("raw",`
|
|
265
|
-
`)}}function
|
|
245
|
+
`)}}function Zb(e,t){return new gn({onAppend:(n,i)=>{t?.onAppend?.call(null,n,i,e)}})}function ev(e,t){let n=Zb(e,t);return fo(n,e),n.end()}export{qu as BrowserWriterMarkdown,Qc as COMPONENT_API_SCHEMA_VERSION,qs as ComponentParser,gn as MarkdownDocument,Ju as asNormalizedPath,Ws as buildComponentApiDocument,mx as finalizeWithoutCrossFileResolution,qi as formatTsProps,Tu as getContextDefs,Vi as getTypeDefs,fo as renderComponentsToMarkdown,ev as writeMarkdownCore,Lb as writeTsDefinition};
|