sveld 0.38.2 → 0.38.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser.d.ts +5 -0
- package/browser.js +143 -143
- package/chunk-1azsj0zd.js +13 -0
- package/{chunk-261qwh99.js → chunk-3z90f57k.js} +1 -1
- package/chunk-4kzw8twf.js +1 -0
- package/chunk-6s52n40s.js +29 -0
- package/chunk-8v3hb5br.js +234 -0
- package/cli-entry.js +2 -2
- package/index.d.ts +5 -0
- package/index.js +1 -1
- package/package.json +1 -1
- package/schema/component-api.schema.json +1 -0
- package/chunk-28h1esfd.js +0 -29
- package/chunk-80eafzch.js +0 -1
- package/chunk-rn01dzny.js +0 -234
- package/chunk-wpqsw5ca.js +0 -13
package/browser.js
CHANGED
|
@@ -1,152 +1,152 @@
|
|
|
1
|
-
function
|
|
2
|
-
`,
|
|
1
|
+
function od(e){return e}var Pe=Symbol("sveld.parsedComponentTypeScriptMetadata");function To(e){return e[Pe]}var Zi=Array(2048).fill(void 0);function ad(){Zi.fill(void 0)}function So(e,t,n,i){let r=i&2047,s=Zi[r];if(s!==void 0&&s.length===n-t&&e.startsWith(s,t))return s;let a=e.slice(t,n);return Zi[r]=a,a}var bt="",be=[0],Ge=0,xt=0,Ve;function Co(e){ad(),bt=e,be=[0],Ge=0,xt=0,Ve=void 0}function er(e){while(Ge<=e){let t=bt.indexOf(`
|
|
2
|
+
`,Ge);if(t===-1){Ge=Number.POSITIVE_INFINITY;return}Ge=t+1,be.push(Ge)}}function pd(e){let t=[0],n=e.indexOf(`
|
|
3
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+
|
|
6
|
-
`,a),c=
|
|
7
|
-
`)}function
|
|
8
|
-
`),i=
|
|
9
|
-
`).slice(1,-1),endIndex:a}}function
|
|
10
|
-
`);t.content=r,t.tag=i;let
|
|
4
|
+
`,n+1);return t}function tr(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 ve(e){return er(e),xt=tr(be,e,xt),{line:xt+1,column:e-be[xt],character:e}}var Qi=/\r\n?|\n|\u2028|\u2029/g,ld=/[\r\u2028\u2029]/;function ko(e){if(Ve===void 0){Ve=ld.test(bt)?[]:null,Qi.lastIndex=0;while(Ve!==null&&Qi.exec(bt)!==null)Ve.push(Qi.lastIndex)}if(Ve===null)return er(e),tr(be,e,xt);let t=0,n=Ve.length;while(t<n){let i=t+n>>>1;if(Ve[i]<=e)t=i+1;else n=i}return t}function Ze(e){let{line:t,column:n}=ve(e);return{line:t,column:n}}function wo(e){while(be.length<=e+1&&Ge!==Number.POSITIVE_INFINITY)er(Ge);if(e>=be.length)return;let t=e+1<be.length?be[e+1]-1:bt.length;return bt.slice(be[e],t)}function nr(e){let t,n=0;return(i)=>(t??=pd(e),n=tr(t,i,n),{line:n+1,column:i-t[n]})}function De(e){return typeof e==="object"&&e!==null&&typeof et(e).type==="string"}function et(e){return e}function Vt(e,t){let n=et(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 Pn(e,...t){if(!t.some((n)=>n===e.type))throw Error(`expected ${t.join(" or ")}, got ${e.type}`)}function ir(e){let t=[];return tt(e,t),t}function tt(e,t){switch(e.type){case"Identifier":t.push(e);return;case"ObjectPattern":for(let n of e.properties)tt(n.type==="RestElement"?n.argument:n.value,t);return;case"ArrayPattern":for(let n of e.elements)if(n!==null)tt(n,t);return;case"RestElement":tt(e.argument,t);return;case"AssignmentPattern":tt(e.left,t);return;case"TSParameterProperty":tt(e.parameter,t);return;case"TSAsExpression":case"TSNonNullExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":tt(e.expression,t)}}function rr(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 vt={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 cd=Object.assign(Object.create(null),vt),ud=[],Gt=Symbol("sveast.walk.stop"),te=Symbol("sveast.walk.skip");function K(e,t,n){Dn(e,null,null,null,t,n===void 0||n===vt?dd:(i)=>Object.hasOwn(n,i.type)?n[i.type]:void 0)}function Dn(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===Gt)return!0;if(o!==te){if(o!==e&&De(o))return fd(o,t,n,i,r,s);let p=et(e);for(let l=0;l<a.length;l++){let c=a[l],d=p[c];if(Array.isArray(d))for(let f=0;f<d.length;f++){let h=d[f];if(De(h)&&Dn(h,e,c,f,r,s))return!0}else if(De(d)&&Dn(d,e,c,null,r,s))return!0}}return r.leave?.(e,t,n,i)===Gt}function dd(e){let t=e.type;if(t==="Identifier")return e.typeAnnotation===void 0&&e.decorators===void 0?ud:vt.Identifier;if(t==="Literal")return vt.Literal;if(t==="Text")return vt.Text;return cd[t]}function fd(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=et(t),o=a[n];if(i===null)a[n]=e;else if(Array.isArray(o))o[i]=e;return Dn(e,t,n,i,r,s)}function Ee(e){return typeof e==="object"&&e!==null}function Ao(e){return Ee(e)&&e.type==="VariableDeclaration"&&Array.isArray(e.declarations)}function nt(e){return Ee(e)&&e.type==="Literal"}function T(e){return Ee(e)&&e.type==="Identifier"&&typeof e.name==="string"}function He(e){return Ee(e)&&e.type==="MemberExpression"}function X(e){return Ee(e)&&e.type==="ObjectExpression"&&Array.isArray(e.properties)}function hd(e){return Ee(e)&&e.type==="CallExpression"}function se(e,t){return hd(e)&&T(e.callee)&&e.callee.name===t}function Et(e){return e?.type==="TSAsExpression"||e?.type==="TSSatisfiesExpression"?Et(e.expression):e}function Po(e){return e?.type==="TSAsExpression"||e?.type==="TSSatisfiesExpression"?e.typeAnnotation:void 0}function md(e){return Ee(e)&&e.type==="NewExpression"}function sr(e,t){return md(e)&&T(e.callee)&&e.callee.name===t}function Do(e){if(!Ee(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 U(e){if(T(e))return e.name;if(nt(e))return e.value==null?void 0:String(e.value);return}function Tt(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=yd(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 yd(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 V(e,t){let n=[],i=0;return Tt(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 Nn(e,t){let n=-1;return Tt(e,(i,r)=>{if(r===0&&t.includes(e[i]))n=i;return n!==-1}),n}function gd(e){let t=-1;return Tt(e,(n,i)=>{if(i===0&&e[n]==="="&&e[n+1]===">")t=n;return t!==-1}),t}function it(e,t){let n=-1;return Tt(e,(i,r)=>{if(r===0)n=i;return n!==-1},t),n}function or(e){let t=e.trim();return t.startsWith("[")&&it(t,0)===t.length-1}function No(e){if(!e)return;let t=gd(e);if(t===-1)return;return e.slice(t+2).trim()||void 0}function ar(){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:[],additionalImportedTypes:new Map,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,typeCasts:{constAssertions:new WeakSet,typeAssertions:new WeakMap},contexts:new Map,typedefs:new Map,typedefMembersByName:new Map,variableInfoCache:new Map,variableInfoCacheBuilt:!1,sveldIgnoreDirectives:new Map}}function pr(e,t){return e.propLocalToPublicName.get(t)??t}function $n(e,t,n=t){e.propLocalToPublicName.set(n,t)}function lr(e,t){return e.props.get(pr(e,t))}function Ht(e,t){return lr(e,t)?.type}var xd={"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 Ln(e){return{...e,code:cr[e.kind],severity:xd[e.kind]}}var bd={"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"},vd=Object.keys(bd),cr=Object.fromEntries(vd.map((e)=>[e,`sveld/${e}`]));function D(e,t,n,i,r){e.diagnosticRecords.push(ur(e,t,n,i,r))}function ur(e,t,n,i,r){return Ln({component:e.componentFilePath,kind:t,name:n,message:i,...r?{source:r}:{},...dr(e,t,n)?{ignored:!0}:{}})}function $o(e,t){return`${e}:${t}`}function Te(e,t,n,i){if(!i||i.length===0)return;let r=$o(t,n),s=e.sveldIgnoreDirectives.get(r)??new Set;for(let a of i)s.add(a);e.sveldIgnoreDirectives.set(r,s)}function dr(e,t,n){let i=e.sveldIgnoreDirectives.get($o(t,n));if(!i)return!1;return i.has("")||i.has(cr[t])}var fr="/**",Lo="*",In="*/",Ed="```",hr=/^\s+/,Io=/\s/,Td=/^@[^\s/]+(?=\s|$)/,Sd=/^@(\S+)\s*/,Cd=new Set(["extends","extendProps","generics","template","typedef"]);function Wt(e){let t=0;while(t<e.length){let n=e.charCodeAt(t);if(n!==32&&n!==9&&n!==13&&n!==10&&!Io.test(e[t]))break;t++}return t}function kd(e,t){let n=e.slice(Wt(e)),i=!1;if(t)n=n.slice(fr.length),i=!0;else if(n.startsWith(Lo)&&!n.startsWith(In))n=n.slice(Lo.length),i=!0;let r=n.slice(0,Wt(n));n=n.slice(r.length);let s=n.trimEnd(),a=s.endsWith(In)?s.slice(0,-In.length).trimEnd():n;return{indent:i?r.slice(1):r,content:a}}function wd(e,t,n){let i=n>t&&e.charCodeAt(n-1)===13?n-1:n;return e.slice(t,i)}function Ad(e){let t=[],n=0;while(!0){let i=e.indexOf(fr,n);if(i===-1)break;let r=e.lastIndexOf(`
|
|
5
|
+
`,i-1)+1;if(e.charCodeAt(i+fr.length)===42||e.slice(r,i).trim()!==""){n=i+1;continue}let s=[],a=r,o=!1,p=0;while(a<=e.length){let l=e.indexOf(`
|
|
6
|
+
`,a),c=l===-1?e.length:l,d=wd(e,a,c),{indent:f,content:h}=kd(d,s.length===0);s.push({raw:d,start:a,number:s.length,indent:f,content:h});let m=d.trimEnd();if(m.endsWith(In)){o=!0,p=a+m.length,n=c;break}if(l===-1)break;a=l+1}if(!o)break;t.push({start:i,end:p,lines:s})}return t}function Pd(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 Dd(e){let t=[[]],n=!1;for(let i of e){if(Td.test(i.content)&&!n)t.push([i]);else t[t.length-1].push(i);if(zt(i.content))n=!n}return t}function zt(e){return Nd(e,Ed)%2===1}function Nd(e,t){let n=0,i=e.indexOf(t);while(i!==-1)n++,i=e.indexOf(t,i+t.length);return n}function _o(e){return e.map((t)=>t.indent+t.content).join(`
|
|
7
|
+
`)}function $d(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((p)=>p.content).join(`
|
|
8
|
+
`),i=it(n,0);if(i===-1)return null;let r=[],s=i+1;for(let p=t;s>0;p++){let l=e[p].content.length;r.push(Math.min(s,l)),s-=l+1}let a=t+r.length-1;return{type:r.map((p,l)=>{let c=t+l,d=e[c].content.slice(0,p);if(e[c].content=e[c].content.slice(p).replace(hr,""),c>0)e[c].continuesType=!0;return l===0?d:e[c].indent+d}).join(`
|
|
9
|
+
`).slice(1,-1),endIndex:a}}function Ld(e){let t=e.content.match(hr)?.[0]??"",n=e.content.slice(t.length),i=0,r=0;for(let l of n){if(i===0&&Io.test(l))break;if(l==="[")i++;if(l==="]")i--;r++}let s=i===0?n.slice(0,r):"";if(!s)return null;let a=s,o=!1,p;if(s.startsWith("[")&&s.endsWith("]")){o=!0;let c=s.slice(1,-1).split("=");if(a=c[0].trim(),c.length>1)p=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(hr,""),{name:a,optional:o,default:p}}function Id(e){let t=e[0],n=t.content.match(Sd),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 p=$d(e),l=p?.type??"",c=p?.endIndex??0;if(Cd.has(i))while(c<e.length-1&&e[c].content.trim()==="")c++;let d=Ld(e[c]),f=_o(e.slice(c));return{tag:i,name:d?.name??"",type:l,optional:d?.optional??!1,default:d?.default,description:f,text:o,lines:e}}function _d(e,t,n){let i=Pd(e);i.forEach((a,o)=>{a.number=o});let r=Dd(i),s=r.slice(1).map(Id);return{description:_o(r[0]),tags:s,start:t,end:n,lines:i}}function Ut(e){return Ad(e).map(({start:t,end:n,lines:i})=>_d(i,t,n))}var Rd=/\s/;function mr(e,t,n){let i=t;while(i<n){let r=e[i];if(r==="/"&&e[i+1]==="/"){let s=e.indexOf(`
|
|
11
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"||
|
|
13
|
-
`).trimEnd()}function
|
|
14
|
-
`)))}function
|
|
15
|
-
`))),optional:S.optional})):void 0,m,y=
|
|
16
|
-
`):void 0,binding:a,deprecated:o,tags:
|
|
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(`
|
|
12
|
+
`||r==="\t"||r==="\r"||Rd.test(r))i++;else return!1}return!0}var Md=/^-\s*/;function _n(e){let t=[],n,i=!1;for(let r of e){let s=zt(r);if(n!==void 0){if(s)t.push(r.trim()),n=void 0;else t.push(r.slice(Math.min(n,Wt(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=Wt(r)}return t.join(`
|
|
13
|
+
`).trimEnd()}function $e(e){return e?.replace(Md,"").trim()}function Mo(e){let t=e.name?`${e.name} ${e.description}`:e.description;return $e(_n(t.split(`
|
|
14
|
+
`)))}function yr(e){let t=0;while(e[t+1]?.continuesType)t++;return t}var Rn=new Set(["since","example","see"]),gr=new Set(["bindable","default","required"]);function Bd(e){return e.length>0?e.map((t)=>({name:t.tag,body:t.text})):void 0}function Mn(e){let t=e.trim();return t===""?!0:t}function Bo(e){let t=e.startsWith("/*")?e:`/*${e}`;return t.endsWith("*/")?t:`${t}*/`}function Ne(e){return e==="*"?"any":e.trim()}function Fo(e){let{type:t}=Bn(Ut(Bo(e)));return t?Ne(t.type):void 0}var Fd=new Set(["type","param","returns","return","extends","extendProps","restProps","slot","snippet","event","typedef","callback","bindable","deprecated","ignore","internal","csspart","cssprop","cssproperty"]);function xr(e,t){let n=e.parsedJsDocByText.get(t);if(n===void 0)n=Ut(t),e.parsedJsDocByText.set(t,n);return n}function Bn(e){let t=e[0]?.tags??[],n,i=[],r,s,a,o=!1,p=[],l=[],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??=Mn(d.text);else if(d.tag==="ignore"||d.tag==="internal")o=!0;else if(d.tag==="sveld-ignore")c.push(d.name);else if(Rn.has(d.tag))l.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(!Fd.has(d.tag))p.push(d);return{type:n,param:i,returns:r,binding:s,deprecated:a,internal:o,additional:p,passthrough:l,ignore:c,description:e[0]?.description}}function Od(e,t){let n=e.jsDocBlocksByStart.get(t.start);return n?.end===t.end?[n]:void 0}function Oo(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(mr(e.source,r.end,n))return r}return}var jd=new Set(["ArrowFunctionExpression","FunctionExpression"]);function jo(e){let t=new Set,n=(r)=>{let{leadingComments:s,start:a}=r,o=Oo(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",p=a.type==="ExportNamedDeclaration"?a.declaration:a;if(p?.type==="FunctionDeclaration"){if(o)n(a)}else if(p?.type==="ClassDeclaration"&&s){n(o?a:p);for(let l of p.body.body)if(l.type==="MethodDefinition")n(l)}else if(p?.type==="VariableDeclaration"&&(s||!o||p.kind==="const")&&p.declarations.length===1&&jd.has(p.declarations[0].init?.type??""))n(a)}return t}function G(e,t){let n=Oo(e,t?.leadingComments,t?.start);return n&&Gd(e,n)}function qd(e,t,n){let i=e;if(t)i=`${e} extends ${t}`;if(n)i+=` = ${n}`;return i}var Vd=/^[^\s,]+/,Ro=/^\s*,\s*([^\s,]+)/;function br(e,t){let n=e.optional?e.name:Vd.exec(e.name)?.[0];if(!n)return[];let i=[{name:n,constraint:qd(n,t,e.default)}],r=`${e.optional?"":e.name.slice(n.length)} ${e.description}`;for(let s=Ro.exec(r);s;s=Ro.exec(r))i.push({name:s[1],constraint:s[1]}),r=r.slice(s[0].length);return i}function Gd(e,t){let n=Od(e,t)??xr(e,Bo(t.value)),{type:i,param:r,returns:s,binding:a,deprecated:o,internal:p,additional:l,passthrough:c,ignore:d,description:f}=Bn(n),h=r.length>0?r.filter((S)=>!S.name.includes(".")).map((S)=>({name:S.name,type:Ne(S.type),description:$e(_n(S.description.split(`
|
|
15
|
+
`))),optional:S.optional})):void 0,m,y=l;if(e.functionDocCommentStarts.has(t.start)){let S=l.filter((P)=>P.tag==="template"&&P.name);if(S.length>0)m=S.flatMap((P)=>br(P,Ne(P.type))).map(({constraint:P})=>P).join(", "),y=l.filter((P)=>P.tag!=="template")}let g=f?.trim(),k=[...g?[g]:[],...y.map((S)=>`@${S.tag}${S.text?` ${S.text}`:""}`)];return{type:i?Ne(i.type):void 0,params:h,returnType:s?Ne(s.type):void 0,description:k.length>0?k.join(`
|
|
16
|
+
`):void 0,binding:a,deprecated:o,tags:Bd(c),sveldIgnore:d.length>0?d:void 0,internal:p,typeParameters:m}}var Hd=/[\r\n]+/g;function qo(e,t){if(!e.source||t<0||t>e.source.length)return;return e.sourceLocator??=nr(e.source),e.sourceLocator(t)}function Fn(e,t,n){if(t===void 0||n===void 0||n<t)return;let i=qo(e,t),r=qo(e,n);if(!i||!r)return;return{start:i,end:r}}function Vo(e){if(!Ee(e))return{};return{start:typeof e.start==="number"?e.start:void 0,end:typeof e.end==="number"?e.end:void 0}}function w(e,t){let{start:n,end:i}=Vo(t);return Fn(e,n,i)}function oe(e,t){if(!t||t.length===0)return;let n=[...t];while(n.length>1){let p=n[n.length-1];if(p.tag!==void 0||!p.raw.trim().endsWith("*/"))break;n.pop()}let 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 Fn(e,s,o)}function B(e,t,n){return e.source?.slice(t,n)}function Se(e,t){let{start:n,end:i}=Vo(t);if(n===void 0||i===void 0)return;return B(e,n,i)}function W(e,t){return Se(e,t)?.replace(Hd," ")}var Wd=/\*\//g,zd=/[.*+?^${}()|[\]\\]/g;function Jt(e){return e.replace(zd,"\\$&")}function Le(e){return e.replace(Wd,"*\\/")}function Ce(e){return e.map((t)=>`${t.name}${t.optional?"?":""}: ${t.type}`).join(", ")}var Ud=new Intl.Collator("en");function Ie(e,t){return Ud.compare(e,t)}function Wo(e,t){if(t===void 0)return;return e.runesPropsDeclarationMetadataByDeclaratorStart.get(t)}function zo(e){return e.type==="Identifier"?e.name:e.right.name}function Uo(e){return e.type==="Identifier"?e.name:Uo(e.left)}function Jo(e,t,n){let i=t?.start,r=t?.end;if(i===void 0||r===void 0)return;return B(e,i+n,r)?.trim()}function _e(e,t){return Jo(e,t,1)}function rt(e,t){return Jo(e,t,0)}function Re(e,t,n,i,r=new Set){if(!t)return;let s=(a)=>Re(e,a,n,i,r);K(t,{enter(a){switch(a.type){case"TSInterfaceDeclaration":for(let o of a.extends??[])Go(e,o.expression,o.typeParameters?.params,n,i,r);return Ho(a.body.body,s),te;case"TSTypeAliasDeclaration":case"TSTypeAnnotation":return s(a.typeAnnotation),te;case"TSTypeLiteral":return Ho(a.members,s),te;case"TSTypeReference":return Go(e,a.typeName,a.typeArguments?.params,n,i,r),te}}})}function Jd(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)??e.additionalImportedTypes.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])=>Ie(i,r)).map(([i,r])=>{if(r.namespace.length>0)return r.namespace.map((p)=>`import type * as ${p} from "${i}";`).join(`
|
|
17
|
+
`);let s=r.named.map(({imported:p,local:l})=>{if(!p||p===l)return l;return`${p} as ${l}`}),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 Go(e,t,n,i,r,s){let a=Uo(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 p of n??[])Re(e,p,i,r,s)}function Ho(e,t){for(let n of e)if(n.type==="TSPropertySignature")t(n.typeAnnotation?.typeAnnotation)}function M(e,t){if(t)e.additionalTypeDependencyNodes.push(t)}function Kd(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 Ko(e,t){let n=Kd(t);if(n)return n;let i=B(e,t.start,t.end)?.trim();return i?`declare ${i}`:void 0}function vr(e,t){let n=[];for(let i of t.params){let r=i.type==="TSParameterProperty"?i.parameter:i;if(r.type==="RestElement"){M(e,r.typeAnnotation?.typeAnnotation),n.push({name:r.argument.type==="Identifier"?r.argument.name:"rest",type:_e(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;M(e,o?.typeAnnotation),n.push({name:a.type==="Identifier"?a.name:"arg",type:_e(e,o),optional:s||"optional"in r&&r.optional===!0,rest:!1})}M(e,t.returnType?.typeAnnotation);for(let i of t.typeParameters?.params??[])M(e,i.constraint),M(e,i.default);return{params:n,returnType:_e(e,t.returnType),typeParameters:rt(e,t.typeParameters)||void 0}}function On(e,t){let{params:n,returnType:i,typeParameters:r}=vr(e,t),s=n.map(({name:o,type:p,optional:l,rest:c})=>c?`...${o}: ${p??"any[]"}`:`${o}${l?"?":""}: ${p??"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 Kt(e){return e.length>0?e.slice():void 0}function Xo(e){let t=Kt(e.pendingCallDefaultCandidates),n=Kt(e.pendingConstDefaultCandidates),i=Kt(e.pendingContextKeyCandidates),r=Kt(e.pendingDispatchEscapeCandidates);if(!t&&!n&&!i&&!r)return;let s=Kt(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 Yo(e){let t=new Set,n=new Set;for(let p of e.additionalTypeDependencyNodes)Re(e,p,t,n);for(let p of e.additionalImportedTypes.keys())t.add(p);let i=Array.from(e.localTypeDeclarationsByName.values()).filter((p)=>p.exported).sort((p,l)=>p.start-l.start);for(let p of i)Re(e,p.node,t,n);let r=i.map((p)=>`export ${p.code}`),s=e.typedRunesPropsDeclarations.length===1?e.typedRunesPropsDeclarations[0]:void 0,a=s?.canonicalType;if(s&&a){for(let p of s.referencedImportedTypes)t.add(p);for(let p of s.referencedLocalTypes)n.add(p)}if(!a&&t.size===0&&n.size===0&&r.length===0)return;let o=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:s&&a?Array.from(s.props.keys()).sort():[],localTypeDeclarations:o,...r.length>0?{moduleTypeDeclarations:r}:{},typeImportStatements:Jd(e,t)}}function Xd(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 Yd(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 Qd(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 mr(n,a.end,t)?a:void 0}return}function Zd(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;Xd(r,e.source,a.start,a.end,n),Yd(a.body,i)}n.sort((s,a)=>s.end-a.end);for(let s of i){let a=Qd(n,s.start,e.source);if(!a)continue;let o=xr(e,e.source.slice(a.start,a.end)),{type:p,description:l,ignore:c,internal:d}=Bn(o);if(c.length>0)Te(e,"context-any-type",s.name,c);if(!p&&!l&&!d)continue;t.set(s.name,{type:p?Ne(p.type):void 0,description:l||p&&Mo(p),internal:d||void 0})}return t}function Qo(e,t){if(!e.variableInfoCacheBuilt)e.variableInfoCache=Zd(e),e.variableInfoCacheBuilt=!0;return e.variableInfoCache.get(t)}function st(e,t){let n=lr(e,t);if(n?.type)return{type:n.type,description:n.description,internal:n.internal};let i=Qo(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 St(e,t){let n=st(e,t);if(n&&n.type===e.explicitVariableTypesByName.get(t))M(e,e.explicitVariableTypeNodesByName.get(t));return n}function Zo(e,t){let n=Qo(e,t);return{...n?.description?{description:n.description}:{},...n?.internal?{internal:!0}:{}}}function Me(e,t){for(let n of e.vars)if(n.declarations.some((i)=>i.id.type==="Identifier"&&i.id.name===t))return G(e,n);return G(e,e.funcDecls.get(t))}var ef=/\w/;function tf(e,t){let n=e.trim();if(!n.startsWith("{")||!n.endsWith("}"))return;let i=V(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(ef.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 jn(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 Ht(e,i);let r=Ht(e,n)??st(e,n)?.type;if(!r)return;return tf(r,i)}var nf=/(?:_|[^\p{ID_Continue}$])+/u,rf=/^[\p{ID_Start}$]/u;function qn(e){let i=`${e.split(nf).map((r)=>r.charAt(0).toUpperCase()+r.slice(1)).join("")}Context`;return rf.test(i)?i:`_${i}`}var sf=/^\{([\s\S]*)\}$/,of=/^[A-Za-z_$][\w$]*$/,af=/^\[[\w$]+\s*:[^\]]+\]$/;function Be(e,{skipIndexSignatures:t=!1}={}){let n=e.trim(),i=sf.exec(n);if(!i)return null;let r=i[1].trim();if(r==="")return[];let s=[];for(let a of V(r,";,")){let o=a.trim();if(!o)continue;let p=Nn(o,":");if(p===-1)return null;let l=o.slice(0,p).trim(),c=o.slice(p+1).trim();if(!c)return null;if(t&&af.test(l))continue;let d=!1;if(l.endsWith("?"))d=!0,l=l.slice(0,-1).trim();if(!of.test(l))return null;s.push({name:l,type:c,optional:d})}return s}function Xt(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 Yt(e){return[e.importedName,...e.members??[]].join(".")}function Er(e,t){let n=[],i=t;while(He(i)){if(i.computed||!T(i.property))return;n.unshift(i.property.name),i=i.object}if(!T(i))return;return Tr(e,i.name,n)}function Tr(e,t,n=[]){let i=(s,a,o)=>o.length>0?{source:s,importedName:a,members:o}:{source:s,importedName:a},r=e.valueImportBindingsByLocalName.get(t);if(r)return i(r.source,r.importedName,n);for(let s of[e.parsed?.instance,e.parsed?.module])for(let a of s?.content.body??[]){if(a.type!=="ImportDeclaration")continue;let o=a.source.value;if(a.importKind==="type"||typeof o!=="string")continue;let p=a.specifiers.find((l)=>l.local.name===t);if(p?.type==="ImportDefaultSpecifier")return i(o,"default",n);if(p?.type==="ImportNamespaceSpecifier"&&n.length>0)return i(o,n[0],n.slice(1))}return}function Vn(e,t){if(!He(t))return;return Er(e,t)}function ea(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 Sr(e,t){for(let n of t?.content.body??[]){if(n.type==="ImportDeclaration"){Xt(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 Gn(e){return e==="TSTypeAnnotation"||e==="TSTypeAliasDeclaration"||e==="TSInterfaceDeclaration"||e==="TSTypeParameterDeclaration"||e==="TSTypeParameterInstantiation"}function ta(e){let t=[];return K(e,{enter(n){if(n.type==="FunctionDeclaration"||n.type==="FunctionExpression"||n.type==="ArrowFunctionExpression")return te;if(n.type==="ReturnStatement")t.push(n.argument??null)}}),t}function kt(e,t,n){if(!t)return;$n(e,t);let i=e.props.get(t);e.props.set(t,i?{...i,...n}:n)}function Hn(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 pf=/[^\S\r\n]*[\r\n]\s*/g,lf=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 Fe(e,t,n=0){let i=df(e,t,n),r=t&&typeof t==="object"?oa(e,t):void 0;return r===void 0?i:{...i,type:r}}var cf=/^\s*\(\s*$/;function oa(e,t){let{constAssertions:n,typeAssertions:i}=e.typeCasts;if(n.has(t))return Ct(t,"const");let r=i.get(t);if(r)return M(e,r),W(e,r);return uf(e,t)}function uf(e,t){let n="start"in t&&typeof t.start==="number"?t.start:void 0;if(n===void 0)return;let i=e.parsed?.comments.findLast((r)=>r.end<=n);if(i?.type!=="Block"||!i.value.startsWith("*"))return;if(!cf.test(B(e,i.end,n)??""))return;return Fo(i.value)}function df(e,t,n){let i,r,s=!1;if(!t||typeof t!=="object"||!("type"in t))return{value:i,type:r,isFunction:s};let a=sa(e,t);if(t.type==="ObjectExpression"||t.type==="BinaryExpression"||t.type==="ArrayExpression"||t.type==="ArrowFunctionExpression"||t.type==="FunctionExpression"){if(i=W(e,t),s=t.type==="ArrowFunctionExpression"||t.type==="FunctionExpression",t.type==="BinaryExpression")r=ne(e,t,n);else if(t.type==="ObjectExpression"||t.type==="ArrayExpression")r=Ct(t,"widen");else if(s)r=la(t),i=ra(e,t)}else if(t.type==="UnaryExpression")i=Se(e,t),r=ne(e,t,n);else if(t.type==="LogicalExpression"||t.type==="ConditionalExpression"||t.type==="SequenceExpression"){let o=Se(e,t)?.replace(pf," ");i=o!==void 0&&t.type==="SequenceExpression"?`(${o})`:o,r=ne(e,t,n)}else if(t.type==="NewExpression"){i=Se(e,t);let o=t.callee;if(T(o))r=lf.get(o.name)??o.name}else if(t.type==="CallExpression"){let o=t;i=Se(e,t);let p=o.callee,l=T(p)?p.name:void 0;if((l==="$derived"||l==="$state")&&o.arguments.length===1&&n<5)return{...Fe(e,o.arguments[0],n+1),value:i,defaultValue:a};if(l){let c=yf(e,l);if(c)return{value:i,type:void 0,isFunction:!1,defaultValue:a,resolvedType:c};if(e.funcDecls.has(l)||aa(e,l))return{value:i,type:void 0,isFunction:!1,defaultValue:a,pendingCallDefault:{calleeName:l}};let d=e.valueImportBindingsByLocalName.get(l);if(d)return{value:i,type:void 0,isFunction:!1,defaultValue:a,pendingCallDefault:{calleeName:l,importSource:d.source,importedName:d.importedName}}}return{value:i,type:void 0,isFunction:!1,defaultValue:a,pendingCallDefault:{calleeName:l??Se(e,p)??"call"}}}else if(t.type==="Identifier"){let o=t;if(n<5){let l=Qt(e,o.name);if(l){let c=Fe(e,l,n+1),d=Me(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=Me(e,o.name),d=e.funcDecls.get(o.name);return{value:d?ra(e,d):void 0,type:void 0,isFunction:!0,defaultValue:d?sa(e,d):void 0,resolvedType:c?.type??pa(c,d),resolvedDescription:c?.description,resolvedParams:c?.params,resolvedReturnType:c?.returnType}}}i=Se(e,o);let p=e.valueImportBindingsByLocalName.get(o.name);if(p)return{value:i,type:r,isFunction:s,defaultValue:a,pendingConstDefault:{importSource:p.source,importedName:p.importedName}}}else if(t.type==="MemberExpression"){if(i=Se(e,t),Cf(t))r="number";let o=Vn(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=ot(t);return{value:i,type:r,isFunction:s,defaultValue:a}}function ot(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 ff=new Set(["-","*","/","%","**","<<",">>",">>>","&","|","^"]),hf=new Set(["==","!=","===","!==","<","<=",">",">=","in","instanceof"]);function ne(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 ne(e,i.argument,n)==="bigint"?"bigint":"number"}case"BinaryExpression":{let i=t;if(hf.has(i.operator))return"boolean";let r=ne(e,i.left,n),s=ne(e,i.right,n);if(r==="bigint"&&s==="bigint")return"bigint";if(ff.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 na([ne(e,i.left,n),ne(e,i.right,n)])}case"ConditionalExpression":{let i=t;return na([ne(e,i.consequent,n),ne(e,i.alternate,n)])}case"SequenceExpression":{let i=t.expressions;return ne(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=st(e,i)?.type;if(r)return r;if(n>=5)return;return ne(e,Qt(e,i),n+1)}default:{if(n>=5)return;let i=Fe(e,t,n+1);return i.type??i.resolvedType}}}function na(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 Ct(e,t){if(!e||typeof e!=="object"||!("type"in e))return;let n=t==="widen";switch(e.type){case"Literal":{let i=e;if("regex"in i&&i.regex)return"RegExp";if(i.value===null)return"null";return n?ot(i):i.raw??void 0}case"TemplateLiteral":{if(e.expressions.length>0)return;return n?"string":`\`${e.quasis[0]?.value.raw??""}\``}case"Identifier":return e.name==="undefined"?"undefined":void 0;case"UnaryExpression":{let i=e,r=i.argument;if(i.operator!=="-"||r?.type!=="Literal")return;let s=ot(r);if(s!=="number"&&s!=="bigint")return;return n?s:`-${r.raw}`}case"ArrayExpression":{let i=[];for(let a of e.elements){let o=a===null?void 0:Ct(a,t);if(o===void 0)return;i.push(o)}if(t==="literal")return`[${i.join(", ")}]`;if(t==="const")return`readonly [${i.join(", ")}]`;let r=new Set(i);if(r.size===0)return"any[]";let s=[...r].join(" | ");return r.size===1?`${s}[]`:`(${s})[]`}case"ObjectExpression":{let i=new Map;for(let s of e.properties){if(s.type!=="Property"||s.kind!=="init"||s.computed||s.method||s.shorthand)return;let{key:a}=s,o=a.type==="Identifier"?a.name:a.type==="Literal"?a.raw:void 0,p=Ct(s.value,t);if(o===void 0||p===void 0)return;i.delete(o),i.set(o,p)}if(i.size===0)return"{}";let r=t==="const"?"readonly ":"";return`{ ${[...i].map(([s,a])=>`${r}${s}: ${a}`).join("; ")} }`}default:return}}function Wn(e,t){let n=Qt(e,t);if(n===void 0){let i=e.funcDecls.get(t);return i&&ia(e,t,i)}if(!n||typeof n!=="object"||!("type"in n))return;if(n.type==="ArrowFunctionExpression"||n.type==="FunctionExpression"){let i=n;return oa(e,i)??ia(e,t,i)}if(n.type==="CallExpression"){let i=n,r=kr(e,i);if(r)return r;let s=W(e,i.callee);if(s==="$state"||s==="$state.raw"||s==="$derived"){let a=i.typeArguments?.params[0];if(a)return M(e,a),W(e,a);if(s==="$state.raw")return Fe(e,i.arguments[0],1).type}}return Fe(e,n).type}function ia(e,t,n){let i=On(e,n);if(i.hasAnnotations)return i.signature;let r=Me(e,t);return r?.type??pa(r,n)}var mf=new Map([["writable","Writable"],["readable","Readable"],["derived","Readable"]]);function kr(e,t){let n=T(t.callee)?e.valueImportBindingsByLocalName.get(t.callee.name):void 0,i=n?.source==="svelte/store"?mf.get(n.importedName):void 0;if(!i)return;let r=n?.importedName==="derived",s=t.typeArguments?.params[r?1:0],a;if(s)M(e,s),a=W(e,s);else if(r){let o=t.arguments[1];a=(o?.type==="ArrowFunctionExpression"||o?.type==="FunctionExpression")&&o.params.length<2?wr(o):void 0}else{let[o]=t.arguments;a=(T(o)?St(e,o.name)?.type:void 0)??ne(e,o,0)}return`import("svelte/store").${i}<${a??"any"}>`}function Qt(e,t,n=!1){for(let i of e.vars){if(n&&i.kind!=="const")continue;for(let r of i.declarations)if(T(r.id)&&r.id.name===t&&r.init)return r.init}return}function wt(e,t){return Qt(e,t,!0)}function yf(e,t){let n=Me(e,t);if(n?.returnType)return n.returnType;let i=e.funcDecls.get(t)??aa(e,t);if(!i)return;let r=xf(e,i);if(r)return r;let s=gf(e,t);if(s)return s;let a=wr(i);return a==="any"?void 0:a}function aa(e,t){let n=Qt(e,t);if(!n||typeof n!=="object"||!("type"in n))return;if(n.type==="ArrowFunctionExpression"||n.type==="FunctionExpression")return n;return}function gf(e,t){for(let n of e.vars)for(let i of n.declarations){let r=i.id;if(!T(r)||r.name!==t)continue;let s=r.typeAnnotation?.typeAnnotation;if(!s)return;return No(B(e,s.start,s.end))}return}function xf(e,t){let n=t.returnType?.typeAnnotation;return n&&B(e,n.start,n.end)}function pa(e,t){let n=e?.returnType??"any",i=e?.params;if(i&&i.length>0)return`(${Ce(i)}) => ${n}`;if(e?.returnType)return`() => ${n}`;return t?la(t):"(...args: any[]) => any"}function la(e){return`(${bf(e)}) => ${wr(e)}`}function bf(e){let t=e.params;if(!Array.isArray(t)||t.length===0)return"...args: any[]";let n=[];for(let i of t){if(!T(i))return"...args: any[]";n.push(`${i.name}: any`)}return n.join(", ")}function wr(e){if(e.async||e.generator)return"any";let{body:t}=e,n=t.type==="BlockStatement"?ta(t):[t],i=new Set(n.map(vf)),[r]=i;return i.size===1&&r?r:"any"}function vf(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(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 ca(e){return se(e,"$bindable")?{init:e.arguments[0],bindable:!0}:{init:e,bindable:!1}}function Ef(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 B(e,i.start,r.end)??""}function ra(e,t){if(t.generator)return;let{body:n}=t,i=Ef(e,t),r=t.async?"async ":"",s=(p,l)=>p.type==="ObjectExpression"?`(${l})`:l;if(n.type!=="BlockStatement"){let p=W(e,n);return p===void 0?void 0:`${r}(${i}) => ${s(n,p)}`}let a=n.body;if(a.length===0)return`${r}(${i}) => {}`;let[o]=a;if(a.length===1&&o.type==="ReturnStatement"&&o.argument){let p=W(e,o.argument);if(p!==void 0)return`${r}(${i}) => ${s(o.argument,p)}`}return}function sa(e,t){let n=W(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=Cr(t);if(s.ok)r.value=s.value}return r}function Cr(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=Cr(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=U(i.key);if(!r)return{ok:!1};let s=Cr(i.value);if(!s.ok)return{ok:!1};n[r]=s.value}return{ok:!0,value:n}}return{ok:!1}}var Tf=new Set(["POSITIVE_INFINITY","NEGATIVE_INFINITY","MAX_VALUE","MIN_VALUE","MAX_SAFE_INTEGER","MIN_SAFE_INTEGER","EPSILON","NaN"]),Sf=new Set(["PI","E","LN2","LN10","LOG2E","LOG10E","SQRT2","SQRT1_2"]);function Cf(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 Tf.has(i);if(n==="Math")return Sf.has(i);return!1}function ie(e,t,n){if(!t||e.has(t))return;e.set(t,n)}function zn(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 at(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 Un(e,t){let n=t;while(He(n))n=n.object;return T(n)&&at(e,n.name)}function F(e,t=new Set){if(e)for(let n of ir(e))t.add(n.name);return t}function Pr(e,t){if(!t||typeof t!=="object"||!("type"in t))return;if(t.type==="Identifier"){let n=zn(e,t.name);if(n)e.reactive_vars.add(n);return}if(t.type!=="ObjectPattern"&&t.type!=="ArrayPattern")return;for(let n of F(t)){let i=zn(e,n);if(i)e.reactive_vars.add(i)}}function At(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 ua(e){if(!e||typeof e!=="object"||!("type"in e))return!1;let t=String(e.type);return t==="FunctionDeclaration"||t==="FunctionExpression"||t==="ArrowFunctionExpression"}function kf(e,t){let n=e.scopeDeclarations.get(t);if(!n)n=new Map,e.scopeDeclarations.set(t,n);return n}function wf(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=U(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 Ar(e,t,n,i){if(!Ao(e))return;let r=e.kind==="var"?n:t;for(let s of e.declarations){if(i?.allowRunesProps&&se(s.init,"$props")){for(let a of wf(s))ie(a.kind==="prop"?t:n,a.name,a.kind==="prop"?{kind:"prop",publicPropName:a.publicPropName}:{kind:"local"});continue}for(let a of F(s.id))ie(r,a,i?.forceProp?{kind:"prop",publicPropName:a}:{kind:"local"})}}function Af(e,t){if(e.id)ie(t,e.id.name,{kind:"local"});for(let n of e.params){let i=n.type==="TSParameterProperty"?n.parameter:n;for(let r of F(i))ie(t,r,{kind:"local"})}}function Pf(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":Ar(i,t,n);break;case"FunctionDeclaration":case"ClassDeclaration":if(i.id?.name)ie(t,i.id.name,{kind:"local"});break}}}function Df(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 Nf(e,t){for(let n of t?.content.body??[])switch(n.type){case"ImportDeclaration":for(let i of n.specifiers)if(i.local.name)ie(e.componentScope,i.local.name,{kind:"local"});break;case"VariableDeclaration":Ar(n,e.componentScope,e.componentScope,{allowRunesProps:!0});break;case"FunctionDeclaration":case"ClassDeclaration":if(n.id?.name)ie(e.componentScope,n.id.name,{kind:"local"});break;case"ExportNamedDeclaration":if(!n.declaration){if(n.source==null)Df(e,n.specifiers);break}if(n.declaration.type==="VariableDeclaration")Ar(n.declaration,e.componentScope,e.componentScope,{forceProp:!0});else if(n.declaration.type==="FunctionDeclaration"&&n.declaration.id?.name)ie(e.componentScope,n.declaration.id.name,{kind:"prop",publicPropName:n.declaration.id.name});break}}function da(e){e.componentScope.clear(),e.scopeDeclarations=new Map,e.activeScopes.length=0,Nf(e,e.parsed?.instance)}function fa(e){return{varScopeStack:[e.componentScope]}}function ha(e,t,n){if(!At(n))return;let i=kf(e,n),r=t.varScopeStack[t.varScopeStack.length-1]??e.componentScope;switch(n.type){case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":Af(n,i);break;case"BlockStatement":Pf(n.body,i,r);break;case"CatchClause":for(let s of F(n.param))ie(i,s,{kind:"local"});break;case"EachBlock":for(let s of F(n.context))ie(i,s,{kind:"local"});if(typeof n.index==="string")ie(i,n.index,{kind:"local"});break;case"AwaitBlock":for(let s of F(n.value))ie(i,s,{kind:"local"});for(let s of F(n.error))ie(i,s,{kind:"local"});break}if(ua(n))t.varScopeStack.push(i);return i}function ma(e,t){if(ua(t))e.varScopeStack.pop()}function Jn(e,t,n=!0){let i=St(e,t);if(i||!n)return i;let r=Wn(e,t);return r?{type:r,...Zo(e,t)}:null}function $f(e,t,n){if(!T(t))return null;let i=wt(e,t.name);if(X(i))return Ta(e,i,n).properties;let r=Jn(e,t.name);return r?Be(r.type):null}function Lf(e,t){return e.properties.some((n)=>n.type==="Property"&&n.kind==="get"&&U(n.key)===t)}function ya(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 W(e,i.typeAnnotation)}function If(e){let t=e?.body.body;if(t?.length!==1||t[0].type!=="ReturnStatement")return;return t[0].argument??void 0}function _f(e,t,n,i,r){if(T(r)){let a=Jn(e,r.name);if(a)return a;return D(e,"context-any-type",n,`Context "${t}" property "${n}" has no type annotation; defaulted to "any".`,w(e,i)),{type:"any"}}if(r?.type==="ArrowFunctionExpression"||r?.type==="FunctionExpression")return{type:`(${r.params.map((o)=>`${T(o)?o.name||"arg":"arg"}: any`).join(", ")}) => any`};if(nt(r))return{type:ot(r)??"null"};return{type:(r?.type==="CallExpression"?kr(e,r):void 0)??"any"}}function Ta(e,t,n){let i=[],r=!1;for(let s of t.properties){if(s.type==="SpreadElement"){let c=$f(e,s.argument,n);if(c)i.push(...c);else r=!0,D(e,"spread-unresolved",n,`Context "${n}" spreads a value sveld can't resolve; its shape is widened to "Record<string, any>".`,w(e,s));continue}if(s.type!=="Property")continue;let a=U(s.key);if(!a)continue;if(s.kind==="set"&&Lf(t,a))continue;let o=s.kind==="get"||s.kind==="set"?s.value:void 0,p=o?s.kind==="get"?ya(e,o,"returnType"):ya(e,o.params[0],"typeAnnotation"):void 0,l=p?{type:p}:_f(e,n,a,s,s.kind==="get"?If(o):s.kind==="set"?void 0:s.value);i.push({name:a,type:l.type,description:l.description,optional:!1,...l.internal?{internal:!0}:{}})}return{properties:i,hasUnresolvedSpread:r}}function ga(e,t,n){let{properties:i,hasUnresolvedSpread:r}=Ta(e,t,n);return{key:n,typeName:qn(n),properties:i,description:void 0,...r?{hasUnresolvedSpread:r}:{}}}function xa(e,t,n){if(X(t))return ga(e,t,n);if(!T(t))return null;let i=t.name,r=Jn(e,i,!1),s=r?void 0:wt(e,i);if(X(s))return ga(e,s,n);let a=r??Jn(e,i);if(a){let o=Be(a.type);return{key:n,typeName:qn(n),...o?{}:{type:a.type},properties:o??[],description:a.description,...a.internal?{internal:!0}:{}}}return D(e,"context-any-type",i,`Context "${n}" variable "${i}" has no type annotation; defaulted to "any".`,w(e,t)),{key:n,typeName:qn(n),type:"any",properties:[]}}function ba(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 va(e){return{kind:"pending",importSource:e.source,importedName:e.importedName,...e.members?{members:e.members}:{}}}function Sa(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=Do(i);return r==null?{kind:"unresolved"}:{kind:"resolved",key:r}}if(i.type==="CallExpression"||i.type==="NewExpression"){let r=ba(i);return r==null?{kind:"unresolved"}:{kind:"resolved",key:r}}if(i.type==="Identifier"){if(n>=5)return{kind:"unresolved"};let r=wt(e,i.name);if(r&&typeof r==="object"&&"type"in r){let a=r;if((a.type==="CallExpression"||a.type==="NewExpression")&&ba(a)==="")return{kind:"resolved",key:i.name};return Sa(e,a,n+1)}let s=n===0&&at(e,i.name)?void 0:e.valueImportBindingsByLocalName.get(i.name);return s?va(s):{kind:"unresolved"}}if(i.type==="MemberExpression"){let r=n===0&&Un(e,i)?void 0:Vn(e,i);if(r)return va(r)}return{kind:"unresolved"}}function Ea(e,t,n,i,r){let s=W(e,i)??"";D(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 Ca(e,t){let n=t.arguments[0];if(!n)return;let i=Sa(e,n);if(i.kind==="unresolved"||i.kind==="resolved"&&!i.key){let p=W(e,n)??"";D(e,"context-key-unresolved",p,`setContext key \`${p}\` isn't a string literal, const-bound string, Symbol(), or imported \`export const\` string; the context is skipped.`,w(e,t));return}let r=t.arguments[1];if(!r)return;let s=w(e,t);if(i.kind==="pending"){let p=Yt(i),l=xa(e,r,p);if(l)e.pendingContextKeyCandidates.push({importSource:i.importSource,importedName:i.importedName,...i.members?{members:i.members}:{},...l.type===void 0?{}:{type:l.type},properties:l.properties,description:l.description,...l.hasUnresolvedSpread?{hasUnresolvedSpread:!0}:{},...l.internal?{internal:!0}:{},source:s});else Ea(e,p,p,r,s);return}let a=i.key,o=xa(e,r,a);if(!o){Ea(e,a,JSON.stringify(a),r,s);return}if(e.contexts.has(a)){D(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 Rf=new Set(["Component","SvelteComponent","SvelteSelf"]),Mf=new Set(["RegularElement","SvelteElement"]);function Pt(e){return Rf.has(e)}function pt(e){return Mf.has(e)}var Bf=/\n/g,Ff=/^[A-Za-z_$][\w$]*$/;function Dr(e,t){return{variableType:(n)=>{if(t?.has(n))return;return St(e,n)?.type??Wn(e,n)}}}function Zt(e,t,n){if(!t||typeof t!=="object"||!("type"in t))return n;if(T(t)){if(!at(e,t.name))return n;let r=n??new Set;return r.add(t.name),r}let i=n;if(X(t)){for(let r of t.properties)if(r.type==="Property")i=Zt(e,r.value,i)}else if(t.type==="ArrayExpression")for(let r of t.elements)i=Zt(e,r,i);return i}function Nr(e,t){if(T(t))return e.variableType(t.name);return Of(e,t)}function Of(e,t){if(!t||typeof t!=="object"||!("type"in t))return;if(X(t))return wa(e,t);if(t.type==="ArrayExpression")return Aa(e,t);return}function ka(e,t){if(!t||typeof t!=="object"||!("type"in t))return"any";if(T(t))return e.variableType(t.name)??"any";if(nt(t))return ot(t)??"null";if(X(t))return wa(e,t);if(t.type==="ArrayExpression")return Aa(e,t);return"any"}function wa(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?U(r.key):void 0;if(r.type!=="Property"||!s){i=!0;continue}n.push({name:s,type:ka(e,r.value)})}if(!i)return en(n);if(n.length===0)return"Record<string, any>";return en([...n,{name:"[key: string]",type:"any"}])}function Aa(e,t){let n=new Set(t.elements.filter((i)=>i!=null).map((i)=>ka(e,i)));if(n.size===0)return"any[]";if(n.size===1)return`${[...n][0]}[]`;return`(${[...n].join(" | ")})[]`}function Pa(e,t){for(let[n,i]of e.arguments.entries()){if(T(i)&&i.name===t)return{argumentIndex:n};if(!X(i))continue;for(let r of i.properties){if(r.type!=="Property"||!T(r.value))continue;if(r.value.name!==t)continue;let s=!r.computed&&T(r.key)?r.key.name:void 0;return{argumentIndex:n,property:s??""}}}return}function $r(e){return typeof e==="string"?JSON.stringify(e):String(e)}function We(e,{name:t,detail:n,has_argument:i,description:r,deprecated:s,tags:a,internal:o,source:p}){if(t===void 0)return;let l=!i&&!n?"null":n||void 0,c=e.events.get(t);if(c?.type==="forwarded")e.events.set(t,{type:"dispatched",name:t,detail:l,description:r||c.description,deprecated:s??c.deprecated,tags:a??c.tags,...o||c.internal?{internal:!0}:{},source:p||c.source});else if(c){let d=e.untypedJsDocEventNames.delete(t);e.events.set(t,{...c,detail:c.detail===void 0||d?l:c.detail,description:c.description||r,deprecated:c.deprecated??s,tags:c.tags??a,...c.internal||o?{internal:!0}:{},source:p||c.source})}else e.events.set(t,{type:"dispatched",name:t,detail:l,description:r,deprecated:s,tags:a,...o?{internal:!0}:{},source:p})}function Da(e,t){let n=t.arguments[0],i=sr(n,"CustomEvent");if(!i&&!sr(n,"Event"))return;let r=n.arguments[0],s=nt(r)?r.value:void 0;if(s==null)return;let a=i?n.arguments[1]:void 0,o=!1,p;if(X(a)){let l=a.properties.find((c)=>c.type==="Property"&&T(c.key)&&c.key.name==="detail");if(l?.type==="Property")o=!0,p=l.value}return{name:String(s),detail:p,hasArgument:o,nestedBoundNames:Zt(e,p),source:w(e,t)}}function Na(e,t){let n=Nr(Dr(e,t.nestedBoundNames),t.detail),i=n===void 0&&nt(t.detail)?t.detail.value:void 0;We(e,{name:t.name,detail:n??(i==null?"":$r(i)),has_argument:t.hasArgument,source:t.source})}function en(e,t=!1){if(e.length===0)return"null";let n=e.map(({name:i,type:r,description:s,optional:a,default:o})=>{let p=a?"?":"",l=Ff.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(`
|
|
18
18
|
`)?`/**
|
|
19
19
|
${d.split(`
|
|
20
20
|
`).map((h)=>h?` * ${h}`:" *").join(`
|
|
21
21
|
`)}
|
|
22
22
|
*/`:`/** ${d} */`}
|
|
23
|
-
${
|
|
23
|
+
${l}${p}: ${r};`;return`/** ${d.replace(Bf," ")} */ ${l}${p}: ${r};`}return`${l}${p}: ${r};`}).join(t?`
|
|
24
24
|
`:" ");return t?`{
|
|
25
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(
|
|
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,`
|
|
26
|
+
}`:`{ ${n} }`}function jf({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 Kn(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}>`:""}(${Ce(n??[])}) => ${i}`;let s=e.jsdocDescription??e.resolvedDescription;if(s===void 0&&t!==void 0)s=e.typedefs?.get(t)?.description;let a=jf({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("=>")),p=o?e.jsdocTypeParameters:void 0;return{type:t,typeSource:a,description:s,params:n,returnType:i,isFunction:o,typeParameters:p}}function Xn(e){if(e?.type==="Identifier")return e.name;return typeof e?.value==="string"?e.value:void 0}function $a(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:F(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 qf(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(!F(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 Vf(e){if(e==="var")return"let";if(e==="using"||e==="await using")return"const";return e}function Lr(e,t,n,i,r){let s=Xn(n.local),a=Xn(n.exported);if(!s||!a)return;if(t.source!=null)return{localName:s,exportedName:a};let o=$a(i,s);if(!o&&r==="instance")o=$a(e.parsed?.module?.content,s)??qf(i,s);return{localName:s,exportedName:a,...o}}function Ir(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";D(e,"export-unresolved",i,`export "${i}" was skipped because ${s}; sveld only resolves exports of a local declaration.`,w(e,t))}function Yn(e,t,n){if(!n)return G(e,t);let i=t.specifiers.length===1?G(e,t):void 0,r=G(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 _r(e,t,n,i){let r=[];if(t.type==="FunctionDeclaration"){if(!t.id)return r;let o=e.scriptLanguage==="ts"?On(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=Vf(t.kind),a=n?.declarator?[n.declarator]:t.declarations;for(let{id:o,init:p}of a){if(o.type!=="Identifier"){for(let k of F(o)){if(n&&n.localName!==k)continue;r.push({prop_name:n?.exportedName??k,kind:s,isFunctionDeclaration:!1,value:void 0,typeSeed:void 0,explicitType:void 0,initializerIsFunction:!1,isRequired:!1,localName:k,defaultValue:void 0,inferredTypeForSource:void 0,resolvedJSDoc:void 0})}continue}let l=o.name,c=n?.exportedName??l,d=p==null?{isFunction:!1}:Fe(e,p),{value:f,isFunction:h,defaultValue:m}=d,g=(s==="const"&&(p?.type==="ObjectExpression"||p?.type==="ArrayExpression")&&!e.typeCasts.constAssertions.has(p)?Ct(p,"literal"):void 0)??d.type;Hn(e,d,c,i),r.push({prop_name:c,kind:s,isFunctionDeclaration:!1,value:f,typeSeed:g,explicitType:e.explicitPropTypesByName.get(l),initializerIsFunction:h,isRequired:s==="let"&&p==null,localName:l,defaultValue:m,inferredTypeForSource:g,resolvedJSDoc:d})}return r}function Rr(e,t,n){let{resolvedJSDoc:i}=t;return Kn({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 Gf(e,t,n){D(e,"export-unresolved",n,`export "${n}" was skipped because a class can't be a prop; export it from the module script instead.`,w(e,t))}function La(e,t,n,i){if(n.type==="ClassDeclaration"){if(n.id)Gf(e,t,i?.exportedName??n.id.name);return}let r=_r(e,n,i,"props");if(r.length===0)return;let s=Yn(e,t,i);for(let a of r){let{prop_name:o,kind:p,localName:l}=a,{type:c,typeSource:d,description:f,params:h,returnType:m,isFunction:y,typeParameters:g}=Rr(e,a,s);Te(e,"prop-unknown-type",o,s?.sveldIgnore),kt(e,o,{name:o,...l!==void 0&&l!==o?{localName:l}:{},kind:p,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:p==="const",reactive:e.reactive_vars.has(o),source:w(e,t)})}}function Ia(e,t,n){if(t.declaration!=null){La(e,t,t.declaration);return}for(let i of t.specifiers){let r=Lr(e,t,i,n,"instance");if(!r)continue;if(r.declaration)La(e,t,r.declaration,r);else Ir(e,t,r.localName,r.exportedName)}}function Hf(e){if(!e||typeof e!=="object"||!("type"in e))return;let t=String(e.type),n=Pt(t);if(!n&&!pt(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 Ra(e,t){let n=Hf(t);if(!n)return;if(e.rest_props!==void 0&&!(e.rest_props.type==="InlineComponent"&&n.type==="Element"))return;e.rest_props=n;let i=t&&typeof t==="object"&&"tag"in t?t.tag:void 0;e.restPropsTagLocal=n.name==="svelte:element"&&T(i)?i.name:void 0}function _a(e,t){let n=Et(t);if(se(n,"$derived"))n=Et(n.arguments[0]);if(!X(n))return;for(let i of n.properties){if(i.type!=="SpreadElement"||!T(i.argument))continue;let{name:r}=i.argument;if(r==="$$restProps"||e.restPropLocals.has(r))return r}return}function Ma(e,t){let n=new Map;for(let i of t?.content.body??[]){if(i.type==="VariableDeclaration"){for(let{id:a,init:o}of i.declarations){let p=T(a)?_a(e,o):void 0;if(p&&T(a))n.set(a.name,p)}continue}if(i.type!=="LabeledStatement"||i.label.name!=="$")continue;if(i.body.type!=="ExpressionStatement")continue;let r=i.body.expression;if(r.type!=="AssignmentExpression"||r.operator!=="="||!T(r.left))continue;let s=_a(e,r.right);if(s)n.set(r.left.name,s)}return n}var Wf=/^[A-Za-z_$][\w$]*/,zf=/[A-Za-z_$][\w$]*/g,Uf=/^(?:(?:const|in|out)\s+)+/;function Ba(e){let t=V(e,",").map((i)=>i.trim()).filter((i)=>i.length>0);if(t.length===0)return null;return[t.map((i)=>i.replace(Uf,"").match(Wf)?.[0]??i).join(", "),t.join(", ")]}function Fa(e,t,n){let i=e.scriptGenericsAttribute?.value;if(!i)return;for(let[r]of i.matchAll(zf)){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 Qn(e,t,n){if(e.generics)e.generics=[`${e.generics[0]}, ${t}`,`${e.generics[1]}, ${n}`];else e.generics=[t,n]}function Mr(e){if(!Array.isArray(e.value))return;return e.value.map((t)=>t.type==="Text"?t.data:"").join("").trim()}function Oa(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(Mr(r)?.toLowerCase()==="ts")return"ts"}return n?"js":void 0}function ja(e,t){let n=t.instance?.attributes.find((o)=>o.name==="generics");if(!n)return;let i=w(e,n),r=t.instance?.attributes.find((o)=>o.name==="lang");if((r?Mr(r)?.toLowerCase():void 0)!=="ts"){D(e,"syntax-skipped","generics",'<script generics="..."> requires lang="ts"; the generics attribute was ignored because the script is not TypeScript.',i);return}let a=Mr(n);if(!a)return;return{value:a,source:i}}var Jf=/[A-Za-z_$][\w$]*/g;function Kf(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,p=s[a];if(!o||p?.start===void 0||p?.end===void 0)continue;let l=B(e,p.start,p.end)?.trim();if(l)i.set(o,l)}return i}function Xf(e,t){if(t.size===0)return e;return e.replace(Jf,(n)=>t.get(n)??n)}function Zn(e,t,n,i=new Set){let r=new Map;if(!t?.type)return r;let s=(o)=>{for(let p of o){if(p?.type!=="TSPropertySignature"||p.computed||!p.key)continue;let l=U(p.key);if(!l)continue;let c=p.typeAnnotation?.start,d=p.typeAnnotation?.end;if(c===void 0||d===void 0)continue;let f=B(e,c+1,d)?.trim();if(!f)continue;M(e,p.typeAnnotation?.typeAnnotation);let h=G(e,p);r.set(l,{type:f,optional:p.optional===!0,source:w(e,p),...h?{jsdoc:h}:{}})}},a=(o)=>{let p=Zn(e,o,n,i);for(let[l,c]of p)r.set(l,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=zo(t.typeName);if(!o||i.has(o))break;let p=n.get(o);if(!p)break;i.add(o);let l=Zn(e,p,n,i);i.delete(o);let c=Kf(e,p,t);for(let[d,f]of l)r.set(d,c.size===0?f:{...f,type:Xf(f.type,c)});break}case"TSIntersectionType":for(let o of t.types??[])a(o);break}return r}function Va(e){return new Map(Array.from(e.localTypeDeclarationsByName,([t,n])=>[t,n.node]))}function Yf(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 Br(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"?Ko(e,t):B(e,t.start,t.end)?.trim();e.localTypeDeclarationsByName.set(t.id.name,{code:i??"",node:t,start:t.start,...n?{exported:n}:{}})}}function Ga(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=Oa(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:Yf(n.props)}:{},...n.extend===void 0?{}:{extend:!0}}:void 0,e.runesOptionOverride=t.options?.runes,e.scriptGenericsAttribute=ja(e,t);let i=new Set;for(let s of t.module?.content.body??[]){if(!s?.type)continue;if(s.type==="ExportNamedDeclaration"&&s.declaration)Br(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 Br(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(Br(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=_e(e,a.id.typeAnnotation);if(o)e.explicitPropTypesByName.set(a.id.name,o),M(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=_e(e,a.id.typeAnnotation);if(o){e.explicitVariableTypesByName.set(a.id.name,o);let p=a.id.typeAnnotation?.typeAnnotation;if(p)e.explicitVariableTypeNodesByName.set(a.id.name,p)}}}for(let s of r){if(!s||typeof s!=="object"||!("declarations"in s))continue;for(let a of s.declarations??[]){if(!se(Et(a.init),"$props"))continue;let o="typeAnnotation"in a.id?a.id.typeAnnotation:void 0,p=o?void 0:Po(a.init),l=o?.typeAnnotation??p,c=o?_e(e,o):rt(e,p),d=Zn(e,l,Va(e)),f=new Set,h=new Set;if(Re(e,l,f,h),Fa(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 qa(e,t){let n=t?.trim();if(!n)return;let i=e.typedefMembersByName.get(n)??Be(n,{skipIndexSignatures:!0});return i?new Map(i.map((r)=>[r.name,r])):void 0}function Ha(e,t){for(let n of t.declarations){if(!se(n.init,"$props"))continue;let i=Wo(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:qa(e,G(e,t)?.type);for(let p of o?.values()??[])kt(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});for(let[p,l]of i?.props??[])kt(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=G(e,t),s=i?.props.size?void 0:qa(e,r?.type),a=n.id.properties.filter((o)=>{if(o.type!=="Property"||o.computed)return!1;if(!U(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 p=U(o.key);if(!p)continue;let l,c;if(o.value.type==="Identifier")l=o.value.name;else{let qt=o.value;l=qt.left.name,c=qt.right}if(!l)continue;if($n(e,p,l),p==="children")e.snippetPropLocals.add(l);let d=s?.get(p),f=i?.props.get(p),h=G(e,o)??f?.jsdoc??(a===1&&!s?r:void 0),{init:m,bindable:y}=ca(c),g=m==null?{isFunction:!1}:Fe(e,m),{value:k,type:S,isFunction:P,defaultValue:v}=g,re=f?.type===void 0&&h?.type===void 0?g.resolvedType:void 0;Hn(e,g,p,"props");let{type:fe,typeSource:Qe,description:Cn,params:kn,returnType:wn,isFunction:An}=Kn({explicitType:f?.type,typeSeed:S,inferredTypeForSource:S,jsdocType:h?.type??d?.type,jsdocDescription:h?.description??d?.description,jsdocParams:h?.params,jsdocReturnType:h?.returnType,resolvedType:re,resolvedDescription:g.resolvedDescription,resolvedParams:g.resolvedParams,resolvedReturnType:g.resolvedReturnType,initializerIsFunction:P,isFunctionDeclaration:!1,inferIsFunctionFromTypeSignature:!0});if(y)e.reactive_vars.add(p);Te(e,"prop-unknown-type",p,h?.sveldIgnore),kt(e,p,{name:p,...l===p?{}:{localName:l},kind:"let",description:Cn,binding:h?.binding,deprecated:h?.deprecated,tags:h?.tags,...h?.internal?{internal:!0}:{},...y?{bindable:!0}:{},type:fe,typeSource:Qe,value:k,defaultValue:v,params:kn,returnType:wn,isFunction:An,isFunctionDeclaration:!1,isRequired:!y&&m==null&&f?.optional!==!0&&d?.optional!==!0,constant:!1,reactive:y,source:w(e,o)})}}}function Qf(e){let n=e.indexOf("EventDispatcher");if(n===-1)return;let i=n+15;while(e[i]===" ")i++;if(e[i]!=="<")return;let r=it(e,i);return r===-1?void 0:e.slice(i+1,r)}var Zf=/^["']|["']$/g,eh=/\?$/,th=/^\{/,nh=/\}$/;function ih(e){let t=Nn(e,":");if(t===-1)return;let n=e.slice(0,t).trim().replace(eh,"").replace(Zf,""),i=e.slice(t+1).trim();if(!n||!i)return;return{name:n,type:i}}function Wa(e,t,n,i){if(t){for(let[o,p]of Zn(e,t,Va(e)))We(e,{name:o,detail:p.type,has_argument:!0,source:p.source});return}let r=Me(e,n)?.type,s=r?Qf(r):void 0;if(!s)return;let a=s.trim().replace(th,"").replace(nh,"");for(let o of V(a,";,")){let p=ih(o.trim());if(!p)continue;We(e,{name:p.name,detail:p.type,has_argument:!0,source:i})}}function za(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 ze=null;function Dt(e){return!e||e==="default"?ze:e}function rh(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=jn(e,t);else if(t.type==="ObjectExpression"||t.type==="TemplateLiteral")n.value=B(e,t.start,t.end);return n}function sh(e,t){if(!T(t))return null;let n=wt(e,t.name);if(X(n))return Fr(e,n).slot_props;let i=st(e,t.name);if(!i)return null;let r=Be(i.type);if(!r)return null;let s={};for(let a of r)s[a.name]={value:a.type,replace:!1};return s}function Fr(e,t){let n={},i=!1;for(let r of t.properties){if(r.type==="SpreadElement"){let a=sh(e,r.argument);if(a)Object.assign(n,a);else i=!0,D(e,"spread-unresolved","slot_props",`Slot props spread a value sveld can't resolve; its shape is widened to "Record<string, any>".`,w(e,r));continue}if(r.type!=="Property"||r.computed)continue;let s=U(r.key);if(!s)continue;n[s]=rh(e,r.value)}return{slot_props:n,hasUnresolvedSpread:i}}function oh(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 Or(e){return e.type==="ChainExpression"?e.expression:e}function Ua(e,t){let n=Or(t),i=oh(e,n.callee);return i&&{...i,arguments:n.arguments}}function tn(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:p,source:l}){let c=Dt(t),d=c===ze,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||p?{internal:!0}:{},source:l||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,...p?{internal:!0}:{},source:l})}var Ja=/^@component/,ah=/\r/g,ph=new Set(["AssignmentExpression","UpdateExpression","CallExpression","SpreadAttribute","FunctionDeclaration","ImportDeclaration","VariableDeclaration","ExportNamedDeclaration","Comment","SlotElement","RenderTag","OnDirective","BindDirective"]);function Ka(e){return e&&"id"in e&&e.id&&"name"in e.id?e.id.name:void 0}function lh(e,t,n,i){let r=n.callee.type==="Identifier"?n.callee.name:void 0;if(r==="createEventDispatcher"){let s=Ka(i);if(s!==void 0)t.dispatcherName=s,t.dispatcherDeclaratorNode=i;t.dispatcherTypeArgument=n.typeArguments?.params?.[0]}if(r==="$host"){let s=Ka(i);if(s!==void 0)t.hostLocalNames.add(s)}if(r==="setContext")Ca(e,n);if(n.arguments.length>0){if(t.callsWithArguments.push(n),Un(e,n.callee))t.locallyBoundCalls.add(n)}if(r)t.callees.push({name:r,arguments:n.arguments,node:n,nestedBoundDetailNames:Zt(e,n.arguments[1])});if(He(n.callee)&&T(n.callee.property)&&n.callee.property.name==="dispatchEvent"&&(se(n.callee.object,"$host")||T(n.callee.object)&&t.hostLocalNames.has(n.callee.object.name))){let s=Da(e,n);if(s)t.hostDispatchedEventNames.add(s.name),t.hostDispatches.push(s)}}function ch(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=jn(e,s);else if(s.type==="ObjectExpression"||s.type==="TemplateLiteral")i.value=B(e,r.start+1,r.end-1)}return i}function uh(e,t){let n=t.attributes.find((p)=>("name"in p)&&p.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 p of t.attributes){if(!("value"in p)||p.name==="name"||p.value===!0)continue;a[p.name]=ch(e,p.name,p.value)}let o=t.fragment.nodes.map(({start:p,end:l})=>B(e,p,l)??"").join("").trim();e.renderedSlots.add(Dt(s)),tn(e,{slot_name:s,slot_props:a,slot_fallback:o,source:w(e,t)})}function dh(e,t){let n=Ua(e,t.expression);if(!n){let{callee:p}=Or(t.expression);if(He(p)&&T(p.object)&&e.wholePropsLocals.has(p.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 p=Fr(e,i);s=p.slot_props,a=p.hasUnresolvedSpread}let o=n.publicName==="children"?void 0:n.publicName;if(e.renderedSlots.add(Dt(o)),s!==void 0)tn(e,{slot_name:o,slot_props:s,slot_props_unresolved_spread:a||void 0,source:w(e,t)});if(s!==void 0||e.slots.has(o??ze))e.snippetPropLocals.add(n.trackingName)}function fh(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=Pt(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:w(e,t)});else if(s.type==="forwarded"&&a&&!s.description)e.events.set(i,{...s,description:a,deprecated:s.deprecated,source:s.source||w(e,t)})}function hh(e){let{expression:t}=e;if(t.type==="Identifier")return{name:t.name,indexed:!1};if(e.name==="this"&&t.type==="MemberExpression"&&t.computed&&t.object.type==="Identifier")return{name:t.object.name,indexed:!0};return}function mh(e,t,n,i){if(!n||!(pt(n.type)||Pt(n.type)))return;let r=hh(t);if(!r)return;let s=zn(e,r.name);if(!s)return;if(e.reactive_vars.add(s),t.name!=="this"||!("name"in n)||typeof n.name!=="string")return;let a=r.indexed?"indexed":"direct",o=e.bindings.get(s)??{elements:[],components:[],target:a};if(o.target!==a)o.target="mixed";if(pt(n.type)){if(!o.elements.some((p)=>p.tag===n.name&&p.namespace===i))o.elements=[...o.elements,{tag:n.name,namespace:i}]}else{let p=n.type==="Component"?Tr(e,n.name):void 0;if(!p)return;if(!o.components.includes(n.name))o.components=[...o.components,n.name];e.additionalImportedTypes.set(n.name,{localName:n.name,...p})}e.bindings.set(s,o)}function Xa(e){let t={dispatcherName:void 0,dispatcherDeclaratorNode:void 0,dispatcherTypeArgument:void 0,hostLocalNames:new Set,hostDispatchedEventNames:new Set,hostDispatches:[],callees:[],callsWithArguments:[],locallyBoundCalls:new Set};da(e),e.activeScopes.push(e.componentScope);let n=fa(e),i=new WeakMap,r=e.parsed?.options?.namespace,s=[r==="svg"||r==="mathml"?r:"html"],a=new Map,o={enter(p,l){if(Gn(p.type))return te;let c=ha(e,n,p);if(c)e.activeScopes.push(c);if(pt(p.type)){let d="name"in p?p.name:void 0,f=d==="svg"?"svg":d==="math"?"mathml":s[s.length-1];i.set(p,f),s.push(d==="foreignObject"?"html":f)}if(!ph.has(p.type))return;switch(p.type){case"AssignmentExpression":Pr(e,p.left);break;case"UpdateExpression":Pr(e,p.argument);break;case"CallExpression":lh(e,t,p,l);break;case"SpreadAttribute":{let d=p.expression.type==="Identifier"?p.expression.name:void 0,f=(d!==void 0&&!at(e,d)?a.get(d):void 0)??d,h=e.restPropLocals.has(f??"");if(f==="$$restProps"||h)Ra(e,l);if((f==="$$props"||h)&&l&&Pt(l.type))e.slotsUntracked=!0;break}case"FunctionDeclaration":if(p.id?.name)e.funcDecls.set(p.id.name,p);break;case"ImportDeclaration":Xt(e,p);break;case"VariableDeclaration":if(e.vars.add(p),l?.type==="Program"&&p.declarations.some((d)=>se(d.init,"$props")))Ha(e,p);break;case"ExportNamedDeclaration":Ia(e,p,l?.type==="Program"?l:null);break;case"Comment":{let d=p.data.trim();if(Ja.test(d))e.componentComment=d.replace(Ja,"").replace(ah,""),e.componentCommentSource=w(e,p);break}case"SlotElement":uh(e,p);break;case"RenderTag":dh(e,p);break;case"OnDirective":fh(e,p,l);break;case"BindDirective":mh(e,p,l,(l&&i.get(l))??"html");break}},leave(p){if(pt(p.type))s.pop();if(At(p))e.activeScopes.pop(),ma(n,p)}};if(e.parsed?.instance)K(e.parsed.instance,o);if(a=Ma(e,e.parsed?.instance),e.parsed?.fragment)K(e.parsed.fragment,o);return t}var jr={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"},qr="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",yh={5:qr,"5module":qr+" export import",6:qr+" const class extends export import super"},tp=/^in(stanceof)?$/,gh=/\p{ID_Start}/u,xh=/[\p{ID_Continue}\u200c\u200d]/u;function me(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&&gh.test(String.fromCodePoint(e))}function Oe(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&&xh.test(String.fromCodePoint(e))}var N=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 ae(e,t){return new N(e,{beforeExpr:!0,binop:t})}var pe={beforeExpr:!0},Y={startsExpr:!0},Wr={};function A(e,t){if(t===void 0)t={};return t.keyword=e,Wr[e]=new N(e,t)}var u={num:new N("num",Y),regexp:new N("regexp",Y),string:new N("string",Y),name:new N("name",Y),privateId:new N("privateId",Y),eof:new N("eof"),bracketL:new N("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new N("]"),braceL:new N("{",{beforeExpr:!0,startsExpr:!0}),braceR:new N("}"),parenL:new N("(",{beforeExpr:!0,startsExpr:!0}),parenR:new N(")"),comma:new N(",",pe),semi:new N(";",pe),colon:new N(":",pe),dot:new N("."),question:new N("?",pe),questionDot:new N("?."),arrow:new N("=>",pe),template:new N("template"),invalidTemplate:new N("invalidTemplate"),ellipsis:new N("...",pe),backQuote:new N("`",Y),dollarBraceL:new N("${",{beforeExpr:!0,startsExpr:!0}),eq:new N("=",{beforeExpr:!0,isAssign:!0}),assign:new N("_=",{beforeExpr:!0,isAssign:!0}),incDec:new N("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new N("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:ae("||",1),logicalAND:ae("&&",2),bitwiseOR:ae("|",3),bitwiseXOR:ae("^",4),bitwiseAND:ae("&",5),equality:ae("==/!=/===/!==",6),relational:ae("</>/<=/>=",7),bitShift:ae("<</>>/>>>",8),plusMin:new N("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:ae("%",10),star:ae("*",10),slash:ae("/",10),starstar:new N("**",{beforeExpr:!0}),coalesce:ae("??",1),_break:A("break"),_case:A("case",pe),_catch:A("catch"),_continue:A("continue"),_debugger:A("debugger"),_default:A("default",pe),_do:A("do",{isLoop:!0,beforeExpr:!0}),_else:A("else",pe),_finally:A("finally"),_for:A("for",{isLoop:!0}),_function:A("function",Y),_if:A("if"),_return:A("return",pe),_switch:A("switch"),_throw:A("throw",pe),_try:A("try"),_var:A("var"),_const:A("const"),_while:A("while",{isLoop:!0}),_with:A("with"),_new:A("new",{beforeExpr:!0,startsExpr:!0}),_this:A("this",Y),_super:A("super",Y),_class:A("class",Y),_extends:A("extends",pe),_export:A("export"),_import:A("import",Y),_null:A("null",Y),_true:A("true",Y),_false:A("false",Y),_in:A("in",{beforeExpr:!0,binop:7}),_instanceof:A("instanceof",{beforeExpr:!0,binop:7}),_typeof:A("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:A("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:A("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},Q=/\r\n?|\n|\u2028|\u2029/,bh=new RegExp(Q.source,"g");function Nt(e){return e===10||e===13||e===8232||e===8233}function np(e,t,n){if(n===void 0)n=e.length;for(var i=t;i<n;i++){var r=e.charCodeAt(i);if(Nt(r))return i<n-1&&r===13&&e.charCodeAt(i+1)===10?i+2:i+1}return-1}var ip=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,O=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,vh=Object.prototype,{hasOwnProperty:Eh,toString:Th}=vh,sn=Object.hasOwn||function(e,t){return Eh.call(e,t)},Ya=Array.isArray||function(e){return Th.call(e)==="[object Array]"},Qa=Object.create(null);function ei(e){return Qa[e]||(Qa[e]=new RegExp("^(?:"+e.replace(/ /g,"|")+")$"))}function ri(e){if(e<=65535)return String.fromCharCode(e);return e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320)}var Sh=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,rn=function(e,t){this.line=e,this.column=t};rn.prototype.offset=function(e){return new rn(this.line,this.column+e)};var si=function(e,t,n){if(this.start=t,this.end=n,e.sourceFile!==null)this.source=e.sourceFile};function rp(e,t){for(var n=1,i=0;;){var r=np(e,i,t);if(r<0)return new rn(n,t-i);++n,i=r}}var Vr={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},Za=!1;function Ch(e){var t={};for(var n in Vr)t[n]=e&&sn(e,n)?e[n]:Vr[n];if(t.ecmaVersion==="latest")t.ecmaVersion=1e8;else if(t.ecmaVersion==null){if(!Za&&typeof console==="object"&&console.warn)Za=!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(Ya(t.onToken)){var i=t.onToken;t.onToken=function(r){return i.push(r)}}if(Ya(t.onComment))t.onComment=kh(t,t.onComment);if(t.sourceType==="commonjs"&&t.allowAwaitOutsideFunction)throw Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return t}function kh(e,t){return function(n,i,r,s,a,o){var p={type:n?"Block":"Line",value:i,start:r,end:s};if(e.locations)p.loc=new si(this,a,o);if(e.ranges)p.range=[r,s];t.push(p)}}var lt=1,ct=2,zr=4,sp=8,Ur=16,op=32,oi=64,ap=128,ut=256,on=512,pp=1024,ai=lt|ct|ut;function Jr(e,t){return ct|(e?zr:0)|(t?sp:0)}var ti=0,Kr=1,je=2,lp=3,cp=4,up=5,R=function(e,t,n){this.options=e=Ch(e),this.sourceFile=e.sourceFile,this.keywords=ei(yh[e.ecmaVersion>=6?6:e.sourceType==="module"?"5module":5]);var i="";if(e.allowReserved!==!0){if(i=jr[e.ecmaVersion>=6?6:e.ecmaVersion===5?5:3],e.sourceType==="module")i+=" await"}this.reservedWords=ei(i);var r=(i?i+" ":"")+jr.strict;if(this.reservedWordsStrict=ei(r),this.reservedWordsStrictBind=ei(r+" "+jr.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(Q).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"?ct:lt),this.regexpState=null,this.privateNameStack=[]},le={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)})};le.inFunction.get=function(){return(this.currentVarScope().flags&ct)>0};le.inGenerator.get=function(){return(this.currentVarScope().flags&sp)>0};le.inAsync.get=function(){return(this.currentVarScope().flags&zr)>0};le.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],n=t.flags;if(n&(ut|on))return!1;if(n&ct)return(n&zr)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};le.allowReturn.get=function(){if(this.inFunction)return!0;if(this.options.allowReturnOutsideFunction&&this.currentVarScope().flags<)return!0;return!1};le.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags;return(t&oi)>0||this.options.allowSuperOutsideMethod};le.allowDirectSuper.get=function(){return(this.currentThisScope().flags&ap)>0};le.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};le.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],n=t.flags;if(n&(ut|on)||n&ct&&!(n&Ur))return!0}return!1};le.allowUsing.get=function(){var e=this.currentScope(),t=e.flags;if(t&pp)return!1;if(!this.inModule&&t<)return!1;return!0};le.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&ut)>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,le);var z=R.prototype,wh=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;z.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){O.lastIndex=e,e+=O.exec(this.input)[0].length;var t=wh.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==="}"||Q.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++}};z.eat=function(e){if(this.type===e)return this.next(),!0;else return!1};z.isContextual=function(e){return this.type===u.name&&this.value===e&&!this.containsEsc};z.eatContextual=function(e){if(!this.isContextual(e))return!1;return this.next(),!0};z.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}};z.expectContextual=function(e){if(!this.eatContextual(e))this.unexpected()};z.canInsertSemicolon=function(){return this.type===u.eof||this.type===u.braceR||Q.test(this.input.slice(this.lastTokEnd,this.start))};z.insertSemicolon=function(){if(this.canInsertSemicolon()){if(this.options.onInsertedSemicolon)this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc);return!0}};z.semicolon=function(){if(!this.eat(u.semi)&&!this.insertSemicolon())this.unexpected()};z.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}};z.expect=function(e){this.eat(e)||this.unexpected()};z.unexpected=function(e){this.raise(e!=null?e:this.start,"Unexpected token")};var pi=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};z.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")};z.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")};z.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")};z.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 Xr={kind:"loop"},Ah={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(me(i)){var r=n;do n+=i<=65535?1:2;while(Oe(i=this.fullCharCodeAt(n)));if(i===92)return!0;var s=this.input.slice(r,n);if(!tp.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!Q.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)==="function"&&(t+8===this.input.length||!(Oe(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(Q.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||Oe(s=this.fullCharCodeAt(r))||s===92)return!1;O.lastIndex=r;var a=O.exec(this.input);if(i=r+a[0].length,a&&Q.test(this.input.slice(r,i)))return!1}var o=this.fullCharCodeAt(i);if(!me(o)&&o!==92)return!1;var p=i;do i+=o<=65535?1:2;while(Oe(o=this.fullCharCodeAt(i)));if(o===92)return!0;var l=this.input.slice(p,i);if(tp.test(l))return!1;if(t&&!e&&l==="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,p=this.input.charCodeAt(o);if(p===40||p===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 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(r,!1,l),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(Xr),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(Xr),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 p=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(p,!0,o),this.finishNode(p,"VariableDeclaration"),this.parseForAfterInit(e,p,t)}var l=this.containsEsc,c=new pi,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(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,nn|(n?0:Gr),!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(Ah),this.enterScope(pp);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(),Q.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 Ph=[];x.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type==="Identifier";return this.enterScope(t?op:0),this.checkLValPattern(e,t?cp:je),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(Xr),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 p=this.labels.length-1;p>=0;p--){var l=this.labels[p];if(l.statementStart===e.start)l.statementStart=this.start,l.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"?Kr:je,!1)};var nn=1,Gr=2,dp=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&Gr)this.unexpected();e.generator=this.eat(u.star)}if(this.options.ecmaVersion>=8)e.async=!!i;if(t&nn){if(e.id=t&dp&&this.type!==u.name?null:this.parseIdent(),e.id&&!(t&Gr))this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?Kr:je:lp)}var s=this.yieldPos,a=this.awaitPos,o=this.awaitIdentPos;if(this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Jr(e.async,e.generator)),!(t&nn))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&nn?"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 p=this.value;if(this.eatContextual("get")||this.eatContextual("set"))if(this.isClassElementNameStart())a=p;else i=p}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 l=!n.static&&ni(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,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&&ni(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(ni(e,"constructor"))this.raise(e.key.start,"Classes can't have a field named 'constructor'");else if(e.static&&ni(e,"prototype"))this.raise(e.key.start,"Classes can't have a static field named 'prototype'");if(this.eat(u.eq))this.enterScope(on|oi),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(ut|oi);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,je,!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(!sn(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 ni(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,nn|dp,!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(sn(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 p=o[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,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=Ph,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,je),this.finishNode(e,"ImportSpecifier")};x.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,je),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,je),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(sn(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(Sh.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 ce=R.prototype;ce.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};ce.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};ce.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")};ce.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")};ce.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()};ce.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};ce.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t};ce.parseBindingListItem=function(e){return e};ce.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")};ce.checkLValSimple=function(e,t,n){if(t===void 0)t=ti;var i=t!==ti;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===je&&e.name==="let")this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name");if(n){if(sn(n,e.name))this.raiseRecoverable(e.start,"Argument name clash");n[e.name]=!0}if(t!==up)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")}};ce.checkLValPattern=function(e,t,n){if(t===void 0)t=ti;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 p=o[a];if(p)this.checkLValInnerPattern(p,t,n)}break;default:this.checkLValSimple(e,t,n)}};ce.checkLValInnerPattern=function(e,t,n){if(t===void 0)t=ti;switch(e.type){case"Property":this.checkLValInnerPattern(e.value,t,n);break;case"AssignmentPattern":this.checkLValPattern(e.left,t,n);break;case"RestElement":this.checkLValPattern(e.argument,t,n);break;default:this.checkLValPattern(e,t,n)}};var he=function(e,t,n,i,r){this.token=e,this.isExpr=!!t,this.preserveSpace=!!n,this.override=i,this.generator=!!r},_={b_stat:new he("{",!1),b_expr:new he("{",!0),b_tmpl:new he("${",!1),p_stat:new he("(",!1),p_expr:new he("(",!0),q_tmpl:new he("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new he("function",!1),f_expr:new he("function",!0),f_expr_gen:new he("function",!0,!1,null,!0),f_gen:new he("function",!1,!1,null,!0)},$t=R.prototype;$t.initialContext=function(){return[_.b_stat]};$t.curContext=function(){return this.context[this.context.length-1]};$t.braceIsBlock=function(e){var t=this.curContext();if(t===_.f_expr||t===_.f_stat)return!0;if(e===u.colon&&(t===_.b_stat||t===_.b_expr))return!t.isExpr;if(e===u._return||e===u.name&&this.exprAllowed)return Q.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===_.b_stat;if(e===u._var||e===u._const||e===u.name)return!1;return!this.exprAllowed};$t.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};$t.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};$t.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===_.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)?_.b_stat:_.b_expr),this.exprAllowed=!0};u.dollarBraceL.updateContext=function(){this.context.push(_.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?_.p_stat:_.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()!==_.p_stat)&&!(e===u._return&&Q.test(this.input.slice(this.lastTokEnd,this.start)))&&!((e===u.colon||e===u.braceL)&&this.curContext()===_.b_stat))this.context.push(_.f_expr);else this.context.push(_.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()===_.q_tmpl)this.context.pop();else this.context.push(_.q_tmpl);this.exprAllowed=!1};u.star.updateContext=function(e){if(e===u._function){var t=this.context.length-1;if(this.context[t]===_.f_expr)this.context[t]=_.f_expr_gen;else this.context[t]=_.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=R.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 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};E.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})};E.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 pi,i=!0;var o=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,o,p);if(this.type.isAssign){var c=this.startNodeAt(o,p);if(c.operator=this.value,this.type===u.eq)l=this.toAssignable(l,!1,t);if(!i)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(i)this.checkExpressionErrors(t,!0);if(r>-1)t.parenthesizedAssign=r;if(s>-1)t.trailingComma=s;return l};E.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};E.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)};E.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 p=this.value;this.next();var l=this.start,c=this.startLoc,d=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,r),l,c,s,r),f=this.buildBinary(t,n,e,d,p,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};E.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")};E.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(),p=this.type===u.incDec;if(o.operator=this.value,o.prefix=!0,this.next(),o.argument=this.parseMaybeUnary(null,!0,p,i),this.checkExpressionErrors(e,!0),p)this.checkLValSimple(o.argument);else if(this.strict&&o.operator==="delete"&&fp(o.argument))this.raiseRecoverable(o.start,"Deleting local variable in strict mode");else if(o.operator==="delete"&&Hr(o.argument))this.raiseRecoverable(o.start,"Private fields can not be deleted");else t=!0;a=this.finishNode(o,p?"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 l=this.startNodeAt(r,s);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===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 fp(e){return e.type==="Identifier"||e.type==="ParenthesizedExpression"&&fp(e.expression)}function Hr(e){return e.type==="MemberExpression"&&e.property.type==="PrivateIdentifier"||e.type==="ChainExpression"&&Hr(e.expression)||e.type==="ParenthesizedExpression"&&Hr(e.expression)}E.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};E.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 p=this.startNodeAt(t,n);p.expression=o,o=this.finishNode(p,"ChainExpression")}return o}e=o}};E.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(u.arrow)};E.parseSubscriptAsyncArrow=function(e,t,n,i){return this.parseArrowExpression(this.startNodeAt(e,t),n,!0,i)};E.parseSubscript=function(e,t,n,i,r,s,a){var o=this.options.ecmaVersion>=11,p=o&&this.eat(u.questionDot);if(i&&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,o)c.optional=p;e=this.finishNode(c,"MemberExpression")}else if(!i&&this.eat(u.parenL)){var d=new pi,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&&!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=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=p;e=this.finishNode(g,"CallExpression")}else if(this.type===u.backQuote){if(p||s)this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var k=this.startNodeAt(t,n);k.tag=e,k.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(k,"TaggedTemplateExpression")}return e};E.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,p=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!o&&p.name==="async"&&!this.canInsertSemicolon()&&this.eat(u._function))return this.overrideContext(_.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),[p],!1,t);if(this.options.ecmaVersion>=8&&p.name==="async"&&this.type===u.name&&!o&&(!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(s,a),[p],!0,t)}}return p;case u.regexp:var l=this.value;return i=this.parseLiteral(l.value),i.regex={pattern:l.pattern,flags:l.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(_.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()}};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,i=this.startLoc,r,s=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var a=this.start,o=this.startLoc,p=[],l=!0,c=!1,d=new pi,f=this.yieldPos,h=this.awaitPos,m;this.yieldPos=0,this.awaitPos=0;while(this.type!==u.parenR)if(l?l=!1:this.expect(u.comma),s&&this.afterTrailingComma(u.parenR,!0)){c=!0;break}else if(this.type===u.ellipsis){if(m=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 y=this.lastTokEnd,g=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,i,p,t);if(!p.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,p.length>1)r=this.startNodeAt(a,o),r.expressions=p,this.finishNodeAt(r,"SequenceExpression",y,g);else r=p[0]}else r=this.parseParenExpression();if(this.options.preserveParens){var k=this.startNodeAt(n,i);return k.expression=r,this.finishNode(k,"ParenthesizedExpression")}else return r};E.parseParenItem=function(e){return e};E.parseParenArrowList=function(e,t,n,i){return this.parseArrowExpression(this.startNodeAt(e,t),n,!1,i)};var Nh=[];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 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=Nh;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,`
|
|
29
29
|
`),cooked:null}}else n.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
|
|
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}};
|
|
30
|
+
`),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 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")};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)&&!Q.test(this.input.slice(this.lastTokEnd,this.start))};E.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")};E.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")};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 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")};E.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()};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 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(Jr(t,i.generator)|oi|(n?ap: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")};E.parseArrowExpression=function(e,t,n,i){var r=this.yieldPos,s=this.awaitPos,a=this.awaitIdentPos;if(this.enterScope(Jr(n,!1)|Ur),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")};E.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 p=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,up);e.body=this.parseBlock(!1,void 0,a&&!s),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 i=n[t];if(i.type!=="Identifier")return!1}return!0};E.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,Kr,t?null:n)}};E.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};E.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&ai)&&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")}};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 ii=R.prototype;ii.raise=function(e,t){var n=rp(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};ii.raiseRecoverable=ii.raise;ii.curPosition=function(){if(this.options.locations)return new rn(this.curLine,this.pos-this.lineStart)};var Ue=R.prototype,$h=function(e){this.flags=e,this.var=[],this.lexical=[],this.functions=[]};Ue.enterScope=function(e){this.scopeStack.push(new $h(e))};Ue.exitScope=function(){this.scopeStack.pop()};Ue.treatFunctionsAsVarInScope=function(e){return e.flags&ct||!this.inModule&&e.flags<};Ue.declareName=function(e,t,n){var i=!1;if(t===je){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<)delete this.undefinedExports[e]}else if(t===cp){var s=this.currentScope();s.lexical.push(e)}else if(t===lp){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 p=this.scopeStack[o];if(p.lexical.indexOf(e)>-1&&!(p.flags&op&&p.lexical[0]===e)||!this.treatFunctionsAsVarInScope(p)&&p.functions.indexOf(e)>-1){i=!0;break}if(p.var.push(e),this.inModule&&p.flags<)delete this.undefinedExports[e];if(p.flags&ai)break}if(i)this.raiseRecoverable(n,"Identifier '"+e+"' has already been declared")};Ue.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};Ue.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};Ue.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(ai|on|ut))return t}};Ue.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(ai|on|ut)&&!(t.flags&Ur))return t}};var li=function(e,t,n){if(this.type="",this.start=t,this.end=0,e.options.locations)this.loc=new si(e,n);if(e.options.directSourceFile)this.sourceFile=e.options.directSourceFile;if(e.options.ranges)this.range=[t,0]},an=R.prototype;an.startNode=function(){return new li(this,this.start,this.startLoc)};an.startNodeAt=function(e,t){return new li(this,e,t)};function hp(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}an.finishNode=function(e,t){return hp.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)};an.finishNodeAt=function(e,t,n,i){return hp.call(this,e,t,n,i)};an.copyNode=function(e){var t=new li(this,e.start,this.startLoc);for(var n in e)t[n]=e[n];return t};var mp=function(){};mp.prototype.reset=function(){};R.prototype.validateRegExpFlags=function(){};R.prototype.validateRegExpPattern=function(){};var Yr=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 si(e,e.startLoc,e.endLoc);if(e.options.ranges)this.range=[e.start,e.end]},C=R.prototype;C.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 Yr(this));this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()};C.getToken=function(){return this.next(),new Yr(this)};if(typeof Symbol<"u")C[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===u.eof,value:t}}}};C.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())};C.readToken=function(e){if(me(e,this.options.ecmaVersion>=6)||e===92)return this.readWord();return this.getTokenFromCode(e)};C.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};C.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)};C.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=np(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())};C.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&&!Nt(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())};C.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&&ip.test(String.fromCharCode(e)))++this.pos;else break e}}};C.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)};C.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)};C.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)};C.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)};C.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)};C.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)};C.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||Q.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)};C.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)};C.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)};C.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)};C.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13){if(++this.pos,t=this.fullCharCodeAtPos(),me(t,!0)||t===92)return this.finishToken(u.privateId,this.readWord1())}this.raise(this.pos,"Unexpected character '"+ri(t)+"'")};C.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 '"+ri(e)+"'")};C.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)};C.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(Q.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 mp(this));o.reset(n,r,a),this.validateRegExpFlags(o),this.validateRegExpPattern(o);var p=null;try{p=new RegExp(r,a)}catch(l){}return this.finishToken(u.regexp,{pattern:r,flags:a,value:p})};C.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 p=0,l=t==null?1/0:t;p<l;++p,++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(p===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 Lh(e,t){if(t)return parseInt(e,8);return parseFloat(e.replace(/_/g,""))}function yp(e){if(typeof BigInt!=="function")return null;return BigInt(e.replace(/_/g,""))}C.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=yp(this.input.slice(t,this.pos)),++this.pos;else if(me(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");return this.finishToken(u.num,n)};C.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=yp(this.input.slice(t,this.pos));if(++this.pos,me(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(me(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");var s=Lh(this.input.slice(t,this.pos),n);return this.finishToken(u.num,s)};C.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};C.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(Nt(i))this.raise(this.start,"Unterminated string constant");++this.pos}}return t+=this.input.slice(n,this.pos++),this.finishToken(u.string,t)};var gp={};C.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===gp)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1};C.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw gp;else this.raise(e,t)};C.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+=`
|
|
31
|
+
`;break;default:e+=String.fromCharCode(n);break}if(this.options.locations)++this.curLine,this.lineStart=this.pos;t=this.pos}else++this.pos}};C.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]===`
|
|
32
32
|
`)++this.pos;case`
|
|
33
|
-
`:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")};
|
|
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
|
|
36
|
-
`,i+2);i=
|
|
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=
|
|
38
|
-
${" ".repeat(r+2+
|
|
39
|
-
`)}function
|
|
40
|
-
`)){let
|
|
41
|
-
`,n-1)+1,p
|
|
33
|
+
`:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")};C.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 ri(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(Nt(t)){if(this.options.locations)this.lineStart=this.pos,++this.curLine;return""}return String.fromCharCode(t)}};C.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);if(n===null)this.invalidStringToken(t,"Bad character escape sequence");return n};C.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(Oe(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?me:Oe)(a,i))this.invalidStringToken(s,"Invalid Unicode escape");e+=ri(a),n=this.pos}else break;t=!1}return e+this.input.slice(n,this.pos)};C.readWord=function(){var e=this.readWord1(),t=u.name;if(this.keywords.test(e))t=Wr[e];return this.finishToken(t,e)};var Ih="8.18.0";R.acorn={Parser:R,version:Ih,defaultOptions:Vr,Position:rn,SourceLocation:si,getLineInfo:rp,Node:li,TokenType:N,tokTypes:u,keywordTypes:Wr,TokContext:he,tokContexts:_,isIdentifierChar:Oe,isIdentifierStart:me,Token:Yr,isNewLine:Nt,lineBreak:Q,lineBreakG:bh,nonASCIIwhitespace:ip};function pn(e){return(t)=>e(t)}function ci(...e){return R.extend(...e)}function ln(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 ep=new WeakMap;function Z(e,t){if(e===void 0)return!1;if(e.length<16)return e.includes(t);let n=ep.get(e);if(n===void 0||n.length>e.length)n={names:new Set,length:0},ep.set(e,n);while(n.length<e.length)n.names.add(e[n.length++]);return n.names.has(t)}var Qr=/(?:\s|\/\/.*|\/\*[\s\S]*?\*\/)*/g,_h=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"]]),Rh=new Set("public private protected readonly declare abstract override static accessor".split(" ")),Mh=new Set("public private protected readonly override".split(" ")),Bh=new Set("var let const function class abstract enum interface type namespace module global".split(" ")),Fh=new Set("var let const function class interface enum".split(" ")),xp=new Set(["TSAsExpression","TSSatisfiesExpression","TSNonNullExpression","TSTypeAssertion"]),bp=1,Oh=32,jh=256,qh=0,Vh=1,cn=2,Gh=3,Hh=4,Zr=6,vp=7,wp=256,is=1024,Wh=8|is,zh=cn|wp,Ep=1,Uh=2,Tp=40,Jh=41,Kh=44,Sp=46,Cp=58,ui=61,kp=60,di=123,Xh=91,es=42,Yh=35,ts=34,ns=39,Qh=SyntaxError("speculative parse failed"),fi=pn((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,p,l){super(o,p,l);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 p=this.inType;this.inType=!0;let l=o();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==="<"}$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 ln(this.input,this.lastTokEnd,this.start)}$d(o=this.pos){return Qr.lastIndex=o,Qr.exec(this.input),Qr.lastIndex}$2(){return this.input.charCodeAt(this.$d())}$3(){let o=this.$d(),p=o;while(p<this.input.length&&i(this.input.charCodeAt(p)))p++;return this.input.slice(o,p)}$b(){return!ln(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,p){if(this.$n>0)throw Qh;return super.raise(o,p)}$1y(o,p){try{super.raise(o,p)}catch(l){if(l instanceof SyntaxError)l.$1z=!0;throw l}throw Error("unreachable")}$g(o,p=!1){let l=this.$15();this.$n++;try{let c=o();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.$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,p){if(o.start=p.start,this.options.locations)o.loc.start=p.loc.start}$6(o=!1){let p=this.startNode();return p.typeAnnotation=this.$a(()=>(this.next(),o?this.$20():this.$0())),this.finishNode(p,"TSTypeAnnotation")}$h(o,p){if(p&&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,p){this.next();let l=this.startNode();return l.typeAnnotation=this.$0(),o.typeAnnotation=this.finishNode(l,"TSTypeAnnotation"),o.asserts=p,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 p=this.startNodeAt(o.start,o.loc?.start);return this.next(),p.checkType=o,p.extendsType=this.$i(!0,()=>this.$18()),this.expect(t.question),p.trueType=this.$i(!1,()=>this.$0()),this.expect(t.colon),p.falseType=this.$i(!1,()=>this.$0()),this.finishNode(p,"TSConditionalType")}$i(o,p){let l=this.$4;this.$4=o;let c=p();return this.$4=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(o){let p=this.startNode();if(o==="TSConstructorType"){if(p.abstract=this.isContextual("abstract"),p.abstract)this.next();this.next()}return this.$i(!1,()=>this.$r(p,t.arrow)),this.finishNode(p,o)}$r(o,p){if(this.$1())o.typeParameters=this.$8();if(this.expect(t.parenL),o.parameters=this.parseBindingList(t.parenR,!1,!0),this.type===p)o.typeAnnotation=this.$6(!0);else if(p===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,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,o)}$1b(){if(this.type===t.name&&!this.containsEsc){let o=this.value;if(o==="keyof"||o==="unique"||o==="readonly"){let p=this.startNode();return this.next(),p.operator=o,p.typeAnnotation=this.$1b(),this.finishNode(p,"TSTypeOperator")}if(o==="infer"){let p=this.startNode();this.next();let l=this.startNode();l.name=this.$y();let c=this.$g(()=>this.$22());if(c)l.constraint=c;return p.typeParameter=this.finishNode(l,"TSTypeParameter"),this.finishNode(p,"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 p=this.startNodeAt(o.start,o.loc?.start);if(this.eat(t.bracketR))p.elementType=o,o=this.finishNode(p,"TSArrayType");else p.objectType=o,p.indexType=this.$0(),this.expect(t.bracketR),o=this.finishNode(p,"TSIndexedAccessType")}return o}$24(){switch(this.type){case t.name:case t._void:case t._null:{let o=_h.get(this.value);if(o&&(this.type!==t.name||!this.containsEsc&&this.$2()!==Sp)){let p=this.startNode();return this.next(),this.finishNode(p,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(),p=this.startNode();if(this.next(),this.type!==t.num)this.unexpected();return p.operator="-",p.prefix=!0,p.argument=this.parseExprAtom(),o.literal=this.finishNode(p,"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 p=this.startNodeAt(o.start,o.loc?.start);return p.parameterName=o,this.$x(p,!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 p=this.startNodeAt(o.start,o.loc?.start);p.left=o,p.right=this.parseIdent(!0),o=this.finishNode(p,"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(),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(),o.literal=this.finishNode(p,"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 p=this.startNode();if(p.name=this.$y(),this.expect(t._in),p.constraint=this.$0(),o.typeParameter=this.finishNode(p,"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(),p="TSPropertySignature",l=this.type===t._new?this.$2():-1;if(this.type===t.parenL||this.$1())p="TSCallSignatureDeclaration",this.$r(o,t.colon);else if(l===Tp||l===kp)p="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(p="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,p)}$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,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(o,p);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)===Cp}$8(){return this.$a(()=>{let o=this.startNode();this.next(),o.params=[];while(!this.$c()){let p=this.startNode();while((this.type===t._const||this.type===t._in||this.isContextual("out"))&&r(this.$2()))p[this.value]=!0,this.next();if(p.name=this.$y(),this.eat(t._extends))p.constraint=this.$0();if(this.eat(t.eq))p.default=this.$0();if(o.params.push(this.finishNode(p,"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 p=this.startNode();if(p.expression=this.$j(),this.$1())p.typeParameters=this.$e();o.push(this.finishNode(p,"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 p=this.$2();return this.$b()&&(p===ts||p===ns||r(p))}case"declare":return this.$b()&&Bh.has(this.$3());case"global":return this.$b()&&this.$2()===di}return!1}$1l(o,p){switch(p){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 p=this.$5;this.$5=!0;let l=this.startNode();this.next();let c=this.value;if(c==="const"&&this.$3()==="enum")l.const=!0;if(!o&&Fh.has(c))l.declare=!0;let d;if(l.const)d=this.$10(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,Ep,!1,!1);else if(c==="class")d=this.parseClass(l,!0);else d=this.$1l(l,c);return d.declare=!0,this.$5=p,d}$1n(o,p){return this.next(),o.abstract=!0,this.parseClass(o,p)}$1m(o){if(this.next(),o.id=this.parseIdent(),this.checkLValSimple(o.id,vp),this.$1())o.typeParameters=this.$8();return this.$a(()=>{if(this.eat(t._extends))o.extends=this.$1j();let p=this.startNode();p.body=this.$1f(),o.body=this.finishNode(p,"TSInterfaceBody")}),this.finishNode(o,"TSInterfaceDeclaration")}$2g(o){if(this.next(),o.id=this.parseIdent(),this.checkLValSimple(o.id,Zr),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,zh),this.expect(t.braceL),o.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(o.members.push(this.finishNode(p,"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,Wh),this.$1o(o)}$1o(o){if(this.eat(t.dot)){let p=this.startNode();p.id=this.parseIdent(),o.body=this.$1o(p)}else o.body=this.$11();return this.finishNode(o,"TSModuleDeclaration")}$11(){this.enterScope(jh);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,p){if(o.isExport=p,o.id=this.parseIdent(),this.checkLValSimple(o.id,cn),this.expect(t.eq),this.isContextual("require")&&this.$2()===Tp){let l=this.startNode();this.next(),l.expression=this.$1e(),o.moduleReference=this.finishNode(l,"TSExternalModuleReference")}else o.moduleReference=this.$j();return this.semicolon(),this.finishNode(o,"TSImportEqualsDeclaration")}$2i(){let o=this.$d();if(this.input.charCodeAt(o)!==ui)return!1;let p=this.input.charCodeAt(o+1);return p!==ui&&p!==62}parseStatement(o,p,l){if(this.type===s)this.$1q(!0);let c=this.$1k();if(c)return c;return super.parseStatement(o,p,l)}parseVarStatement(o,p,l){return super.parseVarStatement(o,p,l||this.$5)}parseVarId(o,p){if(super.parseVarId(o,p),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),p=o.type==="Identifier";return this.enterScope(p?Oh:0),this.checkLValPattern(o,p?Hh:cn),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 p=this.$2();if(p===di||p===es||r(p)&&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 p=this.parseWithClause();if(p)o.attributes=p}parseImportSpecifier(){return this.$1s("importKind",()=>super.parseImportSpecifier())}parseExportSpecifier(o){return this.$1s("exportKind",()=>super.parseExportSpecifier(o))}$1s(o,p){let l=this.isContextual("type")?this.$2():-1;if(l===ts||l===ns||r(l)&&this.$3()!=="as"){let d=this.startNode();this.next();let f=p();return this.$q(f,d),f[o]="type",f}let c=p();return c[o]="value",c}parseExport(o,p){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===di||d===es)o.exportKind="type",this.next()}if(this.eat(t.star))return this.parseExportAllDeclaration(o,p);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 l=this.isContextual("declare"),c=this.$1k(!0);if(c||this.shouldParseExportStatement()){if(o.declaration=c??this.parseStatement(null),l||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(p),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,p,l,c,d){let f=p&Ep;if(f)this.$f=o,this.$o=o.start;super.parseFunction(o,p,l,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&bp)this.declareName(o.id.name,is,o.id.start);this.checkLValSimple(o.id,qh)}else if(!(p&Uh)){let m=Gh;if(this.strict||o.generator||o.async)m=this.treatFunctionsAsVar?Vh:cn;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,p,l,c){if(l&&this.type===t.colon)o.returnType=this.$6(!0);if(p||this.type===t.braceL||o.start!==this.$o){super.parseFunctionBody(o,p,l,c);return}this.semicolon(),this.exitScope()}parseMethod(o,p,l){let c=this.$k;this.$k=null;let d=super.parseMethod(o,p,l);if(!d.body)d.type="TSDeclareMethod";if(c)d.typeParameters=c;return d}parseBindingList(o,p,l,c){let d=c===!0||this.$l;return this.$l=!1,super.parseBindingList(o,p,l,d)}$s(o){if(!o&&!this.$b())return!1;let p=this.$2();return p===Xh||p===di||p===es||p===Sp||p===Yh||p===ts||p===ns||p>=48&&p<=57||r(p)}parseAssignableListItem(o){let p=this.$12(),l=this.start,c=this.startLoc,d,f=!1,h=!1;if(o)while(this.type===t.name&&Mh.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(l,c,m):this.parseMaybeDefault(m.start,m.loc?.start,this.$h(m,!0));if(p.length>0)y.decorators=p;if(!d&&!f&&!h)return y;let g=this.startNodeAt(l,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,p,l){if(this.$f&&o===this.$f.id){this.$f=null;return}if(!p&&xp.has(o.type)){this.checkLValSimple(o.expression,p,l);return}switch(o.type){case"TSParameterProperty":this.checkLValInnerPattern(o.parameter,p,l);return;case"Identifier":if(o.name==="this")return}super.checkLValSimple(o,p,l)}toAssignable(o,p,l){if(o&&!p&&xp.has(o.type))return o;return super.toAssignable(o,p,l)}declareName(o,p,l){let c=this.currentScope();if(p&is){this.$1t(c,o),c.$1u??=[],c.$1u.push(o);return}if(p===Zr||p===vp){if(c.$13??=[],p===Zr&&Z(c.$13,o))this.raise(l,`type '${o}' has already been declared.`);c.$13.push(o),this.$1t(c,o);return}if(p&wp){if(c.$1v??=[],Z(c.$1v,o))return;super.declareName(o,cn,l),c.$1v.push(o);return}super.declareName(o,p,l)}$1t(o,p){if(this.inModule&&o.flags&bp)delete this.undefinedExports[p]}checkLocalExport(o){for(let p=this.scopeStack.length-1;p>=0;p--){let l=this.scopeStack[p];if(Z(l.$13,o.name)||Z(l.$1u,o.name))return}super.checkLocalExport(o)}checkExport(){}raiseRecoverable(o,p){if(p==="Duplicate constructor in the same class")return;super.raiseRecoverable(o,p)}$12(){let o=[];while(this.type===s)o.push(this.$1w());return o}$1q(o){let p=this.$9[this.$9.length-1];while(this.type===s)p.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 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.$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,p,l){if(this.type===s)this.$1q(!1);return super.parseExprAtom(o,p,l)}parseProperty(o,p){if(o||this.type!==s)return super.parseProperty(o,p);let l=this.$12(),c=super.parseProperty(o,p);if(c.type==="SpreadElement")this.raise(c.start,"Decorators can't be used with SpreadElement");return c.decorators=l,c}parseClassId(o,p){let l=this.$9.length-1,c=this.$9[l];if(c.length>0)o.decorators=c,this.$q(o,c[0]),this.$9[l]=[];if(!this.isContextual("implements")||p===!0)super.parseClassId(o,p);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 p=this.startNode();while(this.type===t.name&&Rh.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(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,m=!p.static&&!p.computed&&(h.type==="Identifier"&&h.name==="constructor"||h.type==="Literal"&&h.value==="constructor");if(p.kind=m?"constructor":f,this.$1())p.typeParameters=this.$8();this.$l=m,this.$o=this.start,this.parseClassMethod(p,c,d,m&&o)}else{if(!p.optional&&this.$u())this.next(),p.definite=!0;if(this.type===t.colon)p.typeAnnotation=this.$6();this.parseClassField(p)}return p}parseMaybeAssign(o,p,l){if(this.$p()){let c=this.$g(()=>{let d=this.$8(),f=super.parseMaybeAssign(o,p,l);if(f.type!=="ArrowFunctionExpression")return;return f.typeParameters=d,this.$q(f,d),f});if(c)return c}return super.parseMaybeAssign(o,p,l)}parseMaybeUnary(o,p,l,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,p,l,c)}parseMaybeConditional(o,p){let l=this.start,c=this.startLoc,d=this.parseExprOps(o,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(o),this.finishNode(f,"ConditionalExpression")}return d}$2j(){let o=this.$d(),p=this.input.charCodeAt(o);if(p===Cp||p===Kh||p===Jh)return!0;return p===ui&&this.input.charCodeAt(o+1)!==ui}parseParenItem(o){return this.$h(o,!0)}$1x(){if(this.type!==t.colon)return!0;let o=this.$g(()=>{let p=this.$6(!0);return this.type===t.arrow&&!this.canInsertSemicolon()?p: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,p,l,c){if(this.$7)o.returnType=this.$7,this.$7=null;return super.parseArrowExpression(o,p,l,c)}parseExprList(o,p,l,c){if(!this.$m)return super.parseExprList(o,p,l,c);this.$m=!1;let d=[],f=!0;while(!this.eat(o)){if(f)f=!1;else if(this.expect(t.comma),p&&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,p,l,c,d,f,h){if(this.$u()&&!this.hasPrecedingLineBreak()){let y=this.startNodeAt(p,l);return this.exprAllowed=!1,this.next(),y.expression=o,this.finishNode(y,"TSNonNullExpression")}if(d&&this.$1()){let y=this.$g(()=>this.$2k(p,l,h));if(y)return y}let m=this.type===t.questionDot&&this.$2()===kp;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(p,l);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,p,l,c,d,f,h)}$2k(o,p,l){let c=this.startNodeAt(o,p);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,l)}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 p=this.startNodeAt(o.start,o.loc?.start);return p.callee=o.callee.expression,p.typeArguments=o.callee.typeArguments,p.arguments=o.arguments,this.finishNodeAt(p,"NewExpression",o.end,o.loc?.end)}parseExprOp(o,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=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,p,l,c,d)}return super.parseExprOp(o,p,l,c,d)}parseGetterSetter(o){o.kind=o.key.name,super.parseGetterSetter(o)}parsePropertyValue(o,p,l,c,d,f,h,m){if(!p&&this.$1()){if(this.$k=this.$8(),this.type!==t.parenL)this.unexpected();o.kind="init"}return super.parsePropertyValue(o,p,l,c,d,f,h,m)}}return a});var rs=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(" ")),Zh=new Set("any bigint boolean false never null number object string symbol true undefined unknown void".split(" ")),em=new Set("get set new readonly static public private protected".split(" "));function Ap(e){return e>=97&&e<=122||e>=65&&e<=90||e===95||e===36}function hi(e){return e>=48&&e<=57}function ss(e){return Ap(e)||hi(e)}class Pp{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(!Ap(this.peek()))return!1;let e=this.pos+1;while(ss(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)||ss(this.text.charCodeAt(t)))return!1;return this.pos=t,!0}name(){let e=this.word();return e!==void 0&&!rs.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(hi(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(hi(e.charCodeAt(t)))t++;if(t===r)return!1}let i=e.charCodeAt(t);if(ss(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||hi(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(Zh.has(t)){let n=this.peek();return n!==46&&n!==60}if(rs.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||em.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||rs.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 tm(e){return new Pp(e).readAll()}var nm=R.extend(fi);function un(e,t={}){return tm(e)||im(e,t.inline??!1)}function im(e,t){let n=!1,i=new nm(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 os=/<!--[\s\S]*?-->|<script\s+(?:[^>]*|(?:[^=>'"/]+=(?:"[^"]*"|'[^']*'|[^>\s]+)\s+)*)lang=(["'])?([^"' >]+)\1[^>]*>/y;function yi(e){return e.charCodeAt(0)===65279?e.slice(1):e}function Je(e){return e>=48&&e<=57}function J(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 I(e,t){let n=t;while(n<e.length&&J(e.charCodeAt(n)))n++;return n}function gi(e){let t=e.indexOf("<");while(t!==-1){let n=e.charCodeAt(t+1);if(n===33||n===115){os.lastIndex=t;let i=os.exec(e);if(i){if(n===115)return i[2]==="ts";t=e.indexOf("<",os.lastIndex);continue}}t=e.indexOf("<",t+1)}return!1}function xi(e,t){let n=e.indexOf("</script",t);while(n!==-1){if(e.charCodeAt(I(e,n+8))===mi)return n;n=e.indexOf("</script",n+8)}return-1}function bi(e,t){return I(e,t+8)+1}var rm=new Set("area base br col command embed hr img input keygen link meta param source track wbr".split(" "));function dn(e){return rm.has(e)||e.charCodeAt(0)===33&&e.toLowerCase()==="!doctype"}function vi(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 sm=34,om=39,Dp=47,Np=61,mi=62,ye=(e)=>e===sm||e===om;function dt(e,t,n){let i=t;for(;i<e.length;i++){let r=e.charCodeAt(i);if(J(r)||r===Dp||r===mi)break;if(n&&(ye(r)||r===Np))break}return i}function Ei(e,t){let n=e.charCodeAt(t);return J(n)||ye(n)||n===Np||n===60||n===mi||n===96||n===Dp&&e.charCodeAt(t+1)===mi}var $p=0,L=1,fn=2,H=3,am=0;var pm=2,Lp=3,Rp=4,hn=4,lm=5,cm=6,um={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:fn,else:fn,finally:fn,try:fn,for:hn,if:hn,while:hn,with:hn,import:lm,export:cm},Mp=10,as=Array(ps(128,0)).fill(null);for(let e of Object.entries(um)){let t=ps(e[0].charCodeAt(0),e[0].length),n=as[t]??[];n.push(e),as[t]=n}function ps(e,t){return e*(Mp+1)+t}function dm(e,t,n){let i=e.charCodeAt(t);if(i>=128||n-t>Mp)return H;let r=ps(i,n-t),s=as[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 Bp=new Uint8Array(128);for(let e of["az","AZ","09","__","$$","\\\\"])for(let t=e.charCodeAt(0);t<=e.charCodeAt(1);t++)Bp[t]=1;function ls(e){return e>=128?!J(e):Bp[e]===1}function Fp(e,t,n){let i=e.length,r=[],s=t,a=L,o=!1;while(s<i){let p=e.charCodeAt(s);if(p===32||p===10||J(p)){s++;continue}if(p===47){let c=hm(e,s);if(c!==-1){s=c;continue}}let l=o;if(o=!1,ls(p)||p===35){let c=s;if(s=mm(e,s+1),!l&&n?.(c,s))return-1;let d=l?H:dm(e,c,s);a=d===L||d===fn||d===hn?L:H;continue}switch(s++,p){case 34:case 39:s=ym(e,s,p),a=H;break;case 96:s=_p(e,s,r),a=e.charCodeAt(s-1)===123?L:H;break;case 47:{let c=a===H?-1:gm(e,s);if(c===-1)a=L;else s=Ip(e,c),a=H;break}case 40:r.push(am),a=L;break;case 41:if(r.length===0)return s-1;r.pop(),a=H;break;case 123:r.push(a===L?Lp:pm),a=$p;break;case 125:{if(r.length===0)return s-1;let c=r.pop();if(c===Rp)s=_p(e,s,r),a=e.charCodeAt(s-1)===123?L:H;else a=c===Lp?H:$p;break}case 93:a=H;break;case 46:if(Je(e.charCodeAt(s)))s=Ip(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&&!Je(e.charCodeAt(s+1)))s++,o=!0;a=L;break;case 33:a=a===H&&!J(e.charCodeAt(s-2))?H:L;break;case 43:case 45:if(e.charCodeAt(s)===p&&a===H)s++;else a=L;break;case 61:if(e.charCodeAt(s)===62)s++;a=L;break;default:a=L}}return i}function Op(e){return e===10||e===13||e===8232||e===8233}function fm(e,t){for(let n=t;n<e.length;n++)if(Op(e.charCodeAt(n)))return n;return e.length}function hm(e,t){let n=e.charCodeAt(t+1);if(n===47)return fm(e,t+2);if(n!==42)return-1;let i=e.indexOf("*/",t+2);return i===-1?e.length:i+2}function mm(e,t){let n=t;while(n<e.length){let i=e.charCodeAt(n);if(i===92)n+=2;else if(ls(i))n++;else break}return n}function Ip(e,t){let n=t;while(n<e.length&&ls(e.charCodeAt(n)))n++;return n}function ym(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 _p(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(Rp),i+2}return e.length}function gm(e,t){let n=!1;for(let i=t;i<e.length;i++){let r=e.charCodeAt(i);if(Op(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 jp={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 Ti(e,t){return Object.hasOwn(jp,e)&&jp[e].includes(t)}var qp="{",Hp=60,us=62,ft=47,Wp=61,yn=123,Vp=/\s*>/y,cs=/<\/textarea(\s[^>]*)?>/iy,xm=["cript","tyle","velte:options"],Gp="</svelte:options";function Si(e){let t=yi(e).trimEnd();return bm(t,gi(t),null)}function bm(e,t,n){let i={typescript:t,instance:null,module:null,css:null,options:null},r=vm(e),s=[],a=0;while(a<=r){let o=e.charCodeAt(a);if(o===Hp)a=Sm(e,a,s,i,n);else if(o===yn)a=Tm(e,a,s);else a++}return i}function vm(e){let t=-1,n=e.indexOf("<s");while(n!==-1){let i=Em(e,n+2);if(i!==-1){let r=e.charCodeAt(i);if(i===e.length||J(r)||r===ft||r===us)t=n}n=e.indexOf("<s",n+2)}return t}function Em(e,t){for(let n of xm)if(e.startsWith(n,t))return t+n.length;return-1}function gn(e,t){return Math.min(Fp(e,t)+1,e.length)}function Tm(e,t,n){let i=I(e,t+1),r=e.charCodeAt(i),s=e.charCodeAt(i+1);if(r===35||r===58||r===64||r===ft&&s!==ft&&s!==42){i++;while(i<e.length){let a=e.charCodeAt(i);if(a<97||a>122)break;i++}if(r===35)n.push(qp);else if(r===ft){let a=n.lastIndexOf(qp);if(a!==-1)n.length=a}}return gn(e,i)}function Sm(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)===ft){let c=t+2,d=e.slice(c,dt(e,c,!1)),f=n.lastIndexOf(d);if(f!==-1)n.length=f;return mn(e,I(e,c+d.length))}let s=e.slice(t+1,dt(e,t+1,!1)),a=I(e,t+1+s.length),o=n[n.length-1];if(o!==void 0&&Ti(o,s))n.pop();let p=n.length===0;if(r&&p&&(s==="script"||s==="style"||s==="svelte:options"))r.tags.push(t);if(p&&(s==="script"||s==="style")){let c=[];if(a=mn(e,wm(e,a,c)),s==="script"){let f=Cm(e,t,a,c);if(f.context==="module")i.module??=f;else i.instance??=f;return f.end}let d=km(e,t,a,c);return i.css??=d,d.end}let l=p&&s==="svelte:options"?[]:null;if(a=Am(e,a,l),e.charCodeAt(a)===ft||dn(s)){if(e.charCodeAt(a)===ft)a++;a=mn(e,a)}else{if(a=mn(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(l&&e.startsWith(Gp,a))a=mn(e,I(e,a+Gp.length));else return n.push(s),a}if(l)i.options??={start:t,end:a,attributes:l};return a}function mn(e,t){return e.charCodeAt(t)===us?t+1:t}function Cm(e,t,n,i){let r=xi(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:bi(e,r),context:a?"module":"default",attributes:i,content:{start:n,end:s}}}function km(e,t,n,i){let r=vi(e,n),s=r;if(e.startsWith("</style",s)){s+=7,Vp.lastIndex=s;let a=Vp.exec(e);if(a)s+=a[0].length}return{start:t,end:s,attributes:i,content:{start:n,end:r}}}function wm(e,t,n){let i=t;for(;;){let r=i,s=dt(e,i,!0);if(s===r)return i;i=s;let a=!0;if(e.charCodeAt(i)===Wp){let o=I(e,i+1),p=e.charCodeAt(o),l=-1;if(ye(p)){let d=e.indexOf(e[o],o+1);if(d!==-1)l=d+1}if(l===-1){l=o;while(l<e.length&&e.charCodeAt(l)!==us&&!J(e.charCodeAt(l)))l++}let c=ye(p)?1:0;a=e.slice(o+c,l-c),i=l}n.push({name:e.slice(r,s),value:a,start:r,end:i}),i=I(e,i)}}function Am(e,t,n){let i=t;for(;;){for(;;){if(e.startsWith("/*",i)){let p=e.indexOf("*/",i+2);i=p===-1?e.length:p+2}else if(e.startsWith("//",i)){let p=e.indexOf(`
|
|
36
|
+
`,i+2);i=p===-1?e.length:p}else break;i=I(e,i)}let r=i;if(e.charCodeAt(i)===yn){i=I(e,gn(e,i+1));continue}let s=dt(e,i,!0);if(s===r)return i;let a=s,o=!0;if(i=I(e,s),e.charCodeAt(i)===Wp){let p=I(e,i+1);a=e.startsWith("/>",p)?p+1:Pm(e,p),o=ye(e.charCodeAt(p))?e.slice(p+1,Math.max(p+1,a-1)):e.slice(p,a),i=I(e,a)}n?.push({name:e.slice(r,s),value:o,start:r,end:a})}}function Pm(e,t){let n=e.charCodeAt(t);if(ye(n)){let r=t+1;while(r<e.length){let s=e.charCodeAt(r);if(s===n)return r+1;r=s===yn?gn(e,r+1):r+1}return e.length}let i=t;while(i<e.length&&!Ei(e,i))i=e.charCodeAt(i)===yn?gn(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===Hp){if(cs.lastIndex=n,cs.test(e))return cs.lastIndex}n=i===yn?gn(e,n+1):n+1}return e.length}function Ci(){throw Error('sveast: parsing TypeScript needs `typescript` from "sveast/typescript": createParser({ typescript }) or createModuleParser({ typescript })')}var Nm=/^\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=ve(this.position[0]),this.end=ve(this.position[1]),this.frame=$m(this.start.line-1,this.end.column)}}var zp=(e)=>e.replace(Nm,(t)=>" ".repeat(t.length));function $m(e,t){let n=Math.max(0,e-2),i=[];for(let s=n;s<e+3;s++){let a=wo(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," ")}: ${zp(s)}`;if(n+a!==e)return o;return`${o}
|
|
38
|
+
${" ".repeat(r+2+zp(s.slice(0,t)).length)}^`}).join(`
|
|
39
|
+
`)}function Kp(e){throw new b(e,"attribute_duplicate","Attributes need to be unique")}function Xp(e){throw new b(e,"attribute_empty_shorthand","Attribute shorthand cannot be empty")}function Yp(e,t){throw new b(e,"block_duplicate_clause",`${t} cannot appear more than once within a block`)}function Qp(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 Zp(e){throw new b(e,"block_invalid_elseif","'elseif' should be 'else if'")}function el(e,t,n){throw new b(e,"block_invalid_placement",`{#${t} ...} block cannot be ${n}`)}function tl(e){throw new b(e,"block_unclosed","Block was left open")}function nl(e){throw new b(e,"block_unexpected_close","Unexpected block closing tag")}function il(e){throw new b(e,"const_tag_invalid_expression","{@const ...} must consist of a single variable declaration")}function rl(e){throw new b(e,"css_empty_declaration","Declaration cannot be empty")}function hs(e){throw new b(e,"css_expected_identifier","Expected a valid CSS identifier")}function sl(e){throw new b(e,"css_selector_invalid","Invalid selector")}function ol(e){throw new b(e,"debug_tag_invalid_arguments","{@debug ...} arguments must be identifiers, not arbitrary expressions")}function ms(e){throw new b(e,"declaration_tag_invalid_type","Declaration tags must be `let` or `const` declarations")}function al(e){throw new b(e,"directive_invalid_value","Directive value must be a JavaScript expression enclosed in curly braces")}function pl(e,t){throw new b(e,"directive_missing_name",`\`${t}\` name cannot be empty`)}function ll(e,t){throw new b(e,"element_invalid_closing_tag",`\`</${t}>\` attempted to close an element that was not open`)}function cl(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 ys(e,t){throw new b(e,"element_unclosed",`\`<${t}>\` was left open`)}function gs(e){throw new b(e,"expected_attribute_value","Expected attribute value")}function ul(e){throw new b(e,"expected_block_type","Expected 'if', 'each', 'await', 'key' or 'snippet'")}function xs(e){throw new b(e,"expected_identifier","Expected an identifier")}function dl(e){throw new b(e,"expected_pattern","Expected identifier or destructure pattern")}function fl(e){throw new b(e,"expected_tag","Expected 'html', 'render', 'attach', 'const', or 'debug'")}function Ke(e,t){throw new b(e,"expected_token",`Expected token ${t}`)}function hl(e){throw new b(e,"expected_whitespace","Expected whitespace")}function Lm(e,t){throw new b(e,"js_parse_error",`${t}`)}function ml(e){throw new b(e,"render_tag_invalid_expression","`{@render ...}` tags can only contain call expressions")}function yl(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 gl(e,t){throw new b(e,"script_invalid_attribute_value",`If the \`${t}\` attribute is supplied, it must be a boolean attribute`)}function xl(e){throw new b(e,"script_invalid_context",'If the context attribute is supplied, its value must be "module"')}function bl(e,t){throw new b(e,"script_reserved_attribute",`The \`${t}\` attribute is reserved and cannot be used`)}function vl(e){throw new b(e,"style_duplicate","A component can have a single top-level `<style>` element")}function El(e){throw new b(e,"svelte_component_invalid_this","Invalid component definition — must be an `{expression}`")}function Tl(e){throw new b(e,"svelte_component_missing_this","`<svelte:component>` must have a 'this' attribute")}function bs(e){throw new b(e,"svelte_element_missing_this","`<svelte:element>` must have a 'this' attribute with a value")}function Sl(e,t){throw new b(e,"svelte_meta_duplicate",`A component can only have one \`<${t}>\` element`)}function Cl(e,t){throw new b(e,"svelte_meta_invalid_content",`<${t}> cannot have children`)}function kl(e,t){throw new b(e,"svelte_meta_invalid_placement",`\`<${t}>\` tags cannot be inside elements or blocks`)}function wl(e,t){throw new b(e,"svelte_meta_invalid_tag",`Valid \`<svelte:...>\` tag names are ${t}`)}function Al(e){throw new b(e,"svelte_options_deprecated_tag",'"tag" option is deprecated — use "customElement" instead')}function Pl(e){throw new b(e,"svelte_options_invalid_attribute","`<svelte:options>` can only receive static attributes")}function wi(e,t){throw new b(e,"svelte_options_invalid_attribute_value",`Value must be ${t}, if specified`)}function Dl(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 Nl(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 $l(e){throw new b(e,"svelte_options_invalid_customelement_shadow",'"shadow" must be either "open", "none" or `ShadowRootInit` object.')}function vs(e){throw new b(e,"svelte_options_invalid_tagname","Tag name must be lowercase and hyphenated")}function Ll(e){throw new b(e,"svelte_options_reserved_tagname","Tag name is reserved")}function Il(e,t){throw new b(e,"svelte_options_unknown_attribute",`\`<svelte:options>\` unknown attribute '${t}'`)}function _l(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 Rl(e,t,n){throw new b(e,"tag_invalid_placement",`{@${t} ...} tag cannot be ${n}`)}function ue(e){throw new b(e,"unexpected_eof","Unexpected end of input")}function Ml(e,t){throw new b(e,"unexpected_reserved_word",`'${t}' is a reserved word in JavaScript and cannot be used here`)}function Bl(e){throw new b(e,"unterminated_string_constant","Unterminated string constant")}function Fl(e){throw new b(e,"void_element_invalid_content","Void elements cannot have children or closing tags")}var Lt="",Ol=[],Ai=0,j=[],q=0;function Im(e,t){Lt=e,Ol=t,Ai=0}function _m(){return Ai}function Rm(e,t,n,i){Ai=i}function Mm(e,t,n,i,r,s){Ai=i;let a=t;if(e&&a.includes(`
|
|
40
|
+
`)){let p=Lt.lastIndexOf(`
|
|
41
|
+
`,n-1)+1,l=p,c=Lt.charCodeAt(l);while(c===32||c===9)c=Lt.charCodeAt(++l);if(l>p)a=Bm(a,Lt.slice(p,l))}let o={type:e?"Block":"Line",value:a,start:n,end:i};if(r&&s)o.loc={start:r,end:s};Ol.push(o)}function Bm(e,t){let n=e.startsWith(t)?t.length:0,i="",r=e.indexOf(`
|
|
42
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
|
|
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}`:`{
|
|
43
|
+
`,n)}return i+e.slice(n)}function Fm(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:p})=>({type:s,value:a,start:o,end:p})),q=0,fs(e,void 0,!1),q<j.length&&(j[q].start>=e.end||e.type==="Program")){e.trailingComments??=[];while(q<j.length)e.trailingComments.push(j[q++])}}var Om=new Map([["BlockStatement","body"],["Program","body"],["ArrayExpression","elements"],["ObjectExpression","properties"]]);function Up(e,t){for(let n=e;n<t;n++){let i=Lt.charCodeAt(n);if(i!==44&&i!==41&&i!==32&&i!==9)return!0}return!1}function fs(e,t,n){while(q<j.length&&j[q].start<e.start)e.leadingComments??=[],e.leadingComments.push(j[q++]);if(q>=j.length)return;let i=j[q].start;if(i<e.end||!Up(e.end,i)){let r=et(e),s=Om.get(e.type),a=s===void 0?void 0:r[s],o=Array.isArray(a)&&a.length===0;for(let p in r){if(q>=j.length)return;if(p==="type")continue;let l=r[p];if(Array.isArray(l)){let c=p===s;for(let d=0;d<l.length;d++){let f=l[d];if(De(f))fs(f,e,c?d===l.length-1:o)}}else if(De(l))fs(l,e,o)}if(q>=j.length)return}if(t!==void 0&&e.end===t.end)return;if(n)while(q<j.length){if(t&&j[q].start>=t.end)break;e.trailingComments??=[],e.trailingComments.push(j[q++])}else if(e.end<=j[q].start&&!Up(e.end,j[q].start))e.trailingComments=[j[q++]]}var Pi=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(" ")),Di=!1,xn=1,jm=2,qm=32,Vm=256,Gm=xn|jm|Vm,Hm=2,Wm=3,zm=4,Um=/\r\n?|\n|\u2028|\u2029/,Jp=new Map;function ki(e){if(!(e instanceof RegExp))return e;let t=Jp.get(e);if(!t){let n=new Set(e.source.slice(4,-2).split("|"));t={test:(i)=>n.has(i)},Jp.set(e,t)}return t}var Es=pn((e)=>class extends e{declareName(t,n,i){let r=!1;if(n===Hm){let s=this.currentScope();if(r=Z(s.lexical,t)||Z(s.functions,t)||Z(s.var,t),s.lexical.push(t),this.inModule&&s.flags&xn)delete this.undefinedExports[t]}else if(n===zm)this.currentScope().lexical.push(t);else if(n===Wm){let s=this.currentScope();r=this.treatFunctionsAsVar?Z(s.lexical,t):Z(s.lexical,t)||Z(s.var,t),s.functions.push(t)}else for(let s=this.scopeStack.length-1;s>=0;--s){let a=this.scopeStack[s];if(Z(a.lexical,t)&&!(a.flags&qm&&a.lexical[0]===t)||!this.treatFunctionsAsVarInScope(a)&&Z(a.functions,t)){r=!0;break}if(a.var.push(t),this.inModule&&a.flags&xn)delete this.undefinedExports[t];if(a.flags&Gm)break}if(r)this.raiseRecoverable(i,`Identifier '${t}' has already been declared`)}}),Ts=pn((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=ki(this.keywords),this.reservedWords=ki(this.reservedWords),this.reservedWordsStrict=ki(this.reservedWordsStrict),this.reservedWordsStrictBind=ki(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(Um).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 p=this.context;if(p.length!==1||p[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 l=this.scopeStack,c=l[0];if(l.length!==1||c.flags!==xn||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(xn);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")Di=!0;return o}checkUnreserved(s){if(Pi.has(s.name))super.checkUnreserved(s)}canInsertSemicolon(){let s=this.type;return s===n.eof||s===n.braceR||ln(this.input,this.lastTokEnd,this.start)}checkLocalExport(){}skipSpace(){let s=this.input,a=this.options.locations,o=this.pos,p=s.charCodeAt(o);for(;;)if(p===32||p===9)p=s.charCodeAt(++o);else if(p===10){if(p=s.charCodeAt(++o),a)this.curLine++,this.lineStart=o}else break;if(this.pos=o,p===47||p<33||p>=128)super.skipSpace()}readWord1(){let s=this.input,a=this.pos,o=a,p=s.charCodeAt(o),l=0;while(p>=97&&p<=122||p>=65&&p<=90||p>=48&&p<=57||p===95||p===36)l=Math.imul(l,31)+p|0,p=s.charCodeAt(++o);if(p>=128||p===92)return super.readWord1();return this.containsEsc=!1,this.pos=o,So(s,a,o,l)}readWord(){let s=this.readWord1();return this.finishToken(i.get(s)??n.name,s)}}}),jl=ci(Es,Ts),Jm=/ \(\d+:\d+\)$/;function bn(e){return e}function ql(e){return e instanceof SyntaxError&&"pos"in e&&typeof e.pos==="number"}function Ss(e,t,n,i,r,s=e.root.comments.length){let a=e.root.comments;Im(t,a);let o={onComment:e.comments?Mm:Rm,sourceType:"module",ecmaVersion:16,locations:e.loc,preserveParens:i};if(e.lfOnly)o.startLocation=ve(n);let p=e.isTypeScript?e.typescript:jl;if(!p)Ci();let l;try{l=r(p,o)}catch(c){if(!ql(c))throw c;Lm(c.pos,c.message.replace(Jm,""))}if(a.length>s)Fm(bn(l),a,n);return l}function Vl(e,t,n=0){return bn(Ss(e,t,0,!1,(i,r)=>{if(n>0&&r.locations)r.startLocation=ve(n);let s=new i(r,t,n).parse();return s.start=0,s},0))}function Km(e,t){if(!t)return{line:1,column:0};let{column:n}=ve(e);return{line:ko(e-n)+1,column:n}}var Xm={count:0},ds,Ym=(e)=>e.parseExpression();function Qm(e,t,n,i,r){let s=ds;if(ds=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="",ds=s,o}function Gl(e,t,n,i){return Xm.count+=1,Di=!1,Ss(e,t,n,!0,(r,s)=>(s.startLocation??=Km(n,s.locations),Qm(r,s,t,n,i)))}function It(e,t,n,i=!1){let r=bn(Gl(e,t,n,Ym)),s=Math.max(r.end,_m());return{node:Di&&!i?Cs(r):r,end:s}}function Hl(e,t,n){let i=e.root.comments.length,r=!0,s=Gl(e,t,n,(o)=>{let p={shorthandAssign:-1,trailingComma:-1,parenthesizedAssign:-1,parenthesizedBind:-1,doubleProto:-1},l=o.parseMaybeConditional(void 0,p);if(o.type!==jl.acorn.tokTypes.eof)return r=!1,l;let c=o.toAssignable(l,!1,p);return o.checkLValPattern(c),c});if(!r){e.root.comments.length=i;return}let a=bn(s);return Di?Cs(a):a}function Wl(e,t,n){return bn(Ss(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(ql(a)&&a.pos===t.length)ue(t.length);throw a}}))}function Cs(e){let t=e;while(t.type==="ParenthesizedExpression")t=t.expression;return Vt(t,Cs),t}var Zm=[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],ey=/[:!]/;function ks(e){let t;return()=>(t??=ty(e),t)}function ty(e){let t=new Map,n=0,i="";for(let r of e.split(" ")){let s=r.search(ey);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 bT=ks("0amp!12 1pos:13 0gt!1q 0lt!1o 0quot!y"),ws=(e)=>e>=48&&e<=57,ny=(e)=>ws(e)||e>=65&&e<=70||e>=97&&e<=102,zl=(e)=>ws(e)||e>=65&&e<=90||e>=97&&e<=122,Ni=0;function iy(e,t,n,i){if(e.charCodeAt(t)===35){let o=(e.charCodeAt(t+1)|32)===120,p=t+(o?2:1),l=p;while(l<e.length&&(o?ny:ws)(e.charCodeAt(l)))l++;if(l===p)return 0;return Ni=e.charCodeAt(l)===59?l+1:l,Number.parseInt(e.slice(p,l),o?16:10)}let{table:r,longest:s}=i(),a=t;while(a-t<s&&zl(e.charCodeAt(a)))a++;if(e.charCodeAt(a)===59){let o=r.get(e.slice(t,a+1));if(o!==void 0)return Ni=a+1,o}for(let o=a;o>t;o--){let p=r.get(e.slice(t,o));if(p===void 0)continue;if(n){let l=e.charCodeAt(o);if(zl(l)||l===95||l===61)continue}return Ni=o,p}return 0}function ry(e,t){if(e===10&&!t)return 32;if(e<128)return e;if(e<=159)return Zm[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 $i(e,t,n){let i=e.indexOf("&");if(i===-1)return e;let r="",s=0;while(i!==-1){let a=iy(e,i+1,t,n);if(a)r+=e.slice(s,i)+String.fromCodePoint(ry(a,t)),s=Ni;i=e.indexOf("&",a?s:i+1)}return r+e.slice(s)}var sy=/\r(?!\n)|[\u2028\u2029]/,cc=/\s*}/y;function Ds(e,t){let n=e.codePointAt(t);if(n===void 0||!me(n,!0))return t;let i=t+(n<=65535?1:2),r=e.codePointAt(i);while(r!==void 0&&Oe(r,!0))i+=r<=65535?1:2,r=e.codePointAt(i);return i}class uc{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&&!sy.test(e),this.isTypeScript=gi(e),this.typescript=n.typescript,this.isTypeScript&&!this.typescript)Ci();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)Ke(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)ue(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=I(this.source,this.index)}requireWhitespace(){if(!J(this.source.charCodeAt(this.index)))hl(this.index);this.allowWhitespace()}eatClosingBrace(){this.allowWhitespace(),this.eat("}",!0)}sourceLocation(e,t){return this.loc?{start:ve(e),end:ve(t)}:void 0}readIdentifierName(){let e=this.index,t=Ds(this.source,e),n=this.source.slice(e,t);if(this.index=t,Pi.has(n))Ml(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 oy={"||":1,"??":1,"&&":2,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"+":9,"-":9,"*":10,"/":10,"%":10};function Ns(e,t,n,i){return{type:"Literal",start:t,end:n,value:i,raw:e.slice(t,n)}}function Ul(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 Ns(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 Ns(e,t,i,Number(e.slice(t,i)))}function ay(e,t,n){let i=Ds(e,t);if(i===t)return Ul(e,t);let r=e.slice(t,i);if(r==="true"||r==="false"||r==="null")return Ns(e,t,i,r==="null"?null:r==="true");if(Pi.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=py(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 p,l;if(o===46){if(l=Ds(e,a+1),l===a+1)return null;p={type:"Identifier",start:a+1,end:l,name:e.slice(a+1,l)}}else if(o===91){if(p=Ul(e,a+1),!p||e.charCodeAt(p.end)!==93)return null;l=p.end+1}else return s;s={type:"MemberExpression",start:t,end:l,object:s,property:p,computed:o===91,optional:!1},a=l}}function py(e,t,n){let i=[],r=I(e,t);if(e.charCodeAt(r)===41)return{arguments:i,end:r+1};for(;;){let s=Ii(e,r,n);if(!s)return null;i.push(s),r=I(e,s.end);let a=e.charCodeAt(r);if(a===41)return{arguments:i,end:r+1};if(a!==44)return null;if(r=I(e,r+1),e.charCodeAt(r)===41)return null}}function Rs(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 ay(e,t,n);let s=Rs(e,I(e,t+1),n);if(!s)return null;return{type:"UnaryExpression",start:t,end:s.end,operator:i===33?"!":"-",prefix:!0,argument:s}}function Jl(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 $s(e,t,n,i){if(dc(e.charCodeAt(t.end)))return t;let r=I(e,t.end),s=Jl(e,r,i);if(s===null)return t;let a=oy[s];if(a<=n)return t;let o=Rs(e,I(e,r+s.length),i);if(!o)return null;let p=$s(e,o,s==="??"?2:a,i);if(!p)return null;let l;if(s==="||"||s==="&&"||s==="??"){let c=Jl(e,I(e,p.end),i);if(s==="??"?c==="||"||c==="&&":c==="??")return null;l={type:"LogicalExpression",start:t.start,end:p.end,left:t,operator:s,right:p}}else l={type:"BinaryExpression",start:t.start,end:p.end,left:t,operator:s,right:p};return $s(e,l,n,i)}function Ii(e,t,n){let i=Rs(e,t,n);if(!i)return null;let r=$s(e,i,-1,n);if(!r||dc(e.charCodeAt(r.end)))return r;let s=I(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=Ii(e,I(e,s+1),n);if(!o)return null;let p=I(e,o.end);if(e.charCodeAt(p)!==58)return null;let l=Ii(e,I(e,p+1),n);if(!l)return null;return{type:"ConditionalExpression",start:r.start,end:l.end,test:r,consequent:o,alternate:l}}function dc(e){return e===125||e===41||e===44||e===58}function ly(e,t){let n=e.charCodeAt(I(e,t));return n===125||n===41}function cy(e,t,n){let i=Ii(e,t,n);return i&&ly(e,i.end)?i:null}function ge(e){switch(e.loc={start:Ze(e.start),end:Ze(e.end)},e.type){case"MemberExpression":ge(e.object),ge(e.property);break;case"CallExpression":ge(e.callee);for(let t of e.arguments)ge(t);break;case"UnaryExpression":ge(e.argument);break;case"BinaryExpression":case"LogicalExpression":ge(e.left),ge(e.right);break;case"ConditionalExpression":ge(e.test),ge(e.consequent),ge(e.alternate);break}}function ee(e){let t=!e.loc||e.lfOnly?cy(e.source,e.index,e.isTypeScript):null;if(t){if(e.index=t.end,e.loc)ge(t);return t}let{node:n,end:i}=It(e,e.source,e.index);return e.index=i,n}var uy=new Set(["server","client","worker","test","default"]);function dy(e,t,n){let{source:i,index:r}=e;if(r>=i.length)ue(i.length);let s=xi(i,r);if(s===-1)ys(i.length,"script");e.index=bi(i,s);let a=e.script?Vl(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,Ze(t)),Object.assign(a.loc.end,Ze(e.index));else if(e.loc)a.loc={start:Ze(t),end:Ze(e.index)};let o="default";for(let p of n){if(uy.has(p.name))bl(p,p.name);if(p.name==="module"){if(p.value!==!0)gl(p,p.name);o="module"}if(p.name==="context"){let l=p.value;if(!Array.isArray(l)||l.length!==1||l[0].type!=="Text"||l[0].data!=="module")xl(p);o="module"}}return{type:"Script",start:t,end:e.index,context:o,content:a,attributes:n}}var fy=/(even|odd|\+?(\d+|\d*n(\s*[+-]\s*\d+)?)|-\d*n(\s*\+\s*\d+))((?=\s*[,)])|\s+of(\s+|(?=[.#[*:&])))/y,hy=/\d+(\.\d+)?%/y,my=/\\[0-9a-fA-F]{1,6}(\r\n|\s)?/y,yy=/\s*>/y,Xe=-1,fc=34,gy=35,xy=36,by=38,hc=39,vy=40,Ey=41,Mi=42,Ty=43,Sy=45,Cy=46,mc=47,Ls=58,ky=59,wy=60,Kl=61,Ay=62,Py=91,Ms=92,Dy=93,Ny=94,yc=123,Is=124,$y=125,gc=126,_i=[];function Ly(e,t,n){let i=e.index;_i=[];let r=e.css?_y(e):Iy(e),s=e.index;return e.eat("</style",!0),e.read(yy),{type:"StyleSheet",start:t,end:e.index,attributes:n,children:r,comments:_i,content:{start:i,end:s,styles:e.source.slice(i,s),comment:null}}}function Iy(e){return e.index=vi(e.source,e.index),[]}function _y(e){let t=[];for(;;){if(_t(e,!0),e.match("</style")||e.index>=e.source.length)break;t.push(e.match("@")?xc(e):bc(e))}return t}function xc(e){let t=e.index;e.eat("@",!0);let n=ht(e),i=Bs(e,!0),r=null;if(e.match("{"))r=Tc(e);else e.eat(";",!0);return{type:"Atrule",start:t,end:e.index,name:n,prelude:i,block:r}}function bc(e){let t=e.index;return{type:"Rule",prelude:vc(e,!1),block:Tc(e),start:t,end:e.index}}function vc(e,t){let n=[];_t(e,!0);let i=e.index;while(e.index<e.source.length){n.push(Ry(e,t));let r=e.index;if(_t(e,!0),e.match(t?")":"{"))return{type:"SelectorList",start:i,end:r,children:n};e.eat(",",!0),_t(e,!0)}return ue(e.source.length)}function Xl(e,t){return{type:"RelativeSelector",combinator:e,selectors:[],start:t,end:-1}}function Ry(e,t){let{source:n,index:i}=e,r=[],s=Xl(null,e.index);while(e.index<n.length){let a=e.index,o=n.charCodeAt(a),p=s.selectors;if(o===by)e.index++,p.push({type:"NestingSelector",name:"&",start:a,end:e.index});else if(o===Mi)e.index++,p.push(Yl(e,a,"*"));else if(o===gy)e.index++,p.push({type:"IdSelector",name:ht(e),start:a,end:e.index});else if(o===Cy)e.index++,p.push({type:"ClassSelector",name:ht(e),start:a,end:e.index});else if(o===Ls){let f=n.charCodeAt(a+1)===Ls;e.index+=f?2:1;let h=ht(e),m=null;if(e.eat("("))m=vc(e,!0),e.eat(")",!0);if(f)p.push({type:"PseudoElementSelector",name:h,start:a,end:e.index,...m&&{args:m}});else p.push({type:"PseudoClassSelector",name:h,args:m,start:a,end:e.index})}else if(o===Py)e.index++,p.push(My(e,a));else{let f=t?e.read(fy):null,h=!f&&Je(o)?e.read(hy):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(Ec(n,a)===0){let m=ht(e);p.push(Yl(e,a,m))}}let l=e.index;_t(e,!1);let c=e.match(",")||e.match(t?")":"{");if(e.index=l,c)return s.end=l,r.push(s),{type:"ComplexSelector",start:i,end:l,children:r};let d=By(e);if(d){if(s.selectors.length>0)s.end=l,r.push(s);if(s=Xl(d,d.start),e.allowWhitespace(),e.match(",")||e.match(t?")":"{"))sl(e.index)}}return ue(n.length)}function Yl(e,t,n){let i=n,r;if(e.eat("|"))r=i,i=e.eat("*")?"*":ht(e);return{type:"TypeSelector",name:i,...r!==void 0&&{namespace:r},start:t,end:e.index}}function My(e,t){let n=e.source;e.allowWhitespace();let i=ht(e);e.allowWhitespace();let r=null,s=null,a=n.charCodeAt(e.index);if(a===Kl)s="=";else if((a===gc||a===Ny||a===xy||a===Mi||a===Is)&&n.charCodeAt(e.index+1)===Kl)s=n.slice(e.index,e.index+2);if(s)e.index+=s.length,e.allowWhitespace(),r=qy(e);e.allowWhitespace();let o=e.index;while(Cc(n.charCodeAt(e.index)))e.index++;let p=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:p}}function Ec(e,t){let n=e.charCodeAt(t);if(n===Ty||n===gc||n===Ay)return 1;if(n===Is&&e.charCodeAt(t+1)===Is)return 2;return 0}function By(e){let t=e.index;e.allowWhitespace();let n=e.index,i=Ec(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 Tc(e){let t=e.index;e.eat("{",!0);let n=[];while(e.index<e.source.length){if(_t(e,!0),e.match("}"))break;n.push(Fy(e))}return e.eat("}",!0),{type:"Block",start:t,end:e.index,children:n}}function Fy(e){if(e.match("@"))return xc(e);let t=e.index;Bs(e,!1);let n=e.source.charCodeAt(e.index);return e.index=t,n===yc?bc(e):Oy(e)}function Oy(e){let{source:t,index:n}=e;if(n>=t.length)ue(t.length);let i=n;while(i<t.length){let p=t.charCodeAt(i);if(p===Ls||J(p))break;i++}let r=t.slice(n,i);e.index=i,e.allowWhitespace(),e.eat(":");let s=e.index;e.allowWhitespace();let a=Bs(e,!0);if(!a&&!r.startsWith("--"))rl({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 Bs(e,t){let n=e.source,i=n.length,r="",s=e.index,a=null,o=!1,p=!1,l=Xe,c=e.index;while(c<i){let d=n.charCodeAt(c);if(o){o=!1,c++;continue}if(d===Ms){o=!0,c++;continue}if(d===l)l=Xe;else if(d===Ey)p=!1;else if(l===Xe&&(d===fc||d===hc))l=d;else if(d===vy){if(jy(n,r,s,c))p=!0}else if((d===ky||d===yc||d===$y)&&!p&&l===Xe){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===mc&&!p&&l===Xe&&n.charCodeAt(c+1)===Mi){r+=n.slice(s,c),e.index=c;let f=Sc(e);if(t)f.position=r.length,_i.push(f),a??=[],a.push(f);c=e.index,s=c;continue}c++}return e.index=i,ue(i)}function jy(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 qy(e){let t=e.source,n=Xe;if(e.eat('"'))n=fc;else if(e.eat("'"))n=hc;let i=e.index,r=!1,s=i;while(s<t.length){let a=t.charCodeAt(s);if(r)r=!1;else if(a===Ms)r=!0;else if(n===Xe?a===Dy||J(a):a===n)return e.index=n===Xe?s:s+1,t.slice(i,s).trim();s++}return e.index=s,ue(t.length)}function ht(e){let{source:t,index:n}=e,i=t.charCodeAt(n);if(Je(i)||i===Sy&&Je(t.charCodeAt(n+1)))hs(n);let r="",s=n,a=n;while(a<t.length){let o=t.charCodeAt(a);if(o===Ms){r+=t.slice(s,a),e.index=a;let p=e.matchRegex(my);if(p){let l=String.fromCodePoint(Number.parseInt(p.slice(1),16));r+=l==="\\"?"\\\\":l,a+=p.length}else r+=`\\${t[a+1]}`,a+=2;s=a}else if(o>=160||Vy(o))a++;else break}if(r+=t.slice(s,a),e.index=a,r==="")hs(n);return r}function _t(e,t){let n=e.source;e.allowWhitespace();for(;;){let i=n.charCodeAt(e.index);if(i===mc&&n.charCodeAt(e.index+1)===Mi){let r=Sc(e);if(t)_i.push(r)}else if(i===wy&&e.eat("<!--"))e.readUntil("-->"),e.eat("-->",!0);else break;e.allowWhitespace()}}function Sc(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 Cc(e){return e>=65&&e<=90||e>=97&&e<=122}function Vy(e){return Cc(e)||Je(e)||e===95||e===45}var As=/<\/textarea(\s[^>]*)?>/iy,Gy=/^![a-zA-Z]+$/,Hy=/^[a-zA-Z][a-zA-Z0-9]*:[a-zA-Z][a-zA-Z0-9-]*[a-zA-Z0-9]$/,Wy=/^[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,Ps="\\u200C\\u200D",zy=new RegExp(`^(?:\\p{Lu}[$${Ps}\\p{ID_Continue}.]*|\\p{ID_Start}[$${Ps}\\p{ID_Continue}]*(?:\\.[$${Ps}\\p{ID_Continue}]+)+)$`,"u"),Uy=new Map([["use","UseDirective"],["animate","AnimateDirective"],["bind","BindDirective"],["class","ClassDirective"],["style","StyleDirective"],["on","OnDirective"],["let","LetDirective"],["in","TransitionDirective"],["out","TransitionDirective"],["transition","TransitionDirective"]]),Fs=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]]]),Ql=[...Fs.keys()],Jy=`${Ql.slice(0,-1).join(", ")} or ${Ql.at(-1)}`,Ky=62,Zl=123;function Bi(e,t){let n=e.index;if(n>=e.source.length)ue(e.source.length);let i=dt(e.source,n,t);return e.index=i,{name:e.source.slice(n,i),start:n,end:i,loc:e.sourceLocation(n,i)}}var vn=(e,t,n,i=n)=>({start:e,end:t,type:"Text",raw:n,data:i});function Xy(e){let t=e.charCodeAt(0);if(t>=97&&t<=122&&!e.includes("."))return!1;return zy.test(e)}function Yy(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||Gy.test(e)||Hy.test(e)||Wy.test(e)}function ec(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 Qy(e,t,n){let i=Fs.get(t);if(i)return i[0];if(n)return"Component";if(t==="title"){if(ec(e.stack,({type:r})=>{if(r==="SvelteHead")return!0;return r==="RegularElement"||r==="Component"?!1:void 0}))return"TitleElement"}if(t==="slot"){if(!ec(e.stack,(r)=>r.type==="RegularElement"&&r.attributes.some((s)=>s.type==="Attribute"&&s.name==="shadowrootmode")?!0:void 0))return"SlotElement"}return"RegularElement"}function Zy(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("/"))eg(e,t);else ng(e,t)}function eg(e,t){let{name:n}=Bi(e,!1);if(e.allowWhitespace(),e.eat(">",!0),dn(n))Fl(t);let i=e.current();while(!("name"in i)||i.name!==n){if(i.type!=="RegularElement"){let r=e.lastAutoClosedTag;if(r?.tag===n)cl(t,n,r.reason);ll(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 tg(e,t,n){return{type:e,start:t,end:-1,name:n}}function ng(e,t){let n=Bi(e,!1),{name:i}=n,r=Fs.get(i);if(!r&&i.startsWith("svelte:"))wl(n,Jy);let s=Xy(i);if(!s&&!Yy(i))_l(n);if(r?.[1]){if(e.metaTags.has(i))Sl(t,i);if(e.current().type!=="Root")kl(t,i);e.metaTags.add(i)}let a=tg(Qy(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"&&Ti(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 p=[];a.attributes=p,rc(e,p,pg),rg(e,a,t,p);return}if(rc(e,a.attributes,cg),a.type==="SvelteComponent"){let p=tc(a);if(!p)Tl(t);if(!nc(p.value))El(p.start);a.expression=ic(p.value)}else if(a.type==="SvelteElement"){let p=tc(a);if(!p)bs(t);if(p.value===!0)bs(p);a.tag=nc(p.value)?ic(p.value):ag(p.value[0])}if(!e.eat("/")&&!dn(i))if(e.eat(">",!0),i==="textarea")a.fragment.nodes=wc(e,(p,l)=>(As.lastIndex=l,As.test(p)),"inside <textarea>"),e.read(As);else if(i==="script"||i==="style")a.fragment.nodes.push(ig(e,`</${i}>`));else{e.open(a,a.fragment);return}else e.eat(">",!0);a.end=e.index,e.append(a)}function ig(e,t){let n=e.index,i=e.source.indexOf(t,n);e.index=i===-1?e.source.length:i;let r=vn(n,e.index,e.source.slice(n,e.index));return e.eat(t,!0),r}function rg(e,t,n,i){e.eat(">",!0);let r=sg(e.root.fragment.nodes,n);if(t.name==="style"){let o=Ly(e,n,i);if(o.content.comment=r,e.root.css)vl(n);e.root.css=o;return}let s=dy(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])yl(n);e.root[a]=s}function sg(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 og=(e)=>e.type==="Attribute"&&e.name==="this";function tc(e){let t=e.attributes.find(og);if(t)e.attributes.splice(e.attributes.indexOf(t),1);return t}function nc(e){if(e===!0)return!1;if(!Array.isArray(e))return!0;return e.length===1&&e[0].type==="ExpressionTag"}function ic(e){return(Array.isArray(e)?e[0]:e).expression}function ag(e){if(e.type!=="Text")return e.expression;return{type:"Literal",value:e.data,raw:`'${e.raw}'`,start:e.start,end:e.end}}function rc(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))Kp(r);if(r.name!=="this")i.add(a)}t.push(r),e.allowWhitespace()}}function Os(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 kc(e){if(ye(e.source.charCodeAt(e.index)))Ke(e.index,"=")}function pg(e){let t=e.index,n=Bi(e,!0);if(!n.name)return null;let i=!0;if(e.eat("=")){e.allowWhitespace();let{source:r}=e,s=e.index,a=ye(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)!==Ky&&!J(r.charCodeAt(o)))o++;if(o===s)gs(s)}e.index=o;let p=a?1:0,l=r.slice(s+p,o-p);i=[vn(o-l.length-p,o-p,l,$i(l,!0,e.entityNames))]}return kc(e),Os(e,n,t,e.index,i)}function lg(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 cg(e){while(lg(e))e.allowWhitespace();let t=e.index;if(e.eat("{"))return ug(e,t);let n=Bi(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=[vn(e.index,e.index+1,"/")],e.index++;else r=hg(e);i=e.index}else kc(e);let s=n.name.indexOf(":"),a=s>0?Uy.get(n.name.slice(0,s)):void 0;return a?fg(e,a,n,s,t,i,r):Os(e,n,t,i,r)}function ug(e,t){if(e.allowWhitespace(),e.eat("@attach")){e.requireWhitespace();let r=ee(e);return e.eatClosingBrace(),{type:"AttachTag",start:t,end:e.index,expression:r}}if(e.eat("...")){let r=ee(e);return e.eatClosingBrace(),{type:"SpreadAttribute",start:t,end:e.index,expression:r}}let n=e.readIdentifierName();if(n.name==="")Xp(t);e.eatClosingBrace();let i={type:"ExpressionTag",start:n.start,end:n.end,expression:n};return Os(e,n,t,e.index,i)}function dg(e){if(e===!0)return;return Array.isArray(e)?e[0]:e}function fg(e,t,n,i,r,s,a){let[o,...p]=n.name.slice(i+1).split("|");if(o==="")pl({start:r,end:r+i+1},n.name);let l={start:r,end:s,type:t,name:o};if(e.loc)l.name_loc=n.loc;if(t==="StyleDirective")return l.modifiers=p,l.value=a,l;let c=dg(a);if(c&&(Array.isArray(a)&&a.length>1||c.type==="Text"))al(c.start);if(l.expression=c?.expression??null,l.modifiers=p,t==="TransitionDirective"){let d=n.name.slice(0,i);l.intro=d!=="out",l.outro=d!=="in"}if((t==="BindDirective"||t==="ClassDirective")&&!l.expression)l.expression={start:r+i+1,end:s,type:"Identifier",name:o};return l}function hg(e){let t=e.source.charCodeAt(e.index),n=ye(t);if(n){if(e.index++,e.source.charCodeAt(e.index)===t)return e.index++,[vn(e.index-1,e.index-1,"")]}let i;try{i=wc(e,n?(r,s)=>r.charCodeAt(s)===t:Ei,"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,Ke(s,n?String.fromCharCode(t):"}");throw r}if(n)e.index++;else if(i.length===0)gs(e.index);return n||i.length>1||i[0].type==="Text"?i:i[0]}function wc(e,t,n,i){let{source:r}=e,s=[],a=e.index,o=(p)=>{if(p<=a)return;let l=r.slice(a,p);s.push(vn(a,p,l,$i(l,!0,e.entityNames)))};while(e.index<r.length){let p=e.index;if(t(r,p))return o(p),s;if(r.charCodeAt(p)!==Zl){if(e.index++,i!==void 0)while(e.index<r.length&&r.charCodeAt(e.index)!==Zl&&r.charCodeAt(e.index)!==i)e.index++;continue}e.index++;let l=r.charCodeAt(e.index);if(l===35||l===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);(l===35?el:Rl)(p,f,n)}o(p),e.allowWhitespace();let c=ee(e);e.eatClosingBrace(),s.push({type:"ExpressionTag",start:p,end:e.index,expression:c}),a=e.index}ue(r.length)}var mg=new Map([["html","html"],["svg","svg"],["mathml","mathml"],["http://www.w3.org/2000/svg","svg"],["http://www.w3.org/1998/Math/MathML","mathml"]]),yg=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}]]),sc="[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}-]",gg=new RegExp(`^[a-z]${sc}*-${sc}*$`,"u"),xg=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" ")),Li=(e)=>(t,n)=>{let i=Ri(n);if(typeof i!=="boolean")wi(n,"true or false");t[e]=i},bg=new Map([["runes",Li("runes")],["immutable",Li("immutable")],["preserveWhitespace",Li("preserveWhitespace")],["accessors",Li("accessors")],["namespace",(e,t)=>{let n=mg.get(Ri(t));if(!n)wi(t,'"html", "mathml" or "svg"');e.namespace=n}],["css",(e,t)=>{if(Ri(t)!=="injected")wi(t,'"injected"');e.css="injected"}],["tag",(e,t)=>Al(t)],["customElement",(e,t)=>{let n=Tg(t);if(n)e.customElement=n}]]);function vg(e){let t=[],n={start:e.start,end:e.end,attributes:t};for(let i of e.attributes){if(i.type!=="Attribute")Pl(i);t.push(i);let r=bg.get(i.name);if(!r)Il(i,i.name);r(n,i)}return n}function Ri({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 oc(e,t){if(typeof t!=="string")vs(e);if(!t)return;if(!gg.test(t))vs(e);if(xg.has(t))Ll(e)}function _s(e){return e.type==="Property"&&!e.computed&&e.key.type==="Identifier"}function Eg(e,t){let n=new Map;for(let i of e.properties){if(!_s(i))t();if(!n.has(i.key.name))n.set(i.key.name,i.value)}return n}function Tg(e){let t=()=>Dl(e);if(e.value===!0)t();let n=Array.isArray(e.value)?e.value[0]:e.value;if(n.type==="Text"){let c=Ri(e);return oc(e,c),{tag:c}}let{expression:i}=n;if(i.type!=="ObjectExpression"){if(i.type==="Literal"&&i.value===null)return;t()}let r=Eg(i,t),s={},a=r.get("tag");if(a){let c=a.type==="Literal"?a.value:void 0;oc(null,c),s.tag=c}let o=r.get("props");if(o){let c=()=>Nl(e);if(o.type!=="ObjectExpression")c();s.props={};for(let d of o.properties){if(!_s(d)||d.value.type!=="ObjectExpression")c();let f={};s.props[d.key.name]=f;for(let h of d.value.properties){if(!_s(h)||h.value.type!=="Literal")c();if(!yg.get(h.key.name)?.(f,h.value.value))c()}}}let p=r.get("shadow");if(p)if(p.type==="ObjectExpression")s.shadow=p;else if(p.type==="Literal"&&(p.value==="open"||p.value==="none"))s.shadow=p.value;else $l(e);let l=r.get("extend");if(l)s.extend=l;return s}var Sg={"{":"}","(":")","[":"]"};function js(e,t,n=Sg){let i=Object.values(n),r=[],s=t;while(s<e.length){let a=e[s++];if(a==="'"||a==='"'||a==="`")s=Cg(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)Ke(s-1,o);if(r.length===0)return s}}ue(e.length)}function Cg(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=js(e,i)}Bl(t)}var kg=/\?\s*:/g;function Fi(e){let t=e.index,n=e.readIdentifierName();if(n.name!=="")return{...n,typeAnnotation:ac(e)};let i=e.source[e.index];if(i!=="{"&&i!=="[")dl(e.index);e.index=js(e.source,t);let r=Hl(e,e.source.slice(0,e.index),t)??wg(e,t);Pn(r,"ObjectPattern","ArrayPattern");let s=ac(e);if(r.typeAnnotation=s,s)r.end=s.end;return r}function wg(e,t){let{node:n}=It(e,`${e.source.slice(0,e.index)} = 1`,t);return Pn(n,"AssignmentExpression"),n.left}function ac(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(kg,":"),s=It(e,r,i).node;if(s.type==="AssignmentExpression"){let a=s.right.start;while(r[a]!=="=")a-=1;s=It(e,r.slice(0,a),i).node}if(s.type==="SequenceExpression")s=s.expressions[0];return Pn(s,"TSAsExpression"),e.index=s.end,{type:"TSTypeAnnotation",start:t,end:e.index,typeAnnotation:s.typeAnnotation}}var Ag={IfBlock:"if",EachBlock:"each",KeyBlock:"key",AwaitBlock:"await",SnippetBlock:"snippet"},qe=()=>({type:"Fragment",nodes:[]});function Pg(e,t){if(e.eat("if")){e.requireWhitespace();let n=ee(e);e.eatClosingBrace();let i=qe();e.open({type:"IfBlock",elseif:!1,start:t,end:-1,test:n,consequent:i,alternate:null},i)}else if(e.eat("each"))Ng(e,t);else if(e.eat("await")){e.requireWhitespace();let n=ee(e);e.allowWhitespace();let i={type:"AwaitBlock",start:t,end:-1,expression:n,value:null,error:null,pending:null,then:null,catch:null},r=qe();if(e.eat("then"))i.value=pc(e),i.then=r;else if(e.eat("catch"))i.error=pc(e),i.catch=r;else i.pending=r;e.eat("}",!0),e.open(i,r)}else if(e.eat("key")){e.requireWhitespace();let n=ee(e);e.eatClosingBrace();let i=qe();e.open({type:"KeyBlock",start:t,end:-1,expression:n,fragment:i},i)}else if(e.eat("snippet"))$g(e,t);else ul(e.index)}function pc(e){if(e.matchRegex(cc))return e.allowWhitespace(),null;e.requireWhitespace();let t=Fi(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 Vt(s,i),s},r=e;if(e.type==="TSAsExpression")t.assertion=e,r=e.expression,n=r.end;else Vt(e,i);return r.end=n,{expression:r,assertion:t.assertion}}function Ng(e,t){e.requireWhitespace();let n=e.source,i;while(!i)try{i=ee(e)}catch(p){let l=((p instanceof b?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(i.type==="SequenceExpression")i=i.expressions[0];let p=Dg(i);if(i=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 r=null,s,a;if(e.eat("as"))e.requireWhitespace(),r=Fi(e);else e.index=i.end;if(e.allowWhitespace(),e.eat(",")){if(e.allowWhitespace(),s=e.readIdentifierName().name,!s)xs(e.index);e.allowWhitespace()}if(e.eat("("))e.allowWhitespace(),a=ee(e),e.allowWhitespace(),e.eat(")",!0),e.allowWhitespace();e.eat("}",!0);let o=qe();e.open({type:"EachBlock",start:t,end:-1,expression:i,body:o,context:r,index:s,key:a},o)}function $g(e,t){e.requireWhitespace();let n=e.readIdentifierName();if(n.name==="")xs(e.index);e.allowWhitespace();let i=e.index,r;if(e.isTypeScript&&e.match("<")){let p=js(e.source,i,{"<":">"});r=e.source.slice(i+1,p-1),e.index=p}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}=It(e,`${e.source.slice(0,e.index)} => {}`,i,!0);e.eatClosingBrace();let o=qe();e.open({type:"SnippetBlock",start:t,end:-1,expression:n,typeParams:r,parameters:a.type==="ArrowFunctionExpression"?a.params:void 0,body:o},o)}function Lg(e,t){let n=e.index-1,i=e.current();if(i.type==="IfBlock"){if(!e.eat("else"))Ke(n,"{:else} or {:else if}");if(e.eat("if"))Zp(n);if(e.allowWhitespace(),i.alternate=qe(),e.setFragment(i.alternate),e.eat("if")){e.requireWhitespace();let r=ee(e);e.eatClosingBrace();let s=qe();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"))Ke(n,"{:else}");e.eatClosingBrace(),i.fallback=qe(),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 Ke(n,"{:then ...} or {:catch ...}");if(i[r])Yp(n,`{:${r}}`);if(!e.eat("}")){e.requireWhitespace();let a=Fi(e);if(r==="then")i.value=a;else i.error=a;e.eatClosingBrace()}let s=qe();i[r]=s,e.setFragment(s)}else Qp(n)}function Ig(e){let t=e.current(),n=Ag[t.type];if(!n)nl(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 _g(e){return e.type==="CallExpression"||e.type==="ChainExpression"&&e.expression.type==="CallExpression"}function Rg(e,t){if(e.eat("html")){e.requireWhitespace();let n=ee(e);e.eatClosingBrace(),e.append({type:"HtmlTag",start:t,end:e.index,expression:n})}else if(e.eat("debug")){let n=[];if(!e.read(cc)){let i=ee(e),r=i.type==="SequenceExpression"?i.expressions:[i];for(let s of r){if(s.type!=="Identifier")ol(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=Fi(e);e.allowWhitespace(),e.eat("=",!0),e.allowWhitespace();let i=e.index,r=ee(e),s=e.index;if(r.type==="SequenceExpression"&&!e.source.slice(i,r.start).includes("("))il(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=ee(e);if(!_g(n))ml(n);e.eatClosingBrace(),e.append({type:"RenderTag",start:t,end:e.index,expression:n})}else fl(e.index)}var Mg=/(?:var|interface|enum)\b/y,Bg=/(?:let|const|type)\b/y;function Fg(e){let t=e.index;if(e.index+=1,e.allowWhitespace(),e.eat("#"))Pg(e,t);else if(e.eat(":"))Lg(e,t);else if(e.eat("@"))Rg(e,t);else if(e.match("/")&&!e.match("/*")&&!e.match("//"))e.index+=1,Ig(e);else if(!Og(e,t)){let n=ee(e);e.eatClosingBrace(),e.append({type:"ExpressionTag",start:t,end:e.index,expression:n})}}function Og(e,t){let n=e.index,i=e.matchRegex(Mg);if(i)ms({start:n,end:n+i.length});if(!e.matchRegex(Bg))return!1;let r=e.root.comments.length,s=Wl(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")ms(s);return e.index=s.end,e.eatClosingBrace(),e.append({type:"DeclarationTag",start:t,end:e.index,declaration:s}),!0}function jg(e){let{source:t,index:n}=e;if(e.nextAngle<n)e.nextAngle=lc(t,"<",n);if(e.nextBrace<n)e.nextBrace=lc(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:$i(r,!1,e.entityNames)})}function lc(e,t,n){let i=e.indexOf(t,n);return i===-1?e.length:i}function Ac(e,t,n){let i=qg(e,t,n);while(i.index<i.source.length)Gg(i);return Vg(i)}function qg(e,t,n){let i=yi(e);return Co(i),new uc(i.trimEnd(),i.length,n,t)}function Vg(e){if(e.stack.length>1){let r=e.current();if(r.end=r.start+1,r.type==="RegularElement")ys(r,r.name);tl(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=vg(i);let{nodes:r}=i.fragment;if(r.length>0)Cl({start:r[0].start,end:r[r.length-1].end},i.name)}return e.root}function Gg(e){if(e.match("<"))Zy(e);else if(e.match("{"))Fg(e);else jg(e)}var Hg="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",Pc=ks(Hg);var Dc=ci(Es,fi,Ts);var Wg={typescript:Dc,entityNames:Pc};function Oi(e,t){return Ac(e,t,Wg)}var Nc={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",bgsound:"HTMLUnknownElement",blink:"HTMLUnknownElement",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",isindex:"HTMLUnknownElement",kbd:"HTMLElement",keygen:"HTMLUnknownElement",label:"HTMLLabelElement",legend:"HTMLLegendElement",li:"HTMLLIElement",link:"HTMLLinkElement",listing:"HTMLPreElement",main:"HTMLElement",map:"HTMLMapElement",mark:"HTMLElement",marquee:"HTMLMarqueeElement",menu:"HTMLMenuElement",meta:"HTMLMetaElement",meter:"HTMLMeterElement",multicol:"HTMLUnknownElement",nav:"HTMLElement",nextid:"HTMLUnknownElement",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",spacer:"HTMLUnknownElement",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",xmp:"HTMLPreElement"},$c={a:"SVGAElement",animate:"SVGAnimateElement",animateMotion:"SVGAnimateMotionElement",animateTransform:"SVGAnimateTransformElement",circle:"SVGCircleElement",clipPath:"SVGClipPathElement",defs:"SVGDefsElement",desc:"SVGDescElement",ellipse:"SVGEllipseElement",feBlend:"SVGFEBlendElement",feColorMatrix:"SVGFEColorMatrixElement",feComponentTransfer:"SVGFEComponentTransferElement",feComposite:"SVGFECompositeElement",feConvolveMatrix:"SVGFEConvolveMatrixElement",feDiffuseLighting:"SVGFEDiffuseLightingElement",feDisplacementMap:"SVGFEDisplacementMapElement",feDistantLight:"SVGFEDistantLightElement",feDropShadow:"SVGFEDropShadowElement",feFlood:"SVGFEFloodElement",feFuncA:"SVGFEFuncAElement",feFuncB:"SVGFEFuncBElement",feFuncG:"SVGFEFuncGElement",feFuncR:"SVGFEFuncRElement",feGaussianBlur:"SVGFEGaussianBlurElement",feImage:"SVGFEImageElement",feMerge:"SVGFEMergeElement",feMergeNode:"SVGFEMergeNodeElement",feMorphology:"SVGFEMorphologyElement",feOffset:"SVGFEOffsetElement",fePointLight:"SVGFEPointLightElement",feSpecularLighting:"SVGFESpecularLightingElement",feSpotLight:"SVGFESpotLightElement",feTile:"SVGFETileElement",feTurbulence:"SVGFETurbulenceElement",filter:"SVGFilterElement",foreignObject:"SVGForeignObjectElement",g:"SVGGElement",image:"SVGImageElement",line:"SVGLineElement",linearGradient:"SVGLinearGradientElement",marker:"SVGMarkerElement",mask:"SVGMaskElement",metadata:"SVGMetadataElement",mpath:"SVGMPathElement",path:"SVGPathElement",pattern:"SVGPatternElement",polygon:"SVGPolygonElement",polyline:"SVGPolylineElement",radialGradient:"SVGRadialGradientElement",rect:"SVGRectElement",script:"SVGScriptElement",set:"SVGSetElement",stop:"SVGStopElement",style:"SVGStyleElement",svg:"SVGSVGElement",switch:"SVGSwitchElement",symbol:"SVGSymbolElement",text:"SVGTextElement",textPath:"SVGTextPathElement",title:"SVGTitleElement",tspan:"SVGTSpanElement",use:"SVGUseElement",view:"SVGViewElement"},Lc={a:"MathMLElement",annotation:"MathMLElement","annotation-xml":"MathMLElement",maction:"MathMLElement",math:"MathMLElement",merror:"MathMLElement",mfrac:"MathMLElement",mi:"MathMLElement",mmultiscripts:"MathMLElement",mn:"MathMLElement",mo:"MathMLElement",mover:"MathMLElement",mpadded:"MathMLElement",mphantom:"MathMLElement",mprescripts:"MathMLElement",mroot:"MathMLElement",mrow:"MathMLElement",ms:"MathMLElement",mspace:"MathMLElement",msqrt:"MathMLElement",mstyle:"MathMLElement",msub:"MathMLElement",msubsup:"MathMLElement",msup:"MathMLElement",mtable:"MathMLElement",mtd:"MathMLElement",mtext:"MathMLElement",mtr:"MathMLElement",munder:"MathMLElement",munderover:"MathMLElement",semantics:"MathMLElement"};function Rt(e,t){return Object.hasOwn(e,t)?e[t]:void 0}function Ic(e,t="html"){if(t==="svg")return Rt($c,e)??"SVGElement";if(t==="mathml")return Rt(Lc,e)??Rt(Nc,e)??"MathMLElement";return Rt(Nc,e)??Rt($c,e)??Rt(Lc,e)??"HTMLElement"}var _c=new Map;function Rc(e){let t=_c.get(e);if(t!==void 0)return t;let n=un(e,{inline:!0});return _c.set(e,n),n}function Mc(e,t){let n=Ie(e.name,t.name);if(n!==0)return n;let i=Ie(e.type,t.type);if(i!==0)return i;if(e.type==="forwarded"&&t.type==="forwarded"){let r=Ie(e.element,t.element);if(r!==0)return r}return Ie(e.detail??"",t.detail??"")}var zg=/^([\w$]+)\s+extends\s/,Ug=/^\{\s*\}$/;function Mt(e){return Array.from(e.values())}function Jg(e){return e&&typeof e==="object"&&"value"in e?e.value:void 0}function qs(e,t){if(!e||typeof e!=="object"||!("type"in e)){t.dynamic=!0;return}if(e.type==="Literal"){let{value:n}=e;if(typeof n==="string"||typeof n==="number")t.names.push(String(n));else t.dynamic=!0}else if(e.type==="ConditionalExpression"){let n=e;qs(n.consequent,t),qs(n.alternate,t)}else if(e.type==="TemplateLiteral"){let n=e.quasis.map((i)=>i.value.cooked??i.value.raw);if(n.length===1)t.names.push(n[0]);else t.patterns.push(new RegExp(`^${n.map(Jt).join("[^]*")}$`))}else t.dynamic=!0}function Kg(e,t){let{dispatcherName:n,callees:i}=t,r=new Set(t.hostDispatchedEventNames),s=[],a=!1;for(let o of t.hostDispatches)Na(e,o);if(n!==void 0){Wa(e,t.dispatcherTypeArgument,n,w(e,t.dispatcherDeclaratorNode));for(let o of i){if(o.name!==n||o.arguments.length===0)continue;let p={names:[],patterns:[],dynamic:!1};if(qs(o.arguments[0],p),s.push(...p.patterns),a||=p.dynamic,p.names.length===0)continue;let l=o.arguments[1],c=Nr(Dr(e,o.nestedBoundDetailNames),l),d=c===void 0?Jg(l):void 0,f=d===null&&l.raw==="null";for(let h of p.names)We(e,{name:h,detail:c??(f?"null":d==null?"":$r(d)),has_argument:Boolean(l),source:w(e,o.node)}),r.add(h)}}return e.forwardedEvents.forEach((o,p)=>{let l=e.events.get(p);if(l&&l.type==="dispatched"&&!r.has(p)){let c=e.eventDescriptions.get(p),d={type:"forwarded",name:p,element:o,description:c,deprecated:l.deprecated,tags:l.tags,source:l.source};if(l.internal)d.internal=!0;if(l.detail!==void 0&&l.detail!=="undefined")d.detail=l.detail;e.events.set(p,d)}}),{names:r,mayDispatch:(o)=>a||s.some((p)=>p.test(o))}}function Xg(e){return`(typeof ${e} extends abstract new (...args: any) => infer I ? I : typeof ${e} extends (...args: any) => infer R ? R : never)`}function Yg(e){let t=e.syntaxMode==="runes"?new Set(Array.from(e.snippetPropLocals,(n)=>pr(e,n))):new Set;return Mt(e.props).filter((n)=>!(t.has(n.name)&&e.slots.has(n.name==="children"?ze:n.name))).map((n)=>{let i=n.reactive||e.reactive_vars.has(n.name),r=e.bindings.get(n.name);if(!r||r.target==="mixed")return{...n,reactive:i};if(r.target==="indexed"&&n.type!==void 0&&!n.type.endsWith("[]"))return{...n,reactive:i};let s=[...r.elements.sort((o,p)=>o.tag<p.tag?-1:o.tag>p.tag?1:0).map(({tag:o,namespace:p})=>Ic(o,p)),...r.components.sort().map(Xg)].join(" | "),a=r.target==="indexed"?`(null | ${s})[]`:`null | ${s}`;return{...n,type:a,typeSource:"inferred",reactive:i}})}function Qg(e){return Mt(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 Ug.test(t.slot_props)?{...i,slot_props:"Record<string, never>"}:i;let r=[];for(let[o,p]of Object.entries(t.slot_props)){if(p.replace&&p.value!==void 0)p.value=Ht(e,p.value);p.value??="any",r.push(`${o}: ${p.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
46
|
${r.join(`;
|
|
47
47
|
`)};
|
|
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
|
|
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
|
|
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 Zg(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){if(!new RegExp(`\\b${Jt(r)}\\b`).test(i))continue;Qn(e,r,s)}}if(e.scriptGenericsAttribute){if(e.generics)D(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=Ba(e.scriptGenericsAttribute.value)}}function ex(e){return Mt(e.events).map((t)=>{switch(t.type){case"forwarded":return{...t,element:t.element.name};case"dispatched":return t;default:return t}}).sort(Mc)}function tx(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"}".`;D(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 ji(e,t,n,i){if(t===void 0||Rc(t))return!0;let r=un(t)?"has a `//` comment, which would comment out the code after it in the .d.ts":"is not valid TypeScript";return D(e,"type-syntax-error",n,`Type \`${t}\` of "${n}" ${r}; falling back to "any".`,i),!1}function nx(e,t,n,i,r){for(let s of t)if(s.typeSource==="jsdoc"&&!ji(e,s.type,s.name,s.source))s.type="any";for(let s of n)if(s.type==="dispatched"&&!ji(e,s.detail,s.name,s.source))s.detail="any";for(let s of i)if(!ji(e,s.slot_props,s.name??"default",s.source))s.slot_props="any";for(let s of r)if(!ji(e,s.type,s.name,s.source))s.type="any",s.ts=`type ${s.name} = any;`}function ix(e,t){let{dispatcherName:n}=t,i=[];if(n===void 0)return i;let r=[];for(let a of t.callsWithArguments){let o=Pa(a,n);if(o)r.push({call:a,...o})}if(r.length>0)Te(e,"dispatch-escapes",n,Me(e,n)?.sveldIgnore);let s=dr(e,"dispatch-escapes",n);for(let{call:a,argumentIndex:o,property:p}of r){let l=t.locallyBoundCalls.has(a)?void 0:Er(e,a.callee);if(!l){i.push(a);continue}let c=w(e,a);e.pendingDispatchEscapeCandidates.push({importSource:l.source,importedName:l.importedName,...l.members?{members:l.members}:{},calleeText:W(e,a.callee)??l.importedName,dispatcherName:n,argumentIndex:o,...p===void 0?{}:{property:p},...c?{source:c}:{},...s?{ignored:s}:{}})}return i}function rx(e,t,n){for(let i of e.jsDocEventNames){if(t.names.has(i)||t.mayDispatch(i))continue;if(e.forwardedEvents.has(i))continue;if(e.props.has(`on${i}`))continue;if(n.length>0)continue;let r=ur(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 sx(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===ze?"default <slot>":`<slot name="${n}">`,o=t?`{@render ${s}()} or "${s}" prop`:a,p=n===ze?`@${i} documents the default slot, but the component has no ${o}.`:`@${i} "${n}" has no matching ${o} in the component.`;D(e,"slot-not-rendered",n??"default",p,r)}}function ox(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:p,regex:l}of i){if(!l.test(a))continue;D(e,"internal-typedef-referenced",s,`"${s}" references "${p}", 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 ax(e){let t=new Set;for(let n of V(e?.[1]??"",",")){let i=n.trim().match(zg)?.[1];if(i)t.add(i)}return t}function px(e,t){let n=e.rest_props;if(n?.type!=="Element"||n.name!=="svelte:element"||n.thisValue)return;let r=t.find((s)=>(s.localName??s.name)===e.restPropsTagLocal)?.type?.trim();if(r&&ax(e.generics).has(r))e.rest_props={...n,thisType:r}}function Bc(e,t){let n=Kg(e,t);za(e,n.names);let i=Yg(e);e.activeScopes.length=0;let r=Qg(e);Zg(e,i,r),px(e,i);let s=Mt(e.moduleExports),a=ex(e),o=Mt(e.typedefs),p=Mt(e.contexts);tx(e,i,s),nx(e,i,a,r,o);let l=ix(e,t);rx(e,n,l),sx(e);let{dispatcherName:c}=t;for(let m of l){let y=W(e,m.callee)??"";D(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.`,w(e,m))}if(e.rest_props?.type==="InlineComponent")D(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.`);ox(e,{props:i,moduleExports:s,typedefs:o,events:a,slots:r,contexts:p});let d={source:Fn(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: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=Yo(e);if(f)d[Pe]=f;let h=Xo(e);return h?{component:d,pending:h}:{component:d}}function lx(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 Fc(e){return e==="private"||e==="protected"}function Bt(e){return{...e?.description?{description:e.description}:{},...e?.deprecated===void 0?{}:{deprecated:e.deprecated},...e?.tags?{tags:e.tags}:{}}}function jc(e){return e?.slice(1,-1).trim()||void 0}function Vs(e,t,n){let i=vr(e,t),r=new Map((n?.params??[]).map((p)=>[p.name,p])),s=i.params.map(({name:p,type:l,optional:c,rest:d})=>{let f=r.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=i.returnType??n?.returnType??(t.async?"Promise<any>":void 0),o=jc(i.typeParameters)??n?.typeParameters;return{...s.length>0?{params:s}:{},...a?{returnType:a}:{},...o?{typeParameters:o}:{}}}function qc(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(Fc(c.accessibility))continue;let d=lx(c);if(d===void 0)continue;let f=G(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(M(e,c.typeAnnotation?.typeAnnotation),!c.static)s.add(d);n.push({kind:"property",name:d,type:_e(e,c.typeAnnotation)??f?.type??"any",...m,...c.readonly?{readonly:!0}:{},...Bt(f)});continue}let y=c.typeParameters?{...c.value,typeParameters:c.typeParameters}:c.value;if(c.kind==="constructor"){let g=Vs(e,y,f);n.push({kind:"constructor",name:"constructor",params:g.params,...Bt(f)}),o=n.length,a=y.type==="FunctionExpression"?y.body.body:void 0,y.params.forEach((k,S)=>{if(k.type!=="TSParameterProperty"||Fc(k.accessibility))return;let P=g.params?.[S];if(!P)return;s.add(P.name),n.push({kind:"property",name:P.name,type:P.type,...k.readonly?{readonly:!0}:{},...P.description?{description:P.description}:{}})});continue}if(c.kind==="get"||c.kind==="set"){let g=Vs(e,y,f),k=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(k&&k!=="any"&&(S.type==="any"||c.kind==="get"))S.type=k;if(!S.description&&!S.deprecated)Object.assign(S,Bt(f));continue}let P={kind:"property",name:d,type:k??"any",...m,...c.kind==="get"?{readonly:!0}:{},...Bt(f)};i.set(h,P),n.push(P);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,...Vs(e,y,f),...Bt(f)})}if(e.scriptLanguage!=="ts"&&a)n.splice(o,0,...ux(e,a,s));for(let c of t.typeParameters?.params??[])M(e,c.constraint),M(e,c.default);let p=jc(rt(e,t.typeParameters)),l=cx(e,t);return{members:n,...p?{typeParameters:p}:{},...l}}function cx(e,t){let n={},i=t.superClass;if(i){if(n.extends=rt(e,{start:i.start,end:t.superTypeParameters?.end??i.end}),i.type==="Identifier")Oc(e,i,t.superTypeParameters)}let r=(t.implements??[]).map((s)=>(Oc(e,s.expression,s.typeParameters),rt(e,s))).filter((s)=>Boolean(s));if(r.length>0)n.implements=r;return n}function Oc(e,t,n){M(e,{type:"TSTypeReference",typeName:t,start:t.start,end:n?.end??t.end,...n?{typeArguments:n}:{}})}function ux(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 p=G(e,r);if(p?.internal)continue;i.push({kind:"property",name:o,type:p?.type??"any",...Bt(p)})}return i}var dx=/^[A-Za-z_$][\w$]*(?=\s*(?:<|$))/;function Gs(e,t,n){if(!t)return;let i=e.moduleExports.get(t);e.moduleExports.set(t,i?{...i,...n}:n)}function Vc(e,t,n,i){let r=G(e,t);Gs(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:w(e,t)})}function Gc(e,t){D(e,"module-export-conflict","default",`export "default" was skipped because it collides with the component's own default export.`,w(e,t))}function fx(e,t,n,i){let r=n.id?.name;if(!r)return;let s=i?.exportedName??r,a=Yn(e,t,i),{members:o,typeParameters:p,extends:l,implements:c}=qc(e,n),d=p??a?.typeParameters;Gs(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}:{},...l?{extends:l}:{},...c?{implements:c}:{},isFunction:!1,isFunctionDeclaration:!1,isRequired:!1,constant:!1,reactive:!1,source:w(e,t)})}function Hc(e,t,n,i){if(n.type==="ClassDeclaration"){fx(e,t,n,i);return}let r=_r(e,n,i,"moduleExports");if(r.length===0)return;let s=Yn(e,t,i);for(let a of r){let{prop_name:o,kind:p}=a,{type:l,typeSource:c,description:d,params:f,returnType:h,isFunction:m,typeParameters:y}=Rr(e,a,s);Gs(e,o,{name:o,kind:p,description:d,deprecated:s?.deprecated,tags:s?.tags,...s?.internal?{internal:!0}:{},type:l,typeSource:c,value:a.value,defaultValue:a.defaultValue,params:f,returnType:h,typeParameters:y,isFunction:m,isFunctionDeclaration:a.isFunctionDeclaration,isRequired:!1,constant:p==="const",reactive:!1,source:w(e,t)})}}function hx(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=dx.exec(i.extends)?.[0];if(r&&(n.has(r)||e.valueImportBindingsByLocalName.has(r)||e.typeImportBindingsByLocalName.has(r)))continue;D(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 Wc(e){let t=e.parsed?.module;if(!t)return;let n=ea(t);K(t,{enter(i,r){if(i.type==="ImportDeclaration")Xt(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){Hc(e,i,i.declaration);return}let s=i.source?.value,a=r?.type==="Program"?r:null;for(let o of i.specifiers){let p=Lr(e,i,o,a,"module");if(!p)continue;if(p.exportedName==="default"){Gc(e,i);continue}let l=typeof s==="string"?{from:s,imported:p.localName}:n.get(p.localName);if(p.declaration)Hc(e,i,p.declaration,p);else if(l)Vc(e,i,p.exportedName,l);else if(!e.localTypeDeclarationsByName.get(p.localName)?.exported)Ir(e,i,p.localName,p.exportedName)}}if(i.type==="ExportAllDeclaration"&&typeof i.source.value==="string"){let s=(i.exported&&Xn(i.exported))??"*";if(s==="default"){Gc(e,i);return}Vc(e,i,s,{from:i.source.value,imported:"*"})}}}),hx(e)}function zc(e){return Oi(e,{css:!1})}function mx(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 Uc(e,t,n=3){let i,r=Number.POSITIVE_INFINITY;for(let s of t){let a=mx(e,s);if(a<r)i=s,r=a}return r<=n?i:void 0}var yx=/\s*=\s*/;function gx(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=V(i,",").map((s)=>s.trim().replace(yx," = ")).join(", ");return`${n}<${r}>`}var xx=new Set(["restProps","slot","snippet","event","typedef","callback"]),Hs=new Set(["property","type"]),Jc=new Set(["slot","snippet","typedef","callback"]);function qi(e){if(!e||e.length===0)return;return e[yr(e)].content}function Kc(e){return!e||!e.tag&&!e.continuesType&&e.content.trim()===""}function bx(e){return e.text.split(`
|
|
50
|
+
`).length===e.lines.length}function Ws(e,t){if(t<=0)return e;return e.split(`
|
|
51
51
|
`).slice(0,-t).join(`
|
|
52
|
-
`).trimEnd()}var
|
|
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=`{ ${
|
|
55
|
-
`);if(h.length>0)r.push(h);o=
|
|
56
|
-
`);o=c,a=c;continue}if(
|
|
57
|
-
`);r.push("}"),o++,a=o;continue}if(a<o)r.push(e.slice(a,o));if(
|
|
58
|
-
`);o++,a=o}if(a<n)r.push(e.slice(a,n));return r.join("")}function
|
|
59
|
-
`,o);if(c===-1)c=i;let d=c+1,f=o,h=c;while(f<h&&
|
|
60
|
-
`);let d=t[c];if(d>0)
|
|
61
|
-
`}var
|
|
62
|
-
* `)}function
|
|
63
|
-
* ${Le(e).replace(
|
|
52
|
+
`).trimEnd()}var vx=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=[...Rn,...gr,"type","param","returns","typedef","property","callback","template","generics","slot","snippet","event","restProps","extends","extendProps","deprecated","ignore","internal","sveld-ignore","csspart","cssprop"],Tx=/;$/;function Sx(e){let t=e.trim().replace(Tx,"").trimEnd();if(!t.startsWith("{")||!t.endsWith("}"))return!1;return it(t,0)===t.length-1}var Cx=/[\w$]+/g,kx=new Set(["property","param","returns","return"]);function wx(e,t,n){let i=[e[t].type];for(let s=t+1;kx.has(e[s]?.tag);s++)i.push(e[s].type);let r=new Set(i.join(" ").match(Cx));return n.some(({name:s})=>r.has(s))}function Ax(e){let t=e?.trim();return!t||t==="object"||t==="Object"}function Xc(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 Yc(e,t,n,i){if(t.seenGenericNames.has(n))D(e,"generics-conflict",n,`Duplicate generic name "${n}".`,i);else t.seenGenericNames.add(n)}function Qc(e,t,n){if(e.generics){let r=V(e.generics[0],",").map((s)=>s.trim()).indexOf(t.trim());if(r!==-1){let s=V(e.generics[1],",").map((a)=>a.trim());s[r]=n,e.generics=[e.generics[0],s.join(", ")];return}}Qn(e,t,n)}function Zc(e,{name:t,type:n,ts:i,description:r,tags:s,internal:a,source:o}){if(e.typedefs.has(t))D(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 eu(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}"`:"";D(e,"property-duplicate",n.name,`Duplicate property "${n.name}"${a}; the later declaration overwrites the earlier one.`,r),t[s]=n}}class tu{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((p)=>p.tag==="slot"||p.tag==="snippet"),this.hasExtendsTag=r.some((p)=>p.tag==="extends"||p.tag==="extendProps");for(let p of r)if(p.lines.length>0)this.tagLineNumbers.add(p.lines[0].number);for(let p of s)if(p.continuesType)this.tagLineNumbers.add(p.number);let a=!1,o=!1;for(let p of s){if(!p.tag&&!p.continuesType&&p.content&&(o||p.content.trim()!=="}"))this.lineDescriptions.set(p.number,p.content);if(p.tag!==void 0||p.continuesType)a=!0;else if(!p.content.trim());else if(a&&(p.indent||o))this.indentedContinuationLines.add(p.number);else a=!1;if(zt(p.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 gx(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&&Kc(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 _n(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&&!Kc(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(!bx(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=$e(qi(e)),r=t!==void 0&&xx.has(t.tag)&&!$e(qi(t.lines)),s=n&&(t===void 0||!Hs.has(t.tag)),a=[];for(let o=1;o<e.length;o++){let p=e[o];if((r||s)&&!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 i;return this.joinBlockLines(a,{text:i??"",line:e[yr(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"&&!Hs.has(i?.tag??""))return;if($e(qi(n)))return;let r=t?`@${e} "${t}"`:`@${e}`;D(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.`,oe(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?en(this.eventProperties,!0):this.eventType||""),i=this.eventTagLine;if(i!==void 0){let s=this.tags.find((o)=>{let p=o.lines[0]?.number;return p!==void 0&&p>i&&!Hs.has(o.tag)})?.lines[0].number,a=Array.from(this.lineDescriptions.keys()).sort((o,p)=>o-p).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(We(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?en(this.typedefProperties,!0):this.typedefType||"{}",i=!t&&this.typedefType&&Sx(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:p})=>({name:s,type:a,optional:o===!0,...p?{description:p}:{}})):Be(n,{skipIndexSignatures:!0});if(r)e.typedefMembersByName.set(this.typedefName,r);Zc(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=`(${Ce(this.callbackParams)}) => ${this.callbackReturnType||"void"}`;Zc(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)D(this.ctx,"extend-props-duplicate",n,`A second @extends/@extendProps tag ("${n}") overwrote the first ("${this.ctx.extends.interface}"); only one is used.`,oe(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=$e(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],(p)=>{o.description=$e(Ws(r,p))||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>",p=oe(this.ctx,r);if(!t)D(this.ctx,"slot-missing-type",s||"default",`@${n}${s?` "${s}"`:""} is missing a required {Type} annotation; falling back to "${o}".`,p);let l=this.pendingTags.splice(0),c=Dt(s);this.ctx.jsDocSlots.set(c,{tag:n,source:p}),tn(this.ctx,{slot_name:s,slot_props:o,slot_description:a||void 0,slot_deprecated:this.pendingDeprecated,slot_tags:l.length>0?l:void 0,slot_internal:this.pendingInternal||void 0,source:p}),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=$e(qi(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=oe(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)eu(this.ctx,this.eventProperties,a,this.eventName,oe(this.ctx,s));else if(this.typedefName!==void 0&&Ax(this.typedefType))eu(this.ctx,this.typedefProperties,a,this.typedefName,oe(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=oe(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=oe(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=oe(this.ctx,i);for(let s of V(n,","))Yc(this.ctx,this.generics,s.trim(),r);this.generics.usedGenericsTag=!0,Xc(this.ctx,this.generics),Qc(this.ctx,n,t||n),this.isFirstTag=!1}readTemplate(e,t){let{tags:n}=this,i=br(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("<")&&wx(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=oe(this.ctx,n[e].lines);for(let o of i)Yc(this.ctx,this.generics,o.name,a),Qc(this.ctx,o.name,o.constraint);this.generics.usedTemplateTag=!0,Xc(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(Mn(t)),this.claimBodyLines(this.tags[e],(r)=>{i(Mn(Ws(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=Ws(n,s)}),!Rn.has(t)&&!gr.has(t)){let s=vx.has(t)?void 0:Uc(t,Ex,t.length<=4?1:2);D(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.`,oe(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=Ne(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 p=this.getTagDescription(e[n].lines,e[n+1]);this.ctx.cssParts.push({name:s,...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:s,...o?{type:o}:{},...l===void 0?{}:{default:l},...p?{description:p}:{}});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(Jc.has(i))this.finalizeEvent()}if(this.finalizeEvent(),this.finalizeTypedef(),this.finalizeCallback(),this.pendingTags.length===0)return;if(!e.some((n)=>n.tag==="event"||Jc.has(n.tag)))return;for(let n of this.pendingTags)D(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 nu(e,t=e.source){if(!t)return;let n={usedGenericsTag:!1,usedTemplateTag:!1,warnedMixedGenericsTags:!1,seenGenericNames:new Set},i=t.includes("@template")?jo(e):new Set;e.functionDocCommentStarts=i;let r=Ut(t);for(let s of r)e.jsDocBlocksByStart.set(s.start,s);for(let s of r)new tu(e,n,s,i.has(s.start)).read()}var ru=new Set(["$state","$derived","$effect","$props","$bindable","$inspect","$host"]),Px=Array.from(ru);function iu(e){return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e===95||e===36}function Dx(e){if(e.includes("\\u"))return!0;for(let t of Px){let n=e.indexOf(t);while(n!==-1){if(!iu(e.charCodeAt(n-1))&&!iu(e.charCodeAt(n+t.length)))return!0;n=e.indexOf(t,n+1)}}return!1}function Nx(e,t){for(let n=t.length-1;n>=0;n-=1)if(t[n]?.has(e))return!0;return!1}function $x(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)F(n,t);break;case"BlockStatement":Vi(e.body,t);break;case"CatchClause":F(e.param,t);break;case"EachBlock":if(F(e.context,t),e.index)t.add(e.index);break;case"AwaitBlock":F(e.value,t),F(e.error,t);break}return t}function Vi(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)F(i.id,t);break;case"FunctionDeclaration":case"ClassDeclaration":if(n.id?.name)t.add(n.id.name);break;case"ExportNamedDeclaration":if(n.declaration)Vi([n.declaration],t);break}}function zs(e,t){if(!e)return!1;let n=[...t],i=!1;return K(e,{enter(r,s){if(Gn(r.type))return te;if(At(r))n.push($x(r));if(r.type==="Identifier"&&ru.has(r.name)&&rr(r,s)&&!Nx(r.name,n))return i=!0,Gt},leave(r){if(At(r))n.pop()}}),i}function su(e){if(e.runesOptionOverride!==void 0)return e.runesOptionOverride?"runes":"legacy";let t=e.parsed;if(!t)return"legacy";if(e.source!==void 0&&!Dx(e.source))return"legacy";let n=new Set;Vi(t.module?.content.body,n);let i=new Set;return Vi(t.instance?.content.body,i),zs(t.module,[n])||zs(t.instance,[n,i])||zs(t.fragment,[n,i])?"runes":"legacy"}var Lx=new Set(["TSAsExpression","TSSatisfiesExpression","TSNonNullExpression","TSTypeAssertion","TSInstantiationExpression"]);function Ix(e){if(e.type!=="TSAsExpression"&&e.type!=="TSTypeAssertion")return!1;let t="typeAnnotation"in e?e.typeAnnotation:void 0;return t?.type==="TSTypeReference"&&t.typeName.type==="Identifier"&&t.typeName.name==="const"}function Gi(e,t){if(!e)return;K(e,{enter(n){if(!Lx.has(n.type)||!("expression"in n)||!n.expression)return;let{expression:i}=n;if(typeof i!=="object")return i;let r=t.typeAssertions.get(n);if(t.constAssertions.has(n)||r===void 0&&Ix(n))t.constAssertions.add(i);else if(r!==void 0)t.typeAssertions.set(i,r);else if((n.type==="TSAsExpression"||n.type==="TSTypeAssertion")&&"typeAnnotation"in n)t.typeAssertions.set(i,n.typeAnnotation);return i}})}var _x=/\/\/(?<!^[ \t]*\*.*\/\/)\s*@ts-[^\n\r]*/gm;function Rx(e){if(!e.includes("@ts-"))return e;let t=e.charCodeAt(0)===65279?1:0,{instance:n,module:i}=Si(e),r=[n,i].flatMap((o)=>o?[o.content]:[]).sort((o,p)=>o.start-p.start),s="",a=0;for(let{start:o,end:p}of r)s+=e.slice(a,o+t),s+=e.slice(o+t,p+t).replace(_x,""),a=p+t;return s+e.slice(a)}function ou(e,t,n){e.componentFilePath=n;let i=Rx(t);e.source=i;let r=zc(i);if(Ga(e,r),e.parsed=r,e.scriptLanguage==="ts")Gi(r.module,e.typeCasts),Gi(r.instance,e.typeCasts),Gi(r.fragment,e.typeCasts);e.syntaxMode=su(e);let s=r.css,a=s?i.slice(0,s.start)+" ".repeat(s.end-s.start)+i.slice(s.end):i;Sr(e,r.module),Sr(e,r.instance),nu(e,a)}class Us{ctx=ar();cleanup(){this.ctx=ar()}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;ou(n,e,t.filePath),Wc(n);let i=Xa(n);return Bc(n,i)}}var Mx=/\.$/,Js="resolving it needs file access (generateBundle or the CLI)";function Bx(e,t={}){let n=e[Pe];if(!n)return e;let{pendingCallDefaultCandidates:i,pendingConstDefaultCandidates:r,pendingContextKeyCandidates:s,pendingDispatchEscapeCandidates:a,deferredEventNoSourceDiagnostics:o,untypedJsDocEventNames:p,...l}=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,re,fe,Qe)=>{h.push(Ln({component:f,kind:"cross-file-unresolved",name:v,message:re,...fe?{source:fe}:{},...Qe?{ignored:Qe}:{}}))},y=(v,re)=>(v==="props"?e.props:e.moduleExports).find((fe)=>fe.name===re)?.source,g=(v)=>v==="props"?"Prop":"Module export";for(let v of s??[]){let re=Yt(v);m(re,`setContext key \`${re}\` is imported from "${v.importSource}"; ${Js}, so the context is omitted.`,v.source)}for(let v of r??[])m(v.propName,`${g(v.location)} "${v.propName}" defaults to \`${Yt(v)}\` imported from "${v.importSource}"; ${Js}, 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}"; ${Js}, 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 k=Array.from(new Set((a??[]).map((v)=>`\`${v.calleeText}\``))).join(", "),S=(o??[]).map((v)=>k?{...v,message:`${v.message.replace(Mx,"")} in this file; ${k} may dispatch it, but imported helpers aren't read without file access.`}:v),P={...e,diagnostics:[...e.diagnostics??[],...S,...h]};return P[Pe]=l,P}var pu="sveld",lu="0.38.4";var Ks="5.57.1";var cu=1;function Ye(e){return e.some((t)=>t.internal)?e.filter((t)=>!t.internal):e}function Ox(e){return{...e,props:Ye(e.props),moduleExports:Ye(e.moduleExports),slots:Ye(e.slots),events:Ye(e.events),typedefs:Ye(e.typedefs),...e.contexts?{contexts:Ye(e.contexts).map((t)=>({...t,properties:Ye(t.properties)}))}:{}}}function Xs(e,t={}){let n=Array.from(e.values(),(s)=>{let{diagnostics:a,...o}=s;return Ox(o)}).sort((s,a)=>Ie(s.moduleName,a.moduleName)),i={schemaVersion:cu,generator:{name:pu,version:lu,svelteVersion:Ks},total:n.length,components:n},r=t.entryExports?Ye(t.entryExports):void 0;if(r&&r.length>0)i.totalExports=r.length,i.exports=r;return i}var jx=" ",qx=120,Vx=/\binterface\s+[A-Za-z_$][\w$]*(\s*<[^{};]*>)?\s*$/,Gx=200,hu=/\s/,Hx=/\s{2}|[^\S ]/,Wx=/["'`{}/]/g,zx=/["'`{};/]/g,mu=9,Ys=10,Ux=13,En=32,Wi=34,Jx=38,zi=39,Kx=40,Xx=41,Hi=42,uu=46,Zs=47,yu=59,Yx=62,Qx=91,eo=92,Zx=93,Ui=96,to=123,eb=124,no=125;function tb(e){return Vx.test(ib(e,Gx))}var du=[""];function nb(e){let t=du[e];if(t===void 0)t=jx.repeat(e),du[e]=t;return t}function ib(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 rb(e){if(e.length===0)return!1;let t=e[e.length-1];return t.charCodeAt(t.length-1)===Ys}function sb(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!==En&&i!==mu)break;n--}if(n===t.length)return;if(n===0){e.pop();continue}e[e.length-1]=t.slice(0,n);return}}function ob(e){while(e.length>0){let t=e[e.length-1];if(!hu.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 ab(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)!==eo)t=0;continue}if(r===Wi||r===zi||r===Ui){t=r;continue}if(r===yu&&++n>=2)return!0}return!1}function pb(e){if(!Hx.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(hu.test(s)){if(!i&&t.length>0)t+=" ",i=!0;continue}t+=s,i=!1}return t.trimEnd()}function gu(e,t){let n=e[t],i=e.indexOf(n,t+1);while(i!==-1&&e.charCodeAt(i-1)===eo)i=e.indexOf(n,i+1);return i}function xu(e,t){let n=e.indexOf("*/",t+1);return n===-1?-1:n+1}function lb(e){let t=new Map,n=[],i=Wx,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===Zs){if(e.charCodeAt(r+1)===Hi){let a=xu(e,r);if(a===-1)break;r=a}}else if(s===Wi||s===zi||s===Ui){let a=gu(e,r);if(a===-1)break;r=a}else if(s===to)n.push(r);else if(s===no&&n.length>0)t.set(n.pop(),r);r++}return t}function cb(e,t,n){for(let i=t;i<n;i++)if(!Qs(e.charCodeAt(i)))return!1;return!0}function Qs(e){if(e<=En)return e===En||e>=mu&&e<=Ux;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 bu(e,t,n,i){let r=[],s=zx,a=t,o=t;while(o<n){if(s.lastIndex=o,!s.test(e))break;if(o=s.lastIndex-1,o>=n)break;let p=e.charCodeAt(o);if(p===Zs){if(e.charCodeAt(o+1)===Hi){let l=xu(e,o);if(l===-1)break;o=l}o++;continue}if(p===Wi||p===zi||p===Ui){let l=gu(e,o);if(l===-1)break;o=l+1;continue}if(p===to){let l=i.get(o);if(l===void 0||l>=n){o++;continue}if(a<o)r.push(e.slice(a,o));let c=o+1;if(cb(e,c,l)){r.push("{}"),o=l+1,a=o;continue}let d=e.slice(c,l),f=e.charCodeAt(c)===Ys;if(!f&&!d.includes("/*")&&!ab(d)&&!tb(r)){let h=bu(e,c,l,i),m=h.trim();if(!m.includes(`
|
|
54
|
+
`)){let y=m.endsWith(";")?m.slice(0,-1):m,g=`{ ${pb(y)} }`;if(g.length<=qx){r.push(g),o=l+1,a=o;continue}}if(r.push("{"),h.charCodeAt(0)!==yu)r.push(`
|
|
55
|
+
`);if(h.length>0)r.push(h);o=l,a=l;continue}if(r.push("{"),!f)r.push(`
|
|
56
|
+
`);o=c,a=c;continue}if(p===no){if(a<o)r.push(e.slice(a,o));if(sb(r),!rb(r))r.push(`
|
|
57
|
+
`);r.push("}"),o++,a=o;continue}if(a<o)r.push(e.slice(a,o));if(ob(r),r.push(";"),e.charCodeAt(o+1)!==Ys)r.push(`
|
|
58
|
+
`);o++,a=o}if(a<n)r.push(e.slice(a,n));return r.join("")}function ub(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)!==eo)n=0;continue}if(r===Wi||r===zi||r===Ui){n=r,t+=e[i];continue}if(r===En&&t.charCodeAt(t.length-1)===En)continue;t+=e[i]}return t}function db(e){return e===no||e===Zx||e===Xx||e===Yx}function fb(e,t,n){return n-t>=3&&e.charCodeAt(t)===Zs&&e.charCodeAt(t+1)===Hi&&e.charCodeAt(t+2)===Hi}function fu(e,t,n){let i=e.indexOf("*/",t);return i!==-1&&i+2<=n}function hb(e,t,n){let i=e.charCodeAt(t);if(i===eb||i===Jx)return!0;return i===uu&&t+1<n&&e.charCodeAt(t+1)!==uu}function mb(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&&Qs(e.charCodeAt(f)))f++;while(h>f&&Qs(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 P=S.charCodeAt(S.length-1);if(P!==to&&P!==Kx&&P!==Qx)t.push(0),n.push("")}o=d;continue}if(s){if(t.push(a),n.push(` ${e.slice(f,h)}`),fu(e,f,h))s=!1;o=d;continue}let m=fb(e,f,h),y=m&&fu(e,f,h);if(m&&!y){t.push(r),n.push(e.slice(f,h)),s=!0,a=r,o=d;continue}let g=db(e.charCodeAt(f)),k=Math.max(0,r-(g?1:0))+(hb(e,f,h)?1:0);if(g&&k===0&&n.length>0&&n[n.length-1]==="")t.pop(),n.pop();if(t.push(k),n.push(ub(e.slice(f,h))),o=d,y)continue;r=Tt(e,void 0,f,h,r)}let p=n.length;while(p>0&&n[p-1]==="")p--;let l=[];for(let c=0;c<p;c++){if(c>0)l.push(`
|
|
60
|
+
`);let d=t[c];if(d>0)l.push(nb(d));l.push(n[c])}return l.join("")}function vu(e){return`${mb(bu(e,0,e.length,lb(e)))}
|
|
61
|
+
`}var ke="any",we="",yb="Record<string, any>",Tn="Record<string, never>",wu=/^[A-Za-z_$][A-Za-z0-9_$]*$/,gb=/CustomEvent/,xb=/^[A-Z]/,bb=/\n/,Au=/=>/,vb=/(?:^|\n)@default\b/,ro=/\n/g,Eb=/^([ \t]*\*) +$/gm,Tb=/\s+/g,Ft=/(^|[^.\w])Snippet(?:\s*<|\b)/,Sb=/import\s+type\s+[^;]*\bSnippet\b[^;]*from\s+"svelte";/,Cb=/^const\s+/,kb=/^export /,wb=/[^\w$]/g;function Pu(e){return e.replace(Cb,"")}function Ab(e){if(!e)return;return e.replace(ro,`
|
|
62
|
+
* `)}function so(e){if(!e)return"";return`/** ${Le(e)} */`}function oo(e){if(!e)return"";return`/**
|
|
63
|
+
* ${Le(e).replace(ro,`
|
|
64
64
|
* `)}
|
|
65
|
-
*/`}function
|
|
66
|
-
`)?
|
|
65
|
+
*/`}function Du(e){return e?.includes(`
|
|
66
|
+
`)?oo(e):so(e)}function Nu(e){if(e===void 0)return;return e===!0?"@deprecated":`@deprecated ${e}`}function Pb(e){let t=Nu(e);if(t===void 0)return;return`* ${t.replace(ro,`
|
|
67
67
|
* `)}
|
|
68
|
-
`}function
|
|
68
|
+
`}function Db(e,t){if(!t)return[`@${e}`];if(!t.includes(`
|
|
69
69
|
`))return[`@${e} ${t}`];return[`@${e}`,...t.split(`
|
|
70
|
-
`)]}function
|
|
70
|
+
`)]}function ao(e){let t=[];for(let{name:n,body:i}of e??[])t.push(...Db(n,i));return t}function po(e,t,n){let i=Nu(n),r=ao(t);if(!(r.length>0)&&!i)return Du(e);let a=[];if(e)a.push(...e.split(`
|
|
71
71
|
`));if(a.push(...r),i)a.push(...i.split(`
|
|
72
72
|
`));return`/**
|
|
73
73
|
* ${Le(a.join(`
|
|
74
74
|
* `))}
|
|
75
|
-
*/`}function
|
|
76
|
-
`).join("")}function
|
|
77
|
-
`}function
|
|
75
|
+
*/`}function Nb(e){let t=ao(e);if(t.length===0)return"";return t.map((n)=>`* ${n}
|
|
76
|
+
`).join("")}function Ji(e){if(e===void 0)return ke;return`${e}
|
|
77
|
+
`}function Ki(e){if(e.typedefs.length===0)return we;return e.typedefs.map((t)=>{let n,i=ao(t.tags);if(i.length===0)n=t.description?`${oo(t.description)}
|
|
78
78
|
`:"";else{let r=t.description?[...t.description.split(`
|
|
79
79
|
`),...i]:i;n=`/**
|
|
80
80
|
* ${Le(r.join(`
|
|
81
81
|
* `))}
|
|
82
82
|
*/
|
|
83
|
-
`}return`${n}export ${t.ts}`.replace(
|
|
83
|
+
`}return`${n}export ${t.ts}`.replace(Eb,"$1")}).join(`
|
|
84
84
|
|
|
85
|
-
`)}var
|
|
86
|
-
`:"",
|
|
87
|
-
`),i=t.description?`${
|
|
88
|
-
`:"",{declSuffix:r}=
|
|
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>":
|
|
85
|
+
`)}var Eu=new Map;function $b(e,t){let n=Eu.get(t);if(n===void 0)n=new RegExp(`\\b${Jt(t)}\\b`),Eu.set(t,n);return n.test(e)}var Tu,Su=[];function $u(e){if(e!==Tu)Tu=e,Su=V(e,",");return Su}function Lb(e){if(e===null)return[];return e[0].split(",").map((t,n)=>({name:t.trim(),constraint:($u(e[1]??"")[n]??t).trim()}))}function Lu(e,t){let n=Lb(e).filter(({name:i})=>$b(t,i));if(n.length===0)return{declSuffix:we,refSuffix:we};return{declSuffix:`<${n.map(({constraint:i})=>Pu(i)).join(", ")}>`,refSuffix:`<${n.map(({name:i})=>i).join(", ")}>`}}function Iu(e){if(!e.contexts||e.contexts.length===0)return we;return e.contexts.map((t)=>{let n=t.properties.map((a)=>{let o=a.description?`${so(a.description)}
|
|
86
|
+
`:"",p=a.optional?"?":"";return`${o}${a.name}${p}: ${a.type};`}).join(`
|
|
87
|
+
`),i=t.description?`${oo(t.description)}
|
|
88
|
+
`:"",{declSuffix:r}=Lu(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>":Tn};`;let s=t.hasUnresolvedSpread?" & Record<string, any>":"";return`${i}export type ${t.typeName}${r} = {
|
|
90
90
|
${n}
|
|
91
91
|
}${s};`}).join(`
|
|
92
92
|
|
|
93
|
-
`)}function
|
|
94
|
-
`}function
|
|
95
|
-
${Le(e)}*/`:
|
|
96
|
-
`:"",r=!t.slot_props||t.slot_props===
|
|
97
|
-
${i}${e}?: ${s};`}function
|
|
98
|
-
`].filter(Boolean).join(""),g=f.constant&&!f.isFunction?f.value:f.type||
|
|
99
|
-
${
|
|
100
|
-
${
|
|
101
|
-
`),o=
|
|
102
|
-
`:"",
|
|
103
|
-
|
|
104
|
-
${
|
|
105
|
-
};`:`type $Props${
|
|
93
|
+
`)}function Ae(e){return wu.test(e)?e:JSON.stringify(e)}function _u(e,t){if(!e)return;return`* ${t||e}
|
|
94
|
+
`}function Ot(e,t,n){return[_u(Ab(e)),Pb(t),Nb(n)].filter(Boolean).join("")}function mt(e){return e.length>0?`/**
|
|
95
|
+
${Le(e)}*/`:we}function Cu(e,t){let n=po(t.description,t.tags,t.deprecated),i=n?`${n}
|
|
96
|
+
`:"",r=!t.slot_props||t.slot_props===Tn?"[]":_b(t.slot_props),s=r==="[]"?"(this: void) => void":`(this: void, ...args: ${r}) => void`;return`
|
|
97
|
+
${i}${e}?: ${s};`}function Ib(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(Tb," "):f.value,m=vb.test(f.description??"")||f.value===void 0||f.value==="undefined",y=[Ot(f.description,f.deprecated,f.tags),_u(f.constant,"@constant"),m?null:`* @default ${h}
|
|
98
|
+
`].filter(Boolean).join(""),g=f.constant&&!f.isFunction?f.value:f.type||ke;return`
|
|
99
|
+
${mt(y)}
|
|
100
|
+
${Ae(f.name)}${f.isRequired?"":"?"}: ${g};`});for(let f of e.slots)if(!f.default&&f.name!=null&&!n.has(f.name))r.push(Cu(Ae(f.name),f));let s=e.slots.find((f)=>f.default||f.name===null);if(s&&!n.has("children"))r.push(Cu("children",s));let a=r.join(`
|
|
101
|
+
`),o=Yb(e.moduleName),p=e.generics?`<${$u(e.generics[1]).map((f)=>Pu(f.trim())).join(", ")}>`:"",l=e.generics?`<${e.generics[0]}>`:"",c=e.extends===void 0?"":`Omit<${e.extends.interface}, keyof $Props${l}> & `;if(e.rest_props?.type==="Element"){let{name:f,thisValue:h,thisType:m,description:y}=e.rest_props,g;if(f!=="svelte:element")g=f.split("|").map((fe)=>`SvelteHTMLElements["${fe.trim()}"]`).join(" & ");else if(h)g=`SvelteHTMLElements["${h}"]`;else if(m)g=`NoInfer<SvelteHTMLElements[${m}]>`;else g="HTMLAttributes<HTMLElement>";let k="[key: `data-${string}`]: unknown;",S=y?`${Du(y)}
|
|
102
|
+
`:"",P=e.canonicalPropsType?`type $Props${p} = (${e.canonicalPropsType}) & {${a}
|
|
103
|
+
|
|
104
|
+
${k}
|
|
105
|
+
};`:`type $Props${p} = {
|
|
106
106
|
${a}
|
|
107
107
|
|
|
108
|
-
${
|
|
109
|
-
};`,
|
|
110
|
-
${
|
|
108
|
+
${k}
|
|
109
|
+
};`,v=m?{name:p,ref:l}:{name:"",ref:""},re=e.extends===void 0?`keyof $Props${l}`:`keyof ($Props${l} & ${e.extends.interface})`;return{props_name:o,prop_def:`
|
|
110
|
+
${S}type $RestProps${v.name} = ${g};
|
|
111
111
|
|
|
112
|
-
${
|
|
112
|
+
${P}
|
|
113
113
|
|
|
114
|
-
export type ${o}${
|
|
114
|
+
export type ${o}${p} = Omit<$RestProps${v.ref}, ${re}> & ${c}$Props${l};
|
|
115
115
|
`}}let d;if(e.canonicalPropsType)d=`
|
|
116
116
|
${`
|
|
117
|
-
type $Props${
|
|
117
|
+
type $Props${p} = ${e.canonicalPropsType}${a.trim()===""?"":` & {${a}
|
|
118
118
|
}`};
|
|
119
119
|
`}
|
|
120
|
-
export type ${o}${
|
|
120
|
+
export type ${o}${p} = ${c}$Props${l};
|
|
121
121
|
`;else if(e.extends===void 0)d=a.trim()===""?`
|
|
122
|
-
export type ${o}${
|
|
122
|
+
export type ${o}${p} = ${Tn};
|
|
123
123
|
`:`
|
|
124
|
-
export type ${o}${
|
|
124
|
+
export type ${o}${p} = {
|
|
125
125
|
${a}
|
|
126
126
|
};
|
|
127
127
|
`;else d=`
|
|
128
|
-
type $Props${
|
|
128
|
+
type $Props${p} = {
|
|
129
129
|
${a}
|
|
130
130
|
};
|
|
131
131
|
|
|
132
|
-
export type ${o}${
|
|
133
|
-
`;return{props_name:o,prop_def:d}}function
|
|
134
|
-
`:""}${a}: ${
|
|
132
|
+
export type ${o}${p} = ${c}$Props${l};
|
|
133
|
+
`;return{props_name:o,prop_def:d}}function _b(e){return or(e)?e:`[${e}]`}function Rb(e){let t=e.slots.filter((i)=>!or(i.slot_props??""));if(t.length===0)return Tn;let n=t.map(({name:i,slot_props:r,...s})=>{let a=s.default||i===null?"default":Ae(i??""),o=po(s.description,s.tags,s.deprecated);return`${o?`${o}
|
|
134
|
+
`:""}${a}: ${Ji(r)};`}).join(`
|
|
135
135
|
`);return t.length===1?`{${n}}`:`{
|
|
136
136
|
${n}
|
|
137
|
-
}`}var
|
|
138
|
-
`:""}${
|
|
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 io(e=ke){if(gb.test(e))return e;return`CustomEvent<${e}>`}function Bb(e){switch(e.type){case"dispatched":return io(e.detail);case"forwarded":{let t=e.element,i=!(t&&xb.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 io(e.detail);return i?`WindowEventMap["${e.name}"]`:io()}default:return e}}function ku(e){if(e.events.length===0)return yb;let t=e.events.map((n)=>{let i=po(n.description,n.tags,n.deprecated);return`${i?`${i}
|
|
138
|
+
`:""}${Ae(n.name)}: ${Bb(n)};
|
|
139
139
|
`}).join("");return e.events.length===1?`{${t}}`:`{
|
|
140
|
-
${t}}`}function
|
|
141
|
-
${
|
|
142
|
-
${
|
|
143
|
-
`)}function
|
|
144
|
-
};`}}function
|
|
140
|
+
${t}}`}function Fb(e){let t=e.type==="() => any";if(e.type&&Au.test(e.type)&&!t)return e.type;if(e.params&&e.params.length>0)return`(${Ce(e.params)}) => ${e.returnType||ke}`;if(e.returnType)return`() => ${e.returnType}`;return e.type||ke}function Ru(e){return e.props.filter((t)=>t.isFunctionDeclaration||t.kind==="const").map((t)=>{let n=Ot(t.description,t.deprecated,t.tags);return`
|
|
141
|
+
${mt(n)}
|
|
142
|
+
${Ae(t.name)}: ${Fb(t)};`}).join(`
|
|
143
|
+
`)}function Ob(e){let t=Qb(e.moduleName),n=Ru({props:e.props});if(n.trim()==="")return{exports_name:t,exports_ref:t,exports_def:`export type ${t} = ${Tn};`};let{declSuffix:i,refSuffix:r}=Lu(e.generics,n);return{exports_name:t,exports_ref:`${t}${r}`,exports_def:`export type ${t}${i} = {${n}
|
|
144
|
+
};`}}function jb(e){return e.props.filter((t)=>t.bindable===!0||t.binding==="writable").map((t)=>JSON.stringify(t.name)).join(" | ")}function Mu(e){return e==="default"?"$$Component":e}function qb(e){let t=Mu(e.moduleName),n=e.bindings===we?'""':e.bindings;return`declare const ${t}: Component<
|
|
145
145
|
${e.propsRef},
|
|
146
146
|
${e.exportsRef},
|
|
147
147
|
${n}
|
|
148
148
|
>;
|
|
149
|
-
export default ${t};`}function
|
|
149
|
+
export default ${t};`}function Vb(e){let t=Mu(e.moduleName),n=`${t}Component`,i=e.bindings===we?'""':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} {
|
|
150
150
|
new ${e.generic}(
|
|
151
151
|
options: ComponentConstructorOptions<${e.propsRef}>
|
|
152
152
|
): SvelteComponent<${e.propsRef}${e.eventsRef?`, ${e.eventsRef}`:""}> & ${e.exportsRef};
|
|
@@ -162,84 +162,84 @@ ${t}}`}function gb(e){let t=e.type==="() => any";if(e.type&&mu.test(e.type)&&!t)
|
|
|
162
162
|
z_$$bindings?: ${i};
|
|
163
163
|
}
|
|
164
164
|
declare const ${t}: ${n};
|
|
165
|
-
export default ${t};`}function
|
|
165
|
+
export default ${t};`}function Gb(e){if(e.extends===void 0)return"";return`import type { ${e.extends.interface} } from ${e.extends.import};`}function Hb(e){if(!e.componentComment)return"";if(!bb.test(e.componentComment))return so(e.componentComment.trim());return`/*${Le(e.componentComment).split(`
|
|
166
166
|
`).map((t)=>`* ${t}`).join(`
|
|
167
167
|
`)}
|
|
168
|
-
*/`}function
|
|
169
|
-
export ${c} from ${JSON.stringify(r)};`);continue}let
|
|
168
|
+
*/`}function Wb(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=Ot(i.description,i.deprecated,i.tags),o=Ae(i.name);if(s==="*"){let c=i.name==="*"?"*":`* as ${o}`;t.push(`${mt(a)}
|
|
169
|
+
export ${c} from ${JSON.stringify(r)};`);continue}let p=`${r}\x00${a}`,l=n.get(p);if(!l)l={comments:a,from:r,specifiers:[]},n.set(p,l),t.push(p);l.specifiers.push(s===i.name?o:`${Ae(s)} as ${o}`)}return t.map((i)=>{let r=n.get(i);if(!r)return i;return`${mt(r.comments)}
|
|
170
170
|
export { ${r.specifiers.join(", ")} } from ${JSON.stringify(r.from)};`}).join(`
|
|
171
171
|
|
|
172
|
-
`)}function
|
|
172
|
+
`)}function lo(e){let t=[e.static?"static ":"",e.abstract?"abstract ":"",e.readonly?"readonly ":""].join(""),n=e.optional?"?":"";if(e.kind==="property")return`${t}${Ae(e.name)}${n}: ${e.type??ke}`;let i=Ce(e.params??[]);if(e.kind==="constructor")return`constructor(${i})`;let r=e.typeParameters?`<${e.typeParameters}>`:"";return`${t}${Ae(e.name)}${n}${r}(${i}): ${e.returnType??ke}`}function zb(e,t){let n=e.localName??e.name,i=n!==e.name,r=`export { ${n}${i?` as ${Ae(e.name)}`:""} };`;if(t.has(n))return r;t.add(n);let s=e.typeParameters?`<${e.typeParameters}>`:"",a=(e.members??[]).map((c)=>[mt(Ot(c.description,c.deprecated,c.tags)),`${lo(c)};`].filter(Boolean).join(`
|
|
173
173
|
`)).join(`
|
|
174
174
|
|
|
175
|
-
`),o=`${e.extends?` extends ${e.extends}`:""}${e.implements?.length?` implements ${e.implements.join(", ")}`:""}`,
|
|
176
|
-
${[
|
|
175
|
+
`),o=`${e.extends?` extends ${e.extends}`:""}${e.implements?.length?` implements ${e.implements.join(", ")}`:""}`,p=`${i?"":"export "}declare ${e.abstract?"abstract ":""}class ${n}${s}${o}`;return`
|
|
176
|
+
${[mt(Ot(e.description,e.deprecated,e.tags)),a?`${p} {
|
|
177
177
|
${a}
|
|
178
|
-
}`:`${
|
|
179
|
-
`)}`}function
|
|
180
|
-
`;else if(a.params&&a.params.length>0)
|
|
178
|
+
}`:`${p} {}`,i?r:""].filter(Boolean).join(`
|
|
179
|
+
`)}`}function Ub(e){let t=Wb(e),n=new Set,i=e.moduleExports.filter((r)=>r.kind!=="re-export").map((r)=>{if(r.kind==="class")return zb(r,n);let s=!wu.test(r.name),a=s?{...r,name:Jb(r.name)}:r,o=Ot(a.description,a.deprecated,a.tags),p,l=a.type!==void 0&&Au.test(a.type),c=a.typeParameters?`<${a.typeParameters}>`:"";if(a.kind==="const"&&!l)p=`export declare const ${a.name}: ${a.type||ke};
|
|
180
|
+
`;else if(a.params&&a.params.length>0)p=`export declare function ${a.name}${c}(${Ce(a.params)}): ${a.returnType||ke};`;else if(a.returnType)p=`export declare function ${a.name}${c}(): ${a.returnType};`;else if(l&&a.type){let[d,f,...h]=a.type.split("=>"),m=h.map((y)=>` => ${y.trim()}`).join("");p=`export declare function ${a.name}${d.trimEnd()}: ${f.trim()}${m};`}else p=`export declare let ${a.name}: ${a.type||ke};`;if(s)p=`${p.replace(kb,"").trimEnd()}
|
|
181
181
|
export { ${a.name} as ${JSON.stringify(r.name)} };`;return`
|
|
182
|
-
${
|
|
183
|
-
${
|
|
182
|
+
${mt(o)}
|
|
183
|
+
${p}`}).join(`
|
|
184
184
|
`);return[t,i].filter(Boolean).join(`
|
|
185
185
|
|
|
186
|
-
`)}function
|
|
187
|
-
`))){let r=`${n}${i.join(", ")}> {}`;if(r.length<=
|
|
186
|
+
`)}function Jb(e){return`__export_${e.replace(wb,"_")}`}var Kb=120;function Xb(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<=Kb)return r}return`${n}
|
|
188
188
|
${e.genericProps},
|
|
189
189
|
${e.events},
|
|
190
190
|
${e.slots}
|
|
191
191
|
> {
|
|
192
192
|
${e.accessors}
|
|
193
|
-
}`}function
|
|
194
|
-
`),
|
|
193
|
+
}`}function Yb(e){return`${e}Props`}function Qb(e){return`${e}Exports`}function Zb(e,t){let n=To(e),{moduleName:i,typedefs:r,generics:s,props:a,moduleExports:o,slots:p,events:l,rest_props:c,extends:d,componentComment:f,contexts:h}=e,m=t?.format==="component",y=s!==null,{props_name:g,prop_def:k}=Ib({moduleName:i,props:a,rest_props:c,extends:d,generics:s,slots:p,canonicalPropNames:new Set(n?.canonicalPropNames??[]),canonicalPropsType:n?.canonicalPropsType}),S=s?`<${s[1]}>`:"",P=s?`${g}<${s[0]}>`:g,v=m&&l.length>0?`type $Events${S} = ${ku({events:l})};`:"",re=s?`$Events<${s[0]}>`:"$Events",fe=m&&(y||v!==""),Qe=Ub({moduleExports:o}),Cn=Ki({typedefs:r}),kn=Iu({contexts:h,generics:s}),wn=(n?.typeImportStatements??[]).join(`
|
|
194
|
+
`),An=[...n?.localTypeDeclarations??[],...n?.moduleTypeDeclarations??[]].join(`
|
|
195
195
|
|
|
196
|
-
`),{exports_ref:
|
|
197
|
-
`),
|
|
198
|
-
`)].map((
|
|
196
|
+
`),{exports_ref:qt,exports_def:vo}=m?Ob({props:a,moduleName:i,generics:s}):{exports_ref:we,exports_def:we},Eo=m?jb({props:a}):we,Yi=!Sb.test(wn)&&(Ft.test(k)||Ft.test(Qe)||Ft.test(Cn)||Ft.test(kn)||Ft.test(An)||Ft.test(vo)),ed=c?.type==="Element"&&(c.name!=="svelte:element"||c.thisValue||c.thisType),td=c?.type==="Element"&&c.name==="svelte:element"&&!c.thisValue&&!c.thisType,nd=[m?fe?`import type { SvelteComponent, ComponentConstructorOptions, ComponentInternals${Yi?", Snippet":""} } from "svelte";`:`import type { Component${Yi?", Snippet":""} } from "svelte";`:`import { SvelteComponentTyped${Yi?", type Snippet":""} } from "svelte";`,ed?'import type { SvelteHTMLElements } from "svelte/elements";':"",td?'import type { HTMLAttributes } from "svelte/elements";':"",wn,Gb({extends:d})].filter(Boolean).join(`
|
|
197
|
+
`),id=m?fe?Vb({moduleName:i,generic:S,propsRef:P,exportsRef:qt,bindings:Eo,...v?{eventsRef:re}:{}}):qb({moduleName:i,propsRef:P,exportsRef:qt,bindings:Eo}):Xb({moduleName:i,generic:S,genericProps:P,events:ku({events:l}),slots:Rb({slots:p}),accessors:Ru({props:a})}),rd=[Qe,Cn,An,kn,k,vo,v,[Hb({componentComment:f}),id].filter(Boolean).join(`
|
|
198
|
+
`)].map((sd)=>sd.trim()).filter(Boolean).join(`
|
|
199
199
|
|
|
200
|
-
`);return
|
|
200
|
+
`);return vu([nd,rd].filter(Boolean).join(`
|
|
201
201
|
|
|
202
|
-
`))}var
|
|
202
|
+
`))}var Bu=/`/g,Fu=/\s+/g,xe="--",Ou=`| Prop name | Required | Kind | Reactive | Binding | Type | Default value | Description |
|
|
203
203
|
| :- | :- | :- | :- | :- | :- | :- | :- |
|
|
204
|
-
`,
|
|
204
|
+
`,ju=`| Slot name | Default | Props | Fallback | Description |
|
|
205
205
|
| :- | :- | :- | :- | :- |
|
|
206
|
-
`,
|
|
206
|
+
`,qu=`| Event name | Type | Detail | Description |
|
|
207
207
|
| :- | :- | :- | :- |
|
|
208
|
-
`,
|
|
208
|
+
`,fo=`| Name | Kind | Type | Description |
|
|
209
209
|
| :- | :- | :- | :- |
|
|
210
|
-
`,
|
|
210
|
+
`,ev=`| Member | Signature | Description |
|
|
211
211
|
| :- | :- | :- |
|
|
212
|
-
`,
|
|
212
|
+
`,Vu=`| Part name | Description |
|
|
213
213
|
| :- | :- |
|
|
214
|
-
|
|
214
|
+
`,Gu=`| Property name | Type | Default value | Description |
|
|
215
215
|
| :- | :- | :- | :- |
|
|
216
|
-
`,
|
|
217
|
-
`)?e.replace(
|
|
218
|
-
`))});if(!
|
|
219
|
-
`),i=[],r=[];for(let s=0;s<n.length;s++){let a=
|
|
220
|
-
`)}),r=[""]}if(r.length>1||i.length===0)i.push(t(r));return i}function
|
|
221
|
-
`).replace(
|
|
222
|
-
`);if(a)r(a);for(let
|
|
223
|
-
|
|
224
|
-
`);if(!i.members?.length)continue;e.append("raw",
|
|
216
|
+
`,ho=/\|/g,tv=/</g,nv=/>/g,yt=/\n/g,iv=/^[A-Za-z_$][\w$]*$/,rv=/\s*\n\s*/g,sv=/&(?=#?\w+;)|<(?=[A-Za-z/!?])|[|`*]|\\(?=[!-/:-@[-`{-~])|(?<![A-Za-z0-9])_|_(?![A-Za-z0-9])/g,ov=/[&<|`*\\_]/;function mo(e){if(!ov.test(e))return e;return e.replace(sv,(t)=>t==="&"?"&":t==="<"?"<":t==="_"?"_":`&#${t.charCodeAt(0)};`)}function Hu(e){return`<code>${mo(e.includes(`
|
|
217
|
+
`)?e.replace(rv," "):e)}</code>`}var av=/\{@link\s+([^{}\s|]+)(?:\|([^{}]+))?\}/g;function pv(e){if(!e.includes("{@link"))return e;return e.replace(av,(t,n,i)=>`[${i===void 0?n:i.trim()}](${n})`)}function co(e){return e.includes("```")||e.includes("~~~")}function uo(e){return Ju(pv(e))}var lv=/^([ \t]*)(`{3,}|~{3,})(.*)$/,cv=/^\n/,uv=/\n$/;function Wu(e){let t=(s)=>({kind:"prose",text:uo(s.join(`
|
|
218
|
+
`))});if(!co(e))return[t([e])];let n=e.split(`
|
|
219
|
+
`),i=[],r=[];for(let s=0;s<n.length;s++){let a=lv.exec(n[s]),[,o="",p="",l=""]=a??[];if(!a||p[0]==="`"&&l.includes("`")){r.push(n[s]);continue}if(r.push(""),r.length>1)i.push(t(r));let c=[],d=new RegExp(`^[ \\t]*${p[0]}{${p.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 zu(e){let t="";for(let n=0;n<e.length;n++){let i=e[n];if(i.kind==="code"){t+=`<pre><code>${mo(i.code).replace(yt,"<br />")}</code></pre>`;continue}let r=i.text;if(e[n-1]?.kind==="code")r=r.replace(cv,"");if(e[n+1]?.kind==="code")r=r.replace(uv,"");t+=r.replace(ho,"|").replace(yt,"<br />")}return t}function de(e){if(e===void 0)return xe;return Hu(e)}function Uu(e){if(!e.reExport)return de(e.type);let{from:t,imported:n}=e.reExport,i=n==="*"?"":iv.test(n)?`.${n}`:`[${JSON.stringify(n)}]`;return de(`typeof import(${JSON.stringify(t)})${i}`)}function Ju(e){if(!e.includes("<")&&!e.includes(">"))return e;return e.replace(tv,"<").replace(nv,">")}function yo(e){if(e===void 0)return xe;return Hu(e)}function gt(e,t){if(t===void 0)return e;let n=typeof t==="string"&&t.trim().length>0?`: ${Ju(t).replace(yt," ").replace(ho,"|")}`:"";return`<s>${e}</s><br />**Deprecated**${n}`}function Xi(e){if(e===void 0||e.trim().length===0)return xe;return zu(Wu(e))}function Ku(e){if(e===void 0||e==="{}")return xe;return de(Ji(e).replace(yt," "))}function Xu(e){if(e===void 0)return xe;return`<code>${mo(e).replace(yt,"<br />")}</code>`}function jt(e,t){let n=e!==void 0&&e.trim().length>0;if(!(n&&co(e))&&!t?.some(({body:a})=>a&&co(a))){let a=n?[uo(e)]:[];for(let{name:o,body:p}of t??[]){let l=p?.trim();a.push(l?`@${o} ${uo(l)}`:`@${o}`)}if(a.length===0)return xe;return a.join(`
|
|
221
|
+
`).replace(ho,"|").replace(yt,"<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 p of Wu(o))if(p.kind==="prose")r(p.text);else i.push(p)};if(n)s("",e);for(let{name:a,body:o}of t??[]){let p=o?.trim();s(p?`@${a} `:`@${a}`,p??"")}if(i.length===0)return xe;return zu(i)}function Yu(e){if(e===void 0)return xe;return de(e.replace(yt," "))}function dv(e){let t=[e.extends?`Extends ${de(e.extends)}.`:"",e.implements?.length?`Implements ${e.implements.map((n)=>de(n)).join(", ")}.`:""].filter(Boolean);return t.length>0?t.join(" "):void 0}function Qu(e,t){let n=new Set;for(let i of t){if(i.kind!=="class")continue;let r=dv(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",ev);for(let a of i.members)e.append("raw",`| ${gt(a.name,a.deprecated)} | ${de(lo(a))} | ${jt(a.description,a.tags)} |
|
|
225
225
|
`);e.append("raw",`
|
|
226
|
-
`)}}var
|
|
226
|
+
`)}}var fv=/[^\w\- ]+/g,hv=/\s+/g,go="<!-- __TOC__ -->";function mv(e,t){let n=e.toLowerCase().replace(Bu,"").replace(fv,"").replace(hv,"-"),i=t.get(n)??0;return t.set(n,i+1),i===0?n:`${n}-${i}`}class Sn{sourceParts=[];hasToC=!1;toc=[];onAppend;constructor(e={}){this.onAppend=e.onAppend}get source(){return this.sourceParts.join("")}appendLineBreaks(){return this.sourceParts.push(`
|
|
227
227
|
|
|
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(
|
|
229
|
-
`);return e.slice(0,t)+i+e.slice(t+
|
|
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(go),this.hasToC=!0,this.appendLineBreaks(),this}end(){let e=this.sourceParts.join("");if(!this.hasToC)return e;let t=e.indexOf(go);if(t===-1)return e;let n=new Map,i=this.toc.map(({indent:r,raw:s})=>`${" ".repeat(r)}- [${s}](#${mv(s,n)})`).join(`
|
|
229
|
+
`);return e.slice(0,t)+i+e.slice(t+go.length)}}class Zu extends Sn{}function bo(e,t,n){if(e.append("h1","Component Index"),e.append("h2","Components").tableOfContents(),e.append("divider"),n&&n.length>0)yv(e,n);for(let i of Xs(t).components)bv(e,i)}function yv(e,t){e.append("h2","Exports"),e.append("raw",fo);for(let n of t){let i=(n.type??n.value)?.replace(Fu," ").trim();e.append("raw",`| ${gt(n.name,n.deprecated)} | <code>${n.kind}</code> | ${de(i)} | ${Xi(n.description)} |
|
|
230
230
|
`)}e.append("raw",`
|
|
231
|
-
`),e.append("divider")}function
|
|
231
|
+
`),e.append("divider")}function gv(e){return e.kind==="const"||e.isFunctionDeclaration}function xv(e,t){e.append("h3","Module exports"),e.append("raw",fo);for(let n of t)e.append("raw",`| ${gt(n.name,n.deprecated)} | <code>${n.kind}</code> | ${Uu(n)} | ${jt(n.description,n.tags)} |
|
|
232
232
|
`);e.append("raw",`
|
|
233
|
-
`),
|
|
234
|
-
`);else e.append("p","None.")}function
|
|
235
|
-
${
|
|
233
|
+
`),Qu(e,t)}function xo(e,t,n){if(t.length>0)n(),e.append("raw",`
|
|
234
|
+
`);else e.append("p","None.")}function bv(e,t){if(e.append("h2",`\`${t.moduleName}\``),t.generics)e.append("p",`**Type parameters:** ${de(`<${t.generics[1]}>`)}`);if(t.typedefs.length>0)e.append("h3","Types").append("raw",`\`\`\`ts
|
|
235
|
+
${Ki({typedefs:t.typedefs})}
|
|
236
236
|
\`\`\`
|
|
237
237
|
|
|
238
|
-
`);if(e.append("h3","Props"),
|
|
239
|
-
`)}}),t.moduleExports.length>0)
|
|
240
|
-
`)}),e.append("h3","Events"),
|
|
241
|
-
`)}),t.cssParts&&t.cssParts.length>0){e.append("h3","CSS Parts"),e.append("raw",
|
|
238
|
+
`);if(e.append("h3","Props"),xo(e,t.props,()=>{e.append("raw",Ou);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=gv(r)?"accessor":r.kind;e.append("raw",`| ${gt(r.name,r.deprecated)} | ${r.isRequired?"Yes":"No"} | <code>${s}</code> | ${r.reactive?"Yes":"No"} | ${r.binding??"--"} | ${de(r.type)} | ${yo(r.value)} | ${jt(r.description,r.tags)} |
|
|
239
|
+
`)}}),t.moduleExports.length>0)xv(e,t.moduleExports);if(e.append("h3","Slots"),xo(e,t.slots,()=>{e.append("raw",ju);for(let n of t.slots)e.append("raw",`| ${gt(n.default?xe:n.name??xe,n.deprecated)} | ${n.default?"Yes":"No"} | ${Ku(n.slot_props)} | ${Xu(n.fallback)} | ${jt(n.description,n.tags)} |
|
|
240
|
+
`)}),e.append("h3","Events"),xo(e,t.events,()=>{e.append("raw",qu);for(let n of t.events)e.append("raw",`| ${gt(n.name,n.deprecated)} | ${n.type} | ${Yu(n.detail)} | ${jt(n.description,n.tags)} |
|
|
241
|
+
`)}),t.cssParts&&t.cssParts.length>0){e.append("h3","CSS Parts"),e.append("raw",Vu);for(let n of t.cssParts)e.append("raw",`| ${n.name} | ${Xi(n.description)} |
|
|
242
242
|
`);e.append("raw",`
|
|
243
|
-
`)}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",Gu);for(let n of t.cssProperties)e.append("raw",`| ${n.name} | ${de(n.type)} | ${yo(n.default)} | ${Xi(n.description)} |
|
|
244
244
|
`);e.append("raw",`
|
|
245
|
-
`)}}function
|
|
245
|
+
`)}}function vv(e,t){return new Sn({onAppend:(n,i)=>{t?.onAppend?.call(null,n,i,e)}})}function Ev(e,t){let n=vv(e,t);return bo(n,e),n.end()}export{Zu as BrowserWriterMarkdown,cu as COMPONENT_API_SCHEMA_VERSION,Us as ComponentParser,Sn as MarkdownDocument,od as asNormalizedPath,Xs as buildComponentApiDocument,Bx as finalizeWithoutCrossFileResolution,Ji as formatTsProps,Iu as getContextDefs,Ki as getTypeDefs,bo as renderComponentsToMarkdown,Ev as writeMarkdownCore,Zb as writeTsDefinition};
|