sveld 0.36.9 → 0.36.11
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/README.md +402 -4
- package/lib/browser.js +136 -193
- package/lib/chunk-04eb8yj0.js +245 -0
- package/lib/chunk-3a9n8agv.js +13 -0
- package/lib/chunk-5b7hj275.js +7 -0
- package/lib/chunk-e1e89j27.js +1 -0
- package/lib/chunk-ncw3wbrj.js +6 -0
- package/lib/chunk-qnj6xmb6.js +7 -0
- package/lib/chunk-wq8f3w8t.js +1 -0
- package/lib/cli-entry.js +1 -1
- package/lib/index.d.ts +1 -824
- package/lib/index.js +1 -1
- package/package.json +1 -1
- package/lib/chunk-0beysrt7.js +0 -62
- package/lib/chunk-26w7fg2w.js +0 -13
- package/lib/chunk-bbeezhqq.js +0 -6
- package/lib/chunk-cqkng6ys.js +0 -7
- package/lib/chunk-hpxd4cgm.js +0 -1
- package/lib/chunk-mdth9bg3.js +0 -225
- package/lib/chunk-n5cjh6db.js +0 -1
- package/lib/chunk-nrz6c5ew.js +0 -10
- package/lib/chunk-ptdfswsv.js +0 -2
- package/lib/chunk-syz2wqmb.js +0 -3
- package/lib/chunk-yzabyfqs.js +0 -16
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{o,a,t,H}from"./chunk-04eb8yj0.js";var Dt={li:{direct:["li"]},dt:{descendant:["dt","dd"]},dd:{descendant:["dt","dd"]},p:{descendant:["address","article","aside","blockquote","div","dl","fieldset","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","main","menu","nav","ol","p","pre","section","table","ul"]},rt:{descendant:["rt","rp"]},rp:{descendant:["rt","rp"]},optgroup:{descendant:["optgroup"]},option:{descendant:["option","optgroup"]},thead:{direct:["tbody","tfoot"]},tbody:{direct:["tbody","tfoot"]},tfoot:{direct:["tbody"]},tr:{direct:["tr","tbody"]},td:{direct:["td","th","tr"]},th:{direct:["td","th","tr"]}};function Re(r,c){let l=Dt[r];if(!l)return!1;if(!c)return!0;return(l.direct??l.descendant??[]).includes(c)}var j=!0,_t=new WeakMap;function Ot(r){let c=r.Parser.acorn||r,l=_t.get(c);if(!l){let g=function(v){return v===A.name||v===A.string||v===A.num||M.includes(v)||W.includes(v)},S=function(v){return v===A.name||M.includes(v)||W.includes(v)},P=function(v){return v===A.name||W.includes(v)},x=function(v){return v===L.abstract||v===L.declare||v===L.enum||v===L.module||v===L.namespace||v===L.interface||v===L.type},k=function(v){return v===L.keyof||v===L.readonly||v===L.unique},E=function(v){return v===A.invalidTemplate},{tokTypes:A,keywordTypes:_}=c,M=Object.values(_),L=i(),W=Object.values(L),Z=m(),I=u(),U=new RegExp(`^(?:${Object.keys(L).join("|")})$`);Z.jsxTagStart.updateContext=function(){this.context.push(I.tc_expr),this.context.push(I.tc_oTag),this.exprAllowed=!1},Z.jsxTagEnd.updateContext=function(v){let ee=this.context.pop();if(ee===I.tc_oTag&&v===A.slash||ee===I.tc_cTag)this.context.pop(),this.exprAllowed=this.curContext()===I.tc_expr;else this.exprAllowed=!0},l={tokTypes:{...L,...Z},tokContexts:{...I},keywordsRegExp:U,tokenIsLiteralPropertyName:g,tokenIsKeywordOrIdentifier:S,tokenIsIdentifier:P,tokenIsTSDeclarationStart:x,tokenIsTSTypeOperator:k,tokenIsTemplate:E}}return l;function p(g,S={}){return new c.TokenType("name",S)}function u(){return{tc_oTag:new c.TokContext("<tag",!1,!1),tc_cTag:new c.TokContext("</tag",!1,!1),tc_expr:new c.TokContext("<tag>...</tag>",!0,!0)}}function m(){return{at:new c.TokenType("@"),jsxName:new c.TokenType("jsxName"),jsxText:new c.TokenType("jsxText",{beforeExpr:!0}),jsxTagStart:new c.TokenType("jsxTagStart",{startsExpr:!0}),jsxTagEnd:new c.TokenType("jsxTagEnd")}}function i(){return{assert:p("assert",{startsExpr:j}),asserts:p("asserts",{startsExpr:j}),global:p("global",{startsExpr:j}),keyof:p("keyof",{startsExpr:j}),readonly:p("readonly",{startsExpr:j}),unique:p("unique",{startsExpr:j}),abstract:p("abstract",{startsExpr:j}),declare:p("declare",{startsExpr:j}),enum:p("enum",{startsExpr:j}),module:p("module",{startsExpr:j}),namespace:p("namespace",{startsExpr:j}),interface:p("interface",{startsExpr:j}),type:p("type",{startsExpr:j})}}}var Rt=512,ie=1024,re=1,he=2,Mt=4,Te=8,qt=16,Ve=64,je=128,Bt=256,Ft=512,We=1024,os=re|he|Te|je,ls=re|0|Te|0,cs=re|0|Mt|0,ps=re|0|qt|0,hs=0|he|0|je,us=0|he|0|0,Ut=re|he|Te|Bt,ds=0|We,fs=0|Ve,ms=re|0|0|Ve,ys=Ut|Ft,xs=0|We,He=4,Ge=2,Ke=1,Ts=Ge|Ke,gs=Ge|He,As=Ke|He,Vt=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/y,Me=new RegExp("(?=("+Vt.source+"))\\1"+/(?=[\n\r\u2028\u2029]|\/\*(?!.*?\*\/)|$)/.source,"y"),ae=class{constructor(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1}};function jt(r,c){let l=c.key.name,p=r[l],u="true";if(c.type==="MethodDefinition"&&(c.kind==="get"||c.kind==="set"))u=(c.static?"s":"i")+c.kind;if(p==="iget"&&u==="iset"||p==="iset"&&u==="iget"||p==="sget"&&u==="sset"||p==="sset"&&u==="sget")return r[l]="true",!1;else if(!p)return r[l]=u,!1;else return!0}function qe(r,c){let{computed:l,key:p}=r;return!l&&(p.type==="Identifier"&&p.name===c||p.type==="Literal"&&p.value===c)}var C={AbstractMethodHasImplementation:({methodName:r})=>`Method '${r}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:r})=>`Property '${r}' cannot have an initializer because it is marked abstract.`,AccesorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccesorCannotHaveTypeParameters:"An accessor cannot have type parameters.",CannotFindName:({name:r})=>`Cannot find name '${r}'.`,ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference:"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:({kind:r})=>`'declare' is not allowed in ${r}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:()=>"Accessibility modifier already seen.",DuplicateModifier:({modifier:r})=>`Duplicate modifier: '${r}'.`,EmptyHeritageClauseType:({token:r})=>`'${r}' list cannot be empty.`,EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ImportAliasHasImportType:"An import alias can not use 'import type'.",IncompatibleModifiers:({modifiers:r})=>`'${r[0]}' modifier cannot be used with '${r[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:r})=>`Index signatures cannot have an accessibility modifier ('${r}').`,IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier.",IndexSignatureHasOverride:"'override' modifier cannot appear on an index signature.",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier.",InitializerNotAllowedInAmbientContext:"Initializers are not allowed in ambient contexts.",InvalidModifierOnTypeMember:({modifier:r})=>`'${r}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:r})=>`'${r}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:r})=>`'${r}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifiersOrder:({orderedModifiers:r})=>`'${r[0]}' modifier must precede '${r[1]}' modifier.`,InvalidPropertyAccessAfterInstantiationExpression:"Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MissingInterfaceName:"'interface' declarations must be followed by an identifier.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifer:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:({modifier:r})=>`Private elements cannot have an accessibility modifier ('${r}').`,PrivateMethodsHasAccessibility:({modifier:r})=>`Private methods cannot have an accessibility modifier ('${r}').`,ReadonlyForMethodSignature:"'readonly' modifier can only appear on a property declaration or index signature.",ReservedArrowTypeParam:"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `<T,>() => ...`.",ReservedTypeAssertion:"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",SetAccesorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccesorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccesorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:({typeParameterName:r})=>`Single type parameter ${r} should have a trailing comma. Example usage: <${r},>.`,StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:"A type-only import can specify a default import or named bindings, but not both.",TypeModifierIsUsedInTypeExports:"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.",TypeModifierIsUsedInTypeImports:"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.",UnexpectedParameterModifier:"A parameter property is only allowed in a constructor implementation.",UnexpectedReadonly:"'readonly' type modifier is only permitted on array and tuple literal types.",GenericsEndWithComma:"Trailing comma is not allowed at the end of generics.",UnexpectedTypeAnnotation:"Did not expect a type annotation here.",UnexpectedTypeCastInParameter:"Unexpected type cast in parameter position.",UnsupportedImportTypeArgument:"Argument in a type import must be a string literal.",UnsupportedParameterPropertyKind:"A parameter property may not be declared using a binding pattern.",UnsupportedSignatureParameterKind:({type:r})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${r}.`,LetInLexicalBinding:"'let' is not allowed to be used as a name in 'let' or 'const' declarations."},pe={UnexpectedLeadingDecorator:"Leading decorators must be attached to a class declaration.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",TrailingDecorator:"Decorators must be attached to a class element.",SpreadElementDecorator:"Decorators can't be used with SpreadElement"};function Wt(r,c,l){let{tokTypes:p}=l,{tokTypes:u}=c;return class extends r{takeDecorators(i){let g=this.decoratorStack[this.decoratorStack.length-1];if(g.length)i.decorators=g,this.resetStartLocationFromNode(i,g[0]),this.decoratorStack[this.decoratorStack.length-1]=[]}parseDecorators(i){let g=this.decoratorStack[this.decoratorStack.length-1];while(this.match(u.at)){let S=this.parseDecorator();g.push(S)}if(this.match(p._export)){if(!i)this.unexpected()}else if(!this.canHaveLeadingDecorator())this.raise(this.start,pe.UnexpectedLeadingDecorator)}parseDecorator(){let i=this.startNode();this.next(),this.decoratorStack.push([]);let g=this.start,S=this.startLoc,P;if(this.match(p.parenL)){let x=this.start,k=this.startLoc;if(this.next(),P=this.parseExpression(),this.expect(p.parenR),this.options.preserveParens){let E=this.startNodeAt(x,k);E.expression=P,P=this.finishNode(E,"ParenthesizedExpression")}}else{P=this.parseIdent(!1);while(this.eat(p.dot)){let x=this.startNodeAt(g,S);x.object=P,x.property=this.parseIdent(!0),x.computed=!1,P=this.finishNode(x,"MemberExpression")}}return i.expression=this.parseMaybeDecoratorArguments(P),this.decoratorStack.pop(),this.finishNode(i,"Decorator")}parseMaybeDecoratorArguments(i){if(this.eat(p.parenL)){let g=this.startNodeAtNode(i);return g.callee=i,g.arguments=this.parseExprList(p.parenR,!1),this.finishNode(g,"CallExpression")}return i}}}var Ht={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"},Gt=/^[\da-fA-F]+$/,Kt=/^\d+$/;function ne(r){if(!r)return r;if(r.type==="JSXIdentifier")return r.name;if(r.type==="JSXNamespacedName")return r.namespace.name+":"+r.name.name;if(r.type==="JSXMemberExpression")return ne(r.object)+"."+ne(r.property)}function zt(r,c,l,p){let u=r.tokTypes,m=c.tokTypes,{isNewLine:i,isIdentifierChar:g}=r,S=Object.assign({allowNamespaces:!0,allowNamespacedObjects:!0},p||{});return class extends l{jsx_readToken(){let x="",k=this.pos;for(;;){if(this.pos>=this.input.length)this.raise(this.start,"Unterminated JSX contents");let E=this.input.charCodeAt(this.pos);switch(E){case 60:case 123:if(this.pos===this.start){if(E===60&&this.exprAllowed)return++this.pos,this.finishToken(m.jsxTagStart);return this.getTokenFromCode(E)}return x+=this.input.slice(k,this.pos),this.finishToken(m.jsxText,x);case 38:x+=this.input.slice(k,this.pos),x+=this.jsx_readEntity(),k=this.pos;break;case 62:case 125:this.raise(this.pos,"Unexpected token `"+this.input[this.pos]+"`. Did you mean `"+(E===62?">":"}")+'` or `{"'+this.input[this.pos]+'"}`?');default:if(i(E))x+=this.input.slice(k,this.pos),x+=this.jsx_readNewLine(!0),k=this.pos;else++this.pos}}}jsx_readNewLine(x){let k=this.input.charCodeAt(this.pos),E;if(++this.pos,k===13&&this.input.charCodeAt(this.pos)===10)++this.pos,E=x?`
|
|
2
|
+
`:`\r
|
|
3
|
+
`;else E=String.fromCharCode(k);if(this.options.locations)++this.curLine,this.lineStart=this.pos;return E}jsx_readString(x){let k="",E=++this.pos;for(;;){if(this.pos>=this.input.length)this.raise(this.start,"Unterminated string constant");let A=this.input.charCodeAt(this.pos);if(A===x)break;if(A===38)k+=this.input.slice(E,this.pos),k+=this.jsx_readEntity(),E=this.pos;else if(i(A))k+=this.input.slice(E,this.pos),k+=this.jsx_readNewLine(!1),E=this.pos;else++this.pos}return k+=this.input.slice(E,this.pos++),this.finishToken(u.string,k)}jsx_readEntity(){let x="",k=0,E,A=this.input[this.pos];if(A!=="&")this.raise(this.pos,"Entity must start with an ampersand");let _=++this.pos;while(this.pos<this.input.length&&k++<10){if(A=this.input[this.pos++],A===";"){if(x[0]==="#"){if(x[1]==="x"){if(x=x.substr(2),Gt.test(x))E=String.fromCharCode(parseInt(x,16))}else if(x=x.substr(1),Kt.test(x))E=String.fromCharCode(parseInt(x,10))}else E=Ht[x];break}x+=A}if(!E)return this.pos=_,"&";return E}jsx_readWord(){let x,k=this.pos;do x=this.input.charCodeAt(++this.pos);while(g(x)||x===45);return this.finishToken(m.jsxName,this.input.slice(k,this.pos))}jsx_parseIdentifier(){let x=this.startNode();if(this.type===m.jsxName)x.name=this.value;else if(this.type.keyword)x.name=this.type.keyword;else this.unexpected();return this.next(),this.finishNode(x,"JSXIdentifier")}jsx_parseNamespacedName(){let x=this.start,k=this.startLoc,E=this.jsx_parseIdentifier();if(!S.allowNamespaces||!this.eat(u.colon))return E;var A=this.startNodeAt(x,k);return A.namespace=E,A.name=this.jsx_parseIdentifier(),this.finishNode(A,"JSXNamespacedName")}jsx_parseElementName(){if(this.type===m.jsxTagEnd)return"";let x=this.start,k=this.startLoc,E=this.jsx_parseNamespacedName();if(this.type===u.dot&&E.type==="JSXNamespacedName"&&!S.allowNamespacedObjects)this.unexpected();while(this.eat(u.dot)){let A=this.startNodeAt(x,k);A.object=E,A.property=this.jsx_parseIdentifier(),E=this.finishNode(A,"JSXMemberExpression")}return E}jsx_parseAttributeValue(){switch(this.type){case u.braceL:let x=this.jsx_parseExpressionContainer();if(x.expression.type==="JSXEmptyExpression")this.raise(x.start,"JSX attributes must only be assigned a non-empty expression");return x;case m.jsxTagStart:case u.string:return this.parseExprAtom();default:this.raise(this.start,"JSX value should be either an expression or a quoted JSX text")}}jsx_parseEmptyExpression(){let x=this.startNodeAt(this.lastTokEnd,this.lastTokEndLoc);return this.finishNodeAt(x,"JSXEmptyExpression",this.start,this.startLoc)}jsx_parseExpressionContainer(){let x=this.startNode();return this.next(),x.expression=this.type===u.braceR?this.jsx_parseEmptyExpression():this.parseExpression(),this.expect(u.braceR),this.finishNode(x,"JSXExpressionContainer")}jsx_parseAttribute(){let x=this.startNode();if(this.eat(u.braceL))return this.expect(u.ellipsis),x.argument=this.parseMaybeAssign(),this.expect(u.braceR),this.finishNode(x,"JSXSpreadAttribute");return x.name=this.jsx_parseNamespacedName(),x.value=this.eat(u.eq)?this.jsx_parseAttributeValue():null,this.finishNode(x,"JSXAttribute")}jsx_parseOpeningElementAt(x,k){let E=this.startNodeAt(x,k);E.attributes=[];let A=this.jsx_parseElementName();if(A)E.name=A;while(this.type!==u.slash&&this.type!==m.jsxTagEnd)E.attributes.push(this.jsx_parseAttribute());return E.selfClosing=this.eat(u.slash),this.expect(m.jsxTagEnd),this.finishNode(E,A?"JSXOpeningElement":"JSXOpeningFragment")}jsx_parseClosingElementAt(x,k){let E=this.startNodeAt(x,k),A=this.jsx_parseElementName();if(A)E.name=A;return this.expect(m.jsxTagEnd),this.finishNode(E,A?"JSXClosingElement":"JSXClosingFragment")}jsx_parseElementAt(x,k){let E=this.startNodeAt(x,k),A=[],_=this.jsx_parseOpeningElementAt(x,k),M=null;if(!_.selfClosing){e:for(;;)switch(this.type){case m.jsxTagStart:if(x=this.start,k=this.startLoc,this.next(),this.eat(u.slash)){M=this.jsx_parseClosingElementAt(x,k);break e}A.push(this.jsx_parseElementAt(x,k));break;case m.jsxText:A.push(this.parseExprAtom());break;case u.braceL:A.push(this.jsx_parseExpressionContainer());break;default:this.unexpected()}if(ne(M.name)!==ne(_.name))this.raise(M.start,"Expected corresponding JSX closing tag for <"+ne(_.name)+">")}let L=_.name?"Element":"Fragment";if(E["opening"+L]=_,E["closing"+L]=M,E.children=A,this.type===u.relational&&this.value==="<")this.raise(this.start,"Adjacent JSX elements must be wrapped in an enclosing tag");return this.finishNode(E,"JSX"+L)}jsx_parseText(){let x=this.parseLiteral(this.value);return x.type="JSXText",x}jsx_parseElement(){let x=this.start,k=this.startLoc;return this.next(),this.jsx_parseElementAt(x,k)}}}function Xt(r,c,l){let{tokTypes:p}=c,{tokTypes:u}=l;return class extends r{parseMaybeImportAttributes(i){if(this.type===u._with||this.type===p.assert){this.next();let g=this.parseImportAttributes();if(g)i.attributes=g}}parseImportAttributes(){this.expect(u.braceL);let i=this.parseWithEntries();return this.expect(u.braceR),i}parseWithEntries(){let i=[],g=new Set;do{if(this.type===u.braceR)break;let S=this.startNode(),P;if(this.type===u.string)P=this.parseLiteral(this.value);else P=this.parseIdent(!0);if(this.next(),S.key=P,g.has(S.key.name))this.raise(this.pos,"Duplicated key in attributes");if(g.add(S.key.name),this.type!==u.string)this.raise(this.pos,"Only string is supported as an attribute value");S.value=this.parseLiteral(this.value),i.push(this.finishNode(S,"ImportAttribute"))}while(this.eat(u.comma));return i}}}var ye=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;function Be(r){if(!r)throw Error("Assert fail")}function $t(r){return r==="accessor"}function Jt(r){return r==="in"||r==="out"}var ce=1,Fe=2,Yt=4,D={SCOPE_TOP:1,SCOPE_FUNCTION:2,SCOPE_ASYNC:4,SCOPE_GENERATOR:8,SCOPE_ARROW:16,SCOPE_SIMPLE_CATCH:32,SCOPE_SUPER:64,SCOPE_DIRECT_SUPER:128,SCOPE_CLASS_STATIC_BLOCK:256,SCOPE_VAR:256,BIND_NONE:0,BIND_VAR:1,BIND_LEXICAL:2,BIND_FUNCTION:3,BIND_SIMPLE_CATCH:4,BIND_OUTSIDE:5,BIND_TS_TYPE:6,BIND_TS_INTERFACE:7,BIND_TS_NAMESPACE:1032,BIND_FLAGS_TS_EXPORT_ONLY:1024,BIND_FLAGS_TS_IMPORT:4096,BIND_FLAGS_TS_ENUM:256,BIND_FLAGS_TS_CONST_ENUM:512,BIND_FLAGS_CLASS:128};function xe(r,c){return D.SCOPE_FUNCTION|(r?D.SCOPE_ASYNC:0)|(c?D.SCOPE_GENERATOR:0)}function Qt(r){if(r.type!=="MemberExpression")return!1;let{computed:c,property:l}=r;if(c&&(l.type!=="TemplateLiteral"||l.expressions.length>0))return!1;return ze(r.object)}function ze(r){if(r.type==="Identifier")return!0;if(r.type!=="MemberExpression")return!1;if(r.computed)return!1;return ze(r.object)}function Ue(r){return r==="private"||r==="public"||r==="protected"}function Zt(r){return Boolean(r.startsExpr)}function er(r){if(r==null)throw Error(`Unexpected ${r} value.`);return r}function tr(r){switch(r){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}function Xe(r){let{dts:c=!1}=r||{},l=!!r?.jsx;return function(p){let u=p.acorn||H,m=Ot(u),{tokTypes:i,keywordTypes:g,isIdentifierStart:S,lineBreak:P,isNewLine:x,tokContexts:k,isIdentifierChar:E}=u,{tokTypes:A,tokContexts:_,keywordsRegExp:M,tokenIsLiteralPropertyName:L,tokenIsTemplate:W,tokenIsTSDeclarationStart:Z,tokenIsIdentifier:I,tokenIsKeywordOrIdentifier:U,tokenIsTSTypeOperator:v}=m;function ee(e,s,n=e.length){for(let h=s;h<n;h++){let d=e.charCodeAt(h);if(x(d))return h<n-1&&d===13&&e.charCodeAt(h+1)===10?h+2:h+1}return-1}if(p=Wt(p,m,u),r?.jsx)p=zt(u,m,p,typeof r.jsx==="boolean"?{}:r.jsx);p=Xt(p,m,u);class Oe extends p{constructor(e,s,n){super(e,s,n);this.preValue=null,this.preToken=null,this.isLookahead=!1,this.isAmbientContext=!1,this.inAbstractClass=!1,this.inType=!1,this.inDisallowConditionalTypesContext=!1,this.maybeInArrowParameters=!1,this.shouldParseArrowReturnType=void 0,this.shouldParseAsyncArrowReturnType=void 0,this.decoratorStack=[[]],this.importsStack=[[]],this.importOrExportOuterKind=void 0,this.tsParseConstModifier=(h)=>{this.tsParseModifiers({modified:h,allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:C.InvalidModifierOnTypeParameterPositions})},this.ecmaVersion=this.options.ecmaVersion}static get acornTypeScript(){return m}get acornTypeScript(){return m}getTokenFromCodeInType(e){if(e===62)return this.finishOp(i.relational,1);if(e===60)return this.finishOp(i.relational,1);return super.getTokenFromCode(e)}readToken(e){if(!this.inType){let s=this.curContext();if(s===_.tc_expr)return this.jsx_readToken();if(s===_.tc_oTag||s===_.tc_cTag){if(S(e))return this.jsx_readWord();if(e==62)return++this.pos,this.finishToken(A.jsxTagEnd);if((e===34||e===39)&&s==_.tc_oTag)return this.jsx_readString(e)}if(e===60&&this.exprAllowed&&this.input.charCodeAt(this.pos+1)!==33)if(++this.pos,r?.jsx)return this.finishToken(A.jsxTagStart);else return this.finishToken(i.relational,"<")}return super.readToken(e)}getTokenFromCode(e){if(this.inType)return this.getTokenFromCodeInType(e);if(e===64)return++this.pos,this.finishToken(A.at);return super.getTokenFromCode(e)}isAbstractClass(){return this.ts_isContextual(A.abstract)&&this.lookahead().type===i._class}finishNode(e,s){if(e.type!==""&&e.end!==0)return e;return super.finishNode(e,s)}tryParse(e,s=this.cloneCurLookaheadState()){let n={node:null};try{return{node:e((d=null)=>{throw n.node=d,n}),error:null,thrown:!1,aborted:!1,failState:null}}catch(h){let d=this.getCurLookaheadState();if(this.setLookaheadState(s),h instanceof SyntaxError)return{node:null,error:h,thrown:!0,aborted:!1,failState:d};if(h===n)return{node:n.node,error:null,thrown:!1,aborted:!0,failState:d};throw h}}setOptionalParametersError(e,s){e.optionalParametersLoc=s?.loc??this.startLoc}reScan_lt_gt(){if(this.type===i.relational)this.pos-=1,this.readToken_lt_gt(this.fullCharCodeAtPos())}reScan_lt(){let{type:e}=this;if(e===i.bitShift)return this.pos-=2,this.finishOp(i.relational,1),i.relational;return e}resetEndLocation(e,s=this.lastTokEnd,n=this.lastTokEndLoc){if(e.end=s,e.loc.end=n,this.options.ranges)e.range[1]=s}startNodeAtNode(e){return super.startNodeAt(e.start,e.loc.start)}nextTokenStart(){return this.nextTokenStartSince(this.pos)}tsHasSomeModifiers(e,s){return s.some((n)=>{if(Ue(n))return e.accessibility===n;return!!e[n]})}tsIsStartOfStaticBlocks(){return this.isContextual("static")&&this.lookaheadCharCode()===123}tsCheckForInvalidTypeCasts(e){e.forEach((s)=>{if(s?.type==="TSTypeCastExpression")this.raise(s.typeAnnotation.start,C.UnexpectedTypeAnnotation)})}atPossibleAsyncArrow(e){return e.type==="Identifier"&&e.name==="async"&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&e.start===this.potentialArrowAt}tsIsIdentifier(){return I(this.type)}tsTryParseTypeOrTypePredicateAnnotation(){return this.match(i.colon)?this.tsParseTypeOrTypePredicateAnnotation(i.colon):void 0}tsTryParseGenericAsyncArrowFunction(e,s,n){if(!this.tsMatchLeftRelational())return;let h=this.maybeInArrowParameters;this.maybeInArrowParameters=!0;let d=this.tsTryParseAndCatch(()=>{let f=this.startNodeAt(e,s);return f.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(f),f.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(i.arrow),f});if(this.maybeInArrowParameters=h,!d)return;return super.parseArrowExpression(d,null,!0,n)}tsParseTypeArgumentsInExpression(){if(this.reScan_lt()!==i.relational)return;return this.tsParseTypeArguments()}tsInNoContext(e){let s=this.context;this.context=[s[0]];try{return e()}finally{this.context=s}}tsTryParseTypeAnnotation(){return this.match(i.colon)?this.tsParseTypeAnnotation():void 0}isUnparsedContextual(e,s){let n=e+s.length;if(this.input.slice(e,n)===s){let h=this.input.charCodeAt(n);return!(E(h)||(h&64512)===55296)}return!1}isAbstractConstructorSignature(){return this.ts_isContextual(A.abstract)&&this.lookahead().type===i._new}nextTokenStartSince(e){return ye.lastIndex=e,ye.test(this.input)?ye.lastIndex:e}lookaheadCharCode(){return this.input.charCodeAt(this.nextTokenStart())}compareLookaheadState(e,s){for(let n of Object.keys(e))if(e[n]!==s[n])return!1;return!0}createLookaheadState(){this.value=null,this.context=[this.curContext()]}getCurLookaheadState(){return{endLoc:this.endLoc,lastTokEnd:this.lastTokEnd,lastTokStart:this.lastTokStart,lastTokStartLoc:this.lastTokStartLoc,pos:this.pos,value:this.value,type:this.type,start:this.start,end:this.end,context:this.context,startLoc:this.startLoc,lastTokEndLoc:this.lastTokEndLoc,curLine:this.curLine,lineStart:this.lineStart,curPosition:this.curPosition,containsEsc:this.containsEsc}}cloneCurLookaheadState(){return{pos:this.pos,value:this.value,type:this.type,start:this.start,end:this.end,context:this.context&&this.context.slice(),startLoc:this.startLoc,lastTokEndLoc:this.lastTokEndLoc,endLoc:this.endLoc,lastTokEnd:this.lastTokEnd,lastTokStart:this.lastTokStart,lastTokStartLoc:this.lastTokStartLoc,curLine:this.curLine,lineStart:this.lineStart,curPosition:this.curPosition,containsEsc:this.containsEsc}}setLookaheadState(e){this.pos=e.pos,this.value=e.value,this.endLoc=e.endLoc,this.lastTokEnd=e.lastTokEnd,this.lastTokStart=e.lastTokStart,this.lastTokStartLoc=e.lastTokStartLoc,this.type=e.type,this.start=e.start,this.end=e.end,this.context=e.context,this.startLoc=e.startLoc,this.lastTokEndLoc=e.lastTokEndLoc,this.curLine=e.curLine,this.lineStart=e.lineStart,this.curPosition=e.curPosition,this.containsEsc=e.containsEsc}tsLookAhead(e){let s=this.getCurLookaheadState(),n=e();return this.setLookaheadState(s),n}lookahead(e){let s=this.getCurLookaheadState();if(this.createLookaheadState(),this.isLookahead=!0,e!==void 0)for(let h=0;h<e;h++)this.nextToken();else this.nextToken();this.isLookahead=!1;let n=this.getCurLookaheadState();return this.setLookaheadState(s),n}readWord(){let e=this.readWord1(),s=i.name;if(this.keywords.test(e))s=g[e];else if(new RegExp(M).test(e))s=A[e];return this.finishToken(s,e)}skipBlockComment(){let e;if(!this.isLookahead)e=this.options.onComment&&this.curPosition();let s=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(let h,d=s;(h=ee(this.input,d,this.pos))>-1;)++this.curLine,d=this.lineStart=h;if(this.isLookahead)return;if(this.options.onComment)this.options.onComment(!0,this.input.slice(s+2,n),s,this.pos,e,this.curPosition())}skipLineComment(e){let s=this.pos,n;if(!this.isLookahead)n=this.options.onComment&&this.curPosition();let h=this.input.charCodeAt(this.pos+=e);while(this.pos<this.input.length&&!x(h))h=this.input.charCodeAt(++this.pos);if(this.isLookahead)return;if(this.options.onComment)this.options.onComment(!1,this.input.slice(s+e,this.pos),s,this.pos,n,this.curPosition())}finishToken(e,s){if(this.preValue=this.value,this.preToken=this.type,this.end=this.pos,this.options.locations)this.endLoc=this.curPosition();let n=this.type;if(this.type=e,this.value=s,!this.isLookahead)this.updateContext(n)}resetStartLocation(e,s,n){if(e.start=s,e.loc.start=n,this.options.ranges)e.range[0]=s}isLineTerminator(){return this.eat(i.semi)||super.canInsertSemicolon()}hasFollowingLineBreak(){return Me.lastIndex=this.end,Me.test(this.input)}addExtra(e,s,n,h=!0){if(!e)return;let d=e.extra=e.extra||{};if(h)d[s]=n;else Object.defineProperty(d,s,{enumerable:h,value:n})}isLiteralPropertyName(){return L(this.type)}hasPrecedingLineBreak(){return P.test(this.input.slice(this.lastTokEnd,this.start))}createIdentifier(e,s){return e.name=s,this.finishNode(e,"Identifier")}resetStartLocationFromNode(e,s){this.resetStartLocation(e,s.start,s.loc.start)}isThisParam(e){return e.type==="Identifier"&&e.name==="this"}isLookaheadContextual(e){let s=this.nextTokenStart();return this.isUnparsedContextual(s,e)}ts_type_isContextual(e,s){return e===s&&!this.containsEsc}ts_isContextual(e){return this.type===e&&!this.containsEsc}ts_isContextualWithState(e,s){return e.type===s&&!e.containsEsc}isContextualWithState(e,s){return s.type===i.name&&s.value===e&&!s.containsEsc}tsIsStartOfMappedType(){if(this.next(),this.eat(i.plusMin))return this.ts_isContextual(A.readonly);if(this.ts_isContextual(A.readonly))this.next();if(!this.match(i.bracketL))return!1;if(this.next(),!this.tsIsIdentifier())return!1;return this.next(),this.match(i._in)}tsInDisallowConditionalTypesContext(e){let s=this.inDisallowConditionalTypesContext;this.inDisallowConditionalTypesContext=!0;try{return e()}finally{this.inDisallowConditionalTypesContext=s}}tsTryParseType(){return this.tsEatThenParseType(i.colon)}match(e){return this.type===e}matchJsx(e){return this.type===m.tokTypes[e]}ts_eatWithState(e,s,n){let h=n.type;if(e===h){for(let d=0;d<s;d++)this.next();return!0}else return!1}ts_eatContextualWithState(e,s,n){if(M.test(e)){if(this.ts_isContextualWithState(n,A[e])){for(let h=0;h<s;h++)this.next();return!0}return!1}else{if(!this.isContextualWithState(e,n))return!1;for(let h=0;h<s;h++)this.next();return!0}}canHaveLeadingDecorator(){return this.match(i._class)||this.isAbstractClass()}eatContextual(e){if(M.test(e)){if(this.ts_isContextual(A[e]))return this.next(),!0;return!1}else return super.eatContextual(e)}tsIsExternalModuleReference(){return this.isContextual("require")&&this.lookaheadCharCode()===40}tsParseExternalModuleReference(){let e=this.startNode();if(this.expectContextual("require"),this.expect(i.parenL),!this.match(i.string))this.unexpected();return e.expression=this.parseExprAtom(),this.expect(i.parenR),this.finishNode(e,"TSExternalModuleReference")}tsParseEntityName(e=!0){let s=this.parseIdent(e);while(this.eat(i.dot)){let n=this.startNodeAtNode(s);n.left=s,n.right=this.parseIdent(e),s=this.finishNode(n,"TSQualifiedName")}return s}tsParseEnumMember(){let e=this.startNode();if(e.id=this.match(i.string)?this.parseLiteral(this.value):this.parseIdent(!0),this.eat(i.eq))e.initializer=this.parseMaybeAssign();return this.finishNode(e,"TSEnumMember")}tsParseEnumDeclaration(e,s={}){if(s.const)e.const=!0;if(s.declare)e.declare=!0;return this.expectContextual("enum"),e.id=this.parseIdent(),this.checkLValSimple(e.id),this.expect(i.braceL),e.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(i.braceR),this.finishNode(e,"TSEnumDeclaration")}tsParseModuleBlock(){let e=this.startNode();this.enterScope(Rt),this.expect(i.braceL),e.body=[];while(this.type!==i.braceR){let s=this.parseStatement(null,!0);e.body.push(s)}return this.next(),super.exitScope(),this.finishNode(e,"TSModuleBlock")}tsParseAmbientExternalModuleDeclaration(e){if(this.ts_isContextual(A.global))e.global=!0,e.id=this.parseIdent();else if(this.match(i.string))e.id=this.parseLiteral(this.value);else this.unexpected();if(this.match(i.braceL))this.enterScope(ie),e.body=this.tsParseModuleBlock(),super.exitScope();else super.semicolon();return this.finishNode(e,"TSModuleDeclaration")}tsTryParseDeclare(e){if(this.isLineTerminator())return;let s=this.type,n;if(this.isContextual("let"))s=i._var,n="let";return this.tsInAmbientContext(()=>{if(s===i._function)return e.declare=!0,this.parseFunctionStatement(e,!1,!0);if(s===i._class)return e.declare=!0,this.parseClass(e,!0);if(s===A.enum)return this.tsParseEnumDeclaration(e,{declare:!0});if(s===A.global)return this.tsParseAmbientExternalModuleDeclaration(e);if(s===i._const||s===i._var){if(!this.match(i._const)||!this.isLookaheadContextual("enum"))return e.declare=!0,this.parseVarStatement(e,n||this.value,!0);return this.expect(i._const),this.tsParseEnumDeclaration(e,{const:!0,declare:!0})}if(s===A.interface){let h=this.tsParseInterfaceDeclaration(e,{declare:!0});if(h)return h}if(I(s))return this.tsParseDeclaration(e,this.value,!0)})}tsIsListTerminator(e){switch(e){case"EnumMembers":case"TypeMembers":return this.match(i.braceR);case"HeritageClauseElement":return this.match(i.braceL);case"TupleElementTypes":return this.match(i.bracketR);case"TypeParametersOrArguments":return this.tsMatchRightRelational()}}tsParseDelimitedListWorker(e,s,n,h){let d=[],f=-1;for(;;){if(this.tsIsListTerminator(e))break;f=-1;let y=s();if(y==null)return;if(d.push(y),this.eat(i.comma)){f=this.lastTokStart;continue}if(this.tsIsListTerminator(e))break;if(n)this.expect(i.comma);return}if(h)h.value=f;return d}tsParseDelimitedList(e,s,n){return er(this.tsParseDelimitedListWorker(e,s,!0,n))}tsParseBracketedList(e,s,n,h,d){if(!h)if(n)this.expect(i.bracketL);else this.expect(i.relational);let f=this.tsParseDelimitedList(e,s,d);if(n)this.expect(i.bracketR);else this.expect(i.relational);return f}tsParseTypeParameterName(){return this.parseIdent().name}tsEatThenParseType(e){return!this.match(e)?void 0:this.tsNextThenParseType()}tsExpectThenParseType(e){return this.tsDoThenParseType(()=>this.expect(e))}tsNextThenParseType(){return this.tsDoThenParseType(()=>this.next())}tsDoThenParseType(e){return this.tsInType(()=>(e(),this.tsParseType()))}tsSkipParameterStart(){if(I(this.type)||this.match(i._this))return this.next(),!0;if(this.match(i.braceL))try{return this.parseObj(!0),!0}catch{return!1}if(this.match(i.bracketL)){this.next();try{return this.parseBindingList(i.bracketR,!0,!0),!0}catch{return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){if(this.next(),this.match(i.parenR)||this.match(i.ellipsis))return!0;if(this.tsSkipParameterStart()){if(this.match(i.colon)||this.match(i.comma)||this.match(i.question)||this.match(i.eq))return!0;if(this.match(i.parenR)){if(this.next(),this.match(i.arrow))return!0}}return!1}tsIsStartOfFunctionType(){if(this.tsMatchLeftRelational())return!0;return this.match(i.parenL)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsInAllowConditionalTypesContext(e){let s=this.inDisallowConditionalTypesContext;this.inDisallowConditionalTypesContext=!1;try{return e()}finally{this.inDisallowConditionalTypesContext=s}}tsParseBindingListForSignature(){return super.parseBindingList(i.parenR,!0,!0).map((e)=>{if(e.type!=="Identifier"&&e.type!=="RestElement"&&e.type!=="ObjectPattern"&&e.type!=="ArrayPattern")this.raise(e.start,C.UnsupportedSignatureParameterKind({type:e.type}));return e})}tsParseTypePredicateAsserts(){if(this.type!==A.asserts)return!1;let e=this.containsEsc;if(this.next(),!I(this.type)&&!this.match(i._this))return!1;if(e)this.raise(this.lastTokStart,"Escape sequence in keyword asserts");return!0}tsParseThisTypeNode(){let e=this.startNode();return this.next(),this.finishNode(e,"TSThisType")}tsParseTypeAnnotation(e=!0,s=this.startNode()){return this.tsInType(()=>{if(e)this.expect(i.colon);s.typeAnnotation=this.tsParseType()}),this.finishNode(s,"TSTypeAnnotation")}tsParseThisTypePredicate(e){this.next();let s=this.startNodeAtNode(e);return s.parameterName=e,s.typeAnnotation=this.tsParseTypeAnnotation(!1),s.asserts=!1,this.finishNode(s,"TSTypePredicate")}tsParseThisTypeOrThisTypePredicate(){let e=this.tsParseThisTypeNode();if(this.isContextual("is")&&!this.hasPrecedingLineBreak())return this.tsParseThisTypePredicate(e);else return e}tsParseTypePredicatePrefix(){let e=this.parseIdent();if(this.isContextual("is")&&!this.hasPrecedingLineBreak())return this.next(),e}tsParseTypeOrTypePredicateAnnotation(e){return this.tsInType(()=>{let s=this.startNode();this.expect(e);let n=this.startNode(),h=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(h&&this.match(i._this)){let y=this.tsParseThisTypeOrThisTypePredicate();if(y.type==="TSThisType")n.parameterName=y,n.asserts=!0,n.typeAnnotation=null,y=this.finishNode(n,"TSTypePredicate");else this.resetStartLocationFromNode(y,n),y.asserts=!0;return s.typeAnnotation=y,this.finishNode(s,"TSTypeAnnotation")}let d=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!d){if(!h)return this.tsParseTypeAnnotation(!1,s);return n.parameterName=this.parseIdent(),n.asserts=h,n.typeAnnotation=null,s.typeAnnotation=this.finishNode(n,"TSTypePredicate"),this.finishNode(s,"TSTypeAnnotation")}let f=this.tsParseTypeAnnotation(!1);return n.parameterName=d,n.typeAnnotation=f,n.asserts=h,s.typeAnnotation=this.finishNode(n,"TSTypePredicate"),this.finishNode(s,"TSTypeAnnotation")})}tsFillSignature(e,s){let n=e===i.arrow,h="parameters",d="typeAnnotation";if(s.typeParameters=this.tsTryParseTypeParameters(),this.expect(i.parenL),s.parameters=this.tsParseBindingListForSignature(),n)s.typeAnnotation=this.tsParseTypeOrTypePredicateAnnotation(e);else if(this.match(e))s.typeAnnotation=this.tsParseTypeOrTypePredicateAnnotation(e)}tsTryNextParseConstantContext(){if(this.lookahead().type!==i._const)return null;this.next();let e=this.tsParseTypeReference();if(e.typeParameters||e.typeArguments)this.raise(e.typeName.start,C.CannotFindName({name:"const"}));return e}tsParseFunctionOrConstructorType(e,s){let n=this.startNode();if(e==="TSConstructorType"){if(n.abstract=!!s,s)this.next();this.next()}return this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(i.arrow,n)),this.finishNode(n,e)}tsParseUnionOrIntersectionType(e,s,n){let h=this.startNode(),d=this.eat(n),f=[];do f.push(s());while(this.eat(n));if(f.length===1&&!d)return f[0];return h.types=f,this.finishNode(h,e)}tsCheckTypeAnnotationForReadOnly(e){switch(e.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(e.start,C.UnexpectedReadonly)}}tsParseTypeOperator(){let e=this.startNode(),s=this.value;if(this.next(),e.operator=s,e.typeAnnotation=this.tsParseTypeOperatorOrHigher(),s==="readonly")this.tsCheckTypeAnnotationForReadOnly(e);return this.finishNode(e,"TSTypeOperator")}tsParseConstraintForInferType(){if(this.eat(i._extends)){let e=this.tsInDisallowConditionalTypesContext(()=>this.tsParseType());if(this.inDisallowConditionalTypesContext||!this.match(i.question))return e}}tsParseInferType(){let e=this.startNode();this.expectContextual("infer");let s=this.startNode();return s.name=this.tsParseTypeParameterName(),s.constraint=this.tsTryParse(()=>this.tsParseConstraintForInferType()),e.typeParameter=this.finishNode(s,"TSTypeParameter"),this.finishNode(e,"TSInferType")}tsParseLiteralTypeNode(){let e=this.startNode();return e.literal=(()=>{switch(this.type){case i.num:case i.string:case i._true:case i._false:return this.parseExprAtom();default:this.unexpected()}})(),this.finishNode(e,"TSLiteralType")}tsParseImportType(){let e=this.startNode();if(this.expect(i._import),this.expect(i.parenL),!this.match(i.string))this.raise(this.start,C.UnsupportedImportTypeArgument);if(e.argument=this.parseExprAtom(),this.expect(i.parenR),this.eat(i.dot))e.qualifier=this.tsParseEntityName();if(this.tsMatchLeftRelational())e.typeArguments=this.tsParseTypeArguments();return this.finishNode(e,"TSImportType")}tsParseTypeQuery(){let e=this.startNode();if(this.expect(i._typeof),this.match(i._import))e.exprName=this.tsParseImportType();else e.exprName=this.tsParseEntityName();if(!this.hasPrecedingLineBreak()&&this.tsMatchLeftRelational())e.typeArguments=this.tsParseTypeArguments();return this.finishNode(e,"TSTypeQuery")}tsParseMappedTypeParameter(){let e=this.startNode();return e.name=this.tsParseTypeParameterName(),e.constraint=this.tsExpectThenParseType(i._in),this.finishNode(e,"TSTypeParameter")}tsParseMappedType(){let e=this.startNode();if(this.expect(i.braceL),this.match(i.plusMin))e.readonly=this.value,this.next(),this.expectContextual("readonly");else if(this.eatContextual("readonly"))e.readonly=!0;if(this.expect(i.bracketL),e.typeParameter=this.tsParseMappedTypeParameter(),e.nameType=this.eatContextual("as")?this.tsParseType():null,this.expect(i.bracketR),this.match(i.plusMin))e.optional=this.value,this.next(),this.expect(i.question);else if(this.eat(i.question))e.optional=!0;return e.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(i.braceR),this.finishNode(e,"TSMappedType")}tsParseTypeLiteral(){let e=this.startNode();return e.members=this.tsParseObjectTypeMembers(),this.finishNode(e,"TSTypeLiteral")}tsParseTupleElementType(){let e=this.startLoc,s=this.start,n=this.eat(i.ellipsis),h=this.tsParseType(),d=this.eat(i.question);if(this.eat(i.colon)){let y=this.startNodeAtNode(h);if(y.optional=d,h.type==="TSTypeReference"&&!h.typeArguments&&h.typeName.type==="Identifier")y.label=h.typeName;else this.raise(h.start,C.InvalidTupleMemberLabel),y.label=h;y.elementType=this.tsParseType(),h=this.finishNode(y,"TSNamedTupleMember")}else if(d){let y=this.startNodeAtNode(h);y.typeAnnotation=h,h=this.finishNode(y,"TSOptionalType")}if(n){let y=this.startNodeAt(s,e);y.typeAnnotation=h,h=this.finishNode(y,"TSRestType")}return h}tsParseTupleType(){let e=this.startNode();e.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let s=!1;return e.elementTypes.forEach((n)=>{let{type:h}=n;if(s&&h!=="TSRestType"&&h!=="TSOptionalType"&&!(h==="TSNamedTupleMember"&&n.optional))this.raise(n.start,C.OptionalTypeBeforeRequired);if(s||=h==="TSNamedTupleMember"&&n.optional||h==="TSOptionalType",h==="TSRestType")n=n.typeAnnotation}),this.finishNode(e,"TSTupleType")}tsParseTemplateLiteralType(){let e=this.startNode();return e.literal=this.parseTemplate({isTagged:!1}),this.finishNode(e,"TSLiteralType")}tsParseTypeReference(){let e=this.startNode();if(e.typeName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.tsMatchLeftRelational())e.typeArguments=this.tsParseTypeArguments();return this.finishNode(e,"TSTypeReference")}tsMatchLeftRelational(){return this.match(i.relational)&&this.value==="<"}tsMatchRightRelational(){return this.match(i.relational)&&this.value===">"}tsParseParenthesizedType(){let e=this.startNode();return this.expect(i.parenL),e.typeAnnotation=this.tsParseType(),this.expect(i.parenR),this.finishNode(e,"TSParenthesizedType")}tsParseNonArrayType(){switch(this.type){case i.string:case i.num:case i._true:case i._false:return this.tsParseLiteralTypeNode();case i.plusMin:if(this.value==="-"){let e=this.startNode();if(this.lookahead().type!==i.num)this.unexpected();return e.literal=this.parseMaybeUnary(),this.finishNode(e,"TSLiteralType")}break;case i._this:return this.tsParseThisTypeOrThisTypePredicate();case i._typeof:return this.tsParseTypeQuery();case i._import:return this.tsParseImportType();case i.braceL:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case i.bracketL:return this.tsParseTupleType();case i.parenL:return this.tsParseParenthesizedType();case i.backQuote:case i.dollarBraceL:return this.tsParseTemplateLiteralType();default:{let{type:e}=this;if(I(e)||e===i._void||e===i._null){let s=e===i._void?"TSVoidKeyword":e===i._null?"TSNullKeyword":tr(this.value);if(s!==void 0&&this.lookaheadCharCode()!==46){let n=this.startNode();return this.next(),this.finishNode(n,s)}return this.tsParseTypeReference()}}}this.unexpected()}tsParseArrayTypeOrHigher(){let e=this.tsParseNonArrayType();while(!this.hasPrecedingLineBreak()&&this.eat(i.bracketL))if(this.match(i.bracketR)){let s=this.startNodeAtNode(e);s.elementType=e,this.expect(i.bracketR),e=this.finishNode(s,"TSArrayType")}else{let s=this.startNodeAtNode(e);s.objectType=e,s.indexType=this.tsParseType(),this.expect(i.bracketR),e=this.finishNode(s,"TSIndexedAccessType")}return e}tsParseTypeOperatorOrHigher(){return v(this.type)&&!this.containsEsc?this.tsParseTypeOperator():this.isContextual("infer")?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),i.bitwiseAND)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),i.bitwiseOR)}tsParseNonConditionalType(){if(this.tsIsStartOfFunctionType())return this.tsParseFunctionOrConstructorType("TSFunctionType");if(this.match(i._new))return this.tsParseFunctionOrConstructorType("TSConstructorType");else if(this.isAbstractConstructorSignature())return this.tsParseFunctionOrConstructorType("TSConstructorType",!0);return this.tsParseUnionTypeOrHigher()}tsParseType(){Be(this.inType);let e=this.tsParseNonConditionalType();if(this.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(i._extends))return e;let s=this.startNodeAtNode(e);return s.checkType=e,s.extendsType=this.tsInDisallowConditionalTypesContext(()=>this.tsParseNonConditionalType()),this.expect(i.question),s.trueType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.expect(i.colon),s.falseType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.finishNode(s,"TSConditionalType")}tsIsUnambiguouslyIndexSignature(){if(this.next(),I(this.type))return this.next(),this.match(i.colon);return!1}tsInType(e){let s=this.inType;this.inType=!0;try{return e()}finally{this.inType=s}}tsTryParseIndexSignature(e){if(!(this.match(i.bracketL)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))))return;this.expect(i.bracketL);let s=this.parseIdent();s.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(s),this.expect(i.bracketR),e.parameters=[s];let n=this.tsTryParseTypeAnnotation();if(n)e.typeAnnotation=n;return this.tsParseTypeMemberSemicolon(),this.finishNode(e,"TSIndexSignature")}tsParseNoneModifiers(e){this.tsParseModifiers({modified:e,allowedModifiers:[],disallowedModifiers:["in","out"],errorTemplate:C.InvalidModifierOnTypeParameterPositions})}tsParseTypeParameter(e=this.tsParseNoneModifiers.bind(this)){let s=this.startNode();return e(s),s.name=this.tsParseTypeParameterName(),s.constraint=this.tsEatThenParseType(i._extends),s.default=this.tsEatThenParseType(i.eq),this.finishNode(s,"TSTypeParameter")}tsParseTypeParameters(e){let s=this.startNode();if(this.tsMatchLeftRelational()||this.matchJsx("jsxTagStart"))this.next();else this.unexpected();let n={value:-1};if(s.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,e),!1,!0,n),s.params.length===0)this.raise(this.start,C.EmptyTypeParameters);if(n.value!==-1)this.addExtra(s,"trailingComma",n.value);return this.finishNode(s,"TSTypeParameterDeclaration")}tsTryParseTypeParameters(e){if(this.tsMatchLeftRelational())return this.tsParseTypeParameters(e)}tsTryParse(e){let s=this.getCurLookaheadState(),n=e();if(n!==void 0&&n!==!1)return n;else{this.setLookaheadState(s);return}}tsTokenCanFollowModifier(){return(this.match(i.bracketL)||this.match(i.braceL)||this.match(i.star)||this.match(i.ellipsis)||this.match(i.privateId)||this.isLiteralPropertyName())&&!this.hasPrecedingLineBreak()}tsNextTokenCanFollowModifier(){return this.next(!0),this.tsTokenCanFollowModifier()}tsParseModifier(e,s){let n=this.value;if(e.indexOf(n)!==-1&&!this.containsEsc){if(s&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return n}return}tsParseModifiersByMap({modified:e,map:s}){for(let n of Object.keys(s))e[n]=s[n]}tsParseModifiers({modified:e,allowedModifiers:s,disallowedModifiers:n,stopOnStartOfClassStaticBlock:h,errorTemplate:d=C.InvalidModifierOnTypeMember}){let f={},y=(b,T,N,R)=>{if(T===N&&e[R])this.raise(b.column,C.InvalidModifiersOrder({orderedModifiers:[N,R]}))},w=(b,T,N,R)=>{if(e[N]&&T===R||e[R]&&T===N)this.raise(b.column,C.IncompatibleModifiers({modifiers:[N,R]}))};for(;;){let b=this.startLoc,T=this.tsParseModifier(s.concat(n??[]),h);if(!T)break;if(Ue(T))if(e.accessibility)this.raise(this.start,C.DuplicateAccessibilityModifier());else y(b,T,T,"override"),y(b,T,T,"static"),y(b,T,T,"readonly"),y(b,T,T,"accessor"),f.accessibility=T,e.accessibility=T;else if(Jt(T))if(e[T])this.raise(this.start,C.DuplicateModifier({modifier:T}));else y(b,T,"in","out"),f[T]=T,e[T]=!0;else if($t(T))if(e[T])this.raise(this.start,C.DuplicateModifier({modifier:T}));else w(b,T,"accessor","readonly"),w(b,T,"accessor","static"),w(b,T,"accessor","override"),f[T]=T,e[T]=!0;else if(T==="const")if(e[T])this.raise(this.start,C.DuplicateModifier({modifier:T}));else f[T]=T,e[T]=!0;else if(Object.hasOwnProperty.call(e,T))this.raise(this.start,C.DuplicateModifier({modifier:T}));else y(b,T,"static","readonly"),y(b,T,"static","override"),y(b,T,"override","readonly"),y(b,T,"abstract","override"),w(b,T,"declare","override"),w(b,T,"static","abstract"),f[T]=T,e[T]=!0;if(n?.includes(T))this.raise(this.start,d)}return f}tsParseInOutModifiers(e){this.tsParseModifiers({modified:e,allowedModifiers:["in","out"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:C.InvalidModifierOnTypeParameter})}parseMaybeUnary(e,s,n,h){if(!r?.jsx&&this.tsMatchLeftRelational())return this.tsParseTypeAssertion();else return super.parseMaybeUnary(e,s,n,h)}tsParseTypeAssertion(){if(l)this.raise(this.start,C.ReservedTypeAssertion);let e=this.tryParse(()=>{let s=this.startNode(),n=this.tsTryNextParseConstantContext();return s.typeAnnotation=n||this.tsNextThenParseType(),this.expect(i.relational),s.expression=this.parseMaybeUnary(),this.finishNode(s,"TSTypeAssertion")});if(e.error)return this.tsParseTypeParameters(this.tsParseConstModifier);else return e.node}tsParseTypeArguments(){let e=this.startNode();if(e.params=this.tsInType(()=>this.tsInNoContext(()=>(this.expect(i.relational),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))),e.params.length===0)this.raise(this.start,C.EmptyTypeArguments);return this.exprAllowed=!1,this.expect(i.relational),this.finishNode(e,"TSTypeParameterInstantiation")}tsParseHeritageClause(e){let s=this.start,n=this.tsParseDelimitedList("HeritageClauseElement",()=>{let h=this.startNode();if(h.expression=this.tsParseEntityName(),this.tsMatchLeftRelational())h.typeParameters=this.tsParseTypeArguments();return this.finishNode(h,"TSExpressionWithTypeArguments")});if(!n.length)this.raise(s,C.EmptyHeritageClauseType({token:e}));return n}tsParseTypeMemberSemicolon(){if(!this.eat(i.comma)&&!this.isLineTerminator())this.expect(i.semi)}tsTryParseAndCatch(e){let s=this.tryParse((n)=>e()||n());if(s.aborted||!s.node)return;if(s.error)this.setLookaheadState(s.failState);return s.node}tsParseSignatureMember(e,s){return this.tsFillSignature(i.colon,s),this.tsParseTypeMemberSemicolon(),this.finishNode(s,e)}tsParsePropertyOrMethodSignature(e,s){if(this.eat(i.question))e.optional=!0;let n=e;if(this.match(i.parenL)||this.tsMatchLeftRelational()){if(s)this.raise(e.start,C.ReadonlyForMethodSignature);let h=n;if(h.kind&&this.tsMatchLeftRelational())this.raise(this.start,C.AccesorCannotHaveTypeParameters);this.tsFillSignature(i.colon,h),this.tsParseTypeMemberSemicolon();let d="parameters",f="typeAnnotation";if(h.kind==="get"){if(h[d].length>0){if(this.raise(this.start,"A 'get' accesor must not have any formal parameters."),this.isThisParam(h[d][0]))this.raise(this.start,C.AccesorCannotDeclareThisParameter)}}else if(h.kind==="set"){if(h[d].length!==1)this.raise(this.start,"A 'get' accesor must not have any formal parameters.");else{let y=h[d][0];if(this.isThisParam(y))this.raise(this.start,C.AccesorCannotDeclareThisParameter);if(y.type==="Identifier"&&y.optional)this.raise(this.start,C.SetAccesorCannotHaveOptionalParameter);if(y.type==="RestElement")this.raise(this.start,C.SetAccesorCannotHaveRestParameter)}if(h[f])this.raise(h[f].start,C.SetAccesorCannotHaveReturnType)}else h.kind="method";return this.finishNode(h,"TSMethodSignature")}else{let h=n;if(s)h.readonly=!0;let d=this.tsTryParseTypeAnnotation();if(d)h.typeAnnotation=d;return this.tsParseTypeMemberSemicolon(),this.finishNode(h,"TSPropertySignature")}}tsParseTypeMember(){let e=this.startNode();if(this.match(i.parenL)||this.tsMatchLeftRelational())return this.tsParseSignatureMember("TSCallSignatureDeclaration",e);if(this.match(i._new)){let n=this.startNode();if(this.next(),this.match(i.parenL)||this.tsMatchLeftRelational())return this.tsParseSignatureMember("TSConstructSignatureDeclaration",e);else return e.key=this.createIdentifier(n,"new"),this.tsParsePropertyOrMethodSignature(e,!1)}this.tsParseModifiers({modified:e,allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]});let s=this.tsTryParseIndexSignature(e);if(s)return s;if(this.parsePropertyName(e),!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.tsTokenCanFollowModifier())e.kind=e.key.name,this.parsePropertyName(e);return this.tsParsePropertyOrMethodSignature(e,!!e.readonly)}tsParseList(e,s){let n=[];while(!this.tsIsListTerminator(e))n.push(s());return n}tsParseObjectTypeMembers(){this.expect(i.braceL);let e=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(i.braceR),e}tsParseInterfaceDeclaration(e,s={}){if(this.hasFollowingLineBreak())return null;if(this.expectContextual("interface"),s.declare)e.declare=!0;if(I(this.type))e.id=this.parseIdent(),this.checkLValSimple(e.id,D.BIND_TS_INTERFACE);else e.id=null,this.raise(this.start,C.MissingInterfaceName);if(e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers.bind(this)),this.eat(i._extends))e.extends=this.tsParseHeritageClause("extends");let n=this.startNode();return n.body=this.tsParseInterfaceBody(),e.body=this.finishNode(n,"TSInterfaceBody"),this.finishNode(e,"TSInterfaceDeclaration")}tsParseInterfaceBody(){this.expect(i.braceL);let e=this.inType;this.inType=!0;let s=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.inType=e,this.expect(i.braceR),s}tsParseAbstractDeclaration(e){if(this.match(i._class))return e.abstract=!0,this.parseClass(e,!0);else if(this.ts_isContextual(A.interface)){if(!this.hasFollowingLineBreak())return e.abstract=!0,this.tsParseInterfaceDeclaration(e)}else this.unexpected(e.start)}tsIsDeclarationStart(){return Z(this.type)}tsParseExpressionStatement(e,s){switch(s.name){case"declare":{let n=this.tsTryParseDeclare(e);if(n)return n.declare=!0,n;break}case"global":if(this.match(i.braceL)){this.enterScope(ie);let n=e;return n.global=!0,n.id=s,n.body=this.tsParseModuleBlock(),super.exitScope(),this.finishNode(n,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(e,s.name,!1)}}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)}tsIsExportDefaultSpecifier(){let{type:e}=this,s=this.isAsyncFunction(),n=this.isLet();if(I(e)){if(s&&!this.containsEsc||n)return!1;if((e===A.type||e===A.interface)&&!this.containsEsc){let f=this.lookahead();if(I(f.type)&&!this.isContextualWithState("from",f)||f.type===i.braceL)return!1}}else if(!this.match(i._default))return!1;let h=this.nextTokenStart(),d=this.isUnparsedContextual(h,"from");if(this.input.charCodeAt(h)===44||I(this.type)&&d)return!0;if(this.match(i._default)&&d){let f=this.input.charCodeAt(this.nextTokenStartSince(h+4));return f===34||f===39}return!1}tsInAmbientContext(e){let s=this.isAmbientContext;this.isAmbientContext=!0;try{return e()}finally{this.isAmbientContext=s}}tsCheckLineTerminator(e){if(e){if(this.hasFollowingLineBreak())return!1;return this.next(),!0}return!this.isLineTerminator()}tsParseModuleOrNamespaceDeclaration(e,s=!1){if(e.id=this.parseIdent(),!s)this.checkLValSimple(e.id,D.BIND_TS_NAMESPACE);if(this.eat(i.dot)){let n=this.startNode();this.tsParseModuleOrNamespaceDeclaration(n,!0),e.body=n}else this.enterScope(ie),e.body=this.tsParseModuleBlock(),super.exitScope();return this.finishNode(e,"TSModuleDeclaration")}checkLValSimple(e,s=D.BIND_NONE,n){if(e.type==="TSNonNullExpression"||e.type==="TSAsExpression")e=e.expression;return super.checkLValSimple(e,s,n)}tsParseTypeAliasDeclaration(e){return e.id=this.parseIdent(),this.checkLValSimple(e.id,D.BIND_TS_TYPE),e.typeAnnotation=this.tsInType(()=>{if(e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers.bind(this)),this.expect(i.eq),this.ts_isContextual(A.interface)&&this.lookahead().type!==i.dot){let s=this.startNode();return this.next(),this.finishNode(s,"TSIntrinsicKeyword")}return this.tsParseType()}),this.semicolon(),this.finishNode(e,"TSTypeAliasDeclaration")}tsParseDeclaration(e,s,n){switch(s){case"abstract":if(this.tsCheckLineTerminator(n)&&(this.match(i._class)||I(this.type)))return this.tsParseAbstractDeclaration(e);break;case"module":if(this.tsCheckLineTerminator(n)){if(this.match(i.string))return this.tsParseAmbientExternalModuleDeclaration(e);else if(I(this.type))return this.tsParseModuleOrNamespaceDeclaration(e)}break;case"namespace":if(this.tsCheckLineTerminator(n)&&I(this.type))return this.tsParseModuleOrNamespaceDeclaration(e);break;case"type":if(this.tsCheckLineTerminator(n)&&I(this.type))return this.tsParseTypeAliasDeclaration(e);break}}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.value,!0)}tsParseImportEqualsDeclaration(e,s){e.isExport=s||!1,e.id=this.parseIdent(),this.checkLValSimple(e.id,D.BIND_LEXICAL),super.expect(i.eq);let n=this.tsParseModuleReference();if(e.importKind==="type"&&n.type!=="TSExternalModuleReference")this.raise(n.start,C.ImportAliasHasImportType);return e.moduleReference=n,super.semicolon(),this.finishNode(e,"TSImportEqualsDeclaration")}isExportDefaultSpecifier(){if(this.tsIsDeclarationStart())return!1;let{type:e}=this;if(I(e)){if(this.isContextual("async")||this.isContextual("let"))return!1;if((e===A.type||e===A.interface)&&!this.containsEsc){let h=this.lookahead();if(I(h.type)&&!this.isContextualWithState("from",h)||h.type===i.braceL)return!1}}else if(!this.match(i._default))return!1;let s=this.nextTokenStart(),n=this.isUnparsedContextual(s,"from");if(this.input.charCodeAt(s)===44||I(this.type)&&n)return!0;if(this.match(i._default)&&n){let h=this.input.charCodeAt(this.nextTokenStartSince(s+4));return h===34||h===39}return!1}parseTemplate({isTagged:e=!1}={}){let s=this.startNode();this.next(),s.expressions=[];let n=this.parseTemplateElement({isTagged:e});s.quasis=[n];while(!n.tail){if(this.type===i.eof)this.raise(this.pos,"Unterminated template literal");this.expect(i.dollarBraceL),s.expressions.push(this.inType?this.tsParseType():this.parseExpression()),this.expect(i.braceR),s.quasis.push(n=this.parseTemplateElement({isTagged:e}))}return this.next(),this.finishNode(s,"TemplateLiteral")}parseFunction(e,s,n,h,d){if(this.initFunction(e),this.ecmaVersion>=9||this.ecmaVersion>=6&&!h){if(this.type===i.star&&s&Fe)this.unexpected();e.generator=this.eat(i.star)}if(this.ecmaVersion>=8)e.async=!!h;if(s&ce)e.id=s&Yt&&this.type!==i.name?null:this.parseIdent();let f=this.yieldPos,y=this.awaitPos,w=this.awaitIdentPos,b=this.maybeInArrowParameters;if(this.maybeInArrowParameters=!1,this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(xe(e.async,e.generator)),!(s&ce))e.id=this.type===i.name?this.parseIdent():null;this.parseFunctionParams(e);let T=s&ce;if(this.parseFunctionBody(e,n,!1,d,{isFunctionDeclaration:T}),this.yieldPos=f,this.awaitPos=y,this.awaitIdentPos=w,s&ce&&e.id&&!(s&Fe))if(e.body)this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?D.BIND_VAR:D.BIND_LEXICAL:D.BIND_FUNCTION);else this.checkLValSimple(e.id,D.BIND_NONE);return this.maybeInArrowParameters=b,this.finishNode(e,T?"FunctionDeclaration":"FunctionExpression")}parseFunctionBody(e,s=!1,n=!1,h=!1,d){if(this.match(i.colon))e.returnType=this.tsParseTypeOrTypePredicateAnnotation(i.colon);let f=d?.isFunctionDeclaration?"TSDeclareFunction":d?.isClassMethod?"TSDeclareMethod":void 0;if(f&&!this.match(i.braceL)&&this.isLineTerminator())return this.exitScope(),this.finishNode(e,f);if(f==="TSDeclareFunction"&&this.isAmbientContext){if(this.raise(e.start,C.DeclareFunctionHasImplementation),e.declare)return super.parseFunctionBody(e,s,n,!1),this.finishNode(e,f)}return super.parseFunctionBody(e,s,n,h),e}parseNew(){if(this.containsEsc)this.raiseRecoverable(this.start,"Escape sequence in keyword new");let e=this.startNode(),s=this.parseIdent(!0);if(this.ecmaVersion>=6&&this.eat(i.dot)){e.meta=s;let y=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(y)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")}let n=this.start,h=this.startLoc,d=this.type===i._import;if(e.callee=this.parseSubscripts(this.parseExprAtom(),n,h,!0,!1),d&&e.callee.type==="ImportExpression")this.raise(n,"Cannot use new with import()");let{callee:f}=e;if(f.type==="TSInstantiationExpression"&&!f.extra?.parenthesized)e.typeArguments=f.typeArguments,e.callee=f.expression;if(this.eat(i.parenL))e.arguments=this.parseExprList(i.parenR,this.ecmaVersion>=8,!1);else e.arguments=[];return this.finishNode(e,"NewExpression")}parseExprOp(e,s,n,h,d){if(i._in.binop>h&&!this.hasPrecedingLineBreak()){let f;if(this.isContextual("as"))f="TSAsExpression";if(this.isContextual("satisfies"))f="TSSatisfiesExpression";if(f){let y=this.startNodeAt(s,n);y.expression=e;let w=this.tsTryNextParseConstantContext();if(w)y.typeAnnotation=w;else y.typeAnnotation=this.tsNextThenParseType();return this.finishNode(y,f),this.reScan_lt_gt(),this.parseExprOp(y,s,n,h,d)}}return super.parseExprOp(e,s,n,h,d)}parseImportSpecifiers(){let e=[],s=!0;if(m.tokenIsIdentifier(this.type)){if(e.push(this.parseImportDefaultSpecifier()),!this.eat(i.comma))return e}if(this.type===i.star)return e.push(this.parseImportNamespaceSpecifier()),e;this.expect(i.braceL);while(!this.eat(i.braceR)){if(!s){if(this.expect(i.comma),this.afterTrailingComma(i.braceR))break}else s=!1;e.push(this.parseImportSpecifier())}return e}parseImport(e){let s=this.lookahead();if(e.importKind="value",this.importOrExportOuterKind="value",I(s.type)||this.match(i.star)||this.match(i.braceL)){let n=this.lookahead(2);if(n.type!==i.comma&&!this.isContextualWithState("from",n)&&n.type!==i.eq&&this.ts_eatContextualWithState("type",1,s))this.importOrExportOuterKind="type",e.importKind="type",s=this.lookahead(),n=this.lookahead(2);if(I(s.type)&&n.type===i.eq){this.next();let h=this.tsParseImportEqualsDeclaration(e);return this.importOrExportOuterKind="value",h}}if(this.next(),this.type===i.string)e.specifiers=[],e.source=this.parseExprAtom();else e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===i.string?this.parseExprAtom():this.unexpected();if(this.parseMaybeImportAttributes(e),this.semicolon(),this.finishNode(e,"ImportDeclaration"),this.importOrExportOuterKind="value",e.importKind==="type"&&e.specifiers.length>1&&e.specifiers[0].type==="ImportDefaultSpecifier")this.raise(e.start,C.TypeImportCannotSpecifyDefaultAndNamed);return e}parseExportDefaultDeclaration(){if(this.isAbstractClass()){let e=this.startNode();return this.next(),e.abstract=!0,this.parseClass(e,!0)}if(this.match(A.interface)){let e=this.tsParseInterfaceDeclaration(this.startNode());if(e)return e}return super.parseExportDefaultDeclaration()}parseExportAllDeclaration(e,s){if(this.ecmaVersion>=11)if(this.eatContextual("as"))e.exported=this.parseModuleExportName(),this.checkExport(s,e.exported,this.lastTokStart);else e.exported=null;if(this.expectContextual("from"),this.type!==i.string)this.unexpected();return e.source=this.parseExprAtom(),this.parseMaybeImportAttributes(e),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")}parseDynamicImport(e){if(this.next(),e.source=this.parseMaybeAssign(),this.eat(i.comma)){let s=this.parseExpression();e.arguments=[s]}if(!this.eat(i.parenR)){let s=this.start;if(this.eat(i.comma)&&this.eat(i.parenR))this.raiseRecoverable(s,"Trailing comma is not allowed in import()");else this.unexpected(s)}return this.finishNode(e,"ImportExpression")}parseExport(e,s){let n=this.lookahead();if(this.ts_eatWithState(i._import,2,n)){if(this.ts_isContextual(A.type)&&this.lookaheadCharCode()!==61)e.importKind="type",this.importOrExportOuterKind="type",this.next();else e.importKind="value",this.importOrExportOuterKind="value";let h=this.tsParseImportEqualsDeclaration(e,!0);return this.importOrExportOuterKind=void 0,h}else if(this.ts_eatWithState(i.eq,2,n)){let h=e;return h.expression=this.parseExpression(),this.semicolon(),this.importOrExportOuterKind=void 0,this.finishNode(h,"TSExportAssignment")}else if(this.ts_eatContextualWithState("as",2,n)){let h=e;return this.expectContextual("namespace"),h.id=this.parseIdent(),this.semicolon(),this.importOrExportOuterKind=void 0,this.finishNode(h,"TSNamespaceExportDeclaration")}else{let h=this.lookahead(2).type;if(this.ts_isContextualWithState(n,A.type)&&(h===i.braceL||h===i.star))this.next(),this.importOrExportOuterKind="type",e.exportKind="type";else this.importOrExportOuterKind="value",e.exportKind="value";if(this.next(),this.eat(i.star))return this.parseExportAllDeclaration(e,s);if(this.eat(i._default))return this.checkExport(s,"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(s,e.declaration.declarations);else this.checkExport(s,e.declaration.id,e.declaration.id.start);e.specifiers=[],e.source=null}else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(s),this.eatContextual("from")){if(this.type!==i.string)this.unexpected();e.source=this.parseExprAtom(),this.parseMaybeImportAttributes(e)}else{for(let d of e.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`.");e.source=null}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")}}checkExport(e,s,n){if(!e)return;if(typeof s!=="string")s=s.type==="Identifier"?s.name:s.value;e[s]=!0}parseMaybeDefault(e,s,n){let h=super.parseMaybeDefault(e,s,n);if(h.type==="AssignmentPattern"&&h.typeAnnotation&&h.right.start<h.typeAnnotation.start)this.raise(h.typeAnnotation.start,C.TypeAnnotationAfterAssign);return h}typeCastToParameter(e){return e.expression.typeAnnotation=e.typeAnnotation,this.resetEndLocation(e.expression,e.typeAnnotation.end,e.typeAnnotation.loc?.end),e.expression}toAssignableList(e,s){if(!e)e=[];for(let n=0;n<e.length;n++){let h=e[n];if(h?.type==="TSTypeCastExpression")e[n]=this.typeCastToParameter(h)}return super.toAssignableList(e,s)}reportReservedArrowTypeParam(e){if(e.params.length===1&&!e.extra?.trailingComma&&l)this.raise(e.start,C.ReservedArrowTypeParam)}parseExprAtom(e,s,n){if(this.type===A.jsxText)return this.jsx_parseText();else if(this.type===A.jsxTagStart)return this.jsx_parseElement();else if(this.type===A.at)return this.parseDecorators(),this.parseExprAtom();else if(I(this.type)){let h=this.potentialArrowAt===this.start,d=this.start,f=this.startLoc,y=this.containsEsc,w=this.parseIdent(!1);if(this.ecmaVersion>=8&&!y&&w.name==="async"&&!this.canInsertSemicolon()&&this.eat(i._function))return this.overrideContext(k.f_expr),this.parseFunction(this.startNodeAt(d,f),0,!1,!0,s);if(h&&!this.canInsertSemicolon()){if(this.eat(i.arrow))return this.parseArrowExpression(this.startNodeAt(d,f),[w],!1,s);if(this.ecmaVersion>=8&&w.name==="async"&&this.type===i.name&&!y&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc)){if(w=this.parseIdent(!1),this.canInsertSemicolon()||!this.eat(i.arrow))this.unexpected();return this.parseArrowExpression(this.startNodeAt(d,f),[w],!0,s)}}return w}else return super.parseExprAtom(e,s,n)}parseExprAtomDefault(){if(I(this.type)){let e=this.potentialArrowAt===this.start,s=this.containsEsc,n=this.parseIdent();if(!s&&n.name==="async"&&!this.canInsertSemicolon()){let{type:h}=this;if(h===i._function)return this.next(),this.parseFunction(this.startNodeAtNode(n),void 0,!0,!0);else if(I(h))if(this.lookaheadCharCode()===61){let d=this.parseIdent(!1);if(this.canInsertSemicolon()||!this.eat(i.arrow))this.unexpected();return this.parseArrowExpression(this.startNodeAtNode(n),[d],!0)}else return n}if(e&&this.match(i.arrow)&&!this.canInsertSemicolon())return this.next(),this.parseArrowExpression(this.startNodeAtNode(n),[n],!1);return n}else this.unexpected()}parseIdentNode(){let e=this.startNode();if(U(this.type)&&!((this.type.keyword==="class"||this.type.keyword==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46)))e.name=this.value;else return super.parseIdentNode();return e}parseVarStatement(e,s,n=!1){let{isAmbientContext:h}=this;this.next(),super.parseVar(e,!1,s,n||h),this.semicolon();let d=this.finishNode(e,"VariableDeclaration");if(!h)return d;for(let{id:f,init:y}of d.declarations){if(!y)continue;if(s!=="const"||!!f.typeAnnotation)this.raise(y.start,C.InitializerNotAllowedInAmbientContext);else if(y.type!=="StringLiteral"&&y.type!=="BooleanLiteral"&&y.type!=="NumericLiteral"&&y.type!=="BigIntLiteral"&&(y.type!=="TemplateLiteral"||y.expressions.length>0)&&!Qt(y))this.raise(y.start,C.ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference)}return d}parseStatement(e,s,n){if(this.match(A.at))this.parseDecorators(!0);if(this.match(i._const)&&this.isLookaheadContextual("enum")){let h=this.startNode();return this.expect(i._const),this.tsParseEnumDeclaration(h,{const:!0})}if(this.ts_isContextual(A.enum))return this.tsParseEnumDeclaration(this.startNode());if(this.ts_isContextual(A.interface)){let h=this.tsParseInterfaceDeclaration(this.startNode());if(h)return h}return super.parseStatement(e,s,n)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}parsePostMemberNameModifiers(e){if(this.eat(i.question))e.optional=!0;if(e.readonly&&this.match(i.parenL))this.raise(e.start,C.ClassMethodHasReadonly);if(e.declare&&this.match(i.parenL))this.raise(e.start,C.ClassMethodHasDeclare)}parseExpressionStatement(e,s){return(s.type==="Identifier"?this.tsParseExpressionStatement(e,s):void 0)||super.parseExpressionStatement(e,s)}shouldParseExportStatement(){if(this.tsIsDeclarationStart())return!0;if(this.match(A.at))return!0;return super.shouldParseExportStatement()}parseConditional(e,s,n,h,d){if(this.eat(i.question)){let f=this.startNodeAt(s,n);return f.test=e,f.consequent=this.parseMaybeAssign(),this.expect(i.colon),f.alternate=this.parseMaybeAssign(h),this.finishNode(f,"ConditionalExpression")}return e}parseMaybeConditional(e,s){let n=this.start,h=this.startLoc,d=this.parseExprOps(e,s);if(this.checkExpressionErrors(s))return d;if(!this.maybeInArrowParameters||!this.match(i.question))return this.parseConditional(d,n,h,e,s);let f=this.tryParse(()=>this.parseConditional(d,n,h,e,s));if(!f.node){if(f.error)this.setOptionalParametersError(s,f.error);return d}if(f.error)this.setLookaheadState(f.failState);return f.node}parseParenItem(e){let s=this.start,n=this.startLoc;if(e=super.parseParenItem(e),this.eat(i.question))e.optional=!0,this.resetEndLocation(e);if(this.match(i.colon)){let h=this.startNodeAt(s,n);return h.expression=e,h.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(h,"TSTypeCastExpression")}return e}parseExportDeclaration(e){if(!this.isAmbientContext&&this.ts_isContextual(A.declare))return this.tsInAmbientContext(()=>this.parseExportDeclaration(e));let s=this.start,n=this.startLoc,h=this.eatContextual("declare");if(h&&(this.ts_isContextual(A.declare)||!this.shouldParseExportStatement()))this.raise(this.start,C.ExpectedAmbientAfterExportDeclare);let f=I(this.type)&&this.tsTryParseExportDeclaration()||this.parseStatement(null);if(!f)return null;if(f.type==="TSInterfaceDeclaration"||f.type==="TSTypeAliasDeclaration"||h)e.exportKind="type";if(h)this.resetStartLocation(f,s,n),f.declare=!0;return f}parseClassId(e,s){if(!s&&this.isContextual("implements"))return;super.parseClassId(e,s);let n=this.tsTryParseTypeParameters(this.tsParseInOutModifiers.bind(this));if(n)e.typeParameters=n}parseClassPropertyAnnotation(e){if(!e.optional){if(this.value==="!"&&this.eat(i.prefix))e.definite=!0;else if(this.eat(i.question))e.optional=!0}let s=this.tsTryParseTypeAnnotation();if(s)e.typeAnnotation=s}parseClassField(e){if(e.key.type==="PrivateIdentifier"){if(e.abstract)this.raise(e.start,C.PrivateElementHasAbstract);if(e.accessibility)this.raise(e.start,C.PrivateElementHasAccessibility({modifier:e.accessibility}));this.parseClassPropertyAnnotation(e)}else{if(this.parseClassPropertyAnnotation(e),this.isAmbientContext&&!(e.readonly&&!e.typeAnnotation)&&this.match(i.eq))this.raise(this.start,C.DeclareClassFieldHasInitializer);if(e.abstract&&this.match(i.eq)){let{key:n}=e;this.raise(this.start,C.AbstractPropertyHasInitializer({propertyName:n.type==="Identifier"&&!e.computed?n.name:`[${this.input.slice(n.start,n.end)}]`}))}}return super.parseClassField(e)}parseClassMethod(e,s,n,h){let d=e.kind==="constructor",f=e.key.type==="PrivateIdentifier",y=this.tsTryParseTypeParameters(this.tsParseConstModifier);if(f){if(y)e.typeParameters=y;if(e.accessibility)this.raise(e.start,C.PrivateMethodsHasAccessibility({modifier:e.accessibility}))}else if(y&&d)this.raise(y.start,C.ConstructorHasTypeParameters);let{declare:w=!1,kind:b}=e;if(w&&(b==="get"||b==="set"))this.raise(e.start,C.DeclareAccessor({kind:b}));if(y)e.typeParameters=y;let T=e.key;if(e.kind==="constructor"){if(s)this.raise(T.start,"Constructor can't be a generator");if(n)this.raise(T.start,"Constructor can't be an async method")}else if(e.static&&qe(e,"prototype"))this.raise(T.start,"Classes may not have a static property named prototype");let N=e.value=this.parseMethod(s,n,h,!0,e);if(e.kind==="get"&&N.params.length!==0)this.raiseRecoverable(N.start,"getter should have no params");if(e.kind==="set"&&N.params.length!==1)this.raiseRecoverable(N.start,"setter should have exactly one param");if(e.kind==="set"&&N.params[0].type==="RestElement")this.raiseRecoverable(N.params[0].start,"Setter cannot use rest params");return this.finishNode(e,"MethodDefinition")}isClassMethod(){return this.match(i.relational)}parseClassElement(e){if(this.eat(i.semi))return null;let s=this.startNode(),n="",h=!1,d=!1,f="method",y=!1,w=["declare","private","public","protected","accessor","override","abstract","readonly","static"],b=this.tsParseModifiers({modified:s,allowedModifiers:w,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:C.InvalidModifierOnTypeParameterPositions});y=Boolean(b.static);let T=()=>{if(this.tsIsStartOfStaticBlocks()){if(this.next(),this.next(),this.tsHasSomeModifiers(s,w))this.raise(this.start,C.StaticBlockCannotHaveModifier);if(this.ecmaVersion>=13)return super.parseClassStaticBlock(s),s}else{let N=this.tsTryParseIndexSignature(s);if(N){if(s.abstract)this.raise(s.start,C.IndexSignatureHasAbstract);if(s.accessibility)this.raise(s.start,C.IndexSignatureHasAccessibility({modifier:s.accessibility}));if(s.declare)this.raise(s.start,C.IndexSignatureHasDeclare);if(s.override)this.raise(s.start,C.IndexSignatureHasOverride);return N}if(!this.inAbstractClass&&s.abstract)this.raise(s.start,C.NonAbstractClassHasAbstractMethod);if(s.override){if(!e)this.raise(s.start,C.OverrideNotInSubClass)}if(s.static=y,y){if(!(this.isClassElementNameStart()||this.type===i.star))n="static"}if(!n&&this.ecmaVersion>=8&&this.eatContextual("async"))if((this.isClassElementNameStart()||this.type===i.star)&&!this.canInsertSemicolon())d=!0;else n="async";if(!n&&(this.ecmaVersion>=9||!d)&&this.eat(i.star))h=!0;if(!n&&!d&&!h){let R=this.value;if(this.eatContextual("get")||this.eatContextual("set"))if(this.isClassElementNameStart())f=R;else n=R}if(n)s.computed=!1,s.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),s.key.name=n,this.finishNode(s.key,"Identifier");else this.parseClassElementName(s);if(this.parsePostMemberNameModifiers(s),this.isClassMethod()||this.ecmaVersion<13||this.type===i.parenL||f!=="method"||h||d){let R=!s.static&&qe(s,"constructor"),O=R&&e;if(R&&f!=="method")this.raise(s.key.start,"Constructor can't have get/set modifier");s.kind=R?"constructor":f,this.parseClassMethod(s,h,d,O)}else this.parseClassField(s);return s}};if(s.declare)this.tsInAmbientContext(T);else T();return s}isClassElementNameStart(){if(this.tsIsIdentifier())return!0;return super.isClassElementNameStart()}parseClassSuper(e){if(super.parseClassSuper(e),e.superClass&&(this.tsMatchLeftRelational()||this.match(i.bitShift)))e.superTypeParameters=this.tsParseTypeArgumentsInExpression();if(this.eatContextual("implements"))e.implements=this.tsParseHeritageClause("implements")}parseFunctionParams(e){let s=this.tsTryParseTypeParameters(this.tsParseConstModifier);if(s)e.typeParameters=s;super.parseFunctionParams(e)}parseVarId(e,s){if(super.parseVarId(e,s),e.id.type==="Identifier"&&!this.hasPrecedingLineBreak()&&this.value==="!"&&this.eat(i.prefix))e.definite=!0;let n=this.tsTryParseTypeAnnotation();if(n)e.id.typeAnnotation=n,this.resetEndLocation(e.id)}parseArrowExpression(e,s,n,h){if(this.match(i.colon))e.returnType=this.tsParseTypeAnnotation();let d=this.yieldPos,f=this.awaitPos,y=this.awaitIdentPos;this.enterScope(xe(n,!1)|D.SCOPE_ARROW),this.initFunction(e);let w=this.maybeInArrowParameters;if(this.ecmaVersion>=8)e.async=!!n;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.maybeInArrowParameters=!0,e.params=this.toAssignableList(s,!0),this.maybeInArrowParameters=!1,this.parseFunctionBody(e,!0,!1,h),this.yieldPos=d,this.awaitPos=f,this.awaitIdentPos=y,this.maybeInArrowParameters=w,this.finishNode(e,"ArrowFunctionExpression")}parseMaybeAssignOrigin(e,s,n){if(this.isContextual("yield"))if(this.inGenerator)return this.parseYield(e);else this.exprAllowed=!1;let h=!1,d=-1,f=-1,y=-1;if(s)d=s.parenthesizedAssign,f=s.trailingComma,y=s.doubleProto,s.parenthesizedAssign=s.trailingComma=-1;else s=new ae,h=!0;let w=this.start,b=this.startLoc;if(this.type===i.parenL||I(this.type))this.potentialArrowAt=this.start,this.potentialArrowInForAwait=e==="await";let T=this.parseMaybeConditional(e,s);if(n)T=n.call(this,T,w,b);if(this.type.isAssign){let N=this.startNodeAt(w,b);if(N.operator=this.value,this.type===i.eq)T=this.toAssignable(T,!0,s);if(!h)s.parenthesizedAssign=s.trailingComma=s.doubleProto=-1;if(s.shorthandAssign>=T.start)s.shorthandAssign=-1;if(!this.maybeInArrowParameters)if(this.type===i.eq)this.checkLValPattern(T);else this.checkLValSimple(T);if(N.left=T,this.next(),N.right=this.parseMaybeAssign(e),y>-1)s.doubleProto=y;return this.finishNode(N,"AssignmentExpression")}else if(h)this.checkExpressionErrors(s,!0);if(d>-1)s.parenthesizedAssign=d;if(f>-1)s.trailingComma=f;return T}parseMaybeAssign(e,s,n){let h,d,f;if(r?.jsx&&(this.matchJsx("jsxTagStart")||this.tsMatchLeftRelational())){if(h=this.cloneCurLookaheadState(),d=this.tryParse(()=>this.parseMaybeAssignOrigin(e,s,n),h),!d.error)return d.node;let b=this.context,T=b[b.length-1],N=b[b.length-2];if(T===m.tokContexts.tc_oTag&&N===m.tokContexts.tc_expr)b.pop(),b.pop();else if(T===m.tokContexts.tc_oTag||T===m.tokContexts.tc_expr)b.pop()}if(!d?.error&&!this.tsMatchLeftRelational())return this.parseMaybeAssignOrigin(e,s,n);if(!h||this.compareLookaheadState(h,this.getCurLookaheadState()))h=this.cloneCurLookaheadState();let y,w=this.tryParse((b)=>{y=this.tsParseTypeParameters(this.tsParseConstModifier);let T=this.parseMaybeAssignOrigin(e,s,n);if(T.type!=="ArrowFunctionExpression"||T.extra?.parenthesized)b();if(y?.params.length!==0)this.resetStartLocationFromNode(T,y);return T.typeParameters=y,T},h);if(!w.error&&!w.aborted){if(y)this.reportReservedArrowTypeParam(y);return w.node}if(!d){if(Be(!0),f=this.tryParse(()=>this.parseMaybeAssignOrigin(e,s,n),h),!f.error)return f.node}if(d?.node)return this.setLookaheadState(d.failState),d.node;if(w.node){if(this.setLookaheadState(w.failState),y)this.reportReservedArrowTypeParam(y);return w.node}if(f?.node)return this.setLookaheadState(f.failState),f.node;if(d?.thrown)throw d.error;if(w.thrown)throw w.error;if(f?.thrown)throw f.error;throw d?.error||w.error||f?.error}parseAssignableListItem(e){let s=[];while(this.match(A.at))s.push(this.parseDecorator());let n=this.start,h=this.startLoc,d,f=!1,y=!1;if(e!==void 0){let T={};if(this.tsParseModifiers({modified:T,allowedModifiers:["public","private","protected","override","readonly"]}),d=T.accessibility,y=T.override,f=T.readonly,e===!1&&(d||f||y))this.raise(h.column,C.UnexpectedParameterModifier)}let w=this.parseMaybeDefault(n,h);this.parseBindingListItem(w);let b=this.parseMaybeDefault(w.start,w.loc.start,w);if(s.length)b.decorators=s;if(d||f||y){let T=this.startNodeAt(n,h);if(d)T.accessibility=d;if(f)T.readonly=f;if(y)T.override=y;if(b.type!=="Identifier"&&b.type!=="AssignmentPattern")this.raise(T.start,C.UnsupportedParameterPropertyKind);return T.parameter=b,this.finishNode(T,"TSParameterProperty")}return b}checkLValInnerPattern(e,s=D.BIND_NONE,n){switch(e.type){case"TSParameterProperty":this.checkLValInnerPattern(e.parameter,s,n);break;default:{super.checkLValInnerPattern(e,s,n);break}}}parseBindingListItem(e){if(this.eat(i.question)){if(e.type!=="Identifier"&&!this.isAmbientContext&&!this.inType)this.raise(e.start,C.PatternIsOptional);e.optional=!0}let s=this.tsTryParseTypeAnnotation();if(s)e.typeAnnotation=s;return this.resetEndLocation(e),e}isAssignable(e,s){switch(e.type){case"TSTypeCastExpression":return this.isAssignable(e.expression,s);case"TSParameterProperty":return!0;case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":return!0;case"ObjectExpression":{let n=e.properties.length-1;return e.properties.every((h,d)=>h.type!=="ObjectMethod"&&(d===n||h.type!=="SpreadElement")&&this.isAssignable(h))}case"Property":case"ObjectProperty":return this.isAssignable(e.value);case"SpreadElement":return this.isAssignable(e.argument);case"ArrayExpression":return e.elements.every((n)=>n===null||this.isAssignable(n));case"AssignmentExpression":return e.operator==="=";case"ParenthesizedExpression":return this.isAssignable(e.expression);case"MemberExpression":case"OptionalMemberExpression":return!s;default:return!1}}toAssignable(e,s=!1,n=new ae){switch(e.type){case"ParenthesizedExpression":return this.toAssignableParenthesizedExpression(e,s,n);case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":if(s);else this.raise(e.start,C.UnexpectedTypeCastInParameter);return this.toAssignable(e.expression,s,n);case"MemberExpression":break;case"AssignmentExpression":if(!s&&e.left.type==="TSTypeCastExpression")e.left=this.typeCastToParameter(e.left);return super.toAssignable(e,s,n);case"TSTypeCastExpression":return this.typeCastToParameter(e);default:return super.toAssignable(e,s,n)}return e}toAssignableParenthesizedExpression(e,s,n){switch(e.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":return this.toAssignable(e.expression,s,n);default:return super.toAssignable(e,s,n)}}parseBindingAtom(){switch(this.type){case i._this:return this.parseIdent(!0);default:return super.parseBindingAtom()}}shouldParseArrow(e){let s;if(this.match(i.colon))s=e.every((n)=>this.isAssignable(n,!0));else s=!this.canInsertSemicolon();if(s){if(this.match(i.colon)){let n=this.tryParse((h)=>{let d=this.tsParseTypeOrTypePredicateAnnotation(i.colon);if(this.canInsertSemicolon()||!this.match(i.arrow))h();return d});if(n.aborted)return this.shouldParseArrowReturnType=void 0,!1;if(!n.thrown){if(n.error)this.setLookaheadState(n.failState);this.shouldParseArrowReturnType=n.node}}if(!this.match(i.arrow))return this.shouldParseArrowReturnType=void 0,!1;return!0}return this.shouldParseArrowReturnType=void 0,s}parseParenArrowList(e,s,n,h){let d=this.startNodeAt(e,s);return d.returnType=this.shouldParseArrowReturnType,this.shouldParseArrowReturnType=void 0,this.parseArrowExpression(d,n,!1,h)}parseParenAndDistinguishExpression(e,s){let n=this.start,h=this.startLoc,d,f=this.ecmaVersion>=8;if(this.ecmaVersion>=6){let y=this.maybeInArrowParameters;this.maybeInArrowParameters=!0,this.next();let w=this.start,b=this.startLoc,T=[],N=!0,R=!1,O=new ae,K=this.yieldPos,z=this.awaitPos,X;this.yieldPos=0,this.awaitPos=0;while(this.type!==i.parenR)if(N?N=!1:this.expect(i.comma),f&&this.afterTrailingComma(i.parenR,!0)){R=!0;break}else if(this.type===i.ellipsis){if(X=this.start,T.push(this.parseParenItem(this.parseRestBinding())),this.type===i.comma)this.raise(this.start,"Comma is not permitted after the rest element");break}else T.push(this.parseMaybeAssign(s,O,this.parseParenItem));let J=this.lastTokEnd,V=this.lastTokEndLoc;if(this.expect(i.parenR),this.maybeInArrowParameters=y,e&&this.shouldParseArrow(T)&&this.eat(i.arrow))return this.checkPatternErrors(O,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=K,this.awaitPos=z,this.parseParenArrowList(n,h,T,s);if(!T.length||R)this.unexpected(this.lastTokStart);if(X)this.unexpected(X);if(this.checkExpressionErrors(O,!0),this.yieldPos=K||this.yieldPos,this.awaitPos=z||this.awaitPos,T.length>1)d=this.startNodeAt(w,b),d.expressions=T,this.finishNodeAt(d,"SequenceExpression",J,V);else d=T[0]}else d=this.parseParenExpression();if(this.options.preserveParens){let y=this.startNodeAt(n,h);return y.expression=d,this.finishNode(y,"ParenthesizedExpression")}else return d}parseTaggedTemplateExpression(e,s,n,h){let d=this.startNodeAt(s,n);if(d.tag=e,d.quasi=this.parseTemplate({isTagged:!0}),h)this.raise(s,"Tagged Template Literals are not allowed in optionalChain.");return this.finishNode(d,"TaggedTemplateExpression")}shouldParseAsyncArrow(){if(this.match(i.colon)){let e=this.tryParse((s)=>{let n=this.tsParseTypeOrTypePredicateAnnotation(i.colon);if(this.canInsertSemicolon()||!this.match(i.arrow))s();return n});if(e.aborted)return this.shouldParseAsyncArrowReturnType=void 0,!1;if(!e.thrown){if(e.error)this.setLookaheadState(e.failState);return this.shouldParseAsyncArrowReturnType=e.node,!this.canInsertSemicolon()&&this.eat(i.arrow)}}else return!this.canInsertSemicolon()&&this.eat(i.arrow)}parseSubscriptAsyncArrow(e,s,n,h){let d=this.startNodeAt(e,s);return d.returnType=this.shouldParseAsyncArrowReturnType,this.shouldParseAsyncArrowReturnType=void 0,this.parseArrowExpression(d,n,!0,h)}parseExprList(e,s,n,h){let d=[],f=!0;while(!this.eat(e)){if(!f){if(this.expect(i.comma),s&&this.afterTrailingComma(e))break}else f=!1;let y;if(n&&this.type===i.comma)y=null;else if(this.type===i.ellipsis){if(y=this.parseSpread(h),this.maybeInArrowParameters&&this.match(i.colon))y.typeAnnotation=this.tsParseTypeAnnotation();if(h&&this.type===i.comma&&h.trailingComma<0)h.trailingComma=this.start}else y=this.parseMaybeAssign(!1,h,this.parseParenItem);d.push(y)}return d}parseSubscript(e,s,n,h,d,f,y){let w=f;if(!this.hasPrecedingLineBreak()&&this.value==="!"&&this.match(i.prefix)){this.exprAllowed=!1,this.next();let O=this.startNodeAt(s,n);return O.expression=e,e=this.finishNode(O,"TSNonNullExpression"),e}let b=!1;if(this.match(i.questionDot)&&this.lookaheadCharCode()===60){if(h)return e;e.optional=!0,w=b=!0,this.next()}if(this.tsMatchLeftRelational()||this.match(i.bitShift)){let O,K=this.tsTryParseAndCatch(()=>{if(!h&&this.atPossibleAsyncArrow(e)){let V=this.tsTryParseGenericAsyncArrowFunction(s,n,y);if(V)return e=V,e}let z=this.tsParseTypeArgumentsInExpression();if(!z)return e;if(b&&!this.match(i.parenL))return O=this.curPosition(),e;if(W(this.type)||this.type===i.backQuote){let V=this.parseTaggedTemplateExpression(e,s,n,w);return V.typeArguments=z,V}if(!h&&this.eat(i.parenL)){let V=new ae,G=this.startNodeAt(s,n);if(G.callee=e,G.arguments=this.parseExprList(i.parenR,this.ecmaVersion>=8,!1,V),this.tsCheckForInvalidTypeCasts(G.arguments),G.typeArguments=z,w)G.optional=b;return this.checkExpressionErrors(V,!0),e=this.finishNode(G,"CallExpression"),e}let X=this.type;if(this.tsMatchRightRelational()||X===i.bitShift||X!==i.parenL&&Zt(X)&&!this.hasPrecedingLineBreak())return;let J=this.startNodeAt(s,n);return J.expression=e,J.typeArguments=z,this.finishNode(J,"TSInstantiationExpression")});if(O)this.unexpected(O);if(K){if(K.type==="TSInstantiationExpression"&&(this.match(i.dot)||this.match(i.questionDot)&&this.lookaheadCharCode()!==40))this.raise(this.start,C.InvalidPropertyAccessAfterInstantiationExpression);return e=K,e}}let T=this.ecmaVersion>=11,N=T&&this.eat(i.questionDot);if(h&&N)this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");let R=this.eat(i.bracketL);if(R||N&&this.type!==i.parenL&&this.type!==i.backQuote||this.eat(i.dot)){let O=this.startNodeAt(s,n);if(O.object=e,R)O.property=this.parseExpression(),this.expect(i.bracketR);else if(this.type===i.privateId&&e.type!=="Super")O.property=this.parsePrivateIdent();else O.property=this.parseIdent(this.options.allowReserved!=="never");if(O.computed=!!R,T)O.optional=N;e=this.finishNode(O,"MemberExpression")}else if(!h&&this.eat(i.parenL)){let O=this.maybeInArrowParameters;this.maybeInArrowParameters=!0;let K=new ae,z=this.yieldPos,X=this.awaitPos,J=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;let V=this.parseExprList(i.parenR,this.ecmaVersion>=8,!1,K);if(d&&!N&&this.shouldParseAsyncArrow()){if(this.checkPatternErrors(K,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0)this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function");this.yieldPos=z,this.awaitPos=X,this.awaitIdentPos=J,e=this.parseSubscriptAsyncArrow(s,n,V,y)}else{this.checkExpressionErrors(K,!0),this.yieldPos=z||this.yieldPos,this.awaitPos=X||this.awaitPos,this.awaitIdentPos=J||this.awaitIdentPos;let G=this.startNodeAt(s,n);if(G.callee=e,G.arguments=V,T)G.optional=N;e=this.finishNode(G,"CallExpression")}this.maybeInArrowParameters=O}else if(this.type===i.backQuote){if(N||w)this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");let O=this.startNodeAt(s,n);O.tag=e,O.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(O,"TaggedTemplateExpression")}return e}parseGetterSetter(e){e.kind=e.key.name,this.parsePropertyName(e);let s=this.tsTryParseTypeParameters(this.tsParseConstModifier);if(e.value=this.parseMethod(!1),s)e.value.typeParameters=s;let n=e.kind==="get"?0:1,h=e.value.params[0];if(n=h&&this.isThisParam(h)?n+1:n,e.value.params.length!==n){let f=e.value.start;if(e.kind==="get")this.raiseRecoverable(f,"getter should have no params");else this.raiseRecoverable(f,"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")}parsePropertyValue(e,s,n,h,d,f,y,w){if(this.tsMatchLeftRelational()){if(s)this.unexpected();e.kind="init",e.method=!0;let b=this.tsTryParseTypeParameters(this.tsParseConstModifier);if(e.value=this.parseMethod(n,h),b)e.value.typeParameters=b;return}return super.parsePropertyValue(e,s,n,h,d,f,y,w)}parseProperty(e,s){if(!e){let n=[];if(this.match(A.at))while(this.match(A.at))n.push(this.parseDecorator());let h=super.parseProperty(e,s);if(h.type==="SpreadElement"){if(n.length)this.raise(h.start,pe.SpreadElementDecorator)}if(n.length)h.decorators=n,n=[];return h}return super.parseProperty(e,s)}parseCatchClauseParam(){let e=this.parseBindingAtom(),s=e.type==="Identifier";this.enterScope(s?D.SCOPE_SIMPLE_CATCH:0),this.checkLValPattern(e,s?D.BIND_SIMPLE_CATCH:D.BIND_LEXICAL);let n=this.tsTryParseTypeAnnotation();if(n)e.typeAnnotation=n,this.resetEndLocation(e);return this.expect(i.parenR),e}parseClass(e,s){let n=this.inAbstractClass;this.inAbstractClass=!!e.abstract;try{this.next(),this.takeDecorators(e);let h=this.strict;this.strict=!0,this.parseClassId(e,s),this.parseClassSuper(e);let d=this.enterClassBody(),f=this.startNode(),y=!1;f.body=[];let w=[];this.expect(i.braceL);while(this.type!==i.braceR){if(this.match(A.at)){w.push(this.parseDecorator());continue}let b=this.parseClassElement(e.superClass!==null);if(w.length)b.decorators=w,this.resetStartLocationFromNode(b,w[0]),w=[];if(b){if(f.body.push(b),b.type==="MethodDefinition"&&b.kind==="constructor"&&b.value.type==="FunctionExpression"){if(y)this.raiseRecoverable(b.start,"Duplicate constructor in the same class");if(y=!0,b.decorators&&b.decorators.length>0)this.raise(b.start,pe.DecoratorConstructor)}else if(b.key&&b.key.type==="PrivateIdentifier"&&b.value?.type!=="TSDeclareMethod"&&jt(d,b))this.raiseRecoverable(b.key.start,`Identifier '#${b.key.name}' has already been declared`)}}if(this.strict=h,this.next(),w.length)this.raise(this.start,pe.TrailingDecorator);return e.body=this.finishNode(f,"ClassBody"),this.exitClassBody(),this.finishNode(e,s?"ClassDeclaration":"ClassExpression")}finally{this.inAbstractClass=n}}parseClassFunctionParams(){let e=this.tsTryParseTypeParameters(),s=this.parseBindingList(i.parenR,!1,this.ecmaVersion>=8,!0);if(e)s.typeParameters=e;return s}parseMethod(e,s,n,h,d){let f=this.startNode(),y=this.yieldPos,w=this.awaitPos,b=this.awaitIdentPos;if(this.initFunction(f),this.ecmaVersion>=6)f.generator=e;if(this.ecmaVersion>=8)f.async=!!s;if(this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(xe(s,f.generator)|D.SCOPE_SUPER|(n?D.SCOPE_DIRECT_SUPER:0)),this.expect(i.parenL),f.params=this.parseClassFunctionParams(),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(f,!1,!0,!1,{isClassMethod:h}),this.yieldPos=y,this.awaitPos=w,this.awaitIdentPos=b,d&&d.abstract){if(!!f.body){let{key:N}=d;this.raise(d.start,C.AbstractMethodHasImplementation({methodName:N.type==="Identifier"&&!d.computed?N.name:`[${this.input.slice(N.start,N.end)}]`}))}}return this.finishNode(f,"FunctionExpression")}static parse(e,s){if(s.locations===!1)throw Error("You have to enable options.locations while using acorn-typescript");else s.locations=!0;let n=new this(s,e);if(c)n.isAmbientContext=!0;return n.parse()}static parseExpressionAt(e,s,n){if(n.locations===!1)throw Error("You have to enable options.locations while using acorn-typescript");else n.locations=!0;let h=new this(n,e,s);if(c)h.isAmbientContext=!0;return h.nextToken(),h.parseExpression()}parseImportSpecifier(){if(this.ts_isContextual(A.type)){let s=this.startNode();return s.imported=this.parseModuleExportName(),this.parseTypeOnlyImportExportSpecifier(s,!0,this.importOrExportOuterKind==="type"),this.finishNode(s,"ImportSpecifier")}else{let s=super.parseImportSpecifier();return s.importKind="value",s}}parseExportSpecifier(e){let s=this.ts_isContextual(A.type);if(!this.match(i.string)&&s){let h=this.startNode();return h.local=this.parseModuleExportName(),this.parseTypeOnlyImportExportSpecifier(h,!1,this.importOrExportOuterKind==="type"),this.finishNode(h,"ExportSpecifier"),this.checkExport(e,h.exported,h.exported.start),h}else{let h=super.parseExportSpecifier(e);return h.exportKind="value",h}}parseTypeOnlyImportExportSpecifier(e,s,n){let h=s?"imported":"local",d=s?"local":"exported",f=e[h],y,w=!1,b=!0,T=f.start;if(this.isContextual("as")){let R=this.parseIdent();if(this.isContextual("as")){let O=this.parseIdent();if(U(this.type))w=!0,f=R,y=s?this.parseIdent():this.parseModuleExportName(),b=!1;else y=O,b=!1}else if(U(this.type))b=!1,y=s?this.parseIdent():this.parseModuleExportName();else w=!0,f=R}else if(U(this.type))if(w=!0,s){if(f=super.parseIdent(!0),!this.isContextual("as"))this.checkUnreserved(f)}else f=this.parseModuleExportName();if(w&&n)this.raise(T,s?C.TypeModifierIsUsedInTypeImports:C.TypeModifierIsUsedInTypeExports);e[h]=f,e[d]=y;let N=s?"importKind":"exportKind";if(e[N]=w?"type":"value",b&&this.eatContextual("as"))e[d]=s?this.parseIdent():this.parseModuleExportName();if(!e[d])e[d]=this.copyNode(e[h]);if(s)this.checkLValSimple(e[d],D.BIND_LEXICAL)}raiseCommonCheck(e,s,n){switch(s){case"Comma is not permitted after the rest element":if(this.isAmbientContext&&this.match(i.comma)&&this.lookaheadCharCode()===41){this.next();return}else return super.raise(e,s)}return n?super.raiseRecoverable(e,s):super.raise(e,s)}raiseRecoverable(e,s){return this.raiseCommonCheck(e,s,!0)}raise(e,s){return this.raiseCommonCheck(e,s,!0)}updateContext(e){let{type:s}=this;if(s==i.braceL){var n=this.curContext();if(n==_.tc_oTag)this.context.push(k.b_expr);else if(n==_.tc_expr)this.context.push(k.b_tmpl);else super.updateContext(e);this.exprAllowed=!0}else if(s===i.slash&&e===A.jsxTagStart)this.context.length-=2,this.context.push(_.tc_cTag),this.exprAllowed=!1;else return super.updateContext(e)}jsx_parseOpeningElementAt(e,s){let n=this.startNodeAt(e,s),h=this.jsx_parseElementName();if(h)n.name=h;if(this.match(i.relational)||this.match(i.bitShift)){let d=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());if(d)n.typeArguments=d}n.attributes=[];while(this.type!==i.slash&&this.type!==A.jsxTagEnd)n.attributes.push(this.jsx_parseAttribute());return n.selfClosing=this.eat(i.slash),this.expect(A.jsxTagEnd),this.finishNode(n,h?"JSXOpeningElement":"JSXOpeningFragment")}enterScope(e){if(e===ie)this.importsStack.push([]);super.enterScope(e);let s=super.currentScope();s.types=[],s.enums=[],s.constEnums=[],s.classes=[],s.exportOnlyBindings=[]}exitScope(){if(super.currentScope().flags===ie)this.importsStack.pop();super.exitScope()}hasImport(e,s){let n=this.importsStack.length;if(this.importsStack[n-1].indexOf(e)>-1)return!0;if(!s&&n>1){for(let h=0;h<n-1;h++)if(this.importsStack[h].indexOf(e)>-1)return!0}return!1}maybeExportDefined(e,s){if(this.inModule&&e.flags&D.SCOPE_TOP)delete this.undefinedExports[s]}declareName(e,s,n){if(s&D.BIND_FLAGS_TS_IMPORT){if(this.hasImport(e,!0))this.raise(n,`Identifier '${e}' has already been declared.`);this.importsStack[this.importsStack.length-1].push(e);return}let h=this.currentScope();if(s&D.BIND_FLAGS_TS_EXPORT_ONLY){this.maybeExportDefined(h,e),h.exportOnlyBindings.push(e);return}if(s===D.BIND_TS_TYPE||s===D.BIND_TS_INTERFACE){if(s===D.BIND_TS_TYPE&&h.types.includes(e))this.raise(n,`type '${e}' has already been declared.`);h.types.push(e)}else super.declareName(e,s,n);if(s&D.BIND_FLAGS_TS_ENUM)h.enums.push(e);if(s&D.BIND_FLAGS_TS_CONST_ENUM)h.constEnums.push(e);if(s&D.BIND_FLAGS_CLASS)h.classes.push(e)}checkLocalExport(e){let{name:s}=e;if(this.hasImport(s))return;let n=this.scopeStack.length;for(let h=n-1;h>=0;h--){let d=this.scopeStack[h];if(d.types.indexOf(s)>-1||d.exportOnlyBindings.indexOf(s)>-1)return}super.checkLocalExport(e)}}return Oe}}function Je(r,c,l){let p=l._,u=!1;function m(g,{next:S,state:P}){S(P)}function i(g,S,P){if(u)return;if(!g.type)return;let x,k={},E={path:S,state:P,next:(_=P)=>{S.push(g);for(let M in g){if(M==="type")continue;let L=g[M];if(L&&typeof L==="object")if(Array.isArray(L)){let W={},Z=L.length,I=!1;for(let U=0;U<Z;U++){let v=L[U];if(v&&typeof v==="object"){let ee=i(v,S,_);if(ee)W[U]=ee,I=!0}}if(I)k[M]=L.map((U,v)=>W[v]??U)}else{let W=i(L,S,_);if(W)k[M]=W}}if(S.pop(),Object.keys(k).length>0)return $e(g,k)},stop:()=>{u=!0},visit:(_,M=P)=>{S.push(g);let L=i(_,S,M)??_;return S.pop(),L}},A=l[g.type]??m;if(p){let _;if(x=p(g,{...E,next:(M=P)=>(P=M,_=A(g,{...E,state:M}),_)}),!x&&_)x=_}else x=A(g,E);if(!x){if(Object.keys(k).length>0)x=$e(g,k)}if(x)return x}return i(r,[],c)??r}function $e(r,c){let l={},p=Object.getOwnPropertyDescriptors(r);for(let u in p)Object.defineProperty(l,u,p[u]);for(let u in c)l[u]=c[u];return l}var rr=/\n/,sr=/[ \t]/,ir=/^[,) \t]*$/,ue="",Ye=[];function de(r,c){ue=r,Ye=c}function fe(r,c,l,p){let u=c;if(r&&rr.test(u)){let m=l;while(m>0&&ue[m-1]!==`
|
|
4
|
+
`)m-=1;let i=m;while(sr.test(ue[i]))i+=1;let g=ue.slice(m,i);u=ar(u,g)}Ye.push({type:r?"Block":"Line",value:u,start:l,end:p})}function ar(r,c){if(c==="")return r;let l=r.split(`
|
|
5
|
+
`);for(let p=0;p<l.length;p++)if(l[p].startsWith(c))l[p]=l[p].slice(c.length);return l.join(`
|
|
6
|
+
`)}function be(r,c,l,p){let u=nr(l,p);if(u>=l.length)return;Ae(r,void 0,l,{index:u},c)}function nr(r,c){let l=0,p=r.length;while(l<p){let u=l+p>>>1;if(r[u].start<c)l=u+1;else p=u}return l}function Ae(r,c,l,p,u){while(p.index<l.length&&l[p.index].start<(r.start??0))r.leadingComments??=[],r.leadingComments.push(l[p.index]),p.index++;if(p.index>=l.length)return;let m=Object.keys(r);for(let i=0;i<m.length;i++){let g=m[i];if(g==="type"||g==="leadingComments")continue;let S=r[g];if(!S||typeof S!=="object")continue;if(Array.isArray(S)){for(let P of S)if(P&&typeof P==="object"&&typeof P.type==="string"){if(Ae(P,r,l,p,u),p.index>=l.length)return}}else if(typeof S.type==="string"){if(Ae(S,r,l,p,u),p.index>=l.length)return}}if(p.index<l.length){let i=l[p.index];if(c===void 0||r.end!==c.end){let g=u.slice(r.end??0,i.start);if((c?.type==="BlockStatement"||c?.type==="Program")&&ge(c.body,r)||c?.type==="ArrayExpression"&&ge(c.elements,r)||c?.type==="ObjectExpression"&&ge(c.properties,r))while(p.index<l.length){if(c&&l[p.index].start>=(c.end??Number.POSITIVE_INFINITY))break;p.index++}else if((r.end??0)<=i.start&&ir.test(g))p.index++}}}function ge(r,c){return!!r&&r.indexOf(c)===r.length-1}var Qe=t,or=Qe.extend(Xe());function Se(r){return r?or:Qe}var lr={onComment:fe,sourceType:"module",ecmaVersion:16},cr={onComment:fe,sourceType:"module",ecmaVersion:16,preserveParens:!0},pr={onComment:fe,sourceType:"module",ecmaVersion:16};function Ze(r,c,l,p,u){if(l.length===u)return;be(r,c,l,p)}function et(r,c,l){let p=l.length;de(r,l);let u=Se(c).parse(r,lr);if(l.length>0)be(u,r,l,p);return u}var hr={count:0};function se(r,c,l,p){hr.count+=1;let u=p.length;de(r,p);let m=Se(l).parseExpressionAt(r,c,cr);Ze(m,r,p,c,u);let i=p.length>u?p.at(-1):void 0,g=i&&i.end>(m.end??0)?i.end:m.end??0,S=m.end??c;return{node:ur(r,c,S,40)?dr(m):m,end:g}}function ur(r,c,l,p){for(let u=c;u<l;u++)if(r.charCodeAt(u)===p)return!0;return!1}function tt(r,c,l,p){let u=p.length,m=Se(l);de(r,p);let i=new m(pr,r,c);i.nextToken();let g=i.parseStatement(null,!0,Object.create(null));return Ze(g,r,p,c,u),g}function dr(r){return Je(r,null,{ParenthesizedExpression(c,l){return l.visit(c.expression)}})}function te(r){if(r===32||r<=13&&r>=9)return!0;if(r<160)return!1;return r===160||r===5760||r>=8192&&r<=8202||r===8232||r===8233||r===8239||r===8287||r===12288||r===65279}class Ee{source;index=0;constructor(r){this.source=r}match(r){if(r.length===1)return this.source.charCodeAt(this.index)===r.charCodeAt(0);return this.source.startsWith(r,this.index)}matchRegex(r){r.lastIndex=this.index;let c=r.exec(this.source);if(!c||c.index!==this.index)return null;return c[0]}eat(r,c=!1){if(this.match(r))return this.index+=r.length,!0;if(c)throw new Y(`Expected token ${JSON.stringify(r)}`,this.index);return!1}read(r){let c=this.matchRegex(r);if(c)this.index+=c.length;return c}readUntil(r){if(this.index>=this.source.length)throw new Y("Unexpected end of input",this.source.length);let c=this.index;r.lastIndex=c;let l=r.exec(this.source);if(l)return this.index=l.index,this.source.slice(c,this.index);return this.index=this.source.length,this.source.slice(c)}readUntilString(r){if(this.index>=this.source.length)throw new Y("Unexpected end of input",this.source.length);let c=this.source.indexOf(r,this.index),l=c===-1?this.source.length:c,p=this.source.slice(this.index,l);return this.index=l,p}allowWhitespace(){while(this.index<this.source.length&&te(this.source.charCodeAt(this.index)))this.index++}requireWhitespace(){if(!te(this.source.charCodeAt(this.index)))throw new Y("Expected whitespace",this.index);this.allowWhitespace()}readIdentifierName(){let r=this.index,c=r,l="",p=this.source.codePointAt(this.index);if(p!==void 0&&o(p,!0)){c+=p<=65535?1:2;while(c<this.source.length){let u=this.source.codePointAt(c);if(u===void 0||!a(u,!0))break;c+=u<=65535?1:2}l=this.source.slice(r,c),this.index=c}return{type:"Identifier",name:l,start:r,end:c}}}class Y extends Error{position;constructor(r,c){super(`${r} (at index ${c})`);this.name="TemplateSyntaxError",this.position=c}}function F(){return{type:"Fragment",nodes:[]}}var fr=new Set(["await","break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","export","extends","finally","for","function","if","implements","import","in","instanceof","interface","let","new","package","private","protected","public","return","static","super","switch","this","throw","try","typeof","var","void","while","with","yield"]),mr=["&&","||","??"],yr=["===","!==","==","!="];function rt(r,c){let l=r.codePointAt(c);if(l===void 0||!o(l,!0))return c;let p=c+(l<=65535?1:2);while(p<r.length){let u=r.codePointAt(p);if(!a(u,!0))break;p+=u<=65535?1:2}return p}function xr(r,c){let l=c;while(l<r.length){let p=r.charCodeAt(l);if(p<48||p>57)break;l++}return l}function me(r,c){let l=c;while(l<r.length&&te(r.charCodeAt(l)))l++;return l}function st(r,c){let l=xr(r,c);if(l===c)return null;if(r.charCodeAt(c)===48&&l-c>1)return null;if(l<r.length){let u=r.codePointAt(l);if(u===46||a(u,!0))return null}let p=r.slice(c,l);return{type:"Literal",start:c,end:l,value:Number(p),raw:p}}function it(r,c){let l=r.charCodeAt(c),p=c+1;while(p<r.length){let u=r.charCodeAt(p);if(u===l){let m=r.slice(c,p+1);return{type:"Literal",start:c,end:p+1,value:r.slice(c+1,p),raw:m}}if(u===92||u===10||u===13)return null;p++}return null}function Tr(r,c){let l=r.charCodeAt(c);if(l===34||l===39)return it(r,c);let p=rt(r,c);if(p===c)return st(r,c);let u=r.slice(c,p);if(u==="true"||u==="false")return{type:"Literal",start:c,end:p,value:u==="true",raw:u};if(u==="null")return{type:"Literal",start:c,end:p,value:null,raw:u};if(fr.has(u))return null;let m={type:"Identifier",start:c,end:p,name:u},i=p;while(i<r.length){let g=r.charCodeAt(i);if(g===46){let S=i+1,P=rt(r,S);if(P===S)return null;let x={type:"Identifier",start:S,end:P,name:r.slice(S,P)};m={type:"MemberExpression",start:c,end:P,object:m,property:x,computed:!1,optional:!1},i=P}else if(g===91){let S=i+1,P=r.charCodeAt(S),x=P===34||P===39?it(r,S):st(r,S);if(!x||r.charCodeAt(x.end)!==93)return null;m={type:"MemberExpression",start:c,end:x.end+1,object:m,property:x,computed:!0,optional:!1},i=x.end+1}else break}return m}function we(r,c){if(r.charCodeAt(c)!==33||r.charCodeAt(c+1)===61)return Tr(r,c);let l=we(r,me(r,c+1));if(!l)return null;return{type:"UnaryExpression",start:c,end:l.end,operator:"!",prefix:!0,argument:l}}function gr(r,c){for(let l of yr)if(r.startsWith(l,c))return{operator:l,logical:!1};for(let l of mr)if(r.startsWith(l,c))return{operator:l,logical:!0};return null}function at(r,c){let l=me(r,c);if(l>=r.length)return!1;let p=r.charCodeAt(l);return p===125||p===41}function Ar(r){let c=r.source,l=we(c,r.index);if(!l)return null;if(at(c,l.end))return r.index=l.end,l;let p=me(c,l.end),u=gr(c,p);if(!u)return null;let m=we(c,me(c,p+u.operator.length));if(!m||!at(c,m.end))return null;return r.index=m.end,{type:u.logical?"LogicalExpression":"BinaryExpression",start:l.start,end:m.end,left:l,operator:u.operator,right:m}}function B(r){let c=Ar(r);if(c)return c;let{node:l,end:p}=se(r.source,r.index,r.isTypeScript,r.root.comments);return r.index=p,l}var br={"CounterClockwiseContourIntegral;":8755,"ClockwiseContourIntegral;":8754,"DoubleLongLeftRightArrow;":10234,"NotNestedGreaterGreater;":10914,"DiacriticalDoubleAcute;":733,"NotSquareSupersetEqual;":8931,"CloseCurlyDoubleQuote;":8221,"DoubleContourIntegral;":8751,"FilledVerySmallSquare;":9642,"NegativeVeryThinSpace;":8203,"NotPrecedesSlantEqual;":8928,"NotRightTriangleEqual;":8941,"NotSucceedsSlantEqual;":8929,"CapitalDifferentialD;":8517,"DoubleLeftRightArrow;":8660,"DoubleLongRightArrow;":10233,"EmptyVerySmallSquare;":9643,"NestedGreaterGreater;":8811,"NotDoubleVerticalBar;":8742,"NotGreaterSlantEqual;":10878,"NotLeftTriangleEqual;":8940,"NotSquareSubsetEqual;":8930,"OpenCurlyDoubleQuote;":8220,"ReverseUpEquilibrium;":10607,"DoubleLongLeftArrow;":10232,"DownLeftRightVector;":10576,"LeftArrowRightArrow;":8646,"NegativeMediumSpace;":8203,"NotGreaterFullEqual;":8807,"NotRightTriangleBar;":10704,"RightArrowLeftArrow;":8644,"SquareSupersetEqual;":8850,"leftrightsquigarrow;":8621,"DownRightTeeVector;":10591,"DownRightVectorBar;":10583,"LongLeftRightArrow;":10231,"Longleftrightarrow;":10234,"NegativeThickSpace;":8203,"NotLeftTriangleBar;":10703,"PrecedesSlantEqual;":8828,"ReverseEquilibrium;":8651,"RightDoubleBracket;":10215,"RightDownTeeVector;":10589,"RightDownVectorBar;":10581,"RightTriangleEqual;":8885,"SquareIntersection;":8851,"SucceedsSlantEqual;":8829,"blacktriangleright;":9656,"longleftrightarrow;":10231,"DoubleUpDownArrow;":8661,"DoubleVerticalBar;":8741,"DownLeftTeeVector;":10590,"DownLeftVectorBar;":10582,"FilledSmallSquare;":9724,"GreaterSlantEqual;":10878,"LeftDoubleBracket;":10214,"LeftDownTeeVector;":10593,"LeftDownVectorBar;":10585,"LeftTriangleEqual;":8884,"NegativeThinSpace;":8203,"NotGreaterGreater;":8811,"NotLessSlantEqual;":10877,"NotNestedLessLess;":10913,"NotReverseElement;":8716,"NotSquareSuperset;":8848,"NotTildeFullEqual;":8775,"RightAngleBracket;":10217,"RightUpDownVector;":10575,"SquareSubsetEqual;":8849,"VerticalSeparator;":10072,"blacktriangledown;":9662,"blacktriangleleft;":9666,"leftrightharpoons;":8651,"rightleftharpoons;":8652,"twoheadrightarrow;":8608,"DiacriticalAcute;":180,"DiacriticalGrave;":96,"DiacriticalTilde;":732,"DoubleRightArrow;":8658,"DownArrowUpArrow;":8693,"EmptySmallSquare;":9723,"GreaterEqualLess;":8923,"GreaterFullEqual;":8807,"LeftAngleBracket;":10216,"LeftUpDownVector;":10577,"LessEqualGreater;":8922,"NonBreakingSpace;":160,"NotPrecedesEqual;":10927,"NotRightTriangle;":8939,"NotSucceedsEqual;":10928,"NotSucceedsTilde;":8831,"NotSupersetEqual;":8841,"RightTriangleBar;":10704,"RightUpTeeVector;":10588,"RightUpVectorBar;":10580,"UnderParenthesis;":9181,"UpArrowDownArrow;":8645,"circlearrowright;":8635,"downharpoonright;":8642,"ntrianglerighteq;":8941,"rightharpoondown;":8641,"rightrightarrows;":8649,"twoheadleftarrow;":8606,"vartriangleright;":8883,"CloseCurlyQuote;":8217,"ContourIntegral;":8750,"DoubleDownArrow;":8659,"DoubleLeftArrow;":8656,"DownRightVector;":8641,"LeftRightVector;":10574,"LeftTriangleBar;":10703,"LeftUpTeeVector;":10592,"LeftUpVectorBar;":10584,"LowerRightArrow;":8600,"NotGreaterEqual;":8817,"NotGreaterTilde;":8821,"NotHumpDownHump;":8782,"NotLeftTriangle;":8938,"NotSquareSubset;":8847,"OverParenthesis;":9180,"RightDownVector;":8642,"ShortRightArrow;":8594,"UpperRightArrow;":8599,"bigtriangledown;":9661,"circlearrowleft;":8634,"curvearrowright;":8631,"downharpoonleft;":8643,"leftharpoondown;":8637,"leftrightarrows;":8646,"nLeftrightarrow;":8654,"nleftrightarrow;":8622,"ntrianglelefteq;":8940,"rightleftarrows;":8644,"rightsquigarrow;":8605,"rightthreetimes;":8908,"straightepsilon;":1013,"trianglerighteq;":8885,"vartriangleleft;":8882,"DiacriticalDot;":729,"DoubleRightTee;":8872,"DownLeftVector;":8637,"GreaterGreater;":10914,"HorizontalLine;":9472,"InvisibleComma;":8291,"InvisibleTimes;":8290,"LeftDownVector;":8643,"LeftRightArrow;":8596,"Leftrightarrow;":8660,"LessSlantEqual;":10877,"LongRightArrow;":10230,"Longrightarrow;":10233,"LowerLeftArrow;":8601,"NestedLessLess;":8810,"NotGreaterLess;":8825,"NotLessGreater;":8824,"NotSubsetEqual;":8840,"NotVerticalBar;":8740,"OpenCurlyQuote;":8216,"ReverseElement;":8715,"RightTeeVector;":10587,"RightVectorBar;":10579,"ShortDownArrow;":8595,"ShortLeftArrow;":8592,"SquareSuperset;":8848,"TildeFullEqual;":8773,"UpperLeftArrow;":8598,"ZeroWidthSpace;":8203,"curvearrowleft;":8630,"doublebarwedge;":8966,"downdownarrows;":8650,"hookrightarrow;":8618,"leftleftarrows;":8647,"leftrightarrow;":8596,"leftthreetimes;":8907,"longrightarrow;":10230,"looparrowright;":8620,"nshortparallel;":8742,"ntriangleright;":8939,"rightarrowtail;":8611,"rightharpoonup;":8640,"trianglelefteq;":8884,"upharpoonright;":8638,"ApplyFunction;":8289,"DifferentialD;":8518,"DoubleLeftTee;":10980,"DoubleUpArrow;":8657,"LeftTeeVector;":10586,"LeftVectorBar;":10578,"LessFullEqual;":8806,"LongLeftArrow;":10229,"Longleftarrow;":10232,"NotEqualTilde;":8770,"NotTildeEqual;":8772,"NotTildeTilde;":8777,"Poincareplane;":8460,"PrecedesEqual;":10927,"PrecedesTilde;":8830,"RightArrowBar;":8677,"RightTeeArrow;":8614,"RightTriangle;":8883,"RightUpVector;":8638,"SucceedsEqual;":10928,"SucceedsTilde;":8831,"SupersetEqual;":8839,"UpEquilibrium;":10606,"VerticalTilde;":8768,"VeryThinSpace;":8202,"bigtriangleup;":9651,"blacktriangle;":9652,"divideontimes;":8903,"fallingdotseq;":8786,"hookleftarrow;":8617,"leftarrowtail;":8610,"leftharpoonup;":8636,"longleftarrow;":10229,"looparrowleft;":8619,"measuredangle;":8737,"ntriangleleft;":8938,"shortparallel;":8741,"smallsetminus;":8726,"triangleright;":9657,"upharpoonleft;":8639,"varsubsetneqq;":10955,"varsupsetneqq;":10956,"DownArrowBar;":10515,"DownTeeArrow;":8615,"ExponentialE;":8519,"GreaterEqual;":8805,"GreaterTilde;":8819,"HilbertSpace;":8459,"HumpDownHump;":8782,"Intersection;":8898,"LeftArrowBar;":8676,"LeftTeeArrow;":8612,"LeftTriangle;":8882,"LeftUpVector;":8639,"NotCongruent;":8802,"NotHumpEqual;":8783,"NotLessEqual;":8816,"NotLessTilde;":8820,"Proportional;":8733,"RightCeiling;":8969,"RoundImplies;":10608,"ShortUpArrow;":8593,"SquareSubset;":8847,"UnderBracket;":9141,"VerticalLine;":124,"blacklozenge;":10731,"exponentiale;":8519,"risingdotseq;":8787,"triangledown;":9663,"triangleleft;":9667,"varsubsetneq;":8842,"varsupsetneq;":8843,"CircleMinus;":8854,"CircleTimes;":8855,"Equilibrium;":8652,"GreaterLess;":8823,"LeftCeiling;":8968,"LessGreater;":8822,"MediumSpace;":8287,"NotLessLess;":8810,"NotPrecedes;":8832,"NotSucceeds;":8833,"NotSuperset;":8835,"OverBracket;":9140,"RightVector;":8640,"Rrightarrow;":8667,"RuleDelayed;":10740,"SmallCircle;":8728,"SquareUnion;":8852,"SubsetEqual;":8838,"UpDownArrow;":8597,"Updownarrow;":8661,"VerticalBar;":8739,"backepsilon;":1014,"blacksquare;":9642,"circledcirc;":8858,"circleddash;":8861,"curlyeqprec;":8926,"curlyeqsucc;":8927,"diamondsuit;":9830,"eqslantless;":10901,"expectation;":8496,"nRightarrow;":8655,"nrightarrow;":8603,"preccurlyeq;":8828,"precnapprox;":10937,"quaternions;":8461,"straightphi;":981,"succcurlyeq;":8829,"succnapprox;":10938,"thickapprox;":8776,"updownarrow;":8597,"Bernoullis;":8492,"CirclePlus;":8853,"EqualTilde;":8770,"Fouriertrf;":8497,"ImaginaryI;":8520,"Laplacetrf;":8466,"LeftVector;":8636,"Lleftarrow;":8666,"NotElement;":8713,"NotGreater;":8815,"Proportion;":8759,"RightArrow;":8594,"RightFloor;":8971,"Rightarrow;":8658,"ThickSpace;":8287,"TildeEqual;":8771,"TildeTilde;":8776,"UnderBrace;":9183,"UpArrowBar;":10514,"UpTeeArrow;":8613,"circledast;":8859,"complement;":8705,"curlywedge;":8911,"eqslantgtr;":10902,"gtreqqless;":10892,"lessapprox;":10885,"lesseqqgtr;":10891,"lmoustache;":9136,"longmapsto;":10236,"mapstodown;":8615,"mapstoleft;":8612,"nLeftarrow;":8653,"nleftarrow;":8602,"nsubseteqq;":10949,"nsupseteqq;":10950,"precapprox;":10935,"rightarrow;":8594,"rmoustache;":9137,"sqsubseteq;":8849,"sqsupseteq;":8850,"subsetneqq;":10955,"succapprox;":10936,"supsetneqq;":10956,"upuparrows;":8648,"varepsilon;":1013,"varnothing;":8709,"Backslash;":8726,"CenterDot;":183,"CircleDot;":8857,"Congruent;":8801,"Coproduct;":8720,"DoubleDot;":168,"DownArrow;":8595,"DownBreve;":785,"Downarrow;":8659,"HumpEqual;":8783,"LeftArrow;":8592,"LeftFloor;":8970,"Leftarrow;":8656,"LessTilde;":8818,"Mellintrf;":8499,"MinusPlus;":8723,"NotCupCap;":8813,"NotExists;":8708,"NotSubset;":8834,"OverBrace;":9182,"PlusMinus;":177,"Therefore;":8756,"ThinSpace;":8201,"TripleDot;":8411,"UnionPlus;":8846,"backprime;":8245,"backsimeq;":8909,"bigotimes;":10754,"centerdot;":183,"checkmark;":10003,"complexes;":8450,"dotsquare;":8865,"downarrow;":8595,"gtrapprox;":10886,"gtreqless;":8923,"gvertneqq;":8809,"heartsuit;":9829,"leftarrow;":8592,"lesseqgtr;":8922,"lvertneqq;":8808,"ngeqslant;":10878,"nleqslant;":10877,"nparallel;":8742,"nshortmid;":8740,"nsubseteq;":8840,"nsupseteq;":8841,"pitchfork;":8916,"rationals;":8474,"spadesuit;":9824,"subseteqq;":10949,"subsetneq;":8842,"supseteqq;":10950,"supsetneq;":8843,"therefore;":8756,"triangleq;":8796,"varpropto;":8733,"DDotrahd;":10513,"DotEqual;":8784,"Integral;":8747,"LessLess;":10913,"NotEqual;":8800,"NotTilde;":8769,"PartialD;":8706,"Precedes;":8826,"RightTee;":8866,"Succeeds;":8827,"SuchThat;":8715,"Superset;":8835,"Uarrocir;":10569,"UnderBar;":95,"andslope;":10840,"angmsdaa;":10664,"angmsdab;":10665,"angmsdac;":10666,"angmsdad;":10667,"angmsdae;":10668,"angmsdaf;":10669,"angmsdag;":10670,"angmsdah;":10671,"angrtvbd;":10653,"approxeq;":8778,"awconint;":8755,"backcong;":8780,"barwedge;":8965,"bbrktbrk;":9142,"bigoplus;":10753,"bigsqcup;":10758,"biguplus;":10756,"bigwedge;":8896,"boxminus;":8863,"boxtimes;":8864,"bsolhsub;":10184,"capbrcup;":10825,"circledR;":174,"circledS;":9416,"cirfnint;":10768,"clubsuit;":9827,"cupbrcap;":10824,"curlyvee;":8910,"cwconint;":8754,"doteqdot;":8785,"dotminus;":8760,"drbkarow;":10512,"dzigrarr;":10239,"elinters;":9191,"emptyset;":8709,"eqvparsl;":10725,"fpartint;":10765,"geqslant;":10878,"gesdotol;":10884,"gnapprox;":10890,"hksearow;":10533,"hkswarow;":10534,"imagline;":8464,"imagpart;":8465,"infintie;":10717,"integers;":8484,"intercal;":8890,"intlarhk;":10775,"laemptyv;":10676,"ldrushar;":10571,"leqslant;":10877,"lesdotor;":10883,"llcorner;":8990,"lnapprox;":10889,"lrcorner;":8991,"lurdshar;":10570,"mapstoup;":8613,"multimap;":8888,"naturals;":8469,"ncongdot;":10861,"notindot;":8949,"otimesas;":10806,"parallel;":8741,"plusacir;":10787,"pointint;":10773,"precneqq;":10933,"precnsim;":8936,"profalar;":9006,"profline;":8978,"profsurf;":8979,"raemptyv;":10675,"realpart;":8476,"rppolint;":10770,"rtriltri;":10702,"scpolint;":10771,"setminus;":8726,"shortmid;":8739,"smeparsl;":10724,"sqsubset;":8847,"sqsupset;":8848,"subseteq;":8838,"succneqq;":10934,"succnsim;":8937,"supseteq;":8839,"thetasym;":977,"thicksim;":8764,"timesbar;":10801,"triangle;":9653,"triminus;":10810,"trpezium;":9186,"ulcorner;":8988,"urcorner;":8989,"varkappa;":1008,"varsigma;":962,"vartheta;":977,"Because;":8757,"Cayleys;":8493,"Cconint;":8752,"Cedilla;":184,"Diamond;":8900,"DownTee;":8868,"Element;":8712,"Epsilon;":917,"Implies;":8658,"LeftTee;":8867,"NewLine;":10,"NoBreak;":8288,"NotLess;":8814,"Omicron;":927,"OverBar;":8254,"Product;":8719,"UpArrow;":8593,"Uparrow;":8657,"Upsilon;":933,"alefsym;":8501,"angrtvb;":8894,"angzarr;":9084,"asympeq;":8781,"backsim;":8765,"because;":8757,"bemptyv;":10672,"between;":8812,"bigcirc;":9711,"bigodot;":10752,"bigstar;":9733,"bnequiv;":8801,"boxplus;":8862,"ccupssm;":10832,"cemptyv;":10674,"cirscir;":10690,"coloneq;":8788,"congdot;":10861,"cudarrl;":10552,"cudarrr;":10549,"cularrp;":10557,"curarrm;":10556,"dbkarow;":10511,"ddagger;":8225,"ddotseq;":10871,"demptyv;":10673,"diamond;":8900,"digamma;":989,"dotplus;":8724,"dwangle;":10662,"epsilon;":949,"eqcolon;":8789,"equivDD;":10872,"gesdoto;":10882,"gtquest;":10876,"gtrless;":8823,"harrcir;":10568,"intprod;":10812,"isindot;":8949,"larrbfs;":10527,"larrsim;":10611,"lbrksld;":10639,"lbrkslu;":10637,"ldrdhar;":10599,"lesdoto;":10881,"lessdot;":8918,"lessgtr;":8822,"lesssim;":8818,"lotimes;":10804,"lozenge;":9674,"ltquest;":10875,"luruhar;":10598,"maltese;":10016,"minusdu;":10794,"napprox;":8777,"natural;":9838,"nearrow;":8599,"nexists;":8708,"notinva;":8713,"notinvb;":8951,"notinvc;":8950,"notniva;":8716,"notnivb;":8958,"notnivc;":8957,"npolint;":10772,"npreceq;":10927,"nsqsube;":8930,"nsqsupe;":8931,"nsubset;":8834,"nsucceq;":10928,"nsupset;":8835,"nvinfin;":10718,"nvltrie;":8884,"nvrtrie;":8885,"nwarrow;":8598,"olcross;":10683,"omicron;":959,"orderof;":8500,"orslope;":10839,"pertenk;":8241,"planckh;":8462,"pluscir;":10786,"plussim;":10790,"plustwo;":10791,"precsim;":8830,"quatint;":10774,"questeq;":8799,"rarrbfs;":10528,"rarrsim;":10612,"rbrksld;":10638,"rbrkslu;":10640,"rdldhar;":10601,"realine;":8475,"rotimes;":10805,"ruluhar;":10600,"searrow;":8600,"simplus;":10788,"simrarr;":10610,"subedot;":10947,"submult;":10945,"subplus;":10943,"subrarr;":10617,"succsim;":8831,"supdsub;":10968,"supedot;":10948,"suphsol;":10185,"suphsub;":10967,"suplarr;":10619,"supmult;":10946,"supplus;":10944,"swarrow;":8601,"topfork;":10970,"triplus;":10809,"tritime;":10811,"uparrow;":8593,"upsilon;":965,"uwangle;":10663,"vzigzag;":10650,"zigrarr;":8669,"Aacute;":193,"Abreve;":258,"Agrave;":192,"Assign;":8788,"Atilde;":195,"Barwed;":8966,"Bumpeq;":8782,"Cacute;":262,"Ccaron;":268,"Ccedil;":199,"Colone;":10868,"Conint;":8751,"CupCap;":8781,"Dagger;":8225,"Dcaron;":270,"DotDot;":8412,"Dstrok;":272,"Eacute;":201,"Ecaron;":282,"Egrave;":200,"Exists;":8707,"ForAll;":8704,"Gammad;":988,"Gbreve;":286,"Gcedil;":290,"HARDcy;":1066,"Hstrok;":294,"Iacute;":205,"Igrave;":204,"Itilde;":296,"Jsercy;":1032,"Kcedil;":310,"Lacute;":313,"Lambda;":923,"Lcaron;":317,"Lcedil;":315,"Lmidot;":319,"Lstrok;":321,"Nacute;":323,"Ncaron;":327,"Ncedil;":325,"Ntilde;":209,"Oacute;":211,"Odblac;":336,"Ograve;":210,"Oslash;":216,"Otilde;":213,"Otimes;":10807,"Racute;":340,"Rarrtl;":10518,"Rcaron;":344,"Rcedil;":342,"SHCHcy;":1065,"SOFTcy;":1068,"Sacute;":346,"Scaron;":352,"Scedil;":350,"Square;":9633,"Subset;":8912,"Supset;":8913,"Tcaron;":356,"Tcedil;":354,"Tstrok;":358,"Uacute;":218,"Ubreve;":364,"Udblac;":368,"Ugrave;":217,"Utilde;":360,"Vdashl;":10982,"Verbar;":8214,"Vvdash;":8874,"Yacute;":221,"Zacute;":377,"Zcaron;":381,"aacute;":225,"abreve;":259,"agrave;":224,"andand;":10837,"angmsd;":8737,"angsph;":8738,"apacir;":10863,"approx;":8776,"atilde;":227,"barvee;":8893,"barwed;":8965,"becaus;":8757,"bernou;":8492,"bigcap;":8898,"bigcup;":8899,"bigvee;":8897,"bkarow;":10509,"bottom;":8869,"bowtie;":8904,"boxbox;":10697,"bprime;":8245,"brvbar;":166,"bullet;":8226,"bumpeq;":8783,"cacute;":263,"capand;":10820,"capcap;":10827,"capcup;":10823,"capdot;":10816,"ccaron;":269,"ccedil;":231,"circeq;":8791,"cirmid;":10991,"colone;":8788,"commat;":64,"compfn;":8728,"conint;":8750,"coprod;":8720,"copysr;":8471,"cularr;":8630,"cupcap;":10822,"cupcup;":10826,"cupdot;":8845,"curarr;":8631,"curren;":164,"cylcty;":9005,"dagger;":8224,"daleth;":8504,"dcaron;":271,"dfisht;":10623,"divide;":247,"divonx;":8903,"dlcorn;":8990,"dlcrop;":8973,"dollar;":36,"drcorn;":8991,"drcrop;":8972,"dstrok;":273,"eacute;":233,"easter;":10862,"ecaron;":283,"ecolon;":8789,"egrave;":232,"egsdot;":10904,"elsdot;":10903,"emptyv;":8709,"emsp13;":8196,"emsp14;":8197,"eparsl;":10723,"eqcirc;":8790,"equals;":61,"equest;":8799,"female;":9792,"ffilig;":64259,"ffllig;":64260,"forall;":8704,"frac12;":189,"frac13;":8531,"frac14;":188,"frac15;":8533,"frac16;":8537,"frac18;":8539,"frac23;":8532,"frac25;":8534,"frac34;":190,"frac35;":8535,"frac38;":8540,"frac45;":8536,"frac56;":8538,"frac58;":8541,"frac78;":8542,"gacute;":501,"gammad;":989,"gbreve;":287,"gesdot;":10880,"gesles;":10900,"gtlPar;":10645,"gtrarr;":10616,"gtrdot;":8919,"gtrsim;":8819,"hairsp;":8202,"hamilt;":8459,"hardcy;":1098,"hearts;":9829,"hellip;":8230,"hercon;":8889,"homtht;":8763,"horbar;":8213,"hslash;":8463,"hstrok;":295,"hybull;":8259,"hyphen;":8208,"iacute;":237,"igrave;":236,"iiiint;":10764,"iinfin;":10716,"incare;":8453,"inodot;":305,"intcal;":8890,"iquest;":191,"isinsv;":8947,"itilde;":297,"jsercy;":1112,"kappav;":1008,"kcedil;":311,"kgreen;":312,"lAtail;":10523,"lacute;":314,"lagran;":8466,"lambda;":955,"langle;":10216,"larrfs;":10525,"larrhk;":8617,"larrlp;":8619,"larrpl;":10553,"larrtl;":8610,"latail;":10521,"lbrace;":123,"lbrack;":91,"lcaron;":318,"lcedil;":316,"ldquor;":8222,"lesdot;":10879,"lesges;":10899,"lfisht;":10620,"lfloor;":8970,"lharul;":10602,"llhard;":10603,"lmidot;":320,"lmoust;":9136,"loplus;":10797,"lowast;":8727,"lowbar;":95,"lparlt;":10643,"lrhard;":10605,"lsaquo;":8249,"lsquor;":8218,"lstrok;":322,"lthree;":8907,"ltimes;":8905,"ltlarr;":10614,"ltrPar;":10646,"mapsto;":8614,"marker;":9646,"mcomma;":10793,"midast;":42,"midcir;":10992,"middot;":183,"minusb;":8863,"minusd;":8760,"mnplus;":8723,"models;":8871,"mstpos;":8766,"nVDash;":8879,"nVdash;":8878,"nacute;":324,"nbumpe;":8783,"ncaron;":328,"ncedil;":326,"nearhk;":10532,"nequiv;":8802,"nesear;":10536,"nexist;":8708,"nltrie;":8940,"notinE;":8953,"nparsl;":11005,"nprcue;":8928,"nrarrc;":10547,"nrarrw;":8605,"nrtrie;":8941,"nsccue;":8929,"nsimeq;":8772,"ntilde;":241,"numero;":8470,"nvDash;":8877,"nvHarr;":10500,"nvdash;":8876,"nvlArr;":10498,"nvrArr;":10499,"nwarhk;":10531,"nwnear;":10535,"oacute;":243,"odblac;":337,"odsold;":10684,"ograve;":242,"ominus;":8854,"origof;":8886,"oslash;":248,"otilde;":245,"otimes;":8855,"parsim;":10995,"percnt;":37,"period;":46,"permil;":8240,"phmmat;":8499,"planck;":8463,"plankv;":8463,"plusdo;":8724,"plusdu;":10789,"plusmn;":177,"preceq;":10927,"primes;":8473,"prnsim;":8936,"propto;":8733,"prurel;":8880,"puncsp;":8200,"qprime;":8279,"rAtail;":10524,"racute;":341,"rangle;":10217,"rarrap;":10613,"rarrfs;":10526,"rarrhk;":8618,"rarrlp;":8620,"rarrpl;":10565,"rarrtl;":8611,"ratail;":10522,"rbrace;":125,"rbrack;":93,"rcaron;":345,"rcedil;":343,"rdquor;":8221,"rfisht;":10621,"rfloor;":8971,"rharul;":10604,"rmoust;":9137,"roplus;":10798,"rpargt;":10644,"rsaquo;":8250,"rsquor;":8217,"rthree;":8908,"rtimes;":8906,"sacute;":347,"scaron;":353,"scedil;":351,"scnsim;":8937,"searhk;":10533,"seswar;":10537,"sfrown;":8994,"shchcy;":1097,"sigmaf;":962,"sigmav;":962,"simdot;":10858,"smashp;":10803,"softcy;":1100,"solbar;":9023,"spades;":9824,"sqcaps;":8851,"sqcups;":8852,"sqsube;":8849,"sqsupe;":8850,"square;":9633,"squarf;":9642,"ssetmn;":8726,"ssmile;":8995,"sstarf;":8902,"subdot;":10941,"subset;":8834,"subsim;":10951,"subsub;":10965,"subsup;":10963,"succeq;":10928,"supdot;":10942,"supset;":8835,"supsim;":10952,"supsub;":10964,"supsup;":10966,"swarhk;":10534,"swnwar;":10538,"target;":8982,"tcaron;":357,"tcedil;":355,"telrec;":8981,"there4;":8756,"thetav;":977,"thinsp;":8201,"thksim;":8764,"timesb;":8864,"timesd;":10800,"topbot;":9014,"topcir;":10993,"tprime;":8244,"tridot;":9708,"tstrok;":359,"uacute;":250,"ubreve;":365,"udblac;":369,"ufisht;":10622,"ugrave;":249,"ulcorn;":8988,"ulcrop;":8975,"urcorn;":8989,"urcrop;":8974,"utilde;":361,"vangrt;":10652,"varphi;":981,"varrho;":1009,"veebar;":8891,"vellip;":8942,"verbar;":124,"vsubnE;":10955,"vsubne;":8842,"vsupnE;":10956,"vsupne;":8843,"wedbar;":10847,"wedgeq;":8793,"weierp;":8472,"wreath;":8768,"xoplus;":10753,"xotime;":10754,"xsqcup;":10758,"xuplus;":10756,"xwedge;":8896,"yacute;":253,"zacute;":378,"zcaron;":382,"zeetrf;":8488,"AElig;":198,Aacute:193,"Acirc;":194,Agrave:192,"Alpha;":913,"Amacr;":256,"Aogon;":260,"Aring;":197,Atilde:195,"Breve;":728,Ccedil:199,"Ccirc;":264,"Colon;":8759,"Cross;":10799,"Dashv;":10980,"Delta;":916,Eacute:201,"Ecirc;":202,Egrave:200,"Emacr;":274,"Eogon;":280,"Equal;":10869,"Gamma;":915,"Gcirc;":284,"Hacek;":711,"Hcirc;":292,"IJlig;":306,Iacute:205,"Icirc;":206,Igrave:204,"Imacr;":298,"Iogon;":302,"Iukcy;":1030,"Jcirc;":308,"Jukcy;":1028,"Kappa;":922,Ntilde:209,"OElig;":338,Oacute:211,"Ocirc;":212,Ograve:210,"Omacr;":332,"Omega;":937,Oslash:216,Otilde:213,"Prime;":8243,"RBarr;":10512,"Scirc;":348,"Sigma;":931,"THORN;":222,"TRADE;":8482,"TSHcy;":1035,"Theta;":920,"Tilde;":8764,Uacute:218,"Ubrcy;":1038,"Ucirc;":219,Ugrave:217,"Umacr;":362,"Union;":8899,"Uogon;":370,"UpTee;":8869,"Uring;":366,"VDash;":8875,"Vdash;":8873,"Wcirc;":372,"Wedge;":8896,Yacute:221,"Ycirc;":374,aacute:225,"acirc;":226,"acute;":180,"aelig;":230,agrave:224,"aleph;":8501,"alpha;":945,"amacr;":257,"amalg;":10815,"angle;":8736,"angrt;":8735,"angst;":197,"aogon;":261,"aring;":229,"asymp;":8776,atilde:227,"awint;":10769,"bcong;":8780,"bdquo;":8222,"bepsi;":1014,"blank;":9251,"blk12;":9618,"blk14;":9617,"blk34;":9619,"block;":9608,"boxDL;":9559,"boxDR;":9556,"boxDl;":9558,"boxDr;":9555,"boxHD;":9574,"boxHU;":9577,"boxHd;":9572,"boxHu;":9575,"boxUL;":9565,"boxUR;":9562,"boxUl;":9564,"boxUr;":9561,"boxVH;":9580,"boxVL;":9571,"boxVR;":9568,"boxVh;":9579,"boxVl;":9570,"boxVr;":9567,"boxdL;":9557,"boxdR;":9554,"boxdl;":9488,"boxdr;":9484,"boxhD;":9573,"boxhU;":9576,"boxhd;":9516,"boxhu;":9524,"boxuL;":9563,"boxuR;":9560,"boxul;":9496,"boxur;":9492,"boxvH;":9578,"boxvL;":9569,"boxvR;":9566,"boxvh;":9532,"boxvl;":9508,"boxvr;":9500,"breve;":728,brvbar:166,"bsemi;":8271,"bsime;":8909,"bsolb;":10693,"bumpE;":10926,"bumpe;":8783,"caret;":8257,"caron;":711,"ccaps;":10829,ccedil:231,"ccirc;":265,"ccups;":10828,"cedil;":184,"check;":10003,"clubs;":9827,"colon;":58,"comma;":44,"crarr;":8629,"cross;":10007,"csube;":10961,"csupe;":10962,"ctdot;":8943,"cuepr;":8926,"cuesc;":8927,"cupor;":10821,curren:164,"cuvee;":8910,"cuwed;":8911,"cwint;":8753,"dashv;":8867,"dblac;":733,"ddarr;":8650,"delta;":948,"dharl;":8643,"dharr;":8642,"diams;":9830,"disin;":8946,divide:247,"doteq;":8784,"dtdot;":8945,"dtrif;":9662,"duarr;":8693,"duhar;":10607,"eDDot;":10871,eacute:233,"ecirc;":234,"efDot;":8786,egrave:232,"emacr;":275,"empty;":8709,"eogon;":281,"eplus;":10865,"epsiv;":1013,"eqsim;":8770,"equiv;":8801,"erDot;":8787,"erarr;":10609,"esdot;":8784,"exist;":8707,"fflig;":64256,"filig;":64257,"fjlig;":102,"fllig;":64258,"fltns;":9649,"forkv;":10969,frac12:189,frac14:188,frac34:190,"frasl;":8260,"frown;":8994,"gamma;":947,"gcirc;":285,"gescc;":10921,"gimel;":8503,"gneqq;":8809,"gnsim;":8935,"grave;":96,"gsime;":10894,"gsiml;":10896,"gtcir;":10874,"gtdot;":8919,"harrw;":8621,"hcirc;":293,"hoarr;":8703,iacute:237,"icirc;":238,"iexcl;":161,igrave:236,"iiint;":8749,"iiota;":8489,"ijlig;":307,"imacr;":299,"image;":8465,"imath;":305,"imped;":437,"infin;":8734,"iogon;":303,"iprod;":10812,iquest:191,"isinE;":8953,"isins;":8948,"isinv;":8712,"iukcy;":1110,"jcirc;":309,"jmath;":567,"jukcy;":1108,"kappa;":954,"lAarr;":8666,"lBarr;":10510,"langd;":10641,"laquo;":171,"larrb;":8676,"lates;":10925,"lbarr;":10508,"lbbrk;":10098,"lbrke;":10635,"lceil;":8968,"ldquo;":8220,"lescc;":10920,"lhard;":8637,"lharu;":8636,"lhblk;":9604,"llarr;":8647,"lltri;":9722,"lneqq;":8808,"lnsim;":8934,"loang;":10220,"loarr;":8701,"lobrk;":10214,"lopar;":10629,"lrarr;":8646,"lrhar;":8651,"lrtri;":8895,"lsime;":10893,"lsimg;":10895,"lsquo;":8216,"ltcir;":10873,"ltdot;":8918,"ltrie;":8884,"ltrif;":9666,"mDDot;":8762,"mdash;":8212,"micro;":181,middot:183,"minus;":8722,"mumap;":8888,"nabla;":8711,"napid;":8779,"napos;":329,"natur;":9838,"nbump;":8782,"ncong;":8775,"ndash;":8211,"neArr;":8663,"nearr;":8599,"nedot;":8784,"nesim;":8770,"ngeqq;":8807,"ngsim;":8821,"nhArr;":8654,"nharr;":8622,"nhpar;":10994,"nlArr;":8653,"nlarr;":8602,"nleqq;":8806,"nless;":8814,"nlsim;":8820,"nltri;":8938,"notin;":8713,"notni;":8716,"npart;":8706,"nprec;":8832,"nrArr;":8655,"nrarr;":8603,"nrtri;":8939,"nsime;":8772,"nsmid;":8740,"nspar;":8742,"nsubE;":10949,"nsube;":8840,"nsucc;":8833,"nsupE;":10950,"nsupe;":8841,ntilde:241,"numsp;":8199,"nvsim;":8764,"nwArr;":8662,"nwarr;":8598,oacute:243,"ocirc;":244,"odash;":8861,"oelig;":339,"ofcir;":10687,ograve:242,"ohbar;":10677,"olarr;":8634,"olcir;":10686,"oline;":8254,"omacr;":333,"omega;":969,"operp;":10681,"oplus;":8853,"orarr;":8635,"order;":8500,oslash:248,otilde:245,"ovbar;":9021,"parsl;":11005,"phone;":9742,"plusb;":8862,"pluse;":10866,plusmn:177,"pound;":163,"prcue;":8828,"prime;":8242,"prnap;":10937,"prsim;":8830,"quest;":63,"rAarr;":8667,"rBarr;":10511,"radic;":8730,"rangd;":10642,"range;":10661,"raquo;":187,"rarrb;":8677,"rarrc;":10547,"rarrw;":8605,"ratio;":8758,"rbarr;":10509,"rbbrk;":10099,"rbrke;":10636,"rceil;":8969,"rdquo;":8221,"reals;":8477,"rhard;":8641,"rharu;":8640,"rlarr;":8644,"rlhar;":8652,"rnmid;":10990,"roang;":10221,"roarr;":8702,"robrk;":10215,"ropar;":10630,"rrarr;":8649,"rsquo;":8217,"rtrie;":8885,"rtrif;":9656,"sbquo;":8218,"sccue;":8829,"scirc;":349,"scnap;":10938,"scsim;":8831,"sdotb;":8865,"sdote;":10854,"seArr;":8664,"searr;":8600,"setmn;":8726,"sharp;":9839,"sigma;":963,"simeq;":8771,"simgE;":10912,"simlE;":10911,"simne;":8774,"slarr;":8592,"smile;":8995,"smtes;":10924,"sqcap;":8851,"sqcup;":8852,"sqsub;":8847,"sqsup;":8848,"srarr;":8594,"starf;":9733,"strns;":175,"subnE;":10955,"subne;":8842,"supnE;":10956,"supne;":8843,"swArr;":8665,"swarr;":8601,"szlig;":223,"theta;":952,"thkap;":8776,"thorn;":254,"tilde;":732,"times;":215,"trade;":8482,"trisb;":10701,"tshcy;":1115,"twixt;":8812,uacute:250,"ubrcy;":1118,"ucirc;":251,"udarr;":8645,"udhar;":10606,ugrave:249,"uharl;":8639,"uharr;":8638,"uhblk;":9600,"ultri;":9720,"umacr;":363,"uogon;":371,"uplus;":8846,"upsih;":978,"uring;":367,"urtri;":9721,"utdot;":8944,"utrif;":9652,"uuarr;":8648,"vBarv;":10985,"vDash;":8872,"varpi;":982,"vdash;":8866,"veeeq;":8794,"vltri;":8882,"vnsub;":8834,"vnsup;":8835,"vprop;":8733,"vrtri;":8883,"wcirc;":373,"wedge;":8743,"xcirc;":9711,"xdtri;":9661,"xhArr;":10234,"xharr;":10231,"xlArr;":10232,"xlarr;":10229,"xodot;":10752,"xrArr;":10233,"xrarr;":10230,"xutri;":9651,yacute:253,"ycirc;":375,AElig:198,Acirc:194,"Aopf;":120120,Aring:197,"Ascr;":119964,"Auml;":196,"Barv;":10983,"Beta;":914,"Bopf;":120121,"Bscr;":8492,"CHcy;":1063,"COPY;":169,"Cdot;":266,"Copf;":8450,"Cscr;":119966,"DJcy;":1026,"DScy;":1029,"DZcy;":1039,"Darr;":8609,"Dopf;":120123,"Dscr;":119967,Ecirc:202,"Edot;":278,"Eopf;":120124,"Escr;":8496,"Esim;":10867,"Euml;":203,"Fopf;":120125,"Fscr;":8497,"GJcy;":1027,"Gdot;":288,"Gopf;":120126,"Gscr;":119970,"Hopf;":8461,"Hscr;":8459,"IEcy;":1045,"IOcy;":1025,Icirc:206,"Idot;":304,"Iopf;":120128,"Iota;":921,"Iscr;":8464,"Iuml;":207,"Jopf;":120129,"Jscr;":119973,"KHcy;":1061,"KJcy;":1036,"Kopf;":120130,"Kscr;":119974,"LJcy;":1033,"Lang;":10218,"Larr;":8606,"Lopf;":120131,"Lscr;":8466,"Mopf;":120132,"Mscr;":8499,"NJcy;":1034,"Nopf;":8469,"Nscr;":119977,Ocirc:212,"Oopf;":120134,"Oscr;":119978,"Ouml;":214,"Popf;":8473,"Pscr;":119979,"QUOT;":34,"Qopf;":8474,"Qscr;":119980,"Rang;":10219,"Rarr;":8608,"Ropf;":8477,"Rscr;":8475,"SHcy;":1064,"Sopf;":120138,"Sqrt;":8730,"Sscr;":119982,"Star;":8902,THORN:222,"TScy;":1062,"Topf;":120139,"Tscr;":119983,"Uarr;":8607,Ucirc:219,"Uopf;":120140,"Upsi;":978,"Uscr;":119984,"Uuml;":220,"Vbar;":10987,"Vert;":8214,"Vopf;":120141,"Vscr;":119985,"Wopf;":120142,"Wscr;":119986,"Xopf;":120143,"Xscr;":119987,"YAcy;":1071,"YIcy;":1031,"YUcy;":1070,"Yopf;":120144,"Yscr;":119988,"Yuml;":376,"ZHcy;":1046,"Zdot;":379,"Zeta;":918,"Zopf;":8484,"Zscr;":119989,acirc:226,acute:180,aelig:230,"andd;":10844,"andv;":10842,"ange;":10660,"aopf;":120146,"apid;":8779,"apos;":39,aring:229,"ascr;":119990,"auml;":228,"bNot;":10989,"bbrk;":9141,"beta;":946,"beth;":8502,"bnot;":8976,"bopf;":120147,"boxH;":9552,"boxV;":9553,"boxh;":9472,"boxv;":9474,"bscr;":119991,"bsim;":8765,"bsol;":92,"bull;":8226,"bump;":8782,"caps;":8745,"cdot;":267,cedil:184,"cent;":162,"chcy;":1095,"cirE;":10691,"circ;":710,"cire;":8791,"comp;":8705,"cong;":8773,"copf;":120148,"copy;":169,"cscr;":119992,"csub;":10959,"csup;":10960,"cups;":8746,"dArr;":8659,"dHar;":10597,"darr;":8595,"dash;":8208,"diam;":8900,"djcy;":1106,"dopf;":120149,"dscr;":119993,"dscy;":1109,"dsol;":10742,"dtri;":9663,"dzcy;":1119,"eDot;":8785,"ecir;":8790,ecirc:234,"edot;":279,"emsp;":8195,"ensp;":8194,"eopf;":120150,"epar;":8917,"epsi;":949,"escr;":8495,"esim;":8770,"euml;":235,"euro;":8364,"excl;":33,"flat;":9837,"fnof;":402,"fopf;":120151,"fork;":8916,"fscr;":119995,"gdot;":289,"geqq;":8807,"gesl;":8923,"gjcy;":1107,"gnap;":10890,"gneq;":10888,"gopf;":120152,"gscr;":8458,"gsim;":8819,"gtcc;":10919,"gvnE;":8809,"hArr;":8660,"half;":189,"harr;":8596,"hbar;":8463,"hopf;":120153,"hscr;":119997,icirc:238,"iecy;":1077,iexcl:161,"imof;":8887,"iocy;":1105,"iopf;":120154,"iota;":953,"iscr;":119998,"isin;":8712,"iuml;":239,"jopf;":120155,"jscr;":119999,"khcy;":1093,"kjcy;":1116,"kopf;":120156,"kscr;":120000,"lArr;":8656,"lHar;":10594,"lang;":10216,laquo:171,"larr;":8592,"late;":10925,"lcub;":123,"ldca;":10550,"ldsh;":8626,"leqq;":8806,"lesg;":8922,"ljcy;":1113,"lnap;":10889,"lneq;":10887,"lopf;":120157,"lozf;":10731,"lpar;":40,"lscr;":120001,"lsim;":8818,"lsqb;":91,"ltcc;":10918,"ltri;":9667,"lvnE;":8808,"macr;":175,"male;":9794,"malt;":10016,micro:181,"mlcp;":10971,"mldr;":8230,"mopf;":120158,"mscr;":120002,"nGtv;":8811,"nLtv;":8810,"nang;":8736,"napE;":10864,"nbsp;":160,"ncap;":10819,"ncup;":10818,"ngeq;":8817,"nges;":10878,"ngtr;":8815,"nisd;":8954,"njcy;":1114,"nldr;":8229,"nleq;":8816,"nles;":10877,"nmid;":8740,"nopf;":120159,"npar;":8742,"npre;":10927,"nsce;":10928,"nscr;":120003,"nsim;":8769,"nsub;":8836,"nsup;":8837,"ntgl;":8825,"ntlg;":8824,"nvap;":8781,"nvge;":8805,"nvgt;":62,"nvle;":8804,"nvlt;":60,"oast;":8859,"ocir;":8858,ocirc:244,"odiv;":10808,"odot;":8857,"ogon;":731,"oint;":8750,"omid;":10678,"oopf;":120160,"opar;":10679,"ordf;":170,"ordm;":186,"oror;":10838,"oscr;":8500,"osol;":8856,"ouml;":246,"para;":182,"part;":8706,"perp;":8869,"phiv;":981,"plus;":43,"popf;":120161,pound:163,"prap;":10935,"prec;":8826,"prnE;":10933,"prod;":8719,"prop;":8733,"pscr;":120005,"qint;":10764,"qopf;":120162,"qscr;":120006,"quot;":34,"rArr;":8658,"rHar;":10596,"race;":8765,"rang;":10217,raquo:187,"rarr;":8594,"rcub;":125,"rdca;":10551,"rdsh;":8627,"real;":8476,"rect;":9645,"rhov;":1009,"ring;":730,"ropf;":120163,"rpar;":41,"rscr;":120007,"rsqb;":93,"rtri;":9657,"scap;":10936,"scnE;":10934,"sdot;":8901,"sect;":167,"semi;":59,"sext;":10038,"shcy;":1096,"sime;":8771,"simg;":10910,"siml;":10909,"smid;":8739,"smte;":10924,"solb;":10692,"sopf;":120164,"spar;":8741,"squf;":9642,"sscr;":120008,"star;":9734,"subE;":10949,"sube;":8838,"succ;":8827,"sung;":9834,"sup1;":185,"sup2;":178,"sup3;":179,"supE;":10950,"supe;":8839,szlig:223,"tbrk;":9140,"tdot;":8411,thorn:254,times:215,"tint;":8749,"toea;":10536,"topf;":120165,"tosa;":10537,"trie;":8796,"tscr;":120009,"tscy;":1094,"uArr;":8657,"uHar;":10595,"uarr;":8593,ucirc:251,"uopf;":120166,"upsi;":965,"uscr;":120010,"utri;":9653,"uuml;":252,"vArr;":8661,"vBar;":10984,"varr;":8597,"vert;":124,"vopf;":120167,"vscr;":120011,"wopf;":120168,"wscr;":120012,"xcap;":8898,"xcup;":8899,"xmap;":10236,"xnis;":8955,"xopf;":120169,"xscr;":120013,"xvee;":8897,"yacy;":1103,"yicy;":1111,"yopf;":120170,"yscr;":120014,"yucy;":1102,"yuml;":255,"zdot;":380,"zeta;":950,"zhcy;":1078,"zopf;":120171,"zscr;":120015,"zwnj;":8204,"AMP;":38,"Acy;":1040,"Afr;":120068,"And;":10835,Auml:196,"Bcy;":1041,"Bfr;":120069,COPY:169,"Cap;":8914,"Cfr;":8493,"Chi;":935,"Cup;":8915,"Dcy;":1044,"Del;":8711,"Dfr;":120071,"Dot;":168,"ENG;":330,"ETH;":208,"Ecy;":1069,"Efr;":120072,"Eta;":919,Euml:203,"Fcy;":1060,"Ffr;":120073,"Gcy;":1043,"Gfr;":120074,"Hat;":94,"Hfr;":8460,"Icy;":1048,"Ifr;":8465,"Int;":8748,Iuml:207,"Jcy;":1049,"Jfr;":120077,"Kcy;":1050,"Kfr;":120078,"Lcy;":1051,"Lfr;":120079,"Lsh;":8624,"Map;":10501,"Mcy;":1052,"Mfr;":120080,"Ncy;":1053,"Nfr;":120081,"Not;":10988,"Ocy;":1054,"Ofr;":120082,Ouml:214,"Pcy;":1055,"Pfr;":120083,"Phi;":934,"Psi;":936,QUOT:34,"Qfr;":120084,"REG;":174,"Rcy;":1056,"Rfr;":8476,"Rho;":929,"Rsh;":8625,"Scy;":1057,"Sfr;":120086,"Sub;":8912,"Sum;":8721,"Sup;":8913,"Tab;":9,"Tau;":932,"Tcy;":1058,"Tfr;":120087,"Ucy;":1059,"Ufr;":120088,Uuml:220,"Vcy;":1042,"Vee;":8897,"Vfr;":120089,"Wfr;":120090,"Xfr;":120091,"Ycy;":1067,"Yfr;":120092,"Zcy;":1047,"Zfr;":8488,"acE;":8766,"acd;":8767,"acy;":1072,"afr;":120094,"amp;":38,"and;":8743,"ang;":8736,"apE;":10864,"ape;":8778,"ast;":42,auml:228,"bcy;":1073,"bfr;":120095,"bne;":61,"bot;":8869,"cap;":8745,cent:162,"cfr;":120096,"chi;":967,"cir;":9675,copy:169,"cup;":8746,"dcy;":1076,"deg;":176,"dfr;":120097,"die;":168,"div;":247,"dot;":729,"ecy;":1101,"efr;":120098,"egs;":10902,"ell;":8467,"els;":10901,"eng;":331,"eta;":951,"eth;":240,euml:235,"fcy;":1092,"ffr;":120099,"gEl;":10892,"gap;":10886,"gcy;":1075,"gel;":8923,"geq;":8805,"ges;":10878,"gfr;":120100,"ggg;":8921,"glE;":10898,"gla;":10917,"glj;":10916,"gnE;":8809,"gne;":10888,"hfr;":120101,"icy;":1080,"iff;":8660,"ifr;":120102,"int;":8747,iuml:239,"jcy;":1081,"jfr;":120103,"kcy;":1082,"kfr;":120104,"lEg;":10891,"lap;":10885,"lat;":10923,"lcy;":1083,"leg;":8922,"leq;":8804,"les;":10877,"lfr;":120105,"lgE;":10897,"lnE;":8808,"lne;":10887,"loz;":9674,"lrm;":8206,"lsh;":8624,macr:175,"map;":8614,"mcy;":1084,"mfr;":120106,"mho;":8487,"mid;":8739,"nGg;":8921,"nGt;":8811,"nLl;":8920,"nLt;":8810,"nap;":8777,nbsp:160,"ncy;":1085,"nfr;":120107,"ngE;":8807,"nge;":8817,"ngt;":8815,"nis;":8956,"niv;":8715,"nlE;":8806,"nle;":8816,"nlt;":8814,"not;":172,"npr;":8832,"nsc;":8833,"num;":35,"ocy;":1086,"ofr;":120108,"ogt;":10689,"ohm;":937,"olt;":10688,"ord;":10845,ordf:170,ordm:186,"orv;":10843,ouml:246,"par;":8741,para:182,"pcy;":1087,"pfr;":120109,"phi;":966,"piv;":982,"prE;":10931,"pre;":10927,"psi;":968,"qfr;":120110,quot:34,"rcy;":1088,"reg;":174,"rfr;":120111,"rho;":961,"rlm;":8207,"rsh;":8625,"scE;":10932,"sce;":10928,"scy;":1089,sect:167,"sfr;":120112,"shy;":173,"sim;":8764,"smt;":10922,"sol;":47,"squ;":9633,"sub;":8834,"sum;":8721,sup1:185,sup2:178,sup3:179,"sup;":8835,"tau;":964,"tcy;":1090,"tfr;":120113,"top;":8868,"ucy;":1091,"ufr;":120114,"uml;":168,uuml:252,"vcy;":1074,"vee;":8744,"vfr;":120115,"wfr;":120116,"xfr;":120117,"ycy;":1099,"yen;":165,"yfr;":120118,yuml:255,"zcy;":1079,"zfr;":120119,"zwj;":8205,AMP:38,"DD;":8517,ETH:208,"GT;":62,"Gg;":8921,"Gt;":8811,"Im;":8465,"LT;":60,"Ll;":8920,"Lt;":8810,"Mu;":924,"Nu;":925,"Or;":10836,"Pi;":928,"Pr;":10939,REG:174,"Re;":8476,"Sc;":10940,"Xi;":926,"ac;":8766,"af;":8289,amp:38,"ap;":8776,"dd;":8518,deg:176,"ee;":8519,"eg;":10906,"el;":10905,eth:240,"gE;":8807,"ge;":8805,"gg;":8811,"gl;":8823,"gt;":62,"ic;":8291,"ii;":8520,"in;":8712,"it;":8290,"lE;":8806,"le;":8804,"lg;":8822,"ll;":8810,"lt;":60,"mp;":8723,"mu;":956,"ne;":8800,"ni;":8715,not:172,"nu;":957,"oS;":9416,"or;":8744,"pi;":960,"pm;":177,"pr;":8826,reg:174,"rx;":8478,"sc;":8827,shy:173,uml:168,"wp;":8472,"wr;":8768,"xi;":958,yen:165,GT:62,LT:60,gt:62,lt:60},Pe=br;var Sr=[8364,129,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,141,381,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,157,382,376];function Er(r,c){if(c&&!r.endsWith(";"))return`${r}\\b(?!=)`;return r}function nt(r){let l=Object.keys(Pe).map((p)=>Er(p,r));return new RegExp(`&(#(?:x[a-fA-F\\d]+|\\d+)(?:;)?|${l.join("|")})`,"g")}var Ce,ke;function wr(r){if(r){if(!ke)ke=nt(!0);return ke}if(!Ce)Ce=nt(!1);return Ce}var ot=0;function Pr(r){if(r===10)return 32;if(r<128)return r;if(r<=159)return Sr[r-128];if(r<55296)return r;if(r<=57343)return ot;if(r<=65535)return r;if(r>=65536&&r<=131071)return r;if(r>=131072&&r<=196607)return r;if(r>=917504&&r<=917631||r>=917760&&r<=917999)return r;return ot}function Ne(r,c){if(r.indexOf("&")===-1)return r;return r.replace(wr(c),(l,p)=>{let u;if(p[0]!=="#")u=Pe[p];else if(p[1]==="x")u=Number.parseInt(p.substring(2),16);else u=Number.parseInt(p.substring(1),10);if(!u)return l;return String.fromCodePoint(Pr(u))})}class oe extends Error{constructor(r){super(`sveld's template parser doesn't support ${r} yet.`);this.name="TemplateParseNotImplementedError"}}var Cr=/<\/script\s*>/g,kr=/<\/script\s*>/y,Nr=/[^\n]/g,vr=new Set(["server","client","worker","test","default"]);function lt(r,c,l){let p=r.index,u=r.readUntil(Cr);if(r.index>=r.source.length)throw Error("sveld: unclosed <script> tag");let m=r.source.slice(0,p).replace(Nr," ")+u;r.read(kr);let i=et(m,r.isTypeScript,r.root.comments);i.start=p;let g="default";for(let S of l){if(vr.has(S.name))throw Error(`sveld: "${S.name}" is a reserved <script> attribute name.`);if(S.name==="module"){if(S.value!==!0)throw Error("sveld: <script module> does not take a value.");g="module"}if(S.name==="context"){let P=S.value;if(P===!0||!Array.isArray(P)||P.length!==1||P[0].type!=="Text")throw Error("sveld: context attribute must be a plain string.");if(P[0].data!=="module")throw Error('sveld: only context="module" is valid.');g="module"}}return{type:"Script",start:c,end:r.index,context:g,content:i,attributes:l}}function ct(r,c,l){let p=r.index,u=r.source.indexOf("</style",r.index),m=u===-1?r.source.length:u;return r.index=m,r.eat("</style",!0),r.read(/\s*>/y),{type:"StyleSheet",start:c,end:r.index,attributes:l,children:[],comments:[],content:{start:p,end:m,styles:r.source.slice(p,m),comment:null}}}var Ir=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]);function ve(r){return Ir.has(r)||r.charCodeAt(0)===33&&r.toLowerCase()==="!doctype"}var Lr="^[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}]*)?$",Dr=new RegExp(Lr,"u");function pt(r){return Dr.test(r)}var _r=/(?:"([^"]*)"|'([^'])*'|([^>\s]+))/y,mt=/["']/y,Or=/(\/>|[\s"'=<>`])/y,Ie=/<\/textarea(\s[^>]*)?>/iy,Rr=/^![a-zA-Z]+$/,Mr=/^[a-zA-Z][a-zA-Z0-9]*:[a-zA-Z][a-zA-Z0-9-]*[a-zA-Z0-9]$/,qr=/^(?:\p{Lu}[$\u200c\u200d\p{ID_Continue}.]*|\p{ID_Start}[$\u200c\u200d\p{ID_Continue}]*(?:\.[$\u200c\u200d\p{ID_Continue}]+)+)$/u,yt={"svelte:head":"SvelteHead","svelte:options":"SvelteOptions","svelte:window":"SvelteWindow","svelte:document":"SvelteDocument","svelte:body":"SvelteBody"},ht={...yt,"svelte:element":"SvelteElement","svelte:component":"SvelteComponent","svelte:self":"SvelteSelf","svelte:fragment":"SvelteFragment","svelte:boundary":"SvelteBoundary"};function Br(r){let c=r.charCodeAt(0);if(c<97||c>122)return!1;for(let l=1;l<r.length;l++){let p=r.charCodeAt(l);if((p<97||p>122)&&(p<48||p>57))return!1}return!0}function Fr(r){if(Br(r))return!0;if(Rr.test(r))return!0;if(Mr.test(r))return!0;return pt(r)}function Ur(r){let c=r.charCodeAt(0);if(c>=97&&c<=122&&!r.includes("."))return!1;return!0}function Vr(r){return`Svelte${r.slice(7).split("-").map((l)=>l.charAt(0).toUpperCase()+l.slice(1)).join("")}`}function jr(r){for(let c=r.length-1;c>=0;c--){let l=r[c].type;if(l==="SvelteHead")return!0;if(l==="RegularElement"||l==="Component")return!1}return!1}function Wr(r){for(let c=r.length-1;c>=0;c--){let l=r[c];if(l.type==="RegularElement"&&l.attributes?.some((p)=>p.type==="Attribute"&&p.name==="shadowrootmode"))return!0}return!1}function ut(r){let{source:c,index:l}=r;if(l>=c.length)throw new Y("Unexpected end of input",c.length);let p=l;while(p<c.length){let u=c.charCodeAt(p);if(u===47||u===62||te(u))break;p++}return r.index=p,{name:c.slice(l,p),start:l,end:p}}function xt(r){let{source:c,index:l}=r;if(l>=c.length)throw new Y("Unexpected end of input",c.length);let p=l;while(p<c.length){let u=c.charCodeAt(p);if(u===61||u===47||u===62||u===34||u===39||te(u))break;p++}return r.index=p,{name:c.slice(l,p),start:l,end:p}}function Hr(r){let c=r.index;if(r.eat("//")){let l=r.readUntilString(`
|
|
7
|
+
`),p=r.index;r.root.comments.push({type:"Line",value:l,start:c,end:p});return}if(r.eat("/*")){let l=r.readUntilString("*/");r.eat("*/");let p=r.index;r.root.comments.push({type:"Block",value:l,start:c,end:p})}}function Gr(r){if(r==="use")return"UseDirective";if(r==="animate")return"AnimateDirective";if(r==="bind")return"BindDirective";if(r==="class")return"ClassDirective";if(r==="style")return"StyleDirective";if(r==="on")return"OnDirective";if(r==="let")return"LetDirective";if(r==="in"||r==="out"||r==="transition")return"TransitionDirective";return!1}function Tt(r,c,l){let p={start:r.index,end:-1,type:"Text",raw:"",data:""},u=[],m=(i)=>{if(i>p.start)p.raw=r.source.slice(p.start,i),p.data=Ne(p.raw,!0),p.end=i,u.push(p)};while(r.index<r.source.length){if(c())return m(r.index),u;if(r.eat("{")){if(r.match("#")||r.match("@"))throw new oe("blocks/tags inside attribute value sequences");let i=r.index-1;m(i),r.allowWhitespace();let g=B(r);r.allowWhitespace(),r.eat("}",!0),u.push({type:"ExpressionTag",start:i,end:r.index,expression:g}),p={start:r.index,end:-1,type:"Text",raw:"",data:""}}else{let i=r.index+1;if(l!==void 0){let g=r.source;while(i<g.length){let S=g.charCodeAt(i);if(S===123||S===l)break;i++}}r.index=i}}throw new oe("unterminated attribute value / sequence (loose mode)")}function Kr(r){let c=r.eat("'")?"'":r.eat('"')?'"':null;if(c&&r.eat(c))return[{start:r.index-1,end:r.index-1,type:"Text",raw:"",data:""}];let l=Tt(r,()=>{if(c)return r.match(c);return!!r.matchRegex(Or)},c===null?void 0:c.charCodeAt(0));if(l.length===0&&!c)throw Error("sveld: expected attribute value");if(c)r.index+=1;if(c||l.length>1||l[0].type==="Text")return l;return l[0]}function Le(r,c,l,p){return{type:"Attribute",start:c,end:l,name:r,value:p}}function zr(r){let c=r.index,l=xt(r);if(!l.name)return null;let p=!0;if(r.eat("=")){r.allowWhitespace();let u=r.matchRegex(_r);if(!u)throw Error("sveld: expected attribute value");r.index+=u.length;let m=u[0]==='"'||u[0]==="'";if(m)u=u.slice(1,-1);p=[{start:r.index-u.length-(m?1:0),end:m?r.index-1:r.index,type:"Text",raw:u,data:Ne(u,!0)}]}if(r.matchRegex(mt))throw Error("sveld: expected '='");return Le(l.name,c,r.index,p)}function Xr(r){while(!0){let g=r.index;if(Hr(r),r.index===g)break;r.allowWhitespace()}let c=r.index;if(r.eat("{")){if(r.allowWhitespace(),r.eat("@attach")){r.requireWhitespace();let P=B(r);return r.allowWhitespace(),r.eat("}",!0),{type:"AttachTag",start:c,end:r.index,expression:P}}if(r.eat("...")){let P=B(r);return r.allowWhitespace(),r.eat("}",!0),{type:"SpreadAttribute",start:c,end:r.index,expression:P}}let g=r.readIdentifierName();if(g.name==="")throw Error("sveld: empty attribute shorthand");r.allowWhitespace(),r.eat("}",!0);let S={type:"ExpressionTag",start:g.start,end:g.end,expression:g};return Le(g.name,c,r.index,S)}let l=xt(r);if(!l.name)return null;let p=r.index;r.allowWhitespace();let u=l.name.indexOf(":"),m=u!==-1&&Gr(l.name.slice(0,u)),i=!0;if(r.eat("="))if(r.allowWhitespace(),r.source[r.index]==="/"&&r.source[r.index+1]===">"){let g=r.index;r.index++,i=[{start:g,end:g+1,type:"Text",raw:"/",data:"/"}],p=r.index}else i=Kr(r),p=r.index;else if(r.matchRegex(mt))throw Error("sveld: expected '='");if(m){let g=l.name.slice(u+1).split("|",1)[0];if(g==="")throw Error("sveld: directive missing a name");if(m==="StyleDirective")return{start:c,end:p,type:m,name:g,value:i};let S=i===!0?void 0:Array.isArray(i)?i[0]:i,P=null;if(S){if((Array.isArray(i)?i.length>1:!1)||S.type==="Text")throw Error("sveld: directive value must be a single expression");P=S.expression}let x={start:c,end:p,type:m,name:g,expression:P};if((x.type==="BindDirective"||x.type==="ClassDirective")&&!x.expression)x.expression={start:c+u+1,end:p,type:"Identifier",name:x.name};return x}return Le(l.name,c,p,i)}function gt(r){let c=r.index++,l=r.current();if(r.eat("!--")){let E=r.readUntilString("-->");r.eat("-->",!0),r.append({type:"Comment",start:c,end:r.index,data:E});return}if(r.eat("/")){let{name:E}=ut(r);if(r.allowWhitespace(),r.eat(">",!0),ve(E))throw Error(`sveld: <${E}> is a void element and cannot have a closing tag`);while(l.name!==E){if(l.type==="RegularElement");else throw Error(`sveld: invalid closing tag </${E}>`);l.end=c,r.pop(),l=r.current()}if(l.end=r.index,r.pop(),r.lastAutoClosedTag&&r.stack.length<r.lastAutoClosedTag.depth)r.lastAutoClosedTag=void 0;return}let p=ut(r),u=Ur(p.name)&&qr.test(p.name);if(!Fr(p.name)&&!u)throw Error(`sveld: "${p.name}" is not a valid element or component name`);if(p.name in yt&&l.type!=="Root")throw Error(`sveld: <${p.name}> must be a top-level element`);let m;if(p.name in ht)m=ht[p.name];else if(p.name.startsWith("svelte:"))m=Vr(p.name);else if(u)m="Component";else if(p.name==="title"&&jr(r.stack))m="TitleElement";else if(p.name==="slot"&&!Wr(r.stack))m="SlotElement";else m="RegularElement";let i={type:m,start:c,end:-1,name:p.name,attributes:[],fragment:{type:"Fragment",nodes:[]}};if(r.allowWhitespace(),l.type==="RegularElement"&&Re(l.name,p.name))l.end=c,r.pop(),r.lastAutoClosedTag={tag:l.name,reason:p.name,depth:r.stack.length},l=r.current();let g=r.current(),S=(p.name==="script"||p.name==="style")&&g.type==="Root",P=S?zr:Xr,x;while(x=P(r))i.attributes.push(x),r.allowWhitespace();if(i.type==="SvelteComponent")i.expression=ft(dt(i));if(i.type==="SvelteElement"){let E=dt(i);if(E.value===!0)throw Error("sveld: <svelte:element> `this` attribute needs a value");if($r(E))i.tag=ft(E);else{let A=E.value[0];i.tag=A.type==="Text"?{type:"Literal",value:A.data,raw:`'${A.raw}'`,start:A.start,end:A.end}:A.expression}}if(S){if(r.eat(">",!0),p.name==="script"){let E=lt(r,c,i.attributes);if(E.context==="module"){if(r.root.module)throw Error("sveld: duplicate <script module>");r.root.module=E}else{if(r.root.instance)throw Error("sveld: duplicate <script>");r.root.instance=E}}else{if(r.root.css)throw Error("sveld: duplicate <style>");r.root.css=ct(r,c,i.attributes)}return}r.append(i);let k=r.eat("/")||ve(p.name);if(r.eat(">",!0),k)i.end=r.index;else if(p.name==="textarea")i.fragment.nodes=Tt(r,()=>(Ie.lastIndex=r.index,Ie.test(r.source))),r.read(Ie),i.end=r.index;else r.push(i,i.fragment)}function dt(r){let c=r.attributes,l=c.findIndex((p)=>p.type==="Attribute"&&p.name==="this");if(l===-1)throw Error(`sveld: <${r.name}> requires a \`this\` attribute`);return c.splice(l,1)[0]}function ft(r){return Array.isArray(r.value)?r.value[0].expression:r.value.expression}function $r(r){return r.value!==!0&&!Array.isArray(r.value)||Array.isArray(r.value)&&r.value.length===1&&r.value[0].type==="ExpressionTag"}function At(r){let c={start:r.start,end:r.end,attributes:r.attributes};for(let l of r.attributes){if(l.type!=="Attribute")continue;if(l.name==="runes"){let p=bt(l);if(typeof p==="boolean")c.runes=p}if(l.name==="customElement"){let p=Jr(l);if(p!==void 0)c.customElement={tag:p}}}return c}function bt(r){let{value:c}=r;if(c===!0)return!0;let l=Array.isArray(c)?c[0]:c;if(!l)return!0;if(Array.isArray(c)&&c.length>1)return null;if(l.type==="Text")return l.data;if(l.expression.type!=="Literal")return null;return l.expression.value}function Jr(r){let{value:c}=r;if(c===!0)return;let l=Array.isArray(c)?c[0]:c;if(!l)return;if(l.type==="Text"){let p=bt(r);return typeof p==="string"?p:void 0}if(l.expression.type==="ObjectExpression"){for(let p of l.expression.properties)if(p.type==="Property"&&!p.computed&&p.key.type==="Identifier"&&p.key.name==="tag"&&p.value.type==="Literal"&&typeof p.value.value==="string")return p.value.value}return}var Yr=/<script\s+(?:[^>]*|(?:[^=>'"/]+=(?:"[^"]*"|'[^']*'|[^>\s]+)\s+)*)lang=(["'])?ts\1[^>]*>/;class De extends Ee{root;stack=[];fragments=[];isTypeScript;lastAutoClosedTag;constructor(r,c){super(r);this.isTypeScript=Yr.test(r);let l=F();this.root={type:"Root",start:0,end:c,css:null,js:[],options:null,fragment:l,comments:[]},this.stack.push(this.root),this.fragments.push(l)}current(){return this.stack[this.stack.length-1]}currentFragment(){return this.fragments[this.fragments.length-1]}push(r,c){this.stack.push(r),this.fragments.push(c)}pop(){return this.fragments.pop(),this.stack.pop()}append(r){return this.currentFragment().nodes.push(r),r}}var _e={"{":"}","(":")","[":"]"},Qr=new Set(Object.values(_e));function le(r,c,l=_e){let p=l===_e?Qr:new Set(Object.values(l)),u=[],m=c;while(m<r.source.length){let i=r.source[m++];if(i==="'"||i==='"'||i==="`"){m=Zr(r,m,i);continue}if(Object.hasOwn(l,i))u.push(i);else if(p.has(i)){let g=u.pop(),S=g?l[g]:void 0;if(i!==S)throw Error(`sveld: expected "${S}"`);if(u.length===0)return m}}throw Error("sveld: unexpected end of input")}function Zr(r,c,l){let p=!1,u=c;while(u<r.source.length){let m=r.source[u++];if(p){p=!1;continue}if(m===l)return u;if(m==="\\")p=!0;if(l==="`"&&m==="$"&&r.source[u]==="{")u=le(r,u)}throw Error("sveld: unterminated string constant")}var Et=/[^\n]/g,es=/\?\s*:/g;function Q(r){let c=r.index,l=r.readIdentifierName();if(l.name!==""){let E=St(r);return{...l,typeAnnotation:E}}let p=r.source[r.index];if(p!=="{"&&p!=="[")throw Error("sveld: expected a binding pattern");let u=le(r,c);r.index=u;let m=r.source.slice(c,u),i=r.source.slice(0,c).replace(Et," "),g=i.indexOf(" ");i=i.slice(0,g)+i.slice(g+1);let S=`${i}(${m} = 1)`,{node:P}=se(S,c-1,r.isTypeScript,r.root.comments),x=P.left,k=St(r);if(k)x.typeAnnotation=k,x.end=k.end;return x}function St(r){let c=r.index;if(r.allowWhitespace(),!r.eat(":")){r.index=c;return}let l="_ as ",p=r.index-l.length,u=r.source.slice(0,p).replace(Et," ")+l+r.source.slice(r.index).replace(es,":"),{node:m}=se(u,p,r.isTypeScript,r.root.comments),i=m;if(i.type==="AssignmentExpression"){let g=i.right.start;while(u[g]!=="=")g-=1;({node:m}=se(u.slice(0,g),p,r.isTypeScript,r.root.comments)),i=m}if(i.type==="SequenceExpression"&&i.expressions)i=i.expressions[0];return r.index=i.end,{type:"TSTypeAnnotation",start:c,end:r.index,typeAnnotation:i.typeAnnotation}}var wt=/\s*}/y,ts={"<":">"};function Pt(r){let c=r.index-2;while(r.source[c]!=="{")c-=1;if(r.eat("if")){r.requireWhitespace();let l={type:"IfBlock",elseif:!1,start:c,end:-1,test:B(r),consequent:F(),alternate:null};r.append(l),r.allowWhitespace(),r.eat("}",!0),r.push(l,l.consequent);return}if(r.eat("each")){r.requireWhitespace();let l=B(r);if(r.allowWhitespace(),!r.match("as")){let g=l;if(g.type==="SequenceExpression"&&g.expressions)g=g.expressions[0];if(g.type==="TSAsExpression"){let S=g;l=S.expression;let P=S.typeAnnotation.start-2;while(P>=0&&!(r.source[P]==="a"&&r.source[P+1]==="s"))P-=1;r.index=P}}let p=null,u,m;if(r.eat("as"))r.requireWhitespace(),p=Q(r);if(r.allowWhitespace(),r.eat(",")){r.allowWhitespace();let g=r.readIdentifierName();if(!g.name)throw Error("sveld: expected an identifier");u=g.name,r.allowWhitespace()}if(r.eat("("))r.allowWhitespace(),m=B(r),r.allowWhitespace(),r.eat(")",!0),r.allowWhitespace();r.eat("}",!0);let i={type:"EachBlock",start:c,end:-1,expression:l,body:F(),context:p,index:u,key:m};r.append(i),r.push(i,i.body);return}if(r.eat("await")){r.requireWhitespace();let l=B(r);r.allowWhitespace();let p={type:"AwaitBlock",start:c,end:-1,expression:l,value:null,error:null,pending:null,then:null,catch:null};if(r.eat("then")){if(!r.matchRegex(wt))r.requireWhitespace(),p.value=Q(r),r.allowWhitespace();p.then=F()}else if(r.eat("catch")){if(!r.matchRegex(wt))r.requireWhitespace(),p.error=Q(r),r.allowWhitespace();p.catch=F()}else p.pending=F();r.eat("}",!0),r.append(p),r.push(p,p.then??p.catch??p.pending);return}if(r.eat("key")){r.requireWhitespace();let l=B(r);r.allowWhitespace(),r.eat("}",!0);let p={type:"KeyBlock",start:c,end:-1,expression:l,fragment:F()};r.append(p),r.push(p,p.fragment);return}if(r.eat("snippet")){r.requireWhitespace();let l=r.readIdentifierName();if(l.name==="")throw Error("sveld: expected a snippet name");r.allowWhitespace();let p;if(r.isTypeScript&&r.match("<")){let m=r.index,i=le(r,m,ts);p=r.source.slice(m+1,i-1),r.index=i}if(r.allowWhitespace(),r.eat("(")){let m=1;while(r.index<r.source.length&&(!r.match(")")||m!==1)){if(r.match("("))m++;if(r.match(")"))m--;r.index+=1}r.eat(")",!0)}r.allowWhitespace(),r.eat("}",!0);let u={type:"SnippetBlock",start:c,end:-1,expression:l,typeParams:p,parameters:[],body:F()};r.append(u),r.push(u,u.body);return}throw Error("sveld: expected if/each/await/key/snippet")}function Ct(r){let c=r.index-1,l=r.current();if(l.type==="IfBlock"){if(!r.eat("else"))throw Error("sveld: expected {:else} or {:else if}");if(r.eat("if"))throw Error("sveld: {:else if} cannot follow {:else if} directly");if(r.allowWhitespace(),r.fragments.pop(),l.alternate=F(),r.fragments.push(l.alternate),r.eat("if")){r.requireWhitespace();let p=B(r);r.allowWhitespace(),r.eat("}",!0);let u=c-1;while(r.source[u]!=="{")u-=1;let m={type:"IfBlock",start:u,end:-1,elseif:!0,test:p,consequent:F(),alternate:null};r.append(m),r.stack.push(m),r.fragments.pop(),r.fragments.push(m.consequent)}else r.allowWhitespace(),r.eat("}",!0);return}if(l.type==="EachBlock"){if(!r.eat("else"))throw Error("sveld: expected {:else}");r.allowWhitespace(),r.eat("}",!0),l.fallback=F(),r.fragments.pop(),r.fragments.push(l.fallback);return}if(l.type==="AwaitBlock"){if(r.eat("then")){if(l.then)throw Error("sveld: duplicate {:then}");if(!r.eat("}"))r.requireWhitespace(),l.value=Q(r),r.allowWhitespace(),r.eat("}",!0);l.then=F(),r.fragments.pop(),r.fragments.push(l.then);return}if(r.eat("catch")){if(l.catch)throw Error("sveld: duplicate {:catch}");if(!r.eat("}"))r.requireWhitespace(),l.error=Q(r),r.allowWhitespace(),r.eat("}",!0);l.catch=F(),r.fragments.pop(),r.fragments.push(l.catch);return}throw Error("sveld: expected {:then ...} or {:catch ...}")}throw Error("sveld: {:...} not valid here")}function kt(r){let c=r.current();switch(c.type){case"IfBlock":{r.eat("if",!0),r.allowWhitespace(),r.eat("}",!0);while(c.type==="IfBlock"&&c.elseif)c.end=r.index,r.stack.pop(),c=r.current();c.end=r.index,r.pop();return}case"EachBlock":r.eat("each",!0);break;case"KeyBlock":r.eat("key",!0);break;case"AwaitBlock":r.eat("await",!0);break;case"SnippetBlock":r.eat("snippet",!0);break;default:throw Error("sveld: unexpected closing block tag")}r.allowWhitespace(),r.eat("}",!0),c.end=r.index,r.pop()}var rs=/(?:let|const)\b/y,ss=/(?:var|interface|enum)\b/y,is=/type\b/y;function Nt(r){let c=r.index;if(r.matchRegex(ss))throw Error("sveld: `var`/`interface`/`enum` are not valid here");if(!r.matchRegex(rs)&&!r.matchRegex(is))return null;let l=r.root.comments.length,p=tt(r.source,c,r.isTypeScript,r.root.comments);if(p.type!=="VariableDeclaration"){if(p.type==="ExpressionStatement")return r.root.comments.length=l,null;throw Error("sveld: expected a `let`/`const` declaration")}if(p.kind!=="let"&&p.kind!=="const")throw Error("sveld: expected a `let`/`const` declaration");return r.index=p.end,r.allowWhitespace(),r.eat("}",!0),p}var as=/\s*}/y;function vt(r){let c=r.index;while(r.source[c]!=="{")c-=1;if(r.eat("html")){r.requireWhitespace();let l=B(r);r.allowWhitespace(),r.eat("}",!0);let p={type:"HtmlTag",start:c,end:r.index,expression:l};r.append(p);return}if(r.eat("debug")){let l;if(r.read(as))l=[];else{let u=B(r);l=u.type==="SequenceExpression"?u.expressions:[u];for(let m of l)if(m.type!=="Identifier")throw Error("sveld: {@debug} arguments must be identifiers");r.allowWhitespace(),r.eat("}",!0)}let p={type:"DebugTag",start:c,end:r.index,identifiers:l};r.append(p);return}if(r.eat("const")){r.requireWhitespace();let l=Q(r);r.allowWhitespace(),r.eat("=",!0),r.allowWhitespace();let p=B(r),u=r.index;r.allowWhitespace(),r.eat("}",!0);let m={type:"VariableDeclarator",id:l,init:p,start:l.start,end:u},i={type:"ConstTag",start:c,end:r.index,declaration:{type:"VariableDeclaration",kind:"const",declarations:[m],start:c+2,end:r.index-1}};r.append(i);return}if(r.eat("render")){r.requireWhitespace();let l=B(r);if(!(l.type==="CallExpression"||l.type==="ChainExpression"&&l.expression.type==="CallExpression"))throw Error("sveld: {@render ...} must be a function call");r.allowWhitespace(),r.eat("}",!0);let u={type:"RenderTag",start:c,end:r.index,expression:l};r.append(u);return}throw Error("sveld: expected html/debug/const/render")}function It(r){let c=r.index;if(r.index+=1,r.allowWhitespace(),r.eat("#")){Pt(r);return}if(r.eat(":")){Ct(r);return}if(r.eat("@")){vt(r);return}if(r.match("/")&&!r.match("/*")&&!r.match("//")){r.eat("/"),kt(r);return}let l=Nt(r);if(l){let m={type:"DeclarationTag",start:c,end:r.index,declaration:l};r.append(m);return}let p=B(r);r.allowWhitespace(),r.eat("}",!0);let u={type:"ExpressionTag",start:c,end:r.index,expression:p};r.append(u)}function Lt(r){let{index:c,source:l}=r,p=l.indexOf("<",c),u=l.indexOf("{",c),m;if(p===-1)m=u===-1?l.length:u;else m=u===-1?p:Math.min(p,u);r.index=m;let i=l.slice(c,m),g={type:"Text",start:c,end:r.index,raw:i,data:i};r.append(g)}function q(r){let c=r.trimEnd(),l=new De(c,r.length);while(l.index<l.source.length)if(l.match("<"))gt(l);else if(l.match("{"))It(l);else Lt(l);let p=l.root.fragment.nodes.findIndex((u)=>u.type==="SvelteOptions");if(p!==-1){let[u]=l.root.fragment.nodes.splice(p,1);l.root.options=At(u)}return l.root}export{q};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{q}from"./chunk-qnj6xmb6.js";export{q as parse};
|
package/lib/cli-entry.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{z}from"./chunk-04eb8yj0.js";export{z as cli};
|