@geastack-community/zodiachain 0.0.0-stage → 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs ADDED
@@ -0,0 +1,64 @@
1
+ "use strict";var gg=Object.create;var Li=Object.defineProperty;var Pg=Object.getOwnPropertyDescriptor;var bg=Object.getOwnPropertyNames;var Eg=Object.getPrototypeOf,Ag=Object.prototype.hasOwnProperty;var Sl=(s,e)=>()=>{try{return e||s((e={exports:{}}).exports,e),e.exports}catch(t){throw e=0,t}},xl=(s,e)=>{for(var t in e)Li(s,t,{get:e[t],enumerable:!0})},gl=(s,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of bg(e))!Ag.call(s,r)&&r!==t&&Li(s,r,{get:()=>e[r],enumerable:!(i=Pg(e,r))||i.enumerable});return s};var Pl=(s,e,t)=>(t=s!=null?gg(Eg(s)):{},gl(e||!s||!s.__esModule?Li(t,"default",{value:s,enumerable:!0}):t,s)),Cg=s=>gl(Li({},"__esModule",{value:!0}),s);var cy=Sl((so,io)=>{(function(s,e){typeof so=="object"&&typeof io<"u"?io.exports=e():typeof define=="function"&&define.amd?define(e):(s=typeof globalThis<"u"?globalThis:s||self,s.resolveURI=e())})(so,(function(){"use strict";let s=/^[\w+.-]+:\/\//,e=/^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/,t=/^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;function i(N){return s.test(N)}function r(N){return N.startsWith("//")}function n(N){return N.startsWith("/")}function a(N){return N.startsWith("file:")}function o(N){return/^[.?#]/.test(N)}function c(N){let w=e.exec(N);return u(w[1],w[2]||"",w[3],w[4]||"",w[5]||"/",w[6]||"",w[7]||"")}function l(N){let w=t.exec(N),v=w[2];return u("file:","",w[1]||"","",n(v)?v:"/"+v,w[3]||"",w[4]||"")}function u(N,w,v,z,V,Z,Pe){return{scheme:N,user:w,host:v,port:z,path:V,query:Z,hash:Pe,type:7}}function f(N){if(r(N)){let v=c("http:"+N);return v.scheme="",v.type=6,v}if(n(N)){let v=c("http://foo.com"+N);return v.scheme="",v.host="",v.type=5,v}if(a(N))return l(N);if(i(N))return c(N);let w=c("http://foo.com/"+N);return w.scheme="",w.host="",w.type=N?N.startsWith("?")?3:N.startsWith("#")?2:4:1,w}function m(N){if(N.endsWith("/.."))return N;let w=N.lastIndexOf("/");return N.slice(0,w+1)}function x(N,w){I(w,w.type),N.path==="/"?N.path=w.path:N.path=m(w.path)+N.path}function I(N,w){let v=w<=4,z=N.path.split("/"),V=1,Z=0,Pe=!1;for(let Qe=1;Qe<z.length;Qe++){let wt=z[Qe];if(!wt){Pe=!0;continue}if(Pe=!1,wt!=="."){if(wt===".."){Z?(Pe=!0,Z--,V--):v&&(z[V++]=wt);continue}z[V++]=wt,Z++}}let qe="";for(let Qe=1;Qe<V;Qe++)qe+="/"+z[Qe];(!qe||Pe&&!qe.endsWith("/.."))&&(qe+="/"),N.path=qe}function L(N,w){if(!N&&!w)return"";let v=f(N),z=v.type;if(w&&z!==7){let Z=f(w),Pe=Z.type;switch(z){case 1:v.hash=Z.hash;case 2:v.query=Z.query;case 3:case 4:x(v,Z);case 5:v.user=Z.user,v.host=Z.host,v.port=Z.port;case 6:v.scheme=Z.scheme}Pe>z&&(z=Pe)}I(v,z);let V=v.query+v.hash;switch(z){case 2:case 3:return V;case 4:{let Z=v.path.slice(1);return Z?o(w||N)&&!o(Z)?"./"+Z+V:Z+V:V||"."}case 5:return v.path+V;default:return v.scheme+"//"+v.user+v.host+v.port+v.path+V}}return L}))});var Ly=Sl((dH,Dy)=>{"use strict";var vy={},CB=vy.hasOwnProperty,ky=(s,e)=>{for(let t in s)CB.call(s,t)&&e(t,s[t])},IB=(s,e)=>(e&&ky(e,(t,i)=>{s[t]=i}),s),wB=(s,e)=>{let t=s.length,i=-1;for(;++i<t;)e(s[i])},pr=s=>"\\u"+("0000"+s).slice(-4),si=(s,e)=>{let t=s.toString(16);return e?t:t.toUpperCase()},ii=vy.toString,NB=Array.isArray,vB=s=>typeof Buffer=="function"&&Buffer.isBuffer(s),kB=s=>ii.call(s)=="[object Object]",DB=s=>typeof s=="string"||ii.call(s)=="[object String]",LB=s=>typeof s=="number"||ii.call(s)=="[object Number]",po=s=>typeof s=="bigint",OB=s=>typeof s=="function",MB=s=>ii.call(s)=="[object Map]",FB=s=>ii.call(s)=="[object Set]",BB={"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t"},_B=/[\\\b\f\n\r\t]/,jB=/[0-9]/,RB=/[\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,UB=/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\uD800-\uDFFF])|(['"`])|[^]/g,VB=/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\uD800-\uDFFF])|(['"`])|[^ !#-&\(-\[\]-_a-~]/g,Pt=(s,e)=>{let t=()=>{l=c,++e.indentLevel,c=e.indent.repeat(e.indentLevel)},i={escapeEverything:!1,minimal:!1,isScriptContext:!1,quotes:"single",wrap:!1,es6:!1,json:!1,compact:!0,lowercaseHex:!1,numbers:"decimal",indent:" ",indentLevel:0,__inline1__:!1,__inline2__:!1},r=e&&e.json;r&&(i.quotes="double",i.wrap=!0),e=IB(i,e),e.quotes!="single"&&e.quotes!="double"&&e.quotes!="backtick"&&(e.quotes="single");let n=e.quotes=="double"?'"':e.quotes=="backtick"?"`":"'",a=e.compact,o=e.lowercaseHex,c=e.indent.repeat(e.indentLevel),l="",u=e.__inline1__,f=e.__inline2__,m=a?"":`
2
+ `,x,I=!0,L=e.numbers=="binary",N=e.numbers=="octal",w=e.numbers=="decimal",v=e.numbers=="hexadecimal";if(r&&s&&OB(s.toJSON)&&(s=s.toJSON()),!DB(s)){if(MB(s))return s.size==0?"new Map()":(a||(e.__inline1__=!0,e.__inline2__=!1),"new Map("+Pt(Array.from(s),e)+")");if(FB(s))return s.size==0?"new Set()":"new Set("+Pt(Array.from(s),e)+")";if(vB(s))return s.length==0?"Buffer.from([])":"Buffer.from("+Pt(Array.from(s),e)+")";if(NB(s))return x=[],e.wrap=!0,u&&(e.__inline1__=!1,e.__inline2__=!0),f||t(),wB(s,V=>{I=!1,f&&(e.__inline2__=!1),x.push((a||f?"":c)+Pt(V,e))}),I?"[]":f?"["+x.join(", ")+"]":"["+m+x.join(","+m)+m+(a?"":l)+"]";if(LB(s)||po(s)){if(r)return JSON.stringify(Number(s));let V;if(w)V=String(s);else if(v){let Z=s.toString(16);o||(Z=Z.toUpperCase()),V="0x"+Z}else L?V="0b"+s.toString(2):N&&(V="0o"+s.toString(8));return po(s)?V+"n":V}else return po(s)?r?JSON.stringify(Number(s)):s+"n":kB(s)?(x=[],e.wrap=!0,t(),ky(s,(V,Z)=>{I=!1,x.push((a?"":c)+Pt(V,e)+":"+(a?"":" ")+Pt(Z,e))}),I?"{}":"{"+m+x.join(","+m)+m+(a?"":l)+"}"):r?JSON.stringify(s)||"null":String(s)}let z=e.escapeEverything?UB:VB;return x=s.replace(z,(V,Z,Pe,qe,Qe,wt)=>{if(Z){if(e.minimal)return Z;let yl=Z.charCodeAt(0),Tl=Z.charCodeAt(1);if(e.es6){let xg=(yl-55296)*1024+Tl-56320+65536;return"\\u{"+si(xg,o)+"}"}return pr(si(yl,o))+pr(si(Tl,o))}if(Pe)return pr(si(Pe.charCodeAt(0),o));if(V=="\0"&&!r&&!jB.test(wt.charAt(Qe+1)))return"\\0";if(qe)return qe==n||e.escapeEverything?"\\"+qe:qe;if(_B.test(V))return BB[V];if(e.minimal&&!RB.test(V))return V;let ln=si(V.charCodeAt(0),o);return r||ln.length>2?pr(ln):"\\x"+("00"+ln).slice(-2)}),n=="`"&&(x=x.replace(/\$\{/g,"\\${")),e.isScriptContext&&(x=x.replace(/<\/(script|style)/gi,"<\\/$1").replace(/<!--/g,r?"\\u003C!--":"\\x3C!--")),e.wrap&&(x=n+x+n),x};Pt.version="3.0.2";Dy.exports=Pt});var Dz={};xl(Dz,{default:()=>kz,geatscPlugin:()=>vz,zodiachainPlugin:()=>ml});module.exports=Cg(Dz);var Sg=require("@geastack/compiler/plugin");var Fe=class{constructor(e,t,i){this.line=void 0,this.column=void 0,i!==void 0&&(this.index=void 0),this.line=e,this.column=t,i!==void 0&&(this.index=i)}},es=class{start;end;filename;identifierName;constructor(e,t){this.start=e,this.end=t}};function ze(s,e){let{line:t,column:i,index:r}=s;return new Fe(t,i+e,r+e)}var bl="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",Ig={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:bl},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:bl}},El={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},_i=s=>s.type==="UpdateExpression"?El.UpdateExpression[`${s.prefix}`]:El[s.type],wg={AccessorIsGenerator:({kind:s})=>`A ${s}ter cannot be a generator.`,ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:({kind:s})=>`Missing initializer in ${s} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',DeletePrivateField:"Deleting a private field is not allowed.",DestructureNamedImport:"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",DuplicateConstructor:"Duplicate constructor in the same class.",DuplicateDefaultExport:"Only one default export allowed per module.",DuplicateExport:({exportName:s})=>`\`${s}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName:s,exportName:e})=>`A string literal cannot be used as an exported binding without \`from\`.
3
+ - Did you mean \`export { '${s}' as '${e}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:s})=>`'${s==="ForInStatement"?"for-in":"for-of"}' loop variable declaration may not have an initializer.`,ForInUsing:"For-in loop may not start with 'using' declaration.",ForOfAsync:"The left-hand side of a for-of loop may not be 'async'.",ForOfLet:"The left-hand side of a for-of loop may not start with 'let'.",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block.",IllegalBreakContinue:({type:s})=>`Unsyntactic ${s==="BreakStatement"?"break":"continue"}.`,IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportBindingIsString:({importName:s})=>`A string literal cannot be used as an imported binding.
4
+ - Did you mean \`import { "${s}" as foo }\`?`,ImportCallArity:({phase:s})=>`\`import${s?`.${s}`:""}()\` requires exactly one or two arguments.`,ImportCallNotNewExpression:({phase:s})=>`Cannot use new with import${s?`.${s}`:""}().`,ImportCallSpreadArgument:({phase:s})=>`\`...\` is not allowed in \`import${s?`.${s}`:""}()\`.`,IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverDiscardElement:"'void' must be followed by an expression when not used in a binding position.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDigit:({radix:s})=>`Expected number in radix ${s}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:s})=>`Escape sequence in keyword ${s}.`,InvalidIdentifier:({identifierName:s})=>`Invalid identifier ${s}.`,InvalidLhs:({ancestor:s})=>`Invalid left-hand side in ${_i(s)}.`,InvalidLhsBinding:({ancestor:s})=>`Binding invalid left-hand side in ${_i(s)}.`,InvalidLhsOptionalChaining:({ancestor:s})=>`Invalid optional chaining in the left-hand side of ${_i(s)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:s})=>`Unexpected character '${s}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:s})=>`Private name #${s} is not defined.`,InvalidPropertyBindingPattern:"Binding member expression.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:({labelName:s})=>`Label '${s}' is already declared.`,LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingPlugin:({missingPlugin:s})=>`This experimental syntax requires enabling the parser plugin: ${s.map(e=>JSON.stringify(e)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:s})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${s.map(e=>JSON.stringify(e)).join(", ")}.`,MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:({key:s})=>`Duplicate key "${s}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:s})=>`An export name cannot include a lone surrogate, found '\\u${s.toString(16)}'.`,ModuleExportUndefined:({localName:s})=>`Export '${s}' is not defined.`,MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:({identifierName:s})=>`Private names are only allowed in property accesses (\`obj.#${s}\`) or in \`in\` expressions (\`#${s} in obj\`).`,PrivateNameRedeclaration:({identifierName:s})=>`Duplicate private name #${s}.`,RestTrailingComma:"Unexpected trailing comma after rest element.",SloppyFunction:"In non-strict mode code, functions can only be declared at top level or inside a block.",SloppyFunctionAnnexB:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",SourcePhaseImportRequiresDefault:'Only `import source x from "./module"` is valid.',StaticPrototype:"Classes may not have static property named prototype.",SuperCallNotNewExpression:"Cannot use new with super(...).",SuperNotAllowed:"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:"Private fields can't be accessed on super.",TrailingDecorator:"Decorators must be attached to a class element.",UnexpectedArgumentPlaceholder:"Unexpected argument placeholder.",UnexpectedDigitAfterHash:"Unexpected digit after hash token.",UnexpectedImportExport:"'import' and 'export' may only appear at the top level.",UnexpectedKeyword:({keyword:s})=>`Unexpected keyword '${s}'.`,UnexpectedLeadingDecorator:"Leading decorators must be attached to a class declaration.",UnexpectedLexicalDeclaration:"Lexical declaration cannot appear in a single-statement context.",UnexpectedNewTarget:"`new.target` can only be used in functions or class properties.",UnexpectedNumericSeparator:"A numeric separator is only allowed between two digits.",UnexpectedPrivateField:"Unexpected private name.",UnexpectedReservedWord:({reservedWord:s})=>`Unexpected reserved word '${s}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:s,unexpected:e})=>`Unexpected token${e?` '${e}'.`:""}${s?`, expected "${s}"`:""}`,UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",UnexpectedUsingDeclaration:"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement.",UnexpectedVoidPattern:"Unexpected void binding.",UnsupportedDecoratorExport:"A decorated export must export a class declaration.",UnsupportedDefaultExport:"Only expressions, functions or classes are allowed as the `default` export.",UnsupportedImport:"`import` can only be used in `import()` or `import.meta`.",UnsupportedMetaProperty:({target:s,onlyValidPropertyName:e})=>`The only valid meta property for ${s} is ${s}.${e}.`,UnsupportedParameterDecorator:"Decorators cannot be used to decorate parameters.",UnsupportedPropertyDecorator:"Decorators cannot be used to decorate object literal properties.",UnsupportedSuper:"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",UnterminatedComment:"Unterminated comment.",UnterminatedRegExp:"Unterminated regular expression.",UnterminatedString:"Unterminated string constant.",UnterminatedTemplate:"Unterminated template.",UsingDeclarationExport:"Using declaration cannot be exported.",UsingDeclarationHasBindingPattern:"Using declaration cannot have destructuring patterns.",VarRedeclaration:({identifierName:s})=>`Identifier '${s}' has already been declared.`,VoidPatternCatchClauseParam:"A void binding can not be the catch clause parameter. Use `try { ... } catch { ... }` if you want to discard the caught error.",VoidPatternInitializer:"A void binding may not have an initializer.",YieldBindingIdentifier:"Can not use 'yield' as identifier inside a generator.",YieldInParameter:"Yield expression is not allowed in formal parameters.",YieldNotInGeneratorFunction:"'yield' is only allowed within generator functions.",ZeroDigitNumericSeparator:"Numeric separator can not be used after leading 0."},Ng={StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:s})=>`Assigning to '${s}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:s})=>`Binding '${s}' in strict mode.`,StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block.",StrictNumericEscape:"The only valid numeric escape in strict mode is '\\0'.",StrictOctalLiteral:"Legacy octal literals are not allowed in strict mode.",StrictWith:"'with' in strict mode."},vg={ParseExpressionEmptyInput:"Unexpected parseExpression() input: The input is empty or contains only comments.",ParseExpressionExpectsEOF:({unexpected:s})=>`Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`${String.fromCodePoint(s)}\`.`},kg=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]),Dg={PipeTopicRequiresHackPipes:'Topic references are only supported when using the `"proposal": "hack"` version of the pipeline proposal.',PipeTopicUnbound:"Topic reference is unbound; it must be inside a pipe body.",PipeTopicUnconfiguredToken:({token:s})=>`Invalid topic token ${s}. In order to use ${s} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${s}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:s})=>`Hack-style pipe body cannot be an unparenthesized ${_i({type:s})}; please wrap it in parentheses.`,PipelineUnparenthesized:"Cannot mix binary operator with solo-await F#-style pipeline. Please wrap the pipeline in parentheses."},Lg={UnsupportedBind:"Binding should be performed on object property.",UnsupportedBindRHS:"The right-hand side of binding can not be super or import."};function Al(s,e,t){Object.defineProperty(s,e,{enumerable:!1,configurable:!0,value:t})}function Og({toMessage:s,code:e,reasonCode:t,syntaxPlugin:i}){let r=t==="MissingPlugin"||t==="MissingOneOfPlugins";return function n(a,o,c){let l=new SyntaxError;return l.code=e,l.reasonCode=t,l.loc=a,l.pos=o,l.syntaxPlugin=i,r&&(l.missingPlugin=c.missingPlugin),Al(l,"clone",function(f={}){let{line:m,column:x,index:I=o}=f.loc??a;return n(new Fe(m,x),I,{...c,...f.details})}),Al(l,"details",c),Object.defineProperty(l,"message",{configurable:!0,get(){let u=`${s(c)} (${a.line}:${a.column})`;return this.message=u,u},set(u){Object.defineProperty(this,"message",{value:u,writable:!0})}}),l}}function Ze(s,e){if(Array.isArray(s))return i=>Ze(i,s[0]);let t={};for(let i of Object.keys(s)){let r=s[i],{message:n,...a}=typeof r=="string"?{message:()=>r}:typeof r=="function"?{message:r}:r,o=typeof n=="string"?()=>n:n;t[i]=Og({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:i,toMessage:o,...e?{syntaxPlugin:e}:{},...a})}return t}var b={...Ze(Ig),...Ze(wg),...Ze(Ng),...Ze(vg),...Ze`pipelineOperator`(Dg),...Ze`functionBind`(Lg)};function Mg(){return{sourceType:"script",sourceFilename:void 0,startIndex:0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,allowYieldOutsideFunction:!1,plugins:[],strictMode:void 0,ranges:!1,locations:!0,tokens:!1,createImportExpressions:!0,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0}}function Fg(s){let e=Mg();if(s==null)return e;if(s.annexB!=null&&s.annexB!==!1)throw new Error("The `annexB` option can only be set to `false`.");for(let t of Object.keys(e))s[t]!=null&&(e[t]=s[t]);if(e.startLine===1)s.startIndex==null&&e.startColumn>0?e.startIndex=e.startColumn:s.startColumn==null&&e.startIndex>0&&(e.startColumn=e.startIndex);else if(s.startColumn==null||s.startIndex==null)throw new Error("With a `startLine > 1` you must also specify `startIndex` and `startColumn`.");if(e.sourceType==="commonjs"){if(s.allowAwaitOutsideFunction!=null)throw new Error("The `allowAwaitOutsideFunction` option cannot be used with `sourceType: 'commonjs'`.");if(s.allowReturnOutsideFunction!=null)throw new Error("`sourceType: 'commonjs'` implies `allowReturnOutsideFunction: true`, please remove the `allowReturnOutsideFunction` option or use `sourceType: 'script'`.");if(s.allowNewTargetOutsideFunction!=null)throw new Error("`sourceType: 'commonjs'` implies `allowNewTargetOutsideFunction: true`, please remove the `allowNewTargetOutsideFunction` option or use `sourceType: 'script'`.")}return e}function Yt(s){let{start:e,end:t}=s.loc;return s.loc.start=new Fe(e.line,e.column),s.loc.end=new Fe(t.line,t.column),s}var Bg=s=>class extends s{createPosition(t){return new Fe(t.line,t.column)}parse(){let t=super.parse();return this.optionFlags&512&&(t.tokens=t.tokens.map(Yt)),Yt(t)}parseRegExpLiteral({pattern:t,flags:i}){let r=null;try{r=new RegExp(t,i)}catch{}let n=this.estreeParseLiteral(r);return n.regex={pattern:t,flags:i},n}parseBigIntLiteral(t){let i;try{i=BigInt(t)}catch{i=null}let r=this.estreeParseLiteral(i);return r.bigint=r.value!==null?String(r.value):t,r}estreeParseLiteral(t){return this.parseLiteral(t,"Literal")}parseStringLiteral(t){return this.estreeParseLiteral(t)}parseNumericLiteral(t){return this.estreeParseLiteral(t)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(t){return this.estreeParseLiteral(t)}estreeParseChainExpression(t,i){let r=this.startNodeAtNode(t);return r.expression=t,this.finishNodeAtNode(r,"ChainExpression",i)}directiveToStmt(t){let i=t.value;delete t.value,this.castNodeTo(i,"Literal"),i.raw=i.extra.raw,i.value=i.extra.expressionValue;let r=this.castNodeTo(t,"ExpressionStatement");return r.expression=i,r.directive=i.extra.rawValue,delete i.extra,r}fillOptionalPropertiesForTSESLint(t){}cloneEstreeStringLiteral(t){let{start:i,end:r,loc:n,range:a,raw:o,value:c}=t,l=Object.create(t.constructor.prototype);return l.type="Literal",l.start=i,l.end=r,l.loc=n,l.range=a,l.raw=o,l.value=c,l}initFunction(t,i){super.initFunction(t,i),t.expression=!1}checkDeclaration(t){t!=null&&this.isObjectProperty(t)?this.checkDeclaration(t.value):super.checkDeclaration(t)}getObjectOrClassMethodParams(t){return t.value.params}isValidDirective(t){return t.type==="ExpressionStatement"&&t.expression.type==="Literal"&&typeof t.expression.value=="string"&&!t.expression.extra?.parenthesized}parseBlockBody(t,i,r,n,a){super.parseBlockBody(t,i,r,n,a);let o=t.directives.map(c=>this.directiveToStmt(c));t.body=o.concat(t.body),delete t.directives}parsePrivateName(){let t=super.parsePrivateName();return this.convertPrivateNameToPrivateIdentifier(t)}convertPrivateNameToPrivateIdentifier(t){let i=super.getPrivateNameSV(t);return delete t.id,t.name=i,this.castNodeTo(t,"PrivateIdentifier")}isPrivateName(t){return t.type==="PrivateIdentifier"}getPrivateNameSV(t){return t.name}parseLiteral(t,i){let r=super.parseLiteral(t,i);return r.raw=r.extra.raw,delete r.extra,r}parseFunctionBody(t,i,r=!1){super.parseFunctionBody(t,i,r),t.expression=t.body.type!=="BlockStatement"}parseMethod(t,i,r,n,a,o,c=!1){let l=this.startNode();l.kind=t.kind,l=super.parseMethod(l,i,r,n,a,o,c),delete l.kind;let{typeParameters:u}=t;u&&(delete t.typeParameters,l.typeParameters=u,this.resetStartLocationFromNode(l,u));let f=this.castNodeTo(l,this.hasPlugin("typescript")&&!l.body?"TSEmptyBodyFunctionExpression":"FunctionExpression");return t.value=f,o==="ClassPrivateMethod"&&(t.computed=!1),this.hasPlugin("typescript")&&t.abstract?(delete t.abstract,this.finishNode(t,"TSAbstractMethodDefinition")):o==="ObjectMethod"?(t.kind==="method"&&(t.kind="init"),t.shorthand=!1,this.finishNode(t,"Property")):this.finishNode(t,"MethodDefinition")}nameIsConstructor(t){return t.type==="Literal"?t.value==="constructor":super.nameIsConstructor(t)}parseClassProperty(...t){let i=super.parseClassProperty(...t);return i.abstract&&this.hasPlugin("typescript")?(delete i.abstract,this.castNodeTo(i,"TSAbstractPropertyDefinition")):this.castNodeTo(i,"PropertyDefinition"),i}parseClassPrivateProperty(...t){let i=super.parseClassPrivateProperty(...t);return i.abstract&&this.hasPlugin("typescript")?this.castNodeTo(i,"TSAbstractPropertyDefinition"):this.castNodeTo(i,"PropertyDefinition"),i.computed=!1,i}parseClassAccessorProperty(t){let i=super.parseClassAccessorProperty(t);return i.abstract&&this.hasPlugin("typescript")?(delete i.abstract,this.castNodeTo(i,"TSAbstractAccessorProperty")):this.castNodeTo(i,"AccessorProperty"),i}parseObjectProperty(t,i,r,n){let a=super.parseObjectProperty(t,i,r,n);return a&&(a.kind="init",this.castNodeTo(a,"Property")),a}finishObjectProperty(t){return t.kind="init",this.finishNode(t,"Property")}isValidLVal(t,i,r,n){return t==="Property"?"value":super.isValidLVal(t,i,r,n)}isAssignable(t,i){return t!=null&&this.isObjectProperty(t)?this.isAssignable(t.value,i):super.isAssignable(t,i)}toAssignable(t,i=!1){if(t!=null&&this.isObjectProperty(t)){let{key:r,value:n}=t;this.isPrivateName(r)&&this.classScope.usePrivateName(this.getPrivateNameSV(r),r.start),this.toAssignable(n,i)}else super.toAssignable(t,i)}toAssignableObjectExpressionProp(t,i,r){t.type==="Property"&&(t.kind==="get"||t.kind==="set")?this.raise(b.PatternHasAccessor,t.key):t.type==="Property"&&t.method?this.raise(b.PatternHasMethod,t.key):super.toAssignableObjectExpressionProp(t,i,r)}finishCallExpression(t,i){let r=super.finishCallExpression(t,i);return r.callee.type==="Import"?(this.castNodeTo(r,"ImportExpression"),r.source=r.arguments[0],r.options=r.arguments[1]??null,delete r.arguments,delete r.callee):r.type==="OptionalCallExpression"?this.castNodeTo(r,"CallExpression"):r.optional=!1,r}parseExport(t,i){let r=this.state.lastTokStartLoc,n=super.parseExport(t,i);switch(n.type){case"ExportAllDeclaration":n.exported=null;break;case"ExportNamedDeclaration":n.specifiers.length===1&&n.specifiers[0].type==="ExportNamespaceSpecifier"&&(this.castNodeTo(n,"ExportAllDeclaration"),n.exported=n.specifiers[0].exported,delete n.specifiers);case"ExportDefaultDeclaration":{let{declaration:a}=n;a?.type==="ClassDeclaration"&&a.decorators?.length>0&&a.start===n.start&&this.resetStartLocation(n,r)}break}return n}stopParseSubscript(t,i){let r=super.stopParseSubscript(t,i);return i.optionalChainMember?this.estreeParseChainExpression(r,t):r}parseMember(t,i,r,n,a){let o=super.parseMember(t,i,r,n,a);return o.type==="OptionalMemberExpression"?this.castNodeTo(o,"MemberExpression"):o.optional=!1,o}isOptionalMemberExpression(t){return t.type==="ChainExpression"?t.expression.type==="MemberExpression":super.isOptionalMemberExpression(t)}hasPropertyAsPrivateName(t){return t.type==="ChainExpression"&&(t=t.expression),super.hasPropertyAsPrivateName(t)}isObjectProperty(t){return t.type==="Property"&&t.kind==="init"&&!t.method}isObjectMethod(t){return t.type==="Property"&&(t.method||t.kind==="get"||t.kind==="set")}castNodeTo(t,i){let r=super.castNodeTo(t,i);return this.fillOptionalPropertiesForTSESLint(r),r}cloneIdentifier(t){let i=super.cloneIdentifier(t);return this.fillOptionalPropertiesForTSESLint(i),i}cloneStringLiteral(t){return t.type==="Literal"?this.cloneEstreeStringLiteral(t):super.cloneStringLiteral(t)}finishNodeAt(t,i,r){return Yt(super.finishNodeAt(t,i,r))}finishNodeAtNode(t,i,r){return Yt(super.finishNodeAtNode(t,i,r))}finishNode(t,i){let r=super.finishNode(t,i);return this.fillOptionalPropertiesForTSESLint(r),r}resetStartLocation(t,i){super.resetStartLocation(t,i),Yt(t)}resetEndLocation(t,i=this.state.lastTokEndLoc){super.resetEndLocation(t,i),Yt(t)}},ae=!0,_=!0,un=!0,Os=!0,dt=!0,_g=!0,Ui=class{label;keyword;beforeExpr;startsExpr;rightAssociative;isLoop;isAssign;prefix;postfix;binop;constructor(e,t={}){this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.rightAssociative=!!t.rightAssociative,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop!=null?t.binop:null}},jn=new Map;function he(s,e={}){e.keyword=s;let t=G(s,e);return jn.set(s,t),t}function je(s,e){return G(s,{beforeExpr:ae,binop:e})}var Bs=-1,Rn=[],Un=[],Vn=[],Kn=[],qn=[],$n=[];function G(s,e={}){return++Bs,Un.push(s),Vn.push(e.binop??-1),Kn.push(e.beforeExpr??!1),qn.push(e.startsExpr??!1),$n.push(e.prefix??!1),Rn.push(new Ui(s,e)),Bs}function ie(s,e={}){return++Bs,jn.set(s,Bs),Un.push(s),Vn.push(e.binop??-1),Kn.push(e.beforeExpr??!1),qn.push(e.startsExpr??!1),$n.push(e.prefix??!1),Rn.push(new Ui("name",e)),Bs}var jg={bracketL:G("[",{beforeExpr:ae,startsExpr:_}),bracketR:G("]"),braceL:G("{",{beforeExpr:ae,startsExpr:_}),braceBarL:G("{|",{beforeExpr:ae,startsExpr:_}),braceR:G("}"),braceBarR:G("|}"),parenL:G("(",{beforeExpr:ae,startsExpr:_}),parenR:G(")"),comma:G(",",{beforeExpr:ae}),semi:G(";",{beforeExpr:ae}),colon:G(":",{beforeExpr:ae}),doubleColon:G("::",{beforeExpr:ae}),dot:G("."),question:G("?",{beforeExpr:ae}),questionDot:G("?."),arrow:G("=>",{beforeExpr:ae}),template:G("template"),ellipsis:G("...",{beforeExpr:ae}),backQuote:G("`",{startsExpr:_}),dollarBraceL:G("${",{beforeExpr:ae,startsExpr:_}),templateTail:G("...`",{startsExpr:_}),templateNonTail:G("...${",{beforeExpr:ae,startsExpr:_}),at:G("@"),hash:G("#",{startsExpr:_}),interpreterDirective:G("#!..."),eq:G("=",{beforeExpr:ae,isAssign:Os}),assign:G("_=",{beforeExpr:ae,isAssign:Os}),slashAssign:G("_=",{beforeExpr:ae,isAssign:Os}),xorAssign:G("_=",{beforeExpr:ae,isAssign:Os}),moduloAssign:G("_=",{beforeExpr:ae,isAssign:Os}),incDec:G("++/--",{prefix:dt,postfix:_g,startsExpr:_}),bang:G("!",{beforeExpr:ae,prefix:dt,startsExpr:_}),tilde:G("~",{beforeExpr:ae,prefix:dt,startsExpr:_}),doubleCaret:G("^^",{startsExpr:_}),doubleAt:G("@@",{startsExpr:_}),pipeline:je("|>",0),nullishCoalescing:je("??",1),logicalOR:je("||",1),logicalAND:je("&&",2),bitwiseOR:je("|",3),bitwiseXOR:je("^",4),bitwiseAND:je("&",5),equality:je("==/!=/===/!==",6),lt:je("</>/<=/>=",7),gt:je("</>/<=/>=",7),relational:je("</>/<=/>=",7),bitShift:je("<</>>/>>>",8),bitShiftL:je("<</>>/>>>",8),bitShiftR:je("<</>>/>>>",8),plusMin:G("+/-",{beforeExpr:ae,binop:9,prefix:dt,startsExpr:_}),modulo:G("%",{binop:10,startsExpr:_}),star:G("*",{binop:10}),slash:je("/",10),exponent:G("**",{beforeExpr:ae,binop:11,rightAssociative:!0}),_in:he("in",{beforeExpr:ae,binop:7}),_instanceof:he("instanceof",{beforeExpr:ae,binop:7}),_break:he("break"),_case:he("case",{beforeExpr:ae}),_catch:he("catch"),_continue:he("continue"),_debugger:he("debugger"),_default:he("default",{beforeExpr:ae}),_else:he("else",{beforeExpr:ae}),_finally:he("finally"),_function:he("function",{startsExpr:_}),_if:he("if"),_return:he("return",{beforeExpr:ae}),_switch:he("switch"),_throw:he("throw",{beforeExpr:ae,prefix:dt,startsExpr:_}),_try:he("try"),_var:he("var"),_const:he("const"),_with:he("with"),_new:he("new",{beforeExpr:ae,startsExpr:_}),_this:he("this",{startsExpr:_}),_super:he("super",{startsExpr:_}),_class:he("class",{startsExpr:_}),_extends:he("extends",{beforeExpr:ae}),_export:he("export"),_import:he("import",{startsExpr:_}),_null:he("null",{startsExpr:_}),_true:he("true",{startsExpr:_}),_false:he("false",{startsExpr:_}),_typeof:he("typeof",{beforeExpr:ae,prefix:dt,startsExpr:_}),_void:he("void",{beforeExpr:ae,prefix:dt,startsExpr:_}),_delete:he("delete",{beforeExpr:ae,prefix:dt,startsExpr:_}),_do:he("do",{isLoop:un,beforeExpr:ae}),_for:he("for",{isLoop:un}),_while:he("while",{isLoop:un}),_arguments:ie("arguments",{startsExpr:_}),_as:ie("as",{startsExpr:_}),_assert:ie("assert",{startsExpr:_}),_async:ie("async",{startsExpr:_}),_await:ie("await",{startsExpr:_}),_defer:ie("defer",{startsExpr:_}),_from:ie("from",{startsExpr:_}),_get:ie("get",{startsExpr:_}),_let:ie("let",{startsExpr:_}),_meta:ie("meta",{startsExpr:_}),_of:ie("of",{startsExpr:_}),_sent:ie("sent",{startsExpr:_}),_set:ie("set",{startsExpr:_}),_source:ie("source",{startsExpr:_}),_static:ie("static",{startsExpr:_}),_using:ie("using",{startsExpr:_}),_yield:ie("yield",{startsExpr:_}),_asserts:ie("asserts",{startsExpr:_}),_checks:ie("checks",{startsExpr:_}),_exports:ie("exports",{startsExpr:_}),_global:ie("global",{startsExpr:_}),_implements:ie("implements",{startsExpr:_}),_intrinsic:ie("intrinsic",{startsExpr:_}),_infer:ie("infer",{startsExpr:_}),_is:ie("is",{startsExpr:_}),_mixins:ie("mixins",{startsExpr:_}),_proto:ie("proto",{startsExpr:_}),_require:ie("require",{startsExpr:_}),_satisfies:ie("satisfies",{startsExpr:_}),_keyof:ie("keyof",{startsExpr:_}),_readonly:ie("readonly",{startsExpr:_}),_unique:ie("unique",{startsExpr:_}),_abstract:ie("abstract",{startsExpr:_}),_declare:ie("declare",{startsExpr:_}),_enum:ie("enum",{startsExpr:_}),_module:ie("module",{startsExpr:_}),_namespace:ie("namespace",{startsExpr:_}),_interface:ie("interface",{startsExpr:_}),_type:ie("type",{startsExpr:_}),_opaque:ie("opaque",{startsExpr:_}),name:G("name",{startsExpr:_}),placeholder:G("%%",{startsExpr:_}),string:G("string",{startsExpr:_}),num:G("num",{startsExpr:_}),bigint:G("bigint",{startsExpr:_}),regexp:G("regexp",{startsExpr:_}),privateName:G("#name",{startsExpr:_}),eof:G("eof"),jsxName:G("jsxName"),jsxText:G("jsxText",{beforeExpr:ae}),jsxTagStart:G("jsxTagStart",{startsExpr:_}),jsxTagEnd:G("jsxTagEnd")};function de(s){return s>=89&&s<=130}function Rg(s){return s<=88}function $e(s){return s>=54&&s<=130}function Rl(s){return s>=54&&s<=133}function Ug(s){return Kn[s]}function Fs(s){return qn[s]}function Vg(s){return s>=25&&s<=29}function Cl(s){return s>=126&&s<=128}function Kg(s){return s>=86&&s<=88}function $i(s){return s>=54&&s<=88}function qg(s){return s>=35&&s<=55}function $g(s){return s===30}function Jg(s){return $n[s]}function Xg(s){return s>=118&&s<=120}function Wg(s){return s>=121&&s<=127}function Tt(s){return Un[s]}function ji(s){return Vn[s]}function zg(s){return s===53}function mn(s){return s>=20&&s<=21}function Ul(s){return Rn[s]}var Gt=class{constructor(e,t){this.token=e,this.preserveSpace=!!t}token;preserveSpace},be={brace:new Gt("{"),j_oTag:new Gt("<tag"),j_cTag:new Gt("</tag"),j_expr:new Gt("<tag>...</tag>",!0)},Il=/[\p{ID_Start}\u0558\u058b\u058c\u088f\u0c5c\u0cdc\u208f\u209d-\u209f\ua7ce\ua7cf\ua7d2\ua7d4\ua7dd\ua7e2\ua7f1\uab6c\uab6d]/u,wl=/[\p{ID_Continue}\u0558\u058b\u058c\u088f\u0c5c\u0cdc\u208f\u209d-\u209f\ua7ce\ua7cf\ua7d2\ua7d4\ua7dd\ua7e2\ua7f1\uab6c\uab6d\u05c8\u05c9\u0b53\u0b54\u1acf-\u1af0]/u,Vl=[1979,4,385,25,1388,2,18,21,3100,0,678,43,22,0,1662,0,6,10,209,310,18458,24,3,24,287,4,6146,7,1239,4,47,23,96,114,14,913,15,50,8017,5,64,0,9534,0,2169,5,7,86,15,6,55,50,1729,30,2,2,2,1,2,6,3,4,10,1,53307,5,223,0,5764,11,21763,4297,39815,11327],Hg=[3787,4,33,11,3173,7,633,9,7,0,45879,1,296,2,9,1,3,0,33,1,5218,0,3,0,8,1,6,0];function yn(s,e){let t=65536;for(let i=0,r=e.length;i<r;i+=2){if(t+=e[i],t>s)return!1;if(t+=e[i+1],t>=s)return!0}return!1}function ot(s){return s<65?s===36:s<=90?!0:s<97?s===95:s<=122?!0:s<=65535?s>=170&&Il.test(String.fromCharCode(s)):!isNaN(s)&&s<=1114111&&(Il.test(String.fromCodePoint(s))||yn(s,Vl))}function kt(s){return s<48?s===36:s<58?!0:s<65?!1:s<=90?!0:s<97?s===95:s<=122?!0:s<=65535?s>=170&&wl.test(String.fromCharCode(s)):!isNaN(s)&&s<=1114111&&(wl.test(String.fromCodePoint(s))||yn(s,Vl)||yn(s,Hg))}var Jn={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},Yg=new Set(Jn.keyword),Gg=new Set(Jn.strict),Qg=new Set(Jn.strictBind);function Kl(s,e){return e&&s==="await"||s==="enum"}function ql(s,e){return Kl(s,e)||Gg.has(s)}function $l(s){return Qg.has(s)}function Jl(s,e){return ql(s,e)||$l(s)}function Zg(s){return Yg.has(s)}function eP(s,e,t){return s===64&&e===64&&ot(t)}var tP=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete","implements","interface","let","package","private","protected","public","static","yield","eval","arguments","enum","await"]);function sP(s){return tP.has(s)}var _s=class{flags=0;names=new Map;firstLexicalName="";constructor(e){this.flags=e}},js=class{parser;scopeStack=[];inModule;undefinedExports=new Map;constructor(e,t){this.parser=e,this.inModule=t}get inTopLevel(){return(this.currentScope().flags&1)>0}get inFunction(){return(this.currentVarScopeFlags()&2)>0}get allowSuper(){return(this.currentThisScopeFlags()&16)>0}get allowDirectSuper(){return(this.currentThisScopeFlags()&32)>0}get allowNewTarget(){return(this.currentThisScopeFlags()&512)>0}get inClass(){return(this.currentThisScopeFlags()&64)>0}get inClassAndNotInNonArrowFunction(){let e=this.currentThisScopeFlags();return(e&64)>0&&(e&2)===0}get inStaticBlock(){for(let e=this.scopeStack.length-1;;e--){let{flags:t}=this.scopeStack[e];if(t&128)return!0;if(t&3779)return!1}}get inNonArrowFunction(){return(this.currentThisScopeFlags()&2)>0}get inBareCaseStatement(){return(this.currentScope().flags&256)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(e){return new _s(e)}enter(e){this.scopeStack.push(this.createScope(e))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(e){return!!(e.flags&130||!this.parser.inModule&&e.flags&1)}declareName(e,t,i){let r=this.currentScope();if(t&8||t&16){this.checkRedeclarationInScope(r,e,t,i);let n=r.names.get(e)||0;t&16?n=n|4:(r.firstLexicalName||(r.firstLexicalName=e),n=n|2),r.names.set(e,n),t&8&&this.maybeExportDefined(r,e)}else if(t&4)for(let n=this.scopeStack.length-1;n>=0&&(r=this.scopeStack[n],this.checkRedeclarationInScope(r,e,t,i),r.names.set(e,(r.names.get(e)||0)|1),this.maybeExportDefined(r,e),!(r.flags&3715));--n);this.parser.inModule&&r.flags&1&&this.undefinedExports.delete(e)}maybeExportDefined(e,t){this.parser.inModule&&e.flags&1&&this.undefinedExports.delete(t)}checkRedeclarationInScope(e,t,i,r){this.isRedeclaredInScope(e,t,i)&&this.parser.raise(b.VarRedeclaration,r,{identifierName:t})}isRedeclaredInScope(e,t,i){if(!(i&1))return!1;if(i&8)return e.names.has(t);let r=e.names.get(t)||0;return i&16?(r&2)>0||!this.treatFunctionsAsVarInScope(e)&&(r&1)>0:(r&2)>0&&!(e.flags&8&&e.firstLexicalName===t)||!this.treatFunctionsAsVarInScope(e)&&(r&4)>0}checkLocalExport(e){let{name:t}=e;this.scopeStack[0].names.has(t)||this.undefinedExports.set(t,e.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let e=this.scopeStack.length-1;;e--){let{flags:t}=this.scopeStack[e];if(t&3715)return t}}currentThisScopeFlags(){for(let e=this.scopeStack.length-1;;e--){let{flags:t}=this.scopeStack[e];if(t&3779&&!(t&4))return t}}},Tn=class extends _s{declareFunctions=new Set},Sn=class extends js{createScope(e){return new Tn(e)}declareName(e,t,i){let r=this.currentScope();if(t&2048){this.checkRedeclarationInScope(r,e,t,i),this.maybeExportDefined(r,e),r.declareFunctions.add(e);return}super.declareName(e,t,i)}isRedeclaredInScope(e,t,i){if(super.isRedeclaredInScope(e,t,i))return!0;if(i&2048&&!e.declareFunctions.has(t)){let r=e.names.get(t);return(r&4)>0||(r&2)>0}return!1}checkLocalExport(e){this.scopeStack[0].declareFunctions.has(e.name)||super.checkLocalExport(e)}},iP=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),rP={AmbiguousConditionalArrow:"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",AmbiguousDeclareModuleKind:"Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.",AssignReservedType:({reservedType:s})=>`Cannot overwrite reserved type ${s}.`,DeclareClassElement:"The `declare` modifier can only appear on class fields.",DeclareClassFieldInitializer:"Initializers are not allowed in fields with the `declare` modifier.",DuplicateDeclareModuleExports:"Duplicate `declare module.exports` statement.",EnumBooleanMemberNotInitialized:({memberName:s,enumName:e})=>`Boolean enum members need to be initialized. Use either \`${s} = true,\` or \`${s} = false,\` in enum \`${e}\`.`,EnumDuplicateMemberName:({memberName:s,enumName:e})=>`Enum member names need to be unique, but the name \`${s}\` has already been used before in enum \`${e}\`.`,EnumInconsistentMemberValues:({enumName:s})=>`Enum \`${s}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:s,enumName:e})=>`Enum type \`${s}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${e}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:s})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${s}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:s,memberName:e,explicitType:t})=>`Enum \`${s}\` has type \`${t}\`, so the initializer of \`${e}\` needs to be a ${t} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:s,memberName:e})=>`Symbol enum members cannot be initialized. Use \`${e},\` in enum \`${s}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:s,memberName:e})=>`The enum member initializer for \`${e}\` needs to be a literal (either a boolean, number, or string) in enum \`${s}\`.`,EnumInvalidMemberName:({enumName:s,memberName:e,suggestion:t})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${e}\`, consider using \`${t}\`, in enum \`${s}\`.`,EnumNumberMemberNotInitialized:({enumName:s,memberName:e})=>`Number enum members need to be initialized, e.g. \`${e} = 1\` in enum \`${s}\`.`,EnumStringMemberInconsistentlyInitialized:({enumName:s})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${s}\`.`,GetterMayNotHaveThisParam:"A getter cannot have a `this` parameter.",ImportTypeShorthandOnlyInPureImport:"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",InexactInsideExact:"Explicit inexact syntax cannot appear inside an explicit exact object type.",InexactInsideNonObject:"Explicit inexact syntax cannot appear in class or interface definitions.",InexactVariance:"Explicit inexact syntax cannot have variance.",InvalidNonTypeImportInDeclareModule:"Imports within a `declare module` body must always be `import type` or `import typeof`.",MissingTypeParamDefault:"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",NestedDeclareModule:"`declare module` cannot be used inside another `declare module`.",NestedFlowComment:"Cannot have a flow comment inside another flow comment.",PatternIsOptional:{message:"A binding pattern parameter cannot be optional in an implementation signature."},SetterMayNotHaveThisParam:"A setter cannot have a `this` parameter.",SpreadVariance:"Spread properties cannot have variance.",ThisParamAnnotationRequired:"A type annotation is required for the `this` parameter.",ThisParamBannedInConstructor:"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",ThisParamMayNotBeOptional:"The `this` parameter cannot be optional.",ThisParamMustBeFirst:"The `this` parameter must be the first function parameter.",ThisParamNoDefault:"The `this` parameter may not have a default value.",TypeBeforeInitializer:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeCastInPattern:"The type cast expression is expected to be wrapped with parenthesis.",UnexpectedExplicitInexactInObject:"Explicit inexact syntax must appear at the end of an inexact object.",UnexpectedReservedType:({reservedType:s})=>`Unexpected reserved type ${s}.`,UnexpectedReservedUnderscore:"`_` is only allowed as a type argument to call or new.",UnexpectedSpaceBetweenModuloChecks:"Spaces between `%` and `checks` are not allowed here.",UnexpectedSpreadType:"Spread operator cannot appear in class or interface definitions.",UnexpectedSubtractionOperand:'Unexpected token, expected "number" or "bigint".',UnexpectedTokenAfterTypeParameter:"Expected an arrow function after this type parameter declaration.",UnexpectedTypeParameterBeforeAsyncArrowFunction:"Type parameters must come after the async keyword, e.g. instead of `<T> async () => {}`, use `async <T>() => {}`.",UnsupportedDeclareExportKind:({unsupportedExportKind:s,suggestion:e})=>`\`declare export ${s}\` is not supported. Use \`${e}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."},H=Ze`flow`(rP);function nP(s){return s.type==="DeclareExportAllDeclaration"||s.type==="DeclareExportDeclaration"&&(!s.declaration||s.declaration.type!=="TypeAlias"&&s.declaration.type!=="InterfaceDeclaration")}function Nl(s){return s.importKind==="type"||s.importKind==="typeof"}var aP={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};function oP(s,e){let t=[],i=[];for(let r=0;r<s.length;r++)(e(s[r],r,s)?t:i).push(s[r]);return[t,i]}var cP=/\*?\s*@((?:no)?flow)\b/,lP=s=>class extends s{flowPragma=void 0;getScopeHandler(){return Sn}shouldParseTypes(){return this.getPluginOption("flow","all")||this.flowPragma==="flow"}finishToken(t,i){t!==131&&t!==9&&t!==24&&this.flowPragma===void 0&&(this.flowPragma=null),super.finishToken(t,i)}addComment(t){if(this.flowPragma===void 0){let i=cP.exec(t.value);if(i)if(i[1]==="flow")this.flowPragma="flow";else if(i[1]==="noflow")this.flowPragma="noflow";else throw new Error("Unexpected flow pragma")}super.addComment(t)}flowParseTypeInitialiser(t){let i=this.state.inType;this.state.inType=!0,this.expect(t||10);let r=this.flowParseType();return this.state.inType=i,r}flowParsePredicate(){let t=this.startNode(),i=this.state.startLoc;return this.next(),this.expectContextual(107),this.state.lastTokStartLoc.index>i.index+1&&this.raise(H.UnexpectedSpaceBetweenModuloChecks,i),this.eat(6)?(t.value=super.parseExpression(),this.expect(7),this.finishNode(t,"DeclaredPredicate")):this.finishNode(t,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(t){let i=this.state.inType;this.state.inType=!0,this.expect(10);let r=null,n=null;return t&&this.match(50)?(this.state.inType=i,n=this.flowParsePredicate()):(r=this.flowParseType(),this.state.inType=i,this.match(50)&&(n=this.flowParsePredicate())),[r,n]}flowParseDeclareClass(t){return this.next(),this.flowParseInterfaceish(t,!0),this.finishNode(t,"DeclareClass")}flowParseDeclareFunction(t){this.next();let i=t.id=this.parseIdentifier(),r=this.startNode(),n=this.startNode();this.match(43)?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,this.expect(6);let a=this.flowParseFunctionTypeParams();return r.params=a.params,r.rest=a.rest,r.this=a._this,this.expect(7),[r.returnType,t.predicate]=this.flowParseTypeAndPredicateInitialiser(!1),n.typeAnnotation=this.finishNode(r,"FunctionTypeAnnotation"),i.typeAnnotation=this.finishNode(n,"TypeAnnotation"),this.resetEndLocation(i),this.semicolon(),this.scope.declareName(t.id.name,2048,t.id.start),this.finishNode(t,"DeclareFunction")}flowParseDeclare(t,i){if(this.match(76))return this.flowParseDeclareClass(t);if(this.match(64))return this.flowParseDeclareFunction(t);if(this.match(70))return this.flowParseDeclareVariable(t);if(this.eatContextual(124))return this.match(12)?this.flowParseDeclareModuleExports(t):(i&&this.raise(H.NestedDeclareModule,this.state.lastTokStartLoc),this.flowParseDeclareModule(t));if(this.isContextual(127))return this.flowParseDeclareTypeAlias(t);if(this.isContextual(128))return this.flowParseDeclareOpaqueType(t);if(this.isContextual(126))return this.flowParseDeclareInterface(t);if(this.match(78))return this.flowParseDeclareExportDeclaration(t,i);throw this.unexpected()}flowParseDeclareVariable(t){return this.next(),t.id=this.flowParseTypeAnnotatableIdentifier(),this.scope.declareName(t.id.name,5,t.id.start),this.semicolon(),this.finishNode(t,"DeclareVariable")}flowParseDeclareModule(t){this.scope.enter(0),this.match(131)?t.id=super.parseExprAtom():t.id=this.parseIdentifier();let i=this.startNode(),r=i.body=[];for(this.expect(2);!this.match(4);){let o=this.startNode();this.match(79)?(this.next(),!this.isContextual(127)&&!this.match(83)&&this.raise(H.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc),r.push(super.parseImport(o))):(this.expectContextual(122,H.UnsupportedStatementInDeclareModule),r.push(this.flowParseDeclare(o,!0)))}this.scope.exit(),this.expect(4),t.body=this.finishNode(i,"BlockStatement");let n=null,a=!1;return r.forEach(o=>{nP(o)?(n==="CommonJS"&&this.raise(H.AmbiguousDeclareModuleKind,o),n="ES"):o.type==="DeclareModuleExports"&&(a&&this.raise(H.DuplicateDeclareModuleExports,o),n==="ES"&&this.raise(H.AmbiguousDeclareModuleKind,o),n="CommonJS",a=!0)}),t.kind=n||"CommonJS",this.finishNode(t,"DeclareModule")}flowParseDeclareExportDeclaration(t,i){if(this.expect(78),this.eat(61))return this.match(64)||this.match(76)?t.declaration=this.flowParseDeclare(this.startNode()):(t.declaration=this.flowParseType(),this.semicolon()),t.default=!0,this.finishNode(t,"DeclareExportDeclaration");if(this.match(71)||this.isLet()||(this.isContextual(127)||this.isContextual(126))&&!i){let r=this.state.value;throw this.raise(H.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:r,suggestion:aP[r]})}if(this.match(70)||this.match(64)||this.match(76)||this.isContextual(128))return t.declaration=this.flowParseDeclare(this.startNode()),t.default=!1,this.finishNode(t,"DeclareExportDeclaration");if(this.match(51)||this.match(2)||this.isContextual(126)||this.isContextual(127)||this.isContextual(128)){let r=this.parseExport(t,null);return r.type==="ExportNamedDeclaration"?(r.default=!1,delete r.exportKind,this.castNodeTo(r,"DeclareExportDeclaration")):this.castNodeTo(r,"DeclareExportAllDeclaration")}throw this.unexpected()}flowParseDeclareModuleExports(t){return this.next(),this.expectContextual(108),t.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(t,"DeclareModuleExports")}flowParseDeclareTypeAlias(t){this.next();let i=this.flowParseTypeAlias(t);return this.castNodeTo(i,"DeclareTypeAlias"),i}flowParseDeclareOpaqueType(t){return this.next(),this.flowParseOpaqueType(t,!0)}flowParseDeclareInterface(t){return this.next(),this.flowParseInterfaceish(t,!1),this.finishNode(t,"DeclareInterface")}flowParseInterfaceish(t,i){if(t.id=this.flowParseRestrictedIdentifier(!i,!0),this.scope.declareName(t.id.name,i?17:8201,t.id.start),this.match(43)?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.extends=[],this.eat(77))do t.extends.push(this.flowParseInterfaceExtends());while(!i&&this.eat(8));if(i){let r=[],n=[];if(this.eatContextual(114))do n.push(this.flowParseInterfaceExtends());while(this.eat(8));if(this.eatContextual(110))do r.push(this.flowParseClassImplements());while(this.eat(8));t.implements=r,t.mixins=n}t.body=this.flowParseObjectType({allowStatic:i,allowExact:!1,allowSpread:!1,allowProto:i,allowInexact:!1})}flowParseInterfaceExtends(){let t=this.startNode();return t.id=this.flowParseQualifiedTypeIdentifier(),this.match(43)?t.typeParameters=this.flowParseTypeParameterInstantiation():t.typeParameters=null,this.finishNode(t,"InterfaceExtends")}flowParseInterface(t){return this.flowParseInterfaceish(t,!1),this.finishNode(t,"InterfaceDeclaration")}checkNotUnderscore(t){t==="_"&&this.raise(H.UnexpectedReservedUnderscore,this.state.startLoc)}checkReservedType(t,i,r){iP.has(t)&&this.raise(r?H.AssignReservedType:H.UnexpectedReservedType,i,{reservedType:t})}flowParseRestrictedIdentifierName(t,i){return this.checkReservedType(this.state.value,this.state.startLoc,i),this.parseIdentifierName(t)}flowParseRestrictedIdentifier(t,i){let r=this.startNode(),n=this.flowParseRestrictedIdentifierName(t,i);return this.createIdentifier(r,n)}flowParseTypeAlias(t){return t.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(t.id.name,8201,t.id.start),this.match(43)?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.right=this.flowParseTypeInitialiser(25),this.semicolon(),this.finishNode(t,"TypeAlias")}flowParseOpaqueType(t,i){return this.expectContextual(127),t.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(t.id.name,8201,t.id.start),this.match(43)?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.supertype=null,this.match(10)&&(t.supertype=this.flowParseTypeInitialiser(10)),t.impltype=null,i||(t.impltype=this.flowParseTypeInitialiser(25)),this.semicolon(),this.finishNode(t,i?"DeclareOpaqueType":"OpaqueType")}flowParseTypeParameterBound(){if(this.match(10)||this.isContextual(77)){let t=this.startNode();return this.next(),t.typeAnnotation=this.flowParseType(),this.finishNode(t,"TypeAnnotation")}}flowParseTypeParameter(t=!1){let i=this.state.startLoc,r=this.startNode(),n=this.flowParseVariance();return r.name=this.flowParseRestrictedIdentifierName(),r.variance=n,r.bound=this.flowParseTypeParameterBound(),this.match(25)?(this.eat(25),r.default=this.flowParseType()):t&&this.raise(H.MissingTypeParamDefault,i),this.finishNode(r,"TypeParameter")}flowParseTypeParameterDeclaration(){let t=this.state.inType,i=this.startNode();i.params=[],this.state.inType=!0,this.match(43)||this.match(139)?this.next():this.unexpected();let r=!1;do{let n=this.flowParseTypeParameter(r);i.params.push(n),n.default&&(r=!0),this.match(44)||this.expect(8)}while(!this.match(44));return this.expect(44),this.state.inType=t,this.finishNode(i,"TypeParameterDeclaration")}flowInTopLevelContext(t){if(this.curContext()!==be.brace){let i=this.state.context;this.state.context=[i[0]];try{return t()}finally{this.state.context=i}}else return t()}flowParseTypeParameterInstantiationInExpression(){if(this.reScan_lt()===43)return this.flowParseTypeParameterInstantiation()}flowParseTypeParameterInstantiation(){let t=this.startNode(),i=this.state.inType;return this.state.inType=!0,t.params=[],this.flowInTopLevelContext(()=>{this.expect(43);let r=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(44);)t.params.push(this.flowParseType()),this.match(44)||this.expect(8);this.state.noAnonFunctionType=r}),this.state.inType=i,!this.state.inType&&this.curContext()===be.brace&&this.reScan_lt_gt(),this.expect(44),this.finishNode(t,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){if(this.reScan_lt()!==43)return null;let t=this.startNode(),i=this.state.inType;for(t.params=[],this.state.inType=!0,this.expect(43);!this.match(44);)t.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(44)||this.expect(8);return this.expect(44),this.state.inType=i,this.finishNode(t,"TypeParameterInstantiation")}flowParseInterfaceType(){let t=this.startNode();if(this.expectContextual(126),t.extends=[],this.eat(77))do t.extends.push(this.flowParseInterfaceExtends());while(this.eat(8));return t.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(t,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(132)||this.match(131)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(t,i,r){return t.static=i,this.lookahead().type===10?(t.id=this.parseIdentifier(!0),t.key=this.flowParseTypeInitialiser()):(t.id=null,t.key=this.flowParseType()),this.expect(1),t.value=this.flowParseTypeInitialiser(),t.variance=r,this.finishNode(t,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(t,i){return t.static=i,t.id=this.parseIdentifier(!0),this.expect(1),this.expect(1),this.match(43)||this.match(6)?(t.method=!0,t.optional=!1,t.value=this.flowParseObjectTypeMethodish(this.startNodeAtNode(t))):(t.method=!1,this.eat(13)&&(t.optional=!0),t.value=this.flowParseTypeInitialiser()),this.finishNode(t,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(t){for(t.params=[],t.rest=null,t.typeParameters=null,t.this=null,this.match(43)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(6),this.match(74)&&(t.this=this.flowParseFunctionTypeParam(!0),t.this.name=null,this.match(7)||this.expect(8));!this.match(7)&&!this.match(17);)t.params.push(this.flowParseFunctionTypeParam(!1)),this.match(7)||this.expect(8);return this.eat(17)&&(t.rest=this.flowParseFunctionTypeParam(!1)),this.expect(7),t.returnType=this.flowParseTypeInitialiser(),this.finishNode(t,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(t,i){let r=this.startNode();return t.static=i,t.value=this.flowParseObjectTypeMethodish(r),this.finishNode(t,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:t,allowExact:i,allowSpread:r,allowProto:n,allowInexact:a}){let o=this.state.inType;this.state.inType=!0;let c=this.startNode();c.callProperties=[],c.properties=[],c.indexers=[],c.internalSlots=[];let l,u,f=!1;for(i&&this.match(3)?(this.expect(3),l=5,u=!0):(this.expect(2),l=4,u=!1),c.exact=u;!this.match(l);){let x=!1,I=null,L=null,N=this.startNode();if(n&&this.isContextual(115)){let v=this.lookahead();v.type!==10&&v.type!==13&&(this.next(),I=this.state.startLoc,t=!1)}if(t&&this.isContextual(103)){let v=this.lookahead();v.type!==10&&v.type!==13&&(this.next(),x=!0)}let w=this.flowParseVariance();if(this.eat(0))I!=null&&this.unexpected(I),this.eat(0)?(w&&this.unexpected(w.start),c.internalSlots.push(this.flowParseObjectTypeInternalSlot(N,x))):c.indexers.push(this.flowParseObjectTypeIndexer(N,x,w));else if(this.match(6)||this.match(43))I!=null&&this.unexpected(I),w&&this.unexpected(w.start),c.callProperties.push(this.flowParseObjectTypeCallProperty(N,x));else{let v="init";if(this.isContextual(96)||this.isContextual(101)){let V=this.lookahead();Rl(V.type)&&(v=this.state.value,this.next())}let z=this.flowParseObjectTypeProperty(N,x,I,w,v,r,a??!u);z===null?(f=!0,L=this.state.lastTokStartLoc):c.properties.push(z)}this.flowObjectTypeSemicolon(),L&&!this.match(4)&&!this.match(5)&&this.raise(H.UnexpectedExplicitInexactInObject,L)}this.expect(l),r&&(c.inexact=f);let m=this.finishNode(c,"ObjectTypeAnnotation");return this.state.inType=o,m}flowParseObjectTypeProperty(t,i,r,n,a,o,c){if(this.eat(17))return this.match(8)||this.match(9)||this.match(4)||this.match(5)?(o?c||this.raise(H.InexactInsideExact,this.state.lastTokStartLoc):this.raise(H.InexactInsideNonObject,this.state.lastTokStartLoc),n&&this.raise(H.InexactVariance,n),null):(o||this.raise(H.UnexpectedSpreadType,this.state.lastTokStartLoc),r!=null&&this.unexpected(r),n&&this.raise(H.SpreadVariance,n),t.argument=this.flowParseType(),this.finishNode(t,"ObjectTypeSpreadProperty"));{t.key=this.flowParseObjectPropertyKey(),t.static=i,t.proto=r!=null,t.kind=a;let l=!1;return this.match(43)||this.match(6)?(t.method=!0,r!=null&&this.unexpected(r),n&&this.unexpected(n.start),t.value=this.flowParseObjectTypeMethodish(this.startNodeAtNode(t)),a==="get"||a==="set"?this.flowCheckGetterSetterParams(t):!i&&!o&&t.key.name==="constructor"&&t.value.this&&this.raise(H.ThisParamBannedInConstructor,t.value.this)):(a!=="init"&&this.unexpected(),t.method=!1,this.eat(13)&&(l=!0),t.value=this.flowParseTypeInitialiser(),t.variance=n),t.optional=l,this.finishNode(t,"ObjectTypeProperty")}}flowCheckGetterSetterParams(t){let i=t.kind==="get"?0:1,r=t.value,n=r.params.length+(r.rest?1:0);r.this&&this.raise(t.kind==="get"?H.GetterMayNotHaveThisParam:H.SetterMayNotHaveThisParam,r.this),n!==i&&this.raise(t.kind==="get"?b.BadGetterArity:b.BadSetterArity,t),t.kind==="set"&&r.rest&&this.raise(b.BadSetterRestParameter,t)}flowObjectTypeSemicolon(){!this.eat(9)&&!this.eat(8)&&!this.match(4)&&!this.match(5)&&this.unexpected()}flowParseQualifiedTypeIdentifier(t,i){t??=this.state.startLoc;let r=i||this.flowParseRestrictedIdentifier(!0);for(;this.eat(12);){let n=this.startNodeAt(t);n.qualification=r,n.id=this.flowParseRestrictedIdentifier(!0),r=this.finishNode(n,"QualifiedTypeIdentifier")}return r}flowParseGenericType(t,i){let r=this.startNodeAt(t);return r.typeParameters=null,r.id=this.flowParseQualifiedTypeIdentifier(t,i),this.match(43)&&(r.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(r,"GenericTypeAnnotation")}flowParseTypeofType(){let t=this.startNode();return this.expect(83),t.argument=this.flowParsePrimaryType(),this.finishNode(t,"TypeofTypeAnnotation")}flowParseTupleType(){let t=this.startNode();for(t.types=[],this.expect(0);this.state.pos<this.length&&!this.match(1)&&(t.types.push(this.flowParseType()),!this.match(1));)this.expect(8);return this.expect(1),this.finishNode(t,"TupleTypeAnnotation")}flowParseFunctionTypeParam(t){let i=null,r=!1,n,a=this.startNode(),o=this.lookahead(),c=this.state.type===74;return o.type===10||o.type===13?(c&&!t&&this.raise(H.ThisParamMustBeFirst,a),i=this.parseIdentifier(c),this.eat(13)&&(r=!0,c&&this.raise(H.ThisParamMayNotBeOptional,a)),n=this.flowParseTypeInitialiser()):n=this.flowParseType(),a.name=i,a.optional=r,a.typeAnnotation=n,this.finishNode(a,"FunctionTypeParam")}reinterpretTypeAsFunctionTypeParam(t){let i=this.startNodeAtNode(t);return i.name=null,i.optional=!1,i.typeAnnotation=t,this.finishNode(i,"FunctionTypeParam")}flowParseFunctionTypeParams(t=[]){let i=null,r=null;for(this.match(74)&&(r=this.flowParseFunctionTypeParam(!0),r.name=null,this.match(7)||this.expect(8));!this.match(7)&&!this.match(17);)t.push(this.flowParseFunctionTypeParam(!1)),this.match(7)||this.expect(8);return this.eat(17)&&(i=this.flowParseFunctionTypeParam(!1)),{params:t,rest:i,_this:r}}flowIdentToTypeAnnotation(t,i,r){switch(r.name){case"any":return this.finishNode(i,"AnyTypeAnnotation");case"bool":case"boolean":return this.finishNode(i,"BooleanTypeAnnotation");case"mixed":return this.finishNode(i,"MixedTypeAnnotation");case"empty":return this.finishNode(i,"EmptyTypeAnnotation");case"number":return this.finishNode(i,"NumberTypeAnnotation");case"string":return this.finishNode(i,"StringTypeAnnotation");case"symbol":return this.finishNode(i,"SymbolTypeAnnotation");default:return this.checkNotUnderscore(r.name),this.flowParseGenericType(t,r)}}flowParsePrimaryType(){let t=this.state.startLoc,i=this.startNode(),r,n,a=!1,o=this.state.noAnonFunctionType;switch(this.state.type){case 2:return this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!0,allowProto:!1,allowInexact:!0});case 3:return this.flowParseObjectType({allowStatic:!1,allowExact:!0,allowSpread:!0,allowProto:!1,allowInexact:!1});case 0:return this.state.noAnonFunctionType=!1,n=this.flowParseTupleType(),this.state.noAnonFunctionType=o,n;case 43:{let c=this.startNode();return c.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(6),r=this.flowParseFunctionTypeParams(),c.params=r.params,c.rest=r.rest,c.this=r._this,this.expect(7),this.expect(15),c.returnType=this.flowParseType(),this.finishNode(c,"FunctionTypeAnnotation")}case 6:{let c=this.startNode();if(this.next(),!this.match(7)&&!this.match(17))if(de(this.state.type)||this.match(74)){let l=this.lookahead().type;a=l!==13&&l!==10}else a=!0;if(a){if(this.state.noAnonFunctionType=!1,n=this.flowParseType(),this.state.noAnonFunctionType=o,this.state.noAnonFunctionType||!(this.match(8)||this.match(7)&&this.lookahead().type===15))return this.expect(7),n;this.eat(8)}return n?r=this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(n)]):r=this.flowParseFunctionTypeParams(),c.params=r.params,c.rest=r.rest,c.this=r._this,this.expect(7),this.expect(15),c.returnType=this.flowParseType(),c.typeParameters=null,this.finishNode(c,"FunctionTypeAnnotation")}case 131:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case 81:case 82:return i.value=this.match(81),this.next(),this.finishNode(i,"BooleanLiteralTypeAnnotation");case 49:if(this.state.value==="-"){if(this.next(),this.match(132))return this.parseLiteralAtNode(-this.state.value,"NumberLiteralTypeAnnotation",i);if(this.match(133))return this.parseLiteralAtNode(-this.state.value,"BigIntLiteralTypeAnnotation",i);throw this.raise(H.UnexpectedSubtractionOperand,this.state.startLoc)}throw this.unexpected();case 132:return this.parseLiteral(this.state.value,"NumberLiteralTypeAnnotation");case 133:return this.parseLiteral(this.state.value,"BigIntLiteralTypeAnnotation");case 84:return this.next(),this.finishNode(i,"VoidTypeAnnotation");case 80:return this.next(),this.finishNode(i,"NullLiteralTypeAnnotation");case 74:return this.next(),this.finishNode(i,"ThisTypeAnnotation");case 51:return this.next(),this.finishNode(i,"ExistsTypeAnnotation");case 83:return this.flowParseTypeofType();default:if($i(this.state.type)){let c=Tt(this.state.type);return this.next(),super.createIdentifier(i,c)}else if(de(this.state.type))return this.isContextual(126)?this.flowParseInterfaceType():this.flowIdentToTypeAnnotation(t,i,this.parseIdentifier())}throw this.unexpected()}flowParsePostfixType(){let t=this.state.startLoc,i=this.flowParsePrimaryType(),r=!1;for(;(this.match(0)||this.match(14))&&!this.canInsertSemicolon();){let n=this.startNodeAt(t),a=this.eat(14);r=r||a,this.expect(0),!a&&this.match(1)?(n.elementType=i,this.next(),i=this.finishNode(n,"ArrayTypeAnnotation")):(n.objectType=i,n.indexType=this.flowParseType(),this.expect(1),r?(n.optional=a,i=this.finishNode(n,"OptionalIndexedAccessType")):i=this.finishNode(n,"IndexedAccessType"))}return i}flowParsePrefixType(){let t=this.startNode();return this.eat(13)?(t.typeAnnotation=this.flowParsePrefixType(),this.finishNode(t,"NullableTypeAnnotation")):this.flowParsePostfixType()}flowParseAnonFunctionWithoutParens(){let t=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(15)){let i=this.startNodeAtNode(t);return i.params=[this.reinterpretTypeAsFunctionTypeParam(t)],i.rest=null,i.this=null,i.returnType=this.flowParseType(),i.typeParameters=null,this.finishNode(i,"FunctionTypeAnnotation")}return t}flowParseIntersectionType(){let t=this.startNode();this.eat(41);let i=this.flowParseAnonFunctionWithoutParens();for(t.types=[i];this.eat(41);)t.types.push(this.flowParseAnonFunctionWithoutParens());return t.types.length===1?i:this.finishNode(t,"IntersectionTypeAnnotation")}flowParseUnionType(){let t=this.startNode();this.eat(39);let i=this.flowParseIntersectionType();for(t.types=[i];this.eat(39);)t.types.push(this.flowParseIntersectionType());return t.types.length===1?i:this.finishNode(t,"UnionTypeAnnotation")}flowParseType(){let t=this.state.inType;this.state.inType=!0;let i=this.flowParseUnionType();return this.state.inType=t,i}flowParseTypeOrImplicitInstantiation(){if(this.state.type===129&&this.state.value==="_"){let t=this.state.startLoc,i=this.parseIdentifier();return this.flowParseGenericType(t,i)}else return this.flowParseType()}flowParseTypeAnnotation(){let t=this.startNode();return t.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(t,"TypeAnnotation")}flowParseTypeAnnotatableIdentifier(){let t=this.startNode(),i=this.parseIdentifierName();return this.match(10)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),this.createIdentifier(t,i)}typeCastToParameter(t){return t.expression.typeAnnotation=t.typeAnnotation,this.resetEndLocationFromNode(t.expression,t.typeAnnotation),t.expression}flowParseVariance(){let t=null;return this.match(49)?(t=this.startNode(),this.state.value==="+"?t.kind="plus":t.kind="minus",this.next(),this.finishNode(t,"Variance")):t}parseFunctionBody(t,i,r=!1){if(i){this.forwardNoArrowParamsConversionAt(t,()=>super.parseFunctionBody(t,!0,r));return}super.parseFunctionBody(t,!1,r)}parseFunctionBodyAndFinish(t,i,r=!1){if(this.match(10)){let n=this.startNode();i==="FunctionDeclaration"||i==="FunctionExpression"||i==="ArrowFunctionExpression"?[n.typeAnnotation,t.predicate]=this.flowParseTypeAndPredicateInitialiser(!0):n.typeAnnotation=this.flowParseTypeInitialiser(),t.returnType=n.typeAnnotation?this.finishNode(n,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(t,i,r)}parseStatementLike(t){if(this.state.strict&&this.isContextual(126)){let r=this.lookahead();if($e(r.type)){let n=this.startNode();return this.next(),this.flowParseInterface(n)}}else if(this.isContextual(123)){let r=this.startNode();return this.next(),this.flowParseEnumDeclaration(r)}let i=super.parseStatementLike(t);return this.flowPragma===void 0&&!this.isValidDirective(i)&&(this.flowPragma=null),i}parseExpressionStatement(t,i,r){if(i.type==="Identifier"){if(i.name==="declare"){if(this.match(76)||de(this.state.type)||this.match(64)||this.match(70)||this.match(78))return this.flowParseDeclare(t)}else if(de(this.state.type)){if(i.name==="interface")return this.flowParseInterface(t);if(i.name==="type")return this.flowParseTypeAlias(t);if(i.name==="opaque")return this.flowParseOpaqueType(t,!1)}}return super.parseExpressionStatement(t,i,r)}shouldParseExportDeclaration(){let{type:t}=this.state;return t===123||Cl(t)?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){let{type:t}=this.state;return t===123||Cl(t)?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.isContextual(123)){let t=this.startNode();return this.next(),this.flowParseEnumDeclaration(t)}return super.parseExportDefaultExpression()}parseConditional(t,i,r){if(!this.match(13))return t;if(r!=null){let x=this.lookaheadCharCode();if(x===44||x===61||x===58||x===41)return this.setOptionalParametersError(r),t}this.expect(13);let n=this.state.clone(),a=this.state.noArrowAt,o=this.startNodeAt(i),{consequent:c,failed:l}=this.tryParseConditionalConsequent(),u=this.getArrowLikeExpressions(c),f=u[0],m=u[1];if(l||m.length>0){let x=[...a];if(m.length>0){this.state=n,this.state.noArrowAt=x;for(let I=0;I<m.length;I++)x.push(m[I].start);({consequent:c,failed:l}=this.tryParseConditionalConsequent()),[f]=this.getArrowLikeExpressions(c)}l&&f.length>1&&this.raise(H.AmbiguousConditionalArrow,n.startLoc),l&&f.length===1&&(this.state=n,x.push(f[0].start),this.state.noArrowAt=x,{consequent:c}=this.tryParseConditionalConsequent())}return this.getArrowLikeExpressions(c,!0),this.state.noArrowAt=a,this.expect(10),o.test=t,o.consequent=c,o.alternate=this.forwardNoArrowParamsConversionAt(o,()=>this.parseMaybeAssign()),this.finishNode(o,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);let t=this.parseMaybeAssignAllowIn(),i=!this.match(10);return this.state.noArrowParamsConversionAt.pop(),{consequent:t,failed:i}}getArrowLikeExpressions(t,i){let r=[t],n=[];for(;r.length!==0;){let a=r.pop();a.type==="ArrowFunctionExpression"?(a.typeParameters||!a.returnType?this.finishArrowValidation(a):n.push(a),a.body.type!=="BlockStatement"&&r.push(a.body)):a.type==="ConditionalExpression"&&(r.push(a.consequent),r.push(a.alternate))}return i?(n.forEach(a=>this.finishArrowValidation(a)),[n,[]]):oP(n,a=>a.params.every(o=>this.isAssignable(o,!0)))}finishArrowValidation(t){this.toAssignableList(t.params,t.extra?.trailingCommaLoc,!1),this.scope.enter(518),super.checkParams(t,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(t,i){let r;return this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(t.start))?(this.state.noArrowParamsConversionAt.push(this.state.start),r=i(),this.state.noArrowParamsConversionAt.pop()):r=i(),r}parseParenItem(t,i){let r=super.parseParenItem(t,i);if(this.eat(13)&&(r.optional=!0,this.resetEndLocation(t)),this.match(10)){let n=this.startNodeAt(i);return n.expression=r,n.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(n,"TypeCastExpression")}return r}assertModuleNodeAllowed(t){t.type==="ImportDeclaration"&&(t.importKind==="type"||t.importKind==="typeof")||t.type==="ExportNamedDeclaration"&&t.exportKind==="type"||t.type==="ExportAllDeclaration"&&t.exportKind==="type"||super.assertModuleNodeAllowed(t)}parseExportDeclaration(t){if(this.isContextual(127)){t.exportKind="type";let i=this.startNode();return this.next(),this.match(2)?(t.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(t),null):this.flowParseTypeAlias(i)}else if(this.isContextual(128)){t.exportKind="type";let i=this.startNode();return this.next(),this.flowParseOpaqueType(i,!1)}else if(this.isContextual(126)){t.exportKind="type";let i=this.startNode();return this.next(),this.flowParseInterface(i)}else if(this.isContextual(123)){t.exportKind="value";let i=this.startNode();return this.next(),this.flowParseEnumDeclaration(i)}else return super.parseExportDeclaration(t)}eatExportStar(t){return super.eatExportStar(t)?!0:this.isContextual(127)&&this.lookahead().type===51?(t.exportKind="type",this.next(),this.next(),!0):!1}maybeParseExportNamespaceSpecifier(t){let{startLoc:i}=this.state,r=super.maybeParseExportNamespaceSpecifier(t);return r&&t.exportKind==="type"&&this.unexpected(i),r}parseClassId(t,i,r){if((!i||r)&&this.isContextual(110)){t.id=null;return}super.parseClassId(t,i,r),this.match(43)&&(t.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(t,i,r){let{startLoc:n}=this.state;if(this.isContextual(122)){if(super.parseClassMemberFromModifier(t,i))return;i.declare=!0}super.parseClassMember(t,i,r),i.declare&&(i.type!=="ClassProperty"&&i.type!=="ClassPrivateProperty"&&i.type!=="PropertyDefinition"?this.raise(H.DeclareClassElement,n):i.value&&this.raise(H.DeclareClassFieldInitializer,i.value))}isIterator(t){return t==="iterator"||t==="asyncIterator"}readIterator(){let t=super.readWord1(),i="@@"+t;(!this.isIterator(t)||!this.state.inType)&&this.raise(b.InvalidIdentifier,this.state.curPosition(),{identifierName:i}),this.finishToken(129,i)}getTokenFromCode(t){let i=this.input.charCodeAt(this.state.pos+1);t===123&&i===124?this.finishOp(3,2):this.state.inType&&(t===62||t===60)?this.finishOp(t===62?44:43,1):this.state.inType&&t===63?i===46?this.finishOp(14,2):this.finishOp(13,1):eP(t,i,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(t)}isAssignable(t,i){return t.type==="TypeCastExpression"?this.isAssignable(t.expression,i):super.isAssignable(t,i)}toAssignable(t,i=!1){!i&&t.type==="AssignmentExpression"&&t.left.type==="TypeCastExpression"&&(t.left=this.typeCastToParameter(t.left)),super.toAssignable(t,i)}toAssignableListItem(t,i,r){let n=t[i];n.type==="TypeCastExpression"&&(t[i]=this.typeCastToParameter(n)),super.toAssignableListItem(t,i,r)}toReferencedList(t,i){for(let r=0;r<t.length;r++){let n=t[r];n?.type==="TypeCastExpression"&&!n.extra?.parenthesized&&(t.length>1||!i)&&this.raise(H.TypeCastInPattern,n.typeAnnotation)}return t}parseArrayLike(t,i){let r=super.parseArrayLike(t,i);return r.type==="ArrayExpression"&&this.toReferencedList(r.elements),r}isValidLVal(t,i,r,n){return t==="TypeCastExpression"||super.isValidLVal(t,i,r,n)}parseClassProperty(t){return this.match(10)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(t)}parseClassPrivateProperty(t){return this.match(10)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(t)}isClassMethod(){return this.match(43)||super.isClassMethod()}isClassProperty(){return this.match(10)||super.isClassProperty()}isNonstaticConstructor(t){return!this.match(10)&&super.isNonstaticConstructor(t)}pushClassMethod(t,i,r,n,a,o){if(i.variance&&this.unexpected(i.variance.start),delete i.variance,this.match(43)&&(i.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(t,i,r,n,a,o),i.params&&a){let c=i.params;c.length>0&&this.isThisParam(c[0])&&this.raise(H.ThisParamBannedInConstructor,i)}else if(i.type==="MethodDefinition"&&a&&i.value.params){let c=i.value.params;c.length>0&&this.isThisParam(c[0])&&this.raise(H.ThisParamBannedInConstructor,i)}}pushClassPrivateMethod(t,i,r,n){i.variance&&this.unexpected(i.variance.start),delete i.variance,this.match(43)&&(i.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(t,i,r,n)}flowParseClassImplements(){let t=this.startNode();return t.id=this.flowParseRestrictedIdentifier(!0),this.match(43)?t.typeParameters=this.flowParseTypeParameterInstantiation():t.typeParameters=null,this.finishNode(t,"ClassImplements")}parseClassSuper(t){if(super.parseClassSuper(t),t.superClass&&(this.match(43)||this.match(47))&&(t.superTypeArguments=this.flowParseTypeParameterInstantiationInExpression()),this.eatContextual(110)){let i=t.implements=[];do i.push(this.flowParseClassImplements());while(this.eat(8))}}checkGetterSetterParams(t){super.checkGetterSetterParams(t);let i=this.getObjectOrClassMethodParams(t);if(i.length>0){let r=i[0];this.isThisParam(r)&&t.kind==="get"?this.raise(H.GetterMayNotHaveThisParam,r):this.isThisParam(r)&&this.raise(H.SetterMayNotHaveThisParam,r)}}parsePropertyNamePrefixOperator(t){t.variance=this.flowParseVariance()}parseObjPropValue(t,i,r,n,a,o,c){t.variance&&this.unexpected(t.variance.start),delete t.variance;let l;this.match(43)&&!o&&(l=this.flowParseTypeParameterDeclaration(),this.match(6)||this.unexpected());let u=super.parseObjPropValue(t,i,r,n,a,o,c);return l&&((u.value||u).typeParameters=l),u}parseFunctionParamType(t){return this.eat(13)&&(t.type!=="Identifier"&&this.raise(H.PatternIsOptional,t),this.isThisParam(t)&&this.raise(H.ThisParamMayNotBeOptional,t),t.optional=!0),this.match(10)?t.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(t)&&this.raise(H.ThisParamAnnotationRequired,t),this.match(25)&&this.isThisParam(t)&&this.raise(H.ThisParamNoDefault,t),this.resetEndLocation(t),t}parseMaybeDefault(t,i){let r=super.parseMaybeDefault(t,i);return r.type==="AssignmentPattern"&&r.typeAnnotation&&r.right.start<r.typeAnnotation.start&&this.raise(H.TypeBeforeInitializer,r.typeAnnotation),r}parseImportSpecifierLocal(t,i,r){i.local=Nl(t)?this.flowParseRestrictedIdentifier(!0,!0):this.parseIdentifier(),t.specifiers.push(this.finishImportSpecifier(i,r))}isPotentialImportPhase(t){if(super.isPotentialImportPhase(t))return!0;if(this.isContextual(127)){if(!t)return!0;let i=this.lookaheadCharCode();return i===123||i===42}return!t&&this.isContextual(83)}applyImportPhase(t,i,r,n){if(super.applyImportPhase(t,i,r,n),i){if(!r&&this.match(61))return;t.exportKind=r==="type"?r:"value"}else r==="type"&&this.match(51)&&this.unexpected(),t.importKind=r==="type"||r==="typeof"?r:"value"}parseImportSpecifier(t,i,r,n,a){let o=t.imported,c=null;o.type==="Identifier"&&(o.name==="type"?c="type":o.name==="typeof"&&(c="typeof"));let l=!1;if(this.isContextual(90)&&!this.isLookaheadContextual("as")){let f=this.parseIdentifier(!0);c!==null&&!$e(this.state.type)?(t.imported=f,t.importKind=c,t.local=this.cloneIdentifier(f)):(t.imported=o,t.importKind=null,t.local=this.parseIdentifier())}else{if(c!==null&&$e(this.state.type))t.imported=this.parseIdentifier(!0),t.importKind=c;else{if(i)throw this.raise(b.ImportBindingIsString,t,{importName:o.value});t.imported=o,t.importKind=null}this.eatContextual(90)?t.local=this.parseIdentifier():(l=!0,t.local=this.cloneIdentifier(t.imported))}let u=Nl(t);return r&&u&&this.raise(H.ImportTypeShorthandOnlyInPureImport,t),(r||u)&&this.checkReservedType(t.local.name,t.local.start,!0),l&&!r&&!u&&this.checkReservedWord(t.local.name,t.start,!0,!0),this.finishImportSpecifier(t,"ImportSpecifier")}parseBindingAtom(){return this.state.type===74?this.parseIdentifier(!0):super.parseBindingAtom()}parseFunctionParams(t,i){let r=t.kind;r!=="get"&&r!=="set"&&this.match(43)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.parseFunctionParams(t,i)}parseVarId(t,i){super.parseVarId(t,i),this.match(10)&&(t.id.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(t.id))}parseAsyncArrowFromCallExpression(t,i){if(this.match(10)){let r=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,t.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=r}return super.parseAsyncArrowFromCallExpression(t,i)}shouldParseAsyncArrow(){return this.match(10)||super.shouldParseAsyncArrow()}parseMaybeAssign(t,i){let r=null,n;if(this.hasPlugin("jsx")&&(this.match(139)||this.match(43))){if(r=this.state.clone(),n=this.tryParse(()=>super.parseMaybeAssign(t,i),r),!n.error)return n.node;let{context:a}=this.state,o=a[a.length-1];(o===be.j_oTag||o===be.j_expr)&&a.pop()}if(n?.error||this.match(43)){r=r||this.state.clone();let a,o=this.tryParse(l=>{a=this.flowParseTypeParameterDeclaration();let u=this.forwardNoArrowParamsConversionAt(a,()=>{let m=super.parseMaybeAssign(t,i);return this.resetStartLocationFromNode(m,a),m});u.extra?.parenthesized&&l();let f=this.maybeUnwrapTypeCastExpression(u);return f.type!=="ArrowFunctionExpression"&&l(),f.typeParameters=a,this.resetStartLocationFromNode(f,a),u},r),c=null;if(o.node&&this.maybeUnwrapTypeCastExpression(o.node).type==="ArrowFunctionExpression"){if(!o.error&&!o.aborted)return o.node.async&&this.raise(H.UnexpectedTypeParameterBeforeAsyncArrowFunction,a),o.node;c=o.node}if(n?.node)return this.state=n.failState,n.node;if(c)return this.state=o.failState,c;throw n?.thrown?n.error:o.thrown?o.error:this.raise(H.UnexpectedTokenAfterTypeParameter,a)}return super.parseMaybeAssign(t,i)}parseArrow(t){if(this.match(10)){let i=this.tryParse(()=>{let r=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;let n=this.startNode();return[n.typeAnnotation,t.predicate]=this.flowParseTypeAndPredicateInitialiser(!0),this.state.noAnonFunctionType=r,this.canInsertSemicolon()&&this.unexpected(),this.match(15)||this.unexpected(),n});if(i.thrown)return null;i.error&&(this.state=i.failState),t.returnType=i.node.typeAnnotation?this.finishNode(i.node,"TypeAnnotation"):null}return super.parseArrow(t)}shouldParseArrow(t){return this.match(10)||super.shouldParseArrow(t)}setArrowFunctionParameters(t,i){this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(t.start))?t.params=i:super.setArrowFunctionParameters(t,i)}checkParams(t,i,r,n=!0){if(!(r&&this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(t.start)))){for(let a=0;a<t.params.length;a++)this.isThisParam(t.params[a])&&a>0&&this.raise(H.ThisParamMustBeFirst,t.params[a]);super.checkParams(t,i,r,n)}}parseParenAndDistinguishExpression(t){return super.parseParenAndDistinguishExpression(t&&!this.state.noArrowAt.includes(this.sourceToOffsetPos(this.state.start)))}parseSubscripts(t,i,r){if(t.type==="Identifier"&&t.name==="async"&&this.state.noArrowAt.includes(i.index)){this.next();let n=this.startNodeAt(i);n.callee=t,n.arguments=super.parseCallExpressionArguments(),t=this.finishNode(n,"CallExpression")}else if(t.type==="Identifier"&&t.name==="async"&&this.match(43)){let n=this.state.clone(),a=this.tryParse(c=>this.parseAsyncArrowWithTypeParameters(i)||c(),n);if(!a.error&&!a.aborted)return a.node;let o=this.tryParse(()=>super.parseSubscripts(t,i,r),n);if(o.node&&!o.error)return o.node;if(a.node)return this.state=a.failState,a.node;if(o.node)return this.state=o.failState,o.node;throw a.error||o.error}return super.parseSubscripts(t,i,r)}parseSubscript(t,i,r,n){if(this.match(14)&&this.isLookaheadToken_lt()){if(n.optionalChainMember=!0,r)return n.stop=!0,t;this.next();let a=this.startNodeAt(i);return a.callee=t,a.typeArguments=this.flowParseTypeParameterInstantiationInExpression(),this.expect(6),a.arguments=this.parseCallExpressionArguments(),a.optional=!0,this.finishCallExpression(a,!0)}else if(!r&&this.shouldParseTypes()&&(this.match(43)||this.match(47))){let a=this.startNodeAt(i);a.callee=t;let o=this.tryParse(()=>(a.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(6),a.arguments=super.parseCallExpressionArguments(),n.optionalChainMember&&(a.optional=!1),this.finishCallExpression(a,n.optionalChainMember)));if(o.node)return o.error&&(this.state=o.failState),o.node}return super.parseSubscript(t,i,r,n)}parseNewCallee(t){super.parseNewCallee(t);let i=null;this.shouldParseTypes()&&this.match(43)&&(i=this.tryParse(()=>this.flowParseTypeParameterInstantiationCallOrNew()).node),t.typeArguments=i}parseAsyncArrowWithTypeParameters(t){let i=this.startNodeAt(t);if(this.parseFunctionParams(i,!1),!!this.parseArrow(i))return super.parseArrowExpression(i,void 0,!0)}readToken_mult_modulo(t){let i=this.input.charCodeAt(this.state.pos+1);if(t===42&&i===47&&this.state.hasFlowComment){this.state.hasFlowComment=!1,this.state.pos+=2,this.nextToken();return}super.readToken_mult_modulo(t)}readToken_pipe_amp(t){let i=this.input.charCodeAt(this.state.pos+1);if(t===124&&i===125){this.finishOp(5,2);return}super.readToken_pipe_amp(t)}parseTopLevel(t,i){let r=super.parseTopLevel(t,i);return this.state.hasFlowComment&&this.raise(H.UnterminatedFlowComment,this.state.curPosition()),r}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(H.NestedFlowComment,this.state.startLoc);this.hasFlowCommentCompletion();let t=this.skipFlowComment();t&&(this.state.pos+=t,this.state.hasFlowComment=!0);return}return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/")}skipFlowComment(){let{pos:t}=this.state,i=2;for(;[32,9].includes(this.input.charCodeAt(t+i));)i++;let r=this.input.charCodeAt(i+t),n=this.input.charCodeAt(i+t+1);return r===58&&n===58?i+2:this.input.slice(i+t,i+t+12)==="flow-include"?i+12:r===58&&n!==58?i:!1}hasFlowCommentCompletion(){if(this.input.indexOf("*/",this.state.pos)===-1)throw this.raise(b.UnterminatedComment,this.state.curPosition())}flowEnumErrorBooleanMemberNotInitialized(t,i){this.raise(H.EnumBooleanMemberNotInitialized,t,i)}flowEnumErrorInvalidMemberInitializer(t,i){return this.raise(i.explicitType?i.explicitType==="symbol"?H.EnumInvalidMemberInitializerSymbolType:H.EnumInvalidMemberInitializerPrimaryType:H.EnumInvalidMemberInitializerUnknownType,t,i)}flowEnumErrorNumberMemberNotInitialized(t,i){this.raise(H.EnumNumberMemberNotInitialized,t,i)}flowEnumErrorStringMemberInconsistentlyInitialized(t,i){this.raise(H.EnumStringMemberInconsistentlyInitialized,t,i)}flowEnumMemberInit(){let t=this.state.startLoc,i=()=>this.match(8)||this.match(4);switch(this.state.type){case 132:{let r=this.parseNumericLiteral(this.state.value);if(i())return{type:"number",loc:r.start,value:r};break}case 131:{let r=this.parseStringLiteral(this.state.value);if(i())return{type:"string",loc:r.start,value:r};break}case 81:case 82:{let r=this.parseBooleanLiteral(this.match(81));if(i())return{type:"boolean",loc:r.start,value:r}}}return{type:"invalid",loc:t}}flowEnumMemberRaw(){let t=this.state.startLoc,i=this.parseIdentifier(!0),r=this.eat(25)?this.flowEnumMemberInit():{type:"none",loc:t};return{id:i,init:r}}flowEnumCheckExplicitTypeMismatch(t,i,r){let{explicitType:n}=i;n!==null&&n!==r&&this.flowEnumErrorInvalidMemberInitializer(t,i)}flowEnumMembers({enumName:t,explicitType:i}){let r=new Set,n={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]},a=!1;for(;!this.match(4);){if(this.eat(17)){a=!0;break}let o=this.startNode(),{id:c,init:l}=this.flowEnumMemberRaw(),u=c.name;if(u==="")continue;/^[a-z]/.test(u)&&this.raise(H.EnumInvalidMemberName,c,{memberName:u,suggestion:u[0].toUpperCase()+u.slice(1),enumName:t}),r.has(u)&&this.raise(H.EnumDuplicateMemberName,c,{memberName:u,enumName:t}),r.add(u);let f={enumName:t,explicitType:i,memberName:u};switch(o.id=c,l.type){case"boolean":{this.flowEnumCheckExplicitTypeMismatch(l.loc,f,"boolean"),o.init=l.value,n.booleanMembers.push(this.finishNode(o,"EnumBooleanMember"));break}case"number":{this.flowEnumCheckExplicitTypeMismatch(l.loc,f,"number"),o.init=l.value,n.numberMembers.push(this.finishNode(o,"EnumNumberMember"));break}case"string":{this.flowEnumCheckExplicitTypeMismatch(l.loc,f,"string"),o.init=l.value,n.stringMembers.push(this.finishNode(o,"EnumStringMember"));break}case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(l.loc,f);case"none":switch(i){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(l.loc,f);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(l.loc,f);break;default:n.defaultedMembers.push(this.finishNode(o,"EnumDefaultedMember"))}}this.match(4)||this.expect(8)}return{members:n,hasUnknownMembers:a}}flowEnumStringMembers(t,i,{enumName:r}){if(t.length===0)return i;if(i.length===0)return t;if(i.length>t.length){for(let n of t)this.flowEnumErrorStringMemberInconsistentlyInitialized(n,{enumName:r});return i}else{for(let n of i)this.flowEnumErrorStringMemberInconsistentlyInitialized(n,{enumName:r});return t}}flowEnumParseExplicitType({enumName:t}){if(!this.eatContextual(99))return null;if(!de(this.state.type))throw this.raise(H.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName:t});let{value:i}=this.state;return this.next(),i!=="boolean"&&i!=="number"&&i!=="string"&&i!=="symbol"&&this.raise(H.EnumInvalidExplicitType,this.state.startLoc,{enumName:t,invalidEnumType:i}),i}flowEnumBody(t,i){let r=i.name,n=i.start,a=this.flowEnumParseExplicitType({enumName:r});this.expect(2);let{members:o,hasUnknownMembers:c}=this.flowEnumMembers({enumName:r,explicitType:a});switch(t.hasUnknownMembers=c,a){case"boolean":return t.explicitType=!0,t.members=o.booleanMembers,this.expect(4),this.finishNode(t,"EnumBooleanBody");case"number":return t.explicitType=!0,t.members=o.numberMembers,this.expect(4),this.finishNode(t,"EnumNumberBody");case"string":return t.explicitType=!0,t.members=this.flowEnumStringMembers(o.stringMembers,o.defaultedMembers,{enumName:r}),this.expect(4),this.finishNode(t,"EnumStringBody");case"symbol":return t.members=o.defaultedMembers,this.expect(4),this.finishNode(t,"EnumSymbolBody");default:{let l=()=>(t.members=[],this.expect(4),this.finishNode(t,"EnumStringBody"));t.explicitType=!1;let u=o.booleanMembers.length,f=o.numberMembers.length,m=o.stringMembers.length,x=o.defaultedMembers.length;if(!u&&!f&&!m&&!x)return l();if(!u&&!f)return t.members=this.flowEnumStringMembers(o.stringMembers,o.defaultedMembers,{enumName:r}),this.expect(4),this.finishNode(t,"EnumStringBody");if(!f&&!m&&u>=x){for(let I of o.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(I.start,{enumName:r,memberName:I.id.name});return t.members=o.booleanMembers,this.expect(4),this.finishNode(t,"EnumBooleanBody")}else if(!u&&!m&&f>=x){for(let I of o.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(I.start,{enumName:r,memberName:I.id.name});return t.members=o.numberMembers,this.expect(4),this.finishNode(t,"EnumNumberBody")}else return this.raise(H.EnumInconsistentMemberValues,n,{enumName:r}),l()}}}flowParseEnumDeclaration(t){let i=this.parseIdentifier();return t.id=i,t.body=this.flowEnumBody(this.startNode(),i),this.finishNode(t,"EnumDeclaration")}jsxParseOpeningElementAfterName(t){return this.shouldParseTypes()&&(this.match(43)||this.match(47))&&(t.typeArguments=this.flowParseTypeParameterInstantiationInExpression()),super.jsxParseOpeningElementAfterName(t)}isLookaheadToken_lt(){let t=this.nextTokenStart();if(this.input.charCodeAt(t)===60){let i=this.input.charCodeAt(t+1);return i!==60&&i!==61}return!1}reScan_lt_gt(){let{type:t}=this.state;t===43?(this.state.pos-=1,this.readToken_lt()):t===44&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){let{type:t}=this.state;return t===47?(this.state.pos-=2,this.finishOp(43,1),43):t}maybeUnwrapTypeCastExpression(t){return t.type==="TypeCastExpression"?t.expression:t}},uP={__proto__:null,quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02C6",tilde:"\u02DC",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203A",oline:"\u203E",frasl:"\u2044",euro:"\u20AC",image:"\u2111",weierp:"\u2118",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",lang:"\u2329",rang:"\u232A",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666"},Oi=/\r\n|[\r\n\u2028\u2029]/g;function Zt(s){switch(s){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}function vl(s,e,t){for(let i=e;i<t;i++)if(Zt(s.charCodeAt(i)))return!0;return!1}var pP=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,hP=/(?:[^\S\n\r\u2028\u2029]|\/\*.*?\*\/)*(?:(?!-->)(?:\s|\/\/.*|\/\*[^]*?\*\/|<!--.*|-->.*)*)?/g,pn=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g;function fP(s){switch(s){case 9:case 11:case 12:case 32:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8239:case 8287:case 12288:case 65279:return!0;default:return!1}}var dP={AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:({openingTagName:s})=>`Expected corresponding JSX closing tag for <${s}>.`,MissingClosingTagFragment:"Expected corresponding JSX closing tag for <>.",UnexpectedSequenceExpression:"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",UnexpectedToken:({unexpected:s,HTMLEntity:e})=>`Unexpected token \`${s}\`. Did you mean \`${e}\` or \`{'${s}'}\`?`,UnsupportedJsxValue:"JSX value should be either an expression or a quoted JSX text.",UnterminatedJsxContent:"Unterminated JSX contents.",UnwrappedAdjacentJSXElements:"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?"},pt=Ze`jsx`(dP);function mt(s){return s?s.type==="JSXOpeningFragment"||s.type==="JSXClosingFragment":!1}function Qt(s){if(s.type==="JSXIdentifier")return s.name;if(s.type==="JSXNamespacedName")return s.namespace.name+":"+s.name.name;if(s.type==="JSXMemberExpression")return Qt(s.object)+"."+Qt(s.property);throw new Error("Node had unexpected type: "+s.type)}var mP=s=>class extends s{jsxReadToken(){let t="",i=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(pt.UnterminatedJsxContent,this.state.startLoc);let r=this.input.charCodeAt(this.state.pos);switch(r){case 60:case 123:if(this.state.pos===this.state.start){r===60&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(139)):super.getTokenFromCode(r);return}t+=this.input.slice(i,this.state.pos),this.finishToken(138,t);return;case 38:t+=this.input.slice(i,this.state.pos),t+=this.jsxReadEntity(),i=this.state.pos;break;case 62:case 125:this.raise(pt.UnexpectedToken,this.state.curPosition(),{unexpected:this.input[this.state.pos],HTMLEntity:r===125?"&rbrace;":"&gt;"});default:Zt(r)?(t+=this.input.slice(i,this.state.pos),t+=this.jsxReadNewLine(!0),i=this.state.pos):++this.state.pos}}}jsxReadNewLine(t){let i=this.input.charCodeAt(this.state.pos),r;return++this.state.pos,i===13&&this.input.charCodeAt(this.state.pos)===10?(++this.state.pos,r=t?`
5
+ `:`\r
6
+ `):r=String.fromCharCode(i),++this.state.curLine,this.state.lineStart=this.state.pos,r}jsxReadString(t){let i="",r=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(b.UnterminatedString,this.state.startLoc);let n=this.input.charCodeAt(this.state.pos);if(n===t)break;n===38?(i+=this.input.slice(r,this.state.pos),i+=this.jsxReadEntity(),r=this.state.pos):Zt(n)?(i+=this.input.slice(r,this.state.pos),i+=this.jsxReadNewLine(!1),r=this.state.pos):++this.state.pos}i+=this.input.slice(r,this.state.pos++),this.finishToken(131,i)}jsxReadEntity(){let t=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let i=10;this.codePointAtPos(this.state.pos)===120&&(i=16,++this.state.pos);let r=this.readInt(i,void 0,!1,"bail");if(r!==null&&r<=1114111&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(r)}else{let i=0,r=!1;for(;i++<10&&this.state.pos<this.length&&!(r=this.codePointAtPos(this.state.pos)===59);)++this.state.pos;if(r){let n=this.input.slice(t,this.state.pos),a=uP[n];if(++this.state.pos,a)return a}}return this.state.pos=t,"&"}jsxReadWord(){let t,i=this.state.pos;do t=this.input.charCodeAt(++this.state.pos);while(kt(t)||t===45);this.finishToken(137,this.input.slice(i,this.state.pos))}jsxParseIdentifier(){let t=this.startNode();return this.match(137)?t.name=this.state.value:$i(this.state.type)?t.name=Tt(this.state.type):this.unexpected(),this.next(),this.finishNode(t,"JSXIdentifier")}jsxParseNamespacedName(){let t=this.state.startLoc,i=this.jsxParseIdentifier();if(!this.eat(10))return i;let r=this.startNodeAt(t);return r.namespace=i,r.name=this.jsxParseIdentifier(),this.finishNode(r,"JSXNamespacedName")}jsxParseElementName(){let t=this.state.startLoc,i=this.jsxParseNamespacedName();if(i.type==="JSXNamespacedName")return i;for(;this.eat(12);){let r=this.startNodeAt(t);r.object=i,r.property=this.jsxParseIdentifier(),i=this.finishNode(r,"JSXMemberExpression")}return i}jsxParseAttributeValue(){let t;switch(this.state.type){case 2:return t=this.startNode(),this.setContext(be.brace),this.next(),t=this.jsxParseExpressionContainer(t,be.j_oTag),t.expression.type==="JSXEmptyExpression"&&this.raise(pt.AttributeIsEmpty,t),t;case 139:case 131:return this.parseExprAtom();default:throw this.raise(pt.UnsupportedJsxValue,this.state.startLoc)}}jsxParseEmptyExpression(){let t=this.startNodeAt(this.state.lastTokEndLoc);return this.finishNodeAt(t,"JSXEmptyExpression",this.state.startLoc)}jsxParseSpreadChild(t){return this.next(),t.expression=this.parseExpression(),this.setContext(be.j_expr),this.state.canStartJSXElement=!0,this.expect(4),this.finishNode(t,"JSXSpreadChild")}jsxParseExpressionContainer(t,i){if(this.match(4))t.expression=this.jsxParseEmptyExpression();else{let r=this.parseExpression();r.type==="SequenceExpression"&&!r.extra?.parenthesized&&this.raise(pt.UnexpectedSequenceExpression,r.expressions[1]),t.expression=r}return this.setContext(i),this.state.canStartJSXElement=!0,this.expect(4),this.finishNode(t,"JSXExpressionContainer")}jsxParseAttribute(){if(this.match(2)){let i=this.startNode();return this.setContext(be.brace),this.next(),this.expect(17),i.argument=this.parseMaybeAssignAllowIn(),this.setContext(be.j_oTag),this.state.canStartJSXElement=!0,this.expect(4),this.finishNode(i,"JSXSpreadAttribute")}let t=this.startNode();return t.name=this.jsxParseNamespacedName(),t.value=this.eat(25)?this.jsxParseAttributeValue():null,this.finishNode(t,"JSXAttribute")}jsxParseOpeningElementAt(t){if(this.eat(140)){let r=this.startNodeAt(t);return this.finishNode(r,"JSXOpeningFragment")}let i=this.startNodeAt(t);return i.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(i)}jsxParseOpeningElementAfterName(t){let i=[];for(;!this.match(52)&&!this.match(140);)i.push(this.jsxParseAttribute());return t.attributes=i,t.selfClosing=this.eat(52),this.expect(140),this.finishNode(t,"JSXOpeningElement")}jsxParseClosingElementAt(t){if(this.eat(140)){let r=this.startNodeAt(t);return this.finishNode(r,"JSXClosingFragment")}let i=this.startNodeAt(t);return i.name=this.jsxParseElementName(),this.expect(140),this.finishNode(i,"JSXClosingElement")}jsxParseElementAt(t){let i=this.startNodeAt(t),r=[],n=this.jsxParseOpeningElementAt(t),a=null;if(!n.selfClosing){e:for(;;)switch(this.state.type){case 139:if(t=this.state.startLoc,this.next(),this.eat(52)){this.setLoc(t),a=this.jsxParseClosingElementAt(t);break e}r.push(this.jsxParseElementAt(t));break;case 138:r.push(this.parseLiteral(this.state.value,"JSXText"));break;case 2:{let o=this.startNode();this.setContext(be.brace),this.next(),this.match(17)?r.push(this.jsxParseSpreadChild(o)):r.push(this.jsxParseExpressionContainer(o,be.j_expr));break}default:this.unexpected()}mt(n)&&!mt(a)&&a!==null?this.raise(pt.MissingClosingTagFragment,a):!mt(n)&&mt(a)?this.raise(pt.MissingClosingTagElement,a,{openingTagName:Qt(n.name)}):!mt(n)&&!mt(a)&&Qt(a.name)!==Qt(n.name)&&this.raise(pt.MissingClosingTagElement,a,{openingTagName:Qt(n.name)})}if(mt(n)?(i.openingFragment=n,i.closingFragment=a):(i.openingElement=n,i.closingElement=a),i.children=r,this.match(43))throw this.raise(pt.UnwrappedAdjacentJSXElements,this.state.startLoc);return mt(n)?this.finishNode(i,"JSXFragment"):this.finishNode(i,"JSXElement")}jsxParseElement(){let t=this.state.startLoc;return this.next(),this.jsxParseElementAt(t)}setContext(t){let{context:i}=this.state;i[i.length-1]=t}parseExprAtom(t){return this.match(139)?this.jsxParseElement():this.match(43)&&this.input.charCodeAt(this.state.pos)!==33?(this.replaceToken(139),this.jsxParseElement()):super.parseExprAtom(t)}skipSpace(){this.curContext().preserveSpace||super.skipSpace()}getTokenFromCode(t){let i=this.curContext();if(i===be.j_expr){this.jsxReadToken();return}if(i===be.j_oTag||i===be.j_cTag){if(ot(t)){this.jsxReadWord();return}if(t===62){++this.state.pos,this.finishToken(140);return}if((t===34||t===39)&&i===be.j_oTag){this.jsxReadString(t);return}}if(t===60&&this.state.canStartJSXElement&&this.input.charCodeAt(this.state.pos+1)!==33){++this.state.pos,this.finishToken(139);return}super.getTokenFromCode(t)}updateContext(t){let{context:i,type:r}=this.state;if(r===52&&t===139)i.splice(-2,2,be.j_cTag),this.state.canStartJSXElement=!1;else if(r===139)i.push(be.j_oTag);else if(r===140){let n=i[i.length-1];n===be.j_oTag&&t===52||n===be.j_cTag?(i.pop(),this.state.canStartJSXElement=i[i.length-1]===be.j_expr):(this.setContext(be.j_expr),this.state.canStartJSXElement=!0)}else this.state.canStartJSXElement=Ug(r)}},xn=class extends _s{tsNames=new Map},gn=class extends js{get inTSNamespace(){let e=this.scopeStack;return e.length>=2&&e[e.length-1].flags===0&&(e[e.length-2].flags&2048)>0}importsStack=[];createScope(e){return this.importsStack.push(new Set),new xn(e)}enter(e){e&3072&&this.importsStack.push(new Set),super.enter(e)}exit(){let e=super.exit();return e&3072&&this.importsStack.pop(),e}hasImport(e,t){let i=this.importsStack.length;if(this.importsStack[i-1].has(e))return!0;if(!t&&i>1){for(let r=0;r<i-1;r++)if(this.importsStack[r].has(e))return!0}return!1}declareName(e,t,i){if(t&4096){this.hasImport(e,!0)&&this.parser.raise(b.VarRedeclaration,i,{identifierName:e}),this.importsStack[this.importsStack.length-1].add(e);return}let r=this.currentScope(),n=r.tsNames.get(e)||0;if(t&1024){this.maybeExportDefined(r,e),r.tsNames.set(e,n|16);return}super.declareName(e,t,i),t&2&&(t&1||(this.checkRedeclarationInScope(r,e,t,i),this.maybeExportDefined(r,e)),n=n|1),t&256&&(n=n|2),t&512&&(n=n|4),t&128&&(n=n|8),n&&r.tsNames.set(e,n)}isRedeclaredInScope(e,t,i){let r=e.tsNames.get(t);if((r&2)>0){if(i&256){let n=(i&512)>0,a=(r&4)>0;return n!==a}return!0}return i&128&&(r&8)>0?e.names.get(t)&2?!!(i&1):!1:i&2&&(r&1)>0?!0:super.isRedeclaredInScope(e,t,i)}checkLocalExport(e){let{name:t}=e;if(this.hasImport(t))return;let i=this.scopeStack.length;for(let r=i-1;r>=0;r--){let a=this.scopeStack[r].tsNames.get(t);if((a&1)>0||(a&16)>0)return}super.checkLocalExport(e)}},Pn=class{sawUnambiguousESM=!1;ambiguousScriptDifferentAst=!1;sourceToOffsetPos(e){return e+this.startIndex}offsetToSourcePos(e){return e-this.startIndex}hasPlugin(e){if(typeof e=="string")return this.plugins.has(e);{let[t,i]=e;if(!this.hasPlugin(t))return!1;let r=this.plugins.get(t);for(let n of Object.keys(i))if(r?.[n]!==i[n])return!1;return!0}}getPluginOption(e,t){return this.plugins.get(e)?.[t]}};function Xl(s,e){s.trailingComments===void 0?s.trailingComments=e:s.trailingComments.unshift(...e)}function yP(s,e){s.leadingComments===void 0?s.leadingComments=e:s.leadingComments.unshift(...e)}function Rs(s,e){s.innerComments===void 0?s.innerComments=e:s.innerComments.unshift(...e)}function yt(s,e,t){let i=null,r=e.length;for(;i===null&&r>0;)i=e[--r];i===null||i.start>t.start?Rs(s,t.comments):Xl(i,t.comments)}var bn=class extends Pn{addComment(e){this.filename&&(e.loc.filename=this.filename);let{commentsLen:t}=this.state;this.comments.length!==t&&(this.comments.length=t),this.comments.push(e),this.state.commentsLen++}processComment(e){let{commentStack:t}=this.state,i=t.length;if(i===0)return;let r=i-1,n=t[r];n.start===e.end&&(n.leadingNode=e,r--);let a=e.start;for(;r>=0;r--){let o=t[r],c=o.end;if(c>a)o.containingNode=e,this.finalizeComment(o),t.splice(r,1);else{c===a&&(o.trailingNode=e);break}}}finalizeComment(e){let{comments:t}=e;if(e.leadingNode!==null||e.trailingNode!==null)e.leadingNode!==null&&Xl(e.leadingNode,t),e.trailingNode!==null&&yP(e.trailingNode,t);else{let i=e.containingNode,r=e.start;if(this.input.charCodeAt(this.offsetToSourcePos(r)-1)===44)switch(i.type){case"ObjectExpression":case"ObjectPattern":yt(i,i.properties,e);break;case"CallExpression":case"NewExpression":case"OptionalCallExpression":yt(i,i.arguments,e);break;case"ImportExpression":yt(i,[i.source,i.options??null],e);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":case"TSTypeParameterDeclaration":yt(i,i.params,e);break;case"ArrayExpression":case"ArrayPattern":yt(i,i.elements,e);break;case"ExportNamedDeclaration":case"ImportDeclaration":yt(i,i.specifiers,e);break;case"TSEnumBody":yt(i,i.members,e);break;case"TSInterfaceBody":yt(i,i.body,e);break;default:Rs(i,t)}else Rs(i,t)}}finalizeRemainingComments(){let{commentStack:e}=this.state;for(let t=e.length-1;t>=0;t--)this.finalizeComment(e[t]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(e){let{commentStack:t}=this.state,{length:i}=t;if(i===0)return;let r=t[i-1];r.leadingNode===e&&(r.leadingNode=null)}takeSurroundingComments(e,t,i){let{commentStack:r}=this.state,n=r.length;if(n===0)return;let a=n-1;for(;a>=0;a--){let o=r[a],c=o.end;if(o.start===i)o.leadingNode=e;else if(c===t)o.trailingNode=e;else if(c<t)break}}},En=class s{flags=2048;get strict(){return(this.flags&1)>0}set strict(e){e?this.flags|=1:this.flags&=-2}startIndex;curLine;lineStart;startLoc;endLoc;init({strictMode:e,sourceType:t,startIndex:i,startLine:r,startColumn:n}){this.strict=e===!1?!1:e===!0?!0:t==="module",this.startIndex=i,this.curLine=r,this.lineStart=-n,this.startLoc=this.endLoc=new Fe(r,n,i)}errors=[];noArrowAt=[];noArrowParamsConversionAt=[];regExpAllowedAt=-1;get canStartArrow(){return(this.flags&2)>0}set canStartArrow(e){e?this.flags|=2:this.flags&=-3}get inType(){return(this.flags&4)>0}set inType(e){e?this.flags|=4:this.flags&=-5}get noAnonFunctionType(){return(this.flags&8)>0}set noAnonFunctionType(e){e?this.flags|=8:this.flags&=-9}get hasFlowComment(){return(this.flags&16)>0}set hasFlowComment(e){e?this.flags|=16:this.flags&=-17}get isAmbientContext(){return(this.flags&32)>0}set isAmbientContext(e){e?this.flags|=32:this.flags&=-33}get inAbstractClass(){return(this.flags&64)>0}set inAbstractClass(e){e?this.flags|=64:this.flags&=-65}get inDisallowConditionalTypesContext(){return(this.flags&128)>0}set inDisallowConditionalTypesContext(e){e?this.flags|=128:this.flags&=-129}get inConditionalConsequent(){return(this.flags&256)>0}set inConditionalConsequent(e){e?this.flags|=256:this.flags&=-257}get inHackPipelineBody(){return(this.flags&512)>0}set inHackPipelineBody(e){e?this.flags|=512:this.flags&=-513}get seenTopicReference(){return(this.flags&1024)>0}set seenTopicReference(e){e?this.flags|=1024:this.flags&=-1025}labels=[];commentsLen=0;commentStack=[];pos=0;type=136;value=null;start=0;end=0;lastTokEndLoc=null;lastTokStartLoc=null;context=[be.brace];get canStartJSXElement(){return(this.flags&2048)>0}set canStartJSXElement(e){e?this.flags|=2048:this.flags&=-2049}get containsEsc(){return(this.flags&4096)>0}set containsEsc(e){e?this.flags|=4096:this.flags&=-4097}firstInvalidTemplateEscapePos=null;get hasTopLevelAwait(){return(this.flags&8192)>0}set hasTopLevelAwait(e){e?this.flags|=8192:this.flags&=-8193}strictErrors=new Map;tokensLength=0;curPosition(){return new Fe(this.curLine,this.pos-this.lineStart,this.pos+this.startIndex)}clone(){let e=new s;return e.flags=this.flags,e.startIndex=this.startIndex,e.curLine=this.curLine,e.lineStart=this.lineStart,e.startLoc=this.startLoc,e.endLoc=this.endLoc,e.errors=this.errors.slice(),e.noArrowAt=this.noArrowAt.slice(),e.noArrowParamsConversionAt=this.noArrowParamsConversionAt.slice(),e.regExpAllowedAt=this.regExpAllowedAt,e.labels=this.labels.slice(),e.commentsLen=this.commentsLen,e.commentStack=this.commentStack.slice(),e.pos=this.pos,e.type=this.type,e.value=this.value,e.start=this.start,e.end=this.end,e.lastTokEndLoc=this.lastTokEndLoc,e.lastTokStartLoc=this.lastTokStartLoc,e.context=this.context.slice(),e.firstInvalidTemplateEscapePos=this.firstInvalidTemplateEscapePos,e.strictErrors=this.strictErrors,e.tokensLength=this.tokensLength,e}},TP=function(e){return e>=48&&e<=57},kl={decBinOct:new Set([46,66,69,79,95,98,101,111,43,45]),hex:new Set([46,88,95,120])},Mi={bin:s=>s===48||s===49,oct:s=>s>=48&&s<=55,dec:s=>s>=48&&s<=57,hex:s=>s>=48&&s<=57||s>=65&&s<=70||s>=97&&s<=102};function Dl(s,e,t,i,r,n){let a=t,o=i,c=r,l="",u=null,f=t,{length:m}=e;for(;;){if(t>=m){n.unterminated(a,o,c),l+=e.slice(f,t);break}let x=e.charCodeAt(t);if(SP(s,x,e,t)){l+=e.slice(f,t);break}if(x===92){l+=e.slice(f,t);let I=xP(e,t,i,r,s==="template",n);I.ch===null&&!u?u={pos:t,lineStart:i,curLine:r}:l+=I.ch,{pos:t,lineStart:i,curLine:r}=I,f=t}else x===8232||x===8233?(++t,++r,i=t):x===10||x===13?s==="template"?(l+=e.slice(f,t)+`
7
+ `,++t,x===13&&e.charCodeAt(t)===10&&++t,++r,f=i=t):n.unterminated(a,o,c):++t}return{pos:t,str:l,firstInvalidLoc:u,lineStart:i,curLine:r}}function SP(s,e,t,i){return s==="template"?e===96||e===36&&t.charCodeAt(i+1)===123:e===(s==="double"?34:39)}function xP(s,e,t,i,r,n){let a=!r;e++;let o=l=>({pos:e,ch:l,lineStart:t,curLine:i}),c=s.charCodeAt(e++);switch(c){case 110:return o(`
8
+ `);case 114:return o("\r");case 120:{let l;return{code:l,pos:e}=An(s,e,t,i,2,!1,a,n),o(l===null?null:String.fromCharCode(l))}case 117:{let l;return{code:l,pos:e}=zl(s,e,t,i,a,n),o(l===null?null:String.fromCodePoint(l))}case 116:return o(" ");case 98:return o("\b");case 118:return o("\v");case 102:return o("\f");case 13:s.charCodeAt(e)===10&&++e;case 10:t=e,++i;case 8232:case 8233:return o("");case 56:case 57:if(r)return o(null);n.strictNumericEscape(e-1,t,i);default:if(c>=48&&c<=55){let l=e-1,f=/^[0-7]+/.exec(s.slice(l,e+2))[0],m=parseInt(f,8);m>255&&(f=f.slice(0,-1),m=parseInt(f,8)),e+=f.length-1;let x=s.charCodeAt(e);if(f!=="0"||x===56||x===57){if(r)return o(null);n.strictNumericEscape(l,t,i)}return o(String.fromCharCode(m))}return o(String.fromCharCode(c))}}function An(s,e,t,i,r,n,a,o){let c=e,l;return{n:l,pos:e}=Wl(s,e,t,i,16,r,n,!1,o,!a),l===null&&(a?o.invalidEscapeSequence(c,t,i):e=c-1),{code:l,pos:e}}function Wl(s,e,t,i,r,n,a,o,c,l){let u=e,f=r===16?kl.hex:kl.decBinOct,m=r===16?Mi.hex:r===10?Mi.dec:r===8?Mi.oct:Mi.bin,x=!1,I=0;for(let L=0,N=n??1/0;L<N;++L){let w=s.charCodeAt(e),v;if(w===95&&o!=="bail"){let z=s.charCodeAt(e-1),V=s.charCodeAt(e+1);if(o){if(Number.isNaN(V)||!m(V)||f.has(z)){if(l)return{n:null,pos:e};c.unexpectedNumericSeparator(e,t,i)}}else{if(l)return{n:null,pos:e};c.numericSeparatorInEscapeSequence(e,t,i)}++e;continue}if(w>=97?v=w-97+10:w>=65?v=w-65+10:TP(w)?v=w-48:v=1/0,v>=r)if(v<=9){if(l)return{n:null,pos:e};c.invalidDigit(e,t,i,r),v=0}else if(a)v=0,x=!0;else break;++e,I=I*r+v}return e===u||n!=null&&e-u!==n||x?{n:null,pos:e}:{n:I,pos:e}}function zl(s,e,t,i,r,n){let a=s.charCodeAt(e),o;if(a===123){if(++e,{code:o,pos:e}=An(s,e,t,i,s.indexOf("}",e)-e,!0,r,n),++e,o!==null&&o>1114111)if(r)n.invalidCodePoint(e,t,i);else return{code:null,pos:e}}else({code:o,pos:e}=An(s,e,t,i,4,!1,r,n));return{code:o,pos:e}}function Ms(s,e,t){return new Fe(t,s-e,s)}var gP=new Set([103,109,115,105,121,117,100,118]),Cn=class{constructor(e){let t=e.startIndex||0;this.type=e.type,this.value=e.value,this.start=t+e.start,this.end=t+e.end,this.loc=new es(e.startLoc,e.endLoc)}},Fi,In=class extends bn{isLookahead;tokens=[];constructor(e,t){super(),this.state=new En,this.state.init(e),this.input=t,this.length=t.length,this.comments=[],this.isLookahead=!1,(!Fi||Fi.length<(this.length+1)*2)&&(Fi=new Uint32Array((this.length+1)*2)),this.locData=Fi}setLoc(e){let t=this.offsetToSourcePos(e.index);this.locData[t*2]=e.line,this.locData[t*2+1]=e.column}getLoc(e){let t=this.offsetToSourcePos(e);return new Fe(this.locData[t*2],this.locData[t*2+1],e)}pushToken(e){this.tokens.length=this.state.tokensLength,this.tokens.push(e),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.optionFlags&512&&this.pushToken(new Cn(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(e){return this.match(e)?(this.next(),!0):!1}match(e){return this.state.type===e}createLookaheadState(e){return{pos:e.pos,value:null,type:e.type,start:e.start,end:e.end,context:[this.curContext()],inType:e.inType,startLoc:e.startLoc,lastTokEndLoc:e.lastTokEndLoc,curLine:e.curLine,lineStart:e.lineStart,curPosition:e.curPosition}}lookahead(){let e=this.state;this.state=this.createLookaheadState(e),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;let t=this.state;return this.state=e,t}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(e){let t=this.inModule||!(this.optionFlags&16384)?pP:hP;return t.lastIndex=e,t.test(this.input)?t.lastIndex:e}lookaheadCharCode(){return this.lookaheadCharCodeSince(this.state.pos)}lookaheadCharCodeSince(e){return this.input.charCodeAt(this.nextTokenStartSince(e))}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(e){return pn.lastIndex=e,pn.test(this.input)?pn.lastIndex:e}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(e){let t=this.input.charCodeAt(e);if((t&64512)===55296&&++e<this.input.length){let i=this.input.charCodeAt(e);(i&64512)===56320&&(t=65536+((t&1023)<<10)+(i&1023))}return t}setStrict(e){this.state.strict=e,e&&(this.state.strictErrors.forEach(([t,i])=>this.raise(t,i)),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){if(this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length){this.finishToken(136);return}this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(e){let t;this.isLookahead||(t=this.state.curPosition());let i=this.state.pos,r=this.input.indexOf(e,i+2);if(r===-1)throw this.raise(b.UnterminatedComment,this.state.curPosition());for(this.state.pos=r+e.length,Oi.lastIndex=i+2;Oi.test(this.input)&&Oi.lastIndex<=r;)++this.state.curLine,this.state.lineStart=Oi.lastIndex;if(this.isLookahead)return;let n={type:"CommentBlock",value:this.input.slice(i+2,r),start:this.sourceToOffsetPos(i),end:this.sourceToOffsetPos(r+e.length),loc:new es(t,this.state.curPosition())};return this.optionFlags&512&&this.pushToken(n),n}skipLineComment(e){let t=this.state.pos,i;this.isLookahead||(i=this.state.curPosition());let r=this.input.charCodeAt(this.state.pos+=e);if(this.state.pos<this.length)for(;!Zt(r)&&++this.state.pos<this.length;)r=this.input.charCodeAt(this.state.pos);if(this.isLookahead)return;let n=this.state.pos,o={type:"CommentLine",value:this.input.slice(t+e,n),start:this.sourceToOffsetPos(t),end:this.sourceToOffsetPos(n),loc:new es(i,this.state.curPosition())};return this.optionFlags&512&&this.pushToken(o),o}skipSpace(){let e=this.state.pos,t=(this.optionFlags&8192)>0,i;e:for(;this.state.pos<this.length;){let r=this.input.charCodeAt(this.state.pos);switch(r){case 32:case 160:case 9:++this.state.pos;break;case 13:this.input.charCodeAt(this.state.pos+1)===10&&++this.state.pos;case 10:case 8232:case 8233:++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;break;case 47:switch(this.input.charCodeAt(this.state.pos+1)){case 42:{let n=this.skipBlockComment("*/");n!==void 0&&(this.addComment(n),t&&(i??=[]).push(n));break}case 47:{let n=this.skipLineComment(2);n!==void 0&&(this.addComment(n),t&&(i??=[]).push(n));break}default:break e}break;default:if(fP(r))++this.state.pos;else if(r===45&&!this.inModule&&this.optionFlags&16384){let n=this.state.pos;if(this.input.charCodeAt(n+1)===45&&this.input.charCodeAt(n+2)===62&&(e===0||this.state.lineStart>e)){let a=this.skipLineComment(3);a!==void 0&&(this.addComment(a),t&&(i??=[]).push(a))}else break e}else if(r===60&&!this.inModule&&this.optionFlags&16384){let n=this.state.pos;if(this.input.charCodeAt(n+1)===33&&this.input.charCodeAt(n+2)===45&&this.input.charCodeAt(n+3)===45){let a=this.skipLineComment(4);a!==void 0&&(this.addComment(a),t&&(i??=[]).push(a))}else break e}else break e}}if(i?.length){let r=this.state.pos,n={start:this.sourceToOffsetPos(e),end:this.sourceToOffsetPos(r),comments:i,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(n)}}finishToken(e,t){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();let i=this.state.type;this.state.type=e,this.state.value=t,this.isLookahead||this.updateContext(i)}replaceToken(e){this.state.type=e,this.updateContext()}readToken_numberSign(){if(this.state.pos===0&&this.readToken_interpreter())return;let e=this.state.pos+1,t=this.codePointAtPos(e);if(t>=48&&t<=57)throw this.raise(b.UnexpectedDigitAfterHash,this.state.curPosition());ot(t)?(++this.state.pos,this.finishToken(135,this.readWord1(t))):t===92?(++this.state.pos,this.finishToken(135,this.readWord1())):this.finishOp(23,1)}readToken_dot(){let e=this.input.charCodeAt(this.state.pos+1);if(e>=48&&e<=57){this.readNumber(!0);return}e===46&&this.input.charCodeAt(this.state.pos+2)===46?(this.state.pos+=3,this.finishToken(17)):(++this.state.pos,this.finishToken(12))}readToken_slash(){this.input.charCodeAt(this.state.pos+1)===61?this.finishOp(27,2):this.finishOp(52,1)}readToken_interpreter(){if(this.state.pos!==0||this.length<2)return!1;let e=this.input.charCodeAt(this.state.pos+1);if(e!==33)return!1;let t=this.state.pos;for(this.state.pos+=1;!Zt(e)&&++this.state.pos<this.length;)e=this.input.charCodeAt(this.state.pos);let i=this.input.slice(t+2,this.state.pos);return this.finishToken(24,i),!0}readToken_mult_modulo(e){let t=e===42?51:50,i=1,r=this.input.charCodeAt(this.state.pos+1);e===42&&r===42&&(i++,r=this.input.charCodeAt(this.state.pos+2),t=53),r===61&&!this.state.inType&&(i++,t=e===37?29:26),this.finishOp(t,i)}readToken_pipe_amp(e){let t=this.input.charCodeAt(this.state.pos+1);if(t===e){this.input.charCodeAt(this.state.pos+2)===61?this.finishOp(26,3):this.finishOp(e===124?37:38,2);return}if(e===124&&t===62){this.finishOp(35,2);return}if(t===61){this.finishOp(26,2);return}this.finishOp(e===124?39:41,1)}readToken_caret(){let e=this.input.charCodeAt(this.state.pos+1);e===61&&!this.state.inType?this.finishOp(28,2):e===94&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"^^"}])?(this.finishOp(33,2),this.input.codePointAt(this.state.pos)===94&&this.unexpected()):this.finishOp(40,1)}readToken_atSign(){this.input.charCodeAt(this.state.pos+1)===64&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"@@"}])?this.finishOp(34,2):this.finishOp(22,1)}readToken_plus_min(e){let t=this.input.charCodeAt(this.state.pos+1);if(t===e){this.finishOp(30,2);return}t===61?this.finishOp(26,2):this.finishOp(49,1)}readToken_lt(){let{pos:e}=this.state,t=this.input.charCodeAt(e+1);if(t===60){if(this.input.charCodeAt(e+2)===61){this.finishOp(26,3);return}this.finishOp(47,2);return}if(t===61){this.finishOp(45,2);return}this.finishOp(43,1)}readToken_gt(){let{pos:e}=this.state,t=this.input.charCodeAt(e+1);if(t===62){let i=this.input.charCodeAt(e+2)===62?3:2;if(this.input.charCodeAt(e+i)===61){this.finishOp(26,i+1);return}this.finishOp(48,i);return}if(t===61){this.finishOp(45,2);return}this.finishOp(44,1)}readToken_eq_excl(e){let t=this.input.charCodeAt(this.state.pos+1);if(t===61){this.finishOp(42,this.input.charCodeAt(this.state.pos+2)===61?3:2);return}if(e===61&&t===62){this.state.pos+=2,this.finishToken(15);return}this.finishOp(e===61?25:31,1)}readToken_question(){let e=this.input.charCodeAt(this.state.pos+1),t=this.input.charCodeAt(this.state.pos+2);e===63?t===61?this.finishOp(26,3):this.finishOp(36,2):e===46&&!(t>=48&&t<=57)?(this.state.pos+=2,this.finishToken(14)):(++this.state.pos,this.finishToken(13))}getTokenFromCode(e){switch(e){case 46:this.readToken_dot();return;case 40:++this.state.pos,this.finishToken(6);return;case 41:++this.state.pos,this.finishToken(7);return;case 59:++this.state.pos,this.finishToken(9);return;case 44:++this.state.pos,this.finishToken(8);return;case 91:++this.state.pos,this.finishToken(0);return;case 93:++this.state.pos,this.finishToken(1);return;case 123:++this.state.pos,this.finishToken(2);return;case 125:++this.state.pos,this.finishToken(4);return;case 58:this.hasPlugin("functionBind")&&this.input.charCodeAt(this.state.pos+1)===58?this.finishOp(11,2):(++this.state.pos,this.finishToken(10));return;case 63:this.readToken_question();return;case 96:this.readTemplateToken();return;case 48:{let t=this.input.charCodeAt(this.state.pos+1);if(t===120||t===88){this.readRadixNumber(16);return}if(t===111||t===79){this.readRadixNumber(8);return}if(t===98||t===66){this.readRadixNumber(2);return}}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:this.readNumber(!1);return;case 34:case 39:this.readString(e);return;case 47:this.readToken_slash();return;case 37:case 42:this.readToken_mult_modulo(e);return;case 124:case 38:this.readToken_pipe_amp(e);return;case 94:this.readToken_caret();return;case 43:case 45:this.readToken_plus_min(e);return;case 60:this.readToken_lt();return;case 62:this.readToken_gt();return;case 61:case 33:this.readToken_eq_excl(e);return;case 126:this.finishOp(32,1);return;case 64:this.readToken_atSign();return;case 35:this.readToken_numberSign();return;case 92:this.readWord();return;default:if(ot(e)){this.readWord(e);return}}throw this.raise(b.InvalidOrUnexpectedToken,this.state.curPosition(),{unexpected:String.fromCodePoint(e)})}finishOp(e,t){let i=this.input.slice(this.state.pos,this.state.pos+t);this.state.pos+=t,this.finishToken(e,i)}readRegexp(){let e=this.state.startLoc,t=this.state.start+1,i,r,{pos:n}=this.state;for(;;++n){if(n>=this.length)throw this.raise(b.UnterminatedRegExp,ze(e,1));let l=this.input.charCodeAt(n);if(Zt(l))throw this.raise(b.UnterminatedRegExp,ze(e,1));if(i)i=!1;else{if(l===91)r=!0;else if(l===93&&r)r=!1;else if(l===47&&!r)break;i=l===92}}let a=this.input.slice(t,n);++n;let o="",c=()=>ze(e,n+2-t);for(;n<this.length;){let l=this.codePointAtPos(n),u=String.fromCharCode(l);if(gP.has(l))l===118?o.includes("u")&&this.raise(b.IncompatibleRegExpUVFlags,c()):l===117&&o.includes("v")&&this.raise(b.IncompatibleRegExpUVFlags,c()),o.includes(u)&&this.raise(b.DuplicateRegExpFlags,c());else if(kt(l)||l===92)this.raise(b.MalformedRegExpFlags,c());else break;++n,o+=u}this.state.pos=n,this.finishToken(134,{pattern:a,flags:o})}readInt(e,t,i=!1,r=!0){let{n,pos:a}=Wl(this.input,this.state.pos,this.state.lineStart,this.state.curLine,e,t,i,r,this.errorHandlers_readInt,!1);return this.state.pos=a,n}readRadixNumber(e){let t=this.state.pos,i=this.state.curPosition(),r=!1;this.state.pos+=2;let n=this.readInt(e);if(n==null&&this.raise(b.InvalidDigit,ze(i,2),{radix:e}),this.input.charCodeAt(this.state.pos)===110&&(++this.state.pos,r=!0),ot(this.codePointAtPos(this.state.pos)))throw this.raise(b.NumberIdentifier,this.state.curPosition());if(r){let o=this.input.slice(t,this.state.pos).replace(/[_n]/g,"");this.finishToken(133,o);return}this.finishToken(132,n)}readNumber(e){let t=this.state.pos,i=this.state.curPosition(),r=!1,n=!1,a=!1;!e&&this.readInt(10)===null&&this.raise(b.InvalidNumber,this.state.curPosition());let o=this.state.pos-t>=2&&this.input.charCodeAt(t)===48;if(o){let f=this.input.slice(t,this.state.pos);if(this.recordStrictModeErrors(b.StrictOctalLiteral,i),!this.state.strict){let m=f.indexOf("_");m>0&&this.raise(b.ZeroDigitNumericSeparator,ze(i,m))}a=o&&!/[89]/.test(f)}let c=this.input.charCodeAt(this.state.pos);c===46&&!a&&(++this.state.pos,this.readInt(10),r=!0,c=this.input.charCodeAt(this.state.pos)),(c===69||c===101)&&!a&&(c=this.input.charCodeAt(++this.state.pos),(c===43||c===45)&&++this.state.pos,this.readInt(10)===null&&this.raise(b.InvalidOrMissingExponent,i),r=!0,c=this.input.charCodeAt(this.state.pos));let l=this.input.slice(t,this.state.pos).replaceAll("_","");if(c===110&&((r||o)&&this.raise(b.InvalidBigIntLiteral,i),++this.state.pos,n=!0),ot(this.codePointAtPos(this.state.pos)))throw this.raise(b.NumberIdentifier,this.state.curPosition());if(n){this.finishToken(133,l);return}let u=a?parseInt(l,8):parseFloat(l);this.finishToken(132,u)}readCodePoint(e){let{code:t,pos:i}=zl(this.input,this.state.pos,this.state.lineStart,this.state.curLine,e,this.errorHandlers_readCodePoint);return this.state.pos=i,t}readString(e){let{str:t,pos:i,curLine:r,lineStart:n}=Dl(e===34?"double":"single",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string);this.state.pos=i+1,this.state.lineStart=n,this.state.curLine=r,this.finishToken(131,t)}readTemplateContinuation(){this.match(4)||this.unexpected(null,4),this.state.pos--,this.readTemplateToken()}readTemplateToken(){let e=this.input[this.state.pos],{str:t,firstInvalidLoc:i,pos:r,curLine:n,lineStart:a}=Dl("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=r+1,this.state.lineStart=a,this.state.curLine=n,i&&(this.state.firstInvalidTemplateEscapePos=new Fe(i.curLine,i.pos-i.lineStart,this.sourceToOffsetPos(i.pos))),this.input.codePointAt(r)===96?this.finishToken(20,i?null:e+t+"`"):(this.state.pos++,this.finishToken(21,i?null:e+t+"${"))}recordStrictModeErrors(e,t){let i=t.index;this.state.strict&&!this.state.strictErrors.has(i)?this.raise(e,t):this.state.strictErrors.set(i,[e,t])}readWord1(e){this.state.containsEsc=!1;let t="",i=this.state.pos,r=this.state.pos;for(e!==void 0&&(this.state.pos+=e<=65535?1:2);this.state.pos<this.length;){let n=this.codePointAtPos(this.state.pos);if(kt(n))this.state.pos+=n<=65535?1:2;else if(n===92){this.state.containsEsc=!0,t+=this.input.slice(r,this.state.pos);let a=this.state.curPosition(),o=this.state.pos===i?ot:kt;if(this.input.charCodeAt(++this.state.pos)!==117){this.raise(b.MissingUnicodeEscape,this.state.curPosition()),r=this.state.pos-1;continue}++this.state.pos;let c=this.readCodePoint(!0);c!==null&&(o(c)||this.raise(b.EscapedCharNotAnIdentifier,a),t+=String.fromCodePoint(c)),r=this.state.pos}else break}return t+this.input.slice(r,this.state.pos)}readWord(e){let t=this.readWord1(e),i=jn.get(t);i!==void 0?this.finishToken(i,Tt(i)):this.finishToken(129,t)}checkKeywordEscapes(){let{type:e}=this.state;$i(e)&&this.state.containsEsc&&this.raise(b.InvalidEscapedReservedWord,this.state.startLoc,{reservedWord:Tt(e)})}raise(e,t,i={}){let r=t instanceof Fe?t:typeof t=="number"?this.getLoc(t):this.optionFlags&256?t.loc.start:this.getLoc(t.start),n=t instanceof Fe?r.index:typeof t=="number"?t:t.start,a=e(r,n,i);if(!(this.optionFlags&4096))throw a;return this.isLookahead||this.state.errors.push(a),a}raiseOverwrite(e,t,i={}){let r=t instanceof Fe?t:this.optionFlags&256?t.loc.start:this.getLoc(t.start),n=t instanceof Fe?r.index:t.start,a=this.state.errors;for(let o=a.length-1;o>=0;o--){let c=a[o];if(c.pos===n)return a[o]=e(r,n,i);if(c.pos<n)break}return this.raise(e,r,i)}updateContext(e){}unexpected(e,t){throw this.raise(b.UnexpectedToken,e??this.state.startLoc,{expected:t?Tt(t):null})}expectPlugin(e,t){if(this.hasPlugin(e))return!0;throw this.raise(b.MissingPlugin,t??this.state.startLoc,{missingPlugin:[e]})}expectOnePlugin(e){if(!e.some(t=>this.hasPlugin(t)))throw this.raise(b.MissingOneOfPlugins,this.state.startLoc,{missingPlugin:e})}errorBuilder(e){return(t,i,r)=>{this.raise(e,Ms(t,i,r))}}errorHandlers_readInt={invalidDigit:(e,t,i,r)=>{this.raise(b.InvalidDigit,Ms(e,t,i),{radix:r})},numericSeparatorInEscapeSequence:this.errorBuilder(b.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(b.UnexpectedNumericSeparator)};errorHandlers_readCodePoint={...this.errorHandlers_readInt,invalidEscapeSequence:this.errorBuilder(b.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(b.InvalidCodePoint)};errorHandlers_readStringContents_string={...this.errorHandlers_readCodePoint,strictNumericEscape:(e,t,i)=>{this.recordStrictModeErrors(b.StrictNumericEscape,Ms(e,t,i))},unterminated:(e,t,i)=>{throw this.raise(b.UnterminatedString,Ms(e-1,t,i))}};errorHandlers_readStringContents_template={...this.errorHandlers_readCodePoint,strictNumericEscape:this.errorBuilder(b.StrictNumericEscape),unterminated:(e,t,i)=>{throw this.raise(b.UnterminatedTemplate,Ms(e,t,i))}}},wn=class{privateNames=new Set;loneAccessors=new Map;undefinedPrivateNames=new Map},Nn=class{parser;stack=[];constructor(e){this.parser=e}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new wn)}exit(){let e=this.stack.pop(),t=this.current();for(let[i,r]of Array.from(e.undefinedPrivateNames))t?t.undefinedPrivateNames.has(i)||t.undefinedPrivateNames.set(i,r):this.parser.raise(b.InvalidPrivateFieldResolution,r,{identifierName:i})}declarePrivateName(e,t,i){let{privateNames:r,loneAccessors:n,undefinedPrivateNames:a}=this.current(),o=r.has(e);if(t&3){let c=o&&n.get(e);if(c){let l=c&4,u=t&4,f=c&3,m=t&3;o=f===m||l!==u,o||n.delete(e)}else o||n.set(e,t)}o&&this.parser.raise(b.PrivateNameRedeclaration,i,{identifierName:e}),r.add(e),a.delete(e)}usePrivateName(e,t){let i;for(i of this.stack)if(i.privateNames.has(e))return;i?i.undefinedPrivateNames.set(e,t):this.parser.raise(b.InvalidPrivateFieldResolution,t,{identifierName:e})}},ts=class{constructor(e=0){this.type=e}canBeArrowParameterDeclaration(){return this.type===2||this.type===1}isCertainlyParameterDeclaration(){return this.type===3}},Vi=class extends ts{declarationErrors=new Map;constructor(e){super(e)}recordDeclarationError(e,t){this.declarationErrors.set(t,e)}clearDeclarationError(e){this.declarationErrors.delete(e)}iterateErrors(e){this.declarationErrors.forEach(e)}},vn=class{parser;stack=[new ts];constructor(e){this.parser=e}enter(e){this.stack.push(e)}exit(){this.stack.pop()}recordParameterInitializerError(e,t){let{stack:i}=this,r=i.length-1,n=i[r];for(;!n.isCertainlyParameterDeclaration();){if(n.canBeArrowParameterDeclaration())n.recordDeclarationError(e,t);else return;n=i[--r]}this.parser.raise(e,t)}recordArrowParameterBindingError(e,t){let{stack:i}=this,r=i[i.length-1],n=t.start;if(r.isCertainlyParameterDeclaration())this.parser.raise(e,n);else if(r.canBeArrowParameterDeclaration())r.recordDeclarationError(e,n);else return}recordAsyncArrowParametersError(e){let{stack:t}=this,i=t.length-1,r=t[i];for(;r.canBeArrowParameterDeclaration();)r.type===2&&r.recordDeclarationError(b.AwaitBindingIdentifier,e),r=t[--i]}validateAsPattern(){let{stack:e}=this,t=e[e.length-1];t.canBeArrowParameterDeclaration()&&t.iterateErrors((i,r)=>{this.parser.raise(i,r);let n=e.length-2,a=e[n];for(;a.canBeArrowParameterDeclaration();)a.clearDeclarationError(r),a=e[--n]})}};function PP(){return new ts(3)}function bP(){return new Vi(1)}function EP(){return new Vi(2)}function kn(){return new ts}var Dn=class{stacks=[];enter(e){this.stacks.push(e)}exit(){this.stacks.pop()}currentFlags(){return this.stacks[this.stacks.length-1]}get hasAwait(){return(this.currentFlags()&2)>0}get hasYield(){return(this.currentFlags()&1)>0}get hasReturn(){return(this.currentFlags()&4)>0}get hasIn(){return(this.currentFlags()&8)>0}get inFSharpPipelineDirectBody(){return(this.currentFlags()&16)===0}};function Ri(s,e){return(s?2:0)|(e?1:0)}var Ln=class extends In{addExtra(e,t,i,r=!0){if(!e)return;let{extra:n}=e;n==null&&(n={},e.extra=n),r?n[t]=i:Object.defineProperty(n,t,{enumerable:r,value:i})}isContextual(e){return this.state.type===e&&!this.state.containsEsc}isUnparsedContextual(e,t){if(this.input.startsWith(t,e)){let i=this.input.charCodeAt(e+t.length);return!(kt(i)||(i&64512)===55296)}return!1}isLookaheadContextual(e){let t=this.nextTokenStart();return this.isUnparsedContextual(t,e)}eatContextual(e){return this.isContextual(e)?(this.next(),!0):!1}expectContextual(e,t){if(!this.eatContextual(e)){if(t!=null)throw this.raise(t,this.state.startLoc);this.unexpected(null,e)}}canInsertSemicolon(){return this.match(136)||this.match(4)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return vl(this.input,this.offsetToSourcePos(this.state.lastTokEndLoc.index),this.state.start)}hasFollowingLineBreak(){return vl(this.input,this.state.end,this.nextTokenStart())}isLineTerminator(){return this.eat(9)||this.canInsertSemicolon()}semicolon(e=!0){(e?this.isLineTerminator():this.eat(9))||this.raise(b.MissingSemicolon,this.state.lastTokEndLoc)}expect(e,t){this.eat(e)||this.unexpected(t,e)}tryParse(e,t=this.state.clone()){let i={node:null};try{let r=e((n=null)=>{throw i.node=n,i});if(this.state.errors.length>t.errors.length){let n=this.state;return this.state=t,this.state.tokensLength=n.tokensLength,{node:r,error:n.errors[t.errors.length],thrown:!1,aborted:!1,failState:n}}return{node:r,error:null,thrown:!1,aborted:!1,failState:null}}catch(r){let n=this.state;if(this.state=t,r instanceof SyntaxError)return{node:null,error:r,thrown:!0,aborted:!1,failState:n};if(r===i)return{node:i.node,error:null,thrown:!1,aborted:!0,failState:n};throw r}}checkExpressionErrors(e,t){if(!e)return!1;let{shorthandAssignLoc:i,doubleProtoLoc:r,privateKeyLoc:n,optionalParametersLoc:a,voidPatternLoc:o}=e,c=!!i||!!r||!!a||!!n||!!o;if(!t)return c;i!=null&&this.raise(b.InvalidCoverInitializedName,i),r!=null&&this.raise(b.DuplicateProto,r),n!=null&&this.raise(b.UnexpectedPrivateField,n),a!=null&&this.unexpected(a),o!=null&&this.raise(b.InvalidCoverDiscardElement,o)}isLiteralPropertyName(){return Rl(this.state.type)}isPrivateName(e){return e.type==="PrivateName"}getPrivateNameSV(e){return e.id.name}hasPropertyAsPrivateName(e){return(e.type==="MemberExpression"||e.type==="OptionalMemberExpression")&&this.isPrivateName(e.property)}isObjectProperty(e){return e.type==="ObjectProperty"}isObjectMethod(e){return e.type==="ObjectMethod"}initializeScopes(e=this.options.sourceType==="module"){let t=this.state.labels;this.state.labels=[];let i=this.exportedIdentifiers;this.exportedIdentifiers=new Set;let r=this.inModule;this.inModule=e;let n=this.scope,a=this.getScopeHandler();this.scope=new a(this,e);let o=this.prodParam;this.prodParam=new Dn;let c=this.classScope;this.classScope=new Nn(this);let l=this.expressionScope;return this.expressionScope=new vn(this),()=>{this.state.labels=t,this.exportedIdentifiers=i,this.inModule=r,this.scope=n,this.prodParam=o,this.classScope=c,this.expressionScope=l}}enterInitialScopes(){let e=0;(this.inModule||this.optionFlags&1)&&(e|=2),this.optionFlags&32&&(e|=1);let t=!this.inModule&&this.options.sourceType==="commonjs";(t||this.optionFlags&2)&&(e|=4),this.prodParam.enter(e);let i=t?514:1;this.optionFlags&4&&(i|=512),this.optionFlags&16&&(i|=48),this.scope.enter(i)}checkDestructuringPrivate(e){let{privateKeyLoc:t}=e;t!==null&&this.expectPlugin("destructuringPrivate",t)}},Nt=class{shorthandAssignLoc=null;doubleProtoLoc=null;privateKeyLoc=null;optionalParametersLoc=null;voidPatternLoc=null},vt=class{constructor(e,t,i,r){this.start=i,this.end=0,r!==void 0&&(this.loc=new es(r)),e&128&&(this.range=[i,0]),r!==void 0&&t&&(this.loc.filename=t)}type=""},Ll=vt.prototype,On=class extends Ln{createPosition(e){return e}startNode(){let{startLoc:e}=this.state;return this.setLoc(e),this.startNodeAt(e)}startNodeAt(e){let{optionFlags:t,filename:i}=this;return t&256?new vt(t,i,e.index,this.createPosition(e)):new vt(t,i,e.index)}startNodeAtNode(e){let{optionFlags:t,filename:i}=this;return t&256?new vt(t,i,e.start,e.loc.start):new vt(t,i,e.start)}finishNode(e,t){return this.finishNodeAt(e,t,this.state.lastTokEndLoc)}finishNodeAt(e,t,i){e.type=t,e.end=i.index;let{optionFlags:r}=this;return r&256&&(e.loc.end=this.createPosition(i)),r&128&&(e.range[1]=i.index),r&8192&&this.processComment(e),e}finishNodeAtNode(e,t,i){e.type=t,e.end=i.end;let{optionFlags:r}=this;return r&256&&(e.loc.end=i.loc.end),r&128&&(e.range[1]=e.end),r&8192&&this.processComment(e),e}resetStartLocation(e,t){e.start=t.index;let{optionFlags:i}=this;i&256&&(e.loc.start=this.createPosition(t)),i&128&&(e.range[0]=t.index)}resetEndLocation(e,t=this.state.lastTokEndLoc){e.end=t.index;let{optionFlags:i}=this;i&256&&(e.loc.end=this.createPosition(t)),i&128&&(e.range[1]=t.index)}resetStartLocationFromNode(e,t){e.start=t.start;let{optionFlags:i}=this;i&256&&(e.loc.start=t.loc.start),i&128&&(e.range[0]=t.start)}resetEndLocationFromNode(e,t){e.end=t.end;let{optionFlags:i}=this;i&256&&(e.loc.end=t.loc.end),i&128&&(e.range[1]=t.end)}castNodeTo(e,t){return e.type=t,e}cloneIdentifier(e){let{type:t,start:i,end:r,loc:n,range:a,name:o}=e,c=Object.create(Ll);return c.type=t,c.start=i,c.end=r,c.loc=n,c.range=a,c.name=o,e.extra&&(c.extra=e.extra),c}cloneStringLiteral(e){let{type:t,start:i,end:r,loc:n,range:a,extra:o}=e,c=Object.create(Ll);return c.type=t,c.start=i,c.end=r,c.loc=n,c.range=a,c.extra=o,c.value=e.value,c}},Ki=s=>s.type==="ParenthesizedExpression"?Ki(s.expression):s,Mn=class extends On{toAssignable(e,t=!1){let i;switch((e.type==="ParenthesizedExpression"||e.extra?.parenthesized)&&(i=Ki(e),t?i.type==="Identifier"?this.expressionScope.recordArrowParameterBindingError(b.InvalidParenthesizedAssignment,e):i.type!=="CallExpression"&&i.type!=="MemberExpression"&&!this.isOptionalMemberExpression(i)&&this.raise(b.InvalidParenthesizedAssignment,e):this.raise(b.InvalidParenthesizedAssignment,e)),e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":case"VoidPattern":break;case"ObjectExpression":this.castNodeTo(e,"ObjectPattern");for(let r=0,n=e.properties.length,a=n-1;r<n;r++){let o=e.properties[r],c=r===a;this.toAssignableObjectExpressionProp(o,c,t),c&&o.type==="RestElement"&&e.extra?.trailingCommaLoc&&this.raise(b.RestTrailingComma,e.extra.trailingCommaLoc)}break;case"ObjectProperty":{let{key:r,value:n}=e;this.isPrivateName(r)&&this.classScope.usePrivateName(this.getPrivateNameSV(r),r.start),this.toAssignable(n,t);break}case"SpreadElement":throw new Error("Internal @babel/parser error (this is a bug, please report it). SpreadElement should be converted by .toAssignable's caller.");case"ArrayExpression":this.castNodeTo(e,"ArrayPattern"),this.toAssignableList(e.elements,e.extra?.trailingCommaLoc,t);break;case"AssignmentExpression":e.operator!=="="&&this.raise(b.MissingEqInAssignment,this.optionFlags&256?e.left.loc.end:e.left),this.castNodeTo(e,"AssignmentPattern"),delete e.operator,e.left.type==="VoidPattern"&&this.raise(b.VoidPatternInitializer,e.left),this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(i,t);break}}toAssignableObjectExpressionProp(e,t,i){if(e.type==="ObjectMethod")this.raise(e.kind==="get"||e.kind==="set"?b.PatternHasAccessor:b.PatternHasMethod,e.key);else if(e.type==="SpreadElement"){this.castNodeTo(e,"RestElement");let r=e.argument;this.checkToRestConversion(r,!1),this.toAssignable(r,i),t||this.raise(b.RestTrailingComma,e)}else this.toAssignable(e,i)}toAssignableList(e,t,i){let r=e.length-1;for(let n=0;n<=r;n++){let a=e[n];a&&(this.toAssignableListItem(e,n,i),a.type==="RestElement"&&(n<r?this.raise(b.RestTrailingComma,a):t&&this.raise(b.RestTrailingComma,t)))}}toAssignableListItem(e,t,i){let r=e[t];if(r.type==="SpreadElement"){this.castNodeTo(r,"RestElement");let n=r.argument;this.checkToRestConversion(n,!0),this.toAssignable(n,i)}else this.toAssignable(r,i)}isAssignable(e,t){switch(e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":case"VoidPattern":return!0;case"ObjectExpression":{let i=e.properties.length-1;return e.properties.every((r,n)=>r.type!=="ObjectMethod"&&(n===i||r.type!=="SpreadElement")&&this.isAssignable(r))}case"ObjectProperty":return this.isAssignable(e.value);case"SpreadElement":return this.isAssignable(e.argument);case"ArrayExpression":return e.elements.every(i=>i===null||this.isAssignable(i));case"AssignmentExpression":return e.operator==="=";case"ParenthesizedExpression":return this.isAssignable(e.expression);case"MemberExpression":case"OptionalMemberExpression":return!t;default:return!1}}toReferencedList(e,t){return e}parseSpread(e){let t=this.startNode();return this.next(),t.argument=this.parseMaybeAssignAllowIn(e),this.finishNode(t,"SpreadElement")}parseRestBinding(){let e=this.startNode();this.next();let t=this.parseBindingAtom();return t.type==="VoidPattern"&&this.raise(b.UnexpectedVoidPattern,t),e.argument=t,this.finishNode(e,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{let e=this.startNode();return this.next(),e.elements=this.parseBindingList(1,93,1),this.finishNode(e,"ArrayPattern")}case 2:return this.parseObjectLike(4,!0);case 84:return this.parseVoidPattern(null)}return this.parseIdentifier()}parseBindingList(e,t,i){let r=i&1,n=[],a=!0;for(;!this.eat(e);)if(a?a=!1:this.expect(8),r&&this.match(8))n.push(null);else{if(this.eat(e))break;if(this.match(17)){let o=this.parseRestBinding();if(i&2&&(o=this.parseFunctionParamType(o)),n.push(o),!this.checkCommaAfterRest(t)){this.expect(e);break}}else{let o=[];if(i&2)for(this.match(22)&&this.hasPlugin("decorators")&&this.raise(b.UnsupportedParameterDecorator,this.state.startLoc);this.match(22);)o.push(this.parseDecorator());n.push(this.parseBindingElement(i,o))}}return n}parseBindingRestProperty(e){return this.next(),this.hasPlugin("discardBinding")&&this.match(84)?(e.argument=this.parseVoidPattern(null),this.raise(b.UnexpectedVoidPattern,e.argument)):e.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(e,"RestElement")}parseBindingProperty(){let{type:e,startLoc:t}=this.state;if(e===17)return this.parseBindingRestProperty(this.startNode());let i=this.startNode();return e===135?(this.expectPlugin("destructuringPrivate",t),this.classScope.usePrivateName(this.state.value,t),i.key=this.parsePrivateName()):this.parsePropertyName(i),i.method=!1,this.parseObjPropValue(i,t,!1,!1,!0,!1)}parseBindingElement(e,t){let{startLoc:i}=this.state,r=this.parseMaybeDefault();return e&2&&this.parseFunctionParamType(r),t.length&&(r.decorators=t,this.resetStartLocationFromNode(r,t[0])),this.parseMaybeDefault(i,r)}parseFunctionParamType(e){return e}parseMaybeDefault(e,t){if(e??=this.state.startLoc,t=t??this.parseBindingAtom(),!this.eat(25))return t;let i=this.startNodeAt(e);return t.type==="VoidPattern"&&this.raise(b.VoidPatternInitializer,t),i.left=t,i.right=this.parseMaybeAssignAllowIn(),this.finishNode(i,"AssignmentPattern")}isValidLVal(e,t,i,r){switch(e){case"AssignmentPattern":return"left";case"RestElement":return"argument";case"ObjectProperty":return"value";case"ParenthesizedExpression":return"expression";case"ArrayPattern":return"elements";case"ObjectPattern":return"properties";case"VoidPattern":return!0;case"CallExpression":if(!t&&!this.state.strict&&this.optionFlags&16384)return!0}return!1}isOptionalMemberExpression(e){return e.type==="OptionalMemberExpression"}checkLVal(e,t,i=64,r=!1,n=!1,a=!1,o=!1){let c=e.type;if(this.isObjectMethod(e))return;let l=this.isOptionalMemberExpression(e);if(l||c==="MemberExpression"){l&&(this.expectPlugin("optionalChainingAssign",e.start),t.type!=="AssignmentExpression"&&this.raise(b.InvalidLhsOptionalChaining,e,{ancestor:t})),i!==64&&this.raise(b.InvalidPropertyBindingPattern,e);return}if(c==="Identifier"){this.checkIdentifier(e,i,n);let{name:N}=e;r&&(r.has(N)?this.raise(b.ParamDupe,e):r.add(N));return}else c==="VoidPattern"&&t.type==="CatchClause"&&this.raise(b.VoidPatternCatchClauseParam,e);let u=Ki(e);o||=i!==64||u.type==="CallExpression"&&(u.callee.type==="Import"||u.callee.type==="Super");let f=this.isValidLVal(c,o,!(a||e.extra?.parenthesized)&&t.type==="AssignmentExpression",i);if(f===!0)return;if(f===!1){let N=i===64?b.InvalidLhs:b.InvalidLhsBinding;this.raise(N,e,{ancestor:t});return}let m,x;typeof f=="string"?(m=f,x=c==="ParenthesizedExpression"):[m,x]=f;let I=c==="ArrayPattern"||c==="ObjectPattern"?{type:c}:t,L=e[m];if(Array.isArray(L))for(let N of L)N&&this.checkLVal(N,I,i,r,n,x,!0);else L&&this.checkLVal(L,I,i,r,n,x,o)}checkIdentifier(e,t,i=!1){this.checkStrictBindReservedWord(e,t,i),t&8192&&e.name==="let"&&this.raise(b.LetInLexicalBinding,e),t&64||this.declareNameFromIdentifier(e,t)}checkStrictBindReservedWord(e,t,i=!1){this.state.strict&&(i?Jl(e.name,this.inModule):$l(e.name))&&(t===64?this.raise(b.StrictEvalArguments,e,{referenceName:e.name}):this.raise(b.StrictEvalArgumentsBinding,e,{bindingName:e.name}))}declareNameFromIdentifier(e,t){this.scope.declareName(e.name,t,e.start)}checkToRestConversion(e,t){switch(e.type){case"ParenthesizedExpression":this.checkToRestConversion(e.expression,t);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(t)break;default:this.raise(b.InvalidRestAssignmentPattern,e)}}checkCommaAfterRest(e){return this.match(8)?(this.raise(this.lookaheadCharCode()===e?b.RestTrailingComma:b.ElementAfterRest,this.state.startLoc),!0):!1}},Fn=class extends Mn{checkProto(e,t,i){if(e.type==="SpreadElement"||this.isObjectMethod(e)||e.computed||e.shorthand)return t;let r=e.key;return(r.type==="Identifier"?r.name:r.value)==="__proto__"?(t&&(i?i.doubleProtoLoc===null&&(i.doubleProtoLoc=this.getLoc(r.start)):this.raise(b.DuplicateProto,r)),!0):t}shouldExitDescending(e){return e.type==="ArrowFunctionExpression"&&!e.extra?.parenthesized}getExpression(){if(this.enterInitialScopes(),this.nextToken(),this.match(136))throw this.raise(b.ParseExpressionEmptyInput,this.state.startLoc);let e=this.parseExpression();if(!this.match(136))throw this.raise(b.ParseExpressionExpectsEOF,this.state.startLoc,{unexpected:this.input.codePointAt(this.state.start)});return this.finalizeRemainingComments(),e.comments=this.comments,e.errors=this.state.errors,this.optionFlags&512&&(e.tokens=Hl(this.tokens)),e}parseExpression(e,t){return e?this.disallowInAnd(()=>this.parseExpressionBase(t)):this.allowInAnd(()=>this.parseExpressionBase(t))}parseExpressionBase(e){let t=this.state.startLoc,i=this.parseMaybeAssign(e);if(this.match(8)){let r=this.startNodeAt(t);for(r.expressions=[i];this.eat(8);)r.expressions.push(this.parseMaybeAssign(e));return this.toReferencedList(r.expressions),this.finishNode(r,"SequenceExpression")}return i}parseMaybeAssignDisallowIn(e){return this.disallowInAnd(()=>this.parseMaybeAssign(e))}parseMaybeAssignAllowIn(e,t){return this.allowInAnd(()=>this.parseMaybeAssign(e,t))}setOptionalParametersError(e){e.optionalParametersLoc=this.state.startLoc}parseMaybeAssign(e,t){let i=this.state.startLoc,r=this.isContextual(105);if(r&&this.prodParam.hasYield){this.next();let o=this.parseYield(i);return t&&(o=this.parseParenItem(o,i)),o}let n;e?n=!1:(e=new Nt,n=!0),this.state.canStartArrow=!0;let a=this.parseMaybeConditional(e);if(t&&(a=this.parseParenItem(a,i)),Vg(this.state.type)&&!(this.match(27)&&this.state.lastTokEndLoc.index===this.state.regExpAllowedAt)){let o=this.startNodeAt(i),c=this.state.value;if(o.operator=c,this.match(25)){this.toAssignable(a,!0),o.left=a;let l=i.index;e.doubleProtoLoc!=null&&e.doubleProtoLoc.index>=l&&(e.doubleProtoLoc=null),e.shorthandAssignLoc!=null&&e.shorthandAssignLoc.index>=l&&(e.shorthandAssignLoc=null),e.privateKeyLoc!=null&&e.privateKeyLoc.index>=l&&(this.checkDestructuringPrivate(e),e.privateKeyLoc=null),e.voidPatternLoc!=null&&e.voidPatternLoc.index>=l&&(e.voidPatternLoc=null)}else o.left=a;return this.next(),o.right=this.parseMaybeAssign(),this.checkLVal(a,this.finishNode(o,"AssignmentExpression"),void 0,void 0,void 0,void 0,c==="||="||c==="&&="||c==="??="),o}else n&&this.checkExpressionErrors(e,!0);if(r){let{type:o}=this.state;if((this.hasPlugin("v8intrinsic")?Fs(o):Fs(o)&&!this.match(50))&&!this.isAmbiguousPrefixOrIdentifier())return this.raiseOverwrite(b.YieldNotInGeneratorFunction,i),this.parseYield(i)}return a}parseMaybeConditional(e){let t=this.state.startLoc,i=this.parseExprOps(e);return this.shouldExitDescending(i)?i:this.parseConditional(i,t,e)}parseConditional(e,t,i){if(this.eat(13)){let r=this.startNodeAt(t);return r.test=e,r.consequent=this.parseMaybeAssignAllowIn(),this.expect(10),r.alternate=this.parseMaybeAssign(),this.finishNode(r,"ConditionalExpression")}return e}parseMaybeUnaryOrPrivate(e){return this.match(135)?this.parsePrivateName():this.parseMaybeUnary(e)}parseExprOps(e){let t=this.state.startLoc,i=this.parseMaybeUnaryOrPrivate(e);return this.shouldExitDescending(i)?i:(this.state.canStartArrow=!1,this.parseExprOp(i,t,-1))}isEscapedKeywordOperatorAfterLineBreak(){return $i(this.state.type)&&this.state.containsEsc&&this.hasPrecedingLineBreak()}isBinaryOperator(e){return qg(e)&&(this.prodParam.hasIn||e!==54)&&!this.isEscapedKeywordOperatorAfterLineBreak()}parseExprOp(e,t,i){let r=this.state.type,n=this.isBinaryOperator(r);if(this.isPrivateName(e)){let a=this.getPrivateNameSV(e);(i>=ji(54)||r!==54||!n)&&this.raise(b.PrivateInExpectedIn,t,{identifierName:a}),this.classScope.usePrivateName(a,t)}if(n){let a=ji(r);if(a>i){if(r===35&&(this.expectPlugin("pipelineOperator"),this.prodParam.inFSharpPipelineDirectBody))return e;let o=this.startNodeAt(t);o.left=e,o.operator=this.state.value;let c=r===37||r===38,l=r===36;l&&(a=ji(38)),this.next(),o.right=this.parseExprOpRightExpr(r,a);let u=this.finishNode(o,c||l?"LogicalExpression":"BinaryExpression"),f=this.state.type;if(l&&(f===37||f===38)||c&&f===36)throw this.raise(b.MixingCoalesceWithLogical,this.state.startLoc);return this.parseExprOp(u,t,i)}}return e}parseExprOpRightExpr(e,t){switch(e){case 35:switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext(()=>this.parseHackPipeBody());case"fsharp":return this.parseFSharpPipelineBody(t)}default:return this.parseExprOpBaseRightExpr(e,t)}}parseExprOpBaseRightExpr(e,t){let i=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),i,zg(e)?t-1:t)}parseHackPipeBody(){let{startLoc:e}=this.state,t=this.parseMaybeAssign();return kg.has(t.type)&&!t.extra?.parenthesized&&this.raise(b.PipeUnparenthesizedBody,e,{type:t.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(b.PipeTopicUnused,e),t}checkExponentialAfterUnary(e){this.match(53)&&this.raise(b.UnexpectedTokenUnaryExponentiation,e.argument)}parseMaybeUnary(e,t){let i=this.state.startLoc,r=this.isContextual(93);if(r&&this.recordAwaitIfAllowed()){this.next();let c=this.parseAwait(i);return t||this.checkExponentialAfterUnary(c),c}let n=this.match(30),a=this.startNode();if(Jg(this.state.type)){a.operator=this.state.value,a.prefix=!0,this.state.canStartArrow=!1,this.match(68)&&this.expectPlugin("throwExpressions");let c=this.match(85);if(this.next(),a.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(e,!0),this.state.strict&&c){let l=Ki(a.argument);l.type==="Identifier"?this.raise(b.StrictDelete,a):this.hasPropertyAsPrivateName(l)&&this.raise(b.DeletePrivateField,a)}if(!n)return t||this.checkExponentialAfterUnary(a),this.finishNode(a,"UnaryExpression")}let o=this.parseUpdate(a,n,e);if(r){let{type:c}=this.state;if((this.hasPlugin("v8intrinsic")?Fs(c):Fs(c)&&!this.match(50))&&!this.isAmbiguousPrefixOrIdentifier())return this.raiseOverwrite(b.AwaitNotInAsyncContext,i),this.parseAwait(i)}return o}parseUpdate(e,t,i){if(t){let a=this.finishNode(e,"UpdateExpression");return this.checkLVal(a.argument,a),a}let r=this.state.startLoc,n=this.parseExprSubscripts(i);if(this.checkExpressionErrors(i,!1))return n;for(;$g(this.state.type)&&!this.canInsertSemicolon();){let a=this.startNodeAt(r);a.operator=this.state.value,a.prefix=!1,a.argument=n,this.next(),this.checkLVal(n,n=this.finishNode(a,"UpdateExpression"))}return n}parseExprSubscripts(e){let t=this.state.startLoc;if(this.setLoc(t),e!=null&&(this.match(2)||this.match(0))){let r=new Nt,n=this.parseExprAtom(r),a=this.parseSubscripts(n,t);return a!==n?this.checkExpressionErrors(r,!0):(e.shorthandAssignLoc??=r.shorthandAssignLoc,e.doubleProtoLoc??=r.doubleProtoLoc,e.privateKeyLoc??=r.privateKeyLoc,e.optionalParametersLoc??=r.optionalParametersLoc,e.voidPatternLoc??=r.voidPatternLoc),a}let i=this.parseExprAtom(e);return this.shouldExitDescending(i)?i:this.parseSubscripts(i,t)}parseSubscripts(e,t,i){let r={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(e),stop:!1};do e=this.parseSubscript(e,t,i,r),r.maybeAsyncArrow=!1;while(!r.stop);return e}parseSubscript(e,t,i,r){let{type:n}=this.state;if(!i&&n===11)return this.parseBind(e,t,r);if(mn(n))return this.parseTaggedTemplateExpression(e,t,r);let a=!1;if(n===14){if(i&&(this.raise(b.OptionalChainingNoNew,this.state.startLoc),this.lookaheadCharCode()===40))return this.stopParseSubscript(e,r);r.optionalChainMember=a=!0,this.next()}if(!i&&this.match(6))return this.parseCoverCallAndAsyncArrowHead(e,t,r,a);{let o=this.eat(0);return o||a||this.eat(12)?this.parseMember(e,t,r,o,a):this.stopParseSubscript(e,r)}}stopParseSubscript(e,t){return t.stop=!0,e}parseMember(e,t,i,r,n){let a=this.startNodeAt(t);return a.object=e,a.computed=r,r?(a.property=this.parseExpression(),this.expect(1)):this.match(135)?(e.type==="Super"&&this.raise(b.SuperPrivateField,t),this.classScope.usePrivateName(this.state.value,this.state.startLoc),a.property=this.parsePrivateName()):a.property=this.parseIdentifier(!0),i.optionalChainMember?(a.optional=n,this.finishNode(a,"OptionalMemberExpression")):this.finishNode(a,"MemberExpression")}parseBind(e,t,i){let r=this.startNodeAt(t);r.object=e,this.next();let n=this.parseNoCallExpr(a=>{throw this.raise(b.UnsupportedBindRHS,a)});if(n.type==="Super"||n.type==="Import")throw this.raise(b.UnsupportedBindRHS,n);return r.callee=n,i.stop=!0,this.parseSubscripts(this.finishNode(r,"BindExpression"),t,!1)}parseCoverCallAndAsyncArrowHead(e,t,i,r){let n=null;this.next();let a=this.startNodeAt(t);a.callee=e;let{maybeAsyncArrow:o,optionalChainMember:c}=i;o&&(this.expressionScope.enter(EP()),n=new Nt),c&&(a.optional=r),r?a.arguments=this.parseCallExpressionArguments():a.arguments=this.parseCallExpressionArguments(e.type!=="Super",a,n);let l=this.finishCallExpression(a,c);return o&&this.shouldParseAsyncArrow()&&!r?(i.stop=!0,this.checkDestructuringPrivate(n),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),l=this.parseAsyncArrowFromCallExpression(this.startNodeAt(t),l)):(o&&(this.checkExpressionErrors(n,!0),this.expressionScope.exit()),this.toReferencedList(a.arguments)),l}parseTaggedTemplateExpression(e,t,i){let r=this.startNodeAt(t);return r.tag=e,r.quasi=this.parseTemplate(!0),i.optionalChainMember&&this.raise(b.OptionalChainingNoTemplate,t),this.finishNode(r,"TaggedTemplateExpression")}atPossibleAsyncArrow(e){return e.type==="Identifier"&&e.name==="async"&&this.state.lastTokEndLoc.index===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.state.canStartArrow}finishCallExpression(e,t){if(e.callee.type==="Import")if(e.arguments.length===0||e.arguments.length>2)this.raise(b.ImportCallArity,e);else for(let i of e.arguments)i.type==="SpreadElement"&&this.raise(b.ImportCallSpreadArgument,i);return this.finishNode(e,t?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(e,t,i){let r=[],n=!0;for(;!this.eat(7);){if(n)n=!1;else if(this.expect(8),this.match(7)){t&&this.addTrailingCommaExtraToNode(t),this.next();break}r.push(this.parseExprListItem(7,!1,i,e))}return r}shouldParseAsyncArrow(){return this.match(15)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(e,t){return this.resetPreviousNodeTrailingComments(t),this.expect(15),this.parseArrowExpression(e,t.arguments,!0,t.extra?.trailingCommaLoc),t.innerComments&&Rs(e,t.innerComments),t.callee.trailingComments&&Rs(e,t.callee.trailingComments),e}parseNoCallExpr(e){let t=this.state.startLoc,i=this.match(79);this.state.canStartArrow=!1;let r=this.parseExprAtom();return i&&r.type==="ImportExpression"&&e(r),this.parseSubscripts(r,t,!0)}parseExprAtom(e){let t,i=null,{type:r}=this.state;switch(r){case 75:return this.parseSuper();case 79:return t=this.startNode(),this.next(),this.match(12)?this.parseImportMetaPropertyOrPhaseCall(t):this.match(6)?this.optionFlags&1024?this.parseImportCall(t):this.finishNode(t,"Import"):(this.raise(b.UnsupportedImport,this.state.lastTokStartLoc),this.finishNode(t,"Import"));case 74:return t=this.startNode(),this.next(),this.finishNode(t,"ThisExpression");case 86:return this.parseDo(this.startNode(),!1);case 52:case 27:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 132:return this.parseNumericLiteral(this.state.value);case 133:return this.parseBigIntLiteral(this.state.value);case 131:return this.parseStringLiteral(this.state.value);case 80:return this.parseNullLiteral();case 81:return this.parseBooleanLiteral(!0);case 82:return this.parseBooleanLiteral(!1);case 6:return this.parseParenAndDistinguishExpression(this.state.canStartArrow);case 0:return this.parseArrayLike(1,e);case 2:return this.parseObjectLike(4,!1,e);case 64:return this.parseFunctionOrFunctionSent();case 22:i=this.parseDecorators();case 76:return this.parseClass(this.maybeTakeDecorators(i,this.startNode()),!1);case 73:return this.parseNewOrNewTarget();case 21:case 20:return this.parseTemplate(!1);case 11:{t=this.startNode(),this.next(),t.object=null;let n=t.callee=this.parseNoCallExpr(a=>{throw this.raise(b.UnsupportedBind,a)});if(n.type==="MemberExpression")return this.finishNode(t,"BindExpression");throw this.raise(b.UnsupportedBind,n)}case 135:return this.raise(b.PrivateInExpectedIn,this.state.startLoc,{identifierName:this.state.value}),this.parsePrivateName();case 29:return this.parseTopicReferenceThenEqualsSign(50,"%");case 28:return this.parseTopicReferenceThenEqualsSign(40,"^");case 33:case 34:return this.parseTopicReference("hack");case 40:case 50:case 23:{let n=this.getPluginOption("pipelineOperator","proposal");if(n)return this.parseTopicReference(n);throw this.unexpected()}case 43:{let n=this.input.codePointAt(this.nextTokenStart());throw ot(n)||n===62?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected()}default:if(de(r)){if(this.isContextual(124)&&this.lookaheadInLineCharCode()===123)return this.parseModuleExpression();let{canStartArrow:n,containsEsc:a}=this.state,o=this.parseIdentifier();if(!a&&o.name==="async"&&!this.canInsertSemicolon()){let{type:c}=this.state;if(c===64)return this.resetPreviousNodeTrailingComments(o),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(o));if(de(c))return n&&this.lookaheadCharCode()===61?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(o)):o;if(c===86)return this.resetPreviousNodeTrailingComments(o),this.parseDo(this.startNodeAtNode(o),!0)}return n&&this.match(15)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(o),[o],!1)):o}else throw this.unexpected()}}parseTopicReferenceThenEqualsSign(e,t){let i=this.getPluginOption("pipelineOperator","proposal");if(i)return this.state.type=e,this.state.value=t,this.state.pos--,this.state.end--,this.state.endLoc=ze(this.state.endLoc,-1),this.parseTopicReference(i);throw this.unexpected()}parseTopicReference(e){let t=this.startNode(),i=this.state.startLoc,r=this.state.type;return this.next(),this.finishTopicReference(t,i,e,r)}finishTopicReference(e,t,i,r){if(this.testTopicReferenceConfiguration(i,t,r))return this.topicReferenceIsAllowedInCurrentContext()||this.raise(b.PipeTopicUnbound,t),this.registerTopicReference(),this.finishNode(e,"TopicReference");throw this.raise(b.PipeTopicUnconfiguredToken,t,{token:Tt(r)})}testTopicReferenceConfiguration(e,t,i){if(e==="hack")return this.hasPlugin(["pipelineOperator",{topicToken:Tt(i)}]);throw this.raise(b.PipeTopicRequiresHackPipes,t)}parseAsyncArrowUnaryFunction(e){this.prodParam.enter(Ri(!0,this.prodParam.hasYield));let t=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(b.LineTerminatorBeforeArrow,this.state.curPosition()),this.expect(15),this.parseArrowExpression(e,t,!0)}parseDo(e,t){this.expectPlugin("doExpressions"),t&&this.expectPlugin("asyncDoExpressions"),e.async=t,this.next();let i=this.state.labels;return this.state.labels=[],t?(this.prodParam.enter(2),e.body=this.parseBlock(),this.prodParam.exit()):e.body=this.parseBlock(),this.state.labels=i,this.finishNode(e,"DoExpression")}parseSuper(){let e=this.startNode();return this.next(),this.match(6)&&!this.scope.allowDirectSuper?this.raise(b.SuperNotAllowed,e):this.scope.allowSuper||this.raise(b.UnexpectedSuper,e),!this.match(6)&&!this.match(0)&&!this.match(12)&&this.raise(b.UnsupportedSuper,e),this.finishNode(e,"Super")}parsePrivateName(){let e=this.startNode(),t=this.startNodeAt(ze(this.state.startLoc,1)),i=this.state.value;return this.next(),e.id=this.createIdentifier(t,i),this.finishNode(e,"PrivateName")}parseFunctionOrFunctionSent(){let e=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(12)){let t=this.createIdentifier(this.startNodeAtNode(e),"function");return this.next(),this.match(100)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected(),this.parseMetaProperty(e,t,"sent")}return this.parseFunction(e)}parseMetaProperty(e,t,i){e.meta=t;let r=this.state.containsEsc;return e.property=this.parseIdentifier(!0),(e.property.name!==i||r)&&this.raise(b.UnsupportedMetaProperty,e.property,{target:t.name,onlyValidPropertyName:i}),this.finishNode(e,"MetaProperty")}parseImportMetaPropertyOrPhaseCall(e){if(this.next(),this.isContextual(102)||this.isContextual(94)){let t=this.isContextual(102);return this.expectPlugin(t?"sourcePhaseImports":"deferredImportEvaluation"),this.next(),e.phase=t?"source":"defer",this.parseImportCall(e)}else{let t=this.createIdentifierAt(this.startNodeAtNode(e),"import",this.state.lastTokStartLoc);return this.isContextual(98)&&(this.inModule||this.raise(b.ImportMetaOutsideModule,t),this.sawUnambiguousESM=!0),this.parseMetaProperty(e,t,"meta")}}parseLiteralAtNode(e,t,i){return this.addExtra(i,"rawValue",e),this.addExtra(i,"raw",this.input.slice(this.offsetToSourcePos(i.start),this.state.end)),i.value=e,this.next(),this.finishNode(i,t)}parseLiteral(e,t){let i=this.startNode();return this.parseLiteralAtNode(e,t,i)}parseStringLiteral(e){return this.parseLiteral(e,"StringLiteral")}parseNumericLiteral(e){return this.parseLiteral(e,"NumericLiteral")}parseBigIntLiteral(e){let t;try{t=BigInt(e)}catch{t=null}return this.parseLiteral(t,"BigIntLiteral")}parseRegExpLiteral(e){let t=this.startNode();return this.addExtra(t,"raw",this.input.slice(this.offsetToSourcePos(t.start),this.state.end)),t.pattern=e.pattern,t.flags=e.flags,this.next(),this.finishNode(t,"RegExpLiteral")}parseBooleanLiteral(e){let t=this.startNode();return t.value=e,this.next(),this.finishNode(t,"BooleanLiteral")}parseNullLiteral(){let e=this.startNode();return this.next(),this.finishNode(e,"NullLiteral")}parseParenAndDistinguishExpression(e){let t=this.state.startLoc,i;this.next(),this.expressionScope.enter(bP());let r=this.state.startLoc,n=[],a=new Nt,o=!0,c,l;for(;!this.match(7);){if(o)o=!1;else if(this.expect(8,a.optionalParametersLoc===null?null:a.optionalParametersLoc),this.match(7)){l=this.state.startLoc;break}if(this.match(17)){let m=this.state.startLoc;if(c=this.state.startLoc,n.push(this.parseParenItem(this.parseRestBinding(),m)),!this.checkCommaAfterRest(41))break}else n.push(this.parseMaybeAssignAllowInOrVoidPattern(7,a,!0))}let u=this.state.lastTokEndLoc;this.expect(7);let f=this.startNodeAt(t);return e&&this.shouldParseArrow(n)&&(f=this.parseArrow(f))?(this.checkDestructuringPrivate(a),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(f,n,!1),f):(this.expressionScope.exit(),n.length||this.unexpected(this.state.lastTokStartLoc),l&&this.unexpected(l),c&&this.unexpected(c),this.checkExpressionErrors(a,!0),this.toReferencedList(n,!0),n.length>1?(i=this.startNodeAt(r),i.expressions=n,this.finishNode(i,"SequenceExpression"),this.resetEndLocation(i,u)):i=n[0],this.wrapParenthesis(t,i))}wrapParenthesis(e,t){if(!(this.optionFlags&2048))return this.addExtra(t,"parenthesized",!0),this.addExtra(t,"parenStart",e.index),this.takeSurroundingComments(t,e.index,this.state.lastTokEndLoc.index),t;let i=this.startNodeAt(e);return i.expression=t,this.finishNode(i,"ParenthesizedExpression")}shouldParseArrow(e){return!this.canInsertSemicolon()}parseArrow(e){if(this.eat(15))return e}parseParenItem(e,t){return e}parseNewOrNewTarget(){let e=this.startNode();if(this.next(),this.match(12)){let t=this.createIdentifier(this.startNodeAtNode(e),"new");this.next();let i=this.parseMetaProperty(e,t,"target");return this.scope.allowNewTarget||this.raise(b.UnexpectedNewTarget,i),i}return this.parseNew(e)}parseNew(e){if(this.parseNewCallee(e),this.eat(6)){let t=this.parseExprList(7);this.toReferencedList(t),e.arguments=t}else e.arguments=[];return this.finishNode(e,"NewExpression")}parseNewCallee(e){let t=this.parseNoCallExpr(i=>{this.raise(b.ImportCallNotNewExpression,i,i)});e.callee=t,t.type==="Import"&&this.raise(b.ImportCallNotNewExpression,t),t.type==="Super"&&this.raise(b.SuperCallNotNewExpression,t)}parseTemplateElement(e){let{start:t,startLoc:i,end:r,value:n}=this.state,a=t+1,o=this.startNodeAt(ze(i,1));n===null&&(e||this.raise(b.InvalidEscapeSequenceTemplate,ze(this.state.firstInvalidTemplateEscapePos,1)));let c=this.match(20),l=c?-1:-2,u=r+l;o.value={raw:this.input.slice(a,u).replace(/\r\n?/g,`
9
+ `),cooked:n===null?null:n.slice(1,l)},o.tail=c,this.next();let f=this.finishNode(o,"TemplateElement");return this.resetEndLocation(f,ze(this.state.lastTokEndLoc,l)),f}parseTemplate(e){let t=this.startNode(),i=this.parseTemplateElement(e),r=[i],n=[];for(;!i.tail;)n.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),r.push(i=this.parseTemplateElement(e));return t.expressions=n,t.quasis=r,this.finishNode(t,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(e,t,i){let r=!1,n=!0,a=this.startNode();for(a.properties=[],this.next();!this.match(e);){if(n)n=!1;else if(this.expect(8),this.match(e)){this.addTrailingCommaExtraToNode(a);break}let c;t?c=this.parseBindingProperty():(c=this.parsePropertyDefinition(i),r=this.checkProto(c,r,i)),a.properties.push(c)}this.next();let o=t?"ObjectPattern":"ObjectExpression";return this.finishNode(a,o)}addTrailingCommaExtraToNode(e){this.addExtra(e,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(e,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(e){return!e.computed&&e.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(51))}parsePropertyDefinition(e){let t=[];if(this.match(22))for(this.hasPlugin("decorators")&&this.raise(b.UnsupportedPropertyDecorator,this.state.startLoc);this.match(22);)t.push(this.parseDecorator());let i=this.startNode(),r=!1,n=!1,a;if(this.match(17))return t.length&&this.unexpected(),this.parseSpread();t.length&&(i.decorators=t),i.method=!1,e&&(a=this.state.startLoc);let o=this.eat(51);this.parsePropertyNamePrefixOperator(i);let c=this.state.containsEsc;if(this.parsePropertyName(i,e),!o&&!c&&this.maybeAsyncOrAccessorProp(i)){let{key:l}=i,u=l.name;u==="async"&&!this.hasPrecedingLineBreak()&&(r=!0,this.resetPreviousNodeTrailingComments(l),o=this.eat(51),this.parsePropertyName(i)),(u==="get"||u==="set")&&(n=!0,this.resetPreviousNodeTrailingComments(l),i.kind=u,this.match(51)&&(o=!0,this.raise(b.AccessorIsGenerator,this.state.curPosition(),{kind:u}),this.next()),this.parsePropertyName(i))}return this.parseObjPropValue(i,a,o,r,!1,n,e)}getGetterSetterExpectedParamCount(e){return e.kind==="get"?0:1}getObjectOrClassMethodParams(e){return e.params}checkGetterSetterParams(e){let t=this.getGetterSetterExpectedParamCount(e),i=this.getObjectOrClassMethodParams(e);i.length!==t&&this.raise(e.kind==="get"?b.BadGetterArity:b.BadSetterArity,e),e.kind==="set"&&i[i.length-1]?.type==="RestElement"&&this.raise(b.BadSetterRestParameter,e)}parseObjectMethod(e,t,i,r,n){if(n){let a=this.parseMethod(e,t,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(a),a}if(i||t||this.match(6))return r&&this.unexpected(),e.kind="method",e.method=!0,this.parseMethod(e,t,i,!1,!1,"ObjectMethod")}parseObjectProperty(e,t,i,r){if(e.shorthand=!1,this.eat(10))return e.value=i?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowInOrVoidPattern(4,r),this.finishObjectProperty(e);if(!e.computed&&e.key.type==="Identifier"){if(this.checkReservedWord(e.key.name,e.key.start,!0,!1),i)e.value=this.parseMaybeDefault(t,this.cloneIdentifier(e.key));else if(this.match(25)){let n=this.state.startLoc;r!=null?r.shorthandAssignLoc===null&&(r.shorthandAssignLoc=n):this.raise(b.InvalidCoverInitializedName,n),e.value=this.parseMaybeDefault(t,this.cloneIdentifier(e.key))}else e.value=this.cloneIdentifier(e.key);return e.shorthand=!0,this.finishObjectProperty(e)}}finishObjectProperty(e){return this.finishNode(e,"ObjectProperty")}parseObjPropValue(e,t,i,r,n,a,o){let c=this.parseObjectMethod(e,i,r,n,a)||this.parseObjectProperty(e,t,n,o);return c||this.unexpected(),c}parsePropertyName(e,t){if(this.eat(0))e.computed=!0,e.key=this.parseMaybeAssignAllowIn(),this.expect(1);else{let{type:i,value:r}=this.state,n;if($e(i))n=this.parseIdentifier(!0);else switch(i){case 132:n=this.parseNumericLiteral(r);break;case 131:n=this.parseStringLiteral(r);break;case 133:n=this.parseBigIntLiteral(r);break;case 135:{let a=this.state.startLoc;t!=null?t.privateKeyLoc===null&&(t.privateKeyLoc=a):this.raise(b.UnexpectedPrivateField,a),n=this.parsePrivateName();break}default:throw this.unexpected()}e.key=n,i!==135&&(e.computed=!1)}}initFunction(e,t){e.id=null,e.generator=!1,e.async=t}parseMethod(e,t,i,r,n,a,o=!1){this.initFunction(e,i),e.generator=t,this.scope.enter(530|(o?576:0)|(n?32:0)),this.prodParam.enter(Ri(i,e.generator)),this.parseFunctionParams(e,r);let c=this.parseFunctionBodyAndFinish(e,a,!0);return this.prodParam.exit(),this.scope.exit(),c}parseArrayLike(e,t){let i=this.startNode();return this.next(),i.elements=this.parseExprList(e,!0,t,i),this.finishNode(i,"ArrayExpression")}parseArrowExpression(e,t,i,r){this.scope.enter(518);let n=Ri(i,!1),a=this.match(2);return a||(n|=this.prodParam.currentFlags()&24),this.prodParam.enter(n),this.initFunction(e,i),t&&this.setArrowFunctionParameters(e,t,r),this.parseFunctionBody(e,!0),a&&(this.state.regExpAllowedAt=this.state.lastTokEndLoc.index),this.prodParam.exit(),this.scope.exit(),this.finishNode(e,"ArrowFunctionExpression")}setArrowFunctionParameters(e,t,i){this.toAssignableList(t,i,!1),e.params=t}parseFunctionBodyAndFinish(e,t,i=!1){return this.parseFunctionBody(e,!1,i),this.finishNode(e,t)}parseFunctionBody(e,t,i=!1){let r=t&&!this.match(2);if(this.expressionScope.enter(kn()),r)e.body=this.parseMaybeAssign(),this.checkParams(e,!1,t,!1);else{let n=this.state.strict,a=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|4),e.body=this.parseBlock(!0,!1,o=>{let c=!this.isSimpleParamList(e.params);o&&c&&this.raise(b.IllegalLanguageModeDirective,(e.kind==="method"||e.kind==="constructor")&&e.key?this.optionFlags&256?e.key.loc.end:e.key:e);let l=!n&&this.state.strict;this.checkParams(e,!this.state.strict&&!t&&!i&&!c,t,l),e.id&&this.checkStrictBindReservedWord(e.id,65,l)}),this.prodParam.exit(),this.state.labels=a}this.expressionScope.exit()}isSimpleParameter(e){return e.type==="Identifier"}isSimpleParamList(e){for(let t=0,i=e.length;t<i;t++)if(!this.isSimpleParameter(e[t]))return!1;return!0}checkParams(e,t,i,r=!0){let n=!t&&new Set,a={type:"FormalParameters"};for(let o of e.params)this.checkLVal(o,a,5,n,r)}parseExprList(e,t,i,r){let n=[],a=!0;for(;!this.eat(e);){if(a)a=!1;else if(this.expect(8),this.match(e)){r&&this.addTrailingCommaExtraToNode(r),this.next();break}n.push(this.parseExprListItem(e,t,i))}return n}parseExprListItem(e,t,i,r){let n;if(this.match(8))t||this.raise(b.UnexpectedToken,this.state.curPosition(),{unexpected:","}),n=null;else if(this.match(17)){let a=this.state.startLoc;n=this.parseParenItem(this.parseSpread(i),a)}else if(this.match(13)){this.expectPlugin("partialApplication"),r||this.raise(b.UnexpectedArgumentPlaceholder,this.state.startLoc);let a=this.startNode();this.next(),n=this.finishNode(a,"ArgumentPlaceholder")}else n=this.parseMaybeAssignAllowInOrVoidPattern(e,i,!0);return n}parseIdentifier(e){let t=this.startNode(),i=this.parseIdentifierName(e);return this.createIdentifier(t,i)}createIdentifier(e,t){return e.name=t,this.optionFlags&256&&(e.loc.identifierName=t),this.finishNode(e,"Identifier")}createIdentifierAt(e,t,i){return e.name=t,this.optionFlags&256&&(e.loc.identifierName=t),this.finishNodeAt(e,"Identifier",i)}parseIdentifierName(e){let t,{start:i,type:r}=this.state;$e(r)?t=this.state.value:this.unexpected();let n=Rg(r);return e?n&&this.replaceToken(129):this.checkReservedWord(t,this.sourceToOffsetPos(i),n,!1),this.next(),t}checkReservedWord(e,t,i,r){if(e.length>10||!sP(e))return;if(i&&Zg(e)){this.raise(b.UnexpectedKeyword,t,{keyword:e});return}if((this.state.strict?r?Jl:ql:Kl)(e,this.inModule)){this.raise(b.UnexpectedReservedWord,t,{reservedWord:e});return}else if(e==="yield"){if(this.prodParam.hasYield){this.raise(b.YieldBindingIdentifier,t);return}}else if(e==="await"){if(this.prodParam.hasAwait){this.raise(b.AwaitBindingIdentifier,t);return}if(this.scope.inStaticBlock){this.raise(b.AwaitBindingIdentifierInStaticBlock,t);return}this.expressionScope.recordAsyncArrowParametersError(t)}else if(e==="arguments"&&this.scope.inClassAndNotInNonArrowFunction){this.raise(b.ArgumentsInClass,t);return}}recordAwaitIfAllowed(){let e=this.prodParam.hasAwait;return e&&!this.scope.inFunction&&(this.state.hasTopLevelAwait=!0),e}parseAwait(e,t){let i=e.index;this.setLoc(e);let r=this.startNodeAt(e);return this.expressionScope.recordParameterInitializerError(b.AwaitExpressionFormalParameter,i),this.eat(51)&&this.raise(b.ObsoleteAwaitStar,e),!this.scope.inFunction&&!(this.optionFlags&1)&&(this.isAmbiguousPrefixOrIdentifier()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),t||(this.state.canStartArrow=!1,r.argument=this.parseMaybeUnary(null,!0)),this.finishNode(r,"AwaitExpression")}isAmbiguousPrefixOrIdentifier(){if(this.hasPrecedingLineBreak())return!0;let{type:e}=this.state;return e===49||e===6||e===0||mn(e)||e===99&&!this.state.containsEsc||e===134||e===52||this.hasPlugin("v8intrinsic")&&e===50}parseYield(e){this.setLoc(e);let t=this.startNodeAt(e);this.expressionScope.recordParameterInitializerError(b.YieldInParameter,e.index);let i=!1,r=null;if(!this.hasPrecedingLineBreak())switch(i=this.eat(51),this.state.type){case 9:case 136:case 4:case 7:case 1:case 5:case 10:case 8:if(!i)break;default:r=this.parseMaybeAssign()}return r||(this.state.regExpAllowedAt=this.state.lastTokEndLoc.index),t.delegate=i,t.argument=r,this.finishNode(t,"YieldExpression")}parseImportCall(e){this.next();let t=this.parseCallExpressionArguments();if(t.length===0||t.length>2)this.raise(b.ImportCallArity,e,e);else for(let i of t)i.type==="SpreadElement"&&this.raise(b.ImportCallSpreadArgument,i,e);return e.source=t[0],e.options=t[1]??null,this.finishNode(e,"ImportExpression")}withTopicBindingContext(e){let t=this.state.inHackPipelineBody;this.state.inHackPipelineBody=!0;let i=this.state.seenTopicReference;this.state.seenTopicReference=!1;try{return e()}finally{this.state.inHackPipelineBody=t,this.state.seenTopicReference=i}}allowInAnd(e){let t=this.prodParam.currentFlags();if(24&~t){this.prodParam.enter(t|8|16);try{return e()}finally{this.prodParam.exit()}}return e()}disallowInAnd(e){let t=this.prodParam.currentFlags(),i=8&t,r=16&~t;if(i||r){this.prodParam.enter(t&-9|16);try{return e()}finally{this.prodParam.exit()}}return e()}registerTopicReference(){this.state.seenTopicReference=!0}topicReferenceIsAllowedInCurrentContext(){return this.state.inHackPipelineBody}topicReferenceWasUsedInCurrentContext(){return this.state.seenTopicReference}parseFSharpPipelineBody(e){let t=this.state.startLoc;this.prodParam.enter(this.prodParam.currentFlags()&-17);let i;if(this.isContextual(93)&&this.recordAwaitIfAllowed()){this.next(),i=this.parseAwait(t,!0);let r=this.state.type;r!==35&&this.isBinaryOperator(r)&&this.raise(b.PipelineUnparenthesized,t)}else this.state.canStartArrow=!0,i=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),t,e);return this.prodParam.exit(),i}parseModuleExpression(){this.expectPlugin("moduleBlocks");let e=this.startNode();this.next(),this.match(2)||this.unexpected(null,2);let t=this.startNodeAt(this.state.endLoc);this.next();let i=this.initializeScopes(!0);this.enterInitialScopes();try{e.body=this.parseProgram(t,4,"module")}finally{i()}return this.finishNode(e,"ModuleExpression")}parseVoidPattern(e){this.expectPlugin("discardBinding");let t=this.startNode();return e!=null&&(e.voidPatternLoc=this.state.startLoc),this.next(),this.finishNode(t,"VoidPattern")}parseMaybeAssignAllowInOrVoidPattern(e,t,i){if(t!=null&&this.match(84)){let r=this.lookaheadCharCode();if(r===44||r===(e===1?93:e===4?125:41)||r===61)return this.parseMaybeDefault(this.state.startLoc,this.parseVoidPattern(t))}return this.parseMaybeAssignAllowIn(t,i)}parsePropertyNamePrefixOperator(e){}},hn={kind:1},AP={kind:2},CP=/[\uD800-\uDFFF]/u,fn=/in(?:stanceof)?/y;function Hl(s){for(let e=0;e<s.length;e++){let t=s[e],{type:i}=t;typeof i=="number"&&(t.type=Ul(i))}return s}var Bn=class extends Fn{parseTopLevel(e,t){return e.program=this.parseProgram(t,136,this.options.sourceType==="module"?"module":"script"),e.comments=this.comments,this.optionFlags&512&&(e.tokens=Hl(this.tokens)),this.finishNode(e,"File")}parseProgram(e,t,i){if(e.sourceType=i,e.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(e,!0,!0,t),this.inModule){if(!(this.optionFlags&64)&&this.scope.undefinedExports.size>0)for(let[n,a]of Array.from(this.scope.undefinedExports))this.raise(b.ModuleExportUndefined,a,{localName:n});this.addExtra(e,"topLevelAwait",this.state.hasTopLevelAwait)}let r;return t===136?r=this.finishNode(e,"Program"):r=this.finishNodeAt(e,"Program",ze(this.state.startLoc,-1)),r}stmtToDirective(e){let t=this.castNodeTo(e,"Directive"),i=this.castNodeTo(e.expression,"DirectiveLiteral"),r=i.value,n=this.input.slice(this.offsetToSourcePos(i.start),this.offsetToSourcePos(i.end)),a=i.value=n.slice(1,-1);return this.addExtra(i,"raw",n),this.addExtra(i,"rawValue",a),this.addExtra(i,"expressionValue",r),t.value=i,delete e.expression,t}parseInterpreterDirective(){if(!this.match(24))return null;let e=this.startNode();return e.value=this.state.value,this.next(),this.finishNode(e,"InterpreterDirective")}isLet(){return this.isContextual(97)?this.hasFollowingBindingAtom():!1}isUsing(){return this.isContextual(104)?this.nextTokenIsIdentifierOnSameLine():!1}isForUsing(){if(!this.isContextual(104))return!1;let e=this.nextTokenInLineStart(),t=this.codePointAtPos(e);if(this.isUnparsedContextual(e,"of")){let i=this.lookaheadCharCodeSince(e+2);if(i!==61&&i!==58&&i!==59)return!1}return!!(this.chStartsBindingIdentifier(t,e)||this.isUnparsedContextual(e,"void"))}nextTokenIsIdentifierOnSameLine(){let e=this.nextTokenInLineStart(),t=this.codePointAtPos(e);return this.chStartsBindingIdentifier(t,e)}isAwaitUsing(){if(!this.isContextual(93))return!1;let e=this.nextTokenInLineStart();if(this.isUnparsedContextual(e,"using")){e=this.nextTokenInLineStartSince(e+5);let t=this.codePointAtPos(e);if(this.chStartsBindingIdentifier(t,e))return!0}return!1}chStartsBindingIdentifier(e,t){if(ot(e)){if(fn.lastIndex=t,fn.test(this.input)){let i=this.codePointAtPos(fn.lastIndex);if(!kt(i)&&i!==92)return!1}return!0}else return e===92}chStartsBindingPattern(e){return e===91||e===123}hasFollowingBindingAtom(){let e=this.nextTokenStart(),t=this.codePointAtPos(e);return this.chStartsBindingPattern(t)||this.chStartsBindingIdentifier(t,e)}hasInLineFollowingBindingIdentifierOrBrace(){let e=this.nextTokenInLineStart(),t=this.codePointAtPos(e);return t===123||this.chStartsBindingIdentifier(t,e)}allowsUsing(){return(this.scope.inModule||!this.scope.inTopLevel)&&!this.scope.inBareCaseStatement}parseModuleItem(){return this.parseStatementLike(15)}parseStatementListItem(){return this.parseStatementLike(6|(!this.options.annexB||this.state.strict?0:8))}parseStatementOrSloppyAnnexBFunctionDeclaration(e=!1){let t=0;return this.options.annexB&&!this.state.strict&&(t|=4,e&&(t|=8)),this.parseStatementLike(t)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(e){let t=null;return this.match(22)&&(t=this.parseDecorators(!0)),this.parseStatementContent(e,t)}parseStatementContent(e,t){let i=this.state.type,r=this.startNode(),n=!!(e&2),a=!!(e&4),o=e&1;switch(i){case 56:return this.parseBreakContinueStatement(r,!0);case 59:return this.parseBreakContinueStatement(r,!1);case 60:return this.parseDebuggerStatement(r);case 86:return this.parseDoWhileStatement(r);case 87:return this.parseForStatement(r);case 64:if(this.lookaheadCharCode()===46)break;return a||this.raise(this.state.strict?b.StrictFunction:this.options.annexB?b.SloppyFunctionAnnexB:b.SloppyFunction,this.state.startLoc),this.parseFunctionStatement(r,!1,e);case 76:return n||this.unexpected(),this.parseClass(this.maybeTakeDecorators(t,r),!0);case 65:return this.parseIfStatement(r);case 66:return this.parseReturnStatement(r);case 67:return this.parseSwitchStatement(r);case 68:return this.parseThrowStatement(r);case 69:return this.parseTryStatement(r);case 93:if(this.isAwaitUsing())return this.allowsUsing()?n?this.recordAwaitIfAllowed()||this.raise(b.AwaitUsingNotInAsyncContext,r):this.raise(b.UnexpectedLexicalDeclaration,r):this.raise(b.UnexpectedUsingDeclaration,r),this.next(),this.parseVarStatement(r,"await using");break;case 104:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifierOrBrace())break;return this.allowsUsing()?n||this.raise(b.UnexpectedLexicalDeclaration,this.state.startLoc):this.raise(b.UnexpectedUsingDeclaration,this.state.startLoc),this.parseVarStatement(r,"using");case 97:{if(this.state.containsEsc)break;let u=this.nextTokenStart(),f=this.codePointAtPos(u);if(f!==91&&(!n&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(f,u)&&f!==123))break}case 71:n||this.raise(b.UnexpectedLexicalDeclaration,this.state.startLoc);case 70:{let u=this.state.value;return this.parseVarStatement(r,u)}case 88:return this.parseWhileStatement(r);case 72:return this.parseWithStatement(r);case 2:return this.parseBlock();case 9:return this.parseEmptyStatement(r);case 79:{let u=this.lookaheadCharCode();if(u===40||u===46)break}case 78:{!(this.optionFlags&8)&&!o&&this.raise(b.UnexpectedImportExport,this.state.startLoc),this.next();let u;return i===79?u=this.parseImport(r):u=this.parseExport(r,t),this.assertModuleNodeAllowed(u),u}default:if(this.isAsyncFunction())return n||this.raise(b.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(r,!0,e)}let c=this.state.value;if(i===89&&this.lookahead().type===10){let u=this.parseIdentifier(!0);return this.next(),this.parseLabeledStatement(r,c,u,e)}let l=this.parseExpression();return de(i)&&l.type==="Identifier"&&this.eat(10)?this.parseLabeledStatement(r,c,l,e):this.parseExpressionStatement(r,l,e)}assertModuleNodeAllowed(e){!(this.optionFlags&8)&&!this.inModule&&this.raise(b.ImportOutsideModule,e)}maybeTakeDecorators(e,t,i){return e&&(t.decorators?.length?(this.raise(b.DecoratorsBeforeAfterExport,t.decorators[0]),t.decorators.unshift(...e)):t.decorators=e,this.resetStartLocationFromNode(t,e[0]),i&&this.resetStartLocationFromNode(i,t)),t}canHaveLeadingDecorator(){return this.match(76)}parseDecorators(e){let t=[];do t.push(this.parseDecorator());while(this.match(22));if(this.match(78))e||this.unexpected();else if(!this.canHaveLeadingDecorator())throw this.raise(b.UnexpectedLeadingDecorator,this.state.startLoc);return t}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);let e=this.startNode();if(this.next(),this.hasPlugin("decorators")){let t=this.state.startLoc,i;if(this.match(6)){let r=this.state.startLoc;this.next(),i=this.parseExpression(),this.expect(7),i=this.wrapParenthesis(r,i);let n=this.state.startLoc;e.expression=this.parseMaybeDecoratorArguments(i,r),e.expression!==i&&this.raise(b.DecoratorArgumentsOutsideParentheses,n)}else{for(i=this.parseIdentifier(!1);this.eat(12);){let r=this.startNodeAt(t);r.object=i,this.match(135)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),r.property=this.parsePrivateName()):r.property=this.parseIdentifier(!0),r.computed=!1,i=this.finishNode(r,"MemberExpression")}e.expression=this.parseMaybeDecoratorArguments(i,t)}}else this.state.canStartArrow=!1,e.expression=this.parseExprSubscripts();return this.finishNode(e,"Decorator")}parseMaybeDecoratorArguments(e,t){if(this.eat(6)){let i=this.startNodeAt(t);return i.callee=e,i.arguments=this.parseCallExpressionArguments(),this.toReferencedList(i.arguments),this.finishNode(i,"CallExpression")}return e}parseBreakContinueStatement(e,t){return this.next(),this.isLineTerminator()?e.label=null:(e.label=this.parseIdentifier(this.match(89)),this.semicolon()),this.verifyBreakContinue(e,t),this.finishNode(e,t?"BreakStatement":"ContinueStatement")}verifyBreakContinue(e,t){let i;for(i=0;i<this.state.labels.length;++i){let r=this.state.labels[i];if((e.label==null||r.name===e.label.name)&&(r.kind!=null&&(t||r.kind===1)||e.label&&t))break}if(i===this.state.labels.length){let r=t?"BreakStatement":"ContinueStatement";this.raise(b.IllegalBreakContinue,e,{type:r})}}parseDebuggerStatement(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")}parseHeaderExpression(){this.expect(6);let e=this.parseExpression();return this.expect(7),e}parseDoWhileStatement(e){return this.next(),this.state.labels.push(hn),e.body=this.parseStatement(),this.state.labels.pop(),this.expect(88),e.test=this.parseHeaderExpression(),this.eat(9),this.finishNode(e,"DoWhileStatement")}parseForStatement(e){this.next(),this.state.labels.push(hn);let t=null;if(this.isContextual(93)&&this.recordAwaitIfAllowed()&&(t=this.state.startLoc,this.next()),this.scope.enter(0),this.expect(6),this.match(9))return t!==null&&this.unexpected(t),this.parseFor(e,null);let i=this.isContextual(97);{let c=this.isAwaitUsing(),l=c||this.isForUsing(),u=i&&this.hasFollowingBindingAtom()||l;if(this.match(70)||this.match(71)||u){let f=this.startNode(),m;c?(m="await using",this.recordAwaitIfAllowed()||this.raise(b.AwaitUsingNotInAsyncContext,this.state.startLoc),this.next()):m=this.state.value,this.next(),this.parseVar(f,!0,m);let x=this.finishNode(f,"VariableDeclaration"),I=this.match(54);return I&&l&&this.raise(b.ForInUsing,x),(I||this.isContextual(99))&&x.declarations.length===1?this.parseForX(e,x,t):(t!==null&&this.unexpected(t),this.parseFor(e,x))}}let r=this.isContextual(92),n=new Nt,a=this.parseExpression(!0,n),o=this.isContextual(99);if(o&&(i&&this.raise(b.ForOfLet,a),t===null&&r&&a.type==="Identifier"&&this.raise(b.ForOfAsync,a)),o||this.match(54)){this.checkDestructuringPrivate(n),this.toAssignable(a,!0);let c=o?"ForOfStatement":"ForInStatement";return this.checkLVal(a,{type:c}),this.parseForX(e,a,t)}else this.checkExpressionErrors(n,!0);return t!==null&&this.unexpected(t),this.parseFor(e,a)}parseFunctionStatement(e,t,i){this.next();let r=1|(t?8:0);return!(i&2)&&i&4&&(r|=16,i&8||(r|=2)),this.parseFunction(e,r)}parseIfStatement(e){return this.next(),e.test=this.parseHeaderExpression(),e.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),e.alternate=this.eat(62)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(e,"IfStatement")}parseReturnStatement(e){return this.prodParam.hasReturn||this.raise(b.IllegalReturn,this.state.startLoc),this.next(),this.isLineTerminator()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")}parseSwitchStatement(e){this.next(),e.discriminant=this.parseHeaderExpression();let t=e.cases=[];this.expect(2),this.state.labels.push(AP),this.scope.enter(256);let i;for(let r;!this.match(4);)if(this.match(57)||this.match(61)){let n=this.match(57);i&&this.finishNode(i,"SwitchCase"),t.push(i=this.startNode()),i.consequent=[],this.next(),n?i.test=this.parseExpression():(r&&this.raise(b.MultipleDefaultsInSwitch,this.state.lastTokStartLoc),r=!0,i.test=null),this.expect(10)}else i?i.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),i&&this.finishNode(i,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(e,"SwitchStatement")}parseThrowStatement(e){return this.next(),this.hasPrecedingLineBreak()&&this.raise(b.NewlineAfterThrow,this.state.lastTokEndLoc),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")}parseCatchClauseParam(){let e=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&e.type==="Identifier"?8:0),this.checkLVal(e,{type:"CatchClause"},9),e}parseTryStatement(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.match(58)){let t=this.startNode();this.next(),this.match(6)?(this.expect(6),t.param=this.parseCatchClauseParam(),this.expect(7)):(t.param=null,this.scope.enter(0)),t.body=this.parseBlock(!1,!1),this.scope.exit(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(63)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(b.NoCatchOrFinally,e),this.finishNode(e,"TryStatement")}parseVarStatement(e,t,i=!1){return this.next(),this.parseVar(e,!1,t,i),this.semicolon(),this.finishNode(e,"VariableDeclaration")}parseWhileStatement(e){return this.next(),e.test=this.parseHeaderExpression(),this.state.labels.push(hn),e.body=this.parseStatement(),this.state.labels.pop(),this.finishNode(e,"WhileStatement")}parseWithStatement(e){return this.state.strict&&this.raise(b.StrictWith,this.state.startLoc),this.next(),e.object=this.parseHeaderExpression(),e.body=this.parseStatement(),this.finishNode(e,"WithStatement")}parseEmptyStatement(e){return this.next(),this.finishNode(e,"EmptyStatement")}parseLabeledStatement(e,t,i,r){for(let a of this.state.labels)a.name===t&&this.raise(b.LabelRedeclaration,i,{labelName:t});let n=Kg(this.state.type)?1:this.match(67)?2:null;for(let a=this.state.labels.length-1;a>=0;a--){let o=this.state.labels[a];if(o.statementStart===e.start)o.statementStart=this.sourceToOffsetPos(this.state.start),o.kind=n;else break}return this.state.labels.push({name:t,kind:n,statementStart:this.sourceToOffsetPos(this.state.start)}),e.body=r&8?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),e.label=i,this.finishNode(e,"LabeledStatement")}parseExpressionStatement(e,t,i){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")}parseBlock(e=!1,t=!0,i){let r=this.startNode();return e&&this.state.strictErrors.clear(),this.expect(2),t&&this.scope.enter(0),this.parseBlockBody(r,e,!1,4,i),t&&this.scope.exit(),this.finishNode(r,"BlockStatement")}isValidDirective(e){return e.type==="ExpressionStatement"&&e.expression.type==="StringLiteral"&&!e.expression.extra.parenthesized}parseBlockBody(e,t,i,r,n){let a=e.body=[],o=e.directives=[];this.parseBlockOrModuleBlockBody(a,t?o:void 0,i,r,n)}parseBlockOrModuleBlockBody(e,t,i,r,n){let a=this.state.strict,o=!1,c=!1;for(;!this.match(r);){let l=i?this.parseModuleItem():this.parseStatementListItem();if(t&&!c){if(this.isValidDirective(l)){let u=this.stmtToDirective(l);t.push(u),!o&&u.value.value==="use strict"&&(o=!0,this.setStrict(!0));continue}c=!0,this.state.strictErrors.clear()}e.push(l)}n?.call(this,o),a||this.setStrict(!1),this.next()}parseFor(e,t){return e.init=t,this.semicolon(!1),e.test=this.match(9)?null:this.parseExpression(),this.semicolon(!1),e.update=this.match(7)?null:this.parseExpression(),this.expect(7),e.body=this.parseStatement(),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,"ForStatement")}parseForX(e,t,i){let r=this.match(54);return this.next(),r?i!==null&&this.unexpected(i):e.await=i!==null,t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!r||!this.options.annexB||this.state.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier")&&this.raise(b.ForInOfLoopInitializer,t,{type:r?"ForInStatement":"ForOfStatement"}),t.type==="AssignmentPattern"&&this.raise(b.InvalidLhs,t,{ancestor:{type:"ForStatement"}}),e.left=t,e.right=r?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(7),e.body=this.parseStatement(),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,r?"ForInStatement":"ForOfStatement")}parseVar(e,t,i,r=!1){let n=e.declarations=[];for(e.kind=i;;){let a=this.startNode();if(this.parseVarId(a,i),a.init=this.eat(25)?t?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,a.init===null&&!r&&!(t&&n.length===0&&(this.match(54)||this.isContextual(99)))&&(a.id.type!=="Identifier"?this.raise(b.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"destructuring"}):(i==="const"||i==="using"||i==="await using")&&this.raise(b.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:i})),n.push(this.finishNode(a,"VariableDeclarator")),!this.eat(8))break}return e}parseVarId(e,t){let i=this.parseBindingAtom();t==="using"||t==="await using"?(i.type==="ArrayPattern"||i.type==="ObjectPattern")&&this.raise(b.UsingDeclarationHasBindingPattern,i):i.type==="VoidPattern"&&this.raise(b.UnexpectedVoidPattern,i),this.checkLVal(i,{type:"VariableDeclarator"},t==="var"?5:8201),e.id=i}parseAsyncFunctionExpression(e){return this.parseFunction(e,8)}parseFunction(e,t=0){let i=!!(t&1),r=i&&!(t&4),n=!!(t&8);return this.initFunction(e,n),this.match(51)&&(t&16&&this.raise(b.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),e.generator=!0),i&&(e.id=this.parseFunctionId(r)),this.scope.enter(514),this.prodParam.enter(Ri(n,e.generator)),!i&&de(this.state.type)&&(this.expressionScope.enter(kn()),e.id=this.parseFunctionId(),this.expressionScope.exit()),this.parseFunctionParams(e,!1),this.parseFunctionBodyAndFinish(e,i?"FunctionDeclaration":"FunctionExpression"),this.prodParam.exit(),this.scope.exit(),i&&!(t&2)&&this.registerFunctionStatementId(e),e}parseFunctionId(e){return e||de(this.state.type)?this.parseIdentifier():null}parseFunctionParams(e,t){this.expect(6),this.expressionScope.enter(PP()),e.params=this.parseBindingList(7,41,2|(t?4:0)),this.expressionScope.exit()}registerFunctionStatementId(e){e.id&&this.scope.declareName(e.id.name,!this.options.annexB||this.state.strict||e.generator||e.async?this.scope.treatFunctionsAsVar?5:8201:17,e.id.start)}parseClass(e,t,i){this.next();let r=this.state.strict;return this.state.strict=!0,this.parseClassId(e,t,i),this.parseClassSuper(e),e.body=this.parseClassBody(!!e.superClass,r),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(25)||this.match(9)||this.match(4)}isClassMethod(){return this.match(6)}nameIsConstructor(e){return e.type==="Identifier"&&e.name==="constructor"||e.type==="StringLiteral"&&e.value==="constructor"}isNonstaticConstructor(e){return!e.computed&&!e.static&&this.nameIsConstructor(e.key)}parseClassBody(e,t){this.classScope.enter();let i={hadConstructor:!1,hadSuperClass:e},r=[],n=this.startNode();for(n.body=[],this.expect(2);!this.match(4);){if(this.eat(9)){if(r.length>0)throw this.raise(b.DecoratorSemicolon,this.state.lastTokEndLoc);continue}if(this.match(22)){r.push(this.parseDecorator());continue}let a=this.startNode();r.length&&(a.decorators=r,this.resetStartLocationFromNode(a,r[0]),r=[]),this.parseClassMember(n,a,i)}if(this.state.strict=t,this.next(),r.length)throw this.raise(b.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(n,"ClassBody")}parseClassMemberFromModifier(e,t){let i=this.parseIdentifier(!0);if(this.isClassMethod()){let r=t;return r.kind="method",r.computed=!1,r.key=i,r.static=!1,this.pushClassMethod(e,r,!1,!1,!1,!1),!0}else if(this.isClassProperty()){let r=t;return r.computed=!1,r.key=i,r.static=!1,e.body.push(this.parseClassProperty(r)),!0}return this.resetPreviousNodeTrailingComments(i),!1}parseClassMember(e,t,i){let r=this.isContextual(103);if(r){if(this.parseClassMemberFromModifier(e,t))return;if(this.eat(2)){this.parseClassStaticBlock(e,t);return}}this.parseClassMemberWithIsStatic(e,t,i,r)}parseClassMemberWithIsStatic(e,t,i,r){let n=t,a=t,o=t,c=t,l=t,u=n,f=n;if(t.static=r,this.parsePropertyNamePrefixOperator(t),this.eat(51)){u.kind="method";let w=this.match(135);if(this.parseClassElementName(u),this.parsePostMemberNameModifiers(u),w){this.pushClassPrivateMethod(e,a,!0,!1);return}this.isNonstaticConstructor(n)&&this.raise(b.ConstructorIsGenerator,n.key),this.pushClassMethod(e,n,!0,!1,!1,!1);return}let m=!this.state.containsEsc&&de(this.state.type),x=this.parseClassElementName(t),I=m?x.name:null,L=this.isPrivateName(x),N=this.state.startLoc;if(this.parsePostMemberNameModifiers(f),this.isClassMethod()){if(u.kind="method",L){this.pushClassPrivateMethod(e,a,!1,!1);return}let w=this.isNonstaticConstructor(n),v=!1;w&&(n.kind="constructor",n.decorators&&n.decorators.length>0&&this.raise(b.DecoratorConstructor,t),i.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(b.DuplicateConstructor,x),w&&this.hasPlugin("typescript")&&t.override&&this.raise(b.OverrideOnConstructor,x),i.hadConstructor=!0,v=i.hadSuperClass),this.pushClassMethod(e,n,!1,!1,w,v)}else if(this.isClassProperty())L?this.pushClassPrivateProperty(e,c):this.pushClassProperty(e,o);else if(I==="async"&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(x);let w=this.eat(51);f.optional&&this.unexpected(N),u.kind="method";let v=this.match(135);this.parseClassElementName(u),this.parsePostMemberNameModifiers(f),v?this.pushClassPrivateMethod(e,a,w,!0):(this.isNonstaticConstructor(n)&&this.raise(b.ConstructorIsAsync,n.key),this.pushClassMethod(e,n,w,!0,!1,!1))}else if((I==="get"||I==="set")&&!(this.match(51)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(x),u.kind=I;let w=this.match(135);this.parseClassElementName(n),w?this.pushClassPrivateMethod(e,a,!1,!1):(this.isNonstaticConstructor(n)&&this.raise(b.ConstructorIsAccessor,n.key),this.pushClassMethod(e,n,!1,!1,!1,!1)),this.checkGetterSetterParams(n)}else if(I==="accessor"&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(x);let w=this.match(135);this.parseClassElementName(o),this.pushClassAccessorProperty(e,l,w)}else this.isLineTerminator()?L?this.pushClassPrivateProperty(e,c):this.pushClassProperty(e,o):this.unexpected()}parseClassElementName(e){let{type:t,value:i}=this.state;if((t===129||t===131)&&e.static&&i==="prototype"&&this.raise(b.StaticPrototype,this.state.startLoc),t===135){i==="constructor"&&this.raise(b.ConstructorClassPrivateField,this.state.startLoc);let r=this.parsePrivateName();return e.key=r,r}return this.parsePropertyName(e),e.key}parseClassStaticBlock(e,t){this.scope.enter(720);let i=this.state.labels;this.state.labels=[],this.prodParam.enter(0);let r=t.body=[];this.parseBlockOrModuleBlockBody(r,void 0,!1,4),this.prodParam.exit(),this.scope.exit(),this.state.labels=i,e.body.push(this.finishNode(t,"StaticBlock")),t.decorators?.length&&this.raise(b.DecoratorStaticBlock,t)}pushClassProperty(e,t){!t.computed&&this.nameIsConstructor(t.key)&&this.raise(b.ConstructorClassField,t.key),e.body.push(this.parseClassProperty(t))}pushClassPrivateProperty(e,t){let i=this.parseClassPrivateProperty(t);e.body.push(i),this.classScope.declarePrivateName(this.getPrivateNameSV(i.key),0,i.key.start)}pushClassAccessorProperty(e,t,i){!i&&!t.computed&&this.nameIsConstructor(t.key)&&this.raise(b.ConstructorClassField,t.key);let r=this.parseClassAccessorProperty(t);e.body.push(r),i&&this.classScope.declarePrivateName(this.getPrivateNameSV(r.key),0,r.key.start)}pushClassMethod(e,t,i,r,n,a){e.body.push(this.parseMethod(t,i,r,n,a,"ClassMethod",!0))}pushClassPrivateMethod(e,t,i,r){let n=this.parseMethod(t,i,r,!1,!1,"ClassPrivateMethod",!0);e.body.push(n);let a=n.kind==="get"?n.static?6:2:n.kind==="set"?n.static?5:1:0;this.declareClassPrivateMethodInScope(n,a)}declareClassPrivateMethodInScope(e,t){this.classScope.declarePrivateName(this.getPrivateNameSV(e.key),t,e.key.start)}parsePostMemberNameModifiers(e){}parseClassPrivateProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassPrivateProperty")}parseClassProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassProperty")}parseClassAccessorProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassAccessorProperty")}parseInitializer(e){this.scope.enter(592),this.expressionScope.enter(kn()),this.prodParam.enter(0),e.value=this.eat(25)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(e,t,i,r=8331){if(de(this.state.type))e.id=this.parseIdentifier(),this.checkStrictBindReservedWord(e.id,r),t&&this.declareNameFromIdentifier(e.id,r);else if(i||!t)e.id=null;else throw this.raise(b.MissingClassName,this.state.startLoc)}parseClassSuper(e){this.eat(77)?(this.state.canStartArrow=!1,e.superClass=this.parseExprSubscripts()):e.superClass=null}parseExport(e,t){let i=this.parseMaybeImportPhase(e,!0),r=this.maybeParseExportDefaultSpecifier(e,i),n=!r||this.eat(8),a=n&&this.eatExportStar(e),o=a&&this.maybeParseExportNamespaceSpecifier(e),c=n&&!o,l=r||a;if(a&&!o){if(r&&this.unexpected(),t)throw this.raise(b.UnsupportedDecoratorExport,e);return this.parseExportFrom(e,!0),this.sawUnambiguousESM=!0,this.finishNode(e,"ExportAllDeclaration")}let u=c&&this.maybeParseExportNamedSpecifiers(e);r&&n&&!a&&!u&&this.unexpected(null,2);let f;if(l||u){if(f=!1,t)throw this.raise(b.UnsupportedDecoratorExport,e);this.parseExportFrom(e,l)}else f=this.maybeParseExportDeclaration(e);if(l||u||f){let m=e;if(this.checkNamedExport(m,!!m.source),m.declaration?.type==="ClassDeclaration")this.maybeTakeDecorators(t,m.declaration,m);else if(t)throw this.raise(b.UnsupportedDecoratorExport,e);return this.sawUnambiguousESM=!0,this.finishNode(m,"ExportNamedDeclaration")}if(this.eat(61)){let m=e,x=this.parseExportDefaultExpression();if(m.declaration=x,x.type==="ClassDeclaration")this.maybeTakeDecorators(t,x,m);else if(t)throw this.raise(b.UnsupportedDecoratorExport,e);return this.checkDuplicateExports(e,"default"),this.hasPlugin("exportDefaultFrom")&&x.type==="Identifier"&&x.name==="from"&&x.end-x.start===4&&!x.extra?.parenthesized&&this.raise(b.ExportDefaultFromAsIdentifier,x),this.sawUnambiguousESM=!0,this.finishNode(m,"ExportDefaultDeclaration")}throw this.unexpected(null,2)}eatExportStar(e){return this.eat(51)}maybeParseExportDefaultSpecifier(e,t){if(t||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",t?.start);let i=t||this.parseIdentifier(!0),r=this.startNodeAtNode(i);return r.exported=i,e.specifiers=[this.finishNode(r,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(e){if(this.isContextual(90)){e.specifiers??=[];let t=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),t.exported=this.parseModuleExportName(),e.specifiers.push(this.finishNode(t,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(e){if(this.match(2)){let t=e;t.specifiers||(t.specifiers=[]);let i=t.exportKind==="type";return t.specifiers.push(...this.parseExportSpecifiers(i)),t.source=null,t.attributes=[],t.declaration=null,!0}return!1}maybeParseExportDeclaration(e){return this.shouldParseExportDeclaration()?(e.specifiers=[],e.source=null,e.attributes=[],e.declaration=this.parseExportDeclaration(e),!0):!1}isAsyncFunction(){if(!this.isContextual(92))return!1;let e=this.nextTokenInLineStart();return this.isUnparsedContextual(e,"function")}parseExportDefaultExpression(){let e=this.startNode();if(this.match(64))return this.next(),this.parseFunction(e,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(e,13);if(this.match(76))return this.parseClass(e,!0,!0);if(this.match(22))return this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0);if(this.match(71)||this.match(70)||this.isLet()||this.isUsing()||this.isAwaitUsing())throw this.raise(b.UnsupportedDefaultExport,this.state.startLoc);let t=this.parseMaybeAssignAllowIn();return this.semicolon(),t}parseExportDeclaration(e){return this.match(76)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){let{type:e}=this.state;if(de(e)){if(e===92&&!this.state.containsEsc||e===97)return!1;if((e===127||e===126)&&!this.state.containsEsc){let r=this.nextTokenStart(),n=this.input.charCodeAt(r);if(n===123||this.chStartsBindingIdentifier(n,r)&&!this.input.startsWith("from",r))return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(61))return!1;let t=this.nextTokenStart(),i=this.isUnparsedContextual(t,"from");if(this.input.charCodeAt(t)===44||de(this.state.type)&&i)return!0;if(this.match(61)&&i){let r=this.input.charCodeAt(this.hasPlugin("exportDefaultFrom")?this.nextTokenStartSince(t+4):this.nextTokenInLineStartSince(t+4));return r===34||r===39}return!1}parseExportFrom(e,t){this.eatContextual(95)?(e.source=this.parseImportSource(),this.maybeParseImportAttributes(e)):t&&this.unexpected(null,95),this.semicolon()}shouldParseExportDeclaration(){let{type:e}=this.state;return e===22&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))?!0:this.isUsing()?(this.raise(b.UsingDeclarationExport,this.state.startLoc),!0):this.isAwaitUsing()?(this.raise(b.UsingDeclarationExport,this.state.startLoc),!0):e===70||e===71||e===64||e===76||this.isLet()||this.isAsyncFunction()}checkNamedExport(e,t){if(e.specifiers?.length)for(let i of e.specifiers){let{exported:r}=i,n=r.type==="Identifier"?r.name:r.value;if(this.checkDuplicateExports(i,n),!t&&i.type==="ExportSpecifier"){let{local:a}=i;a.type!=="Identifier"?this.raise(b.ExportBindingIsString,i,{localName:a.value,exportName:n}):(this.checkReservedWord(a.name,a.start,!0,!1),this.scope.checkLocalExport(a))}}else if(e.declaration){let i=e.declaration;if(i.type==="FunctionDeclaration"||i.type==="ClassDeclaration"){let{id:r}=i;if(!r)throw new Error("Assertion failure");this.checkDuplicateExports(e,r.name)}else if(i.type==="VariableDeclaration")for(let r of i.declarations)this.checkDeclaration(r.id)}}checkDeclaration(e){if(e.type==="Identifier")this.checkDuplicateExports(e,e.name);else if(e.type==="ObjectPattern")for(let t of e.properties)this.checkDeclaration(t);else if(e.type==="ArrayPattern")for(let t of e.elements)t&&this.checkDeclaration(t);else e.type==="ObjectProperty"?this.checkDeclaration(e.value):e.type==="RestElement"?this.checkDeclaration(e.argument):e.type==="AssignmentPattern"&&this.checkDeclaration(e.left)}checkDuplicateExports(e,t){this.exportedIdentifiers.has(t)&&(t==="default"?this.raise(b.DuplicateDefaultExport,e):this.raise(b.DuplicateExport,e,{exportName:t})),this.exportedIdentifiers.add(t)}parseExportSpecifiers(e){let t=[],i=!0;for(this.expect(2);!this.eat(4);){if(i)i=!1;else if(this.expect(8),this.eat(4))break;let r=this.isContextual(127),n=this.match(131),a=this.startNode();a.local=this.parseModuleExportName(),t.push(this.parseExportSpecifier(a,n,e,r))}return t}parseExportSpecifier(e,t,i,r){return this.eatContextual(90)?e.exported=this.parseModuleExportName():t?e.exported=this.cloneStringLiteral(e.local):e.exported||(e.exported=this.cloneIdentifier(e.local)),this.finishNode(e,"ExportSpecifier")}parseModuleExportName(){if(this.match(131)){let e=this.parseStringLiteral(this.state.value),t=CP.exec(e.value);return t&&this.raise(b.ModuleExportNameHasLoneSurrogate,e,{surrogateCharCode:t[0].charCodeAt(0)}),e}return this.parseIdentifier(!0)}checkImportPhase(e){let{specifiers:t}=e,i=t.length===1?t[0].type:null;e.phase==="source"?i!=="ImportDefaultSpecifier"&&this.raise(b.SourcePhaseImportRequiresDefault,t[0]):e.phase==="defer"&&i!=="ImportNamespaceSpecifier"&&this.raise(b.DeferImportRequiresNamespace,t[0])}isPotentialImportPhase(e){return e?!1:this.isContextual(102)||this.isContextual(94)}applyImportPhase(e,t,i,r){t||(i==="source"?(this.expectPlugin("sourcePhaseImports",r),e.phase="source"):i==="defer"?(this.expectPlugin("deferredImportEvaluation",r),e.phase="defer"):(this.hasPlugin("sourcePhaseImports")||this.hasPlugin("deferredImportEvaluation"))&&(e.phase=null))}parseMaybeImportPhase(e,t){if(!this.isPotentialImportPhase(t))return this.applyImportPhase(e,t,null),null;let i=this.startNode(),r=this.parseIdentifierName(!0),{type:n}=this.state;return($e(n)?n!==95||this.lookaheadCharCode()===102:n!==8)?(this.applyImportPhase(e,t,r,i.start),null):(this.applyImportPhase(e,t,null),this.createIdentifier(i,r))}isPrecedingIdImportPhase(e){let{type:t}=this.state;return de(t)?t!==95||this.lookaheadCharCode()===102:t!==8}parseImport(e){return this.match(131)?this.parseImportSourceAndAttributes(e):this.parseImportSpecifiersAndAfter(e,this.parseMaybeImportPhase(e,!1))}parseImportSpecifiersAndAfter(e,t){e.specifiers=[];let r=!this.maybeParseDefaultImportSpecifier(e,t)||this.eat(8),n=r&&this.maybeParseStarImportSpecifier(e);return r&&!n&&this.parseNamedImportSpecifiers(e),this.expectContextual(95),this.parseImportSourceAndAttributes(e)}parseImportSourceAndAttributes(e){return e.specifiers??=[],e.source=this.parseImportSource(),this.maybeParseImportAttributes(e),this.checkImportPhase(e),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(e,"ImportDeclaration")}parseImportSource(){return this.match(131)||this.unexpected(),this.parseExprAtom()}parseImportSpecifierLocal(e,t,i){t.local=this.parseIdentifier(),e.specifiers.push(this.finishImportSpecifier(t,i))}finishImportSpecifier(e,t,i=8201){return this.checkLVal(e.local,{type:t},i),this.finishNode(e,t)}parseImportAttributes(){this.expect(2);let e=[],t=new Set;do{if(this.match(4))break;let i=this.startNode(),r=this.state.value;if(t.has(r)&&this.raise(b.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:r}),t.add(r),this.match(131)?i.key=this.parseStringLiteral(r):i.key=this.parseIdentifier(!0),this.expect(10),!this.match(131))throw this.raise(b.ModuleAttributeInvalidValue,this.state.startLoc);i.value=this.parseStringLiteral(this.state.value),e.push(this.finishNode(i,"ImportAttribute"))}while(this.eat(8));return this.expect(4),e}maybeParseImportAttributes(e){let t;if(this.match(72)){if(this.hasPrecedingLineBreak()&&this.lookaheadCharCode()===40)return;this.next(),t=this.parseImportAttributes()}else t=[];e.attributes=t}maybeParseDefaultImportSpecifier(e,t){if(t){let i=this.startNodeAtNode(t);return i.local=t,e.specifiers.push(this.finishImportSpecifier(i,"ImportDefaultSpecifier")),!0}else if($e(this.state.type))return this.parseImportSpecifierLocal(e,this.startNode(),"ImportDefaultSpecifier"),!0;return!1}maybeParseStarImportSpecifier(e){if(this.match(51)){let t=this.startNode();return this.next(),this.expectContextual(90),this.parseImportSpecifierLocal(e,t,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(e){let t=!0;for(this.expect(2);!this.eat(4);){if(t)t=!1;else{if(this.eat(10))throw this.raise(b.DestructureNamedImport,this.state.startLoc);if(this.expect(8),this.eat(4))break}let i=this.startNode(),r=this.match(131),n=this.isContextual(127);i.imported=this.parseModuleExportName();let a=this.parseImportSpecifier(i,r,e.importKind==="type"||e.importKind==="typeof",n,void 0);e.specifiers.push(a)}}parseImportSpecifier(e,t,i,r,n){if(this.eatContextual(90))e.local=this.parseIdentifier();else{let{imported:a}=e;if(t)throw this.raise(b.ImportBindingIsString,e,{importName:a.value});this.checkReservedWord(a.name,e.start,!0,!0),e.local||(e.local=this.cloneIdentifier(a))}return this.finishImportSpecifier(e,"ImportSpecifier",n)}isThisParam(e){return e.type==="Identifier"&&e.name==="this"}},dn=/in(?:stanceof)?|as|satisfies/y;function IP(s){if(s==null)throw new Error(`Unexpected ${s} value.`);return s}function Ol(s){if(!s)throw new Error("Assert fail")}var wP={AbstractMethodHasImplementation:({methodName:s})=>`Method '${s}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:s})=>`Property '${s}' cannot have an initializer because it is marked abstract.`,AccessorCannotBeOptional:"An 'accessor' property cannot be declared optional.",AccessorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccessorCannotHaveTypeParameters:"An accessor cannot have type parameters.",ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"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.",DeclaratorDefiniteAssertionRequiresTypeAnnotation:"Declarations with definite assignment assertions must also have type annotations.",DeclaratorDefiniteAssertionWithInitializer:"Declarations with initializers cannot also have definite assignment assertions.",DeclareAccessor:({kind:s})=>`'declare' is not allowed in ${s}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DecoratorAbstractMethod:({kind:s})=>`Decorators can't be used with ${s.startsWith("a")?"an":"a"} ${s}.`,DuplicateAccessibilityModifier:({modifier:s})=>`Accessibility modifier already seen: '${s}'.`,DuplicateModifier:({modifier:s})=>`Duplicate modifier: '${s}'.`,EmptyHeritageClauseType:({token:s})=>`'${s}' list cannot be empty.`,EmptyNamespaceName:"Namespace must be given a name.",EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ExportAssignmentInTSNamespace:"An export assignment cannot be used in a namespace.",ExportInTSNamespace:"Export declarations are not permitted in a namespace.",ImportAliasHasImportType:"An import alias can not use 'import type'.",ImportInTSNamespace:"Import declarations in a namespace cannot reference a module.",IncompatibleModifiers:({modifiers:s})=>`'${s[0]}' modifier cannot be used with '${s[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:s})=>`Index signatures cannot have an accessibility modifier ('${s}').`,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.",InlineModuleDeclarationMustUseString:"`module ... {}` declarations must have a string name. Use `namespace ... {}` instead.",InvalidHeritageClauseType:({token:s})=>`'${s}' list can only include identifiers or qualified-names with optional type arguments.`,InvalidModifierOnAwaitUsingDeclaration:s=>`'${s}' modifier cannot appear on an await using declaration.`,InvalidModifierOnTypeMember:({modifier:s})=>`'${s}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:s})=>`'${s}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:s})=>`'${s}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifierOnUsingDeclaration:s=>`'${s}' modifier cannot appear on a using declaration.`,InvalidModifiersOrder:({orderedModifiers:s})=>`'${s[0]}' modifier must precede '${s[1]}' modifier.`,InvalidNamespaceName:s=>`Namespace name cannot be '${s}'.`,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.",NamespaceExportInTSNamespace:"Global module exports may only appear at top level.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifier:"'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:s})=>`Private elements cannot have an accessibility modifier ('${s}').`,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.",SetAccessorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccessorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccessorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:({typeParameterName:s})=>`Single type parameter ${s} should have a trailing comma. Example usage: <${s},>.`,StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TupleOptionalAfterType:"A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).",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.",UnexpectedParameterInitializer:"A parameter initializer is only allowed in a function or constructor implementation.",UnexpectedParameterModifier:"A parameter property is only allowed in a constructor implementation.",UnexpectedReadonly:"'readonly' type modifier is only permitted on array and tuple literal types.",UnexpectedTypeAnnotation:"Did not expect a type annotation here.",UnexpectedTypeCastInParameter:"Unexpected type cast in parameter position.",UnexpectedTypeDeclaration:s=>`'${s}' declarations can only be declared inside a block.`,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:s})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${s}.`,UsingDeclarationInAmbientContext:s=>`'${s}' declarations are not allowed in ambient contexts.`},O=Ze`typescript`(wP);function NP(s){switch(s){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 Ml(s){return s==="private"||s==="public"||s==="protected"}function vP(s){return s==="in"||s==="out"}function _n(s){if(s.extra?.parenthesized)return!1;switch(s.type){case"Identifier":return!0;case"MemberExpression":return!s.computed&&_n(s.object);case"TSInstantiationExpression":return _n(s.expression);default:return!1}}var kP=Dt(["declare","private","public","protected","override","abstract","readonly","static"],["in","out"]),DP=Dt(["readonly"],["declare","abstract","private","protected","public","static","override"]),LP=Dt(["public","private","protected","override","readonly"]),OP=Dt(["private","public","protected"]),MP=s=>class extends s{getScopeHandler(){return gn}tsIsIdentifier(){return de(this.state.type)}tsTokenCanFollowModifier(){return this.match(0)||this.match(2)||this.match(51)||this.match(17)||this.match(135)||this.isLiteralPropertyName()}tsNextTokenOnSameLineAndCanFollowModifier(){return this.next(),this.hasPrecedingLineBreak()?!1:this.tsTokenCanFollowModifier()}tsNextTokenCanFollowModifier(){return this.match(103)?(this.next(),this.tsTokenCanFollowModifier()):this.tsNextTokenOnSameLineAndCanFollowModifier()}tsParseModifier(t,i,r){if(!de(this.state.type)&&this.state.type!==54&&this.state.type!==71)return;let n=this.state.value;if(t.has(n)){if(r&&this.match(103)||i&&this.tsIsStartOfStaticBlocks())return;let a=this.state.containsEsc&&!de(this.state.type)?this.state.startLoc:null;if(a&&(this.state.containsEsc=!1),this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return a&&this.raise(b.InvalidEscapedReservedWord,a,{reservedWord:n}),n;a&&(this.state.containsEsc=!0)}}tsParseModifiers(t,i=O.InvalidModifierOnTypeMember,r,n=!1){let a=(c,l,u,f)=>{l===u&&r[f]&&this.raise(O.InvalidModifiersOrder,c,{orderedModifiers:[u,f]})},o=(c,l,u,f)=>{(r[u]&&l===f||r[f]&&l===u)&&this.raise(O.IncompatibleModifiers,c,{modifiers:[u,f]})};for(;;){let{startLoc:c}=this.state,l=this.tsParseModifier(t,n,r.static);if(!l)break;Ml(l)?r.accessibility?this.raise(O.DuplicateAccessibilityModifier,c,{modifier:l}):(a(c,l,l,"override"),a(c,l,l,"static"),a(c,l,l,"readonly"),r.accessibility=l):vP(l)?(r[l]&&this.raise(O.DuplicateModifier,c,{modifier:l}),r[l]=!0,a(c,l,"in","out")):(Object.hasOwn(r,l)?this.raise(O.DuplicateModifier,c,{modifier:l}):(a(c,l,"static","readonly"),a(c,l,"static","override"),a(c,l,"override","readonly"),a(c,l,"abstract","override"),o(c,l,"declare","override"),o(c,l,"static","abstract")),r[l]=!0),t.get(l)||this.raise(i,c,{modifier:l})}}tsIsListTerminator(t){switch(t){case"EnumMembers":case"TypeMembers":return this.match(4);case"HeritageClauseElement":return this.match(2);case"TupleElementTypes":return this.match(1);case"TypeParametersOrArguments":return this.match(44)}}tsParseList(t,i){let r=[];for(;!this.tsIsListTerminator(t);)r.push(i());return r}tsParseDelimitedList(t,i,r){return IP(this.tsParseDelimitedListWorker(t,i,!0,r))}tsParseDelimitedListWorker(t,i,r,n){let a=[],o=-1;for(;!this.tsIsListTerminator(t);){o=-1;let c=i();if(c==null)return;if(a.push(c),this.eat(8)){o=this.state.lastTokStartLoc.index;continue}if(this.tsIsListTerminator(t))break;r&&this.expect(8);return}return n&&(n.value=o),a}tsParseBracketedList(t,i,r,n,a){n||(r?this.expect(0):this.expect(43));let o=this.tsParseDelimitedList(t,i,a);return r?this.expect(1):this.expect(44),o}tsParseImportType(){let t=this.startNode();return this.expect(79),this.expect(6),this.match(131)?t.source=this.parseStringLiteral(this.state.value):(this.raise(O.UnsupportedImportTypeArgument,this.state.startLoc),t.source=this.tsParseNonConditionalType()),this.eat(8)?t.options=this.tsParseImportTypeOptions():t.options=null,this.expect(7),this.eat(12)&&(t.qualifier=this.tsParseEntityName(3)),this.match(43)&&(t.typeArguments=this.tsParseTypeArguments()),this.finishNode(t,"TSImportType")}tsParseImportTypeOptions(){let t=this.startNode();this.expect(2);let i=this.startNode();return this.isContextual(72)?(i.method=!1,i.key=this.parseIdentifier(!0),i.computed=!1,i.shorthand=!1):this.unexpected(null,72),this.expect(10),i.value=this.tsParseImportTypeWithPropertyValue(),t.properties=[this.finishObjectProperty(i)],this.eat(8),this.expect(4),this.finishNode(t,"ObjectExpression")}tsParseImportTypeWithPropertyValue(){let t=this.startNode(),i=[];for(this.expect(2);!this.match(4);){let r=this.state.type;de(r)||r===131?i.push(super.parsePropertyDefinition(null)):this.unexpected(),this.eat(8)}return t.properties=i,this.next(),this.finishNode(t,"ObjectExpression")}tsParseEntityName(t){let i;if(t&1&&this.match(74))if(t&2)i=this.parseIdentifier(!0);else{let r=this.startNode();this.next(),i=this.finishNode(r,"ThisExpression")}else i=this.parseIdentifier(!!(t&1));for(;this.eat(12);){let r=this.startNodeAtNode(i);r.left=i,r.right=this.parseIdentifier(!!(t&1)),i=this.finishNode(r,"TSQualifiedName")}return i}tsParseTypeReference(){let t=this.startNode();return t.typeName=this.tsParseEntityName(1),!this.hasPrecedingLineBreak()&&this.match(43)&&(t.typeArguments=this.tsParseTypeArguments()),this.finishNode(t,"TSTypeReference")}tsParseThisTypePredicate(t){this.next();let i=this.startNodeAtNode(t);return i.parameterName=t,i.typeAnnotation=this.tsParseTypeAnnotation(!1),i.asserts=!1,this.finishNode(i,"TSTypePredicate")}tsParseThisTypeNode(){let t=this.startNode();return this.next(),this.finishNode(t,"TSThisType")}tsParseTypeQuery(){let t=this.startNode();return this.expect(83),this.match(79)?t.exprName=this.tsParseImportType():t.exprName=this.tsParseEntityName(1),!this.hasPrecedingLineBreak()&&this.match(43)&&(t.typeArguments=this.tsParseTypeArguments()),this.finishNode(t,"TSTypeQuery")}tsParseInOutModifiers=this.tsParseModifiers.bind(this,Dt(["in","out"],["const","public","private","protected","readonly","declare","abstract","override"]),O.InvalidModifierOnTypeParameter);tsParseConstModifier=this.tsParseModifiers.bind(this,Dt(["const"],["in","out"]),O.InvalidModifierOnTypeParameterPositions);tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,Dt(["in","out","const"],["public","private","protected","readonly","declare","abstract","override"]),O.InvalidModifierOnTypeParameter);tsParseTypeParameter(t){let i=this.startNode();return t(i),i.name=this.tsParseTypeParameterName(),i.constraint=this.tsEatThenParseType(77),i.default=this.tsEatThenParseType(25),this.finishNode(i,"TSTypeParameter")}tsTryParseTypeParameters(t){if(this.match(43))return this.tsParseTypeParameters(t)}tsParseTypeParameters(t){let i=this.startNode();this.match(43)||this.match(139)?this.next():this.unexpected();let r={value:-1};return i.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,t),!1,!0,r),i.params.length===0&&this.raise(O.EmptyTypeParameters,i),r.value!==-1&&this.addExtra(i,"trailingComma",r.value),this.finishNode(i,"TSTypeParameterDeclaration")}tsFillSignature(t,i){let r=t===15,n="params",a="returnType";i.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(6),i[n]=this.tsParseBindingListForSignature(),r?i[a]=this.tsParseTypeOrTypePredicateAnnotation(t):this.match(t)&&(i[a]=this.tsParseTypeOrTypePredicateAnnotation(t))}tsParseBindingListForSignature(){let t=super.parseBindingList(7,41,2);for(let i of t){let{type:r}=i;(r==="AssignmentPattern"||r==="TSParameterProperty")&&this.raise(O.UnsupportedSignatureParameterKind,i,{type:r})}return t}tsParseTypeMemberSemicolon(){!this.eat(8)&&!this.isLineTerminator()&&this.expect(9)}tsParseSignatureMember(t,i){return this.tsFillSignature(10,i),this.tsParseTypeMemberSemicolon(),this.finishNode(i,t)}tsIsUnambiguouslyIndexSignature(){return this.next(),de(this.state.type)?(this.next(),this.match(10)):!1}tsTryParseIndexSignature(t){if(!(this.match(0)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))))return;this.expect(0);let i=this.parseIdentifier();i.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(i),this.expect(1),t.parameters=[i];let r=this.tsTryParseTypeAnnotation();return r&&(t.typeAnnotation=r),this.tsParseTypeMemberSemicolon(),this.finishNode(t,"TSIndexSignature")}tsParsePropertyOrMethodSignature(t,i){if(this.eat(13)&&(t.optional=!0),this.match(6)||this.match(43)){i&&this.raise(O.ReadonlyForMethodSignature,t);let r=t;if(r.kind&&this.match(43)&&this.raise(O.AccessorCannotHaveTypeParameters,this.state.curPosition()),this.tsFillSignature(10,r),this.tsParseTypeMemberSemicolon(),r.kind==="get")r.params.length>0&&(this.raise(b.BadGetterArity,this.state.curPosition()),this.isThisParam(r.params[0])&&this.raise(O.AccessorCannotDeclareThisParameter,this.state.curPosition()));else if(r.kind==="set"){if(r.params.length!==1)this.raise(b.BadSetterArity,this.state.curPosition());else{let n=r.params[0];this.isThisParam(n)&&this.raise(O.AccessorCannotDeclareThisParameter,this.state.curPosition()),n.type==="Identifier"&&n.optional&&this.raise(O.SetAccessorCannotHaveOptionalParameter,this.state.curPosition()),n.type==="RestElement"&&this.raise(O.SetAccessorCannotHaveRestParameter,this.state.curPosition())}r.returnType&&this.raise(O.SetAccessorCannotHaveReturnType,r.returnType)}else r.kind="method";return this.finishNode(r,"TSMethodSignature")}else{let r=t;i&&(r.readonly=!0);let n=this.tsTryParseTypeAnnotation();return n&&(r.typeAnnotation=n),this.tsParseTypeMemberSemicolon(),this.finishNode(r,"TSPropertySignature")}}tsParseTypeMember(){let t=this.startNode();if(this.match(6)||this.match(43))return this.tsParseSignatureMember("TSCallSignatureDeclaration",t);if(this.match(73)){let r=this.startNode();return this.next(),this.match(6)||this.match(43)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",t):(t.key=this.createIdentifier(r,"new"),this.tsParsePropertyOrMethodSignature(t,!1))}this.tsParseModifiers(DP,void 0,t);let i=this.tsTryParseIndexSignature(t);return i||(super.parsePropertyName(t),!t.computed&&t.key.type==="Identifier"&&(t.key.name==="get"||t.key.name==="set")&&this.tsTokenCanFollowModifier()&&(t.kind=t.key.name,super.parsePropertyName(t),!this.match(6)&&!this.match(43)&&this.unexpected(null,6)),this.tsParsePropertyOrMethodSignature(t,!!t.readonly))}tsParseTypeLiteral(){let t=this.startNode();return t.members=this.tsParseObjectTypeMembers(),this.finishNode(t,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(2);let t=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(4),t}tsIsStartOfMappedType(){return this.next(),this.eat(49)?this.isContextual(119):(this.isContextual(119)&&this.next(),!this.match(0)||(this.next(),!this.tsIsIdentifier())?!1:(this.next(),this.match(54)))}tsParseMappedType(){let t=this.startNode();return this.expect(2),this.match(49)?(t.readonly=this.state.value,this.next(),this.expectContextual(119)):this.eatContextual(119)&&(t.readonly=!0),this.expect(0),t.key=this.tsParseTypeParameterName(),t.constraint=this.tsExpectThenParseType(54),t.nameType=this.eatContextual(90)?this.tsParseType():null,this.expect(1),this.match(49)?(t.optional=this.state.value,this.next(),this.expect(13)):this.eat(13)&&(t.optional=!0),t.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(4),this.finishNode(t,"TSMappedType")}tsParseTupleType(){let t=this.startNode();t.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let i=!1;return t.elementTypes.forEach(r=>{let{type:n}=r;i&&n!=="TSRestType"&&n!=="TSOptionalType"&&!(n==="TSNamedTupleMember"&&r.optional)&&this.raise(O.OptionalTypeBeforeRequired,r),i||=n==="TSNamedTupleMember"&&r.optional||n==="TSOptionalType"}),this.finishNode(t,"TSTupleType")}tsParseTupleElementType(){let t=this.state.startLoc,i=this.eat(17),{startLoc:r}=this.state,n,a,o,c,u=$e(this.state.type)?this.lookaheadCharCode():null;if(u===58)n=!0,o=!1,a=this.parseIdentifier(!0),this.expect(10),c=this.tsParseType();else if(u===63){o=!0;let f=this.state.value,m=this.tsParseNonArrayType();this.lookaheadCharCode()===58?(n=!0,a=this.createIdentifier(this.startNodeAt(r),f),this.expect(13),this.expect(10),c=this.tsParseType()):(n=!1,c=m,this.expect(13))}else c=this.tsParseType(),o=this.eat(13),n=this.eat(10);if(n){let f;a?(f=this.startNodeAt(r),f.optional=o,f.label=a,f.elementType=c,this.eat(13)&&(f.optional=!0,this.raise(O.TupleOptionalAfterType,this.state.lastTokStartLoc))):(f=this.startNodeAt(r),f.optional=o,this.raise(O.InvalidTupleMemberLabel,c),f.label=c,f.elementType=this.tsParseType()),c=this.finishNode(f,"TSNamedTupleMember")}else if(o){let f=this.startNodeAt(r);f.typeAnnotation=c,c=this.finishNode(f,"TSOptionalType")}if(i){let f=this.startNodeAt(t);f.typeAnnotation=c,c=this.finishNode(f,"TSRestType")}return c}tsParseParenthesizedType(){let t=this.startNode();return this.expect(6),t.typeAnnotation=this.tsParseType(),this.expect(7),this.finishNode(t,"TSParenthesizedType")}tsParseFunctionOrConstructorType(t,i){let r=this.startNode();return t==="TSConstructorType"&&(r.abstract=!!i,i&&this.next(),this.next()),this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(15,r)),this.finishNode(r,t)}tsParseLiteralTypeNode(){let t=this.startNode();switch(this.state.type){case 132:case 133:case 131:case 81:case 82:t.literal=super.parseExprAtom();break;default:this.unexpected()}return this.finishNode(t,"TSLiteralType")}tsParseTemplateLiteralType(){let t=this.state.startLoc,i=this.parseTemplateElement(!1),r=[i];if(i.tail){let n=this.startNodeAt(t),a=this.startNodeAt(t);return a.expressions=[],a.quasis=r,n.literal=this.finishNode(a,"TemplateLiteral"),this.finishNode(n,"TSLiteralType")}else{let n=[];for(;!i.tail;)n.push(this.tsParseType()),this.readTemplateContinuation(),r.push(i=this.parseTemplateElement(!1));let a=this.startNodeAt(t);return a.types=n,a.quasis=r,this.finishNode(a,"TSTemplateLiteralType")}}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){let t=this.tsParseThisTypeNode();return this.isContextual(113)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(t):t}tsParseNonArrayType(){switch(this.state.type){case 131:case 132:case 133:case 81:case 82:return this.tsParseLiteralTypeNode();case 49:if(this.state.value==="-"){let t=this.startNode(),i=this.lookahead();return i.type!==132&&i.type!==133&&this.unexpected(),t.literal=this.parseMaybeUnary(),this.finishNode(t,"TSLiteralType")}break;case 74:return this.tsParseThisTypeOrThisTypePredicate();case 83:return this.tsParseTypeQuery();case 79:return this.tsParseImportType();case 2:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case 0:return this.tsParseTupleType();case 6:if(!(this.optionFlags&2048)){let t=this.state.startLoc;this.next();let i=this.tsParseType();return this.expect(7),this.addExtra(i,"parenthesized",!0),this.addExtra(i,"parenStart",t.index),i}return this.tsParseParenthesizedType();case 21:case 20:return this.tsParseTemplateLiteralType();default:{let{type:t}=this.state;if(de(t)||t===84||t===80){let i=t===84?"TSVoidKeyword":t===80?"TSNullKeyword":NP(this.state.value);if(i!==void 0&&this.lookaheadCharCode()!==46){let r=this.startNode();return this.next(),this.finishNode(r,i)}return this.tsParseTypeReference()}}}throw this.unexpected()}tsParseArrayTypeOrHigher(){let{startLoc:t}=this.state,i=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(1)){let r=this.startNodeAt(t);r.elementType=i,this.expect(1),i=this.finishNode(r,"TSArrayType")}else{let r=this.startNodeAt(t);r.objectType=i,r.indexType=this.tsParseType(),this.expect(1),i=this.finishNode(r,"TSIndexedAccessType")}return i}tsParseTypeOperator(){let t=this.startNode(),i=this.state.value;return this.next(),t.operator=i,t.typeAnnotation=this.tsParseTypeOperatorOrHigher(),i==="readonly"&&this.tsCheckTypeAnnotationForReadOnly(t),this.finishNode(t,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(t){switch(t.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(O.UnexpectedReadonly,t)}}tsParseInferType(){let t=this.startNode();this.expectContextual(112);let i=this.startNode();return i.name=this.tsParseTypeParameterName(),i.constraint=this.tsTryParse(()=>this.tsParseConstraintForInferType()),t.typeParameter=this.finishNode(i,"TSTypeParameter"),this.finishNode(t,"TSInferType")}tsParseConstraintForInferType(){if(this.eat(77)){let t=this.tsInDisallowConditionalTypesContext(()=>this.tsParseType());if(this.state.inDisallowConditionalTypesContext||!this.match(13))return t}}tsParseTypeOperatorOrHigher(){return Xg(this.state.type)&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(112)?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseUnionOrIntersectionType(t,i,r){let n=this.startNode(),a=this.eat(r),o=[];do o.push(i());while(this.eat(r));return o.length===1&&!a?o[0]:(n.types=o,this.finishNode(n,t))}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),41)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),39)}tsIsStartOfFunctionType(){return this.match(43)?!0:this.match(6)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(de(this.state.type)||this.match(74))return this.next(),!0;if(this.match(2)){let{errors:t}=this.state,i=t.length;try{return this.parseObjectLike(4,!0),t.length===i}catch{return!1}}if(this.match(0)){this.next();let{errors:t}=this.state,i=t.length;try{return super.parseBindingList(1,93,1),t.length===i}catch{return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){return this.next(),!!(this.match(7)||this.match(17)||this.tsSkipParameterStart()&&(this.match(10)||this.match(8)||this.match(13)||this.match(25)||this.match(7)&&(this.next(),this.match(15))))}tsParseTypeOrTypePredicateAnnotation(t){return this.tsInType(()=>{let i=this.startNode();this.expect(t);let r=this.startNode(),n=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(n&&this.match(74)){let c=this.tsParseThisTypeOrThisTypePredicate();return c.type==="TSThisType"?(r.parameterName=c,r.asserts=!0,r.typeAnnotation=null,c=this.finishNode(r,"TSTypePredicate")):(this.resetStartLocationFromNode(c,r),c.asserts=!0),i.typeAnnotation=c,this.finishNode(i,"TSTypeAnnotation")}let a=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!a)return n?(r.parameterName=this.parseIdentifier(),r.asserts=n,r.typeAnnotation=null,i.typeAnnotation=this.finishNode(r,"TSTypePredicate"),this.finishNode(i,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,i);let o=this.tsParseTypeAnnotation(!1);return r.parameterName=a,r.typeAnnotation=o,r.asserts=n,i.typeAnnotation=this.finishNode(r,"TSTypePredicate"),this.finishNode(i,"TSTypeAnnotation")})}tsTryParseTypeOrTypePredicateAnnotation(){if(this.match(10))return this.tsParseTypeOrTypePredicateAnnotation(10)}tsTryParseTypeAnnotation(){if(this.match(10))return this.tsParseTypeAnnotation()}tsTryParseType(){return this.tsEatThenParseType(10)}tsParseTypePredicatePrefix(){let t=this.parseIdentifier();if(this.isContextual(113)&&!this.hasPrecedingLineBreak())return this.next(),t}tsParseTypePredicateAsserts(){if(this.state.type!==106)return!1;let t=this.state.containsEsc;return this.next(),!de(this.state.type)&&!this.match(74)?!1:(t&&this.raise(b.InvalidEscapedReservedWord,this.state.lastTokStartLoc,{reservedWord:"asserts"}),!0)}tsParseTypeAnnotation(t=!0,i=this.startNode()){return this.tsInType(()=>{t&&this.expect(10),i.typeAnnotation=this.tsParseType()}),this.finishNode(i,"TSTypeAnnotation")}tsParseType(){Ol(this.state.inType);let t=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(77))return t;let i=this.startNodeAtNode(t);return i.checkType=t,i.extendsType=this.tsInDisallowConditionalTypesContext(()=>this.tsParseNonConditionalType()),this.expect(13),i.trueType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.expect(10),i.falseType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.finishNode(i,"TSConditionalType")}isAbstractConstructorSignature(){return this.isContextual(121)&&this.isLookaheadContextual("new")}tsParseNonConditionalType(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(73)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.isAbstractConstructorSignature()?this.tsParseFunctionOrConstructorType("TSConstructorType",!0):this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(O.ReservedTypeAssertion,this.state.startLoc);let t=this.startNode();return t.typeAnnotation=this.tsInType(()=>(this.next(),this.match(71)?this.tsParseTypeReference():this.tsParseType())),this.expect(44),this.state.canStartArrow=!1,t.expression=this.parseMaybeUnary(),this.finishNode(t,"TSTypeAssertion")}tsParseHeritageClause(t){let i=this.state.startLoc,r=this.tsParseDelimitedList("HeritageClauseElement",()=>{let n=(this.state.canStartArrow=!1,super.parseExprSubscripts());_n(n)||this.raise(O.InvalidHeritageClauseType,n.start,{token:t});let a=t==="extends"?"TSInterfaceHeritage":"TSClassImplements";if(n.type==="TSInstantiationExpression")return n.type=a,n;let o=this.startNodeAtNode(n);return o.expression=n,(this.match(43)||this.match(47))&&(o.typeArguments=this.tsParseTypeArgumentsInExpression()),this.finishNode(o,a)});return r.length||this.raise(O.EmptyHeritageClauseType,i,{token:t}),r}tsParseInterfaceDeclaration(t,i={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(126),i.declare&&(t.declare=!0),de(this.state.type)?(t.id=this.parseIdentifier(),this.checkIdentifier(t.id,130)):(t.id=null,this.raise(O.MissingInterfaceName,this.state.startLoc)),t.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(77)&&(t.extends=this.tsParseHeritageClause("extends"));let r=this.startNode();return r.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),t.body=this.finishNode(r,"TSInterfaceBody"),this.finishNode(t,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(t){return t.id=this.parseIdentifier(),this.checkIdentifier(t.id,2),t.typeAnnotation=this.tsInType(()=>{if(t.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers),this.expect(25),this.isContextual(111)&&this.lookaheadCharCode()!==46){let i=this.startNode();return this.next(),this.finishNode(i,"TSIntrinsicKeyword")}return this.tsParseType()}),this.semicolon(),this.finishNode(t,"TSTypeAliasDeclaration")}tsInTopLevelContext(t){if(this.curContext()!==be.brace){let i=this.state.context;this.state.context=[i[0]];try{return t()}finally{this.state.context=i}}else return t()}tsInType(t){let i=this.state.inType;this.state.inType=!0;try{return t()}finally{this.state.inType=i}}tsInDisallowConditionalTypesContext(t){let i=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return t()}finally{this.state.inDisallowConditionalTypesContext=i}}tsInAllowConditionalTypesContext(t){let i=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return t()}finally{this.state.inDisallowConditionalTypesContext=i}}tsEatThenParseType(t){if(this.match(t))return this.tsNextThenParseType()}tsExpectThenParseType(t){return this.tsInType(()=>(this.expect(t),this.tsParseType()))}tsNextThenParseType(){return this.tsInType(()=>(this.next(),this.tsParseType()))}tsParseEnumMember(){let t=this.startNode();return t.id=this.match(131)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(25)&&(t.initializer=super.parseMaybeAssignAllowIn()),this.finishNode(t,"TSEnumMember")}tsParseEnumDeclaration(t,i={}){return i.const&&(t.const=!0),i.declare&&(t.declare=!0),this.expectContextual(123),t.id=this.parseIdentifier(),this.checkIdentifier(t.id,t.const?8971:8459),t.body=this.tsParseEnumBody(),this.finishNode(t,"TSEnumDeclaration")}tsParseEnumBody(){let t=this.startNode();return this.expect(2),t.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(4),this.finishNode(t,"TSEnumBody")}tsParseModuleBlock(t){let i=this.startNode();return t||this.scope.enter(0),this.expect(2),super.parseBlockOrModuleBlockBody(i.body=[],void 0,!0,4),t||this.scope.exit(),this.finishNode(i,"TSModuleBlock")}tsParseNamespaceDeclaration(t){return t.id=this.tsParseEntityName(0),t.id.type==="Identifier"&&this.checkIdentifier(t.id,1024),this.scope.enter(2048),this.prodParam.enter(0),t.body=this.tsParseModuleBlock(!1),this.prodParam.exit(),this.scope.exit(),this.finishNode(t,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(t){let i=this.isContextual(109);if(i)t.kind="global",t.id=this.parseIdentifier();else{t.kind="module";let{type:r,value:n}=this.state;r===131?t.id=super.parseStringLiteral(n):de(r)?(this.raise(O.InlineModuleDeclarationMustUseString,this.state.startLoc),t.id=this.tsParseEntityName(0)):r===2?this.raise(O.EmptyNamespaceName,this.state.startLoc):(this.raise(O.InvalidNamespaceName,this.state.startLoc,n),t.id=super.parseExprAtom())}return this.match(2)?(i||this.scope.enter(1024),this.prodParam.enter(0),t.body=this.tsParseModuleBlock(i),this.prodParam.exit(),i||this.scope.exit()):this.semicolon(),this.finishNode(t,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(t,i){t.id=i||this.parseIdentifier(),this.checkIdentifier(t.id,4096),this.expect(25);let r=this.tsParseModuleReference();return t.importKind==="type"&&r.type!=="TSExternalModuleReference"&&this.raise(O.ImportAliasHasImportType,r),t.moduleReference=r,this.semicolon(),this.finishNode(t,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual(116)&&this.lookaheadCharCode()===40}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(0)}tsParseExternalModuleReference(){let t=this.startNode();return this.expectContextual(116),this.expect(6),this.match(131)||this.unexpected(),t.expression=super.parseExprAtom(),this.expect(7),this.sawUnambiguousESM=!0,this.finishNode(t,"TSExternalModuleReference")}tsLookAhead(t){let i=this.state.clone(),r=t();return this.state=i,r}tsTryParseAndCatch(t){let i=this.tryParse(r=>t()||r());if(!(i.aborted||!i.node))return i.error&&(this.state=i.failState),i.node}tsTryParse(t){let i=this.state.clone(),r=t();if(r!==void 0&&r!==!1)return r;this.state=i}tsTryParseDeclare(t){if(this.isLineTerminator())return;let i=this.state.type;return this.tsInAmbientContext(()=>{switch(i){case 64:return t.declare=!0,super.parseFunctionStatement(t,!1,2);case 76:return t.declare=!0,this.parseClass(t,!0,!1);case 123:return this.tsParseEnumDeclaration(t,{declare:!0});case 109:return this.tsParseAmbientExternalModuleDeclaration(t);case 97:if(this.state.containsEsc)return;case 71:case 70:return!this.match(71)||!this.isLookaheadContextual("enum")?(t.declare=!0,this.parseVarStatement(t,this.state.value,!0)):(this.expect(71),this.tsParseEnumDeclaration(t,{const:!0,declare:!0}));case 104:if(this.isUsing())return this.raise(O.InvalidModifierOnUsingDeclaration,this.state.startLoc,"declare"),t.declare=!0,this.parseVarStatement(t,"using",!0);break;case 93:if(this.isAwaitUsing())return this.raise(O.InvalidModifierOnAwaitUsingDeclaration,this.state.startLoc,"declare"),t.declare=!0,this.next(),this.parseVarStatement(t,"await using",!0);break;case 126:{let r=this.tsParseInterfaceDeclaration(t,{declare:!0});if(r)return r}default:if(de(i))return this.tsParseDeclaration(t,this.state.type,!0,null)}})}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.type,!0,null)}tsParseDeclaration(t,i,r,n){switch(i){case 121:if(this.tsCheckLineTerminator(r)&&(this.match(76)||de(this.state.type)))return this.tsParseAbstractDeclaration(t,n);break;case 124:if(this.tsCheckLineTerminator(r))return this.tsParseAmbientExternalModuleDeclaration(t);break;case 125:if(this.tsCheckLineTerminator(r)&&de(this.state.type))return t.kind="namespace",this.tsParseNamespaceDeclaration(t);break;case 127:if(this.tsCheckLineTerminator(r)&&de(this.state.type))return this.tsParseTypeAliasDeclaration(t);break}}tsCheckLineTerminator(t){return t?this.hasFollowingLineBreak()?!1:(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(t){if(!this.match(43))return;let i=this.tsTryParseAndCatch(()=>{let r=this.startNodeAt(t);return r.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(r),r.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(15),r});if(i)return super.parseArrowExpression(i,null,!0)}tsParseTypeArgumentsInExpression(){if(this.reScan_lt()===43)return this.tsParseTypeArguments()}tsParseTypeArguments(){let t=this.startNode();return t.params=this.tsInType(()=>this.tsInTopLevelContext(()=>(this.expect(43),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))),t.params.length===0?this.raise(O.EmptyTypeArguments,t):!this.state.inType&&this.curContext()===be.brace&&this.reScan_lt_gt(),this.expect(44),this.finishNode(t,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return Wg(this.state.type)}isExportDefaultSpecifier(){return this.tsIsDeclarationStart()?!1:super.isExportDefaultSpecifier()}parseBindingElement(t,i){let r=i.length?null:this.state.startLoc,n={};this.tsParseModifiers(LP,void 0,n);let a=n.accessibility,o=n.override,c=n.readonly;!(t&4)&&(a||c||o)&&this.raise(O.UnexpectedParameterModifier,r||i[0]);let l=this.state.startLoc,u=this.parseMaybeDefault(l);t&2&&this.parseFunctionParamType(u);let f=this.parseMaybeDefault(l,u);if(a||c||o){let m=r?this.startNodeAt(r):this.startNodeAtNode(i[0]);return i.length?m.decorators=i:this.setLoc(r),a&&(m.accessibility=a),c&&(m.readonly=c),o&&(m.override=o),f.type!=="Identifier"&&f.type!=="AssignmentPattern"&&this.raise(O.UnsupportedParameterPropertyKind,r||i[0]),m.parameter=f,this.finishNode(m,"TSParameterProperty")}return i.length&&(u.decorators=i),f}isSimpleParameter(t){return t.type==="TSParameterProperty"&&super.isSimpleParameter(t.parameter)||super.isSimpleParameter(t)}tsDisallowOptionalPattern(t){for(let i of t.params)i.type!=="Identifier"&&i.optional&&!this.state.isAmbientContext&&this.raise(O.PatternIsOptional,i)}setArrowFunctionParameters(t,i,r){super.setArrowFunctionParameters(t,i,r),this.tsDisallowOptionalPattern(t)}parseFunctionBodyAndFinish(t,i,r=!1){this.match(10)&&(t.returnType=this.tsParseTypeOrTypePredicateAnnotation(10));let n=i==="FunctionDeclaration"?"TSDeclareFunction":i==="ClassMethod"||i==="ClassPrivateMethod"?"TSDeclareMethod":void 0;if(n&&!this.match(2)&&this.isLineTerminator()){if(n==="TSDeclareMethod"&&t.kind==="constructor")for(let a of t.params)a.type==="TSParameterProperty"?this.raise(O.UnexpectedParameterModifier,a):a.type==="AssignmentPattern"&&this.raise(O.UnexpectedParameterInitializer,a);else for(let a of t.params)a.type==="AssignmentPattern"&&this.raise(O.UnexpectedParameterInitializer,a);return this.finishNode(t,n)}return n&&this.state.isAmbientContext&&(this.raise(O.DeclareFunctionHasImplementation,this.state.startLoc),n==="TSDeclareFunction"&&t.declare)?super.parseFunctionBodyAndFinish(t,n,r):(this.tsDisallowOptionalPattern(t),super.parseFunctionBodyAndFinish(t,i,r))}registerFunctionStatementId(t){!t.body&&t.id?this.checkIdentifier(t.id,1024):super.registerFunctionStatementId(t)}tsCheckForInvalidTypeCasts(t){t.forEach(i=>{i?.type==="TSTypeCastExpression"&&this.raise(O.UnexpectedTypeAnnotation,i.typeAnnotation)})}toReferencedList(t,i){return this.tsCheckForInvalidTypeCasts(t),t}parseArrayLike(t,i){let r=super.parseArrayLike(t,i);return r.type==="ArrayExpression"&&this.tsCheckForInvalidTypeCasts(r.elements),r}parseSubscript(t,i,r,n){if(!this.hasPrecedingLineBreak()&&this.match(31)){this.state.canStartJSXElement=!1,this.next();let o=this.startNodeAt(i);return o.expression=t,this.finishNode(o,"TSNonNullExpression")}let a=!1;if(this.match(14)&&this.lookaheadCharCode()===60){if(r)return n.stop=!0,t;n.optionalChainMember=a=!0,this.next()}if(this.match(43)||this.match(47)){let o,c=this.tsTryParseAndCatch(()=>{if(!r&&this.atPossibleAsyncArrow(t)){let m=this.tsTryParseGenericAsyncArrowFunction(i);if(m)return n.stop=!0,m}let l=this.tsParseTypeArgumentsInExpression();if(!l)return;if(a&&!this.match(6)){o=this.state.curPosition();return}if(mn(this.state.type)){let m=super.parseTaggedTemplateExpression(t,i,n);return m.typeArguments=l,m}if(!r&&this.eat(6)){let m=this.startNodeAt(i);return m.callee=t,m.arguments=this.parseCallExpressionArguments(),this.tsCheckForInvalidTypeCasts(m.arguments),m.typeArguments=l,n.optionalChainMember&&(m.optional=a),this.finishCallExpression(m,n.optionalChainMember)}let u=this.state.type;if(u===44||u===48||u!==6&&u!==90&&u!==117&&Fs(u)&&!this.hasPrecedingLineBreak())return;let f=this.startNodeAt(i);return f.expression=t,f.typeArguments=l,this.finishNode(f,"TSInstantiationExpression")});if(o&&this.unexpected(o,6),c)return c.type==="TSInstantiationExpression"&&((this.match(12)||this.match(14)&&this.lookaheadCharCode()!==40)&&this.raise(O.InvalidPropertyAccessAfterInstantiationExpression,this.state.startLoc),!this.match(12)&&!this.match(14)&&(c.expression=super.stopParseSubscript(t,n))),c}return super.parseSubscript(t,i,r,n)}parseNewCallee(t){super.parseNewCallee(t);let{callee:i}=t;i.type==="TSInstantiationExpression"&&!i.extra?.parenthesized&&(t.typeArguments=i.typeArguments,t.callee=i.expression)}parseExprOp(t,i,r){let n;if(ji(54)>r&&!this.hasPrecedingLineBreak()&&(this.isContextual(90)||(n=this.isContextual(117)))){let a=this.startNodeAt(i);a.expression=t,a.typeAnnotation=this.tsInType(()=>(this.next(),this.match(71)?(n&&this.raise(b.UnexpectedKeyword,this.state.startLoc,{keyword:"const"}),this.tsParseTypeReference()):this.tsParseType()));let o=this.finishNode(a,n?"TSSatisfiesExpression":"TSAsExpression");return this.reScan_lt_gt(),this.parseExprOp(o,i,r)}return super.parseExprOp(t,i,r)}checkReservedWord(t,i,r,n){this.state.isAmbientContext||super.checkReservedWord(t,i,r,n)}checkDuplicateExports(){}isPotentialImportPhase(t){if(super.isPotentialImportPhase(t))return!0;if(this.isContextual(127)){let i=this.lookaheadCharCode();return t?i===123||i===42:i!==61}return!t&&this.isContextual(83)}applyImportPhase(t,i,r,n){super.applyImportPhase(t,i,r,n),i?t.exportKind=r==="type"?"type":"value":t.importKind=r==="type"||r==="typeof"?r:"value"}parseImport(t){if(this.match(131))return t.importKind="value",this.scope.inTSNamespace&&this.raise(O.ImportInTSNamespace,t),super.parseImport(t);let i;if(de(this.state.type)&&this.lookaheadCharCode()===61){t.importKind="value";let r=this.tsParseImportEqualsDeclaration(t);return this.scope.inTSNamespace&&r.moduleReference.type==="TSExternalModuleReference"&&this.raise(O.ImportInTSNamespace,t),r}else if(this.isContextual(127)){let r=this.parseMaybeImportPhase(t,!1);if(this.lookaheadCharCode()===61)return this.scope.inTSNamespace&&this.raise(O.ImportInTSNamespace,t),this.tsParseImportEqualsDeclaration(t,r);i=super.parseImportSpecifiersAndAfter(t,r)}else i=super.parseImport(t);return i.importKind==="type"&&i.specifiers.length>1&&i.specifiers[0].type==="ImportDefaultSpecifier"?this.raise(O.TypeImportCannotSpecifyDefaultAndNamed,i):this.scope.inTSNamespace&&this.raise(O.ImportInTSNamespace,i),i}parseExport(t,i){if(this.match(79)){let r=this.startNode();this.next();let n=null;this.isContextual(127)&&this.isPotentialImportPhase(!1)?n=this.parseMaybeImportPhase(r,!1):r.importKind="value";let a=this.tsParseImportEqualsDeclaration(r,n);return t.attributes=[],t.declaration=a,t.exportKind="value",t.source=null,t.specifiers=[],this.finishNode(t,"ExportNamedDeclaration")}else if(this.eat(25)){let r=t;return r.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.scope.inTSNamespace&&this.raise(O.ExportAssignmentInTSNamespace,r),this.finishNode(r,"TSExportAssignment")}else if(this.eatContextual(90)){let r=t;return this.expectContextual(125),r.id=this.parseIdentifier(),this.checkIdentifier(r.id,8201),this.semicolon(),this.scope.inTSNamespace&&this.raise(O.NamespaceExportInTSNamespace,r),this.finishNode(r,"TSNamespaceExportDeclaration")}else{let r=super.parseExport(t,i);return this.scope.inTSNamespace&&(r.type!=="ExportNamedDeclaration"||r.source||!r.declaration&&!this.state.isAmbientContext)&&this.raise(O.ExportInTSNamespace,r),r}}isAbstractClass(){return this.isContextual(121)&&this.isLookaheadContextual("class")}parseExportDefaultExpression(){if(this.isAbstractClass()){let t=this.startNode();return this.next(),t.abstract=!0,this.parseClass(t,!0,!0)}if(this.match(126)){let t=this.tsParseInterfaceDeclaration(this.startNode());if(t)return t}return super.parseExportDefaultExpression()}parseVarStatement(t,i,r=!1){let{isAmbientContext:n}=this.state,a=super.parseVarStatement(t,i,r||n);if(n&&!t.declare&&(i==="using"||i==="await using"))return this.raiseOverwrite(O.UsingDeclarationInAmbientContext,t,i),a;for(let o of a.declarations){let{id:c,init:l,definite:u}=o;u&&(l?this.raise(O.DeclaratorDefiniteAssertionWithInitializer,c):c.typeAnnotation||this.raise(O.DeclaratorDefiniteAssertionRequiresTypeAnnotation,c)),n&&l&&(i==="var"||i==="let"||c.typeAnnotation?this.raise(O.InitializerNotAllowedInAmbientContext,l):BP(l,this.hasPlugin("estree"))||this.raise(O.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference,l))}return a}parseStatementContent(t,i){let r=!!(t&2);if(!this.state.containsEsc)switch(this.state.type){case 71:{if(this.isLookaheadContextual("enum")){let n=this.startNode();return this.next(),this.tsParseEnumDeclaration(n,{const:!0})}break}case 121:case 122:{if(this.nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine()){let n=this.state.type,a=this.startNode();this.next();let o=n===122?this.tsTryParseDeclare(a):this.tsParseAbstractDeclaration(a,i);return o?(n===122&&(o.declare=!0),o):(a.expression=this.createIdentifier(this.startNodeAtNode(a),n===122?"declare":"abstract"),this.semicolon(!1),this.finishNode(a,"ExpressionStatement"))}break}case 123:return this.tsParseEnumDeclaration(this.startNode());case 109:{if(this.lookaheadCharCode()===123){let a=this.startNode();return this.tsParseAmbientExternalModuleDeclaration(a)}break}case 126:{let n=this.tsParseInterfaceDeclaration(this.startNode());if(n)return r||this.raise(O.UnexpectedTypeDeclaration,n,"interface"),n;break}case 124:{if(this.nextTokenIsStringLiteralOnSameLine()){let n=this.startNode();return this.next(),this.tsParseDeclaration(n,124,!1,i)}else if(this.nextTokenIsIdentifierOnSameLine()){this.raise(O.InlineModuleDeclarationMustUseString,this.state.startLoc);let n=this.startNode();return this.next(),this.tsParseDeclaration(n,125,!1,i)}break}case 125:{if(this.nextTokenIsIdentifierOnSameLine()){let n=this.startNode();return this.next(),this.tsParseDeclaration(n,125,!1,i)}break}case 127:{if(this.nextTokenIsIdentifierOnSameLine()){let n=this.startNode();return r||this.raise(O.UnexpectedTypeDeclaration,n,"type"),this.next(),this.tsParseTypeAliasDeclaration(n)}break}}return super.parseStatementContent(t,i)}parseAccessModifier(){return this.tsParseModifier(OP)}tsHasSomeModifiers(t,i){return i.some(r=>Ml(r)?t.accessibility===r:!!t[r])}tsIsStartOfStaticBlocks(){return this.isContextual(103)&&this.lookaheadCharCode()===123}parseClassMember(t,i,r){this.tsParseModifiers(kP,O.InvalidModifierOnTypeParameterPositions,i,!0);let n=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(i,["declare","private","public","protected","override","abstract","readonly","static"])&&this.raise(O.StaticBlockCannotHaveModifier,this.state.curPosition()),super.parseClassStaticBlock(t,i)):this.parseClassMemberWithIsStatic(t,i,r,!!i.static)};i.declare?this.tsInAmbientContext(n):n(),i.decorators&&i.decorators.length>0&&!this.hasPlugin("decorators-legacy")&&(i.type==="TSAbstractMethodDefinition"||i.type==="TSDeclareMethod"?this.raise(O.DecoratorAbstractMethod,i,{kind:"abstract method"}):(i.type==="ClassProperty"&&i.abstract||i.type==="ClassProperty"&&i.declare||i.type==="TSAbstractPropertyDefinition"||i.type==="PropertyDefinition"&&i.declare)&&this.raise(O.DecoratorAbstractMethod,i,{kind:i.declare?"declare field":"abstract field"}))}parseClassMemberWithIsStatic(t,i,r,n){let a=this.tsTryParseIndexSignature(i);if(a){t.body.push(a),i.abstract&&this.raise(O.IndexSignatureHasAbstract,i),i.accessibility&&this.raise(O.IndexSignatureHasAccessibility,i,{modifier:i.accessibility}),i.declare&&this.raise(O.IndexSignatureHasDeclare,i),i.override&&this.raise(O.IndexSignatureHasOverride,i);return}!this.state.inAbstractClass&&i.abstract&&this.raise(O.NonAbstractClassHasAbstractMethod,i),i.override&&(r.hadSuperClass||this.raise(O.OverrideNotInSubClass,i)),super.parseClassMemberWithIsStatic(t,i,r,n)}parsePostMemberNameModifiers(t){this.eat(13)&&(t.optional=!0),t.readonly&&this.match(6)&&this.raise(O.ClassMethodHasReadonly,t),t.declare&&this.match(6)&&this.raise(O.ClassMethodHasDeclare,t)}shouldParseExportDeclaration(){return this.tsIsDeclarationStart()?!0:super.shouldParseExportDeclaration()}parseConditional(t,i,r){if(!this.match(13))return t;if(r!=null){let o=this.lookaheadCharCode();if(o===44||o===61||o===58||o===41)return this.setOptionalParametersError(r),t}this.next();let n=this.startNodeAt(i);n.test=t;let a=this.state.inConditionalConsequent;return this.state.inConditionalConsequent=!0,n.consequent=this.parseMaybeAssignAllowIn(),this.state.inConditionalConsequent=a,this.expect(10),n.alternate=this.parseMaybeAssign(),this.finishNode(n,"ConditionalExpression")}parseParenItem(t,i){let r=super.parseParenItem(t,i);if(this.eat(13)&&(r.optional=!0,this.resetEndLocation(t)),this.match(10)){let n=this.startNodeAt(i);return n.expression=t,n.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(n,"TSTypeCastExpression")}return t}parseExportDeclaration(t){if(!this.state.isAmbientContext&&this.isContextual(122))return this.tsInAmbientContext(()=>this.parseExportDeclaration(t));let i=this.state.startLoc,r=this.eatContextual(122);if(r&&(this.isContextual(122)||!this.shouldParseExportDeclaration()))throw this.raise(O.ExpectedAmbientAfterExportDeclare,this.state.startLoc);let a=de(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(t);return a?((a.type==="TSInterfaceDeclaration"||a.type==="TSTypeAliasDeclaration"||r)&&(t.exportKind="type"),r&&a.type!=="TSImportEqualsDeclaration"&&(this.resetStartLocation(a,i),a.declare=!0),a):null}parseClassId(t,i,r,n){if((!i||r)&&this.isContextual(110)){t.id=null;return}super.parseClassId(t,i,r,t.declare?1024:8331);let a=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);a&&(t.typeParameters=a)}parseClassPropertyAnnotation(t){t.optional||(this.eat(31)?t.definite=!0:this.eat(13)&&(t.optional=!0));let i=this.tsTryParseTypeAnnotation();i&&(t.typeAnnotation=i),t.definite&&(this.match(25)?this.raise(O.DeclaratorDefiniteAssertionWithInitializer,t):i||this.raise(O.DeclaratorDefiniteAssertionRequiresTypeAnnotation,t))}parseClassProperty(t){if(this.parseClassPropertyAnnotation(t),this.state.isAmbientContext&&!(t.readonly&&!t.typeAnnotation)&&this.match(25)&&this.raise(O.DeclareClassFieldHasInitializer,this.state.startLoc),t.abstract&&this.match(25)){let{key:i}=t;this.raise(O.AbstractPropertyHasInitializer,this.state.startLoc,{propertyName:i.type==="Identifier"&&!t.computed?i.name:`[${this.input.slice(this.offsetToSourcePos(i.start),this.offsetToSourcePos(i.end))}]`})}return super.parseClassProperty(t)}parseClassPrivateProperty(t){return t.abstract&&this.raise(O.PrivateElementHasAbstract,t),t.accessibility&&this.raise(O.PrivateElementHasAccessibility,t,{modifier:t.accessibility}),this.parseClassPropertyAnnotation(t),super.parseClassPrivateProperty(t)}parseClassAccessorProperty(t){return this.parseClassPropertyAnnotation(t),t.optional&&this.raise(O.AccessorCannotBeOptional,t),super.parseClassAccessorProperty(t)}pushClassMethod(t,i,r,n,a,o){let c=this.tsTryParseTypeParameters(this.tsParseConstModifier);c&&a&&this.raise(O.ConstructorHasTypeParameters,c);let{declare:l=!1,kind:u}=i;l&&(u==="get"||u==="set")&&this.raise(O.DeclareAccessor,i,{kind:u}),c&&(i.typeParameters=c),super.pushClassMethod(t,i,r,n,a,o)}pushClassPrivateMethod(t,i,r,n){let a=this.tsTryParseTypeParameters(this.tsParseConstModifier);a&&(i.typeParameters=a),super.pushClassPrivateMethod(t,i,r,n)}declareClassPrivateMethodInScope(t,i){t.type!=="TSDeclareMethod"&&(t.type==="MethodDefinition"&&t.value.body==null||super.declareClassPrivateMethodInScope(t,i))}parseClassSuper(t){if(super.parseClassSuper(t),t.superClass)if(t.superClass.type==="TSInstantiationExpression"){let i=t.superClass,r=i.expression;this.takeSurroundingComments(r,r.start,r.end);let n=i.typeArguments;this.takeSurroundingComments(n,n.start,n.end),t.superClass=r,t.superTypeArguments=n}else(this.match(43)||this.match(47))&&(t.superTypeArguments=this.tsParseTypeArgumentsInExpression());this.eatContextual(110)&&(t.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(t,i,r,n,a,o,c){let l=this.tsTryParseTypeParameters(this.tsParseConstModifier);return l&&(t.typeParameters=l),super.parseObjPropValue(t,i,r,n,a,o,c)}parseFunctionParams(t,i){let r=this.tsTryParseTypeParameters(this.tsParseConstModifier);r&&(t.typeParameters=r),super.parseFunctionParams(t,i)}parseVarId(t,i){super.parseVarId(t,i),t.id.type==="Identifier"&&!this.hasPrecedingLineBreak()&&this.eat(31)&&(t.definite=!0);let r=this.tsTryParseTypeAnnotation();r&&(t.id.typeAnnotation=r,this.resetEndLocation(t.id))}parseAsyncArrowFromCallExpression(t,i){return this.match(10)&&(t.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(t,i)}parseMaybeAssign(t,i){let r,n,a;if(this.hasPlugin("jsx")&&(this.match(139)||this.match(43))){if(r=this.state.clone(),n=this.tryParse(()=>super.parseMaybeAssign(t,i),r),!n.error)return n.node;let{context:l}=this.state,u=l[l.length-1];(u===be.j_oTag||u===be.j_expr)&&l.pop()}if(!n?.error&&!this.match(43))return super.parseMaybeAssign(t,i);(!r||r===this.state)&&(r=this.state.clone());let o,c=this.tryParse(l=>{o=this.tsParseTypeParameters(this.tsParseConstModifier);let u=super.parseMaybeAssign(t,i);if((u.type!=="ArrowFunctionExpression"||u.extra?.parenthesized)&&l(),o?.params.length!==0&&this.resetStartLocationFromNode(u,o),u.typeParameters=o,this.hasPlugin("jsx")&&u.typeParameters.params.length===1&&!u.typeParameters.extra?.trailingComma){let f=u.typeParameters.params[0];f.constraint||this.raise(O.SingleTypeParameterWithoutTrailingComma,this.optionFlags&256?ze(f.loc.end,1):f,{typeParameterName:f.name.name})}return u},r);if(!c.error&&!c.aborted)return o&&this.reportReservedArrowTypeParam(o),c.node;if(!n&&(Ol(!this.hasPlugin("jsx")),a=this.tryParse(()=>super.parseMaybeAssign(t,i),r),!a.error))return a.node;if(n?.node)return this.state=n.failState,n.node;if(c.node)return this.state=c.failState,o&&this.reportReservedArrowTypeParam(o),c.node;if(a?.node)return this.state=a.failState,a.node;throw n?.error||c.error||a?.error}reportReservedArrowTypeParam(t){t.params.length===1&&!t.params[0].constraint&&!t.extra?.trailingComma&&this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(O.ReservedArrowTypeParam,t)}parseMaybeUnary(t,i){return!this.hasPlugin("jsx")&&this.match(43)?this.tsParseTypeAssertion():super.parseMaybeUnary(t,i)}parseArrow(t){if(this.match(10)){let i=this.tryParse(r=>{let n=this.tsParseTypeOrTypePredicateAnnotation(10);return(this.canInsertSemicolon()||!this.match(15))&&r(),n});if(i.aborted)return;i.thrown||(i.error&&(this.state=i.failState),t.returnType=i.node)}return super.parseArrow(t)}parseFunctionParamType(t){this.eat(13)&&(t.optional=!0);let i=this.tsTryParseTypeAnnotation();return i&&(t.typeAnnotation=i),this.resetEndLocation(t),t}isAssignable(t,i){switch(t.type){case"TSTypeCastExpression":return this.isAssignable(t.expression,i);case"TSParameterProperty":return!0;default:return super.isAssignable(t,i)}}toAssignable(t,i=!1){switch(t.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(t,i);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":i?this.expressionScope.recordArrowParameterBindingError(O.UnexpectedTypeCastInParameter,t):this.raise(O.UnexpectedTypeCastInParameter,t),this.toAssignable(t.expression,i);break;case"AssignmentExpression":!i&&t.left.type==="TSTypeCastExpression"&&(t.left=this.typeCastToParameter(t.left));default:super.toAssignable(t,i)}}toAssignableParenthesizedExpression(t,i){switch(t.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(t.expression,i);break;default:super.toAssignable(t,i)}}checkToRestConversion(t,i){switch(t.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(t.expression,!1);break;default:super.checkToRestConversion(t,i)}}isValidLVal(t,i,r,n){switch(t){case"TSTypeCastExpression":return!0;case"TSParameterProperty":return"parameter";case"TSNonNullExpression":return"expression";case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":return(n!==64||!r)&&["expression",!0];default:return super.isValidLVal(t,i,r,n)}}parseBindingAtom(){return this.state.type===74?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(t,i){if(this.match(43)||this.match(47)){let r=this.tsParseTypeArgumentsInExpression();if(this.match(6)){let n=super.parseMaybeDecoratorArguments(t,i);return n.typeArguments=r,n}this.unexpected(null,6)}return super.parseMaybeDecoratorArguments(t,i)}checkCommaAfterRest(t){return this.state.isAmbientContext&&this.match(8)&&this.lookaheadCharCode()===t?(this.next(),!1):super.checkCommaAfterRest(t)}isClassMethod(){return this.match(43)||super.isClassMethod()}isClassProperty(){return this.match(31)||this.match(10)||super.isClassProperty()}parseMaybeDefault(t,i){let r=super.parseMaybeDefault(t,i);return r.type==="AssignmentPattern"&&r.typeAnnotation&&r.right.start<r.typeAnnotation.start&&this.raise(O.TypeAnnotationAfterAssign,r.typeAnnotation),r}getTokenFromCode(t){if(this.state.inType){if(t===62){this.finishOp(44,1);return}if(t===60){this.finishOp(43,1);return}}super.getTokenFromCode(t)}reScan_lt_gt(){let{type:t}=this.state;t===43?(this.state.pos-=1,this.readToken_lt()):t===44&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){let{type:t}=this.state;return t===47?(this.state.pos-=2,this.finishOp(43,1),43):t}toAssignableListItem(t,i,r){let n=t[i];n.type==="TSTypeCastExpression"&&(t[i]=this.typeCastToParameter(n)),super.toAssignableListItem(t,i,r)}typeCastToParameter(t){return t.expression.typeAnnotation=t.typeAnnotation,this.resetEndLocationFromNode(t.expression,t.typeAnnotation),t.expression}shouldParseArrow(t){return this.match(10)?t.every(i=>this.isAssignable(i,!0)):super.shouldParseArrow(t)}shouldParseAsyncArrow(){return this.match(10)?!this.state.inConditionalConsequent:super.shouldParseAsyncArrow()}parseParenAndDistinguishExpression(t){let i=this.state.inConditionalConsequent;this.state.inConditionalConsequent=!1;let r=super.parseParenAndDistinguishExpression(t);return this.state.inConditionalConsequent=i,r}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(t){if(this.match(43)||this.match(47)){let i=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());i&&(t.typeArguments=i)}return super.jsxParseOpeningElementAfterName(t)}getGetterSetterExpectedParamCount(t){let i=super.getGetterSetterExpectedParamCount(t),n=this.getObjectOrClassMethodParams(t)[0];return n&&this.isThisParam(n)?i+1:i}parseCatchClauseParam(){let t=super.parseCatchClauseParam(),i=this.tsTryParseTypeAnnotation();return i&&(t.typeAnnotation=i,this.resetEndLocation(t)),t}tsInAmbientContext(t){let{isAmbientContext:i,strict:r}=this.state;this.state.isAmbientContext=!0,this.state.strict=!1;try{return t()}finally{this.state.isAmbientContext=i,this.state.strict=r}}parseClass(t,i,r){let n=this.state.inAbstractClass;this.state.inAbstractClass=!!t.abstract;try{return super.parseClass(t,i,r)}finally{this.state.inAbstractClass=n}}tsParseAbstractDeclaration(t,i){if(this.match(76))return t.abstract=!0,this.maybeTakeDecorators(i,this.parseClass(t,!0,!1));if(this.isContextual(126))return this.hasFollowingLineBreak()?null:(t.abstract=!0,this.raise(O.NonClassMethodPropertyHasAbstractModifier,t),this.tsParseInterfaceDeclaration(t));throw this.unexpected(null,76)}parseMethod(t,i,r,n,a,o,c){let l=super.parseMethod(t,i,r,n,a,o,c);if((l.abstract||l.type==="TSAbstractMethodDefinition")&&(this.hasPlugin("estree")?l.value:l).body){let{key:m}=l;this.raise(O.AbstractMethodHasImplementation,l,{methodName:m.type==="Identifier"&&!l.computed?m.name:`[${this.input.slice(this.offsetToSourcePos(m.start),this.offsetToSourcePos(m.end))}]`})}return l}tsParseTypeParameterName(){return this.parseIdentifier()}shouldParseAsAmbientContext(){return!!this.getPluginOption("typescript","dts")}parse(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.parse()}getExpression(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.getExpression()}parseExportSpecifier(t,i,r,n){return!i&&n?(this.parseTypeOnlyExportSpecifier(t,r),this.finishNode(t,"ExportSpecifier")):(t.exportKind="value",super.parseExportSpecifier(t,i,r,n))}parseImportSpecifier(t,i,r,n,a){return!i&&n?(this.parseTypeOnlyImportSpecifier(t,r),this.finishNode(t,"ImportSpecifier")):(t.importKind="value",super.parseImportSpecifier(t,i,r,n,r?4098:4096))}parseTypeOnlyImportSpecifier(t,i){let r=t.imported,n=!1;if(this.isContextual(90)){let a=this.parseIdentifier();if(this.isContextual(90)){let o=this.parseIdentifier();$e(this.state.type)?(n=!0,r=a,t.local=this.parseIdentifier()):t.local=o}else $e(this.state.type)?t.local=this.parseIdentifier():(n=!0,r=a)}else $e(this.state.type)&&(n=!0,r=this.parseIdentifier(!0),this.isContextual(90)||this.checkReservedWord(r.name,r.start,!0,!0));n&&i&&this.raise(O.TypeModifierIsUsedInTypeImports,t.imported),t.imported=r,t.importKind=n?"type":"value",this.checkIdentifier(t.local??=this.eatContextual(90)?this.parseIdentifier():this.cloneIdentifier(t.imported),n?4098:4096)}parseTypeOnlyExportSpecifier(t,i){let r=t.local,n=!1;if(this.isContextual(90)){let a=this.parseIdentifier();if(this.isContextual(90)){let o=this.parseIdentifier();$e(this.state.type)?(n=!0,t.local=a,t.exported=this.parseModuleExportName()):t.exported=o}else $e(this.state.type)?t.exported=this.parseModuleExportName():(n=!0,t.local=a)}else $e(this.state.type)&&(n=!0,t.local=this.parseModuleExportName());n&&i&&this.raise(O.TypeModifierIsUsedInTypeExports,r),t.exportKind=n?"type":"value",t.exported??=this.eatContextual(90)?this.parseModuleExportName():this.cloneIdentifier(t.local)}fillOptionalPropertiesForTSESLint(t){switch(t.type){case"ImportDeclaration":t.phase??=null;return;case"ExpressionStatement":t.directive??=void 0;return;case"RestElement":t.value=void 0;case"Identifier":case"ArrayPattern":case"AssignmentPattern":case"ObjectPattern":t.decorators??=[],t.optional??=!1,t.typeAnnotation??=void 0;return;case"TSParameterProperty":t.accessibility??=void 0,t.decorators??=[],t.override??=!1,t.readonly??=!1,t.static??=!1;return;case"TSEmptyBodyFunctionExpression":t.body=null;case"TSDeclareFunction":case"FunctionDeclaration":case"FunctionExpression":case"ClassMethod":case"ClassPrivateMethod":t.declare??=!1,t.returnType??=void 0,t.typeParameters??=void 0;return;case"Property":t.optional??=!1;return;case"TSMethodSignature":case"TSPropertySignature":t.optional??=!1;case"TSIndexSignature":t.accessibility??=void 0,t.readonly??=!1,t.static??=!1;return;case"TSAbstractPropertyDefinition":case"PropertyDefinition":case"TSAbstractAccessorProperty":case"AccessorProperty":t.declare??=!1,t.definite??=!1,t.readonly??=!1,t.typeAnnotation??=void 0;case"TSAbstractMethodDefinition":case"MethodDefinition":t.accessibility??=void 0,t.decorators??=[],t.override??=!1,t.optional??=!1;return;case"ClassExpression":t.id??=null;case"ClassDeclaration":t.abstract??=!1,t.declare??=!1,t.decorators??=[],t.implements??=[],t.superTypeArguments??=void 0,t.typeParameters??=void 0;return;case"TSTypeAliasDeclaration":case"VariableDeclaration":t.declare??=!1;return;case"VariableDeclarator":t.definite??=!1;return;case"TSEnumDeclaration":t.const??=!1,t.declare??=!1;return;case"TSEnumMember":t.computed??=!1;return;case"TSImportType":t.qualifier??=null,t.options??=null,t.typeArguments??=null;return;case"TSInterfaceDeclaration":t.declare??=!1,t.extends??=[];return;case"TSMappedType":t.optional??=!1,t.readonly??=void 0;return;case"TSModuleDeclaration":t.declare??=!1,t.global??=t.kind==="global";return;case"TSTypeParameter":t.const??=!1,t.in??=!1,t.out??=!1;return}}chStartsBindingIdentifierAndNotRelationalOperator(t,i){if(ot(t)){if(dn.lastIndex=i,dn.test(this.input)){let r=this.codePointAtPos(dn.lastIndex);if(!kt(r)&&r!==92)return!1}return!0}else return t===92}nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine(){let t=this.nextTokenInLineStart(),i=this.codePointAtPos(t);return this.chStartsBindingIdentifierAndNotRelationalOperator(i,t)}nextTokenIsStringLiteralOnSameLine(){let t=this.nextTokenInLineStart(),i=this.codePointAtPos(t);return i===34||i===39}};function FP(s){if(s.type!=="MemberExpression")return!1;let{computed:e,property:t}=s;return e&&t.type!=="StringLiteral"&&(t.type!=="TemplateLiteral"||t.expressions.length>0)?!1:Gl(s.object)}function BP(s,e){let{type:t}=s;if(s.extra?.parenthesized)return!1;if(e){if(t==="Literal"){let{value:i}=s;if(typeof i=="string"||typeof i=="boolean")return!0}}else if(t==="StringLiteral"||t==="BooleanLiteral")return!0;return!!(Yl(s,e)||_P(s,e)||t==="TemplateLiteral"&&s.expressions.length===0||FP(s))}function Yl(s,e){return e?s.type==="Literal"&&(typeof s.value=="number"||"bigint"in s):s.type==="NumericLiteral"||s.type==="BigIntLiteral"}function _P(s,e){if(s.type==="UnaryExpression"){let{operator:t,argument:i}=s;if(t==="-"&&Yl(i,e))return!0}return!1}function Gl(s){return s.type==="Identifier"?!0:s.type!=="MemberExpression"||s.computed?!1:Gl(s.object)}function Dt(s,e=[]){let t=new Map;for(let i of s)t.set(i,!0);for(let i of e)t.set(i,!1);return t}var jP={ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."},Fl=Ze`placeholders`(jP),RP=s=>class extends s{parsePlaceholder(t){if(this.match(130)){let i=this.startNode();return this.next(),this.assertNoSpace(),i.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(130),this.finishPlaceholder(i,t)}}finishPlaceholder(t,i){let r=t;return(!r.expectedNode||!r.type)&&(r=this.finishNode(r,"Placeholder")),r.expectedNode=i,r}getTokenFromCode(t){t===37&&this.input.charCodeAt(this.state.pos+1)===37?this.finishOp(130,2):super.getTokenFromCode(t)}parseExprAtom(t){return this.parsePlaceholder("Expression")||super.parseExprAtom(t)}parseIdentifier(t){return this.parsePlaceholder("Identifier")||super.parseIdentifier(t)}checkReservedWord(t,i,r,n){t!==void 0&&super.checkReservedWord(t,i,r,n)}cloneIdentifier(t){let i=super.cloneIdentifier(t);return i.type==="Placeholder"&&(i.expectedNode=t.expectedNode),i}cloneStringLiteral(t){return t.type==="Placeholder"?this.cloneIdentifier(t):super.cloneStringLiteral(t)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(t,i,r,n){return t==="Placeholder"||super.isValidLVal(t,i,r,n)}toAssignable(t,i){t&&t.type==="Placeholder"&&t.expectedNode==="Expression"?t.expectedNode="Pattern":super.toAssignable(t,i)}chStartsBindingIdentifier(t,i){if(super.chStartsBindingIdentifier(t,i))return!0;let r=this.nextTokenStart();return this.input.charCodeAt(r)===37&&this.input.charCodeAt(r+1)===37}verifyBreakContinue(t,i){t.label?.type!=="Placeholder"&&super.verifyBreakContinue(t,i)}parseExpressionStatement(t,i,r){if(i.type!=="Placeholder"||i.extra?.parenthesized)return super.parseExpressionStatement(t,i,r);if(this.match(10)){let a=t;return a.label=this.finishPlaceholder(i,"Identifier"),this.next(),a.body=r&8?super.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):super.parseStatement(),this.finishNode(a,"LabeledStatement")}this.semicolon();let n=t;return n.name=i.name,this.finishPlaceholder(n,"Statement")}parseBlock(t,i,r){return this.parsePlaceholder("BlockStatement")||super.parseBlock(t,i,r)}parseFunctionId(t){return this.parsePlaceholder("Identifier")||super.parseFunctionId(t)}parseClass(t,i,r){let n=i?"ClassDeclaration":"ClassExpression";this.next();let a=this.state.strict,o=this.parsePlaceholder("Identifier");if(o)if(this.match(77)||this.match(130)||this.match(2))t.id=o;else{if(r||!i)return t.id=null,t.body=this.finishPlaceholder(o,"ClassBody"),this.finishNode(t,n);throw this.raise(Fl.ClassNameIsRequired,this.state.startLoc)}else this.parseClassId(t,i,r);return super.parseClassSuper(t),t.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!t.superClass,a),this.finishNode(t,n)}parseExport(t,i){let r=this.parsePlaceholder("Identifier");if(!r)return super.parseExport(t,i);let n=t;if(!this.isContextual(95)&&!this.match(8))return n.specifiers=[],n.source=null,n.declaration=this.finishPlaceholder(r,"Declaration"),this.finishNode(n,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");let a=this.startNode();return a.exported=r,n.specifiers=[this.finishNode(a,"ExportDefaultSpecifier")],super.parseExport(n,i)}isExportDefaultSpecifier(){if(this.match(61)){let t=this.nextTokenStart();if(this.isUnparsedContextual(t,"from")&&this.input.startsWith(Tt(130),this.hasPlugin("exportDefaultFrom")?this.nextTokenStartSince(t+4):this.nextTokenInLineStartSince(t+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(t,i){return t.specifiers?.length?!0:super.maybeParseExportDefaultSpecifier(t,i)}checkNamedExport(){}parseImport(t){let i=this.parsePlaceholder("Identifier");if(!i)return super.parseImport(t);if(t.specifiers=[],!this.isContextual(95)&&!this.match(8))return t.source=this.finishPlaceholder(i,"StringLiteral"),this.semicolon(),this.finishNode(t,"ImportDeclaration");let r=this.startNodeAtNode(i);return r.local=i,t.specifiers.push(this.finishNode(r,"ImportDefaultSpecifier")),this.eat(8)&&(this.maybeParseStarImportSpecifier(t)||this.parseNamedImportSpecifiers(t)),this.expectContextual(95),t.source=this.parseImportSource(),this.semicolon(),this.finishNode(t,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource()}assertNoSpace(){this.state.start>this.offsetToSourcePos(this.state.lastTokEndLoc.index)&&this.raise(Fl.UnexpectedSpace,this.state.lastTokEndLoc)}},UP=s=>class extends s{parseV8Intrinsic(){if(this.match(50)){let t=this.state.startLoc,i=this.startNode();if(this.next(),de(this.state.type)){let r=this.parseIdentifierName(),n=this.createIdentifier(i,r);if(this.castNodeTo(n,"V8IntrinsicIdentifier"),this.match(6))return n}this.unexpected(t)}}parseExprAtom(t){return this.parseV8Intrinsic()||super.parseExprAtom(t)}},Bl=["fsharp","hack"],_l=["^^","@@","^","%","#"];function VP(s){if(s.has("decorators")&&s.has("decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");if(s.has("flow")&&s.has("typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(s.has("placeholders")&&s.has("v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(s.has("pipelineOperator")){let e=s.get("pipelineOperator").proposal;if(!Bl.includes(e)){let t=Bl.map(i=>`"${i}"`).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${t}.`)}if(e==="hack"){if(s.has("placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(s.has("v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");let t=s.get("pipelineOperator").topicToken;if(!_l.includes(t)){let i=_l.map(r=>`"${r}"`).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${i}.`)}}}if(s.has("moduleAttributes"))throw new Error("`moduleAttributes` has been removed in Babel 8, please migrate to import attributes instead.");if(s.has("importAssertions"))throw new Error("`importAssertions` has been removed in Babel 8, please use import attributes instead.");if(s.has("deprecatedImportAssert")?console.warn("`deprecatedImportAssert` has been removed in Babel 8, please use import attributes instead."):s.has("importAttributes")&&s.get("importAttributes").deprecatedAssertSyntax&&console.warn("The 'importAttributes' plugin has been removed in Babel 8. Please migrate any usage of `assert`-style attributes to `with`."),s.has("recordAndTuple"))throw new Error("The 'recordAndTuple' plugin has been removed in Babel 8. Please remove it from your configuration.");if(s.has("asyncDoExpressions")&&!s.has("doExpressions")){let e=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw e.missingPlugins="doExpressions",e}if(s.has("optionalChainingAssign")&&s.get("optionalChainingAssign").version!=="2023-07")throw new Error("The 'optionalChainingAssign' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is '2023-07'.");if(s.has("discardBinding")&&s.get("discardBinding").syntaxType!=="void")throw new Error("The 'discardBinding' plugin requires a 'syntaxType' option. Currently the only supported value is 'void'.");if(s.has("decimal"))throw new Error("The 'decimal' plugin has been removed in Babel 8. Please remove it from your configuration.");if(s.has("importReflection"))throw new Error("The 'importReflection' plugin has been removed in Babel 8. Use 'sourcePhaseImports' instead, and replace 'import module' with 'import source' in your code.")}var Ql={estree:Bg,jsx:mP,flow:lP,typescript:MP,v8intrinsic:UP,placeholders:RP},KP=Object.keys(Ql),qi=class extends Bn{constructor(e,t,i){let r=Fg(e);super(r,t),this.options=r,this.initializeScopes(),this.plugins=i,this.filename=r.sourceFilename,this.startIndex=r.startIndex;let n=0;r.allowAwaitOutsideFunction&&(n|=1),r.allowReturnOutsideFunction&&(n|=2),r.allowImportExportEverywhere&&(n|=8),r.allowSuperOutsideMethod&&(n|=16),r.allowUndeclaredExports&&(n|=64),r.allowNewTargetOutsideFunction&&(n|=4),r.allowYieldOutsideFunction&&(n|=32),r.ranges&&(n|=128),r.locations===!0&&(n|=256),r.tokens&&(n|=512),r.createImportExpressions&&(n|=1024),r.createParenthesizedExpressions&&(n|=2048),r.errorRecovery&&(n|=4096),r.attachComment&&(n|=8192),r.annexB&&(n|=16384),this.optionFlags=n}getScopeHandler(){return js}parse(){this.enterInitialScopes();let e=this.startNode(),t=this.startNode();this.nextToken(),e.errors=[];let i=this.parseTopLevel(e,t);return i.errors=this.state.errors,i.comments.length=this.state.commentsLen,i}};function Zl(s,e){if(e?.sourceType==="unambiguous"){e={...e};try{e.sourceType="module";let t=Bi(e,s),i=t.parse();if(t.sawUnambiguousESM)return i;if(t.ambiguousScriptDifferentAst)try{return e.sourceType="script",Bi(e,s).parse()}catch{}else i.program.sourceType="script";return i}catch(t){try{return e.sourceType="script",Bi(e,s).parse()}catch{}throw t}}else return Bi(e,s).parse()}function qP(s){let e={};for(let t of Object.keys(s))e[t]=Ul(s[t]);return e}var Uz=qP(jg);function Bi(s,e){let t=qi,i=new Map;if(s?.plugins){for(let r of s.plugins){let n,a;typeof r=="string"?n=r:[n,a]=r,i.has(n)||i.set(n,a||{})}VP(i),t=$P(i)}return new t(s,e,i)}var jl=new Map;function $P(s){let e=[];for(let r of KP)s.has(r)&&e.push(r);let t=e.join("|"),i=jl.get(t);if(!i){i=qi;for(let r of e)i=Ql[r](i);jl.set(t,i)}return i}function XP(s){return s instanceof Error?s.stack||s.message:s}function tu(s,e){let t=0;for(let i=0;i<e.length;i++)t=(t<<5)-t+e.charCodeAt(i),t|=0;return s[Math.abs(t)%s.length]}function eu(s,e){let t=0,i=0,r=-1,n=0;for(;t<s.length;)if(i<e.length&&(e[i]===s[t]||e[i]==="*"))e[i]==="*"?(r=i,n=t,i++):(t++,i++);else if(r!==-1)i=r+1,n++,t=n;else return!1;for(;i<e.length&&e[i]==="*";)i++;return i===e.length}function su(s){return s>=1e3?`${(s/1e3).toFixed(1)}s`:`${s}ms`}var Ji="";function zn(s,e){let t,i,r,n,a=((...o)=>{if(!a.enabled)return;let c=Date.now(),l=c-(t||c);t=c,o[0]=XP(o[0]),typeof o[0]!="string"&&o.unshift("%O");let u=0;o[0]=o[0].replace(/%([a-z%])/gi,(f,m)=>{if(f==="%%")return"%";u++;let x=e.formatters[m];if(typeof x=="function"){let I=o[u];f=x.call(a,I),o.splice(u,1),u--}return f}),e.formatArgs.call(a,l,o),a.log(...o)});return a.extend=function(o,c=":"){return zn(this.namespace+c+o,{useColors:this.useColors,color:this.color,formatArgs:this.formatArgs,formatters:this.formatters,inspectOpts:this.inspectOpts,log:this.log,humanize:this.humanize})},Object.assign(a,e),a.namespace=s,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>i??(r!==Ji&&(r=Ji,n=Hn(s)),n),set:o=>{i=o}}),a}var Xn=[],Wn=[];function iu(s){Ji=s,Xn=[],Wn=[];let e=Ji.trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let t of e)t[0]==="-"?Wn.push(t.slice(1)):Xn.push(t)}function Hn(s){for(let e of Wn)if(eu(s,e))return!1;for(let e of Xn)if(eu(s,e))return!0;return!1}function HP(s,e){e[0]=`${this.namespace} ${e[0]} +${this.humanize(s)}`}var YP={useColors:!1,color:"",formatArgs:HP,formatters:{j(s){try{return JSON.stringify(s)}catch(e){return`[UnexpectedJSONParseError]: ${e.message}`}}},inspectOpts:{},humanize:su,log:console.debug||console.log||(()=>{})};function ru(s,e){return zn(s,Object.assign({},YP,e))}function GP(){let s;try{s=localStorage.getItem("debug")||localStorage.getItem("DEBUG")}catch{}return!s&&typeof process<"u"&&"env"in process&&(s=process.env.DEBUG),s||""}iu(GP());var QP=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function ZP(s,e){let{useColors:t}=this;if(e[0]=`${(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")}+${this.humanize(s)}`,!t)return;let i=`color: ${this.color}`;e.splice(1,0,i,"color: inherit");let r=0,n=0;e[0].replace(/%[a-z%]/gi,a=>{a!=="%%"&&(r++,a==="%c"&&(n=r))}),e.splice(n,0,i)}function nu(s,e){var t;let i=(t=e&&e.color)!==null&&t!==void 0?t:tu(QP,s);return ru(s,Object.assign({useColors:!0,color:i,formatArgs:ZP},e))}var ne={};xl(ne,{ACCESSOR_TYPES:()=>yF,ALIAS_KEYS:()=>zs,ASSIGNMENT_OPERATORS:()=>ia,AnyTypeAnnotation:()=>B1,ArgumentPlaceholder:()=>pv,ArrayExpression:()=>sw,ArrayPattern:()=>e1,ArrayTypeAnnotation:()=>_1,ArrowFunctionExpression:()=>t1,AssignmentExpression:()=>iw,AssignmentPattern:()=>Zw,AwaitExpression:()=>E1,BINARY_OPERATORS:()=>sa,BINARY_TYPES:()=>N2,BLOCKPARENT_TYPES:()=>k2,BLOCK_TYPES:()=>D2,BOOLEAN_BINARY_OPERATORS:()=>sp,BOOLEAN_NUMBER_BINARY_OPERATORS:()=>Zu,BOOLEAN_UNARY_OPERATORS:()=>ip,BUILDER_KEYS:()=>Ia,BigIntLiteral:()=>I1,BigIntLiteralTypeAnnotation:()=>hN,BinaryExpression:()=>rw,BindExpression:()=>hv,BlockStatement:()=>cw,BooleanLiteral:()=>vw,BooleanLiteralTypeAnnotation:()=>R1,BooleanTypeAnnotation:()=>j1,BreakStatement:()=>lw,CLASS_TYPES:()=>iF,COMMENT_KEYS:()=>Ea,COMPARISON_BINARY_OPERATORS:()=>tp,COMPLETIONSTATEMENT_TYPES:()=>M2,CONDITIONAL_TYPES:()=>F2,CallExpression:()=>uw,CatchClause:()=>pw,ClassAccessorProperty:()=>fv,ClassBody:()=>s1,ClassDeclaration:()=>r1,ClassExpression:()=>i1,ClassImplements:()=>V1,ClassMethod:()=>m1,ClassPrivateMethod:()=>L1,ClassPrivateProperty:()=>D1,ClassProperty:()=>k1,ConditionalExpression:()=>hw,ContinueStatement:()=>fw,DECLARATION_TYPES:()=>$2,DEPRECATED_ALIASES:()=>aa,DEPRECATED_KEYS:()=>tr,DebuggerStatement:()=>dw,DeclareClass:()=>K1,DeclareExportAllDeclaration:()=>G1,DeclareExportDeclaration:()=>Y1,DeclareFunction:()=>q1,DeclareInterface:()=>$1,DeclareModule:()=>J1,DeclareModuleExports:()=>X1,DeclareOpaqueType:()=>z1,DeclareTypeAlias:()=>W1,DeclareVariable:()=>H1,DeclaredPredicate:()=>Q1,Decorator:()=>dv,Directive:()=>aw,DirectiveLiteral:()=>ow,DoExpression:()=>mv,DoWhileStatement:()=>mw,ENUMBODY_TYPES:()=>hF,ENUMMEMBER_TYPES:()=>fF,EQUALITY_BINARY_OPERATORS:()=>ep,EXPORTDECLARATION_TYPES:()=>rF,EXPRESSIONWRAPPER_TYPES:()=>j2,EXPRESSION_TYPES:()=>w2,EmptyStatement:()=>yw,EmptyTypeAnnotation:()=>lN,EnumBooleanBody:()=>jN,EnumBooleanMember:()=>KN,EnumDeclaration:()=>_N,EnumDefaultedMember:()=>JN,EnumNumberBody:()=>RN,EnumNumberMember:()=>qN,EnumStringBody:()=>UN,EnumStringMember:()=>$N,EnumSymbolBody:()=>VN,ExistsTypeAnnotation:()=>Z1,ExportAllDeclaration:()=>n1,ExportDefaultDeclaration:()=>a1,ExportDefaultSpecifier:()=>yv,ExportNamedDeclaration:()=>o1,ExportNamespaceSpecifier:()=>w1,ExportSpecifier:()=>c1,ExpressionStatement:()=>Tw,FLATTENABLE_KEYS:()=>WI,FLIPPED_ALIAS_KEYS:()=>$,FLOWBASEANNOTATION_TYPES:()=>lF,FLOWDECLARATION_TYPES:()=>uF,FLOWPREDICATE_TYPES:()=>pF,FLOWTYPE_TYPES:()=>cF,FLOW_TYPES:()=>oF,FORXSTATEMENT_TYPES:()=>U2,FOR_INIT_KEYS:()=>zI,FOR_TYPES:()=>R2,FUNCTIONPARAMETER_TYPES:()=>J2,FUNCTIONPARENT_TYPES:()=>K2,FUNCTION_TYPES:()=>V2,File:()=>Sw,ForInStatement:()=>xw,ForOfStatement:()=>l1,ForStatement:()=>gw,FunctionDeclaration:()=>Pw,FunctionExpression:()=>bw,FunctionTypeAnnotation:()=>eN,FunctionTypeParam:()=>tN,GenericTypeAnnotation:()=>sN,IMMUTABLE_TYPES:()=>Y2,IMPORTOREXPORTDECLARATION_TYPES:()=>Rm,INHERIT_KEYS:()=>ra,Identifier:()=>Ew,IfStatement:()=>Aw,Import:()=>C1,ImportAttribute:()=>F1,ImportDeclaration:()=>u1,ImportDefaultSpecifier:()=>p1,ImportExpression:()=>A1,ImportNamespaceSpecifier:()=>h1,ImportSpecifier:()=>f1,IndexedAccessType:()=>XN,InferredPredicate:()=>iN,InterfaceDeclaration:()=>nN,InterfaceExtends:()=>rN,InterfaceTypeAnnotation:()=>aN,InterpreterDirective:()=>nw,IntersectionTypeAnnotation:()=>oN,JSXAttribute:()=>zN,JSXClosingElement:()=>HN,JSXClosingFragment:()=>cv,JSXElement:()=>YN,JSXEmptyExpression:()=>GN,JSXExpressionContainer:()=>QN,JSXFragment:()=>av,JSXIdentifier:()=>ev,JSXMemberExpression:()=>tv,JSXNamespacedName:()=>sv,JSXOpeningElement:()=>iv,JSXOpeningFragment:()=>ov,JSXSpreadAttribute:()=>rv,JSXSpreadChild:()=>ZN,JSXText:()=>nv,JSX_TYPES:()=>dF,LITERAL_TYPES:()=>H2,LOGICAL_OPERATORS:()=>Aa,LOOP_TYPES:()=>B2,LVAL_TYPES:()=>W2,LabeledStatement:()=>Cw,LogicalExpression:()=>Dw,METHOD_TYPES:()=>Q2,MISCELLANEOUS_TYPES:()=>mF,MODULEDECLARATION_TYPES:()=>PF,MODULESPECIFIER_TYPES:()=>nF,MemberExpression:()=>Lw,MetaProperty:()=>d1,MixedTypeAnnotation:()=>cN,ModuleExpression:()=>Tv,NODE_FIELDS:()=>Ft,NODE_PARENT_VALIDATIONS:()=>Hs,NODE_UNION_SHAPES__PRIVATE:()=>wa,NUMBER_BINARY_OPERATORS:()=>Ca,NUMBER_UNARY_OPERATORS:()=>rp,NewExpression:()=>Ow,NullLiteral:()=>Nw,NullLiteralTypeAnnotation:()=>U1,NullableTypeAnnotation:()=>uN,NumberLiteralTypeAnnotation:()=>pN,NumberTypeAnnotation:()=>fN,NumericLiteral:()=>ww,OBJECTMEMBER_TYPES:()=>Z2,ObjectExpression:()=>Fw,ObjectMethod:()=>Bw,ObjectPattern:()=>y1,ObjectProperty:()=>_w,ObjectTypeAnnotation:()=>dN,ObjectTypeCallProperty:()=>yN,ObjectTypeIndexer:()=>TN,ObjectTypeInternalSlot:()=>mN,ObjectTypeProperty:()=>SN,ObjectTypeSpreadProperty:()=>xN,OpaqueType:()=>gN,OptionalCallExpression:()=>v1,OptionalIndexedAccessType:()=>WN,OptionalMemberExpression:()=>N1,PATTERNLIKE_TYPES:()=>X2,PATTERN_TYPES:()=>sF,PLACEHOLDERS:()=>Ma,PLACEHOLDERS_ALIAS:()=>$s,PLACEHOLDERS_FLIPPED_ALIAS:()=>Hi,PRIVATE_TYPES:()=>aF,PROPERTY_TYPES:()=>eF,PUREISH_TYPES:()=>q2,ParenthesizedExpression:()=>Vw,Placeholder:()=>lv,PrivateName:()=>O1,Program:()=>Mw,QualifiedTypeIdentifier:()=>PN,RegExpLiteral:()=>kw,RestElement:()=>jw,ReturnStatement:()=>Rw,SCOPABLE_TYPES:()=>v2,STANDARDIZED_TYPES:()=>I2,STATEMENT_OR_BLOCK_KEYS:()=>XI,STATEMENT_TYPES:()=>L2,STRING_UNARY_OPERATORS:()=>np,SequenceExpression:()=>Uw,SpreadElement:()=>T1,StaticBlock:()=>M1,StringLiteral:()=>Iw,StringLiteralTypeAnnotation:()=>bN,StringTypeAnnotation:()=>EN,Super:()=>S1,SwitchCase:()=>Kw,SwitchStatement:()=>qw,SymbolTypeAnnotation:()=>AN,TERMINATORLESS_TYPES:()=>O2,TSAnyKeyword:()=>vv,TSArrayType:()=>Hv,TSAsExpression:()=>y0,TSBASETYPE_TYPES:()=>gF,TSBigIntKeyword:()=>Dv,TSBooleanKeyword:()=>kv,TSCallSignatureDeclaration:()=>Av,TSClassImplements:()=>u0,TSConditionalType:()=>s0,TSConstructSignatureDeclaration:()=>Cv,TSConstructorType:()=>$v,TSDeclareFunction:()=>Pv,TSDeclareMethod:()=>bv,TSENTITYNAME_TYPES:()=>z2,TSEnumBody:()=>x0,TSEnumDeclaration:()=>g0,TSEnumMember:()=>P0,TSExportAssignment:()=>N0,TSExternalModuleReference:()=>I0,TSFunctionType:()=>qv,TSImportEqualsDeclaration:()=>C0,TSImportType:()=>A0,TSIndexSignature:()=>Nv,TSIndexedAccessType:()=>a0,TSInferType:()=>i0,TSInstantiationExpression:()=>m0,TSInterfaceBody:()=>f0,TSInterfaceDeclaration:()=>h0,TSInterfaceHeritage:()=>p0,TSIntersectionType:()=>t0,TSIntrinsicKeyword:()=>Lv,TSLiteralType:()=>l0,TSMappedType:()=>o0,TSMethodSignature:()=>wv,TSModuleBlock:()=>E0,TSModuleDeclaration:()=>b0,TSNamedTupleMember:()=>Zv,TSNamespaceExportDeclaration:()=>v0,TSNeverKeyword:()=>Ov,TSNonNullExpression:()=>w0,TSNullKeyword:()=>Mv,TSNumberKeyword:()=>Fv,TSObjectKeyword:()=>Bv,TSOptionalType:()=>Gv,TSParameterProperty:()=>gv,TSParenthesizedType:()=>r0,TSPropertySignature:()=>Iv,TSQualifiedName:()=>Ev,TSRestType:()=>Qv,TSSatisfiesExpression:()=>T0,TSStringKeyword:()=>_v,TSSymbolKeyword:()=>jv,TSTYPEELEMENT_TYPES:()=>SF,TSTYPE_TYPES:()=>xF,TSTemplateLiteralType:()=>c0,TSThisType:()=>Kv,TSTupleType:()=>Yv,TSTypeAliasDeclaration:()=>d0,TSTypeAnnotation:()=>k0,TSTypeAssertion:()=>S0,TSTypeLiteral:()=>zv,TSTypeOperator:()=>n0,TSTypeParameter:()=>O0,TSTypeParameterDeclaration:()=>L0,TSTypeParameterInstantiation:()=>D0,TSTypePredicate:()=>Xv,TSTypeQuery:()=>Wv,TSTypeReference:()=>Jv,TSUndefinedKeyword:()=>Rv,TSUnionType:()=>e0,TSUnknownKeyword:()=>Uv,TSVoidKeyword:()=>Vv,TYPES:()=>Qs,TYPESCRIPT_TYPES:()=>TF,TaggedTemplateExpression:()=>x1,TemplateElement:()=>g1,TemplateLiteral:()=>P1,ThisExpression:()=>$w,ThisTypeAnnotation:()=>CN,ThrowStatement:()=>Jw,TopicReference:()=>Sv,TryStatement:()=>Xw,TupleTypeAnnotation:()=>IN,TypeAlias:()=>NN,TypeAnnotation:()=>vN,TypeCastExpression:()=>kN,TypeParameter:()=>DN,TypeParameterDeclaration:()=>LN,TypeParameterInstantiation:()=>ON,TypeofTypeAnnotation:()=>wN,UNARYLIKE_TYPES:()=>tF,UNARY_OPERATORS:()=>ap,UPDATE_OPERATORS:()=>Qu,USERWHITESPACABLE_TYPES:()=>G2,UnaryExpression:()=>Ww,UnionTypeAnnotation:()=>MN,UpdateExpression:()=>zw,V8IntrinsicIdentifier:()=>uv,VISITOR_KEYS:()=>xt,VariableDeclaration:()=>Hw,VariableDeclarator:()=>Yw,Variance:()=>FN,VoidPattern:()=>xv,VoidTypeAnnotation:()=>BN,WHILE_TYPES:()=>_2,WhileStatement:()=>Gw,WithStatement:()=>Qw,YieldExpression:()=>b1,__internal__deprecationWarning:()=>Be,addComment:()=>A2,addComments:()=>Mm,anyTypeAnnotation:()=>Xa,appendToMemberExpression:()=>DF,argumentPlaceholder:()=>id,arrayExpression:()=>Ba,arrayPattern:()=>eh,arrayTypeAnnotation:()=>Mh,arrowFunctionExpression:()=>th,assertAccessor:()=>a2,assertAnyTypeAnnotation:()=>TD,assertArgumentPlaceholder:()=>XL,assertArrayExpression:()=>_0,assertArrayPattern:()=>Fk,assertArrayTypeAnnotation:()=>SD,assertArrowFunctionExpression:()=>Bk,assertAssignmentExpression:()=>j0,assertAssignmentPattern:()=>Mk,assertAwaitExpression:()=>rD,assertBigIntLiteral:()=>oD,assertBigIntLiteralTypeAnnotation:()=>WD,assertBinary:()=>TM,assertBinaryExpression:()=>R0,assertBindExpression:()=>WL,assertBlock:()=>gM,assertBlockParent:()=>xM,assertBlockStatement:()=>q0,assertBooleanLiteral:()=>uk,assertBooleanLiteralTypeAnnotation:()=>gD,assertBooleanTypeAnnotation:()=>xD,assertBreakStatement:()=>$0,assertCallExpression:()=>J0,assertCatchClause:()=>X0,assertClass:()=>XM,assertClassAccessorProperty:()=>zL,assertClassBody:()=>_k,assertClassDeclaration:()=>Rk,assertClassExpression:()=>jk,assertClassImplements:()=>bD,assertClassMethod:()=>Yk,assertClassPrivateMethod:()=>fD,assertClassPrivateProperty:()=>hD,assertClassProperty:()=>pD,assertCompletionStatement:()=>EM,assertConditional:()=>AM,assertConditionalExpression:()=>W0,assertContinueStatement:()=>z0,assertDebuggerStatement:()=>H0,assertDeclaration:()=>OM,assertDeclareClass:()=>ED,assertDeclareExportAllDeclaration:()=>LD,assertDeclareExportDeclaration:()=>DD,assertDeclareFunction:()=>AD,assertDeclareInterface:()=>CD,assertDeclareModule:()=>ID,assertDeclareModuleExports:()=>wD,assertDeclareOpaqueType:()=>vD,assertDeclareTypeAlias:()=>ND,assertDeclareVariable:()=>kD,assertDeclaredPredicate:()=>OD,assertDecorator:()=>HL,assertDirective:()=>V0,assertDirectiveLiteral:()=>K0,assertDoExpression:()=>YL,assertDoWhileStatement:()=>Y0,assertEmptyStatement:()=>G0,assertEmptyTypeAnnotation:()=>$D,assertEnumBody:()=>s2,assertEnumBooleanBody:()=>xL,assertEnumBooleanMember:()=>EL,assertEnumDeclaration:()=>SL,assertEnumDefaultedMember:()=>IL,assertEnumMember:()=>i2,assertEnumNumberBody:()=>gL,assertEnumNumberMember:()=>AL,assertEnumStringBody:()=>PL,assertEnumStringMember:()=>CL,assertEnumSymbolBody:()=>bL,assertExistsTypeAnnotation:()=>MD,assertExportAllDeclaration:()=>Uk,assertExportDeclaration:()=>zM,assertExportDefaultDeclaration:()=>Vk,assertExportDefaultSpecifier:()=>GL,assertExportNamedDeclaration:()=>Kk,assertExportNamespaceSpecifier:()=>cD,assertExportSpecifier:()=>qk,assertExpression:()=>yM,assertExpressionStatement:()=>Q0,assertExpressionWrapper:()=>wM,assertFile:()=>Z0,assertFlow:()=>GM,assertFlowBaseAnnotation:()=>ZM,assertFlowDeclaration:()=>e2,assertFlowPredicate:()=>t2,assertFlowType:()=>QM,assertFor:()=>NM,assertForInStatement:()=>ek,assertForOfStatement:()=>$k,assertForStatement:()=>tk,assertForXStatement:()=>vM,assertFunction:()=>kM,assertFunctionDeclaration:()=>sk,assertFunctionExpression:()=>ik,assertFunctionParameter:()=>MM,assertFunctionParent:()=>DM,assertFunctionTypeAnnotation:()=>FD,assertFunctionTypeParam:()=>BD,assertGenericTypeAnnotation:()=>_D,assertIdentifier:()=>rk,assertIfStatement:()=>nk,assertImmutable:()=>RM,assertImport:()=>aD,assertImportAttribute:()=>yD,assertImportDeclaration:()=>Jk,assertImportDefaultSpecifier:()=>Xk,assertImportExpression:()=>nD,assertImportNamespaceSpecifier:()=>Wk,assertImportOrExportDeclaration:()=>WM,assertImportSpecifier:()=>zk,assertIndexedAccessType:()=>wL,assertInferredPredicate:()=>jD,assertInterfaceDeclaration:()=>UD,assertInterfaceExtends:()=>RD,assertInterfaceTypeAnnotation:()=>VD,assertInterpreterDirective:()=>U0,assertIntersectionTypeAnnotation:()=>KD,assertJSX:()=>r2,assertJSXAttribute:()=>vL,assertJSXClosingElement:()=>kL,assertJSXClosingFragment:()=>qL,assertJSXElement:()=>DL,assertJSXEmptyExpression:()=>LL,assertJSXExpressionContainer:()=>OL,assertJSXFragment:()=>VL,assertJSXIdentifier:()=>FL,assertJSXMemberExpression:()=>BL,assertJSXNamespacedName:()=>_L,assertJSXOpeningElement:()=>jL,assertJSXOpeningFragment:()=>KL,assertJSXSpreadAttribute:()=>RL,assertJSXSpreadChild:()=>ML,assertJSXText:()=>UL,assertLVal:()=>BM,assertLabeledStatement:()=>ak,assertLiteral:()=>jM,assertLogicalExpression:()=>hk,assertLoop:()=>CM,assertMemberExpression:()=>fk,assertMetaProperty:()=>Hk,assertMethod:()=>VM,assertMiscellaneous:()=>n2,assertMixedTypeAnnotation:()=>qD,assertModuleDeclaration:()=>m2,assertModuleExpression:()=>QL,assertModuleSpecifier:()=>HM,assertNewExpression:()=>dk,assertNode:()=>B0,assertNullLiteral:()=>lk,assertNullLiteralTypeAnnotation:()=>PD,assertNullableTypeAnnotation:()=>JD,assertNumberLiteral:()=>p2,assertNumberLiteralTypeAnnotation:()=>XD,assertNumberTypeAnnotation:()=>zD,assertNumericLiteral:()=>ck,assertObjectExpression:()=>yk,assertObjectMember:()=>KM,assertObjectMethod:()=>Tk,assertObjectPattern:()=>Gk,assertObjectProperty:()=>Sk,assertObjectTypeAnnotation:()=>HD,assertObjectTypeCallProperty:()=>GD,assertObjectTypeIndexer:()=>QD,assertObjectTypeInternalSlot:()=>YD,assertObjectTypeProperty:()=>ZD,assertObjectTypeSpreadProperty:()=>eL,assertOpaqueType:()=>tL,assertOptionalCallExpression:()=>uD,assertOptionalIndexedAccessType:()=>NL,assertOptionalMemberExpression:()=>lD,assertParenthesizedExpression:()=>bk,assertPattern:()=>JM,assertPatternLike:()=>FM,assertPlaceholder:()=>$L,assertPrivate:()=>YM,assertPrivateName:()=>dD,assertProgram:()=>mk,assertProperty:()=>qM,assertPureish:()=>LM,assertQualifiedTypeIdentifier:()=>sL,assertRegExpLiteral:()=>pk,assertRegexLiteral:()=>h2,assertRestElement:()=>xk,assertRestProperty:()=>f2,assertReturnStatement:()=>gk,assertScopable:()=>SM,assertSequenceExpression:()=>Pk,assertSpreadElement:()=>Qk,assertSpreadProperty:()=>d2,assertStandardized:()=>mM,assertStatement:()=>PM,assertStaticBlock:()=>mD,assertStringLiteral:()=>ok,assertStringLiteralTypeAnnotation:()=>iL,assertStringTypeAnnotation:()=>rL,assertSuper:()=>Zk,assertSwitchCase:()=>Ek,assertSwitchStatement:()=>Ak,assertSymbolTypeAnnotation:()=>nL,assertTSAnyKeyword:()=>uO,assertTSArrayType:()=>kO,assertTSAsExpression:()=>GO,assertTSBaseType:()=>u2,assertTSBigIntKeyword:()=>hO,assertTSBooleanKeyword:()=>pO,assertTSCallSignatureDeclaration:()=>nO,assertTSClassImplements:()=>JO,assertTSConditionalType:()=>_O,assertTSConstructSignatureDeclaration:()=>aO,assertTSConstructorType:()=>CO,assertTSDeclareFunction:()=>sO,assertTSDeclareMethod:()=>iO,assertTSEntityName:()=>_M,assertTSEnumBody:()=>eM,assertTSEnumDeclaration:()=>tM,assertTSEnumMember:()=>sM,assertTSExportAssignment:()=>lM,assertTSExternalModuleReference:()=>oM,assertTSFunctionType:()=>AO,assertTSImportEqualsDeclaration:()=>aM,assertTSImportType:()=>nM,assertTSIndexSignature:()=>lO,assertTSIndexedAccessType:()=>VO,assertTSInferType:()=>jO,assertTSInstantiationExpression:()=>YO,assertTSInterfaceBody:()=>zO,assertTSInterfaceDeclaration:()=>WO,assertTSInterfaceHeritage:()=>XO,assertTSIntersectionType:()=>BO,assertTSIntrinsicKeyword:()=>fO,assertTSLiteralType:()=>$O,assertTSMappedType:()=>KO,assertTSMethodSignature:()=>cO,assertTSModuleBlock:()=>rM,assertTSModuleDeclaration:()=>iM,assertTSNamedTupleMember:()=>MO,assertTSNamespaceExportDeclaration:()=>uM,assertTSNeverKeyword:()=>dO,assertTSNonNullExpression:()=>cM,assertTSNullKeyword:()=>mO,assertTSNumberKeyword:()=>yO,assertTSObjectKeyword:()=>TO,assertTSOptionalType:()=>LO,assertTSParameterProperty:()=>tO,assertTSParenthesizedType:()=>RO,assertTSPropertySignature:()=>oO,assertTSQualifiedName:()=>rO,assertTSRestType:()=>OO,assertTSSatisfiesExpression:()=>QO,assertTSStringKeyword:()=>SO,assertTSSymbolKeyword:()=>xO,assertTSTemplateLiteralType:()=>qO,assertTSThisType:()=>EO,assertTSTupleType:()=>DO,assertTSType:()=>l2,assertTSTypeAliasDeclaration:()=>HO,assertTSTypeAnnotation:()=>pM,assertTSTypeAssertion:()=>ZO,assertTSTypeElement:()=>c2,assertTSTypeLiteral:()=>vO,assertTSTypeOperator:()=>UO,assertTSTypeParameter:()=>dM,assertTSTypeParameterDeclaration:()=>fM,assertTSTypeParameterInstantiation:()=>hM,assertTSTypePredicate:()=>wO,assertTSTypeQuery:()=>NO,assertTSTypeReference:()=>IO,assertTSUndefinedKeyword:()=>gO,assertTSUnionType:()=>FO,assertTSUnknownKeyword:()=>PO,assertTSVoidKeyword:()=>bO,assertTaggedTemplateExpression:()=>eD,assertTemplateElement:()=>tD,assertTemplateLiteral:()=>sD,assertTerminatorless:()=>bM,assertThisExpression:()=>Ck,assertThisTypeAnnotation:()=>aL,assertThrowStatement:()=>Ik,assertTopicReference:()=>ZL,assertTryStatement:()=>wk,assertTupleTypeAnnotation:()=>oL,assertTypeAlias:()=>lL,assertTypeAnnotation:()=>uL,assertTypeCastExpression:()=>pL,assertTypeParameter:()=>hL,assertTypeParameterDeclaration:()=>fL,assertTypeParameterInstantiation:()=>dL,assertTypeScript:()=>o2,assertTypeofTypeAnnotation:()=>cL,assertUnaryExpression:()=>Nk,assertUnaryLike:()=>$M,assertUnionTypeAnnotation:()=>mL,assertUpdateExpression:()=>vk,assertUserWhitespacable:()=>UM,assertV8IntrinsicIdentifier:()=>JL,assertVariableDeclaration:()=>kk,assertVariableDeclarator:()=>Dk,assertVariance:()=>yL,assertVoidPattern:()=>eO,assertVoidTypeAnnotation:()=>TL,assertWhile:()=>IM,assertWhileStatement:()=>Lk,assertWithStatement:()=>Ok,assertYieldExpression:()=>iD,assignmentExpression:()=>Sp,assignmentPattern:()=>Zp,awaitExpression:()=>bh,bigIntLiteral:()=>Gi,bigIntLiteralTypeAnnotation:()=>cf,binaryExpression:()=>_a,bindExpression:()=>rd,blockStatement:()=>ja,booleanLiteral:()=>Ua,booleanLiteralTypeAnnotation:()=>Fh,booleanTypeAnnotation:()=>Wa,breakStatement:()=>bp,buildMatchMemberExpression:()=>Yu,buildUndefinedNode:()=>x2,callExpression:()=>Ep,catchClause:()=>Ap,classAccessorProperty:()=>nd,classBody:()=>sh,classDeclaration:()=>rh,classExpression:()=>ih,classImplements:()=>_h,classMethod:()=>mh,classPrivateMethod:()=>kh,classPrivateProperty:()=>vh,classProperty:()=>Nh,clone:()=>g2,cloneDeep:()=>P2,cloneDeepWithoutLoc:()=>b2,cloneNode:()=>us,cloneWithoutLoc:()=>E2,conditionalExpression:()=>Cp,continueStatement:()=>Ip,createFlowUnionType:()=>T2,createTSUnionType:()=>S2,createTypeAnnotationBasedOnTypeof:()=>y2,createUnionTypeAnnotation:()=>T2,debuggerStatement:()=>wp,declareClass:()=>jh,declareExportAllDeclaration:()=>Wh,declareExportDeclaration:()=>Xh,declareFunction:()=>Rh,declareInterface:()=>Uh,declareModule:()=>Vh,declareModuleExports:()=>Kh,declareOpaqueType:()=>$h,declareTypeAlias:()=>qh,declareVariable:()=>Jh,declaredPredicate:()=>zh,decorator:()=>ad,directive:()=>gp,directiveLiteral:()=>Pp,doExpression:()=>od,doWhileStatement:()=>Np,emptyStatement:()=>vp,emptyTypeAnnotation:()=>nf,ensureBlock:()=>bF,enumBooleanBody:()=>kf,enumBooleanMember:()=>Mf,enumDeclaration:()=>vf,enumDefaultedMember:()=>_f,enumNumberBody:()=>Df,enumNumberMember:()=>Ff,enumStringBody:()=>Lf,enumStringMember:()=>Bf,enumSymbolBody:()=>Of,existsTypeAnnotation:()=>Hh,exportAllDeclaration:()=>nh,exportDefaultDeclaration:()=>ah,exportDefaultSpecifier:()=>cd,exportNamedDeclaration:()=>oh,exportNamespaceSpecifier:()=>Ch,exportSpecifier:()=>ch,expressionStatement:()=>nr,file:()=>kp,forInStatement:()=>Dp,forOfStatement:()=>lh,forStatement:()=>Lp,functionDeclaration:()=>Op,functionExpression:()=>Mp,functionTypeAnnotation:()=>Yh,functionTypeParam:()=>Gh,genericTypeAnnotation:()=>qs,getAssignmentIdentifiers:()=>OF,getBindingIdentifiers:()=>_t,getFunctionName:()=>_F,getOuterBindingIdentifiers:()=>FF,identifier:()=>Ot,ifStatement:()=>Fp,import:()=>Ah,importAttribute:()=>Oh,importDeclaration:()=>uh,importDefaultSpecifier:()=>ph,importExpression:()=>Eh,importNamespaceSpecifier:()=>hh,importSpecifier:()=>fh,indexedAccessType:()=>jf,inferredPredicate:()=>Qh,inheritInnerComments:()=>Fm,inheritLeadingComments:()=>Bm,inheritTrailingComments:()=>_m,inherits:()=>Wm,inheritsComments:()=>jm,interfaceDeclaration:()=>ef,interfaceExtends:()=>Zh,interfaceTypeAnnotation:()=>tf,interpreterDirective:()=>xp,intersectionTypeAnnotation:()=>sf,is:()=>Ce,isAccessor:()=>FI,isAnyTypeAnnotation:()=>Ou,isArgumentPlaceholder:()=>UA,isArrayExpression:()=>hb,isArrayPattern:()=>$b,isArrayTypeAnnotation:()=>TE,isArrowFunctionExpression:()=>Jb,isAssignmentExpression:()=>Qi,isAssignmentPattern:()=>qb,isAwaitExpression:()=>nE,isBigIntLiteral:()=>cE,isBigIntLiteralTypeAnnotation:()=>JE,isBinary:()=>nI,isBinaryExpression:()=>fb,isBindExpression:()=>VA,isBinding:()=>RF,isBlock:()=>oI,isBlockParent:()=>aI,isBlockScoped:()=>UF,isBlockStatement:()=>ua,isBooleanLiteral:()=>Nb,isBooleanLiteralTypeAnnotation:()=>xE,isBooleanTypeAnnotation:()=>SE,isBreakStatement:()=>Tb,isCallExpression:()=>Sb,isCatchClause:()=>ea,isClass:()=>ga,isClassAccessorProperty:()=>KA,isClassBody:()=>Xb,isClassDeclaration:()=>wu,isClassExpression:()=>Iu,isClassImplements:()=>PE,isClassMethod:()=>Du,isClassPrivateMethod:()=>dE,isClassPrivateProperty:()=>fE,isClassProperty:()=>hE,isCompletionStatement:()=>lI,isConditional:()=>uI,isConditionalExpression:()=>xb,isContinueStatement:()=>gb,isDebuggerStatement:()=>Pb,isDeclaration:()=>er,isDeclareClass:()=>bE,isDeclareExportAllDeclaration:()=>DE,isDeclareExportDeclaration:()=>kE,isDeclareFunction:()=>EE,isDeclareInterface:()=>AE,isDeclareModule:()=>CE,isDeclareModuleExports:()=>IE,isDeclareOpaqueType:()=>NE,isDeclareTypeAlias:()=>wE,isDeclareVariable:()=>vE,isDeclaredPredicate:()=>LE,isDecorator:()=>qA,isDirective:()=>mb,isDirectiveLiteral:()=>yb,isDoExpression:()=>$A,isDoWhileStatement:()=>bb,isEmptyStatement:()=>mu,isEmptyTypeAnnotation:()=>KE,isEnumBody:()=>DI,isEnumBooleanBody:()=>yA,isEnumBooleanMember:()=>gA,isEnumDeclaration:()=>mA,isEnumDefaultedMember:()=>EA,isEnumMember:()=>LI,isEnumNumberBody:()=>TA,isEnumNumberMember:()=>PA,isEnumStringBody:()=>SA,isEnumStringMember:()=>bA,isEnumSymbolBody:()=>xA,isExistsTypeAnnotation:()=>OE,isExportAllDeclaration:()=>Nu,isExportDeclaration:()=>Xu,isExportDefaultDeclaration:()=>Wb,isExportDefaultSpecifier:()=>JA,isExportNamedDeclaration:()=>zb,isExportNamespaceSpecifier:()=>lE,isExportSpecifier:()=>Hb,isExpression:()=>ta,isExpressionStatement:()=>yu,isExpressionWrapper:()=>fI,isFile:()=>Tu,isFlow:()=>wI,isFlowBaseAnnotation:()=>Wu,isFlowDeclaration:()=>vI,isFlowPredicate:()=>kI,isFlowType:()=>NI,isFor:()=>dI,isForInStatement:()=>Eb,isForOfStatement:()=>Yb,isForStatement:()=>Ab,isForXStatement:()=>mI,isFunction:()=>is,isFunctionDeclaration:()=>pa,isFunctionExpression:()=>Su,isFunctionParameter:()=>SI,isFunctionParent:()=>yI,isFunctionTypeAnnotation:()=>ME,isFunctionTypeParam:()=>FE,isGenericTypeAnnotation:()=>Mu,isIdentifier:()=>tt,isIfStatement:()=>Cb,isImmutable:()=>VF,isImport:()=>oE,isImportAttribute:()=>yE,isImportDeclaration:()=>Gb,isImportDefaultSpecifier:()=>vu,isImportExpression:()=>aE,isImportNamespaceSpecifier:()=>Qb,isImportOrExportDeclaration:()=>Ju,isImportSpecifier:()=>Zb,isIndexedAccessType:()=>AA,isInferredPredicate:()=>BE,isInterfaceDeclaration:()=>jE,isInterfaceExtends:()=>_E,isInterfaceTypeAnnotation:()=>RE,isInterpreterDirective:()=>db,isIntersectionTypeAnnotation:()=>UE,isJSX:()=>OI,isJSXAttribute:()=>IA,isJSXClosingElement:()=>wA,isJSXClosingFragment:()=>_A,isJSXElement:()=>NA,isJSXEmptyExpression:()=>Bu,isJSXExpressionContainer:()=>_u,isJSXFragment:()=>FA,isJSXIdentifier:()=>kA,isJSXMemberExpression:()=>DA,isJSXNamespacedName:()=>LA,isJSXOpeningElement:()=>OA,isJSXOpeningFragment:()=>BA,isJSXSpreadAttribute:()=>MA,isJSXSpreadChild:()=>vA,isJSXText:()=>ju,isLVal:()=>gI,isLabeledStatement:()=>Ib,isLet:()=>zm,isLiteral:()=>Sa,isLogicalExpression:()=>vb,isLoop:()=>pI,isMemberExpression:()=>Pu,isMetaProperty:()=>ku,isMethod:()=>xa,isMiscellaneous:()=>MI,isMixedTypeAnnotation:()=>VE,isModuleDeclaration:()=>qI,isModuleExpression:()=>XA,isModuleSpecifier:()=>II,isNewExpression:()=>kb,isNode:()=>vm,isNodesEquivalent:()=>la,isNullLiteral:()=>xu,isNullLiteralTypeAnnotation:()=>gE,isNullableTypeAnnotation:()=>qE,isNumberLiteral:()=>RI,isNumberLiteralTypeAnnotation:()=>$E,isNumberTypeAnnotation:()=>XE,isNumericLiteral:()=>wb,isObjectExpression:()=>Lb,isObjectMember:()=>EI,isObjectMethod:()=>Zi,isObjectPattern:()=>eE,isObjectProperty:()=>bu,isObjectTypeAnnotation:()=>WE,isObjectTypeCallProperty:()=>HE,isObjectTypeIndexer:()=>YE,isObjectTypeInternalSlot:()=>zE,isObjectTypeProperty:()=>GE,isObjectTypeSpreadProperty:()=>QE,isOpaqueType:()=>ZE,isOptionalCallExpression:()=>pE,isOptionalIndexedAccessType:()=>CA,isOptionalMemberExpression:()=>uE,isParenthesizedExpression:()=>Bb,isPattern:()=>$u,isPatternLike:()=>xI,isPlaceholder:()=>jA,isPlaceholderType:()=>Gu,isPrivate:()=>Pa,isPrivateName:()=>ma,isProgram:()=>Db,isProperty:()=>AI,isPureish:()=>TI,isQualifiedTypeIdentifier:()=>eA,isReferenced:()=>KF,isRegExpLiteral:()=>gu,isRegexLiteral:()=>UI,isRestElement:()=>Ob,isRestProperty:()=>VI,isReturnStatement:()=>Mb,isScopable:()=>qu,isScope:()=>qF,isSequenceExpression:()=>Fb,isSpecifierDefault:()=>$F,isSpreadElement:()=>tE,isSpreadProperty:()=>KI,isStandardized:()=>rI,isStatement:()=>Ta,isStaticBlock:()=>mE,isStringLiteral:()=>Xs,isStringLiteralTypeAnnotation:()=>tA,isStringTypeAnnotation:()=>sA,isSuper:()=>da,isSwitchCase:()=>_b,isSwitchStatement:()=>jb,isSymbolTypeAnnotation:()=>iA,isTSAnyKeyword:()=>Ru,isTSArrayType:()=>PC,isTSAsExpression:()=>VC,isTSBaseType:()=>zu,isTSBigIntKeyword:()=>rC,isTSBooleanKeyword:()=>iC,isTSCallSignatureDeclaration:()=>QA,isTSClassImplements:()=>FC,isTSConditionalType:()=>wC,isTSConstructSignatureDeclaration:()=>ZA,isTSConstructorType:()=>TC,isTSDeclareFunction:()=>YA,isTSDeclareMethod:()=>GA,isTSEntityName:()=>PI,isTSEnumBody:()=>$C,isTSEnumDeclaration:()=>JC,isTSEnumMember:()=>XC,isTSExportAssignment:()=>ZC,isTSExternalModuleReference:()=>GC,isTSFunctionType:()=>yC,isTSImportEqualsDeclaration:()=>YC,isTSImportType:()=>HC,isTSIndexSignature:()=>sC,isTSIndexedAccessType:()=>DC,isTSInferType:()=>NC,isTSInstantiationExpression:()=>UC,isTSInterfaceBody:()=>jC,isTSInterfaceDeclaration:()=>_C,isTSInterfaceHeritage:()=>BC,isTSIntersectionType:()=>IC,isTSIntrinsicKeyword:()=>nC,isTSLiteralType:()=>MC,isTSMappedType:()=>LC,isTSMethodSignature:()=>tC,isTSModuleBlock:()=>zC,isTSModuleDeclaration:()=>WC,isTSNamedTupleMember:()=>CC,isTSNamespaceExportDeclaration:()=>eI,isTSNeverKeyword:()=>aC,isTSNonNullExpression:()=>QC,isTSNullKeyword:()=>oC,isTSNumberKeyword:()=>cC,isTSObjectKeyword:()=>lC,isTSOptionalType:()=>EC,isTSParameterProperty:()=>HA,isTSParenthesizedType:()=>vC,isTSPropertySignature:()=>eC,isTSQualifiedName:()=>ya,isTSRestType:()=>AC,isTSSatisfiesExpression:()=>KC,isTSStringKeyword:()=>uC,isTSSymbolKeyword:()=>pC,isTSTemplateLiteralType:()=>OC,isTSThisType:()=>mC,isTSTupleType:()=>bC,isTSType:()=>jI,isTSTypeAliasDeclaration:()=>RC,isTSTypeAnnotation:()=>Ku,isTSTypeAssertion:()=>qC,isTSTypeElement:()=>_I,isTSTypeLiteral:()=>gC,isTSTypeOperator:()=>kC,isTSTypeParameter:()=>iI,isTSTypeParameterDeclaration:()=>sI,isTSTypeParameterInstantiation:()=>tI,isTSTypePredicate:()=>SC,isTSTypeQuery:()=>xC,isTSTypeReference:()=>Uu,isTSUndefinedKeyword:()=>hC,isTSUnionType:()=>Vu,isTSUnknownKeyword:()=>fC,isTSVoidKeyword:()=>dC,isTaggedTemplateExpression:()=>sE,isTemplateElement:()=>iE,isTemplateLiteral:()=>Lu,isTerminatorless:()=>cI,isThisExpression:()=>ha,isThisTypeAnnotation:()=>rA,isThrowStatement:()=>Rb,isTopicReference:()=>WA,isTryStatement:()=>Ub,isTupleTypeAnnotation:()=>nA,isType:()=>ba,isTypeAlias:()=>oA,isTypeAnnotation:()=>cA,isTypeCastExpression:()=>lA,isTypeParameter:()=>uA,isTypeParameterDeclaration:()=>pA,isTypeParameterInstantiation:()=>hA,isTypeScript:()=>BI,isTypeofTypeAnnotation:()=>aA,isUnaryExpression:()=>Eu,isUnaryLike:()=>CI,isUnionTypeAnnotation:()=>Fu,isUpdateExpression:()=>Au,isUserWhitespacable:()=>bI,isV8IntrinsicIdentifier:()=>RA,isValidES3Identifier:()=>XF,isValidIdentifier:()=>Ws,isVar:()=>WF,isVariableDeclaration:()=>fa,isVariableDeclarator:()=>Cu,isVariance:()=>fA,isVoidPattern:()=>zA,isVoidTypeAnnotation:()=>dA,isWhile:()=>hI,isWhileStatement:()=>Vb,isWithStatement:()=>Kb,isYieldExpression:()=>rE,jsxAttribute:()=>Uf,jsxClosingElement:()=>Vf,jsxClosingFragment:()=>ed,jsxElement:()=>Kf,jsxEmptyExpression:()=>qf,jsxExpressionContainer:()=>$f,jsxFragment:()=>Qf,jsxIdentifier:()=>Xf,jsxMemberExpression:()=>Wf,jsxNamespacedName:()=>zf,jsxOpeningElement:()=>Hf,jsxOpeningFragment:()=>Zf,jsxSpreadAttribute:()=>Yf,jsxSpreadChild:()=>Jf,jsxText:()=>Gf,labeledStatement:()=>Bp,logicalExpression:()=>_p,matchesPattern:()=>Hu,memberExpression:()=>or,metaProperty:()=>dh,mixedTypeAnnotation:()=>rf,moduleExpression:()=>ld,newExpression:()=>jp,nullLiteral:()=>Ra,nullLiteralTypeAnnotation:()=>Bh,nullableTypeAnnotation:()=>af,numberLiteral:()=>Cm,numberLiteralTypeAnnotation:()=>of,numberTypeAnnotation:()=>za,numericLiteral:()=>St,objectExpression:()=>Va,objectMethod:()=>Up,objectPattern:()=>yh,objectProperty:()=>Ka,objectTypeAnnotation:()=>lf,objectTypeCallProperty:()=>pf,objectTypeIndexer:()=>hf,objectTypeInternalSlot:()=>uf,objectTypeProperty:()=>ff,objectTypeSpreadProperty:()=>df,opaqueType:()=>mf,optionalCallExpression:()=>wh,optionalIndexedAccessType:()=>Rf,optionalMemberExpression:()=>Ih,parenthesizedExpression:()=>Kp,placeholder:()=>td,prependToMemberExpression:()=>LF,privateName:()=>Dh,program:()=>Rp,qualifiedTypeIdentifier:()=>yf,react:()=>zF,regExpLiteral:()=>ar,regexLiteral:()=>Im,removeComments:()=>C2,removeProperties:()=>Jm,removePropertiesDeep:()=>Xm,removeTypeDuplicates:()=>Za,restElement:()=>qa,restProperty:()=>wm,returnStatement:()=>$a,sequenceExpression:()=>Vp,shallowEqual:()=>ee,spreadElement:()=>Ja,spreadProperty:()=>Nm,staticBlock:()=>Lh,stringLiteral:()=>Mt,stringLiteralTypeAnnotation:()=>Tf,stringTypeAnnotation:()=>Ha,super:()=>Th,switchCase:()=>qp,switchStatement:()=>$p,symbolTypeAnnotation:()=>Sf,taggedTemplateExpression:()=>Sh,templateElement:()=>xh,templateLiteral:()=>gh,thisExpression:()=>Jp,thisTypeAnnotation:()=>xf,throwStatement:()=>Xp,toBindingIdentifierName:()=>EF,toBlock:()=>Um,toComputedKey:()=>AF,toExpression:()=>CF,toIdentifier:()=>Vm,toKeyAlias:()=>Lt,toStatement:()=>wF,topicReference:()=>ud,traverse:()=>jF,traverseFast:()=>ns,tryStatement:()=>Wp,tsAnyKeyword:()=>Pd,tsArrayType:()=>Vd,tsAsExpression:()=>om,tsBigIntKeyword:()=>Ed,tsBooleanKeyword:()=>bd,tsCallSignatureDeclaration:()=>yd,tsClassImplements:()=>tm,tsConditionalType:()=>Wd,tsConstructSignatureDeclaration:()=>Td,tsConstructorType:()=>Bd,tsDeclareFunction:()=>fd,tsDeclareMethod:()=>dd,tsEnumBody:()=>um,tsEnumDeclaration:()=>pm,tsEnumMember:()=>hm,tsExportAssignment:()=>xm,tsExternalModuleReference:()=>Tm,tsFunctionType:()=>Fd,tsImportEqualsDeclaration:()=>ym,tsImportType:()=>mm,tsIndexSignature:()=>gd,tsIndexedAccessType:()=>Gd,tsInferType:()=>zd,tsInstantiationExpression:()=>am,tsInterfaceBody:()=>rm,tsInterfaceDeclaration:()=>im,tsInterfaceHeritage:()=>sm,tsIntersectionType:()=>Xd,tsIntrinsicKeyword:()=>Ad,tsLiteralType:()=>em,tsMappedType:()=>Qd,tsMethodSignature:()=>xd,tsModuleBlock:()=>dm,tsModuleDeclaration:()=>fm,tsNamedTupleMember:()=>Jd,tsNamespaceExportDeclaration:()=>gm,tsNeverKeyword:()=>Cd,tsNonNullExpression:()=>Sm,tsNullKeyword:()=>Id,tsNumberKeyword:()=>wd,tsObjectKeyword:()=>Nd,tsOptionalType:()=>qd,tsParameterProperty:()=>hd,tsParenthesizedType:()=>Hd,tsPropertySignature:()=>Sd,tsQualifiedName:()=>md,tsRestType:()=>$d,tsSatisfiesExpression:()=>cm,tsStringKeyword:()=>vd,tsSymbolKeyword:()=>kd,tsTemplateLiteralType:()=>Zd,tsThisType:()=>Md,tsTupleType:()=>Kd,tsTypeAliasDeclaration:()=>nm,tsTypeAnnotation:()=>Pm,tsTypeAssertion:()=>lm,tsTypeLiteral:()=>Ud,tsTypeOperator:()=>Yd,tsTypeParameter:()=>Am,tsTypeParameterDeclaration:()=>Em,tsTypeParameterInstantiation:()=>bm,tsTypePredicate:()=>jd,tsTypeQuery:()=>Rd,tsTypeReference:()=>_d,tsUndefinedKeyword:()=>Dd,tsUnionType:()=>Qa,tsUnknownKeyword:()=>Ld,tsVoidKeyword:()=>Od,tupleTypeAnnotation:()=>gf,typeAlias:()=>bf,typeAnnotation:()=>Ef,typeCastExpression:()=>Af,typeParameter:()=>Cf,typeParameterDeclaration:()=>If,typeParameterInstantiation:()=>wf,typeofTypeAnnotation:()=>Pf,unaryExpression:()=>Js,unionTypeAnnotation:()=>Ya,updateExpression:()=>zp,v8IntrinsicIdentifier:()=>sd,validate:()=>Tp,valueToNode:()=>oa,variableDeclaration:()=>Hp,variableDeclarator:()=>Yp,variance:()=>Nf,voidPattern:()=>pd,voidTypeAnnotation:()=>Ga,whileStatement:()=>Gp,withStatement:()=>Qp,yieldExpression:()=>Ph});var au="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0558\u0559\u0560-\u0588\u058B\u058C\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u208F-\u209F\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DD\uA7E2\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB6C\uAB6D\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",eb="\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7-\u05C9\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B53-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1AF0\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",tb=new RegExp("["+au+"]"),sb=new RegExp("["+au+eb+"]"),ou=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,13,65,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,18,21,18,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,18,0,182,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,22,0,239,18,16,0,2,12,2,33,125,0,80,921,103,111,6,206,13,310,2314,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7386,37,33,96,114,14,913,15,50,7710,3,2,6,2,1,2,296,10,0,30,2,3,0,15,4,8,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,340,2,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,129,15,6,55,50,49,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4382,2,5773,3,7472,16,621,2467,541,1507,4938,6,8489,39815,11327],ib=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,31,4,33,15,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,7,0,259,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,481,1,61,4,4,5,9,7,3,6,31,3,149,2,12,2,9,1,3,0,33,1,1357,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239];function Yn(s,e){let t=65536;for(let i=0,r=e.length;i<r;i+=2){if(t+=e[i],t>s)return!1;if(t+=e[i+1],t>=s)return!0}return!1}function cu(s){return s<65?s===36:s<=90?!0:s<97?s===95:s<=122?!0:s<=65535?s>=170&&tb.test(String.fromCharCode(s)):Yn(s,ou)}function Us(s){return s<48?s===36:s<58?!0:s<65?!1:s<=90?!0:s<97?s===95:s<=122?!0:s<=65535?s>=170&&sb.test(String.fromCharCode(s)):Yn(s,ou)||Yn(s,ib)}function Vs(s){let e=!0;for(let t=0;t<s.length;t++){let i=s.charCodeAt(t);if((i&64512)===55296&&t+1<s.length){let r=s.charCodeAt(++t);(r&64512)===56320&&(i=65536+((i&1023)<<10)+(r&1023))}if(e){if(e=!1,!cu(i))return!1}else if(!Us(i))return!1}return!e}var Gn={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},rb=new Set(Gn.keyword),nb=new Set(Gn.strict),Hz=new Set(Gn.strictBind);function Ks(s,e){return e&&s==="await"||s==="enum"}function Xi(s,e){return Ks(s,e)||nb.has(s)}function ss(s){return rb.has(s)}var ab=function(e){return e>=48&&e<=57},lu={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},Wi={bin:s=>s===48||s===49,oct:s=>s>=48&&s<=55,dec:s=>s>=48&&s<=57,hex:s=>s>=48&&s<=57||s>=65&&s<=70||s>=97&&s<=102};function uu(s,e,t,i,r,n){let a=t,o=i,c=r,l="",u=null,f=t,{length:m}=e;for(;;){if(t>=m){n.unterminated(a,o,c),l+=e.slice(f,t);break}let x=e.charCodeAt(t);if(ob(s,x,e,t)){l+=e.slice(f,t);break}if(x===92){l+=e.slice(f,t);let I=cb(e,t,i,r,s==="template",n);I.ch===null&&!u?u={pos:t,lineStart:i,curLine:r}:l+=I.ch,{pos:t,lineStart:i,curLine:r}=I,f=t}else x===8232||x===8233?(++t,++r,i=t):x===10||x===13?s==="template"?(l+=e.slice(f,t)+`
10
+ `,++t,x===13&&e.charCodeAt(t)===10&&++t,++r,f=i=t):n.unterminated(a,o,c):++t}return{pos:t,str:l,firstInvalidLoc:u,lineStart:i,curLine:r}}function ob(s,e,t,i){return s==="template"?e===96||e===36&&t.charCodeAt(i+1)===123:e===(s==="double"?34:39)}function cb(s,e,t,i,r,n){let a=!r;e++;let o=l=>({pos:e,ch:l,lineStart:t,curLine:i}),c=s.charCodeAt(e++);switch(c){case 110:return o(`
11
+ `);case 114:return o("\r");case 120:{let l;return{code:l,pos:e}=Qn(s,e,t,i,2,!1,a,n),o(l===null?null:String.fromCharCode(l))}case 117:{let l;return{code:l,pos:e}=ub(s,e,t,i,a,n),o(l===null?null:String.fromCodePoint(l))}case 116:return o(" ");case 98:return o("\b");case 118:return o("\v");case 102:return o("\f");case 13:s.charCodeAt(e)===10&&++e;case 10:t=e,++i;case 8232:case 8233:return o("");case 56:case 57:if(r)return o(null);n.strictNumericEscape(e-1,t,i);default:if(c>=48&&c<=55){let l=e-1,f=/^[0-7]+/.exec(s.slice(l,e+2))[0],m=parseInt(f,8);m>255&&(f=f.slice(0,-1),m=parseInt(f,8)),e+=f.length-1;let x=s.charCodeAt(e);if(f!=="0"||x===56||x===57){if(r)return o(null);n.strictNumericEscape(l,t,i)}return o(String.fromCharCode(m))}return o(String.fromCharCode(c))}}function Qn(s,e,t,i,r,n,a,o){let c=e,l;return{n:l,pos:e}=lb(s,e,t,i,16,r,n,!1,o,!a),l===null&&(a?o.invalidEscapeSequence(c,t,i):e=c-1),{code:l,pos:e}}function lb(s,e,t,i,r,n,a,o,c,l){let u=e,f=r===16?lu.hex:lu.decBinOct,m=r===16?Wi.hex:r===10?Wi.dec:r===8?Wi.oct:Wi.bin,x=!1,I=0;for(let L=0,N=n??1/0;L<N;++L){let w=s.charCodeAt(e),v;if(w===95&&o!=="bail"){let z=s.charCodeAt(e-1),V=s.charCodeAt(e+1);if(o){if(Number.isNaN(V)||!m(V)||f.has(z)||f.has(V)){if(l)return{n:null,pos:e};c.unexpectedNumericSeparator(e,t,i)}}else{if(l)return{n:null,pos:e};c.numericSeparatorInEscapeSequence(e,t,i)}++e;continue}if(w>=97?v=w-97+10:w>=65?v=w-65+10:ab(w)?v=w-48:v=1/0,v>=r)if(v<=9){if(l)return{n:null,pos:e};c.invalidDigit(e,t,i,r),v=0}else if(a)v=0,x=!0;else break;++e,I=I*r+v}return e===u||n!=null&&e-u!==n||x?{n:null,pos:e}:{n:I,pos:e}}function ub(s,e,t,i,r,n){let a=s.charCodeAt(e),o;if(a===123){if(++e,{code:o,pos:e}=Qn(s,e,t,i,s.indexOf("}",e)-e,!0,r,n),++e,o!==null&&o>1114111)if(r)n.invalidCodePoint(e,t,i);else return{code:null,pos:e}}else({code:o,pos:e}=Qn(s,e,t,i,4,!1,r,n));return{code:o,pos:e}}function ee(s,e){let t=Object.keys(e);for(let i of t)if(s[i]!==e[i])return!1;return!0}function y(s,e,t){return e?.type===s&&(t==null||ee(e,t))}var pu=new Set;function Be(s,e,t="",i=s){if(pu.has(i))return;pu.add(i);let{internal:r,trace:n}=pb(1,2);r||console.warn(`${t}\`${s}\` has been deprecated, please migrate to \`${e}\`
12
+ ${n}`)}function pb(s,e){let{stackTraceLimit:t,prepareStackTrace:i}=Error,r;if(Error.stackTraceLimit=1+s+e,Error.prepareStackTrace=function(a,o){r=o},new Error().stack,Error.stackTraceLimit=t,Error.prepareStackTrace=i,!r)return{internal:!1,trace:""};let n=r.slice(1+s,1+s+e);return{internal:/[\\/]@babel[\\/]/.test(n[1].getFileName()),trace:n.map(a=>` at ${a}`).join(`
13
+ `)}}function hb(s,e){return y("ArrayExpression",s,e)}function Qi(s,e){return y("AssignmentExpression",s,e)}function fb(s,e){return y("BinaryExpression",s,e)}function db(s,e){return y("InterpreterDirective",s,e)}function mb(s,e){return y("Directive",s,e)}function yb(s,e){return y("DirectiveLiteral",s,e)}function ua(s,e){return y("BlockStatement",s,e)}function Tb(s,e){return y("BreakStatement",s,e)}function Sb(s,e){return y("CallExpression",s,e)}function ea(s,e){return y("CatchClause",s,e)}function xb(s,e){return y("ConditionalExpression",s,e)}function gb(s,e){return y("ContinueStatement",s,e)}function Pb(s,e){return y("DebuggerStatement",s,e)}function bb(s,e){return y("DoWhileStatement",s,e)}function mu(s,e){return y("EmptyStatement",s,e)}function yu(s,e){return y("ExpressionStatement",s,e)}function Tu(s,e){return y("File",s,e)}function Eb(s,e){return y("ForInStatement",s,e)}function Ab(s,e){return y("ForStatement",s,e)}function pa(s,e){return y("FunctionDeclaration",s,e)}function Su(s,e){return y("FunctionExpression",s,e)}function tt(s,e){return y("Identifier",s,e)}function Cb(s,e){return y("IfStatement",s,e)}function Ib(s,e){return y("LabeledStatement",s,e)}function Xs(s,e){return y("StringLiteral",s,e)}function wb(s,e){return y("NumericLiteral",s,e)}function xu(s,e){return y("NullLiteral",s,e)}function Nb(s,e){return y("BooleanLiteral",s,e)}function gu(s,e){return y("RegExpLiteral",s,e)}function vb(s,e){return y("LogicalExpression",s,e)}function Pu(s,e){return y("MemberExpression",s,e)}function kb(s,e){return y("NewExpression",s,e)}function Db(s,e){return y("Program",s,e)}function Lb(s,e){return y("ObjectExpression",s,e)}function Zi(s,e){return y("ObjectMethod",s,e)}function bu(s,e){return y("ObjectProperty",s,e)}function Ob(s,e){return y("RestElement",s,e)}function Mb(s,e){return y("ReturnStatement",s,e)}function Fb(s,e){return y("SequenceExpression",s,e)}function Bb(s,e){return y("ParenthesizedExpression",s,e)}function _b(s,e){return y("SwitchCase",s,e)}function jb(s,e){return y("SwitchStatement",s,e)}function ha(s,e){return y("ThisExpression",s,e)}function Rb(s,e){return y("ThrowStatement",s,e)}function Ub(s,e){return y("TryStatement",s,e)}function Eu(s,e){return y("UnaryExpression",s,e)}function Au(s,e){return y("UpdateExpression",s,e)}function fa(s,e){return y("VariableDeclaration",s,e)}function Cu(s,e){return y("VariableDeclarator",s,e)}function Vb(s,e){return y("WhileStatement",s,e)}function Kb(s,e){return y("WithStatement",s,e)}function qb(s,e){return y("AssignmentPattern",s,e)}function $b(s,e){return y("ArrayPattern",s,e)}function Jb(s,e){return y("ArrowFunctionExpression",s,e)}function Xb(s,e){return y("ClassBody",s,e)}function Iu(s,e){return y("ClassExpression",s,e)}function wu(s,e){return y("ClassDeclaration",s,e)}function Nu(s,e){return y("ExportAllDeclaration",s,e)}function Wb(s,e){return y("ExportDefaultDeclaration",s,e)}function zb(s,e){return y("ExportNamedDeclaration",s,e)}function Hb(s,e){return y("ExportSpecifier",s,e)}function Yb(s,e){return y("ForOfStatement",s,e)}function Gb(s,e){return y("ImportDeclaration",s,e)}function vu(s,e){return y("ImportDefaultSpecifier",s,e)}function Qb(s,e){return y("ImportNamespaceSpecifier",s,e)}function Zb(s,e){return y("ImportSpecifier",s,e)}function ku(s,e){return y("MetaProperty",s,e)}function Du(s,e){return y("ClassMethod",s,e)}function eE(s,e){return y("ObjectPattern",s,e)}function tE(s,e){return y("SpreadElement",s,e)}function da(s,e){return y("Super",s,e)}function sE(s,e){return y("TaggedTemplateExpression",s,e)}function iE(s,e){return y("TemplateElement",s,e)}function Lu(s,e){return y("TemplateLiteral",s,e)}function rE(s,e){return y("YieldExpression",s,e)}function nE(s,e){return y("AwaitExpression",s,e)}function aE(s,e){return y("ImportExpression",s,e)}function oE(s,e){return y("Import",s,e)}function cE(s,e){return y("BigIntLiteral",s,e)}function lE(s,e){return y("ExportNamespaceSpecifier",s,e)}function uE(s,e){return y("OptionalMemberExpression",s,e)}function pE(s,e){return y("OptionalCallExpression",s,e)}function hE(s,e){return y("ClassProperty",s,e)}function fE(s,e){return y("ClassPrivateProperty",s,e)}function dE(s,e){return y("ClassPrivateMethod",s,e)}function ma(s,e){return y("PrivateName",s,e)}function mE(s,e){return y("StaticBlock",s,e)}function yE(s,e){return y("ImportAttribute",s,e)}function Ou(s,e){return y("AnyTypeAnnotation",s,e)}function TE(s,e){return y("ArrayTypeAnnotation",s,e)}function SE(s,e){return y("BooleanTypeAnnotation",s,e)}function xE(s,e){return y("BooleanLiteralTypeAnnotation",s,e)}function gE(s,e){return y("NullLiteralTypeAnnotation",s,e)}function PE(s,e){return y("ClassImplements",s,e)}function bE(s,e){return y("DeclareClass",s,e)}function EE(s,e){return y("DeclareFunction",s,e)}function AE(s,e){return y("DeclareInterface",s,e)}function CE(s,e){return y("DeclareModule",s,e)}function IE(s,e){return y("DeclareModuleExports",s,e)}function wE(s,e){return y("DeclareTypeAlias",s,e)}function NE(s,e){return y("DeclareOpaqueType",s,e)}function vE(s,e){return y("DeclareVariable",s,e)}function kE(s,e){return y("DeclareExportDeclaration",s,e)}function DE(s,e){return y("DeclareExportAllDeclaration",s,e)}function LE(s,e){return y("DeclaredPredicate",s,e)}function OE(s,e){return y("ExistsTypeAnnotation",s,e)}function ME(s,e){return y("FunctionTypeAnnotation",s,e)}function FE(s,e){return y("FunctionTypeParam",s,e)}function Mu(s,e){return y("GenericTypeAnnotation",s,e)}function BE(s,e){return y("InferredPredicate",s,e)}function _E(s,e){return y("InterfaceExtends",s,e)}function jE(s,e){return y("InterfaceDeclaration",s,e)}function RE(s,e){return y("InterfaceTypeAnnotation",s,e)}function UE(s,e){return y("IntersectionTypeAnnotation",s,e)}function VE(s,e){return y("MixedTypeAnnotation",s,e)}function KE(s,e){return y("EmptyTypeAnnotation",s,e)}function qE(s,e){return y("NullableTypeAnnotation",s,e)}function $E(s,e){return y("NumberLiteralTypeAnnotation",s,e)}function JE(s,e){return y("BigIntLiteralTypeAnnotation",s,e)}function XE(s,e){return y("NumberTypeAnnotation",s,e)}function WE(s,e){return y("ObjectTypeAnnotation",s,e)}function zE(s,e){return y("ObjectTypeInternalSlot",s,e)}function HE(s,e){return y("ObjectTypeCallProperty",s,e)}function YE(s,e){return y("ObjectTypeIndexer",s,e)}function GE(s,e){return y("ObjectTypeProperty",s,e)}function QE(s,e){return y("ObjectTypeSpreadProperty",s,e)}function ZE(s,e){return y("OpaqueType",s,e)}function eA(s,e){return y("QualifiedTypeIdentifier",s,e)}function tA(s,e){return y("StringLiteralTypeAnnotation",s,e)}function sA(s,e){return y("StringTypeAnnotation",s,e)}function iA(s,e){return y("SymbolTypeAnnotation",s,e)}function rA(s,e){return y("ThisTypeAnnotation",s,e)}function nA(s,e){return y("TupleTypeAnnotation",s,e)}function aA(s,e){return y("TypeofTypeAnnotation",s,e)}function oA(s,e){return y("TypeAlias",s,e)}function cA(s,e){return y("TypeAnnotation",s,e)}function lA(s,e){return y("TypeCastExpression",s,e)}function uA(s,e){return y("TypeParameter",s,e)}function pA(s,e){return y("TypeParameterDeclaration",s,e)}function hA(s,e){return y("TypeParameterInstantiation",s,e)}function Fu(s,e){return y("UnionTypeAnnotation",s,e)}function fA(s,e){return y("Variance",s,e)}function dA(s,e){return y("VoidTypeAnnotation",s,e)}function mA(s,e){return y("EnumDeclaration",s,e)}function yA(s,e){return y("EnumBooleanBody",s,e)}function TA(s,e){return y("EnumNumberBody",s,e)}function SA(s,e){return y("EnumStringBody",s,e)}function xA(s,e){return y("EnumSymbolBody",s,e)}function gA(s,e){return y("EnumBooleanMember",s,e)}function PA(s,e){return y("EnumNumberMember",s,e)}function bA(s,e){return y("EnumStringMember",s,e)}function EA(s,e){return y("EnumDefaultedMember",s,e)}function AA(s,e){return y("IndexedAccessType",s,e)}function CA(s,e){return y("OptionalIndexedAccessType",s,e)}function IA(s,e){return y("JSXAttribute",s,e)}function wA(s,e){return y("JSXClosingElement",s,e)}function NA(s,e){return y("JSXElement",s,e)}function Bu(s,e){return y("JSXEmptyExpression",s,e)}function _u(s,e){return y("JSXExpressionContainer",s,e)}function vA(s,e){return y("JSXSpreadChild",s,e)}function kA(s,e){return y("JSXIdentifier",s,e)}function DA(s,e){return y("JSXMemberExpression",s,e)}function LA(s,e){return y("JSXNamespacedName",s,e)}function OA(s,e){return y("JSXOpeningElement",s,e)}function MA(s,e){return y("JSXSpreadAttribute",s,e)}function ju(s,e){return y("JSXText",s,e)}function FA(s,e){return y("JSXFragment",s,e)}function BA(s,e){return y("JSXOpeningFragment",s,e)}function _A(s,e){return y("JSXClosingFragment",s,e)}function jA(s,e){return y("Placeholder",s,e)}function RA(s,e){return y("V8IntrinsicIdentifier",s,e)}function UA(s,e){return y("ArgumentPlaceholder",s,e)}function VA(s,e){return y("BindExpression",s,e)}function KA(s,e){return y("ClassAccessorProperty",s,e)}function qA(s,e){return y("Decorator",s,e)}function $A(s,e){return y("DoExpression",s,e)}function JA(s,e){return y("ExportDefaultSpecifier",s,e)}function XA(s,e){return y("ModuleExpression",s,e)}function WA(s,e){return y("TopicReference",s,e)}function zA(s,e){return y("VoidPattern",s,e)}function HA(s,e){return y("TSParameterProperty",s,e)}function YA(s,e){return y("TSDeclareFunction",s,e)}function GA(s,e){return y("TSDeclareMethod",s,e)}function ya(s,e){return y("TSQualifiedName",s,e)}function QA(s,e){return y("TSCallSignatureDeclaration",s,e)}function ZA(s,e){return y("TSConstructSignatureDeclaration",s,e)}function eC(s,e){return y("TSPropertySignature",s,e)}function tC(s,e){return y("TSMethodSignature",s,e)}function sC(s,e){return y("TSIndexSignature",s,e)}function Ru(s,e){return y("TSAnyKeyword",s,e)}function iC(s,e){return y("TSBooleanKeyword",s,e)}function rC(s,e){return y("TSBigIntKeyword",s,e)}function nC(s,e){return y("TSIntrinsicKeyword",s,e)}function aC(s,e){return y("TSNeverKeyword",s,e)}function oC(s,e){return y("TSNullKeyword",s,e)}function cC(s,e){return y("TSNumberKeyword",s,e)}function lC(s,e){return y("TSObjectKeyword",s,e)}function uC(s,e){return y("TSStringKeyword",s,e)}function pC(s,e){return y("TSSymbolKeyword",s,e)}function hC(s,e){return y("TSUndefinedKeyword",s,e)}function fC(s,e){return y("TSUnknownKeyword",s,e)}function dC(s,e){return y("TSVoidKeyword",s,e)}function mC(s,e){return y("TSThisType",s,e)}function yC(s,e){return y("TSFunctionType",s,e)}function TC(s,e){return y("TSConstructorType",s,e)}function Uu(s,e){return y("TSTypeReference",s,e)}function SC(s,e){return y("TSTypePredicate",s,e)}function xC(s,e){return y("TSTypeQuery",s,e)}function gC(s,e){return y("TSTypeLiteral",s,e)}function PC(s,e){return y("TSArrayType",s,e)}function bC(s,e){return y("TSTupleType",s,e)}function EC(s,e){return y("TSOptionalType",s,e)}function AC(s,e){return y("TSRestType",s,e)}function CC(s,e){return y("TSNamedTupleMember",s,e)}function Vu(s,e){return y("TSUnionType",s,e)}function IC(s,e){return y("TSIntersectionType",s,e)}function wC(s,e){return y("TSConditionalType",s,e)}function NC(s,e){return y("TSInferType",s,e)}function vC(s,e){return y("TSParenthesizedType",s,e)}function kC(s,e){return y("TSTypeOperator",s,e)}function DC(s,e){return y("TSIndexedAccessType",s,e)}function LC(s,e){return y("TSMappedType",s,e)}function OC(s,e){return y("TSTemplateLiteralType",s,e)}function MC(s,e){return y("TSLiteralType",s,e)}function FC(s,e){return y("TSClassImplements",s,e)}function BC(s,e){return y("TSInterfaceHeritage",s,e)}function _C(s,e){return y("TSInterfaceDeclaration",s,e)}function jC(s,e){return y("TSInterfaceBody",s,e)}function RC(s,e){return y("TSTypeAliasDeclaration",s,e)}function UC(s,e){return y("TSInstantiationExpression",s,e)}function VC(s,e){return y("TSAsExpression",s,e)}function KC(s,e){return y("TSSatisfiesExpression",s,e)}function qC(s,e){return y("TSTypeAssertion",s,e)}function $C(s,e){return y("TSEnumBody",s,e)}function JC(s,e){return y("TSEnumDeclaration",s,e)}function XC(s,e){return y("TSEnumMember",s,e)}function WC(s,e){return y("TSModuleDeclaration",s,e)}function zC(s,e){return y("TSModuleBlock",s,e)}function HC(s,e){return y("TSImportType",s,e)}function YC(s,e){return y("TSImportEqualsDeclaration",s,e)}function GC(s,e){return y("TSExternalModuleReference",s,e)}function QC(s,e){return y("TSNonNullExpression",s,e)}function ZC(s,e){return y("TSExportAssignment",s,e)}function eI(s,e){return y("TSNamespaceExportDeclaration",s,e)}function Ku(s,e){return y("TSTypeAnnotation",s,e)}function tI(s,e){return y("TSTypeParameterInstantiation",s,e)}function sI(s,e){return y("TSTypeParameterDeclaration",s,e)}function iI(s,e){return y("TSTypeParameter",s,e)}function rI(s,e){if(!s)return!1;switch(s.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"InterpreterDirective":case"Directive":case"DirectiveLiteral":case"BlockStatement":case"BreakStatement":case"CallExpression":case"CatchClause":case"ConditionalExpression":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"File":case"ForInStatement":case"ForStatement":case"FunctionDeclaration":case"FunctionExpression":case"Identifier":case"IfStatement":case"LabeledStatement":case"StringLiteral":case"NumericLiteral":case"NullLiteral":case"BooleanLiteral":case"RegExpLiteral":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"Program":case"ObjectExpression":case"ObjectMethod":case"ObjectProperty":case"RestElement":case"ReturnStatement":case"SequenceExpression":case"ParenthesizedExpression":case"SwitchCase":case"SwitchStatement":case"ThisExpression":case"ThrowStatement":case"TryStatement":case"UnaryExpression":case"UpdateExpression":case"VariableDeclaration":case"VariableDeclarator":case"WhileStatement":case"WithStatement":case"AssignmentPattern":case"ArrayPattern":case"ArrowFunctionExpression":case"ClassBody":case"ClassExpression":case"ClassDeclaration":case"ExportAllDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ExportSpecifier":case"ForOfStatement":case"ImportDeclaration":case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ImportSpecifier":case"MetaProperty":case"ClassMethod":case"ObjectPattern":case"SpreadElement":case"Super":case"TaggedTemplateExpression":case"TemplateElement":case"TemplateLiteral":case"YieldExpression":case"AwaitExpression":case"ImportExpression":case"Import":case"BigIntLiteral":case"ExportNamespaceSpecifier":case"OptionalMemberExpression":case"OptionalCallExpression":case"ClassProperty":case"ClassPrivateProperty":case"ClassPrivateMethod":case"PrivateName":case"StaticBlock":case"ImportAttribute":break;case"Placeholder":switch(s.expectedNode){case"Identifier":case"StringLiteral":case"BlockStatement":case"ClassBody":break;default:return!1}break;default:return!1}return e==null||ee(s,e)}function ta(s,e){if(!s)return!1;switch(s.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"StringLiteral":case"NumericLiteral":case"NullLiteral":case"BooleanLiteral":case"RegExpLiteral":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ParenthesizedExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":case"ArrowFunctionExpression":case"ClassExpression":case"MetaProperty":case"TaggedTemplateExpression":case"TemplateLiteral":case"YieldExpression":case"AwaitExpression":case"ImportExpression":case"BigIntLiteral":case"OptionalMemberExpression":case"OptionalCallExpression":case"TypeCastExpression":case"JSXElement":case"JSXFragment":case"BindExpression":case"DoExpression":case"ModuleExpression":case"TopicReference":case"TSInstantiationExpression":case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":break;case"Placeholder":switch(s.expectedNode){case"Expression":case"Identifier":case"StringLiteral":break;default:return!1}break;default:return!1}return e==null||ee(s,e)}function nI(s,e){if(!s)return!1;switch(s.type){case"BinaryExpression":case"LogicalExpression":break;default:return!1}return e==null||ee(s,e)}function qu(s,e){if(!s)return!1;switch(s.type){case"BlockStatement":case"CatchClause":case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"FunctionDeclaration":case"FunctionExpression":case"Program":case"ObjectMethod":case"SwitchStatement":case"WhileStatement":case"ArrowFunctionExpression":case"ClassExpression":case"ClassDeclaration":case"ForOfStatement":case"ClassMethod":case"ClassPrivateMethod":case"StaticBlock":case"TSModuleBlock":break;case"Placeholder":if(s.expectedNode==="BlockStatement")break;default:return!1}return e==null||ee(s,e)}function aI(s,e){if(!s)return!1;switch(s.type){case"BlockStatement":case"CatchClause":case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"FunctionDeclaration":case"FunctionExpression":case"Program":case"ObjectMethod":case"SwitchStatement":case"WhileStatement":case"ArrowFunctionExpression":case"ForOfStatement":case"ClassMethod":case"ClassPrivateMethod":case"StaticBlock":case"TSModuleBlock":break;case"Placeholder":if(s.expectedNode==="BlockStatement")break;default:return!1}return e==null||ee(s,e)}function oI(s,e){if(!s)return!1;switch(s.type){case"BlockStatement":case"Program":case"TSModuleBlock":break;case"Placeholder":if(s.expectedNode==="BlockStatement")break;default:return!1}return e==null||ee(s,e)}function Ta(s,e){if(!s)return!1;switch(s.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"FunctionDeclaration":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":case"ClassDeclaration":case"ExportAllDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ForOfStatement":case"ImportDeclaration":case"DeclareClass":case"DeclareFunction":case"DeclareInterface":case"DeclareModule":case"DeclareModuleExports":case"DeclareTypeAlias":case"DeclareOpaqueType":case"DeclareVariable":case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":case"InterfaceDeclaration":case"OpaqueType":case"TypeAlias":case"EnumDeclaration":case"TSDeclareFunction":case"TSInterfaceDeclaration":case"TSTypeAliasDeclaration":case"TSEnumDeclaration":case"TSModuleDeclaration":case"TSImportEqualsDeclaration":case"TSExportAssignment":case"TSNamespaceExportDeclaration":break;case"Placeholder":switch(s.expectedNode){case"Statement":case"Declaration":case"BlockStatement":break;default:return!1}break;default:return!1}return e==null||ee(s,e)}function cI(s,e){if(!s)return!1;switch(s.type){case"BreakStatement":case"ContinueStatement":case"ReturnStatement":case"ThrowStatement":case"YieldExpression":case"AwaitExpression":break;default:return!1}return e==null||ee(s,e)}function lI(s,e){if(!s)return!1;switch(s.type){case"BreakStatement":case"ContinueStatement":case"ReturnStatement":case"ThrowStatement":break;default:return!1}return e==null||ee(s,e)}function uI(s,e){if(!s)return!1;switch(s.type){case"ConditionalExpression":case"IfStatement":break;default:return!1}return e==null||ee(s,e)}function pI(s,e){if(!s)return!1;switch(s.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":case"ForOfStatement":break;default:return!1}return e==null||ee(s,e)}function hI(s,e){if(!s)return!1;switch(s.type){case"DoWhileStatement":case"WhileStatement":break;default:return!1}return e==null||ee(s,e)}function fI(s,e){if(!s)return!1;switch(s.type){case"ExpressionStatement":case"ParenthesizedExpression":case"TypeCastExpression":break;default:return!1}return e==null||ee(s,e)}function dI(s,e){if(!s)return!1;switch(s.type){case"ForInStatement":case"ForStatement":case"ForOfStatement":break;default:return!1}return e==null||ee(s,e)}function mI(s,e){if(!s)return!1;switch(s.type){case"ForInStatement":case"ForOfStatement":break;default:return!1}return e==null||ee(s,e)}function is(s,e){if(!s)return!1;switch(s.type){case"FunctionDeclaration":case"FunctionExpression":case"ObjectMethod":case"ArrowFunctionExpression":case"ClassMethod":case"ClassPrivateMethod":break;default:return!1}return e==null||ee(s,e)}function yI(s,e){if(!s)return!1;switch(s.type){case"FunctionDeclaration":case"FunctionExpression":case"ObjectMethod":case"ArrowFunctionExpression":case"ClassMethod":case"ClassPrivateMethod":case"StaticBlock":case"TSModuleBlock":break;default:return!1}return e==null||ee(s,e)}function TI(s,e){if(!s)return!1;switch(s.type){case"FunctionDeclaration":case"FunctionExpression":case"StringLiteral":case"NumericLiteral":case"NullLiteral":case"BooleanLiteral":case"RegExpLiteral":case"ArrowFunctionExpression":case"BigIntLiteral":break;case"Placeholder":if(s.expectedNode==="StringLiteral")break;default:return!1}return e==null||ee(s,e)}function er(s,e){if(!s)return!1;switch(s.type){case"FunctionDeclaration":case"VariableDeclaration":case"ClassDeclaration":case"ExportAllDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ImportDeclaration":case"DeclareClass":case"DeclareFunction":case"DeclareInterface":case"DeclareModule":case"DeclareModuleExports":case"DeclareTypeAlias":case"DeclareOpaqueType":case"DeclareVariable":case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":case"InterfaceDeclaration":case"OpaqueType":case"TypeAlias":case"EnumDeclaration":case"TSDeclareFunction":case"TSInterfaceDeclaration":case"TSTypeAliasDeclaration":case"TSEnumDeclaration":case"TSModuleDeclaration":case"TSImportEqualsDeclaration":break;case"Placeholder":if(s.expectedNode==="Declaration")break;default:return!1}return e==null||ee(s,e)}function SI(s,e){if(!s)return!1;switch(s.type){case"Identifier":case"RestElement":case"AssignmentPattern":case"ArrayPattern":case"ObjectPattern":case"VoidPattern":break;case"Placeholder":if(s.expectedNode==="Identifier")break;default:return!1}return e==null||ee(s,e)}function xI(s,e){if(!s)return!1;switch(s.type){case"Identifier":case"MemberExpression":case"RestElement":case"AssignmentPattern":case"ArrayPattern":case"ObjectPattern":case"VoidPattern":case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":break;case"Placeholder":switch(s.expectedNode){case"Pattern":case"Identifier":break;default:return!1}break;default:return!1}return e==null||ee(s,e)}function gI(s,e){if(!s)return!1;switch(s.type){case"Identifier":case"MemberExpression":case"ArrayPattern":case"ObjectPattern":case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":break;case"Placeholder":switch(s.expectedNode){case"Pattern":case"Identifier":break;default:return!1}break;default:return!1}return e==null||ee(s,e)}function PI(s,e){if(!s)return!1;switch(s.type){case"Identifier":case"ThisExpression":case"TSQualifiedName":break;case"Placeholder":if(s.expectedNode==="Identifier")break;default:return!1}return e==null||ee(s,e)}function Sa(s,e){if(!s)return!1;switch(s.type){case"StringLiteral":case"NumericLiteral":case"NullLiteral":case"BooleanLiteral":case"RegExpLiteral":case"TemplateLiteral":case"BigIntLiteral":break;case"Placeholder":if(s.expectedNode==="StringLiteral")break;default:return!1}return e==null||ee(s,e)}function bI(s,e){if(!s)return!1;switch(s.type){case"ObjectMethod":case"ObjectProperty":case"ObjectTypeInternalSlot":case"ObjectTypeCallProperty":case"ObjectTypeIndexer":case"ObjectTypeProperty":case"ObjectTypeSpreadProperty":break;default:return!1}return e==null||ee(s,e)}function xa(s,e){if(!s)return!1;switch(s.type){case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":break;default:return!1}return e==null||ee(s,e)}function EI(s,e){if(!s)return!1;switch(s.type){case"ObjectMethod":case"ObjectProperty":break;default:return!1}return e==null||ee(s,e)}function AI(s,e){if(!s)return!1;switch(s.type){case"ObjectProperty":case"ClassProperty":case"ClassPrivateProperty":case"ClassAccessorProperty":break;default:return!1}return e==null||ee(s,e)}function CI(s,e){if(!s)return!1;switch(s.type){case"UnaryExpression":case"SpreadElement":break;default:return!1}return e==null||ee(s,e)}function $u(s,e){if(!s)return!1;switch(s.type){case"AssignmentPattern":case"ArrayPattern":case"ObjectPattern":case"VoidPattern":break;case"Placeholder":if(s.expectedNode==="Pattern")break;default:return!1}return e==null||ee(s,e)}function ga(s,e){if(!s)return!1;switch(s.type){case"ClassExpression":case"ClassDeclaration":break;default:return!1}return e==null||ee(s,e)}function Ju(s,e){if(!s)return!1;switch(s.type){case"ExportAllDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ImportDeclaration":break;default:return!1}return e==null||ee(s,e)}function Xu(s,e){if(!s)return!1;switch(s.type){case"ExportAllDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":break;default:return!1}return e==null||ee(s,e)}function II(s,e){if(!s)return!1;switch(s.type){case"ExportSpecifier":case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ImportSpecifier":case"ExportNamespaceSpecifier":case"ExportDefaultSpecifier":break;default:return!1}return e==null||ee(s,e)}function Pa(s,e){if(!s)return!1;switch(s.type){case"ClassPrivateProperty":case"ClassPrivateMethod":case"PrivateName":break;default:return!1}return e==null||ee(s,e)}function wI(s,e){if(!s)return!1;switch(s.type){case"AnyTypeAnnotation":case"ArrayTypeAnnotation":case"BooleanTypeAnnotation":case"BooleanLiteralTypeAnnotation":case"NullLiteralTypeAnnotation":case"ClassImplements":case"DeclareClass":case"DeclareFunction":case"DeclareInterface":case"DeclareModule":case"DeclareModuleExports":case"DeclareTypeAlias":case"DeclareOpaqueType":case"DeclareVariable":case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":case"DeclaredPredicate":case"ExistsTypeAnnotation":case"FunctionTypeAnnotation":case"FunctionTypeParam":case"GenericTypeAnnotation":case"InferredPredicate":case"InterfaceExtends":case"InterfaceDeclaration":case"InterfaceTypeAnnotation":case"IntersectionTypeAnnotation":case"MixedTypeAnnotation":case"EmptyTypeAnnotation":case"NullableTypeAnnotation":case"NumberLiteralTypeAnnotation":case"BigIntLiteralTypeAnnotation":case"NumberTypeAnnotation":case"ObjectTypeAnnotation":case"ObjectTypeInternalSlot":case"ObjectTypeCallProperty":case"ObjectTypeIndexer":case"ObjectTypeProperty":case"ObjectTypeSpreadProperty":case"OpaqueType":case"QualifiedTypeIdentifier":case"StringLiteralTypeAnnotation":case"StringTypeAnnotation":case"SymbolTypeAnnotation":case"ThisTypeAnnotation":case"TupleTypeAnnotation":case"TypeofTypeAnnotation":case"TypeAlias":case"TypeAnnotation":case"TypeCastExpression":case"TypeParameter":case"TypeParameterDeclaration":case"TypeParameterInstantiation":case"UnionTypeAnnotation":case"Variance":case"VoidTypeAnnotation":case"EnumDeclaration":case"EnumBooleanBody":case"EnumNumberBody":case"EnumStringBody":case"EnumSymbolBody":case"EnumBooleanMember":case"EnumNumberMember":case"EnumStringMember":case"EnumDefaultedMember":case"IndexedAccessType":case"OptionalIndexedAccessType":break;default:return!1}return e==null||ee(s,e)}function NI(s,e){if(!s)return!1;switch(s.type){case"AnyTypeAnnotation":case"ArrayTypeAnnotation":case"BooleanTypeAnnotation":case"BooleanLiteralTypeAnnotation":case"NullLiteralTypeAnnotation":case"ExistsTypeAnnotation":case"FunctionTypeAnnotation":case"GenericTypeAnnotation":case"InterfaceTypeAnnotation":case"IntersectionTypeAnnotation":case"MixedTypeAnnotation":case"EmptyTypeAnnotation":case"NullableTypeAnnotation":case"NumberLiteralTypeAnnotation":case"BigIntLiteralTypeAnnotation":case"NumberTypeAnnotation":case"ObjectTypeAnnotation":case"StringLiteralTypeAnnotation":case"StringTypeAnnotation":case"SymbolTypeAnnotation":case"ThisTypeAnnotation":case"TupleTypeAnnotation":case"TypeofTypeAnnotation":case"UnionTypeAnnotation":case"VoidTypeAnnotation":case"IndexedAccessType":case"OptionalIndexedAccessType":break;default:return!1}return e==null||ee(s,e)}function Wu(s,e){if(!s)return!1;switch(s.type){case"AnyTypeAnnotation":case"BooleanTypeAnnotation":case"NullLiteralTypeAnnotation":case"MixedTypeAnnotation":case"EmptyTypeAnnotation":case"NumberTypeAnnotation":case"StringTypeAnnotation":case"SymbolTypeAnnotation":case"ThisTypeAnnotation":case"VoidTypeAnnotation":break;default:return!1}return e==null||ee(s,e)}function vI(s,e){if(!s)return!1;switch(s.type){case"DeclareClass":case"DeclareFunction":case"DeclareInterface":case"DeclareModule":case"DeclareModuleExports":case"DeclareTypeAlias":case"DeclareOpaqueType":case"DeclareVariable":case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":case"InterfaceDeclaration":case"OpaqueType":case"TypeAlias":break;default:return!1}return e==null||ee(s,e)}function kI(s,e){if(!s)return!1;switch(s.type){case"DeclaredPredicate":case"InferredPredicate":break;default:return!1}return e==null||ee(s,e)}function DI(s,e){if(!s)return!1;switch(s.type){case"EnumBooleanBody":case"EnumNumberBody":case"EnumStringBody":case"EnumSymbolBody":break;default:return!1}return e==null||ee(s,e)}function LI(s,e){if(!s)return!1;switch(s.type){case"EnumBooleanMember":case"EnumNumberMember":case"EnumStringMember":case"EnumDefaultedMember":break;default:return!1}return e==null||ee(s,e)}function OI(s,e){if(!s)return!1;switch(s.type){case"JSXAttribute":case"JSXClosingElement":case"JSXElement":case"JSXEmptyExpression":case"JSXExpressionContainer":case"JSXSpreadChild":case"JSXIdentifier":case"JSXMemberExpression":case"JSXNamespacedName":case"JSXOpeningElement":case"JSXSpreadAttribute":case"JSXText":case"JSXFragment":case"JSXOpeningFragment":case"JSXClosingFragment":break;default:return!1}return e==null||ee(s,e)}function MI(s,e){if(!s)return!1;switch(s.type){case"Placeholder":case"V8IntrinsicIdentifier":break;default:return!1}return e==null||ee(s,e)}function FI(s,e){return!s||s.type!=="ClassAccessorProperty"?!1:e==null||ee(s,e)}function BI(s,e){if(!s)return!1;switch(s.type){case"TSParameterProperty":case"TSDeclareFunction":case"TSDeclareMethod":case"TSQualifiedName":case"TSCallSignatureDeclaration":case"TSConstructSignatureDeclaration":case"TSPropertySignature":case"TSMethodSignature":case"TSIndexSignature":case"TSAnyKeyword":case"TSBooleanKeyword":case"TSBigIntKeyword":case"TSIntrinsicKeyword":case"TSNeverKeyword":case"TSNullKeyword":case"TSNumberKeyword":case"TSObjectKeyword":case"TSStringKeyword":case"TSSymbolKeyword":case"TSUndefinedKeyword":case"TSUnknownKeyword":case"TSVoidKeyword":case"TSThisType":case"TSFunctionType":case"TSConstructorType":case"TSTypeReference":case"TSTypePredicate":case"TSTypeQuery":case"TSTypeLiteral":case"TSArrayType":case"TSTupleType":case"TSOptionalType":case"TSRestType":case"TSNamedTupleMember":case"TSUnionType":case"TSIntersectionType":case"TSConditionalType":case"TSInferType":case"TSParenthesizedType":case"TSTypeOperator":case"TSIndexedAccessType":case"TSMappedType":case"TSTemplateLiteralType":case"TSLiteralType":case"TSClassImplements":case"TSInterfaceHeritage":case"TSInterfaceDeclaration":case"TSInterfaceBody":case"TSTypeAliasDeclaration":case"TSInstantiationExpression":case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSEnumBody":case"TSEnumDeclaration":case"TSEnumMember":case"TSModuleDeclaration":case"TSModuleBlock":case"TSImportType":case"TSImportEqualsDeclaration":case"TSExternalModuleReference":case"TSNonNullExpression":case"TSExportAssignment":case"TSNamespaceExportDeclaration":case"TSTypeAnnotation":case"TSTypeParameterInstantiation":case"TSTypeParameterDeclaration":case"TSTypeParameter":break;default:return!1}return e==null||ee(s,e)}function _I(s,e){if(!s)return!1;switch(s.type){case"TSCallSignatureDeclaration":case"TSConstructSignatureDeclaration":case"TSPropertySignature":case"TSMethodSignature":case"TSIndexSignature":break;default:return!1}return e==null||ee(s,e)}function jI(s,e){if(!s)return!1;switch(s.type){case"TSAnyKeyword":case"TSBooleanKeyword":case"TSBigIntKeyword":case"TSIntrinsicKeyword":case"TSNeverKeyword":case"TSNullKeyword":case"TSNumberKeyword":case"TSObjectKeyword":case"TSStringKeyword":case"TSSymbolKeyword":case"TSUndefinedKeyword":case"TSUnknownKeyword":case"TSVoidKeyword":case"TSThisType":case"TSFunctionType":case"TSConstructorType":case"TSTypeReference":case"TSTypePredicate":case"TSTypeQuery":case"TSTypeLiteral":case"TSArrayType":case"TSTupleType":case"TSOptionalType":case"TSRestType":case"TSNamedTupleMember":case"TSUnionType":case"TSIntersectionType":case"TSConditionalType":case"TSInferType":case"TSParenthesizedType":case"TSTypeOperator":case"TSIndexedAccessType":case"TSMappedType":case"TSTemplateLiteralType":case"TSLiteralType":case"TSClassImplements":case"TSInterfaceHeritage":case"TSImportType":break;default:return!1}return e==null||ee(s,e)}function zu(s,e){if(!s)return!1;switch(s.type){case"TSAnyKeyword":case"TSBooleanKeyword":case"TSBigIntKeyword":case"TSIntrinsicKeyword":case"TSNeverKeyword":case"TSNullKeyword":case"TSNumberKeyword":case"TSObjectKeyword":case"TSStringKeyword":case"TSSymbolKeyword":case"TSUndefinedKeyword":case"TSUnknownKeyword":case"TSVoidKeyword":case"TSThisType":case"TSTemplateLiteralType":case"TSLiteralType":break;default:return!1}return e==null||ee(s,e)}function RI(s,e){return Be("isNumberLiteral","isNumericLiteral"),y("NumberLiteral",s,e)}function UI(s,e){return Be("isRegexLiteral","isRegExpLiteral"),y("RegexLiteral",s,e)}function VI(s,e){return Be("isRestProperty","isRestElement"),y("RestProperty",s,e)}function KI(s,e){return Be("isSpreadProperty","isSpreadElement"),y("SpreadProperty",s,e)}function qI(s,e){return Be("isModuleDeclaration","isImportOrExportDeclaration"),Ju(s,e)}function hu(s){return Pu(s)||ku(s)}function Hu(s,e,t){if(!hu(s))return!1;let i=Array.isArray(e)?e:e.split("."),r=[],n;for(n=s;hu(n);n=n.object??n.meta)r.push(n.property);if(r.push(n),r.length<i.length||!t&&r.length>i.length)return!1;for(let a=0,o=r.length-1;a<i.length;a++,o--){let c=r[o],l;if(tt(c))l=c.name;else if(Xs(c))l=c.value;else if(ha(c))l="this";else if(da(c))l="super";else if(ma(c))l="#"+c.id.name;else return!1;if(i[a]!==l)return!1}return!0}function Yu(s,e){let t=s.split(".");return i=>Hu(i,t,e)}var $I=Yu("React.Component");function JI(s){return!!s&&/^[a-z]/.test(s)}function ba(s,e){return s===e?!0:s==null||zs[e]?!1:!!$[e]?.includes(s)}function Gu(s,e){return!!(s===e||$s[s]?.includes(e))}function Ce(s,e,t){return e?ba(e.type,s)?t===void 0?!0:ee(e,t):!t&&e.type==="Placeholder"&&s in $?Gu(e.expectedNode,s):!1:!1}function Ws(s,e=!0){return typeof s!="string"||e&&(ss(s)||Xi(s,!0))?!1:Vs(s)}var XI=["consequent","body","alternate"],WI=["body","expressions"],zI=["left","init"],Ea=["leadingComments","trailingComments","innerComments"],Aa=["||","&&","??"],Qu=["++","--"],Zu=[">","<",">=","<="],ep=["==","===","!=","!=="],tp=[...ep,"in","instanceof"],sp=[...tp,...Zu],Ca=["-","/","%","*","**","&","|",">>",">>>","<<","^"],sa=["+",...Ca,...sp,"|>"],ia=["=","+=",...Ca.map(s=>s+"="),...Aa.map(s=>s+"=")],ip=["delete","!"],rp=["+","-","~"],np=["typeof"],ap=["void","throw",...ip,...rp,...np],ra={optional:["typeAnnotation","typeParameters","returnType"],force:["start","loc","end"]},xt={},zs={},$={},Ft={},Ia={},tr={},Hs={},wa={};function Yi(s){return Array.isArray(s)?"array":s===null?"null":typeof s}function Ie(s,...e){return Object.assign(s,...e)}function De(s){return{validate:s}}function k(...s){return De(A(...s))}function xe(s){return{validate:s,optional:!0}}function et(s,e){return{validate:s,default:e,optional:!1}}function te(...s){return{validate:A(...s),optional:!0}}function sr(s){return we(R("array"),Bt(s))}function me(...s){return sr(A(...s))}function oe(...s){return De(me(...s))}function Bt(s){let e=rs;function t(i,r,n){if(!Array.isArray(n))return;let a=0,o={toString(){return`${r}[${a}]`}};for(;a<n.length;a++){let c=n[a];s(i,o,c),e(i,o,c)}}return t.each=s,t}function ue(...s){function e(t,i,r){if(!s.includes(r))throw new TypeError(`Property ${i} expected value to be one of ${JSON.stringify(s)} but got ${JSON.stringify(r)}`)}return e.oneOf=s,e}var Na=[];function A(...s){let e=new Set;Na.push({types:s,set:e});function t(i,r,n){let a=n?.type;if(a!=null){if(e.has(a)){rs(i,r,n);return}if(a==="Placeholder"){for(let o of s)if(Ce(o,n)){rs(i,r,n);return}}}throw new TypeError(`Property ${r} of ${i.type} expected node to be of a type ${JSON.stringify(s)} but instead got ${JSON.stringify(a)}`)}return t.oneOfNodeTypes=s,t}function ir(...s){function e(t,i,r){let n=Yi(r);for(let a of s)if(n===a||Ce(a,r)){rs(t,i,r);return}throw new TypeError(`Property ${i} of ${t.type} expected node to be of a type ${JSON.stringify(s)} but instead got ${JSON.stringify(r?.type)}`)}return e.oneOfNodeOrValueTypes=s,e}function R(s){function e(t,i,r){if(Yi(r)!==s)throw new TypeError(`Property ${i} expected type of ${s} but got ${Yi(r)}`)}return e.type=s,e}function op(s){let e=Object.keys(s);function t(i,r,n){let a=[];for(let o of e)try{Fa(i,o,n[o],s[o])}catch(c){if(c instanceof TypeError){a.push(c.message);continue}throw c}if(a.length)throw new TypeError(`Property ${r} of ${i.type} expected to have the following:
14
+ ${a.join(`
15
+ `)}`)}return t.shapeOf=s,t}function va(){function s(e){let t=e;for(;e;){let{type:i}=t;if(i==="OptionalCallExpression"){if(t.optional)return;t=t.callee;continue}if(i==="OptionalMemberExpression"){if(t.optional)return;t=t.object;continue}break}throw new TypeError(`Non-optional ${e.type} must chain from an optional OptionalMemberExpression or OptionalCallExpression. Found chain from ${t?.type}`)}return s}function we(...s){function e(...t){for(let i of s)i(...t)}if(e.chainOf=s,s.length>=2&&"type"in s[0]&&s[0].type==="array"&&!("each"in s[1]))throw new Error('An assertValueType("array") validator can only be followed by an assertEach(...) validator.');return e}var HI=new Set(["aliases","builder","deprecatedAlias","fields","inherits","visitor","validate","unionShape"]),YI=new Set(["default","optional","deprecated","validate"]),na={};function as(...s){return(e,t={})=>{let i=t.aliases;i||(t.inherits&&(i=na[t.inherits].aliases?.slice()),i??=[],t.aliases=i);let r=s.filter(n=>!i.includes(n));i.unshift(...r),st(e,t)}}function st(s,e={}){let t=e.inherits&&na[e.inherits]||{},i=e.visitor||t.visitor||[],r=e.aliases||t.aliases||[],n=e.builder||t.builder||e.visitor||[],a=e.fields;if(!a&&(a={},t.fields)){let o=Object.getOwnPropertyNames(t.fields);for(let c of o){let l=t.fields[c],u=l.default;if(Array.isArray(u)?u.length>0:u&&typeof u=="object")throw new Error("field defaults can only be primitives or empty arrays currently");a[c]={default:Array.isArray(u)?[]:u,optional:l.optional,deprecated:l.deprecated,validate:l.validate}}}for(let o of Object.keys(e))if(!HI.has(o))throw new Error(`Unknown type option "${o}" on ${s}`);e.deprecatedAlias&&(tr[e.deprecatedAlias]=s);for(let o of i.concat(n))a[o]=a[o]||{};for(let o of Object.keys(a)){let c=a[o];c.default===null&&(c.optional??=!0),c.default===void 0?(c.default=null,c.optional??=!1):!c.validate&&c.default!=null&&(c.validate=R(Yi(c.default)));for(let l of Object.keys(c))if(!YI.has(l))throw new Error(`Unknown field key "${l}" on ${s}.${o}`)}xt[s]=e.visitor=i,Ia[s]=e.builder=n,Ft[s]=e.fields=a,zs[s]=e.aliases=r,r.forEach(o=>{$[o]=$[o]||[],$[o].push(s)}),e.validate&&(Hs[s]=e.validate),e.unionShape&&(wa[s]=e.unionShape),na[s]=e}var GI=Object.defineProperty({__proto__:null,ALIAS_KEYS:zs,BUILDER_KEYS:Ia,DEPRECATED_KEYS:tr,FLIPPED_ALIAS_KEYS:$,NODE_FIELDS:Ft,NODE_PARENT_VALIDATIONS:Hs,NODE_UNION_SHAPES__PRIVATE:wa,VISITOR_KEYS:xt,allExpandedTypes:Na,arrayOf:sr,arrayOfType:me,assertEach:Bt,assertNodeOrValueType:ir,assertNodeType:A,assertOneOf:ue,assertOptionalChainStart:va,assertShape:op,assertValueType:R,chain:we,combine:Ie,default:st,defineAliasedType:as,validate:De,validateArrayOfType:oe,validateDefault:et,validateOptional:xe,validateOptionalType:te,validateType:k},Symbol.toStringTag,{value:"Module"}),os=(s=!1)=>({unionShape:{discriminator:"computed",shapes:[{name:"computed",value:[!0],properties:{key:{validate:A("Expression")}}},{name:"nonComputed",value:[!1],properties:{key:{validate:s?A("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","PrivateName"):A("Identifier","StringLiteral","NumericLiteral","BigIntLiteral")}}}]}}),cp={unionShape:{discriminator:"computed",shapes:[{name:"computed",value:[!0],properties:{property:{validate:A("Expression")}}},{name:"nonComputed",value:[!1],properties:{property:{validate:A("Identifier","PrivateName")}}}]}},F=as("Standardized");F("ArrayExpression",{fields:{elements:{validate:sr(ir("null","Expression","SpreadElement")),default:void 0}},visitor:["elements"],aliases:["Expression"]});F("AssignmentExpression",{fields:{operator:{validate:Ie((function(){let s=ue(...ia),e=ue("=");return function(t,i,r){(Ce("Pattern",t.left)?e:s)(t,i,r)}})(),{oneOf:ia})},left:{validate:A("Identifier","MemberExpression","OptionalMemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression")},right:{validate:A("Expression")}},builder:["operator","left","right"],visitor:["left","right"],aliases:["Expression"]});F("BinaryExpression",{builder:["operator","left","right"],fields:{operator:{validate:ue(...sa)},left:{validate:(function(){let s=A("Expression"),e=A("Expression","PrivateName");return Ie(function(i,r,n){(i.operator==="in"?e:s)(i,r,n)},{oneOfNodeTypes:["Expression","PrivateName"]})})()},right:{validate:A("Expression")}},unionShape:{discriminator:"operator",shapes:[{name:"in",value:["in"],properties:{left:{validate:A("Expression","PrivateName")}}},{name:"notIn",value:sa.filter(s=>s!=="in"),properties:{left:{validate:A("Expression")}}}]},visitor:["left","right"],aliases:["Binary","Expression"]});F("InterpreterDirective",{builder:["value"],fields:{value:{validate:R("string")}}});F("Directive",{visitor:["value"],fields:{value:{validate:A("DirectiveLiteral")}}});F("DirectiveLiteral",{builder:["value"],fields:{value:{validate:R("string")}}});F("BlockStatement",{builder:["body","directives"],visitor:["directives","body"],fields:{directives:{validate:me("Directive"),default:[]},body:oe("Statement")},aliases:["Scopable","BlockParent","Block","Statement"]});F("BreakStatement",{visitor:["label"],fields:{label:{validate:A("Identifier"),optional:!0}},aliases:["Statement","Terminatorless","CompletionStatement"]});F("CallExpression",{visitor:["callee","typeArguments","arguments"],builder:["callee","arguments"],aliases:["Expression"],fields:{callee:{validate:A("Expression","Super","Import","V8IntrinsicIdentifier")},arguments:oe("Expression","SpreadElement","ArgumentPlaceholder"),typeArguments:{validate:A("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0}}});F("CatchClause",{visitor:["param","body"],fields:{param:{validate:A("Identifier","ArrayPattern","ObjectPattern"),optional:!0},body:{validate:A("BlockStatement")}},aliases:["Scopable","BlockParent"]});F("ConditionalExpression",{visitor:["test","consequent","alternate"],fields:{test:{validate:A("Expression")},consequent:{validate:A("Expression")},alternate:{validate:A("Expression")}},aliases:["Expression","Conditional"]});F("ContinueStatement",{visitor:["label"],fields:{label:{validate:A("Identifier"),optional:!0}},aliases:["Statement","Terminatorless","CompletionStatement"]});F("DebuggerStatement",{aliases:["Statement"]});F("DoWhileStatement",{builder:["test","body"],visitor:["body","test"],fields:{test:{validate:A("Expression")},body:{validate:A("Statement")}},aliases:["Statement","BlockParent","Loop","While","Scopable"]});F("EmptyStatement",{aliases:["Statement"]});F("ExpressionStatement",{visitor:["expression"],fields:{expression:{validate:A("Expression")}},aliases:["Statement","ExpressionWrapper"]});F("File",{builder:["program","comments","tokens"],visitor:["program"],fields:{program:{validate:A("Program")},comments:{validate:Bt(A("CommentBlock","CommentLine")),optional:!0},tokens:{validate:Bt(Object.assign(()=>{},{type:"any"})),optional:!0}}});F("ForInStatement",{visitor:["left","right","body"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:A("VariableDeclaration","Identifier","MemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression")},right:{validate:A("Expression")},body:{validate:A("Statement")}}});F("ForStatement",{visitor:["init","test","update","body"],aliases:["Scopable","Statement","For","BlockParent","Loop"],fields:{init:{validate:A("VariableDeclaration","Expression"),optional:!0},test:{validate:A("Expression"),optional:!0},update:{validate:A("Expression"),optional:!0},body:{validate:A("Statement")}}});var Ys=()=>({params:oe("FunctionParameter"),generator:{default:!1},async:{default:!1}}),cs=()=>({returnType:{validate:A("TypeAnnotation","TSTypeAnnotation"),optional:!0},typeParameters:{validate:A("TypeParameterDeclaration","TSTypeParameterDeclaration"),optional:!0}}),lp=()=>({...Ys(),declare:{validate:R("boolean"),optional:!0},id:{validate:A("Identifier"),optional:!0}});F("FunctionDeclaration",{builder:["id","params","body","generator","async"],visitor:["id","typeParameters","params","predicate","returnType","body"],fields:{...lp(),...cs(),body:{validate:A("BlockStatement")},predicate:{validate:A("FlowPredicate"),optional:!0}},aliases:["Scopable","Function","BlockParent","FunctionParent","Statement","Pureish","Declaration"],validate:(function(){let s=A("Identifier");return function(e,t,i){Ce("ExportDefaultDeclaration",e)||s(i,"id",i.id)}})()});F("FunctionExpression",{inherits:"FunctionDeclaration",aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:{...Ys(),...cs(),id:{validate:A("Identifier"),optional:!0},body:{validate:A("BlockStatement")},predicate:{validate:A("FlowPredicate"),optional:!0}}});var ls=()=>({typeAnnotation:{validate:A("TypeAnnotation","TSTypeAnnotation"),optional:!0},optional:{validate:R("boolean"),optional:!0},decorators:{validate:me("Decorator"),optional:!0}});F("Identifier",{builder:["name"],visitor:["typeAnnotation","decorators"],aliases:["Expression","FunctionParameter","PatternLike","LVal","TSEntityName"],fields:{...ls(),name:{validate:we(R("string"),Ie(function(s,e,t){if(!Ws(t,!1))throw new TypeError(`"${t}" is not a valid identifier name`)},{type:"string"}))}},validate:function(s,e,t){let i=/\.(\w+)$/.exec(e.toString());if(!i)return;let[,r]=i,n={computed:!1};if(r==="property"){if(Ce("MemberExpression",s,n)||Ce("OptionalMemberExpression",s,n))return}else if(r==="key"){if(Ce("Property",s,n)||Ce("Method",s,n))return}else if(r==="exported"){if(Ce("ExportSpecifier",s))return}else if(r==="imported"){if(Ce("ImportSpecifier",s,{imported:t}))return}else if(r==="meta"&&Ce("MetaProperty",s,{meta:t}))return;if((ss(t.name)||Ks(t.name,!1))&&t.name!=="this")throw new TypeError(`"${t.name}" is not a valid identifier`)}});F("IfStatement",{visitor:["test","consequent","alternate"],aliases:["Statement","Conditional"],fields:{test:{validate:A("Expression")},consequent:{validate:A("Statement")},alternate:{optional:!0,validate:A("Statement")}}});F("LabeledStatement",{visitor:["label","body"],aliases:["Statement"],fields:{label:{validate:A("Identifier")},body:{validate:A("Statement")}}});F("StringLiteral",{builder:["value"],fields:{value:{validate:R("string")}},aliases:["Expression","Pureish","Literal","Immutable"]});F("NumericLiteral",{builder:["value"],deprecatedAlias:"NumberLiteral",fields:{value:{validate:we(R("number"),Ie(function(s,e,t){if(1/t<0||!Number.isFinite(t)){let i=new Error(`NumericLiterals must be non-negative finite numbers. You can use t.valueToNode(${t}) instead.`);if(!new Error().stack.includes("regenerator"))throw i}},{type:"number"}))}},aliases:["Expression","Pureish","Literal","Immutable"]});F("NullLiteral",{aliases:["Expression","Pureish","Literal","Immutable"]});F("BooleanLiteral",{builder:["value"],fields:{value:{validate:R("boolean")}},aliases:["Expression","Pureish","Literal","Immutable"]});F("RegExpLiteral",{builder:["pattern","flags"],deprecatedAlias:"RegexLiteral",aliases:["Expression","Pureish","Literal"],fields:{pattern:{validate:R("string")},flags:{validate:we(R("string"),Ie(function(s,e,t){let i=/[^dgimsuvy]/.exec(t);if(i)throw new TypeError(`"${i[0]}" is not a valid RegExp flag`)},{type:"string"})),default:""}}});F("LogicalExpression",{builder:["operator","left","right"],visitor:["left","right"],aliases:["Binary","Expression"],fields:{operator:{validate:ue(...Aa)},left:{validate:A("Expression")},right:{validate:A("Expression")}}});F("MemberExpression",{builder:["object","property","computed"],visitor:["object","property"],aliases:["Expression","LVal","PatternLike"],...cp,fields:{object:{validate:A("Expression","Super")},property:{validate:(function(){let s=A("Identifier","PrivateName"),e=A("Expression");return Ie(function(i,r,n){(i.computed?e:s)(i,r,n)},{oneOfNodeTypes:["Expression","Identifier","PrivateName"]})})()},computed:{default:!1}}});F("NewExpression",{inherits:"CallExpression",fields:{callee:{validate:A("Expression","V8IntrinsicIdentifier")},arguments:oe("Expression","SpreadElement","ArgumentPlaceholder"),typeArguments:{validate:A("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0}}});F("Program",{visitor:["directives","body"],builder:["body","directives","sourceType","interpreter"],fields:{sourceType:{validate:ue("script","module"),default:"script"},interpreter:{validate:A("InterpreterDirective"),default:null,optional:!0},directives:{validate:me("Directive"),default:[]},body:oe("Statement")},aliases:["Scopable","BlockParent","Block"]});F("ObjectExpression",{visitor:["properties"],aliases:["Expression"],fields:{properties:oe("ObjectMethod","ObjectProperty","SpreadElement")}});F("ObjectMethod",{builder:["kind","key","params","body","computed","generator","async"],visitor:["decorators","key","typeParameters","params","returnType","body"],...os(),fields:{...Ys(),...cs(),kind:{validate:ue("method","get","set")},computed:{default:!1},key:{validate:(function(){let s=A("Identifier","StringLiteral","NumericLiteral","BigIntLiteral"),e=A("Expression");return Ie(function(i,r,n){(i.computed?e:s)(i,r,n)},{oneOfNodeTypes:["Expression","Identifier","StringLiteral","NumericLiteral","BigIntLiteral"]})})()},decorators:{validate:me("Decorator"),optional:!0},body:{validate:A("BlockStatement")}},aliases:["UserWhitespacable","Function","Scopable","BlockParent","FunctionParent","Method","ObjectMember"]});F("ObjectProperty",{builder:["key","value","computed","shorthand"],...os(!0),fields:{computed:{default:!1},key:{validate:(function(){let s=A("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","PrivateName"),e=A("Expression");return Ie(function(i,r,n){(i.computed?e:s)(i,r,n)},{oneOfNodeTypes:["Expression","Identifier","StringLiteral","NumericLiteral","BigIntLiteral","PrivateName"]})})()},value:{validate:A("Expression","PatternLike")},shorthand:{validate:we(R("boolean"),Ie(function(s,e,t){if(t){if(s.computed)throw new TypeError("Property shorthand of ObjectProperty cannot be true if computed is true");if(!Ce("Identifier",s.key))throw new TypeError("Property shorthand of ObjectProperty cannot be true if key is not an Identifier")}},{type:"boolean"})),default:!1},decorators:{validate:me("Decorator"),optional:!0}},visitor:["decorators","key","value"],aliases:["UserWhitespacable","Property","ObjectMember"],validate:(function(){let s=A("Identifier","Pattern","TSAsExpression","TSSatisfiesExpression","TSNonNullExpression","TSTypeAssertion"),e=A("Expression");return function(t,i,r){(Ce("ObjectPattern",t)?s:e)(r,"value",r.value)}})()});F("RestElement",{visitor:["argument","typeAnnotation"],builder:["argument"],aliases:["FunctionParameter","PatternLike"],deprecatedAlias:"RestProperty",fields:{...ls(),argument:{validate:A("Identifier","ArrayPattern","ObjectPattern","MemberExpression","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression")}},validate:function(s,e){let t=/(\w+)\[(\d+)\]/.exec(e.toString());if(!t)throw new Error("Internal Babel error: malformed key.");let[,i,r]=t;if(s[i].length>+r+1)throw new TypeError(`RestElement must be last element of ${i}`)}});F("ReturnStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:A("Expression"),optional:!0}}});F("SequenceExpression",{visitor:["expressions"],fields:{expressions:oe("Expression")},aliases:["Expression"]});F("ParenthesizedExpression",{visitor:["expression"],aliases:["Expression","ExpressionWrapper"],fields:{expression:{validate:A("Expression")}}});F("SwitchCase",{visitor:["test","consequent"],fields:{test:{validate:A("Expression"),optional:!0},consequent:oe("Statement")}});F("SwitchStatement",{visitor:["discriminant","cases"],aliases:["Statement","BlockParent","Scopable"],fields:{discriminant:{validate:A("Expression")},cases:oe("SwitchCase")}});F("ThisExpression",{aliases:["Expression","TSEntityName"]});F("ThrowStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:A("Expression")}}});F("TryStatement",{visitor:["block","handler","finalizer"],aliases:["Statement"],fields:{block:{validate:we(A("BlockStatement"),Ie(function(s){if(!s.handler&&!s.finalizer)throw new TypeError("TryStatement expects either a handler or finalizer, or both")},{oneOfNodeTypes:["BlockStatement"]}))},handler:{optional:!0,validate:A("CatchClause")},finalizer:{optional:!0,validate:A("BlockStatement")}}});F("UnaryExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!0},argument:{validate:A("Expression")},operator:{validate:ue(...ap)}},visitor:["argument"],aliases:["UnaryLike","Expression"]});F("UpdateExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!1},argument:{validate:A("Identifier","MemberExpression")},operator:{validate:ue(...Qu)}},visitor:["argument"],aliases:["Expression"]});F("VariableDeclaration",{builder:["kind","declarations"],visitor:["declarations"],aliases:["Statement","Declaration"],fields:{declare:{validate:R("boolean"),optional:!0},kind:{validate:ue("var","let","const","using","await using")},declarations:oe("VariableDeclarator")},validate:(()=>{let s=A("Identifier","Placeholder"),e=A("Identifier","ArrayPattern","ObjectPattern","Placeholder"),t=A("Identifier","VoidPattern","Placeholder");return function(i,r,n){let{kind:a,declarations:o}=n,c=Ce("ForXStatement",i,{left:n});if(c&&o.length!==1)throw new TypeError(`Exactly one VariableDeclarator is required in the VariableDeclaration of a ${i.type}`);for(let l of o)a==="const"||a==="let"||a==="var"?!c&&!l.init?s(l,"id",l.id):e(l,"id",l.id):t(l,"id",l.id)}})()});F("VariableDeclarator",{visitor:["id","init"],fields:{id:{validate:A("Identifier","ArrayPattern","ObjectPattern","VoidPattern")},definite:{optional:!0,validate:R("boolean")},init:{optional:!0,validate:A("Expression")}}});F("WhileStatement",{visitor:["test","body"],aliases:["Statement","BlockParent","Loop","While","Scopable"],fields:{test:{validate:A("Expression")},body:{validate:A("Statement")}}});F("WithStatement",{visitor:["object","body"],aliases:["Statement"],fields:{object:{validate:A("Expression")},body:{validate:A("Statement")}}});F("AssignmentPattern",{visitor:["left","right","decorators"],builder:["left","right"],aliases:["FunctionParameter","Pattern","PatternLike"],fields:{...ls(),left:{validate:A("Identifier","ObjectPattern","ArrayPattern","MemberExpression","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression")},right:{validate:A("Expression")}}});F("ArrayPattern",{visitor:["elements","typeAnnotation"],builder:["elements"],aliases:["FunctionParameter","Pattern","PatternLike","LVal"],fields:{...ls(),elements:{validate:we(R("array"),Bt(ir("null","PatternLike")))}}});F("ArrowFunctionExpression",{builder:["params","body","async"],visitor:["typeParameters","params","predicate","returnType","body"],aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:{...Ys(),generator:{default:null,optional:!0,validate:Ie((s,e,t)=>{if(t)throw new TypeError("ArrowFunctionExpression cannot be a generator")},{type:"boolean"})},...cs(),expression:{optional:!0,validate:R("boolean")},body:{validate:A("BlockStatement","Expression")},predicate:{validate:A("FlowPredicate"),optional:!0}}});F("ClassBody",{visitor:["body"],fields:{body:oe("ClassMethod","ClassPrivateMethod","ClassProperty","ClassPrivateProperty","ClassAccessorProperty","TSDeclareMethod","TSIndexSignature","StaticBlock")}});F("ClassExpression",{builder:["id","superClass","body","decorators"],visitor:["decorators","id","typeParameters","superClass","superTypeArguments","mixins","implements","body"],aliases:["Scopable","Class","Expression"],fields:{id:{validate:A("Identifier"),optional:!0},typeParameters:{validate:A("TypeParameterDeclaration","TSTypeParameterDeclaration"),optional:!0},body:{validate:A("ClassBody")},superClass:{optional:!0,validate:A("Expression")},superTypeArguments:{validate:A("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0},implements:{validate:me("TSClassImplements","ClassImplements"),optional:!0},decorators:{validate:me("Decorator"),optional:!0},mixins:{validate:A("InterfaceExtends"),optional:!0}}});F("ClassDeclaration",{inherits:"ClassExpression",aliases:["Scopable","Class","Statement","Declaration"],fields:{id:{validate:A("Identifier"),optional:!0},typeParameters:{validate:A("TypeParameterDeclaration","TSTypeParameterDeclaration"),optional:!0},body:{validate:A("ClassBody")},superClass:{optional:!0,validate:A("Expression")},superTypeArguments:{validate:A("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0},implements:{validate:me("TSClassImplements","ClassImplements"),optional:!0},decorators:{validate:me("Decorator"),optional:!0},mixins:{validate:A("InterfaceExtends"),optional:!0},declare:{validate:R("boolean"),optional:!0},abstract:{validate:R("boolean"),optional:!0}},validate:(function(){let s=A("Identifier");return function(e,t,i){Ce("ExportDefaultDeclaration",e)||s(i,"id",i.id)}})()});var Gs={attributes:{optional:!0,validate:me("ImportAttribute")}};F("ExportAllDeclaration",{visitor:["source","attributes"],aliases:["Statement","Declaration","ImportOrExportDeclaration","ExportDeclaration"],fields:{source:{validate:A("StringLiteral")},exportKind:xe(ue("type","value")),...Gs}});F("ExportDefaultDeclaration",{visitor:["declaration"],aliases:["Statement","Declaration","ImportOrExportDeclaration","ExportDeclaration"],fields:{declaration:k("FunctionDeclaration","ClassDeclaration","Expression","TSDeclareFunction","TSInterfaceDeclaration","EnumDeclaration"),exportKind:xe(ue("value"))}});F("ExportNamedDeclaration",{builder:["declaration","specifiers","source","attributes"],visitor:["declaration","specifiers","source","attributes"],aliases:["Statement","Declaration","ImportOrExportDeclaration","ExportDeclaration"],fields:{declaration:{optional:!0,validate:we(A("Declaration"),Ie(function(s,e,t){if(t&&s.specifiers.length)throw new TypeError("Only declaration or specifiers is allowed on ExportNamedDeclaration");if(t&&s.source)throw new TypeError("Cannot export a declaration from a source")},{oneOfNodeTypes:["VariableDeclaration","FunctionDeclaration","ClassDeclaration","TSDeclareFunction","TSEnumDeclaration","TSImportEqualsDeclaration","TSInterfaceDeclaration","TSModuleDeclaration","TSTypeAliasDeclaration","EnumDeclaration","InterfaceDeclaration","OpaqueType","TypeAlias"]}))},...Gs,specifiers:{default:[],validate:sr((function(){let s=A("ExportSpecifier","ExportDefaultSpecifier","ExportNamespaceSpecifier"),e=A("ExportSpecifier");return Ie(function(t,i,r){(t.source?s:e)(t,i,r)},{oneOfNodeTypes:["ExportSpecifier","ExportDefaultSpecifier","ExportNamespaceSpecifier"]})})())},source:{validate:A("StringLiteral"),optional:!0},exportKind:xe(ue("type","value"))}});F("ExportSpecifier",{visitor:["local","exported"],aliases:["ModuleSpecifier"],fields:{local:{validate:A("Identifier","StringLiteral")},exported:{validate:A("Identifier","StringLiteral")},exportKind:{validate:ue("type","value"),optional:!0}}});F("ForOfStatement",{visitor:["left","right","body"],builder:["left","right","body","await"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:(function(){let s=A("VariableDeclaration"),e=A("Identifier","MemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression");return Ie(function(t,i,r){Ce("VariableDeclaration",r)?s(t,i,r):e(t,i,r)},{oneOfNodeTypes:["VariableDeclaration","Identifier","MemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression"]})})()},right:{validate:A("Expression")},body:{validate:A("Statement")},await:{default:!1}}});F("ImportDeclaration",{builder:["specifiers","source","attributes"],visitor:["specifiers","source","attributes"],aliases:["Statement","Declaration","ImportOrExportDeclaration"],fields:{...Gs,module:{optional:!0,validate:R("boolean")},phase:{default:null,validate:ue("source","defer")},specifiers:oe("ImportSpecifier","ImportDefaultSpecifier","ImportNamespaceSpecifier"),source:{validate:A("StringLiteral")},importKind:{validate:ue("type","typeof","value"),optional:!0}}});F("ImportDefaultSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:A("Identifier")}}});F("ImportNamespaceSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:A("Identifier")}}});F("ImportSpecifier",{visitor:["imported","local"],builder:["local","imported"],aliases:["ModuleSpecifier"],fields:{local:{validate:A("Identifier")},imported:{validate:A("Identifier","StringLiteral")},importKind:{validate:ue("type","typeof","value"),optional:!0}}});F("MetaProperty",{visitor:["meta","property"],aliases:["Expression"],fields:{meta:{validate:we(A("Identifier"),Ie(function(s,e,t){let i;switch(t.name){case"function":i="sent";break;case"new":i="target";break;case"import":i="meta";break}if(!Ce("Identifier",s.property,{name:i}))throw new TypeError("Unrecognised MetaProperty")},{oneOfNodeTypes:["Identifier"]}))},property:{validate:A("Identifier")}}});var ka=()=>({abstract:{validate:R("boolean"),default:!1,optional:!0},accessibility:{validate:ue("public","private","protected"),optional:!0},static:{default:!1},override:{optional:!0,validate:R("boolean"),default:!1},computed:{default:!1},optional:{validate:R("boolean"),optional:!0},key:{validate:we((function(){let s=A("Identifier","StringLiteral","NumericLiteral","BigIntLiteral"),e=A("Expression","PrivateName");return function(t,i,r){(t.computed?e:s)(t,i,r)}})(),A("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","Expression","PrivateName"))}}),Da=(s=!0)=>({...Ys(),...ka(),params:oe("FunctionParameter","TSParameterProperty"),kind:{validate:ue("get","set","method","constructor"),default:"method"},access:{validate:we(R("string"),ue("public","private","protected")),optional:!0},...s?{decorators:{validate:me("Decorator"),optional:!0}}:{}});F("ClassMethod",{aliases:["Function","Scopable","BlockParent","FunctionParent","Method"],builder:["kind","key","params","body","computed","static","generator","async"],visitor:["decorators","key","typeParameters","params","returnType","body"],...os(),fields:{...Da(),...cs(),body:{validate:A("BlockStatement")}}});F("ObjectPattern",{visitor:["decorators","properties","typeAnnotation"],builder:["properties"],aliases:["FunctionParameter","Pattern","PatternLike","LVal"],fields:{...ls(),properties:oe("RestElement","ObjectProperty")}});F("SpreadElement",{visitor:["argument"],aliases:["UnaryLike"],deprecatedAlias:"SpreadProperty",fields:{argument:{validate:A("Expression")}}});F("Super");F("TaggedTemplateExpression",{visitor:["tag","typeArguments","quasi"],builder:["tag","quasi"],aliases:["Expression"],fields:{tag:{validate:A("Expression")},quasi:{validate:A("TemplateLiteral")},typeArguments:{validate:A("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0}}});F("TemplateElement",{builder:["value","tail"],fields:{value:{validate:we(op({raw:{validate:R("string")},cooked:{validate:R("string"),optional:!0}}),function(e){let t=e.value.raw,i=!1,r=()=>{throw new Error("Internal @babel/types error.")},{str:n,firstInvalidLoc:a}=uu("template",t,0,0,0,{unterminated(){i=!0},strictNumericEscape:r,invalidEscapeSequence:r,numericSeparatorInEscapeSequence:r,unexpectedNumericSeparator:r,invalidDigit:r,invalidCodePoint:r});if(!i)throw new Error("Invalid raw");e.value.cooked=a?null:n})},tail:{default:!1}}});F("TemplateLiteral",{visitor:["quasis","expressions"],aliases:["Expression","Literal"],fields:{quasis:oe("TemplateElement"),expressions:{validate:we(R("array"),Bt(A("Expression","TSType")),function(s,e,t){if(s.quasis.length!==t.length+1)throw new TypeError(`Number of ${s.type} quasis should be exactly one more than the number of expressions.
16
+ Expected ${t.length+1} quasis but got ${s.quasis.length}`)})}}});F("YieldExpression",{builder:["argument","delegate"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{delegate:{validate:we(R("boolean"),Ie(function(s,e,t){if(t&&!s.argument)throw new TypeError("Property delegate of YieldExpression cannot be true if there is no argument")},{type:"boolean"})),default:!1},argument:{optional:!0,validate:A("Expression")}}});F("AwaitExpression",{builder:["argument"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{argument:{validate:A("Expression")}}});F("ImportExpression",{visitor:["source","options"],aliases:["Expression"],fields:{phase:{default:null,validate:ue("source","defer")},source:{validate:A("Expression")},options:{validate:A("Expression"),optional:!0}}});F("Import");F("BigIntLiteral",{builder:["value"],fields:{value:{validate:R("bigint")}},aliases:["Expression","Pureish","Literal","Immutable"]});F("ExportNamespaceSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:A("Identifier","StringLiteral")}}});F("OptionalMemberExpression",{builder:["object","property","computed","optional"],visitor:["object","property"],aliases:["Expression"],...cp,fields:{object:{validate:A("Expression")},property:{validate:(function(){let s=A("Identifier","PrivateName"),e=A("Expression");return Ie(function(t,i,r){(t.computed?e:s)(t,i,r)},{oneOfNodeTypes:["Expression","PrivateName"]})})()},computed:{default:!1},optional:{validate:we(R("boolean"),va())}}});F("OptionalCallExpression",{visitor:["callee","typeArguments","arguments"],builder:["callee","arguments","optional"],aliases:["Expression"],fields:{callee:{validate:A("Expression")},arguments:oe("Expression","SpreadElement","ArgumentPlaceholder"),optional:{validate:we(R("boolean"),va())},typeArguments:{validate:A("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0}}});F("ClassProperty",{visitor:["decorators","variance","key","typeAnnotation","value"],builder:["key","value","typeAnnotation","decorators","computed","static"],aliases:["Property"],...os(),fields:{...ka(),value:{validate:A("Expression"),optional:!0},definite:{validate:R("boolean"),optional:!0},typeAnnotation:{validate:A("TypeAnnotation","TSTypeAnnotation"),optional:!0},decorators:{validate:me("Decorator"),optional:!0},readonly:{validate:R("boolean"),optional:!0},declare:{validate:R("boolean"),optional:!0},variance:{validate:A("Variance"),optional:!0}}});F("ClassPrivateProperty",{visitor:["decorators","variance","key","typeAnnotation","value"],builder:["key","value","decorators","static"],aliases:["Property","Private"],fields:{key:{validate:A("PrivateName")},value:{validate:A("Expression"),optional:!0},typeAnnotation:{validate:A("TypeAnnotation","TSTypeAnnotation"),optional:!0},decorators:{validate:me("Decorator"),optional:!0},static:{validate:R("boolean"),default:!1},readonly:{validate:R("boolean"),optional:!0},optional:{validate:R("boolean"),optional:!0},definite:{validate:R("boolean"),optional:!0},variance:{validate:A("Variance"),optional:!0}}});F("ClassPrivateMethod",{builder:["kind","key","params","body","static"],visitor:["decorators","key","typeParameters","params","returnType","body"],aliases:["Function","Scopable","BlockParent","FunctionParent","Method","Private"],fields:{...Da(),...cs(),kind:{validate:ue("get","set","method"),default:"method"},key:{validate:A("PrivateName")},body:{validate:A("BlockStatement")}}});F("PrivateName",{visitor:["id"],aliases:["Private"],fields:{id:{validate:A("Identifier")}}});F("StaticBlock",{visitor:["body"],fields:{body:oe("Statement")},aliases:["Scopable","BlockParent","FunctionParent"]});F("ImportAttribute",{visitor:["key","value"],fields:{key:{validate:A("Identifier","StringLiteral")},value:{validate:A("StringLiteral")}}});var K=as("Flow"),La=s=>{let e=s==="DeclareClass";K(s,{builder:["id","typeParameters","extends","body"],visitor:["id","typeParameters","extends",...e?["mixins","implements"]:[],"body"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:k("Identifier"),typeParameters:te("TypeParameterDeclaration"),extends:xe(me("InterfaceExtends")),...e?{mixins:xe(me("InterfaceExtends")),implements:xe(me("ClassImplements"))}:{},body:k("ObjectTypeAnnotation")}})};K("AnyTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});K("ArrayTypeAnnotation",{visitor:["elementType"],aliases:["FlowType"],fields:{elementType:k("FlowType")}});K("BooleanTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});K("BooleanLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:De(R("boolean"))}});K("NullLiteralTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});K("ClassImplements",{visitor:["id","typeParameters"],fields:{id:k("Identifier"),typeParameters:te("TypeParameterInstantiation")}});La("DeclareClass");K("DeclareFunction",{builder:["id"],visitor:["id","predicate"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:k("Identifier"),predicate:te("FlowPredicate")}});La("DeclareInterface");K("DeclareModule",{builder:["id","body","kind"],visitor:["id","body"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:k("Identifier","StringLiteral"),body:k("BlockStatement"),kind:xe(ue("CommonJS","ES"))}});K("DeclareModuleExports",{visitor:["typeAnnotation"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{typeAnnotation:k("TypeAnnotation")}});K("DeclareTypeAlias",{visitor:["id","typeParameters","right"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:k("Identifier"),typeParameters:te("TypeParameterDeclaration"),right:k("FlowType")}});K("DeclareOpaqueType",{visitor:["id","typeParameters","supertype"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:k("Identifier"),typeParameters:te("TypeParameterDeclaration"),supertype:te("FlowType"),impltype:te("FlowType")}});K("DeclareVariable",{visitor:["id"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:k("Identifier")}});K("DeclareExportDeclaration",{visitor:["declaration","specifiers","source","attributes"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{declaration:te("Flow"),specifiers:xe(me("ExportSpecifier","ExportNamespaceSpecifier")),source:te("StringLiteral"),default:xe(R("boolean")),...Gs}});K("DeclareExportAllDeclaration",{visitor:["source","attributes"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{source:k("StringLiteral"),exportKind:xe(ue("type","value")),...Gs}});K("DeclaredPredicate",{visitor:["value"],aliases:["FlowPredicate"],fields:{value:k("Expression")}});K("ExistsTypeAnnotation",{aliases:["FlowType"]});K("FunctionTypeAnnotation",{builder:["typeParameters","params","rest","returnType"],visitor:["typeParameters","this","params","rest","returnType"],aliases:["FlowType"],fields:{typeParameters:te("TypeParameterDeclaration"),params:oe("FunctionTypeParam"),rest:te("FunctionTypeParam"),this:te("FunctionTypeParam"),returnType:k("FlowType")}});K("FunctionTypeParam",{visitor:["name","typeAnnotation"],fields:{name:te("Identifier"),typeAnnotation:k("FlowType"),optional:xe(R("boolean"))}});K("GenericTypeAnnotation",{visitor:["id","typeParameters"],aliases:["FlowType"],fields:{id:k("Identifier","QualifiedTypeIdentifier"),typeParameters:te("TypeParameterInstantiation")}});K("InferredPredicate",{aliases:["FlowPredicate"]});K("InterfaceExtends",{visitor:["id","typeParameters"],fields:{id:k("Identifier","QualifiedTypeIdentifier"),typeParameters:te("TypeParameterInstantiation")}});La("InterfaceDeclaration");K("InterfaceTypeAnnotation",{visitor:["extends","body"],aliases:["FlowType"],fields:{extends:xe(me("InterfaceExtends")),body:k("ObjectTypeAnnotation")}});K("IntersectionTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:De(me("FlowType"))}});K("MixedTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});K("EmptyTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});K("NullableTypeAnnotation",{visitor:["typeAnnotation"],aliases:["FlowType"],fields:{typeAnnotation:k("FlowType")}});K("NumberLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:De(R("number"))}});K("BigIntLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:De(R("bigint"))}});K("NumberTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});K("ObjectTypeAnnotation",{visitor:["properties","indexers","callProperties","internalSlots"],aliases:["FlowType"],builder:["properties","indexers","callProperties","internalSlots","exact"],fields:{properties:De(me("ObjectTypeProperty","ObjectTypeSpreadProperty")),indexers:{validate:me("ObjectTypeIndexer"),optional:!1,default:[]},callProperties:{validate:me("ObjectTypeCallProperty"),optional:!1,default:[]},internalSlots:{validate:me("ObjectTypeInternalSlot"),optional:!1,default:[]},exact:{validate:R("boolean"),default:!1},inexact:xe(R("boolean"))}});K("ObjectTypeInternalSlot",{visitor:["id","value"],builder:["id","value","optional","static","method"],aliases:["UserWhitespacable"],fields:{id:k("Identifier"),value:k("FlowType"),optional:De(R("boolean")),static:De(R("boolean")),method:De(R("boolean"))}});K("ObjectTypeCallProperty",{visitor:["value"],aliases:["UserWhitespacable"],fields:{value:k("FlowType"),static:et(R("boolean"),!1)}});K("ObjectTypeIndexer",{visitor:["variance","id","key","value"],builder:["id","key","value","variance"],aliases:["UserWhitespacable"],fields:{id:te("Identifier"),key:k("FlowType"),value:k("FlowType"),static:et(R("boolean"),!1),variance:te("Variance")}});K("ObjectTypeProperty",{visitor:["key","value","variance"],aliases:["UserWhitespacable"],fields:{key:k("Identifier","StringLiteral","NumericLiteral"),value:k("FlowType"),kind:{validate:ue("init","get","set"),default:"init",optional:!1},static:et(R("boolean"),!1),proto:et(R("boolean"),!1),optional:et(R("boolean"),!1),variance:te("Variance"),method:et(R("boolean"),!1)}});K("ObjectTypeSpreadProperty",{visitor:["argument"],aliases:["UserWhitespacable"],fields:{argument:k("FlowType")}});K("OpaqueType",{visitor:["id","typeParameters","supertype","impltype"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:k("Identifier"),typeParameters:te("TypeParameterDeclaration"),supertype:te("FlowType"),impltype:k("FlowType")}});K("QualifiedTypeIdentifier",{visitor:["qualification","id"],builder:["id","qualification"],fields:{id:k("Identifier"),qualification:k("Identifier","QualifiedTypeIdentifier")}});K("StringLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:De(R("string"))}});K("StringTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});K("SymbolTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});K("ThisTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});K("TupleTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:De(me("FlowType"))}});K("TypeofTypeAnnotation",{visitor:["argument"],aliases:["FlowType"],fields:{argument:k("FlowType","Identifier")}});K("TypeAlias",{visitor:["id","typeParameters","right"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:k("Identifier"),typeParameters:te("TypeParameterDeclaration"),right:k("FlowType")}});K("TypeAnnotation",{visitor:["typeAnnotation"],fields:{typeAnnotation:k("FlowType","Identifier")}});K("TypeCastExpression",{visitor:["expression","typeAnnotation"],aliases:["ExpressionWrapper","Expression"],fields:{expression:k("Expression"),typeAnnotation:k("TypeAnnotation")}});K("TypeParameter",{builder:["name","bound","default","variance"],visitor:["bound","default","variance"],fields:{name:De(R("string")),bound:te("TypeAnnotation"),default:te("FlowType"),variance:te("Variance")}});K("TypeParameterDeclaration",{visitor:["params"],fields:{params:De(me("TypeParameter"))}});K("TypeParameterInstantiation",{visitor:["params"],fields:{params:De(me("FlowType"))}});K("UnionTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:De(me("FlowType"))}});K("Variance",{builder:["kind"],fields:{kind:De(ue("minus","plus"))}});K("VoidTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});K("EnumDeclaration",{aliases:["Statement","Declaration"],visitor:["id","body"],fields:{id:k("Identifier"),body:k("EnumBooleanBody","EnumNumberBody","EnumStringBody","EnumSymbolBody")}});var Oa={explicitType:et(R("boolean"),!1),hasUnknownMembers:et(R("boolean"),!1)};K("EnumBooleanBody",{aliases:["EnumBody"],visitor:["members"],fields:{...Oa,members:oe("EnumBooleanMember")}});K("EnumNumberBody",{aliases:["EnumBody"],visitor:["members"],fields:{...Oa,members:oe("EnumNumberMember")}});K("EnumStringBody",{aliases:["EnumBody"],visitor:["members"],fields:{...Oa,members:oe("EnumStringMember","EnumDefaultedMember")}});K("EnumSymbolBody",{aliases:["EnumBody"],visitor:["members"],fields:{members:oe("EnumDefaultedMember"),hasUnknownMembers:et(R("boolean"),!1)}});K("EnumBooleanMember",{aliases:["EnumMember"],visitor:["id","init"],fields:{id:k("Identifier"),init:k("BooleanLiteral")}});K("EnumNumberMember",{aliases:["EnumMember"],visitor:["id","init"],fields:{id:k("Identifier"),init:k("NumericLiteral")}});K("EnumStringMember",{aliases:["EnumMember"],visitor:["id","init"],fields:{id:k("Identifier"),init:k("StringLiteral")}});K("EnumDefaultedMember",{aliases:["EnumMember"],visitor:["id"],fields:{id:k("Identifier")}});K("IndexedAccessType",{visitor:["objectType","indexType"],aliases:["FlowType"],fields:{objectType:k("FlowType"),indexType:k("FlowType")}});K("OptionalIndexedAccessType",{visitor:["objectType","indexType"],aliases:["FlowType"],fields:{objectType:k("FlowType"),indexType:k("FlowType"),optional:et(R("boolean"),!1)}});var Re=as("JSX");Re("JSXAttribute",{visitor:["name","value"],aliases:["Immutable"],fields:{name:{validate:A("JSXIdentifier","JSXNamespacedName")},value:{optional:!0,validate:A("JSXElement","JSXFragment","StringLiteral","JSXExpressionContainer")}}});Re("JSXClosingElement",{visitor:["name"],aliases:["Immutable"],fields:{name:{validate:A("JSXIdentifier","JSXMemberExpression","JSXNamespacedName")}}});Re("JSXElement",{builder:["openingElement","closingElement","children"],visitor:["openingElement","children","closingElement"],aliases:["Immutable","Expression"],fields:{openingElement:{validate:A("JSXOpeningElement")},closingElement:{optional:!0,validate:A("JSXClosingElement")},children:oe("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement","JSXFragment")}});Re("JSXEmptyExpression",{});Re("JSXExpressionContainer",{visitor:["expression"],aliases:["Immutable"],fields:{expression:{validate:A("Expression","JSXEmptyExpression")}}});Re("JSXSpreadChild",{visitor:["expression"],aliases:["Immutable"],fields:{expression:{validate:A("Expression")}}});Re("JSXIdentifier",{builder:["name"],fields:{name:{validate:R("string")}}});Re("JSXMemberExpression",{visitor:["object","property"],fields:{object:{validate:A("JSXMemberExpression","JSXIdentifier")},property:{validate:A("JSXIdentifier")}}});Re("JSXNamespacedName",{visitor:["namespace","name"],fields:{namespace:{validate:A("JSXIdentifier")},name:{validate:A("JSXIdentifier")}}});Re("JSXOpeningElement",{builder:["name","attributes","selfClosing"],visitor:["name","typeArguments","attributes"],aliases:["Immutable"],fields:{name:{validate:A("JSXIdentifier","JSXMemberExpression","JSXNamespacedName")},selfClosing:{default:!1},attributes:oe("JSXAttribute","JSXSpreadAttribute"),typeArguments:{validate:A("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0}}});Re("JSXSpreadAttribute",{visitor:["argument"],fields:{argument:{validate:A("Expression")}}});Re("JSXText",{aliases:["Immutable"],builder:["value"],fields:{value:{validate:R("string")}}});Re("JSXFragment",{builder:["openingFragment","closingFragment","children"],visitor:["openingFragment","children","closingFragment"],aliases:["Immutable","Expression"],fields:{openingFragment:{validate:A("JSXOpeningFragment")},closingFragment:{validate:A("JSXClosingFragment")},children:oe("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement","JSXFragment")}});Re("JSXOpeningFragment",{aliases:["Immutable"]});Re("JSXClosingFragment",{aliases:["Immutable"]});var Ma=["Identifier","StringLiteral","Expression","Statement","Declaration","BlockStatement","ClassBody","Pattern"],$s={Declaration:["Statement"],Pattern:["PatternLike","LVal"]};for(let s of Ma){let e=zs[s];e?.length&&($s[s]=e)}var Hi={};Object.keys($s).forEach(s=>{$s[s].forEach(e=>{Object.hasOwn(Hi,e)||(Hi[e]=[]),Hi[e].push(s)})});var up=as("Miscellaneous");up("Placeholder",{visitor:[],builder:["expectedNode","name"],fields:{name:{validate:A("Identifier")},expectedNode:{validate:ue(...Ma)},...ls()}});up("V8IntrinsicIdentifier",{builder:["name"],fields:{name:{validate:R("string")}}});st("ArgumentPlaceholder",{});st("BindExpression",{visitor:["object","callee"],aliases:["Expression"],fields:{object:{validate:ir("null","Expression")},callee:{validate:A("Expression")}}});st("ClassAccessorProperty",{visitor:["decorators","key","typeAnnotation","value"],builder:["key","value","typeAnnotation","decorators","computed","static"],aliases:["Property","Accessor"],...os(!0),fields:{...ka(),key:{validate:we((function(){let s=A("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","PrivateName"),e=A("Expression");return function(t,i,r){(t.computed?e:s)(t,i,r)}})(),A("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","Expression","PrivateName"))},value:{validate:A("Expression"),optional:!0},definite:{validate:R("boolean"),optional:!0},typeAnnotation:{validate:A("TypeAnnotation","TSTypeAnnotation"),optional:!0},decorators:{validate:me("Decorator"),optional:!0},readonly:{validate:R("boolean"),optional:!0},declare:{validate:R("boolean"),optional:!0},variance:{validate:A("Variance"),optional:!0}}});st("Decorator",{visitor:["expression"],fields:{expression:{validate:A("Expression")}}});st("DoExpression",{visitor:["body"],builder:["body","async"],aliases:["Expression"],fields:{body:{validate:A("BlockStatement")},async:{validate:R("boolean"),default:!1}}});st("ExportDefaultSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:A("Identifier")}}});st("ModuleExpression",{visitor:["body"],fields:{body:{validate:A("Program")}},aliases:["Expression"]});st("TopicReference",{aliases:["Expression"]});st("VoidPattern",{aliases:["Pattern","PatternLike","FunctionParameter"]});var X=as("TypeScript"),He=R("boolean"),pp=()=>({returnType:{validate:A("TSTypeAnnotation"),optional:!0},typeParameters:{validate:A("TSTypeParameterDeclaration"),optional:!0}});X("TSParameterProperty",{aliases:[],visitor:["parameter"],fields:{accessibility:{validate:ue("public","private","protected"),optional:!0},readonly:{validate:R("boolean"),optional:!0},parameter:{validate:A("Identifier","AssignmentPattern")},override:{validate:R("boolean"),optional:!0},decorators:{validate:me("Decorator"),optional:!0}}});X("TSDeclareFunction",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","params","returnType"],fields:{...lp(),...pp()}});X("TSDeclareMethod",{visitor:["key","typeParameters","params","returnType"],...os(!0),fields:{...Da(!1),...pp()}});X("TSQualifiedName",{aliases:["TSEntityName"],visitor:["left","right"],fields:{left:k("TSEntityName"),right:k("Identifier")}});var rr=()=>({typeParameters:te("TSTypeParameterDeclaration"),params:oe("ArrayPattern","Identifier","ObjectPattern","RestElement"),returnType:te("TSTypeAnnotation")}),hp={aliases:["TSTypeElement"],visitor:["typeParameters","params","returnType"],fields:rr()};X("TSCallSignatureDeclaration",hp);X("TSConstructSignatureDeclaration",hp);var fp=()=>({key:k("Expression"),computed:{default:!1},optional:xe(He)});X("TSPropertySignature",{aliases:["TSTypeElement"],visitor:["key","typeAnnotation"],fields:{...fp(),readonly:xe(He),typeAnnotation:te("TSTypeAnnotation"),kind:{optional:!0,validate:ue("get","set")}}});X("TSMethodSignature",{aliases:["TSTypeElement"],visitor:["key","typeParameters","params","returnType"],fields:{...rr(),...fp(),kind:{validate:ue("method","get","set"),default:"method"}}});X("TSIndexSignature",{aliases:["TSTypeElement"],visitor:["parameters","typeAnnotation"],fields:{readonly:xe(He),static:xe(He),parameters:oe("Identifier"),typeAnnotation:te("TSTypeAnnotation")}});var QI=["TSAnyKeyword","TSBooleanKeyword","TSBigIntKeyword","TSIntrinsicKeyword","TSNeverKeyword","TSNullKeyword","TSNumberKeyword","TSObjectKeyword","TSStringKeyword","TSSymbolKeyword","TSUndefinedKeyword","TSUnknownKeyword","TSVoidKeyword"];for(let s of QI)X(s,{aliases:["TSType","TSBaseType"],visitor:[],fields:{}});X("TSThisType",{aliases:["TSType","TSBaseType"],visitor:[],fields:{}});var dp={aliases:["TSType"],visitor:["typeParameters","params","returnType"]};X("TSFunctionType",{...dp,fields:rr()});X("TSConstructorType",{...dp,fields:{...rr(),abstract:xe(He)}});X("TSTypeReference",{aliases:["TSType"],visitor:["typeName","typeArguments"],fields:{typeName:k("TSEntityName"),typeArguments:te("TSTypeParameterInstantiation")}});X("TSTypePredicate",{aliases:["TSType"],visitor:["parameterName","typeAnnotation"],builder:["parameterName","typeAnnotation","asserts"],fields:{parameterName:k("Identifier","TSThisType"),typeAnnotation:te("TSTypeAnnotation"),asserts:xe(He)}});X("TSTypeQuery",{aliases:["TSType"],visitor:["exprName","typeArguments"],fields:{exprName:k("TSEntityName","TSImportType"),typeArguments:te("TSTypeParameterInstantiation")}});X("TSTypeLiteral",{aliases:["TSType"],visitor:["members"],fields:{members:oe("TSTypeElement")}});X("TSArrayType",{aliases:["TSType"],visitor:["elementType"],fields:{elementType:k("TSType")}});X("TSTupleType",{aliases:["TSType"],visitor:["elementTypes"],fields:{elementTypes:oe("TSType","TSNamedTupleMember")}});X("TSOptionalType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:k("TSType")}});X("TSRestType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:k("TSType")}});X("TSNamedTupleMember",{aliases:["TSType"],visitor:["label","elementType"],builder:["label","elementType","optional"],fields:{label:k("Identifier"),optional:{validate:He,default:!1},elementType:k("TSType")}});var mp={aliases:["TSType"],visitor:["types"],fields:{types:oe("TSType")}};X("TSUnionType",mp);X("TSIntersectionType",mp);X("TSConditionalType",{aliases:["TSType"],visitor:["checkType","extendsType","trueType","falseType"],fields:{checkType:k("TSType"),extendsType:k("TSType"),trueType:k("TSType"),falseType:k("TSType")}});X("TSInferType",{aliases:["TSType"],visitor:["typeParameter"],fields:{typeParameter:k("TSTypeParameter")}});X("TSParenthesizedType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:k("TSType")}});X("TSTypeOperator",{aliases:["TSType"],visitor:["typeAnnotation"],builder:["typeAnnotation","operator"],fields:{operator:{validate:ue("keyof","readonly","unique"),default:void 0},typeAnnotation:k("TSType")}});X("TSIndexedAccessType",{aliases:["TSType"],visitor:["objectType","indexType"],fields:{objectType:k("TSType"),indexType:k("TSType")}});X("TSMappedType",{aliases:["TSType"],visitor:["key","constraint","nameType","typeAnnotation"],builder:["key","constraint","nameType","typeAnnotation"],fields:{key:k("Identifier"),constraint:k("TSType"),readonly:xe(ue(!0,!1,"+","-")),optional:xe(ue(!0,!1,"+","-")),typeAnnotation:te("TSType"),nameType:te("TSType")}});X("TSTemplateLiteralType",{aliases:["TSType","TSBaseType"],visitor:["quasis","types"],fields:{quasis:oe("TemplateElement"),types:{validate:we(R("array"),Bt(A("TSType")),function(s,e,t){if(s.quasis.length!==t.length+1)throw new TypeError(`Number of ${s.type} quasis should be exactly one more than the number of types.
17
+ Expected ${t.length+1} quasis but got ${s.quasis.length}`)})}}});X("TSLiteralType",{aliases:["TSType","TSBaseType"],visitor:["literal"],fields:{literal:{validate:(function(){let s=A("NumericLiteral","BigIntLiteral"),e=ue("-"),t=A("NumericLiteral","StringLiteral","BooleanLiteral","BigIntLiteral","TemplateLiteral");return Ie(function(n,a,o){Ce("UnaryExpression",o)?(e(o,"operator",o.operator),s(o,"argument",o.argument)):t(n,a,o)},{oneOfNodeTypes:["NumericLiteral","StringLiteral","BooleanLiteral","BigIntLiteral","TemplateLiteral","UnaryExpression"]})})()}}});X("TSClassImplements",{aliases:["TSType"],visitor:["expression","typeArguments"],fields:{expression:k("Expression"),typeArguments:te("TSTypeParameterInstantiation")}});X("TSInterfaceHeritage",{aliases:["TSType"],visitor:["expression","typeArguments"],fields:{expression:k("Expression"),typeArguments:te("TSTypeParameterInstantiation")}});X("TSInterfaceDeclaration",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","extends","body"],fields:{declare:xe(He),id:k("Identifier"),typeParameters:te("TSTypeParameterDeclaration"),extends:xe(me("TSInterfaceHeritage")),body:k("TSInterfaceBody")}});X("TSInterfaceBody",{visitor:["body"],fields:{body:oe("TSTypeElement")}});X("TSTypeAliasDeclaration",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","typeAnnotation"],fields:{declare:xe(He),id:k("Identifier"),typeParameters:te("TSTypeParameterDeclaration"),typeAnnotation:k("TSType")}});X("TSInstantiationExpression",{aliases:["Expression"],visitor:["expression","typeArguments"],fields:{expression:k("Expression"),typeArguments:te("TSTypeParameterInstantiation")}});var yp={aliases:["Expression","LVal","PatternLike"],visitor:["expression","typeAnnotation"],fields:{expression:k("Expression"),typeAnnotation:k("TSType")}};X("TSAsExpression",yp);X("TSSatisfiesExpression",yp);X("TSTypeAssertion",{aliases:["Expression","LVal","PatternLike"],visitor:["typeAnnotation","expression"],fields:{typeAnnotation:k("TSType"),expression:k("Expression")}});X("TSEnumBody",{visitor:["members"],fields:{members:oe("TSEnumMember")}});X("TSEnumDeclaration",{aliases:["Statement","Declaration"],visitor:["id","body"],fields:{declare:xe(He),const:xe(He),id:k("Identifier"),body:k("TSEnumBody")}});X("TSEnumMember",{visitor:["id","initializer"],fields:{id:k("Identifier","StringLiteral"),initializer:te("Expression")}});X("TSModuleDeclaration",{aliases:["Statement","Declaration"],visitor:["id","body"],fields:{kind:{validate:ue("global","namespace","module"),default:"namespace"},declare:xe(He),id:{validate:we(A("TSEntityName","StringLiteral"),Ie(function(s,e,t){if(s.kind==="namespace"&&Ce("StringLiteral",t))throw new TypeError("TSModuleDeclaration of kind 'namespace' cannot have a StringLiteral id.")},{oneOfNodeTypes:["TSEntityName","StringLiteral"]}))},body:k("TSModuleBlock")}});X("TSModuleBlock",{aliases:["Scopable","Block","BlockParent","FunctionParent"],visitor:["body"],fields:{body:oe("Statement")}});X("TSImportType",{aliases:["TSType"],builder:["source","qualifier","typeArguments"],visitor:["source","options","qualifier","typeArguments"],fields:{source:k("StringLiteral"),qualifier:te("TSEntityName"),typeArguments:te("TSTypeParameterInstantiation"),options:{validate:A("ObjectExpression"),optional:!0}}});X("TSImportEqualsDeclaration",{aliases:["Statement","Declaration"],visitor:["id","moduleReference"],fields:{id:k("Identifier"),moduleReference:k("TSEntityName","TSExternalModuleReference"),importKind:{validate:ue("type","value"),optional:!0}}});X("TSExternalModuleReference",{visitor:["expression"],fields:{expression:k("StringLiteral")}});X("TSNonNullExpression",{aliases:["Expression","LVal","PatternLike"],visitor:["expression"],fields:{expression:k("Expression")}});X("TSExportAssignment",{aliases:["Statement"],visitor:["expression"],fields:{expression:k("Expression")}});X("TSNamespaceExportDeclaration",{aliases:["Statement"],visitor:["id"],fields:{id:k("Identifier")}});X("TSTypeAnnotation",{visitor:["typeAnnotation"],fields:{typeAnnotation:{validate:A("TSType")}}});X("TSTypeParameterInstantiation",{visitor:["params"],fields:{params:oe("TSType")}});X("TSTypeParameterDeclaration",{visitor:["params"],fields:{params:oe("TSTypeParameter")}});X("TSTypeParameter",{builder:["constraint","default","name"],visitor:["name","constraint","default"],fields:{name:{validate:A("Identifier")},in:{validate:R("boolean"),optional:!0},out:{validate:R("boolean"),optional:!0},const:{validate:R("boolean"),optional:!0},constraint:{validate:A("TSType"),optional:!0},default:{validate:A("TSType"),optional:!0}}});var aa={ModuleDeclaration:"ImportOrExportDeclaration"};Object.keys(aa).forEach(s=>{$[s]=$[aa[s]]});for(let{types:s,set:e}of Na)for(let t of s){let i=$[t];i?i.forEach(e.add,e):e.add(t)}var Qs=[].concat(Object.keys(xt),Object.keys($),Object.keys(tr));function Tp(s,e,t){if(!s)return;let i=Ft[s.type];if(!i)return;let r=i[e];Fa(s,e,t,r),rs(s,e,t)}function ZI(s,e,t,i,r){if(s?.validate&&!(s.optional&&i==null)&&(s.validate(e,t,i),r)){let n=i.type;if(n==null)return;Hs[n]?.(e,t,i)}}function Fa(s,e,t,i){i?.validate&&(i.optional&&t==null||i.validate(s,e,t))}function rs(s,e,t){let i=t?.type;i!=null&&Hs[i]?.(s,e,t)}var ew=Object.defineProperty({__proto__:null,default:Tp,validateChild:rs,validateField:Fa,validateInternal:ZI},Symbol.toStringTag,{value:"Module"}),{validateInternal:p}=ew,{NODE_FIELDS:g}=GI;function Ba(s){let e={type:"ArrayExpression",elements:s},t=g.ArrayExpression;return p(t.elements,e,"elements",s,1),e}function Sp(s,e,t){let i={type:"AssignmentExpression",operator:s,left:e,right:t},r=g.AssignmentExpression;return p(r.operator,i,"operator",s),p(r.left,i,"left",e,1),p(r.right,i,"right",t,1),i}function _a(s,e,t){let i={type:"BinaryExpression",operator:s,left:e,right:t},r=g.BinaryExpression;return p(r.operator,i,"operator",s),p(r.left,i,"left",e,1),p(r.right,i,"right",t,1),i}function xp(s){let e={type:"InterpreterDirective",value:s},t=g.InterpreterDirective;return p(t.value,e,"value",s),e}function gp(s){let e={type:"Directive",value:s},t=g.Directive;return p(t.value,e,"value",s,1),e}function Pp(s){let e={type:"DirectiveLiteral",value:s},t=g.DirectiveLiteral;return p(t.value,e,"value",s),e}function ja(s,e=[]){let t={type:"BlockStatement",body:s,directives:e},i=g.BlockStatement;return p(i.body,t,"body",s,1),p(i.directives,t,"directives",e,1),t}function bp(s=null){let e={type:"BreakStatement",label:s},t=g.BreakStatement;return p(t.label,e,"label",s,1),e}function Ep(s,e){let t={type:"CallExpression",callee:s,arguments:e},i=g.CallExpression;return p(i.callee,t,"callee",s,1),p(i.arguments,t,"arguments",e,1),t}function Ap(s=null,e){let t={type:"CatchClause",param:s,body:e},i=g.CatchClause;return p(i.param,t,"param",s,1),p(i.body,t,"body",e,1),t}function Cp(s,e,t){let i={type:"ConditionalExpression",test:s,consequent:e,alternate:t},r=g.ConditionalExpression;return p(r.test,i,"test",s,1),p(r.consequent,i,"consequent",e,1),p(r.alternate,i,"alternate",t,1),i}function Ip(s=null){let e={type:"ContinueStatement",label:s},t=g.ContinueStatement;return p(t.label,e,"label",s,1),e}function wp(){return{type:"DebuggerStatement"}}function Np(s,e){let t={type:"DoWhileStatement",test:s,body:e},i=g.DoWhileStatement;return p(i.test,t,"test",s,1),p(i.body,t,"body",e,1),t}function vp(){return{type:"EmptyStatement"}}function nr(s){let e={type:"ExpressionStatement",expression:s},t=g.ExpressionStatement;return p(t.expression,e,"expression",s,1),e}function kp(s,e=null,t=null){let i={type:"File",program:s,comments:e,tokens:t},r=g.File;return p(r.program,i,"program",s,1),p(r.comments,i,"comments",e,1),p(r.tokens,i,"tokens",t),i}function Dp(s,e,t){let i={type:"ForInStatement",left:s,right:e,body:t},r=g.ForInStatement;return p(r.left,i,"left",s,1),p(r.right,i,"right",e,1),p(r.body,i,"body",t,1),i}function Lp(s=null,e=null,t=null,i){let r={type:"ForStatement",init:s,test:e,update:t,body:i},n=g.ForStatement;return p(n.init,r,"init",s,1),p(n.test,r,"test",e,1),p(n.update,r,"update",t,1),p(n.body,r,"body",i,1),r}function Op(s=null,e,t,i=!1,r=!1){let n={type:"FunctionDeclaration",id:s,params:e,body:t,generator:i,async:r},a=g.FunctionDeclaration;return p(a.id,n,"id",s,1),p(a.params,n,"params",e,1),p(a.body,n,"body",t,1),p(a.generator,n,"generator",i),p(a.async,n,"async",r),n}function Mp(s=null,e,t,i=!1,r=!1){let n={type:"FunctionExpression",id:s,params:e,body:t,generator:i,async:r},a=g.FunctionExpression;return p(a.id,n,"id",s,1),p(a.params,n,"params",e,1),p(a.body,n,"body",t,1),p(a.generator,n,"generator",i),p(a.async,n,"async",r),n}function Ot(s){let e={type:"Identifier",name:s},t=g.Identifier;return p(t.name,e,"name",s),e}function Fp(s,e,t=null){let i={type:"IfStatement",test:s,consequent:e,alternate:t},r=g.IfStatement;return p(r.test,i,"test",s,1),p(r.consequent,i,"consequent",e,1),p(r.alternate,i,"alternate",t,1),i}function Bp(s,e){let t={type:"LabeledStatement",label:s,body:e},i=g.LabeledStatement;return p(i.label,t,"label",s,1),p(i.body,t,"body",e,1),t}function Mt(s){let e={type:"StringLiteral",value:s},t=g.StringLiteral;return p(t.value,e,"value",s),e}function St(s){let e={type:"NumericLiteral",value:s},t=g.NumericLiteral;return p(t.value,e,"value",s),e}function Ra(){return{type:"NullLiteral"}}function Ua(s){let e={type:"BooleanLiteral",value:s},t=g.BooleanLiteral;return p(t.value,e,"value",s),e}function ar(s,e=""){let t={type:"RegExpLiteral",pattern:s,flags:e},i=g.RegExpLiteral;return p(i.pattern,t,"pattern",s),p(i.flags,t,"flags",e),t}function _p(s,e,t){let i={type:"LogicalExpression",operator:s,left:e,right:t},r=g.LogicalExpression;return p(r.operator,i,"operator",s),p(r.left,i,"left",e,1),p(r.right,i,"right",t,1),i}function or(s,e,t=!1){let i={type:"MemberExpression",object:s,property:e,computed:t},r=g.MemberExpression;return p(r.object,i,"object",s,1),p(r.property,i,"property",e,1),p(r.computed,i,"computed",t),i}function jp(s,e){let t={type:"NewExpression",callee:s,arguments:e},i=g.NewExpression;return p(i.callee,t,"callee",s,1),p(i.arguments,t,"arguments",e,1),t}function Rp(s,e=[],t="script",i=null){let r={type:"Program",body:s,directives:e,sourceType:t,interpreter:i},n=g.Program;return p(n.body,r,"body",s,1),p(n.directives,r,"directives",e,1),p(n.sourceType,r,"sourceType",t),p(n.interpreter,r,"interpreter",i,1),r}function Va(s){let e={type:"ObjectExpression",properties:s},t=g.ObjectExpression;return p(t.properties,e,"properties",s,1),e}function Up(s,e,t,i,r=!1,n=!1,a=!1){let o={type:"ObjectMethod",kind:s,key:e,params:t,body:i,computed:r,generator:n,async:a},c=g.ObjectMethod;return p(c.kind,o,"kind",s),p(c.key,o,"key",e,1),p(c.params,o,"params",t,1),p(c.body,o,"body",i,1),p(c.computed,o,"computed",r),p(c.generator,o,"generator",n),p(c.async,o,"async",a),o}function Ka(s,e,t=!1,i=!1){let r={type:"ObjectProperty",key:s,value:e,computed:t,shorthand:i},n=g.ObjectProperty;return p(n.key,r,"key",s,1),p(n.value,r,"value",e,1),p(n.computed,r,"computed",t),p(n.shorthand,r,"shorthand",i),r}function qa(s){let e={type:"RestElement",argument:s},t=g.RestElement;return p(t.argument,e,"argument",s,1),e}function $a(s=null){let e={type:"ReturnStatement",argument:s},t=g.ReturnStatement;return p(t.argument,e,"argument",s,1),e}function Vp(s){let e={type:"SequenceExpression",expressions:s},t=g.SequenceExpression;return p(t.expressions,e,"expressions",s,1),e}function Kp(s){let e={type:"ParenthesizedExpression",expression:s},t=g.ParenthesizedExpression;return p(t.expression,e,"expression",s,1),e}function qp(s=null,e){let t={type:"SwitchCase",test:s,consequent:e},i=g.SwitchCase;return p(i.test,t,"test",s,1),p(i.consequent,t,"consequent",e,1),t}function $p(s,e){let t={type:"SwitchStatement",discriminant:s,cases:e},i=g.SwitchStatement;return p(i.discriminant,t,"discriminant",s,1),p(i.cases,t,"cases",e,1),t}function Jp(){return{type:"ThisExpression"}}function Xp(s){let e={type:"ThrowStatement",argument:s},t=g.ThrowStatement;return p(t.argument,e,"argument",s,1),e}function Wp(s,e=null,t=null){let i={type:"TryStatement",block:s,handler:e,finalizer:t},r=g.TryStatement;return p(r.block,i,"block",s,1),p(r.handler,i,"handler",e,1),p(r.finalizer,i,"finalizer",t,1),i}function Js(s,e,t=!0){let i={type:"UnaryExpression",operator:s,argument:e,prefix:t},r=g.UnaryExpression;return p(r.operator,i,"operator",s),p(r.argument,i,"argument",e,1),p(r.prefix,i,"prefix",t),i}function zp(s,e,t=!1){let i={type:"UpdateExpression",operator:s,argument:e,prefix:t},r=g.UpdateExpression;return p(r.operator,i,"operator",s),p(r.argument,i,"argument",e,1),p(r.prefix,i,"prefix",t),i}function Hp(s,e){let t={type:"VariableDeclaration",kind:s,declarations:e},i=g.VariableDeclaration;return p(i.kind,t,"kind",s),p(i.declarations,t,"declarations",e,1),t}function Yp(s,e=null){let t={type:"VariableDeclarator",id:s,init:e},i=g.VariableDeclarator;return p(i.id,t,"id",s,1),p(i.init,t,"init",e,1),t}function Gp(s,e){let t={type:"WhileStatement",test:s,body:e},i=g.WhileStatement;return p(i.test,t,"test",s,1),p(i.body,t,"body",e,1),t}function Qp(s,e){let t={type:"WithStatement",object:s,body:e},i=g.WithStatement;return p(i.object,t,"object",s,1),p(i.body,t,"body",e,1),t}function Zp(s,e){let t={type:"AssignmentPattern",left:s,right:e},i=g.AssignmentPattern;return p(i.left,t,"left",s,1),p(i.right,t,"right",e,1),t}function eh(s){let e={type:"ArrayPattern",elements:s},t=g.ArrayPattern;return p(t.elements,e,"elements",s,1),e}function th(s,e,t=!1){let i={type:"ArrowFunctionExpression",params:s,body:e,async:t},r=g.ArrowFunctionExpression;return p(r.params,i,"params",s,1),p(r.body,i,"body",e,1),p(r.async,i,"async",t),i}function sh(s){let e={type:"ClassBody",body:s},t=g.ClassBody;return p(t.body,e,"body",s,1),e}function ih(s=null,e=null,t,i=null){let r={type:"ClassExpression",id:s,superClass:e,body:t,decorators:i},n=g.ClassExpression;return p(n.id,r,"id",s,1),p(n.superClass,r,"superClass",e,1),p(n.body,r,"body",t,1),p(n.decorators,r,"decorators",i,1),r}function rh(s=null,e=null,t,i=null){let r={type:"ClassDeclaration",id:s,superClass:e,body:t,decorators:i},n=g.ClassDeclaration;return p(n.id,r,"id",s,1),p(n.superClass,r,"superClass",e,1),p(n.body,r,"body",t,1),p(n.decorators,r,"decorators",i,1),r}function nh(s,e=null){let t={type:"ExportAllDeclaration",source:s,attributes:e},i=g.ExportAllDeclaration;return p(i.source,t,"source",s,1),p(i.attributes,t,"attributes",e,1),t}function ah(s){let e={type:"ExportDefaultDeclaration",declaration:s},t=g.ExportDefaultDeclaration;return p(t.declaration,e,"declaration",s,1),e}function oh(s=null,e=[],t=null,i=null){let r={type:"ExportNamedDeclaration",declaration:s,specifiers:e,source:t,attributes:i},n=g.ExportNamedDeclaration;return p(n.declaration,r,"declaration",s,1),p(n.specifiers,r,"specifiers",e,1),p(n.source,r,"source",t,1),p(n.attributes,r,"attributes",i,1),r}function ch(s,e){let t={type:"ExportSpecifier",local:s,exported:e},i=g.ExportSpecifier;return p(i.local,t,"local",s,1),p(i.exported,t,"exported",e,1),t}function lh(s,e,t,i=!1){let r={type:"ForOfStatement",left:s,right:e,body:t,await:i},n=g.ForOfStatement;return p(n.left,r,"left",s,1),p(n.right,r,"right",e,1),p(n.body,r,"body",t,1),p(n.await,r,"await",i),r}function uh(s,e,t=null){let i={type:"ImportDeclaration",specifiers:s,source:e,attributes:t},r=g.ImportDeclaration;return p(r.specifiers,i,"specifiers",s,1),p(r.source,i,"source",e,1),p(r.attributes,i,"attributes",t,1),i}function ph(s){let e={type:"ImportDefaultSpecifier",local:s},t=g.ImportDefaultSpecifier;return p(t.local,e,"local",s,1),e}function hh(s){let e={type:"ImportNamespaceSpecifier",local:s},t=g.ImportNamespaceSpecifier;return p(t.local,e,"local",s,1),e}function fh(s,e){let t={type:"ImportSpecifier",local:s,imported:e},i=g.ImportSpecifier;return p(i.local,t,"local",s,1),p(i.imported,t,"imported",e,1),t}function dh(s,e){let t={type:"MetaProperty",meta:s,property:e},i=g.MetaProperty;return p(i.meta,t,"meta",s,1),p(i.property,t,"property",e,1),t}function mh(s="method",e,t,i,r=!1,n=!1,a=!1,o=!1){let c={type:"ClassMethod",kind:s,key:e,params:t,body:i,computed:r,static:n,generator:a,async:o},l=g.ClassMethod;return p(l.kind,c,"kind",s),p(l.key,c,"key",e,1),p(l.params,c,"params",t,1),p(l.body,c,"body",i,1),p(l.computed,c,"computed",r),p(l.static,c,"static",n),p(l.generator,c,"generator",a),p(l.async,c,"async",o),c}function yh(s){let e={type:"ObjectPattern",properties:s},t=g.ObjectPattern;return p(t.properties,e,"properties",s,1),e}function Ja(s){let e={type:"SpreadElement",argument:s},t=g.SpreadElement;return p(t.argument,e,"argument",s,1),e}function Th(){return{type:"Super"}}function Sh(s,e){let t={type:"TaggedTemplateExpression",tag:s,quasi:e},i=g.TaggedTemplateExpression;return p(i.tag,t,"tag",s,1),p(i.quasi,t,"quasi",e,1),t}function xh(s,e=!1){let t={type:"TemplateElement",value:s,tail:e},i=g.TemplateElement;return p(i.value,t,"value",s),p(i.tail,t,"tail",e),t}function gh(s,e){let t={type:"TemplateLiteral",quasis:s,expressions:e},i=g.TemplateLiteral;return p(i.quasis,t,"quasis",s,1),p(i.expressions,t,"expressions",e,1),t}function Ph(s=null,e=!1){let t={type:"YieldExpression",argument:s,delegate:e},i=g.YieldExpression;return p(i.argument,t,"argument",s,1),p(i.delegate,t,"delegate",e),t}function bh(s){let e={type:"AwaitExpression",argument:s},t=g.AwaitExpression;return p(t.argument,e,"argument",s,1),e}function Eh(s,e=null){let t={type:"ImportExpression",source:s,options:e},i=g.ImportExpression;return p(i.source,t,"source",s,1),p(i.options,t,"options",e,1),t}function Ah(){return{type:"Import"}}function Gi(s){let e={type:"BigIntLiteral",value:s},t=g.BigIntLiteral;return p(t.value,e,"value",s),e}function Ch(s){let e={type:"ExportNamespaceSpecifier",exported:s},t=g.ExportNamespaceSpecifier;return p(t.exported,e,"exported",s,1),e}function Ih(s,e,t=!1,i){let r={type:"OptionalMemberExpression",object:s,property:e,computed:t,optional:i},n=g.OptionalMemberExpression;return p(n.object,r,"object",s,1),p(n.property,r,"property",e,1),p(n.computed,r,"computed",t),p(n.optional,r,"optional",i),r}function wh(s,e,t){let i={type:"OptionalCallExpression",callee:s,arguments:e,optional:t},r=g.OptionalCallExpression;return p(r.callee,i,"callee",s,1),p(r.arguments,i,"arguments",e,1),p(r.optional,i,"optional",t),i}function Nh(s,e=null,t=null,i=null,r=!1,n=!1){let a={type:"ClassProperty",key:s,value:e,typeAnnotation:t,decorators:i,computed:r,static:n},o=g.ClassProperty;return p(o.key,a,"key",s,1),p(o.value,a,"value",e,1),p(o.typeAnnotation,a,"typeAnnotation",t,1),p(o.decorators,a,"decorators",i,1),p(o.computed,a,"computed",r),p(o.static,a,"static",n),a}function vh(s,e=null,t=null,i=!1){let r={type:"ClassPrivateProperty",key:s,value:e,decorators:t,static:i},n=g.ClassPrivateProperty;return p(n.key,r,"key",s,1),p(n.value,r,"value",e,1),p(n.decorators,r,"decorators",t,1),p(n.static,r,"static",i),r}function kh(s="method",e,t,i,r=!1){let n={type:"ClassPrivateMethod",kind:s,key:e,params:t,body:i,static:r,async:!1,computed:!1,generator:!1},a=g.ClassPrivateMethod;return p(a.kind,n,"kind",s),p(a.key,n,"key",e,1),p(a.params,n,"params",t,1),p(a.body,n,"body",i,1),p(a.static,n,"static",r),n}function Dh(s){let e={type:"PrivateName",id:s},t=g.PrivateName;return p(t.id,e,"id",s,1),e}function Lh(s){let e={type:"StaticBlock",body:s},t=g.StaticBlock;return p(t.body,e,"body",s,1),e}function Oh(s,e){let t={type:"ImportAttribute",key:s,value:e},i=g.ImportAttribute;return p(i.key,t,"key",s,1),p(i.value,t,"value",e,1),t}function Xa(){return{type:"AnyTypeAnnotation"}}function Mh(s){let e={type:"ArrayTypeAnnotation",elementType:s},t=g.ArrayTypeAnnotation;return p(t.elementType,e,"elementType",s,1),e}function Wa(){return{type:"BooleanTypeAnnotation"}}function Fh(s){let e={type:"BooleanLiteralTypeAnnotation",value:s},t=g.BooleanLiteralTypeAnnotation;return p(t.value,e,"value",s),e}function Bh(){return{type:"NullLiteralTypeAnnotation"}}function _h(s,e=null){let t={type:"ClassImplements",id:s,typeParameters:e},i=g.ClassImplements;return p(i.id,t,"id",s,1),p(i.typeParameters,t,"typeParameters",e,1),t}function jh(s,e=null,t=null,i){let r={type:"DeclareClass",id:s,typeParameters:e,extends:t,body:i},n=g.DeclareClass;return p(n.id,r,"id",s,1),p(n.typeParameters,r,"typeParameters",e,1),p(n.extends,r,"extends",t,1),p(n.body,r,"body",i,1),r}function Rh(s){let e={type:"DeclareFunction",id:s},t=g.DeclareFunction;return p(t.id,e,"id",s,1),e}function Uh(s,e=null,t=null,i){let r={type:"DeclareInterface",id:s,typeParameters:e,extends:t,body:i},n=g.DeclareInterface;return p(n.id,r,"id",s,1),p(n.typeParameters,r,"typeParameters",e,1),p(n.extends,r,"extends",t,1),p(n.body,r,"body",i,1),r}function Vh(s,e,t=null){let i={type:"DeclareModule",id:s,body:e,kind:t},r=g.DeclareModule;return p(r.id,i,"id",s,1),p(r.body,i,"body",e,1),p(r.kind,i,"kind",t),i}function Kh(s){let e={type:"DeclareModuleExports",typeAnnotation:s},t=g.DeclareModuleExports;return p(t.typeAnnotation,e,"typeAnnotation",s,1),e}function qh(s,e=null,t){let i={type:"DeclareTypeAlias",id:s,typeParameters:e,right:t},r=g.DeclareTypeAlias;return p(r.id,i,"id",s,1),p(r.typeParameters,i,"typeParameters",e,1),p(r.right,i,"right",t,1),i}function $h(s,e=null,t=null){let i={type:"DeclareOpaqueType",id:s,typeParameters:e,supertype:t},r=g.DeclareOpaqueType;return p(r.id,i,"id",s,1),p(r.typeParameters,i,"typeParameters",e,1),p(r.supertype,i,"supertype",t,1),i}function Jh(s){let e={type:"DeclareVariable",id:s},t=g.DeclareVariable;return p(t.id,e,"id",s,1),e}function Xh(s=null,e=null,t=null,i=null){let r={type:"DeclareExportDeclaration",declaration:s,specifiers:e,source:t,attributes:i},n=g.DeclareExportDeclaration;return p(n.declaration,r,"declaration",s,1),p(n.specifiers,r,"specifiers",e,1),p(n.source,r,"source",t,1),p(n.attributes,r,"attributes",i,1),r}function Wh(s,e=null){let t={type:"DeclareExportAllDeclaration",source:s,attributes:e},i=g.DeclareExportAllDeclaration;return p(i.source,t,"source",s,1),p(i.attributes,t,"attributes",e,1),t}function zh(s){let e={type:"DeclaredPredicate",value:s},t=g.DeclaredPredicate;return p(t.value,e,"value",s,1),e}function Hh(){return{type:"ExistsTypeAnnotation"}}function Yh(s=null,e,t=null,i){let r={type:"FunctionTypeAnnotation",typeParameters:s,params:e,rest:t,returnType:i},n=g.FunctionTypeAnnotation;return p(n.typeParameters,r,"typeParameters",s,1),p(n.params,r,"params",e,1),p(n.rest,r,"rest",t,1),p(n.returnType,r,"returnType",i,1),r}function Gh(s=null,e){let t={type:"FunctionTypeParam",name:s,typeAnnotation:e},i=g.FunctionTypeParam;return p(i.name,t,"name",s,1),p(i.typeAnnotation,t,"typeAnnotation",e,1),t}function qs(s,e=null){let t={type:"GenericTypeAnnotation",id:s,typeParameters:e},i=g.GenericTypeAnnotation;return p(i.id,t,"id",s,1),p(i.typeParameters,t,"typeParameters",e,1),t}function Qh(){return{type:"InferredPredicate"}}function Zh(s,e=null){let t={type:"InterfaceExtends",id:s,typeParameters:e},i=g.InterfaceExtends;return p(i.id,t,"id",s,1),p(i.typeParameters,t,"typeParameters",e,1),t}function ef(s,e=null,t=null,i){let r={type:"InterfaceDeclaration",id:s,typeParameters:e,extends:t,body:i},n=g.InterfaceDeclaration;return p(n.id,r,"id",s,1),p(n.typeParameters,r,"typeParameters",e,1),p(n.extends,r,"extends",t,1),p(n.body,r,"body",i,1),r}function tf(s=null,e){let t={type:"InterfaceTypeAnnotation",extends:s,body:e},i=g.InterfaceTypeAnnotation;return p(i.extends,t,"extends",s,1),p(i.body,t,"body",e,1),t}function sf(s){let e={type:"IntersectionTypeAnnotation",types:s},t=g.IntersectionTypeAnnotation;return p(t.types,e,"types",s,1),e}function rf(){return{type:"MixedTypeAnnotation"}}function nf(){return{type:"EmptyTypeAnnotation"}}function af(s){let e={type:"NullableTypeAnnotation",typeAnnotation:s},t=g.NullableTypeAnnotation;return p(t.typeAnnotation,e,"typeAnnotation",s,1),e}function of(s){let e={type:"NumberLiteralTypeAnnotation",value:s},t=g.NumberLiteralTypeAnnotation;return p(t.value,e,"value",s),e}function cf(s){let e={type:"BigIntLiteralTypeAnnotation",value:s},t=g.BigIntLiteralTypeAnnotation;return p(t.value,e,"value",s),e}function za(){return{type:"NumberTypeAnnotation"}}function lf(s,e=[],t=[],i=[],r=!1){let n={type:"ObjectTypeAnnotation",properties:s,indexers:e,callProperties:t,internalSlots:i,exact:r},a=g.ObjectTypeAnnotation;return p(a.properties,n,"properties",s,1),p(a.indexers,n,"indexers",e,1),p(a.callProperties,n,"callProperties",t,1),p(a.internalSlots,n,"internalSlots",i,1),p(a.exact,n,"exact",r),n}function uf(s,e,t,i,r){let n={type:"ObjectTypeInternalSlot",id:s,value:e,optional:t,static:i,method:r},a=g.ObjectTypeInternalSlot;return p(a.id,n,"id",s,1),p(a.value,n,"value",e,1),p(a.optional,n,"optional",t),p(a.static,n,"static",i),p(a.method,n,"method",r),n}function pf(s){let e={type:"ObjectTypeCallProperty",value:s,static:!1},t=g.ObjectTypeCallProperty;return p(t.value,e,"value",s,1),e}function hf(s=null,e,t,i=null){let r={type:"ObjectTypeIndexer",id:s,key:e,value:t,variance:i,static:!1},n=g.ObjectTypeIndexer;return p(n.id,r,"id",s,1),p(n.key,r,"key",e,1),p(n.value,r,"value",t,1),p(n.variance,r,"variance",i,1),r}function ff(s,e,t=null){let i={type:"ObjectTypeProperty",key:s,value:e,variance:t,kind:"init",method:!1,optional:!1,proto:!1,static:!1},r=g.ObjectTypeProperty;return p(r.key,i,"key",s,1),p(r.value,i,"value",e,1),p(r.variance,i,"variance",t,1),i}function df(s){let e={type:"ObjectTypeSpreadProperty",argument:s},t=g.ObjectTypeSpreadProperty;return p(t.argument,e,"argument",s,1),e}function mf(s,e=null,t=null,i){let r={type:"OpaqueType",id:s,typeParameters:e,supertype:t,impltype:i},n=g.OpaqueType;return p(n.id,r,"id",s,1),p(n.typeParameters,r,"typeParameters",e,1),p(n.supertype,r,"supertype",t,1),p(n.impltype,r,"impltype",i,1),r}function yf(s,e){let t={type:"QualifiedTypeIdentifier",id:s,qualification:e},i=g.QualifiedTypeIdentifier;return p(i.id,t,"id",s,1),p(i.qualification,t,"qualification",e,1),t}function Tf(s){let e={type:"StringLiteralTypeAnnotation",value:s},t=g.StringLiteralTypeAnnotation;return p(t.value,e,"value",s),e}function Ha(){return{type:"StringTypeAnnotation"}}function Sf(){return{type:"SymbolTypeAnnotation"}}function xf(){return{type:"ThisTypeAnnotation"}}function gf(s){let e={type:"TupleTypeAnnotation",types:s},t=g.TupleTypeAnnotation;return p(t.types,e,"types",s,1),e}function Pf(s){let e={type:"TypeofTypeAnnotation",argument:s},t=g.TypeofTypeAnnotation;return p(t.argument,e,"argument",s,1),e}function bf(s,e=null,t){let i={type:"TypeAlias",id:s,typeParameters:e,right:t},r=g.TypeAlias;return p(r.id,i,"id",s,1),p(r.typeParameters,i,"typeParameters",e,1),p(r.right,i,"right",t,1),i}function Ef(s){let e={type:"TypeAnnotation",typeAnnotation:s},t=g.TypeAnnotation;return p(t.typeAnnotation,e,"typeAnnotation",s,1),e}function Af(s,e){let t={type:"TypeCastExpression",expression:s,typeAnnotation:e},i=g.TypeCastExpression;return p(i.expression,t,"expression",s,1),p(i.typeAnnotation,t,"typeAnnotation",e,1),t}function Cf(s,e=null,t=null,i=null){let r={type:"TypeParameter",name:s,bound:e,default:t,variance:i},n=g.TypeParameter;return p(n.name,r,"name",s),p(n.bound,r,"bound",e,1),p(n.default,r,"default",t,1),p(n.variance,r,"variance",i,1),r}function If(s){let e={type:"TypeParameterDeclaration",params:s},t=g.TypeParameterDeclaration;return p(t.params,e,"params",s,1),e}function wf(s){let e={type:"TypeParameterInstantiation",params:s},t=g.TypeParameterInstantiation;return p(t.params,e,"params",s,1),e}function Ya(s){let e={type:"UnionTypeAnnotation",types:s},t=g.UnionTypeAnnotation;return p(t.types,e,"types",s,1),e}function Nf(s){let e={type:"Variance",kind:s},t=g.Variance;return p(t.kind,e,"kind",s),e}function Ga(){return{type:"VoidTypeAnnotation"}}function vf(s,e){let t={type:"EnumDeclaration",id:s,body:e},i=g.EnumDeclaration;return p(i.id,t,"id",s,1),p(i.body,t,"body",e,1),t}function kf(s){let e={type:"EnumBooleanBody",members:s,explicitType:!1,hasUnknownMembers:!1},t=g.EnumBooleanBody;return p(t.members,e,"members",s,1),e}function Df(s){let e={type:"EnumNumberBody",members:s,explicitType:!1,hasUnknownMembers:!1},t=g.EnumNumberBody;return p(t.members,e,"members",s,1),e}function Lf(s){let e={type:"EnumStringBody",members:s,explicitType:!1,hasUnknownMembers:!1},t=g.EnumStringBody;return p(t.members,e,"members",s,1),e}function Of(s){let e={type:"EnumSymbolBody",members:s,hasUnknownMembers:!1},t=g.EnumSymbolBody;return p(t.members,e,"members",s,1),e}function Mf(s,e){let t={type:"EnumBooleanMember",id:s,init:e},i=g.EnumBooleanMember;return p(i.id,t,"id",s,1),p(i.init,t,"init",e,1),t}function Ff(s,e){let t={type:"EnumNumberMember",id:s,init:e},i=g.EnumNumberMember;return p(i.id,t,"id",s,1),p(i.init,t,"init",e,1),t}function Bf(s,e){let t={type:"EnumStringMember",id:s,init:e},i=g.EnumStringMember;return p(i.id,t,"id",s,1),p(i.init,t,"init",e,1),t}function _f(s){let e={type:"EnumDefaultedMember",id:s},t=g.EnumDefaultedMember;return p(t.id,e,"id",s,1),e}function jf(s,e){let t={type:"IndexedAccessType",objectType:s,indexType:e},i=g.IndexedAccessType;return p(i.objectType,t,"objectType",s,1),p(i.indexType,t,"indexType",e,1),t}function Rf(s,e){let t={type:"OptionalIndexedAccessType",objectType:s,indexType:e,optional:!1},i=g.OptionalIndexedAccessType;return p(i.objectType,t,"objectType",s,1),p(i.indexType,t,"indexType",e,1),t}function Uf(s,e=null){let t={type:"JSXAttribute",name:s,value:e},i=g.JSXAttribute;return p(i.name,t,"name",s,1),p(i.value,t,"value",e,1),t}function Vf(s){let e={type:"JSXClosingElement",name:s},t=g.JSXClosingElement;return p(t.name,e,"name",s,1),e}function Kf(s,e=null,t){let i={type:"JSXElement",openingElement:s,closingElement:e,children:t},r=g.JSXElement;return p(r.openingElement,i,"openingElement",s,1),p(r.closingElement,i,"closingElement",e,1),p(r.children,i,"children",t,1),i}function qf(){return{type:"JSXEmptyExpression"}}function $f(s){let e={type:"JSXExpressionContainer",expression:s},t=g.JSXExpressionContainer;return p(t.expression,e,"expression",s,1),e}function Jf(s){let e={type:"JSXSpreadChild",expression:s},t=g.JSXSpreadChild;return p(t.expression,e,"expression",s,1),e}function Xf(s){let e={type:"JSXIdentifier",name:s},t=g.JSXIdentifier;return p(t.name,e,"name",s),e}function Wf(s,e){let t={type:"JSXMemberExpression",object:s,property:e},i=g.JSXMemberExpression;return p(i.object,t,"object",s,1),p(i.property,t,"property",e,1),t}function zf(s,e){let t={type:"JSXNamespacedName",namespace:s,name:e},i=g.JSXNamespacedName;return p(i.namespace,t,"namespace",s,1),p(i.name,t,"name",e,1),t}function Hf(s,e,t=!1){let i={type:"JSXOpeningElement",name:s,attributes:e,selfClosing:t},r=g.JSXOpeningElement;return p(r.name,i,"name",s,1),p(r.attributes,i,"attributes",e,1),p(r.selfClosing,i,"selfClosing",t),i}function Yf(s){let e={type:"JSXSpreadAttribute",argument:s},t=g.JSXSpreadAttribute;return p(t.argument,e,"argument",s,1),e}function Gf(s){let e={type:"JSXText",value:s},t=g.JSXText;return p(t.value,e,"value",s),e}function Qf(s,e,t){let i={type:"JSXFragment",openingFragment:s,closingFragment:e,children:t},r=g.JSXFragment;return p(r.openingFragment,i,"openingFragment",s,1),p(r.closingFragment,i,"closingFragment",e,1),p(r.children,i,"children",t,1),i}function Zf(){return{type:"JSXOpeningFragment"}}function ed(){return{type:"JSXClosingFragment"}}function td(s,e){let t={type:"Placeholder",expectedNode:s,name:e},i=g.Placeholder;return p(i.expectedNode,t,"expectedNode",s),p(i.name,t,"name",e,1),t}function sd(s){let e={type:"V8IntrinsicIdentifier",name:s},t=g.V8IntrinsicIdentifier;return p(t.name,e,"name",s),e}function id(){return{type:"ArgumentPlaceholder"}}function rd(s,e){let t={type:"BindExpression",object:s,callee:e},i=g.BindExpression;return p(i.object,t,"object",s,1),p(i.callee,t,"callee",e,1),t}function nd(s,e=null,t=null,i=null,r=!1,n=!1){let a={type:"ClassAccessorProperty",key:s,value:e,typeAnnotation:t,decorators:i,computed:r,static:n},o=g.ClassAccessorProperty;return p(o.key,a,"key",s,1),p(o.value,a,"value",e,1),p(o.typeAnnotation,a,"typeAnnotation",t,1),p(o.decorators,a,"decorators",i,1),p(o.computed,a,"computed",r),p(o.static,a,"static",n),a}function ad(s){let e={type:"Decorator",expression:s},t=g.Decorator;return p(t.expression,e,"expression",s,1),e}function od(s,e=!1){let t={type:"DoExpression",body:s,async:e},i=g.DoExpression;return p(i.body,t,"body",s,1),p(i.async,t,"async",e),t}function cd(s){let e={type:"ExportDefaultSpecifier",exported:s},t=g.ExportDefaultSpecifier;return p(t.exported,e,"exported",s,1),e}function ld(s){let e={type:"ModuleExpression",body:s},t=g.ModuleExpression;return p(t.body,e,"body",s,1),e}function ud(){return{type:"TopicReference"}}function pd(){return{type:"VoidPattern"}}function hd(s){let e={type:"TSParameterProperty",parameter:s},t=g.TSParameterProperty;return p(t.parameter,e,"parameter",s,1),e}function fd(s=null,e=null,t,i=null){let r={type:"TSDeclareFunction",id:s,typeParameters:e,params:t,returnType:i,async:!1,generator:!1},n=g.TSDeclareFunction;return p(n.id,r,"id",s,1),p(n.typeParameters,r,"typeParameters",e,1),p(n.params,r,"params",t,1),p(n.returnType,r,"returnType",i,1),r}function dd(s,e=null,t,i=null){let r={type:"TSDeclareMethod",key:s,typeParameters:e,params:t,returnType:i,async:!1,computed:!1,generator:!1,kind:"method",static:!1},n=g.TSDeclareMethod;return p(n.key,r,"key",s,1),p(n.typeParameters,r,"typeParameters",e,1),p(n.params,r,"params",t,1),p(n.returnType,r,"returnType",i,1),r}function md(s,e){let t={type:"TSQualifiedName",left:s,right:e},i=g.TSQualifiedName;return p(i.left,t,"left",s,1),p(i.right,t,"right",e,1),t}function yd(s=null,e,t=null){let i={type:"TSCallSignatureDeclaration",typeParameters:s,params:e,returnType:t},r=g.TSCallSignatureDeclaration;return p(r.typeParameters,i,"typeParameters",s,1),p(r.params,i,"params",e,1),p(r.returnType,i,"returnType",t,1),i}function Td(s=null,e,t=null){let i={type:"TSConstructSignatureDeclaration",typeParameters:s,params:e,returnType:t},r=g.TSConstructSignatureDeclaration;return p(r.typeParameters,i,"typeParameters",s,1),p(r.params,i,"params",e,1),p(r.returnType,i,"returnType",t,1),i}function Sd(s,e=null){let t={type:"TSPropertySignature",key:s,typeAnnotation:e,computed:!1},i=g.TSPropertySignature;return p(i.key,t,"key",s,1),p(i.typeAnnotation,t,"typeAnnotation",e,1),t}function xd(s,e=null,t,i=null){let r={type:"TSMethodSignature",key:s,typeParameters:e,params:t,returnType:i,computed:!1,kind:"method"},n=g.TSMethodSignature;return p(n.key,r,"key",s,1),p(n.typeParameters,r,"typeParameters",e,1),p(n.params,r,"params",t,1),p(n.returnType,r,"returnType",i,1),r}function gd(s,e=null){let t={type:"TSIndexSignature",parameters:s,typeAnnotation:e},i=g.TSIndexSignature;return p(i.parameters,t,"parameters",s,1),p(i.typeAnnotation,t,"typeAnnotation",e,1),t}function Pd(){return{type:"TSAnyKeyword"}}function bd(){return{type:"TSBooleanKeyword"}}function Ed(){return{type:"TSBigIntKeyword"}}function Ad(){return{type:"TSIntrinsicKeyword"}}function Cd(){return{type:"TSNeverKeyword"}}function Id(){return{type:"TSNullKeyword"}}function wd(){return{type:"TSNumberKeyword"}}function Nd(){return{type:"TSObjectKeyword"}}function vd(){return{type:"TSStringKeyword"}}function kd(){return{type:"TSSymbolKeyword"}}function Dd(){return{type:"TSUndefinedKeyword"}}function Ld(){return{type:"TSUnknownKeyword"}}function Od(){return{type:"TSVoidKeyword"}}function Md(){return{type:"TSThisType"}}function Fd(s=null,e,t=null){let i={type:"TSFunctionType",typeParameters:s,params:e,returnType:t},r=g.TSFunctionType;return p(r.typeParameters,i,"typeParameters",s,1),p(r.params,i,"params",e,1),p(r.returnType,i,"returnType",t,1),i}function Bd(s=null,e,t=null){let i={type:"TSConstructorType",typeParameters:s,params:e,returnType:t},r=g.TSConstructorType;return p(r.typeParameters,i,"typeParameters",s,1),p(r.params,i,"params",e,1),p(r.returnType,i,"returnType",t,1),i}function _d(s,e=null){let t={type:"TSTypeReference",typeName:s,typeArguments:e},i=g.TSTypeReference;return p(i.typeName,t,"typeName",s,1),p(i.typeArguments,t,"typeArguments",e,1),t}function jd(s,e=null,t=null){let i={type:"TSTypePredicate",parameterName:s,typeAnnotation:e,asserts:t},r=g.TSTypePredicate;return p(r.parameterName,i,"parameterName",s,1),p(r.typeAnnotation,i,"typeAnnotation",e,1),p(r.asserts,i,"asserts",t),i}function Rd(s,e=null){let t={type:"TSTypeQuery",exprName:s,typeArguments:e},i=g.TSTypeQuery;return p(i.exprName,t,"exprName",s,1),p(i.typeArguments,t,"typeArguments",e,1),t}function Ud(s){let e={type:"TSTypeLiteral",members:s},t=g.TSTypeLiteral;return p(t.members,e,"members",s,1),e}function Vd(s){let e={type:"TSArrayType",elementType:s},t=g.TSArrayType;return p(t.elementType,e,"elementType",s,1),e}function Kd(s){let e={type:"TSTupleType",elementTypes:s},t=g.TSTupleType;return p(t.elementTypes,e,"elementTypes",s,1),e}function qd(s){let e={type:"TSOptionalType",typeAnnotation:s},t=g.TSOptionalType;return p(t.typeAnnotation,e,"typeAnnotation",s,1),e}function $d(s){let e={type:"TSRestType",typeAnnotation:s},t=g.TSRestType;return p(t.typeAnnotation,e,"typeAnnotation",s,1),e}function Jd(s,e,t=!1){let i={type:"TSNamedTupleMember",label:s,elementType:e,optional:t},r=g.TSNamedTupleMember;return p(r.label,i,"label",s,1),p(r.elementType,i,"elementType",e,1),p(r.optional,i,"optional",t),i}function Qa(s){let e={type:"TSUnionType",types:s},t=g.TSUnionType;return p(t.types,e,"types",s,1),e}function Xd(s){let e={type:"TSIntersectionType",types:s},t=g.TSIntersectionType;return p(t.types,e,"types",s,1),e}function Wd(s,e,t,i){let r={type:"TSConditionalType",checkType:s,extendsType:e,trueType:t,falseType:i},n=g.TSConditionalType;return p(n.checkType,r,"checkType",s,1),p(n.extendsType,r,"extendsType",e,1),p(n.trueType,r,"trueType",t,1),p(n.falseType,r,"falseType",i,1),r}function zd(s){let e={type:"TSInferType",typeParameter:s},t=g.TSInferType;return p(t.typeParameter,e,"typeParameter",s,1),e}function Hd(s){let e={type:"TSParenthesizedType",typeAnnotation:s},t=g.TSParenthesizedType;return p(t.typeAnnotation,e,"typeAnnotation",s,1),e}function Yd(s,e){let t={type:"TSTypeOperator",typeAnnotation:s,operator:e},i=g.TSTypeOperator;return p(i.typeAnnotation,t,"typeAnnotation",s,1),p(i.operator,t,"operator",e),t}function Gd(s,e){let t={type:"TSIndexedAccessType",objectType:s,indexType:e},i=g.TSIndexedAccessType;return p(i.objectType,t,"objectType",s,1),p(i.indexType,t,"indexType",e,1),t}function Qd(s,e,t=null,i=null){let r={type:"TSMappedType",key:s,constraint:e,nameType:t,typeAnnotation:i},n=g.TSMappedType;return p(n.key,r,"key",s,1),p(n.constraint,r,"constraint",e,1),p(n.nameType,r,"nameType",t,1),p(n.typeAnnotation,r,"typeAnnotation",i,1),r}function Zd(s,e){let t={type:"TSTemplateLiteralType",quasis:s,types:e},i=g.TSTemplateLiteralType;return p(i.quasis,t,"quasis",s,1),p(i.types,t,"types",e,1),t}function em(s){let e={type:"TSLiteralType",literal:s},t=g.TSLiteralType;return p(t.literal,e,"literal",s,1),e}function tm(s,e=null){let t={type:"TSClassImplements",expression:s,typeArguments:e},i=g.TSClassImplements;return p(i.expression,t,"expression",s,1),p(i.typeArguments,t,"typeArguments",e,1),t}function sm(s,e=null){let t={type:"TSInterfaceHeritage",expression:s,typeArguments:e},i=g.TSInterfaceHeritage;return p(i.expression,t,"expression",s,1),p(i.typeArguments,t,"typeArguments",e,1),t}function im(s,e=null,t=null,i){let r={type:"TSInterfaceDeclaration",id:s,typeParameters:e,extends:t,body:i},n=g.TSInterfaceDeclaration;return p(n.id,r,"id",s,1),p(n.typeParameters,r,"typeParameters",e,1),p(n.extends,r,"extends",t,1),p(n.body,r,"body",i,1),r}function rm(s){let e={type:"TSInterfaceBody",body:s},t=g.TSInterfaceBody;return p(t.body,e,"body",s,1),e}function nm(s,e=null,t){let i={type:"TSTypeAliasDeclaration",id:s,typeParameters:e,typeAnnotation:t},r=g.TSTypeAliasDeclaration;return p(r.id,i,"id",s,1),p(r.typeParameters,i,"typeParameters",e,1),p(r.typeAnnotation,i,"typeAnnotation",t,1),i}function am(s,e=null){let t={type:"TSInstantiationExpression",expression:s,typeArguments:e},i=g.TSInstantiationExpression;return p(i.expression,t,"expression",s,1),p(i.typeArguments,t,"typeArguments",e,1),t}function om(s,e){let t={type:"TSAsExpression",expression:s,typeAnnotation:e},i=g.TSAsExpression;return p(i.expression,t,"expression",s,1),p(i.typeAnnotation,t,"typeAnnotation",e,1),t}function cm(s,e){let t={type:"TSSatisfiesExpression",expression:s,typeAnnotation:e},i=g.TSSatisfiesExpression;return p(i.expression,t,"expression",s,1),p(i.typeAnnotation,t,"typeAnnotation",e,1),t}function lm(s,e){let t={type:"TSTypeAssertion",typeAnnotation:s,expression:e},i=g.TSTypeAssertion;return p(i.typeAnnotation,t,"typeAnnotation",s,1),p(i.expression,t,"expression",e,1),t}function um(s){let e={type:"TSEnumBody",members:s},t=g.TSEnumBody;return p(t.members,e,"members",s,1),e}function pm(s,e){let t={type:"TSEnumDeclaration",id:s,body:e},i=g.TSEnumDeclaration;return p(i.id,t,"id",s,1),p(i.body,t,"body",e,1),t}function hm(s,e=null){let t={type:"TSEnumMember",id:s,initializer:e},i=g.TSEnumMember;return p(i.id,t,"id",s,1),p(i.initializer,t,"initializer",e,1),t}function fm(s,e){let t={type:"TSModuleDeclaration",id:s,body:e,kind:"namespace"},i=g.TSModuleDeclaration;return p(i.id,t,"id",s,1),p(i.body,t,"body",e,1),t}function dm(s){let e={type:"TSModuleBlock",body:s},t=g.TSModuleBlock;return p(t.body,e,"body",s,1),e}function mm(s,e=null,t=null){let i={type:"TSImportType",source:s,qualifier:e,typeArguments:t},r=g.TSImportType;return p(r.source,i,"source",s,1),p(r.qualifier,i,"qualifier",e,1),p(r.typeArguments,i,"typeArguments",t,1),i}function ym(s,e){let t={type:"TSImportEqualsDeclaration",id:s,moduleReference:e},i=g.TSImportEqualsDeclaration;return p(i.id,t,"id",s,1),p(i.moduleReference,t,"moduleReference",e,1),t}function Tm(s){let e={type:"TSExternalModuleReference",expression:s},t=g.TSExternalModuleReference;return p(t.expression,e,"expression",s,1),e}function Sm(s){let e={type:"TSNonNullExpression",expression:s},t=g.TSNonNullExpression;return p(t.expression,e,"expression",s,1),e}function xm(s){let e={type:"TSExportAssignment",expression:s},t=g.TSExportAssignment;return p(t.expression,e,"expression",s,1),e}function gm(s){let e={type:"TSNamespaceExportDeclaration",id:s},t=g.TSNamespaceExportDeclaration;return p(t.id,e,"id",s,1),e}function Pm(s){let e={type:"TSTypeAnnotation",typeAnnotation:s},t=g.TSTypeAnnotation;return p(t.typeAnnotation,e,"typeAnnotation",s,1),e}function bm(s){let e={type:"TSTypeParameterInstantiation",params:s},t=g.TSTypeParameterInstantiation;return p(t.params,e,"params",s,1),e}function Em(s){let e={type:"TSTypeParameterDeclaration",params:s},t=g.TSTypeParameterDeclaration;return p(t.params,e,"params",s,1),e}function Am(s=null,e=null,t){let i={type:"TSTypeParameter",constraint:s,default:e,name:t},r=g.TSTypeParameter;return p(r.constraint,i,"constraint",s,1),p(r.default,i,"default",e,1),p(r.name,i,"name",t,1),i}function Cm(s){return Be("NumberLiteral","NumericLiteral","The node type "),St(s)}function Im(s,e=""){return Be("RegexLiteral","RegExpLiteral","The node type "),ar(s,e)}function wm(s){return Be("RestProperty","RestElement","The node type "),qa(s)}function Nm(s){return Be("SpreadProperty","SpreadElement","The node type "),Ja(s)}var tw=Object.defineProperty({__proto__:null,anyTypeAnnotation:Xa,argumentPlaceholder:id,arrayExpression:Ba,arrayPattern:eh,arrayTypeAnnotation:Mh,arrowFunctionExpression:th,assignmentExpression:Sp,assignmentPattern:Zp,awaitExpression:bh,bigIntLiteral:Gi,bigIntLiteralTypeAnnotation:cf,binaryExpression:_a,bindExpression:rd,blockStatement:ja,booleanLiteral:Ua,booleanLiteralTypeAnnotation:Fh,booleanTypeAnnotation:Wa,breakStatement:bp,callExpression:Ep,catchClause:Ap,classAccessorProperty:nd,classBody:sh,classDeclaration:rh,classExpression:ih,classImplements:_h,classMethod:mh,classPrivateMethod:kh,classPrivateProperty:vh,classProperty:Nh,conditionalExpression:Cp,continueStatement:Ip,debuggerStatement:wp,declareClass:jh,declareExportAllDeclaration:Wh,declareExportDeclaration:Xh,declareFunction:Rh,declareInterface:Uh,declareModule:Vh,declareModuleExports:Kh,declareOpaqueType:$h,declareTypeAlias:qh,declareVariable:Jh,declaredPredicate:zh,decorator:ad,directive:gp,directiveLiteral:Pp,doExpression:od,doWhileStatement:Np,emptyStatement:vp,emptyTypeAnnotation:nf,enumBooleanBody:kf,enumBooleanMember:Mf,enumDeclaration:vf,enumDefaultedMember:_f,enumNumberBody:Df,enumNumberMember:Ff,enumStringBody:Lf,enumStringMember:Bf,enumSymbolBody:Of,existsTypeAnnotation:Hh,exportAllDeclaration:nh,exportDefaultDeclaration:ah,exportDefaultSpecifier:cd,exportNamedDeclaration:oh,exportNamespaceSpecifier:Ch,exportSpecifier:ch,expressionStatement:nr,file:kp,forInStatement:Dp,forOfStatement:lh,forStatement:Lp,functionDeclaration:Op,functionExpression:Mp,functionTypeAnnotation:Yh,functionTypeParam:Gh,genericTypeAnnotation:qs,identifier:Ot,ifStatement:Fp,import:Ah,importAttribute:Oh,importDeclaration:uh,importDefaultSpecifier:ph,importExpression:Eh,importNamespaceSpecifier:hh,importSpecifier:fh,indexedAccessType:jf,inferredPredicate:Qh,interfaceDeclaration:ef,interfaceExtends:Zh,interfaceTypeAnnotation:tf,interpreterDirective:xp,intersectionTypeAnnotation:sf,jsxAttribute:Uf,jsxClosingElement:Vf,jsxClosingFragment:ed,jsxElement:Kf,jsxEmptyExpression:qf,jsxExpressionContainer:$f,jsxFragment:Qf,jsxIdentifier:Xf,jsxMemberExpression:Wf,jsxNamespacedName:zf,jsxOpeningElement:Hf,jsxOpeningFragment:Zf,jsxSpreadAttribute:Yf,jsxSpreadChild:Jf,jsxText:Gf,labeledStatement:Bp,logicalExpression:_p,memberExpression:or,metaProperty:dh,mixedTypeAnnotation:rf,moduleExpression:ld,newExpression:jp,nullLiteral:Ra,nullLiteralTypeAnnotation:Bh,nullableTypeAnnotation:af,numberLiteral:Cm,numberLiteralTypeAnnotation:of,numberTypeAnnotation:za,numericLiteral:St,objectExpression:Va,objectMethod:Up,objectPattern:yh,objectProperty:Ka,objectTypeAnnotation:lf,objectTypeCallProperty:pf,objectTypeIndexer:hf,objectTypeInternalSlot:uf,objectTypeProperty:ff,objectTypeSpreadProperty:df,opaqueType:mf,optionalCallExpression:wh,optionalIndexedAccessType:Rf,optionalMemberExpression:Ih,parenthesizedExpression:Kp,placeholder:td,privateName:Dh,program:Rp,qualifiedTypeIdentifier:yf,regExpLiteral:ar,regexLiteral:Im,restElement:qa,restProperty:wm,returnStatement:$a,sequenceExpression:Vp,spreadElement:Ja,spreadProperty:Nm,staticBlock:Lh,stringLiteral:Mt,stringLiteralTypeAnnotation:Tf,stringTypeAnnotation:Ha,super:Th,switchCase:qp,switchStatement:$p,symbolTypeAnnotation:Sf,taggedTemplateExpression:Sh,templateElement:xh,templateLiteral:gh,thisExpression:Jp,thisTypeAnnotation:xf,throwStatement:Xp,topicReference:ud,tryStatement:Wp,tsAnyKeyword:Pd,tsArrayType:Vd,tsAsExpression:om,tsBigIntKeyword:Ed,tsBooleanKeyword:bd,tsCallSignatureDeclaration:yd,tsClassImplements:tm,tsConditionalType:Wd,tsConstructSignatureDeclaration:Td,tsConstructorType:Bd,tsDeclareFunction:fd,tsDeclareMethod:dd,tsEnumBody:um,tsEnumDeclaration:pm,tsEnumMember:hm,tsExportAssignment:xm,tsExternalModuleReference:Tm,tsFunctionType:Fd,tsImportEqualsDeclaration:ym,tsImportType:mm,tsIndexSignature:gd,tsIndexedAccessType:Gd,tsInferType:zd,tsInstantiationExpression:am,tsInterfaceBody:rm,tsInterfaceDeclaration:im,tsInterfaceHeritage:sm,tsIntersectionType:Xd,tsIntrinsicKeyword:Ad,tsLiteralType:em,tsMappedType:Qd,tsMethodSignature:xd,tsModuleBlock:dm,tsModuleDeclaration:fm,tsNamedTupleMember:Jd,tsNamespaceExportDeclaration:gm,tsNeverKeyword:Cd,tsNonNullExpression:Sm,tsNullKeyword:Id,tsNumberKeyword:wd,tsObjectKeyword:Nd,tsOptionalType:qd,tsParameterProperty:hd,tsParenthesizedType:Hd,tsPropertySignature:Sd,tsQualifiedName:md,tsRestType:$d,tsSatisfiesExpression:cm,tsStringKeyword:vd,tsSymbolKeyword:kd,tsTemplateLiteralType:Zd,tsThisType:Md,tsTupleType:Kd,tsTypeAliasDeclaration:nm,tsTypeAnnotation:Pm,tsTypeAssertion:lm,tsTypeLiteral:Ud,tsTypeOperator:Yd,tsTypeParameter:Am,tsTypeParameterDeclaration:Em,tsTypeParameterInstantiation:bm,tsTypePredicate:jd,tsTypeQuery:Rd,tsTypeReference:_d,tsUndefinedKeyword:Dd,tsUnionType:Qa,tsUnknownKeyword:Ld,tsVoidKeyword:Od,tupleTypeAnnotation:gf,typeAlias:bf,typeAnnotation:Ef,typeCastExpression:Af,typeParameter:Cf,typeParameterDeclaration:If,typeParameterInstantiation:wf,typeofTypeAnnotation:Pf,unaryExpression:Js,unionTypeAnnotation:Ya,updateExpression:zp,v8IntrinsicIdentifier:sd,variableDeclaration:Hp,variableDeclarator:Yp,variance:Nf,voidPattern:pd,voidTypeAnnotation:Ga,whileStatement:Gp,withStatement:Qp,yieldExpression:Ph},Symbol.toStringTag,{value:"Module"});function T(s){return function(){return Be(s.replace(/^(?:ts|jsx|[a-z])/,e=>e.toUpperCase()),s,"Usage of builders starting with an uppercase letter such as ","uppercase builders"),tw[s](...arguments)}}var sw=T("arrayExpression"),iw=T("assignmentExpression"),rw=T("binaryExpression"),nw=T("interpreterDirective"),aw=T("directive"),ow=T("directiveLiteral"),cw=T("blockStatement"),lw=T("breakStatement"),uw=T("callExpression"),pw=T("catchClause"),hw=T("conditionalExpression"),fw=T("continueStatement"),dw=T("debuggerStatement"),mw=T("doWhileStatement"),yw=T("emptyStatement"),Tw=T("expressionStatement"),Sw=T("file"),xw=T("forInStatement"),gw=T("forStatement"),Pw=T("functionDeclaration"),bw=T("functionExpression"),Ew=T("identifier"),Aw=T("ifStatement"),Cw=T("labeledStatement"),Iw=T("stringLiteral"),ww=T("numericLiteral"),Nw=T("nullLiteral"),vw=T("booleanLiteral"),kw=T("regExpLiteral"),Dw=T("logicalExpression"),Lw=T("memberExpression"),Ow=T("newExpression"),Mw=T("program"),Fw=T("objectExpression"),Bw=T("objectMethod"),_w=T("objectProperty"),jw=T("restElement"),Rw=T("returnStatement"),Uw=T("sequenceExpression"),Vw=T("parenthesizedExpression"),Kw=T("switchCase"),qw=T("switchStatement"),$w=T("thisExpression"),Jw=T("throwStatement"),Xw=T("tryStatement"),Ww=T("unaryExpression"),zw=T("updateExpression"),Hw=T("variableDeclaration"),Yw=T("variableDeclarator"),Gw=T("whileStatement"),Qw=T("withStatement"),Zw=T("assignmentPattern"),e1=T("arrayPattern"),t1=T("arrowFunctionExpression"),s1=T("classBody"),i1=T("classExpression"),r1=T("classDeclaration"),n1=T("exportAllDeclaration"),a1=T("exportDefaultDeclaration"),o1=T("exportNamedDeclaration"),c1=T("exportSpecifier"),l1=T("forOfStatement"),u1=T("importDeclaration"),p1=T("importDefaultSpecifier"),h1=T("importNamespaceSpecifier"),f1=T("importSpecifier"),d1=T("metaProperty"),m1=T("classMethod"),y1=T("objectPattern"),T1=T("spreadElement"),S1=T("super"),x1=T("taggedTemplateExpression"),g1=T("templateElement"),P1=T("templateLiteral"),b1=T("yieldExpression"),E1=T("awaitExpression"),A1=T("importExpression"),C1=T("import"),I1=T("bigIntLiteral"),w1=T("exportNamespaceSpecifier"),N1=T("optionalMemberExpression"),v1=T("optionalCallExpression"),k1=T("classProperty"),D1=T("classPrivateProperty"),L1=T("classPrivateMethod"),O1=T("privateName"),M1=T("staticBlock"),F1=T("importAttribute"),B1=T("anyTypeAnnotation"),_1=T("arrayTypeAnnotation"),j1=T("booleanTypeAnnotation"),R1=T("booleanLiteralTypeAnnotation"),U1=T("nullLiteralTypeAnnotation"),V1=T("classImplements"),K1=T("declareClass"),q1=T("declareFunction"),$1=T("declareInterface"),J1=T("declareModule"),X1=T("declareModuleExports"),W1=T("declareTypeAlias"),z1=T("declareOpaqueType"),H1=T("declareVariable"),Y1=T("declareExportDeclaration"),G1=T("declareExportAllDeclaration"),Q1=T("declaredPredicate"),Z1=T("existsTypeAnnotation"),eN=T("functionTypeAnnotation"),tN=T("functionTypeParam"),sN=T("genericTypeAnnotation"),iN=T("inferredPredicate"),rN=T("interfaceExtends"),nN=T("interfaceDeclaration"),aN=T("interfaceTypeAnnotation"),oN=T("intersectionTypeAnnotation"),cN=T("mixedTypeAnnotation"),lN=T("emptyTypeAnnotation"),uN=T("nullableTypeAnnotation"),pN=T("numberLiteralTypeAnnotation"),hN=T("bigIntLiteralTypeAnnotation"),fN=T("numberTypeAnnotation"),dN=T("objectTypeAnnotation"),mN=T("objectTypeInternalSlot"),yN=T("objectTypeCallProperty"),TN=T("objectTypeIndexer"),SN=T("objectTypeProperty"),xN=T("objectTypeSpreadProperty"),gN=T("opaqueType"),PN=T("qualifiedTypeIdentifier"),bN=T("stringLiteralTypeAnnotation"),EN=T("stringTypeAnnotation"),AN=T("symbolTypeAnnotation"),CN=T("thisTypeAnnotation"),IN=T("tupleTypeAnnotation"),wN=T("typeofTypeAnnotation"),NN=T("typeAlias"),vN=T("typeAnnotation"),kN=T("typeCastExpression"),DN=T("typeParameter"),LN=T("typeParameterDeclaration"),ON=T("typeParameterInstantiation"),MN=T("unionTypeAnnotation"),FN=T("variance"),BN=T("voidTypeAnnotation"),_N=T("enumDeclaration"),jN=T("enumBooleanBody"),RN=T("enumNumberBody"),UN=T("enumStringBody"),VN=T("enumSymbolBody"),KN=T("enumBooleanMember"),qN=T("enumNumberMember"),$N=T("enumStringMember"),JN=T("enumDefaultedMember"),XN=T("indexedAccessType"),WN=T("optionalIndexedAccessType"),zN=T("jsxAttribute"),HN=T("jsxClosingElement"),YN=T("jsxElement"),GN=T("jsxEmptyExpression"),QN=T("jsxExpressionContainer"),ZN=T("jsxSpreadChild"),ev=T("jsxIdentifier"),tv=T("jsxMemberExpression"),sv=T("jsxNamespacedName"),iv=T("jsxOpeningElement"),rv=T("jsxSpreadAttribute"),nv=T("jsxText"),av=T("jsxFragment"),ov=T("jsxOpeningFragment"),cv=T("jsxClosingFragment"),lv=T("placeholder"),uv=T("v8IntrinsicIdentifier"),pv=T("argumentPlaceholder"),hv=T("bindExpression"),fv=T("classAccessorProperty"),dv=T("decorator"),mv=T("doExpression"),yv=T("exportDefaultSpecifier"),Tv=T("moduleExpression"),Sv=T("topicReference"),xv=T("voidPattern"),gv=T("tsParameterProperty"),Pv=T("tsDeclareFunction"),bv=T("tsDeclareMethod"),Ev=T("tsQualifiedName"),Av=T("tsCallSignatureDeclaration"),Cv=T("tsConstructSignatureDeclaration"),Iv=T("tsPropertySignature"),wv=T("tsMethodSignature"),Nv=T("tsIndexSignature"),vv=T("tsAnyKeyword"),kv=T("tsBooleanKeyword"),Dv=T("tsBigIntKeyword"),Lv=T("tsIntrinsicKeyword"),Ov=T("tsNeverKeyword"),Mv=T("tsNullKeyword"),Fv=T("tsNumberKeyword"),Bv=T("tsObjectKeyword"),_v=T("tsStringKeyword"),jv=T("tsSymbolKeyword"),Rv=T("tsUndefinedKeyword"),Uv=T("tsUnknownKeyword"),Vv=T("tsVoidKeyword"),Kv=T("tsThisType"),qv=T("tsFunctionType"),$v=T("tsConstructorType"),Jv=T("tsTypeReference"),Xv=T("tsTypePredicate"),Wv=T("tsTypeQuery"),zv=T("tsTypeLiteral"),Hv=T("tsArrayType"),Yv=T("tsTupleType"),Gv=T("tsOptionalType"),Qv=T("tsRestType"),Zv=T("tsNamedTupleMember"),e0=T("tsUnionType"),t0=T("tsIntersectionType"),s0=T("tsConditionalType"),i0=T("tsInferType"),r0=T("tsParenthesizedType"),n0=T("tsTypeOperator"),a0=T("tsIndexedAccessType"),o0=T("tsMappedType"),c0=T("tsTemplateLiteralType"),l0=T("tsLiteralType"),u0=T("tsClassImplements"),p0=T("tsInterfaceHeritage"),h0=T("tsInterfaceDeclaration"),f0=T("tsInterfaceBody"),d0=T("tsTypeAliasDeclaration"),m0=T("tsInstantiationExpression"),y0=T("tsAsExpression"),T0=T("tsSatisfiesExpression"),S0=T("tsTypeAssertion"),x0=T("tsEnumBody"),g0=T("tsEnumDeclaration"),P0=T("tsEnumMember"),b0=T("tsModuleDeclaration"),E0=T("tsModuleBlock"),A0=T("tsImportType"),C0=T("tsImportEqualsDeclaration"),I0=T("tsExternalModuleReference"),w0=T("tsNonNullExpression"),N0=T("tsExportAssignment"),v0=T("tsNamespaceExportDeclaration"),k0=T("tsTypeAnnotation"),D0=T("tsTypeParameterInstantiation"),L0=T("tsTypeParameterDeclaration"),O0=T("tsTypeParameter");function M0(s,e){let t=s.value.split(/\r\n|\n|\r/),i=0;for(let n=0;n<t.length;n++)/[^ \t]/.exec(t[n])&&(i=n);let r="";for(let n=0;n<t.length;n++){let a=t[n],o=n===0,c=n===t.length-1,l=n===i,u=a.replace(/\t/g," ");o||(u=u.replace(/^ +/,"")),c||(u=u.replace(/ +$/,"")),u&&(l||(u+=" "),r+=u)}r&&e.push(Wm(Mt(r),s))}function F0(s){let e=[];for(let t=0;t<s.children.length;t++){let i=s.children[t];if(ju(i)){M0(i,e);continue}_u(i)&&(i=i.expression),!Bu(i)&&e.push(i)}return e}function vm(s){return!!(s&&xt[s.type])}function B0(s){if(!vm(s)){let e=s?.type??JSON.stringify(s);throw new TypeError(`Not a valid node of type "${e}"`)}}function d(s,e,t){if(!Ce(s,e,t))throw new Error(`Expected type "${s}" with option ${JSON.stringify(t)}, but instead got "${e.type}".`)}function _0(s,e){d("ArrayExpression",s,e)}function j0(s,e){d("AssignmentExpression",s,e)}function R0(s,e){d("BinaryExpression",s,e)}function U0(s,e){d("InterpreterDirective",s,e)}function V0(s,e){d("Directive",s,e)}function K0(s,e){d("DirectiveLiteral",s,e)}function q0(s,e){d("BlockStatement",s,e)}function $0(s,e){d("BreakStatement",s,e)}function J0(s,e){d("CallExpression",s,e)}function X0(s,e){d("CatchClause",s,e)}function W0(s,e){d("ConditionalExpression",s,e)}function z0(s,e){d("ContinueStatement",s,e)}function H0(s,e){d("DebuggerStatement",s,e)}function Y0(s,e){d("DoWhileStatement",s,e)}function G0(s,e){d("EmptyStatement",s,e)}function Q0(s,e){d("ExpressionStatement",s,e)}function Z0(s,e){d("File",s,e)}function ek(s,e){d("ForInStatement",s,e)}function tk(s,e){d("ForStatement",s,e)}function sk(s,e){d("FunctionDeclaration",s,e)}function ik(s,e){d("FunctionExpression",s,e)}function rk(s,e){d("Identifier",s,e)}function nk(s,e){d("IfStatement",s,e)}function ak(s,e){d("LabeledStatement",s,e)}function ok(s,e){d("StringLiteral",s,e)}function ck(s,e){d("NumericLiteral",s,e)}function lk(s,e){d("NullLiteral",s,e)}function uk(s,e){d("BooleanLiteral",s,e)}function pk(s,e){d("RegExpLiteral",s,e)}function hk(s,e){d("LogicalExpression",s,e)}function fk(s,e){d("MemberExpression",s,e)}function dk(s,e){d("NewExpression",s,e)}function mk(s,e){d("Program",s,e)}function yk(s,e){d("ObjectExpression",s,e)}function Tk(s,e){d("ObjectMethod",s,e)}function Sk(s,e){d("ObjectProperty",s,e)}function xk(s,e){d("RestElement",s,e)}function gk(s,e){d("ReturnStatement",s,e)}function Pk(s,e){d("SequenceExpression",s,e)}function bk(s,e){d("ParenthesizedExpression",s,e)}function Ek(s,e){d("SwitchCase",s,e)}function Ak(s,e){d("SwitchStatement",s,e)}function Ck(s,e){d("ThisExpression",s,e)}function Ik(s,e){d("ThrowStatement",s,e)}function wk(s,e){d("TryStatement",s,e)}function Nk(s,e){d("UnaryExpression",s,e)}function vk(s,e){d("UpdateExpression",s,e)}function kk(s,e){d("VariableDeclaration",s,e)}function Dk(s,e){d("VariableDeclarator",s,e)}function Lk(s,e){d("WhileStatement",s,e)}function Ok(s,e){d("WithStatement",s,e)}function Mk(s,e){d("AssignmentPattern",s,e)}function Fk(s,e){d("ArrayPattern",s,e)}function Bk(s,e){d("ArrowFunctionExpression",s,e)}function _k(s,e){d("ClassBody",s,e)}function jk(s,e){d("ClassExpression",s,e)}function Rk(s,e){d("ClassDeclaration",s,e)}function Uk(s,e){d("ExportAllDeclaration",s,e)}function Vk(s,e){d("ExportDefaultDeclaration",s,e)}function Kk(s,e){d("ExportNamedDeclaration",s,e)}function qk(s,e){d("ExportSpecifier",s,e)}function $k(s,e){d("ForOfStatement",s,e)}function Jk(s,e){d("ImportDeclaration",s,e)}function Xk(s,e){d("ImportDefaultSpecifier",s,e)}function Wk(s,e){d("ImportNamespaceSpecifier",s,e)}function zk(s,e){d("ImportSpecifier",s,e)}function Hk(s,e){d("MetaProperty",s,e)}function Yk(s,e){d("ClassMethod",s,e)}function Gk(s,e){d("ObjectPattern",s,e)}function Qk(s,e){d("SpreadElement",s,e)}function Zk(s,e){d("Super",s,e)}function eD(s,e){d("TaggedTemplateExpression",s,e)}function tD(s,e){d("TemplateElement",s,e)}function sD(s,e){d("TemplateLiteral",s,e)}function iD(s,e){d("YieldExpression",s,e)}function rD(s,e){d("AwaitExpression",s,e)}function nD(s,e){d("ImportExpression",s,e)}function aD(s,e){d("Import",s,e)}function oD(s,e){d("BigIntLiteral",s,e)}function cD(s,e){d("ExportNamespaceSpecifier",s,e)}function lD(s,e){d("OptionalMemberExpression",s,e)}function uD(s,e){d("OptionalCallExpression",s,e)}function pD(s,e){d("ClassProperty",s,e)}function hD(s,e){d("ClassPrivateProperty",s,e)}function fD(s,e){d("ClassPrivateMethod",s,e)}function dD(s,e){d("PrivateName",s,e)}function mD(s,e){d("StaticBlock",s,e)}function yD(s,e){d("ImportAttribute",s,e)}function TD(s,e){d("AnyTypeAnnotation",s,e)}function SD(s,e){d("ArrayTypeAnnotation",s,e)}function xD(s,e){d("BooleanTypeAnnotation",s,e)}function gD(s,e){d("BooleanLiteralTypeAnnotation",s,e)}function PD(s,e){d("NullLiteralTypeAnnotation",s,e)}function bD(s,e){d("ClassImplements",s,e)}function ED(s,e){d("DeclareClass",s,e)}function AD(s,e){d("DeclareFunction",s,e)}function CD(s,e){d("DeclareInterface",s,e)}function ID(s,e){d("DeclareModule",s,e)}function wD(s,e){d("DeclareModuleExports",s,e)}function ND(s,e){d("DeclareTypeAlias",s,e)}function vD(s,e){d("DeclareOpaqueType",s,e)}function kD(s,e){d("DeclareVariable",s,e)}function DD(s,e){d("DeclareExportDeclaration",s,e)}function LD(s,e){d("DeclareExportAllDeclaration",s,e)}function OD(s,e){d("DeclaredPredicate",s,e)}function MD(s,e){d("ExistsTypeAnnotation",s,e)}function FD(s,e){d("FunctionTypeAnnotation",s,e)}function BD(s,e){d("FunctionTypeParam",s,e)}function _D(s,e){d("GenericTypeAnnotation",s,e)}function jD(s,e){d("InferredPredicate",s,e)}function RD(s,e){d("InterfaceExtends",s,e)}function UD(s,e){d("InterfaceDeclaration",s,e)}function VD(s,e){d("InterfaceTypeAnnotation",s,e)}function KD(s,e){d("IntersectionTypeAnnotation",s,e)}function qD(s,e){d("MixedTypeAnnotation",s,e)}function $D(s,e){d("EmptyTypeAnnotation",s,e)}function JD(s,e){d("NullableTypeAnnotation",s,e)}function XD(s,e){d("NumberLiteralTypeAnnotation",s,e)}function WD(s,e){d("BigIntLiteralTypeAnnotation",s,e)}function zD(s,e){d("NumberTypeAnnotation",s,e)}function HD(s,e){d("ObjectTypeAnnotation",s,e)}function YD(s,e){d("ObjectTypeInternalSlot",s,e)}function GD(s,e){d("ObjectTypeCallProperty",s,e)}function QD(s,e){d("ObjectTypeIndexer",s,e)}function ZD(s,e){d("ObjectTypeProperty",s,e)}function eL(s,e){d("ObjectTypeSpreadProperty",s,e)}function tL(s,e){d("OpaqueType",s,e)}function sL(s,e){d("QualifiedTypeIdentifier",s,e)}function iL(s,e){d("StringLiteralTypeAnnotation",s,e)}function rL(s,e){d("StringTypeAnnotation",s,e)}function nL(s,e){d("SymbolTypeAnnotation",s,e)}function aL(s,e){d("ThisTypeAnnotation",s,e)}function oL(s,e){d("TupleTypeAnnotation",s,e)}function cL(s,e){d("TypeofTypeAnnotation",s,e)}function lL(s,e){d("TypeAlias",s,e)}function uL(s,e){d("TypeAnnotation",s,e)}function pL(s,e){d("TypeCastExpression",s,e)}function hL(s,e){d("TypeParameter",s,e)}function fL(s,e){d("TypeParameterDeclaration",s,e)}function dL(s,e){d("TypeParameterInstantiation",s,e)}function mL(s,e){d("UnionTypeAnnotation",s,e)}function yL(s,e){d("Variance",s,e)}function TL(s,e){d("VoidTypeAnnotation",s,e)}function SL(s,e){d("EnumDeclaration",s,e)}function xL(s,e){d("EnumBooleanBody",s,e)}function gL(s,e){d("EnumNumberBody",s,e)}function PL(s,e){d("EnumStringBody",s,e)}function bL(s,e){d("EnumSymbolBody",s,e)}function EL(s,e){d("EnumBooleanMember",s,e)}function AL(s,e){d("EnumNumberMember",s,e)}function CL(s,e){d("EnumStringMember",s,e)}function IL(s,e){d("EnumDefaultedMember",s,e)}function wL(s,e){d("IndexedAccessType",s,e)}function NL(s,e){d("OptionalIndexedAccessType",s,e)}function vL(s,e){d("JSXAttribute",s,e)}function kL(s,e){d("JSXClosingElement",s,e)}function DL(s,e){d("JSXElement",s,e)}function LL(s,e){d("JSXEmptyExpression",s,e)}function OL(s,e){d("JSXExpressionContainer",s,e)}function ML(s,e){d("JSXSpreadChild",s,e)}function FL(s,e){d("JSXIdentifier",s,e)}function BL(s,e){d("JSXMemberExpression",s,e)}function _L(s,e){d("JSXNamespacedName",s,e)}function jL(s,e){d("JSXOpeningElement",s,e)}function RL(s,e){d("JSXSpreadAttribute",s,e)}function UL(s,e){d("JSXText",s,e)}function VL(s,e){d("JSXFragment",s,e)}function KL(s,e){d("JSXOpeningFragment",s,e)}function qL(s,e){d("JSXClosingFragment",s,e)}function $L(s,e){d("Placeholder",s,e)}function JL(s,e){d("V8IntrinsicIdentifier",s,e)}function XL(s,e){d("ArgumentPlaceholder",s,e)}function WL(s,e){d("BindExpression",s,e)}function zL(s,e){d("ClassAccessorProperty",s,e)}function HL(s,e){d("Decorator",s,e)}function YL(s,e){d("DoExpression",s,e)}function GL(s,e){d("ExportDefaultSpecifier",s,e)}function QL(s,e){d("ModuleExpression",s,e)}function ZL(s,e){d("TopicReference",s,e)}function eO(s,e){d("VoidPattern",s,e)}function tO(s,e){d("TSParameterProperty",s,e)}function sO(s,e){d("TSDeclareFunction",s,e)}function iO(s,e){d("TSDeclareMethod",s,e)}function rO(s,e){d("TSQualifiedName",s,e)}function nO(s,e){d("TSCallSignatureDeclaration",s,e)}function aO(s,e){d("TSConstructSignatureDeclaration",s,e)}function oO(s,e){d("TSPropertySignature",s,e)}function cO(s,e){d("TSMethodSignature",s,e)}function lO(s,e){d("TSIndexSignature",s,e)}function uO(s,e){d("TSAnyKeyword",s,e)}function pO(s,e){d("TSBooleanKeyword",s,e)}function hO(s,e){d("TSBigIntKeyword",s,e)}function fO(s,e){d("TSIntrinsicKeyword",s,e)}function dO(s,e){d("TSNeverKeyword",s,e)}function mO(s,e){d("TSNullKeyword",s,e)}function yO(s,e){d("TSNumberKeyword",s,e)}function TO(s,e){d("TSObjectKeyword",s,e)}function SO(s,e){d("TSStringKeyword",s,e)}function xO(s,e){d("TSSymbolKeyword",s,e)}function gO(s,e){d("TSUndefinedKeyword",s,e)}function PO(s,e){d("TSUnknownKeyword",s,e)}function bO(s,e){d("TSVoidKeyword",s,e)}function EO(s,e){d("TSThisType",s,e)}function AO(s,e){d("TSFunctionType",s,e)}function CO(s,e){d("TSConstructorType",s,e)}function IO(s,e){d("TSTypeReference",s,e)}function wO(s,e){d("TSTypePredicate",s,e)}function NO(s,e){d("TSTypeQuery",s,e)}function vO(s,e){d("TSTypeLiteral",s,e)}function kO(s,e){d("TSArrayType",s,e)}function DO(s,e){d("TSTupleType",s,e)}function LO(s,e){d("TSOptionalType",s,e)}function OO(s,e){d("TSRestType",s,e)}function MO(s,e){d("TSNamedTupleMember",s,e)}function FO(s,e){d("TSUnionType",s,e)}function BO(s,e){d("TSIntersectionType",s,e)}function _O(s,e){d("TSConditionalType",s,e)}function jO(s,e){d("TSInferType",s,e)}function RO(s,e){d("TSParenthesizedType",s,e)}function UO(s,e){d("TSTypeOperator",s,e)}function VO(s,e){d("TSIndexedAccessType",s,e)}function KO(s,e){d("TSMappedType",s,e)}function qO(s,e){d("TSTemplateLiteralType",s,e)}function $O(s,e){d("TSLiteralType",s,e)}function JO(s,e){d("TSClassImplements",s,e)}function XO(s,e){d("TSInterfaceHeritage",s,e)}function WO(s,e){d("TSInterfaceDeclaration",s,e)}function zO(s,e){d("TSInterfaceBody",s,e)}function HO(s,e){d("TSTypeAliasDeclaration",s,e)}function YO(s,e){d("TSInstantiationExpression",s,e)}function GO(s,e){d("TSAsExpression",s,e)}function QO(s,e){d("TSSatisfiesExpression",s,e)}function ZO(s,e){d("TSTypeAssertion",s,e)}function eM(s,e){d("TSEnumBody",s,e)}function tM(s,e){d("TSEnumDeclaration",s,e)}function sM(s,e){d("TSEnumMember",s,e)}function iM(s,e){d("TSModuleDeclaration",s,e)}function rM(s,e){d("TSModuleBlock",s,e)}function nM(s,e){d("TSImportType",s,e)}function aM(s,e){d("TSImportEqualsDeclaration",s,e)}function oM(s,e){d("TSExternalModuleReference",s,e)}function cM(s,e){d("TSNonNullExpression",s,e)}function lM(s,e){d("TSExportAssignment",s,e)}function uM(s,e){d("TSNamespaceExportDeclaration",s,e)}function pM(s,e){d("TSTypeAnnotation",s,e)}function hM(s,e){d("TSTypeParameterInstantiation",s,e)}function fM(s,e){d("TSTypeParameterDeclaration",s,e)}function dM(s,e){d("TSTypeParameter",s,e)}function mM(s,e){d("Standardized",s,e)}function yM(s,e){d("Expression",s,e)}function TM(s,e){d("Binary",s,e)}function SM(s,e){d("Scopable",s,e)}function xM(s,e){d("BlockParent",s,e)}function gM(s,e){d("Block",s,e)}function PM(s,e){d("Statement",s,e)}function bM(s,e){d("Terminatorless",s,e)}function EM(s,e){d("CompletionStatement",s,e)}function AM(s,e){d("Conditional",s,e)}function CM(s,e){d("Loop",s,e)}function IM(s,e){d("While",s,e)}function wM(s,e){d("ExpressionWrapper",s,e)}function NM(s,e){d("For",s,e)}function vM(s,e){d("ForXStatement",s,e)}function kM(s,e){d("Function",s,e)}function DM(s,e){d("FunctionParent",s,e)}function LM(s,e){d("Pureish",s,e)}function OM(s,e){d("Declaration",s,e)}function MM(s,e){d("FunctionParameter",s,e)}function FM(s,e){d("PatternLike",s,e)}function BM(s,e){d("LVal",s,e)}function _M(s,e){d("TSEntityName",s,e)}function jM(s,e){d("Literal",s,e)}function RM(s,e){d("Immutable",s,e)}function UM(s,e){d("UserWhitespacable",s,e)}function VM(s,e){d("Method",s,e)}function KM(s,e){d("ObjectMember",s,e)}function qM(s,e){d("Property",s,e)}function $M(s,e){d("UnaryLike",s,e)}function JM(s,e){d("Pattern",s,e)}function XM(s,e){d("Class",s,e)}function WM(s,e){d("ImportOrExportDeclaration",s,e)}function zM(s,e){d("ExportDeclaration",s,e)}function HM(s,e){d("ModuleSpecifier",s,e)}function YM(s,e){d("Private",s,e)}function GM(s,e){d("Flow",s,e)}function QM(s,e){d("FlowType",s,e)}function ZM(s,e){d("FlowBaseAnnotation",s,e)}function e2(s,e){d("FlowDeclaration",s,e)}function t2(s,e){d("FlowPredicate",s,e)}function s2(s,e){d("EnumBody",s,e)}function i2(s,e){d("EnumMember",s,e)}function r2(s,e){d("JSX",s,e)}function n2(s,e){d("Miscellaneous",s,e)}function a2(s,e){d("Accessor",s,e)}function o2(s,e){d("TypeScript",s,e)}function c2(s,e){d("TSTypeElement",s,e)}function l2(s,e){d("TSType",s,e)}function u2(s,e){d("TSBaseType",s,e)}function p2(s,e){Be("assertNumberLiteral","assertNumericLiteral"),d("NumberLiteral",s,e)}function h2(s,e){Be("assertRegexLiteral","assertRegExpLiteral"),d("RegexLiteral",s,e)}function f2(s,e){Be("assertRestProperty","assertRestElement"),d("RestProperty",s,e)}function d2(s,e){Be("assertSpreadProperty","assertSpreadElement"),d("SpreadProperty",s,e)}function m2(s,e){Be("assertModuleDeclaration","assertImportOrExportDeclaration"),d("ModuleDeclaration",s,e)}function y2(s){switch(s){case"string":return Ha();case"number":return za();case"undefined":return Ga();case"boolean":return Wa();case"function":return qs(Ot("Function"));case"object":return qs(Ot("Object"));case"symbol":return qs(Ot("Symbol"));case"bigint":return Xa()}throw new Error("Invalid typeof value: "+s)}function km(s){return tt(s)?s.name:`${s.id.name}.${km(s.qualification)}`}function Za(s){let e=Array.from(s),t=new Map,i=new Map,r=new Set,n=[];for(let a=0;a<e.length;a++){let o=e[a];if(o&&!n.includes(o)){if(Ou(o))return[o];if(Wu(o)){i.set(o.type,o);continue}if(Fu(o)){r.has(o.types)||(e.push(...o.types),r.add(o.types));continue}if(Mu(o)){let c=km(o.id);if(t.has(c)){let l=t.get(c).typeParameters;l&&o.typeParameters&&(l.params.push(...o.typeParameters.params),l.params=Za(l.params))}else t.set(c,o);continue}n.push(o)}}for(let[,a]of i)n.push(a);for(let[,a]of t)n.push(a);return n}function T2(s){let e=Za(s);return e.length===1?e[0]:Ya(e)}function Dm(s){return tt(s)?s.name:ha(s)?"this":`${s.right.name}.${Dm(s.left)}`}function Lm(s){let e=Array.from(s),t=new Map,i=new Map,r=new Set,n=[];for(let a=0;a<e.length;a++){let o=e[a];if(!o||n.includes(o))continue;if(Ru(o))return[o];if(zu(o)){i.set(o.type,o);continue}if(Vu(o)){r.has(o.types)||(e.push(...o.types),r.add(o.types));continue}let c="typeArguments";if(Uu(o)&&o[c]){let l=o[c],u=Dm(o.typeName);if(t.has(u)){let f=t.get(u)[c];f&&(f.params.push(...l.params),f.params=Lm(f.params))}else t.set(u,o);continue}n.push(o)}for(let[,a]of i)n.push(a);for(let[,a]of t)n.push(a);return n}function S2(s){let e=s.map(i=>Ku(i)?i.typeAnnotation:i),t=Lm(e);return t.length===1?t[0]:Qa(t)}function x2(){return Js("void",St(0),!0)}var{hasOwn:ct}=Object;function fu(s,e,t,i){return s&&typeof s.type=="string"?Om(s,e,t,i):s}function Zn(s,e,t,i){return Array.isArray(s)?s.map(r=>fu(r,e,t,i)):fu(s,e,t,i)}function us(s,e=!0,t=!1){return s&&Om(s,e,t,new Map)}function Om(s,e=!0,t=!1,i){if(!s)return s;let{type:r}=s,n={type:s.type};if(tt(s))n.name=s.name,ct(s,"optional")&&typeof s.optional=="boolean"&&(n.optional=s.optional),ct(s,"typeAnnotation")&&(n.typeAnnotation=e?Zn(s.typeAnnotation,!0,t,i):s.typeAnnotation),ct(s,"decorators")&&(n.decorators=e?Zn(s.decorators,!0,t,i):s.decorators);else if(ct(Ft,r))for(let a of Object.keys(Ft[r]))ct(s,a)&&(e?n[a]=Tu(s)&&a==="comments"?zi(s.comments,e,t,i):Zn(s[a],!0,t,i):n[a]=s[a]);else throw new Error(`Unknown node type: "${r}"`);return ct(s,"loc")&&(t?n.loc=null:n.loc=s.loc),ct(s,"leadingComments")&&(n.leadingComments=zi(s.leadingComments,e,t,i)),ct(s,"innerComments")&&(n.innerComments=zi(s.innerComments,e,t,i)),ct(s,"trailingComments")&&(n.trailingComments=zi(s.trailingComments,e,t,i)),ct(s,"extra")&&(n.extra={...s.extra}),n}function zi(s,e,t,i){return!s||!e?s:s.map(r=>{let n=i.get(r);if(n)return n;let{type:a,value:o,loc:c}=r,l={type:a,value:o,loc:c};return t&&(l.loc=void 0),i.set(r,l),l})}function g2(s){return us(s,!1)}function P2(s){return us(s)}function b2(s){return us(s,!0,!0)}function E2(s){return us(s,!1,!0)}function Mm(s,e,t){if(!t||!s)return s;let i=`${e}Comments`;return s[i]?e==="leading"?s[i]=t.concat(s[i]):s[i].push(...t):s[i]=t,s}function A2(s,e,t,i){return Mm(s,e,[{type:i?"CommentLine":"CommentBlock",value:t}])}function eo(s,e,t){if(e&&t){let i=t[s];if(!i)return;let r=e[s];e[s]=Array.from(r?new Set([...r,...i].filter(Boolean)):i)}}function Fm(s,e){eo("innerComments",s,e)}function Bm(s,e){eo("leadingComments",s,e)}function _m(s,e){eo("trailingComments",s,e)}function jm(s,e){return _m(s,e),Bm(s,e),Fm(s,e),s}function C2(s){return Ea.forEach(e=>{s[e]=null}),s}var I2=$.Standardized,w2=$.Expression,N2=$.Binary,v2=$.Scopable,k2=$.BlockParent,D2=$.Block,L2=$.Statement,O2=$.Terminatorless,M2=$.CompletionStatement,F2=$.Conditional,B2=$.Loop,_2=$.While,j2=$.ExpressionWrapper,R2=$.For,U2=$.ForXStatement,V2=$.Function,K2=$.FunctionParent,q2=$.Pureish,$2=$.Declaration,J2=$.FunctionParameter,X2=$.PatternLike,W2=$.LVal,z2=$.TSEntityName,H2=$.Literal,Y2=$.Immutable,G2=$.UserWhitespacable,Q2=$.Method,Z2=$.ObjectMember,eF=$.Property,tF=$.UnaryLike,sF=$.Pattern,iF=$.Class,Rm=$.ImportOrExportDeclaration,rF=$.ExportDeclaration,nF=$.ModuleSpecifier,aF=$.Private,oF=$.Flow,cF=$.FlowType,lF=$.FlowBaseAnnotation,uF=$.FlowDeclaration,pF=$.FlowPredicate,hF=$.EnumBody,fF=$.EnumMember,dF=$.JSX,mF=$.Miscellaneous,yF=$.Accessor,TF=$.TypeScript,SF=$.TSTypeElement,xF=$.TSType,gF=$.TSBaseType,PF=Rm;function Um(s,e){if(ua(s))return s;let t;return mu(s)?t=[]:(Ta(s)||(is(e)?s=$a(s):s=nr(s)),t=[s]),ja(t)}function bF(s,e="body"){let t=Um(s[e],s);return s[e]=t,t}function Vm(s){s=s+"";let e="";for(let t of s)e+=Us(t.codePointAt(0))?t:"-";return e=e.replace(/^[-0-9]+/,""),e=e.replace(/[-\s]+(.)?/g,function(t,i){return i?i.toUpperCase():""}),Ws(e)||(e=`_${e}`),e||"_"}function EF(s){return s=Vm(s),(s==="eval"||s==="arguments")&&(s="_"+s),s}function AF(s,e=s.key||s.property){return!s.computed&&tt(e)&&(e=Mt(e.name)),e}function CF(s){if(yu(s)&&(s=s.expression),ta(s))return s;if(ga(s)?(s.type="ClassExpression",s.abstract=!1):is(s)&&(s.type="FunctionExpression"),!ta(s))throw new Error(`cannot turn ${s.type} to an expression`);return s}var Km=Symbol(),qm=Symbol();function ns(s,e,t){if(!s)return!1;let i=xt[s.type];if(!i)return!1;t=t||{};let r=e(s,t);if(r!==void 0)switch(r){case Km:return!1;case qm:return!0}for(let n of i){let a=s[n];if(a){if(Array.isArray(a)){for(let o of a)if(ns(o,e,t))return!0}else if(ns(a,e,t))return!0}}return!1}ns.skip=Km;ns.stop=qm;var $m=["tokens","start","end","loc","raw","rawValue"],IF=[...Ea,"comments",...$m];function Jm(s,e={}){let t=e.preserveComments?$m:IF;for(let r of t)s[r]!=null&&(s[r]=void 0);for(let r of Object.keys(s))r.startsWith("_")&&s[r]!=null&&(s[r]=void 0);let i=Object.getOwnPropertySymbols(s);for(let r of i)s[r]=null}function Xm(s,e){return ns(s,Jm,e),s}function Lt(s,e=s.key){let t;return s.kind==="method"?Lt.increment()+"":(tt(e)?t=e.name:Xs(e)?t=JSON.stringify(e.value):t=JSON.stringify(Xm(us(e))),s.computed&&(t=`[${t}]`),s.static&&(t=`static:${t}`),t)}Lt.uid=0;Lt.increment=function(){return Lt.uid>=Number.MAX_SAFE_INTEGER?Lt.uid=0:Lt.uid++};function wF(s,e){if(Ta(s))return s;let t=!1,i;if(ga(s))t=!0,i="ClassDeclaration";else if(is(s))t=!0,i="FunctionDeclaration";else if(Qi(s))return nr(s);if(t&&!s.id&&(i=!1),!i){if(e)return!1;throw new Error(`cannot turn ${s.type} to a statement`)}return s.type=i,s}var NF=Function.call.bind(Object.prototype.toString);function vF(s){return NF(s)==="[object RegExp]"}function kF(s){if(typeof s!="object"||s===null||Object.prototype.toString.call(s)!=="[object Object]")return!1;let e=Object.getPrototypeOf(s);return e===null||Object.getPrototypeOf(e)===null}function oa(s){if(s===void 0)return Ot("undefined");if(s===!0||s===!1)return Ua(s);if(s===null)return Ra();if(typeof s=="string")return Mt(s);if(typeof s=="number"){let e;if(Number.isFinite(s))e=St(Math.abs(s));else{let t;Number.isNaN(s)?t=St(0):t=St(1),e=_a("/",t,St(0))}return(s<0||Object.is(s,-0))&&(e=Js("-",e)),e}if(typeof s=="bigint")return s<0?Js("-",Gi(-s)):Gi(s);if(vF(s)){let e=s.source,t=/\/([a-z]*)$/.exec(s.toString())[1];return ar(e,t)}if(Array.isArray(s))return Ba(s.map(oa));if(kF(s)){let e=[];for(let t of Object.keys(s)){let i,r=!1;Ws(t)?t==="__proto__"?(r=!0,i=Mt(t)):i=Ot(t):i=Mt(t),e.push(Ka(i,oa(s[t]),r))}return Va(e)}throw new Error("don't know how to turn this value into a node")}function DF(s,e,t=!1){return s.object=or(s.object,s.property,s.computed),s.property=e,s.computed=!!t,s}function Wm(s,e){if(!s||!e)return s;for(let t of ra.optional)s[t]==null&&(s[t]=e[t]);for(let t of Object.keys(e))t.startsWith("_")&&t!=="__clone"&&(s[t]=e[t]);for(let t of ra.force)s[t]=e[t];return jm(s,e),s}function LF(s,e){if(da(s.object))throw new Error("Cannot prepend node to super property access (`super.foo`).");return s.object=or(e,s.object),s}function OF(s){let e=[].concat(s),t=Object.create(null);for(;e.length;){let i=e.pop();if(i)switch(i.type){case"ArrayPattern":e.push(...i.elements);break;case"AssignmentExpression":case"AssignmentPattern":case"ForInStatement":case"ForOfStatement":e.push(i.left);break;case"ObjectPattern":e.push(...i.properties);break;case"ObjectProperty":e.push(i.value);break;case"RestElement":case"UpdateExpression":e.push(i.argument);break;case"UnaryExpression":i.operator==="delete"&&e.push(i.argument);break;case"Identifier":t[i.name]=i;break}}return t}function _t(s,e,t,i){let r=[].concat(s),n=Object.create(null);for(;r.length;){let a=r.shift();if(!a||i&&(Qi(a)||Eu(a)||Au(a)))continue;if(tt(a)){e?(n[a.name]=n[a.name]||[]).push(a):n[a.name]=a;continue}if(Xu(a)&&!Nu(a)){er(a.declaration)&&r.push(a.declaration);continue}if(t){if(pa(a)){r.push(a.id);continue}if(Su(a)||Iu(a))continue}let o=_t.keys[a.type];if(o)for(let c=0;c<o.length;c++){let l=o[c],u=a[l];u&&(Array.isArray(u)?r.push(...u):r.push(u))}}return n}var MF={DeclareClass:["id"],DeclareFunction:["id"],DeclareModule:["id"],DeclareVariable:["id"],DeclareInterface:["id"],DeclareTypeAlias:["id"],DeclareOpaqueType:["id"],InterfaceDeclaration:["id"],TypeAlias:["id"],OpaqueType:["id"],CatchClause:["param"],LabeledStatement:["label"],UnaryExpression:["argument"],AssignmentExpression:["left"],ImportSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportDefaultSpecifier:["local"],ImportDeclaration:["specifiers"],TSImportEqualsDeclaration:["id"],ExportSpecifier:["exported"],ExportNamespaceSpecifier:["exported"],ExportDefaultSpecifier:["exported"],FunctionDeclaration:["id","params"],FunctionExpression:["id","params"],ArrowFunctionExpression:["params"],ObjectMethod:["params"],ClassMethod:["params"],ClassPrivateMethod:["params"],ForInStatement:["left"],ForOfStatement:["left"],ClassDeclaration:["id"],ClassExpression:["id"],RestElement:["argument"],UpdateExpression:["argument"],ObjectProperty:["value"],AssignmentPattern:["left"],ArrayPattern:["elements"],ObjectPattern:["properties"],VariableDeclaration:["declarations"],VariableDeclarator:["id"]};_t.keys=MF;function FF(s,e){return _t(s,e,!0)}function BF(s){return xu(s)?"null":gu(s)?`/${s.pattern}/${s.flags}`:Lu(s)?s.quasis.map(e=>e.value.raw).join(""):s.value!==void 0?String(s.value):null}function du(s){return!s.computed||Sa(s.key)?s.key:null}function _F(s,e){if("id"in s&&s.id)return{name:s.id.name,originalNode:s.id};let t="",i;if(bu(e,{value:s})?i=du(e):Zi(s)||Du(s)?(i=du(s),s.kind==="get"?t="get ":s.kind==="set"&&(t="set ")):Cu(e)&&e.init===s?i=e.id:Qi(e,{operator:"=",right:s})&&(i=e.left),!i)return null;let r=Sa(i)?BF(i):tt(i)?i.name:ma(i)?i.id.name:null;return r==null?null:{name:t+r,originalNode:i}}function jF(s,e,t){typeof e=="function"&&(e={enter:e});let{enter:i,exit:r}=e;ca(s,i,r,t,[])}function ca(s,e,t,i,r){let n=xt[s.type];if(n){e&&e(s,r,i);for(let a of n){let o=s[a];if(Array.isArray(o))for(let c=0;c<o.length;c++){let l=o[c];l&&(r.push({node:s,key:a,index:c}),ca(l,e,t,i,r),r.pop())}else o&&(r.push({node:s,key:a}),ca(o,e,t,i,r),r.pop())}t&&t(s,r,i)}}function RF(s,e,t){if(t&&s.type==="Identifier"&&e.type==="ObjectProperty"&&t.type==="ObjectExpression")return!1;let i=_t.keys[e.type];if(i)for(let r=0;r<i.length;r++){let n=i[r],a=e[n];if(Array.isArray(a)){if(a.includes(s))return!0}else if(a===s)return!0}return!1}function zm(s){return fa(s)&&s.kind!=="var"}function UF(s){return pa(s)||wu(s)||zm(s)}function VF(s){return ba(s.type,"Immutable")?!0:tt(s)?s.name==="undefined":!1}function la(s,e){if(typeof s!="object"||typeof e!="object"||s==null||e==null)return s===e;if(s.type!==e.type)return!1;let t=Object.keys(Ft[s.type]||s.type),i=xt[s.type];for(let r of t){let n=s[r],a=e[r];if(typeof n!=typeof a)return!1;if(!(n==null&&a==null)){if(n==null||a==null)return!1;if(Array.isArray(n)){if(!Array.isArray(a)||n.length!==a.length)return!1;for(let o=0;o<n.length;o++)if(!la(n[o],a[o]))return!1;continue}if(typeof n=="object"&&!i?.includes(r)){for(let o of Object.keys(n))if(n[o]!==a[o])return!1;continue}if(!la(n,a))return!1}}return!0}function KF(s,e,t){switch(e.type){case"MemberExpression":case"OptionalMemberExpression":return e.property===s?!!e.computed:e.object===s;case"JSXMemberExpression":return e.object===s;case"VariableDeclarator":return e.init===s;case"ArrowFunctionExpression":return e.body===s;case"PrivateName":return!1;case"ClassMethod":case"ClassPrivateMethod":case"ObjectMethod":return e.key===s?!!e.computed:!1;case"ObjectProperty":return e.key===s?!!e.computed:t?.type!=="ObjectPattern";case"ClassProperty":case"ClassAccessorProperty":return e.key===s?!!e.computed:!0;case"ClassPrivateProperty":return e.key!==s;case"ClassDeclaration":case"ClassExpression":return e.superClass===s;case"AssignmentExpression":return e.right===s;case"AssignmentPattern":return e.right===s;case"LabeledStatement":return!1;case"CatchClause":return!1;case"RestElement":return!1;case"BreakStatement":case"ContinueStatement":return!1;case"FunctionDeclaration":case"FunctionExpression":return!1;case"ExportNamespaceSpecifier":case"ExportDefaultSpecifier":return!1;case"ExportSpecifier":return t?.source?!1:e.local===s;case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ImportSpecifier":return!1;case"ImportAttribute":return!1;case"JSXAttribute":return!1;case"ObjectPattern":case"ArrayPattern":return!1;case"MetaProperty":return!1;case"ObjectTypeProperty":return e.key!==s;case"TSEnumMember":return e.id!==s;case"TSPropertySignature":return e.key===s?!!e.computed:!0}return!0}function qF(s,e){return ua(s)&&(is(e)||ea(e))?!1:$u(s)&&(is(e)||ea(e))?!0:qu(s)}function $F(s){return vu(s)||tt(s.imported||s.exported,{name:"default"})}var JF=new Set(["abstract","boolean","byte","char","double","enum","final","float","goto","implements","int","interface","long","native","package","private","protected","public","short","static","synchronized","throws","transient","volatile"]);function XF(s){return Ws(s)&&!JF.has(s)}function WF(s){return fa(s)&&s.kind==="var"}var zF={isReactComponent:$I,isCompatTag:JI,buildChildren:F0};var Hm=["decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","globalThis","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];var Ym=["AggregateError","Array","ArrayBuffer","Atomics","BigInt","BigInt64Array","BigUint64Array","Boolean","DataView","Date","Error","EvalError","FinalizationRegistry","Float16Array","Float32Array","Float64Array","Function","Infinity","Int16Array","Int32Array","Int8Array","Intl","Iterator","JSON","Map","Math","NaN","Number","Object","Promise","Proxy","RangeError","ReferenceError","Reflect","RegExp","Set","SharedArrayBuffer","String","Symbol","SyntaxError","TypeError","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray","URIError","WeakMap","WeakRef","WeakSet"];var ty=44,sy=59,Gm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",iy=new Uint8Array(64),ry=new Uint8Array(128);for(let s=0;s<Gm.length;s++){let e=Gm.charCodeAt(s);iy[s]=e,ry[e]=s}function Zs(s){let e=0,t=0,i=0;do{let r=s.next();i=ry[r],e|=(i&31)<<t,t+=5}while(i&32);return e}function ei(s){return s&1?-2147483648|-(s>>>1):s>>>1}function ps(s,e){do{let t=e&31;e>>>=5,e>0&&(t|=32),s.write(iy[t])}while(e>0)}function ti(s){return s<0?-s<<1|1:s<<1}function Qm(s,e){return s.pos>=e?!1:s.peek()!==ty}var Zm=1024*16,ey=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(s){return Buffer.from(s.buffer,s.byteOffset,s.byteLength).toString()}}:{decode(s){let e="";for(let t=0;t<s.length;t++)e+=String.fromCharCode(s[t]);return e}},ny=class{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(Zm)}write(s){let{buffer:e}=this;e[this.pos++]=s,this.pos===Zm&&(this.out+=ey.decode(e),this.pos=0)}flush(){let{buffer:s,out:e,pos:t}=this;return t>0?e+ey.decode(s.subarray(0,t)):e}},GF=class{constructor(s){this.pos=0,this.buffer=s}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(s){let{buffer:e,pos:t}=this,i=e.indexOf(s,t);return i===-1?e.length:i}};function ay(s){if(s.length===0)return"";let e=new ny;for(let t=0;t<s.length;t++){let i=s[t];t>0&&e.write(sy);let r=0;for(let n=0;n<i.length;n++){let a=i[n];ps(e,a-r),r=a}}return e.flush()}function oy(s){let{length:e}=s,t=new GF(s),i=[],r=0,n=0,a=0,o=0,c=0;do{let l=t.indexOf(";"),u=[],f=!0,m=0;for(r=0;t.pos<l;){let x;r+=ei(Zs(t)),r<m&&(f=!1),m=r,Qm(t,l)?(n+=ei(Zs(t)),a+=ei(Zs(t)),o+=ei(Zs(t)),Qm(t,l)?(c+=ei(Zs(t)),x=[r,n,a,o,c]):x=[r,n,a,o]):x=[r],u.push(x),t.pos++}f||QF(u),i.push(u),t.pos=l+1}while(t.pos<=e);return i}function QF(s){s.sort(ZF)}function ZF(s,e){return s[0]-e[0]}function to(s){let e=new ny,t=0,i=0,r=0,n=0;for(let a=0;a<s.length;a++){let o=s[a];if(a>0&&e.write(sy),o.length===0)continue;let c=0;for(let l=0;l<o.length;l++){let u=o[l];l>0&&e.write(ty),ps(e,ti(u[0]-c)),c=u[0],u.length!==1&&(ps(e,ti(u[1]-t)),ps(e,ti(u[2]-i)),ps(e,ti(u[3]-r)),t=u[1],i=u[2],r=u[3],u.length!==4&&(ps(e,ti(u[4]-n)),n=u[4]))}}return e.flush()}var py=Pl(cy(),1);function eB(s){if(!s)return"";let e=s.lastIndexOf("/");return s.slice(0,e+1)}function tB(s,e){let t=eB(s),i=e?e+"/":"";return r=>(0,py.default)(i+(r||""),t)}var gt=0,sB=1,iB=2,rB=3,nB=4;function aB(s,e){let t=ly(s,0);if(t===s.length)return s;e||(s=s.slice());for(let i=t;i<s.length;i=ly(s,i+1))s[i]=cB(s[i],e);return s}function ly(s,e){for(let t=e;t<s.length;t++)if(!oB(s[t]))return t;return s.length}function oB(s){for(let e=1;e<s.length;e++)if(s[e][gt]<s[e-1][gt])return!1;return!0}function cB(s,e){return e||(s=s.slice()),s.sort(lB)}function lB(s,e){return s[gt]-e[gt]}var lr=!1;function uB(s,e,t,i){for(;t<=i;){let r=t+(i-t>>1),n=s[r][gt]-e;if(n===0)return lr=!0,r;n<0?t=r+1:i=r-1}return lr=!1,t-1}function pB(s,e,t){for(let i=t+1;i<s.length&&s[i][gt]===e;t=i++);return t}function hB(s,e,t){for(let i=t-1;i>=0&&s[i][gt]===e;t=i--);return t}function fB(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}function dB(s,e,t,i){let{lastKey:r,lastNeedle:n,lastIndex:a}=t,o=0,c=s.length-1;if(i===r){if(e===n)return lr=a!==-1&&s[a][gt]===e,a;e>=n?o=a===-1?0:a:c=a}return t.lastKey=i,t.lastNeedle=e,t.lastIndex=uB(s,e,o,c)}function mB(s){return typeof s=="string"?JSON.parse(s):s}var yB="`line` must be greater than 0 (lines start at line 1)",TB="`column` must be greater than or equal to 0 (columns start at column 0)",uy=-1,SB=1,ro=class{constructor(s,e){let t=typeof s=="string";if(!t&&s._decodedMemo)return s;let i=mB(s),{version:r,file:n,names:a,sourceRoot:o,sources:c,sourcesContent:l}=i;this.version=r,this.file=n,this.names=a||[],this.sourceRoot=o,this.sources=c,this.sourcesContent=l,this.ignoreList=i.ignoreList||i.x_google_ignoreList||void 0;let u=tB(e,o);this.resolvedSources=c.map(u);let{mappings:f}=i;if(typeof f=="string")this._encoded=f,this._decoded=void 0;else if(Array.isArray(f))this._encoded=void 0,this._decoded=aB(f,t);else throw i.sections?new Error("TraceMap passed sectioned source map, please use FlattenMap export instead"):new Error(`invalid source map: ${JSON.stringify(i)}`);this._decodedMemo=fB(),this._bySources=void 0,this._bySourceMemos=void 0}};function hy(s){var e;return(e=s)._decoded||(e._decoded=oy(s._encoded))}function no(s,e){let{line:t,column:i,bias:r}=e;if(t--,t<0)throw new Error(yB);if(i<0)throw new Error(TB);let n=hy(s);if(t>=n.length)return cr(null,null,null,null);let a=n[t],o=xB(a,s._decodedMemo,t,i,r||SB);if(o===-1)return cr(null,null,null,null);let c=a[o];if(c.length===1)return cr(null,null,null,null);let{names:l,resolvedSources:u}=s;return cr(u[c[sB]],c[iB]+1,c[rB],c.length===5?l[c[nB]]:null)}function cr(s,e,t,i){return{source:s,line:e,column:t,name:i}}function xB(s,e,t,i,r){let n=dB(s,i,e,t);return lr?n=(r===uy?pB:hB)(s,i,n):r===uy&&n++,n===-1||n===s.length?-1:n}var ao=class{constructor(){this._indexes={__proto__:null},this.array=[]}};function gB(s,e){return s._indexes[e]}function oo(s,e){let t=gB(s,e);if(t!==void 0)return t;let{array:i,_indexes:r}=s,n=i.push(e);return r[e]=n-1}var Ty=0,Sy=1,xy=2,gy=3,Py=4,by=-1,Ey=class{constructor({file:s,sourceRoot:e}={}){this._names=new ao,this._sources=new ao,this._sourcesContent=[],this._mappings=[],this.file=s,this.sourceRoot=e,this._ignoreList=new ao,this._rangeMappings=[]}};var Ay=(s,e)=>AB(!0,s,e);function ur(s,e,t){let{_sources:i,_sourcesContent:r}=s,n=oo(i,e);r[n]=t}function PB(s,e,t,i=!0){let{_mappings:r,_rangeMappings:n}=s,a=co(r,e),o=wy(a,t)-1,c=co(n,e),l=Ny(c,o);if(i){if(l>=0)return;lo(c,~l,o)}else{if(l<0)return;c.splice(l,1)}}function uo(s){let{_mappings:e,_sources:t,_sourcesContent:i,_names:r,_ignoreList:{array:n},_rangeMappings:a}=s;return my(e),my(a),{version:3,file:s.file||void 0,names:r.array,sourceRoot:s.sourceRoot||void 0,sources:t.array,sourcesContent:i,mappings:e,ignoreList:n.length>0?n:void 0,rangeMappings:a.length>0?a:void 0}}function Cy(s){let e=uo(s),t=e;return t.mappings=to(e.mappings),e.rangeMappings&&(t.rangeMappings=ay(e.rangeMappings)),t}function Iy(s){let e=[],{_mappings:t,_sources:{array:i},_names:{array:r}}=s;for(let n=0;n<t.length;n++){let a=t[n];for(let o=0;o<a.length;o++){let c=a[o],l={line:n+1,column:c[Ty]},u,f,m;c.length!==1&&(u=i[c[Sy]],f={line:c[xy]+1,column:c[gy]},c.length===5&&(m=r[c[Py]])),e.push({generated:l,source:u,original:f,name:m})}}return e}function fy(s,e,t,i,r,n,a,o,c){let{_mappings:l,_sources:u,_sourcesContent:f,_names:m,_rangeMappings:x}=e,I=co(l,t),L=wy(I,i);if(!r){if(s&&bB(I,L)&&!dy(l,x,t,L-1))return;L<I.length&&yy(x,t,L),lo(I,L,[i]);return}let N=oo(u,r),w=o?oo(m,o):by;N===f.length&&(f[N]=c??null),!(s&&EB(I,L,N,n,a,w)&&!dy(l,x,t,L-1))&&(L<I.length&&yy(x,t,L),lo(I,L,o?[i,N,n,a,w]:[i,N,n,a]))}function co(s,e){for(let t=s.length;t<=e;t++)s[t]=[];return s[e]}function wy(s,e){for(let t=s.length;t>0;t--){let i=s[t-1];if(e>=i[Ty])return t}return 0}function dy(s,e,t,i){if(e.length===0)return!1;if(i<0)for(;--t>=0;){let n=s[t];if(n.length>0){i=n.length-1;break}}if(t<0||t>=e.length)return!1;let r=e[t];return Ny(r,i)>=0}function lo(s,e,t){for(let i=s.length;i>e;i--)s[i]=s[i-1];s[e]=t}function my(s){for(let e=s.length-1;e>=0&&!(s[e].length>0);e--)s.pop()}function Ny(s,e){for(let t=s.length;t>0;t--){let i=s[t-1];if(i===e)return t-1;if(i<e)return~t}return-1}function yy(s,e,t){if(e>=s.length)return;let i=s[e];for(let r=i.length-1;r>=0&&!(i[r]<t);r--)i[r]++}function bB(s,e){return e===0?!0:s[e-1].length===1}function EB(s,e,t,i,r,n){if(e===0)return!1;let a=s[e-1];return a.length===1?!1:t===a[Sy]&&i===a[xy]&&r===a[gy]&&n===(a.length===5?a[Py]:by)}function AB(s,e,t){let{generated:i,source:r,original:n,name:a,content:o,isRange:c}=t;r?fy(s,e,i.line-1,i.column,r,n.line-1,n.column,a,o):fy(s,e,i.line-1,i.column,null,null,null,null,null),c&&PB(e,i.line-1,i.column)}var Po=Pl(Ly(),1),mo=class{_map;_rawMappings;_sourceFileName;_lastGenLine=0;_lastSourceLine=0;_lastSourceColumn=0;_inputMap=null;constructor(e,t){let i=this._map=new Ey({sourceRoot:e.sourceRoot});if(this._sourceFileName=e.sourceFileName?.replace(/\\/g,"/"),this._rawMappings=void 0,e.inputSourceMap){this._inputMap=new ro(e.inputSourceMap);let r=this._inputMap.resolvedSources;if(r.length)for(let n=0;n<r.length;n++)ur(i,r[n],this._inputMap.sourcesContent?.[n])}if(typeof t=="string"&&!e.inputSourceMap)ur(i,this._sourceFileName,t);else if(typeof t=="object")for(let r of Object.keys(t))ur(i,r.replace(/\\/g,"/"),t[r])}get(){let e=Cy(this._map);return e.ignoreList??=[],e}getDecoded(){let e=uo(this._map);return e.ignoreList??=[],e}getRawMappings(){return this._rawMappings||=Iy(this._map)}mark(e,t,i,r,n,a,o){this._rawMappings=void 0;let c;if(i!=null)if(this._inputMap){if(c=no(this._inputMap,{line:i,column:r}),c.name&&(a||n!=null&&c.column===r))n=c.name;else if(a){let l=no(this._inputMap,a);l.name&&(n=l.name)}}else c={name:null,source:o?.replace(/\\/g,"/")||this._sourceFileName,line:i,column:r};n!=null&&n===t&&(n=null),Ay(this._map,{name:n,generated:e,source:c?.source,original:c})}},rT=[];for(let s=0;s<32;s++)rT.push(" ".repeat(s*2));var yo=class{constructor(e,t){this._map=e,this._indentChar=t}_map=null;_buf="";_str="";_appendCount=0;_last=0;_canMarkIdName=!0;_indentChar="";_queuedChar=0;_position={line:1,column:0};_sourcePosition={identifierName:void 0,identifierNamePos:void 0,line:void 0,column:void 0,filename:void 0};get(){let{_map:e,_last:t}=this;this._queuedChar!==32&&this._flush();let i=t===10?(this._buf+this._str).trimRight():this._buf+this._str;if(e===null)return{code:i,decodedMap:void 0,map:null,rawMappings:void 0};let r={code:i,decodedMap:e.getDecoded(),get map(){let n=e.get();return r.map=n,n},set map(n){Object.defineProperty(r,"map",{value:n,writable:!0})},get rawMappings(){let n=e.getRawMappings();return r.rawMappings=n,n},set rawMappings(n){Object.defineProperty(r,"rawMappings",{value:n,writable:!0})}};return r}append(e,t,i=!1){this._flush(),this._append(e,t,i)}appendChar(e){this._flush(),this._appendChar(e,1,!0)}queue(e){this._flush(),this._queuedChar=e}_flush(){let e=this._queuedChar;e!==0&&(this._appendChar(e,1,!0),this._queuedChar=0)}_appendChar(e,t,i){if(this._last=e,e===-1){let a=t>=64?this._indentChar.repeat(t):rT[t/2];this._str+=a}else this._str+=t>1?String.fromCharCode(e).repeat(t):String.fromCharCode(e);let r=e===32,n=this._position;if(e!==10){if(this._map){let a=this._sourcePosition;i&&a?(this._map.mark(n,null,a.line,a.column,r?void 0:a.identifierName,r?void 0:a.identifierNamePos,a.filename),!r&&this._canMarkIdName&&(a.identifierName=void 0,a.identifierNamePos=void 0)):this._map.mark(n,null)}n.column+=t}else n.line++,n.column=0}_append(e,t,i){let r=e.length,n=this._position,a=this._sourcePosition;this._last=-1,++this._appendCount>4096?(+this._str,this._buf+=this._str,this._str=e,this._appendCount=0):this._str+=e;let o=!i&&this._map!==null;if(!t&&!o){n.column+=r;return}let{column:c,identifierName:l,identifierNamePos:u,filename:f}=a,m=a.line;(l!=null||u!=null)&&this._canMarkIdName&&(a.identifierName=void 0,a.identifierNamePos=void 0);let x=e.indexOf(`
18
+ `),I=0;for(o&&x!==0&&this._map.mark(n,e,m,c,l,u,f);x!==-1;)n.line++,n.column=0,I=x+1,I<r&&m!==void 0&&(m++,o&&this._map.mark(n,e,m,0,void 0,void 0,f)),x=e.indexOf(`
19
+ `,I);n.column+=r-I}removeLastSemicolon(){this._queuedChar===59&&(this._queuedChar=0)}getLastChar(e){if(!e)return this._last;let t=this._queuedChar;return t!==0?t:this._last}getNewlineCount(){return this._queuedChar===0&&this._last===10?1:0}hasContent(){return this._last!==0}exactSource(e,t){if(!this._map){t();return}this.source("start",e);let i=e.identifierName,r=this._sourcePosition;i!=null&&(this._canMarkIdName=!1,r.identifierName=i),t(),i!=null&&(this._canMarkIdName=!0,r.identifierName=void 0,r.identifierNamePos=void 0),this.source("end",e)}source(e,t){this._map&&this._normalizePosition(e,t,0)}sourceWithOffset(e,t,i){this._map&&this._normalizePosition(e,t,i)}_normalizePosition(e,t,i){this._flush();let r=t[e];r&&(this.setSourcePosition(r.line,Math.max(r.column+i,0)),this._sourcePosition.filename=t.filename)}setSourcePosition(e,t){let i=this._sourcePosition;i.line=e,i.column=t}getCurrentColumn(){return this._position.column+(this._queuedChar?1:0)}getCurrentLine(){return this._position.line}},{isMemberExpression:KB,isOptionalMemberExpression:qB,isYieldExpression:$B,isStatement:JB}=ne,Oy=new Map([["||",0],["??",1],["&&",2],["|",3],["^",4],["&",5],["==",6],["===",6],["!=",6],["!==",6],["<",7],[">",7],["<=",7],[">=",7],["in",7],["instanceof",7],[">>",8],["<<",8],[">>>",8],["+",9],["-",9],["*",10],["/",10],["%",10],["**",11]]);function nT(s){return s===154||s===199||s===207}var mr=(s,e,t)=>(t===22||t===23)&&e.superClass===s,yr=(s,e,t)=>{switch(t){case 109:case 133:return e.object===s;case 18:case 131:case 113:return e.callee===s;case 220:return e.tag===s;case 189:return!0}return!1};function XB(s,e,t){return t===4}function WB(s,e,t,i){return t===237||t===91||t===4||(i&8)>0}function zB(s,e,t){return yr(s,e,t)||mr(s,e,t)}function aT(s){return(s&3)>0}function HB(s,e,t,i){return aT(i)}function YB(s,e,t,i){return(i&1)>0&&!s.async}function bo(s,e,t,i){if(mr(s,e,t)||yr(s,e,t)||t===236||t===143||t===8)return!0;let r;switch(t){case 11:case 108:r=Oy.get(e.operator);break;case 154:case 199:r=7}if(r!==void 0){let n=i===2?7:Oy.get(s.operator);if(r>n||r===n&&t===11&&(n===11?e.left===s:e.right===s)||i===1&&t===108&&(n===1&&r!==1||r===1&&n!==1))return!0}return!1}function My(s,e,t){switch(t){case 4:case 116:case 91:case 237:return!0}return!1}function GB(s,e,t){return t===85&&e.objectType===s}function Fy(s,e,t){return(t===6||t===7)&&e.left===s||t===11&&(e.operator==="|"||e.operator==="&")&&s===e.left?!0:bo(s,e,t,2)}function QB(s,e,t){switch(t){case 153:case 193:case 209:case 210:case 179:case 217:return!0;case 173:return e.objectType===s;case 159:return e.checkType===s||e.extendsType===s}return!1}function oT(s,e,t){switch(t){case 179:case 209:case 153:case 193:return!0;case 173:return e.objectType===s}return!1}function ZB(s,e,t){return t===209||Eo(s,e,t)}function e3(s,e,t){return!!(Eo(s,e,t)||(t===179||t===217)&&s.typeParameter.constraint!=null)}function Eo(s,e,t){switch(t){case 153:case 193:return!0;case 173:if(e.objectType===s)return!0}return!1}function t3(s,e,t){switch(t){case 18:case 131:case 113:case 175:return e.typeArguments!=null}return!1}function By(s,e,t){return oT(s,e,t)?!0:t===217||t===159&&(e.checkType===s||e.extendsType===s)}function s3(s,e,t,i){return bo(s,e,t,0)?!0:(i&128)>0&&s.operator==="in"}function i3(s,e,t){return bo(s,e,t,1)}function r3(s,e,t){return t===142||t===134||t===109&&e.property===s||t===133&&e.property===s||t===222?!1:t===22?!0:t===69?e.right===s:t===61?!0:!JB(e)}function _y(s,e,t){return t===11||t===108||t===236||t===143||yr(s,e,t)||t===8&&$B(s)||t===29&&s===e.test||mr(s,e,t)||nT(t)}function n3(s,e,t,i){return(i&5)>0}function hr(s,e,t){return yr(s,e,t)||t===11&&e.operator==="**"&&e.left===s||mr(s,e,t)}function a3(s,e,t,i){return(i&5)>0}function To(s,e,t){switch(t){case 236:case 143:case 11:case 108:case 8:return!0;case 29:if(e.test===s)return!0}return nT(t)?!0:hr(s,e,t)}function jy(s,e,t){switch(t){case 18:return e.callee===s;case 109:return e.object===s}return!1}function o3(s,e,t,i){return aT(i)&&s.left.type==="ObjectPattern"?!0:To(s,e,t)}function c3(s,e,t,i,r){if(r&&r(s)!==s.name)return!1;if(t===6&&s.extra?.parenthesized&&e.left===s){let n=e.right.type;if((n==="FunctionExpression"||n==="ClassExpression")&&e.right.id==null)return!0}return(i&64||(t===109||t===133)&&i&49)&&s.name==="let"?(KB(e,{object:s,computed:!0})||qB(e,{object:s,computed:!0,optional:!1}))&&i&49?!0:(i&64)>0:t===69&&e.left===s&&s.name==="async"&&!e.await}var Ry=Object.defineProperty({__proto__:null,ArrowFunctionExpression:To,AssignmentExpression:o3,AwaitExpression:_y,BinaryExpression:s3,ClassExpression:n3,ConditionalExpression:To,DoExpression:YB,FunctionExpression:a3,FunctionTypeAnnotation:WB,Identifier:c3,IntersectionTypeAnnotation:My,LogicalExpression:i3,NullableTypeAnnotation:XB,ObjectExpression:HB,OptionalCallExpression:jy,OptionalIndexedAccessType:GB,OptionalMemberExpression:jy,SequenceExpression:r3,SpreadElement:hr,TSAsExpression:Fy,TSConditionalType:QB,TSConstructorType:By,TSFunctionType:By,TSInferType:e3,TSInstantiationExpression:t3,TSIntersectionType:ZB,TSSatisfiesExpression:Fy,TSTypeAssertion:hr,TSTypeOperator:Eo,TSUnionType:oT,UnaryExpression:hr,UnionTypeAnnotation:My,UpdateExpression:zB,YieldExpression:_y},Symbol.toStringTag,{value:"Module"});function l3(s){this.print(s.tag),this.print(s.typeArguments),this.print(s.quasi)}function u3(){throw new Error("TemplateElement printing is handled in TemplateLiteral")}function Ao(s,e){let t=s.quasis,i="`";for(let r=0;r<t.length-1;r++)i+=t[r].value.raw,this.token(i+"${",!0),this.print(e[r]),i="}";i+=t[t.length-1].value.raw,this.token(i+"`",!0)}function p3(s){Ao.call(this,s,s.expressions)}var{isCallExpression:h3,isLiteral:cT,isMemberExpression:Co,isNewExpression:f3,isPattern:d3}=ne;function m3(s){let{operator:e}=s,t=e.charCodeAt(0);t>=97&&t<=122?(this.word(e),this.space()):this.tokenChar(t),this.print(s.argument)}function y3(s){s.async&&(this.word("async",!0),this.space()),this.word("do"),this.space(),this.print(s.body)}function T3(s){this.tokenChar(40);let e=this.enterDelimited();this.print(s.expression,void 0,!0),this._noLineTerminatorAfterNode=e,this.rightParens(s)}function S3(s){s.prefix?(this.token(s.operator,!1,0,!0),this.print(s.argument)):(this.print(s.argument,!0),this.token(s.operator,!1,0,!0))}function x3(s){this.print(s.test),this.space(),this.tokenChar(63),this.space(),this.print(s.consequent),this.space(),this.tokenChar(58),this.space(),this.print(s.alternate)}function Io(s){this.tokenChar(40);let e=this.enterDelimited();this.printList(s.arguments,this.shouldPrintTrailingComma(")"),void 0,void 0,void 0,!0),this._noLineTerminatorAfterNode=e,this.rightParens(s)}function g3(s,e){this.word("new"),this.space(),this.print(s.callee),!(this.format.minified&&s.arguments.length===0&&!h3(e,{callee:s})&&!Co(e)&&!f3(e))&&(this.print(s.typeArguments),!(s.arguments.length===0&&this.tokenMap&&!this.tokenMap.endMatches(s,")"))&&Io.call(this,s))}function P3(s){this.printList(s.expressions)}function b3(){this.word("this")}function E3(){this.word("super")}function wo(s){return typeof s.start=="number"&&s.start===s.declaration.start}function A3(s){this.tokenChar(64);let{expression:e}=s;this.print(e),this.newline()}function C3(s){let{computed:e}=s,{optional:t,property:i}=s;if(this.print(s.object),!e&&Co(i))throw new TypeError("Got a MemberExpression for MemberExpression property");cT(i)&&typeof i.value=="number"&&(e=!0),t&&this.token("?."),e?(this.tokenChar(91),this.print(i),this.tokenChar(93)):(t||this.tokenChar(46),this.print(i))}function I3(s){this.print(s.callee),s.optional&&this.token("?."),this.print(s.typeArguments),Io.call(this,s)}function w3(s){this.print(s.callee),this.print(s.typeArguments),Io.call(this,s)}function N3(){this.word("import")}function v3(s){this.word("await"),this.space(),this.print(s.argument)}function k3(s){s.delegate?(this.word("yield",!0),this.tokenChar(42),s.argument&&(this.space(),this.print(s.argument))):s.argument?(this.word("yield",!0),this.space(),this.print(s.argument)):this.word("yield")}function D3(){this.semicolon(!0)}function L3(s){this.tokenContext|=1,this.print(s.expression),this.semicolon()}function O3(s){this.print(s.left),(s.left.type==="Identifier"||d3(s.left))&&(s.left.optional&&this.tokenChar(63),this.print(s.left.typeAnnotation)),this.space(),this.tokenChar(61),this.space(),this.print(s.right)}function Uy(s){this.print(s.left),this.space(),this.token(s.operator,!1,0,!0),this.space(),this.print(s.right)}function M3(s){this.print(s.left),this.space();let{operator:e}=s;e.charCodeAt(0)===105?this.word(e):(this.token(e,!1,0,!0),this.setLastChar(e.charCodeAt(e.length-1))),this.space(),this.print(s.right)}function F3(s){this.print(s.object),this.token("::"),this.print(s.callee)}function B3(s){if(this.print(s.object),!s.computed&&Co(s.property))throw new TypeError("Got a MemberExpression for MemberExpression property");let e=s.computed;if(cT(s.property)&&typeof s.property.value=="number"&&(e=!0),e){let t=this.enterDelimited();this.tokenChar(91),this.print(s.property,void 0,!0),this.tokenChar(93),this._noLineTerminatorAfterNode=t}else this.tokenChar(46),this.print(s.property)}function _3(s){this.print(s.meta),this.tokenChar(46),this.print(s.property)}function j3(s){this.tokenChar(35),this.print(s.id)}function R3(s){this.tokenChar(37),this.word(s.name)}function U3(s){this.word("module",!0),this.space(),this.tokenChar(123),this.indent();let{body:e}=s;(e.body.length||e.directives.length)&&this.newline(),this.print(e),this.dedent(),this.rightBrace(s)}var{isFor:V3,isIfStatement:K3,isStatement:q3,isVoidPattern:$3}=ne;function J3(s){this.word("with"),this.space(),this.tokenChar(40),this.print(s.object),this.tokenChar(41),this.printBlock(s.body)}function X3(s){this.word("if"),this.space(),this.tokenChar(40),this.print(s.test),this.tokenChar(41),this.space();let e=s.alternate&&K3(lT(s.consequent));e&&(this.tokenChar(123),this.newline(),this.indent()),this.printAndIndentOnComments(s.consequent),e&&(this.dedent(),this.newline(),this.tokenChar(125)),s.alternate&&(this.endsWith(125)&&this.space(),this.word("else"),this.space(),this.printAndIndentOnComments(s.alternate))}function lT(s){let{body:e}=s;return q3(e)===!1?s:lT(e)}function W3(s){this.word("for"),this.space(),this.tokenChar(40),this.tokenContext|=144,this.print(s.init),this.tokenContext=0,this.tokenChar(59),s.test&&(this.space(),this.print(s.test)),this.tokenChar(59,1),s.update&&(this.space(),this.print(s.update)),this.tokenChar(41),this.printBlock(s.body)}function z3(s){this.word("while"),this.space(),this.tokenChar(40),this.print(s.test),this.tokenChar(41),this.printBlock(s.body)}function H3(s){this.word("for"),this.space(),this.noIndentInnerCommentsHere(),this.tokenChar(40),this.tokenContext|=160,this.print(s.left),this.tokenContext=0,this.space(),this.word("in"),this.space(),this.print(s.right),this.tokenChar(41),this.printBlock(s.body)}function Y3(s){this.word("for"),this.space(),s.await&&(this.word("await"),this.space()),this.noIndentInnerCommentsHere(),this.tokenChar(40),this.tokenContext|=64,this.print(s.left),this.space(),this.word("of"),this.space(),this.print(s.right),this.tokenChar(41),this.printBlock(s.body)}function G3(s){this.word("do"),this.space(),this.print(s.body),this.space(),this.word("while"),this.space(),this.tokenChar(40),this.print(s.test),this.tokenChar(41),this.semicolon()}function Tr(s,e){e&&(s.space(),s.printTerminatorless(e)),s.semicolon()}function Q3(s){this.word("break"),Tr(this,s.label)}function Z3(s){this.word("continue"),Tr(this,s.label)}function e4(s){this.word("return"),Tr(this,s.argument)}function t4(s){this.word("throw"),Tr(this,s.argument)}function s4(s){this.print(s.label),this.tokenChar(58),this.space(),this.print(s.body)}function i4(s){this.word("try"),this.space(),this.print(s.block),this.space(),s.handlers?this.print(s.handlers[0]):this.print(s.handler),s.finalizer&&(this.space(),this.word("finally"),this.space(),this.print(s.finalizer))}function r4(s){this.word("catch"),this.space(),s.param&&(this.tokenChar(40),this.print(s.param),this.print(s.param.typeAnnotation),this.tokenChar(41),this.space()),this.print(s.body)}function n4(s){this.word("switch"),this.space(),this.tokenChar(40),this.print(s.discriminant),this.tokenChar(41),this.space(),this.tokenChar(123),this.printSequence(s.cases,!0),this.rightBrace(s)}function a4(s){s.test?(this.word("case"),this.space(),this.print(s.test),this.tokenChar(58)):(this.word("default"),this.tokenChar(58)),s.consequent.length&&(this.newline(),this.printSequence(s.consequent,!0))}function o4(){this.word("debugger"),this.semicolon()}function c4(s){this.tokenChar(44,s),this.newline()}function l4(s,e){s.declare&&(this.word("declare"),this.space());let{kind:t}=s;switch(t){case"await using":this.word("await"),this.space();case"using":this.word("using",!0);break;default:this.word(t)}this.space();let i=!1;if(!V3(e)){for(let r of s.declarations)if(r.init){i=!0;break}}if(this.printList(s.declarations,void 0,void 0,s.declarations.length>1,i?c4:void 0),e!=null)switch(e.type){case"ForStatement":if(e.init===s)return;break;case"ForInStatement":case"ForOfStatement":if(e.left===s)return}this.semicolon()}function u4(s){this.print(s.id),s.definite&&this.tokenChar(33),$3(s.id)||this.print(s.id.typeAnnotation),s.init&&(this.space(),this.tokenChar(61),this.space(),this.print(s.init))}var{isIdentifier:p4}=ne;function hs(s,e,t,i){if(this.print(s.typeParameters),t!==void 0||i!==void 0){let r=f4.call(this,t,i);r&&this.sourceIdentifierName(r.name,r.pos)}this.tokenChar(40),ri.call(this,s.params,41),this.print(s.returnType,e),this._noLineTerminator=e}function ri(s,e){let t=this.enterDelimited(),i=this.shouldPrintTrailingComma(e),r=s.length;for(let n=0;n<r;n++)No.call(this,s[n]),(i||n<r-1)&&(this.tokenChar(44,n),this.space());this.tokenChar(e),this._noLineTerminatorAfterNode=t}function No(s){this.printJoin(s.decorators,void 0,void 0,void 0,void 0,!0),this.print(s,void 0,!0),s.optional&&this.tokenChar(63),this.print(s.typeAnnotation,void 0,!0)}function vo(s){let e=s.kind,t=s.key;(e==="get"||e==="set")&&(this.word(e),this.space()),s.async&&(this.word("async",!0),this.space()),(e==="method"||e==="init")&&s.generator&&this.tokenChar(42),s.computed?(this.tokenChar(91),this.print(t),this.tokenChar(93)):this.print(t),s.optional&&this.tokenChar(63),this._buf._map?hs.call(this,s,!1,s.computed&&s.key.type!=="StringLiteral"?void 0:s.key):hs.call(this,s,!1)}function ko(s,e){s.predicate&&(s.returnType||this.tokenChar(58),this.space(),this.print(s.predicate,e))}function Do(s,e,t){s.async&&(this.word("async"),this.format.preserveFormat||(this._innerCommentsState=0),this.space()),this.word("function"),s.generator&&(this.format.preserveFormat||(this._innerCommentsState=0),this.tokenChar(42)),this.space(),s.id&&this.print(s.id),this._buf._map?hs.call(this,s,!1,s.id,e):hs.call(this,s,!1),t&&ko.call(this,s)}function Vy(s,e){Do.call(this,s,e,!0),this.space(),this.print(s.body)}function h4(s,e){s.async&&(this.word("async",!0),this.space()),uT.call(this,s)?hs.call(this,s,!0,void 0,this._buf._map?e:void 0):this.print(s.params[0],!0),ko.call(this,s,!0),this.space(),this.printInnerComments(),this.token("=>"),this.space(),this.tokenContext|=2,this.print(s.body)}function uT(s){if(s.params.length!==1||s.typeParameters||s.returnType||s.predicate)return!0;let e=s.params[0];if(!p4(e)||e.typeAnnotation||e.optional||e.leadingComments?.length||e.trailingComments?.length)return!0;if(this.tokenMap){if(s.loc==null||this.tokenMap.findMatching(s,"(")!==null)return!0;let t=this.tokenMap.findMatching(s,"=>");return t?.loc==null?!0:t.loc.start.line!==s.loc.start.line}return!!this.format.retainLines}function Ky(s){return!!s.loc?.identifierName&&s.loc.identifierName!==s.name}function f4(s,e){let t=s;if(!t&&e){let r=e.type;r==="VariableDeclarator"?t=e.id:r==="AssignmentExpression"||r==="AssignmentPattern"?t=e.left:r==="ObjectProperty"||r==="ClassProperty"?(!e.computed||e.key.type==="StringLiteral")&&(t=e.key):(r==="ClassPrivateProperty"||r==="ClassAccessorProperty")&&(t=e.key)}if(!t?.loc)return;let i;if(t.type==="Identifier"){if(!Ky(t))return;i={pos:t.loc.start,name:t.loc.identifierName}}else if(t.type==="PrivateName"){if(!Ky(t.id))return;i={pos:t.loc.start,name:"#"+t.id.loc.identifierName}}else t.type==="StringLiteral"&&(i={pos:t.loc.start,name:t.value});return i}function d4(s,e){this.token((e.type==="TSFunctionType"||e.type==="TSConstructorType")&&e.returnType===s?"=>":":"),this.space(),s.optional&&this.tokenChar(63),this.print(s.typeAnnotation)}function qy(s,e){this.tokenChar(60);let t=e.type==="ArrowFunctionExpression"&&s.params.length===1;this.tokenMap&&s.start!=null&&s.end!=null&&(t&&=!!this.tokenMap.find(s,i=>this.tokenMap.matchesOriginal(i,",")),t||=this.shouldPrintTrailingComma(">")),this.printList(s.params,t),this.tokenChar(62)}function m4(s){s.const&&(this.word("const"),this.space()),s.in&&(this.word("in"),this.space()),s.out&&(this.word("out"),this.space()),this.word(s.name.name),s.constraint&&(this.space(),this.word("extends"),this.space(),this.print(s.constraint)),s.default&&(this.space(),this.tokenChar(61),this.space(),this.print(s.default))}function y4(s){s.accessibility&&(this.word(s.accessibility),this.space()),s.readonly&&(this.word("readonly"),this.space()),No.call(this,s.parameter)}function T4(s,e){s.declare&&(this.word("declare"),this.space()),Do.call(this,s,e,!1),this.semicolon()}function S4(s){Er.call(this,s,!1),this.semicolon()}function x4(s){this.print(s.left),this.tokenChar(46),this.print(s.right)}function g4(s){Lo.call(this,s),ni(this,s)}function ni(s,e){if(!s.tokenMap||!e.start||!e.end){s.semicolon();return}s.tokenMap.endMatches(e,",")?s.token(","):s.tokenMap.endMatches(e,";")&&s.semicolon()}function P4(s){this.word("new"),this.space(),Lo.call(this,s),ni(this,s)}function b4(s){let{readonly:e}=s;e&&(this.word("readonly"),this.space()),pT.call(this,s),this.print(s.typeAnnotation),ni(this,s)}function pT(s){s.computed&&this.tokenChar(91),this.print(s.key),s.computed&&this.tokenChar(93),s.optional&&this.tokenChar(63)}function E4(s){let{kind:e}=s;(e==="set"||e==="get")&&(this.word(e),this.space()),pT.call(this,s),Lo.call(this,s),ni(this,s)}function A4(s){let{readonly:e,static:t}=s;t&&(this.word("static"),this.space()),e&&(this.word("readonly"),this.space()),this.tokenChar(91),ri.call(this,s.parameters,93),this.print(s.typeAnnotation),ni(this,s)}function C4(){this.word("any")}function I4(){this.word("bigint")}function w4(){this.word("unknown")}function N4(){this.word("number")}function v4(){this.word("object")}function k4(){this.word("boolean")}function D4(){this.word("string")}function L4(){this.word("symbol")}function O4(){this.word("void")}function M4(){this.word("undefined")}function F4(){this.word("null")}function B4(){this.word("never")}function _4(){this.word("intrinsic")}function j4(){this.word("this")}function R4(s){hT.call(this,s)}function U4(s){s.abstract&&(this.word("abstract"),this.space()),this.word("new"),this.space(),hT.call(this,s)}function hT(s){let{typeParameters:e}=s,t=s.params;this.print(e),this.tokenChar(40),ri.call(this,t,41),this.space();let i=s.returnType;this.print(i)}function V4(s){let e=s.typeArguments;this.print(s.typeName,!!e),this.print(e)}function K4(s){s.asserts&&(this.word("asserts"),this.space()),this.print(s.parameterName),s.typeAnnotation&&(this.space(),this.word("is"),this.space(),this.print(s.typeAnnotation.typeAnnotation))}function q4(s){this.word("typeof"),this.space(),this.print(s.exprName);let e=s.typeArguments;e&&this.print(e)}function $4(s){Sr(this,s,()=>this.printJoin(s.members,!0,!0,void 0,void 0,!0))}function J4(s){this.print(s.elementType,!0),this.tokenChar(91),this.tokenChar(93)}function X4(s){this.tokenChar(91),this.printList(s.elementTypes,this.shouldPrintTrailingComma("]")),this.tokenChar(93)}function W4(s){this.print(s.typeAnnotation),this.tokenChar(63)}function z4(s){this.token("..."),this.print(s.typeAnnotation)}function H4(s){this.print(s.label),s.optional&&this.tokenChar(63),this.tokenChar(58),this.space(),this.print(s.elementType)}function Y4(s){fT(this,s,"|")}function G4(s){fT(this,s,"&")}function fT(s,e,t){let i=0;s.tokenMap?.startMatches(e,t)&&(i=1,s.token(t)),s.printJoin(e.types,void 0,void 0,function(r){this.space(),this.token(t,void 0,r+i),this.space()})}function Q4(s){this.print(s.checkType),this.space(),this.word("extends"),this.space(),this.print(s.extendsType),this.space(),this.tokenChar(63),this.space(),this.print(s.trueType),this.space(),this.tokenChar(58),this.space(),this.print(s.falseType)}function Z4(s){this.word("infer"),this.print(s.typeParameter)}function e_(s){this.tokenChar(40),this.print(s.typeAnnotation),this.tokenChar(41)}function t_(s){this.word(s.operator),this.space(),this.print(s.typeAnnotation)}function s_(s){this.print(s.objectType,!0),this.tokenChar(91),this.print(s.indexType),this.tokenChar(93)}function i_(s){let{nameType:e,optional:t,readonly:i,typeAnnotation:r}=s;this.tokenChar(123);let n=this.enterDelimited();this.space(),i&&($y(this,i),this.word("readonly"),this.space()),this.tokenChar(91),this.word(s.key.name),this.space(),this.word("in"),this.space(),this.print(s.constraint),e&&(this.space(),this.word("as"),this.space(),this.print(e,void 0,!0)),this.tokenChar(93),t&&($y(this,t),this.tokenChar(63)),r&&(this.tokenChar(58),this.space(),this.print(r,void 0,!0)),this.space(),this._noLineTerminatorAfterNode=n,this.tokenChar(125)}function $y(s,e){e!==!0&&s.token(e)}function r_(s){Ao.call(this,s,s.types)}function n_(s){this.print(s.literal)}function Jy(s){this.print(s.expression),this.print(s.typeArguments)}function a_(s){let{declare:e,id:t,typeParameters:i,extends:r,body:n}=s;e&&(this.word("declare"),this.space()),this.word("interface"),this.space(),this.print(t),this.print(i),r?.length&&(this.space(),this.word("extends"),this.space(),this.printList(r)),this.space(),this.print(n)}function o_(s){Sr(this,s,()=>this.printJoin(s.body,!0,!0,void 0,void 0,!0))}function c_(s){let{declare:e,id:t,typeParameters:i,typeAnnotation:r}=s;e&&(this.word("declare"),this.space()),this.word("type"),this.space(),this.print(t),this.print(i),this.space(),this.tokenChar(61),this.space(),this.print(r),this.semicolon()}function l_(s){let{expression:e,typeAnnotation:t}=s;this.print(e,!0),this.space(),this.word("as"),this.space(),this.print(t)}function u_(s){let{expression:e,typeAnnotation:t}=s;this.print(e,!0),this.space(),this.word("satisfies"),this.space(),this.print(t)}function p_(s){let{typeAnnotation:e,expression:t}=s;this.tokenChar(60),this.print(e),this.tokenChar(62),this.space(),this.print(t)}function h_(s){this.print(s.expression),this.print(s.typeArguments)}function f_(s){let{declare:e,const:t,id:i}=s;e&&(this.word("declare"),this.space()),t&&(this.word("const"),this.space()),this.word("enum"),this.space(),this.print(i),this.space(),this.print(s.body)}function d_(s){Sr(this,s,()=>this.printList(s.members,this.shouldPrintTrailingComma("}")??!1,!0,!0,void 0,!0))}function m_(s){let{id:e,initializer:t}=s;this.print(e),t&&(this.space(),this.tokenChar(61),this.space(),this.print(t))}function y_(s){let{declare:e,kind:t}=s;if(e&&(this.word("declare"),this.space()),t!=="global"&&(this.word(t),this.space()),this.print(s.id),!s.body){this.semicolon();return}this.space(),this.print(s.body)}function T_(s){Sr(this,s,()=>this.printSequence(s.body,!0,!0))}function S_(s){let{qualifier:e,options:t}=s;this.word("import"),this.tokenChar(40),this.print(s.source),t&&(this.tokenChar(44),this.print(t)),this.tokenChar(41),e&&(this.tokenChar(46),this.print(e));let i=s.typeArguments;i&&this.print(i)}function x_(s){let{id:e,moduleReference:t}=s;this.word("import"),this.space(),this.print(e),this.space(),this.tokenChar(61),this.space(),this.print(t),this.semicolon()}function g_(s){this.token("require("),this.print(s.expression),this.tokenChar(41)}function P_(s){this.print(s.expression),this.tokenChar(33),this.setLastChar(33)}function b_(s){this.word("export"),this.space(),this.tokenChar(61),this.space(),this.print(s.expression),this.semicolon()}function E_(s){this.word("export"),this.space(),this.word("as"),this.space(),this.word("namespace"),this.space(),this.print(s.id),this.semicolon()}function Lo(s){let{typeParameters:e}=s,t=s.params;this.print(e),this.tokenChar(40),ri.call(this,t,41),this.print(s.returnType)}function ai(s){let e=s.type==="ClassPrivateProperty",t=s.type==="ClassAccessorProperty"||s.type==="ClassProperty";Xy(this,s,[t&&s.declare&&"declare",!e&&s.accessibility]),s.static&&(this.word("static"),this.space()),Xy(this,s,[!e&&s.abstract&&"abstract",!e&&s.override&&"override",(t||e)&&s.readonly&&"readonly"])}function Sr(s,e,t){s.token("{");let i=s.enterDelimited();t(),s._noLineTerminatorAfterNode=i,s.rightBrace(e)}function Xy(s,e,t){let i=new Set;for(let r of t)r&&i.add(r);s.tokenMap?.find(e,r=>i.has(r.value)?(s.token(r.value),s.space(),i.delete(r.value),i.size===0):!1);for(let r of i)s.word(r),s.space()}var{isClassDeclaration:A_,isExportDefaultSpecifier:C_,isExportNamespaceSpecifier:I_,isImportDefaultSpecifier:w_,isImportNamespaceSpecifier:N_,isStatement:dT}=ne;function v_(s){(s.importKind==="type"||s.importKind==="typeof")&&(this.word(s.importKind),this.space()),this.print(s.imported),s.local&&s.local.name!==s.imported.name&&(this.space(),this.word("as"),this.space(),this.print(s.local))}function k_(s){this.print(s.local)}function D_(s){this.print(s.exported)}function L_(s){s.exportKind==="type"&&(this.word("type"),this.space()),this.print(s.local),s.exported&&s.local.name!==s.exported.name&&(this.space(),this.word("as"),this.space(),this.print(s.exported))}function O_(s){this.tokenChar(42),this.space(),this.word("as"),this.space(),this.print(s.exported)}function xr(s,e){let{attributes:t}=s;this.word("with"),this.space();let i=e?1:0;this.token("{",void 0,i),this.space(),this.printList(t,this.shouldPrintTrailingComma("}")),this.space(),this.token("}",void 0,i)}function mT(s){this.word("export"),this.space(),s.exportKind==="type"&&(this.word("type"),this.space()),this.tokenChar(42),this.space(),this.word("from"),this.space(),s.attributes?.length?(this.print(s.source,!0),this.space(),xr.call(this,s,!1)):this.print(s.source),this.semicolon()}function yT(s,e){A_(e.declaration)&&wo.call(s,e)&&s.printJoin(e.declaration.decorators)}function M_(s){if(yT(this,s),this.word("export"),this.space(),s.declaration){let e=s.declaration;this.print(e),dT(e)||this.semicolon()}else{s.exportKind==="type"&&(this.word("type"),this.space());let e=s.specifiers.slice(0),t=!1;for(;;){let r=e[0];if(C_(r)||I_(r))t=!0,this.print(e.shift()),e.length&&(this.tokenChar(44),this.space());else break}let i=!1;(e.length||!e.length&&!t)&&(i=!0,this.tokenChar(123),e.length&&(this.space(),this.printList(e,this.shouldPrintTrailingComma("}")),this.space()),this.tokenChar(125)),s.source&&(this.space(),this.word("from"),this.space(),s.attributes?.length?(this.print(s.source,!0),this.space(),xr.call(this,s,i)):this.print(s.source)),this.semicolon()}}function F_(s){yT(this,s),this.word("export"),this.noIndentInnerCommentsHere(),this.space(),this.word("default"),this.space(),this.tokenContext|=4;let e=s.declaration;this.print(e),dT(e)||this.semicolon()}function B_(s){this.word("import"),this.space();let e=s.importKind==="type"||s.importKind==="typeof";e?(this.noIndentInnerCommentsHere(),this.word(s.importKind),this.space()):s.module?(this.noIndentInnerCommentsHere(),this.word("module"),this.space()):s.phase&&(this.noIndentInnerCommentsHere(),this.word(s.phase),this.space());let t=s.specifiers.slice(0),i=!!t.length;for(;i;){let n=t[0];if(w_(n)||N_(n))this.print(t.shift()),t.length&&(this.tokenChar(44),this.space());else break}let r=!1;t.length?(r=!0,this.tokenChar(123),this.space(),this.printList(t,this.shouldPrintTrailingComma("}")),this.space(),this.tokenChar(125)):e&&!i&&(r=!0,this.tokenChar(123),this.tokenChar(125)),(i||e)&&(this.space(),this.word("from"),this.space()),s.attributes?.length?(this.print(s.source,!0),this.space(),xr.call(this,s,r)):this.print(s.source),this.semicolon()}function __(s){this.print(s.key),this.tokenChar(58),this.space(),this.print(s.value)}function j_(s){this.tokenChar(42),this.space(),this.word("as"),this.space(),this.print(s.local)}function R_(s){this.word("import"),s.phase&&(this.tokenChar(46),this.word(s.phase)),this.tokenChar(40);let e=this.shouldPrintTrailingComma(")");this.print(s.source),s.options!=null&&(this.tokenChar(44),this.space(),this.print(s.options)),e&&this.tokenChar(44),this.rightParens(s)}var{isAssignmentPattern:U_,isIdentifier:ho}=ne,fr="";function TT(s){let{name:e}=s,t=this.tokenMap.find(s,i=>i.value===e);return t?(fr=this._originalCode.slice(t.start,t.end),fr):fr=s.name}function V_(s){this._buf._map&&s.loc?.identifierName&&s.loc.identifierName!==s.name&&this.sourceIdentifierName(s.loc.identifierName),this.word(this.tokenMap?fr:s.name)}function K_(){this.tokenChar(63)}function Wy(s){this.token("..."),this.print(s.argument)}function zy(s){let e=s.properties;if(this.tokenChar(123),e.length){let t=this.enterDelimited();this.space(),this.printList(e,this.shouldPrintTrailingComma("}"),!0,!0,void 0,!0),this.space(),this._noLineTerminatorAfterNode=t}this.rightBrace(s)}function q_(s){this.printJoin(s.decorators),vo.call(this,s),this.space(),this.print(s.body)}function $_(s){if(this.printJoin(s.decorators),s.computed)this.tokenChar(91),this.print(s.key),this.tokenChar(93);else{if(U_(s.value)&&ho(s.key)&&s.key.name===s.value.left.name){this.print(s.value);return}if(this.print(s.key),s.shorthand&&ho(s.key)&&ho(s.value)&&s.key.name===s.value.name)return}this.tokenChar(58),this.space(),this.print(s.value)}function Hy(s){let e=s.elements,t=e.length;this.tokenChar(91);let i=this.enterDelimited();for(let r=0;r<e.length;r++){let n=e[r];n?(r>0&&this.space(),this.print(n,void 0,!0),(r<t-1||this.shouldPrintTrailingComma("]"))&&this.tokenChar(44,r)):this.tokenChar(44,r)}this._noLineTerminatorAfterNode=i,this.tokenChar(93)}function J_(s){this.word(`/${s.pattern}/${s.flags}`,!1)}function X_(s){this.word(s.value?"true":"false")}function W_(){this.word("null")}function Yy(s){let e=this.getPossibleRaw(s),t=this.format.jsescOption,i=s.value,r=i+"";t.numbers?this.number((0,Po.default)(i,t),i):e==null?this.number(r,i):this.format.minified?this.number(e.length<r.length?e:r,i):this.number(e,i)}function Gy(s){let e=this.getPossibleRaw(s);if(!this.format.minified&&e!==void 0){this.token(e);return}let t=(0,Po.default)(s.value,this.format.jsescOption);this.token(t)}function Qy(s){let e=this.getPossibleRaw(s);if(!this.format.minified&&e!==void 0){this.word(e);return}this.word(s.value+"n")}var Zy=new Set(["^^","@@","^","%","#"]);function z_(){let{topicToken:s}=this.format;if(Zy.has(s))this.token(s);else{let e=JSON.stringify(s),t=Array.from(Zy,i=>JSON.stringify(i));throw new Error(`The "topicToken" generator option must be one of ${t.join(", ")} (${e} received instead).`)}}function H_(){this.word("void")}var{isDeclareExportDeclaration:gr,isStatement:Y_}=ne;function G_(){this.word("any")}function Q_(s){this.print(s.elementType,!0),this.tokenChar(91),this.tokenChar(93)}function Z_(){this.word("boolean")}function ej(s){this.word(s.value?"true":"false")}function tj(){this.word("null")}function sj(s,e){gr(e)||(this.word("declare"),this.space()),this.word("class"),this.space(),Mo.call(this,s)}function ij(s,e){gr(e)||(this.word("declare"),this.space()),this.word("function"),this.space(),this.print(s.id),this.print(s.id.typeAnnotation?.typeAnnotation),s.predicate&&(this.space(),this.print(s.predicate)),this.semicolon()}function rj(){this.tokenChar(37),this.word("checks")}function nj(s){this.tokenChar(37),this.word("checks"),this.tokenChar(40),this.print(s.value),this.tokenChar(41)}function aj(s){this.word("declare"),this.space(),ST.call(this,s)}function oj(s){this.word("declare"),this.space(),this.word("module"),this.space(),this.print(s.id),this.space(),this.print(s.body)}function cj(s){this.word("declare"),this.space(),this.word("module"),this.tokenChar(46),this.word("exports"),this.print(s.typeAnnotation)}function lj(s){this.word("declare"),this.space(),xT.call(this,s)}function uj(s,e){gr(e)||(this.word("declare"),this.space()),gT.call(this,s)}function pj(s,e){gr(e)||(this.word("declare"),this.space()),this.word("var"),this.space(),this.print(s.id),this.print(s.id.typeAnnotation),this.semicolon()}function hj(s){this.word("declare"),this.space(),this.word("export"),this.space(),s.default&&(this.word("default"),this.space()),Ej.call(this,s)}function fj(s){this.word("declare"),this.space(),mT.call(this,s)}function dj(s){let{id:e,body:t}=s;this.word("enum"),this.space(),this.print(e),this.print(t)}function Pr(s,e,t){t&&(s.space(),s.word("of"),s.space(),s.word(e)),s.space()}function br(s,e){let{members:t}=e;s.token("{"),s.indent(),s.newline();for(let i of t)s.print(i),s.newline();e.hasUnknownMembers&&(s.token("..."),s.newline()),s.dedent(),s.token("}")}function mj(s){let{explicitType:e}=s;Pr(this,"boolean",e),br(this,s)}function yj(s){let{explicitType:e}=s;Pr(this,"number",e),br(this,s)}function Tj(s){let{explicitType:e}=s;Pr(this,"string",e),br(this,s)}function Sj(s){Pr(this,"symbol",!0),br(this,s)}function xj(s){let{id:e}=s;this.print(e),this.tokenChar(44)}function Oo(s,e){s.print(e.id),s.space(),s.token("="),s.space(),s.print(e.init),s.token(",")}function gj(s){Oo(this,s)}function Pj(s){Oo(this,s)}function bj(s){Oo(this,s)}function Ej(s){if(s.declaration){let e=s.declaration;this.print(e),Y_(e)||this.semicolon()}else this.tokenChar(123),s.specifiers.length&&(this.space(),this.printList(s.specifiers),this.space()),this.tokenChar(125),s.source&&(this.space(),this.word("from"),this.space(),this.print(s.source)),this.semicolon()}function Aj(){this.tokenChar(42)}function Cj(s,e){this.print(s.typeParameters),this.tokenChar(40),s.this&&(this.word("this"),this.tokenChar(58),this.space(),this.print(s.this.typeAnnotation),(s.params.length||s.rest)&&(this.tokenChar(44),this.space())),this.printList(s.params),s.rest&&(s.params.length&&(this.tokenChar(44),this.space()),this.token("..."),this.print(s.rest)),this.tokenChar(41);let t=e?.type;t!=null&&(t==="ObjectTypeCallProperty"||t==="ObjectTypeInternalSlot"||t==="DeclareFunction"||t==="ObjectTypeProperty"&&e.method)?this.tokenChar(58):(this.space(),this.token("=>")),this.space(),this.print(s.returnType)}function Ij(s){this.print(s.name),s.optional&&this.tokenChar(63),s.name&&(this.tokenChar(58),this.space()),this.print(s.typeAnnotation)}function fo(s){this.print(s.id),this.print(s.typeParameters,!0)}function Mo(s){this.print(s.id),this.print(s.typeParameters),s.extends?.length&&(this.space(),this.word("extends"),this.space(),this.printList(s.extends)),s.type==="DeclareClass"&&(s.mixins?.length&&(this.space(),this.word("mixins"),this.space(),this.printList(s.mixins)),s.implements?.length&&(this.space(),this.word("implements"),this.space(),this.printList(s.implements))),this.space(),this.print(s.body)}function fs(s){let e=s.variance?.kind;e!=null&&(e==="plus"?this.tokenChar(43):e==="minus"&&this.tokenChar(45))}function ST(s){this.word("interface"),this.space(),Mo.call(this,s)}function wj(s){this.space(),this.token("&",!1,s),this.space()}function Nj(s){this.word("interface"),s.extends?.length&&(this.space(),this.word("extends"),this.space(),this.printList(s.extends)),this.space(),this.print(s.body)}function vj(s){this.printJoin(s.types,void 0,void 0,wj)}function kj(){this.word("mixed")}function Dj(){this.word("empty")}function Lj(s){this.tokenChar(63),this.print(s.typeAnnotation)}function Oj(){this.word("number")}function Mj(){this.word("string")}function Fj(){this.word("this")}function Bj(s){this.tokenChar(91),this.printList(s.types),this.tokenChar(93)}function _j(s){this.word("typeof"),this.space(),this.print(s.argument)}function xT(s){this.word("type"),this.space(),this.print(s.id),this.print(s.typeParameters),this.space(),this.tokenChar(61),this.space(),this.print(s.right),this.semicolon()}function jj(s,e){this.tokenChar(58),this.space(),e.type==="ArrowFunctionExpression"?this.tokenContext|=8:s.optional&&this.tokenChar(63),this.print(s.typeAnnotation)}function eT(s){this.tokenChar(60),this.printList(s.params),this.tokenChar(62)}function Rj(s){fs.call(this,s),this.word(s.name),s.bound&&this.print(s.bound),s.default&&(this.space(),this.tokenChar(61),this.space(),this.print(s.default))}function gT(s){this.word("opaque"),this.space(),this.word("type"),this.space(),this.print(s.id),this.print(s.typeParameters),s.supertype&&(this.tokenChar(58),this.space(),this.print(s.supertype)),s.impltype&&(this.space(),this.tokenChar(61),this.space(),this.print(s.impltype)),this.semicolon()}function Uj(s){s.exact?this.token("{|"):this.tokenChar(123);let e=[...s.properties,...s.callProperties||[],...s.indexers||[],...s.internalSlots||[]];e.length&&(this.newline(),this.space(),this.printJoin(e,!0,!0,()=>{(e.length!==1||s.inexact)&&(this.tokenChar(44),this.space())},!0),this.space()),s.inexact&&(this.indent(),this.token("..."),e.length&&this.newline(),this.dedent()),s.exact?this.token("|}"):this.tokenChar(125)}function Vj(s){s.static&&(this.word("static"),this.space()),this.tokenChar(91),this.tokenChar(91),this.print(s.id),this.tokenChar(93),this.tokenChar(93),s.optional&&this.tokenChar(63),s.method||(this.tokenChar(58),this.space()),this.print(s.value)}function Kj(s){s.static&&(this.word("static"),this.space()),this.print(s.value)}function qj(s){s.static&&(this.word("static"),this.space()),fs.call(this,s),this.tokenChar(91),s.id&&(this.print(s.id),this.tokenChar(58),this.space()),this.print(s.key),this.tokenChar(93),this.tokenChar(58),this.space(),this.print(s.value)}function $j(s){s.proto&&(this.word("proto"),this.space()),s.static&&(this.word("static"),this.space()),(s.kind==="get"||s.kind==="set")&&(this.word(s.kind),this.space()),fs.call(this,s),this.print(s.key),s.optional&&this.tokenChar(63),s.method||(this.tokenChar(58),this.space()),this.print(s.value)}function Jj(s){this.token("..."),this.print(s.argument)}function Xj(s){this.print(s.qualification),this.tokenChar(46),this.print(s.id)}function Wj(){this.word("symbol")}function zj(s){this.space(),this.token("|",!1,s),this.space()}function Hj(s){this.printJoin(s.types,void 0,void 0,zj)}function Yj(s){this.tokenChar(40),this.print(s.expression),this.print(s.typeAnnotation),this.tokenChar(41)}function Gj(s){s.kind==="plus"?this.tokenChar(43):this.tokenChar(45)}function Qj(){this.word("void")}function Zj(s){this.print(s.objectType,!0),this.tokenChar(91),this.print(s.indexType),this.tokenChar(93)}function eR(s){this.print(s.objectType),s.optional&&this.token("?."),this.tokenChar(91),this.print(s.indexType),this.tokenChar(93)}var{isExportDefaultDeclaration:tR,isExportNamedDeclaration:sR}=ne;function tT(s,e){(!(tR(e)||sR(e))||!wo.call(this,e))&&this.printJoin(s.decorators),s.declare&&(this.word("declare"),this.space()),s.abstract&&(this.word("abstract"),this.space()),this.word("class"),s.id&&(this.space(),this.print(s.id)),this.print(s.typeParameters),s.superClass&&(this.space(),this.word("extends"),this.space(),this.print(s.superClass),this.print(s.superTypeArguments)),s.implements&&(this.space(),this.word("implements"),this.space(),this.printList(s.implements)),this.space(),this.print(s.body)}function iR(s){if(this.tokenChar(123),s.body.length===0)this.tokenChar(125);else{let e=rR(this,s);e?.(-1);let t=this.enterDelimited();this.printJoin(s.body,!0,!0,e,!0,!0),this._noLineTerminatorAfterNode=t,this.endsWith(10)||this.newline(),this.rightBrace(s)}}function rR(s,e){if(!s.tokenMap||e.start==null||e.end==null)return null;let t=s.tokenMap.getIndexes(e);if(!t)return null;let i=1,r=0,n=0,a=()=>{for(;n<e.body.length&&e.body[n].start==null;)n++};return a(),o=>{n<=o&&(n=o+1,a());let c=n===e.body.length?e.end:e.body[n].start,l;for(;i<t.length&&s.tokenMap.matchesOriginal(l=s._tokens[t[i]],";")&&l.start<c;)s.tokenChar(59,r++),i++}}function nR(s){if(this.printJoin(s.decorators),!s.static&&!this.format.preserveFormat){let e=s.key.loc?.end?.line;e&&this.catchUp(e)}ai.call(this,s),s.computed?(this.tokenChar(91),this.print(s.key),this.tokenChar(93)):(fs.call(this,s),this.print(s.key)),s.optional&&this.tokenChar(63),s.definite&&this.tokenChar(33),this.print(s.typeAnnotation),s.value&&(this.space(),this.tokenChar(61),this.space(),this.print(s.value)),this.semicolon()}function aR(s){this.printJoin(s.decorators);let e=s.key.loc?.end?.line;e&&this.catchUp(e),ai.call(this,s),this.word("accessor",!0),this.space(),s.computed?(this.tokenChar(91),this.print(s.key),this.tokenChar(93)):(fs.call(this,s),this.print(s.key)),s.optional&&this.tokenChar(63),s.definite&&this.tokenChar(33),this.print(s.typeAnnotation),s.value&&(this.space(),this.tokenChar(61),this.space(),this.print(s.value)),this.semicolon()}function oR(s){this.printJoin(s.decorators),ai.call(this,s),this.print(s.key),s.optional&&this.tokenChar(63),s.definite&&this.tokenChar(33),this.print(s.typeAnnotation),s.value&&(this.space(),this.tokenChar(61),this.space(),this.print(s.value)),this.semicolon()}function cR(s){Er.call(this,s),this.space(),this.print(s.body)}function lR(s){Er.call(this,s),this.space(),this.print(s.body)}function Er(s,e=!0){if(e&&this.printJoin(s.decorators),!this.format.preserveFormat){let t=s.key.loc?.end?.line;t&&this.catchUp(t)}ai.call(this,s),vo.call(this,s)}function uR(s){this.word("static"),this.space(),this.tokenChar(123),s.body.length===0?this.tokenChar(125):(this.newline(),this.printSequence(s.body,!0),this.rightBrace(s))}function pR(s){s.program&&this.print(s.program.interpreter),this.print(s.program)}function hR(s){this.printInnerComments(!1);let e=s.directives?.length;if(e){let t=s.body.length?2:1;this.printSequence(s.directives,void 0,void 0,t),s.directives[e-1].trailingComments?.length||this.newline(t)}this.printSequence(s.body)}function fR(s){this.tokenChar(123);let e=this.enterDelimited(),t=s.directives?.length;if(t){let i=s.body.length?2:1;this.printSequence(s.directives,!0,!0,i),s.directives[t-1].trailingComments?.length||this.newline(i)}this.printSequence(s.body,!0,!0),this._noLineTerminatorAfterNode=e,this.rightBrace(s)}function dR(s){this.print(s.value),this.semicolon()}var mR=/(?:^|[^\\])(?:\\\\)*'/,yR=/(?:^|[^\\])(?:\\\\)*"/;function TR(s){let e=this.getPossibleRaw(s);if(!this.format.minified&&e!==void 0){this.token(e);return}let{value:t}=s;if(!yR.test(t))this.token(`"${t}"`);else if(!mR.test(t))this.token(`'${t}'`);else throw new Error("Malformed AST: it is not possible to print a directive containing both unescaped single and double quotes.")}function SR(s){this.token(`#!${s.value}`),this._newline()}function xR(s){this.token("%%"),this.print(s.name),this.token("%%"),s.expectedNode==="Statement"&&this.semicolon()}function gR(s){this.print(s.name),s.value&&(this.tokenChar(61),this.print(s.value))}function PR(s){this.word(s.name)}function bR(s){this.print(s.namespace),this.tokenChar(58),this.print(s.name)}function ER(s){this.print(s.object),this.tokenChar(46),this.print(s.property)}function AR(s){this.tokenChar(123),this.token("..."),this.print(s.argument),this.rightBrace(s)}function CR(s){this.tokenChar(123),this.print(s.expression),this.rightBrace(s)}function IR(s){this.tokenChar(123),this.token("..."),this.print(s.expression),this.rightBrace(s)}function wR(s){let e=this.getPossibleRaw(s);e!==void 0?this.token(e,!0):this.token(s.value,!0)}function NR(s){let e=s.openingElement;if(this.print(e),!e.selfClosing){this.indent();for(let t of s.children)this.print(t);this.dedent(),this.print(s.closingElement)}}function vR(){this.space()}function kR(s){this.tokenChar(60),this.print(s.name),this.print(s.typeArguments),s.attributes.length>0&&(this.space(),this.printJoin(s.attributes,void 0,void 0,vR)),s.selfClosing&&(this.space(),this.tokenChar(47)),this.tokenChar(62)}function DR(s){this.tokenChar(60),this.tokenChar(47),this.print(s.name),this.tokenChar(62)}function LR(){this.printInnerComments()}function OR(s){this.print(s.openingFragment),this.indent();for(let e of s.children)this.print(e);this.dedent(),this.print(s.closingFragment)}function MR(){this.tokenChar(60),this.tokenChar(62)}function FR(){this.token("</"),this.tokenChar(62)}var sT=Object.defineProperty({__proto__:null,AnyTypeAnnotation:G_,ArgumentPlaceholder:K_,ArrayExpression:Hy,ArrayPattern:Hy,ArrayTypeAnnotation:Q_,ArrowFunctionExpression:h4,AssignmentExpression:Uy,AssignmentPattern:O3,AwaitExpression:v3,BigIntLiteral:Qy,BigIntLiteralTypeAnnotation:Qy,BinaryExpression:M3,BindExpression:F3,BlockStatement:fR,BooleanLiteral:X_,BooleanLiteralTypeAnnotation:ej,BooleanTypeAnnotation:Z_,BreakStatement:Q3,CallExpression:w3,CatchClause:r4,ClassAccessorProperty:aR,ClassBody:iR,ClassDeclaration:tT,ClassExpression:tT,ClassImplements:fo,ClassMethod:cR,ClassPrivateMethod:lR,ClassPrivateProperty:oR,ClassProperty:nR,ConditionalExpression:x3,ContinueStatement:Z3,DebuggerStatement:o4,DeclareClass:sj,DeclareExportAllDeclaration:fj,DeclareExportDeclaration:hj,DeclareFunction:ij,DeclareInterface:aj,DeclareModule:oj,DeclareModuleExports:cj,DeclareOpaqueType:uj,DeclareTypeAlias:lj,DeclareVariable:pj,DeclaredPredicate:nj,Decorator:A3,Directive:dR,DirectiveLiteral:TR,DoExpression:y3,DoWhileStatement:G3,EmptyStatement:D3,EmptyTypeAnnotation:Dj,EnumBooleanBody:mj,EnumBooleanMember:gj,EnumDeclaration:dj,EnumDefaultedMember:xj,EnumNumberBody:yj,EnumNumberMember:Pj,EnumStringBody:Tj,EnumStringMember:bj,EnumSymbolBody:Sj,ExistsTypeAnnotation:Aj,ExportAllDeclaration:mT,ExportDefaultDeclaration:F_,ExportDefaultSpecifier:D_,ExportNamedDeclaration:M_,ExportNamespaceSpecifier:O_,ExportSpecifier:L_,ExpressionStatement:L3,File:pR,ForInStatement:H3,ForOfStatement:Y3,ForStatement:W3,FunctionDeclaration:Vy,FunctionExpression:Vy,FunctionTypeAnnotation:Cj,FunctionTypeParam:Ij,GenericTypeAnnotation:fo,Identifier:V_,IfStatement:X3,Import:N3,ImportAttribute:__,ImportDeclaration:B_,ImportDefaultSpecifier:k_,ImportExpression:R_,ImportNamespaceSpecifier:j_,ImportSpecifier:v_,IndexedAccessType:Zj,InferredPredicate:rj,InterfaceDeclaration:ST,InterfaceExtends:fo,InterfaceTypeAnnotation:Nj,InterpreterDirective:SR,IntersectionTypeAnnotation:vj,JSXAttribute:gR,JSXClosingElement:DR,JSXClosingFragment:FR,JSXElement:NR,JSXEmptyExpression:LR,JSXExpressionContainer:CR,JSXFragment:OR,JSXIdentifier:PR,JSXMemberExpression:ER,JSXNamespacedName:bR,JSXOpeningElement:kR,JSXOpeningFragment:MR,JSXSpreadAttribute:AR,JSXSpreadChild:IR,JSXText:wR,LabeledStatement:s4,LogicalExpression:Uy,MemberExpression:B3,MetaProperty:_3,MixedTypeAnnotation:kj,ModuleExpression:U3,NewExpression:g3,NullLiteral:W_,NullLiteralTypeAnnotation:tj,NullableTypeAnnotation:Lj,NumberLiteralTypeAnnotation:Yy,NumberTypeAnnotation:Oj,NumericLiteral:Yy,ObjectExpression:zy,ObjectMethod:q_,ObjectPattern:zy,ObjectProperty:$_,ObjectTypeAnnotation:Uj,ObjectTypeCallProperty:Kj,ObjectTypeIndexer:qj,ObjectTypeInternalSlot:Vj,ObjectTypeProperty:$j,ObjectTypeSpreadProperty:Jj,OpaqueType:gT,OptionalCallExpression:I3,OptionalIndexedAccessType:eR,OptionalMemberExpression:C3,ParenthesizedExpression:T3,Placeholder:xR,PrivateName:j3,Program:hR,QualifiedTypeIdentifier:Xj,RegExpLiteral:J_,RestElement:Wy,ReturnStatement:e4,SequenceExpression:P3,SpreadElement:Wy,StaticBlock:uR,StringLiteral:Gy,StringLiteralTypeAnnotation:Gy,StringTypeAnnotation:Mj,Super:E3,SwitchCase:a4,SwitchStatement:n4,SymbolTypeAnnotation:Wj,TSAnyKeyword:C4,TSArrayType:J4,TSAsExpression:l_,TSBigIntKeyword:I4,TSBooleanKeyword:k4,TSCallSignatureDeclaration:g4,TSClassImplements:Jy,TSConditionalType:Q4,TSConstructSignatureDeclaration:P4,TSConstructorType:U4,TSDeclareFunction:T4,TSDeclareMethod:S4,TSEnumBody:d_,TSEnumDeclaration:f_,TSEnumMember:m_,TSExportAssignment:b_,TSExternalModuleReference:g_,TSFunctionType:R4,TSImportEqualsDeclaration:x_,TSImportType:S_,TSIndexSignature:A4,TSIndexedAccessType:s_,TSInferType:Z4,TSInstantiationExpression:h_,TSInterfaceBody:o_,TSInterfaceDeclaration:a_,TSInterfaceHeritage:Jy,TSIntersectionType:G4,TSIntrinsicKeyword:_4,TSLiteralType:n_,TSMappedType:i_,TSMethodSignature:E4,TSModuleBlock:T_,TSModuleDeclaration:y_,TSNamedTupleMember:H4,TSNamespaceExportDeclaration:E_,TSNeverKeyword:B4,TSNonNullExpression:P_,TSNullKeyword:F4,TSNumberKeyword:N4,TSObjectKeyword:v4,TSOptionalType:W4,TSParameterProperty:y4,TSParenthesizedType:e_,TSPropertySignature:b4,TSQualifiedName:x4,TSRestType:z4,TSSatisfiesExpression:u_,TSStringKeyword:D4,TSSymbolKeyword:L4,TSTemplateLiteralType:r_,TSThisType:j4,TSTupleType:X4,TSTypeAliasDeclaration:c_,TSTypeAnnotation:d4,TSTypeAssertion:p_,TSTypeLiteral:$4,TSTypeOperator:t_,TSTypeParameter:m4,TSTypeParameterDeclaration:qy,TSTypeParameterInstantiation:qy,TSTypePredicate:K4,TSTypeQuery:q4,TSTypeReference:V4,TSUndefinedKeyword:M4,TSUnionType:Y4,TSUnknownKeyword:w4,TSVoidKeyword:O4,TaggedTemplateExpression:l3,TemplateElement:u3,TemplateLiteral:p3,ThisExpression:b3,ThisTypeAnnotation:Fj,ThrowStatement:t4,TopicReference:z_,TryStatement:i4,TupleTypeAnnotation:Bj,TypeAlias:xT,TypeAnnotation:jj,TypeCastExpression:Yj,TypeParameter:Rj,TypeParameterDeclaration:eT,TypeParameterInstantiation:eT,TypeofTypeAnnotation:_j,UnaryExpression:m3,UnionTypeAnnotation:Hj,UpdateExpression:S3,V8IntrinsicIdentifier:R3,VariableDeclaration:l4,VariableDeclarator:u4,Variance:Gj,VoidPattern:H_,VoidTypeAnnotation:Qj,WhileStatement:z3,WithStatement:J3,YieldExpression:k3,_classMethodHead:Er,_functionHead:Do,_getRawIdentifier:TT,_interfaceish:Mo,_methodHead:vo,_param:No,_parameters:ri,_params:hs,_predicate:ko,_printAttributes:xr,_printTemplate:Ao,_shouldPrintArrowParamsParens:uT,_shouldPrintDecoratorsBeforeExport:wo,_tsPrintClassMemberModifiers:ai,_variance:fs},Symbol.toStringTag,{value:"Module"}),dr=new Map,BR=0;for(let s of Object.keys(sT).sort())s.startsWith("_")||dr.set(s,[sT[s],BR++,void 0]);var{VISITOR_KEYS:_R}=ne;for(let s of Object.keys(Ry)){let e=Ry[s];dr.has(s)&&(dr.get(s)[2]=e)}function jR(s){let e=s;for(;;)switch(e.type){case"CallExpression":case"ImportExpression":case"OptionalCallExpression":case"OptionalMemberExpression":return!0;case"MemberExpression":e=e.object;break;case"TaggedTemplateExpression":e=e.tag;break;case"TSInstantiationExpression":case"TSNonNullExpression":e=e.expression;break;default:return!1}}function RR(s){let e=s;for(;;)switch(e.type){case"OptionalCallExpression":case"OptionalMemberExpression":return!0;case"TSInstantiationExpression":case"TSNonNullExpression":e=e.expression;break;default:return!1}}function UR(s,e,t){switch(t){case 113:if(e.callee===s)return jR(s);break;case 220:if(e.tag===s)return RR(s);break;case 43:return!So(s)&&!(s.type==="CallExpression"&&So(s.callee))&&s.type!=="ParenthesizedExpression"}return!1}function So(s){switch(s.type){case"Identifier":return!0;case"MemberExpression":return!s.computed&&s.property.type==="Identifier"&&So(s.object);default:return!1}}function VR(s,e){let t=_R[s.type];for(let i=t.length-1;i>=0;i--){let r=s[t[i]];if(r===e)return!0;if(Array.isArray(r)){let n=r.length-1;for(;n>=0&&r[n]===null;)n--;return n>=0&&r[n]===e}else if(r)return!1}return!1}var{traverseFast:KR,VISITOR_KEYS:qR}=ne,xo=class{_tokens;_source;_nodesToTokenIndexes=new Map;_nodesOccurrencesCountCache=new Map;_tokensCache=new Map;constructor(e,t,i){this._tokens=t,this._source=i,KR(e,r=>{let n=this._getTokensIndexesOfNode(r);n.length>0&&this._nodesToTokenIndexes.set(r,n)}),this._tokensCache.clear()}has(e){return this._nodesToTokenIndexes.has(e)}getIndexes(e){return this._nodesToTokenIndexes.get(e)}find(e,t){let i=this._nodesToTokenIndexes.get(e);if(i)for(let r=0;r<i.length;r++){let n=i[r],a=this._tokens[n];if(t(a,n))return a}return null}findLastIndex(e,t){let i=this._nodesToTokenIndexes.get(e);if(i)for(let r=i.length-1;r>=0;r--){let n=i[r],a=this._tokens[n];if(t(a,n))return n}return-1}findMatching(e,t,i=0){let r=this._nodesToTokenIndexes.get(e);if(r){typeof t=="number"&&(t=String.fromCharCode(t));let n=0,a=i;if(a>1){let o=this._nodesOccurrencesCountCache.get(e);o?.test===t&&o.count<a&&(n=o.i+1,i-=o.count+1)}for(;n<r.length;n++){let o=this._tokens[r[n]];if(this.matchesOriginal(o,t)){if(i===0)return a>0&&this._nodesOccurrencesCountCache.set(e,{test:t,count:a,i:n}),o;i--}}}return null}matchesOriginal(e,t){return e.end-e.start!==t.length?!1:e.value!=null?e.value===t:this._source.startsWith(t,e.start)}startMatches(e,t){let i=this._nodesToTokenIndexes.get(e);if(!i)return!1;let r=this._tokens[i[0]];return r.start!==e.start?!1:this.matchesOriginal(r,t)}endMatches(e,t){let i=this._nodesToTokenIndexes.get(e);if(!i)return!1;let r=this._tokens[i[i.length-1]];return r.end!==e.end?!1:this.matchesOriginal(r,t)}_getTokensIndexesOfNode(e){if(e.start==null||e.end==null)return[];let{first:t,last:i}=this._findTokensOfNode(e,0,this._tokens.length-1),r=t,n=$R(e);(e.type==="ExportNamedDeclaration"||e.type==="ExportDefaultDeclaration")&&e.declaration?.type==="ClassDeclaration"&&n.next();let a=[];for(let o of n){if(o==null||o.start==null||o.end==null)continue;let c=this._findTokensOfNode(o,r,i),l=c.first;for(let u=r;u<l;u++)a.push(u);r=c.last+1}for(let o=r;o<=i;o++)a.push(o);return a}_findTokensOfNode(e,t,i){let r=this._tokensCache.get(e);if(r)return r;let n=this._findFirstTokenOfNode(e.start,t,i),a=this._findLastTokenOfNode(e.end,n,i);return this._tokensCache.set(e,{first:n,last:a}),{first:n,last:a}}_findFirstTokenOfNode(e,t,i){for(;t<=i;){let r=i+t>>1;if(e<this._tokens[r].start)i=r-1;else if(e>this._tokens[r].start)t=r+1;else return r}return t}_findLastTokenOfNode(e,t,i){for(;t<=i;){let r=i+t>>1;if(e<this._tokens[r].end)i=r-1;else if(e>this._tokens[r].end)t=r+1;else return r}return i}};function*$R(s){if(s.type==="TemplateLiteral"){yield s.quasis[0];for(let t=1;t<s.quasis.length;t++)yield s.expressions[t-1],yield s.quasis[t];return}let e=qR[s.type];for(let t of e){let i=s[t];i&&(Array.isArray(i)?yield*i:yield i)}}var{isExpression:JR,isFunction:XR,isStatement:WR,isClassBody:zR,isTSInterfaceBody:HR,isTSEnumMember:YR}=ne,GR=/e/i,QR=/\.0+$/,PT=/[\n\r\u2028\u2029]/,ZR=/[\n\r\u2028\u2029]|\*\//;function iT(s){return s.type==="CommentLine"||PT.test(s.value)}var go=class{constructor(e,t,i=null,r=null){this.format=e,this._tokens=i,this._originalCode=r,this._indentRepeat=e.indent.style.length,this._inputMap=t?._inputMap||null,this._buf=new yo(t,e.indent.style[0]);let{preserveFormat:n,compact:a,concise:o,retainLines:c,retainFunctionParens:l}=e;n&&(this._flags|=1),a&&(this._flags|=2),o&&(this._flags|=4),c&&(this._flags|=8),l&&(this._flags|=16),(e.auxiliaryCommentBefore||e.auxiliaryCommentAfter)&&(this._flags|=32)}enterDelimited(){let e=this._noLineTerminatorAfterNode;return e!==null&&(this._noLineTerminatorAfterNode=null),e}tokenContext=0;_tokens=null;_originalCode=null;_currentNode=null;_currentTypeId=null;_indent=0;_indentRepeat=0;_insideAux=!1;_noLineTerminator=!1;_noLineTerminatorAfterNode=null;_printAuxAfterOnNextUserNode=!1;_printedComments=new Set;_lastCommentLine=0;_innerCommentsState=0;_flags=0;tokenMap=null;_boundGetRawIdentifier=null;generate(e){return this.format.preserveFormat&&(this.tokenMap=new xo(e,this._tokens,this._originalCode),this._boundGetRawIdentifier=TT.bind(this)),this.print(e),this._maybeAddAuxComment(),this._buf.get()}indent(e=this._flags){e&7||(this._indent+=this._indentRepeat)}dedent(e=this._flags){e&7||(this._indent-=this._indentRepeat)}_printSemicolonBeforeNextNode=-1;_printSemicolonBeforeNextToken=-1;semicolon(e=!1){let t=this._flags;if(t&32&&this._maybeAddAuxComment(),t&1){let i=this._currentNode;if(i.start!=null&&i.end!=null){if(!this.tokenMap.endMatches(i,";")){this._printSemicolonBeforeNextNode=this._buf.getCurrentLine();return}let r=this.tokenMap.getIndexes(this._currentNode);this._catchUpTo(this._tokens[r[r.length-1]].loc.start)}}e?this._appendChar(59):this._queue(59),this._noLineTerminator=!1}rightBrace(e){this.format.minified&&this._buf.removeLastSemicolon(),this.sourceWithOffset("end",e.loc,-1),this.tokenChar(125)}rightParens(e){this.sourceWithOffset("end",e.loc,-1),this.tokenChar(41)}space(e=!1){if(!(this._flags&3))if(e)this._space();else{let t=this.getLastChar(!0);t!==0&&t!==32&&t!==10&&this._space()}}word(e,t=!1){this.tokenContext&=128,this._maybePrintInnerComments(e);let i=this._flags;i&32&&this._maybeAddAuxComment(),i&1&&this._catchUpToCurrentToken(e);let r=this.getLastChar();(r===-2||r===-3||r===47&&e.charCodeAt(0)===47)&&this._space(),this._append(e,!1),this.setLastChar(-3),this._noLineTerminator=t}number(e,t){function i(r){if(r.length>2&&r.charCodeAt(0)===48){let n=r.charCodeAt(1);return n===98||n===111||n===120}return!1}this.word(e),Number.isInteger(t)&&!i(e)&&!GR.test(e)&&!QR.test(e)&&e.charCodeAt(e.length-1)!==46&&this.setLastChar(-2)}token(e,t=!1,i=0,r=!1){this.tokenContext&=128,this._maybePrintInnerComments(e,i);let n=this._flags;if(n&32&&this._maybeAddAuxComment(),n&1&&this._catchUpToCurrentToken(e,i),r){let a=e.charCodeAt(0);((a===45&&e==="--"||a===61)&&this.getLastChar()===33||a===43&&this.getLastChar()===43||a===45&&this.getLastChar()===45||a===46&&this.getLastChar()===-2)&&this._space()}this._append(e,t),this._noLineTerminator=!1}tokenChar(e,t=0){this.tokenContext&=128,this._maybePrintInnerComments(e,t);let i=this._flags;i&32&&this._maybeAddAuxComment(),i&1&&this._catchUpToCurrentToken(e,t),(e===43&&this.getLastChar()===43||e===45&&this.getLastChar()===45||e===46&&this.getLastChar()===-2)&&this._space(),this._appendChar(e),this._noLineTerminator=!1}newline(e=1,t=this._flags){if(!(e<=0)&&!(t&10)){if(t&4){this.space();return}e>2&&(e=2),e-=this._buf.getNewlineCount();for(let i=0;i<e;i++)this._newline()}}endsWith(e){return this.getLastChar(!0)===e}getLastChar(e){return this._buf.getLastChar(e)}setLastChar(e){this._buf._last=e}exactSource(e,t){if(!e){t();return}this._catchUp("start",e),this._buf.exactSource(e,t)}source(e,t){t&&(this._catchUp(e,t),this._buf.source(e,t))}sourceWithOffset(e,t,i){!t||this.format.preserveFormat||(this._catchUp(e,t),this._buf.sourceWithOffset(e,t,i))}sourceIdentifierName(e,t){if(!this._buf._canMarkIdName)return;let i=this._buf._sourcePosition;i.identifierNamePos=t,i.identifierName=e}_space(){this._queue(32)}_newline(){this._buf._queuedChar===32&&(this._buf._queuedChar=0),this._appendChar(10,!0)}_catchUpToCurrentToken(e,t=0){let i=this.tokenMap.findMatching(this._currentNode,e,t);i&&this._catchUpTo(i.loc.start),this._printSemicolonBeforeNextToken!==-1&&this._printSemicolonBeforeNextToken===this._buf.getCurrentLine()&&this._appendChar(59,!0),this._printSemicolonBeforeNextToken=-1,this._printSemicolonBeforeNextNode=-1}_append(e,t){this._maybeIndent(),this._buf.append(e,t)}_appendChar(e,t){t||this._maybeIndent(),this._buf.appendChar(e)}_queue(e){this._buf.queue(e),this.setLastChar(-1)}_maybeIndent(){let e=this._shouldIndent();e>0&&this._buf._appendChar(-1,e,!1)}_shouldIndent(){return this.endsWith(10)?this._indent:0}catchUp(e){if(!this.format.retainLines)return;let t=e-this._buf.getCurrentLine();for(let i=0;i<t;i++)this._newline()}_catchUp(e,t){let i=this._flags;if((i&1)===0){i&8&&t?.[e]&&this.catchUp(t[e].line);return}let r=t?.[e];r!=null&&this._catchUpTo(r)}_catchUpTo({line:e,column:t,index:i}){let r=e-this._buf.getCurrentLine();if(r>0&&this._noLineTerminator)return;for(let a=0;a<r;a++)this._newline();let n=r>0?t:t-this._buf.getCurrentColumn();if(n>0){let a=this._originalCode?this._originalCode.slice(i-n,i).replace(/[^\t\v\f\uFEFF\p{Space_Separator}]/gu," "):" ".repeat(n);this._buf.append(a,!1,!0),this._buf.setSourcePosition(e,t),this.setLastChar(32)}}printTerminatorless(e){this._noLineTerminator=!0,this.print(e)}print(e,t=!1,i=!1,r){if(!e)return;this._innerCommentsState=0;let{type:n,loc:a,extra:o}=e,c=this._flags,l=!1;e._compact&&(this._flags|=4,l=!0);let u=dr.get(n);if(u===void 0)throw new ReferenceError(`unknown node of type ${JSON.stringify(n)} with constructor ${JSON.stringify(e.constructor.name)}`);let[f,m,x]=u,I=this._currentNode,L=this._currentTypeId;this._currentNode=e,this._currentTypeId=m,c&1&&(this._printSemicolonBeforeNextToken=this._printSemicolonBeforeNextNode);let N;c&32&&(N=this._insideAux,this._insideAux=a==null,this._maybeAddAuxComment(this._insideAux&&!N));let w=0;i&&(w=this.tokenContext,w&128?this.tokenContext=0:w=0);let v=o!=null&&o.parenthesized,z=v&&c&1||v&&c&16&&m===72||I&&(UR(e,I,L)||x!=null&&x(e,I,L,this.tokenContext,c&1?this._boundGetRawIdentifier:void 0));if(!z&&v&&e.leadingComments?.length&&e.leadingComments[0].type==="CommentBlock")switch(L){case 66:case 241:case 6:case 141:break;case 18:case 131:case 113:if(I.callee!==e)break;default:z=!0}let V=!1;!z&&this._noLineTerminator&&(e.leadingComments?.some(iT)||c&8&&a&&a.start.line>this._buf.getCurrentLine())&&(z=!0,V=!0);let Z;z||(t||=!!I&&this._noLineTerminatorAfterNode===I&&VR(I,e),t&&(e.trailingComments?.some(iT)?JR(e)&&(z=!0):(Z=this._noLineTerminatorAfterNode,this._noLineTerminatorAfterNode=e))),z&&(this.tokenChar(40),V&&this.indent(),this._innerCommentsState=0,i||(w=this.tokenContext),w&128&&(this.tokenContext=0),Z=this._noLineTerminatorAfterNode,this._noLineTerminatorAfterNode=null),this._printLeadingComments(e,I),this.exactSource(m===137||m===67?null:a,f.bind(this,e,I)),z?(this._printTrailingComments(e,I),V&&(this.dedent(),this.newline()),this.tokenChar(41),this._noLineTerminator=t):t&&!this._noLineTerminator?(this._noLineTerminator=!0,this._printTrailingComments(e,I)):this._printTrailingComments(e,I,r),w&&(this.tokenContext=w),this._currentNode=I,this._currentTypeId=L,l&&(this._flags=c),c&32&&(this._insideAux=N),Z!=null&&(this._noLineTerminatorAfterNode=Z),this._innerCommentsState=0}_maybeAddAuxComment(e){e&&this._printAuxBeforeComment(),this._insideAux||this._printAuxAfterComment()}_printAuxBeforeComment(){if(this._printAuxAfterOnNextUserNode)return;this._printAuxAfterOnNextUserNode=!0;let e=this.format.auxiliaryCommentBefore;e&&this._printComment({type:"CommentBlock",value:e},0)}_printAuxAfterComment(){if(!this._printAuxAfterOnNextUserNode)return;this._printAuxAfterOnNextUserNode=!1;let e=this.format.auxiliaryCommentAfter;e&&this._printComment({type:"CommentBlock",value:e},0)}getPossibleRaw(e){let t=e.extra;if(t?.raw!=null&&t.rawValue!=null&&e.value===t.rawValue)return t.raw}printJoin(e,t,i,r,n,a,o){if(!e?.length)return;let c=this._flags;if(i==null&&c&8){let u=e[0].loc?.start.line;u!=null&&u!==this._buf.getCurrentLine()&&(i=!0)}i&&this.indent(c);let l=e.length;for(let u=0;u<l;u++){let f=e[u];if(f&&(t&&u===0&&this._buf.hasContent()&&this.newline(1,c),this.print(f,!1,a,o||0),r!=null&&(u<l-1?r.call(this,u,!1):n&&r.call(this,u,!0)),t))if(u+1===l)this.newline(1,c);else{let m=this._lastCommentLine;if(m>0){let x=(e[u+1].loc?.start.line||0)-m;if(x>=0){this.newline(x||1,c);continue}}this.newline(1,c)}}i&&this.dedent(c)}printAndIndentOnComments(e){let t=e.leadingComments&&e.leadingComments.length>0;t&&this.indent(),this.print(e),t&&this.dedent()}printBlock(e){e.type!=="EmptyStatement"&&this.space(),this.print(e)}_printTrailingComments(e,t,i){let{innerComments:r,trailingComments:n}=e;r?.length&&this._printComments(2,r,e,t,i),n?.length?this._printComments(2,n,e,t,i):this._lastCommentLine=0}_printLeadingComments(e,t){let i=e.leadingComments;i?.length&&this._printComments(0,i,e,t)}_maybePrintInnerComments(e,t){let i=this._innerCommentsState;switch(i&3){case 0:this._innerCommentsState=5;return;case 1:this.printInnerComments((i&4)>0,this.tokenMap?.findMatching(this._currentNode,e,t))}}printInnerComments(e=!0,t){let i=this._currentNode,r=i.innerComments;if(!r?.length){this._innerCommentsState=2;return}let n=this.endsWith(32);switch(e&&this.indent(),this._printComments(1,r,i,void 0,void 0,t)){case 2:this._innerCommentsState=2;case 1:n&&this.space()}e&&this.dedent()}noIndentInnerCommentsHere(){this._innerCommentsState&=-5}printSequence(e,t,i,r){this.printJoin(e,!0,t??!1,void 0,void 0,i,r)}printList(e,t,i,r,n,a){this.printJoin(e,i,r,n??e6,t,a)}shouldPrintTrailingComma(e){if(!this.tokenMap)return null;let t=this.tokenMap.findLastIndex(this._currentNode,i=>this.tokenMap.matchesOriginal(i,typeof e=="number"?String.fromCharCode(e):e));return t<=0?null:this.tokenMap.matchesOriginal(this._tokens[t-1],",")}_shouldPrintComment(e,t){if(e.ignore||this._printedComments.has(e))return 0;if(this._noLineTerminator&&ZR.test(e.value))return 2;if(t&&this.tokenMap){let i=this.tokenMap.find(this._currentNode,r=>r.value===e.value);if(i&&i.start>t.start)return 2}return this._printedComments.add(e),this.format.shouldPrintComment(e.value)?1:0}_printComment(e,t){let i=this._noLineTerminator,r=e.type==="CommentBlock",n=r&&t!==1&&!i;switch(n&&this._buf.hasContent()&&t!==2&&this.newline(1),this.getLastChar(!0)){case 47:this._space();case 91:case 123:case 40:break;default:this.space()}let a;if(r){if(a=`/*${e.value}*/`,this.format.indent.adjustMultilineComment){let o=e.loc?.start.column;if(o){let c=new RegExp("\\n\\s{1,"+o+"}","g");a=a.replace(c,`
20
+ `)}if(this._flags&4)a=a.replace(/\n(?!$)/g,`
21
+ `);else{let c=this.format.retainLines?0:this._buf.getCurrentColumn();(this._shouldIndent()||this.format.retainLines)&&(c+=this._indent),a=a.replace(/\n(?!$)/g,`
22
+ ${" ".repeat(c)}`)}}}else i?a=`/*${e.value}*/`:a=`//${e.value}`;this.source("start",e.loc),this._append(a,r),!r&&!i&&this._newline(),n&&t!==3&&this.newline(1)}_printComments(e,t,i,r,n=0,a){let o=i.loc,c=t.length,l=!!o,u=l?o.start.line:0,f=l?o.end.line:0,m=0,x=0,{_noLineTerminator:I,_flags:L}=this;for(let N=0;N<c;N++){let w=t[N],v=this._shouldPrintComment(w,a);if(v===2)return N===0?0:1;if(l&&w.loc&&v===1){let z=w.loc.start.line,V=w.loc.end.line;if(e===0){let Z=0;if(N===0?this._buf.hasContent()&&(w.type==="CommentLine"||z!==V)&&(Z=x=1):Z=z-m,m=V,Z>0&&!I&&this.newline(Z,L),this._printComment(w,1),N+1===c){let Pe=Math.max(u-m,x);Pe>0&&!I&&this.newline(Pe,L),m=u}}else if(e===1){let Z=z-(N===0?u:m);if(m=V,Z>0&&!I&&this.newline(Z,L),this._printComment(w,1),N+1===c){let Pe=Math.min(1,f-m);Pe>0&&!I&&this.newline(Pe,L),m=f}}else{let Z=z-(N===0?f-n:m);m=V,Z>0&&!I&&this.newline(Z,L),this._printComment(w,1)}}else{if(l=!1,v!==1)continue;if(c===1){let z=w.loc?w.loc.start.line===w.loc.end.line:!PT.test(w.value),V=z&&!WR(i)&&!zR(r)&&!HR(r)&&!YR(i);e===0?this._printComment(w,V&&i.type!=="ObjectExpression"||z&&XR(r)&&r.body===i?1:0):V&&e===2?this._printComment(w,1):this._printComment(w,0)}else e===1&&!(i.type==="ObjectExpression"&&i.properties.length>1)&&i.type!=="ClassBody"&&i.type!=="TSInterfaceBody"?this._printComment(w,N===0?2:N===c-1?3:0):this._printComment(w,0)}}return e===2&&l&&m&&(this._lastCommentLine=m),2}};function e6(s,e){this.tokenChar(44,s),e||this.space()}function t6(s,e,t){if(e.experimental_preserveFormat){if(typeof s!="string")throw new Error("`experimental_preserveFormat` requires the original `code` to be passed to @babel/generator as a string");if(!e.retainLines)throw new Error("`experimental_preserveFormat` requires `retainLines` to be set to `true`");if(e.compact&&e.compact!=="auto")throw new Error("`experimental_preserveFormat` is not compatible with the `compact` option");if(e.minified)throw new Error("`experimental_preserveFormat` is not compatible with the `minified` option");if(e.jsescOption)throw new Error("`experimental_preserveFormat` is not compatible with the `jsescOption` option");if(!Array.isArray(t.tokens))throw new Error("`experimental_preserveFormat` requires the AST to have attached the token of the input code. Make sure to enable the `tokens: true` parser option.")}let i={auxiliaryCommentBefore:e.auxiliaryCommentBefore,auxiliaryCommentAfter:e.auxiliaryCommentAfter,shouldPrintComment:e.shouldPrintComment,preserveFormat:e.experimental_preserveFormat,retainLines:e.retainLines,retainFunctionParens:e.retainFunctionParens,comments:e.comments==null||e.comments,compact:e.compact,minified:e.minified,concise:e.concise,indent:{adjustMultilineComment:!0,style:" "},jsescOption:{quotes:"double",wrap:!0,minimal:!0,...e.jsescOption},topicToken:e.topicToken};i.minified?(i.compact=!0,i.shouldPrintComment=i.shouldPrintComment||(()=>i.comments)):i.shouldPrintComment=i.shouldPrintComment||(o=>i.comments||o.includes("@license")||o.includes("@preserve")),i.compact==="auto"&&(i.compact=typeof s=="string"&&s.length>5e5,i.compact&&console.error(`[BABEL] Note: The code generator has deoptimised the styling of ${e.filename} as it exceeds the max of 500KB.`)),(i.compact||i.preserveFormat)&&(i.indent.adjustMultilineComment=!1);let{auxiliaryCommentBefore:r,auxiliaryCommentAfter:n,shouldPrintComment:a}=i;return r&&!a(r)&&(i.auxiliaryCommentBefore=void 0),n&&!a(n)&&(i.auxiliaryCommentAfter=void 0),i}function Ar(s,e={},t){let i=t6(t,e,s),r=e.sourceMaps?new mo(e,t):null;return new go(i,r,s.tokens,typeof t=="string"?t:null).generate(s)}var bT=/\r\n|[\n\r\u2028\u2029]/;function s6(s,e,t,i){let r={column:null,line:-1,...s.start},n={...r,...s.end},{linesAbove:a=2,linesBelow:o=3}=t||{},c=r.line-i,l=r.column,u=n.line-i,f=n.column,m=Math.max(c-(a+1),0),x=Math.min(e.length,u+o);c===-1&&(m=0),u===-1&&(x=e.length);let I=u-c,L={};if(I)for(let N=0;N<=I;N++){let w=N+c;if(l==null)L[w]=!0;else if(N===0){let v=e[w-1].length;L[w]=[l,v-l]}else if(N===I)L[w]=[0,f];else{let v=e[w-1].length;L[w]=[0,v]}}else if(l===f)l!=null?L[c]=[l,0]:L[c]=!0;else{let N=l??0,w=f??N;L[c]=[N,w-N]}return{start:m,end:x,markerLines:L}}function ET(s,e,t={},i){let{defs:r,highlight:n}=i||{defs:{gutter:String,marker:String,message:String,reset:String},highlight:String},a=(t.startLine||1)-1,o=s.split(bT),{start:c,end:l,markerLines:u}=s6(e,o,t,a),f=e.start&&typeof e.start.column=="number",m=String(l+a).length,I=n(s).split(bT,l).slice(c,l).map((L,N)=>{let w=c+1+N,z=` ${` ${w+a}`.slice(-m)} |`,V=u[w],Z=!u[w+1];if(V){let Pe="";if(Array.isArray(V)){let qe=L.slice(0,V[0]).replace(/[^\t]/g," "),Qe=V[1]||1;Pe=[`
23
+ `,r.gutter(z.replace(/\d/g," "))," ",qe,r.marker("^").repeat(Qe)].join(""),Z&&t.message&&(Pe+=" "+r.message(t.message))}return[r.marker(">"),r.gutter(z),L.length>0?` ${L}`:"",Pe].join("")}else return` ${r.gutter(z)}${L.length>0?` ${L}`:""}`}).join(`
24
+ `);return t.message&&!f&&(I=`${" ".repeat(m+1)}${t.message}
25
+ ${I}`),r.reset(I)}function Cr(s,e,t={}){return ET(s,e,t)}var _e=class{constructor(e,t,i){this.line=void 0,this.column=void 0,i!==void 0&&(this.index=void 0),this.line=e,this.column=t,i!==void 0&&(this.index=i)}},xs=class{start;end;filename;identifierName;constructor(e,t){this.start=e,this.end=t}};function Ye(s,e){let{line:t,column:i,index:r}=s;return new _e(t,i+e,r+e)}var AT="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",i6={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:AT},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:AT}},CT={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},kr=s=>s.type==="UpdateExpression"?CT.UpdateExpression[`${s.prefix}`]:CT[s.type],r6={AccessorIsGenerator:({kind:s})=>`A ${s}ter cannot be a generator.`,ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:({kind:s})=>`Missing initializer in ${s} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',DeletePrivateField:"Deleting a private field is not allowed.",DestructureNamedImport:"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",DuplicateConstructor:"Duplicate constructor in the same class.",DuplicateDefaultExport:"Only one default export allowed per module.",DuplicateExport:({exportName:s})=>`\`${s}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName:s,exportName:e})=>`A string literal cannot be used as an exported binding without \`from\`.
26
+ - Did you mean \`export { '${s}' as '${e}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:s})=>`'${s==="ForInStatement"?"for-in":"for-of"}' loop variable declaration may not have an initializer.`,ForInUsing:"For-in loop may not start with 'using' declaration.",ForOfAsync:"The left-hand side of a for-of loop may not be 'async'.",ForOfLet:"The left-hand side of a for-of loop may not start with 'let'.",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block.",IllegalBreakContinue:({type:s})=>`Unsyntactic ${s==="BreakStatement"?"break":"continue"}.`,IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportBindingIsString:({importName:s})=>`A string literal cannot be used as an imported binding.
27
+ - Did you mean \`import { "${s}" as foo }\`?`,ImportCallArity:({phase:s})=>`\`import${s?`.${s}`:""}()\` requires exactly one or two arguments.`,ImportCallNotNewExpression:({phase:s})=>`Cannot use new with import${s?`.${s}`:""}().`,ImportCallSpreadArgument:({phase:s})=>`\`...\` is not allowed in \`import${s?`.${s}`:""}()\`.`,IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverDiscardElement:"'void' must be followed by an expression when not used in a binding position.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDigit:({radix:s})=>`Expected number in radix ${s}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:s})=>`Escape sequence in keyword ${s}.`,InvalidIdentifier:({identifierName:s})=>`Invalid identifier ${s}.`,InvalidLhs:({ancestor:s})=>`Invalid left-hand side in ${kr(s)}.`,InvalidLhsBinding:({ancestor:s})=>`Binding invalid left-hand side in ${kr(s)}.`,InvalidLhsOptionalChaining:({ancestor:s})=>`Invalid optional chaining in the left-hand side of ${kr(s)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:s})=>`Unexpected character '${s}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:s})=>`Private name #${s} is not defined.`,InvalidPropertyBindingPattern:"Binding member expression.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:({labelName:s})=>`Label '${s}' is already declared.`,LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingPlugin:({missingPlugin:s})=>`This experimental syntax requires enabling the parser plugin: ${s.map(e=>JSON.stringify(e)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:s})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${s.map(e=>JSON.stringify(e)).join(", ")}.`,MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:({key:s})=>`Duplicate key "${s}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:s})=>`An export name cannot include a lone surrogate, found '\\u${s.toString(16)}'.`,ModuleExportUndefined:({localName:s})=>`Export '${s}' is not defined.`,MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:({identifierName:s})=>`Private names are only allowed in property accesses (\`obj.#${s}\`) or in \`in\` expressions (\`#${s} in obj\`).`,PrivateNameRedeclaration:({identifierName:s})=>`Duplicate private name #${s}.`,RestTrailingComma:"Unexpected trailing comma after rest element.",SloppyFunction:"In non-strict mode code, functions can only be declared at top level or inside a block.",SloppyFunctionAnnexB:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",SourcePhaseImportRequiresDefault:'Only `import source x from "./module"` is valid.',StaticPrototype:"Classes may not have static property named prototype.",SuperCallNotNewExpression:"Cannot use new with super(...).",SuperNotAllowed:"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:"Private fields can't be accessed on super.",TrailingDecorator:"Decorators must be attached to a class element.",UnexpectedArgumentPlaceholder:"Unexpected argument placeholder.",UnexpectedDigitAfterHash:"Unexpected digit after hash token.",UnexpectedImportExport:"'import' and 'export' may only appear at the top level.",UnexpectedKeyword:({keyword:s})=>`Unexpected keyword '${s}'.`,UnexpectedLeadingDecorator:"Leading decorators must be attached to a class declaration.",UnexpectedLexicalDeclaration:"Lexical declaration cannot appear in a single-statement context.",UnexpectedNewTarget:"`new.target` can only be used in functions or class properties.",UnexpectedNumericSeparator:"A numeric separator is only allowed between two digits.",UnexpectedPrivateField:"Unexpected private name.",UnexpectedReservedWord:({reservedWord:s})=>`Unexpected reserved word '${s}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:s,unexpected:e})=>`Unexpected token${e?` '${e}'.`:""}${s?`, expected "${s}"`:""}`,UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",UnexpectedUsingDeclaration:"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement.",UnexpectedVoidPattern:"Unexpected void binding.",UnsupportedDecoratorExport:"A decorated export must export a class declaration.",UnsupportedDefaultExport:"Only expressions, functions or classes are allowed as the `default` export.",UnsupportedImport:"`import` can only be used in `import()` or `import.meta`.",UnsupportedMetaProperty:({target:s,onlyValidPropertyName:e})=>`The only valid meta property for ${s} is ${s}.${e}.`,UnsupportedParameterDecorator:"Decorators cannot be used to decorate parameters.",UnsupportedPropertyDecorator:"Decorators cannot be used to decorate object literal properties.",UnsupportedSuper:"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",UnterminatedComment:"Unterminated comment.",UnterminatedRegExp:"Unterminated regular expression.",UnterminatedString:"Unterminated string constant.",UnterminatedTemplate:"Unterminated template.",UsingDeclarationExport:"Using declaration cannot be exported.",UsingDeclarationHasBindingPattern:"Using declaration cannot have destructuring patterns.",VarRedeclaration:({identifierName:s})=>`Identifier '${s}' has already been declared.`,VoidPatternCatchClauseParam:"A void binding can not be the catch clause parameter. Use `try { ... } catch { ... }` if you want to discard the caught error.",VoidPatternInitializer:"A void binding may not have an initializer.",YieldBindingIdentifier:"Can not use 'yield' as identifier inside a generator.",YieldInParameter:"Yield expression is not allowed in formal parameters.",YieldNotInGeneratorFunction:"'yield' is only allowed within generator functions.",ZeroDigitNumericSeparator:"Numeric separator can not be used after leading 0."},n6={StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:s})=>`Assigning to '${s}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:s})=>`Binding '${s}' in strict mode.`,StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block.",StrictNumericEscape:"The only valid numeric escape in strict mode is '\\0'.",StrictOctalLiteral:"Legacy octal literals are not allowed in strict mode.",StrictWith:"'with' in strict mode."},a6={ParseExpressionEmptyInput:"Unexpected parseExpression() input: The input is empty or contains only comments.",ParseExpressionExpectsEOF:({unexpected:s})=>`Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`${String.fromCodePoint(s)}\`.`},o6=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]),c6={PipeTopicRequiresHackPipes:'Topic references are only supported when using the `"proposal": "hack"` version of the pipeline proposal.',PipeTopicUnbound:"Topic reference is unbound; it must be inside a pipe body.",PipeTopicUnconfiguredToken:({token:s})=>`Invalid topic token ${s}. In order to use ${s} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${s}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:s})=>`Hack-style pipe body cannot be an unparenthesized ${kr({type:s})}; please wrap it in parentheses.`,PipelineUnparenthesized:"Cannot mix binary operator with solo-await F#-style pipeline. Please wrap the pipeline in parentheses."},l6={UnsupportedBind:"Binding should be performed on object property.",UnsupportedBindRHS:"The right-hand side of binding can not be super or import."};function IT(s,e,t){Object.defineProperty(s,e,{enumerable:!1,configurable:!0,value:t})}function u6({toMessage:s,code:e,reasonCode:t,syntaxPlugin:i}){let r=t==="MissingPlugin"||t==="MissingOneOfPlugins";return function n(a,o,c){let l=new SyntaxError;return l.code=e,l.reasonCode=t,l.loc=a,l.pos=o,l.syntaxPlugin=i,r&&(l.missingPlugin=c.missingPlugin),IT(l,"clone",function(f={}){let{line:m,column:x,index:I=o}=f.loc??a;return n(new _e(m,x),I,{...c,...f.details})}),IT(l,"details",c),Object.defineProperty(l,"message",{configurable:!0,get(){let u=`${s(c)} (${a.line}:${a.column})`;return this.message=u,u},set(u){Object.defineProperty(this,"message",{value:u,writable:!0})}}),l}}function it(s,e){if(Array.isArray(s))return i=>it(i,s[0]);let t={};for(let i of Object.keys(s)){let r=s[i],{message:n,...a}=typeof r=="string"?{message:()=>r}:typeof r=="function"?{message:r}:r,o=typeof n=="string"?()=>n:n;t[i]=u6({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:i,toMessage:o,...e?{syntaxPlugin:e}:{},...a})}return t}var E={...it(i6),...it(r6),...it(n6),...it(a6),...it`pipelineOperator`(c6),...it`functionBind`(l6)};function p6(){return{sourceType:"script",sourceFilename:void 0,startIndex:0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,allowYieldOutsideFunction:!1,plugins:[],strictMode:void 0,ranges:!1,locations:!0,tokens:!1,createImportExpressions:!0,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0}}function h6(s){let e=p6();if(s==null)return e;if(s.annexB!=null&&s.annexB!==!1)throw new Error("The `annexB` option can only be set to `false`.");for(let t of Object.keys(e))s[t]!=null&&(e[t]=s[t]);if(e.startLine===1)s.startIndex==null&&e.startColumn>0?e.startIndex=e.startColumn:s.startColumn==null&&e.startIndex>0&&(e.startColumn=e.startIndex);else if(s.startColumn==null||s.startIndex==null)throw new Error("With a `startLine > 1` you must also specify `startIndex` and `startColumn`.");if(e.sourceType==="commonjs"){if(s.allowAwaitOutsideFunction!=null)throw new Error("The `allowAwaitOutsideFunction` option cannot be used with `sourceType: 'commonjs'`.");if(s.allowReturnOutsideFunction!=null)throw new Error("`sourceType: 'commonjs'` implies `allowReturnOutsideFunction: true`, please remove the `allowReturnOutsideFunction` option or use `sourceType: 'script'`.");if(s.allowNewTargetOutsideFunction!=null)throw new Error("`sourceType: 'commonjs'` implies `allowNewTargetOutsideFunction: true`, please remove the `allowNewTargetOutsideFunction` option or use `sourceType: 'script'`.")}return e}function ds(s){let{start:e,end:t}=s.loc;return s.loc.start=new _e(e.line,e.column),s.loc.end=new _e(t.line,t.column),s}var f6=s=>class extends s{createPosition(t){return new _e(t.line,t.column)}parse(){let t=super.parse();return this.optionFlags&512&&(t.tokens=t.tokens.map(ds)),ds(t)}parseRegExpLiteral({pattern:t,flags:i}){let r=null;try{r=new RegExp(t,i)}catch{}let n=this.estreeParseLiteral(r);return n.regex={pattern:t,flags:i},n}parseBigIntLiteral(t){let i;try{i=BigInt(t)}catch{i=null}let r=this.estreeParseLiteral(i);return r.bigint=r.value!==null?String(r.value):t,r}estreeParseLiteral(t){return this.parseLiteral(t,"Literal")}parseStringLiteral(t){return this.estreeParseLiteral(t)}parseNumericLiteral(t){return this.estreeParseLiteral(t)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(t){return this.estreeParseLiteral(t)}estreeParseChainExpression(t,i){let r=this.startNodeAtNode(t);return r.expression=t,this.finishNodeAtNode(r,"ChainExpression",i)}directiveToStmt(t){let i=t.value;delete t.value,this.castNodeTo(i,"Literal"),i.raw=i.extra.raw,i.value=i.extra.expressionValue;let r=this.castNodeTo(t,"ExpressionStatement");return r.expression=i,r.directive=i.extra.rawValue,delete i.extra,r}fillOptionalPropertiesForTSESLint(t){}cloneEstreeStringLiteral(t){let{start:i,end:r,loc:n,range:a,raw:o,value:c}=t,l=Object.create(t.constructor.prototype);return l.type="Literal",l.start=i,l.end=r,l.loc=n,l.range=a,l.raw=o,l.value=c,l}initFunction(t,i){super.initFunction(t,i),t.expression=!1}checkDeclaration(t){t!=null&&this.isObjectProperty(t)?this.checkDeclaration(t.value):super.checkDeclaration(t)}getObjectOrClassMethodParams(t){return t.value.params}isValidDirective(t){return t.type==="ExpressionStatement"&&t.expression.type==="Literal"&&typeof t.expression.value=="string"&&!t.expression.extra?.parenthesized}parseBlockBody(t,i,r,n,a){super.parseBlockBody(t,i,r,n,a);let o=t.directives.map(c=>this.directiveToStmt(c));t.body=o.concat(t.body),delete t.directives}parsePrivateName(){let t=super.parsePrivateName();return this.convertPrivateNameToPrivateIdentifier(t)}convertPrivateNameToPrivateIdentifier(t){let i=super.getPrivateNameSV(t);return delete t.id,t.name=i,this.castNodeTo(t,"PrivateIdentifier")}isPrivateName(t){return t.type==="PrivateIdentifier"}getPrivateNameSV(t){return t.name}parseLiteral(t,i){let r=super.parseLiteral(t,i);return r.raw=r.extra.raw,delete r.extra,r}parseFunctionBody(t,i,r=!1){super.parseFunctionBody(t,i,r),t.expression=t.body.type!=="BlockStatement"}parseMethod(t,i,r,n,a,o,c=!1){let l=this.startNode();l.kind=t.kind,l=super.parseMethod(l,i,r,n,a,o,c),delete l.kind;let{typeParameters:u}=t;u&&(delete t.typeParameters,l.typeParameters=u,this.resetStartLocationFromNode(l,u));let f=this.castNodeTo(l,this.hasPlugin("typescript")&&!l.body?"TSEmptyBodyFunctionExpression":"FunctionExpression");return t.value=f,o==="ClassPrivateMethod"&&(t.computed=!1),this.hasPlugin("typescript")&&t.abstract?(delete t.abstract,this.finishNode(t,"TSAbstractMethodDefinition")):o==="ObjectMethod"?(t.kind==="method"&&(t.kind="init"),t.shorthand=!1,this.finishNode(t,"Property")):this.finishNode(t,"MethodDefinition")}nameIsConstructor(t){return t.type==="Literal"?t.value==="constructor":super.nameIsConstructor(t)}parseClassProperty(...t){let i=super.parseClassProperty(...t);return i.abstract&&this.hasPlugin("typescript")?(delete i.abstract,this.castNodeTo(i,"TSAbstractPropertyDefinition")):this.castNodeTo(i,"PropertyDefinition"),i}parseClassPrivateProperty(...t){let i=super.parseClassPrivateProperty(...t);return i.abstract&&this.hasPlugin("typescript")?this.castNodeTo(i,"TSAbstractPropertyDefinition"):this.castNodeTo(i,"PropertyDefinition"),i.computed=!1,i}parseClassAccessorProperty(t){let i=super.parseClassAccessorProperty(t);return i.abstract&&this.hasPlugin("typescript")?(delete i.abstract,this.castNodeTo(i,"TSAbstractAccessorProperty")):this.castNodeTo(i,"AccessorProperty"),i}parseObjectProperty(t,i,r,n){let a=super.parseObjectProperty(t,i,r,n);return a&&(a.kind="init",this.castNodeTo(a,"Property")),a}finishObjectProperty(t){return t.kind="init",this.finishNode(t,"Property")}isValidLVal(t,i,r,n){return t==="Property"?"value":super.isValidLVal(t,i,r,n)}isAssignable(t,i){return t!=null&&this.isObjectProperty(t)?this.isAssignable(t.value,i):super.isAssignable(t,i)}toAssignable(t,i=!1){if(t!=null&&this.isObjectProperty(t)){let{key:r,value:n}=t;this.isPrivateName(r)&&this.classScope.usePrivateName(this.getPrivateNameSV(r),r.start),this.toAssignable(n,i)}else super.toAssignable(t,i)}toAssignableObjectExpressionProp(t,i,r){t.type==="Property"&&(t.kind==="get"||t.kind==="set")?this.raise(E.PatternHasAccessor,t.key):t.type==="Property"&&t.method?this.raise(E.PatternHasMethod,t.key):super.toAssignableObjectExpressionProp(t,i,r)}finishCallExpression(t,i){let r=super.finishCallExpression(t,i);return r.callee.type==="Import"?(this.castNodeTo(r,"ImportExpression"),r.source=r.arguments[0],r.options=r.arguments[1]??null,delete r.arguments,delete r.callee):r.type==="OptionalCallExpression"?this.castNodeTo(r,"CallExpression"):r.optional=!1,r}parseExport(t,i){let r=this.state.lastTokStartLoc,n=super.parseExport(t,i);switch(n.type){case"ExportAllDeclaration":n.exported=null;break;case"ExportNamedDeclaration":n.specifiers.length===1&&n.specifiers[0].type==="ExportNamespaceSpecifier"&&(this.castNodeTo(n,"ExportAllDeclaration"),n.exported=n.specifiers[0].exported,delete n.specifiers);case"ExportDefaultDeclaration":{let{declaration:a}=n;a?.type==="ClassDeclaration"&&a.decorators?.length>0&&a.start===n.start&&this.resetStartLocation(n,r)}break}return n}stopParseSubscript(t,i){let r=super.stopParseSubscript(t,i);return i.optionalChainMember?this.estreeParseChainExpression(r,t):r}parseMember(t,i,r,n,a){let o=super.parseMember(t,i,r,n,a);return o.type==="OptionalMemberExpression"?this.castNodeTo(o,"MemberExpression"):o.optional=!1,o}isOptionalMemberExpression(t){return t.type==="ChainExpression"?t.expression.type==="MemberExpression":super.isOptionalMemberExpression(t)}hasPropertyAsPrivateName(t){return t.type==="ChainExpression"&&(t=t.expression),super.hasPropertyAsPrivateName(t)}isObjectProperty(t){return t.type==="Property"&&t.kind==="init"&&!t.method}isObjectMethod(t){return t.type==="Property"&&(t.method||t.kind==="get"||t.kind==="set")}castNodeTo(t,i){let r=super.castNodeTo(t,i);return this.fillOptionalPropertiesForTSESLint(r),r}cloneIdentifier(t){let i=super.cloneIdentifier(t);return this.fillOptionalPropertiesForTSESLint(i),i}cloneStringLiteral(t){return t.type==="Literal"?this.cloneEstreeStringLiteral(t):super.cloneStringLiteral(t)}finishNodeAt(t,i,r){return ds(super.finishNodeAt(t,i,r))}finishNodeAtNode(t,i,r){return ds(super.finishNodeAtNode(t,i,r))}finishNode(t,i){let r=super.finishNode(t,i);return this.fillOptionalPropertiesForTSESLint(r),r}resetStartLocation(t,i){super.resetStartLocation(t,i),ds(t)}resetEndLocation(t,i=this.state.lastTokEndLoc){super.resetEndLocation(t,i),ds(t)}},ce=!0,j=!0,Fo=!0,oi=!0,bt=!0,d6=!0,Or=class{label;keyword;beforeExpr;startsExpr;rightAssociative;isLoop;isAssign;prefix;postfix;binop;constructor(e,t={}){this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.rightAssociative=!!t.rightAssociative,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop!=null?t.binop:null}},pc=new Map;function fe(s,e={}){e.keyword=s;let t=Q(s,e);return pc.set(s,t),t}function Ue(s,e){return Q(s,{beforeExpr:ce,binop:e})}var ui=-1,hc=[],fc=[],dc=[],mc=[],yc=[],Tc=[];function Q(s,e={}){return++ui,fc.push(s),dc.push(e.binop??-1),mc.push(e.beforeExpr??!1),yc.push(e.startsExpr??!1),Tc.push(e.prefix??!1),hc.push(new Or(s,e)),ui}function re(s,e={}){return++ui,pc.set(s,ui),fc.push(s),dc.push(e.binop??-1),mc.push(e.beforeExpr??!1),yc.push(e.startsExpr??!1),Tc.push(e.prefix??!1),hc.push(new Or("name",e)),ui}var m6={bracketL:Q("[",{beforeExpr:ce,startsExpr:j}),bracketR:Q("]"),braceL:Q("{",{beforeExpr:ce,startsExpr:j}),braceBarL:Q("{|",{beforeExpr:ce,startsExpr:j}),braceR:Q("}"),braceBarR:Q("|}"),parenL:Q("(",{beforeExpr:ce,startsExpr:j}),parenR:Q(")"),comma:Q(",",{beforeExpr:ce}),semi:Q(";",{beforeExpr:ce}),colon:Q(":",{beforeExpr:ce}),doubleColon:Q("::",{beforeExpr:ce}),dot:Q("."),question:Q("?",{beforeExpr:ce}),questionDot:Q("?."),arrow:Q("=>",{beforeExpr:ce}),template:Q("template"),ellipsis:Q("...",{beforeExpr:ce}),backQuote:Q("`",{startsExpr:j}),dollarBraceL:Q("${",{beforeExpr:ce,startsExpr:j}),templateTail:Q("...`",{startsExpr:j}),templateNonTail:Q("...${",{beforeExpr:ce,startsExpr:j}),at:Q("@"),hash:Q("#",{startsExpr:j}),interpreterDirective:Q("#!..."),eq:Q("=",{beforeExpr:ce,isAssign:oi}),assign:Q("_=",{beforeExpr:ce,isAssign:oi}),slashAssign:Q("_=",{beforeExpr:ce,isAssign:oi}),xorAssign:Q("_=",{beforeExpr:ce,isAssign:oi}),moduloAssign:Q("_=",{beforeExpr:ce,isAssign:oi}),incDec:Q("++/--",{prefix:bt,postfix:d6,startsExpr:j}),bang:Q("!",{beforeExpr:ce,prefix:bt,startsExpr:j}),tilde:Q("~",{beforeExpr:ce,prefix:bt,startsExpr:j}),doubleCaret:Q("^^",{startsExpr:j}),doubleAt:Q("@@",{startsExpr:j}),pipeline:Ue("|>",0),nullishCoalescing:Ue("??",1),logicalOR:Ue("||",1),logicalAND:Ue("&&",2),bitwiseOR:Ue("|",3),bitwiseXOR:Ue("^",4),bitwiseAND:Ue("&",5),equality:Ue("==/!=/===/!==",6),lt:Ue("</>/<=/>=",7),gt:Ue("</>/<=/>=",7),relational:Ue("</>/<=/>=",7),bitShift:Ue("<</>>/>>>",8),bitShiftL:Ue("<</>>/>>>",8),bitShiftR:Ue("<</>>/>>>",8),plusMin:Q("+/-",{beforeExpr:ce,binop:9,prefix:bt,startsExpr:j}),modulo:Q("%",{binop:10,startsExpr:j}),star:Q("*",{binop:10}),slash:Ue("/",10),exponent:Q("**",{beforeExpr:ce,binop:11,rightAssociative:!0}),_in:fe("in",{beforeExpr:ce,binop:7}),_instanceof:fe("instanceof",{beforeExpr:ce,binop:7}),_break:fe("break"),_case:fe("case",{beforeExpr:ce}),_catch:fe("catch"),_continue:fe("continue"),_debugger:fe("debugger"),_default:fe("default",{beforeExpr:ce}),_else:fe("else",{beforeExpr:ce}),_finally:fe("finally"),_function:fe("function",{startsExpr:j}),_if:fe("if"),_return:fe("return",{beforeExpr:ce}),_switch:fe("switch"),_throw:fe("throw",{beforeExpr:ce,prefix:bt,startsExpr:j}),_try:fe("try"),_var:fe("var"),_const:fe("const"),_with:fe("with"),_new:fe("new",{beforeExpr:ce,startsExpr:j}),_this:fe("this",{startsExpr:j}),_super:fe("super",{startsExpr:j}),_class:fe("class",{startsExpr:j}),_extends:fe("extends",{beforeExpr:ce}),_export:fe("export"),_import:fe("import",{startsExpr:j}),_null:fe("null",{startsExpr:j}),_true:fe("true",{startsExpr:j}),_false:fe("false",{startsExpr:j}),_typeof:fe("typeof",{beforeExpr:ce,prefix:bt,startsExpr:j}),_void:fe("void",{beforeExpr:ce,prefix:bt,startsExpr:j}),_delete:fe("delete",{beforeExpr:ce,prefix:bt,startsExpr:j}),_do:fe("do",{isLoop:Fo,beforeExpr:ce}),_for:fe("for",{isLoop:Fo}),_while:fe("while",{isLoop:Fo}),_as:re("as",{startsExpr:j}),_assert:re("assert",{startsExpr:j}),_async:re("async",{startsExpr:j}),_await:re("await",{startsExpr:j}),_defer:re("defer",{startsExpr:j}),_from:re("from",{startsExpr:j}),_get:re("get",{startsExpr:j}),_let:re("let",{startsExpr:j}),_meta:re("meta",{startsExpr:j}),_of:re("of",{startsExpr:j}),_sent:re("sent",{startsExpr:j}),_set:re("set",{startsExpr:j}),_source:re("source",{startsExpr:j}),_static:re("static",{startsExpr:j}),_using:re("using",{startsExpr:j}),_yield:re("yield",{startsExpr:j}),_asserts:re("asserts",{startsExpr:j}),_checks:re("checks",{startsExpr:j}),_exports:re("exports",{startsExpr:j}),_global:re("global",{startsExpr:j}),_implements:re("implements",{startsExpr:j}),_intrinsic:re("intrinsic",{startsExpr:j}),_infer:re("infer",{startsExpr:j}),_is:re("is",{startsExpr:j}),_mixins:re("mixins",{startsExpr:j}),_proto:re("proto",{startsExpr:j}),_require:re("require",{startsExpr:j}),_satisfies:re("satisfies",{startsExpr:j}),_keyof:re("keyof",{startsExpr:j}),_readonly:re("readonly",{startsExpr:j}),_unique:re("unique",{startsExpr:j}),_abstract:re("abstract",{startsExpr:j}),_declare:re("declare",{startsExpr:j}),_enum:re("enum",{startsExpr:j}),_module:re("module",{startsExpr:j}),_namespace:re("namespace",{startsExpr:j}),_interface:re("interface",{startsExpr:j}),_type:re("type",{startsExpr:j}),_opaque:re("opaque",{startsExpr:j}),name:Q("name",{startsExpr:j}),placeholder:Q("%%",{startsExpr:j}),string:Q("string",{startsExpr:j}),num:Q("num",{startsExpr:j}),bigint:Q("bigint",{startsExpr:j}),regexp:Q("regexp",{startsExpr:j}),privateName:Q("#name",{startsExpr:j}),eof:Q("eof"),jsxName:Q("jsxName"),jsxText:Q("jsxText",{beforeExpr:ce}),jsxTagStart:Q("jsxTagStart",{startsExpr:j}),jsxTagEnd:Q("jsxTagEnd")};function Te(s){return s>=89&&s<=129}function y6(s){return s<=88}function Je(s){return s>=54&&s<=129}function KT(s){return s>=54&&s<=132}function T6(s){return mc[s]}function li(s){return yc[s]}function S6(s){return s>=25&&s<=29}function wT(s){return s>=125&&s<=127}function x6(s){return s>=86&&s<=88}function Sc(s){return s>=54&&s<=88}function NT(s){return s>=35&&s<=55}function g6(s){return s===30}function P6(s){return Tc[s]}function b6(s){return s>=117&&s<=119}function E6(s){return s>=120&&s<=126}function Ct(s){return fc[s]}function Dr(s){return dc[s]}function A6(s){return s===53}function Vo(s){return s>=20&&s<=21}function qT(s){return hc[s]}var ms=class{constructor(e,t){this.token=e,this.preserveSpace=!!t}token;preserveSpace},Ee={brace:new ms("{"),j_oTag:new ms("<tag"),j_cTag:new ms("</tag"),j_expr:new ms("<tag>...</tag>",!0)},vT=/[\p{ID_Start}\u0558\u058b\u058c\u088f\u0c5c\u0cdc\u208f\u209d-\u209f\ua7ce\ua7cf\ua7d2\ua7d4\ua7dd\ua7e2\ua7f1\uab6c\uab6d]/u,kT=/[\p{ID_Continue}\u0558\u058b\u058c\u088f\u0c5c\u0cdc\u208f\u209d-\u209f\ua7ce\ua7cf\ua7d2\ua7d4\ua7dd\ua7e2\ua7f1\uab6c\uab6d\u05c8\u05c9\u0b53\u0b54\u1acf-\u1af0]/u,$T=[1979,4,385,25,1388,2,18,21,3100,0,678,43,22,0,1662,0,6,10,209,310,18458,24,3,24,287,4,6146,7,1239,4,47,23,96,114,14,913,15,50,8017,5,64,0,9534,0,2169,5,7,86,15,6,55,50,1729,30,2,2,2,1,2,6,3,4,10,1,53307,5,223,0,5764,11,21763,4297,39815,11327],C6=[3787,4,33,11,3173,7,633,9,7,0,45879,1,296,2,9,1,3,0,33,1,5218,0,3,0,8,1,6,0];function Ko(s,e){let t=65536;for(let i=0,r=e.length;i<r;i+=2){if(t+=e[i],t>s)return!1;if(t+=e[i+1],t>=s)return!0}return!1}function lt(s){return s<65?s===36:s<=90?!0:s<97?s===95:s<=122?!0:s<=65535?s>=170&&vT.test(String.fromCharCode(s)):!isNaN(s)&&s<=1114111&&(vT.test(String.fromCodePoint(s))||Ko(s,$T))}function Rt(s){return s<48?s===36:s<58?!0:s<65?!1:s<=90?!0:s<97?s===95:s<=122?!0:s<=65535?s>=170&&kT.test(String.fromCharCode(s)):!isNaN(s)&&s<=1114111&&(kT.test(String.fromCodePoint(s))||Ko(s,$T)||Ko(s,C6))}var xc={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},I6=new Set(xc.keyword),w6=new Set(xc.strict),N6=new Set(xc.strictBind);function JT(s,e){return e&&s==="await"||s==="enum"}function XT(s,e){return JT(s,e)||w6.has(s)}function WT(s){return N6.has(s)}function zT(s,e){return XT(s,e)||WT(s)}function v6(s){return I6.has(s)}function k6(s,e,t){return s===64&&e===64&&lt(t)}var D6=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete","implements","interface","let","package","private","protected","public","static","yield","eval","arguments","enum","await"]);function L6(s){return D6.has(s)}var pi=class{flags=0;names=new Map;firstLexicalName="";constructor(e){this.flags=e}},hi=class{parser;scopeStack=[];inModule;undefinedExports=new Map;constructor(e,t){this.parser=e,this.inModule=t}get inTopLevel(){return(this.currentScope().flags&1)>0}get inFunction(){return(this.currentVarScopeFlags()&2)>0}get allowSuper(){return(this.currentThisScopeFlags()&16)>0}get allowDirectSuper(){return(this.currentThisScopeFlags()&32)>0}get allowNewTarget(){return(this.currentThisScopeFlags()&512)>0}get inClass(){return(this.currentThisScopeFlags()&64)>0}get inClassAndNotInNonArrowFunction(){let e=this.currentThisScopeFlags();return(e&64)>0&&(e&2)===0}get inStaticBlock(){for(let e=this.scopeStack.length-1;;e--){let{flags:t}=this.scopeStack[e];if(t&128)return!0;if(t&3779)return!1}}get inNonArrowFunction(){return(this.currentThisScopeFlags()&2)>0}get inBareCaseStatement(){return(this.currentScope().flags&256)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(e){return new pi(e)}enter(e){this.scopeStack.push(this.createScope(e))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(e){return!!(e.flags&130||!this.parser.inModule&&e.flags&1)}declareName(e,t,i){let r=this.currentScope();if(t&8||t&16){this.checkRedeclarationInScope(r,e,t,i);let n=r.names.get(e)||0;t&16?n=n|4:(r.firstLexicalName||(r.firstLexicalName=e),n=n|2),r.names.set(e,n),t&8&&this.maybeExportDefined(r,e)}else if(t&4)for(let n=this.scopeStack.length-1;n>=0&&(r=this.scopeStack[n],this.checkRedeclarationInScope(r,e,t,i),r.names.set(e,(r.names.get(e)||0)|1),this.maybeExportDefined(r,e),!(r.flags&3715));--n);this.parser.inModule&&r.flags&1&&this.undefinedExports.delete(e)}maybeExportDefined(e,t){this.parser.inModule&&e.flags&1&&this.undefinedExports.delete(t)}checkRedeclarationInScope(e,t,i,r){this.isRedeclaredInScope(e,t,i)&&this.parser.raise(E.VarRedeclaration,r,{identifierName:t})}isRedeclaredInScope(e,t,i){if(!(i&1))return!1;if(i&8)return e.names.has(t);let r=e.names.get(t)||0;return i&16?(r&2)>0||!this.treatFunctionsAsVarInScope(e)&&(r&1)>0:(r&2)>0&&!(e.flags&8&&e.firstLexicalName===t)||!this.treatFunctionsAsVarInScope(e)&&(r&4)>0}checkLocalExport(e){let{name:t}=e;this.scopeStack[0].names.has(t)||this.undefinedExports.set(t,e.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let e=this.scopeStack.length-1;;e--){let{flags:t}=this.scopeStack[e];if(t&3715)return t}}currentThisScopeFlags(){for(let e=this.scopeStack.length-1;;e--){let{flags:t}=this.scopeStack[e];if(t&3779&&!(t&4))return t}}},qo=class extends pi{declareFunctions=new Set},$o=class extends hi{createScope(e){return new qo(e)}declareName(e,t,i){let r=this.currentScope();if(t&2048){this.checkRedeclarationInScope(r,e,t,i),this.maybeExportDefined(r,e),r.declareFunctions.add(e);return}super.declareName(e,t,i)}isRedeclaredInScope(e,t,i){if(super.isRedeclaredInScope(e,t,i))return!0;if(i&2048&&!e.declareFunctions.has(t)){let r=e.names.get(t);return(r&4)>0||(r&2)>0}return!1}checkLocalExport(e){this.scopeStack[0].declareFunctions.has(e.name)||super.checkLocalExport(e)}},O6=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),M6={AmbiguousConditionalArrow:"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",AmbiguousDeclareModuleKind:"Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.",AssignReservedType:({reservedType:s})=>`Cannot overwrite reserved type ${s}.`,DeclareClassElement:"The `declare` modifier can only appear on class fields.",DeclareClassFieldInitializer:"Initializers are not allowed in fields with the `declare` modifier.",DuplicateDeclareModuleExports:"Duplicate `declare module.exports` statement.",EnumBooleanMemberNotInitialized:({memberName:s,enumName:e})=>`Boolean enum members need to be initialized. Use either \`${s} = true,\` or \`${s} = false,\` in enum \`${e}\`.`,EnumDuplicateMemberName:({memberName:s,enumName:e})=>`Enum member names need to be unique, but the name \`${s}\` has already been used before in enum \`${e}\`.`,EnumInconsistentMemberValues:({enumName:s})=>`Enum \`${s}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:s,enumName:e})=>`Enum type \`${s}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${e}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:s})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${s}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:s,memberName:e,explicitType:t})=>`Enum \`${s}\` has type \`${t}\`, so the initializer of \`${e}\` needs to be a ${t} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:s,memberName:e})=>`Symbol enum members cannot be initialized. Use \`${e},\` in enum \`${s}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:s,memberName:e})=>`The enum member initializer for \`${e}\` needs to be a literal (either a boolean, number, or string) in enum \`${s}\`.`,EnumInvalidMemberName:({enumName:s,memberName:e,suggestion:t})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${e}\`, consider using \`${t}\`, in enum \`${s}\`.`,EnumNumberMemberNotInitialized:({enumName:s,memberName:e})=>`Number enum members need to be initialized, e.g. \`${e} = 1\` in enum \`${s}\`.`,EnumStringMemberInconsistentlyInitialized:({enumName:s})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${s}\`.`,GetterMayNotHaveThisParam:"A getter cannot have a `this` parameter.",ImportTypeShorthandOnlyInPureImport:"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",InexactInsideExact:"Explicit inexact syntax cannot appear inside an explicit exact object type.",InexactInsideNonObject:"Explicit inexact syntax cannot appear in class or interface definitions.",InexactVariance:"Explicit inexact syntax cannot have variance.",InvalidNonTypeImportInDeclareModule:"Imports within a `declare module` body must always be `import type` or `import typeof`.",MissingTypeParamDefault:"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",NestedDeclareModule:"`declare module` cannot be used inside another `declare module`.",NestedFlowComment:"Cannot have a flow comment inside another flow comment.",PatternIsOptional:{message:"A binding pattern parameter cannot be optional in an implementation signature."},SetterMayNotHaveThisParam:"A setter cannot have a `this` parameter.",SpreadVariance:"Spread properties cannot have variance.",ThisParamAnnotationRequired:"A type annotation is required for the `this` parameter.",ThisParamBannedInConstructor:"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",ThisParamMayNotBeOptional:"The `this` parameter cannot be optional.",ThisParamMustBeFirst:"The `this` parameter must be the first function parameter.",ThisParamNoDefault:"The `this` parameter may not have a default value.",TypeBeforeInitializer:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeCastInPattern:"The type cast expression is expected to be wrapped with parenthesis.",UnexpectedExplicitInexactInObject:"Explicit inexact syntax must appear at the end of an inexact object.",UnexpectedReservedType:({reservedType:s})=>`Unexpected reserved type ${s}.`,UnexpectedReservedUnderscore:"`_` is only allowed as a type argument to call or new.",UnexpectedSpaceBetweenModuloChecks:"Spaces between `%` and `checks` are not allowed here.",UnexpectedSpreadType:"Spread operator cannot appear in class or interface definitions.",UnexpectedSubtractionOperand:'Unexpected token, expected "number" or "bigint".',UnexpectedTokenAfterTypeParameter:"Expected an arrow function after this type parameter declaration.",UnexpectedTypeParameterBeforeAsyncArrowFunction:"Type parameters must come after the async keyword, e.g. instead of `<T> async () => {}`, use `async <T>() => {}`.",UnsupportedDeclareExportKind:({unsupportedExportKind:s,suggestion:e})=>`\`declare export ${s}\` is not supported. Use \`${e}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."},Y=it`flow`(M6);function F6(s){return s.type==="DeclareExportAllDeclaration"||s.type==="DeclareExportDeclaration"&&(!s.declaration||s.declaration.type!=="TypeAlias"&&s.declaration.type!=="InterfaceDeclaration")}function DT(s){return s.importKind==="type"||s.importKind==="typeof"}var B6={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};function _6(s,e){let t=[],i=[];for(let r=0;r<s.length;r++)(e(s[r],r,s)?t:i).push(s[r]);return[t,i]}var j6=/\*?\s*@((?:no)?flow)\b/,R6=s=>class extends s{flowPragma=void 0;getScopeHandler(){return $o}shouldParseTypes(){return this.getPluginOption("flow","all")||this.flowPragma==="flow"}finishToken(t,i){t!==130&&t!==9&&t!==24&&this.flowPragma===void 0&&(this.flowPragma=null),super.finishToken(t,i)}addComment(t){if(this.flowPragma===void 0){let i=j6.exec(t.value);if(i)if(i[1]==="flow")this.flowPragma="flow";else if(i[1]==="noflow")this.flowPragma="noflow";else throw new Error("Unexpected flow pragma")}super.addComment(t)}flowParseTypeInitialiser(t){let i=this.state.inType;this.state.inType=!0,this.expect(t||10);let r=this.flowParseType();return this.state.inType=i,r}flowParsePredicate(){let t=this.startNode(),i=this.state.startLoc;return this.next(),this.expectContextual(106),this.state.lastTokStartLoc.index>i.index+1&&this.raise(Y.UnexpectedSpaceBetweenModuloChecks,i),this.eat(6)?(t.value=super.parseExpression(),this.expect(7),this.finishNode(t,"DeclaredPredicate")):this.finishNode(t,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(t){let i=this.state.inType;this.state.inType=!0,this.expect(10);let r=null,n=null;return t&&this.match(50)?(this.state.inType=i,n=this.flowParsePredicate()):(r=this.flowParseType(),this.state.inType=i,this.match(50)&&(n=this.flowParsePredicate())),[r,n]}flowParseDeclareClass(t){return this.next(),this.flowParseInterfaceish(t,!0),this.finishNode(t,"DeclareClass")}flowParseDeclareFunction(t){this.next();let i=t.id=this.parseIdentifier(),r=this.startNode(),n=this.startNode();this.match(43)?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,this.expect(6);let a=this.flowParseFunctionTypeParams();return r.params=a.params,r.rest=a.rest,r.this=a._this,this.expect(7),[r.returnType,t.predicate]=this.flowParseTypeAndPredicateInitialiser(!1),n.typeAnnotation=this.finishNode(r,"FunctionTypeAnnotation"),i.typeAnnotation=this.finishNode(n,"TypeAnnotation"),this.resetEndLocation(i),this.semicolon(),this.scope.declareName(t.id.name,2048,t.id.start),this.finishNode(t,"DeclareFunction")}flowParseDeclare(t,i){if(this.match(76))return this.flowParseDeclareClass(t);if(this.match(64))return this.flowParseDeclareFunction(t);if(this.match(70))return this.flowParseDeclareVariable(t);if(this.eatContextual(123))return this.match(12)?this.flowParseDeclareModuleExports(t):(i&&this.raise(Y.NestedDeclareModule,this.state.lastTokStartLoc),this.flowParseDeclareModule(t));if(this.isContextual(126))return this.flowParseDeclareTypeAlias(t);if(this.isContextual(127))return this.flowParseDeclareOpaqueType(t);if(this.isContextual(125))return this.flowParseDeclareInterface(t);if(this.match(78))return this.flowParseDeclareExportDeclaration(t,i);throw this.unexpected()}flowParseDeclareVariable(t){return this.next(),t.id=this.flowParseTypeAnnotatableIdentifier(),this.scope.declareName(t.id.name,5,t.id.start),this.semicolon(),this.finishNode(t,"DeclareVariable")}flowParseDeclareModule(t){this.scope.enter(0),this.match(130)?t.id=super.parseExprAtom():t.id=this.parseIdentifier();let i=this.startNode(),r=i.body=[];for(this.expect(2);!this.match(4);){let o=this.startNode();this.match(79)?(this.next(),!this.isContextual(126)&&!this.match(83)&&this.raise(Y.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc),r.push(super.parseImport(o))):(this.expectContextual(121,Y.UnsupportedStatementInDeclareModule),r.push(this.flowParseDeclare(o,!0)))}this.scope.exit(),this.expect(4),t.body=this.finishNode(i,"BlockStatement");let n=null,a=!1;return r.forEach(o=>{F6(o)?(n==="CommonJS"&&this.raise(Y.AmbiguousDeclareModuleKind,o),n="ES"):o.type==="DeclareModuleExports"&&(a&&this.raise(Y.DuplicateDeclareModuleExports,o),n==="ES"&&this.raise(Y.AmbiguousDeclareModuleKind,o),n="CommonJS",a=!0)}),t.kind=n||"CommonJS",this.finishNode(t,"DeclareModule")}flowParseDeclareExportDeclaration(t,i){if(this.expect(78),this.eat(61))return this.match(64)||this.match(76)?t.declaration=this.flowParseDeclare(this.startNode()):(t.declaration=this.flowParseType(),this.semicolon()),t.default=!0,this.finishNode(t,"DeclareExportDeclaration");if(this.match(71)||this.isLet()||(this.isContextual(126)||this.isContextual(125))&&!i){let r=this.state.value;throw this.raise(Y.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:r,suggestion:B6[r]})}if(this.match(70)||this.match(64)||this.match(76)||this.isContextual(127))return t.declaration=this.flowParseDeclare(this.startNode()),t.default=!1,this.finishNode(t,"DeclareExportDeclaration");if(this.match(51)||this.match(2)||this.isContextual(125)||this.isContextual(126)||this.isContextual(127)){let r=this.parseExport(t,null);return r.type==="ExportNamedDeclaration"?(r.default=!1,delete r.exportKind,this.castNodeTo(r,"DeclareExportDeclaration")):this.castNodeTo(r,"DeclareExportAllDeclaration")}throw this.unexpected()}flowParseDeclareModuleExports(t){return this.next(),this.expectContextual(107),t.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(t,"DeclareModuleExports")}flowParseDeclareTypeAlias(t){this.next();let i=this.flowParseTypeAlias(t);return this.castNodeTo(i,"DeclareTypeAlias"),i}flowParseDeclareOpaqueType(t){return this.next(),this.flowParseOpaqueType(t,!0)}flowParseDeclareInterface(t){return this.next(),this.flowParseInterfaceish(t,!1),this.finishNode(t,"DeclareInterface")}flowParseInterfaceish(t,i){if(t.id=this.flowParseRestrictedIdentifier(!i,!0),this.scope.declareName(t.id.name,i?17:8201,t.id.start),this.match(43)?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.extends=[],this.eat(77))do t.extends.push(this.flowParseInterfaceExtends());while(!i&&this.eat(8));if(i){let r=[],n=[];if(this.eatContextual(113))do n.push(this.flowParseInterfaceExtends());while(this.eat(8));if(this.eatContextual(109))do r.push(this.flowParseClassImplements());while(this.eat(8));t.implements=r,t.mixins=n}t.body=this.flowParseObjectType({allowStatic:i,allowExact:!1,allowSpread:!1,allowProto:i,allowInexact:!1})}flowParseInterfaceExtends(){let t=this.startNode();return t.id=this.flowParseQualifiedTypeIdentifier(),this.match(43)?t.typeParameters=this.flowParseTypeParameterInstantiation():t.typeParameters=null,this.finishNode(t,"InterfaceExtends")}flowParseInterface(t){return this.flowParseInterfaceish(t,!1),this.finishNode(t,"InterfaceDeclaration")}checkNotUnderscore(t){t==="_"&&this.raise(Y.UnexpectedReservedUnderscore,this.state.startLoc)}checkReservedType(t,i,r){O6.has(t)&&this.raise(r?Y.AssignReservedType:Y.UnexpectedReservedType,i,{reservedType:t})}flowParseRestrictedIdentifierName(t,i){return this.checkReservedType(this.state.value,this.state.startLoc,i),this.parseIdentifierName(t)}flowParseRestrictedIdentifier(t,i){let r=this.startNode(),n=this.flowParseRestrictedIdentifierName(t,i);return this.createIdentifier(r,n)}flowParseTypeAlias(t){return t.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(t.id.name,8201,t.id.start),this.match(43)?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.right=this.flowParseTypeInitialiser(25),this.semicolon(),this.finishNode(t,"TypeAlias")}flowParseOpaqueType(t,i){return this.expectContextual(126),t.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(t.id.name,8201,t.id.start),this.match(43)?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.supertype=null,this.match(10)&&(t.supertype=this.flowParseTypeInitialiser(10)),t.impltype=null,i||(t.impltype=this.flowParseTypeInitialiser(25)),this.semicolon(),this.finishNode(t,i?"DeclareOpaqueType":"OpaqueType")}flowParseTypeParameterBound(){if(this.match(10)||this.isContextual(77)){let t=this.startNode();return this.next(),t.typeAnnotation=this.flowParseType(),this.finishNode(t,"TypeAnnotation")}}flowParseTypeParameter(t=!1){let i=this.state.startLoc,r=this.startNode(),n=this.flowParseVariance();return r.name=this.flowParseRestrictedIdentifierName(),r.variance=n,r.bound=this.flowParseTypeParameterBound(),this.match(25)?(this.eat(25),r.default=this.flowParseType()):t&&this.raise(Y.MissingTypeParamDefault,i),this.finishNode(r,"TypeParameter")}flowParseTypeParameterDeclaration(){let t=this.state.inType,i=this.startNode();i.params=[],this.state.inType=!0,this.match(43)||this.match(138)?this.next():this.unexpected();let r=!1;do{let n=this.flowParseTypeParameter(r);i.params.push(n),n.default&&(r=!0),this.match(44)||this.expect(8)}while(!this.match(44));return this.expect(44),this.state.inType=t,this.finishNode(i,"TypeParameterDeclaration")}flowInTopLevelContext(t){if(this.curContext()!==Ee.brace){let i=this.state.context;this.state.context=[i[0]];try{return t()}finally{this.state.context=i}}else return t()}flowParseTypeParameterInstantiationInExpression(){if(this.reScan_lt()===43)return this.flowParseTypeParameterInstantiation()}flowParseTypeParameterInstantiation(){let t=this.startNode(),i=this.state.inType;return this.state.inType=!0,t.params=[],this.flowInTopLevelContext(()=>{this.expect(43);let r=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(44);)t.params.push(this.flowParseType()),this.match(44)||this.expect(8);this.state.noAnonFunctionType=r}),this.state.inType=i,!this.state.inType&&this.curContext()===Ee.brace&&this.reScan_lt_gt(),this.expect(44),this.finishNode(t,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){if(this.reScan_lt()!==43)return null;let t=this.startNode(),i=this.state.inType;for(t.params=[],this.state.inType=!0,this.expect(43);!this.match(44);)t.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(44)||this.expect(8);return this.expect(44),this.state.inType=i,this.finishNode(t,"TypeParameterInstantiation")}flowParseInterfaceType(){let t=this.startNode();if(this.expectContextual(125),t.extends=[],this.eat(77))do t.extends.push(this.flowParseInterfaceExtends());while(this.eat(8));return t.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(t,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(131)||this.match(130)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(t,i,r){return t.static=i,this.lookahead().type===10?(t.id=this.parseIdentifier(!0),t.key=this.flowParseTypeInitialiser()):(t.id=null,t.key=this.flowParseType()),this.expect(1),t.value=this.flowParseTypeInitialiser(),t.variance=r,this.finishNode(t,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(t,i){return t.static=i,t.id=this.parseIdentifier(!0),this.expect(1),this.expect(1),this.match(43)||this.match(6)?(t.method=!0,t.optional=!1,t.value=this.flowParseObjectTypeMethodish(this.startNodeAtNode(t))):(t.method=!1,this.eat(13)&&(t.optional=!0),t.value=this.flowParseTypeInitialiser()),this.finishNode(t,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(t){for(t.params=[],t.rest=null,t.typeParameters=null,t.this=null,this.match(43)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(6),this.match(74)&&(t.this=this.flowParseFunctionTypeParam(!0),t.this.name=null,this.match(7)||this.expect(8));!this.match(7)&&!this.match(17);)t.params.push(this.flowParseFunctionTypeParam(!1)),this.match(7)||this.expect(8);return this.eat(17)&&(t.rest=this.flowParseFunctionTypeParam(!1)),this.expect(7),t.returnType=this.flowParseTypeInitialiser(),this.finishNode(t,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(t,i){let r=this.startNode();return t.static=i,t.value=this.flowParseObjectTypeMethodish(r),this.finishNode(t,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:t,allowExact:i,allowSpread:r,allowProto:n,allowInexact:a}){let o=this.state.inType;this.state.inType=!0;let c=this.startNode();c.callProperties=[],c.properties=[],c.indexers=[],c.internalSlots=[];let l,u,f=!1;for(i&&this.match(3)?(this.expect(3),l=5,u=!0):(this.expect(2),l=4,u=!1),c.exact=u;!this.match(l);){let x=!1,I=null,L=null,N=this.startNode();if(n&&this.isContextual(114)){let v=this.lookahead();v.type!==10&&v.type!==13&&(this.next(),I=this.state.startLoc,t=!1)}if(t&&this.isContextual(102)){let v=this.lookahead();v.type!==10&&v.type!==13&&(this.next(),x=!0)}let w=this.flowParseVariance();if(this.eat(0))I!=null&&this.unexpected(I),this.eat(0)?(w&&this.unexpected(w.start),c.internalSlots.push(this.flowParseObjectTypeInternalSlot(N,x))):c.indexers.push(this.flowParseObjectTypeIndexer(N,x,w));else if(this.match(6)||this.match(43))I!=null&&this.unexpected(I),w&&this.unexpected(w.start),c.callProperties.push(this.flowParseObjectTypeCallProperty(N,x));else{let v="init";if(this.isContextual(95)||this.isContextual(100)){let V=this.lookahead();KT(V.type)&&(v=this.state.value,this.next())}let z=this.flowParseObjectTypeProperty(N,x,I,w,v,r,a??!u);z===null?(f=!0,L=this.state.lastTokStartLoc):c.properties.push(z)}this.flowObjectTypeSemicolon(),L&&!this.match(4)&&!this.match(5)&&this.raise(Y.UnexpectedExplicitInexactInObject,L)}this.expect(l),r&&(c.inexact=f);let m=this.finishNode(c,"ObjectTypeAnnotation");return this.state.inType=o,m}flowParseObjectTypeProperty(t,i,r,n,a,o,c){if(this.eat(17))return this.match(8)||this.match(9)||this.match(4)||this.match(5)?(o?c||this.raise(Y.InexactInsideExact,this.state.lastTokStartLoc):this.raise(Y.InexactInsideNonObject,this.state.lastTokStartLoc),n&&this.raise(Y.InexactVariance,n),null):(o||this.raise(Y.UnexpectedSpreadType,this.state.lastTokStartLoc),r!=null&&this.unexpected(r),n&&this.raise(Y.SpreadVariance,n),t.argument=this.flowParseType(),this.finishNode(t,"ObjectTypeSpreadProperty"));{t.key=this.flowParseObjectPropertyKey(),t.static=i,t.proto=r!=null,t.kind=a;let l=!1;return this.match(43)||this.match(6)?(t.method=!0,r!=null&&this.unexpected(r),n&&this.unexpected(n.start),t.value=this.flowParseObjectTypeMethodish(this.startNodeAtNode(t)),a==="get"||a==="set"?this.flowCheckGetterSetterParams(t):!i&&!o&&t.key.name==="constructor"&&t.value.this&&this.raise(Y.ThisParamBannedInConstructor,t.value.this)):(a!=="init"&&this.unexpected(),t.method=!1,this.eat(13)&&(l=!0),t.value=this.flowParseTypeInitialiser(),t.variance=n),t.optional=l,this.finishNode(t,"ObjectTypeProperty")}}flowCheckGetterSetterParams(t){let i=t.kind==="get"?0:1,r=t.value,n=r.params.length+(r.rest?1:0);r.this&&this.raise(t.kind==="get"?Y.GetterMayNotHaveThisParam:Y.SetterMayNotHaveThisParam,r.this),n!==i&&this.raise(t.kind==="get"?E.BadGetterArity:E.BadSetterArity,t),t.kind==="set"&&r.rest&&this.raise(E.BadSetterRestParameter,t)}flowObjectTypeSemicolon(){!this.eat(9)&&!this.eat(8)&&!this.match(4)&&!this.match(5)&&this.unexpected()}flowParseQualifiedTypeIdentifier(t,i){t??=this.state.startLoc;let r=i||this.flowParseRestrictedIdentifier(!0);for(;this.eat(12);){let n=this.startNodeAt(t);n.qualification=r,n.id=this.flowParseRestrictedIdentifier(!0),r=this.finishNode(n,"QualifiedTypeIdentifier")}return r}flowParseGenericType(t,i){let r=this.startNodeAt(t);return r.typeParameters=null,r.id=this.flowParseQualifiedTypeIdentifier(t,i),this.match(43)&&(r.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(r,"GenericTypeAnnotation")}flowParseTypeofType(){let t=this.startNode();return this.expect(83),t.argument=this.flowParsePrimaryType(),this.finishNode(t,"TypeofTypeAnnotation")}flowParseTupleType(){let t=this.startNode();for(t.types=[],this.expect(0);this.state.pos<this.length&&!this.match(1)&&(t.types.push(this.flowParseType()),!this.match(1));)this.expect(8);return this.expect(1),this.finishNode(t,"TupleTypeAnnotation")}flowParseFunctionTypeParam(t){let i=null,r=!1,n,a=this.startNode(),o=this.lookahead(),c=this.state.type===74;return o.type===10||o.type===13?(c&&!t&&this.raise(Y.ThisParamMustBeFirst,a),i=this.parseIdentifier(c),this.eat(13)&&(r=!0,c&&this.raise(Y.ThisParamMayNotBeOptional,a)),n=this.flowParseTypeInitialiser()):n=this.flowParseType(),a.name=i,a.optional=r,a.typeAnnotation=n,this.finishNode(a,"FunctionTypeParam")}reinterpretTypeAsFunctionTypeParam(t){let i=this.startNodeAtNode(t);return i.name=null,i.optional=!1,i.typeAnnotation=t,this.finishNode(i,"FunctionTypeParam")}flowParseFunctionTypeParams(t=[]){let i=null,r=null;for(this.match(74)&&(r=this.flowParseFunctionTypeParam(!0),r.name=null,this.match(7)||this.expect(8));!this.match(7)&&!this.match(17);)t.push(this.flowParseFunctionTypeParam(!1)),this.match(7)||this.expect(8);return this.eat(17)&&(i=this.flowParseFunctionTypeParam(!1)),{params:t,rest:i,_this:r}}flowIdentToTypeAnnotation(t,i,r){switch(r.name){case"any":return this.finishNode(i,"AnyTypeAnnotation");case"bool":case"boolean":return this.finishNode(i,"BooleanTypeAnnotation");case"mixed":return this.finishNode(i,"MixedTypeAnnotation");case"empty":return this.finishNode(i,"EmptyTypeAnnotation");case"number":return this.finishNode(i,"NumberTypeAnnotation");case"string":return this.finishNode(i,"StringTypeAnnotation");case"symbol":return this.finishNode(i,"SymbolTypeAnnotation");default:return this.checkNotUnderscore(r.name),this.flowParseGenericType(t,r)}}flowParsePrimaryType(){let t=this.state.startLoc,i=this.startNode(),r,n,a=!1,o=this.state.noAnonFunctionType;switch(this.state.type){case 2:return this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!0,allowProto:!1,allowInexact:!0});case 3:return this.flowParseObjectType({allowStatic:!1,allowExact:!0,allowSpread:!0,allowProto:!1,allowInexact:!1});case 0:return this.state.noAnonFunctionType=!1,n=this.flowParseTupleType(),this.state.noAnonFunctionType=o,n;case 43:{let c=this.startNode();return c.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(6),r=this.flowParseFunctionTypeParams(),c.params=r.params,c.rest=r.rest,c.this=r._this,this.expect(7),this.expect(15),c.returnType=this.flowParseType(),this.finishNode(c,"FunctionTypeAnnotation")}case 6:{let c=this.startNode();if(this.next(),!this.match(7)&&!this.match(17))if(Te(this.state.type)||this.match(74)){let l=this.lookahead().type;a=l!==13&&l!==10}else a=!0;if(a){if(this.state.noAnonFunctionType=!1,n=this.flowParseType(),this.state.noAnonFunctionType=o,this.state.noAnonFunctionType||!(this.match(8)||this.match(7)&&this.lookahead().type===15))return this.expect(7),n;this.eat(8)}return n?r=this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(n)]):r=this.flowParseFunctionTypeParams(),c.params=r.params,c.rest=r.rest,c.this=r._this,this.expect(7),this.expect(15),c.returnType=this.flowParseType(),c.typeParameters=null,this.finishNode(c,"FunctionTypeAnnotation")}case 130:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case 81:case 82:return i.value=this.match(81),this.next(),this.finishNode(i,"BooleanLiteralTypeAnnotation");case 49:if(this.state.value==="-"){if(this.next(),this.match(131))return this.parseLiteralAtNode(-this.state.value,"NumberLiteralTypeAnnotation",i);if(this.match(132))return this.parseLiteralAtNode(-this.state.value,"BigIntLiteralTypeAnnotation",i);throw this.raise(Y.UnexpectedSubtractionOperand,this.state.startLoc)}throw this.unexpected();case 131:return this.parseLiteral(this.state.value,"NumberLiteralTypeAnnotation");case 132:return this.parseLiteral(this.state.value,"BigIntLiteralTypeAnnotation");case 84:return this.next(),this.finishNode(i,"VoidTypeAnnotation");case 80:return this.next(),this.finishNode(i,"NullLiteralTypeAnnotation");case 74:return this.next(),this.finishNode(i,"ThisTypeAnnotation");case 51:return this.next(),this.finishNode(i,"ExistsTypeAnnotation");case 83:return this.flowParseTypeofType();default:if(Sc(this.state.type)){let c=Ct(this.state.type);return this.next(),super.createIdentifier(i,c)}else if(Te(this.state.type))return this.isContextual(125)?this.flowParseInterfaceType():this.flowIdentToTypeAnnotation(t,i,this.parseIdentifier())}throw this.unexpected()}flowParsePostfixType(){let t=this.state.startLoc,i=this.flowParsePrimaryType(),r=!1;for(;(this.match(0)||this.match(14))&&!this.canInsertSemicolon();){let n=this.startNodeAt(t),a=this.eat(14);r=r||a,this.expect(0),!a&&this.match(1)?(n.elementType=i,this.next(),i=this.finishNode(n,"ArrayTypeAnnotation")):(n.objectType=i,n.indexType=this.flowParseType(),this.expect(1),r?(n.optional=a,i=this.finishNode(n,"OptionalIndexedAccessType")):i=this.finishNode(n,"IndexedAccessType"))}return i}flowParsePrefixType(){let t=this.startNode();return this.eat(13)?(t.typeAnnotation=this.flowParsePrefixType(),this.finishNode(t,"NullableTypeAnnotation")):this.flowParsePostfixType()}flowParseAnonFunctionWithoutParens(){let t=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(15)){let i=this.startNodeAtNode(t);return i.params=[this.reinterpretTypeAsFunctionTypeParam(t)],i.rest=null,i.this=null,i.returnType=this.flowParseType(),i.typeParameters=null,this.finishNode(i,"FunctionTypeAnnotation")}return t}flowParseIntersectionType(){let t=this.startNode();this.eat(41);let i=this.flowParseAnonFunctionWithoutParens();for(t.types=[i];this.eat(41);)t.types.push(this.flowParseAnonFunctionWithoutParens());return t.types.length===1?i:this.finishNode(t,"IntersectionTypeAnnotation")}flowParseUnionType(){let t=this.startNode();this.eat(39);let i=this.flowParseIntersectionType();for(t.types=[i];this.eat(39);)t.types.push(this.flowParseIntersectionType());return t.types.length===1?i:this.finishNode(t,"UnionTypeAnnotation")}flowParseType(){let t=this.state.inType;this.state.inType=!0;let i=this.flowParseUnionType();return this.state.inType=t,i}flowParseTypeOrImplicitInstantiation(){if(this.state.type===128&&this.state.value==="_"){let t=this.state.startLoc,i=this.parseIdentifier();return this.flowParseGenericType(t,i)}else return this.flowParseType()}flowParseTypeAnnotation(){let t=this.startNode();return t.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(t,"TypeAnnotation")}flowParseTypeAnnotatableIdentifier(){let t=this.startNode(),i=this.parseIdentifierName();return this.match(10)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),this.createIdentifier(t,i)}typeCastToParameter(t){return t.expression.typeAnnotation=t.typeAnnotation,this.resetEndLocationFromNode(t.expression,t.typeAnnotation),t.expression}flowParseVariance(){let t=null;return this.match(49)?(t=this.startNode(),this.state.value==="+"?t.kind="plus":t.kind="minus",this.next(),this.finishNode(t,"Variance")):t}parseFunctionBody(t,i,r=!1){if(i){this.forwardNoArrowParamsConversionAt(t,()=>super.parseFunctionBody(t,!0,r));return}super.parseFunctionBody(t,!1,r)}parseFunctionBodyAndFinish(t,i,r=!1){if(this.match(10)){let n=this.startNode();i==="FunctionDeclaration"||i==="FunctionExpression"||i==="ArrowFunctionExpression"?[n.typeAnnotation,t.predicate]=this.flowParseTypeAndPredicateInitialiser(!0):n.typeAnnotation=this.flowParseTypeInitialiser(),t.returnType=n.typeAnnotation?this.finishNode(n,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(t,i,r)}parseStatementLike(t){if(this.state.strict&&this.isContextual(125)){let r=this.lookahead();if(Je(r.type)){let n=this.startNode();return this.next(),this.flowParseInterface(n)}}else if(this.isContextual(122)){let r=this.startNode();return this.next(),this.flowParseEnumDeclaration(r)}let i=super.parseStatementLike(t);return this.flowPragma===void 0&&!this.isValidDirective(i)&&(this.flowPragma=null),i}parseExpressionStatement(t,i){if(i.type==="Identifier"){if(i.name==="declare"){if(this.match(76)||Te(this.state.type)||this.match(64)||this.match(70)||this.match(78))return this.flowParseDeclare(t)}else if(Te(this.state.type)){if(i.name==="interface")return this.flowParseInterface(t);if(i.name==="type")return this.flowParseTypeAlias(t);if(i.name==="opaque")return this.flowParseOpaqueType(t,!1)}}return super.parseExpressionStatement(t,i)}shouldParseExportDeclaration(){let{type:t}=this.state;return t===122||wT(t)?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){let{type:t}=this.state;return t===122||wT(t)?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.isContextual(122)){let t=this.startNode();return this.next(),this.flowParseEnumDeclaration(t)}return super.parseExportDefaultExpression()}parseConditional(t,i,r){if(!this.match(13))return t;if(r!=null){let x=this.lookaheadCharCode();if(x===44||x===61||x===58||x===41)return this.setOptionalParametersError(r),t}this.expect(13);let n=this.state.clone(),a=this.state.noArrowAt,o=this.startNodeAt(i),{consequent:c,failed:l}=this.tryParseConditionalConsequent(),u=this.getArrowLikeExpressions(c),f=u[0],m=u[1];if(l||m.length>0){let x=[...a];if(m.length>0){this.state=n,this.state.noArrowAt=x;for(let I=0;I<m.length;I++)x.push(m[I].start);({consequent:c,failed:l}=this.tryParseConditionalConsequent()),[f]=this.getArrowLikeExpressions(c)}l&&f.length>1&&this.raise(Y.AmbiguousConditionalArrow,n.startLoc),l&&f.length===1&&(this.state=n,x.push(f[0].start),this.state.noArrowAt=x,{consequent:c}=this.tryParseConditionalConsequent())}return this.getArrowLikeExpressions(c,!0),this.state.noArrowAt=a,this.expect(10),o.test=t,o.consequent=c,o.alternate=this.forwardNoArrowParamsConversionAt(o,()=>this.parseMaybeAssign()),this.finishNode(o,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);let t=this.parseMaybeAssignAllowIn(),i=!this.match(10);return this.state.noArrowParamsConversionAt.pop(),{consequent:t,failed:i}}getArrowLikeExpressions(t,i){let r=[t],n=[];for(;r.length!==0;){let a=r.pop();a.type==="ArrowFunctionExpression"?(a.typeParameters||!a.returnType?this.finishArrowValidation(a):n.push(a),a.body.type!=="BlockStatement"&&r.push(a.body)):a.type==="ConditionalExpression"&&(r.push(a.consequent),r.push(a.alternate))}return i?(n.forEach(a=>this.finishArrowValidation(a)),[n,[]]):_6(n,a=>a.params.every(o=>this.isAssignable(o,!0)))}finishArrowValidation(t){this.toAssignableList(t.params,t.extra?.trailingCommaLoc,!1),this.scope.enter(518),super.checkParams(t,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(t,i){let r;return this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(t.start))?(this.state.noArrowParamsConversionAt.push(this.state.start),r=i(),this.state.noArrowParamsConversionAt.pop()):r=i(),r}parseParenItem(t,i){let r=super.parseParenItem(t,i);if(this.eat(13)&&(r.optional=!0,this.resetEndLocation(t)),this.match(10)){let n=this.startNodeAt(i);return n.expression=r,n.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(n,"TypeCastExpression")}return r}assertModuleNodeAllowed(t){t.type==="ImportDeclaration"&&(t.importKind==="type"||t.importKind==="typeof")||t.type==="ExportNamedDeclaration"&&t.exportKind==="type"||t.type==="ExportAllDeclaration"&&t.exportKind==="type"||super.assertModuleNodeAllowed(t)}parseExportDeclaration(t){if(this.isContextual(126)){t.exportKind="type";let i=this.startNode();return this.next(),this.match(2)?(t.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(t),null):this.flowParseTypeAlias(i)}else if(this.isContextual(127)){t.exportKind="type";let i=this.startNode();return this.next(),this.flowParseOpaqueType(i,!1)}else if(this.isContextual(125)){t.exportKind="type";let i=this.startNode();return this.next(),this.flowParseInterface(i)}else if(this.isContextual(122)){t.exportKind="value";let i=this.startNode();return this.next(),this.flowParseEnumDeclaration(i)}else return super.parseExportDeclaration(t)}eatExportStar(t){return super.eatExportStar(t)?!0:this.isContextual(126)&&this.lookahead().type===51?(t.exportKind="type",this.next(),this.next(),!0):!1}maybeParseExportNamespaceSpecifier(t){let{startLoc:i}=this.state,r=super.maybeParseExportNamespaceSpecifier(t);return r&&t.exportKind==="type"&&this.unexpected(i),r}parseClassId(t,i,r){if((!i||r)&&this.isContextual(109)){t.id=null;return}super.parseClassId(t,i,r),this.match(43)&&(t.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(t,i,r){let{startLoc:n}=this.state;if(this.isContextual(121)){if(super.parseClassMemberFromModifier(t,i))return;i.declare=!0}super.parseClassMember(t,i,r),i.declare&&(i.type!=="ClassProperty"&&i.type!=="ClassPrivateProperty"&&i.type!=="PropertyDefinition"?this.raise(Y.DeclareClassElement,n):i.value&&this.raise(Y.DeclareClassFieldInitializer,i.value))}isIterator(t){return t==="iterator"||t==="asyncIterator"}readIterator(){let t=super.readWord1(),i="@@"+t;(!this.isIterator(t)||!this.state.inType)&&this.raise(E.InvalidIdentifier,this.state.curPosition(),{identifierName:i}),this.finishToken(128,i)}getTokenFromCode(t){let i=this.input.charCodeAt(this.state.pos+1);t===123&&i===124?this.finishOp(3,2):this.state.inType&&(t===62||t===60)?this.finishOp(t===62?44:43,1):this.state.inType&&t===63?i===46?this.finishOp(14,2):this.finishOp(13,1):k6(t,i,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(t)}isAssignable(t,i){return t.type==="TypeCastExpression"?this.isAssignable(t.expression,i):super.isAssignable(t,i)}toAssignable(t,i=!1){!i&&t.type==="AssignmentExpression"&&t.left.type==="TypeCastExpression"&&(t.left=this.typeCastToParameter(t.left)),super.toAssignable(t,i)}toAssignableListItem(t,i,r){let n=t[i];n.type==="TypeCastExpression"&&(t[i]=this.typeCastToParameter(n)),super.toAssignableListItem(t,i,r)}toReferencedList(t,i){for(let r=0;r<t.length;r++){let n=t[r];n?.type==="TypeCastExpression"&&!n.extra?.parenthesized&&(t.length>1||!i)&&this.raise(Y.TypeCastInPattern,n.typeAnnotation)}return t}parseArrayLike(t,i){let r=super.parseArrayLike(t,i);return r.type==="ArrayExpression"&&this.toReferencedList(r.elements),r}isValidLVal(t,i,r,n){return t==="TypeCastExpression"||super.isValidLVal(t,i,r,n)}parseClassProperty(t){return this.match(10)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(t)}parseClassPrivateProperty(t){return this.match(10)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(t)}isClassMethod(){return this.match(43)||super.isClassMethod()}isClassProperty(){return this.match(10)||super.isClassProperty()}isNonstaticConstructor(t){return!this.match(10)&&super.isNonstaticConstructor(t)}pushClassMethod(t,i,r,n,a,o){if(i.variance&&this.unexpected(i.variance.start),delete i.variance,this.match(43)&&(i.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(t,i,r,n,a,o),i.params&&a){let c=i.params;c.length>0&&this.isThisParam(c[0])&&this.raise(Y.ThisParamBannedInConstructor,i)}else if(i.type==="MethodDefinition"&&a&&i.value.params){let c=i.value.params;c.length>0&&this.isThisParam(c[0])&&this.raise(Y.ThisParamBannedInConstructor,i)}}pushClassPrivateMethod(t,i,r,n){i.variance&&this.unexpected(i.variance.start),delete i.variance,this.match(43)&&(i.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(t,i,r,n)}flowParseClassImplements(){let t=this.startNode();return t.id=this.flowParseRestrictedIdentifier(!0),this.match(43)?t.typeParameters=this.flowParseTypeParameterInstantiation():t.typeParameters=null,this.finishNode(t,"ClassImplements")}parseClassSuper(t){if(super.parseClassSuper(t),t.superClass&&(this.match(43)||this.match(47))&&(t.superTypeArguments=this.flowParseTypeParameterInstantiationInExpression()),this.eatContextual(109)){let i=t.implements=[];do i.push(this.flowParseClassImplements());while(this.eat(8))}}checkGetterSetterParams(t){super.checkGetterSetterParams(t);let i=this.getObjectOrClassMethodParams(t);if(i.length>0){let r=i[0];this.isThisParam(r)&&t.kind==="get"?this.raise(Y.GetterMayNotHaveThisParam,r):this.isThisParam(r)&&this.raise(Y.SetterMayNotHaveThisParam,r)}}parsePropertyNamePrefixOperator(t){t.variance=this.flowParseVariance()}parseObjPropValue(t,i,r,n,a,o,c){t.variance&&this.unexpected(t.variance.start),delete t.variance;let l;this.match(43)&&!o&&(l=this.flowParseTypeParameterDeclaration(),this.match(6)||this.unexpected());let u=super.parseObjPropValue(t,i,r,n,a,o,c);return l&&((u.value||u).typeParameters=l),u}parseFunctionParamType(t){return this.eat(13)&&(t.type!=="Identifier"&&this.raise(Y.PatternIsOptional,t),this.isThisParam(t)&&this.raise(Y.ThisParamMayNotBeOptional,t),t.optional=!0),this.match(10)?t.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(t)&&this.raise(Y.ThisParamAnnotationRequired,t),this.match(25)&&this.isThisParam(t)&&this.raise(Y.ThisParamNoDefault,t),this.resetEndLocation(t),t}parseMaybeDefault(t,i){let r=super.parseMaybeDefault(t,i);return r.type==="AssignmentPattern"&&r.typeAnnotation&&r.right.start<r.typeAnnotation.start&&this.raise(Y.TypeBeforeInitializer,r.typeAnnotation),r}parseImportSpecifierLocal(t,i,r){i.local=DT(t)?this.flowParseRestrictedIdentifier(!0,!0):this.parseIdentifier(),t.specifiers.push(this.finishImportSpecifier(i,r))}isPotentialImportPhase(t){if(super.isPotentialImportPhase(t))return!0;if(this.isContextual(126)){if(!t)return!0;let i=this.lookaheadCharCode();return i===123||i===42}return!t&&this.isContextual(83)}applyImportPhase(t,i,r,n){if(super.applyImportPhase(t,i,r,n),i){if(!r&&this.match(61))return;t.exportKind=r==="type"?r:"value"}else r==="type"&&this.match(51)&&this.unexpected(),t.importKind=r==="type"||r==="typeof"?r:"value"}parseImportSpecifier(t,i,r,n,a){let o=t.imported,c=null;o.type==="Identifier"&&(o.name==="type"?c="type":o.name==="typeof"&&(c="typeof"));let l=!1;if(this.isContextual(89)&&!this.isLookaheadContextual("as")){let f=this.parseIdentifier(!0);c!==null&&!Je(this.state.type)?(t.imported=f,t.importKind=c,t.local=this.cloneIdentifier(f)):(t.imported=o,t.importKind=null,t.local=this.parseIdentifier())}else{if(c!==null&&Je(this.state.type))t.imported=this.parseIdentifier(!0),t.importKind=c;else{if(i)throw this.raise(E.ImportBindingIsString,t,{importName:o.value});t.imported=o,t.importKind=null}this.eatContextual(89)?t.local=this.parseIdentifier():(l=!0,t.local=this.cloneIdentifier(t.imported))}let u=DT(t);return r&&u&&this.raise(Y.ImportTypeShorthandOnlyInPureImport,t),(r||u)&&this.checkReservedType(t.local.name,t.local.start,!0),l&&!r&&!u&&this.checkReservedWord(t.local.name,t.start,!0,!0),this.finishImportSpecifier(t,"ImportSpecifier")}parseBindingAtom(){return this.state.type===74?this.parseIdentifier(!0):super.parseBindingAtom()}parseFunctionParams(t,i){let r=t.kind;r!=="get"&&r!=="set"&&this.match(43)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.parseFunctionParams(t,i)}parseVarId(t,i){super.parseVarId(t,i),this.match(10)&&(t.id.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(t.id))}parseAsyncArrowFromCallExpression(t,i){if(this.match(10)){let r=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,t.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=r}return super.parseAsyncArrowFromCallExpression(t,i)}shouldParseAsyncArrow(){return this.match(10)||super.shouldParseAsyncArrow()}parseMaybeAssign(t,i){let r=null,n;if(this.hasPlugin("jsx")&&(this.match(138)||this.match(43))){if(r=this.state.clone(),n=this.tryParse(()=>super.parseMaybeAssign(t,i),r),!n.error)return n.node;let{context:a}=this.state,o=a[a.length-1];(o===Ee.j_oTag||o===Ee.j_expr)&&a.pop()}if(n?.error||this.match(43)){r=r||this.state.clone();let a,o=this.tryParse(l=>{a=this.flowParseTypeParameterDeclaration();let u=this.forwardNoArrowParamsConversionAt(a,()=>{let m=super.parseMaybeAssign(t,i);return this.resetStartLocationFromNode(m,a),m});u.extra?.parenthesized&&l();let f=this.maybeUnwrapTypeCastExpression(u);return f.type!=="ArrowFunctionExpression"&&l(),f.typeParameters=a,this.resetStartLocationFromNode(f,a),u},r),c=null;if(o.node&&this.maybeUnwrapTypeCastExpression(o.node).type==="ArrowFunctionExpression"){if(!o.error&&!o.aborted)return o.node.async&&this.raise(Y.UnexpectedTypeParameterBeforeAsyncArrowFunction,a),o.node;c=o.node}if(n?.node)return this.state=n.failState,n.node;if(c)return this.state=o.failState,c;throw n?.thrown?n.error:o.thrown?o.error:this.raise(Y.UnexpectedTokenAfterTypeParameter,a)}return super.parseMaybeAssign(t,i)}parseArrow(t){if(this.match(10)){let i=this.tryParse(()=>{let r=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;let n=this.startNode();return[n.typeAnnotation,t.predicate]=this.flowParseTypeAndPredicateInitialiser(!0),this.state.noAnonFunctionType=r,this.canInsertSemicolon()&&this.unexpected(),this.match(15)||this.unexpected(),n});if(i.thrown)return null;i.error&&(this.state=i.failState),t.returnType=i.node.typeAnnotation?this.finishNode(i.node,"TypeAnnotation"):null}return super.parseArrow(t)}shouldParseArrow(t){return this.match(10)||super.shouldParseArrow(t)}setArrowFunctionParameters(t,i){this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(t.start))?t.params=i:super.setArrowFunctionParameters(t,i)}checkParams(t,i,r,n=!0){if(!(r&&this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(t.start)))){for(let a=0;a<t.params.length;a++)this.isThisParam(t.params[a])&&a>0&&this.raise(Y.ThisParamMustBeFirst,t.params[a]);super.checkParams(t,i,r,n)}}parseParenAndDistinguishExpression(t){return super.parseParenAndDistinguishExpression(t&&!this.state.noArrowAt.includes(this.sourceToOffsetPos(this.state.start)))}parseSubscripts(t,i,r){if(t.type==="Identifier"&&t.name==="async"&&this.state.noArrowAt.includes(i.index)){this.next();let n=this.startNodeAt(i);n.callee=t,n.arguments=super.parseCallExpressionArguments(),t=this.finishNode(n,"CallExpression")}else if(t.type==="Identifier"&&t.name==="async"&&this.match(43)){let n=this.state.clone(),a=this.tryParse(c=>this.parseAsyncArrowWithTypeParameters(i)||c(),n);if(!a.error&&!a.aborted)return a.node;let o=this.tryParse(()=>super.parseSubscripts(t,i,r),n);if(o.node&&!o.error)return o.node;if(a.node)return this.state=a.failState,a.node;if(o.node)return this.state=o.failState,o.node;throw a.error||o.error}return super.parseSubscripts(t,i,r)}parseSubscript(t,i,r,n){if(this.match(14)&&this.isLookaheadToken_lt()){if(n.optionalChainMember=!0,r)return n.stop=!0,t;this.next();let a=this.startNodeAt(i);return a.callee=t,a.typeArguments=this.flowParseTypeParameterInstantiationInExpression(),this.expect(6),a.arguments=this.parseCallExpressionArguments(),a.optional=!0,this.finishCallExpression(a,!0)}else if(!r&&this.shouldParseTypes()&&(this.match(43)||this.match(47))){let a=this.startNodeAt(i);a.callee=t;let o=this.tryParse(()=>(a.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(6),a.arguments=super.parseCallExpressionArguments(),n.optionalChainMember&&(a.optional=!1),this.finishCallExpression(a,n.optionalChainMember)));if(o.node)return o.error&&(this.state=o.failState),o.node}return super.parseSubscript(t,i,r,n)}parseNewCallee(t){super.parseNewCallee(t);let i=null;this.shouldParseTypes()&&this.match(43)&&(i=this.tryParse(()=>this.flowParseTypeParameterInstantiationCallOrNew()).node),t.typeArguments=i}parseAsyncArrowWithTypeParameters(t){let i=this.startNodeAt(t);if(this.parseFunctionParams(i,!1),!!this.parseArrow(i))return super.parseArrowExpression(i,void 0,!0)}readToken_mult_modulo(t){let i=this.input.charCodeAt(this.state.pos+1);if(t===42&&i===47&&this.state.hasFlowComment){this.state.hasFlowComment=!1,this.state.pos+=2,this.nextToken();return}super.readToken_mult_modulo(t)}readToken_pipe_amp(t){let i=this.input.charCodeAt(this.state.pos+1);if(t===124&&i===125){this.finishOp(5,2);return}super.readToken_pipe_amp(t)}parseTopLevel(t,i){let r=super.parseTopLevel(t,i);return this.state.hasFlowComment&&this.raise(Y.UnterminatedFlowComment,this.state.curPosition()),r}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(Y.NestedFlowComment,this.state.startLoc);this.hasFlowCommentCompletion();let t=this.skipFlowComment();t&&(this.state.pos+=t,this.state.hasFlowComment=!0);return}return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/")}skipFlowComment(){let{pos:t}=this.state,i=2;for(;[32,9].includes(this.input.charCodeAt(t+i));)i++;let r=this.input.charCodeAt(i+t),n=this.input.charCodeAt(i+t+1);return r===58&&n===58?i+2:this.input.slice(i+t,i+t+12)==="flow-include"?i+12:r===58&&n!==58?i:!1}hasFlowCommentCompletion(){if(this.input.indexOf("*/",this.state.pos)===-1)throw this.raise(E.UnterminatedComment,this.state.curPosition())}flowEnumErrorBooleanMemberNotInitialized(t,i){this.raise(Y.EnumBooleanMemberNotInitialized,t,i)}flowEnumErrorInvalidMemberInitializer(t,i){return this.raise(i.explicitType?i.explicitType==="symbol"?Y.EnumInvalidMemberInitializerSymbolType:Y.EnumInvalidMemberInitializerPrimaryType:Y.EnumInvalidMemberInitializerUnknownType,t,i)}flowEnumErrorNumberMemberNotInitialized(t,i){this.raise(Y.EnumNumberMemberNotInitialized,t,i)}flowEnumErrorStringMemberInconsistentlyInitialized(t,i){this.raise(Y.EnumStringMemberInconsistentlyInitialized,t,i)}flowEnumMemberInit(){let t=this.state.startLoc,i=()=>this.match(8)||this.match(4);switch(this.state.type){case 131:{let r=this.parseNumericLiteral(this.state.value);if(i())return{type:"number",loc:r.start,value:r};break}case 130:{let r=this.parseStringLiteral(this.state.value);if(i())return{type:"string",loc:r.start,value:r};break}case 81:case 82:{let r=this.parseBooleanLiteral(this.match(81));if(i())return{type:"boolean",loc:r.start,value:r}}}return{type:"invalid",loc:t}}flowEnumMemberRaw(){let t=this.state.startLoc,i=this.parseIdentifier(!0),r=this.eat(25)?this.flowEnumMemberInit():{type:"none",loc:t};return{id:i,init:r}}flowEnumCheckExplicitTypeMismatch(t,i,r){let{explicitType:n}=i;n!==null&&n!==r&&this.flowEnumErrorInvalidMemberInitializer(t,i)}flowEnumMembers({enumName:t,explicitType:i}){let r=new Set,n={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]},a=!1;for(;!this.match(4);){if(this.eat(17)){a=!0;break}let o=this.startNode(),{id:c,init:l}=this.flowEnumMemberRaw(),u=c.name;if(u==="")continue;/^[a-z]/.test(u)&&this.raise(Y.EnumInvalidMemberName,c,{memberName:u,suggestion:u[0].toUpperCase()+u.slice(1),enumName:t}),r.has(u)&&this.raise(Y.EnumDuplicateMemberName,c,{memberName:u,enumName:t}),r.add(u);let f={enumName:t,explicitType:i,memberName:u};switch(o.id=c,l.type){case"boolean":{this.flowEnumCheckExplicitTypeMismatch(l.loc,f,"boolean"),o.init=l.value,n.booleanMembers.push(this.finishNode(o,"EnumBooleanMember"));break}case"number":{this.flowEnumCheckExplicitTypeMismatch(l.loc,f,"number"),o.init=l.value,n.numberMembers.push(this.finishNode(o,"EnumNumberMember"));break}case"string":{this.flowEnumCheckExplicitTypeMismatch(l.loc,f,"string"),o.init=l.value,n.stringMembers.push(this.finishNode(o,"EnumStringMember"));break}case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(l.loc,f);case"none":switch(i){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(l.loc,f);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(l.loc,f);break;default:n.defaultedMembers.push(this.finishNode(o,"EnumDefaultedMember"))}}this.match(4)||this.expect(8)}return{members:n,hasUnknownMembers:a}}flowEnumStringMembers(t,i,{enumName:r}){if(t.length===0)return i;if(i.length===0)return t;if(i.length>t.length){for(let n of t)this.flowEnumErrorStringMemberInconsistentlyInitialized(n,{enumName:r});return i}else{for(let n of i)this.flowEnumErrorStringMemberInconsistentlyInitialized(n,{enumName:r});return t}}flowEnumParseExplicitType({enumName:t}){if(!this.eatContextual(98))return null;if(!Te(this.state.type))throw this.raise(Y.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName:t});let{value:i}=this.state;return this.next(),i!=="boolean"&&i!=="number"&&i!=="string"&&i!=="symbol"&&this.raise(Y.EnumInvalidExplicitType,this.state.startLoc,{enumName:t,invalidEnumType:i}),i}flowEnumBody(t,i){let r=i.name,n=i.start,a=this.flowEnumParseExplicitType({enumName:r});this.expect(2);let{members:o,hasUnknownMembers:c}=this.flowEnumMembers({enumName:r,explicitType:a});switch(t.hasUnknownMembers=c,a){case"boolean":return t.explicitType=!0,t.members=o.booleanMembers,this.expect(4),this.finishNode(t,"EnumBooleanBody");case"number":return t.explicitType=!0,t.members=o.numberMembers,this.expect(4),this.finishNode(t,"EnumNumberBody");case"string":return t.explicitType=!0,t.members=this.flowEnumStringMembers(o.stringMembers,o.defaultedMembers,{enumName:r}),this.expect(4),this.finishNode(t,"EnumStringBody");case"symbol":return t.members=o.defaultedMembers,this.expect(4),this.finishNode(t,"EnumSymbolBody");default:{let l=()=>(t.members=[],this.expect(4),this.finishNode(t,"EnumStringBody"));t.explicitType=!1;let u=o.booleanMembers.length,f=o.numberMembers.length,m=o.stringMembers.length,x=o.defaultedMembers.length;if(!u&&!f&&!m&&!x)return l();if(!u&&!f)return t.members=this.flowEnumStringMembers(o.stringMembers,o.defaultedMembers,{enumName:r}),this.expect(4),this.finishNode(t,"EnumStringBody");if(!f&&!m&&u>=x){for(let I of o.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(I.start,{enumName:r,memberName:I.id.name});return t.members=o.booleanMembers,this.expect(4),this.finishNode(t,"EnumBooleanBody")}else if(!u&&!m&&f>=x){for(let I of o.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(I.start,{enumName:r,memberName:I.id.name});return t.members=o.numberMembers,this.expect(4),this.finishNode(t,"EnumNumberBody")}else return this.raise(Y.EnumInconsistentMemberValues,n,{enumName:r}),l()}}}flowParseEnumDeclaration(t){let i=this.parseIdentifier();return t.id=i,t.body=this.flowEnumBody(this.startNode(),i),this.finishNode(t,"EnumDeclaration")}jsxParseOpeningElementAfterName(t){return this.shouldParseTypes()&&(this.match(43)||this.match(47))&&(t.typeArguments=this.flowParseTypeParameterInstantiationInExpression()),super.jsxParseOpeningElementAfterName(t)}isLookaheadToken_lt(){let t=this.nextTokenStart();if(this.input.charCodeAt(t)===60){let i=this.input.charCodeAt(t+1);return i!==60&&i!==61}return!1}reScan_lt_gt(){let{type:t}=this.state;t===43?(this.state.pos-=1,this.readToken_lt()):t===44&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){let{type:t}=this.state;return t===47?(this.state.pos-=2,this.finishOp(43,1),43):t}maybeUnwrapTypeCastExpression(t){return t.type==="TypeCastExpression"?t.expression:t}},U6={__proto__:null,quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02C6",tilde:"\u02DC",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203A",oline:"\u203E",frasl:"\u2044",euro:"\u20AC",image:"\u2111",weierp:"\u2118",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",lang:"\u2329",rang:"\u232A",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666"},Ir=/\r\n|[\r\n\u2028\u2029]/g;function Ts(s){switch(s){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}function LT(s,e,t){for(let i=e;i<t;i++)if(Ts(s.charCodeAt(i)))return!0;return!1}var Bo=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,_o=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g;function V6(s){switch(s){case 9:case 11:case 12:case 32:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8239:case 8287:case 12288:case 65279:return!0;default:return!1}}var K6={AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:({openingTagName:s})=>`Expected corresponding JSX closing tag for <${s}>.`,MissingClosingTagFragment:"Expected corresponding JSX closing tag for <>.",UnexpectedSequenceExpression:"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",UnexpectedToken:({unexpected:s,HTMLEntity:e})=>`Unexpected token \`${s}\`. Did you mean \`${e}\` or \`{'${s}'}\`?`,UnsupportedJsxValue:"JSX value should be either an expression or a quoted JSX text.",UnterminatedJsxContent:"Unterminated JSX contents.",UnwrappedAdjacentJSXElements:"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?"},ht=it`jsx`(K6);function Et(s){return s?s.type==="JSXOpeningFragment"||s.type==="JSXClosingFragment":!1}function ys(s){if(s.type==="JSXIdentifier")return s.name;if(s.type==="JSXNamespacedName")return s.namespace.name+":"+s.name.name;if(s.type==="JSXMemberExpression")return ys(s.object)+"."+ys(s.property);throw new Error("Node had unexpected type: "+s.type)}var q6=s=>class extends s{jsxReadToken(){let t="",i=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(ht.UnterminatedJsxContent,this.state.startLoc);let r=this.input.charCodeAt(this.state.pos);switch(r){case 60:case 123:if(this.state.pos===this.state.start){r===60&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(138)):super.getTokenFromCode(r);return}t+=this.input.slice(i,this.state.pos),this.finishToken(137,t);return;case 38:t+=this.input.slice(i,this.state.pos),t+=this.jsxReadEntity(),i=this.state.pos;break;case 62:case 125:this.raise(ht.UnexpectedToken,this.state.curPosition(),{unexpected:this.input[this.state.pos],HTMLEntity:r===125?"&rbrace;":"&gt;"});default:Ts(r)?(t+=this.input.slice(i,this.state.pos),t+=this.jsxReadNewLine(!0),i=this.state.pos):++this.state.pos}}}jsxReadNewLine(t){let i=this.input.charCodeAt(this.state.pos),r;return++this.state.pos,i===13&&this.input.charCodeAt(this.state.pos)===10?(++this.state.pos,r=t?`
28
+ `:`\r
29
+ `):r=String.fromCharCode(i),++this.state.curLine,this.state.lineStart=this.state.pos,r}jsxReadString(t){let i="",r=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(E.UnterminatedString,this.state.startLoc);let n=this.input.charCodeAt(this.state.pos);if(n===t)break;n===38?(i+=this.input.slice(r,this.state.pos),i+=this.jsxReadEntity(),r=this.state.pos):Ts(n)?(i+=this.input.slice(r,this.state.pos),i+=this.jsxReadNewLine(!1),r=this.state.pos):++this.state.pos}i+=this.input.slice(r,this.state.pos++),this.finishToken(130,i)}jsxReadEntity(){let t=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let i=10;this.codePointAtPos(this.state.pos)===120&&(i=16,++this.state.pos);let r=this.readInt(i,void 0,!1,"bail");if(r!==null&&r<=1114111&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(r)}else{let i=0,r=!1;for(;i++<10&&this.state.pos<this.length&&!(r=this.codePointAtPos(this.state.pos)===59);)++this.state.pos;if(r){let n=this.input.slice(t,this.state.pos),a=U6[n];if(++this.state.pos,a)return a}}return this.state.pos=t,"&"}jsxReadWord(){let t,i=this.state.pos;do t=this.input.charCodeAt(++this.state.pos);while(Rt(t)||t===45);this.finishToken(136,this.input.slice(i,this.state.pos))}jsxParseIdentifier(){let t=this.startNode();return this.match(136)?t.name=this.state.value:Sc(this.state.type)?t.name=Ct(this.state.type):this.unexpected(),this.next(),this.finishNode(t,"JSXIdentifier")}jsxParseNamespacedName(){let t=this.state.startLoc,i=this.jsxParseIdentifier();if(!this.eat(10))return i;let r=this.startNodeAt(t);return r.namespace=i,r.name=this.jsxParseIdentifier(),this.finishNode(r,"JSXNamespacedName")}jsxParseElementName(){let t=this.state.startLoc,i=this.jsxParseNamespacedName();if(i.type==="JSXNamespacedName")return i;for(;this.eat(12);){let r=this.startNodeAt(t);r.object=i,r.property=this.jsxParseIdentifier(),i=this.finishNode(r,"JSXMemberExpression")}return i}jsxParseAttributeValue(){let t;switch(this.state.type){case 2:return t=this.startNode(),this.setContext(Ee.brace),this.next(),t=this.jsxParseExpressionContainer(t,Ee.j_oTag),t.expression.type==="JSXEmptyExpression"&&this.raise(ht.AttributeIsEmpty,t),t;case 138:case 130:return this.parseExprAtom();default:throw this.raise(ht.UnsupportedJsxValue,this.state.startLoc)}}jsxParseEmptyExpression(){let t=this.startNodeAt(this.state.lastTokEndLoc);return this.finishNodeAt(t,"JSXEmptyExpression",this.state.startLoc)}jsxParseSpreadChild(t){return this.next(),t.expression=this.parseExpression(),this.setContext(Ee.j_expr),this.state.canStartJSXElement=!0,this.expect(4),this.finishNode(t,"JSXSpreadChild")}jsxParseExpressionContainer(t,i){if(this.match(4))t.expression=this.jsxParseEmptyExpression();else{let r=this.parseExpression();r.type==="SequenceExpression"&&!r.extra?.parenthesized&&this.raise(ht.UnexpectedSequenceExpression,r.expressions[1]),t.expression=r}return this.setContext(i),this.state.canStartJSXElement=!0,this.expect(4),this.finishNode(t,"JSXExpressionContainer")}jsxParseAttribute(){if(this.match(2)){let i=this.startNode();return this.setContext(Ee.brace),this.next(),this.expect(17),i.argument=this.parseMaybeAssignAllowIn(),this.setContext(Ee.j_oTag),this.state.canStartJSXElement=!0,this.expect(4),this.finishNode(i,"JSXSpreadAttribute")}let t=this.startNode();return t.name=this.jsxParseNamespacedName(),t.value=this.eat(25)?this.jsxParseAttributeValue():null,this.finishNode(t,"JSXAttribute")}jsxParseOpeningElementAt(t){if(this.eat(139)){let r=this.startNodeAt(t);return this.finishNode(r,"JSXOpeningFragment")}let i=this.startNodeAt(t);return i.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(i)}jsxParseOpeningElementAfterName(t){let i=[];for(;!this.match(52)&&!this.match(139);)i.push(this.jsxParseAttribute());return t.attributes=i,t.selfClosing=this.eat(52),this.expect(139),this.finishNode(t,"JSXOpeningElement")}jsxParseClosingElementAt(t){if(this.eat(139)){let r=this.startNodeAt(t);return this.finishNode(r,"JSXClosingFragment")}let i=this.startNodeAt(t);return i.name=this.jsxParseElementName(),this.expect(139),this.finishNode(i,"JSXClosingElement")}jsxParseElementAt(t){let i=this.startNodeAt(t),r=[],n=this.jsxParseOpeningElementAt(t),a=null;if(!n.selfClosing){e:for(;;)switch(this.state.type){case 138:if(t=this.state.startLoc,this.next(),this.eat(52)){this.setLoc(t),a=this.jsxParseClosingElementAt(t);break e}r.push(this.jsxParseElementAt(t));break;case 137:r.push(this.parseLiteral(this.state.value,"JSXText"));break;case 2:{let o=this.startNode();this.setContext(Ee.brace),this.next(),this.match(17)?r.push(this.jsxParseSpreadChild(o)):r.push(this.jsxParseExpressionContainer(o,Ee.j_expr));break}default:this.unexpected()}Et(n)&&!Et(a)&&a!==null?this.raise(ht.MissingClosingTagFragment,a):!Et(n)&&Et(a)?this.raise(ht.MissingClosingTagElement,a,{openingTagName:ys(n.name)}):!Et(n)&&!Et(a)&&ys(a.name)!==ys(n.name)&&this.raise(ht.MissingClosingTagElement,a,{openingTagName:ys(n.name)})}if(Et(n)?(i.openingFragment=n,i.closingFragment=a):(i.openingElement=n,i.closingElement=a),i.children=r,this.match(43))throw this.raise(ht.UnwrappedAdjacentJSXElements,this.state.startLoc);return Et(n)?this.finishNode(i,"JSXFragment"):this.finishNode(i,"JSXElement")}jsxParseElement(){let t=this.state.startLoc;return this.next(),this.jsxParseElementAt(t)}setContext(t){let{context:i}=this.state;i[i.length-1]=t}parseExprAtom(t){return this.match(138)?this.jsxParseElement():this.match(43)&&this.input.charCodeAt(this.state.pos)!==33?(this.replaceToken(138),this.jsxParseElement()):super.parseExprAtom(t)}skipSpace(){this.curContext().preserveSpace||super.skipSpace()}getTokenFromCode(t){let i=this.curContext();if(i===Ee.j_expr){this.jsxReadToken();return}if(i===Ee.j_oTag||i===Ee.j_cTag){if(lt(t)){this.jsxReadWord();return}if(t===62){++this.state.pos,this.finishToken(139);return}if((t===34||t===39)&&i===Ee.j_oTag){this.jsxReadString(t);return}}if(t===60&&this.state.canStartJSXElement&&this.input.charCodeAt(this.state.pos+1)!==33){++this.state.pos,this.finishToken(138);return}super.getTokenFromCode(t)}updateContext(t){let{context:i,type:r}=this.state;if(r===52&&t===138)i.splice(-2,2,Ee.j_cTag),this.state.canStartJSXElement=!1;else if(r===138)i.push(Ee.j_oTag);else if(r===139){let n=i[i.length-1];n===Ee.j_oTag&&t===52||n===Ee.j_cTag?(i.pop(),this.state.canStartJSXElement=i[i.length-1]===Ee.j_expr):(this.setContext(Ee.j_expr),this.state.canStartJSXElement=!0)}else this.state.canStartJSXElement=T6(r)}},Jo=class extends pi{tsNames=new Map},Xo=class extends hi{get inTSNamespace(){let e=this.scopeStack;return e.length>=2&&e[e.length-1].flags===0&&(e[e.length-2].flags&2048)>0}importsStack=[];createScope(e){return this.importsStack.push(new Set),new Jo(e)}enter(e){e&3072&&this.importsStack.push(new Set),super.enter(e)}exit(){let e=super.exit();return e&3072&&this.importsStack.pop(),e}hasImport(e,t){let i=this.importsStack.length;if(this.importsStack[i-1].has(e))return!0;if(!t&&i>1){for(let r=0;r<i-1;r++)if(this.importsStack[r].has(e))return!0}return!1}declareName(e,t,i){if(t&4096){this.hasImport(e,!0)&&this.parser.raise(E.VarRedeclaration,i,{identifierName:e}),this.importsStack[this.importsStack.length-1].add(e);return}let r=this.currentScope(),n=r.tsNames.get(e)||0;if(t&1024){this.maybeExportDefined(r,e),r.tsNames.set(e,n|16);return}super.declareName(e,t,i),t&2&&(t&1||(this.checkRedeclarationInScope(r,e,t,i),this.maybeExportDefined(r,e)),n=n|1),t&256&&(n=n|2),t&512&&(n=n|4),t&128&&(n=n|8),n&&r.tsNames.set(e,n)}isRedeclaredInScope(e,t,i){let r=e.tsNames.get(t);if((r&2)>0){if(i&256){let n=(i&512)>0,a=(r&4)>0;return n!==a}return!0}return i&128&&(r&8)>0?e.names.get(t)&2?!!(i&1):!1:i&2&&(r&1)>0?!0:super.isRedeclaredInScope(e,t,i)}checkLocalExport(e){let{name:t}=e;if(this.hasImport(t))return;let i=this.scopeStack.length;for(let r=i-1;r>=0;r--){let a=this.scopeStack[r].tsNames.get(t);if((a&1)>0||(a&16)>0)return}super.checkLocalExport(e)}},Wo=class{sawUnambiguousESM=!1;ambiguousScriptDifferentAst=!1;sourceToOffsetPos(e){return e+this.startIndex}offsetToSourcePos(e){return e-this.startIndex}hasPlugin(e){if(typeof e=="string")return this.plugins.has(e);{let[t,i]=e;if(!this.hasPlugin(t))return!1;let r=this.plugins.get(t);for(let n of Object.keys(i))if(r?.[n]!==i[n])return!1;return!0}}getPluginOption(e,t){return this.plugins.get(e)?.[t]}};function HT(s,e){s.trailingComments===void 0?s.trailingComments=e:s.trailingComments.unshift(...e)}function $6(s,e){s.leadingComments===void 0?s.leadingComments=e:s.leadingComments.unshift(...e)}function fi(s,e){s.innerComments===void 0?s.innerComments=e:s.innerComments.unshift(...e)}function At(s,e,t){let i=null,r=e.length;for(;i===null&&r>0;)i=e[--r];i===null||i.start>t.start?fi(s,t.comments):HT(i,t.comments)}var zo=class extends Wo{addComment(e){this.filename&&(e.loc.filename=this.filename);let{commentsLen:t}=this.state;this.comments.length!==t&&(this.comments.length=t),this.comments.push(e),this.state.commentsLen++}processComment(e){let{commentStack:t}=this.state,i=t.length;if(i===0)return;let r=i-1,n=t[r];n.start===e.end&&(n.leadingNode=e,r--);let a=e.start;for(;r>=0;r--){let o=t[r],c=o.end;if(c>a)o.containingNode=e,this.finalizeComment(o),t.splice(r,1);else{c===a&&(o.trailingNode=e);break}}}finalizeComment(e){let{comments:t}=e;if(e.leadingNode!==null||e.trailingNode!==null)e.leadingNode!==null&&HT(e.leadingNode,t),e.trailingNode!==null&&$6(e.trailingNode,t);else{let i=e.containingNode,r=e.start;if(this.input.charCodeAt(this.offsetToSourcePos(r)-1)===44)switch(i.type){case"ObjectExpression":case"ObjectPattern":At(i,i.properties,e);break;case"CallExpression":case"NewExpression":case"OptionalCallExpression":At(i,i.arguments,e);break;case"ImportExpression":At(i,[i.source,i.options??null],e);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":case"TSTypeParameterDeclaration":At(i,i.params,e);break;case"ArrayExpression":case"ArrayPattern":At(i,i.elements,e);break;case"ExportNamedDeclaration":case"ImportDeclaration":At(i,i.specifiers,e);break;case"TSEnumBody":At(i,i.members,e);break;case"TSInterfaceBody":At(i,i.body,e);break;default:fi(i,t)}else fi(i,t)}}finalizeRemainingComments(){let{commentStack:e}=this.state;for(let t=e.length-1;t>=0;t--)this.finalizeComment(e[t]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(e){let{commentStack:t}=this.state,{length:i}=t;if(i===0)return;let r=t[i-1];r.leadingNode===e&&(r.leadingNode=null)}takeSurroundingComments(e,t,i){let{commentStack:r}=this.state,n=r.length;if(n===0)return;let a=n-1;for(;a>=0;a--){let o=r[a],c=o.end;if(o.start===i)o.leadingNode=e;else if(c===t)o.trailingNode=e;else if(c<t)break}}},Ho=class s{flags=2048;get strict(){return(this.flags&1)>0}set strict(e){e?this.flags|=1:this.flags&=-2}startIndex;curLine;lineStart;startLoc;endLoc;init({strictMode:e,sourceType:t,startIndex:i,startLine:r,startColumn:n}){this.strict=e===!1?!1:e===!0?!0:t==="module",this.startIndex=i,this.curLine=r,this.lineStart=-n,this.startLoc=this.endLoc=new _e(r,n,i)}errors=[];noArrowAt=[];noArrowParamsConversionAt=[];get canStartArrow(){return(this.flags&2)>0}set canStartArrow(e){e?this.flags|=2:this.flags&=-3}get inType(){return(this.flags&4)>0}set inType(e){e?this.flags|=4:this.flags&=-5}get noAnonFunctionType(){return(this.flags&8)>0}set noAnonFunctionType(e){e?this.flags|=8:this.flags&=-9}get hasFlowComment(){return(this.flags&16)>0}set hasFlowComment(e){e?this.flags|=16:this.flags&=-17}get isAmbientContext(){return(this.flags&32)>0}set isAmbientContext(e){e?this.flags|=32:this.flags&=-33}get inAbstractClass(){return(this.flags&64)>0}set inAbstractClass(e){e?this.flags|=64:this.flags&=-65}get inDisallowConditionalTypesContext(){return(this.flags&128)>0}set inDisallowConditionalTypesContext(e){e?this.flags|=128:this.flags&=-129}get inConditionalConsequent(){return(this.flags&256)>0}set inConditionalConsequent(e){e?this.flags|=256:this.flags&=-257}get inHackPipelineBody(){return(this.flags&512)>0}set inHackPipelineBody(e){e?this.flags|=512:this.flags&=-513}get seenTopicReference(){return(this.flags&1024)>0}set seenTopicReference(e){e?this.flags|=1024:this.flags&=-1025}labels=[];commentsLen=0;commentStack=[];pos=0;type=135;value=null;start=0;end=0;lastTokEndLoc=null;lastTokStartLoc=null;context=[Ee.brace];get canStartJSXElement(){return(this.flags&2048)>0}set canStartJSXElement(e){e?this.flags|=2048:this.flags&=-2049}get containsEsc(){return(this.flags&4096)>0}set containsEsc(e){e?this.flags|=4096:this.flags&=-4097}firstInvalidTemplateEscapePos=null;get hasTopLevelAwait(){return(this.flags&8192)>0}set hasTopLevelAwait(e){e?this.flags|=8192:this.flags&=-8193}strictErrors=new Map;tokensLength=0;curPosition(){return new _e(this.curLine,this.pos-this.lineStart,this.pos+this.startIndex)}clone(){let e=new s;return e.flags=this.flags,e.startIndex=this.startIndex,e.curLine=this.curLine,e.lineStart=this.lineStart,e.startLoc=this.startLoc,e.endLoc=this.endLoc,e.errors=this.errors.slice(),e.noArrowAt=this.noArrowAt.slice(),e.noArrowParamsConversionAt=this.noArrowParamsConversionAt.slice(),e.labels=this.labels.slice(),e.commentsLen=this.commentsLen,e.commentStack=this.commentStack.slice(),e.pos=this.pos,e.type=this.type,e.value=this.value,e.start=this.start,e.end=this.end,e.lastTokEndLoc=this.lastTokEndLoc,e.lastTokStartLoc=this.lastTokStartLoc,e.context=this.context.slice(),e.firstInvalidTemplateEscapePos=this.firstInvalidTemplateEscapePos,e.strictErrors=this.strictErrors,e.tokensLength=this.tokensLength,e}},J6=function(e){return e>=48&&e<=57},OT={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},wr={bin:s=>s===48||s===49,oct:s=>s>=48&&s<=55,dec:s=>s>=48&&s<=57,hex:s=>s>=48&&s<=57||s>=65&&s<=70||s>=97&&s<=102};function MT(s,e,t,i,r,n){let a=t,o=i,c=r,l="",u=null,f=t,{length:m}=e;for(;;){if(t>=m){n.unterminated(a,o,c),l+=e.slice(f,t);break}let x=e.charCodeAt(t);if(X6(s,x,e,t)){l+=e.slice(f,t);break}if(x===92){l+=e.slice(f,t);let I=W6(e,t,i,r,s==="template",n);I.ch===null&&!u?u={pos:t,lineStart:i,curLine:r}:l+=I.ch,{pos:t,lineStart:i,curLine:r}=I,f=t}else x===8232||x===8233?(++t,++r,i=t):x===10||x===13?s==="template"?(l+=e.slice(f,t)+`
30
+ `,++t,x===13&&e.charCodeAt(t)===10&&++t,++r,f=i=t):n.unterminated(a,o,c):++t}return{pos:t,str:l,firstInvalidLoc:u,lineStart:i,curLine:r}}function X6(s,e,t,i){return s==="template"?e===96||e===36&&t.charCodeAt(i+1)===123:e===(s==="double"?34:39)}function W6(s,e,t,i,r,n){let a=!r;e++;let o=l=>({pos:e,ch:l,lineStart:t,curLine:i}),c=s.charCodeAt(e++);switch(c){case 110:return o(`
31
+ `);case 114:return o("\r");case 120:{let l;return{code:l,pos:e}=Yo(s,e,t,i,2,!1,a,n),o(l===null?null:String.fromCharCode(l))}case 117:{let l;return{code:l,pos:e}=GT(s,e,t,i,a,n),o(l===null?null:String.fromCodePoint(l))}case 116:return o(" ");case 98:return o("\b");case 118:return o("\v");case 102:return o("\f");case 13:s.charCodeAt(e)===10&&++e;case 10:t=e,++i;case 8232:case 8233:return o("");case 56:case 57:if(r)return o(null);n.strictNumericEscape(e-1,t,i);default:if(c>=48&&c<=55){let l=e-1,f=/^[0-7]+/.exec(s.slice(l,e+2))[0],m=parseInt(f,8);m>255&&(f=f.slice(0,-1),m=parseInt(f,8)),e+=f.length-1;let x=s.charCodeAt(e);if(f!=="0"||x===56||x===57){if(r)return o(null);n.strictNumericEscape(l,t,i)}return o(String.fromCharCode(m))}return o(String.fromCharCode(c))}}function Yo(s,e,t,i,r,n,a,o){let c=e,l;return{n:l,pos:e}=YT(s,e,t,i,16,r,n,!1,o,!a),l===null&&(a?o.invalidEscapeSequence(c,t,i):e=c-1),{code:l,pos:e}}function YT(s,e,t,i,r,n,a,o,c,l){let u=e,f=r===16?OT.hex:OT.decBinOct,m=r===16?wr.hex:r===10?wr.dec:r===8?wr.oct:wr.bin,x=!1,I=0;for(let L=0,N=n??1/0;L<N;++L){let w=s.charCodeAt(e),v;if(w===95&&o!=="bail"){let z=s.charCodeAt(e-1),V=s.charCodeAt(e+1);if(o){if(Number.isNaN(V)||!m(V)||f.has(z)||f.has(V)){if(l)return{n:null,pos:e};c.unexpectedNumericSeparator(e,t,i)}}else{if(l)return{n:null,pos:e};c.numericSeparatorInEscapeSequence(e,t,i)}++e;continue}if(w>=97?v=w-97+10:w>=65?v=w-65+10:J6(w)?v=w-48:v=1/0,v>=r)if(v<=9){if(l)return{n:null,pos:e};c.invalidDigit(e,t,i,r),v=0}else if(a)v=0,x=!0;else break;++e,I=I*r+v}return e===u||n!=null&&e-u!==n||x?{n:null,pos:e}:{n:I,pos:e}}function GT(s,e,t,i,r,n){let a=s.charCodeAt(e),o;if(a===123){if(++e,{code:o,pos:e}=Yo(s,e,t,i,s.indexOf("}",e)-e,!0,r,n),++e,o!==null&&o>1114111)if(r)n.invalidCodePoint(e,t,i);else return{code:null,pos:e}}else({code:o,pos:e}=Yo(s,e,t,i,4,!1,r,n));return{code:o,pos:e}}function ci(s,e,t){return new _e(t,s-e,s)}var z6=new Set([103,109,115,105,121,117,100,118]),Go=class{constructor(e){let t=e.startIndex||0;this.type=e.type,this.value=e.value,this.start=t+e.start,this.end=t+e.end,this.loc=new xs(e.startLoc,e.endLoc)}},Nr,Qo=class extends zo{isLookahead;tokens=[];constructor(e,t){super(),this.state=new Ho,this.state.init(e),this.input=t,this.length=t.length,this.comments=[],this.isLookahead=!1,(!Nr||Nr.length<(this.length+1)*2)&&(Nr=new Uint32Array((this.length+1)*2)),this.locData=Nr}setLoc(e){let t=this.offsetToSourcePos(e.index);this.locData[t*2]=e.line,this.locData[t*2+1]=e.column}getLoc(e){let t=this.offsetToSourcePos(e);return new _e(this.locData[t*2],this.locData[t*2+1],e)}pushToken(e){this.tokens.length=this.state.tokensLength,this.tokens.push(e),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.optionFlags&512&&this.pushToken(new Go(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(e){return this.match(e)?(this.next(),!0):!1}match(e){return this.state.type===e}createLookaheadState(e){return{pos:e.pos,value:null,type:e.type,start:e.start,end:e.end,context:[this.curContext()],inType:e.inType,startLoc:e.startLoc,lastTokEndLoc:e.lastTokEndLoc,curLine:e.curLine,lineStart:e.lineStart,curPosition:e.curPosition}}lookahead(){let e=this.state;this.state=this.createLookaheadState(e),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;let t=this.state;return this.state=e,t}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(e){return Bo.lastIndex=e,Bo.test(this.input)?Bo.lastIndex:e}lookaheadCharCode(){return this.lookaheadCharCodeSince(this.state.pos)}lookaheadCharCodeSince(e){return this.input.charCodeAt(this.nextTokenStartSince(e))}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(e){return _o.lastIndex=e,_o.test(this.input)?_o.lastIndex:e}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(e){let t=this.input.charCodeAt(e);if((t&64512)===55296&&++e<this.input.length){let i=this.input.charCodeAt(e);(i&64512)===56320&&(t=65536+((t&1023)<<10)+(i&1023))}return t}setStrict(e){this.state.strict=e,e&&(this.state.strictErrors.forEach(([t,i])=>this.raise(t,i)),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){if(this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length){this.finishToken(135);return}this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(e){let t;this.isLookahead||(t=this.state.curPosition());let i=this.state.pos,r=this.input.indexOf(e,i+2);if(r===-1)throw this.raise(E.UnterminatedComment,this.state.curPosition());for(this.state.pos=r+e.length,Ir.lastIndex=i+2;Ir.test(this.input)&&Ir.lastIndex<=r;)++this.state.curLine,this.state.lineStart=Ir.lastIndex;if(this.isLookahead)return;let n={type:"CommentBlock",value:this.input.slice(i+2,r),start:this.sourceToOffsetPos(i),end:this.sourceToOffsetPos(r+e.length),loc:new xs(t,this.state.curPosition())};return this.optionFlags&512&&this.pushToken(n),n}skipLineComment(e){let t=this.state.pos,i;this.isLookahead||(i=this.state.curPosition());let r=this.input.charCodeAt(this.state.pos+=e);if(this.state.pos<this.length)for(;!Ts(r)&&++this.state.pos<this.length;)r=this.input.charCodeAt(this.state.pos);if(this.isLookahead)return;let n=this.state.pos,o={type:"CommentLine",value:this.input.slice(t+e,n),start:this.sourceToOffsetPos(t),end:this.sourceToOffsetPos(n),loc:new xs(i,this.state.curPosition())};return this.optionFlags&512&&this.pushToken(o),o}skipSpace(){let e=this.state.pos,t=(this.optionFlags&8192)>0,i;e:for(;this.state.pos<this.length;){let r=this.input.charCodeAt(this.state.pos);switch(r){case 32:case 160:case 9:++this.state.pos;break;case 13:this.input.charCodeAt(this.state.pos+1)===10&&++this.state.pos;case 10:case 8232:case 8233:++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;break;case 47:switch(this.input.charCodeAt(this.state.pos+1)){case 42:{let n=this.skipBlockComment("*/");n!==void 0&&(this.addComment(n),t&&(i??=[]).push(n));break}case 47:{let n=this.skipLineComment(2);n!==void 0&&(this.addComment(n),t&&(i??=[]).push(n));break}default:break e}break;default:if(V6(r))++this.state.pos;else if(r===45&&!this.inModule&&this.optionFlags&16384){let n=this.state.pos;if(this.input.charCodeAt(n+1)===45&&this.input.charCodeAt(n+2)===62&&(e===0||this.state.lineStart>e)){let a=this.skipLineComment(3);a!==void 0&&(this.addComment(a),t&&(i??=[]).push(a))}else break e}else if(r===60&&!this.inModule&&this.optionFlags&16384){let n=this.state.pos;if(this.input.charCodeAt(n+1)===33&&this.input.charCodeAt(n+2)===45&&this.input.charCodeAt(n+3)===45){let a=this.skipLineComment(4);a!==void 0&&(this.addComment(a),t&&(i??=[]).push(a))}else break e}else break e}}if(i?.length){let r=this.state.pos,n={start:this.sourceToOffsetPos(e),end:this.sourceToOffsetPos(r),comments:i,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(n)}}finishToken(e,t){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();let i=this.state.type;this.state.type=e,this.state.value=t,this.isLookahead||this.updateContext(i)}replaceToken(e){this.state.type=e,this.updateContext()}readToken_numberSign(){if(this.state.pos===0&&this.readToken_interpreter())return;let e=this.state.pos+1,t=this.codePointAtPos(e);if(t>=48&&t<=57)throw this.raise(E.UnexpectedDigitAfterHash,this.state.curPosition());lt(t)?(++this.state.pos,this.finishToken(134,this.readWord1(t))):t===92?(++this.state.pos,this.finishToken(134,this.readWord1())):this.finishOp(23,1)}readToken_dot(){let e=this.input.charCodeAt(this.state.pos+1);if(e>=48&&e<=57){this.readNumber(!0);return}e===46&&this.input.charCodeAt(this.state.pos+2)===46?(this.state.pos+=3,this.finishToken(17)):(++this.state.pos,this.finishToken(12))}readToken_slash(){this.input.charCodeAt(this.state.pos+1)===61?this.finishOp(27,2):this.finishOp(52,1)}readToken_interpreter(){if(this.state.pos!==0||this.length<2)return!1;let e=this.input.charCodeAt(this.state.pos+1);if(e!==33)return!1;let t=this.state.pos;for(this.state.pos+=1;!Ts(e)&&++this.state.pos<this.length;)e=this.input.charCodeAt(this.state.pos);let i=this.input.slice(t+2,this.state.pos);return this.finishToken(24,i),!0}readToken_mult_modulo(e){let t=e===42?51:50,i=1,r=this.input.charCodeAt(this.state.pos+1);e===42&&r===42&&(i++,r=this.input.charCodeAt(this.state.pos+2),t=53),r===61&&!this.state.inType&&(i++,t=e===37?29:26),this.finishOp(t,i)}readToken_pipe_amp(e){let t=this.input.charCodeAt(this.state.pos+1);if(t===e){this.input.charCodeAt(this.state.pos+2)===61?this.finishOp(26,3):this.finishOp(e===124?37:38,2);return}if(e===124&&t===62){this.finishOp(35,2);return}if(t===61){this.finishOp(26,2);return}this.finishOp(e===124?39:41,1)}readToken_caret(){let e=this.input.charCodeAt(this.state.pos+1);e===61&&!this.state.inType?this.finishOp(28,2):e===94&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"^^"}])?(this.finishOp(33,2),this.input.codePointAt(this.state.pos)===94&&this.unexpected()):this.finishOp(40,1)}readToken_atSign(){this.input.charCodeAt(this.state.pos+1)===64&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"@@"}])?this.finishOp(34,2):this.finishOp(22,1)}readToken_plus_min(e){let t=this.input.charCodeAt(this.state.pos+1);if(t===e){this.finishOp(30,2);return}t===61?this.finishOp(26,2):this.finishOp(49,1)}readToken_lt(){let{pos:e}=this.state,t=this.input.charCodeAt(e+1);if(t===60){if(this.input.charCodeAt(e+2)===61){this.finishOp(26,3);return}this.finishOp(47,2);return}if(t===61){this.finishOp(45,2);return}this.finishOp(43,1)}readToken_gt(){let{pos:e}=this.state,t=this.input.charCodeAt(e+1);if(t===62){let i=this.input.charCodeAt(e+2)===62?3:2;if(this.input.charCodeAt(e+i)===61){this.finishOp(26,i+1);return}this.finishOp(48,i);return}if(t===61){this.finishOp(45,2);return}this.finishOp(44,1)}readToken_eq_excl(e){let t=this.input.charCodeAt(this.state.pos+1);if(t===61){this.finishOp(42,this.input.charCodeAt(this.state.pos+2)===61?3:2);return}if(e===61&&t===62){this.state.pos+=2,this.finishToken(15);return}this.finishOp(e===61?25:31,1)}readToken_question(){let e=this.input.charCodeAt(this.state.pos+1),t=this.input.charCodeAt(this.state.pos+2);e===63?t===61?this.finishOp(26,3):this.finishOp(36,2):e===46&&!(t>=48&&t<=57)?(this.state.pos+=2,this.finishToken(14)):(++this.state.pos,this.finishToken(13))}getTokenFromCode(e){switch(e){case 46:this.readToken_dot();return;case 40:++this.state.pos,this.finishToken(6);return;case 41:++this.state.pos,this.finishToken(7);return;case 59:++this.state.pos,this.finishToken(9);return;case 44:++this.state.pos,this.finishToken(8);return;case 91:++this.state.pos,this.finishToken(0);return;case 93:++this.state.pos,this.finishToken(1);return;case 123:++this.state.pos,this.finishToken(2);return;case 125:++this.state.pos,this.finishToken(4);return;case 58:this.hasPlugin("functionBind")&&this.input.charCodeAt(this.state.pos+1)===58?this.finishOp(11,2):(++this.state.pos,this.finishToken(10));return;case 63:this.readToken_question();return;case 96:this.readTemplateToken();return;case 48:{let t=this.input.charCodeAt(this.state.pos+1);if(t===120||t===88){this.readRadixNumber(16);return}if(t===111||t===79){this.readRadixNumber(8);return}if(t===98||t===66){this.readRadixNumber(2);return}}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:this.readNumber(!1);return;case 34:case 39:this.readString(e);return;case 47:this.readToken_slash();return;case 37:case 42:this.readToken_mult_modulo(e);return;case 124:case 38:this.readToken_pipe_amp(e);return;case 94:this.readToken_caret();return;case 43:case 45:this.readToken_plus_min(e);return;case 60:this.readToken_lt();return;case 62:this.readToken_gt();return;case 61:case 33:this.readToken_eq_excl(e);return;case 126:this.finishOp(32,1);return;case 64:this.readToken_atSign();return;case 35:this.readToken_numberSign();return;case 92:this.readWord();return;default:if(lt(e)){this.readWord(e);return}}throw this.raise(E.InvalidOrUnexpectedToken,this.state.curPosition(),{unexpected:String.fromCodePoint(e)})}finishOp(e,t){let i=this.input.slice(this.state.pos,this.state.pos+t);this.state.pos+=t,this.finishToken(e,i)}readRegexp(){let e=this.state.startLoc,t=this.state.start+1,i,r,{pos:n}=this.state;for(;;++n){if(n>=this.length)throw this.raise(E.UnterminatedRegExp,Ye(e,1));let l=this.input.charCodeAt(n);if(Ts(l))throw this.raise(E.UnterminatedRegExp,Ye(e,1));if(i)i=!1;else{if(l===91)r=!0;else if(l===93&&r)r=!1;else if(l===47&&!r)break;i=l===92}}let a=this.input.slice(t,n);++n;let o="",c=()=>Ye(e,n+2-t);for(;n<this.length;){let l=this.codePointAtPos(n),u=String.fromCharCode(l);if(z6.has(l))l===118?o.includes("u")&&this.raise(E.IncompatibleRegExpUVFlags,c()):l===117&&o.includes("v")&&this.raise(E.IncompatibleRegExpUVFlags,c()),o.includes(u)&&this.raise(E.DuplicateRegExpFlags,c());else if(Rt(l)||l===92)this.raise(E.MalformedRegExpFlags,c());else break;++n,o+=u}this.state.pos=n,this.finishToken(133,{pattern:a,flags:o})}readInt(e,t,i=!1,r=!0){let{n,pos:a}=YT(this.input,this.state.pos,this.state.lineStart,this.state.curLine,e,t,i,r,this.errorHandlers_readInt,!1);return this.state.pos=a,n}readRadixNumber(e){let t=this.state.pos,i=this.state.curPosition(),r=!1;this.state.pos+=2;let n=this.readInt(e);if(n==null&&this.raise(E.InvalidDigit,Ye(i,2),{radix:e}),this.input.charCodeAt(this.state.pos)===110&&(++this.state.pos,r=!0),lt(this.codePointAtPos(this.state.pos)))throw this.raise(E.NumberIdentifier,this.state.curPosition());if(r){let o=this.input.slice(t,this.state.pos).replace(/[_n]/g,"");this.finishToken(132,o);return}this.finishToken(131,n)}readNumber(e){let t=this.state.pos,i=this.state.curPosition(),r=!1,n=!1,a=!1;!e&&this.readInt(10)===null&&this.raise(E.InvalidNumber,this.state.curPosition());let o=this.state.pos-t>=2&&this.input.charCodeAt(t)===48;if(o){let f=this.input.slice(t,this.state.pos);if(this.recordStrictModeErrors(E.StrictOctalLiteral,i),!this.state.strict){let m=f.indexOf("_");m>0&&this.raise(E.ZeroDigitNumericSeparator,Ye(i,m))}a=o&&!/[89]/.test(f)}let c=this.input.charCodeAt(this.state.pos);c===46&&!a&&(++this.state.pos,this.readInt(10),r=!0,c=this.input.charCodeAt(this.state.pos)),(c===69||c===101)&&!a&&(c=this.input.charCodeAt(++this.state.pos),(c===43||c===45)&&++this.state.pos,this.readInt(10)===null&&this.raise(E.InvalidOrMissingExponent,i),r=!0,c=this.input.charCodeAt(this.state.pos));let l=this.input.slice(t,this.state.pos).replaceAll("_","");if(c===110&&((r||o)&&this.raise(E.InvalidBigIntLiteral,i),++this.state.pos,n=!0),lt(this.codePointAtPos(this.state.pos)))throw this.raise(E.NumberIdentifier,this.state.curPosition());if(n){this.finishToken(132,l);return}let u=a?parseInt(l,8):parseFloat(l);this.finishToken(131,u)}readCodePoint(e){let{code:t,pos:i}=GT(this.input,this.state.pos,this.state.lineStart,this.state.curLine,e,this.errorHandlers_readCodePoint);return this.state.pos=i,t}readString(e){let{str:t,pos:i,curLine:r,lineStart:n}=MT(e===34?"double":"single",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string);this.state.pos=i+1,this.state.lineStart=n,this.state.curLine=r,this.finishToken(130,t)}readTemplateContinuation(){this.match(4)||this.unexpected(null,4),this.state.pos--,this.readTemplateToken()}readTemplateToken(){let e=this.input[this.state.pos],{str:t,firstInvalidLoc:i,pos:r,curLine:n,lineStart:a}=MT("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=r+1,this.state.lineStart=a,this.state.curLine=n,i&&(this.state.firstInvalidTemplateEscapePos=new _e(i.curLine,i.pos-i.lineStart,this.sourceToOffsetPos(i.pos))),this.input.codePointAt(r)===96?this.finishToken(20,i?null:e+t+"`"):(this.state.pos++,this.finishToken(21,i?null:e+t+"${"))}recordStrictModeErrors(e,t){let i=t.index;this.state.strict&&!this.state.strictErrors.has(i)?this.raise(e,t):this.state.strictErrors.set(i,[e,t])}readWord1(e){this.state.containsEsc=!1;let t="",i=this.state.pos,r=this.state.pos;for(e!==void 0&&(this.state.pos+=e<=65535?1:2);this.state.pos<this.length;){let n=this.codePointAtPos(this.state.pos);if(Rt(n))this.state.pos+=n<=65535?1:2;else if(n===92){this.state.containsEsc=!0,t+=this.input.slice(r,this.state.pos);let a=this.state.curPosition(),o=this.state.pos===i?lt:Rt;if(this.input.charCodeAt(++this.state.pos)!==117){this.raise(E.MissingUnicodeEscape,this.state.curPosition()),r=this.state.pos-1;continue}++this.state.pos;let c=this.readCodePoint(!0);c!==null&&(o(c)||this.raise(E.EscapedCharNotAnIdentifier,a),t+=String.fromCodePoint(c)),r=this.state.pos}else break}return t+this.input.slice(r,this.state.pos)}readWord(e){let t=this.readWord1(e),i=pc.get(t);i!==void 0?this.finishToken(i,Ct(i)):this.finishToken(128,t)}checkKeywordEscapes(){let{type:e}=this.state;Sc(e)&&this.state.containsEsc&&this.raise(E.InvalidEscapedReservedWord,this.state.startLoc,{reservedWord:Ct(e)})}raise(e,t,i={}){let r=t instanceof _e?t:typeof t=="number"?this.getLoc(t):this.optionFlags&256?t.loc.start:this.getLoc(t.start),n=t instanceof _e?r.index:typeof t=="number"?t:t.start,a=e(r,n,i);if(!(this.optionFlags&4096))throw a;return this.isLookahead||this.state.errors.push(a),a}raiseOverwrite(e,t,i={}){let r=t instanceof _e?t:this.optionFlags&256?t.loc.start:this.getLoc(t.start),n=t instanceof _e?r.index:t.start,a=this.state.errors;for(let o=a.length-1;o>=0;o--){let c=a[o];if(c.pos===n)return a[o]=e(r,n,i);if(c.pos<n)break}return this.raise(e,r,i)}updateContext(e){}unexpected(e,t){throw this.raise(E.UnexpectedToken,e??this.state.startLoc,{expected:t?Ct(t):null})}expectPlugin(e,t){if(this.hasPlugin(e))return!0;throw this.raise(E.MissingPlugin,t??this.state.startLoc,{missingPlugin:[e]})}expectOnePlugin(e){if(!e.some(t=>this.hasPlugin(t)))throw this.raise(E.MissingOneOfPlugins,this.state.startLoc,{missingPlugin:e})}errorBuilder(e){return(t,i,r)=>{this.raise(e,ci(t,i,r))}}errorHandlers_readInt={invalidDigit:(e,t,i,r)=>{this.raise(E.InvalidDigit,ci(e,t,i),{radix:r})},numericSeparatorInEscapeSequence:this.errorBuilder(E.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(E.UnexpectedNumericSeparator)};errorHandlers_readCodePoint={...this.errorHandlers_readInt,invalidEscapeSequence:this.errorBuilder(E.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(E.InvalidCodePoint)};errorHandlers_readStringContents_string={...this.errorHandlers_readCodePoint,strictNumericEscape:(e,t,i)=>{this.recordStrictModeErrors(E.StrictNumericEscape,ci(e,t,i))},unterminated:(e,t,i)=>{throw this.raise(E.UnterminatedString,ci(e-1,t,i))}};errorHandlers_readStringContents_template={...this.errorHandlers_readCodePoint,strictNumericEscape:this.errorBuilder(E.StrictNumericEscape),unterminated:(e,t,i)=>{throw this.raise(E.UnterminatedTemplate,ci(e,t,i))}}},Zo=class{privateNames=new Set;loneAccessors=new Map;undefinedPrivateNames=new Map},ec=class{parser;stack=[];constructor(e){this.parser=e}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new Zo)}exit(){let e=this.stack.pop(),t=this.current();for(let[i,r]of Array.from(e.undefinedPrivateNames))t?t.undefinedPrivateNames.has(i)||t.undefinedPrivateNames.set(i,r):this.parser.raise(E.InvalidPrivateFieldResolution,r,{identifierName:i})}declarePrivateName(e,t,i){let{privateNames:r,loneAccessors:n,undefinedPrivateNames:a}=this.current(),o=r.has(e);if(t&3){let c=o&&n.get(e);if(c){let l=c&4,u=t&4,f=c&3,m=t&3;o=f===m||l!==u,o||n.delete(e)}else o||n.set(e,t)}o&&this.parser.raise(E.PrivateNameRedeclaration,i,{identifierName:e}),r.add(e),a.delete(e)}usePrivateName(e,t){let i;for(i of this.stack)if(i.privateNames.has(e))return;i?i.undefinedPrivateNames.set(e,t):this.parser.raise(E.InvalidPrivateFieldResolution,t,{identifierName:e})}},gs=class{constructor(e=0){this.type=e}canBeArrowParameterDeclaration(){return this.type===2||this.type===1}isCertainlyParameterDeclaration(){return this.type===3}},Mr=class extends gs{declarationErrors=new Map;constructor(e){super(e)}recordDeclarationError(e,t){this.declarationErrors.set(t,e)}clearDeclarationError(e){this.declarationErrors.delete(e)}iterateErrors(e){this.declarationErrors.forEach(e)}},tc=class{parser;stack=[new gs];constructor(e){this.parser=e}enter(e){this.stack.push(e)}exit(){this.stack.pop()}recordParameterInitializerError(e,t){let{stack:i}=this,r=i.length-1,n=i[r];for(;!n.isCertainlyParameterDeclaration();){if(n.canBeArrowParameterDeclaration())n.recordDeclarationError(e,t);else return;n=i[--r]}this.parser.raise(e,t)}recordArrowParameterBindingError(e,t){let{stack:i}=this,r=i[i.length-1],n=t.start;if(r.isCertainlyParameterDeclaration())this.parser.raise(e,n);else if(r.canBeArrowParameterDeclaration())r.recordDeclarationError(e,n);else return}recordAsyncArrowParametersError(e){let{stack:t}=this,i=t.length-1,r=t[i];for(;r.canBeArrowParameterDeclaration();)r.type===2&&r.recordDeclarationError(E.AwaitBindingIdentifier,e),r=t[--i]}validateAsPattern(){let{stack:e}=this,t=e[e.length-1];t.canBeArrowParameterDeclaration()&&t.iterateErrors((i,r)=>{this.parser.raise(i,r);let n=e.length-2,a=e[n];for(;a.canBeArrowParameterDeclaration();)a.clearDeclarationError(r),a=e[--n]})}};function H6(){return new gs(3)}function Y6(){return new Mr(1)}function G6(){return new Mr(2)}function sc(){return new gs}var ic=class{stacks=[];enter(e){this.stacks.push(e)}exit(){this.stacks.pop()}currentFlags(){return this.stacks[this.stacks.length-1]}get hasAwait(){return(this.currentFlags()&2)>0}get hasYield(){return(this.currentFlags()&1)>0}get hasReturn(){return(this.currentFlags()&4)>0}get hasIn(){return(this.currentFlags()&8)>0}get inFSharpPipelineDirectBody(){return(this.currentFlags()&16)===0}};function Lr(s,e){return(s?2:0)|(e?1:0)}var rc=class extends Qo{addExtra(e,t,i,r=!0){if(!e)return;let{extra:n}=e;n==null&&(n={},e.extra=n),r?n[t]=i:Object.defineProperty(n,t,{enumerable:r,value:i})}isContextual(e){return this.state.type===e&&!this.state.containsEsc}isUnparsedContextual(e,t){if(this.input.startsWith(t,e)){let i=this.input.charCodeAt(e+t.length);return!(Rt(i)||(i&64512)===55296)}return!1}isLookaheadContextual(e){let t=this.nextTokenStart();return this.isUnparsedContextual(t,e)}eatContextual(e){return this.isContextual(e)?(this.next(),!0):!1}expectContextual(e,t){if(!this.eatContextual(e)){if(t!=null)throw this.raise(t,this.state.startLoc);this.unexpected(null,e)}}canInsertSemicolon(){return this.match(135)||this.match(4)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return LT(this.input,this.offsetToSourcePos(this.state.lastTokEndLoc.index),this.state.start)}hasFollowingLineBreak(){return LT(this.input,this.state.end,this.nextTokenStart())}isLineTerminator(){return this.eat(9)||this.canInsertSemicolon()}semicolon(e=!0){(e?this.isLineTerminator():this.eat(9))||this.raise(E.MissingSemicolon,this.state.lastTokEndLoc)}expect(e,t){this.eat(e)||this.unexpected(t,e)}tryParse(e,t=this.state.clone()){let i={node:null};try{let r=e((n=null)=>{throw i.node=n,i});if(this.state.errors.length>t.errors.length){let n=this.state;return this.state=t,this.state.tokensLength=n.tokensLength,{node:r,error:n.errors[t.errors.length],thrown:!1,aborted:!1,failState:n}}return{node:r,error:null,thrown:!1,aborted:!1,failState:null}}catch(r){let n=this.state;if(this.state=t,r instanceof SyntaxError)return{node:null,error:r,thrown:!0,aborted:!1,failState:n};if(r===i)return{node:i.node,error:null,thrown:!1,aborted:!0,failState:n};throw r}}checkExpressionErrors(e,t){if(!e)return!1;let{shorthandAssignLoc:i,doubleProtoLoc:r,privateKeyLoc:n,optionalParametersLoc:a,voidPatternLoc:o}=e,c=!!i||!!r||!!a||!!n||!!o;if(!t)return c;i!=null&&this.raise(E.InvalidCoverInitializedName,i),r!=null&&this.raise(E.DuplicateProto,r),n!=null&&this.raise(E.UnexpectedPrivateField,n),a!=null&&this.unexpected(a),o!=null&&this.raise(E.InvalidCoverDiscardElement,o)}isLiteralPropertyName(){return KT(this.state.type)}isPrivateName(e){return e.type==="PrivateName"}getPrivateNameSV(e){return e.id.name}hasPropertyAsPrivateName(e){return(e.type==="MemberExpression"||e.type==="OptionalMemberExpression")&&this.isPrivateName(e.property)}isObjectProperty(e){return e.type==="ObjectProperty"}isObjectMethod(e){return e.type==="ObjectMethod"}initializeScopes(e=this.options.sourceType==="module"){let t=this.state.labels;this.state.labels=[];let i=this.exportedIdentifiers;this.exportedIdentifiers=new Set;let r=this.inModule;this.inModule=e;let n=this.scope,a=this.getScopeHandler();this.scope=new a(this,e);let o=this.prodParam;this.prodParam=new ic;let c=this.classScope;this.classScope=new ec(this);let l=this.expressionScope;return this.expressionScope=new tc(this),()=>{this.state.labels=t,this.exportedIdentifiers=i,this.inModule=r,this.scope=n,this.prodParam=o,this.classScope=c,this.expressionScope=l}}enterInitialScopes(){let e=0;(this.inModule||this.optionFlags&1)&&(e|=2),this.optionFlags&32&&(e|=1);let t=!this.inModule&&this.options.sourceType==="commonjs";(t||this.optionFlags&2)&&(e|=4),this.prodParam.enter(e);let i=t?514:1;this.optionFlags&4&&(i|=512),this.optionFlags&16&&(i|=48),this.scope.enter(i)}checkDestructuringPrivate(e){let{privateKeyLoc:t}=e;t!==null&&this.expectPlugin("destructuringPrivate",t)}},Ss=class{shorthandAssignLoc=null;doubleProtoLoc=null;privateKeyLoc=null;optionalParametersLoc=null;voidPatternLoc=null},jt=class{constructor(e,t,i,r){this.start=i,this.end=0,r!==void 0&&(this.loc=new xs(r)),e&128&&(this.range=[i,0]),r!==void 0&&t&&(this.loc.filename=t)}type=""},FT=jt.prototype,nc=class extends rc{createPosition(e){return e}startNode(){let{startLoc:e}=this.state;return this.setLoc(e),this.startNodeAt(e)}startNodeAt(e){let{optionFlags:t,filename:i}=this;return t&256?new jt(t,i,e.index,this.createPosition(e)):new jt(t,i,e.index)}startNodeAtNode(e){let{optionFlags:t,filename:i}=this;return t&256?new jt(t,i,e.start,e.loc.start):new jt(t,i,e.start)}finishNode(e,t){return this.finishNodeAt(e,t,this.state.lastTokEndLoc)}finishNodeAt(e,t,i){e.type=t,e.end=i.index;let{optionFlags:r}=this;return r&256&&(e.loc.end=this.createPosition(i)),r&128&&(e.range[1]=i.index),r&8192&&this.processComment(e),e}finishNodeAtNode(e,t,i){e.type=t,e.end=i.end;let{optionFlags:r}=this;return r&256&&(e.loc.end=i.loc.end),r&128&&(e.range[1]=e.end),r&8192&&this.processComment(e),e}resetStartLocation(e,t){e.start=t.index;let{optionFlags:i}=this;i&256&&(e.loc.start=this.createPosition(t)),i&128&&(e.range[0]=t.index)}resetEndLocation(e,t=this.state.lastTokEndLoc){e.end=t.index;let{optionFlags:i}=this;i&256&&(e.loc.end=this.createPosition(t)),i&128&&(e.range[1]=t.index)}resetStartLocationFromNode(e,t){e.start=t.start;let{optionFlags:i}=this;i&256&&(e.loc.start=t.loc.start),i&128&&(e.range[0]=t.start)}resetEndLocationFromNode(e,t){e.end=t.end;let{optionFlags:i}=this;i&256&&(e.loc.end=t.loc.end),i&128&&(e.range[1]=t.end)}castNodeTo(e,t){return e.type=t,e}cloneIdentifier(e){let{type:t,start:i,end:r,loc:n,range:a,name:o}=e,c=Object.create(FT);return c.type=t,c.start=i,c.end=r,c.loc=n,c.range=a,c.name=o,e.extra&&(c.extra=e.extra),c}cloneStringLiteral(e){let{type:t,start:i,end:r,loc:n,range:a,extra:o}=e,c=Object.create(FT);return c.type=t,c.start=i,c.end=r,c.loc=n,c.range=a,c.extra=o,c.value=e.value,c}},ac=s=>s.type==="ParenthesizedExpression"?ac(s.expression):s,oc=class extends nc{toAssignable(e,t=!1){let i;switch((e.type==="ParenthesizedExpression"||e.extra?.parenthesized)&&(i=ac(e),t?i.type==="Identifier"?this.expressionScope.recordArrowParameterBindingError(E.InvalidParenthesizedAssignment,e):i.type!=="CallExpression"&&i.type!=="MemberExpression"&&!this.isOptionalMemberExpression(i)&&this.raise(E.InvalidParenthesizedAssignment,e):this.raise(E.InvalidParenthesizedAssignment,e)),e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":case"VoidPattern":break;case"ObjectExpression":this.castNodeTo(e,"ObjectPattern");for(let r=0,n=e.properties.length,a=n-1;r<n;r++){let o=e.properties[r],c=r===a;this.toAssignableObjectExpressionProp(o,c,t),c&&o.type==="RestElement"&&e.extra?.trailingCommaLoc&&this.raise(E.RestTrailingComma,e.extra.trailingCommaLoc)}break;case"ObjectProperty":{let{key:r,value:n}=e;this.isPrivateName(r)&&this.classScope.usePrivateName(this.getPrivateNameSV(r),r.start),this.toAssignable(n,t);break}case"SpreadElement":throw new Error("Internal @babel/parser error (this is a bug, please report it). SpreadElement should be converted by .toAssignable's caller.");case"ArrayExpression":this.castNodeTo(e,"ArrayPattern"),this.toAssignableList(e.elements,e.extra?.trailingCommaLoc,t);break;case"AssignmentExpression":e.operator!=="="&&this.raise(E.MissingEqInAssignment,this.optionFlags&256?e.left.loc.end:e.left),this.castNodeTo(e,"AssignmentPattern"),delete e.operator,e.left.type==="VoidPattern"&&this.raise(E.VoidPatternInitializer,e.left),this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(i,t);break}}toAssignableObjectExpressionProp(e,t,i){if(e.type==="ObjectMethod")this.raise(e.kind==="get"||e.kind==="set"?E.PatternHasAccessor:E.PatternHasMethod,e.key);else if(e.type==="SpreadElement"){this.castNodeTo(e,"RestElement");let r=e.argument;this.checkToRestConversion(r,!1),this.toAssignable(r,i),t||this.raise(E.RestTrailingComma,e)}else this.toAssignable(e,i)}toAssignableList(e,t,i){let r=e.length-1;for(let n=0;n<=r;n++){let a=e[n];a&&(this.toAssignableListItem(e,n,i),a.type==="RestElement"&&(n<r?this.raise(E.RestTrailingComma,a):t&&this.raise(E.RestTrailingComma,t)))}}toAssignableListItem(e,t,i){let r=e[t];if(r.type==="SpreadElement"){this.castNodeTo(r,"RestElement");let n=r.argument;this.checkToRestConversion(n,!0),this.toAssignable(n,i)}else this.toAssignable(r,i)}isAssignable(e,t){switch(e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":case"VoidPattern":return!0;case"ObjectExpression":{let i=e.properties.length-1;return e.properties.every((r,n)=>r.type!=="ObjectMethod"&&(n===i||r.type!=="SpreadElement")&&this.isAssignable(r))}case"ObjectProperty":return this.isAssignable(e.value);case"SpreadElement":return this.isAssignable(e.argument);case"ArrayExpression":return e.elements.every(i=>i===null||this.isAssignable(i));case"AssignmentExpression":return e.operator==="=";case"ParenthesizedExpression":return this.isAssignable(e.expression);case"MemberExpression":case"OptionalMemberExpression":return!t;default:return!1}}toReferencedList(e,t){return e}parseSpread(e){let t=this.startNode();return this.next(),t.argument=this.parseMaybeAssignAllowIn(e),this.finishNode(t,"SpreadElement")}parseRestBinding(){let e=this.startNode();this.next();let t=this.parseBindingAtom();return t.type==="VoidPattern"&&this.raise(E.UnexpectedVoidPattern,t),e.argument=t,this.finishNode(e,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{let e=this.startNode();return this.next(),e.elements=this.parseBindingList(1,93,1),this.finishNode(e,"ArrayPattern")}case 2:return this.parseObjectLike(4,!0);case 84:return this.parseVoidPattern(null)}return this.parseIdentifier()}parseBindingList(e,t,i){let r=i&1,n=[],a=!0;for(;!this.eat(e);)if(a?a=!1:this.expect(8),r&&this.match(8))n.push(null);else{if(this.eat(e))break;if(this.match(17)){let o=this.parseRestBinding();if(i&2&&(o=this.parseFunctionParamType(o)),n.push(o),!this.checkCommaAfterRest(t)){this.expect(e);break}}else{let o=[];if(i&2)for(this.match(22)&&this.hasPlugin("decorators")&&this.raise(E.UnsupportedParameterDecorator,this.state.startLoc);this.match(22);)o.push(this.parseDecorator());n.push(this.parseBindingElement(i,o))}}return n}parseBindingRestProperty(e){return this.next(),this.hasPlugin("discardBinding")&&this.match(84)?(e.argument=this.parseVoidPattern(null),this.raise(E.UnexpectedVoidPattern,e.argument)):e.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(e,"RestElement")}parseBindingProperty(){let{type:e,startLoc:t}=this.state;if(e===17)return this.parseBindingRestProperty(this.startNode());let i=this.startNode();return e===134?(this.expectPlugin("destructuringPrivate",t),this.classScope.usePrivateName(this.state.value,t),i.key=this.parsePrivateName()):this.parsePropertyName(i),i.method=!1,this.parseObjPropValue(i,t,!1,!1,!0,!1)}parseBindingElement(e,t){let{startLoc:i}=this.state,r=this.parseMaybeDefault();return e&2&&this.parseFunctionParamType(r),t.length&&(r.decorators=t,this.resetStartLocationFromNode(r,t[0])),this.parseMaybeDefault(i,r)}parseFunctionParamType(e){return e}parseMaybeDefault(e,t){if(e??=this.state.startLoc,t=t??this.parseBindingAtom(),!this.eat(25))return t;let i=this.startNodeAt(e);return t.type==="VoidPattern"&&this.raise(E.VoidPatternInitializer,t),i.left=t,i.right=this.parseMaybeAssignAllowIn(),this.finishNode(i,"AssignmentPattern")}isValidLVal(e,t,i,r){switch(e){case"AssignmentPattern":return"left";case"RestElement":return"argument";case"ObjectProperty":return"value";case"ParenthesizedExpression":return"expression";case"ArrayPattern":return"elements";case"ObjectPattern":return"properties";case"VoidPattern":return!0;case"CallExpression":if(!t&&!this.state.strict&&this.optionFlags&16384)return!0}return!1}isOptionalMemberExpression(e){return e.type==="OptionalMemberExpression"}checkLVal(e,t,i=64,r=!1,n=!1,a=!1,o=!1){let c=e.type;if(this.isObjectMethod(e))return;let l=this.isOptionalMemberExpression(e);if(l||c==="MemberExpression"){l&&(this.expectPlugin("optionalChainingAssign",e.start),t.type!=="AssignmentExpression"&&this.raise(E.InvalidLhsOptionalChaining,e,{ancestor:t})),i!==64&&this.raise(E.InvalidPropertyBindingPattern,e);return}if(c==="Identifier"){this.checkIdentifier(e,i,n);let{name:N}=e;r&&(r.has(N)?this.raise(E.ParamDupe,e):r.add(N));return}else c==="VoidPattern"&&t.type==="CatchClause"&&this.raise(E.VoidPatternCatchClauseParam,e);let u=ac(e);o||=u.type==="CallExpression"&&(u.callee.type==="Import"||u.callee.type==="Super");let f=this.isValidLVal(c,o,!(a||e.extra?.parenthesized)&&t.type==="AssignmentExpression",i);if(f===!0)return;if(f===!1){let N=i===64?E.InvalidLhs:E.InvalidLhsBinding;this.raise(N,e,{ancestor:t});return}let m,x;typeof f=="string"?(m=f,x=c==="ParenthesizedExpression"):[m,x]=f;let I=c==="ArrayPattern"||c==="ObjectPattern"?{type:c}:t,L=e[m];if(Array.isArray(L))for(let N of L)N&&this.checkLVal(N,I,i,r,n,x,!0);else L&&this.checkLVal(L,I,i,r,n,x,o)}checkIdentifier(e,t,i=!1){this.state.strict&&(i?zT(e.name,this.inModule):WT(e.name))&&(t===64?this.raise(E.StrictEvalArguments,e,{referenceName:e.name}):this.raise(E.StrictEvalArgumentsBinding,e,{bindingName:e.name})),t&8192&&e.name==="let"&&this.raise(E.LetInLexicalBinding,e),t&64||this.declareNameFromIdentifier(e,t)}declareNameFromIdentifier(e,t){this.scope.declareName(e.name,t,e.start)}checkToRestConversion(e,t){switch(e.type){case"ParenthesizedExpression":this.checkToRestConversion(e.expression,t);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(t)break;default:this.raise(E.InvalidRestAssignmentPattern,e)}}checkCommaAfterRest(e){return this.match(8)?(this.raise(this.lookaheadCharCode()===e?E.RestTrailingComma:E.ElementAfterRest,this.state.startLoc),!0):!1}},cc=class extends oc{checkProto(e,t,i){if(e.type==="SpreadElement"||this.isObjectMethod(e)||e.computed||e.shorthand)return t;let r=e.key;return(r.type==="Identifier"?r.name:r.value)==="__proto__"?(t&&(i?i.doubleProtoLoc===null&&(i.doubleProtoLoc=this.getLoc(r.start)):this.raise(E.DuplicateProto,r)),!0):t}shouldExitDescending(e){return e.type==="ArrowFunctionExpression"&&!e.extra?.parenthesized}getExpression(){if(this.enterInitialScopes(),this.nextToken(),this.match(135))throw this.raise(E.ParseExpressionEmptyInput,this.state.startLoc);let e=this.parseExpression();if(!this.match(135))throw this.raise(E.ParseExpressionExpectsEOF,this.state.startLoc,{unexpected:this.input.codePointAt(this.state.start)});return this.finalizeRemainingComments(),e.comments=this.comments,e.errors=this.state.errors,this.optionFlags&512&&(e.tokens=QT(this.tokens)),e}parseExpression(e,t){return e?this.disallowInAnd(()=>this.parseExpressionBase(t)):this.allowInAnd(()=>this.parseExpressionBase(t))}parseExpressionBase(e){let t=this.state.startLoc,i=this.parseMaybeAssign(e);if(this.match(8)){let r=this.startNodeAt(t);for(r.expressions=[i];this.eat(8);)r.expressions.push(this.parseMaybeAssign(e));return this.toReferencedList(r.expressions),this.finishNode(r,"SequenceExpression")}return i}parseMaybeAssignDisallowIn(e){return this.disallowInAnd(()=>this.parseMaybeAssign(e))}parseMaybeAssignAllowIn(e,t){return this.allowInAnd(()=>this.parseMaybeAssign(e,t))}setOptionalParametersError(e){e.optionalParametersLoc=this.state.startLoc}parseMaybeAssign(e,t){let i=this.state.startLoc,r=this.isContextual(104);if(r&&this.prodParam.hasYield){this.next();let o=this.parseYield(i);return t&&(o=this.parseParenItem(o,i)),o}let n;e?n=!1:(e=new Ss,n=!0),this.state.canStartArrow=!0;let a=this.parseMaybeConditional(e);if(t&&(a=this.parseParenItem(a,i)),S6(this.state.type)){let o=this.startNodeAt(i),c=this.state.value;if(o.operator=c,this.match(25)){this.toAssignable(a,!0),o.left=a;let l=i.index;e.doubleProtoLoc!=null&&e.doubleProtoLoc.index>=l&&(e.doubleProtoLoc=null),e.shorthandAssignLoc!=null&&e.shorthandAssignLoc.index>=l&&(e.shorthandAssignLoc=null),e.privateKeyLoc!=null&&e.privateKeyLoc.index>=l&&(this.checkDestructuringPrivate(e),e.privateKeyLoc=null),e.voidPatternLoc!=null&&e.voidPatternLoc.index>=l&&(e.voidPatternLoc=null)}else o.left=a;return this.next(),o.right=this.parseMaybeAssign(),this.checkLVal(a,this.finishNode(o,"AssignmentExpression"),void 0,void 0,void 0,void 0,c==="||="||c==="&&="||c==="??="),o}else n&&this.checkExpressionErrors(e,!0);if(r){let{type:o}=this.state;if((this.hasPlugin("v8intrinsic")?li(o):li(o)&&!this.match(50))&&!this.isAmbiguousPrefixOrIdentifier())return this.raiseOverwrite(E.YieldNotInGeneratorFunction,i),this.parseYield(i)}return a}parseMaybeConditional(e){let t=this.state.startLoc,i=this.parseExprOps(e);return this.shouldExitDescending(i)?i:this.parseConditional(i,t,e)}parseConditional(e,t,i){if(this.eat(13)){let r=this.startNodeAt(t);return r.test=e,r.consequent=this.parseMaybeAssignAllowIn(),this.expect(10),r.alternate=this.parseMaybeAssign(),this.finishNode(r,"ConditionalExpression")}return e}parseMaybeUnaryOrPrivate(e){return this.match(134)?this.parsePrivateName():this.parseMaybeUnary(e)}parseExprOps(e){let t=this.state.startLoc,i=this.parseMaybeUnaryOrPrivate(e);return this.shouldExitDescending(i)?i:(this.state.canStartArrow=!1,this.parseExprOp(i,t,-1))}parseExprOp(e,t,i){if(this.isPrivateName(e)){let n=this.getPrivateNameSV(e);(i>=Dr(54)||!this.prodParam.hasIn||!this.match(54))&&this.raise(E.PrivateInExpectedIn,t,{identifierName:n}),this.classScope.usePrivateName(n,t)}let r=this.state.type;if(NT(r)&&(this.prodParam.hasIn||!this.match(54))){let n=Dr(r);if(n>i){if(r===35&&(this.expectPlugin("pipelineOperator"),this.prodParam.inFSharpPipelineDirectBody))return e;let a=this.startNodeAt(t);a.left=e,a.operator=this.state.value;let o=r===37||r===38,c=r===36;c&&(n=Dr(38)),this.next(),a.right=this.parseExprOpRightExpr(r,n);let l=this.finishNode(a,o||c?"LogicalExpression":"BinaryExpression"),u=this.state.type;if(c&&(u===37||u===38)||o&&u===36)throw this.raise(E.MixingCoalesceWithLogical,this.state.startLoc);return this.parseExprOp(l,t,i)}}return e}parseExprOpRightExpr(e,t){switch(e){case 35:switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext(()=>this.parseHackPipeBody());case"fsharp":return this.parseFSharpPipelineBody(t)}default:return this.parseExprOpBaseRightExpr(e,t)}}parseExprOpBaseRightExpr(e,t){let i=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),i,A6(e)?t-1:t)}parseHackPipeBody(){let{startLoc:e}=this.state,t=this.parseMaybeAssign();return o6.has(t.type)&&!t.extra?.parenthesized&&this.raise(E.PipeUnparenthesizedBody,e,{type:t.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(E.PipeTopicUnused,e),t}checkExponentialAfterUnary(e){this.match(53)&&this.raise(E.UnexpectedTokenUnaryExponentiation,e.argument)}parseMaybeUnary(e,t){let i=this.state.startLoc,r=this.isContextual(92);if(r&&this.recordAwaitIfAllowed()){this.next();let c=this.parseAwait(i);return t||this.checkExponentialAfterUnary(c),c}let n=this.match(30),a=this.startNode();if(P6(this.state.type)){a.operator=this.state.value,a.prefix=!0,this.state.canStartArrow=!1,this.match(68)&&this.expectPlugin("throwExpressions");let c=this.match(85);if(this.next(),a.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(e,!0),this.state.strict&&c){let l=a.argument;l.type==="Identifier"?this.raise(E.StrictDelete,a):this.hasPropertyAsPrivateName(l)&&this.raise(E.DeletePrivateField,a)}if(!n)return t||this.checkExponentialAfterUnary(a),this.finishNode(a,"UnaryExpression")}let o=this.parseUpdate(a,n,e);if(r){let{type:c}=this.state;if((this.hasPlugin("v8intrinsic")?li(c):li(c)&&!this.match(50))&&!this.isAmbiguousPrefixOrIdentifier())return this.raiseOverwrite(E.AwaitNotInAsyncContext,i),this.parseAwait(i)}return o}parseUpdate(e,t,i){if(t){let a=this.finishNode(e,"UpdateExpression");return this.checkLVal(a.argument,a),a}let r=this.state.startLoc,n=this.parseExprSubscripts(i);if(this.checkExpressionErrors(i,!1))return n;for(;g6(this.state.type)&&!this.canInsertSemicolon();){let a=this.startNodeAt(r);a.operator=this.state.value,a.prefix=!1,a.argument=n,this.next(),this.checkLVal(n,n=this.finishNode(a,"UpdateExpression"))}return n}parseExprSubscripts(e){let t=this.state.startLoc;this.setLoc(t);let i=this.parseExprAtom(e);return this.shouldExitDescending(i)?i:this.parseSubscripts(i,t)}parseSubscripts(e,t,i){let r={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(e),stop:!1};do e=this.parseSubscript(e,t,i,r),r.maybeAsyncArrow=!1;while(!r.stop);return e}parseSubscript(e,t,i,r){let{type:n}=this.state;if(!i&&n===11)return this.parseBind(e,t,r);if(Vo(n))return this.parseTaggedTemplateExpression(e,t,r);let a=!1;if(n===14){if(i&&(this.raise(E.OptionalChainingNoNew,this.state.startLoc),this.lookaheadCharCode()===40))return this.stopParseSubscript(e,r);r.optionalChainMember=a=!0,this.next()}if(!i&&this.match(6))return this.parseCoverCallAndAsyncArrowHead(e,t,r,a);{let o=this.eat(0);return o||a||this.eat(12)?this.parseMember(e,t,r,o,a):this.stopParseSubscript(e,r)}}stopParseSubscript(e,t){return t.stop=!0,e}parseMember(e,t,i,r,n){let a=this.startNodeAt(t);return a.object=e,a.computed=r,r?(a.property=this.parseExpression(),this.expect(1)):this.match(134)?(e.type==="Super"&&this.raise(E.SuperPrivateField,t),this.classScope.usePrivateName(this.state.value,this.state.startLoc),a.property=this.parsePrivateName()):a.property=this.parseIdentifier(!0),i.optionalChainMember?(a.optional=n,this.finishNode(a,"OptionalMemberExpression")):this.finishNode(a,"MemberExpression")}parseBind(e,t,i){let r=this.startNodeAt(t);r.object=e,this.next();let n=this.parseNoCallExpr(a=>{throw this.raise(E.UnsupportedBindRHS,a)});if(n.type==="Super"||n.type==="Import")throw this.raise(E.UnsupportedBindRHS,n);return r.callee=n,i.stop=!0,this.parseSubscripts(this.finishNode(r,"BindExpression"),t,!1)}parseCoverCallAndAsyncArrowHead(e,t,i,r){let n=null;this.next();let a=this.startNodeAt(t);a.callee=e;let{maybeAsyncArrow:o,optionalChainMember:c}=i;o&&(this.expressionScope.enter(G6()),n=new Ss),c&&(a.optional=r),r?a.arguments=this.parseCallExpressionArguments():a.arguments=this.parseCallExpressionArguments(e.type!=="Super",a,n);let l=this.finishCallExpression(a,c);return o&&this.shouldParseAsyncArrow()&&!r?(i.stop=!0,this.checkDestructuringPrivate(n),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),l=this.parseAsyncArrowFromCallExpression(this.startNodeAt(t),l)):(o&&(this.checkExpressionErrors(n,!0),this.expressionScope.exit()),this.toReferencedList(a.arguments)),l}parseTaggedTemplateExpression(e,t,i){let r=this.startNodeAt(t);return r.tag=e,r.quasi=this.parseTemplate(!0),i.optionalChainMember&&this.raise(E.OptionalChainingNoTemplate,t),this.finishNode(r,"TaggedTemplateExpression")}atPossibleAsyncArrow(e){return e.type==="Identifier"&&e.name==="async"&&this.state.lastTokEndLoc.index===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.state.canStartArrow}finishCallExpression(e,t){if(e.callee.type==="Import")if(e.arguments.length===0||e.arguments.length>2)this.raise(E.ImportCallArity,e);else for(let i of e.arguments)i.type==="SpreadElement"&&this.raise(E.ImportCallSpreadArgument,i);return this.finishNode(e,t?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(e,t,i){let r=[],n=!0;for(;!this.eat(7);){if(n)n=!1;else if(this.expect(8),this.match(7)){t&&this.addTrailingCommaExtraToNode(t),this.next();break}r.push(this.parseExprListItem(7,!1,i,e))}return r}shouldParseAsyncArrow(){return this.match(15)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(e,t){return this.resetPreviousNodeTrailingComments(t),this.expect(15),this.parseArrowExpression(e,t.arguments,!0,t.extra?.trailingCommaLoc),t.innerComments&&fi(e,t.innerComments),t.callee.trailingComments&&fi(e,t.callee.trailingComments),e}parseNoCallExpr(e){let t=this.state.startLoc,i=this.match(79),r=this.parseExprAtom();return i&&r.type==="ImportExpression"&&e(r),this.parseSubscripts(r,t,!0)}parseExprAtom(e){let t,i=null,{type:r}=this.state;switch(r){case 75:return this.parseSuper();case 79:return t=this.startNode(),this.next(),this.match(12)?this.parseImportMetaPropertyOrPhaseCall(t):this.match(6)?this.optionFlags&1024?this.parseImportCall(t):this.finishNode(t,"Import"):(this.raise(E.UnsupportedImport,this.state.lastTokStartLoc),this.finishNode(t,"Import"));case 74:return t=this.startNode(),this.next(),this.finishNode(t,"ThisExpression");case 86:return this.parseDo(this.startNode(),!1);case 52:case 27:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 131:return this.parseNumericLiteral(this.state.value);case 132:return this.parseBigIntLiteral(this.state.value);case 130:return this.parseStringLiteral(this.state.value);case 80:return this.parseNullLiteral();case 81:return this.parseBooleanLiteral(!0);case 82:return this.parseBooleanLiteral(!1);case 6:return this.parseParenAndDistinguishExpression(this.state.canStartArrow);case 0:return this.parseArrayLike(1,e);case 2:return this.parseObjectLike(4,!1,e);case 64:return this.parseFunctionOrFunctionSent();case 22:i=this.parseDecorators();case 76:return this.parseClass(this.maybeTakeDecorators(i,this.startNode()),!1);case 73:return this.parseNewOrNewTarget();case 21:case 20:return this.parseTemplate(!1);case 11:{t=this.startNode(),this.next(),t.object=null;let n=t.callee=this.parseNoCallExpr(a=>{throw this.raise(E.UnsupportedBind,a)});if(n.type==="MemberExpression")return this.finishNode(t,"BindExpression");throw this.raise(E.UnsupportedBind,n)}case 134:return this.raise(E.PrivateInExpectedIn,this.state.startLoc,{identifierName:this.state.value}),this.parsePrivateName();case 29:return this.parseTopicReferenceThenEqualsSign(50,"%");case 28:return this.parseTopicReferenceThenEqualsSign(40,"^");case 33:case 34:return this.parseTopicReference("hack");case 40:case 50:case 23:{let n=this.getPluginOption("pipelineOperator","proposal");if(n)return this.parseTopicReference(n);throw this.unexpected()}case 43:{let n=this.input.codePointAt(this.nextTokenStart());throw lt(n)||n===62?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected()}default:if(Te(r)){if(this.isContextual(123)&&this.lookaheadInLineCharCode()===123)return this.parseModuleExpression();let{canStartArrow:n,containsEsc:a}=this.state,o=this.parseIdentifier();if(!a&&o.name==="async"&&!this.canInsertSemicolon()){let{type:c}=this.state;if(c===64)return this.resetPreviousNodeTrailingComments(o),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(o));if(Te(c))return n&&this.lookaheadCharCode()===61?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(o)):o;if(c===86)return this.resetPreviousNodeTrailingComments(o),this.parseDo(this.startNodeAtNode(o),!0)}return n&&this.match(15)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(o),[o],!1)):o}else throw this.unexpected()}}parseTopicReferenceThenEqualsSign(e,t){let i=this.getPluginOption("pipelineOperator","proposal");if(i)return this.state.type=e,this.state.value=t,this.state.pos--,this.state.end--,this.state.endLoc=Ye(this.state.endLoc,-1),this.parseTopicReference(i);throw this.unexpected()}parseTopicReference(e){let t=this.startNode(),i=this.state.startLoc,r=this.state.type;return this.next(),this.finishTopicReference(t,i,e,r)}finishTopicReference(e,t,i,r){if(this.testTopicReferenceConfiguration(i,t,r))return this.topicReferenceIsAllowedInCurrentContext()||this.raise(E.PipeTopicUnbound,t),this.registerTopicReference(),this.finishNode(e,"TopicReference");throw this.raise(E.PipeTopicUnconfiguredToken,t,{token:Ct(r)})}testTopicReferenceConfiguration(e,t,i){if(e==="hack")return this.hasPlugin(["pipelineOperator",{topicToken:Ct(i)}]);throw this.raise(E.PipeTopicRequiresHackPipes,t)}parseAsyncArrowUnaryFunction(e){this.prodParam.enter(Lr(!0,this.prodParam.hasYield));let t=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(E.LineTerminatorBeforeArrow,this.state.curPosition()),this.expect(15),this.parseArrowExpression(e,t,!0)}parseDo(e,t){this.expectPlugin("doExpressions"),t&&this.expectPlugin("asyncDoExpressions"),e.async=t,this.next();let i=this.state.labels;return this.state.labels=[],t?(this.prodParam.enter(2),e.body=this.parseBlock(),this.prodParam.exit()):e.body=this.parseBlock(),this.state.labels=i,this.finishNode(e,"DoExpression")}parseSuper(){let e=this.startNode();return this.next(),this.match(6)&&!this.scope.allowDirectSuper?this.raise(E.SuperNotAllowed,e):this.scope.allowSuper||this.raise(E.UnexpectedSuper,e),!this.match(6)&&!this.match(0)&&!this.match(12)&&this.raise(E.UnsupportedSuper,e),this.finishNode(e,"Super")}parsePrivateName(){let e=this.startNode(),t=this.startNodeAt(Ye(this.state.startLoc,1)),i=this.state.value;return this.next(),e.id=this.createIdentifier(t,i),this.finishNode(e,"PrivateName")}parseFunctionOrFunctionSent(){let e=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(12)){let t=this.createIdentifier(this.startNodeAtNode(e),"function");return this.next(),this.match(99)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected(),this.parseMetaProperty(e,t,"sent")}return this.parseFunction(e)}parseMetaProperty(e,t,i){e.meta=t;let r=this.state.containsEsc;return e.property=this.parseIdentifier(!0),(e.property.name!==i||r)&&this.raise(E.UnsupportedMetaProperty,e.property,{target:t.name,onlyValidPropertyName:i}),this.finishNode(e,"MetaProperty")}parseImportMetaPropertyOrPhaseCall(e){if(this.next(),this.isContextual(101)||this.isContextual(93)){let t=this.isContextual(101);return this.expectPlugin(t?"sourcePhaseImports":"deferredImportEvaluation"),this.next(),e.phase=t?"source":"defer",this.parseImportCall(e)}else{let t=this.createIdentifierAt(this.startNodeAtNode(e),"import",this.state.lastTokStartLoc);return this.isContextual(97)&&(this.inModule||this.raise(E.ImportMetaOutsideModule,t),this.sawUnambiguousESM=!0),this.parseMetaProperty(e,t,"meta")}}parseLiteralAtNode(e,t,i){return this.addExtra(i,"rawValue",e),this.addExtra(i,"raw",this.input.slice(this.offsetToSourcePos(i.start),this.state.end)),i.value=e,this.next(),this.finishNode(i,t)}parseLiteral(e,t){let i=this.startNode();return this.parseLiteralAtNode(e,t,i)}parseStringLiteral(e){return this.parseLiteral(e,"StringLiteral")}parseNumericLiteral(e){return this.parseLiteral(e,"NumericLiteral")}parseBigIntLiteral(e){let t;try{t=BigInt(e)}catch{t=null}return this.parseLiteral(t,"BigIntLiteral")}parseRegExpLiteral(e){let t=this.startNode();return this.addExtra(t,"raw",this.input.slice(this.offsetToSourcePos(t.start),this.state.end)),t.pattern=e.pattern,t.flags=e.flags,this.next(),this.finishNode(t,"RegExpLiteral")}parseBooleanLiteral(e){let t=this.startNode();return t.value=e,this.next(),this.finishNode(t,"BooleanLiteral")}parseNullLiteral(){let e=this.startNode();return this.next(),this.finishNode(e,"NullLiteral")}parseParenAndDistinguishExpression(e){let t=this.state.startLoc,i;this.next(),this.expressionScope.enter(Y6());let r=this.state.startLoc,n=[],a=new Ss,o=!0,c,l;for(;!this.match(7);){if(o)o=!1;else if(this.expect(8,a.optionalParametersLoc===null?null:a.optionalParametersLoc),this.match(7)){l=this.state.startLoc;break}if(this.match(17)){let m=this.state.startLoc;if(c=this.state.startLoc,n.push(this.parseParenItem(this.parseRestBinding(),m)),!this.checkCommaAfterRest(41))break}else n.push(this.parseMaybeAssignAllowInOrVoidPattern(7,a,!0))}let u=this.state.lastTokEndLoc;this.expect(7);let f=this.startNodeAt(t);return e&&this.shouldParseArrow(n)&&(f=this.parseArrow(f))?(this.checkDestructuringPrivate(a),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(f,n,!1),f):(this.expressionScope.exit(),n.length||this.unexpected(this.state.lastTokStartLoc),l&&this.unexpected(l),c&&this.unexpected(c),this.checkExpressionErrors(a,!0),this.toReferencedList(n,!0),n.length>1?(i=this.startNodeAt(r),i.expressions=n,this.finishNode(i,"SequenceExpression"),this.resetEndLocation(i,u)):i=n[0],this.wrapParenthesis(t,i))}wrapParenthesis(e,t){if(!(this.optionFlags&2048))return this.addExtra(t,"parenthesized",!0),this.addExtra(t,"parenStart",e.index),this.takeSurroundingComments(t,e.index,this.state.lastTokEndLoc.index),t;let i=this.startNodeAt(e);return i.expression=t,this.finishNode(i,"ParenthesizedExpression")}shouldParseArrow(e){return!this.canInsertSemicolon()}parseArrow(e){if(this.eat(15))return e}parseParenItem(e,t){return e}parseNewOrNewTarget(){let e=this.startNode();if(this.next(),this.match(12)){let t=this.createIdentifier(this.startNodeAtNode(e),"new");this.next();let i=this.parseMetaProperty(e,t,"target");return this.scope.allowNewTarget||this.raise(E.UnexpectedNewTarget,i),i}return this.parseNew(e)}parseNew(e){if(this.parseNewCallee(e),this.eat(6)){let t=this.parseExprList(7);this.toReferencedList(t),e.arguments=t}else e.arguments=[];return this.finishNode(e,"NewExpression")}parseNewCallee(e){let t=this.parseNoCallExpr(i=>{this.raise(E.ImportCallNotNewExpression,i,i)});e.callee=t,t.type==="Import"&&this.raise(E.ImportCallNotNewExpression,t),t.type==="Super"&&this.raise(E.SuperCallNotNewExpression,t)}parseTemplateElement(e){let{start:t,startLoc:i,end:r,value:n}=this.state,a=t+1,o=this.startNodeAt(Ye(i,1));n===null&&(e||this.raise(E.InvalidEscapeSequenceTemplate,Ye(this.state.firstInvalidTemplateEscapePos,1)));let c=this.match(20),l=c?-1:-2,u=r+l;o.value={raw:this.input.slice(a,u).replace(/\r\n?/g,`
32
+ `),cooked:n===null?null:n.slice(1,l)},o.tail=c,this.next();let f=this.finishNode(o,"TemplateElement");return this.resetEndLocation(f,Ye(this.state.lastTokEndLoc,l)),f}parseTemplate(e){let t=this.startNode(),i=this.parseTemplateElement(e),r=[i],n=[];for(;!i.tail;)n.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),r.push(i=this.parseTemplateElement(e));return t.expressions=n,t.quasis=r,this.finishNode(t,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(e,t,i){let r=!1,n=!0,a=this.startNode();for(a.properties=[],this.next();!this.match(e);){if(n)n=!1;else if(this.expect(8),this.match(e)){this.addTrailingCommaExtraToNode(a);break}let c;t?c=this.parseBindingProperty():(c=this.parsePropertyDefinition(i),r=this.checkProto(c,r,i)),a.properties.push(c)}this.next();let o=t?"ObjectPattern":"ObjectExpression";return this.finishNode(a,o)}addTrailingCommaExtraToNode(e){this.addExtra(e,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(e,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(e){return!e.computed&&e.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(51))}parsePropertyDefinition(e){let t=[];if(this.match(22))for(this.hasPlugin("decorators")&&this.raise(E.UnsupportedPropertyDecorator,this.state.startLoc);this.match(22);)t.push(this.parseDecorator());let i=this.startNode(),r=!1,n=!1,a;if(this.match(17))return t.length&&this.unexpected(),this.parseSpread();t.length&&(i.decorators=t),i.method=!1,e&&(a=this.state.startLoc);let o=this.eat(51);this.parsePropertyNamePrefixOperator(i);let c=this.state.containsEsc;if(this.parsePropertyName(i,e),!o&&!c&&this.maybeAsyncOrAccessorProp(i)){let{key:l}=i,u=l.name;u==="async"&&!this.hasPrecedingLineBreak()&&(r=!0,this.resetPreviousNodeTrailingComments(l),o=this.eat(51),this.parsePropertyName(i)),(u==="get"||u==="set")&&(n=!0,this.resetPreviousNodeTrailingComments(l),i.kind=u,this.match(51)&&(o=!0,this.raise(E.AccessorIsGenerator,this.state.curPosition(),{kind:u}),this.next()),this.parsePropertyName(i))}return this.parseObjPropValue(i,a,o,r,!1,n,e)}getGetterSetterExpectedParamCount(e){return e.kind==="get"?0:1}getObjectOrClassMethodParams(e){return e.params}checkGetterSetterParams(e){let t=this.getGetterSetterExpectedParamCount(e),i=this.getObjectOrClassMethodParams(e);i.length!==t&&this.raise(e.kind==="get"?E.BadGetterArity:E.BadSetterArity,e),e.kind==="set"&&i[i.length-1]?.type==="RestElement"&&this.raise(E.BadSetterRestParameter,e)}parseObjectMethod(e,t,i,r,n){if(n){let a=this.parseMethod(e,t,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(a),a}if(i||t||this.match(6))return r&&this.unexpected(),e.kind="method",e.method=!0,this.parseMethod(e,t,i,!1,!1,"ObjectMethod")}parseObjectProperty(e,t,i,r){if(e.shorthand=!1,this.eat(10))return e.value=i?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowInOrVoidPattern(4,r),this.finishObjectProperty(e);if(!e.computed&&e.key.type==="Identifier"){if(this.checkReservedWord(e.key.name,e.key.start,!0,!1),i)e.value=this.parseMaybeDefault(t,this.cloneIdentifier(e.key));else if(this.match(25)){let n=this.state.startLoc;r!=null?r.shorthandAssignLoc===null&&(r.shorthandAssignLoc=n):this.raise(E.InvalidCoverInitializedName,n),e.value=this.parseMaybeDefault(t,this.cloneIdentifier(e.key))}else e.value=this.cloneIdentifier(e.key);return e.shorthand=!0,this.finishObjectProperty(e)}}finishObjectProperty(e){return this.finishNode(e,"ObjectProperty")}parseObjPropValue(e,t,i,r,n,a,o){let c=this.parseObjectMethod(e,i,r,n,a)||this.parseObjectProperty(e,t,n,o);return c||this.unexpected(),c}parsePropertyName(e,t){if(this.eat(0))e.computed=!0,e.key=this.parseMaybeAssignAllowIn(),this.expect(1);else{let{type:i,value:r}=this.state,n;if(Je(i))n=this.parseIdentifier(!0);else switch(i){case 131:n=this.parseNumericLiteral(r);break;case 130:n=this.parseStringLiteral(r);break;case 132:n=this.parseBigIntLiteral(r);break;case 134:{let a=this.state.startLoc;t!=null?t.privateKeyLoc===null&&(t.privateKeyLoc=a):this.raise(E.UnexpectedPrivateField,a),n=this.parsePrivateName();break}default:throw this.unexpected()}e.key=n,i!==134&&(e.computed=!1)}}initFunction(e,t){e.id=null,e.generator=!1,e.async=t}parseMethod(e,t,i,r,n,a,o=!1){this.initFunction(e,i),e.generator=t,this.scope.enter(530|(o?576:0)|(n?32:0)),this.prodParam.enter(Lr(i,e.generator)),this.parseFunctionParams(e,r);let c=this.parseFunctionBodyAndFinish(e,a,!0);return this.prodParam.exit(),this.scope.exit(),c}parseArrayLike(e,t){let i=this.startNode();return this.next(),i.elements=this.parseExprList(e,!0,t,i),this.finishNode(i,"ArrayExpression")}parseArrowExpression(e,t,i,r){this.scope.enter(518);let n=Lr(i,!1);return this.match(2)||(n|=this.prodParam.currentFlags()&24),this.prodParam.enter(n),this.initFunction(e,i),t&&this.setArrowFunctionParameters(e,t,r),this.parseFunctionBody(e,!0),this.prodParam.exit(),this.scope.exit(),this.finishNode(e,"ArrowFunctionExpression")}setArrowFunctionParameters(e,t,i){this.toAssignableList(t,i,!1),e.params=t}parseFunctionBodyAndFinish(e,t,i=!1){return this.parseFunctionBody(e,!1,i),this.finishNode(e,t)}parseFunctionBody(e,t,i=!1){let r=t&&!this.match(2);if(this.expressionScope.enter(sc()),r)e.body=this.parseMaybeAssign(),this.checkParams(e,!1,t,!1);else{let n=this.state.strict,a=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|4),e.body=this.parseBlock(!0,!1,o=>{let c=!this.isSimpleParamList(e.params);o&&c&&this.raise(E.IllegalLanguageModeDirective,(e.kind==="method"||e.kind==="constructor")&&e.key?this.optionFlags&256?e.key.loc.end:e.key:e);let l=!n&&this.state.strict;this.checkParams(e,!this.state.strict&&!t&&!i&&!c,t,l),this.state.strict&&e.id&&this.checkIdentifier(e.id,65,l)}),this.prodParam.exit(),this.state.labels=a}this.expressionScope.exit()}isSimpleParameter(e){return e.type==="Identifier"}isSimpleParamList(e){for(let t=0,i=e.length;t<i;t++)if(!this.isSimpleParameter(e[t]))return!1;return!0}checkParams(e,t,i,r=!0){let n=!t&&new Set,a={type:"FormalParameters"};for(let o of e.params)this.checkLVal(o,a,5,n,r)}parseExprList(e,t,i,r){let n=[],a=!0;for(;!this.eat(e);){if(a)a=!1;else if(this.expect(8),this.match(e)){r&&this.addTrailingCommaExtraToNode(r),this.next();break}n.push(this.parseExprListItem(e,t,i))}return n}parseExprListItem(e,t,i,r){let n;if(this.match(8))t||this.raise(E.UnexpectedToken,this.state.curPosition(),{unexpected:","}),n=null;else if(this.match(17)){let a=this.state.startLoc;n=this.parseParenItem(this.parseSpread(i),a)}else if(this.match(13)){this.expectPlugin("partialApplication"),r||this.raise(E.UnexpectedArgumentPlaceholder,this.state.startLoc);let a=this.startNode();this.next(),n=this.finishNode(a,"ArgumentPlaceholder")}else n=this.parseMaybeAssignAllowInOrVoidPattern(e,i,!0);return n}parseIdentifier(e){let t=this.startNode(),i=this.parseIdentifierName(e);return this.createIdentifier(t,i)}createIdentifier(e,t){return e.name=t,this.optionFlags&256&&(e.loc.identifierName=t),this.finishNode(e,"Identifier")}createIdentifierAt(e,t,i){return e.name=t,this.optionFlags&256&&(e.loc.identifierName=t),this.finishNodeAt(e,"Identifier",i)}parseIdentifierName(e){let t,{start:i,type:r}=this.state;Je(r)?t=this.state.value:this.unexpected();let n=y6(r);return e?n&&this.replaceToken(128):this.checkReservedWord(t,this.sourceToOffsetPos(i),n,!1),this.next(),t}checkReservedWord(e,t,i,r){if(e.length>10||!L6(e))return;if(i&&v6(e)){this.raise(E.UnexpectedKeyword,t,{keyword:e});return}if((this.state.strict?r?zT:XT:JT)(e,this.inModule)){this.raise(E.UnexpectedReservedWord,t,{reservedWord:e});return}else if(e==="yield"){if(this.prodParam.hasYield){this.raise(E.YieldBindingIdentifier,t);return}}else if(e==="await"){if(this.prodParam.hasAwait){this.raise(E.AwaitBindingIdentifier,t);return}if(this.scope.inStaticBlock){this.raise(E.AwaitBindingIdentifierInStaticBlock,t);return}this.expressionScope.recordAsyncArrowParametersError(t)}else if(e==="arguments"&&this.scope.inClassAndNotInNonArrowFunction){this.raise(E.ArgumentsInClass,t);return}}recordAwaitIfAllowed(){let e=this.prodParam.hasAwait;return e&&!this.scope.inFunction&&(this.state.hasTopLevelAwait=!0),e}parseAwait(e,t){let i=e.index;this.setLoc(e);let r=this.startNodeAt(e);return this.expressionScope.recordParameterInitializerError(E.AwaitExpressionFormalParameter,i),this.eat(51)&&this.raise(E.ObsoleteAwaitStar,e),!this.scope.inFunction&&!(this.optionFlags&1)&&(this.isAmbiguousPrefixOrIdentifier()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),t||(r.argument=this.parseMaybeUnary(null,!0)),this.finishNode(r,"AwaitExpression")}isAmbiguousPrefixOrIdentifier(){if(this.hasPrecedingLineBreak())return!0;let{type:e}=this.state;return e===49||e===6||e===0||Vo(e)||e===98&&!this.state.containsEsc||e===133||e===52||this.hasPlugin("v8intrinsic")&&e===50}parseYield(e){this.setLoc(e);let t=this.startNodeAt(e);this.expressionScope.recordParameterInitializerError(E.YieldInParameter,e.index);let i=!1,r=null;if(!this.hasPrecedingLineBreak())switch(i=this.eat(51),this.state.type){case 9:case 135:case 4:case 7:case 1:case 5:case 10:case 8:if(!i)break;default:r=this.parseMaybeAssign()}return t.delegate=i,t.argument=r,this.finishNode(t,"YieldExpression")}parseImportCall(e){this.next();let t=this.parseCallExpressionArguments();if(t.length===0||t.length>2)this.raise(E.ImportCallArity,e,e);else for(let i of t)i.type==="SpreadElement"&&this.raise(E.ImportCallSpreadArgument,i,e);return e.source=t[0],e.options=t[1]??null,this.finishNode(e,"ImportExpression")}withTopicBindingContext(e){let t=this.state.inHackPipelineBody;this.state.inHackPipelineBody=!0;let i=this.state.seenTopicReference;this.state.seenTopicReference=!1;try{return e()}finally{this.state.inHackPipelineBody=t,this.state.seenTopicReference=i}}allowInAnd(e){let t=this.prodParam.currentFlags();if(24&~t){this.prodParam.enter(t|8|16);try{return e()}finally{this.prodParam.exit()}}return e()}disallowInAnd(e){let t=this.prodParam.currentFlags(),i=8&t,r=16&~t;if(i||r){this.prodParam.enter(t&-9|16);try{return e()}finally{this.prodParam.exit()}}return e()}registerTopicReference(){this.state.seenTopicReference=!0}topicReferenceIsAllowedInCurrentContext(){return this.state.inHackPipelineBody}topicReferenceWasUsedInCurrentContext(){return this.state.seenTopicReference}parseFSharpPipelineBody(e){let t=this.state.startLoc;this.prodParam.enter(this.prodParam.currentFlags()&-17);let i;if(this.isContextual(92)&&this.recordAwaitIfAllowed()){this.next(),i=this.parseAwait(t,!0);let r=this.state.type;NT(r)&&r!==35&&(this.prodParam.hasIn||r!==54)&&this.raise(E.PipelineUnparenthesized,t)}else this.state.canStartArrow=!0,i=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),t,e);return this.prodParam.exit(),i}parseModuleExpression(){this.expectPlugin("moduleBlocks");let e=this.startNode();this.next(),this.match(2)||this.unexpected(null,2);let t=this.startNodeAt(this.state.endLoc);this.next();let i=this.initializeScopes(!0);this.enterInitialScopes();try{e.body=this.parseProgram(t,4,"module")}finally{i()}return this.finishNode(e,"ModuleExpression")}parseVoidPattern(e){this.expectPlugin("discardBinding");let t=this.startNode();return e!=null&&(e.voidPatternLoc=this.state.startLoc),this.next(),this.finishNode(t,"VoidPattern")}parseMaybeAssignAllowInOrVoidPattern(e,t,i){if(t!=null&&this.match(84)){let r=this.lookaheadCharCode();if(r===44||r===(e===1?93:e===4?125:41)||r===61)return this.parseMaybeDefault(this.state.startLoc,this.parseVoidPattern(t))}return this.parseMaybeAssignAllowIn(t,i)}parsePropertyNamePrefixOperator(e){}},jo={kind:1},Q6={kind:2},Z6=/[\uD800-\uDFFF]/u,Ro=/in(?:stanceof)?/y;function QT(s){for(let e=0;e<s.length;e++){let t=s[e],{type:i}=t;typeof i=="number"&&(t.type=qT(i))}return s}var lc=class extends cc{parseTopLevel(e,t){return e.program=this.parseProgram(t,135,this.options.sourceType==="module"?"module":"script"),e.comments=this.comments,this.optionFlags&512&&(e.tokens=QT(this.tokens)),this.finishNode(e,"File")}parseProgram(e,t,i){if(e.sourceType=i,e.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(e,!0,!0,t),this.inModule){if(!(this.optionFlags&64)&&this.scope.undefinedExports.size>0)for(let[n,a]of Array.from(this.scope.undefinedExports))this.raise(E.ModuleExportUndefined,a,{localName:n});this.addExtra(e,"topLevelAwait",this.state.hasTopLevelAwait)}let r;return t===135?r=this.finishNode(e,"Program"):r=this.finishNodeAt(e,"Program",Ye(this.state.startLoc,-1)),r}stmtToDirective(e){let t=this.castNodeTo(e,"Directive"),i=this.castNodeTo(e.expression,"DirectiveLiteral"),r=i.value,n=this.input.slice(this.offsetToSourcePos(i.start),this.offsetToSourcePos(i.end)),a=i.value=n.slice(1,-1);return this.addExtra(i,"raw",n),this.addExtra(i,"rawValue",a),this.addExtra(i,"expressionValue",r),t.value=i,delete e.expression,t}parseInterpreterDirective(){if(!this.match(24))return null;let e=this.startNode();return e.value=this.state.value,this.next(),this.finishNode(e,"InterpreterDirective")}isLet(){return this.isContextual(96)?this.hasFollowingBindingAtom():!1}isUsing(){return this.isContextual(103)?this.nextTokenIsIdentifierOnSameLine():!1}isForUsing(){if(!this.isContextual(103))return!1;let e=this.nextTokenInLineStart(),t=this.codePointAtPos(e);if(this.isUnparsedContextual(e,"of")){let i=this.lookaheadCharCodeSince(e+2);if(i!==61&&i!==58&&i!==59)return!1}return!!(this.chStartsBindingIdentifier(t,e)||this.isUnparsedContextual(e,"void"))}nextTokenIsIdentifierOnSameLine(){let e=this.nextTokenInLineStart(),t=this.codePointAtPos(e);return this.chStartsBindingIdentifier(t,e)}isAwaitUsing(){if(!this.isContextual(92))return!1;let e=this.nextTokenInLineStart();if(this.isUnparsedContextual(e,"using")){e=this.nextTokenInLineStartSince(e+5);let t=this.codePointAtPos(e);if(this.chStartsBindingIdentifier(t,e))return!0}return!1}chStartsBindingIdentifier(e,t){if(lt(e)){if(Ro.lastIndex=t,Ro.test(this.input)){let i=this.codePointAtPos(Ro.lastIndex);if(!Rt(i)&&i!==92)return!1}return!0}else return e===92}chStartsBindingPattern(e){return e===91||e===123}hasFollowingBindingAtom(){let e=this.nextTokenStart(),t=this.codePointAtPos(e);return this.chStartsBindingPattern(t)||this.chStartsBindingIdentifier(t,e)}hasInLineFollowingBindingIdentifierOrBrace(){let e=this.nextTokenInLineStart(),t=this.codePointAtPos(e);return t===123||this.chStartsBindingIdentifier(t,e)}allowsUsing(){return(this.scope.inModule||!this.scope.inTopLevel)&&!this.scope.inBareCaseStatement}parseModuleItem(){return this.parseStatementLike(15)}parseStatementListItem(){return this.parseStatementLike(6|(!this.options.annexB||this.state.strict?0:8))}parseStatementOrSloppyAnnexBFunctionDeclaration(e=!1){let t=0;return this.options.annexB&&!this.state.strict&&(t|=4,e&&(t|=8)),this.parseStatementLike(t)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(e){let t=null;return this.match(22)&&(t=this.parseDecorators(!0)),this.parseStatementContent(e,t)}parseStatementContent(e,t){let i=this.state.type,r=this.startNode(),n=!!(e&2),a=!!(e&4),o=e&1;switch(i){case 56:return this.parseBreakContinueStatement(r,!0);case 59:return this.parseBreakContinueStatement(r,!1);case 60:return this.parseDebuggerStatement(r);case 86:return this.parseDoWhileStatement(r);case 87:return this.parseForStatement(r);case 64:if(this.lookaheadCharCode()===46)break;return a||this.raise(this.state.strict?E.StrictFunction:this.options.annexB?E.SloppyFunctionAnnexB:E.SloppyFunction,this.state.startLoc),this.parseFunctionStatement(r,!1,!n&&a);case 76:return n||this.unexpected(),this.parseClass(this.maybeTakeDecorators(t,r),!0);case 65:return this.parseIfStatement(r);case 66:return this.parseReturnStatement(r);case 67:return this.parseSwitchStatement(r);case 68:return this.parseThrowStatement(r);case 69:return this.parseTryStatement(r);case 92:if(this.isAwaitUsing())return this.allowsUsing()?n?this.recordAwaitIfAllowed()||this.raise(E.AwaitUsingNotInAsyncContext,r):this.raise(E.UnexpectedLexicalDeclaration,r):this.raise(E.UnexpectedUsingDeclaration,r),this.next(),this.parseVarStatement(r,"await using");break;case 103:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifierOrBrace())break;return this.allowsUsing()?n||this.raise(E.UnexpectedLexicalDeclaration,this.state.startLoc):this.raise(E.UnexpectedUsingDeclaration,this.state.startLoc),this.parseVarStatement(r,"using");case 96:{if(this.state.containsEsc)break;let u=this.nextTokenStart(),f=this.codePointAtPos(u);if(f!==91&&(!n&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(f,u)&&f!==123))break}case 71:n||this.raise(E.UnexpectedLexicalDeclaration,this.state.startLoc);case 70:{let u=this.state.value;return this.parseVarStatement(r,u)}case 88:return this.parseWhileStatement(r);case 72:return this.parseWithStatement(r);case 2:return this.parseBlock();case 9:return this.parseEmptyStatement(r);case 79:{let u=this.lookaheadCharCode();if(u===40||u===46)break}case 78:{!(this.optionFlags&8)&&!o&&this.raise(E.UnexpectedImportExport,this.state.startLoc),this.next();let u;return i===79?u=this.parseImport(r):u=this.parseExport(r,t),this.assertModuleNodeAllowed(u),u}default:if(this.isAsyncFunction())return n||this.raise(E.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(r,!0,!n&&a)}let c=this.state.value,l=this.parseExpression();return Te(i)&&l.type==="Identifier"&&this.eat(10)?this.parseLabeledStatement(r,c,l,e):this.parseExpressionStatement(r,l)}assertModuleNodeAllowed(e){!(this.optionFlags&8)&&!this.inModule&&this.raise(E.ImportOutsideModule,e)}maybeTakeDecorators(e,t,i){return e&&(t.decorators?.length?(this.raise(E.DecoratorsBeforeAfterExport,t.decorators[0]),t.decorators.unshift(...e)):t.decorators=e,this.resetStartLocationFromNode(t,e[0]),i&&this.resetStartLocationFromNode(i,t)),t}canHaveLeadingDecorator(){return this.match(76)}parseDecorators(e){let t=[];do t.push(this.parseDecorator());while(this.match(22));if(this.match(78))e||this.unexpected();else if(!this.canHaveLeadingDecorator())throw this.raise(E.UnexpectedLeadingDecorator,this.state.startLoc);return t}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);let e=this.startNode();if(this.next(),this.hasPlugin("decorators")){let t=this.state.startLoc,i;if(this.match(6)){let r=this.state.startLoc;this.next(),i=this.parseExpression(),this.expect(7),i=this.wrapParenthesis(r,i);let n=this.state.startLoc;e.expression=this.parseMaybeDecoratorArguments(i,r),e.expression!==i&&this.raise(E.DecoratorArgumentsOutsideParentheses,n)}else{for(i=this.parseIdentifier(!1);this.eat(12);){let r=this.startNodeAt(t);r.object=i,this.match(134)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),r.property=this.parsePrivateName()):r.property=this.parseIdentifier(!0),r.computed=!1,i=this.finishNode(r,"MemberExpression")}e.expression=this.parseMaybeDecoratorArguments(i,t)}}else this.state.canStartArrow=!1,e.expression=this.parseExprSubscripts();return this.finishNode(e,"Decorator")}parseMaybeDecoratorArguments(e,t){if(this.eat(6)){let i=this.startNodeAt(t);return i.callee=e,i.arguments=this.parseCallExpressionArguments(),this.toReferencedList(i.arguments),this.finishNode(i,"CallExpression")}return e}parseBreakContinueStatement(e,t){return this.next(),this.isLineTerminator()?e.label=null:(e.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(e,t),this.finishNode(e,t?"BreakStatement":"ContinueStatement")}verifyBreakContinue(e,t){let i;for(i=0;i<this.state.labels.length;++i){let r=this.state.labels[i];if((e.label==null||r.name===e.label.name)&&(r.kind!=null&&(t||r.kind===1)||e.label&&t))break}if(i===this.state.labels.length){let r=t?"BreakStatement":"ContinueStatement";this.raise(E.IllegalBreakContinue,e,{type:r})}}parseDebuggerStatement(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")}parseHeaderExpression(){this.expect(6);let e=this.parseExpression();return this.expect(7),e}parseDoWhileStatement(e){return this.next(),this.state.labels.push(jo),e.body=this.parseStatement(),this.state.labels.pop(),this.expect(88),e.test=this.parseHeaderExpression(),this.eat(9),this.finishNode(e,"DoWhileStatement")}parseForStatement(e){this.next(),this.state.labels.push(jo);let t=null;if(this.isContextual(92)&&this.recordAwaitIfAllowed()&&(t=this.state.startLoc,this.next()),this.scope.enter(0),this.expect(6),this.match(9))return t!==null&&this.unexpected(t),this.parseFor(e,null);let i=this.isContextual(96);{let c=this.isAwaitUsing(),l=c||this.isForUsing(),u=i&&this.hasFollowingBindingAtom()||l;if(this.match(70)||this.match(71)||u){let f=this.startNode(),m;c?(m="await using",this.recordAwaitIfAllowed()||this.raise(E.AwaitUsingNotInAsyncContext,this.state.startLoc),this.next()):m=this.state.value,this.next(),this.parseVar(f,!0,m);let x=this.finishNode(f,"VariableDeclaration"),I=this.match(54);return I&&l&&this.raise(E.ForInUsing,x),(I||this.isContextual(98))&&x.declarations.length===1?this.parseForX(e,x,t):(t!==null&&this.unexpected(t),this.parseFor(e,x))}}let r=this.isContextual(91),n=new Ss,a=this.parseExpression(!0,n),o=this.isContextual(98);if(o&&(i&&this.raise(E.ForOfLet,a),t===null&&r&&a.type==="Identifier"&&this.raise(E.ForOfAsync,a)),o||this.match(54)){this.checkDestructuringPrivate(n),this.toAssignable(a,!0);let c=o?"ForOfStatement":"ForInStatement";return this.checkLVal(a,{type:c}),this.parseForX(e,a,t)}else this.checkExpressionErrors(n,!0);return t!==null&&this.unexpected(t),this.parseFor(e,a)}parseFunctionStatement(e,t,i){return this.next(),this.parseFunction(e,1|(i?2:0)|(t?8:0))}parseIfStatement(e){return this.next(),e.test=this.parseHeaderExpression(),e.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),e.alternate=this.eat(62)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(e,"IfStatement")}parseReturnStatement(e){return this.prodParam.hasReturn||this.raise(E.IllegalReturn,this.state.startLoc),this.next(),this.isLineTerminator()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")}parseSwitchStatement(e){this.next(),e.discriminant=this.parseHeaderExpression();let t=e.cases=[];this.expect(2),this.state.labels.push(Q6),this.scope.enter(256);let i;for(let r;!this.match(4);)if(this.match(57)||this.match(61)){let n=this.match(57);i&&this.finishNode(i,"SwitchCase"),t.push(i=this.startNode()),i.consequent=[],this.next(),n?i.test=this.parseExpression():(r&&this.raise(E.MultipleDefaultsInSwitch,this.state.lastTokStartLoc),r=!0,i.test=null),this.expect(10)}else i?i.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),i&&this.finishNode(i,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(e,"SwitchStatement")}parseThrowStatement(e){return this.next(),this.hasPrecedingLineBreak()&&this.raise(E.NewlineAfterThrow,this.state.lastTokEndLoc),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")}parseCatchClauseParam(){let e=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&e.type==="Identifier"?8:0),this.checkLVal(e,{type:"CatchClause"},9),e}parseTryStatement(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.match(58)){let t=this.startNode();this.next(),this.match(6)?(this.expect(6),t.param=this.parseCatchClauseParam(),this.expect(7)):(t.param=null,this.scope.enter(0)),t.body=this.parseBlock(!1,!1),this.scope.exit(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(63)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(E.NoCatchOrFinally,e),this.finishNode(e,"TryStatement")}parseVarStatement(e,t,i=!1){return this.next(),this.parseVar(e,!1,t,i),this.semicolon(),this.finishNode(e,"VariableDeclaration")}parseWhileStatement(e){return this.next(),e.test=this.parseHeaderExpression(),this.state.labels.push(jo),e.body=this.parseStatement(),this.state.labels.pop(),this.finishNode(e,"WhileStatement")}parseWithStatement(e){return this.state.strict&&this.raise(E.StrictWith,this.state.startLoc),this.next(),e.object=this.parseHeaderExpression(),e.body=this.parseStatement(),this.finishNode(e,"WithStatement")}parseEmptyStatement(e){return this.next(),this.finishNode(e,"EmptyStatement")}parseLabeledStatement(e,t,i,r){for(let a of this.state.labels)a.name===t&&this.raise(E.LabelRedeclaration,i,{labelName:t});let n=x6(this.state.type)?1:this.match(67)?2:null;for(let a=this.state.labels.length-1;a>=0;a--){let o=this.state.labels[a];if(o.statementStart===e.start)o.statementStart=this.sourceToOffsetPos(this.state.start),o.kind=n;else break}return this.state.labels.push({name:t,kind:n,statementStart:this.sourceToOffsetPos(this.state.start)}),e.body=r&8?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),e.label=i,this.finishNode(e,"LabeledStatement")}parseExpressionStatement(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")}parseBlock(e=!1,t=!0,i){let r=this.startNode();return e&&this.state.strictErrors.clear(),this.expect(2),t&&this.scope.enter(0),this.parseBlockBody(r,e,!1,4,i),t&&this.scope.exit(),this.finishNode(r,"BlockStatement")}isValidDirective(e){return e.type==="ExpressionStatement"&&e.expression.type==="StringLiteral"&&!e.expression.extra.parenthesized}parseBlockBody(e,t,i,r,n){let a=e.body=[],o=e.directives=[];this.parseBlockOrModuleBlockBody(a,t?o:void 0,i,r,n)}parseBlockOrModuleBlockBody(e,t,i,r,n){let a=this.state.strict,o=!1,c=!1;for(;!this.match(r);){let l=i?this.parseModuleItem():this.parseStatementListItem();if(t&&!c){if(this.isValidDirective(l)){let u=this.stmtToDirective(l);t.push(u),!o&&u.value.value==="use strict"&&(o=!0,this.setStrict(!0));continue}c=!0,this.state.strictErrors.clear()}e.push(l)}n?.call(this,o),a||this.setStrict(!1),this.next()}parseFor(e,t){return e.init=t,this.semicolon(!1),e.test=this.match(9)?null:this.parseExpression(),this.semicolon(!1),e.update=this.match(7)?null:this.parseExpression(),this.expect(7),e.body=this.parseStatement(),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,"ForStatement")}parseForX(e,t,i){let r=this.match(54);return this.next(),r?i!==null&&this.unexpected(i):e.await=i!==null,t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!r||!this.options.annexB||this.state.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier")&&this.raise(E.ForInOfLoopInitializer,t,{type:r?"ForInStatement":"ForOfStatement"}),t.type==="AssignmentPattern"&&this.raise(E.InvalidLhs,t,{ancestor:{type:"ForStatement"}}),e.left=t,e.right=r?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(7),e.body=this.parseStatement(),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,r?"ForInStatement":"ForOfStatement")}parseVar(e,t,i,r=!1){let n=e.declarations=[];for(e.kind=i;;){let a=this.startNode();if(this.parseVarId(a,i),a.init=this.eat(25)?t?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,a.init===null&&!r&&(a.id.type!=="Identifier"&&!(t&&(this.match(54)||this.isContextual(98)))?this.raise(E.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"destructuring"}):(i==="const"||i==="using"||i==="await using")&&!(this.match(54)||this.isContextual(98))&&this.raise(E.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:i})),n.push(this.finishNode(a,"VariableDeclarator")),!this.eat(8))break}return e}parseVarId(e,t){let i=this.parseBindingAtom();t==="using"||t==="await using"?(i.type==="ArrayPattern"||i.type==="ObjectPattern")&&this.raise(E.UsingDeclarationHasBindingPattern,i):i.type==="VoidPattern"&&this.raise(E.UnexpectedVoidPattern,i),this.checkLVal(i,{type:"VariableDeclarator"},t==="var"?5:8201),e.id=i}parseAsyncFunctionExpression(e){return this.parseFunction(e,8)}parseFunction(e,t=0){let i=t&2,r=!!(t&1),n=r&&!(t&4),a=!!(t&8);return this.initFunction(e,a),this.match(51)&&(i&&this.raise(E.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),e.generator=!0),r&&(e.id=this.parseFunctionId(n)),this.scope.enter(514),this.prodParam.enter(Lr(a,e.generator)),!r&&Te(this.state.type)&&(this.expressionScope.enter(sc()),e.id=this.parseFunctionId(),this.expressionScope.exit()),this.parseFunctionParams(e,!1),this.parseFunctionBodyAndFinish(e,r?"FunctionDeclaration":"FunctionExpression"),this.prodParam.exit(),this.scope.exit(),r&&!i&&this.registerFunctionStatementId(e),e}parseFunctionId(e){return e||Te(this.state.type)?this.parseIdentifier():null}parseFunctionParams(e,t){this.expect(6),this.expressionScope.enter(H6()),e.params=this.parseBindingList(7,41,2|(t?4:0)),this.expressionScope.exit()}registerFunctionStatementId(e){e.id&&this.scope.declareName(e.id.name,!this.options.annexB||this.state.strict||e.generator||e.async?this.scope.treatFunctionsAsVar?5:8201:17,e.id.start)}parseClass(e,t,i){this.next();let r=this.state.strict;return this.state.strict=!0,this.parseClassId(e,t,i),this.parseClassSuper(e),e.body=this.parseClassBody(!!e.superClass,r),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(25)||this.match(9)||this.match(4)}isClassMethod(){return this.match(6)}nameIsConstructor(e){return e.type==="Identifier"&&e.name==="constructor"||e.type==="StringLiteral"&&e.value==="constructor"}isNonstaticConstructor(e){return!e.computed&&!e.static&&this.nameIsConstructor(e.key)}parseClassBody(e,t){this.classScope.enter();let i={hadConstructor:!1,hadSuperClass:e},r=[],n=this.startNode();for(n.body=[],this.expect(2);!this.match(4);){if(this.eat(9)){if(r.length>0)throw this.raise(E.DecoratorSemicolon,this.state.lastTokEndLoc);continue}if(this.match(22)){r.push(this.parseDecorator());continue}let a=this.startNode();r.length&&(a.decorators=r,this.resetStartLocationFromNode(a,r[0]),r=[]),this.parseClassMember(n,a,i)}if(this.state.strict=t,this.next(),r.length)throw this.raise(E.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(n,"ClassBody")}parseClassMemberFromModifier(e,t){let i=this.parseIdentifier(!0);if(this.isClassMethod()){let r=t;return r.kind="method",r.computed=!1,r.key=i,r.static=!1,this.pushClassMethod(e,r,!1,!1,!1,!1),!0}else if(this.isClassProperty()){let r=t;return r.computed=!1,r.key=i,r.static=!1,e.body.push(this.parseClassProperty(r)),!0}return this.resetPreviousNodeTrailingComments(i),!1}parseClassMember(e,t,i){let r=this.isContextual(102);if(r){if(this.parseClassMemberFromModifier(e,t))return;if(this.eat(2)){this.parseClassStaticBlock(e,t);return}}this.parseClassMemberWithIsStatic(e,t,i,r)}parseClassMemberWithIsStatic(e,t,i,r){let n=t,a=t,o=t,c=t,l=t,u=n,f=n;if(t.static=r,this.parsePropertyNamePrefixOperator(t),this.eat(51)){u.kind="method";let w=this.match(134);if(this.parseClassElementName(u),this.parsePostMemberNameModifiers(u),w){this.pushClassPrivateMethod(e,a,!0,!1);return}this.isNonstaticConstructor(n)&&this.raise(E.ConstructorIsGenerator,n.key),this.pushClassMethod(e,n,!0,!1,!1,!1);return}let m=!this.state.containsEsc&&Te(this.state.type),x=this.parseClassElementName(t),I=m?x.name:null,L=this.isPrivateName(x),N=this.state.startLoc;if(this.parsePostMemberNameModifiers(f),this.isClassMethod()){if(u.kind="method",L){this.pushClassPrivateMethod(e,a,!1,!1);return}let w=this.isNonstaticConstructor(n),v=!1;w&&(n.kind="constructor",n.decorators&&n.decorators.length>0&&this.raise(E.DecoratorConstructor,t),i.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(E.DuplicateConstructor,x),w&&this.hasPlugin("typescript")&&t.override&&this.raise(E.OverrideOnConstructor,x),i.hadConstructor=!0,v=i.hadSuperClass),this.pushClassMethod(e,n,!1,!1,w,v)}else if(this.isClassProperty())L?this.pushClassPrivateProperty(e,c):this.pushClassProperty(e,o);else if(I==="async"&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(x);let w=this.eat(51);f.optional&&this.unexpected(N),u.kind="method";let v=this.match(134);this.parseClassElementName(u),this.parsePostMemberNameModifiers(f),v?this.pushClassPrivateMethod(e,a,w,!0):(this.isNonstaticConstructor(n)&&this.raise(E.ConstructorIsAsync,n.key),this.pushClassMethod(e,n,w,!0,!1,!1))}else if((I==="get"||I==="set")&&!(this.match(51)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(x),u.kind=I;let w=this.match(134);this.parseClassElementName(n),w?this.pushClassPrivateMethod(e,a,!1,!1):(this.isNonstaticConstructor(n)&&this.raise(E.ConstructorIsAccessor,n.key),this.pushClassMethod(e,n,!1,!1,!1,!1)),this.checkGetterSetterParams(n)}else if(I==="accessor"&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(x);let w=this.match(134);this.parseClassElementName(o),this.pushClassAccessorProperty(e,l,w)}else this.isLineTerminator()?L?this.pushClassPrivateProperty(e,c):this.pushClassProperty(e,o):this.unexpected()}parseClassElementName(e){let{type:t,value:i}=this.state;if((t===128||t===130)&&e.static&&i==="prototype"&&this.raise(E.StaticPrototype,this.state.startLoc),t===134){i==="constructor"&&this.raise(E.ConstructorClassPrivateField,this.state.startLoc);let r=this.parsePrivateName();return e.key=r,r}return this.parsePropertyName(e),e.key}parseClassStaticBlock(e,t){this.scope.enter(720);let i=this.state.labels;this.state.labels=[],this.prodParam.enter(0);let r=t.body=[];this.parseBlockOrModuleBlockBody(r,void 0,!1,4),this.prodParam.exit(),this.scope.exit(),this.state.labels=i,e.body.push(this.finishNode(t,"StaticBlock")),t.decorators?.length&&this.raise(E.DecoratorStaticBlock,t)}pushClassProperty(e,t){!t.computed&&this.nameIsConstructor(t.key)&&this.raise(E.ConstructorClassField,t.key),e.body.push(this.parseClassProperty(t))}pushClassPrivateProperty(e,t){let i=this.parseClassPrivateProperty(t);e.body.push(i),this.classScope.declarePrivateName(this.getPrivateNameSV(i.key),0,i.key.start)}pushClassAccessorProperty(e,t,i){!i&&!t.computed&&this.nameIsConstructor(t.key)&&this.raise(E.ConstructorClassField,t.key);let r=this.parseClassAccessorProperty(t);e.body.push(r),i&&this.classScope.declarePrivateName(this.getPrivateNameSV(r.key),0,r.key.start)}pushClassMethod(e,t,i,r,n,a){e.body.push(this.parseMethod(t,i,r,n,a,"ClassMethod",!0))}pushClassPrivateMethod(e,t,i,r){let n=this.parseMethod(t,i,r,!1,!1,"ClassPrivateMethod",!0);e.body.push(n);let a=n.kind==="get"?n.static?6:2:n.kind==="set"?n.static?5:1:0;this.declareClassPrivateMethodInScope(n,a)}declareClassPrivateMethodInScope(e,t){this.classScope.declarePrivateName(this.getPrivateNameSV(e.key),t,e.key.start)}parsePostMemberNameModifiers(e){}parseClassPrivateProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassPrivateProperty")}parseClassProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassProperty")}parseClassAccessorProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassAccessorProperty")}parseInitializer(e){this.scope.enter(592),this.expressionScope.enter(sc()),this.prodParam.enter(0),e.value=this.eat(25)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(e,t,i,r=8331){if(Te(this.state.type))e.id=this.parseIdentifier(),t&&this.declareNameFromIdentifier(e.id,r);else if(i||!t)e.id=null;else throw this.raise(E.MissingClassName,this.state.startLoc)}parseClassSuper(e){this.eat(77)?(this.state.canStartArrow=!1,e.superClass=this.parseExprSubscripts()):e.superClass=null}parseExport(e,t){let i=this.parseMaybeImportPhase(e,!0),r=this.maybeParseExportDefaultSpecifier(e,i),n=!r||this.eat(8),a=n&&this.eatExportStar(e),o=a&&this.maybeParseExportNamespaceSpecifier(e),c=n&&(!o||this.eat(8)),l=r||a;if(a&&!o){if(r&&this.unexpected(),t)throw this.raise(E.UnsupportedDecoratorExport,e);return this.parseExportFrom(e,!0),this.sawUnambiguousESM=!0,this.finishNode(e,"ExportAllDeclaration")}let u=this.maybeParseExportNamedSpecifiers(e);r&&n&&!a&&!u&&this.unexpected(null,2),o&&c&&this.unexpected(null,94);let f;if(l||u){if(f=!1,t)throw this.raise(E.UnsupportedDecoratorExport,e);this.parseExportFrom(e,l)}else f=this.maybeParseExportDeclaration(e);if(l||u||f){let m=e;if(this.checkNamedExport(m,!!m.source),m.declaration?.type==="ClassDeclaration")this.maybeTakeDecorators(t,m.declaration,m);else if(t)throw this.raise(E.UnsupportedDecoratorExport,e);return this.sawUnambiguousESM=!0,this.finishNode(m,"ExportNamedDeclaration")}if(this.eat(61)){let m=e,x=this.parseExportDefaultExpression();if(m.declaration=x,x.type==="ClassDeclaration")this.maybeTakeDecorators(t,x,m);else if(t)throw this.raise(E.UnsupportedDecoratorExport,e);return this.checkDuplicateExports(e,"default"),this.hasPlugin("exportDefaultFrom")&&x.type==="Identifier"&&x.name==="from"&&x.end-x.start===4&&!x.extra?.parenthesized&&this.raise(E.ExportDefaultFromAsIdentifier,x),this.sawUnambiguousESM=!0,this.finishNode(m,"ExportDefaultDeclaration")}throw this.unexpected(null,2)}eatExportStar(e){return this.eat(51)}maybeParseExportDefaultSpecifier(e,t){if(t||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",t?.start);let i=t||this.parseIdentifier(!0),r=this.startNodeAtNode(i);return r.exported=i,e.specifiers=[this.finishNode(r,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(e){if(this.isContextual(89)){e.specifiers??=[];let t=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),t.exported=this.parseModuleExportName(),e.specifiers.push(this.finishNode(t,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(e){if(this.match(2)){let t=e;t.specifiers||(t.specifiers=[]);let i=t.exportKind==="type";return t.specifiers.push(...this.parseExportSpecifiers(i)),t.source=null,t.attributes=[],t.declaration=null,!0}return!1}maybeParseExportDeclaration(e){return this.shouldParseExportDeclaration()?(e.specifiers=[],e.source=null,e.attributes=[],e.declaration=this.parseExportDeclaration(e),!0):!1}isAsyncFunction(){if(!this.isContextual(91))return!1;let e=this.nextTokenInLineStart();return this.isUnparsedContextual(e,"function")}parseExportDefaultExpression(){let e=this.startNode();if(this.match(64))return this.next(),this.parseFunction(e,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(e,13);if(this.match(76))return this.parseClass(e,!0,!0);if(this.match(22))return this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0);if(this.match(71)||this.match(70)||this.isLet()||this.isUsing()||this.isAwaitUsing())throw this.raise(E.UnsupportedDefaultExport,this.state.startLoc);let t=this.parseMaybeAssignAllowIn();return this.semicolon(),t}parseExportDeclaration(e){return this.match(76)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){let{type:e}=this.state;if(Te(e)){if(e===91&&!this.state.containsEsc||e===96)return!1;if((e===126||e===125)&&!this.state.containsEsc){let r=this.nextTokenStart(),n=this.input.charCodeAt(r);if(n===123||this.chStartsBindingIdentifier(n,r)&&!this.input.startsWith("from",r))return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(61))return!1;let t=this.nextTokenStart(),i=this.isUnparsedContextual(t,"from");if(this.input.charCodeAt(t)===44||Te(this.state.type)&&i)return!0;if(this.match(61)&&i){let r=this.input.charCodeAt(this.nextTokenStartSince(t+4));return r===34||r===39}return!1}parseExportFrom(e,t){this.eatContextual(94)?(e.source=this.parseImportSource(),this.maybeParseImportAttributes(e)):t&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){let{type:e}=this.state;return e===22&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))?!0:this.isUsing()?(this.raise(E.UsingDeclarationExport,this.state.startLoc),!0):this.isAwaitUsing()?(this.raise(E.UsingDeclarationExport,this.state.startLoc),!0):e===70||e===71||e===64||e===76||this.isLet()||this.isAsyncFunction()}checkNamedExport(e,t){if(e.specifiers?.length)for(let i of e.specifiers){let{exported:r}=i,n=r.type==="Identifier"?r.name:r.value;if(this.checkDuplicateExports(i,n),!t&&i.type==="ExportSpecifier"){let{local:a}=i;a.type!=="Identifier"?this.raise(E.ExportBindingIsString,i,{localName:a.value,exportName:n}):(this.checkReservedWord(a.name,a.start,!0,!1),this.scope.checkLocalExport(a))}}else if(e.declaration){let i=e.declaration;if(i.type==="FunctionDeclaration"||i.type==="ClassDeclaration"){let{id:r}=i;if(!r)throw new Error("Assertion failure");this.checkDuplicateExports(e,r.name)}else if(i.type==="VariableDeclaration")for(let r of i.declarations)this.checkDeclaration(r.id)}}checkDeclaration(e){if(e.type==="Identifier")this.checkDuplicateExports(e,e.name);else if(e.type==="ObjectPattern")for(let t of e.properties)this.checkDeclaration(t);else if(e.type==="ArrayPattern")for(let t of e.elements)t&&this.checkDeclaration(t);else e.type==="ObjectProperty"?this.checkDeclaration(e.value):e.type==="RestElement"?this.checkDeclaration(e.argument):e.type==="AssignmentPattern"&&this.checkDeclaration(e.left)}checkDuplicateExports(e,t){this.exportedIdentifiers.has(t)&&(t==="default"?this.raise(E.DuplicateDefaultExport,e):this.raise(E.DuplicateExport,e,{exportName:t})),this.exportedIdentifiers.add(t)}parseExportSpecifiers(e){let t=[],i=!0;for(this.expect(2);!this.eat(4);){if(i)i=!1;else if(this.expect(8),this.eat(4))break;let r=this.isContextual(126),n=this.match(130),a=this.startNode();a.local=this.parseModuleExportName(),t.push(this.parseExportSpecifier(a,n,e,r))}return t}parseExportSpecifier(e,t,i,r){return this.eatContextual(89)?e.exported=this.parseModuleExportName():t?e.exported=this.cloneStringLiteral(e.local):e.exported||(e.exported=this.cloneIdentifier(e.local)),this.finishNode(e,"ExportSpecifier")}parseModuleExportName(){if(this.match(130)){let e=this.parseStringLiteral(this.state.value),t=Z6.exec(e.value);return t&&this.raise(E.ModuleExportNameHasLoneSurrogate,e,{surrogateCharCode:t[0].charCodeAt(0)}),e}return this.parseIdentifier(!0)}checkImportPhase(e){let{specifiers:t}=e,i=t.length===1?t[0].type:null;e.phase==="source"?i!=="ImportDefaultSpecifier"&&this.raise(E.SourcePhaseImportRequiresDefault,t[0]):e.phase==="defer"&&i!=="ImportNamespaceSpecifier"&&this.raise(E.DeferImportRequiresNamespace,t[0])}isPotentialImportPhase(e){return e?!1:this.isContextual(101)||this.isContextual(93)}applyImportPhase(e,t,i,r){t||(i==="source"?(this.expectPlugin("sourcePhaseImports",r),e.phase="source"):i==="defer"?(this.expectPlugin("deferredImportEvaluation",r),e.phase="defer"):this.hasPlugin("sourcePhaseImports")&&(e.phase=null))}parseMaybeImportPhase(e,t){if(!this.isPotentialImportPhase(t))return this.applyImportPhase(e,t,null),null;let i=this.startNode(),r=this.parseIdentifierName(!0),{type:n}=this.state;return(Je(n)?n!==94||this.lookaheadCharCode()===102:n!==8)?(this.applyImportPhase(e,t,r,i.start),null):(this.applyImportPhase(e,t,null),this.createIdentifier(i,r))}isPrecedingIdImportPhase(e){let{type:t}=this.state;return Te(t)?t!==94||this.lookaheadCharCode()===102:t!==8}parseImport(e){return this.match(130)?this.parseImportSourceAndAttributes(e):this.parseImportSpecifiersAndAfter(e,this.parseMaybeImportPhase(e,!1))}parseImportSpecifiersAndAfter(e,t){e.specifiers=[];let r=!this.maybeParseDefaultImportSpecifier(e,t)||this.eat(8),n=r&&this.maybeParseStarImportSpecifier(e);return r&&!n&&this.parseNamedImportSpecifiers(e),this.expectContextual(94),this.parseImportSourceAndAttributes(e)}parseImportSourceAndAttributes(e){return e.specifiers??=[],e.source=this.parseImportSource(),this.maybeParseImportAttributes(e),this.checkImportPhase(e),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(e,"ImportDeclaration")}parseImportSource(){return this.match(130)||this.unexpected(),this.parseExprAtom()}parseImportSpecifierLocal(e,t,i){t.local=this.parseIdentifier(),e.specifiers.push(this.finishImportSpecifier(t,i))}finishImportSpecifier(e,t,i=8201){return this.checkLVal(e.local,{type:t},i),this.finishNode(e,t)}parseImportAttributes(){this.expect(2);let e=[],t=new Set;do{if(this.match(4))break;let i=this.startNode(),r=this.state.value;if(t.has(r)&&this.raise(E.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:r}),t.add(r),this.match(130)?i.key=this.parseStringLiteral(r):i.key=this.parseIdentifier(!0),this.expect(10),!this.match(130))throw this.raise(E.ModuleAttributeInvalidValue,this.state.startLoc);i.value=this.parseStringLiteral(this.state.value),e.push(this.finishNode(i,"ImportAttribute"))}while(this.eat(8));return this.expect(4),e}maybeParseImportAttributes(e){let t;if(this.match(72)){if(this.hasPrecedingLineBreak()&&this.lookaheadCharCode()===40)return;this.next(),t=this.parseImportAttributes()}else t=[];e.attributes=t}maybeParseDefaultImportSpecifier(e,t){if(t){let i=this.startNodeAtNode(t);return i.local=t,e.specifiers.push(this.finishImportSpecifier(i,"ImportDefaultSpecifier")),!0}else if(Je(this.state.type))return this.parseImportSpecifierLocal(e,this.startNode(),"ImportDefaultSpecifier"),!0;return!1}maybeParseStarImportSpecifier(e){if(this.match(51)){let t=this.startNode();return this.next(),this.expectContextual(89),this.parseImportSpecifierLocal(e,t,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(e){let t=!0;for(this.expect(2);!this.eat(4);){if(t)t=!1;else{if(this.eat(10))throw this.raise(E.DestructureNamedImport,this.state.startLoc);if(this.expect(8),this.eat(4))break}let i=this.startNode(),r=this.match(130),n=this.isContextual(126);i.imported=this.parseModuleExportName();let a=this.parseImportSpecifier(i,r,e.importKind==="type"||e.importKind==="typeof",n,void 0);e.specifiers.push(a)}}parseImportSpecifier(e,t,i,r,n){if(this.eatContextual(89))e.local=this.parseIdentifier();else{let{imported:a}=e;if(t)throw this.raise(E.ImportBindingIsString,e,{importName:a.value});this.checkReservedWord(a.name,e.start,!0,!0),e.local||(e.local=this.cloneIdentifier(a))}return this.finishImportSpecifier(e,"ImportSpecifier",n)}isThisParam(e){return e.type==="Identifier"&&e.name==="this"}},Uo=/in(?:stanceof)?|as|satisfies/y;function e8(s){if(s==null)throw new Error(`Unexpected ${s} value.`);return s}function BT(s){if(!s)throw new Error("Assert fail")}var t8={AbstractMethodHasImplementation:({methodName:s})=>`Method '${s}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:s})=>`Property '${s}' cannot have an initializer because it is marked abstract.`,AccessorCannotBeOptional:"An 'accessor' property cannot be declared optional.",AccessorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccessorCannotHaveTypeParameters:"An accessor cannot have type parameters.",ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"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.",DeclaratorDefiniteAssertionRequiresTypeAnnotation:"Declarations with definite assignment assertions must also have type annotations.",DeclaratorDefiniteAssertionWithInitializer:"Declarations with initializers cannot also have definite assignment assertions.",DeclareAccessor:({kind:s})=>`'declare' is not allowed in ${s}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DecoratorAbstractMethod:({kind:s})=>`Decorators can't be used with ${s.startsWith("a")?"an":"a"} ${s}.`,DuplicateAccessibilityModifier:({modifier:s})=>`Accessibility modifier already seen: '${s}'.`,DuplicateModifier:({modifier:s})=>`Duplicate modifier: '${s}'.`,EmptyHeritageClauseType:({token:s})=>`'${s}' list cannot be empty.`,EmptyNamespaceName:"Namespace must be given a name.",EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ExportAssignmentInTSNamespace:"An export assignment cannot be used in a namespace.",ExportInTSNamespace:"Export declarations are not permitted in a namespace.",ImportAliasHasImportType:"An import alias can not use 'import type'.",ImportInTSNamespace:"Import declarations in a namespace cannot reference a module.",IncompatibleModifiers:({modifiers:s})=>`'${s[0]}' modifier cannot be used with '${s[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:s})=>`Index signatures cannot have an accessibility modifier ('${s}').`,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.",InlineModuleDeclarationMustUseString:"`module ... {}` declarations must have a string name. Use `namespace ... {}` instead.",InvalidHeritageClauseType:({token:s})=>`'${s}' list can only include identifiers or qualified-names with optional type arguments.`,InvalidModifierOnAwaitUsingDeclaration:s=>`'${s}' modifier cannot appear on an await using declaration.`,InvalidModifierOnTypeMember:({modifier:s})=>`'${s}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:s})=>`'${s}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:s})=>`'${s}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifierOnUsingDeclaration:s=>`'${s}' modifier cannot appear on a using declaration.`,InvalidModifiersOrder:({orderedModifiers:s})=>`'${s[0]}' modifier must precede '${s[1]}' modifier.`,InvalidNamespaceName:s=>`Namespace name cannot be '${s}'.`,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.",NamespaceExportInTSNamespace:"Global module exports may only appear at top level.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifier:"'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:s})=>`Private elements cannot have an accessibility modifier ('${s}').`,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.",SetAccessorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccessorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccessorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:({typeParameterName:s})=>`Single type parameter ${s} should have a trailing comma. Example usage: <${s},>.`,StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TupleOptionalAfterType:"A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).",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.",UnexpectedParameterInitializer:"A parameter initializer is only allowed in a function or constructor implementation.",UnexpectedParameterModifier:"A parameter property is only allowed in a constructor implementation.",UnexpectedReadonly:"'readonly' type modifier is only permitted on array and tuple literal types.",UnexpectedTypeAnnotation:"Did not expect a type annotation here.",UnexpectedTypeCastInParameter:"Unexpected type cast in parameter position.",UnexpectedTypeDeclaration:s=>`'${s}' declarations can only be declared inside a block.`,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:s})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${s}.`,UsingDeclarationInAmbientContext:s=>`'${s}' declarations are not allowed in ambient contexts.`},M=it`typescript`(t8);function s8(s){switch(s){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 _T(s){return s==="private"||s==="public"||s==="protected"}function i8(s){return s==="in"||s==="out"}function uc(s){if(s.extra?.parenthesized)return!1;switch(s.type){case"Identifier":return!0;case"MemberExpression":return!s.computed&&uc(s.object);case"TSInstantiationExpression":return uc(s.expression);default:return!1}}var r8=Ut(["declare","private","public","protected","override","abstract","readonly","static"],["in","out"]),n8=Ut(["readonly"],["declare","abstract","private","protected","public","static","override"]),a8=Ut(["public","private","protected","override","readonly"]),o8=Ut(["private","public","protected"]),c8=s=>class extends s{getScopeHandler(){return Xo}tsIsIdentifier(){return Te(this.state.type)}tsTokenCanFollowModifier(){return this.match(0)||this.match(2)||this.match(51)||this.match(17)||this.match(134)||this.isLiteralPropertyName()}tsNextTokenOnSameLineAndCanFollowModifier(){return this.next(),this.hasPrecedingLineBreak()?!1:this.tsTokenCanFollowModifier()}tsNextTokenCanFollowModifier(){return this.match(102)?(this.next(),this.tsTokenCanFollowModifier()):this.tsNextTokenOnSameLineAndCanFollowModifier()}tsParseModifier(t,i,r){if(!Te(this.state.type)&&this.state.type!==54&&this.state.type!==71)return;let n=this.state.value;if(t.has(n)){if(r&&this.match(102)||i&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return n}}tsParseModifiers(t,i=M.InvalidModifierOnTypeMember,r,n=!1){let a=(c,l,u,f)=>{l===u&&r[f]&&this.raise(M.InvalidModifiersOrder,c,{orderedModifiers:[u,f]})},o=(c,l,u,f)=>{(r[u]&&l===f||r[f]&&l===u)&&this.raise(M.IncompatibleModifiers,c,{modifiers:[u,f]})};for(;;){let{startLoc:c}=this.state,l=this.tsParseModifier(t,n,r.static);if(!l)break;_T(l)?r.accessibility?this.raise(M.DuplicateAccessibilityModifier,c,{modifier:l}):(a(c,l,l,"override"),a(c,l,l,"static"),a(c,l,l,"readonly"),r.accessibility=l):i8(l)?(r[l]&&this.raise(M.DuplicateModifier,c,{modifier:l}),r[l]=!0,a(c,l,"in","out")):(Object.hasOwn(r,l)?this.raise(M.DuplicateModifier,c,{modifier:l}):(a(c,l,"static","readonly"),a(c,l,"static","override"),a(c,l,"override","readonly"),a(c,l,"abstract","override"),o(c,l,"declare","override"),o(c,l,"static","abstract")),r[l]=!0),t.get(l)||this.raise(i,c,{modifier:l})}}tsIsListTerminator(t){switch(t){case"EnumMembers":case"TypeMembers":return this.match(4);case"HeritageClauseElement":return this.match(2);case"TupleElementTypes":return this.match(1);case"TypeParametersOrArguments":return this.match(44)}}tsParseList(t,i){let r=[];for(;!this.tsIsListTerminator(t);)r.push(i());return r}tsParseDelimitedList(t,i,r){return e8(this.tsParseDelimitedListWorker(t,i,!0,r))}tsParseDelimitedListWorker(t,i,r,n){let a=[],o=-1;for(;!this.tsIsListTerminator(t);){o=-1;let c=i();if(c==null)return;if(a.push(c),this.eat(8)){o=this.state.lastTokStartLoc.index;continue}if(this.tsIsListTerminator(t))break;r&&this.expect(8);return}return n&&(n.value=o),a}tsParseBracketedList(t,i,r,n,a){n||(r?this.expect(0):this.expect(43));let o=this.tsParseDelimitedList(t,i,a);return r?this.expect(1):this.expect(44),o}tsParseImportType(){let t=this.startNode();return this.expect(79),this.expect(6),this.match(130)?t.source=this.parseStringLiteral(this.state.value):(this.raise(M.UnsupportedImportTypeArgument,this.state.startLoc),t.source=this.tsParseNonConditionalType()),this.eat(8)?t.options=this.tsParseImportTypeOptions():t.options=null,this.expect(7),this.eat(12)&&(t.qualifier=this.tsParseEntityName(3)),this.match(43)&&(t.typeArguments=this.tsParseTypeArguments()),this.finishNode(t,"TSImportType")}tsParseImportTypeOptions(){let t=this.startNode();this.expect(2);let i=this.startNode();return this.isContextual(72)?(i.method=!1,i.key=this.parseIdentifier(!0),i.computed=!1,i.shorthand=!1):this.unexpected(null,72),this.expect(10),i.value=this.tsParseImportTypeWithPropertyValue(),t.properties=[this.finishObjectProperty(i)],this.eat(8),this.expect(4),this.finishNode(t,"ObjectExpression")}tsParseImportTypeWithPropertyValue(){let t=this.startNode(),i=[];for(this.expect(2);!this.match(4);){let r=this.state.type;Te(r)||r===130?i.push(super.parsePropertyDefinition(null)):this.unexpected(),this.eat(8)}return t.properties=i,this.next(),this.finishNode(t,"ObjectExpression")}tsParseEntityName(t){let i;if(t&1&&this.match(74))if(t&2)i=this.parseIdentifier(!0);else{let r=this.startNode();this.next(),i=this.finishNode(r,"ThisExpression")}else i=this.parseIdentifier(!!(t&1));for(;this.eat(12);){let r=this.startNodeAtNode(i);r.left=i,r.right=this.parseIdentifier(!!(t&1)),i=this.finishNode(r,"TSQualifiedName")}return i}tsParseTypeReference(){let t=this.startNode();return t.typeName=this.tsParseEntityName(1),!this.hasPrecedingLineBreak()&&this.match(43)&&(t.typeArguments=this.tsParseTypeArguments()),this.finishNode(t,"TSTypeReference")}tsParseThisTypePredicate(t){this.next();let i=this.startNodeAtNode(t);return i.parameterName=t,i.typeAnnotation=this.tsParseTypeAnnotation(!1),i.asserts=!1,this.finishNode(i,"TSTypePredicate")}tsParseThisTypeNode(){let t=this.startNode();return this.next(),this.finishNode(t,"TSThisType")}tsParseTypeQuery(){let t=this.startNode();return this.expect(83),this.match(79)?t.exprName=this.tsParseImportType():t.exprName=this.tsParseEntityName(1),!this.hasPrecedingLineBreak()&&this.match(43)&&(t.typeArguments=this.tsParseTypeArguments()),this.finishNode(t,"TSTypeQuery")}tsParseInOutModifiers=this.tsParseModifiers.bind(this,Ut(["in","out"],["const","public","private","protected","readonly","declare","abstract","override"]),M.InvalidModifierOnTypeParameter);tsParseConstModifier=this.tsParseModifiers.bind(this,Ut(["const"],["in","out"]),M.InvalidModifierOnTypeParameterPositions);tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,Ut(["in","out","const"],["public","private","protected","readonly","declare","abstract","override"]),M.InvalidModifierOnTypeParameter);tsParseTypeParameter(t){let i=this.startNode();return t(i),i.name=this.tsParseTypeParameterName(),i.constraint=this.tsEatThenParseType(77),i.default=this.tsEatThenParseType(25),this.finishNode(i,"TSTypeParameter")}tsTryParseTypeParameters(t){if(this.match(43))return this.tsParseTypeParameters(t)}tsParseTypeParameters(t){let i=this.startNode();this.match(43)||this.match(138)?this.next():this.unexpected();let r={value:-1};return i.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,t),!1,!0,r),i.params.length===0&&this.raise(M.EmptyTypeParameters,i),r.value!==-1&&this.addExtra(i,"trailingComma",r.value),this.finishNode(i,"TSTypeParameterDeclaration")}tsFillSignature(t,i){let r=t===15,n="params",a="returnType";i.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(6),i[n]=this.tsParseBindingListForSignature(),r?i[a]=this.tsParseTypeOrTypePredicateAnnotation(t):this.match(t)&&(i[a]=this.tsParseTypeOrTypePredicateAnnotation(t))}tsParseBindingListForSignature(){let t=super.parseBindingList(7,41,2);for(let i of t){let{type:r}=i;(r==="AssignmentPattern"||r==="TSParameterProperty")&&this.raise(M.UnsupportedSignatureParameterKind,i,{type:r})}return t}tsParseTypeMemberSemicolon(){!this.eat(8)&&!this.isLineTerminator()&&this.expect(9)}tsParseSignatureMember(t,i){return this.tsFillSignature(10,i),this.tsParseTypeMemberSemicolon(),this.finishNode(i,t)}tsIsUnambiguouslyIndexSignature(){return this.next(),Te(this.state.type)?(this.next(),this.match(10)):!1}tsTryParseIndexSignature(t){if(!(this.match(0)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))))return;this.expect(0);let i=this.parseIdentifier();i.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(i),this.expect(1),t.parameters=[i];let r=this.tsTryParseTypeAnnotation();return r&&(t.typeAnnotation=r),this.tsParseTypeMemberSemicolon(),this.finishNode(t,"TSIndexSignature")}tsParsePropertyOrMethodSignature(t,i){if(this.eat(13)&&(t.optional=!0),this.match(6)||this.match(43)){i&&this.raise(M.ReadonlyForMethodSignature,t);let r=t;if(r.kind&&this.match(43)&&this.raise(M.AccessorCannotHaveTypeParameters,this.state.curPosition()),this.tsFillSignature(10,r),this.tsParseTypeMemberSemicolon(),r.kind==="get")r.params.length>0&&(this.raise(E.BadGetterArity,this.state.curPosition()),this.isThisParam(r.params[0])&&this.raise(M.AccessorCannotDeclareThisParameter,this.state.curPosition()));else if(r.kind==="set"){if(r.params.length!==1)this.raise(E.BadSetterArity,this.state.curPosition());else{let n=r.params[0];this.isThisParam(n)&&this.raise(M.AccessorCannotDeclareThisParameter,this.state.curPosition()),n.type==="Identifier"&&n.optional&&this.raise(M.SetAccessorCannotHaveOptionalParameter,this.state.curPosition()),n.type==="RestElement"&&this.raise(M.SetAccessorCannotHaveRestParameter,this.state.curPosition())}r.returnType&&this.raise(M.SetAccessorCannotHaveReturnType,r.returnType)}else r.kind="method";return this.finishNode(r,"TSMethodSignature")}else{let r=t;i&&(r.readonly=!0);let n=this.tsTryParseTypeAnnotation();return n&&(r.typeAnnotation=n),this.tsParseTypeMemberSemicolon(),this.finishNode(r,"TSPropertySignature")}}tsParseTypeMember(){let t=this.startNode();if(this.match(6)||this.match(43))return this.tsParseSignatureMember("TSCallSignatureDeclaration",t);if(this.match(73)){let r=this.startNode();return this.next(),this.match(6)||this.match(43)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",t):(t.key=this.createIdentifier(r,"new"),this.tsParsePropertyOrMethodSignature(t,!1))}this.tsParseModifiers(n8,void 0,t);let i=this.tsTryParseIndexSignature(t);return i||(super.parsePropertyName(t),!t.computed&&t.key.type==="Identifier"&&(t.key.name==="get"||t.key.name==="set")&&this.tsTokenCanFollowModifier()&&(t.kind=t.key.name,super.parsePropertyName(t),!this.match(6)&&!this.match(43)&&this.unexpected(null,6)),this.tsParsePropertyOrMethodSignature(t,!!t.readonly))}tsParseTypeLiteral(){let t=this.startNode();return t.members=this.tsParseObjectTypeMembers(),this.finishNode(t,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(2);let t=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(4),t}tsIsStartOfMappedType(){return this.next(),this.eat(49)?this.isContextual(118):(this.isContextual(118)&&this.next(),!this.match(0)||(this.next(),!this.tsIsIdentifier())?!1:(this.next(),this.match(54)))}tsParseMappedType(){let t=this.startNode();return this.expect(2),this.match(49)?(t.readonly=this.state.value,this.next(),this.expectContextual(118)):this.eatContextual(118)&&(t.readonly=!0),this.expect(0),t.key=this.tsParseTypeParameterName(),t.constraint=this.tsExpectThenParseType(54),t.nameType=this.eatContextual(89)?this.tsParseType():null,this.expect(1),this.match(49)?(t.optional=this.state.value,this.next(),this.expect(13)):this.eat(13)&&(t.optional=!0),t.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(4),this.finishNode(t,"TSMappedType")}tsParseTupleType(){let t=this.startNode();t.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let i=!1;return t.elementTypes.forEach(r=>{let{type:n}=r;i&&n!=="TSRestType"&&n!=="TSOptionalType"&&!(n==="TSNamedTupleMember"&&r.optional)&&this.raise(M.OptionalTypeBeforeRequired,r),i||=n==="TSNamedTupleMember"&&r.optional||n==="TSOptionalType"}),this.finishNode(t,"TSTupleType")}tsParseTupleElementType(){let t=this.state.startLoc,i=this.eat(17),{startLoc:r}=this.state,n,a,o,c,u=Je(this.state.type)?this.lookaheadCharCode():null;if(u===58)n=!0,o=!1,a=this.parseIdentifier(!0),this.expect(10),c=this.tsParseType();else if(u===63){o=!0;let f=this.state.value,m=this.tsParseNonArrayType();this.lookaheadCharCode()===58?(n=!0,a=this.createIdentifier(this.startNodeAt(r),f),this.expect(13),this.expect(10),c=this.tsParseType()):(n=!1,c=m,this.expect(13))}else c=this.tsParseType(),o=this.eat(13),n=this.eat(10);if(n){let f;a?(f=this.startNodeAt(r),f.optional=o,f.label=a,f.elementType=c,this.eat(13)&&(f.optional=!0,this.raise(M.TupleOptionalAfterType,this.state.lastTokStartLoc))):(f=this.startNodeAt(r),f.optional=o,this.raise(M.InvalidTupleMemberLabel,c),f.label=c,f.elementType=this.tsParseType()),c=this.finishNode(f,"TSNamedTupleMember")}else if(o){let f=this.startNodeAt(r);f.typeAnnotation=c,c=this.finishNode(f,"TSOptionalType")}if(i){let f=this.startNodeAt(t);f.typeAnnotation=c,c=this.finishNode(f,"TSRestType")}return c}tsParseParenthesizedType(){let t=this.startNode();return this.expect(6),t.typeAnnotation=this.tsParseType(),this.expect(7),this.finishNode(t,"TSParenthesizedType")}tsParseFunctionOrConstructorType(t,i){let r=this.startNode();return t==="TSConstructorType"&&(r.abstract=!!i,i&&this.next(),this.next()),this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(15,r)),this.finishNode(r,t)}tsParseLiteralTypeNode(){let t=this.startNode();switch(this.state.type){case 131:case 132:case 130:case 81:case 82:t.literal=super.parseExprAtom();break;default:this.unexpected()}return this.finishNode(t,"TSLiteralType")}tsParseTemplateLiteralType(){let t=this.state.startLoc,i=this.parseTemplateElement(!1),r=[i];if(i.tail){let n=this.startNodeAt(t),a=this.startNodeAt(t);return a.expressions=[],a.quasis=r,n.literal=this.finishNode(a,"TemplateLiteral"),this.finishNode(n,"TSLiteralType")}else{let n=[];for(;!i.tail;)n.push(this.tsParseType()),this.readTemplateContinuation(),r.push(i=this.parseTemplateElement(!1));let a=this.startNodeAt(t);return a.types=n,a.quasis=r,this.finishNode(a,"TSTemplateLiteralType")}}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){let t=this.tsParseThisTypeNode();return this.isContextual(112)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(t):t}tsParseNonArrayType(){switch(this.state.type){case 130:case 131:case 132:case 81:case 82:return this.tsParseLiteralTypeNode();case 49:if(this.state.value==="-"){let t=this.startNode(),i=this.lookahead();return i.type!==131&&i.type!==132&&this.unexpected(),t.literal=this.parseMaybeUnary(),this.finishNode(t,"TSLiteralType")}break;case 74:return this.tsParseThisTypeOrThisTypePredicate();case 83:return this.tsParseTypeQuery();case 79:return this.tsParseImportType();case 2:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case 0:return this.tsParseTupleType();case 6:if(!(this.optionFlags&2048)){let t=this.state.startLoc;this.next();let i=this.tsParseType();return this.expect(7),this.addExtra(i,"parenthesized",!0),this.addExtra(i,"parenStart",t.index),i}return this.tsParseParenthesizedType();case 21:case 20:return this.tsParseTemplateLiteralType();default:{let{type:t}=this.state;if(Te(t)||t===84||t===80){let i=t===84?"TSVoidKeyword":t===80?"TSNullKeyword":s8(this.state.value);if(i!==void 0&&this.lookaheadCharCode()!==46){let r=this.startNode();return this.next(),this.finishNode(r,i)}return this.tsParseTypeReference()}}}throw this.unexpected()}tsParseArrayTypeOrHigher(){let{startLoc:t}=this.state,i=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(1)){let r=this.startNodeAt(t);r.elementType=i,this.expect(1),i=this.finishNode(r,"TSArrayType")}else{let r=this.startNodeAt(t);r.objectType=i,r.indexType=this.tsParseType(),this.expect(1),i=this.finishNode(r,"TSIndexedAccessType")}return i}tsParseTypeOperator(){let t=this.startNode(),i=this.state.value;return this.next(),t.operator=i,t.typeAnnotation=this.tsParseTypeOperatorOrHigher(),i==="readonly"&&this.tsCheckTypeAnnotationForReadOnly(t),this.finishNode(t,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(t){switch(t.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(M.UnexpectedReadonly,t)}}tsParseInferType(){let t=this.startNode();this.expectContextual(111);let i=this.startNode();return i.name=this.tsParseTypeParameterName(),i.constraint=this.tsTryParse(()=>this.tsParseConstraintForInferType()),t.typeParameter=this.finishNode(i,"TSTypeParameter"),this.finishNode(t,"TSInferType")}tsParseConstraintForInferType(){if(this.eat(77)){let t=this.tsInDisallowConditionalTypesContext(()=>this.tsParseType());if(this.state.inDisallowConditionalTypesContext||!this.match(13))return t}}tsParseTypeOperatorOrHigher(){return b6(this.state.type)&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(111)?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseUnionOrIntersectionType(t,i,r){let n=this.startNode(),a=this.eat(r),o=[];do o.push(i());while(this.eat(r));return o.length===1&&!a?o[0]:(n.types=o,this.finishNode(n,t))}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),41)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),39)}tsIsStartOfFunctionType(){return this.match(43)?!0:this.match(6)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(Te(this.state.type)||this.match(74))return this.next(),!0;if(this.match(2)){let{errors:t}=this.state,i=t.length;try{return this.parseObjectLike(4,!0),t.length===i}catch{return!1}}if(this.match(0)){this.next();let{errors:t}=this.state,i=t.length;try{return super.parseBindingList(1,93,1),t.length===i}catch{return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){return this.next(),!!(this.match(7)||this.match(17)||this.tsSkipParameterStart()&&(this.match(10)||this.match(8)||this.match(13)||this.match(25)||this.match(7)&&(this.next(),this.match(15))))}tsParseTypeOrTypePredicateAnnotation(t){return this.tsInType(()=>{let i=this.startNode();this.expect(t);let r=this.startNode(),n=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(n&&this.match(74)){let c=this.tsParseThisTypeOrThisTypePredicate();return c.type==="TSThisType"?(r.parameterName=c,r.asserts=!0,r.typeAnnotation=null,c=this.finishNode(r,"TSTypePredicate")):(this.resetStartLocationFromNode(c,r),c.asserts=!0),i.typeAnnotation=c,this.finishNode(i,"TSTypeAnnotation")}let a=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!a)return n?(r.parameterName=this.parseIdentifier(),r.asserts=n,r.typeAnnotation=null,i.typeAnnotation=this.finishNode(r,"TSTypePredicate"),this.finishNode(i,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,i);let o=this.tsParseTypeAnnotation(!1);return r.parameterName=a,r.typeAnnotation=o,r.asserts=n,i.typeAnnotation=this.finishNode(r,"TSTypePredicate"),this.finishNode(i,"TSTypeAnnotation")})}tsTryParseTypeOrTypePredicateAnnotation(){if(this.match(10))return this.tsParseTypeOrTypePredicateAnnotation(10)}tsTryParseTypeAnnotation(){if(this.match(10))return this.tsParseTypeAnnotation()}tsTryParseType(){return this.tsEatThenParseType(10)}tsParseTypePredicatePrefix(){let t=this.parseIdentifier();if(this.isContextual(112)&&!this.hasPrecedingLineBreak())return this.next(),t}tsParseTypePredicateAsserts(){if(this.state.type!==105)return!1;let t=this.state.containsEsc;return this.next(),!Te(this.state.type)&&!this.match(74)?!1:(t&&this.raise(E.InvalidEscapedReservedWord,this.state.lastTokStartLoc,{reservedWord:"asserts"}),!0)}tsParseTypeAnnotation(t=!0,i=this.startNode()){return this.tsInType(()=>{t&&this.expect(10),i.typeAnnotation=this.tsParseType()}),this.finishNode(i,"TSTypeAnnotation")}tsParseType(){BT(this.state.inType);let t=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(77))return t;let i=this.startNodeAtNode(t);return i.checkType=t,i.extendsType=this.tsInDisallowConditionalTypesContext(()=>this.tsParseNonConditionalType()),this.expect(13),i.trueType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.expect(10),i.falseType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.finishNode(i,"TSConditionalType")}isAbstractConstructorSignature(){return this.isContextual(120)&&this.isLookaheadContextual("new")}tsParseNonConditionalType(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(73)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.isAbstractConstructorSignature()?this.tsParseFunctionOrConstructorType("TSConstructorType",!0):this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(M.ReservedTypeAssertion,this.state.startLoc);let t=this.startNode();return t.typeAnnotation=this.tsInType(()=>(this.next(),this.match(71)?this.tsParseTypeReference():this.tsParseType())),this.expect(44),t.expression=this.parseMaybeUnary(),this.finishNode(t,"TSTypeAssertion")}tsParseHeritageClause(t){let i=this.state.startLoc,r=this.tsParseDelimitedList("HeritageClauseElement",()=>{let n=(this.state.canStartArrow=!1,super.parseExprSubscripts());uc(n)||this.raise(M.InvalidHeritageClauseType,n.start,{token:t});let a=t==="extends"?"TSInterfaceHeritage":"TSClassImplements";if(n.type==="TSInstantiationExpression")return n.type=a,n;let o=this.startNodeAtNode(n);return o.expression=n,(this.match(43)||this.match(47))&&(o.typeArguments=this.tsParseTypeArgumentsInExpression()),this.finishNode(o,a)});return r.length||this.raise(M.EmptyHeritageClauseType,i,{token:t}),r}tsParseInterfaceDeclaration(t,i={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(125),i.declare&&(t.declare=!0),Te(this.state.type)?(t.id=this.parseIdentifier(),this.checkIdentifier(t.id,130)):(t.id=null,this.raise(M.MissingInterfaceName,this.state.startLoc)),t.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(77)&&(t.extends=this.tsParseHeritageClause("extends"));let r=this.startNode();return r.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),t.body=this.finishNode(r,"TSInterfaceBody"),this.finishNode(t,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(t){return t.id=this.parseIdentifier(),this.checkIdentifier(t.id,2),t.typeAnnotation=this.tsInType(()=>{if(t.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers),this.expect(25),this.isContextual(110)&&this.lookaheadCharCode()!==46){let i=this.startNode();return this.next(),this.finishNode(i,"TSIntrinsicKeyword")}return this.tsParseType()}),this.semicolon(),this.finishNode(t,"TSTypeAliasDeclaration")}tsInTopLevelContext(t){if(this.curContext()!==Ee.brace){let i=this.state.context;this.state.context=[i[0]];try{return t()}finally{this.state.context=i}}else return t()}tsInType(t){let i=this.state.inType;this.state.inType=!0;try{return t()}finally{this.state.inType=i}}tsInDisallowConditionalTypesContext(t){let i=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return t()}finally{this.state.inDisallowConditionalTypesContext=i}}tsInAllowConditionalTypesContext(t){let i=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return t()}finally{this.state.inDisallowConditionalTypesContext=i}}tsEatThenParseType(t){if(this.match(t))return this.tsNextThenParseType()}tsExpectThenParseType(t){return this.tsInType(()=>(this.expect(t),this.tsParseType()))}tsNextThenParseType(){return this.tsInType(()=>(this.next(),this.tsParseType()))}tsParseEnumMember(){let t=this.startNode();return t.id=this.match(130)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(25)&&(t.initializer=super.parseMaybeAssignAllowIn()),this.finishNode(t,"TSEnumMember")}tsParseEnumDeclaration(t,i={}){return i.const&&(t.const=!0),i.declare&&(t.declare=!0),this.expectContextual(122),t.id=this.parseIdentifier(),this.checkIdentifier(t.id,t.const?8971:8459),t.body=this.tsParseEnumBody(),this.finishNode(t,"TSEnumDeclaration")}tsParseEnumBody(){let t=this.startNode();return this.expect(2),t.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(4),this.finishNode(t,"TSEnumBody")}tsParseModuleBlock(t){let i=this.startNode();return t||this.scope.enter(0),this.expect(2),super.parseBlockOrModuleBlockBody(i.body=[],void 0,!0,4),t||this.scope.exit(),this.finishNode(i,"TSModuleBlock")}tsParseNamespaceDeclaration(t){return t.id=this.tsParseEntityName(0),t.id.type==="Identifier"&&this.checkIdentifier(t.id,1024),this.scope.enter(2048),this.prodParam.enter(0),t.body=this.tsParseModuleBlock(!1),this.prodParam.exit(),this.scope.exit(),this.finishNode(t,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(t){let i=this.isContextual(108);if(i)t.kind="global",t.id=this.parseIdentifier();else{t.kind="module";let{type:r,value:n}=this.state;r===130?t.id=super.parseStringLiteral(n):Te(r)?(this.raise(M.InlineModuleDeclarationMustUseString,this.state.startLoc),t.id=this.tsParseEntityName(0)):r===2?this.raise(M.EmptyNamespaceName,this.state.startLoc):(this.raise(M.InvalidNamespaceName,this.state.startLoc,n),t.id=super.parseExprAtom())}return this.match(2)?(i||this.scope.enter(1024),this.prodParam.enter(0),t.body=this.tsParseModuleBlock(i),this.prodParam.exit(),i||this.scope.exit()):this.semicolon(),this.finishNode(t,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(t,i){t.id=i||this.parseIdentifier(),this.checkIdentifier(t.id,4096),this.expect(25);let r=this.tsParseModuleReference();return t.importKind==="type"&&r.type!=="TSExternalModuleReference"&&this.raise(M.ImportAliasHasImportType,r),t.moduleReference=r,this.semicolon(),this.finishNode(t,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual(115)&&this.lookaheadCharCode()===40}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(0)}tsParseExternalModuleReference(){let t=this.startNode();return this.expectContextual(115),this.expect(6),this.match(130)||this.unexpected(),t.expression=super.parseExprAtom(),this.expect(7),this.sawUnambiguousESM=!0,this.finishNode(t,"TSExternalModuleReference")}tsLookAhead(t){let i=this.state.clone(),r=t();return this.state=i,r}tsTryParseAndCatch(t){let i=this.tryParse(r=>t()||r());if(!(i.aborted||!i.node))return i.error&&(this.state=i.failState),i.node}tsTryParse(t){let i=this.state.clone(),r=t();if(r!==void 0&&r!==!1)return r;this.state=i}tsTryParseDeclare(t){if(this.isLineTerminator())return;let i=this.state.type;return this.tsInAmbientContext(()=>{switch(i){case 64:return t.declare=!0,super.parseFunctionStatement(t,!1,!1);case 76:return t.declare=!0,this.parseClass(t,!0,!1);case 122:return this.tsParseEnumDeclaration(t,{declare:!0});case 108:return this.tsParseAmbientExternalModuleDeclaration(t);case 96:if(this.state.containsEsc)return;case 71:case 70:return!this.match(71)||!this.isLookaheadContextual("enum")?(t.declare=!0,this.parseVarStatement(t,this.state.value,!0)):(this.expect(71),this.tsParseEnumDeclaration(t,{const:!0,declare:!0}));case 103:if(this.isUsing())return this.raise(M.InvalidModifierOnUsingDeclaration,this.state.startLoc,"declare"),t.declare=!0,this.parseVarStatement(t,"using",!0);break;case 92:if(this.isAwaitUsing())return this.raise(M.InvalidModifierOnAwaitUsingDeclaration,this.state.startLoc,"declare"),t.declare=!0,this.next(),this.parseVarStatement(t,"await using",!0);break;case 125:{let r=this.tsParseInterfaceDeclaration(t,{declare:!0});if(r)return r}default:if(Te(i))return this.tsParseDeclaration(t,this.state.type,!0,null)}})}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.type,!0,null)}tsParseDeclaration(t,i,r,n){switch(i){case 120:if(this.tsCheckLineTerminator(r)&&(this.match(76)||Te(this.state.type)))return this.tsParseAbstractDeclaration(t,n);break;case 123:if(this.tsCheckLineTerminator(r))return this.tsParseAmbientExternalModuleDeclaration(t);break;case 124:if(this.tsCheckLineTerminator(r)&&Te(this.state.type))return t.kind="namespace",this.tsParseNamespaceDeclaration(t);break;case 126:if(this.tsCheckLineTerminator(r)&&Te(this.state.type))return this.tsParseTypeAliasDeclaration(t);break}}tsCheckLineTerminator(t){return t?this.hasFollowingLineBreak()?!1:(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(t){if(!this.match(43))return;let i=this.tsTryParseAndCatch(()=>{let r=this.startNodeAt(t);return r.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(r),r.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(15),r});if(i)return super.parseArrowExpression(i,null,!0)}tsParseTypeArgumentsInExpression(){if(this.reScan_lt()===43)return this.tsParseTypeArguments()}tsParseTypeArguments(){let t=this.startNode();return t.params=this.tsInType(()=>this.tsInTopLevelContext(()=>(this.expect(43),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))),t.params.length===0?this.raise(M.EmptyTypeArguments,t):!this.state.inType&&this.curContext()===Ee.brace&&this.reScan_lt_gt(),this.expect(44),this.finishNode(t,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return E6(this.state.type)}isExportDefaultSpecifier(){return this.tsIsDeclarationStart()?!1:super.isExportDefaultSpecifier()}parseBindingElement(t,i){let r=i.length?null:this.state.startLoc,n={};this.tsParseModifiers(a8,void 0,n);let a=n.accessibility,o=n.override,c=n.readonly;!(t&4)&&(a||c||o)&&this.raise(M.UnexpectedParameterModifier,r||i[0]);let l=this.state.startLoc,u=this.parseMaybeDefault(l);t&2&&this.parseFunctionParamType(u);let f=this.parseMaybeDefault(l,u);if(a||c||o){let m=r?this.startNodeAt(r):this.startNodeAtNode(i[0]);return i.length?m.decorators=i:this.setLoc(r),a&&(m.accessibility=a),c&&(m.readonly=c),o&&(m.override=o),f.type!=="Identifier"&&f.type!=="AssignmentPattern"&&this.raise(M.UnsupportedParameterPropertyKind,r||i[0]),m.parameter=f,this.finishNode(m,"TSParameterProperty")}return i.length&&(u.decorators=i),f}isSimpleParameter(t){return t.type==="TSParameterProperty"&&super.isSimpleParameter(t.parameter)||super.isSimpleParameter(t)}tsDisallowOptionalPattern(t){for(let i of t.params)i.type!=="Identifier"&&i.optional&&!this.state.isAmbientContext&&this.raise(M.PatternIsOptional,i)}setArrowFunctionParameters(t,i,r){super.setArrowFunctionParameters(t,i,r),this.tsDisallowOptionalPattern(t)}parseFunctionBodyAndFinish(t,i,r=!1){this.match(10)&&(t.returnType=this.tsParseTypeOrTypePredicateAnnotation(10));let n=i==="FunctionDeclaration"?"TSDeclareFunction":i==="ClassMethod"||i==="ClassPrivateMethod"?"TSDeclareMethod":void 0;if(n&&!this.match(2)&&this.isLineTerminator()){if(n==="TSDeclareMethod"&&t.kind==="constructor")for(let a of t.params)a.type==="TSParameterProperty"?this.raise(M.UnexpectedParameterModifier,a):a.type==="AssignmentPattern"&&this.raise(M.UnexpectedParameterInitializer,a);else for(let a of t.params)a.type==="AssignmentPattern"&&this.raise(M.UnexpectedParameterInitializer,a);return this.finishNode(t,n)}return n&&this.state.isAmbientContext&&(this.raise(M.DeclareFunctionHasImplementation,this.state.startLoc),n==="TSDeclareFunction"&&t.declare)?super.parseFunctionBodyAndFinish(t,n,r):(this.tsDisallowOptionalPattern(t),super.parseFunctionBodyAndFinish(t,i,r))}registerFunctionStatementId(t){!t.body&&t.id?this.checkIdentifier(t.id,1024):super.registerFunctionStatementId(t)}tsCheckForInvalidTypeCasts(t){t.forEach(i=>{i?.type==="TSTypeCastExpression"&&this.raise(M.UnexpectedTypeAnnotation,i.typeAnnotation)})}toReferencedList(t,i){return this.tsCheckForInvalidTypeCasts(t),t}parseArrayLike(t,i){let r=super.parseArrayLike(t,i);return r.type==="ArrayExpression"&&this.tsCheckForInvalidTypeCasts(r.elements),r}parseSubscript(t,i,r,n){if(!this.hasPrecedingLineBreak()&&this.match(31)){this.state.canStartJSXElement=!1,this.next();let o=this.startNodeAt(i);return o.expression=t,this.finishNode(o,"TSNonNullExpression")}let a=!1;if(this.match(14)&&this.lookaheadCharCode()===60){if(r)return n.stop=!0,t;n.optionalChainMember=a=!0,this.next()}if(this.match(43)||this.match(47)){let o,c=this.tsTryParseAndCatch(()=>{if(!r&&this.atPossibleAsyncArrow(t)){let m=this.tsTryParseGenericAsyncArrowFunction(i);if(m)return n.stop=!0,m}let l=this.tsParseTypeArgumentsInExpression();if(!l)return;if(a&&!this.match(6)){o=this.state.curPosition();return}if(Vo(this.state.type)){let m=super.parseTaggedTemplateExpression(t,i,n);return m.typeArguments=l,m}if(!r&&this.eat(6)){let m=this.startNodeAt(i);return m.callee=t,m.arguments=this.parseCallExpressionArguments(),this.tsCheckForInvalidTypeCasts(m.arguments),m.typeArguments=l,n.optionalChainMember&&(m.optional=a),this.finishCallExpression(m,n.optionalChainMember)}let u=this.state.type;if(u===44||u===48||u!==6&&u!==89&&u!==116&&li(u)&&!this.hasPrecedingLineBreak())return;let f=this.startNodeAt(i);return f.expression=t,f.typeArguments=l,this.finishNode(f,"TSInstantiationExpression")});if(o&&this.unexpected(o,6),c)return c.type==="TSInstantiationExpression"&&((this.match(12)||this.match(14)&&this.lookaheadCharCode()!==40)&&this.raise(M.InvalidPropertyAccessAfterInstantiationExpression,this.state.startLoc),!this.match(12)&&!this.match(14)&&(c.expression=super.stopParseSubscript(t,n))),c}return super.parseSubscript(t,i,r,n)}parseNewCallee(t){super.parseNewCallee(t);let{callee:i}=t;i.type==="TSInstantiationExpression"&&!i.extra?.parenthesized&&(t.typeArguments=i.typeArguments,t.callee=i.expression)}parseExprOp(t,i,r){let n;if(Dr(54)>r&&!this.hasPrecedingLineBreak()&&(this.isContextual(89)||(n=this.isContextual(116)))){let a=this.startNodeAt(i);a.expression=t,a.typeAnnotation=this.tsInType(()=>(this.next(),this.match(71)?(n&&this.raise(E.UnexpectedKeyword,this.state.startLoc,{keyword:"const"}),this.tsParseTypeReference()):this.tsParseType()));let o=this.finishNode(a,n?"TSSatisfiesExpression":"TSAsExpression");return this.reScan_lt_gt(),this.parseExprOp(o,i,r)}return super.parseExprOp(t,i,r)}checkReservedWord(t,i,r,n){this.state.isAmbientContext||super.checkReservedWord(t,i,r,n)}checkDuplicateExports(){}isPotentialImportPhase(t){if(super.isPotentialImportPhase(t))return!0;if(this.isContextual(126)){let i=this.lookaheadCharCode();return t?i===123||i===42:i!==61}return!t&&this.isContextual(83)}applyImportPhase(t,i,r,n){super.applyImportPhase(t,i,r,n),i?t.exportKind=r==="type"?"type":"value":t.importKind=r==="type"||r==="typeof"?r:"value"}parseImport(t){if(this.match(130))return t.importKind="value",this.scope.inTSNamespace&&this.raise(M.ImportInTSNamespace,t),super.parseImport(t);let i;if(Te(this.state.type)&&this.lookaheadCharCode()===61){t.importKind="value";let r=this.tsParseImportEqualsDeclaration(t);return this.scope.inTSNamespace&&r.moduleReference.type==="TSExternalModuleReference"&&this.raise(M.ImportInTSNamespace,t),r}else if(this.isContextual(126)){let r=this.parseMaybeImportPhase(t,!1);if(this.lookaheadCharCode()===61)return this.scope.inTSNamespace&&this.raise(M.ImportInTSNamespace,t),this.tsParseImportEqualsDeclaration(t,r);i=super.parseImportSpecifiersAndAfter(t,r)}else i=super.parseImport(t);return i.importKind==="type"&&i.specifiers.length>1&&i.specifiers[0].type==="ImportDefaultSpecifier"?this.raise(M.TypeImportCannotSpecifyDefaultAndNamed,i):this.scope.inTSNamespace&&this.raise(M.ImportInTSNamespace,i),i}parseExport(t,i){if(this.match(79)){let r=this.startNode();this.next();let n=null;this.isContextual(126)&&this.isPotentialImportPhase(!1)?n=this.parseMaybeImportPhase(r,!1):r.importKind="value";let a=this.tsParseImportEqualsDeclaration(r,n);return t.attributes=[],t.declaration=a,t.exportKind="value",t.source=null,t.specifiers=[],this.finishNode(t,"ExportNamedDeclaration")}else if(this.eat(25)){let r=t;return r.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.scope.inTSNamespace&&this.raise(M.ExportAssignmentInTSNamespace,r),this.finishNode(r,"TSExportAssignment")}else if(this.eatContextual(89)){let r=t;return this.expectContextual(124),r.id=this.parseIdentifier(),this.checkIdentifier(r.id,8201),this.semicolon(),this.scope.inTSNamespace&&this.raise(M.NamespaceExportInTSNamespace,r),this.finishNode(r,"TSNamespaceExportDeclaration")}else{let r=super.parseExport(t,i);return this.scope.inTSNamespace&&(r.type!=="ExportNamedDeclaration"||r.source||!r.declaration&&!this.state.isAmbientContext)&&this.raise(M.ExportInTSNamespace,r),r}}isAbstractClass(){return this.isContextual(120)&&this.isLookaheadContextual("class")}parseExportDefaultExpression(){if(this.isAbstractClass()){let t=this.startNode();return this.next(),t.abstract=!0,this.parseClass(t,!0,!0)}if(this.match(125)){let t=this.tsParseInterfaceDeclaration(this.startNode());if(t)return t}return super.parseExportDefaultExpression()}parseVarStatement(t,i,r=!1){let{isAmbientContext:n}=this.state,a=super.parseVarStatement(t,i,r||n);if(n&&!t.declare&&(i==="using"||i==="await using"))return this.raiseOverwrite(M.UsingDeclarationInAmbientContext,t,i),a;for(let o of a.declarations){let{id:c,init:l,definite:u}=o;u&&(l?this.raise(M.DeclaratorDefiniteAssertionWithInitializer,c):c.typeAnnotation||this.raise(M.DeclaratorDefiniteAssertionRequiresTypeAnnotation,c)),n&&l&&(i==="var"||i==="let"||c.typeAnnotation?this.raise(M.InitializerNotAllowedInAmbientContext,l):u8(l,this.hasPlugin("estree"))||this.raise(M.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference,l))}return a}parseStatementContent(t,i){let r=!!(t&2);if(!this.state.containsEsc)switch(this.state.type){case 71:{if(this.isLookaheadContextual("enum")){let n=this.startNode();return this.next(),this.tsParseEnumDeclaration(n,{const:!0})}break}case 120:case 121:{if(this.nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine()){let n=this.state.type,a=this.startNode();this.next();let o=n===121?this.tsTryParseDeclare(a):this.tsParseAbstractDeclaration(a,i);return o?(n===121&&(o.declare=!0),o):(a.expression=this.createIdentifier(this.startNodeAtNode(a),n===121?"declare":"abstract"),this.semicolon(!1),this.finishNode(a,"ExpressionStatement"))}break}case 122:return this.tsParseEnumDeclaration(this.startNode());case 108:{if(this.lookaheadCharCode()===123){let a=this.startNode();return this.tsParseAmbientExternalModuleDeclaration(a)}break}case 125:{let n=this.tsParseInterfaceDeclaration(this.startNode());if(n)return r||this.raise(M.UnexpectedTypeDeclaration,n,"interface"),n;break}case 123:{if(this.nextTokenIsStringLiteralOnSameLine()){let n=this.startNode();return this.next(),this.tsParseDeclaration(n,123,!1,i)}else if(this.nextTokenIsIdentifierOnSameLine()){this.raise(M.InlineModuleDeclarationMustUseString,this.state.startLoc);let n=this.startNode();return this.next(),this.tsParseDeclaration(n,124,!1,i)}break}case 124:{if(this.nextTokenIsIdentifierOnSameLine()){let n=this.startNode();return this.next(),this.tsParseDeclaration(n,124,!1,i)}break}case 126:{if(this.nextTokenIsIdentifierOnSameLine()){let n=this.startNode();return r||this.raise(M.UnexpectedTypeDeclaration,n,"type"),this.next(),this.tsParseTypeAliasDeclaration(n)}break}}return super.parseStatementContent(t,i)}parseAccessModifier(){return this.tsParseModifier(o8)}tsHasSomeModifiers(t,i){return i.some(r=>_T(r)?t.accessibility===r:!!t[r])}tsIsStartOfStaticBlocks(){return this.isContextual(102)&&this.lookaheadCharCode()===123}parseClassMember(t,i,r){this.tsParseModifiers(r8,M.InvalidModifierOnTypeParameterPositions,i,!0);let n=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(i,["declare","private","public","protected","override","abstract","readonly","static"])&&this.raise(M.StaticBlockCannotHaveModifier,this.state.curPosition()),super.parseClassStaticBlock(t,i)):this.parseClassMemberWithIsStatic(t,i,r,!!i.static)};i.declare?this.tsInAmbientContext(n):n(),i.decorators&&i.decorators.length>0&&!this.hasPlugin("decorators-legacy")&&(i.type==="TSAbstractMethodDefinition"||i.type==="TSDeclareMethod"?this.raise(M.DecoratorAbstractMethod,i,{kind:"abstract method"}):(i.type==="ClassProperty"&&i.abstract||i.type==="ClassProperty"&&i.declare||i.type==="TSAbstractPropertyDefinition"||i.type==="PropertyDefinition"&&i.declare)&&this.raise(M.DecoratorAbstractMethod,i,{kind:i.declare?"declare field":"abstract field"}))}parseClassMemberWithIsStatic(t,i,r,n){let a=this.tsTryParseIndexSignature(i);if(a){t.body.push(a),i.abstract&&this.raise(M.IndexSignatureHasAbstract,i),i.accessibility&&this.raise(M.IndexSignatureHasAccessibility,i,{modifier:i.accessibility}),i.declare&&this.raise(M.IndexSignatureHasDeclare,i),i.override&&this.raise(M.IndexSignatureHasOverride,i);return}!this.state.inAbstractClass&&i.abstract&&this.raise(M.NonAbstractClassHasAbstractMethod,i),i.override&&(r.hadSuperClass||this.raise(M.OverrideNotInSubClass,i)),super.parseClassMemberWithIsStatic(t,i,r,n)}parsePostMemberNameModifiers(t){this.eat(13)&&(t.optional=!0),t.readonly&&this.match(6)&&this.raise(M.ClassMethodHasReadonly,t),t.declare&&this.match(6)&&this.raise(M.ClassMethodHasDeclare,t)}shouldParseExportDeclaration(){return this.tsIsDeclarationStart()?!0:super.shouldParseExportDeclaration()}parseConditional(t,i,r){if(!this.match(13))return t;if(r!=null){let o=this.lookaheadCharCode();if(o===44||o===61||o===58||o===41)return this.setOptionalParametersError(r),t}this.next();let n=this.startNodeAt(i);n.test=t;let a=this.state.inConditionalConsequent;return this.state.inConditionalConsequent=!0,n.consequent=this.parseMaybeAssignAllowIn(),this.state.inConditionalConsequent=a,this.expect(10),n.alternate=this.parseMaybeAssign(),this.finishNode(n,"ConditionalExpression")}parseParenItem(t,i){let r=super.parseParenItem(t,i);if(this.eat(13)&&(r.optional=!0,this.resetEndLocation(t)),this.match(10)){let n=this.startNodeAt(i);return n.expression=t,n.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(n,"TSTypeCastExpression")}return t}parseExportDeclaration(t){if(!this.state.isAmbientContext&&this.isContextual(121))return this.tsInAmbientContext(()=>this.parseExportDeclaration(t));let i=this.state.startLoc,r=this.eatContextual(121);if(r&&(this.isContextual(121)||!this.shouldParseExportDeclaration()))throw this.raise(M.ExpectedAmbientAfterExportDeclare,this.state.startLoc);let a=Te(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(t);return a?((a.type==="TSInterfaceDeclaration"||a.type==="TSTypeAliasDeclaration"||r)&&(t.exportKind="type"),r&&a.type!=="TSImportEqualsDeclaration"&&(this.resetStartLocation(a,i),a.declare=!0),a):null}parseClassId(t,i,r,n){if((!i||r)&&this.isContextual(109)){t.id=null;return}super.parseClassId(t,i,r,t.declare?1024:8331);let a=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);a&&(t.typeParameters=a)}parseClassPropertyAnnotation(t){t.optional||(this.eat(31)?t.definite=!0:this.eat(13)&&(t.optional=!0));let i=this.tsTryParseTypeAnnotation();i&&(t.typeAnnotation=i),t.definite&&(this.match(25)?this.raise(M.DeclaratorDefiniteAssertionWithInitializer,t):i||this.raise(M.DeclaratorDefiniteAssertionRequiresTypeAnnotation,t))}parseClassProperty(t){if(this.parseClassPropertyAnnotation(t),this.state.isAmbientContext&&!(t.readonly&&!t.typeAnnotation)&&this.match(25)&&this.raise(M.DeclareClassFieldHasInitializer,this.state.startLoc),t.abstract&&this.match(25)){let{key:i}=t;this.raise(M.AbstractPropertyHasInitializer,this.state.startLoc,{propertyName:i.type==="Identifier"&&!t.computed?i.name:`[${this.input.slice(this.offsetToSourcePos(i.start),this.offsetToSourcePos(i.end))}]`})}return super.parseClassProperty(t)}parseClassPrivateProperty(t){return t.abstract&&this.raise(M.PrivateElementHasAbstract,t),t.accessibility&&this.raise(M.PrivateElementHasAccessibility,t,{modifier:t.accessibility}),this.parseClassPropertyAnnotation(t),super.parseClassPrivateProperty(t)}parseClassAccessorProperty(t){return this.parseClassPropertyAnnotation(t),t.optional&&this.raise(M.AccessorCannotBeOptional,t),super.parseClassAccessorProperty(t)}pushClassMethod(t,i,r,n,a,o){let c=this.tsTryParseTypeParameters(this.tsParseConstModifier);c&&a&&this.raise(M.ConstructorHasTypeParameters,c);let{declare:l=!1,kind:u}=i;l&&(u==="get"||u==="set")&&this.raise(M.DeclareAccessor,i,{kind:u}),c&&(i.typeParameters=c),super.pushClassMethod(t,i,r,n,a,o)}pushClassPrivateMethod(t,i,r,n){let a=this.tsTryParseTypeParameters(this.tsParseConstModifier);a&&(i.typeParameters=a),super.pushClassPrivateMethod(t,i,r,n)}declareClassPrivateMethodInScope(t,i){t.type!=="TSDeclareMethod"&&(t.type==="MethodDefinition"&&t.value.body==null||super.declareClassPrivateMethodInScope(t,i))}parseClassSuper(t){if(super.parseClassSuper(t),t.superClass)if(t.superClass.type==="TSInstantiationExpression"){let i=t.superClass,r=i.expression;this.takeSurroundingComments(r,r.start,r.end);let n=i.typeArguments;this.takeSurroundingComments(n,n.start,n.end),t.superClass=r,t.superTypeArguments=n}else(this.match(43)||this.match(47))&&(t.superTypeArguments=this.tsParseTypeArgumentsInExpression());this.eatContextual(109)&&(t.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(t,i,r,n,a,o,c){let l=this.tsTryParseTypeParameters(this.tsParseConstModifier);return l&&(t.typeParameters=l),super.parseObjPropValue(t,i,r,n,a,o,c)}parseFunctionParams(t,i){let r=this.tsTryParseTypeParameters(this.tsParseConstModifier);r&&(t.typeParameters=r),super.parseFunctionParams(t,i)}parseVarId(t,i){super.parseVarId(t,i),t.id.type==="Identifier"&&!this.hasPrecedingLineBreak()&&this.eat(31)&&(t.definite=!0);let r=this.tsTryParseTypeAnnotation();r&&(t.id.typeAnnotation=r,this.resetEndLocation(t.id))}parseAsyncArrowFromCallExpression(t,i){return this.match(10)&&(t.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(t,i)}parseMaybeAssign(t,i){let r,n,a;if(this.hasPlugin("jsx")&&(this.match(138)||this.match(43))){if(r=this.state.clone(),n=this.tryParse(()=>super.parseMaybeAssign(t,i),r),!n.error)return n.node;let{context:l}=this.state,u=l[l.length-1];(u===Ee.j_oTag||u===Ee.j_expr)&&l.pop()}if(!n?.error&&!this.match(43))return super.parseMaybeAssign(t,i);(!r||r===this.state)&&(r=this.state.clone());let o,c=this.tryParse(l=>{o=this.tsParseTypeParameters(this.tsParseConstModifier);let u=super.parseMaybeAssign(t,i);if((u.type!=="ArrowFunctionExpression"||u.extra?.parenthesized)&&l(),o?.params.length!==0&&this.resetStartLocationFromNode(u,o),u.typeParameters=o,this.hasPlugin("jsx")&&u.typeParameters.params.length===1&&!u.typeParameters.extra?.trailingComma){let f=u.typeParameters.params[0];f.constraint||this.raise(M.SingleTypeParameterWithoutTrailingComma,this.optionFlags&256?Ye(f.loc.end,1):f,{typeParameterName:f.name.name})}return u},r);if(!c.error&&!c.aborted)return o&&this.reportReservedArrowTypeParam(o),c.node;if(!n&&(BT(!this.hasPlugin("jsx")),a=this.tryParse(()=>super.parseMaybeAssign(t,i),r),!a.error))return a.node;if(n?.node)return this.state=n.failState,n.node;if(c.node)return this.state=c.failState,o&&this.reportReservedArrowTypeParam(o),c.node;if(a?.node)return this.state=a.failState,a.node;throw n?.error||c.error||a?.error}reportReservedArrowTypeParam(t){t.params.length===1&&!t.params[0].constraint&&!t.extra?.trailingComma&&this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(M.ReservedArrowTypeParam,t)}parseMaybeUnary(t,i){return!this.hasPlugin("jsx")&&this.match(43)?this.tsParseTypeAssertion():super.parseMaybeUnary(t,i)}parseArrow(t){if(this.match(10)){let i=this.tryParse(r=>{let n=this.tsParseTypeOrTypePredicateAnnotation(10);return(this.canInsertSemicolon()||!this.match(15))&&r(),n});if(i.aborted)return;i.thrown||(i.error&&(this.state=i.failState),t.returnType=i.node)}return super.parseArrow(t)}parseFunctionParamType(t){this.eat(13)&&(t.optional=!0);let i=this.tsTryParseTypeAnnotation();return i&&(t.typeAnnotation=i),this.resetEndLocation(t),t}isAssignable(t,i){switch(t.type){case"TSTypeCastExpression":return this.isAssignable(t.expression,i);case"TSParameterProperty":return!0;default:return super.isAssignable(t,i)}}toAssignable(t,i=!1){switch(t.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(t,i);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":i?this.expressionScope.recordArrowParameterBindingError(M.UnexpectedTypeCastInParameter,t):this.raise(M.UnexpectedTypeCastInParameter,t),this.toAssignable(t.expression,i);break;case"AssignmentExpression":!i&&t.left.type==="TSTypeCastExpression"&&(t.left=this.typeCastToParameter(t.left));default:super.toAssignable(t,i)}}toAssignableParenthesizedExpression(t,i){switch(t.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(t.expression,i);break;default:super.toAssignable(t,i)}}checkToRestConversion(t,i){switch(t.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(t.expression,!1);break;default:super.checkToRestConversion(t,i)}}isValidLVal(t,i,r,n){switch(t){case"TSTypeCastExpression":return!0;case"TSParameterProperty":return"parameter";case"TSNonNullExpression":return"expression";case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":return(n!==64||!r)&&["expression",!0];default:return super.isValidLVal(t,i,r,n)}}parseBindingAtom(){return this.state.type===74?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(t,i){if(this.match(43)||this.match(47)){let r=this.tsParseTypeArgumentsInExpression();if(this.match(6)){let n=super.parseMaybeDecoratorArguments(t,i);return n.typeArguments=r,n}this.unexpected(null,6)}return super.parseMaybeDecoratorArguments(t,i)}checkCommaAfterRest(t){return this.state.isAmbientContext&&this.match(8)&&this.lookaheadCharCode()===t?(this.next(),!1):super.checkCommaAfterRest(t)}isClassMethod(){return this.match(43)||super.isClassMethod()}isClassProperty(){return this.match(31)||this.match(10)||super.isClassProperty()}parseMaybeDefault(t,i){let r=super.parseMaybeDefault(t,i);return r.type==="AssignmentPattern"&&r.typeAnnotation&&r.right.start<r.typeAnnotation.start&&this.raise(M.TypeAnnotationAfterAssign,r.typeAnnotation),r}getTokenFromCode(t){if(this.state.inType){if(t===62){this.finishOp(44,1);return}if(t===60){this.finishOp(43,1);return}}super.getTokenFromCode(t)}reScan_lt_gt(){let{type:t}=this.state;t===43?(this.state.pos-=1,this.readToken_lt()):t===44&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){let{type:t}=this.state;return t===47?(this.state.pos-=2,this.finishOp(43,1),43):t}toAssignableListItem(t,i,r){let n=t[i];n.type==="TSTypeCastExpression"&&(t[i]=this.typeCastToParameter(n)),super.toAssignableListItem(t,i,r)}typeCastToParameter(t){return t.expression.typeAnnotation=t.typeAnnotation,this.resetEndLocationFromNode(t.expression,t.typeAnnotation),t.expression}shouldParseArrow(t){return this.match(10)?t.every(i=>this.isAssignable(i,!0)):super.shouldParseArrow(t)}shouldParseAsyncArrow(){return this.match(10)?!this.state.inConditionalConsequent:super.shouldParseAsyncArrow()}parseParenAndDistinguishExpression(t){let i=this.state.inConditionalConsequent;this.state.inConditionalConsequent=!1;let r=super.parseParenAndDistinguishExpression(t);return this.state.inConditionalConsequent=i,r}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(t){if(this.match(43)||this.match(47)){let i=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());i&&(t.typeArguments=i)}return super.jsxParseOpeningElementAfterName(t)}getGetterSetterExpectedParamCount(t){let i=super.getGetterSetterExpectedParamCount(t),n=this.getObjectOrClassMethodParams(t)[0];return n&&this.isThisParam(n)?i+1:i}parseCatchClauseParam(){let t=super.parseCatchClauseParam(),i=this.tsTryParseTypeAnnotation();return i&&(t.typeAnnotation=i,this.resetEndLocation(t)),t}tsInAmbientContext(t){let{isAmbientContext:i,strict:r}=this.state;this.state.isAmbientContext=!0,this.state.strict=!1;try{return t()}finally{this.state.isAmbientContext=i,this.state.strict=r}}parseClass(t,i,r){let n=this.state.inAbstractClass;this.state.inAbstractClass=!!t.abstract;try{return super.parseClass(t,i,r)}finally{this.state.inAbstractClass=n}}tsParseAbstractDeclaration(t,i){if(this.match(76))return t.abstract=!0,this.maybeTakeDecorators(i,this.parseClass(t,!0,!1));if(this.isContextual(125))return this.hasFollowingLineBreak()?null:(t.abstract=!0,this.raise(M.NonClassMethodPropertyHasAbstractModifier,t),this.tsParseInterfaceDeclaration(t));throw this.unexpected(null,76)}parseMethod(t,i,r,n,a,o,c){let l=super.parseMethod(t,i,r,n,a,o,c);if((l.abstract||l.type==="TSAbstractMethodDefinition")&&(this.hasPlugin("estree")?l.value:l).body){let{key:m}=l;this.raise(M.AbstractMethodHasImplementation,l,{methodName:m.type==="Identifier"&&!l.computed?m.name:`[${this.input.slice(this.offsetToSourcePos(m.start),this.offsetToSourcePos(m.end))}]`})}return l}tsParseTypeParameterName(){return this.parseIdentifier()}shouldParseAsAmbientContext(){return!!this.getPluginOption("typescript","dts")}parse(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.parse()}getExpression(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.getExpression()}parseExportSpecifier(t,i,r,n){return!i&&n?(this.parseTypeOnlyExportSpecifier(t,r),this.finishNode(t,"ExportSpecifier")):(t.exportKind="value",super.parseExportSpecifier(t,i,r,n))}parseImportSpecifier(t,i,r,n,a){return!i&&n?(this.parseTypeOnlyImportSpecifier(t,r),this.finishNode(t,"ImportSpecifier")):(t.importKind="value",super.parseImportSpecifier(t,i,r,n,r?4098:4096))}parseTypeOnlyImportSpecifier(t,i){let r=t.imported,n=!1;if(this.isContextual(89)){let a=this.parseIdentifier();if(this.isContextual(89)){let o=this.parseIdentifier();Je(this.state.type)?(n=!0,r=a,t.local=this.parseIdentifier()):t.local=o}else Je(this.state.type)?t.local=this.parseIdentifier():(n=!0,r=a)}else Je(this.state.type)&&(n=!0,r=this.parseIdentifier(!0),this.isContextual(89)||this.checkReservedWord(r.name,r.start,!0,!0));n&&i&&this.raise(M.TypeModifierIsUsedInTypeImports,t.imported),t.imported=r,t.importKind=n?"type":"value",this.checkIdentifier(t.local??=this.eatContextual(89)?this.parseIdentifier():this.cloneIdentifier(t.imported),n?4098:4096)}parseTypeOnlyExportSpecifier(t,i){let r=t.local,n=!1;if(this.isContextual(89)){let a=this.parseIdentifier();if(this.isContextual(89)){let o=this.parseIdentifier();Je(this.state.type)?(n=!0,t.local=a,t.exported=this.parseModuleExportName()):t.exported=o}else Je(this.state.type)?t.exported=this.parseModuleExportName():(n=!0,t.local=a)}else Je(this.state.type)&&(n=!0,t.local=this.parseModuleExportName());n&&i&&this.raise(M.TypeModifierIsUsedInTypeExports,r),t.exportKind=n?"type":"value",t.exported??=this.eatContextual(89)?this.parseModuleExportName():this.cloneIdentifier(t.local)}fillOptionalPropertiesForTSESLint(t){switch(t.type){case"ImportDeclaration":t.phase??=null;return;case"ExpressionStatement":t.directive??=void 0;return;case"RestElement":t.value=void 0;case"Identifier":case"ArrayPattern":case"AssignmentPattern":case"ObjectPattern":t.decorators??=[],t.optional??=!1,t.typeAnnotation??=void 0;return;case"TSParameterProperty":t.accessibility??=void 0,t.decorators??=[],t.override??=!1,t.readonly??=!1,t.static??=!1;return;case"TSEmptyBodyFunctionExpression":t.body=null;case"TSDeclareFunction":case"FunctionDeclaration":case"FunctionExpression":case"ClassMethod":case"ClassPrivateMethod":t.declare??=!1,t.returnType??=void 0,t.typeParameters??=void 0;return;case"Property":t.optional??=!1;return;case"TSMethodSignature":case"TSPropertySignature":t.optional??=!1;case"TSIndexSignature":t.accessibility??=void 0,t.readonly??=!1,t.static??=!1;return;case"TSAbstractPropertyDefinition":case"PropertyDefinition":case"TSAbstractAccessorProperty":case"AccessorProperty":t.declare??=!1,t.definite??=!1,t.readonly??=!1,t.typeAnnotation??=void 0;case"TSAbstractMethodDefinition":case"MethodDefinition":t.accessibility??=void 0,t.decorators??=[],t.override??=!1,t.optional??=!1;return;case"ClassExpression":t.id??=null;case"ClassDeclaration":t.abstract??=!1,t.declare??=!1,t.decorators??=[],t.implements??=[],t.superTypeArguments??=void 0,t.typeParameters??=void 0;return;case"TSTypeAliasDeclaration":case"VariableDeclaration":t.declare??=!1;return;case"VariableDeclarator":t.definite??=!1;return;case"TSEnumDeclaration":t.const??=!1,t.declare??=!1;return;case"TSEnumMember":t.computed??=!1;return;case"TSImportType":t.qualifier??=null,t.options??=null,t.typeArguments??=null;return;case"TSInterfaceDeclaration":t.declare??=!1,t.extends??=[];return;case"TSMappedType":t.optional??=!1,t.readonly??=void 0;return;case"TSModuleDeclaration":t.declare??=!1,t.global??=t.kind==="global";return;case"TSTypeParameter":t.const??=!1,t.in??=!1,t.out??=!1;return}}chStartsBindingIdentifierAndNotRelationalOperator(t,i){if(lt(t)){if(Uo.lastIndex=i,Uo.test(this.input)){let r=this.codePointAtPos(Uo.lastIndex);if(!Rt(r)&&r!==92)return!1}return!0}else return t===92}nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine(){let t=this.nextTokenInLineStart(),i=this.codePointAtPos(t);return this.chStartsBindingIdentifierAndNotRelationalOperator(i,t)}nextTokenIsStringLiteralOnSameLine(){let t=this.nextTokenInLineStart(),i=this.codePointAtPos(t);return i===34||i===39}};function l8(s){if(s.type!=="MemberExpression")return!1;let{computed:e,property:t}=s;return e&&t.type!=="StringLiteral"&&(t.type!=="TemplateLiteral"||t.expressions.length>0)?!1:eS(s.object)}function u8(s,e){let{type:t}=s;if(s.extra?.parenthesized)return!1;if(e){if(t==="Literal"){let{value:i}=s;if(typeof i=="string"||typeof i=="boolean")return!0}}else if(t==="StringLiteral"||t==="BooleanLiteral")return!0;return!!(ZT(s,e)||p8(s,e)||t==="TemplateLiteral"&&s.expressions.length===0||l8(s))}function ZT(s,e){return e?s.type==="Literal"&&(typeof s.value=="number"||"bigint"in s):s.type==="NumericLiteral"||s.type==="BigIntLiteral"}function p8(s,e){if(s.type==="UnaryExpression"){let{operator:t,argument:i}=s;if(t==="-"&&ZT(i,e))return!0}return!1}function eS(s){return s.type==="Identifier"?!0:s.type!=="MemberExpression"||s.computed?!1:eS(s.object)}function Ut(s,e=[]){let t=new Map;for(let i of s)t.set(i,!0);for(let i of e)t.set(i,!1);return t}var h8={ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."},jT=it`placeholders`(h8),f8=s=>class extends s{parsePlaceholder(t){if(this.match(129)){let i=this.startNode();return this.next(),this.assertNoSpace(),i.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(129),this.finishPlaceholder(i,t)}}finishPlaceholder(t,i){let r=t;return(!r.expectedNode||!r.type)&&(r=this.finishNode(r,"Placeholder")),r.expectedNode=i,r}getTokenFromCode(t){t===37&&this.input.charCodeAt(this.state.pos+1)===37?this.finishOp(129,2):super.getTokenFromCode(t)}parseExprAtom(t){return this.parsePlaceholder("Expression")||super.parseExprAtom(t)}parseIdentifier(t){return this.parsePlaceholder("Identifier")||super.parseIdentifier(t)}checkReservedWord(t,i,r,n){t!==void 0&&super.checkReservedWord(t,i,r,n)}cloneIdentifier(t){let i=super.cloneIdentifier(t);return i.type==="Placeholder"&&(i.expectedNode=t.expectedNode),i}cloneStringLiteral(t){return t.type==="Placeholder"?this.cloneIdentifier(t):super.cloneStringLiteral(t)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(t,i,r,n){return t==="Placeholder"||super.isValidLVal(t,i,r,n)}toAssignable(t,i){t&&t.type==="Placeholder"&&t.expectedNode==="Expression"?t.expectedNode="Pattern":super.toAssignable(t,i)}chStartsBindingIdentifier(t,i){if(super.chStartsBindingIdentifier(t,i))return!0;let r=this.nextTokenStart();return this.input.charCodeAt(r)===37&&this.input.charCodeAt(r+1)===37}verifyBreakContinue(t,i){t.label?.type!=="Placeholder"&&super.verifyBreakContinue(t,i)}parseExpressionStatement(t,i){if(i.type!=="Placeholder"||i.extra?.parenthesized)return super.parseExpressionStatement(t,i);if(this.match(10)){let n=t;return n.label=this.finishPlaceholder(i,"Identifier"),this.next(),n.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(n,"LabeledStatement")}this.semicolon();let r=t;return r.name=i.name,this.finishPlaceholder(r,"Statement")}parseBlock(t,i,r){return this.parsePlaceholder("BlockStatement")||super.parseBlock(t,i,r)}parseFunctionId(t){return this.parsePlaceholder("Identifier")||super.parseFunctionId(t)}parseClass(t,i,r){let n=i?"ClassDeclaration":"ClassExpression";this.next();let a=this.state.strict,o=this.parsePlaceholder("Identifier");if(o)if(this.match(77)||this.match(129)||this.match(2))t.id=o;else{if(r||!i)return t.id=null,t.body=this.finishPlaceholder(o,"ClassBody"),this.finishNode(t,n);throw this.raise(jT.ClassNameIsRequired,this.state.startLoc)}else this.parseClassId(t,i,r);return super.parseClassSuper(t),t.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!t.superClass,a),this.finishNode(t,n)}parseExport(t,i){let r=this.parsePlaceholder("Identifier");if(!r)return super.parseExport(t,i);let n=t;if(!this.isContextual(94)&&!this.match(8))return n.specifiers=[],n.source=null,n.declaration=this.finishPlaceholder(r,"Declaration"),this.finishNode(n,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");let a=this.startNode();return a.exported=r,n.specifiers=[this.finishNode(a,"ExportDefaultSpecifier")],super.parseExport(n,i)}isExportDefaultSpecifier(){if(this.match(61)){let t=this.nextTokenStart();if(this.isUnparsedContextual(t,"from")&&this.input.startsWith(Ct(129),this.nextTokenStartSince(t+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(t,i){return t.specifiers?.length?!0:super.maybeParseExportDefaultSpecifier(t,i)}checkNamedExport(){}parseImport(t){let i=this.parsePlaceholder("Identifier");if(!i)return super.parseImport(t);if(t.specifiers=[],!this.isContextual(94)&&!this.match(8))return t.source=this.finishPlaceholder(i,"StringLiteral"),this.semicolon(),this.finishNode(t,"ImportDeclaration");let r=this.startNodeAtNode(i);return r.local=i,t.specifiers.push(this.finishNode(r,"ImportDefaultSpecifier")),this.eat(8)&&(this.maybeParseStarImportSpecifier(t)||this.parseNamedImportSpecifiers(t)),this.expectContextual(94),t.source=this.parseImportSource(),this.semicolon(),this.finishNode(t,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource()}assertNoSpace(){this.state.start>this.offsetToSourcePos(this.state.lastTokEndLoc.index)&&this.raise(jT.UnexpectedSpace,this.state.lastTokEndLoc)}},d8=s=>class extends s{parseV8Intrinsic(){if(this.match(50)){let t=this.state.startLoc,i=this.startNode();if(this.next(),Te(this.state.type)){let r=this.parseIdentifierName(),n=this.createIdentifier(i,r);if(this.castNodeTo(n,"V8IntrinsicIdentifier"),this.match(6))return n}this.unexpected(t)}}parseExprAtom(t){return this.parseV8Intrinsic()||super.parseExprAtom(t)}},RT=["fsharp","hack"],UT=["^^","@@","^","%","#"];function m8(s){if(s.has("decorators")&&s.has("decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");if(s.has("flow")&&s.has("typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(s.has("placeholders")&&s.has("v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(s.has("pipelineOperator")){let e=s.get("pipelineOperator").proposal;if(!RT.includes(e)){let t=RT.map(i=>`"${i}"`).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${t}.`)}if(e==="hack"){if(s.has("placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(s.has("v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");let t=s.get("pipelineOperator").topicToken;if(!UT.includes(t)){let i=UT.map(r=>`"${r}"`).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${i}.`)}}}if(s.has("moduleAttributes"))throw new Error("`moduleAttributes` has been removed in Babel 8, please migrate to import attributes instead.");if(s.has("importAssertions"))throw new Error("`importAssertions` has been removed in Babel 8, please use import attributes instead.");if(s.has("deprecatedImportAssert")?console.warn("`deprecatedImportAssert` has been removed in Babel 8, please use import attributes instead."):s.has("importAttributes")&&s.get("importAttributes").deprecatedAssertSyntax&&console.warn("The 'importAttributes' plugin has been removed in Babel 8. Please migrate any usage of `assert`-style attributes to `with`."),s.has("recordAndTuple"))throw new Error("The 'recordAndTuple' plugin has been removed in Babel 8. Please remove it from your configuration.");if(s.has("asyncDoExpressions")&&!s.has("doExpressions")){let e=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw e.missingPlugins="doExpressions",e}if(s.has("optionalChainingAssign")&&s.get("optionalChainingAssign").version!=="2023-07")throw new Error("The 'optionalChainingAssign' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is '2023-07'.");if(s.has("discardBinding")&&s.get("discardBinding").syntaxType!=="void")throw new Error("The 'discardBinding' plugin requires a 'syntaxType' option. Currently the only supported value is 'void'.");if(s.has("decimal"))throw new Error("The 'decimal' plugin has been removed in Babel 8. Please remove it from your configuration.");if(s.has("importReflection"))throw new Error("The 'importReflection' plugin has been removed in Babel 8. Use 'sourcePhaseImports' instead, and replace 'import module' with 'import source' in your code.")}var tS={estree:f6,jsx:q6,flow:R6,typescript:c8,v8intrinsic:d8,placeholders:f8},y8=Object.keys(tS),Fr=class extends lc{constructor(e,t,i){let r=h6(e);super(r,t),this.options=r,this.initializeScopes(),this.plugins=i,this.filename=r.sourceFilename,this.startIndex=r.startIndex;let n=0;r.allowAwaitOutsideFunction&&(n|=1),r.allowReturnOutsideFunction&&(n|=2),r.allowImportExportEverywhere&&(n|=8),r.allowSuperOutsideMethod&&(n|=16),r.allowUndeclaredExports&&(n|=64),r.allowNewTargetOutsideFunction&&(n|=4),r.allowYieldOutsideFunction&&(n|=32),r.ranges&&(n|=128),r.locations===!0&&(n|=256),r.tokens&&(n|=512),r.createImportExpressions&&(n|=1024),r.createParenthesizedExpressions&&(n|=2048),r.errorRecovery&&(n|=4096),r.attachComment&&(n|=8192),r.annexB&&(n|=16384),this.optionFlags=n}getScopeHandler(){return hi}parse(){this.enterInitialScopes();let e=this.startNode(),t=this.startNode();this.nextToken(),e.errors=[];let i=this.parseTopLevel(e,t);return i.errors=this.state.errors,i.comments.length=this.state.commentsLen,i}};function Br(s,e){if(e?.sourceType==="unambiguous"){e={...e};try{e.sourceType="module";let t=vr(e,s),i=t.parse();if(t.sawUnambiguousESM)return i;if(t.ambiguousScriptDifferentAst)try{return e.sourceType="script",vr(e,s).parse()}catch{}else i.program.sourceType="script";return i}catch(t){try{return e.sourceType="script",vr(e,s).parse()}catch{}throw t}}else return vr(e,s).parse()}function T8(s){let e={};for(let t of Object.keys(s))e[t]=qT(s[t]);return e}var wH=T8(m6);function vr(s,e){let t=Fr,i=new Map;if(s?.plugins){for(let r of s.plugins){let n,a;typeof r=="string"?n=r:[n,a]=r,i.has(n)||i.set(n,a||{})}m8(i),t=S8(i)}return new t(s,e,i)}var VT=new Map;function S8(s){let e=[];for(let r of y8)s.has(r)&&e.push(r);let t=e.join("|"),i=VT.get(t);if(!i){i=Fr;for(let r of e)i=tS[r](i);VT.set(t,i)}return i}var{assertExpressionStatement:x8}=ne;function Ec(s){return{code:e=>`/* @babel/template */;
33
+ ${e}`,validate:()=>{},unwrap:e=>s(e.program.body.slice(1))}}var g8=Ec(s=>s.length>1?s:s[0]),P8=Ec(s=>s),b8=Ec(s=>{if(s.length===0)throw new Error("Found nothing to return.");if(s.length>1)throw new Error("Found multiple statements but wanted one");return s[0]}),lS={code:s=>`(
34
+ ${s}
35
+ )`,validate:s=>{if(s.program.body.length>1)throw new Error("Found multiple statements but wanted one");if(lS.unwrap(s).start===0)throw new Error("Parse result included parens.")},unwrap:({program:s})=>{let[e]=s.body;return x8(e),e.expression}},E8={code:s=>s,validate:()=>{},unwrap:s=>s.program};function di(s,e){let{placeholderAllowlist:t=s.placeholderAllowlist,placeholderPattern:i=s.placeholderPattern,preserveComments:r=s.preserveComments,syntacticPlaceholders:n=s.syntacticPlaceholders}=e;return{parser:{...s.parser,...e.parser},placeholderAllowlist:t,placeholderPattern:i,preserveComments:r,syntacticPlaceholders:n}}function mi(s){if(s!=null&&typeof s!="object")throw new Error("Unknown template options.");if(s!=null&&Object.hasOwn(s,"placeholderWhitelist")&&!Object.hasOwn(s,"placeholderAllowlist"))throw new Error("The 'placeholderWhitelist' option has been renamed to 'placeholderAllowlist'. Please update your configuration.");let{placeholderAllowlist:e,placeholderPattern:t,preserveComments:i,syntacticPlaceholders:r,...n}=s||{};if(e!=null&&!(e instanceof Set))throw new Error("'.placeholderAllowlist' must be a Set, null, or undefined");if(t!=null&&!(t instanceof RegExp)&&t!==!1)throw new Error("'.placeholderPattern' must be a RegExp, false, null, or undefined");if(i!=null&&typeof i!="boolean")throw new Error("'.preserveComments' must be a boolean, null, or undefined");if(r!=null&&typeof r!="boolean")throw new Error("'.syntacticPlaceholders' must be a boolean, null, or undefined");if(r===!0&&(e!=null||t!=null))throw new Error("'.placeholderAllowlist' and '.placeholderPattern' aren't compatible with '.syntacticPlaceholders: true'");return{parser:n,placeholderAllowlist:e||void 0,placeholderPattern:t??void 0,preserveComments:i??void 0,syntacticPlaceholders:r??void 0}}function uS(s){if(Array.isArray(s))return s.reduce((e,t,i)=>(e["$"+i]=t,e),{});if(typeof s=="object"||s==null)return s||void 0;throw new Error("Template replacements must be an array, object, null, or undefined")}var{isCallExpression:A8,isExpressionStatement:C8,isFunction:I8,isIdentifier:w8,isJSXIdentifier:N8,isNewExpression:v8,isPlaceholder:_r,isStatement:k8,isStringLiteral:sS,removePropertiesDeep:D8,traverse:L8}=ne,O8=/^[_$A-Z0-9]+$/;function pS(s,e,t){let{placeholderAllowlist:i,placeholderPattern:r,preserveComments:n=!1,syntacticPlaceholders:a}=t,o=B8(e,t.parser,a);D8(o,{preserveComments:n}),s.validate(o);let c={syntactic:{placeholders:[],placeholderNames:new Set},legacy:{placeholders:[],placeholderNames:new Set},placeholderAllowlist:i,placeholderPattern:r,syntacticPlaceholders:a};return L8(o,M8,c),{ast:o,...c.syntactic.placeholders.length?c.syntactic:c.legacy}}function M8(s,e,t){let i,r=t.syntactic.placeholders.length>0;if(_r(s)){if(t.syntacticPlaceholders===!1)throw new Error("%%foo%%-style placeholders can't be used when '.syntacticPlaceholders' is false.");i=s.name.name,r=!0}else{if(r||t.syntacticPlaceholders)return;if(w8(s)||N8(s))i=s.name;else if(sS(s))i=s.value;else return}if(r&&(t.placeholderPattern!=null||t.placeholderAllowlist!=null))throw new Error("'.placeholderAllowlist' and '.placeholderPattern' aren't compatible with '.syntacticPlaceholders: true'");if(!r&&(t.placeholderPattern===!1||!(t.placeholderPattern||O8).test(i))&&!t.placeholderAllowlist?.has(i))return;e=e.slice();let{node:n,key:a}=e[e.length-1],o;sS(s)||_r(s,{expectedNode:"StringLiteral"})?o="string":v8(n)&&a==="arguments"||A8(n)&&a==="arguments"||I8(n)&&a==="params"?o="param":C8(n)&&!_r(s)?(o="statement",e=e.slice(0,-1)):k8(s)&&_r(s)?o="statement":o="other";let{placeholders:c,placeholderNames:l}=r?t.syntactic:t.legacy;c.push({name:i,type:o,resolve:u=>F8(u,e),isDuplicate:l.has(i)}),l.add(i)}function F8(s,e){let t=s;for(let n=0;n<e.length-1;n++){let{key:a,index:o}=e[n];o===void 0?t=t[a]:t=t[a][o]}let{key:i,index:r}=e[e.length-1];return{parent:t,key:i,index:r}}function B8(s,e,t){let i=(e.plugins||[]).slice();t!==!1&&i.push("placeholders"),e={allowAwaitOutsideFunction:!0,allowReturnOutsideFunction:!0,allowNewTargetOutsideFunction:!0,allowSuperOutsideMethod:!0,allowYieldOutsideFunction:!0,sourceType:"module",...e,plugins:i};try{return Br(s,e)}catch(r){let n=r.loc;throw n&&(r.message+=`
36
+ `+Cr(s,{start:n}),r.code="BABEL_TEMPLATE_PARSE_ERROR"),r}}var{blockStatement:_8,cloneNode:bc,emptyStatement:j8,expressionStatement:gc,identifier:jr,isStatement:iS,isStringLiteral:R8,stringLiteral:U8,validate:rS}=ne;function hS(s,e){let t=bc(s.ast);return e&&(s.placeholders.forEach(i=>{if(!Object.hasOwn(e,i.name)){let r=i.name;throw new Error(`Error: No substitution given for "${r}". If this is not meant to be a
37
+ placeholder you may want to consider passing one of the following options to @babel/template:
38
+ - { placeholderPattern: false, placeholderAllowlist: new Set(['${r}'])}
39
+ - { placeholderPattern: /^${r}$/ }`)}}),Object.keys(e).forEach(i=>{if(!s.placeholderNames.has(i))throw new Error(`Unknown substitution "${i}" given`)})),s.placeholders.slice().reverse().forEach(i=>{try{V8(i,t,(e&&e[i.name])??null)}catch(r){throw r.message=`@babel/template placeholder "${i.name}": ${r.message}`,r}}),t}function V8(s,e,t){s.isDuplicate&&(Array.isArray(t)?t=t.map(o=>bc(o)):typeof t=="object"&&(t=bc(t)));let{parent:i,key:r,index:n}=s.resolve(e);if(s.type==="string"){if(typeof t=="string"&&(t=U8(t)),!t||!R8(t))throw new Error("Expected string substitution")}else if(s.type==="statement")n===void 0?t?Array.isArray(t)?t=_8(t):typeof t=="string"?t=gc(jr(t)):iS(t)||(t=gc(t)):t=j8():t&&!Array.isArray(t)&&(typeof t=="string"&&(t=jr(t)),iS(t)||(t=gc(t)));else if(s.type==="param"){if(typeof t=="string"&&(t=jr(t)),n===void 0)throw new Error("Assertion failure.")}else if(typeof t=="string"&&(t=jr(t)),Array.isArray(t))throw new Error("Cannot replace single expression with an array.");function a(o,c,l){let u=o[c];o[c]=l,(u.type==="Identifier"||u.type==="Placeholder")&&(u.typeAnnotation&&(l.typeAnnotation=u.typeAnnotation),u.optional&&(l.optional=u.optional),u.decorators&&(l.decorators=u.decorators))}if(n===void 0)rS(i,r,t),a(i,r,t);else{let o=i[r].slice();s.type==="statement"||s.type==="param"?t==null?o.splice(n,1):Array.isArray(t)?o.splice(n,1,...t):a(o,n,t):a(o,n,t),rS(i,r,o),i[r]=o}}function nS(s,e,t){e=s.code(e);let i;return r=>{let n=uS(r);return i||(i=pS(s,e,t)),s.unwrap(hS(i,n))}}function aS(s,e,t){let{metadata:i,names:r}=K8(s,e,t);return n=>{let a={};return n.forEach((o,c)=>{a[r[c]]=o}),o=>{let c=uS(o);return c&&Object.keys(c).forEach(l=>{if(Object.hasOwn(a,l))throw new Error("Unexpected replacement overlap.")}),s.unwrap(hS(i,c?Object.assign(c,a):a))}}}function K8(s,e,t){let i="BABEL_TPL$",r=e.join("");do i="$$"+i;while(r.includes(i));let{names:n,code:a}=q8(e,i);return{metadata:pS(s,s.code(a),{parser:t.parser,placeholderAllowlist:new Set(n.concat(t.placeholderAllowlist?Array.from(t.placeholderAllowlist):[])),placeholderPattern:t.placeholderPattern,preserveComments:t.preserveComments,syntacticPlaceholders:t.syntacticPlaceholders}),names:n}}function q8(s,e){let t=[],i=s[0];for(let r=1;r<s.length;r++){let n=`${e}${r-1}`;t.push(n),i+=n+s[r]}return{names:t,code:i}}var oS=mi({placeholderPattern:!1});function Ps(s,e){let t=new WeakMap,i=new WeakMap,r=e||mi(null);return Object.assign((n,...a)=>{if(typeof n=="string"){if(a.length>1)throw new Error("Unexpected extra params.");return cS(nS(s,n,di(r,mi(a[0]))))}else if(Array.isArray(n)){let o=t.get(n);return o||(o=aS(s,n,r),t.set(n,o)),cS(o(a))}else if(typeof n=="object"&&n){if(a.length>0)throw new Error("Unexpected extra params.");return Ps(s,di(r,mi(n)))}throw new Error(`Unexpected template param ${typeof n}`)},{ast:(n,...a)=>{if(typeof n=="string"){if(a.length>1)throw new Error("Unexpected extra params.");return nS(s,n,di(di(r,mi(a[0])),oS))()}else if(Array.isArray(n)){let o=i.get(n);return o||(o=aS(s,n,di(r,oS)),i.set(n,o)),o(a)()}throw new Error(`Unexpected template param ${typeof n}`)}})}function cS(s){let e=new Error;return t=>{try{return s(t)}catch(i){throw i.stack+=`
40
+ =============
41
+ ${e.stack.split(`
42
+ `).slice(3).join(`
43
+ `)}`,i}}}var Pc=Ps(g8),$8=Ps(b8),J8=Ps(P8),X8=Ps(lS),W8=Ps(E8),fS=Object.assign(Pc.bind(void 0),{smart:Pc,statement:$8,statements:J8,expression:X8,program:W8,ast:Pc.ast});var z8=["Identifier","JSXIdentifier"],H8=["MemberExpression"],Y8=["Identifier"],G8=["Statement"],Q8=["Expression"],Z8=["Scopable","Pattern"],eU=null,tU=["FunctionDeclaration","ClassDeclaration","VariableDeclaration"],sU=["VariableDeclaration"],iU=null,rU=null,nU=null,aU=["Flow","ImportDeclaration","ExportDeclaration","ImportSpecifier"],oU=["RestElement"],cU=["RestElement"],lU=["ExistsTypeAnnotation"],uU=["NumberLiteralTypeAnnotation"],pU=["ForOfStatement"],$c=Object.defineProperty({__proto__:null,BindingIdentifier:Y8,BlockScoped:tU,ExistentialTypeParam:lU,Expression:Q8,Flow:aU,ForAwaitStatement:pU,Generated:rU,NumericLiteralTypeAnnotation:uU,Pure:nU,Referenced:eU,ReferencedIdentifier:z8,ReferencedMemberExpression:H8,RestProperty:oU,Scope:Z8,SpreadProperty:cU,Statement:G8,User:iU,Var:sU},Symbol.toStringTag,{value:"Module"}),Mc=class{constructor(e,t){this.state=t,this.opts=e}queue=null;priorityQueue=null;maybeQueue(e,t){this.queue&&(t?this.queue.push(e):this.priorityQueue.push(e))}},{VISITOR_KEYS:hU}=ne;function Ur(s,e){s.queue=e,s.priorityQueue=[];let t=new Set,i=!1,r=0;for(;r<e.length;){let n=e[r];if(r++,Wt.call(n),(n.contexts.length===0||n.contexts[n.contexts.length-1]!==s)&&kx.call(n,s),n.key===null)continue;let{node:a}=n;if(!t.has(a)){if(a&&t.add(a),fU(s,n)){i=!0;break}if(s.priorityQueue.length&&(i=Ur(s,s.priorityQueue),s.priorityQueue=[],s.queue=e,i))break}}for(let n=0;n<r;n++)nq.call(e[n]);return s.queue=null,i}function fU(s,e){let t=e.node;if(!t)return!1;let i=s.opts;return i.denylist?.includes(t.type)||i.shouldSkip?.(e)?!1:(e.shouldSkip||Rr.call(e,i.enter)||e.node&&Rr.call(e,i[t.type]?.enter)||(e.shouldStop=Jr(e.node,i,e.scope,s.state,e,e.skipKeys),e.node&&Rr.call(e,i.exit))||e.node&&Rr.call(e,i[t.type]?.exit),e.shouldStop)}function Jr(s,e,t,i,r,n,a){let o=hU[s.type];if(!o?.length)return!1;let c=new Mc(e,i);if(a)return n?.[r.parentKey]?!1:Ur(c,[r]);let l=r==null?s.type==="Program"||s.type==="File"?new qc:void 0:r.hub;for(let u of o){if(n?.[u])continue;let f=s[u];if(f){if(Array.isArray(f)){if(!f.length)continue;let m=[];for(let x=0;x<f.length;x++){let I=Xe.get({parentPath:r,parent:s,container:f,key:x,listKey:u,hub:l});m.push(I)}if(Ur(c,m))return!0}else if(Ur(c,[Xe.get({parentPath:r,parent:s,container:s,key:u,listKey:null,hub:l})]))return!0}}return!1}var{isBinding:dU,isBlockScoped:mU,isExportDeclaration:yU,isExpression:TU,isFlow:SU,isForStatement:xU,isForXStatement:gU,isIdentifier:XS,isImportDeclaration:PU,isImportSpecifier:bU,isJSXIdentifier:EU,isJSXMemberExpression:AU,isMemberExpression:CU,isRestElement:WS,isReferenced:Kr,isScope:IU,isStatement:wU,isVar:NU,isVariableDeclaration:vU,react:kU,isForOfStatement:DU}=ne,{isCompatTag:LU}=kU;function OU(s){let{node:e,parent:t}=this;return XS(e,s)?Kr(e,t,this.parentPath.parent):EU(e,s)?!AU(t)&&LU(e.name)?!1:Kr(e,t,this.parentPath.parent):!1}function MU(){let{node:s,parent:e}=this;return CU(s)&&Kr(s,e)}function FU(){let{node:s,parent:e}=this,t=this.parentPath.parent;return XS(s)&&dU(s,e,t)}function BU(){let{node:s,parent:e}=this;return wU(s)?!(vU(s)&&(gU(e,{left:s})||xU(e,{init:s}))):!1}function _U(){return this.isIdentifier()?this.isReferencedIdentifier():TU(this.node)}function jU(){return IU(this.node,this.parent)}function RU(){return Kr(this.node,this.parent)}function UU(){return mU(this.node)}function VU(){return NU(this.node)}function KU(){return!!this.node?.loc}function qU(){return!this.isUser()}function $U(s){return this.scope.isPure(this.node,s)}function JU(){let{node:s}=this;return SU(s)?!0:PU(s)?s.importKind==="type"||s.importKind==="typeof":yU(s)?s.exportKind==="type":bU(s)?s.importKind==="type"||s.importKind==="typeof":!1}function XU(){return WS(this.node)&&this.parentPath?.isObjectPattern()}function WU(){return WS(this.node)&&this.parentPath?.isObjectExpression()}function zU(){return DU(this.node,{await:!0})}var zS=Object.defineProperty({__proto__:null,isBindingIdentifier:FU,isBlockScoped:UU,isExpression:_U,isFlow:JU,isForAwaitStatement:zU,isGenerated:qU,isPure:$U,isReferenced:RU,isReferencedIdentifier:OU,isReferencedMemberExpression:MU,isRestProperty:XU,isScope:jU,isSpreadProperty:WU,isStatement:BU,isUser:KU,isVar:VU},Symbol.toStringTag,{value:"Module"}),{DEPRECATED_KEYS:dS,DEPRECATED_ALIASES:mS,FLIPPED_ALIAS_KEYS:yS,TYPES:HU,__internal__deprecationWarning:TS}=ne;function YU(s){return s in $c}function HS(s){return s?._exploded}function Xt(s){if(HS(s))return s;if(s._exploded=!0,Object.hasOwn(s,"blacklist")){if(!Object.hasOwn(s,"denylist"))throw new Error("The 'blacklist' visitor option has been renamed to 'denylist'. Please update your configuration.");delete s.blacklist}for(let t of Object.keys(s)){if(Kt(t))continue;let i=t.split("|");if(i.length===1)continue;let r=s[t];delete s[t];for(let n of i)s[n]=r}Jc(s),delete s.__esModule,GU(s),gS(s);let e=s;for(let t of Object.keys(s)){if(Kt(t)||!YU(t))continue;let i=e[t];for(let n of Object.keys(i))i[n]=QU(t,i[n]);delete e[t];let r=$c[t];if(r!==null)for(let n of r)e[n]??={},Si(e[n],i);else Si(s,i)}for(let t of Object.keys(s)){if(Kt(t))continue;let i=yS[t];if(t in dS){let n=dS[t];TS(t,n,"Visitor "),i=[n]}else if(t in mS){let n=mS[t];TS(t,n,"Visitor "),i=yS[n]}if(!i)continue;let r=s[t];delete s[t];for(let n of i){let a=e[n];a?Si(a,r):e[n]={...r}}}for(let t of Object.keys(s))Kt(t)||gS(s[t]);return s}function Jc(s){if(!s._verified){if(typeof s=="function")throw new Error("You passed `traverse()` a function when it expected a visitor object, are you sure you didn't mean `{ enter: Function }`?");for(let e of Object.keys(s)){if((e==="enter"||e==="exit")&&SS(e,s[e]),Kt(e))continue;if(!HU.includes(e))throw new Error(`You gave us a visitor for the node type ${e} but it's not a valid type in @babel/traverse 8.0.7`);let t=s[e];if(typeof t=="object")for(let i of Object.keys(t))if(i==="enter"||i==="exit")SS(`${e}.${i}`,t[i]);else throw new Error(`You passed \`traverse()\` a visitor object with the property ${e} that has the invalid property ${i}`)}s._verified=!0}}function SS(s,e){let t=[].concat(e);for(let i of t)if(typeof i!="function")throw new TypeError(`Non-function found defined in ${s} with type ${typeof i}`)}function YS(s,e=[],t){let i={_verified:!0,_exploded:!0};for(let r=0;r<s.length;r++){let n=Xt(s[r]),a=e[r],o=n;(a||t)&&(o=xS(o,a,t)),Si(i,o);for(let c of Object.keys(n)){if(Kt(c))continue;let l=n[c];(a||t)&&(l=xS(l,a,t));let u=i[c]||={};Si(u,l)}}return i}function xS(s,e,t){let i={};for(let r of["enter","exit"]){let n=s[r];Array.isArray(n)&&(n=n.map(function(a){let o=a;return e&&(o=function(c){a.call(e,c,e)}),t&&(o=t(e?.key,r,o)),o!==a&&(o.toString=()=>a.toString()),o}),i[r]=n)}return i}function GU(s){for(let e of Object.keys(s)){if(Kt(e))continue;let t=s[e];typeof t=="function"&&(s[e]={enter:t})}}function gS(s){s.enter&&!Array.isArray(s.enter)&&(s.enter=[s.enter]),s.exit&&!Array.isArray(s.exit)&&(s.exit=[s.exit])}function QU(s,e){let t=`is${s}`,i=zS[t],r=function(n){if(i.call(n))return e.apply(this,arguments)};return r.toString=()=>e.toString(),r}function Kt(s){if(s.startsWith("_")||s==="enter"||s==="exit"||s==="shouldSkip"||s==="denylist"||s==="noScope"||s==="skipKeys")return!0;if(s==="blacklist")throw new Error("The 'blacklist' visitor option has been renamed to 'denylist'. Please update your configuration.");return!1}function Si(s,e){for(let t of["enter","exit"])e[t]&&(s[t]=[].concat(s[t]||[],e[t]))}var ZU={FunctionParent(s){s.isArrowFunctionExpression()||(s.skip(),s.isMethod()&&s.requeueComputedKeyAndDecorators())},Property(s){s.isObjectProperty()||(s.skip(),s.requeueComputedKeyAndDecorators())}};function Xr(s){return YS([ZU,s])}var e5=Object.defineProperty({__proto__:null,environmentVisitor:Xr,explode:Xt,isExplodedVisitor:HS,merge:YS,verify:Jc},Symbol.toStringTag,{value:"Module"}),{getAssignmentIdentifiers:t5}=ne,s5,i5=()=>s5??=Xt({ReferencedIdentifier({node:s},e){s.name===e.oldName&&(s.name=e.newName)},Scope(s,e){s.scope.bindingIdentifierEquals(e.oldName,e.binding.identifier)||(s.skip(),s.isMethod()&&s.requeueComputedKeyAndDecorators(),s.isSwitchStatement()&&s.context.maybeQueue(s.get("discriminant")))},ObjectProperty({node:s,scope:e},t){let{name:i}=s.key;s.shorthand&&(i===t.oldName||i===t.newName)&&e.getBindingIdentifier(i)===t.binding.identifier&&(s.shorthand=!1)},"AssignmentExpression|Declaration|VariableDeclarator"(s,e){if(s.isVariableDeclaration())return;let t=s.isAssignmentExpression()?t5(s.node):s.getOuterBindingIdentifiers();for(let i in t)i===e.oldName&&(t[i].name=e.newName)}}),Fc=class{constructor(e,t,i){this.newName=i,this.oldName=t,this.binding=e}maybeConvertFromExportDeclaration(e){let t=e.parentPath;if(t.isExportDeclaration()){if(t.isExportDefaultDeclaration()){let{declaration:i}=t.node;if(er(i)&&!i.id)return}t.isExportAllDeclaration()||t.splitExportDeclaration()}}maybeConvertFromClassFunctionDeclaration(e){return e}maybeConvertFromClassFunctionExpression(e){return e}rename(){let{binding:e,oldName:t,newName:i}=this,{scope:r,path:n}=e,a=n.find(l=>l.isDeclaration()||l.isFunctionExpression()||l.isClassExpression());a&&a.getOuterBindingIdentifiers()[t]===e.identifier&&this.maybeConvertFromExportDeclaration(a);let o=r.block,c={discriminant:!0};xa(o)&&(o.computed&&(c.key=!0),Zi(o)||(c.decorators=!0)),Jr(o,i5(),r,this,r.path,c),r.removeOwnBinding(t),r.bindings[i]=e,this.binding.identifier.name=i,a&&(this.maybeConvertFromClassFunctionDeclaration(n),this.maybeConvertFromClassFunctionExpression(n))}},{VISITOR_KEYS:r5}=ne;function n5(s,e,t){let i=Xt(e);if(i.enter||i.exit)throw new Error("Should not be used with enter/exit visitors.");r(s.parentPath,s.parent,s.node,s.container,s.key,s.listKey,s.hub,s);function r(n,a,o,c,l,u,f,m){if(!o)return;let x=m||Xe.get({hub:f,parentPath:n,parent:a,container:c,listKey:u,key:l});iq.call(x);let I=i[o.type];if(I?.enter)for(let N of I.enter)N.call(t,x,t);if(x.shouldSkip)return;let L=r5[o.type];if(L?.length){for(let N of L){let w=o[N];if(w)if(Array.isArray(w))for(let v=0;v<w.length;v++){let z=w[v];r(x,o,z,w,v,N)}else r(x,o,w,o,N,null)}if(I?.exit)for(let N of I.exit)N.call(t,x,t)}}}var Bc=class{identifier;scope;path;kind;constructor({identifier:e,scope:t,path:i,kind:r}){this.identifier=e,this.scope=t,this.path=i,this.kind=r,(r==="var"||r==="hoisted")&&a5(i)&&this.reassign(i),this.clearValue()}constantViolations=[];constant=!0;referencePaths=[];referenced=!1;references=0;deoptValue(){this.clearValue(),this.hasDeoptedValue=!0}setValue(e){this.hasDeoptedValue||(this.hasValue=!0,this.value=e)}clearValue(){this.hasDeoptedValue=!1,this.hasValue=!1,this.value=null}reassign(e){this.constant=!1,!this.constantViolations.includes(e)&&this.constantViolations.push(e)}reference(e){this.referencePaths.includes(e)||(this.referenced=!0,this.references++,this.referencePaths.push(e))}dereference(){this.references--,this.referenced=!!this.references}};function a5(s){let e=!s.isVariableDeclarator()||s.node.init;for(let{parentPath:t,key:i}=s;t;{parentPath:t,key:i}=t){if(t.isFunctionParent())return!1;if(i==="left"&&t.isForXStatement()||e&&i==="body"&&t.isLoop())return!0}return!1}var gi=new WeakMap,qr=new WeakMap;function o5(){GS(),QS()}function GS(){gi=new WeakMap}function QS(){qr=new WeakMap}function Ai(s){let{parent:e,parentPath:t}=s;return t?t._store:gi.get(e)}function ZS(s,e){if(e)return e._store||=new Map;let t=gi.get(s);return t||gi.set(s,t=new Map),t}var c5=Object.defineProperty({__proto__:null,clear:o5,clearPath:GS,clearScope:QS,getCachedPaths:Ai,getOrCreateCachedPaths:ZS,get path(){return gi},get scope(){return qr}},Symbol.toStringTag,{value:"Module"}),{assignmentExpression:l5,cloneNode:PS,getBindingIdentifiers:ex,identifier:Ac,isArrayExpression:u5,isBinary:p5,isCallExpression:bS,isClass:h5,isClassBody:f5,isClassDeclaration:d5,isExportAllDeclaration:tx,isExportDefaultDeclaration:m5,isExportNamedDeclaration:Cc,isFunctionDeclaration:y5,isIdentifier:yi,isImportDeclaration:Ic,isLiteral:T5,isMemberExpression:S5,isMethod:x5,isModuleSpecifier:g5,isNullLiteral:P5,isObjectExpression:b5,isProperty:E5,isPureish:A5,isRegExpLiteral:C5,isSuper:I5,isTaggedTemplateExpression:w5,isTemplateLiteral:sx,isThisExpression:ES,isUnaryExpression:N5,isVariableDeclaration:v5,expressionStatement:k5,matchesPattern:AS,toIdentifier:D5,variableDeclaration:L5,variableDeclarator:O5,isObjectProperty:M5,isTopicReference:CS,isMetaProperty:F5,isPrivateName:B5,isExportDeclaration:_5,sequenceExpression:j5}=ne;function Ae(s,e){switch(s?.type){default:if(Ic(s)||_5(s))if((tx(s)||Cc(s)||Ic(s))&&s.source)Ae(s.source,e);else if((Cc(s)||Ic(s))&&s.specifiers?.length)for(let t of s.specifiers)Ae(t,e);else(m5(s)||Cc(s))&&s.declaration&&Ae(s.declaration,e);else g5(s)?Ae(s.local,e):T5(s)&&!P5(s)&&!C5(s)&&!sx(s)&&e.push(s.value);break;case"MemberExpression":case"OptionalMemberExpression":case"JSXMemberExpression":Ae(s.object,e),Ae(s.property,e);break;case"Identifier":case"JSXIdentifier":e.push(s.name);break;case"CallExpression":case"OptionalCallExpression":case"NewExpression":Ae(s.callee,e);break;case"ObjectExpression":case"ObjectPattern":for(let t of s.properties)Ae(t,e);break;case"SpreadElement":case"RestElement":Ae(s.argument,e);break;case"ObjectProperty":case"ObjectMethod":case"ClassProperty":case"ClassMethod":case"ClassPrivateProperty":case"ClassPrivateMethod":Ae(s.key,e);break;case"ThisExpression":e.push("this");break;case"Super":e.push("super");break;case"Import":case"ImportExpression":e.push("import");break;case"DoExpression":e.push("do");break;case"YieldExpression":e.push("yield"),Ae(s.argument,e);break;case"AwaitExpression":e.push("await"),Ae(s.argument,e);break;case"AssignmentExpression":Ae(s.left,e);break;case"VariableDeclarator":Ae(s.id,e);break;case"FunctionExpression":case"FunctionDeclaration":case"ClassExpression":case"ClassDeclaration":Ae(s.id,e);break;case"PrivateName":Ae(s.id,e);break;case"ParenthesizedExpression":Ae(s.expression,e);break;case"UnaryExpression":case"UpdateExpression":Ae(s.argument,e);break;case"MetaProperty":Ae(s.meta,e),Ae(s.property,e);break;case"JSXElement":Ae(s.openingElement,e);break;case"JSXOpeningElement":Ae(s.name,e);break;case"JSXFragment":Ae(s.openingFragment,e);break;case"JSXOpeningFragment":e.push("Fragment");break;case"JSXNamespacedName":Ae(s.namespace,e),Ae(s.name,e);break}}function IS(s){s.path.type==="Program"&&(s.referencesSet=new Set,s.uidsSet=new Set),s.bindings=Object.create(null),s.globals=Object.create(null)}function R5(s){return s.isFunctionExpression()&&!s.node.id||s.isArrowFunctionExpression()}var U5={ForStatement(s){let e=s.get("init");if(e.isVar()){let{scope:t}=s;(t.getFunctionParent()||t.getProgramParent()).registerBinding("var",e)}},Declaration(s){if(s.isBlockScoped()||s.isImportDeclaration()||s.isExportDeclaration())return;(s.scope.getFunctionParent()||s.scope.getProgramParent()).registerDeclaration(s)},ImportDeclaration(s){s.scope.getBlockParent().registerDeclaration(s)},TSImportEqualsDeclaration(s){s.scope.getBlockParent().registerDeclaration(s)},ReferencedIdentifier(s,e){ya(s.parent)&&s.parent.right===s.node||s.parentPath.isTSImportEqualsDeclaration()||e.references.push(s)},ForXStatement(s,e){let t=s.get("left");if(t.isPattern()||t.isIdentifier())e.constantViolations.push(s);else if(t.isVar()){let{scope:i}=s;(i.getFunctionParent()||i.getProgramParent()).registerBinding("var",t)}},ExportDeclaration:{exit(s){let{node:e,scope:t}=s;if(tx(e))return;let i=e.declaration;if(d5(i)||y5(i)){let r=i.id;if(!r)return;t.getBinding(r.name)?.reference(s)}else if(v5(i))for(let r of i.declarations)for(let n of Object.keys(ex(r)))t.getBinding(n)?.reference(s)}},LabeledStatement(s){s.scope.getBlockParent().registerDeclaration(s)},AssignmentExpression(s,e){e.assignments.push(s)},UpdateExpression(s,e){e.constantViolations.push(s)},UnaryExpression(s,e){s.node.operator==="delete"&&e.constantViolations.push(s)},BlockScoped(s){let e=s.scope;if(e.path===s&&(e=e.parent),e.getBlockParent().registerDeclaration(s),s.isClassDeclaration()&&s.node.id){let r=s.node.id.name;s.scope.bindings[r]=s.scope.parent.getBinding(r)}},CatchClause(s){s.scope.registerBinding("let",s)},Function(s){let e=s.get("params");for(let t of e)s.scope.registerBinding("param",t);s.isFunctionExpression()&&s.node.id&&s.scope.registerBinding("local",s.get("id"),s)},ClassExpression(s){s.node.id&&s.scope.registerBinding("local",s.get("id"),s)},TSTypeAnnotation(s){s.skip()}},wc,V5=0,_c=class s{uid;path;block;inited;labels;bindings;referencesSet;globals;uidsSet;data;crawling;constructor(e){let{node:t}=e,i=qr.get(t);if(i?.path===e)return i;qr.set(t,this),this.uid=V5++,this.block=t,this.path=e,this.labels=new Map,this.inited=!1}static globals=[...Hm,...Ym];static contextVariables=["arguments","undefined","Infinity","NaN"];get parent(){let e,t=this.path;do{let i=t.key==="key"||t.listKey==="decorators";t=t.parentPath,i&&t.isMethod()&&(t=t.parentPath),t?.isScope()&&(e=t)}while(t&&!e);return e?.scope}get references(){throw new Error("Scope#references is not available in Babel 8. Use Scope#referencesSet instead.")}get uids(){throw new Error("Scope#uids is not available in Babel 8. Use Scope#uidsSet instead.")}generateDeclaredUidIdentifier(e){let t=this.generateUidIdentifier(e);return this.push({id:t}),PS(t)}generateUidIdentifier(e){return Ac(this.generateUid(e))}generateUid(e="temp"){e=D5(e).replace(/^_+/,"").replace(/\d+$/g,"");let t,i=0;do t=`_${e}`,i>=11?t+=i-1:i>=9?t+=i-9:i>=1&&(t+=i+1),i++;while(this.hasLabel(t)||this.hasBinding(t)||this.hasGlobal(t)||this.hasReference(t));let r=this.getProgramParent();return r.referencesSet.add(t),r.uidsSet.add(t),t}generateUidBasedOnNode(e,t){let i=[];Ae(e,i);let r=i.join("$");return r=r.replace(/^_/,"")||t||"ref",this.generateUid(r.slice(0,20))}generateUidIdentifierBasedOnNode(e,t){return Ac(this.generateUidBasedOnNode(e,t))}isStatic(e){if(ES(e)||I5(e)||CS(e))return!0;if(yi(e)){let t=this.getBinding(e.name);return t?t.constant:this.hasBinding(e.name)}return!1}maybeGenerateMemoised(e,t){if(this.isStatic(e))return null;{let i=this.generateUidIdentifierBasedOnNode(e);return t?i:(this.push({id:i}),PS(i))}}checkBlockScopedCollisions(e,t,i,r){if(t==="param"||e.kind==="local")return;if(t==="let"||e.kind==="let"||e.kind==="const"||e.kind==="module"||e.kind==="param"&&t==="const")throw this.path.hub.buildError(r,`Duplicate declaration "${i}"`,TypeError)}rename(e,t){let i=this.getBinding(e);i&&(t||=this.generateUidIdentifier(e).name,new Fc(i,e,t).rename())}dump(){let e="-".repeat(60);console.log(e);let t=this;do{console.log("#",t.block.type);for(let i of Object.keys(t.bindings)){let r=t.bindings[i];console.log(" -",i,{constant:r.constant,references:r.references,violations:r.constantViolations.length,kind:r.kind})}}while(t=t.parent);console.log(e)}hasLabel(e){return!!this.getLabel(e)}getLabel(e){return this.labels.get(e)}registerLabel(e){this.labels.set(e.node.label.name,e)}registerDeclaration(e){if(e.isLabeledStatement())this.registerLabel(e);else if(e.isFunctionDeclaration())this.registerBinding("hoisted",e.get("id"),e);else if(e.isVariableDeclaration()){let t=e.get("declarations"),{kind:i}=e.node;for(let r of t)this.registerBinding(i==="using"||i==="await using"?"const":i,r)}else if(e.isClassDeclaration()){if(e.node.declare)return;this.registerBinding("let",e)}else if(e.isImportDeclaration()){let t=e.node.importKind==="type"||e.node.importKind==="typeof",i=e.get("specifiers");for(let r of i){let n=t||r.isImportSpecifier()&&(r.node.importKind==="type"||r.node.importKind==="typeof");this.registerBinding(n?"unknown":"module",r)}}else if(e.isExportDeclaration()){let t=e.get("declaration");(t.isClassDeclaration()||t.isFunctionDeclaration()||t.isVariableDeclaration())&&this.registerDeclaration(t)}else this.registerBinding("unknown",e)}registerConstantViolation(e){let t=e.getAssignmentIdentifiers();for(let i of Object.keys(t))this.getBinding(i)?.reassign(e)}registerBinding(e,t,i=t){if(!e)throw new ReferenceError("no `kind`");if(t.isVariableDeclaration()){let a=t.get("declarations");for(let o of a)this.registerBinding(e,o);return}let r=this.getProgramParent(),n=t.getOuterBindingIdentifiers(!0);for(let a of Object.keys(n)){r.referencesSet.add(a);for(let o of n[a]){let c=this.getOwnBinding(a);if(c){if(c.identifier===o)continue;this.checkBlockScopedCollisions(c,e,a,o)}c?c.reassign(i):this.bindings[a]=new Bc({identifier:o,scope:this,path:i,kind:e})}}}addGlobal(e){this.globals[e.name]=e}hasUid(e){return this.getProgramParent().uidsSet.has(e)}hasGlobal(e){let t=this;do if(t.globals[e])return!0;while(t=t.parent);return!1}hasReference(e){return this.getProgramParent().referencesSet.has(e)}isPure(e,t){if(yi(e)){let i=this.getBinding(e.name);return i?t?i.constant:!0:!1}else{if(ES(e)||F5(e)||CS(e)||B5(e))return!0;if(h5(e))return e.superClass&&!this.isPure(e.superClass,t)||e.decorators?.length>0?!1:this.isPure(e.body,t);if(f5(e)){for(let i of e.body)if(!this.isPure(i,t))return!1;return!0}else{if(p5(e))return this.isPure(e.left,t)&&this.isPure(e.right,t);if(u5(e)){for(let i of e.elements)if(i!==null&&!this.isPure(i,t))return!1;return!0}else if(b5(e)){for(let i of e.properties)if(!this.isPure(i,t))return!1;return!0}else{if(x5(e))return!(e.computed&&!this.isPure(e.key,t)||e.decorators?.length>0);if(E5(e))return!(e.computed&&!this.isPure(e.key,t)||e.decorators?.length>0||(M5(e)||e.static)&&e.value!==null&&!this.isPure(e.value,t));if(N5(e))return this.isPure(e.argument,t);if(sx(e)){for(let i of e.expressions)if(!this.isPure(i,t))return!1;return!0}else return w5(e)?AS(e.tag,"String.raw")&&!this.hasBinding("String",{noGlobals:!0})&&this.isPure(e.quasi,t):S5(e)?!e.computed&&yi(e.object)&&e.object.name==="Symbol"&&yi(e.property)&&e.property.name!=="for"&&!this.hasBinding("Symbol",{noGlobals:!0}):bS(e)?AS(e.callee,"Symbol.for")&&!this.hasBinding("Symbol",{noGlobals:!0})&&e.arguments.length===1&&Xs(e.arguments[0]):A5(e)}}}}setData(e,t){return this.data[e]=t}getData(e){let t=this;do{let i=t.data[e];if(i!=null)return i}while(t=t.parent)}removeData(e){let t=this;do t.data[e]!=null&&(t.data[e]=null);while(t=t.parent)}init(){this.inited||(this.inited=!0,this.crawl())}crawl(){let e=this.path;IS(this),this.data=Object.create(null);let t=this;do{if(t.crawling)return;if(t.path.isProgram())break}while(t=t.parent);let i=t,r={references:[],constantViolations:[],assignments:[]};if(this.crawling=!0,wc||=Me.visitors.merge([{Scope(n){IS(n.scope)}},U5]),e.type!=="Program"){let n=wc[e.type];if(n)for(let a of n.enter)a.call(r,e,r)}n5(e,wc,r),this.crawling=!1;for(let n of r.assignments){let a=n.getAssignmentIdentifiers();for(let o of Object.keys(a))n.scope.getBinding(o)||i.addGlobal(a[o]);n.scope.registerConstantViolation(n)}for(let n of r.references){let a=n.scope.getBinding(n.node.name);a?a.reference(n):i.addGlobal(n.node)}for(let n of r.constantViolations)n.scope.registerConstantViolation(n)}push(e){let t=this.path;t.isPattern()?t=this.getPatternParent().path:!t.isBlockStatement()&&!t.isProgram()&&(t=this.getBlockParent().path),t.isSwitchStatement()&&(t=(this.getFunctionParent()||this.getProgramParent()).path);let{init:i,unique:r,kind:n="var",id:a}=e;if(!i&&!r&&(n==="var"||n==="let")&&R5(t)&&bS(t.parent,{callee:t.node})&&t.parent.arguments.length<=t.node.params.length&&yi(a)){t.pushContainer("params",a),t.scope.registerBinding("param",t.get("params")[t.node.params.length-1]);return}(t.isLoop()||t.isCatchClause()||t.isFunction())&&(t.ensureBlock(),t=t.get("body"));let o=e._blockHoist==null?2:e._blockHoist,c=`declaration:${n}:${o}`,l=!r&&t.getData(c);if(!l){let m=L5(n,[]);m._blockHoist=o,[l]=t.unshiftContainer("body",[m]),r||t.setData(c,l)}let u=O5(a,i),f=l.node.declarations.push(u);t.scope.registerBinding(n,l.get("declarations")[f-1])}getProgramParent(){let e=this;do if(e.path.isProgram())return e;while(e=e.parent);throw new Error("Couldn't find a Program")}getFunctionParent(){let e=this;do if(e.path.isFunctionParent())return e;while(e=e.parent);return null}getBlockParent(){let e=this;do if(e.path.isBlockParent())return e;while(e=e.parent);throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...")}getPatternParent(){let e=this;do if(!e.path.isPattern())return e.getBlockParent();while(e=e.parent.parent);throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...")}getAllBindings(){let e=Object.create(null),t=this;do{for(let i of Object.keys(t.bindings))i in e||(e[i]=t.bindings[i]);t=t.parent}while(t);return e}bindingIdentifierEquals(e,t){return this.getBindingIdentifier(e)===t}getBinding(e){let t=this,i;do{let r=t.getOwnBinding(e);if(r){if(!(i?.isPattern()&&r.kind!=="param"&&r.kind!=="local"))return r}else if(!r&&e==="arguments"&&t.path.isFunction()&&!t.path.isArrowFunctionExpression())break;i=t.path}while(t=t.parent)}getOwnBinding(e){return this.bindings[e]}getBindingIdentifier(e){return this.getBinding(e)?.identifier}getOwnBindingIdentifier(e){return this.bindings[e]?.identifier}hasOwnBinding(e){return!!this.getOwnBinding(e)}hasBinding(e,t){if(!e)return!1;let i,r,n;typeof t=="object"?(i=t.noGlobals,r=t.noUids,n=t.upToScope):typeof t=="boolean"&&(i=t);let a=this;do{if(n===a)break;if(a.hasOwnBinding(e))return!0}while(a=a.parent);return!!(!r&&this.hasUid(e)||!i&&s.globals.includes(e)||!i&&s.contextVariables.includes(e))}parentHasBinding(e,t){return this.parent?.hasBinding(e,t)}moveBindingTo(e,t){let i=this.getBinding(e);i&&(i.scope.removeOwnBinding(e),i.scope=t,t.bindings[e]=i)}removeOwnBinding(e){delete this.bindings[e]}removeBinding(e){this.getBinding(e)?.scope.removeOwnBinding(e),this.getProgramParent().uidsSet.delete(e)}hoistVariables(e=t=>this.push({id:t})){this.crawl();let t=new Set;for(let i of Object.keys(this.bindings)){let r=this.bindings[i];if(!r)continue;let{path:n}=r;if(!n.isVariableDeclarator())continue;let{parent:a,parentPath:o}=n;if(a.kind!=="var"||t.has(a))continue;t.add(n.parent);let c,l=[];for(let u of a.declarations){c??=u.id,u.init&&l.push(l5("=",u.id,u.init));let f=Object.keys(ex(u,!1,!0,!0));for(let m of f)e(Ac(m),u.init!=null)}if(o.parentPath.isForXStatement({left:a}))o.replaceWith(c);else if(l.length===0)o.remove();else{let u=l.length===1?l[0]:j5(l);o.parentPath.isForStatement({init:a})?o.replaceWith(u):o.replaceWith(k5(u))}}}},{VISITOR_KEYS:K5}=ne;function q5(s){let e=this;for(;e=e.parentPath;)if(s(e))return e;return null}function $5(s){let e=this;do if(s(e))return e;while(e=e.parentPath);return null}function J5(){return this.findParent(s=>s.isFunction())}function X5(){let s=this;do{if(!s.parentPath||Array.isArray(s.container)&&s.isStatement())break;s=s.parentPath}while(s);if(s&&(s.isProgram()||s.isFile()))throw new Error("File/Program node, we can't possibly find a statement parent to this");return s}function W5(s){return this.getDeepestCommonAncestorFrom(s,function(e,t,i){let r,n=K5[e.type];for(let a of i){let o=a[t+1];if(!r){r=o;continue}if(o.listKey&&r.listKey===o.listKey&&o.key<r.key){r=o;continue}let c=n.indexOf(r.parentKey),l=n.indexOf(o.parentKey);c>l&&(r=o)}return r})}function z5(s,e){if(!s.length)return this;if(s.length===1)return s[0];let t=1/0,i,r,n=s.map(o=>{let c=[];do c.unshift(o);while((o=o.parentPath)&&o!==this);return c.length<t&&(t=c.length),c}),a=n[0];e:for(let o=0;o<t;o++){let c=a[o];for(let l of n)if(l[o]!==c)break e;i=o,r=c}if(r)return e?e(r,i,n):r;throw new Error("Couldn't find intersection")}function H5(){let s=this,e=[];do e.push(s);while(s=s.parentPath);return e}function Y5(s){return s.isDescendant(this)}function G5(s){return!!this.findParent(e=>e===s)}function Q5(...s){let e=this;for(;e;){if(s.includes(e.node.type))return!0;e=e.parentPath}return!1}var{createFlowUnionType:Z5,createTSUnionType:e9,isFlowType:t9,isTSType:s9}=ne;function Wr(s){if(s.every(e=>t9(e)))return Z5(s);if(s.every(e=>s9(e)))return e9(s)}var{BOOLEAN_NUMBER_BINARY_OPERATORS:i9,createTypeAnnotationBasedOnTypeof:r9,numberTypeAnnotation:ix,voidTypeAnnotation:n9}=ne;function a9(s){if(!this.isReferenced())return;let e=this.scope.getBinding(s.name);if(e)return e.identifier.typeAnnotation?e.identifier.typeAnnotation:o9(e,this,s.name);if(s.name==="undefined")return n9();if(s.name==="NaN"||s.name==="Infinity")return ix();s.name}function o9(s,e,t){let i=[],r=[],n=wS(s,e,r),a=rx(s,e,t);if(a){let o=wS(s,a.ifStatement);n=n.filter(c=>!o.includes(c)),i.push(a.typeAnnotation)}if(n.length){n.push(...r);for(let o of n)i.push(o.getTypeAnnotation())}if(i.length)return Wr(i)}function wS(s,e,t){let i=s.constantViolations.slice();return i.unshift(s.path),i.filter(r=>{r=r.resolve();let n=r._guessExecutionStatusRelativeTo(e);return t&&n==="unknown"&&t.push(r),n==="before"})}function c9(s,e){let t=e.node.operator,i=e.get("right").resolve(),r=e.get("left").resolve(),n;if(r.isIdentifier({name:s})?n=i:i.isIdentifier({name:s})&&(n=r),n)return t==="==="?n.getTypeAnnotation():i9.includes(t)?ix():void 0;if(t!=="==="&&t!=="==")return;let a,o;if(r.isUnaryExpression({operator:"typeof"})?(a=r,o=i):i.isUnaryExpression({operator:"typeof"})&&(a=i,o=r),!a||!a.get("argument").isIdentifier({name:s})||(o=o.resolve(),!o.isLiteral()))return;let c=o.node.value;if(typeof c=="string")return r9(c)}function l9(s,e,t){let i;for(;i=e.parentPath;){if(i.isIfStatement()||i.isConditionalExpression())return e.key==="test"?void 0:i;if(i.isFunction()&&(t==null||i.parentPath.scope.getBinding(t)!==s))return;e=i}}function rx(s,e,t){let i=l9(s,e,t);if(!i)return;let n=[i.get("test")],a=[];for(let o=0;o<n.length;o++){let c=n[o];if(c.isLogicalExpression())c.node.operator==="&&"&&(n.push(c.get("left")),n.push(c.get("right")));else if(c.isBinaryExpression()){let l=c9(t,c);l&&a.push(l)}}return a.length?{typeAnnotation:Wr(a),ifStatement:i}:rx(s,i,t)}var{BOOLEAN_BINARY_OPERATORS:u9,BOOLEAN_UNARY_OPERATORS:p9,NUMBER_BINARY_OPERATORS:h9,NUMBER_UNARY_OPERATORS:f9,STRING_UNARY_OPERATORS:d9,anyTypeAnnotation:NS,arrayTypeAnnotation:Nc,booleanTypeAnnotation:Xc,buildMatchMemberExpression:zr,genericTypeAnnotation:It,identifier:$t,nullLiteralTypeAnnotation:m9,numberTypeAnnotation:Es,stringTypeAnnotation:Jt,tupleTypeAnnotation:y9,unionTypeAnnotation:T9,voidTypeAnnotation:S9,isIdentifier:x9}=ne;function g9(){if(this.get("id").isIdentifier())return this.get("init").getTypeAnnotation()}function nx(s){return s.typeAnnotation}nx.validParent=!0;function ax(s){return s.typeAnnotation}ax.validParent=!0;function P9(){return this.get("expression").getTypeAnnotation()}function b9(s){if(s.callee.type==="Identifier")return It(s.callee)}function E9(){return Jt()}function A9(s){let e=s.operator;if(e==="void")return S9();if(f9.includes(e))return Es();if(d9.includes(e))return Jt();if(p9.includes(e))return Xc()}function C9(s){let e=s.operator;if(h9.includes(e))return Es();if(u9.includes(e))return Xc();if(e==="+"){let t=this.get("right"),i=this.get("left");return i.isBaseType("number")&&t.isBaseType("number")?Es():i.isBaseType("string")||t.isBaseType("string")?Jt():T9([Jt(),Es()])}}function I9(){let s=[this.get("left").getTypeAnnotation(),this.get("right").getTypeAnnotation()];return Wr(s)}function w9(){let s=[this.get("consequent").getTypeAnnotation(),this.get("alternate").getTypeAnnotation()];return Wr(s)}function N9(){return this.get("expressions").pop().getTypeAnnotation()}function v9(){return this.get("expression").getTypeAnnotation()}function k9(){return this.get("right").getTypeAnnotation()}function D9(s){let e=s.operator;if(e==="++"||e==="--")return Es()}function L9(){return Jt()}function O9(){return Es()}function M9(){return Xc()}function F9(){return m9()}function B9(){return It($t("RegExp"))}function _9(){return It($t("Object"))}function ox(){return It($t("Array"))}function cx(){return ox()}cx.validParent=!0;function Ti(){return It($t("Function"))}var j9=zr("Array.from"),R9=zr("Object.keys"),U9=zr("Object.values"),V9=zr("Object.entries");function K9(){let{callee:s}=this.node;return R9(s)?Nc(Jt()):j9(s)||U9(s)||x9(s,{name:"Array"})?Nc(NS()):V9(s)?Nc(y9([Jt(),NS()])):lx(this.get("callee"))}function q9(){return lx(this.get("tag"))}function lx(s){if(s=s.resolve(),s.isFunction()){let{node:e}=s;if(e.async)return e.generator?It($t("AsyncIterator")):It($t("Promise"));if(e.generator)return It($t("Iterator"));if(s.node.returnType)return s.node.returnType}}var vS=Object.defineProperty({__proto__:null,ArrayExpression:ox,ArrowFunctionExpression:Ti,AssignmentExpression:k9,BinaryExpression:C9,BooleanLiteral:M9,CallExpression:K9,ClassDeclaration:Ti,ClassExpression:Ti,ConditionalExpression:w9,FunctionDeclaration:Ti,FunctionExpression:Ti,Identifier:a9,LogicalExpression:I9,NewExpression:b9,NullLiteral:F9,NumericLiteral:O9,ObjectExpression:_9,ParenthesizedExpression:v9,RegExpLiteral:B9,RestElement:cx,SequenceExpression:N9,StringLiteral:L9,TSAsExpression:ax,TSNonNullExpression:P9,TaggedTemplateExpression:q9,TemplateLiteral:E9,TypeCastExpression:nx,UnaryExpression:A9,UpdateExpression:D9,VariableDeclarator:g9},Symbol.toStringTag,{value:"Module"}),{anyTypeAnnotation:ux,isAnyTypeAnnotation:$r,isArrayTypeAnnotation:$9,isBooleanTypeAnnotation:J9,isEmptyTypeAnnotation:X9,isFlowBaseAnnotation:W9,isGenericTypeAnnotation:z9,isIdentifier:kS,isMixedTypeAnnotation:H9,isNumberTypeAnnotation:Y9,isStringTypeAnnotation:G9,isTSArrayType:Q9,isTSTypeAnnotation:Z9,isTSTypeReference:e7,isTupleTypeAnnotation:t7,isTypeAnnotation:s7,isUnionTypeAnnotation:i7,isVoidTypeAnnotation:r7,stringTypeAnnotation:n7,voidTypeAnnotation:a7}=ne;function o7(){let s=this.getData("typeAnnotation");return s!=null||(s=c7.call(this)||ux(),(s7(s)||Z9(s))&&(s=s.typeAnnotation),this.setData("typeAnnotation",s)),s}var vc=new WeakSet;function c7(){let s=this.node;if(!s)if(this.key==="init"&&this.parentPath.isVariableDeclarator()){let e=this.parentPath.parentPath,t=e.parentPath;return e.key==="left"&&t.isForInStatement()?n7():e.key==="left"&&t.isForOfStatement()?ux():a7()}else return;if(s.typeAnnotation)return s.typeAnnotation;if(!vc.has(s)){vc.add(s);try{let e=vS[s.type];if(e)return e.call(this,s);if(e=vS[this.parentPath.type],e?.validParent)return this.parentPath.getTypeAnnotation()}finally{vc.delete(s)}}}function l7(s,e){return jc(s,this.getTypeAnnotation(),e)}function jc(s,e,t){if(s==="string")return G9(e);if(s==="number")return Y9(e);if(s==="boolean")return J9(e);if(s==="any")return $r(e);if(s==="mixed")return H9(e);if(s==="empty")return X9(e);if(s==="void")return r7(e);if(t)return!1;throw new Error(`Unknown base type ${s}`)}function u7(s){let e=this.getTypeAnnotation();if($r(e))return!0;if(i7(e)){for(let t of e.types)if($r(t)||jc(s,t,!0))return!0;return!1}else return jc(s,e,!0)}function p7(s){let e=this.getTypeAnnotation(),t=s.getTypeAnnotation();return!$r(e)&&W9(e)?t.type===e.type:!1}function h7(s){let e=this.getTypeAnnotation();return s==="Array"&&(Q9(e)||$9(e)||t7(e))?!0:z9(e)&&kS(e.id,{name:s})||e7(e)&&kS(e.typeName,{name:s})}var f7=[function(s,e){if(s.key==="test"&&(e.isWhile()||e.isSwitchCase())||s.key==="declaration"&&e.isExportDeclaration()||s.key==="body"&&e.isLabeledStatement()||s.listKey==="declarations"&&e.isVariableDeclaration()&&e.node.declarations.length===1||s.key==="expression"&&e.isExpressionStatement())return e.remove(),!0},function(s,e){if(e.isSequenceExpression()&&e.node.expressions.length===2)return e.replaceWith(e.node.expressions[s.key===0?1:0]),!0},function(s,e){if(e.isBinary())return s.key==="left"?e.replaceWith(e.node.right):e.replaceWith(e.node.left),!0},function(s,e){if(e.isIfStatement()&&s.key==="consequent"||s.key==="body"&&(e.isLoop()||e.isArrowFunctionExpression()))return s.replaceWith({type:"BlockStatement",directives:[],body:[]}),!0}];function d7(){if(Ci.call(this),Wt.call(this),!(this.parentPath&&f7.some(e=>e(this,this.parentPath)))){if(this.node&&!this.opts?.noScope){let e=_t(this.node,!1,!1,!0);Object.keys(e).forEach(t=>this.scope.removeBinding(t))}this.shareCommentsWithSiblings(),Array.isArray(this.container)?(this.container.splice(this.key,1),Sx.call(this,this.key,-1)):Px.call(this,null)}this._traverseFlags|=Nx|YK,this.parent&&Ai(this)?.delete(this.node),this.node=null}function Ci(){if(this.removed)throw this.buildCodeFrameError("NodePath has been removed so is read-only.")}var{arrowFunctionExpression:m7,assertExpression:y7,assignmentExpression:T7,blockStatement:px,callExpression:S7,cloneNode:kc,expressionStatement:Dc,isAssignmentExpression:x7,isCallExpression:g7,isExportNamedDeclaration:hx,isExpression:P7,isIdentifier:b7,isSequenceExpression:E7,isSuper:A7,thisExpression:C7}=ne;function I7(s){Ci.call(this);let e=Is.call(this,s),{parentPath:t,parent:i}=this;if(t.isExpressionStatement()||t.isLabeledStatement()||hx(i)||t.isExportDefaultDeclaration()&&this.isDeclaration())return t.insertBefore(e);if(this.isNodeType("Expression")&&!this.isJSXElement()||t.isForStatement()&&this.key==="init")return this.node&&e.push(this.node),this.replaceExpressionWithStatements(e);if(Array.isArray(this.container))return dx.call(this,e);if(this.isStatementOrBlock()){let r=this.node,n=r&&(!this.isExpressionStatement()||r.expression!=null),[a]=this.replaceWith(px(n?[r]:[]));return a.unshiftContainer("body",e)}else throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?")}function fx(s,e){Sx.call(this,s,e.length);let t=[];this.container.splice(s,0,...e);for(let r=0;r<e.length;r++){let n=s+r,a=this.getSibling(n);t.push(a),this.context?.queue&&kx.call(a,this.context)}let i=cq.call(this);for(let r of t){Hc.call(r),r.debug("Inserted.");for(let n of i)n.maybeQueue(r,!0)}return t}function dx(s){return fx.call(this,this.key,s)}function mx(s){return fx.call(this,this.key+1,s)}var yx=s=>s[s.length-1];function Tx(s){return E7(s.parent)&&(yx(s.parent.expressions)!==s.node||Tx(s.parentPath))}function w7(s,e){if(!x7(s)||!b7(s.left))return!1;let t=e.getBlockParent();return t.hasOwnBinding(s.left.name)&&t.getOwnBinding(s.left.name).constantViolations.length<=1}function N7(s){if(Ci.call(this),this.isSequenceExpression())return yx(this.get("expressions")).insertAfter(s);let e=Is.call(this,s),{parentPath:t,parent:i}=this;if(t.isExpressionStatement()||t.isLabeledStatement()||hx(i)||t.isExportDefaultDeclaration()&&this.isDeclaration())return t.insertAfter(e.map(r=>P7(r)?Dc(r):r));if(this.isNodeType("Expression")&&!this.isJSXElement()&&!t.isJSXElement()||t.isForStatement()&&this.key==="init"){let r=this;if(r.node){let n=r.node,{scope:a}=this;if(a.path.isPattern())return y7(n),r.replaceWith(S7(m7([],n),[])),r.get("callee.body").insertAfter(e),[r];if(Tx(r))e.unshift(n);else if(g7(n)&&A7(n.callee))e.unshift(n),e.push(C7());else if(w7(n,a))e.unshift(n),e.push(kc(n.left));else if(a.isPure(n,!0))e.push(n);else{t.isMethod({computed:!0,key:n})&&(a=a.parent);let o=a.generateDeclaredUidIdentifier();e.unshift(Dc(T7("=",kc(o),n))),e.push(Dc(kc(o)))}}return this.replaceExpressionWithStatements(e)}else{if(Array.isArray(this.container))return mx.call(this,e);if(this.isStatementOrBlock()){let r=this.node,n=r&&(!this.isExpressionStatement()||r.expression!=null),[a]=this.replaceWith(px(n?[r]:[]));return a.pushContainer("body",e)}else throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?")}}function Sx(s,e){if(!this.parent)return;let t=Ai(this);if(t)for(let[,i]of t)typeof i.key=="number"&&i.container===this.container&&i.key>=s&&(i.key+=e)}function Is(s){if(!s)return[];Array.isArray(s)||(s=[s]);for(let e=0;e<s.length;e++){let t=s[e],i;if(t?typeof t!="object"?i="contains a non-object node":t.type?t instanceof Xe&&(i="has a NodePath when it expected a raw object"):i="without a type":i="has falsy node",i){let r=Array.isArray(t)?"array":typeof t;throw new Error(`Node list ${i} with the index of ${e} and type of ${r}`)}}return s}function v7(s,e){Ci.call(this);let t=Is.call(this,e),i=this.node[s],r=Xe.get({parentPath:this,parent:this.node,container:i,listKey:s,key:0}).setContext(this.context);return dx.call(r,t)}function k7(s,e){Ci.call(this);let t=Is.call(this,e),i=this.node[s];return Xe.get({parentPath:this,parent:this.node,container:i,listKey:s,key:i.length}).setContext(this.context).replaceWithMultiple(t)}var{FUNCTION_TYPES:DS,arrowFunctionExpression:D7,assignmentExpression:xx,awaitExpression:L7,blockStatement:O7,buildUndefinedNode:Lc,callExpression:M7,cloneNode:Rc,conditionalExpression:F7,expressionStatement:B7,getBindingIdentifiers:_7,identifier:j7,inheritLeadingComments:R7,inheritTrailingComments:U7,inheritsComments:V7,isBlockStatement:K7,isEmptyStatement:LS,isExpression:gx,isExpressionStatement:q7,isIfStatement:$7,isProgram:J7,isStatement:X7,isVariableDeclaration:W7,removeComments:z7,returnStatement:OS,sequenceExpression:H7,validate:MS,yieldExpression:Y7}=ne;function G7(s){Wt.call(this);let e=Is.call(this,s);R7(e[0],this.node),U7(e[e.length-1],this.node),Ai(this)?.delete(this.node),this.node=this.container[this.key]=null;let t=this.insertAfter(s);return this.node?this.requeue():this.remove(),t}function Q7(s){Wt.call(this);let e;try{s=`(${s})`,e=Br(s)}catch(i){let r=i.loc;throw r&&(i.message+=` - make sure this is an expression.
44
+ `+Cr(s,{start:{line:r.line,column:r.column}}),i.code="BABEL_REPLACE_SOURCE_ERROR"),i}let t=e.program.body[0].expression;return Me.removeProperties(t),this.replaceWith(t)}function Z7(s){if(Wt.call(this),this.removed)throw new Error("You can't replace this node, we've already removed it");let e=s instanceof Xe?s.node:s;if(!e)throw new Error("You passed `path.replaceWith()` a falsy node, use `path.remove()` instead");if(this.node===e)return[this];if(this.isProgram()&&!J7(e))throw new Error("You can only replace a Program root node with another Program node");if(Array.isArray(e))throw new Error("Don't use `path.replaceWith()` with an array of nodes, use `path.replaceWithMultiple()`");if(typeof e=="string")throw new Error("Don't use `path.replaceWith()` with a source string, use `path.replaceWithSourceString()`");let t="";if(this.isNodeType("Statement")&&gx(e)&&!this.canHaveVariableDeclarationOrExpression()&&!this.canSwapBetweenExpressionAndStatement(e)&&!this.parentPath.isExportDefaultDeclaration()&&(e=B7(e),t="expression"),this.isNodeType("Expression")&&X7(e)&&!this.canHaveVariableDeclarationOrExpression()&&!this.canSwapBetweenExpressionAndStatement(e))return this.replaceExpressionWithStatements([e]);let i=this.node;return i&&(V7(e,i),z7(i)),Px.call(this,e),this.type=e.type,Hc.call(this),this.requeue(),[t?this.get(t):this]}function Px(s){if(!this.container)throw new ReferenceError("Container is falsy");this.inList?MS(this.parent,this.key,[s]):MS(this.parent,this.key,s),this.debug(`Replace with ${s?.type}`),Ai(this)?.set(s,this).delete(this.node),this.node=s,this.container[this.key]=s}function eV(s){Wt.call(this);let e=[],t=Vr(s,e);if(t){for(let m of e)this.scope.push({id:m});return this.replaceWith(t)[0].get("expressions")}let i=this.getFunctionParent(),r=i?.node.async,n=i?.node.generator,a=D7([],O7(s));this.replaceWith(M7(a,[]));let o=this.get("callee");o.get("body").scope.hoistVariables(m=>this.scope.push({id:m}));let c=o.getCompletionRecords();for(let m of c){if(!m.isExpressionStatement())continue;let x=m.findParent(I=>I.isLoop());if(x){let I=x.getData("expressionReplacementReturnUid");I?I=j7(I.name):(I=o.scope.generateDeclaredUidIdentifier("ret"),o.get("body").pushContainer("body",OS(Rc(I))),x.setData("expressionReplacementReturnUid",I)),m.get("expression").replaceWith(xx("=",Rc(I),m.node.expression))}else m.replaceWith(OS(m.node.expression))}o.arrowFunctionToExpression();let l=o,u=r&&Me.hasType(l.node.body,"AwaitExpression",DS),f=n&&Me.hasType(l.node.body,"YieldExpression",DS);return u&&(l.set("async",!0),f||this.replaceWith(L7(this.node))),f&&(l.set("generator",!0),this.replaceWith(Y7(this.node,!0))),l.get("body.body")}function Vr(s,e){let t=[],i=!0;for(let r of s)if(LS(r)||(i=!1),gx(r))t.push(r);else if(q7(r))t.push(r.expression);else if(W7(r)){if(r.kind!=="var")return;for(let n of r.declarations){let a=_7(n);for(let o of Object.keys(a))e.push(Rc(a[o]));n.init&&t.push(xx("=",n.id,n.init))}i=!0}else if($7(r)){let n=r.consequent?Vr([r.consequent],e):Lc(),a=r.alternate?Vr([r.alternate],e):Lc();if(!n||!a)return;t.push(F7(r.test,n,a))}else if(K7(r)){let n=Vr(r.body,e);if(!n)return;t.push(n)}else if(LS(r))s.indexOf(r)===0&&(i=!0);else return;return i&&t.push(Lc()),t.length===1?t[0]:H7(t)}function tV(s){if(Wt.call(this),Array.isArray(s))if(Array.isArray(this.container)){s=Is.call(this,s);let e=mx.call(this,s);return this.remove(),e}else return this.replaceWithMultiple(s);else return this.replaceWith(s)}var sV=["Number","String","Math"],iV=["isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","btoa","atob"],rV=["random"];function FS(s){return sV.includes(s)}function nV(s){return iV.includes(s)}function aV(s){return rV.includes(s)}function oV(){let s=this.evaluate();if(s.confident)return!!s.value}function We(s,e){e.confident&&(e.deoptPath=s,e.confident=!1)}var BS=new Map([["undefined",void 0],["Infinity",1/0],["NaN",NaN]]);function Ve(s,e){let{node:t}=s,{seen:i}=e;if(i.has(t)){let r=i.get(t);if(r.resolved)return r.value;We(s,e);return}else{let r={resolved:!1};i.set(t,r);let n=cV(s,e);return e.confident&&(r.resolved=!0,r.value=n),n}}function cV(s,e){if(e.confident){if(s.isSequenceExpression()){let t=s.get("expressions");return Ve(t[t.length-1],e)}if(s.isStringLiteral()||s.isNumericLiteral()||s.isBooleanLiteral())return s.node.value;if(s.isNullLiteral())return null;if(s.isTemplateLiteral())return _S(s,s.node.quasis,e);if(s.isTaggedTemplateExpression()&&s.get("tag").isMemberExpression()){let t=s.get("tag.object"),{node:{name:i}}=t,r=s.get("tag.property");if(t.isIdentifier()&&i==="String"&&!s.scope.getBinding(i)&&r.isIdentifier()&&r.node.name==="raw")return _S(s,s.node.quasi.quasis,e,!0)}if(s.isConditionalExpression()){let t=Ve(s.get("test"),e);return e.confident?Ve(t?s.get("consequent"):s.get("alternate"),e):void 0}if(s.isExpressionWrapper()||s.isTSAsExpression()||s.isTSSatisfiesExpression()||s.isTSTypeAssertion()||s.isTSNonNullExpression()||s.isTSInstantiationExpression())return Ve(s.get("expression"),e);if(s.isMemberExpression()&&!s.parentPath.isCallExpression({callee:s.node})){let t=s.get("property"),i=s.get("object");if(i.isLiteral()){let r=i.node.value,n=typeof r,a=null;if(s.node.computed){if(a=Ve(t,e),!e.confident)return}else t.isIdentifier()&&(a=t.node.name);if((n==="number"||n==="string")&&a!=null&&(typeof a=="number"||typeof a=="string"))return r[a]}}if(s.isReferencedIdentifier()){let t=s.scope.getBinding(s.node.name);if(t){if(t.constantViolations.length>0||s.node.start<t.path.node.end){We(t.path,e);return}let c=t.path.scope;if(t.kind==="var"&&c!==t.scope){let l=!c.path.parentPath.isBlockStatement();for(let u=c.parent;u;u=u.parent){if(u===s.scope){if(l){We(t.path,e);return}break}u.path.parentPath?.isBlockStatement()&&(l=!0)}}if(t.hasValue)return t.value}let i=s.node.name;if(BS.has(i)){if(!t)return BS.get(i);We(t.path,e);return}if(!t){We(s,e);return}let r=t.path;if(!r.isVariableDeclarator()){We(r,e);return}let n=r.get("id");if(!n.isIdentifier()){We(n,e);return}let a=r.get("init"),o=Ve(a,e);if(typeof o=="object"&&o!==null&&t.references>1){We(a,e);return}return o}if(s.isUnaryExpression({prefix:!0})){if(s.node.operator==="void")return;let t=s.get("argument");if(s.node.operator==="typeof"&&(t.isFunction()||t.isClass()))return"function";let i=Ve(t,e);if(!e.confident)return;switch(s.node.operator){case"!":return!i;case"+":return+i;case"-":return-i;case"~":return~i;case"typeof":return typeof i}}if(s.isArrayExpression()){let t=[],i=s.get("elements");for(let r of i){let n=r.evaluate();if(n.confident)t.push(n.value);else{We(n.deopt,e);return}}return t}if(s.isObjectExpression()){let t={},i=s.get("properties");for(let r of i){if(r.isObjectMethod()||r.isSpreadElement()){We(r,e);return}let n=r.get("key"),a;if(r.node.computed){if(a=n.evaluate(),!a.confident){We(a.deopt,e);return}a=a.value}else n.isIdentifier()?a=n.node.name:a=n.node.value;let c=r.get("value").evaluate();if(!c.confident){We(c.deopt,e);return}c=c.value,t[a]=c}return t}if(s.isLogicalExpression()){let t=e.confident,i=Ve(s.get("left"),e),r=e.confident;e.confident=t;let n=Ve(s.get("right"),e),a=e.confident;switch(s.node.operator){case"||":return e.confident=r&&(!!i||a),e.confident?i||n:void 0;case"&&":return e.confident=r&&(!i||a),e.confident?i&&n:void 0;case"??":return e.confident=r&&(i!=null||a),e.confident?i??n:void 0}}if(s.isBinaryExpression()){let t=Ve(s.get("left"),e);if(!e.confident)return;let i=Ve(s.get("right"),e);if(!e.confident)return;switch(s.node.operator){case"-":return t-i;case"+":return t+i;case"/":return t/i;case"*":return t*i;case"%":return t%i;case"**":return t**i;case"<":return t<i;case">":return t>i;case"<=":return t<=i;case">=":return t>=i;case"==":return t==i;case"!=":return t!=i;case"===":return t===i;case"!==":return t!==i;case"|":return t|i;case"&":return t&i;case"^":return t^i;case"<<":return t<<i;case">>":return t>>i;case">>>":return t>>>i}}if(s.isCallExpression()){let t=s.get("callee"),i,r;if(t.isIdentifier()&&!s.scope.getBinding(t.node.name)&&(FS(t.node.name)||nV(t.node.name))&&(r=global[t.node.name]),t.isMemberExpression()){let n=t.get("object"),a=t.get("property");if(n.isIdentifier()&&a.isIdentifier()&&FS(n.node.name)&&!aV(a.node.name)&&!s.scope.getBinding(n.node.name)){i=global[n.node.name];let o=a.node.name;Object.hasOwn(i,o)&&(r=i[o])}if(n.isLiteral()&&a.isIdentifier()){let o=typeof n.node.value;(o==="string"||o==="number")&&(i=n.node.value,r=i[a.node.name])}}if(r){let n=s.get("arguments").map(a=>Ve(a,e));return e.confident?r.apply(i,n):void 0}}We(s,e)}}function _S(s,e,t,i=!1){let r="",n=0,a=s.isTemplateLiteral()?s.get("expressions"):s.get("quasi.expressions");for(let o of e){if(!t.confident)break;r+=i?o.value.raw:o.value.cooked;let c=a[n++];c&&(r+=String(Ve(c,t)))}if(t.confident)return r}function lV(){let s={confident:!0,deoptPath:null,seen:new Map},e=Ve(this,s);return s.confident||(e=void 0),{confident:s.confident,deopt:s.deoptPath,value:e}}var{arrowFunctionExpression:Wc,assignmentExpression:Vt,binaryExpression:Uc,blockStatement:uV,callExpression:As,conditionalExpression:pV,expressionStatement:bx,identifier:Se,jsxIdentifier:hV,logicalExpression:fV,LOGICAL_OPERATORS:dV,memberExpression:rt,metaProperty:mV,numericLiteral:yV,objectExpression:TV,restElement:SV,returnStatement:xV,sequenceExpression:gV,spreadElement:PV,stringLiteral:bV,super:Vc,thisExpression:Pi,toExpression:Ex,unaryExpression:EV,toBindingIdentifierName:AV,isFunction:CV,isAssignmentPattern:IV,isRestElement:wV,getFunctionName:NV,cloneNode:qt,variableDeclaration:vV,variableDeclarator:kV,exportNamedDeclaration:jS,exportSpecifier:RS,inherits:DV,buildUndefinedNode:LV}=ne;function OV(){let s=this.get("body"),e=s.node;if(Array.isArray(s))throw new Error("Can't convert array path to a block statement");if(!e)throw new Error("Can't convert node without a body");if(s.isBlockStatement())return e;let t=[],i="body",r,n;s.isStatement()?(n="body",r=0,t.push(s.node)):(i+=".body.0",this.isFunction()?(r="argument",t.push(xV(s.node))):(r="expression",t.push(bx(s.node)))),this.node.body=uV(t);let a=this.get(i);return Dx.call(s,a,n?a.node[n]:a.node,n,r),this.node}function MV(){if(!this.isArrowFunctionExpression()&&!this.isFunctionExpression()&&!this.isFunctionDeclaration())throw this.buildCodeFrameError("Can only unwrap the environment of a function.");Ax(this)}function FV(s,e){s.node.type=e}function BV({allowInsertArrow:s=!0,allowInsertArrowWithRest:e=s,noNewArrows:t=!0}={}){if(!this.isArrowFunctionExpression())throw this.buildCodeFrameError("Cannot convert non-arrow function to a function expression.");let i=this;t||(i=i.ensureFunctionName(!1)??i);let{thisBinding:r,fnPath:n}=Ax(i,t,s,e);if(n.ensureBlock(),FV(n,"FunctionExpression"),!t){let a=r?null:n.scope.generateUidIdentifier("arrowCheckId");return a&&n.parentPath.scope.push({id:a,init:TV([])}),n.get("body").unshiftContainer("body",bx(As(this.hub.addHelper("newArrowCheck"),[Pi(),Se(a?a.name:r)]))),n.replaceWith(As(rt(n.node,Se("bind")),[a?Se(a.name):Pi()]))[0].get("callee.object")}return n}var _V=Xr({CallExpression(s,{allSuperCalls:e}){s.get("callee").isSuper()&&e.push(s)}});function Ax(s,e=!0,t=!0,i=!0){let r,n=s.findParent(x=>x.isArrowFunctionExpression()?(r??=x,!1):x.isFunction()||x.isProgram()||x.isClassProperty({static:!1})||x.isClassPrivateProperty({static:!1})),a=n.isClassMethod({kind:"constructor"});if(n.isClassProperty()||n.isClassPrivateProperty())if(r)n=r;else if(t)n=s.replaceWith(As(Wc([],Ex(s.node)),[]))[0].get("callee"),s=n.get("body");else throw s.buildCodeFrameError("Unable to transform arrow inside class property");let{thisPaths:o,argumentsPaths:c,newTargetPaths:l,superProps:u,superCalls:f}=JV(s);if(a&&f.length>0){if(!t)throw f[0].buildCodeFrameError("When using '@babel/plugin-transform-arrow-functions', it's not possible to compile `super()` in an arrow function without compiling classes.\nPlease add '@babel/plugin-transform-classes' to your Babel configuration.");if(!i)throw f[0].buildCodeFrameError("When using '@babel/plugin-transform-parameters', it's not possible to compile `super()` in an arrow function with default or rest parameters without compiling classes.\nPlease add '@babel/plugin-transform-classes' to your Babel configuration.");let x=[];n.traverse(_V,{allSuperCalls:x});let I=KV(n);x.forEach(L=>{let N=Se(I);N.loc=L.node.callee.loc,L.get("callee").replaceWith(N)})}if(c.length>0){let x=bi(n,"arguments",()=>{let I=()=>Se("arguments");return n.scope.path.isProgram()?pV(Uc("===",EV("typeof",I()),bV("undefined")),LV(),I()):I()});c.forEach(I=>{let L=Se(x);L.loc=I.node.loc,I.replaceWith(L)})}if(l.length>0){let x=bi(n,"newtarget",()=>mV(Se("new"),Se("target")));l.forEach(I=>{let L=Se(x);L.loc=I.node.loc,I.replaceWith(L)})}if(u.length>0){if(!t)throw u[0].buildCodeFrameError("When using '@babel/plugin-transform-arrow-functions', it's not possible to compile `super.prop` in an arrow function without compiling classes.\nPlease add '@babel/plugin-transform-classes' to your Babel configuration.");u.reduce((I,L)=>I.concat(RV(L)),[]).forEach(I=>{let L=I.node.computed?"":I.get("property").node.name,N=I.parentPath,w=N.isAssignmentExpression({left:I.node}),v=N.isCallExpression({callee:I.node}),z=N.isTaggedTemplateExpression({tag:I.node}),V=qV(n,w,L),Z=[];if(I.node.computed&&Z.push(I.get("property").node),w){let qe=N.node.right;Z.push(qe)}let Pe=As(Se(V),Z);v?(N.unshiftContainer("arguments",Pi()),I.replaceWith(rt(Pe,Se("call"))),o.push(N.get("arguments.0"))):w?N.replaceWith(Pe):z?o.push(I.replaceWith(As(rt(Pe,Se("bind"),!1),[Pi()]))[0].get("arguments.0")):I.replaceWith(Pe)})}let m;return(o.length>0||!e)&&(m=VV(n,a),(e||a&&Cx(n))&&(o.forEach(x=>{let I=x.isJSX()?hV(m):Se(m);I.loc=x.node.loc,x.replaceWith(I)}),e||(m=null))),{thisBinding:m,fnPath:s}}function jV(s){return dV.includes(s)}function RV(s){if(s.parentPath.isAssignmentExpression()&&s.parentPath.node.operator!=="="){let t=s.parentPath,i=t.node.operator.slice(0,-1),r=t.node.right,n=jV(i);if(s.node.computed){let a=s.scope.generateDeclaredUidIdentifier("tmp"),{object:o,property:c}=s.node;t.get("left").replaceWith(rt(o,Vt("=",a,c),!0)),t.get("right").replaceWith(e(n?"=":i,rt(o,Se(a.name),!0),r))}else{let a=s.node.object,o=s.node.property;t.get("left").replaceWith(rt(a,o)),t.get("right").replaceWith(e(n?"=":i,rt(a,Se(o.name)),r))}return n?t.replaceWith(fV(i,t.node.left,t.node.right)):t.node.operator="=",[t.get("left"),t.get("right").get("left")]}else if(s.parentPath.isUpdateExpression()){let t=s.parentPath,i=s.scope.generateDeclaredUidIdentifier("tmp"),r=s.node.computed?s.scope.generateDeclaredUidIdentifier("prop"):null,n=[Vt("=",i,rt(s.node.object,r?Vt("=",r,s.node.property):s.node.property,s.node.computed)),Vt("=",rt(s.node.object,r?Se(r.name):s.node.property,s.node.computed),Uc(s.parentPath.node.operator[0],Se(i.name),yV(1)))];s.parentPath.node.prefix||n.push(Se(i.name));let a=t.replaceWith(gV(n))[0],o=a.get("expressions.0.right"),c=a.get("expressions.1.left");return[o,c]}return[s];function e(t,i,r){return t==="="?Vt("=",i,r):Uc(t,i,r)}}function Cx(s){return s.isClassMethod()&&!!s.parentPath.parentPath.node.superClass}var UV=Xr({CallExpression(s,{supers:e,thisBinding:t}){s.get("callee").isSuper()&&(e.has(s.node)||(e.add(s.node),s.replaceWithMultiple([s.node,Vt("=",Se(t),Se("this"))])))}});function VV(s,e){return bi(s,"this",t=>{if(!e||!Cx(s))return Pi();s.traverse(UV,{supers:new WeakSet,thisBinding:t})})}function KV(s){return bi(s,"supercall",()=>{let e=s.scope.generateUidIdentifier("args");return Wc([SV(e)],As(Vc(),[PV(Se(e.name))]))})}function qV(s,e,t){return bi(s,`superprop_${e?"set":"get"}:${t||""}`,()=>{let r=[],n;if(t)n=rt(Vc(),Se(t));else{let a=s.scope.generateUidIdentifier("prop");r.unshift(a),n=rt(Vc(),Se(a.name),!0)}if(e){let a=s.scope.generateUidIdentifier("value");r.push(a),n=Vt("=",n,Se(a.name))}return Wc(r,n)})}function bi(s,e,t){let i="binding:"+e,r=s.getData(i);if(!r){let n=s.scope.generateUidIdentifier(e);r=n.name,s.setData(i,r),s.scope.push({id:n,init:t(r)})}return r}var $V=Xr({ThisExpression(s,{thisPaths:e}){e.push(s)},JSXIdentifier(s,{thisPaths:e}){s.node.name==="this"&&(!s.parentPath.isJSXMemberExpression({object:s.node})&&!s.parentPath.isJSXOpeningElement({name:s.node})||e.push(s))},CallExpression(s,{superCalls:e}){s.get("callee").isSuper()&&e.push(s)},MemberExpression(s,{superProps:e}){s.get("object").isSuper()&&e.push(s)},Identifier(s,{argumentsPaths:e}){if(!s.isReferencedIdentifier({name:"arguments"}))return;let t=s.scope;do{if(t.hasOwnBinding("arguments")){t.rename("arguments");return}if(t.path.isFunction()&&!t.path.isArrowFunctionExpression())break}while(t=t.parent);e.push(s)},MetaProperty(s,{newTargetPaths:e}){s.get("meta").isIdentifier({name:"new"})&&s.get("property").isIdentifier({name:"target"})&&e.push(s)}});function JV(s){let e=[],t=[],i=[],r=[],n=[];return s.traverse($V,{thisPaths:e,argumentsPaths:t,newTargetPaths:i,superProps:r,superCalls:n}),{thisPaths:e,argumentsPaths:t,newTargetPaths:i,superProps:r,superCalls:n}}function XV(){if(!this.isExportDeclaration()||this.isExportAllDeclaration())throw new Error("Only default and named export declarations can be split.");if(this.isExportNamedDeclaration()&&this.get("specifiers").length>0)throw new Error("It doesn't make sense to split exported specifiers.");let s=this.get("declaration");if(this.isExportDefaultDeclaration()){let r=s.isFunctionDeclaration()||s.isClassDeclaration(),n=s.isFunctionExpression()||s.isClassExpression(),a=s.isScope()?s.scope.parent:s.scope,o=s.node.id,c=!1;o?n&&a.hasBinding(o.name)&&(c=!0,o=a.generateUidIdentifier(o.name)):(c=!0,o=a.generateUidIdentifier("default"),(r||n)&&(s.node.id=qt(o)));let l=r?s.node:vV("var",[kV(qt(o),s.node)]),u=jS(null,[RS(qt(o),Se("default"))]);return this.insertAfter(u),this.replaceWith(l),c&&a.registerDeclaration(this),this}else if(this.get("specifiers").length>0)throw new Error("It doesn't make sense to split exported specifiers.");let e=s.getOuterBindingIdentifiers(),t=Object.keys(e).map(r=>RS(Se(r),Se(r))),i=jS(null,t);return this.insertAfter(i),this.replaceWith(s.node),this}var WV=()=>Xt({"ReferencedIdentifier|BindingIdentifier"(s,e){s.node.name===e.name&&(e.needsRename=!0,s.stop())},Scope(s,e){s.scope.hasOwnBinding(e.name)&&s.skip()}});function zV(s){if(this.node.id)return this;let e=NV(this.node,this.parent);if(e==null)return this;let{name:t}=e;if(!s&&/[\uD800-\uDFFF]/.test(t)||t.startsWith("get ")||t.startsWith("set "))return null;t=AV(t.replace(/[/ ]/g,"_"));let i=Se(t);DV(i,e.originalNode);let r={needsRename:!1,name:t},{scope:n}=this,a=n.getOwnBinding(t);if(a?a.kind==="param"&&(r.needsRename=!0):(n.parent.hasBinding(t)||n.hasGlobal(t))&&this.traverse(WV(),r),!r.needsRename)return this.node.id=i,n.getProgramParent().referencesSet.add(i.name),this;if(n.hasBinding(i.name)&&!n.hasGlobal(i.name))return n.rename(i.name),this.node.id=i,n.getProgramParent().referencesSet.add(i.name),this;if(!CV(this.node))return null;let o=n.generateUidIdentifier(i.name),c=[];for(let u=0,f=HV(this.node);u<f;u++)c.push(n.generateUidIdentifier("x"));let l=fS.expression.ast`
45
+ (function (${o}) {
46
+ function ${i}(${c}) {
47
+ return ${qt(o)}.apply(this, arguments);
48
+ }
49
+
50
+ ${qt(i)}.toString = function () {
51
+ return ${qt(o)}.toString();
52
+ }
53
+
54
+ return ${qt(i)};
55
+ })(${Ex(this.node)})
56
+ `;return this.replaceWith(l)[0].get("arguments.0")}function HV(s){let e=s.params.findIndex(t=>IV(t)||wV(t));return e===-1?s.params.length:e}var{STATEMENT_OR_BLOCK_KEYS:YV,VISITOR_KEYS:GV,isBlockStatement:Ix,isExpression:QV,isIdentifier:ZV,isLiteral:eK,isStringLiteral:tK,isType:sK,matchesPattern:iK,toComputedKey:rK}=ne;function nK(s,e){return iK(this.node,s,e)}function aK(){return this.scope.isStatic(this.node)}function oK(s){return sK(this.type,s)}function cK(){return(this.key==="init"||this.key==="left")&&this.parentPath.isFor()}function lK(s){return this.key!=="body"||!this.parentPath.isArrowFunctionExpression()?!1:this.isExpression()?Ix(s):this.isBlockStatement()?QV(s):!1}function uK(s){let e=this,t=!0;do{let{type:i,container:r}=e;if(!t&&(e.isFunction()||i==="StaticBlock"))return!!s;if(t=!1,Array.isArray(r)&&e.key!==r.length-1)return!1}while((e=e.parentPath)&&!e.isProgram()&&!e.isDoExpression());return!0}function pK(){return this.parentPath.isLabeledStatement()||Ix(this.container)?!1:YV.includes(this.key)}function hK(s,e){if(!this.isReferencedIdentifier()){if(this.isJSXMemberExpression()&&this.node.property.name===e||(this.isMemberExpression()||this.isOptionalMemberExpression())&&(this.node.computed?tK(this.node.property,{value:e}):this.node.property.name===e)){let n=this.get("object");return n.isReferencedIdentifier()&&n.referencesImport(s,"*")}return!1}let t=this.scope.getBinding(this.node.name);if(t?.kind!=="module")return!1;let i=t.path,r=i.parentPath;if(!r.isImportDeclaration())return!1;if(r.node.source.value===s){if(!e)return!0}else return!1;return!!(i.isImportDefaultSpecifier()&&e==="default"||i.isImportNamespaceSpecifier()&&e==="*"||i.isImportSpecifier()&&ZV(i.node.imported,{name:e}))}function fK(){let s=this.node;if(s.end){let e=this.hub.getCode();if(e)return e.slice(s.start,s.end)}return""}function dK(s){return this._guessExecutionStatusRelativeTo(s)!=="after"}function US(s){return s.isProgram()?s:(s.parentPath.scope.getFunctionParent()||s.parentPath.scope.getProgramParent()).path}function mK(s,e){switch(s){case"LogicalExpression":return e==="right";case"ConditionalExpression":case"IfStatement":return e==="consequent"||e==="alternate";case"WhileStatement":case"DoWhileStatement":case"ForInStatement":case"ForOfStatement":return e==="body";case"ForStatement":return e==="body"||e==="update";case"SwitchStatement":return e==="cases";case"TryStatement":return e==="handler";case"AssignmentPattern":return e==="right";case"OptionalMemberExpression":return e==="property";case"OptionalCallExpression":return e==="arguments";default:return!1}}function VS(s,e){for(let t=0;t<e;t++){let i=s[t];if(mK(i.parent.type,i.parentKey))return!0}return!1}var KS=Symbol();function yK(s){return Kc(this,s,new Map)}function Kc(s,e,t){let i={this:US(s),target:US(e)};if(i.target.node!==i.this.node)return SK(s,i.target,t);let r={target:e.getAncestry(),this:s.getAncestry()};if(r.target.includes(s))return"after";if(r.this.includes(e))return"before";let n,a={target:0,this:0};for(;!n&&a.this<r.this.length;){let u=r.this[a.this];a.target=r.target.indexOf(u),a.target>=0?n=u:a.this++}if(!n)throw new Error("Internal Babel error - The two compared nodes don't appear to belong to the same program.");if(VS(r.this,a.this-1)||VS(r.target,a.target-1))return"unknown";let o={this:r.this[a.this-1],target:r.target[a.target-1]};if(o.target.listKey&&o.this.listKey&&o.target.container===o.this.container)return o.target.key>o.this.key?"before":"after";let c=GV[n.type],l={this:c.indexOf(o.this.parentKey),target:c.indexOf(o.target.parentKey)};return l.target>l.this?"before":"after"}function TK(s,e,t){if(e.isFunctionDeclaration()){if(e.parentPath.isExportDeclaration())return"unknown"}else return Kc(s,e,t)==="before"?"before":"unknown";let i=e.scope.getBinding(e.node.id.name);if(!i.references)return"before";let r=i.referencePaths,n;for(let a of r){if(!!a.find(l=>l.node===e.node))continue;if(a.key!=="callee"||!a.parentPath.isCallExpression())return"unknown";let c=Kc(s,a,t);if(n&&n!==c)return"unknown";n=c}return n}function SK(s,e,t){let i=t.get(s.node),r;if(!i)t.set(s.node,i=new Map);else if(r=i.get(e.node))return r===KS?"unknown":r;i.set(e.node,KS);let n=TK(s,e,t);return i.set(e.node,n),n}function xK(s,e){if(e?.includes(this))return this;if(e=e||[],e.push(this),this.isVariableDeclarator()){if(this.get("id").isIdentifier())return this.get("init").resolve(s,e)}else if(this.isReferencedIdentifier()){let t=this.scope.getBinding(this.node.name);if(!t)return this;if(!t.constant)return this;if(t.kind==="module")return this;if(t.path!==this){let i=t.path.resolve(s,e);return this.find(r=>r.node===i.node)?this:i}}else{if(this.isTypeCastExpression())return this.get("expression").resolve(s,e);if(s&&this.isMemberExpression()){let t=rK(this.node);if(!eK(t))return this;let i=t.value,r=this.get("object").resolve(s,e);if(r.isObjectExpression()){let n=r.get("properties");for(let a of n){if(!a.isProperty())continue;let o=a.get("key"),c=a.isnt("computed")&&o.isIdentifier({name:i});if(c=c||o.isLiteral({value:i}),c)return a.get("value").resolve(s,e)}}else if(r.isArrayExpression()&&!isNaN(+i)){let a=r.get("elements")[i];if(a)return a.resolve(s,e)}}}return this}function gK(){if(this.isIdentifier()){let s=this.scope.getBinding(this.node.name);return s?s.constant:!1}if(this.isLiteral())return this.isRegExpLiteral()?!1:this.isTemplateLiteral()?this.get("expressions").every(s=>s.isConstantExpression()):!0;if(this.isUnaryExpression())return this.node.operator!=="void"?!1:this.get("argument").isConstantExpression();if(this.isBinaryExpression()){let{operator:s}=this.node;return s!=="in"&&s!=="instanceof"&&this.get("left").isConstantExpression()&&this.get("right").isConstantExpression()}return this.isMemberExpression()?!this.node.computed&&this.get("object").isIdentifier({name:"Symbol"})&&!this.scope.hasBinding("Symbol",{noGlobals:!0}):this.isCallExpression()?this.node.arguments.length===1&&this.get("callee").matchesPattern("Symbol.for")&&!this.scope.hasBinding("Symbol",{noGlobals:!0})&&this.get("arguments")[0].isStringLiteral():!1}function PK(){return!!(this.isProgram()?this:this.parentPath).find(t=>{if(t.isProgram({sourceType:"module"})||t.isClass())return!0;if(t.isArrowFunctionExpression()&&!t.get("body").isBlockStatement())return!1;let i;if(t.isFunction())i=t.node.body;else if(t.isProgram())i=t.node;else return!1;for(let r of i.directives)if(r.value.value==="use strict")return!0;return!1})}var{getAssignmentIdentifiers:bK,getBindingIdentifiers:wx,getOuterBindingIdentifiers:EK,buildUndefinedNode:AK}=ne,zc=0,Ei=1;function CK(s){return{type:zc,path:s}}function IK(s){return{type:Ei,path:s}}function wK(){return this.key==="left"?this.getSibling("right"):this.key==="right"?this.getSibling("left"):null}function bs(s,e,t){return s&&e.push(...Cs(s,t)),e}function NK(s,e,t){let i=[];for(let r=0;r<s.length;r++){let n=s[r],a=Cs(n,t),o=[],c=[];for(let l of a)l.type===zc&&o.push(l),l.type===Ei&&c.push(l);o.length&&(i=o),e.push(...c)}return e.push(...i),e}function vK(s){s.forEach(e=>{e.type=Ei})}function Oc(s,e){s.forEach(t=>{t.path.isBreakStatement({label:null})&&(e?t.path.replaceWith(AK()):t.path.remove())})}function qS(s,e){let t=[];if(e.canHaveBreak){let i=[];for(let r=0;r<s.length;r++){let n=s[r],a={...e,inCaseClause:!1};n.isBlockStatement()&&(e.inCaseClause||e.shouldPopulateBreak)?a.shouldPopulateBreak=!0:a.shouldPopulateBreak=!1;let o=Cs(n,a);if(o.length>0&&o.every(c=>c.type===Ei)){i.length>0&&o.every(c=>c.path.isBreakStatement({label:null}))?(vK(i),t.push(...i),i.some(c=>c.path.isDeclaration())&&(t.push(...o),e.shouldPreserveBreak||Oc(o,!0)),e.shouldPreserveBreak||Oc(o,!1)):(t.push(...o),!e.shouldPopulateBreak&&!e.shouldPreserveBreak&&Oc(o,!0));break}if(r===s.length-1)t.push(...o);else{i=[];for(let c=0;c<o.length;c++){let l=o[c];l.type===Ei&&t.push(l),l.type===zc&&i.push(l)}}}}else if(s.length)for(let i=s.length-1;i>=0;i--){let r=Cs(s[i],e);if(r.length>1||r.length===1&&!r[0].path.isVariableDeclaration()&&!r[0].path.isEmptyStatement()){t.push(...r);break}}return t}function Cs(s,e){let t=[];if(s.isIfStatement())t=bs(s.get("consequent"),t,e),t=bs(s.get("alternate"),t,e);else{if(s.isDoExpression()||s.isFor()||s.isWhile()||s.isLabeledStatement())return bs(s.get("body"),t,e);if(s.isProgram()||s.isBlockStatement())return qS(s.get("body"),e);if(s.isFunction())return Cs(s.get("body"),e);if(s.isTryStatement())t=bs(s.get("block"),t,e),t=bs(s.get("handler"),t,e);else{if(s.isCatchClause())return bs(s.get("body"),t,e);if(s.isSwitchStatement())return NK(s.get("cases"),t,e);if(s.isSwitchCase())return qS(s.get("consequent"),{canHaveBreak:!0,shouldPopulateBreak:!1,inCaseClause:!0,shouldPreserveBreak:e.shouldPreserveBreak});s.isBreakStatement()?t.push(IK(s)):t.push(CK(s))}}return t}function kK(s=!1){return Cs(this,{canHaveBreak:!1,shouldPopulateBreak:!1,inCaseClause:!1,shouldPreserveBreak:s}).map(t=>t.path)}function DK(s){return Xe.get({parentPath:this.parentPath,parent:this.parent,container:this.container,listKey:this.listKey,key:s}).setContext(this.context)}function LK(){return this.getSibling(this.key-1)}function OK(){return this.getSibling(this.key+1)}function MK(){let s=this.key;if(!Number.isInteger(s))return[];let e=[],t=this.container.length;for(let i=s+1;i<t;i++)e.push(this.getSibling(i));return e}function FK(){let s=this.key;if(!Number.isInteger(s))return[];let e=[];for(let t=s-1;t>=0;t--)e.push(this.getSibling(t));return e}function BK(s,e=!0){e===!0&&(e=this.context);let t=s.split(".");return t.length===1?_K.call(this,s,e):jK.call(this,t,e)}function _K(s,e){let t=this.node,i=t[s];return Array.isArray(i)?i.map((r,n)=>Xe.get({listKey:s,parentPath:this,parent:t,container:i,key:n}).setContext(e)):Xe.get({parentPath:this,parent:t,container:t,key:s}).setContext(e)}function jK(s,e){let t=this;for(let i of s)i==="."?t=t.parentPath:Array.isArray(t)?t=t[i]:t=t.get(i,e);return t}function RK(){return bK(this.node)}function UK(s){return wx(this.node,s)}function VK(s){return EK(this.node,s)}function KK(s=!1,e=!1){let i=[this],r=Object.create(null);for(;i.length;){let n=i.shift();if(!n||!n.node)continue;let a=wx.keys[n.node.type];if(n.isIdentifier()){s?(r[n.node.name]=r[n.node.name]||[]).push(n):r[n.node.name]=n;continue}if(n.isExportDeclaration()){let o=n.get("declaration");o.isDeclaration()&&i.push(o);continue}if(e){if(n.isFunctionDeclaration()){i.push(n.get("id"));continue}if(n.isFunctionExpression())continue}if(a)for(let o=0;o<a.length;o++){let c=a[o],l=n.get(c);Array.isArray(l)?i.push(...l):l.node&&i.push(l)}}return r}function qK(s=!1){return this.getBindingIdentifierPaths(s,!0)}var{addComment:$K,addComments:JK}=ne;function XK(){if(typeof this.key=="string")return;let s=this.node;if(!s)return;let e=s.trailingComments,t=s.leadingComments;if(!e&&!t)return;let i=this.getSibling(this.key-1),r=this.getSibling(this.key+1),n=!!i.node,a=!!r.node;n&&(t&&i.addComments("trailing",$S(t,i.node.trailingComments)),e&&!a&&i.addComments("trailing",e)),a&&(e&&r.addComments("leading",$S(e,r.node.leadingComments)),t&&!n&&r.addComments("leading",t))}function $S(s,e){if(!e?.length)return s;let t=new Set(e);return s.filter(i=>!t.has(i))}function WK(s,e,t){$K(this.node,s,e,t)}function zK(s,e){JK(this.node,s,e)}var{validate:HK}=ne,JS=nu("babel"),YK=1,GK=2,Nx=4,Xe=class vx{constructor(e,t){this.parent=t,this.hub=e,this.data=null,this.context=null,this.scope=null}contexts=[];state=null;_traverseFlags=0;get removed(){return(this._traverseFlags&1)>0}set removed(e){e?this._traverseFlags|=1:this._traverseFlags&=-2}get shouldStop(){return(this._traverseFlags&2)>0}set shouldStop(e){e?this._traverseFlags|=2:this._traverseFlags&=-3}get shouldSkip(){return(this._traverseFlags&4)>0}set shouldSkip(e){e?this._traverseFlags|=4:this._traverseFlags&=-5}skipKeys=null;parentPath=null;container=null;listKey=null;key=null;node=null;type=null;_store=null;static get({hub:e,parentPath:t,parent:i,container:r,listKey:n,key:a}){if(!e&&t&&(e=t.hub),!i)throw new Error("To get a node path the parent needs to exist");let o=r[a],c=ZS(i,t),l=c.get(o);return l||(l=new vx(e,i),o&&c.set(o,l)),Dx.call(l,t,r,n,a),l}getScope(e){return this.isScope()?new _c(this):e}setData(e,t){return this.data==null&&(this.data=Object.create(null)),this.data[e]=t}getData(e,t){this.data==null&&(this.data=Object.create(null));let i=this.data[e];return i===void 0&&t!==void 0&&(i=this.data[e]=t),i}hasNode(){return this.node!=null}buildCodeFrameError(e,t=SyntaxError){return this.hub.buildError(this.node,e,t)}traverse(e,t){Me(this.node,e,this.scope,t,this)}set(e,t){HK(this.node,e,t),this.node[e]=t}getPathLocation(){let e=[],t=this;do{let i=t.key;t.inList&&(i=`${t.listKey}[${i}]`),e.unshift(i)}while(t=t.parentPath);return e.join(".")}debug(e){JS.enabled&&JS(`${this.getPathLocation()} ${this.type}: ${e}`)}toString(){return Ar(this.node).code}get inList(){return!!this.listKey}set inList(e){e||(this.listKey=null)}get parentKey(){return this.listKey||this.key}},QK={findParent:q5,find:$5,getFunctionParent:J5,getStatementParent:X5,getEarliestCommonAncestorFrom:W5,getDeepestCommonAncestorFrom:z5,getAncestry:H5,isAncestor:Y5,isDescendant:G5,inType:Q5,getTypeAnnotation:o7,isBaseType:l7,couldBeBaseType:u7,baseTypeStrictlyMatches:p7,isGenericType:h7,replaceWithMultiple:G7,replaceWithSourceString:Q7,replaceWith:Z7,replaceExpressionWithStatements:eV,replaceInline:tV,evaluateTruthy:oV,evaluate:lV,ensureBlock:OV,unwrapFunctionEnvironment:MV,arrowFunctionToExpression:BV,splitExportDeclaration:XV,ensureFunctionName:zV,matchesPattern:nK,isStatic:aK,isNodeType:oK,canHaveVariableDeclarationOrExpression:cK,canSwapBetweenExpressionAndStatement:lK,isCompletionRecord:uK,isStatementOrBlock:pK,referencesImport:hK,getSource:fK,willIMaybeExecuteBefore:dK,_guessExecutionStatusRelativeTo:yK,resolve:xK,isConstantExpression:gK,isInStrictMode:PK,isDenylisted:ZK,skip:eq,skipKey:tq,stop:sq,setContext:rq,requeue:aq,requeueComputedKeyAndDecorators:oq,remove:d7,insertBefore:I7,insertAfter:N7,unshiftContainer:v7,pushContainer:k7,getOpposite:wK,getCompletionRecords:kK,getSibling:DK,getPrevSibling:LK,getNextSibling:OK,getAllNextSiblings:MK,getAllPrevSiblings:FK,get:BK,getAssignmentIdentifiers:RK,getBindingIdentifiers:UK,getOuterBindingIdentifiers:VK,getBindingIdentifierPaths:KK,getOuterBindingIdentifierPaths:qK,shareCommentsWithSiblings:XK,addComment:WK,addComments:zK};Object.assign(Xe.prototype,QK);for(let s of Qs){let e=`is${s}`,t=ne[e];Xe.prototype[e]=function(i){return t(this.node,i)},Xe.prototype[`assert${s}`]=function(i){if(!t(this.node,i))throw new TypeError(`Expected node path of type ${s}`)}}Object.assign(Xe.prototype,zS);for(let s of Object.keys($c))s.startsWith("_")||Qs.includes(s)||Qs.push(s);function Rr(s){if(!s)return!1;for(let e of s){if(!e)continue;let t=this.node;if(!t)return!0;let i=e.call(this.state,this,this.state);if(i&&typeof i=="object"&&typeof i.then=="function")throw new Error("You appear to be using a plugin with an async traversal visitor, which your current version of Babel does not support. If you're using a published plugin, you may need to upgrade your @babel/core version.");if(i)throw new Error(`Unexpected return value from visitor method ${e}`);if(this.node!==t||this._traverseFlags>0)return!0}return!1}function ZK(){return!!this.opts.denylist?.includes(this.node.type)}function eq(){this.shouldSkip=!0}function tq(s){this.skipKeys==null&&(this.skipKeys={}),this.skipKeys[s]=!0}function sq(){this._traverseFlags|=Nx|GK}function iq(){let s=this.parentPath;((this.key==="key"||this.listKey==="decorators")&&s.isMethod()||this.key==="discriminant"&&s.isSwitchStatement())&&(s=s.parentPath);let e;for(;s&&!e;)e=s.scope,s=s.parentPath;this.scope=this.getScope(e),this.scope?.init()}function Hc(){if(this.opts?.noScope)return;let s=this.parentPath;((this.key==="key"||this.listKey==="decorators")&&s.isMethod()||this.key==="discriminant"&&s.isSwitchStatement())&&(s=s.parentPath);let e;for(;s&&!e;){if(s.opts?.noScope)return;e=s.scope,s=s.parentPath}this.scope=this.getScope(e),this.scope?.init()}function rq(s){return this.skipKeys!=null&&(this.skipKeys={}),this._traverseFlags=0,s&&(this.context=s,this.state=s.state,this.opts=s.opts),Hc.call(this),this}function Wt(){if(!this.removed){if(this.parentPath&&(this.parent=this.parentPath.node),this.parent&&this.inList){let s=this.parent[this.listKey];this.container!==s&&(this.container=s||null)}if(this.container&&this.node!==this.container[this.key]){let s=-1;if(Array.isArray(this.container))s=this.container.indexOf(this.node);else for(s of Object.keys(this.container))if(this.container[s]===this.node)break;s===-1?this.key=null:Lx.call(this,s)}}}function nq(){this.contexts.pop(),this.contexts.length>0?this.setContext(this.contexts[this.contexts.length-1]):this.setContext(void 0)}function kx(s){this.contexts.push(s),this.setContext(s)}function Dx(s,e,t,i){this.listKey=t,this.container=e,this.parentPath=s||this.parentPath,Lx.call(this,i)}function Lx(s){this.key=s,this.node=this.container[this.key],this.type=this.node?.type??null}function aq(s=this){if(s.removed)return;s.shouldSkip=!1;let e=this.contexts;for(let t of e)t.maybeQueue(s)}function oq(){let{context:s,node:e}=this;if(!Pa(e)&&e.computed&&s.maybeQueue(this.get("key")),e.decorators)for(let t of this.get("decorators"))s.maybeQueue(t)}function cq(){let s=this,e=this.contexts;for(;!e.length&&(s=s.parentPath,!!s);)e=s.contexts;return e}var qc=class{getCode(){}getScope(){}addHelper(){throw new Error("Helpers are not supported by the default hub.")}buildError(e,t,i=TypeError){return new i(t)}},{VISITOR_KEYS:lq,removeProperties:uq,traverseFast:xi}=ne;function Me(s,e={},t,i,r,n){if(s){if(!e.noScope&&!t&&s.type!=="Program"&&s.type!=="File")throw new Error(`You must pass a scope and parentPath unless traversing a Program/File. Instead of that you tried to traverse a ${s.type} node without passing scope and parentPath.`);if(!r&&n)throw new Error("visitSelf can only be used when providing a NodePath.");lq[s.type]&&(Xt(e),Jr(s,e,t,i,r,void 0,n))}}Me.visitors=e5;Me.verify=Jc;Me.explode=Xt;Me.cheap=function(s,e){xi(s,e)};Me.node=function(s,e,t,i,r,n){Jr(s,e,t,i,r,n)};Me.clearNode=function(s,e){uq(s,e)};Me.removeProperties=function(s,e){return xi(s,Me.clearNode,e),s};Me.hasType=function(s,e,t){return t?.includes(s.type)?!1:s.type===e?!0:xi(s,function(i){if(t?.includes(i.type))return xi.skip;if(i.type===e)return xi.stop})};Me.cache=c5;var pq=function(e){return e>=48&&e<=57},Ox={decBinOct:new Set([46,66,69,79,95,98,101,111,43,45]),hex:new Set([46,88,95,120])},Hr={bin:s=>s===48||s===49,oct:s=>s>=48&&s<=55,dec:s=>s>=48&&s<=57,hex:s=>s>=48&&s<=57||s>=65&&s<=70||s>=97&&s<=102};function Mx(s,e,t,i,r,n){let a=t,o=i,c=r,l="",u=null,f=t,{length:m}=e;for(;;){if(t>=m){n.unterminated(a,o,c),l+=e.slice(f,t);break}let x=e.charCodeAt(t);if(hq(s,x,e,t)){l+=e.slice(f,t);break}if(x===92){l+=e.slice(f,t);let I=fq(e,t,i,r,s==="template",n);I.ch===null&&!u?u={pos:t,lineStart:i,curLine:r}:l+=I.ch,{pos:t,lineStart:i,curLine:r}=I,f=t}else x===8232||x===8233?(++t,++r,i=t):x===10||x===13?s==="template"?(l+=e.slice(f,t)+`
57
+ `,++t,x===13&&e.charCodeAt(t)===10&&++t,++r,f=i=t):n.unterminated(a,o,c):++t}return{pos:t,str:l,firstInvalidLoc:u,lineStart:i,curLine:r}}function hq(s,e,t,i){return s==="template"?e===96||e===36&&t.charCodeAt(i+1)===123:e===(s==="double"?34:39)}function fq(s,e,t,i,r,n){let a=!r;e++;let o=l=>({pos:e,ch:l,lineStart:t,curLine:i}),c=s.charCodeAt(e++);switch(c){case 110:return o(`
58
+ `);case 114:return o("\r");case 120:{let l;return{code:l,pos:e}=Yc(s,e,t,i,2,!1,a,n),o(l===null?null:String.fromCharCode(l))}case 117:{let l;return{code:l,pos:e}=mq(s,e,t,i,a,n),o(l===null?null:String.fromCodePoint(l))}case 116:return o(" ");case 98:return o("\b");case 118:return o("\v");case 102:return o("\f");case 13:s.charCodeAt(e)===10&&++e;case 10:t=e,++i;case 8232:case 8233:return o("");case 56:case 57:if(r)return o(null);n.strictNumericEscape(e-1,t,i);default:if(c>=48&&c<=55){let l=e-1,f=/^[0-7]+/.exec(s.slice(l,e+2))[0],m=parseInt(f,8);m>255&&(f=f.slice(0,-1),m=parseInt(f,8)),e+=f.length-1;let x=s.charCodeAt(e);if(f!=="0"||x===56||x===57){if(r)return o(null);n.strictNumericEscape(l,t,i)}return o(String.fromCharCode(m))}return o(String.fromCharCode(c))}}function Yc(s,e,t,i,r,n,a,o){let c=e,l;return{n:l,pos:e}=dq(s,e,t,i,16,r,n,!1,o,!a),l===null&&(a?o.invalidEscapeSequence(c,t,i):e=c-1),{code:l,pos:e}}function dq(s,e,t,i,r,n,a,o,c,l){let u=e,f=r===16?Ox.hex:Ox.decBinOct,m=r===16?Hr.hex:r===10?Hr.dec:r===8?Hr.oct:Hr.bin,x=!1,I=0;for(let L=0,N=n??1/0;L<N;++L){let w=s.charCodeAt(e),v;if(w===95&&o!=="bail"){let z=s.charCodeAt(e-1),V=s.charCodeAt(e+1);if(o){if(Number.isNaN(V)||!m(V)||f.has(z)){if(l)return{n:null,pos:e};c.unexpectedNumericSeparator(e,t,i)}}else{if(l)return{n:null,pos:e};c.numericSeparatorInEscapeSequence(e,t,i)}++e;continue}if(w>=97?v=w-97+10:w>=65?v=w-65+10:pq(w)?v=w-48:v=1/0,v>=r)if(v<=9){if(l)return{n:null,pos:e};c.invalidDigit(e,t,i,r),v=0}else if(a)v=0,x=!0;else break;++e,I=I*r+v}return e===u||n!=null&&e-u!==n||x?{n:null,pos:e}:{n:I,pos:e}}function mq(s,e,t,i,r,n){let a=s.charCodeAt(e),o;if(a===123){if(++e,{code:o,pos:e}=Yc(s,e,t,i,s.indexOf("}",e)-e,!0,r,n),++e,o!==null&&o>1114111)if(r)n.invalidCodePoint(e,t,i);else return{code:null,pos:e}}else({code:o,pos:e}=Yc(s,e,t,i,4,!1,r,n));return{code:o,pos:e}}function Zr(s,e){let t=Object.keys(e);for(let i of t)if(s[i]!==e[i])return!1;return!0}function Oe(s,e,t){return e?.type===s&&(t==null||Zr(e,t))}var Fx=new Set;function Ni(s,e,t="",i=s){if(Fx.has(i))return;Fx.add(i);let{internal:r,trace:n}=yq(1,2);r||console.warn(`${t}\`${s}\` has been deprecated, please migrate to \`${e}\`
59
+ ${n}`)}function yq(s,e){let{stackTraceLimit:t,prepareStackTrace:i}=Error,r;if(Error.stackTraceLimit=1+s+e,Error.prepareStackTrace=function(a,o){r=o},new Error().stack,Error.stackTraceLimit=t,Error.prepareStackTrace=i,!r)return{internal:!1,trace:""};let n=r.slice(1+s,1+s+e);return{internal:/[\\/]@babel[\\/]/.test(n[1].getFileName()),trace:n.map(a=>` at ${a}`).join(`
60
+ `)}}function Tq(s,e){return Oe("AssignmentExpression",s,e)}function Sq(s,e){return Oe("File",s,e)}function xq(s,e){return Oe("FunctionDeclaration",s,e)}function gq(s,e){return Oe("FunctionExpression",s,e)}function en(s,e){return Oe("Identifier",s,e)}function Vx(s,e){return Oe("StringLiteral",s,e)}function Pq(s,e){return Oe("MemberExpression",s,e)}function bq(s,e){return Oe("ThisExpression",s,e)}function Eq(s,e){return Oe("UnaryExpression",s,e)}function Aq(s,e){return Oe("UpdateExpression",s,e)}function Cq(s,e){return Oe("ClassExpression",s,e)}function Iq(s,e){return Oe("ExportAllDeclaration",s,e)}function el(s,e){return Oe("ImportDefaultSpecifier",s,e)}function Kx(s,e){return Oe("ImportNamespaceSpecifier",s,e)}function qx(s,e){return Oe("ImportSpecifier",s,e)}function wq(s,e){return Oe("MetaProperty",s,e)}function Nq(s,e){return Oe("Super",s,e)}function vq(s,e){return Oe("PrivateName",s,e)}function kq(s,e){if(!s)return!1;switch(s.type){case"FunctionDeclaration":case"VariableDeclaration":case"ClassDeclaration":case"ExportAllDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ImportDeclaration":case"DeclareClass":case"DeclareFunction":case"DeclareInterface":case"DeclareModule":case"DeclareModuleExports":case"DeclareTypeAlias":case"DeclareOpaqueType":case"DeclareVariable":case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":case"InterfaceDeclaration":case"OpaqueType":case"TypeAlias":case"EnumDeclaration":case"TSDeclareFunction":case"TSInterfaceDeclaration":case"TSTypeAliasDeclaration":case"TSEnumDeclaration":case"TSModuleDeclaration":case"TSImportEqualsDeclaration":break;case"Placeholder":if(s.expectedNode==="Declaration")break;default:return!1}return e==null||Zr(s,e)}function Dq(s,e){if(!s)return!1;switch(s.type){case"ExportAllDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":break;default:return!1}return e==null||Zr(s,e)}function Bx(s){return Pq(s)||wq(s)}function Lq(s,e,t){if(!Bx(s))return!1;let i=Array.isArray(e)?e:e.split("."),r=[],n;for(n=s;Bx(n);n=n.object??n.meta)r.push(n.property);if(r.push(n),r.length<i.length||!t&&r.length>i.length)return!1;for(let a=0,o=r.length-1;a<i.length;a++,o--){let c=r[o],l;if(en(c))l=c.name;else if(Vx(c))l=c.value;else if(bq(c))l="this";else if(Nq(c))l="super";else if(vq(c))l="#"+c.id.name;else return!1;if(i[a]!==l)return!1}return!0}function Oq(s,e){let t=s.split(".");return i=>Lq(i,t,e)}var qH=Oq("React.Component");function Mq(s,e){return s===e?!0:s==null||sn[e]?!1:!!J[e]?.includes(s)}function Fq(s,e){return!!(s===e||Qr[s]?.includes(e))}function ke(s,e,t){return e?Mq(e.type,s)?t===void 0?!0:Zr(e,t):!t&&e.type==="Placeholder"&&s in J?Fq(e.expectedNode,s):!1:!1}function Bq(s,e=!0){return typeof s!="string"||e&&(ss(s)||Xi(s,!0))?!1:Vs(s)}var _q=["leadingComments","trailingComments","innerComments"],$x=["||","&&","??"],jq=["++","--"],Rq=[">","<",">=","<="],Uq=["==","===","!=","!=="],Vq=[...Uq,"in","instanceof"],Kq=[...Vq,...Rq],Jx=["-","/","%","*","**","&","|",">>",">>>","<<","^"],_x=["+",...Jx,...Kq,"|>"],jx=["=","+=",...Jx.map(s=>s+"="),...$x.map(s=>s+"=")],qq=["delete","!"],$q=["+","-","~"],Jq=["typeof"],Xq=["void","throw",...qq,...$q,...Jq];var tn={},sn={},J={},Ii={},Xx={},tl={},rn={},Wx={};function Gr(s){return Array.isArray(s)?"array":s===null?"null":typeof s}function Ne(s,...e){return Object.assign(s,...e)}function Le(s){return{validate:s}}function D(...s){return Le(C(...s))}function ge(s){return{validate:s,optional:!0}}function nt(s,e){return{validate:s,default:e,optional:!1}}function se(...s){return{validate:C(...s),optional:!0}}function nn(s){return ve(U("array"),zt(s))}function ye(...s){return nn(C(...s))}function le(...s){return Le(ye(...s))}function zt(s){let e=Ns;function t(i,r,n){if(!Array.isArray(n))return;let a=0,o={toString(){return`${r}[${a}]`}};for(;a<n.length;a++){let c=n[a];s(i,o,c),e(i,o,c)}}return t.each=s,t}function pe(...s){function e(t,i,r){if(!s.includes(r))throw new TypeError(`Property ${i} expected value to be one of ${JSON.stringify(s)} but got ${JSON.stringify(r)}`)}return e.oneOf=s,e}var sl=[];function C(...s){let e=new Set;sl.push({types:s,set:e});function t(i,r,n){let a=n?.type;if(a!=null){if(e.has(a)){Ns(i,r,n);return}if(a==="Placeholder"){for(let o of s)if(ke(o,n)){Ns(i,r,n);return}}}throw new TypeError(`Property ${r} of ${i.type} expected node to be of a type ${JSON.stringify(s)} but instead got ${JSON.stringify(a)}`)}return t.oneOfNodeTypes=s,t}function an(...s){function e(t,i,r){let n=Gr(r);for(let a of s)if(n===a||ke(a,r)){Ns(t,i,r);return}throw new TypeError(`Property ${i} of ${t.type} expected node to be of a type ${JSON.stringify(s)} but instead got ${JSON.stringify(r?.type)}`)}return e.oneOfNodeOrValueTypes=s,e}function U(s){function e(t,i,r){if(Gr(r)!==s)throw new TypeError(`Property ${i} expected type of ${s} but got ${Gr(r)}`)}return e.type=s,e}function zx(s){let e=Object.keys(s);function t(i,r,n){let a=[];for(let o of e)try{cl(i,o,n[o],s[o])}catch(c){if(c instanceof TypeError){a.push(c.message);continue}throw c}if(a.length)throw new TypeError(`Property ${r} of ${i.type} expected to have the following:
61
+ ${a.join(`
62
+ `)}`)}return t.shapeOf=s,t}function il(){function s(e){let t=e;for(;e;){let{type:i}=t;if(i==="OptionalCallExpression"){if(t.optional)return;t=t.callee;continue}if(i==="OptionalMemberExpression"){if(t.optional)return;t=t.object;continue}break}throw new TypeError(`Non-optional ${e.type} must chain from an optional OptionalMemberExpression or OptionalCallExpression. Found chain from ${t?.type}`)}return s}function ve(...s){function e(...t){for(let i of s)i(...t)}if(e.chainOf=s,s.length>=2&&"type"in s[0]&&s[0].type==="array"&&!("each"in s[1]))throw new Error('An assertValueType("array") validator can only be followed by an assertEach(...) validator.');return e}var Wq=new Set(["aliases","builder","deprecatedAlias","fields","inherits","visitor","validate","unionShape"]),zq=new Set(["default","optional","deprecated","validate"]),Zc={};function vs(...s){return(e,t={})=>{let i=t.aliases;i||(t.inherits&&(i=Zc[t.inherits].aliases?.slice()),i??=[],t.aliases=i);let r=s.filter(n=>!i.includes(n));i.unshift(...r),at(e,t)}}function at(s,e={}){let t=e.inherits&&Zc[e.inherits]||{},i=e.visitor||t.visitor||[],r=e.aliases||t.aliases||[],n=e.builder||t.builder||e.visitor||[],a=e.fields;if(!a&&(a={},t.fields)){let o=Object.getOwnPropertyNames(t.fields);for(let c of o){let l=t.fields[c],u=l.default;if(Array.isArray(u)?u.length>0:u&&typeof u=="object")throw new Error("field defaults can only be primitives or empty arrays currently");a[c]={default:Array.isArray(u)?[]:u,optional:l.optional,deprecated:l.deprecated,validate:l.validate}}}for(let o of Object.keys(e))if(!Wq.has(o))throw new Error(`Unknown type option "${o}" on ${s}`);e.deprecatedAlias&&(tl[e.deprecatedAlias]=s);for(let o of i.concat(n))a[o]=a[o]||{};for(let o of Object.keys(a)){let c=a[o];c.default===null&&(c.optional??=!0),c.default===void 0?(c.default=null,c.optional??=!1):!c.validate&&c.default!=null&&(c.validate=U(Gr(c.default)));for(let l of Object.keys(c))if(!zq.has(l))throw new Error(`Unknown field key "${l}" on ${s}.${o}`)}tn[s]=e.visitor=i,Xx[s]=e.builder=n,Ii[s]=e.fields=a,sn[s]=e.aliases=r,r.forEach(o=>{J[o]=J[o]||[],J[o].push(s)}),e.validate&&(rn[s]=e.validate),e.unionShape&&(Wx[s]=e.unionShape),Zc[s]=e}var Hq=Object.defineProperty({__proto__:null,ALIAS_KEYS:sn,BUILDER_KEYS:Xx,DEPRECATED_KEYS:tl,FLIPPED_ALIAS_KEYS:J,NODE_FIELDS:Ii,NODE_PARENT_VALIDATIONS:rn,NODE_UNION_SHAPES__PRIVATE:Wx,VISITOR_KEYS:tn,allExpandedTypes:sl,arrayOf:nn,arrayOfType:ye,assertEach:zt,assertNodeOrValueType:an,assertNodeType:C,assertOneOf:pe,assertOptionalChainStart:il,assertShape:zx,assertValueType:U,chain:ve,combine:Ne,default:at,defineAliasedType:vs,validate:Le,validateArrayOfType:le,validateDefault:nt,validateOptional:ge,validateOptionalType:se,validateType:D},Symbol.toStringTag,{value:"Module"}),ks=(s=!1)=>({unionShape:{discriminator:"computed",shapes:[{name:"computed",value:[!0],properties:{key:{validate:C("Expression")}}},{name:"nonComputed",value:[!1],properties:{key:{validate:s?C("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","PrivateName"):C("Identifier","StringLiteral","NumericLiteral","BigIntLiteral")}}}]}}),Hx={unionShape:{discriminator:"computed",shapes:[{name:"computed",value:[!0],properties:{property:{validate:C("Expression")}}},{name:"nonComputed",value:[!1],properties:{property:{validate:C("Identifier","PrivateName")}}}]}},B=vs("Standardized");B("ArrayExpression",{fields:{elements:{validate:nn(an("null","Expression","SpreadElement")),default:void 0}},visitor:["elements"],aliases:["Expression"]});B("AssignmentExpression",{fields:{operator:{validate:Ne((function(){let s=pe(...jx),e=pe("=");return function(t,i,r){(ke("Pattern",t.left)?e:s)(t,i,r)}})(),{oneOf:jx})},left:{validate:C("Identifier","MemberExpression","OptionalMemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression")},right:{validate:C("Expression")}},builder:["operator","left","right"],visitor:["left","right"],aliases:["Expression"]});B("BinaryExpression",{builder:["operator","left","right"],fields:{operator:{validate:pe(..._x)},left:{validate:(function(){let s=C("Expression"),e=C("Expression","PrivateName");return Ne(function(i,r,n){(i.operator==="in"?e:s)(i,r,n)},{oneOfNodeTypes:["Expression","PrivateName"]})})()},right:{validate:C("Expression")}},unionShape:{discriminator:"operator",shapes:[{name:"in",value:["in"],properties:{left:{validate:C("Expression","PrivateName")}}},{name:"notIn",value:_x.filter(s=>s!=="in"),properties:{left:{validate:C("Expression")}}}]},visitor:["left","right"],aliases:["Binary","Expression"]});B("InterpreterDirective",{builder:["value"],fields:{value:{validate:U("string")}}});B("Directive",{visitor:["value"],fields:{value:{validate:C("DirectiveLiteral")}}});B("DirectiveLiteral",{builder:["value"],fields:{value:{validate:U("string")}}});B("BlockStatement",{builder:["body","directives"],visitor:["directives","body"],fields:{directives:{validate:ye("Directive"),default:[]},body:le("Statement")},aliases:["Scopable","BlockParent","Block","Statement"]});B("BreakStatement",{visitor:["label"],fields:{label:{validate:C("Identifier"),optional:!0}},aliases:["Statement","Terminatorless","CompletionStatement"]});B("CallExpression",{visitor:["callee","typeArguments","arguments"],builder:["callee","arguments"],aliases:["Expression"],fields:{callee:{validate:C("Expression","Super","Import","V8IntrinsicIdentifier")},arguments:le("Expression","SpreadElement","ArgumentPlaceholder"),typeArguments:{validate:C("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0}}});B("CatchClause",{visitor:["param","body"],fields:{param:{validate:C("Identifier","ArrayPattern","ObjectPattern"),optional:!0},body:{validate:C("BlockStatement")}},aliases:["Scopable","BlockParent"]});B("ConditionalExpression",{visitor:["test","consequent","alternate"],fields:{test:{validate:C("Expression")},consequent:{validate:C("Expression")},alternate:{validate:C("Expression")}},aliases:["Expression","Conditional"]});B("ContinueStatement",{visitor:["label"],fields:{label:{validate:C("Identifier"),optional:!0}},aliases:["Statement","Terminatorless","CompletionStatement"]});B("DebuggerStatement",{aliases:["Statement"]});B("DoWhileStatement",{builder:["test","body"],visitor:["body","test"],fields:{test:{validate:C("Expression")},body:{validate:C("Statement")}},aliases:["Statement","BlockParent","Loop","While","Scopable"]});B("EmptyStatement",{aliases:["Statement"]});B("ExpressionStatement",{visitor:["expression"],fields:{expression:{validate:C("Expression")}},aliases:["Statement","ExpressionWrapper"]});B("File",{builder:["program","comments","tokens"],visitor:["program"],fields:{program:{validate:C("Program")},comments:{validate:zt(C("CommentBlock","CommentLine")),optional:!0},tokens:{validate:zt(Object.assign(()=>{},{type:"any"})),optional:!0}}});B("ForInStatement",{visitor:["left","right","body"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:C("VariableDeclaration","Identifier","MemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression")},right:{validate:C("Expression")},body:{validate:C("Statement")}}});B("ForStatement",{visitor:["init","test","update","body"],aliases:["Scopable","Statement","For","BlockParent","Loop"],fields:{init:{validate:C("VariableDeclaration","Expression"),optional:!0},test:{validate:C("Expression"),optional:!0},update:{validate:C("Expression"),optional:!0},body:{validate:C("Statement")}}});var vi=()=>({params:le("FunctionParameter"),generator:{default:!1},async:{default:!1}}),Ds=()=>({returnType:{validate:C("TypeAnnotation","TSTypeAnnotation"),optional:!0},typeParameters:{validate:C("TypeParameterDeclaration","TSTypeParameterDeclaration"),optional:!0}}),Yx=()=>({...vi(),declare:{validate:U("boolean"),optional:!0},id:{validate:C("Identifier"),optional:!0}});B("FunctionDeclaration",{builder:["id","params","body","generator","async"],visitor:["id","typeParameters","params","predicate","returnType","body"],fields:{...Yx(),...Ds(),body:{validate:C("BlockStatement")},predicate:{validate:C("FlowPredicate"),optional:!0}},aliases:["Scopable","Function","BlockParent","FunctionParent","Statement","Pureish","Declaration"],validate:(function(){let s=C("Identifier");return function(e,t,i){ke("ExportDefaultDeclaration",e)||s(i,"id",i.id)}})()});B("FunctionExpression",{inherits:"FunctionDeclaration",aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:{...vi(),...Ds(),id:{validate:C("Identifier"),optional:!0},body:{validate:C("BlockStatement")},predicate:{validate:C("FlowPredicate"),optional:!0}}});var Ls=()=>({typeAnnotation:{validate:C("TypeAnnotation","TSTypeAnnotation"),optional:!0},optional:{validate:U("boolean"),optional:!0},decorators:{validate:ye("Decorator"),optional:!0}});B("Identifier",{builder:["name"],visitor:["typeAnnotation","decorators"],aliases:["Expression","FunctionParameter","PatternLike","LVal","TSEntityName"],fields:{...Ls(),name:{validate:ve(U("string"),Ne(function(s,e,t){if(!Bq(t,!1))throw new TypeError(`"${t}" is not a valid identifier name`)},{type:"string"}))}},validate:function(s,e,t){let i=/\.(\w+)$/.exec(e.toString());if(!i)return;let[,r]=i,n={computed:!1};if(r==="property"){if(ke("MemberExpression",s,n)||ke("OptionalMemberExpression",s,n))return}else if(r==="key"){if(ke("Property",s,n)||ke("Method",s,n))return}else if(r==="exported"){if(ke("ExportSpecifier",s))return}else if(r==="imported"){if(ke("ImportSpecifier",s,{imported:t}))return}else if(r==="meta"&&ke("MetaProperty",s,{meta:t}))return;if((ss(t.name)||Ks(t.name,!1))&&t.name!=="this")throw new TypeError(`"${t.name}" is not a valid identifier`)}});B("IfStatement",{visitor:["test","consequent","alternate"],aliases:["Statement","Conditional"],fields:{test:{validate:C("Expression")},consequent:{validate:C("Statement")},alternate:{optional:!0,validate:C("Statement")}}});B("LabeledStatement",{visitor:["label","body"],aliases:["Statement"],fields:{label:{validate:C("Identifier")},body:{validate:C("Statement")}}});B("StringLiteral",{builder:["value"],fields:{value:{validate:U("string")}},aliases:["Expression","Pureish","Literal","Immutable"]});B("NumericLiteral",{builder:["value"],deprecatedAlias:"NumberLiteral",fields:{value:{validate:ve(U("number"),Ne(function(s,e,t){if(1/t<0||!Number.isFinite(t)){let i=new Error(`NumericLiterals must be non-negative finite numbers. You can use t.valueToNode(${t}) instead.`);if(!new Error().stack.includes("regenerator"))throw i}},{type:"number"}))}},aliases:["Expression","Pureish","Literal","Immutable"]});B("NullLiteral",{aliases:["Expression","Pureish","Literal","Immutable"]});B("BooleanLiteral",{builder:["value"],fields:{value:{validate:U("boolean")}},aliases:["Expression","Pureish","Literal","Immutable"]});B("RegExpLiteral",{builder:["pattern","flags"],deprecatedAlias:"RegexLiteral",aliases:["Expression","Pureish","Literal"],fields:{pattern:{validate:U("string")},flags:{validate:ve(U("string"),Ne(function(s,e,t){let i=/[^dgimsuvy]/.exec(t);if(i)throw new TypeError(`"${i[0]}" is not a valid RegExp flag`)},{type:"string"})),default:""}}});B("LogicalExpression",{builder:["operator","left","right"],visitor:["left","right"],aliases:["Binary","Expression"],fields:{operator:{validate:pe(...$x)},left:{validate:C("Expression")},right:{validate:C("Expression")}}});B("MemberExpression",{builder:["object","property","computed"],visitor:["object","property"],aliases:["Expression","LVal","PatternLike"],...Hx,fields:{object:{validate:C("Expression","Super")},property:{validate:(function(){let s=C("Identifier","PrivateName"),e=C("Expression");return Ne(function(i,r,n){(i.computed?e:s)(i,r,n)},{oneOfNodeTypes:["Expression","Identifier","PrivateName"]})})()},computed:{default:!1}}});B("NewExpression",{inherits:"CallExpression",fields:{callee:{validate:C("Expression","V8IntrinsicIdentifier")},arguments:le("Expression","SpreadElement","ArgumentPlaceholder"),typeArguments:{validate:C("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0}}});B("Program",{visitor:["directives","body"],builder:["body","directives","sourceType","interpreter"],fields:{sourceType:{validate:pe("script","module"),default:"script"},interpreter:{validate:C("InterpreterDirective"),default:null,optional:!0},directives:{validate:ye("Directive"),default:[]},body:le("Statement")},aliases:["Scopable","BlockParent","Block"]});B("ObjectExpression",{visitor:["properties"],aliases:["Expression"],fields:{properties:le("ObjectMethod","ObjectProperty","SpreadElement")}});B("ObjectMethod",{builder:["kind","key","params","body","computed","generator","async"],visitor:["decorators","key","typeParameters","params","returnType","body"],...ks(),fields:{...vi(),...Ds(),kind:{validate:pe("method","get","set")},computed:{default:!1},key:{validate:(function(){let s=C("Identifier","StringLiteral","NumericLiteral","BigIntLiteral"),e=C("Expression");return Ne(function(i,r,n){(i.computed?e:s)(i,r,n)},{oneOfNodeTypes:["Expression","Identifier","StringLiteral","NumericLiteral","BigIntLiteral"]})})()},decorators:{validate:ye("Decorator"),optional:!0},body:{validate:C("BlockStatement")}},aliases:["UserWhitespacable","Function","Scopable","BlockParent","FunctionParent","Method","ObjectMember"]});B("ObjectProperty",{builder:["key","value","computed","shorthand"],...ks(!0),fields:{computed:{default:!1},key:{validate:(function(){let s=C("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","PrivateName"),e=C("Expression");return Ne(function(i,r,n){(i.computed?e:s)(i,r,n)},{oneOfNodeTypes:["Expression","Identifier","StringLiteral","NumericLiteral","BigIntLiteral","PrivateName"]})})()},value:{validate:C("Expression","PatternLike")},shorthand:{validate:ve(U("boolean"),Ne(function(s,e,t){if(t){if(s.computed)throw new TypeError("Property shorthand of ObjectProperty cannot be true if computed is true");if(!ke("Identifier",s.key))throw new TypeError("Property shorthand of ObjectProperty cannot be true if key is not an Identifier")}},{type:"boolean"})),default:!1},decorators:{validate:ye("Decorator"),optional:!0}},visitor:["decorators","key","value"],aliases:["UserWhitespacable","Property","ObjectMember"],validate:(function(){let s=C("Identifier","Pattern","TSAsExpression","TSSatisfiesExpression","TSNonNullExpression","TSTypeAssertion"),e=C("Expression");return function(t,i,r){(ke("ObjectPattern",t)?s:e)(r,"value",r.value)}})()});B("RestElement",{visitor:["argument","typeAnnotation"],builder:["argument"],aliases:["FunctionParameter","PatternLike"],deprecatedAlias:"RestProperty",fields:{...Ls(),argument:{validate:C("Identifier","ArrayPattern","ObjectPattern","MemberExpression","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression")}},validate:function(s,e){let t=/(\w+)\[(\d+)\]/.exec(e.toString());if(!t)throw new Error("Internal Babel error: malformed key.");let[,i,r]=t;if(s[i].length>+r+1)throw new TypeError(`RestElement must be last element of ${i}`)}});B("ReturnStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:C("Expression"),optional:!0}}});B("SequenceExpression",{visitor:["expressions"],fields:{expressions:le("Expression")},aliases:["Expression"]});B("ParenthesizedExpression",{visitor:["expression"],aliases:["Expression","ExpressionWrapper"],fields:{expression:{validate:C("Expression")}}});B("SwitchCase",{visitor:["test","consequent"],fields:{test:{validate:C("Expression"),optional:!0},consequent:le("Statement")}});B("SwitchStatement",{visitor:["discriminant","cases"],aliases:["Statement","BlockParent","Scopable"],fields:{discriminant:{validate:C("Expression")},cases:le("SwitchCase")}});B("ThisExpression",{aliases:["Expression","TSEntityName"]});B("ThrowStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:C("Expression")}}});B("TryStatement",{visitor:["block","handler","finalizer"],aliases:["Statement"],fields:{block:{validate:ve(C("BlockStatement"),Ne(function(s){if(!s.handler&&!s.finalizer)throw new TypeError("TryStatement expects either a handler or finalizer, or both")},{oneOfNodeTypes:["BlockStatement"]}))},handler:{optional:!0,validate:C("CatchClause")},finalizer:{optional:!0,validate:C("BlockStatement")}}});B("UnaryExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!0},argument:{validate:C("Expression")},operator:{validate:pe(...Xq)}},visitor:["argument"],aliases:["UnaryLike","Expression"]});B("UpdateExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!1},argument:{validate:C("Identifier","MemberExpression")},operator:{validate:pe(...jq)}},visitor:["argument"],aliases:["Expression"]});B("VariableDeclaration",{builder:["kind","declarations"],visitor:["declarations"],aliases:["Statement","Declaration"],fields:{declare:{validate:U("boolean"),optional:!0},kind:{validate:pe("var","let","const","using","await using")},declarations:le("VariableDeclarator")},validate:(()=>{let s=C("Identifier","Placeholder"),e=C("Identifier","ArrayPattern","ObjectPattern","Placeholder"),t=C("Identifier","VoidPattern","Placeholder");return function(i,r,n){let{kind:a,declarations:o}=n,c=ke("ForXStatement",i,{left:n});if(c&&o.length!==1)throw new TypeError(`Exactly one VariableDeclarator is required in the VariableDeclaration of a ${i.type}`);for(let l of o)a==="const"||a==="let"||a==="var"?!c&&!l.init?s(l,"id",l.id):e(l,"id",l.id):t(l,"id",l.id)}})()});B("VariableDeclarator",{visitor:["id","init"],fields:{id:{validate:C("Identifier","ArrayPattern","ObjectPattern","VoidPattern")},definite:{optional:!0,validate:U("boolean")},init:{optional:!0,validate:C("Expression")}}});B("WhileStatement",{visitor:["test","body"],aliases:["Statement","BlockParent","Loop","While","Scopable"],fields:{test:{validate:C("Expression")},body:{validate:C("Statement")}}});B("WithStatement",{visitor:["object","body"],aliases:["Statement"],fields:{object:{validate:C("Expression")},body:{validate:C("Statement")}}});B("AssignmentPattern",{visitor:["left","right","decorators"],builder:["left","right"],aliases:["FunctionParameter","Pattern","PatternLike"],fields:{...Ls(),left:{validate:C("Identifier","ObjectPattern","ArrayPattern","MemberExpression","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression")},right:{validate:C("Expression")}}});B("ArrayPattern",{visitor:["elements","typeAnnotation"],builder:["elements"],aliases:["FunctionParameter","Pattern","PatternLike","LVal"],fields:{...Ls(),elements:{validate:ve(U("array"),zt(an("null","PatternLike")))}}});B("ArrowFunctionExpression",{builder:["params","body","async"],visitor:["typeParameters","params","predicate","returnType","body"],aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:{...vi(),generator:{default:null,optional:!0,validate:Ne((s,e,t)=>{if(t)throw new TypeError("ArrowFunctionExpression cannot be a generator")},{type:"boolean"})},...Ds(),expression:{optional:!0,validate:U("boolean")},body:{validate:C("BlockStatement","Expression")},predicate:{validate:C("FlowPredicate"),optional:!0}}});B("ClassBody",{visitor:["body"],fields:{body:le("ClassMethod","ClassPrivateMethod","ClassProperty","ClassPrivateProperty","ClassAccessorProperty","TSDeclareMethod","TSIndexSignature","StaticBlock")}});B("ClassExpression",{builder:["id","superClass","body","decorators"],visitor:["decorators","id","typeParameters","superClass","superTypeArguments","mixins","implements","body"],aliases:["Scopable","Class","Expression"],fields:{id:{validate:C("Identifier"),optional:!0},typeParameters:{validate:C("TypeParameterDeclaration","TSTypeParameterDeclaration"),optional:!0},body:{validate:C("ClassBody")},superClass:{optional:!0,validate:C("Expression")},superTypeArguments:{validate:C("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0},implements:{validate:ye("TSClassImplements","ClassImplements"),optional:!0},decorators:{validate:ye("Decorator"),optional:!0},mixins:{validate:C("InterfaceExtends"),optional:!0}}});B("ClassDeclaration",{inherits:"ClassExpression",aliases:["Scopable","Class","Statement","Declaration"],fields:{id:{validate:C("Identifier"),optional:!0},typeParameters:{validate:C("TypeParameterDeclaration","TSTypeParameterDeclaration"),optional:!0},body:{validate:C("ClassBody")},superClass:{optional:!0,validate:C("Expression")},superTypeArguments:{validate:C("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0},implements:{validate:ye("TSClassImplements","ClassImplements"),optional:!0},decorators:{validate:ye("Decorator"),optional:!0},mixins:{validate:C("InterfaceExtends"),optional:!0},declare:{validate:U("boolean"),optional:!0},abstract:{validate:U("boolean"),optional:!0}},validate:(function(){let s=C("Identifier");return function(e,t,i){ke("ExportDefaultDeclaration",e)||s(i,"id",i.id)}})()});var ki={attributes:{optional:!0,validate:ye("ImportAttribute")}};B("ExportAllDeclaration",{visitor:["source","attributes"],aliases:["Statement","Declaration","ImportOrExportDeclaration","ExportDeclaration"],fields:{source:{validate:C("StringLiteral")},exportKind:ge(pe("type","value")),...ki}});B("ExportDefaultDeclaration",{visitor:["declaration"],aliases:["Statement","Declaration","ImportOrExportDeclaration","ExportDeclaration"],fields:{declaration:D("FunctionDeclaration","ClassDeclaration","Expression","TSDeclareFunction","TSInterfaceDeclaration","EnumDeclaration"),exportKind:ge(pe("value"))}});B("ExportNamedDeclaration",{builder:["declaration","specifiers","source","attributes"],visitor:["declaration","specifiers","source","attributes"],aliases:["Statement","Declaration","ImportOrExportDeclaration","ExportDeclaration"],fields:{declaration:{optional:!0,validate:ve(C("Declaration"),Ne(function(s,e,t){if(t&&s.specifiers.length)throw new TypeError("Only declaration or specifiers is allowed on ExportNamedDeclaration");if(t&&s.source)throw new TypeError("Cannot export a declaration from a source")},{oneOfNodeTypes:["VariableDeclaration","FunctionDeclaration","ClassDeclaration","TSDeclareFunction","TSEnumDeclaration","TSImportEqualsDeclaration","TSInterfaceDeclaration","TSModuleDeclaration","TSTypeAliasDeclaration","EnumDeclaration","InterfaceDeclaration","OpaqueType","TypeAlias"]}))},...ki,specifiers:{default:[],validate:nn((function(){let s=C("ExportSpecifier","ExportDefaultSpecifier","ExportNamespaceSpecifier"),e=C("ExportSpecifier");return Ne(function(t,i,r){(t.source?s:e)(t,i,r)},{oneOfNodeTypes:["ExportSpecifier","ExportDefaultSpecifier","ExportNamespaceSpecifier"]})})())},source:{validate:C("StringLiteral"),optional:!0},exportKind:ge(pe("type","value"))}});B("ExportSpecifier",{visitor:["local","exported"],aliases:["ModuleSpecifier"],fields:{local:{validate:C("Identifier","StringLiteral")},exported:{validate:C("Identifier","StringLiteral")},exportKind:{validate:pe("type","value"),optional:!0}}});B("ForOfStatement",{visitor:["left","right","body"],builder:["left","right","body","await"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:(function(){let s=C("VariableDeclaration"),e=C("Identifier","MemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression");return Ne(function(t,i,r){ke("VariableDeclaration",r)?s(t,i,r):e(t,i,r)},{oneOfNodeTypes:["VariableDeclaration","Identifier","MemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression"]})})()},right:{validate:C("Expression")},body:{validate:C("Statement")},await:{default:!1}}});B("ImportDeclaration",{builder:["specifiers","source","attributes"],visitor:["specifiers","source","attributes"],aliases:["Statement","Declaration","ImportOrExportDeclaration"],fields:{...ki,module:{optional:!0,validate:U("boolean")},phase:{default:null,validate:pe("source","defer")},specifiers:le("ImportSpecifier","ImportDefaultSpecifier","ImportNamespaceSpecifier"),source:{validate:C("StringLiteral")},importKind:{validate:pe("type","typeof","value"),optional:!0}}});B("ImportDefaultSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:C("Identifier")}}});B("ImportNamespaceSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:C("Identifier")}}});B("ImportSpecifier",{visitor:["imported","local"],builder:["local","imported"],aliases:["ModuleSpecifier"],fields:{local:{validate:C("Identifier")},imported:{validate:C("Identifier","StringLiteral")},importKind:{validate:pe("type","typeof","value"),optional:!0}}});B("MetaProperty",{visitor:["meta","property"],aliases:["Expression"],fields:{meta:{validate:ve(C("Identifier"),Ne(function(s,e,t){let i;switch(t.name){case"function":i="sent";break;case"new":i="target";break;case"import":i="meta";break}if(!ke("Identifier",s.property,{name:i}))throw new TypeError("Unrecognised MetaProperty")},{oneOfNodeTypes:["Identifier"]}))},property:{validate:C("Identifier")}}});var rl=()=>({abstract:{validate:U("boolean"),default:!1,optional:!0},accessibility:{validate:pe("public","private","protected"),optional:!0},static:{default:!1},override:{optional:!0,validate:U("boolean"),default:!1},computed:{default:!1},optional:{validate:U("boolean"),optional:!0},key:{validate:ve((function(){let s=C("Identifier","StringLiteral","NumericLiteral","BigIntLiteral"),e=C("Expression","PrivateName");return function(t,i,r){(t.computed?e:s)(t,i,r)}})(),C("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","Expression","PrivateName"))}}),nl=(s=!0)=>({...vi(),...rl(),params:le("FunctionParameter","TSParameterProperty"),kind:{validate:pe("get","set","method","constructor"),default:"method"},access:{validate:ve(U("string"),pe("public","private","protected")),optional:!0},...s?{decorators:{validate:ye("Decorator"),optional:!0}}:{}});B("ClassMethod",{aliases:["Function","Scopable","BlockParent","FunctionParent","Method"],builder:["kind","key","params","body","computed","static","generator","async"],visitor:["decorators","key","typeParameters","params","returnType","body"],...ks(),fields:{...nl(),...Ds(),body:{validate:C("BlockStatement")}}});B("ObjectPattern",{visitor:["decorators","properties","typeAnnotation"],builder:["properties"],aliases:["FunctionParameter","Pattern","PatternLike","LVal"],fields:{...Ls(),properties:le("RestElement","ObjectProperty")}});B("SpreadElement",{visitor:["argument"],aliases:["UnaryLike"],deprecatedAlias:"SpreadProperty",fields:{argument:{validate:C("Expression")}}});B("Super");B("TaggedTemplateExpression",{visitor:["tag","typeArguments","quasi"],builder:["tag","quasi"],aliases:["Expression"],fields:{tag:{validate:C("Expression")},quasi:{validate:C("TemplateLiteral")},typeArguments:{validate:C("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0}}});B("TemplateElement",{builder:["value","tail"],fields:{value:{validate:ve(zx({raw:{validate:U("string")},cooked:{validate:U("string"),optional:!0}}),function(e){let t=e.value.raw,i=!1,r=()=>{throw new Error("Internal @babel/types error.")},{str:n,firstInvalidLoc:a}=Mx("template",t,0,0,0,{unterminated(){i=!0},strictNumericEscape:r,invalidEscapeSequence:r,numericSeparatorInEscapeSequence:r,unexpectedNumericSeparator:r,invalidDigit:r,invalidCodePoint:r});if(!i)throw new Error("Invalid raw");e.value.cooked=a?null:n})},tail:{default:!1}}});B("TemplateLiteral",{visitor:["quasis","expressions"],aliases:["Expression","Literal"],fields:{quasis:le("TemplateElement"),expressions:{validate:ve(U("array"),zt(C("Expression","TSType")),function(s,e,t){if(s.quasis.length!==t.length+1)throw new TypeError(`Number of ${s.type} quasis should be exactly one more than the number of expressions.
63
+ Expected ${t.length+1} quasis but got ${s.quasis.length}`)})}}});B("YieldExpression",{builder:["argument","delegate"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{delegate:{validate:ve(U("boolean"),Ne(function(s,e,t){if(t&&!s.argument)throw new TypeError("Property delegate of YieldExpression cannot be true if there is no argument")},{type:"boolean"})),default:!1},argument:{optional:!0,validate:C("Expression")}}});B("AwaitExpression",{builder:["argument"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{argument:{validate:C("Expression")}}});B("ImportExpression",{visitor:["source","options"],aliases:["Expression"],fields:{phase:{default:null,validate:pe("source","defer")},source:{validate:C("Expression")},options:{validate:C("Expression"),optional:!0}}});B("Import");B("BigIntLiteral",{builder:["value"],fields:{value:{validate:U("bigint")}},aliases:["Expression","Pureish","Literal","Immutable"]});B("ExportNamespaceSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:C("Identifier","StringLiteral")}}});B("OptionalMemberExpression",{builder:["object","property","computed","optional"],visitor:["object","property"],aliases:["Expression"],...Hx,fields:{object:{validate:C("Expression")},property:{validate:(function(){let s=C("Identifier","PrivateName"),e=C("Expression");return Ne(function(t,i,r){(t.computed?e:s)(t,i,r)},{oneOfNodeTypes:["Expression","PrivateName"]})})()},computed:{default:!1},optional:{validate:ve(U("boolean"),il())}}});B("OptionalCallExpression",{visitor:["callee","typeArguments","arguments"],builder:["callee","arguments","optional"],aliases:["Expression"],fields:{callee:{validate:C("Expression")},arguments:le("Expression","SpreadElement","ArgumentPlaceholder"),optional:{validate:ve(U("boolean"),il())},typeArguments:{validate:C("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0}}});B("ClassProperty",{visitor:["decorators","variance","key","typeAnnotation","value"],builder:["key","value","typeAnnotation","decorators","computed","static"],aliases:["Property"],...ks(),fields:{...rl(),value:{validate:C("Expression"),optional:!0},definite:{validate:U("boolean"),optional:!0},typeAnnotation:{validate:C("TypeAnnotation","TSTypeAnnotation"),optional:!0},decorators:{validate:ye("Decorator"),optional:!0},readonly:{validate:U("boolean"),optional:!0},declare:{validate:U("boolean"),optional:!0},variance:{validate:C("Variance"),optional:!0}}});B("ClassPrivateProperty",{visitor:["decorators","variance","key","typeAnnotation","value"],builder:["key","value","decorators","static"],aliases:["Property","Private"],fields:{key:{validate:C("PrivateName")},value:{validate:C("Expression"),optional:!0},typeAnnotation:{validate:C("TypeAnnotation","TSTypeAnnotation"),optional:!0},decorators:{validate:ye("Decorator"),optional:!0},static:{validate:U("boolean"),default:!1},readonly:{validate:U("boolean"),optional:!0},optional:{validate:U("boolean"),optional:!0},definite:{validate:U("boolean"),optional:!0},variance:{validate:C("Variance"),optional:!0}}});B("ClassPrivateMethod",{builder:["kind","key","params","body","static"],visitor:["decorators","key","typeParameters","params","returnType","body"],aliases:["Function","Scopable","BlockParent","FunctionParent","Method","Private"],fields:{...nl(),...Ds(),kind:{validate:pe("get","set","method"),default:"method"},key:{validate:C("PrivateName")},body:{validate:C("BlockStatement")}}});B("PrivateName",{visitor:["id"],aliases:["Private"],fields:{id:{validate:C("Identifier")}}});B("StaticBlock",{visitor:["body"],fields:{body:le("Statement")},aliases:["Scopable","BlockParent","FunctionParent"]});B("ImportAttribute",{visitor:["key","value"],fields:{key:{validate:C("Identifier","StringLiteral")},value:{validate:C("StringLiteral")}}});var q=vs("Flow"),al=s=>{let e=s==="DeclareClass";q(s,{builder:["id","typeParameters","extends","body"],visitor:["id","typeParameters","extends",...e?["mixins","implements"]:[],"body"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:D("Identifier"),typeParameters:se("TypeParameterDeclaration"),extends:ge(ye("InterfaceExtends")),...e?{mixins:ge(ye("InterfaceExtends")),implements:ge(ye("ClassImplements"))}:{},body:D("ObjectTypeAnnotation")}})};q("AnyTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});q("ArrayTypeAnnotation",{visitor:["elementType"],aliases:["FlowType"],fields:{elementType:D("FlowType")}});q("BooleanTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});q("BooleanLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:Le(U("boolean"))}});q("NullLiteralTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});q("ClassImplements",{visitor:["id","typeParameters"],fields:{id:D("Identifier"),typeParameters:se("TypeParameterInstantiation")}});al("DeclareClass");q("DeclareFunction",{builder:["id"],visitor:["id","predicate"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:D("Identifier"),predicate:se("FlowPredicate")}});al("DeclareInterface");q("DeclareModule",{builder:["id","body","kind"],visitor:["id","body"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:D("Identifier","StringLiteral"),body:D("BlockStatement"),kind:ge(pe("CommonJS","ES"))}});q("DeclareModuleExports",{visitor:["typeAnnotation"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{typeAnnotation:D("TypeAnnotation")}});q("DeclareTypeAlias",{visitor:["id","typeParameters","right"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:D("Identifier"),typeParameters:se("TypeParameterDeclaration"),right:D("FlowType")}});q("DeclareOpaqueType",{visitor:["id","typeParameters","supertype"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:D("Identifier"),typeParameters:se("TypeParameterDeclaration"),supertype:se("FlowType"),impltype:se("FlowType")}});q("DeclareVariable",{visitor:["id"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:D("Identifier")}});q("DeclareExportDeclaration",{visitor:["declaration","specifiers","source","attributes"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{declaration:se("Flow"),specifiers:ge(ye("ExportSpecifier","ExportNamespaceSpecifier")),source:se("StringLiteral"),default:ge(U("boolean")),...ki}});q("DeclareExportAllDeclaration",{visitor:["source","attributes"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{source:D("StringLiteral"),exportKind:ge(pe("type","value")),...ki}});q("DeclaredPredicate",{visitor:["value"],aliases:["FlowPredicate"],fields:{value:D("Expression")}});q("ExistsTypeAnnotation",{aliases:["FlowType"]});q("FunctionTypeAnnotation",{builder:["typeParameters","params","rest","returnType"],visitor:["typeParameters","this","params","rest","returnType"],aliases:["FlowType"],fields:{typeParameters:se("TypeParameterDeclaration"),params:le("FunctionTypeParam"),rest:se("FunctionTypeParam"),this:se("FunctionTypeParam"),returnType:D("FlowType")}});q("FunctionTypeParam",{visitor:["name","typeAnnotation"],fields:{name:se("Identifier"),typeAnnotation:D("FlowType"),optional:ge(U("boolean"))}});q("GenericTypeAnnotation",{visitor:["id","typeParameters"],aliases:["FlowType"],fields:{id:D("Identifier","QualifiedTypeIdentifier"),typeParameters:se("TypeParameterInstantiation")}});q("InferredPredicate",{aliases:["FlowPredicate"]});q("InterfaceExtends",{visitor:["id","typeParameters"],fields:{id:D("Identifier","QualifiedTypeIdentifier"),typeParameters:se("TypeParameterInstantiation")}});al("InterfaceDeclaration");q("InterfaceTypeAnnotation",{visitor:["extends","body"],aliases:["FlowType"],fields:{extends:ge(ye("InterfaceExtends")),body:D("ObjectTypeAnnotation")}});q("IntersectionTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:Le(ye("FlowType"))}});q("MixedTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});q("EmptyTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});q("NullableTypeAnnotation",{visitor:["typeAnnotation"],aliases:["FlowType"],fields:{typeAnnotation:D("FlowType")}});q("NumberLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:Le(U("number"))}});q("BigIntLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:Le(U("bigint"))}});q("NumberTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});q("ObjectTypeAnnotation",{visitor:["properties","indexers","callProperties","internalSlots"],aliases:["FlowType"],builder:["properties","indexers","callProperties","internalSlots","exact"],fields:{properties:Le(ye("ObjectTypeProperty","ObjectTypeSpreadProperty")),indexers:{validate:ye("ObjectTypeIndexer"),optional:!1,default:[]},callProperties:{validate:ye("ObjectTypeCallProperty"),optional:!1,default:[]},internalSlots:{validate:ye("ObjectTypeInternalSlot"),optional:!1,default:[]},exact:{validate:U("boolean"),default:!1},inexact:ge(U("boolean"))}});q("ObjectTypeInternalSlot",{visitor:["id","value"],builder:["id","value","optional","static","method"],aliases:["UserWhitespacable"],fields:{id:D("Identifier"),value:D("FlowType"),optional:Le(U("boolean")),static:Le(U("boolean")),method:Le(U("boolean"))}});q("ObjectTypeCallProperty",{visitor:["value"],aliases:["UserWhitespacable"],fields:{value:D("FlowType"),static:nt(U("boolean"),!1)}});q("ObjectTypeIndexer",{visitor:["variance","id","key","value"],builder:["id","key","value","variance"],aliases:["UserWhitespacable"],fields:{id:se("Identifier"),key:D("FlowType"),value:D("FlowType"),static:nt(U("boolean"),!1),variance:se("Variance")}});q("ObjectTypeProperty",{visitor:["key","value","variance"],aliases:["UserWhitespacable"],fields:{key:D("Identifier","StringLiteral","NumericLiteral"),value:D("FlowType"),kind:{validate:pe("init","get","set"),default:"init",optional:!1},static:nt(U("boolean"),!1),proto:nt(U("boolean"),!1),optional:nt(U("boolean"),!1),variance:se("Variance"),method:nt(U("boolean"),!1)}});q("ObjectTypeSpreadProperty",{visitor:["argument"],aliases:["UserWhitespacable"],fields:{argument:D("FlowType")}});q("OpaqueType",{visitor:["id","typeParameters","supertype","impltype"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:D("Identifier"),typeParameters:se("TypeParameterDeclaration"),supertype:se("FlowType"),impltype:D("FlowType")}});q("QualifiedTypeIdentifier",{visitor:["qualification","id"],builder:["id","qualification"],fields:{id:D("Identifier"),qualification:D("Identifier","QualifiedTypeIdentifier")}});q("StringLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:Le(U("string"))}});q("StringTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});q("SymbolTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});q("ThisTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});q("TupleTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:Le(ye("FlowType"))}});q("TypeofTypeAnnotation",{visitor:["argument"],aliases:["FlowType"],fields:{argument:D("FlowType","Identifier")}});q("TypeAlias",{visitor:["id","typeParameters","right"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:D("Identifier"),typeParameters:se("TypeParameterDeclaration"),right:D("FlowType")}});q("TypeAnnotation",{visitor:["typeAnnotation"],fields:{typeAnnotation:D("FlowType","Identifier")}});q("TypeCastExpression",{visitor:["expression","typeAnnotation"],aliases:["ExpressionWrapper","Expression"],fields:{expression:D("Expression"),typeAnnotation:D("TypeAnnotation")}});q("TypeParameter",{builder:["name","bound","default","variance"],visitor:["bound","default","variance"],fields:{name:Le(U("string")),bound:se("TypeAnnotation"),default:se("FlowType"),variance:se("Variance")}});q("TypeParameterDeclaration",{visitor:["params"],fields:{params:Le(ye("TypeParameter"))}});q("TypeParameterInstantiation",{visitor:["params"],fields:{params:Le(ye("FlowType"))}});q("UnionTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:Le(ye("FlowType"))}});q("Variance",{builder:["kind"],fields:{kind:Le(pe("minus","plus"))}});q("VoidTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});q("EnumDeclaration",{aliases:["Statement","Declaration"],visitor:["id","body"],fields:{id:D("Identifier"),body:D("EnumBooleanBody","EnumNumberBody","EnumStringBody","EnumSymbolBody")}});var ol={explicitType:nt(U("boolean"),!1),hasUnknownMembers:nt(U("boolean"),!1)};q("EnumBooleanBody",{aliases:["EnumBody"],visitor:["members"],fields:{...ol,members:le("EnumBooleanMember")}});q("EnumNumberBody",{aliases:["EnumBody"],visitor:["members"],fields:{...ol,members:le("EnumNumberMember")}});q("EnumStringBody",{aliases:["EnumBody"],visitor:["members"],fields:{...ol,members:le("EnumStringMember","EnumDefaultedMember")}});q("EnumSymbolBody",{aliases:["EnumBody"],visitor:["members"],fields:{members:le("EnumDefaultedMember"),hasUnknownMembers:nt(U("boolean"),!1)}});q("EnumBooleanMember",{aliases:["EnumMember"],visitor:["id","init"],fields:{id:D("Identifier"),init:D("BooleanLiteral")}});q("EnumNumberMember",{aliases:["EnumMember"],visitor:["id","init"],fields:{id:D("Identifier"),init:D("NumericLiteral")}});q("EnumStringMember",{aliases:["EnumMember"],visitor:["id","init"],fields:{id:D("Identifier"),init:D("StringLiteral")}});q("EnumDefaultedMember",{aliases:["EnumMember"],visitor:["id"],fields:{id:D("Identifier")}});q("IndexedAccessType",{visitor:["objectType","indexType"],aliases:["FlowType"],fields:{objectType:D("FlowType"),indexType:D("FlowType")}});q("OptionalIndexedAccessType",{visitor:["objectType","indexType"],aliases:["FlowType"],fields:{objectType:D("FlowType"),indexType:D("FlowType"),optional:nt(U("boolean"),!1)}});var Ke=vs("JSX");Ke("JSXAttribute",{visitor:["name","value"],aliases:["Immutable"],fields:{name:{validate:C("JSXIdentifier","JSXNamespacedName")},value:{optional:!0,validate:C("JSXElement","JSXFragment","StringLiteral","JSXExpressionContainer")}}});Ke("JSXClosingElement",{visitor:["name"],aliases:["Immutable"],fields:{name:{validate:C("JSXIdentifier","JSXMemberExpression","JSXNamespacedName")}}});Ke("JSXElement",{builder:["openingElement","closingElement","children"],visitor:["openingElement","children","closingElement"],aliases:["Immutable","Expression"],fields:{openingElement:{validate:C("JSXOpeningElement")},closingElement:{optional:!0,validate:C("JSXClosingElement")},children:le("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement","JSXFragment")}});Ke("JSXEmptyExpression",{});Ke("JSXExpressionContainer",{visitor:["expression"],aliases:["Immutable"],fields:{expression:{validate:C("Expression","JSXEmptyExpression")}}});Ke("JSXSpreadChild",{visitor:["expression"],aliases:["Immutable"],fields:{expression:{validate:C("Expression")}}});Ke("JSXIdentifier",{builder:["name"],fields:{name:{validate:U("string")}}});Ke("JSXMemberExpression",{visitor:["object","property"],fields:{object:{validate:C("JSXMemberExpression","JSXIdentifier")},property:{validate:C("JSXIdentifier")}}});Ke("JSXNamespacedName",{visitor:["namespace","name"],fields:{namespace:{validate:C("JSXIdentifier")},name:{validate:C("JSXIdentifier")}}});Ke("JSXOpeningElement",{builder:["name","attributes","selfClosing"],visitor:["name","typeArguments","attributes"],aliases:["Immutable"],fields:{name:{validate:C("JSXIdentifier","JSXMemberExpression","JSXNamespacedName")},selfClosing:{default:!1},attributes:le("JSXAttribute","JSXSpreadAttribute"),typeArguments:{validate:C("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0}}});Ke("JSXSpreadAttribute",{visitor:["argument"],fields:{argument:{validate:C("Expression")}}});Ke("JSXText",{aliases:["Immutable"],builder:["value"],fields:{value:{validate:U("string")}}});Ke("JSXFragment",{builder:["openingFragment","closingFragment","children"],visitor:["openingFragment","children","closingFragment"],aliases:["Immutable","Expression"],fields:{openingFragment:{validate:C("JSXOpeningFragment")},closingFragment:{validate:C("JSXClosingFragment")},children:le("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement","JSXFragment")}});Ke("JSXOpeningFragment",{aliases:["Immutable"]});Ke("JSXClosingFragment",{aliases:["Immutable"]});var Gx=["Identifier","StringLiteral","Expression","Statement","Declaration","BlockStatement","ClassBody","Pattern"],Qr={Declaration:["Statement"],Pattern:["PatternLike","LVal"]};for(let s of Gx){let e=sn[s];e?.length&&(Qr[s]=e)}var Gc={};Object.keys(Qr).forEach(s=>{Qr[s].forEach(e=>{Object.hasOwn(Gc,e)||(Gc[e]=[]),Gc[e].push(s)})});var Qx=vs("Miscellaneous");Qx("Placeholder",{visitor:[],builder:["expectedNode","name"],fields:{name:{validate:C("Identifier")},expectedNode:{validate:pe(...Gx)},...Ls()}});Qx("V8IntrinsicIdentifier",{builder:["name"],fields:{name:{validate:U("string")}}});at("ArgumentPlaceholder",{});at("BindExpression",{visitor:["object","callee"],aliases:["Expression"],fields:{object:{validate:an("null","Expression")},callee:{validate:C("Expression")}}});at("ClassAccessorProperty",{visitor:["decorators","key","typeAnnotation","value"],builder:["key","value","typeAnnotation","decorators","computed","static"],aliases:["Property","Accessor"],...ks(!0),fields:{...rl(),key:{validate:ve((function(){let s=C("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","PrivateName"),e=C("Expression");return function(t,i,r){(t.computed?e:s)(t,i,r)}})(),C("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","Expression","PrivateName"))},value:{validate:C("Expression"),optional:!0},definite:{validate:U("boolean"),optional:!0},typeAnnotation:{validate:C("TypeAnnotation","TSTypeAnnotation"),optional:!0},decorators:{validate:ye("Decorator"),optional:!0},readonly:{validate:U("boolean"),optional:!0},declare:{validate:U("boolean"),optional:!0},variance:{validate:C("Variance"),optional:!0}}});at("Decorator",{visitor:["expression"],fields:{expression:{validate:C("Expression")}}});at("DoExpression",{visitor:["body"],builder:["body","async"],aliases:["Expression"],fields:{body:{validate:C("BlockStatement")},async:{validate:U("boolean"),default:!1}}});at("ExportDefaultSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:C("Identifier")}}});at("ModuleExpression",{visitor:["body"],fields:{body:{validate:C("Program")}},aliases:["Expression"]});at("TopicReference",{aliases:["Expression"]});at("VoidPattern",{aliases:["Pattern","PatternLike","FunctionParameter"]});var W=vs("TypeScript"),Ge=U("boolean"),Zx=()=>({returnType:{validate:C("TSTypeAnnotation"),optional:!0},typeParameters:{validate:C("TSTypeParameterDeclaration"),optional:!0}});W("TSParameterProperty",{aliases:[],builder:["parameter"],visitor:["decorators","parameter"],fields:{accessibility:{validate:pe("public","private","protected"),optional:!0},readonly:{validate:U("boolean"),optional:!0},parameter:{validate:C("Identifier","AssignmentPattern")},override:{validate:U("boolean"),optional:!0},decorators:{validate:ye("Decorator"),optional:!0}}});W("TSDeclareFunction",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","params","returnType"],fields:{...Yx(),...Zx()}});W("TSDeclareMethod",{visitor:["key","typeParameters","params","returnType"],...ks(!0),fields:{...nl(!1),...Zx()}});W("TSQualifiedName",{aliases:["TSEntityName"],visitor:["left","right"],fields:{left:D("TSEntityName"),right:D("Identifier")}});var on=()=>({typeParameters:se("TSTypeParameterDeclaration"),params:le("ArrayPattern","Identifier","ObjectPattern","RestElement"),returnType:se("TSTypeAnnotation")}),eg={aliases:["TSTypeElement"],visitor:["typeParameters","params","returnType"],fields:on()};W("TSCallSignatureDeclaration",eg);W("TSConstructSignatureDeclaration",eg);var tg=()=>({key:D("Expression"),computed:{default:!1},optional:ge(Ge)});W("TSPropertySignature",{aliases:["TSTypeElement"],visitor:["key","typeAnnotation"],fields:{...tg(),readonly:ge(Ge),typeAnnotation:se("TSTypeAnnotation"),kind:{optional:!0,validate:pe("get","set")}}});W("TSMethodSignature",{aliases:["TSTypeElement"],visitor:["key","typeParameters","params","returnType"],fields:{...on(),...tg(),kind:{validate:pe("method","get","set"),default:"method"}}});W("TSIndexSignature",{aliases:["TSTypeElement"],visitor:["parameters","typeAnnotation"],fields:{readonly:ge(Ge),static:ge(Ge),parameters:le("Identifier"),typeAnnotation:se("TSTypeAnnotation")}});var Yq=["TSAnyKeyword","TSBooleanKeyword","TSBigIntKeyword","TSIntrinsicKeyword","TSNeverKeyword","TSNullKeyword","TSNumberKeyword","TSObjectKeyword","TSStringKeyword","TSSymbolKeyword","TSUndefinedKeyword","TSUnknownKeyword","TSVoidKeyword"];for(let s of Yq)W(s,{aliases:["TSType","TSBaseType"],visitor:[],fields:{}});W("TSThisType",{aliases:["TSType","TSBaseType"],visitor:[],fields:{}});var sg={aliases:["TSType"],visitor:["typeParameters","params","returnType"]};W("TSFunctionType",{...sg,fields:on()});W("TSConstructorType",{...sg,fields:{...on(),abstract:ge(Ge)}});W("TSTypeReference",{aliases:["TSType"],visitor:["typeName","typeArguments"],fields:{typeName:D("TSEntityName"),typeArguments:se("TSTypeParameterInstantiation")}});W("TSTypePredicate",{aliases:["TSType"],visitor:["parameterName","typeAnnotation"],builder:["parameterName","typeAnnotation","asserts"],fields:{parameterName:D("Identifier","TSThisType"),typeAnnotation:se("TSTypeAnnotation"),asserts:ge(Ge)}});W("TSTypeQuery",{aliases:["TSType"],visitor:["exprName","typeArguments"],fields:{exprName:D("TSEntityName","TSImportType"),typeArguments:se("TSTypeParameterInstantiation")}});W("TSTypeLiteral",{aliases:["TSType"],visitor:["members"],fields:{members:le("TSTypeElement")}});W("TSArrayType",{aliases:["TSType"],visitor:["elementType"],fields:{elementType:D("TSType")}});W("TSTupleType",{aliases:["TSType"],visitor:["elementTypes"],fields:{elementTypes:le("TSType","TSNamedTupleMember")}});W("TSOptionalType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:D("TSType")}});W("TSRestType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:D("TSType")}});W("TSNamedTupleMember",{aliases:["TSType"],visitor:["label","elementType"],builder:["label","elementType","optional"],fields:{label:D("Identifier"),optional:{validate:Ge,default:!1},elementType:D("TSType")}});var ig={aliases:["TSType"],visitor:["types"],fields:{types:le("TSType")}};W("TSUnionType",ig);W("TSIntersectionType",ig);W("TSConditionalType",{aliases:["TSType"],visitor:["checkType","extendsType","trueType","falseType"],fields:{checkType:D("TSType"),extendsType:D("TSType"),trueType:D("TSType"),falseType:D("TSType")}});W("TSInferType",{aliases:["TSType"],visitor:["typeParameter"],fields:{typeParameter:D("TSTypeParameter")}});W("TSParenthesizedType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:D("TSType")}});W("TSTypeOperator",{aliases:["TSType"],visitor:["typeAnnotation"],builder:["typeAnnotation","operator"],fields:{operator:{validate:pe("keyof","readonly","unique"),default:void 0},typeAnnotation:D("TSType")}});W("TSIndexedAccessType",{aliases:["TSType"],visitor:["objectType","indexType"],fields:{objectType:D("TSType"),indexType:D("TSType")}});W("TSMappedType",{aliases:["TSType"],visitor:["key","constraint","nameType","typeAnnotation"],builder:["key","constraint","nameType","typeAnnotation"],fields:{key:D("Identifier"),constraint:D("TSType"),readonly:ge(pe(!0,!1,"+","-")),optional:ge(pe(!0,!1,"+","-")),typeAnnotation:se("TSType"),nameType:se("TSType")}});W("TSTemplateLiteralType",{aliases:["TSType","TSBaseType"],visitor:["quasis","types"],fields:{quasis:le("TemplateElement"),types:{validate:ve(U("array"),zt(C("TSType")),function(s,e,t){if(s.quasis.length!==t.length+1)throw new TypeError(`Number of ${s.type} quasis should be exactly one more than the number of types.
64
+ Expected ${t.length+1} quasis but got ${s.quasis.length}`)})}}});W("TSLiteralType",{aliases:["TSType","TSBaseType"],visitor:["literal"],fields:{literal:{validate:(function(){let s=C("NumericLiteral","BigIntLiteral"),e=pe("-"),t=C("NumericLiteral","StringLiteral","BooleanLiteral","BigIntLiteral","TemplateLiteral");return Ne(function(n,a,o){ke("UnaryExpression",o)?(e(o,"operator",o.operator),s(o,"argument",o.argument)):t(n,a,o)},{oneOfNodeTypes:["NumericLiteral","StringLiteral","BooleanLiteral","BigIntLiteral","TemplateLiteral","UnaryExpression"]})})()}}});W("TSClassImplements",{aliases:["TSType"],visitor:["expression","typeArguments"],fields:{expression:D("Expression"),typeArguments:se("TSTypeParameterInstantiation")}});W("TSInterfaceHeritage",{aliases:["TSType"],visitor:["expression","typeArguments"],fields:{expression:D("Expression"),typeArguments:se("TSTypeParameterInstantiation")}});W("TSInterfaceDeclaration",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","extends","body"],fields:{declare:ge(Ge),id:D("Identifier"),typeParameters:se("TSTypeParameterDeclaration"),extends:ge(ye("TSInterfaceHeritage")),body:D("TSInterfaceBody")}});W("TSInterfaceBody",{visitor:["body"],fields:{body:le("TSTypeElement")}});W("TSTypeAliasDeclaration",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","typeAnnotation"],fields:{declare:ge(Ge),id:D("Identifier"),typeParameters:se("TSTypeParameterDeclaration"),typeAnnotation:D("TSType")}});W("TSInstantiationExpression",{aliases:["Expression"],visitor:["expression","typeArguments"],fields:{expression:D("Expression"),typeArguments:se("TSTypeParameterInstantiation")}});var rg={aliases:["Expression","LVal","PatternLike"],visitor:["expression","typeAnnotation"],fields:{expression:D("Expression"),typeAnnotation:D("TSType")}};W("TSAsExpression",rg);W("TSSatisfiesExpression",rg);W("TSTypeAssertion",{aliases:["Expression","LVal","PatternLike"],visitor:["typeAnnotation","expression"],fields:{typeAnnotation:D("TSType"),expression:D("Expression")}});W("TSEnumBody",{visitor:["members"],fields:{members:le("TSEnumMember")}});W("TSEnumDeclaration",{aliases:["Statement","Declaration"],visitor:["id","body"],fields:{declare:ge(Ge),const:ge(Ge),id:D("Identifier"),body:D("TSEnumBody")}});W("TSEnumMember",{visitor:["id","initializer"],fields:{id:D("Identifier","StringLiteral"),initializer:se("Expression")}});W("TSModuleDeclaration",{aliases:["Statement","Declaration"],visitor:["id","body"],fields:{kind:{validate:pe("global","namespace","module"),default:"namespace"},declare:ge(Ge),id:{validate:ve(C("TSEntityName","StringLiteral"),Ne(function(s,e,t){if(s.kind==="namespace"&&ke("StringLiteral",t))throw new TypeError("TSModuleDeclaration of kind 'namespace' cannot have a StringLiteral id.")},{oneOfNodeTypes:["TSEntityName","StringLiteral"]}))},body:D("TSModuleBlock")}});W("TSModuleBlock",{aliases:["Scopable","Block","BlockParent","FunctionParent"],visitor:["body"],fields:{body:le("Statement")}});W("TSImportType",{aliases:["TSType"],builder:["source","qualifier","typeArguments"],visitor:["source","options","qualifier","typeArguments"],fields:{source:D("StringLiteral"),qualifier:se("TSEntityName"),typeArguments:se("TSTypeParameterInstantiation"),options:{validate:C("ObjectExpression"),optional:!0}}});W("TSImportEqualsDeclaration",{aliases:["Statement","Declaration"],visitor:["id","moduleReference"],fields:{id:D("Identifier"),moduleReference:D("TSEntityName","TSExternalModuleReference"),importKind:{validate:pe("type","value"),optional:!0}}});W("TSExternalModuleReference",{visitor:["expression"],fields:{expression:D("StringLiteral")}});W("TSNonNullExpression",{aliases:["Expression","LVal","PatternLike"],visitor:["expression"],fields:{expression:D("Expression")}});W("TSExportAssignment",{aliases:["Statement"],visitor:["expression"],fields:{expression:D("Expression")}});W("TSNamespaceExportDeclaration",{aliases:["Statement"],visitor:["id"],fields:{id:D("Identifier")}});W("TSTypeAnnotation",{visitor:["typeAnnotation"],fields:{typeAnnotation:{validate:C("TSType")}}});W("TSTypeParameterInstantiation",{visitor:["params"],fields:{params:le("TSType")}});W("TSTypeParameterDeclaration",{visitor:["params"],fields:{params:le("TSTypeParameter")}});W("TSTypeParameter",{builder:["constraint","default","name"],visitor:["name","constraint","default"],fields:{name:{validate:C("Identifier")},in:{validate:U("boolean"),optional:!0},out:{validate:U("boolean"),optional:!0},const:{validate:U("boolean"),optional:!0},constraint:{validate:C("TSType"),optional:!0},default:{validate:C("TSType"),optional:!0}}});var Rx={ModuleDeclaration:"ImportOrExportDeclaration"};Object.keys(Rx).forEach(s=>{J[s]=J[Rx[s]]});for(let{types:s,set:e}of sl)for(let t of s){let i=J[t];i?i.forEach(e.add,e):e.add(t)}var $H=[].concat(Object.keys(tn),Object.keys(J),Object.keys(tl));function Gq(s,e,t){if(!s)return;let i=Ii[s.type];if(!i)return;let r=i[e];cl(s,e,t,r),Ns(s,e,t)}function Qq(s,e,t,i,r){if(s?.validate&&!(s.optional&&i==null)&&(s.validate(e,t,i),r)){let n=i.type;if(n==null)return;rn[n]?.(e,t,i)}}function cl(s,e,t,i){i?.validate&&(i.optional&&t==null||i.validate(s,e,t))}function Ns(s,e,t){let i=t?.type;i!=null&&rn[i]?.(s,e,t)}var Zq=Object.defineProperty({__proto__:null,default:Gq,validateChild:Ns,validateField:cl,validateInternal:Qq},Symbol.toStringTag,{value:"Module"}),{validateInternal:h}=Zq,{NODE_FIELDS:P}=Hq;function e$(s){let e={type:"ArrayExpression",elements:s},t=P.ArrayExpression;return h(t.elements,e,"elements",s,1),e}function t$(s,e,t){let i={type:"AssignmentExpression",operator:s,left:e,right:t},r=P.AssignmentExpression;return h(r.operator,i,"operator",s),h(r.left,i,"left",e,1),h(r.right,i,"right",t,1),i}function s$(s,e,t){let i={type:"BinaryExpression",operator:s,left:e,right:t},r=P.BinaryExpression;return h(r.operator,i,"operator",s),h(r.left,i,"left",e,1),h(r.right,i,"right",t,1),i}function i$(s){let e={type:"InterpreterDirective",value:s},t=P.InterpreterDirective;return h(t.value,e,"value",s),e}function r$(s){let e={type:"Directive",value:s},t=P.Directive;return h(t.value,e,"value",s,1),e}function n$(s){let e={type:"DirectiveLiteral",value:s},t=P.DirectiveLiteral;return h(t.value,e,"value",s),e}function a$(s,e=[]){let t={type:"BlockStatement",body:s,directives:e},i=P.BlockStatement;return h(i.body,t,"body",s,1),h(i.directives,t,"directives",e,1),t}function o$(s=null){let e={type:"BreakStatement",label:s},t=P.BreakStatement;return h(t.label,e,"label",s,1),e}function c$(s,e){let t={type:"CallExpression",callee:s,arguments:e},i=P.CallExpression;return h(i.callee,t,"callee",s,1),h(i.arguments,t,"arguments",e,1),t}function l$(s=null,e){let t={type:"CatchClause",param:s,body:e},i=P.CatchClause;return h(i.param,t,"param",s,1),h(i.body,t,"body",e,1),t}function u$(s,e,t){let i={type:"ConditionalExpression",test:s,consequent:e,alternate:t},r=P.ConditionalExpression;return h(r.test,i,"test",s,1),h(r.consequent,i,"consequent",e,1),h(r.alternate,i,"alternate",t,1),i}function p$(s=null){let e={type:"ContinueStatement",label:s},t=P.ContinueStatement;return h(t.label,e,"label",s,1),e}function h$(){return{type:"DebuggerStatement"}}function f$(s,e){let t={type:"DoWhileStatement",test:s,body:e},i=P.DoWhileStatement;return h(i.test,t,"test",s,1),h(i.body,t,"body",e,1),t}function d$(){return{type:"EmptyStatement"}}function m$(s){let e={type:"ExpressionStatement",expression:s},t=P.ExpressionStatement;return h(t.expression,e,"expression",s,1),e}function y$(s,e=null,t=null){let i={type:"File",program:s,comments:e,tokens:t},r=P.File;return h(r.program,i,"program",s,1),h(r.comments,i,"comments",e,1),h(r.tokens,i,"tokens",t),i}function T$(s,e,t){let i={type:"ForInStatement",left:s,right:e,body:t},r=P.ForInStatement;return h(r.left,i,"left",s,1),h(r.right,i,"right",e,1),h(r.body,i,"body",t,1),i}function S$(s=null,e=null,t=null,i){let r={type:"ForStatement",init:s,test:e,update:t,body:i},n=P.ForStatement;return h(n.init,r,"init",s,1),h(n.test,r,"test",e,1),h(n.update,r,"update",t,1),h(n.body,r,"body",i,1),r}function x$(s=null,e,t,i=!1,r=!1){let n={type:"FunctionDeclaration",id:s,params:e,body:t,generator:i,async:r},a=P.FunctionDeclaration;return h(a.id,n,"id",s,1),h(a.params,n,"params",e,1),h(a.body,n,"body",t,1),h(a.generator,n,"generator",i),h(a.async,n,"async",r),n}function g$(s=null,e,t,i=!1,r=!1){let n={type:"FunctionExpression",id:s,params:e,body:t,generator:i,async:r},a=P.FunctionExpression;return h(a.id,n,"id",s,1),h(a.params,n,"params",e,1),h(a.body,n,"body",t,1),h(a.generator,n,"generator",i),h(a.async,n,"async",r),n}function Ht(s){let e={type:"Identifier",name:s},t=P.Identifier;return h(t.name,e,"name",s),e}function P$(s,e,t=null){let i={type:"IfStatement",test:s,consequent:e,alternate:t},r=P.IfStatement;return h(r.test,i,"test",s,1),h(r.consequent,i,"consequent",e,1),h(r.alternate,i,"alternate",t,1),i}function b$(s,e){let t={type:"LabeledStatement",label:s,body:e},i=P.LabeledStatement;return h(i.label,t,"label",s,1),h(i.body,t,"body",e,1),t}function ll(s){let e={type:"StringLiteral",value:s},t=P.StringLiteral;return h(t.value,e,"value",s),e}function ng(s){let e={type:"NumericLiteral",value:s},t=P.NumericLiteral;return h(t.value,e,"value",s),e}function E$(){return{type:"NullLiteral"}}function A$(s){let e={type:"BooleanLiteral",value:s},t=P.BooleanLiteral;return h(t.value,e,"value",s),e}function ag(s,e=""){let t={type:"RegExpLiteral",pattern:s,flags:e},i=P.RegExpLiteral;return h(i.pattern,t,"pattern",s),h(i.flags,t,"flags",e),t}function C$(s,e,t){let i={type:"LogicalExpression",operator:s,left:e,right:t},r=P.LogicalExpression;return h(r.operator,i,"operator",s),h(r.left,i,"left",e,1),h(r.right,i,"right",t,1),i}function I$(s,e,t=!1){let i={type:"MemberExpression",object:s,property:e,computed:t},r=P.MemberExpression;return h(r.object,i,"object",s,1),h(r.property,i,"property",e,1),h(r.computed,i,"computed",t),i}function w$(s,e){let t={type:"NewExpression",callee:s,arguments:e},i=P.NewExpression;return h(i.callee,t,"callee",s,1),h(i.arguments,t,"arguments",e,1),t}function N$(s,e=[],t="script",i=null){let r={type:"Program",body:s,directives:e,sourceType:t,interpreter:i},n=P.Program;return h(n.body,r,"body",s,1),h(n.directives,r,"directives",e,1),h(n.sourceType,r,"sourceType",t),h(n.interpreter,r,"interpreter",i,1),r}function ul(s){let e={type:"ObjectExpression",properties:s},t=P.ObjectExpression;return h(t.properties,e,"properties",s,1),e}function v$(s,e,t,i,r=!1,n=!1,a=!1){let o={type:"ObjectMethod",kind:s,key:e,params:t,body:i,computed:r,generator:n,async:a},c=P.ObjectMethod;return h(c.kind,o,"kind",s),h(c.key,o,"key",e,1),h(c.params,o,"params",t,1),h(c.body,o,"body",i,1),h(c.computed,o,"computed",r),h(c.generator,o,"generator",n),h(c.async,o,"async",a),o}function cn(s,e,t=!1,i=!1){let r={type:"ObjectProperty",key:s,value:e,computed:t,shorthand:i},n=P.ObjectProperty;return h(n.key,r,"key",s,1),h(n.value,r,"value",e,1),h(n.computed,r,"computed",t),h(n.shorthand,r,"shorthand",i),r}function og(s){let e={type:"RestElement",argument:s},t=P.RestElement;return h(t.argument,e,"argument",s,1),e}function k$(s=null){let e={type:"ReturnStatement",argument:s},t=P.ReturnStatement;return h(t.argument,e,"argument",s,1),e}function D$(s){let e={type:"SequenceExpression",expressions:s},t=P.SequenceExpression;return h(t.expressions,e,"expressions",s,1),e}function L$(s){let e={type:"ParenthesizedExpression",expression:s},t=P.ParenthesizedExpression;return h(t.expression,e,"expression",s,1),e}function O$(s=null,e){let t={type:"SwitchCase",test:s,consequent:e},i=P.SwitchCase;return h(i.test,t,"test",s,1),h(i.consequent,t,"consequent",e,1),t}function M$(s,e){let t={type:"SwitchStatement",discriminant:s,cases:e},i=P.SwitchStatement;return h(i.discriminant,t,"discriminant",s,1),h(i.cases,t,"cases",e,1),t}function F$(){return{type:"ThisExpression"}}function B$(s){let e={type:"ThrowStatement",argument:s},t=P.ThrowStatement;return h(t.argument,e,"argument",s,1),e}function _$(s,e=null,t=null){let i={type:"TryStatement",block:s,handler:e,finalizer:t},r=P.TryStatement;return h(r.block,i,"block",s,1),h(r.handler,i,"handler",e,1),h(r.finalizer,i,"finalizer",t,1),i}function j$(s,e,t=!0){let i={type:"UnaryExpression",operator:s,argument:e,prefix:t},r=P.UnaryExpression;return h(r.operator,i,"operator",s),h(r.argument,i,"argument",e,1),h(r.prefix,i,"prefix",t),i}function R$(s,e,t=!1){let i={type:"UpdateExpression",operator:s,argument:e,prefix:t},r=P.UpdateExpression;return h(r.operator,i,"operator",s),h(r.argument,i,"argument",e,1),h(r.prefix,i,"prefix",t),i}function pl(s,e){let t={type:"VariableDeclaration",kind:s,declarations:e},i=P.VariableDeclaration;return h(i.kind,t,"kind",s),h(i.declarations,t,"declarations",e,1),t}function hl(s,e=null){let t={type:"VariableDeclarator",id:s,init:e},i=P.VariableDeclarator;return h(i.id,t,"id",s,1),h(i.init,t,"init",e,1),t}function U$(s,e){let t={type:"WhileStatement",test:s,body:e},i=P.WhileStatement;return h(i.test,t,"test",s,1),h(i.body,t,"body",e,1),t}function V$(s,e){let t={type:"WithStatement",object:s,body:e},i=P.WithStatement;return h(i.object,t,"object",s,1),h(i.body,t,"body",e,1),t}function K$(s,e){let t={type:"AssignmentPattern",left:s,right:e},i=P.AssignmentPattern;return h(i.left,t,"left",s,1),h(i.right,t,"right",e,1),t}function q$(s){let e={type:"ArrayPattern",elements:s},t=P.ArrayPattern;return h(t.elements,e,"elements",s,1),e}function $$(s,e,t=!1){let i={type:"ArrowFunctionExpression",params:s,body:e,async:t},r=P.ArrowFunctionExpression;return h(r.params,i,"params",s,1),h(r.body,i,"body",e,1),h(r.async,i,"async",t),i}function J$(s){let e={type:"ClassBody",body:s},t=P.ClassBody;return h(t.body,e,"body",s,1),e}function X$(s=null,e=null,t,i=null){let r={type:"ClassExpression",id:s,superClass:e,body:t,decorators:i},n=P.ClassExpression;return h(n.id,r,"id",s,1),h(n.superClass,r,"superClass",e,1),h(n.body,r,"body",t,1),h(n.decorators,r,"decorators",i,1),r}function W$(s=null,e=null,t,i=null){let r={type:"ClassDeclaration",id:s,superClass:e,body:t,decorators:i},n=P.ClassDeclaration;return h(n.id,r,"id",s,1),h(n.superClass,r,"superClass",e,1),h(n.body,r,"body",t,1),h(n.decorators,r,"decorators",i,1),r}function z$(s,e=null){let t={type:"ExportAllDeclaration",source:s,attributes:e},i=P.ExportAllDeclaration;return h(i.source,t,"source",s,1),h(i.attributes,t,"attributes",e,1),t}function H$(s){let e={type:"ExportDefaultDeclaration",declaration:s},t=P.ExportDefaultDeclaration;return h(t.declaration,e,"declaration",s,1),e}function Y$(s=null,e=[],t=null,i=null){let r={type:"ExportNamedDeclaration",declaration:s,specifiers:e,source:t,attributes:i},n=P.ExportNamedDeclaration;return h(n.declaration,r,"declaration",s,1),h(n.specifiers,r,"specifiers",e,1),h(n.source,r,"source",t,1),h(n.attributes,r,"attributes",i,1),r}function G$(s,e){let t={type:"ExportSpecifier",local:s,exported:e},i=P.ExportSpecifier;return h(i.local,t,"local",s,1),h(i.exported,t,"exported",e,1),t}function Q$(s,e,t,i=!1){let r={type:"ForOfStatement",left:s,right:e,body:t,await:i},n=P.ForOfStatement;return h(n.left,r,"left",s,1),h(n.right,r,"right",e,1),h(n.body,r,"body",t,1),h(n.await,r,"await",i),r}function fl(s,e,t=null){let i={type:"ImportDeclaration",specifiers:s,source:e,attributes:t},r=P.ImportDeclaration;return h(r.specifiers,i,"specifiers",s,1),h(r.source,i,"source",e,1),h(r.attributes,i,"attributes",t,1),i}function Z$(s){let e={type:"ImportDefaultSpecifier",local:s},t=P.ImportDefaultSpecifier;return h(t.local,e,"local",s,1),e}function eJ(s){let e={type:"ImportNamespaceSpecifier",local:s},t=P.ImportNamespaceSpecifier;return h(t.local,e,"local",s,1),e}function Di(s,e){let t={type:"ImportSpecifier",local:s,imported:e},i=P.ImportSpecifier;return h(i.local,t,"local",s,1),h(i.imported,t,"imported",e,1),t}function tJ(s,e){let t={type:"MetaProperty",meta:s,property:e},i=P.MetaProperty;return h(i.meta,t,"meta",s,1),h(i.property,t,"property",e,1),t}function sJ(s="method",e,t,i,r=!1,n=!1,a=!1,o=!1){let c={type:"ClassMethod",kind:s,key:e,params:t,body:i,computed:r,static:n,generator:a,async:o},l=P.ClassMethod;return h(l.kind,c,"kind",s),h(l.key,c,"key",e,1),h(l.params,c,"params",t,1),h(l.body,c,"body",i,1),h(l.computed,c,"computed",r),h(l.static,c,"static",n),h(l.generator,c,"generator",a),h(l.async,c,"async",o),c}function iJ(s){let e={type:"ObjectPattern",properties:s},t=P.ObjectPattern;return h(t.properties,e,"properties",s,1),e}function cg(s){let e={type:"SpreadElement",argument:s},t=P.SpreadElement;return h(t.argument,e,"argument",s,1),e}function rJ(){return{type:"Super"}}function nJ(s,e){let t={type:"TaggedTemplateExpression",tag:s,quasi:e},i=P.TaggedTemplateExpression;return h(i.tag,t,"tag",s,1),h(i.quasi,t,"quasi",e,1),t}function aJ(s,e=!1){let t={type:"TemplateElement",value:s,tail:e},i=P.TemplateElement;return h(i.value,t,"value",s),h(i.tail,t,"tail",e),t}function oJ(s,e){let t={type:"TemplateLiteral",quasis:s,expressions:e},i=P.TemplateLiteral;return h(i.quasis,t,"quasis",s,1),h(i.expressions,t,"expressions",e,1),t}function cJ(s=null,e=!1){let t={type:"YieldExpression",argument:s,delegate:e},i=P.YieldExpression;return h(i.argument,t,"argument",s,1),h(i.delegate,t,"delegate",e),t}function lJ(s){let e={type:"AwaitExpression",argument:s},t=P.AwaitExpression;return h(t.argument,e,"argument",s,1),e}function uJ(s,e=null){let t={type:"ImportExpression",source:s,options:e},i=P.ImportExpression;return h(i.source,t,"source",s,1),h(i.options,t,"options",e,1),t}function pJ(){return{type:"Import"}}function hJ(s){let e={type:"BigIntLiteral",value:s},t=P.BigIntLiteral;return h(t.value,e,"value",s),e}function fJ(s){let e={type:"ExportNamespaceSpecifier",exported:s},t=P.ExportNamespaceSpecifier;return h(t.exported,e,"exported",s,1),e}function dJ(s,e,t=!1,i){let r={type:"OptionalMemberExpression",object:s,property:e,computed:t,optional:i},n=P.OptionalMemberExpression;return h(n.object,r,"object",s,1),h(n.property,r,"property",e,1),h(n.computed,r,"computed",t),h(n.optional,r,"optional",i),r}function mJ(s,e,t){let i={type:"OptionalCallExpression",callee:s,arguments:e,optional:t},r=P.OptionalCallExpression;return h(r.callee,i,"callee",s,1),h(r.arguments,i,"arguments",e,1),h(r.optional,i,"optional",t),i}function yJ(s,e=null,t=null,i=null,r=!1,n=!1){let a={type:"ClassProperty",key:s,value:e,typeAnnotation:t,decorators:i,computed:r,static:n},o=P.ClassProperty;return h(o.key,a,"key",s,1),h(o.value,a,"value",e,1),h(o.typeAnnotation,a,"typeAnnotation",t,1),h(o.decorators,a,"decorators",i,1),h(o.computed,a,"computed",r),h(o.static,a,"static",n),a}function TJ(s,e=null,t=null,i=!1){let r={type:"ClassPrivateProperty",key:s,value:e,decorators:t,static:i},n=P.ClassPrivateProperty;return h(n.key,r,"key",s,1),h(n.value,r,"value",e,1),h(n.decorators,r,"decorators",t,1),h(n.static,r,"static",i),r}function SJ(s="method",e,t,i,r=!1){let n={type:"ClassPrivateMethod",kind:s,key:e,params:t,body:i,static:r,async:!1,computed:!1,generator:!1},a=P.ClassPrivateMethod;return h(a.kind,n,"kind",s),h(a.key,n,"key",e,1),h(a.params,n,"params",t,1),h(a.body,n,"body",i,1),h(a.static,n,"static",r),n}function xJ(s){let e={type:"PrivateName",id:s},t=P.PrivateName;return h(t.id,e,"id",s,1),e}function gJ(s){let e={type:"StaticBlock",body:s},t=P.StaticBlock;return h(t.body,e,"body",s,1),e}function PJ(s,e){let t={type:"ImportAttribute",key:s,value:e},i=P.ImportAttribute;return h(i.key,t,"key",s,1),h(i.value,t,"value",e,1),t}function bJ(){return{type:"AnyTypeAnnotation"}}function EJ(s){let e={type:"ArrayTypeAnnotation",elementType:s},t=P.ArrayTypeAnnotation;return h(t.elementType,e,"elementType",s,1),e}function AJ(){return{type:"BooleanTypeAnnotation"}}function CJ(s){let e={type:"BooleanLiteralTypeAnnotation",value:s},t=P.BooleanLiteralTypeAnnotation;return h(t.value,e,"value",s),e}function IJ(){return{type:"NullLiteralTypeAnnotation"}}function wJ(s,e=null){let t={type:"ClassImplements",id:s,typeParameters:e},i=P.ClassImplements;return h(i.id,t,"id",s,1),h(i.typeParameters,t,"typeParameters",e,1),t}function NJ(s,e=null,t=null,i){let r={type:"DeclareClass",id:s,typeParameters:e,extends:t,body:i},n=P.DeclareClass;return h(n.id,r,"id",s,1),h(n.typeParameters,r,"typeParameters",e,1),h(n.extends,r,"extends",t,1),h(n.body,r,"body",i,1),r}function vJ(s){let e={type:"DeclareFunction",id:s},t=P.DeclareFunction;return h(t.id,e,"id",s,1),e}function kJ(s,e=null,t=null,i){let r={type:"DeclareInterface",id:s,typeParameters:e,extends:t,body:i},n=P.DeclareInterface;return h(n.id,r,"id",s,1),h(n.typeParameters,r,"typeParameters",e,1),h(n.extends,r,"extends",t,1),h(n.body,r,"body",i,1),r}function DJ(s,e,t=null){let i={type:"DeclareModule",id:s,body:e,kind:t},r=P.DeclareModule;return h(r.id,i,"id",s,1),h(r.body,i,"body",e,1),h(r.kind,i,"kind",t),i}function LJ(s){let e={type:"DeclareModuleExports",typeAnnotation:s},t=P.DeclareModuleExports;return h(t.typeAnnotation,e,"typeAnnotation",s,1),e}function OJ(s,e=null,t){let i={type:"DeclareTypeAlias",id:s,typeParameters:e,right:t},r=P.DeclareTypeAlias;return h(r.id,i,"id",s,1),h(r.typeParameters,i,"typeParameters",e,1),h(r.right,i,"right",t,1),i}function MJ(s,e=null,t=null){let i={type:"DeclareOpaqueType",id:s,typeParameters:e,supertype:t},r=P.DeclareOpaqueType;return h(r.id,i,"id",s,1),h(r.typeParameters,i,"typeParameters",e,1),h(r.supertype,i,"supertype",t,1),i}function FJ(s){let e={type:"DeclareVariable",id:s},t=P.DeclareVariable;return h(t.id,e,"id",s,1),e}function BJ(s=null,e=null,t=null,i=null){let r={type:"DeclareExportDeclaration",declaration:s,specifiers:e,source:t,attributes:i},n=P.DeclareExportDeclaration;return h(n.declaration,r,"declaration",s,1),h(n.specifiers,r,"specifiers",e,1),h(n.source,r,"source",t,1),h(n.attributes,r,"attributes",i,1),r}function _J(s,e=null){let t={type:"DeclareExportAllDeclaration",source:s,attributes:e},i=P.DeclareExportAllDeclaration;return h(i.source,t,"source",s,1),h(i.attributes,t,"attributes",e,1),t}function jJ(s){let e={type:"DeclaredPredicate",value:s},t=P.DeclaredPredicate;return h(t.value,e,"value",s,1),e}function RJ(){return{type:"ExistsTypeAnnotation"}}function UJ(s=null,e,t=null,i){let r={type:"FunctionTypeAnnotation",typeParameters:s,params:e,rest:t,returnType:i},n=P.FunctionTypeAnnotation;return h(n.typeParameters,r,"typeParameters",s,1),h(n.params,r,"params",e,1),h(n.rest,r,"rest",t,1),h(n.returnType,r,"returnType",i,1),r}function VJ(s=null,e){let t={type:"FunctionTypeParam",name:s,typeAnnotation:e},i=P.FunctionTypeParam;return h(i.name,t,"name",s,1),h(i.typeAnnotation,t,"typeAnnotation",e,1),t}function KJ(s,e=null){let t={type:"GenericTypeAnnotation",id:s,typeParameters:e},i=P.GenericTypeAnnotation;return h(i.id,t,"id",s,1),h(i.typeParameters,t,"typeParameters",e,1),t}function qJ(){return{type:"InferredPredicate"}}function $J(s,e=null){let t={type:"InterfaceExtends",id:s,typeParameters:e},i=P.InterfaceExtends;return h(i.id,t,"id",s,1),h(i.typeParameters,t,"typeParameters",e,1),t}function JJ(s,e=null,t=null,i){let r={type:"InterfaceDeclaration",id:s,typeParameters:e,extends:t,body:i},n=P.InterfaceDeclaration;return h(n.id,r,"id",s,1),h(n.typeParameters,r,"typeParameters",e,1),h(n.extends,r,"extends",t,1),h(n.body,r,"body",i,1),r}function XJ(s=null,e){let t={type:"InterfaceTypeAnnotation",extends:s,body:e},i=P.InterfaceTypeAnnotation;return h(i.extends,t,"extends",s,1),h(i.body,t,"body",e,1),t}function WJ(s){let e={type:"IntersectionTypeAnnotation",types:s},t=P.IntersectionTypeAnnotation;return h(t.types,e,"types",s,1),e}function zJ(){return{type:"MixedTypeAnnotation"}}function HJ(){return{type:"EmptyTypeAnnotation"}}function YJ(s){let e={type:"NullableTypeAnnotation",typeAnnotation:s},t=P.NullableTypeAnnotation;return h(t.typeAnnotation,e,"typeAnnotation",s,1),e}function GJ(s){let e={type:"NumberLiteralTypeAnnotation",value:s},t=P.NumberLiteralTypeAnnotation;return h(t.value,e,"value",s),e}function QJ(s){let e={type:"BigIntLiteralTypeAnnotation",value:s},t=P.BigIntLiteralTypeAnnotation;return h(t.value,e,"value",s),e}function ZJ(){return{type:"NumberTypeAnnotation"}}function eX(s,e=[],t=[],i=[],r=!1){let n={type:"ObjectTypeAnnotation",properties:s,indexers:e,callProperties:t,internalSlots:i,exact:r},a=P.ObjectTypeAnnotation;return h(a.properties,n,"properties",s,1),h(a.indexers,n,"indexers",e,1),h(a.callProperties,n,"callProperties",t,1),h(a.internalSlots,n,"internalSlots",i,1),h(a.exact,n,"exact",r),n}function tX(s,e,t,i,r){let n={type:"ObjectTypeInternalSlot",id:s,value:e,optional:t,static:i,method:r},a=P.ObjectTypeInternalSlot;return h(a.id,n,"id",s,1),h(a.value,n,"value",e,1),h(a.optional,n,"optional",t),h(a.static,n,"static",i),h(a.method,n,"method",r),n}function sX(s){let e={type:"ObjectTypeCallProperty",value:s,static:!1},t=P.ObjectTypeCallProperty;return h(t.value,e,"value",s,1),e}function iX(s=null,e,t,i=null){let r={type:"ObjectTypeIndexer",id:s,key:e,value:t,variance:i,static:!1},n=P.ObjectTypeIndexer;return h(n.id,r,"id",s,1),h(n.key,r,"key",e,1),h(n.value,r,"value",t,1),h(n.variance,r,"variance",i,1),r}function rX(s,e,t=null){let i={type:"ObjectTypeProperty",key:s,value:e,variance:t,kind:"init",method:!1,optional:!1,proto:!1,static:!1},r=P.ObjectTypeProperty;return h(r.key,i,"key",s,1),h(r.value,i,"value",e,1),h(r.variance,i,"variance",t,1),i}function nX(s){let e={type:"ObjectTypeSpreadProperty",argument:s},t=P.ObjectTypeSpreadProperty;return h(t.argument,e,"argument",s,1),e}function aX(s,e=null,t=null,i){let r={type:"OpaqueType",id:s,typeParameters:e,supertype:t,impltype:i},n=P.OpaqueType;return h(n.id,r,"id",s,1),h(n.typeParameters,r,"typeParameters",e,1),h(n.supertype,r,"supertype",t,1),h(n.impltype,r,"impltype",i,1),r}function oX(s,e){let t={type:"QualifiedTypeIdentifier",id:s,qualification:e},i=P.QualifiedTypeIdentifier;return h(i.id,t,"id",s,1),h(i.qualification,t,"qualification",e,1),t}function cX(s){let e={type:"StringLiteralTypeAnnotation",value:s},t=P.StringLiteralTypeAnnotation;return h(t.value,e,"value",s),e}function lX(){return{type:"StringTypeAnnotation"}}function uX(){return{type:"SymbolTypeAnnotation"}}function pX(){return{type:"ThisTypeAnnotation"}}function hX(s){let e={type:"TupleTypeAnnotation",types:s},t=P.TupleTypeAnnotation;return h(t.types,e,"types",s,1),e}function fX(s){let e={type:"TypeofTypeAnnotation",argument:s},t=P.TypeofTypeAnnotation;return h(t.argument,e,"argument",s,1),e}function dX(s,e=null,t){let i={type:"TypeAlias",id:s,typeParameters:e,right:t},r=P.TypeAlias;return h(r.id,i,"id",s,1),h(r.typeParameters,i,"typeParameters",e,1),h(r.right,i,"right",t,1),i}function mX(s){let e={type:"TypeAnnotation",typeAnnotation:s},t=P.TypeAnnotation;return h(t.typeAnnotation,e,"typeAnnotation",s,1),e}function yX(s,e){let t={type:"TypeCastExpression",expression:s,typeAnnotation:e},i=P.TypeCastExpression;return h(i.expression,t,"expression",s,1),h(i.typeAnnotation,t,"typeAnnotation",e,1),t}function TX(s,e=null,t=null,i=null){let r={type:"TypeParameter",name:s,bound:e,default:t,variance:i},n=P.TypeParameter;return h(n.name,r,"name",s),h(n.bound,r,"bound",e,1),h(n.default,r,"default",t,1),h(n.variance,r,"variance",i,1),r}function SX(s){let e={type:"TypeParameterDeclaration",params:s},t=P.TypeParameterDeclaration;return h(t.params,e,"params",s,1),e}function xX(s){let e={type:"TypeParameterInstantiation",params:s},t=P.TypeParameterInstantiation;return h(t.params,e,"params",s,1),e}function gX(s){let e={type:"UnionTypeAnnotation",types:s},t=P.UnionTypeAnnotation;return h(t.types,e,"types",s,1),e}function PX(s){let e={type:"Variance",kind:s},t=P.Variance;return h(t.kind,e,"kind",s),e}function bX(){return{type:"VoidTypeAnnotation"}}function EX(s,e){let t={type:"EnumDeclaration",id:s,body:e},i=P.EnumDeclaration;return h(i.id,t,"id",s,1),h(i.body,t,"body",e,1),t}function AX(s){let e={type:"EnumBooleanBody",members:s,explicitType:!1,hasUnknownMembers:!1},t=P.EnumBooleanBody;return h(t.members,e,"members",s,1),e}function CX(s){let e={type:"EnumNumberBody",members:s,explicitType:!1,hasUnknownMembers:!1},t=P.EnumNumberBody;return h(t.members,e,"members",s,1),e}function IX(s){let e={type:"EnumStringBody",members:s,explicitType:!1,hasUnknownMembers:!1},t=P.EnumStringBody;return h(t.members,e,"members",s,1),e}function wX(s){let e={type:"EnumSymbolBody",members:s,hasUnknownMembers:!1},t=P.EnumSymbolBody;return h(t.members,e,"members",s,1),e}function NX(s,e){let t={type:"EnumBooleanMember",id:s,init:e},i=P.EnumBooleanMember;return h(i.id,t,"id",s,1),h(i.init,t,"init",e,1),t}function vX(s,e){let t={type:"EnumNumberMember",id:s,init:e},i=P.EnumNumberMember;return h(i.id,t,"id",s,1),h(i.init,t,"init",e,1),t}function kX(s,e){let t={type:"EnumStringMember",id:s,init:e},i=P.EnumStringMember;return h(i.id,t,"id",s,1),h(i.init,t,"init",e,1),t}function DX(s){let e={type:"EnumDefaultedMember",id:s},t=P.EnumDefaultedMember;return h(t.id,e,"id",s,1),e}function LX(s,e){let t={type:"IndexedAccessType",objectType:s,indexType:e},i=P.IndexedAccessType;return h(i.objectType,t,"objectType",s,1),h(i.indexType,t,"indexType",e,1),t}function OX(s,e){let t={type:"OptionalIndexedAccessType",objectType:s,indexType:e,optional:!1},i=P.OptionalIndexedAccessType;return h(i.objectType,t,"objectType",s,1),h(i.indexType,t,"indexType",e,1),t}function MX(s,e=null){let t={type:"JSXAttribute",name:s,value:e},i=P.JSXAttribute;return h(i.name,t,"name",s,1),h(i.value,t,"value",e,1),t}function FX(s){let e={type:"JSXClosingElement",name:s},t=P.JSXClosingElement;return h(t.name,e,"name",s,1),e}function BX(s,e=null,t){let i={type:"JSXElement",openingElement:s,closingElement:e,children:t},r=P.JSXElement;return h(r.openingElement,i,"openingElement",s,1),h(r.closingElement,i,"closingElement",e,1),h(r.children,i,"children",t,1),i}function _X(){return{type:"JSXEmptyExpression"}}function jX(s){let e={type:"JSXExpressionContainer",expression:s},t=P.JSXExpressionContainer;return h(t.expression,e,"expression",s,1),e}function RX(s){let e={type:"JSXSpreadChild",expression:s},t=P.JSXSpreadChild;return h(t.expression,e,"expression",s,1),e}function UX(s){let e={type:"JSXIdentifier",name:s},t=P.JSXIdentifier;return h(t.name,e,"name",s),e}function VX(s,e){let t={type:"JSXMemberExpression",object:s,property:e},i=P.JSXMemberExpression;return h(i.object,t,"object",s,1),h(i.property,t,"property",e,1),t}function KX(s,e){let t={type:"JSXNamespacedName",namespace:s,name:e},i=P.JSXNamespacedName;return h(i.namespace,t,"namespace",s,1),h(i.name,t,"name",e,1),t}function qX(s,e,t=!1){let i={type:"JSXOpeningElement",name:s,attributes:e,selfClosing:t},r=P.JSXOpeningElement;return h(r.name,i,"name",s,1),h(r.attributes,i,"attributes",e,1),h(r.selfClosing,i,"selfClosing",t),i}function $X(s){let e={type:"JSXSpreadAttribute",argument:s},t=P.JSXSpreadAttribute;return h(t.argument,e,"argument",s,1),e}function JX(s){let e={type:"JSXText",value:s},t=P.JSXText;return h(t.value,e,"value",s),e}function XX(s,e,t){let i={type:"JSXFragment",openingFragment:s,closingFragment:e,children:t},r=P.JSXFragment;return h(r.openingFragment,i,"openingFragment",s,1),h(r.closingFragment,i,"closingFragment",e,1),h(r.children,i,"children",t,1),i}function WX(){return{type:"JSXOpeningFragment"}}function zX(){return{type:"JSXClosingFragment"}}function HX(s,e){let t={type:"Placeholder",expectedNode:s,name:e},i=P.Placeholder;return h(i.expectedNode,t,"expectedNode",s),h(i.name,t,"name",e,1),t}function YX(s){let e={type:"V8IntrinsicIdentifier",name:s},t=P.V8IntrinsicIdentifier;return h(t.name,e,"name",s),e}function GX(){return{type:"ArgumentPlaceholder"}}function QX(s,e){let t={type:"BindExpression",object:s,callee:e},i=P.BindExpression;return h(i.object,t,"object",s,1),h(i.callee,t,"callee",e,1),t}function ZX(s,e=null,t=null,i=null,r=!1,n=!1){let a={type:"ClassAccessorProperty",key:s,value:e,typeAnnotation:t,decorators:i,computed:r,static:n},o=P.ClassAccessorProperty;return h(o.key,a,"key",s,1),h(o.value,a,"value",e,1),h(o.typeAnnotation,a,"typeAnnotation",t,1),h(o.decorators,a,"decorators",i,1),h(o.computed,a,"computed",r),h(o.static,a,"static",n),a}function eW(s){let e={type:"Decorator",expression:s},t=P.Decorator;return h(t.expression,e,"expression",s,1),e}function tW(s,e=!1){let t={type:"DoExpression",body:s,async:e},i=P.DoExpression;return h(i.body,t,"body",s,1),h(i.async,t,"async",e),t}function sW(s){let e={type:"ExportDefaultSpecifier",exported:s},t=P.ExportDefaultSpecifier;return h(t.exported,e,"exported",s,1),e}function iW(s){let e={type:"ModuleExpression",body:s},t=P.ModuleExpression;return h(t.body,e,"body",s,1),e}function rW(){return{type:"TopicReference"}}function nW(){return{type:"VoidPattern"}}function aW(s){let e={type:"TSParameterProperty",parameter:s},t=P.TSParameterProperty;return h(t.parameter,e,"parameter",s,1),e}function oW(s=null,e=null,t,i=null){let r={type:"TSDeclareFunction",id:s,typeParameters:e,params:t,returnType:i,async:!1,generator:!1},n=P.TSDeclareFunction;return h(n.id,r,"id",s,1),h(n.typeParameters,r,"typeParameters",e,1),h(n.params,r,"params",t,1),h(n.returnType,r,"returnType",i,1),r}function cW(s,e=null,t,i=null){let r={type:"TSDeclareMethod",key:s,typeParameters:e,params:t,returnType:i,async:!1,computed:!1,generator:!1,kind:"method",static:!1},n=P.TSDeclareMethod;return h(n.key,r,"key",s,1),h(n.typeParameters,r,"typeParameters",e,1),h(n.params,r,"params",t,1),h(n.returnType,r,"returnType",i,1),r}function lW(s,e){let t={type:"TSQualifiedName",left:s,right:e},i=P.TSQualifiedName;return h(i.left,t,"left",s,1),h(i.right,t,"right",e,1),t}function uW(s=null,e,t=null){let i={type:"TSCallSignatureDeclaration",typeParameters:s,params:e,returnType:t},r=P.TSCallSignatureDeclaration;return h(r.typeParameters,i,"typeParameters",s,1),h(r.params,i,"params",e,1),h(r.returnType,i,"returnType",t,1),i}function pW(s=null,e,t=null){let i={type:"TSConstructSignatureDeclaration",typeParameters:s,params:e,returnType:t},r=P.TSConstructSignatureDeclaration;return h(r.typeParameters,i,"typeParameters",s,1),h(r.params,i,"params",e,1),h(r.returnType,i,"returnType",t,1),i}function hW(s,e=null){let t={type:"TSPropertySignature",key:s,typeAnnotation:e,computed:!1},i=P.TSPropertySignature;return h(i.key,t,"key",s,1),h(i.typeAnnotation,t,"typeAnnotation",e,1),t}function fW(s,e=null,t,i=null){let r={type:"TSMethodSignature",key:s,typeParameters:e,params:t,returnType:i,computed:!1,kind:"method"},n=P.TSMethodSignature;return h(n.key,r,"key",s,1),h(n.typeParameters,r,"typeParameters",e,1),h(n.params,r,"params",t,1),h(n.returnType,r,"returnType",i,1),r}function dW(s,e=null){let t={type:"TSIndexSignature",parameters:s,typeAnnotation:e},i=P.TSIndexSignature;return h(i.parameters,t,"parameters",s,1),h(i.typeAnnotation,t,"typeAnnotation",e,1),t}function mW(){return{type:"TSAnyKeyword"}}function yW(){return{type:"TSBooleanKeyword"}}function TW(){return{type:"TSBigIntKeyword"}}function SW(){return{type:"TSIntrinsicKeyword"}}function xW(){return{type:"TSNeverKeyword"}}function gW(){return{type:"TSNullKeyword"}}function PW(){return{type:"TSNumberKeyword"}}function bW(){return{type:"TSObjectKeyword"}}function EW(){return{type:"TSStringKeyword"}}function AW(){return{type:"TSSymbolKeyword"}}function CW(){return{type:"TSUndefinedKeyword"}}function IW(){return{type:"TSUnknownKeyword"}}function wW(){return{type:"TSVoidKeyword"}}function NW(){return{type:"TSThisType"}}function vW(s=null,e,t=null){let i={type:"TSFunctionType",typeParameters:s,params:e,returnType:t},r=P.TSFunctionType;return h(r.typeParameters,i,"typeParameters",s,1),h(r.params,i,"params",e,1),h(r.returnType,i,"returnType",t,1),i}function kW(s=null,e,t=null){let i={type:"TSConstructorType",typeParameters:s,params:e,returnType:t},r=P.TSConstructorType;return h(r.typeParameters,i,"typeParameters",s,1),h(r.params,i,"params",e,1),h(r.returnType,i,"returnType",t,1),i}function DW(s,e=null){let t={type:"TSTypeReference",typeName:s,typeArguments:e},i=P.TSTypeReference;return h(i.typeName,t,"typeName",s,1),h(i.typeArguments,t,"typeArguments",e,1),t}function LW(s,e=null,t=null){let i={type:"TSTypePredicate",parameterName:s,typeAnnotation:e,asserts:t},r=P.TSTypePredicate;return h(r.parameterName,i,"parameterName",s,1),h(r.typeAnnotation,i,"typeAnnotation",e,1),h(r.asserts,i,"asserts",t),i}function OW(s,e=null){let t={type:"TSTypeQuery",exprName:s,typeArguments:e},i=P.TSTypeQuery;return h(i.exprName,t,"exprName",s,1),h(i.typeArguments,t,"typeArguments",e,1),t}function MW(s){let e={type:"TSTypeLiteral",members:s},t=P.TSTypeLiteral;return h(t.members,e,"members",s,1),e}function FW(s){let e={type:"TSArrayType",elementType:s},t=P.TSArrayType;return h(t.elementType,e,"elementType",s,1),e}function BW(s){let e={type:"TSTupleType",elementTypes:s},t=P.TSTupleType;return h(t.elementTypes,e,"elementTypes",s,1),e}function _W(s){let e={type:"TSOptionalType",typeAnnotation:s},t=P.TSOptionalType;return h(t.typeAnnotation,e,"typeAnnotation",s,1),e}function jW(s){let e={type:"TSRestType",typeAnnotation:s},t=P.TSRestType;return h(t.typeAnnotation,e,"typeAnnotation",s,1),e}function RW(s,e,t=!1){let i={type:"TSNamedTupleMember",label:s,elementType:e,optional:t},r=P.TSNamedTupleMember;return h(r.label,i,"label",s,1),h(r.elementType,i,"elementType",e,1),h(r.optional,i,"optional",t),i}function UW(s){let e={type:"TSUnionType",types:s},t=P.TSUnionType;return h(t.types,e,"types",s,1),e}function VW(s){let e={type:"TSIntersectionType",types:s},t=P.TSIntersectionType;return h(t.types,e,"types",s,1),e}function KW(s,e,t,i){let r={type:"TSConditionalType",checkType:s,extendsType:e,trueType:t,falseType:i},n=P.TSConditionalType;return h(n.checkType,r,"checkType",s,1),h(n.extendsType,r,"extendsType",e,1),h(n.trueType,r,"trueType",t,1),h(n.falseType,r,"falseType",i,1),r}function qW(s){let e={type:"TSInferType",typeParameter:s},t=P.TSInferType;return h(t.typeParameter,e,"typeParameter",s,1),e}function $W(s){let e={type:"TSParenthesizedType",typeAnnotation:s},t=P.TSParenthesizedType;return h(t.typeAnnotation,e,"typeAnnotation",s,1),e}function JW(s,e){let t={type:"TSTypeOperator",typeAnnotation:s,operator:e},i=P.TSTypeOperator;return h(i.typeAnnotation,t,"typeAnnotation",s,1),h(i.operator,t,"operator",e),t}function XW(s,e){let t={type:"TSIndexedAccessType",objectType:s,indexType:e},i=P.TSIndexedAccessType;return h(i.objectType,t,"objectType",s,1),h(i.indexType,t,"indexType",e,1),t}function WW(s,e,t=null,i=null){let r={type:"TSMappedType",key:s,constraint:e,nameType:t,typeAnnotation:i},n=P.TSMappedType;return h(n.key,r,"key",s,1),h(n.constraint,r,"constraint",e,1),h(n.nameType,r,"nameType",t,1),h(n.typeAnnotation,r,"typeAnnotation",i,1),r}function zW(s,e){let t={type:"TSTemplateLiteralType",quasis:s,types:e},i=P.TSTemplateLiteralType;return h(i.quasis,t,"quasis",s,1),h(i.types,t,"types",e,1),t}function HW(s){let e={type:"TSLiteralType",literal:s},t=P.TSLiteralType;return h(t.literal,e,"literal",s,1),e}function YW(s,e=null){let t={type:"TSClassImplements",expression:s,typeArguments:e},i=P.TSClassImplements;return h(i.expression,t,"expression",s,1),h(i.typeArguments,t,"typeArguments",e,1),t}function GW(s,e=null){let t={type:"TSInterfaceHeritage",expression:s,typeArguments:e},i=P.TSInterfaceHeritage;return h(i.expression,t,"expression",s,1),h(i.typeArguments,t,"typeArguments",e,1),t}function QW(s,e=null,t=null,i){let r={type:"TSInterfaceDeclaration",id:s,typeParameters:e,extends:t,body:i},n=P.TSInterfaceDeclaration;return h(n.id,r,"id",s,1),h(n.typeParameters,r,"typeParameters",e,1),h(n.extends,r,"extends",t,1),h(n.body,r,"body",i,1),r}function ZW(s){let e={type:"TSInterfaceBody",body:s},t=P.TSInterfaceBody;return h(t.body,e,"body",s,1),e}function ez(s,e=null,t){let i={type:"TSTypeAliasDeclaration",id:s,typeParameters:e,typeAnnotation:t},r=P.TSTypeAliasDeclaration;return h(r.id,i,"id",s,1),h(r.typeParameters,i,"typeParameters",e,1),h(r.typeAnnotation,i,"typeAnnotation",t,1),i}function tz(s,e=null){let t={type:"TSInstantiationExpression",expression:s,typeArguments:e},i=P.TSInstantiationExpression;return h(i.expression,t,"expression",s,1),h(i.typeArguments,t,"typeArguments",e,1),t}function sz(s,e){let t={type:"TSAsExpression",expression:s,typeAnnotation:e},i=P.TSAsExpression;return h(i.expression,t,"expression",s,1),h(i.typeAnnotation,t,"typeAnnotation",e,1),t}function iz(s,e){let t={type:"TSSatisfiesExpression",expression:s,typeAnnotation:e},i=P.TSSatisfiesExpression;return h(i.expression,t,"expression",s,1),h(i.typeAnnotation,t,"typeAnnotation",e,1),t}function rz(s,e){let t={type:"TSTypeAssertion",typeAnnotation:s,expression:e},i=P.TSTypeAssertion;return h(i.typeAnnotation,t,"typeAnnotation",s,1),h(i.expression,t,"expression",e,1),t}function nz(s){let e={type:"TSEnumBody",members:s},t=P.TSEnumBody;return h(t.members,e,"members",s,1),e}function az(s,e){let t={type:"TSEnumDeclaration",id:s,body:e},i=P.TSEnumDeclaration;return h(i.id,t,"id",s,1),h(i.body,t,"body",e,1),t}function oz(s,e=null){let t={type:"TSEnumMember",id:s,initializer:e},i=P.TSEnumMember;return h(i.id,t,"id",s,1),h(i.initializer,t,"initializer",e,1),t}function cz(s,e){let t={type:"TSModuleDeclaration",id:s,body:e,kind:"namespace"},i=P.TSModuleDeclaration;return h(i.id,t,"id",s,1),h(i.body,t,"body",e,1),t}function lz(s){let e={type:"TSModuleBlock",body:s},t=P.TSModuleBlock;return h(t.body,e,"body",s,1),e}function uz(s,e=null,t=null){let i={type:"TSImportType",source:s,qualifier:e,typeArguments:t},r=P.TSImportType;return h(r.source,i,"source",s,1),h(r.qualifier,i,"qualifier",e,1),h(r.typeArguments,i,"typeArguments",t,1),i}function pz(s,e){let t={type:"TSImportEqualsDeclaration",id:s,moduleReference:e},i=P.TSImportEqualsDeclaration;return h(i.id,t,"id",s,1),h(i.moduleReference,t,"moduleReference",e,1),t}function hz(s){let e={type:"TSExternalModuleReference",expression:s},t=P.TSExternalModuleReference;return h(t.expression,e,"expression",s,1),e}function fz(s){let e={type:"TSNonNullExpression",expression:s},t=P.TSNonNullExpression;return h(t.expression,e,"expression",s,1),e}function dz(s){let e={type:"TSExportAssignment",expression:s},t=P.TSExportAssignment;return h(t.expression,e,"expression",s,1),e}function mz(s){let e={type:"TSNamespaceExportDeclaration",id:s},t=P.TSNamespaceExportDeclaration;return h(t.id,e,"id",s,1),e}function yz(s){let e={type:"TSTypeAnnotation",typeAnnotation:s},t=P.TSTypeAnnotation;return h(t.typeAnnotation,e,"typeAnnotation",s,1),e}function Tz(s){let e={type:"TSTypeParameterInstantiation",params:s},t=P.TSTypeParameterInstantiation;return h(t.params,e,"params",s,1),e}function Sz(s){let e={type:"TSTypeParameterDeclaration",params:s},t=P.TSTypeParameterDeclaration;return h(t.params,e,"params",s,1),e}function xz(s=null,e=null,t){let i={type:"TSTypeParameter",constraint:s,default:e,name:t},r=P.TSTypeParameter;return h(r.constraint,i,"constraint",s,1),h(r.default,i,"default",e,1),h(r.name,i,"name",t,1),i}function gz(s){return Ni("NumberLiteral","NumericLiteral","The node type "),ng(s)}function Pz(s,e=""){return Ni("RegexLiteral","RegExpLiteral","The node type "),ag(s,e)}function bz(s){return Ni("RestProperty","RestElement","The node type "),og(s)}function Ez(s){return Ni("SpreadProperty","SpreadElement","The node type "),cg(s)}var Az=Object.defineProperty({__proto__:null,anyTypeAnnotation:bJ,argumentPlaceholder:GX,arrayExpression:e$,arrayPattern:q$,arrayTypeAnnotation:EJ,arrowFunctionExpression:$$,assignmentExpression:t$,assignmentPattern:K$,awaitExpression:lJ,bigIntLiteral:hJ,bigIntLiteralTypeAnnotation:QJ,binaryExpression:s$,bindExpression:QX,blockStatement:a$,booleanLiteral:A$,booleanLiteralTypeAnnotation:CJ,booleanTypeAnnotation:AJ,breakStatement:o$,callExpression:c$,catchClause:l$,classAccessorProperty:ZX,classBody:J$,classDeclaration:W$,classExpression:X$,classImplements:wJ,classMethod:sJ,classPrivateMethod:SJ,classPrivateProperty:TJ,classProperty:yJ,conditionalExpression:u$,continueStatement:p$,debuggerStatement:h$,declareClass:NJ,declareExportAllDeclaration:_J,declareExportDeclaration:BJ,declareFunction:vJ,declareInterface:kJ,declareModule:DJ,declareModuleExports:LJ,declareOpaqueType:MJ,declareTypeAlias:OJ,declareVariable:FJ,declaredPredicate:jJ,decorator:eW,directive:r$,directiveLiteral:n$,doExpression:tW,doWhileStatement:f$,emptyStatement:d$,emptyTypeAnnotation:HJ,enumBooleanBody:AX,enumBooleanMember:NX,enumDeclaration:EX,enumDefaultedMember:DX,enumNumberBody:CX,enumNumberMember:vX,enumStringBody:IX,enumStringMember:kX,enumSymbolBody:wX,existsTypeAnnotation:RJ,exportAllDeclaration:z$,exportDefaultDeclaration:H$,exportDefaultSpecifier:sW,exportNamedDeclaration:Y$,exportNamespaceSpecifier:fJ,exportSpecifier:G$,expressionStatement:m$,file:y$,forInStatement:T$,forOfStatement:Q$,forStatement:S$,functionDeclaration:x$,functionExpression:g$,functionTypeAnnotation:UJ,functionTypeParam:VJ,genericTypeAnnotation:KJ,identifier:Ht,ifStatement:P$,import:pJ,importAttribute:PJ,importDeclaration:fl,importDefaultSpecifier:Z$,importExpression:uJ,importNamespaceSpecifier:eJ,importSpecifier:Di,indexedAccessType:LX,inferredPredicate:qJ,interfaceDeclaration:JJ,interfaceExtends:$J,interfaceTypeAnnotation:XJ,interpreterDirective:i$,intersectionTypeAnnotation:WJ,jsxAttribute:MX,jsxClosingElement:FX,jsxClosingFragment:zX,jsxElement:BX,jsxEmptyExpression:_X,jsxExpressionContainer:jX,jsxFragment:XX,jsxIdentifier:UX,jsxMemberExpression:VX,jsxNamespacedName:KX,jsxOpeningElement:qX,jsxOpeningFragment:WX,jsxSpreadAttribute:$X,jsxSpreadChild:RX,jsxText:JX,labeledStatement:b$,logicalExpression:C$,memberExpression:I$,metaProperty:tJ,mixedTypeAnnotation:zJ,moduleExpression:iW,newExpression:w$,nullLiteral:E$,nullLiteralTypeAnnotation:IJ,nullableTypeAnnotation:YJ,numberLiteral:gz,numberLiteralTypeAnnotation:GJ,numberTypeAnnotation:ZJ,numericLiteral:ng,objectExpression:ul,objectMethod:v$,objectPattern:iJ,objectProperty:cn,objectTypeAnnotation:eX,objectTypeCallProperty:sX,objectTypeIndexer:iX,objectTypeInternalSlot:tX,objectTypeProperty:rX,objectTypeSpreadProperty:nX,opaqueType:aX,optionalCallExpression:mJ,optionalIndexedAccessType:OX,optionalMemberExpression:dJ,parenthesizedExpression:L$,placeholder:HX,privateName:xJ,program:N$,qualifiedTypeIdentifier:oX,regExpLiteral:ag,regexLiteral:Pz,restElement:og,restProperty:bz,returnStatement:k$,sequenceExpression:D$,spreadElement:cg,spreadProperty:Ez,staticBlock:gJ,stringLiteral:ll,stringLiteralTypeAnnotation:cX,stringTypeAnnotation:lX,super:rJ,switchCase:O$,switchStatement:M$,symbolTypeAnnotation:uX,taggedTemplateExpression:nJ,templateElement:aJ,templateLiteral:oJ,thisExpression:F$,thisTypeAnnotation:pX,throwStatement:B$,topicReference:rW,tryStatement:_$,tsAnyKeyword:mW,tsArrayType:FW,tsAsExpression:sz,tsBigIntKeyword:TW,tsBooleanKeyword:yW,tsCallSignatureDeclaration:uW,tsClassImplements:YW,tsConditionalType:KW,tsConstructSignatureDeclaration:pW,tsConstructorType:kW,tsDeclareFunction:oW,tsDeclareMethod:cW,tsEnumBody:nz,tsEnumDeclaration:az,tsEnumMember:oz,tsExportAssignment:dz,tsExternalModuleReference:hz,tsFunctionType:vW,tsImportEqualsDeclaration:pz,tsImportType:uz,tsIndexSignature:dW,tsIndexedAccessType:XW,tsInferType:qW,tsInstantiationExpression:tz,tsInterfaceBody:ZW,tsInterfaceDeclaration:QW,tsInterfaceHeritage:GW,tsIntersectionType:VW,tsIntrinsicKeyword:SW,tsLiteralType:HW,tsMappedType:WW,tsMethodSignature:fW,tsModuleBlock:lz,tsModuleDeclaration:cz,tsNamedTupleMember:RW,tsNamespaceExportDeclaration:mz,tsNeverKeyword:xW,tsNonNullExpression:fz,tsNullKeyword:gW,tsNumberKeyword:PW,tsObjectKeyword:bW,tsOptionalType:_W,tsParameterProperty:aW,tsParenthesizedType:$W,tsPropertySignature:hW,tsQualifiedName:lW,tsRestType:jW,tsSatisfiesExpression:iz,tsStringKeyword:EW,tsSymbolKeyword:AW,tsTemplateLiteralType:zW,tsThisType:NW,tsTupleType:BW,tsTypeAliasDeclaration:ez,tsTypeAnnotation:yz,tsTypeAssertion:rz,tsTypeLiteral:MW,tsTypeOperator:JW,tsTypeParameter:xz,tsTypeParameterDeclaration:Sz,tsTypeParameterInstantiation:Tz,tsTypePredicate:LW,tsTypeQuery:OW,tsTypeReference:DW,tsUndefinedKeyword:CW,tsUnionType:UW,tsUnknownKeyword:IW,tsVoidKeyword:wW,tupleTypeAnnotation:hX,typeAlias:dX,typeAnnotation:mX,typeCastExpression:yX,typeParameter:TX,typeParameterDeclaration:SX,typeParameterInstantiation:xX,typeofTypeAnnotation:fX,unaryExpression:j$,unionTypeAnnotation:gX,updateExpression:R$,v8IntrinsicIdentifier:YX,variableDeclaration:pl,variableDeclarator:hl,variance:PX,voidPattern:nW,voidTypeAnnotation:bX,whileStatement:U$,withStatement:V$,yieldExpression:cJ},Symbol.toStringTag,{value:"Module"});function S(s){return function(){return Ni(s.replace(/^(?:ts|jsx|[a-z])/,e=>e.toUpperCase()),s,"Usage of builders starting with an uppercase letter such as ","uppercase builders"),Az[s](...arguments)}}var JH=S("arrayExpression"),XH=S("assignmentExpression"),WH=S("binaryExpression"),zH=S("interpreterDirective"),HH=S("directive"),YH=S("directiveLiteral"),GH=S("blockStatement"),QH=S("breakStatement"),ZH=S("callExpression"),eY=S("catchClause"),tY=S("conditionalExpression"),sY=S("continueStatement"),iY=S("debuggerStatement"),rY=S("doWhileStatement"),nY=S("emptyStatement"),aY=S("expressionStatement"),oY=S("file"),cY=S("forInStatement"),lY=S("forStatement"),uY=S("functionDeclaration"),pY=S("functionExpression"),hY=S("identifier"),fY=S("ifStatement"),dY=S("labeledStatement"),mY=S("stringLiteral"),yY=S("numericLiteral"),TY=S("nullLiteral"),SY=S("booleanLiteral"),xY=S("regExpLiteral"),gY=S("logicalExpression"),PY=S("memberExpression"),bY=S("newExpression"),EY=S("program"),AY=S("objectExpression"),CY=S("objectMethod"),IY=S("objectProperty"),wY=S("restElement"),NY=S("returnStatement"),vY=S("sequenceExpression"),kY=S("parenthesizedExpression"),DY=S("switchCase"),LY=S("switchStatement"),OY=S("thisExpression"),MY=S("throwStatement"),FY=S("tryStatement"),BY=S("unaryExpression"),_Y=S("updateExpression"),jY=S("variableDeclaration"),RY=S("variableDeclarator"),UY=S("whileStatement"),VY=S("withStatement"),KY=S("assignmentPattern"),qY=S("arrayPattern"),$Y=S("arrowFunctionExpression"),JY=S("classBody"),XY=S("classExpression"),WY=S("classDeclaration"),zY=S("exportAllDeclaration"),HY=S("exportDefaultDeclaration"),YY=S("exportNamedDeclaration"),GY=S("exportSpecifier"),QY=S("forOfStatement"),ZY=S("importDeclaration"),eG=S("importDefaultSpecifier"),tG=S("importNamespaceSpecifier"),sG=S("importSpecifier"),iG=S("metaProperty"),rG=S("classMethod"),nG=S("objectPattern"),aG=S("spreadElement"),oG=S("super"),cG=S("taggedTemplateExpression"),lG=S("templateElement"),uG=S("templateLiteral"),pG=S("yieldExpression"),hG=S("awaitExpression"),fG=S("importExpression"),dG=S("import"),mG=S("bigIntLiteral"),yG=S("exportNamespaceSpecifier"),TG=S("optionalMemberExpression"),SG=S("optionalCallExpression"),xG=S("classProperty"),gG=S("classPrivateProperty"),PG=S("classPrivateMethod"),bG=S("privateName"),EG=S("staticBlock"),AG=S("importAttribute"),CG=S("anyTypeAnnotation"),IG=S("arrayTypeAnnotation"),wG=S("booleanTypeAnnotation"),NG=S("booleanLiteralTypeAnnotation"),vG=S("nullLiteralTypeAnnotation"),kG=S("classImplements"),DG=S("declareClass"),LG=S("declareFunction"),OG=S("declareInterface"),MG=S("declareModule"),FG=S("declareModuleExports"),BG=S("declareTypeAlias"),_G=S("declareOpaqueType"),jG=S("declareVariable"),RG=S("declareExportDeclaration"),UG=S("declareExportAllDeclaration"),VG=S("declaredPredicate"),KG=S("existsTypeAnnotation"),qG=S("functionTypeAnnotation"),$G=S("functionTypeParam"),JG=S("genericTypeAnnotation"),XG=S("inferredPredicate"),WG=S("interfaceExtends"),zG=S("interfaceDeclaration"),HG=S("interfaceTypeAnnotation"),YG=S("intersectionTypeAnnotation"),GG=S("mixedTypeAnnotation"),QG=S("emptyTypeAnnotation"),ZG=S("nullableTypeAnnotation"),eQ=S("numberLiteralTypeAnnotation"),tQ=S("bigIntLiteralTypeAnnotation"),sQ=S("numberTypeAnnotation"),iQ=S("objectTypeAnnotation"),rQ=S("objectTypeInternalSlot"),nQ=S("objectTypeCallProperty"),aQ=S("objectTypeIndexer"),oQ=S("objectTypeProperty"),cQ=S("objectTypeSpreadProperty"),lQ=S("opaqueType"),uQ=S("qualifiedTypeIdentifier"),pQ=S("stringLiteralTypeAnnotation"),hQ=S("stringTypeAnnotation"),fQ=S("symbolTypeAnnotation"),dQ=S("thisTypeAnnotation"),mQ=S("tupleTypeAnnotation"),yQ=S("typeofTypeAnnotation"),TQ=S("typeAlias"),SQ=S("typeAnnotation"),xQ=S("typeCastExpression"),gQ=S("typeParameter"),PQ=S("typeParameterDeclaration"),bQ=S("typeParameterInstantiation"),EQ=S("unionTypeAnnotation"),AQ=S("variance"),CQ=S("voidTypeAnnotation"),IQ=S("enumDeclaration"),wQ=S("enumBooleanBody"),NQ=S("enumNumberBody"),vQ=S("enumStringBody"),kQ=S("enumSymbolBody"),DQ=S("enumBooleanMember"),LQ=S("enumNumberMember"),OQ=S("enumStringMember"),MQ=S("enumDefaultedMember"),FQ=S("indexedAccessType"),BQ=S("optionalIndexedAccessType"),_Q=S("jsxAttribute"),jQ=S("jsxClosingElement"),RQ=S("jsxElement"),UQ=S("jsxEmptyExpression"),VQ=S("jsxExpressionContainer"),KQ=S("jsxSpreadChild"),qQ=S("jsxIdentifier"),$Q=S("jsxMemberExpression"),JQ=S("jsxNamespacedName"),XQ=S("jsxOpeningElement"),WQ=S("jsxSpreadAttribute"),zQ=S("jsxText"),HQ=S("jsxFragment"),YQ=S("jsxOpeningFragment"),GQ=S("jsxClosingFragment"),QQ=S("placeholder"),ZQ=S("v8IntrinsicIdentifier"),eZ=S("argumentPlaceholder"),tZ=S("bindExpression"),sZ=S("classAccessorProperty"),iZ=S("decorator"),rZ=S("doExpression"),nZ=S("exportDefaultSpecifier"),aZ=S("moduleExpression"),oZ=S("topicReference"),cZ=S("voidPattern"),lZ=S("tsParameterProperty"),uZ=S("tsDeclareFunction"),pZ=S("tsDeclareMethod"),hZ=S("tsQualifiedName"),fZ=S("tsCallSignatureDeclaration"),dZ=S("tsConstructSignatureDeclaration"),mZ=S("tsPropertySignature"),yZ=S("tsMethodSignature"),TZ=S("tsIndexSignature"),SZ=S("tsAnyKeyword"),xZ=S("tsBooleanKeyword"),gZ=S("tsBigIntKeyword"),PZ=S("tsIntrinsicKeyword"),bZ=S("tsNeverKeyword"),EZ=S("tsNullKeyword"),AZ=S("tsNumberKeyword"),CZ=S("tsObjectKeyword"),IZ=S("tsStringKeyword"),wZ=S("tsSymbolKeyword"),NZ=S("tsUndefinedKeyword"),vZ=S("tsUnknownKeyword"),kZ=S("tsVoidKeyword"),DZ=S("tsThisType"),LZ=S("tsFunctionType"),OZ=S("tsConstructorType"),MZ=S("tsTypeReference"),FZ=S("tsTypePredicate"),BZ=S("tsTypeQuery"),_Z=S("tsTypeLiteral"),jZ=S("tsArrayType"),RZ=S("tsTupleType"),UZ=S("tsOptionalType"),VZ=S("tsRestType"),KZ=S("tsNamedTupleMember"),qZ=S("tsUnionType"),$Z=S("tsIntersectionType"),JZ=S("tsConditionalType"),XZ=S("tsInferType"),WZ=S("tsParenthesizedType"),zZ=S("tsTypeOperator"),HZ=S("tsIndexedAccessType"),YZ=S("tsMappedType"),GZ=S("tsTemplateLiteralType"),QZ=S("tsLiteralType"),ZZ=S("tsClassImplements"),eee=S("tsInterfaceHeritage"),tee=S("tsInterfaceDeclaration"),see=S("tsInterfaceBody"),iee=S("tsTypeAliasDeclaration"),ree=S("tsInstantiationExpression"),nee=S("tsAsExpression"),aee=S("tsSatisfiesExpression"),oee=S("tsTypeAssertion"),cee=S("tsEnumBody"),lee=S("tsEnumDeclaration"),uee=S("tsEnumMember"),pee=S("tsModuleDeclaration"),hee=S("tsModuleBlock"),fee=S("tsImportType"),dee=S("tsImportEqualsDeclaration"),mee=S("tsExternalModuleReference"),yee=S("tsNonNullExpression"),Tee=S("tsExportAssignment"),See=S("tsNamespaceExportDeclaration"),xee=S("tsTypeAnnotation"),gee=S("tsTypeParameterInstantiation"),Pee=S("tsTypeParameterDeclaration"),bee=S("tsTypeParameter");var{hasOwn:ut}=Object;function Ux(s,e,t,i){return s&&typeof s.type=="string"?lg(s,e,t,i):s}function Qc(s,e,t,i){return Array.isArray(s)?s.map(r=>Ux(r,e,t,i)):Ux(s,e,t,i)}function ft(s,e=!0,t=!1){return s&&lg(s,e,t,new Map)}function lg(s,e=!0,t=!1,i){if(!s)return s;let{type:r}=s,n={type:s.type};if(en(s))n.name=s.name,ut(s,"optional")&&typeof s.optional=="boolean"&&(n.optional=s.optional),ut(s,"typeAnnotation")&&(n.typeAnnotation=e?Qc(s.typeAnnotation,!0,t,i):s.typeAnnotation),ut(s,"decorators")&&(n.decorators=e?Qc(s.decorators,!0,t,i):s.decorators);else if(ut(Ii,r))for(let a of Object.keys(Ii[r]))ut(s,a)&&(e?n[a]=Sq(s)&&a==="comments"?Yr(s.comments,e,t,i):Qc(s[a],!0,t,i):n[a]=s[a]);else throw new Error(`Unknown node type: "${r}"`);return ut(s,"loc")&&(t?n.loc=null:n.loc=s.loc),ut(s,"leadingComments")&&(n.leadingComments=Yr(s.leadingComments,e,t,i)),ut(s,"innerComments")&&(n.innerComments=Yr(s.innerComments,e,t,i)),ut(s,"trailingComments")&&(n.trailingComments=Yr(s.trailingComments,e,t,i)),ut(s,"extra")&&(n.extra={...s.extra}),n}function Yr(s,e,t,i){return!s||!e?s:s.map(r=>{let n=i.get(r);if(n)return n;let{type:a,value:o,loc:c}=r,l={type:a,value:o,loc:c};return t&&(l.loc=void 0),i.set(r,l),l})}var Eee=J.Standardized,Aee=J.Expression,Cee=J.Binary,Iee=J.Scopable,wee=J.BlockParent,Nee=J.Block,vee=J.Statement,kee=J.Terminatorless,Dee=J.CompletionStatement,Lee=J.Conditional,Oee=J.Loop,Mee=J.While,Fee=J.ExpressionWrapper,Bee=J.For,_ee=J.ForXStatement,jee=J.Function,Ree=J.FunctionParent,Uee=J.Pureish,Vee=J.Declaration,Kee=J.FunctionParameter,qee=J.PatternLike,$ee=J.LVal,Jee=J.TSEntityName,Xee=J.Literal,Wee=J.Immutable,zee=J.UserWhitespacable,Hee=J.Method,Yee=J.ObjectMember,Gee=J.Property,Qee=J.UnaryLike,Zee=J.Pattern,ete=J.Class,tte=J.ImportOrExportDeclaration,ste=J.ExportDeclaration,ite=J.ModuleSpecifier,rte=J.Private,nte=J.Flow,ate=J.FlowType,ote=J.FlowBaseAnnotation,cte=J.FlowDeclaration,lte=J.FlowPredicate,ute=J.EnumBody,pte=J.EnumMember,hte=J.JSX,fte=J.Miscellaneous,dte=J.Accessor,mte=J.TypeScript,yte=J.TSTypeElement,Tte=J.TSType,Ste=J.TSBaseType;var ug=Symbol(),pg=Symbol();function wi(s,e,t){if(!s)return!1;let i=tn[s.type];if(!i)return!1;t=t||{};let r=e(s,t);if(r!==void 0)switch(r){case ug:return!1;case pg:return!0}for(let n of i){let a=s[n];if(a){if(Array.isArray(a)){for(let o of a)if(wi(o,e,t))return!0}else if(wi(a,e,t))return!0}}return!1}wi.skip=ug;wi.stop=pg;var hg=["tokens","start","end","loc","raw","rawValue"],Cz=[..._q,"comments",...hg];function Iz(s,e={}){let t=e.preserveComments?hg:Cz;for(let r of t)s[r]!=null&&(s[r]=void 0);for(let r of Object.keys(s))r.startsWith("_")&&s[r]!=null&&(s[r]=void 0);let i=Object.getOwnPropertySymbols(s);for(let r of i)s[r]=null}function wz(s,e){return wi(s,Iz,e),s}function ws(s,e=s.key){let t;return s.kind==="method"?ws.increment()+"":(en(e)?t=e.name:Vx(e)?t=JSON.stringify(e.value):t=JSON.stringify(wz(ft(e))),s.computed&&(t=`[${t}]`),s.static&&(t=`static:${t}`),t)}ws.uid=0;ws.increment=function(){return ws.uid>=Number.MAX_SAFE_INTEGER?ws.uid=0:ws.uid++};var xte=Function.call.bind(Object.prototype.toString);function fg(s,e,t,i){let r=[].concat(s),n=Object.create(null);for(;r.length;){let a=r.shift();if(!a||i&&(Tq(a)||Eq(a)||Aq(a)))continue;if(en(a)){e?(n[a.name]=n[a.name]||[]).push(a):n[a.name]=a;continue}if(Dq(a)&&!Iq(a)){kq(a.declaration)&&r.push(a.declaration);continue}if(t){if(xq(a)){r.push(a.id);continue}if(gq(a)||Cq(a))continue}let o=fg.keys[a.type];if(o)for(let c=0;c<o.length;c++){let l=o[c],u=a[l];u&&(Array.isArray(u)?r.push(...u):r.push(u))}}return n}var Nz={DeclareClass:["id"],DeclareFunction:["id"],DeclareModule:["id"],DeclareVariable:["id"],DeclareInterface:["id"],DeclareTypeAlias:["id"],DeclareOpaqueType:["id"],InterfaceDeclaration:["id"],TypeAlias:["id"],OpaqueType:["id"],CatchClause:["param"],LabeledStatement:["label"],UnaryExpression:["argument"],AssignmentExpression:["left"],ImportSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportDefaultSpecifier:["local"],ImportDeclaration:["specifiers"],TSImportEqualsDeclaration:["id"],ExportSpecifier:["exported"],ExportNamespaceSpecifier:["exported"],ExportDefaultSpecifier:["exported"],FunctionDeclaration:["id","params"],FunctionExpression:["id","params"],ArrowFunctionExpression:["params"],ObjectMethod:["params"],ClassMethod:["params"],ClassPrivateMethod:["params"],ForInStatement:["left"],ForOfStatement:["left"],ClassDeclaration:["id"],ClassExpression:["id"],RestElement:["argument"],UpdateExpression:["argument"],ObjectProperty:["value"],AssignmentPattern:["left"],ArrayPattern:["elements"],ObjectPattern:["properties"],VariableDeclaration:["declarations"],VariableDeclarator:["id"]};fg.keys=Nz;function dl(s){switch(s.type){case"ImportSpecifier":{let e=s.imported;return{importedName:e.type==="Identifier"?e.name:e.value,localName:s.local.name}}case"ImportDefaultSpecifier":return{importedName:"default",localName:s.local.name};case"ImportNamespaceSpecifier":return{importedName:"*",localName:s.local.name}}throw new TypeError("Unknown import specifier")}var mg=(s,e)=>{if(s.node.source.value==="@geajs/core"){if(s.node.importKind==="type"&&s.node.specifiers.some(t=>el(t)))throw new Error("Type-only default imports from @geajs/core are not supported: the Gea default facade is runtime-only.");e.hasGeaImport=!0;for(let t of s.node.specifiers){if(Kx(t))throw new Error("Namespace imports from @geajs/core are not supported: @geastack/core does not expose the same module namespace.");let i=dl(t);if(i.importedName==="default"){e.defaultImports.push(t.local);continue}if(i.importedName!=="Component"&&i.importedName!=="Store")throw new Error(`Unsupported @geajs/core export "${i.importedName}". ZodiaChain currently maps only Component and Store to @geastack/core.`);e.specifiers.push(t)}}},yg=s=>{if(s.node.source.value!=="@geajs/core")return;s.node.source.value="@geastack/core";let e=s.node.specifiers.length>0;s.node.specifiers=s.node.specifiers.filter(t=>{if(el(t))return!1;if(qx(t)){let i=t.imported;return(i.type==="Identifier"?i.name:i.value)!=="default"}return!0}),e&&s.node.specifiers.length===0&&s.remove()};var Tg=(s,e)=>{let t=s.get("superClass");if(!t.node)return;let i=a=>{if(a.isIdentifier())return e.specifiers.some(o=>{let c=dl(o);return c.localName===a.node.name&&c.importedName==="Component"});if(a.isMemberExpression()&&!a.node.computed){let o=a.get("object"),c=a.get("property");if(o.isIdentifier()&&c.isIdentifier({name:"Component"}))return e.defaultImports.some(l=>l.name===o.node.name)}return!1},r=null;if(t.isIdentifier()||t.isMemberExpression())i(t)&&(r=t);else if(t.isCallExpression()){for(let a of t.get("arguments"))if((a.isIdentifier()||a.isMemberExpression())&&i(a)){r=a;break}}if(!r)return;let n=!1;for(let a of s.get("body").get("body"))!a.isClassMethod()||!a.get("key").isIdentifier({name:"template"})||a.traverse({JSXExpressionContainer(o){o.get("expression").isJSXEmptyExpression()||(n=!0)},JSXSpreadAttribute(){n=!0},JSXOpeningElement(o){let c=o.get("name");(c.isJSXIdentifier()&&/^[A-Z]/.test(c.node.name)||c.isJSXMemberExpression()||c.isJSXNamespacedName())&&(n=!0)}});n&&e.reactiveSuperClasses.push(r)};function ml(){return{name:"@geastack-community/zodiachain",instantiate(s){return{...Sg.inertPluginInstance,transformSource(e){let{fileName:t,text:i}=e;if(t.includes("node_modules")||!i.includes("@geajs/core"))return null;let r={hasGeaImport:!1,specifiers:[],defaultImports:[],reactiveSuperClasses:[]};try{let n=Zl(i,{sourceType:"module",plugins:["typescript","jsx"]});return Me(n,{Program:{enter(a){a.traverse({ImportDeclaration(o){mg(o,r)}})},exit(a){a.traverse({ImportDeclaration(m){yg(m)}});let o=[],c=null;if(r.reactiveSuperClasses.length>0){c=a.scope.generateUidIdentifier("ZodiaReactiveComponent"),o.push(Di(ft(c),Ht("ReactiveComponent")));for(let m of r.reactiveSuperClasses)m.node&&m.replaceWith(ft(c))}let l=null,u=null;r.defaultImports.length>0&&(l=a.scope.generateUidIdentifier("ZodiaGeaComponent"),u=a.scope.generateUidIdentifier("ZodiaGeaStore"),o.push(Di(ft(l),Ht("Component")),Di(ft(u),Ht("Store"))));let f=[];if(o.length>0&&f.push(fl(o,ll("@geastack/core"))),l&&u)for(let m of r.defaultImports)f.push(pl("const",[hl(ft(m),ul([cn(Ht("Component"),ft(l)),cn(Ht("Store"),ft(u))]))]));a.node.body.unshift(...f)}},ClassDeclaration(a,o){Tg(a,o)}},null,r),r.hasGeaImport?Ar(n,{},i).code:null}catch(n){let a=n instanceof Error?n.message:String(n);throw new Error(`[@geastack-community/zodiachain] Failed to transform ${t}: ${a}`,{cause:n})}}}}}}var vz=ml,kz=ml;