prismic 1.6.1 → 1.7.0

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.
@@ -0,0 +1,97 @@
1
+ import{D as e,k as t}from"./string-Bf7FlVOu.mjs";import{promises as n}from"node:fs";var r=t(e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});function t(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var n=class{constructor(e,t,n){this.line=void 0,this.column=void 0,this.index=void 0,this.line=e,this.column=t,this.index=n}},r=class{constructor(e,t){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=e,this.end=t}};function i(e,t){let{line:r,column:i,index:a}=e;return new n(r,i+t,a+t)}let a=`BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED`;var o={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:a},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:a}};let s={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`},c=e=>e.type===`UpdateExpression`?s.UpdateExpression[`${e.prefix}`]:s[e.type];var l={AccessorIsGenerator:({kind:e})=>`A ${e}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:e})=>`Missing initializer in ${e} declaration.`,DecoratorArgumentsOutsideParentheses:`Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.`,DecoratorBeforeExport:`Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.`,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 { ... }'?`,DecoratorExportClass:`Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.`,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:e})=>`\`${e}\` 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:e,exportName:t})=>`A string literal cannot be used as an exported binding without \`from\`.\n- Did you mean \`export { '${e}' as '${t}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:`'from' is not allowed as an identifier after 'export default'.`,ForInOfLoopInitializer:({type:e})=>`'${e===`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:e})=>`Unsyntactic ${e===`BreakStatement`?`break`:`continue`}.`,IllegalLanguageModeDirective:`Illegal 'use strict' directive in function with non-simple parameter list.`,IllegalReturn:`'return' outside of function.`,ImportAttributesUseAssert:"The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedImportAssert` parser plugin to suppress this error.",ImportBindingIsString:({importName:e})=>`A string literal cannot be used as an imported binding.\n- Did you mean \`import { "${e}" as foo }\`?`,ImportCallArity:"`import()` requires exactly one or two arguments.",ImportCallNotNewExpression:`Cannot use new with import(...).`,ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',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.`,InvalidDecimal:`Invalid decimal.`,InvalidDigit:({radix:e})=>`Expected number in radix ${e}.`,InvalidEscapeSequence:`Bad character escape sequence.`,InvalidEscapeSequenceTemplate:`Invalid escape sequence in template.`,InvalidEscapedReservedWord:({reservedWord:e})=>`Escape sequence in keyword ${e}.`,InvalidIdentifier:({identifierName:e})=>`Invalid identifier ${e}.`,InvalidLhs:({ancestor:e})=>`Invalid left-hand side in ${c(e)}.`,InvalidLhsBinding:({ancestor:e})=>`Binding invalid left-hand side in ${c(e)}.`,InvalidLhsOptionalChaining:({ancestor:e})=>`Invalid optional chaining in the left-hand side of ${c(e)}.`,InvalidNumber:`Invalid number.`,InvalidOrMissingExponent:`Floating-point numbers require a valid exponent after the 'e'.`,InvalidOrUnexpectedToken:({unexpected:e})=>`Unexpected character '${e}'.`,InvalidParenthesizedAssignment:`Invalid parenthesized assignment pattern.`,InvalidPrivateFieldResolution:({identifierName:e})=>`Private name #${e} is not defined.`,InvalidPropertyBindingPattern:`Binding member expression.`,InvalidRecordProperty:`Only properties and spread elements are allowed in record definitions.`,InvalidRestAssignmentPattern:`Invalid rest operator's argument.`,LabelRedeclaration:({labelName:e})=>`Label '${e}' 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:e})=>`This experimental syntax requires enabling the parser plugin: ${e.map(e=>JSON.stringify(e)).join(`, `)}.`,MissingOneOfPlugins:({missingPlugin:e})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${e.map(e=>JSON.stringify(e)).join(`, `)}.`,MissingUnicodeEscape:`Expecting Unicode escape sequence \\uXXXX.`,MixingCoalesceWithLogical:`Nullish coalescing operator(??) requires parens when mixing with logical operators.`,ModuleAttributeDifferentFromType:"The only accepted module attribute is `type`.",ModuleAttributeInvalidValue:`Only string literals are allowed as module attribute values.`,ModuleAttributesWithDuplicateKeys:({key:e})=>`Duplicate key "${e}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:e})=>`An export name cannot include a lone surrogate, found '\\u${e.toString(16)}'.`,ModuleExportUndefined:({localName:e})=>`Export '${e}' 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:e})=>`Private names are only allowed in property accesses (\`obj.#${e}\`) or in \`in\` expressions (\`#${e} in obj\`).`,PrivateNameRedeclaration:({identifierName:e})=>`Duplicate private name #${e}.`,RecordExpressionBarIncorrectEndSyntaxType:`Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.`,RecordExpressionBarIncorrectStartSyntaxType:`Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.`,RecordExpressionHashIncorrectStartSyntaxType:`Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.`,RecordNoProto:`'__proto__' is not allowed in Record expressions.`,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.`,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.`,TupleExpressionBarIncorrectEndSyntaxType:`Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.`,TupleExpressionBarIncorrectStartSyntaxType:`Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.`,TupleExpressionHashIncorrectStartSyntaxType:`Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.`,UnexpectedArgumentPlaceholder:`Unexpected argument placeholder.`,UnexpectedAwaitAfterPipelineBody:`Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.`,UnexpectedDigitAfterHash:`Unexpected digit after hash token.`,UnexpectedImportExport:`'import' and 'export' may only appear at the top level.`,UnexpectedKeyword:({keyword:e})=>`Unexpected keyword '${e}'.`,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:e})=>`Unexpected reserved word '${e}'.`,UnexpectedSuper:`'super' is only allowed in object methods and classes.`,UnexpectedToken:({expected:e,unexpected:t})=>`Unexpected token${t?` '${t}'.`:``}${e?`, expected "${e}"`:``}`,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.`,UnsupportedBind:`Binding should be performed on object property.`,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:e,onlyValidPropertyName:t})=>`The only valid meta property for ${e} is ${e}.${t}.`,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:e})=>`Identifier '${e}' 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.`},u={StrictDelete:`Deleting local variable in strict mode.`,StrictEvalArguments:({referenceName:e})=>`Assigning to '${e}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:e})=>`Binding '${e}' 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.`},d={ParseExpressionEmptyInput:`Unexpected parseExpression() input: The input is empty or contains only comments.`,ParseExpressionExpectsEOF:({unexpected:e})=>`Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`${String.fromCodePoint(e)}\`.`};let f=new Set([`ArrowFunctionExpression`,`AssignmentExpression`,`ConditionalExpression`,`YieldExpression`]);var p=Object.assign({PipeBodyIsTighter:`Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.`,PipeTopicRequiresHackPipes:`Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.`,PipeTopicUnbound:`Topic reference is unbound; it must be inside a pipe body.`,PipeTopicUnconfiguredToken:({token:e})=>`Invalid topic token ${e}. In order to use ${e} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${e}" }.`,PipeTopicUnused:`Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.`,PipeUnparenthesizedBody:({type:e})=>`Hack-style pipe body cannot be an unparenthesized ${c({type:e})}; please wrap it in parentheses.`},{PipelineBodyNoArrow:`Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.`,PipelineBodySequenceExpression:`Pipeline body may not be a comma-separated sequence expression.`,PipelineHeadSequenceExpression:`Pipeline head should not be a comma-separated sequence expression.`,PipelineTopicUnused:`Pipeline is in topic style but does not use topic reference.`,PrimaryTopicNotAllowed:`Topic reference was used in a lexical context without topic binding.`,PrimaryTopicRequiresSmartPipeline:`Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.`});let m=[`message`];function h(e,t,n){Object.defineProperty(e,t,{enumerable:!1,configurable:!0,value:n})}function g({toMessage:e,code:t,reasonCode:r,syntaxPlugin:i}){let a=r===`MissingPlugin`||r===`MissingOneOfPlugins`,o={AccessorCannotDeclareThisParameter:`AccesorCannotDeclareThisParameter`,AccessorCannotHaveTypeParameters:`AccesorCannotHaveTypeParameters`,ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:`ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference`,SetAccessorCannotHaveOptionalParameter:`SetAccesorCannotHaveOptionalParameter`,SetAccessorCannotHaveRestParameter:`SetAccesorCannotHaveRestParameter`,SetAccessorCannotHaveReturnType:`SetAccesorCannotHaveReturnType`};return o[r]&&(r=o[r]),function o(s,c){let l=SyntaxError();return l.code=t,l.reasonCode=r,l.loc=s,l.pos=s.index,l.syntaxPlugin=i,a&&(l.missingPlugin=c.missingPlugin),h(l,`clone`,function(e={}){let{line:t,column:r,index:i}=e.loc??s;return o(new n(t,r,i),Object.assign({},c,e.details))}),h(l,`details`,c),Object.defineProperty(l,`message`,{configurable:!0,get(){let t=`${e(c)} (${s.line}:${s.column})`;return this.message=t,t},set(e){Object.defineProperty(this,`message`,{value:e,writable:!0})}}),l}}function _(e,n){if(Array.isArray(e))return t=>_(t,e[0]);let r={};for(let i of Object.keys(e)){let a=e[i],o=typeof a==`string`?{message:()=>a}:typeof a==`function`?{message:a}:a,{message:s}=o,c=t(o,m),l=typeof s==`string`?()=>s:s;r[i]=g(Object.assign({code:`BABEL_PARSER_SYNTAX_ERROR`,reasonCode:i,toMessage:l},n?{syntaxPlugin:n}:{},c))}return r}let v=Object.assign({},_(o),_(l),_(u),_(d),_`pipelineOperator`(p));function y(){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,tokens:!1,createImportExpressions:!1,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0}}function b(e){let t=y();if(e==null)return t;if(e.annexB!=null&&e.annexB!==!1)throw Error("The `annexB` option can only be set to `false`.");for(let n of Object.keys(t))e[n]!=null&&(t[n]=e[n]);if(t.startLine===1)e.startIndex==null&&t.startColumn>0?t.startIndex=t.startColumn:e.startColumn==null&&t.startIndex>0&&(t.startColumn=t.startIndex);else if((e.startColumn==null||e.startIndex==null)&&e.startIndex!=null)throw Error("With a `startLine > 1` you must also specify `startIndex` and `startColumn`.");if(t.sourceType===`commonjs`){if(e.allowAwaitOutsideFunction!=null)throw Error("The `allowAwaitOutsideFunction` option cannot be used with `sourceType: 'commonjs'`.");if(e.allowReturnOutsideFunction!=null)throw Error("`sourceType: 'commonjs'` implies `allowReturnOutsideFunction: true`, please remove the `allowReturnOutsideFunction` option or use `sourceType: 'script'`.");if(e.allowNewTargetOutsideFunction!=null)throw Error("`sourceType: 'commonjs'` implies `allowNewTargetOutsideFunction: true`, please remove the `allowNewTargetOutsideFunction` option or use `sourceType: 'script'`.")}return t}let{defineProperty:ee}=Object,x=(e,t)=>{e&&ee(e,t,{enumerable:!1,value:e[t]})};function S(e){return x(e.loc.start,`index`),x(e.loc.end,`index`),e}var te=e=>class extends e{parse(){let e=S(super.parse());return this.optionFlags&256&&(e.tokens=e.tokens.map(S)),e}parseRegExpLiteral({pattern:e,flags:t}){let n=null;try{n=new RegExp(e,t)}catch{}let r=this.estreeParseLiteral(n);return r.regex={pattern:e,flags:t},r}parseBigIntLiteral(e){let t;try{t=BigInt(e)}catch{t=null}let n=this.estreeParseLiteral(t);return n.bigint=String(n.value||e),n}parseDecimalLiteral(e){let t=this.estreeParseLiteral(null);return t.decimal=String(t.value||e),t}estreeParseLiteral(e){return this.parseLiteral(e,`Literal`)}parseStringLiteral(e){return this.estreeParseLiteral(e)}parseNumericLiteral(e){return this.estreeParseLiteral(e)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(e){return this.estreeParseLiteral(e)}estreeParseChainExpression(e,t){let n=this.startNodeAtNode(e);return n.expression=e,this.finishNodeAt(n,`ChainExpression`,t)}directiveToStmt(e){let t=e.value;delete e.value,this.castNodeTo(t,`Literal`),t.raw=t.extra.raw,t.value=t.extra.expressionValue;let n=this.castNodeTo(e,`ExpressionStatement`);return n.expression=t,n.directive=t.extra.rawValue,delete t.extra,n}fillOptionalPropertiesForTSESLint(e){}cloneEstreeStringLiteral(e){let{start:t,end:n,loc:r,range:i,raw:a,value:o}=e,s=Object.create(e.constructor.prototype);return s.type=`Literal`,s.start=t,s.end=n,s.loc=r,s.range=i,s.raw=a,s.value=o,s}initFunction(e,t){super.initFunction(e,t),e.expression=!1}checkDeclaration(e){e!=null&&this.isObjectProperty(e)?this.checkDeclaration(e.value):super.checkDeclaration(e)}getObjectOrClassMethodParams(e){return e.value.params}isValidDirective(e){var t;return e.type===`ExpressionStatement`&&e.expression.type===`Literal`&&typeof e.expression.value==`string`&&!((t=e.expression.extra)!=null&&t.parenthesized)}parseBlockBody(e,t,n,r,i){super.parseBlockBody(e,t,n,r,i),e.body=e.directives.map(e=>this.directiveToStmt(e)).concat(e.body),delete e.directives}parsePrivateName(){let e=super.parsePrivateName();return this.getPluginOption(`estree`,`classFeatures`)?this.convertPrivateNameToPrivateIdentifier(e):e}convertPrivateNameToPrivateIdentifier(e){let t=super.getPrivateNameSV(e);return delete e.id,e.name=t,this.castNodeTo(e,`PrivateIdentifier`)}isPrivateName(e){return this.getPluginOption(`estree`,`classFeatures`)?e.type===`PrivateIdentifier`:super.isPrivateName(e)}getPrivateNameSV(e){return this.getPluginOption(`estree`,`classFeatures`)?e.name:super.getPrivateNameSV(e)}parseLiteral(e,t){let n=super.parseLiteral(e,t);return n.raw=n.extra.raw,delete n.extra,n}parseFunctionBody(e,t,n=!1){super.parseFunctionBody(e,t,n),e.expression=e.body.type!==`BlockStatement`}parseMethod(e,t,n,r,i,a,o=!1){let s=this.startNode();s.kind=e.kind,s=super.parseMethod(s,t,n,r,i,a,o),delete s.kind;let{typeParameters:c}=e;return c&&(delete e.typeParameters,s.typeParameters=c,this.resetStartLocationFromNode(s,c)),e.value=this.castNodeTo(s,`FunctionExpression`),a===`ClassPrivateMethod`&&(e.computed=!1),a===`ObjectMethod`?(e.kind===`method`&&(e.kind=`init`),e.shorthand=!1,this.finishNode(e,`Property`)):this.finishNode(e,`MethodDefinition`)}nameIsConstructor(e){return e.type===`Literal`?e.value===`constructor`:super.nameIsConstructor(e)}parseClassProperty(...e){let t=super.parseClassProperty(...e);return this.getPluginOption(`estree`,`classFeatures`)&&this.castNodeTo(t,`PropertyDefinition`),t}parseClassPrivateProperty(...e){let t=super.parseClassPrivateProperty(...e);return this.getPluginOption(`estree`,`classFeatures`)?(this.castNodeTo(t,`PropertyDefinition`),t.computed=!1,t):t}parseClassAccessorProperty(e){let t=super.parseClassAccessorProperty(e);return this.getPluginOption(`estree`,`classFeatures`)&&(t.abstract&&this.hasPlugin(`typescript`)?(delete t.abstract,this.castNodeTo(t,`TSAbstractAccessorProperty`)):this.castNodeTo(t,`AccessorProperty`)),t}parseObjectProperty(e,t,n,r){let i=super.parseObjectProperty(e,t,n,r);return i&&(i.kind=`init`,this.castNodeTo(i,`Property`)),i}finishObjectProperty(e){return e.kind=`init`,this.finishNode(e,`Property`)}isValidLVal(e,t,n,r){return e===`Property`?`value`:super.isValidLVal(e,t,n,r)}isAssignable(e,t){return e!=null&&this.isObjectProperty(e)?this.isAssignable(e.value,t):super.isAssignable(e,t)}toAssignable(e,t=!1){if(e!=null&&this.isObjectProperty(e)){let{key:n,value:r}=e;this.isPrivateName(n)&&this.classScope.usePrivateName(this.getPrivateNameSV(n),n.loc.start),this.toAssignable(r,t)}else super.toAssignable(e,t)}toAssignableObjectExpressionProp(e,t,n){e.type===`Property`&&(e.kind===`get`||e.kind===`set`)?this.raise(v.PatternHasAccessor,e.key):e.type===`Property`&&e.method?this.raise(v.PatternHasMethod,e.key):super.toAssignableObjectExpressionProp(e,t,n)}finishCallExpression(e,t){let n=super.finishCallExpression(e,t);return n.callee.type===`Import`?(this.castNodeTo(n,`ImportExpression`),n.source=n.arguments[0],n.options=n.arguments[1]??null,n.attributes=n.arguments[1]??null,delete n.arguments,delete n.callee):n.type===`OptionalCallExpression`?this.castNodeTo(n,`CallExpression`):n.optional=!1,n}toReferencedArguments(e){e.type!==`ImportExpression`&&super.toReferencedArguments(e)}parseExport(e,t){let n=this.state.lastTokStartLoc,r=super.parseExport(e,t);switch(r.type){case`ExportAllDeclaration`:r.exported=null;break;case`ExportNamedDeclaration`:r.specifiers.length===1&&r.specifiers[0].type===`ExportNamespaceSpecifier`&&(this.castNodeTo(r,`ExportAllDeclaration`),r.exported=r.specifiers[0].exported,delete r.specifiers);case`ExportDefaultDeclaration`:{let{declaration:e}=r;e?.type===`ClassDeclaration`&&e.decorators?.length>0&&e.start===r.start&&this.resetStartLocation(r,n)}break}return r}stopParseSubscript(e,t){let n=super.stopParseSubscript(e,t);return t.optionalChainMember?this.estreeParseChainExpression(n,e.loc.end):n}parseMember(e,t,n,r,i){let a=super.parseMember(e,t,n,r,i);return a.type===`OptionalMemberExpression`?this.castNodeTo(a,`MemberExpression`):a.optional=!1,a}isOptionalMemberExpression(e){return e.type===`ChainExpression`?e.expression.type===`MemberExpression`:super.isOptionalMemberExpression(e)}hasPropertyAsPrivateName(e){return e.type===`ChainExpression`&&(e=e.expression),super.hasPropertyAsPrivateName(e)}isObjectProperty(e){return e.type===`Property`&&e.kind===`init`&&!e.method}isObjectMethod(e){return e.type===`Property`&&(e.method||e.kind===`get`||e.kind===`set`)}castNodeTo(e,t){let n=super.castNodeTo(e,t);return this.fillOptionalPropertiesForTSESLint(n),n}cloneIdentifier(e){let t=super.cloneIdentifier(e);return this.fillOptionalPropertiesForTSESLint(t),t}cloneStringLiteral(e){return e.type===`Literal`?this.cloneEstreeStringLiteral(e):super.cloneStringLiteral(e)}finishNodeAt(e,t,n){return S(super.finishNodeAt(e,t,n))}finishNode(e,t){let n=super.finishNode(e,t);return this.fillOptionalPropertiesForTSESLint(n),n}resetStartLocation(e,t){super.resetStartLocation(e,t),S(e)}resetEndLocation(e,t=this.state.lastTokEndLoc){super.resetEndLocation(e,t),S(e)}},ne=class{constructor(e,t){this.token=void 0,this.preserveSpace=void 0,this.token=e,this.preserveSpace=!!t}};let C={brace:new ne(`{`),j_oTag:new ne(`<tag`),j_cTag:new ne(`</tag`),j_expr:new ne(`<tag>...</tag>`,!0)};C.template=new ne("`",!0);var re=class{constructor(e,t={}){this.label=void 0,this.keyword=void 0,this.beforeExpr=void 0,this.startsExpr=void 0,this.rightAssociative=void 0,this.isLoop=void 0,this.isAssign=void 0,this.prefix=void 0,this.postfix=void 0,this.binop=void 0,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?null:t.binop,this.updateContext=null}};let ie=new Map;function w(e,t={}){t.keyword=e;let n=O(e,t);return ie.set(e,n),n}function T(e,t){return O(e,{beforeExpr:!0,binop:t})}let E=-1,D=[],ae=[],oe=[],se=[],ce=[],le=[];function O(e,t={}){return++E,ae.push(e),oe.push(t.binop??-1),se.push(t.beforeExpr??!1),ce.push(t.startsExpr??!1),le.push(t.prefix??!1),D.push(new re(e,t)),E}function k(e,t={}){return++E,ie.set(e,E),ae.push(e),oe.push(t.binop??-1),se.push(t.beforeExpr??!1),ce.push(t.startsExpr??!1),le.push(t.prefix??!1),D.push(new re(`name`,t)),E}let ue={bracketL:O(`[`,{beforeExpr:!0,startsExpr:!0}),bracketHashL:O(`#[`,{beforeExpr:!0,startsExpr:!0}),bracketBarL:O(`[|`,{beforeExpr:!0,startsExpr:!0}),bracketR:O(`]`),bracketBarR:O(`|]`),braceL:O(`{`,{beforeExpr:!0,startsExpr:!0}),braceBarL:O(`{|`,{beforeExpr:!0,startsExpr:!0}),braceHashL:O(`#{`,{beforeExpr:!0,startsExpr:!0}),braceR:O(`}`),braceBarR:O(`|}`),parenL:O(`(`,{beforeExpr:!0,startsExpr:!0}),parenR:O(`)`),comma:O(`,`,{beforeExpr:!0}),semi:O(`;`,{beforeExpr:!0}),colon:O(`:`,{beforeExpr:!0}),doubleColon:O(`::`,{beforeExpr:!0}),dot:O(`.`),question:O(`?`,{beforeExpr:!0}),questionDot:O(`?.`),arrow:O(`=>`,{beforeExpr:!0}),template:O(`template`),ellipsis:O(`...`,{beforeExpr:!0}),backQuote:O("`",{startsExpr:!0}),dollarBraceL:O("${",{beforeExpr:!0,startsExpr:!0}),templateTail:O("...`",{startsExpr:!0}),templateNonTail:O("...${",{beforeExpr:!0,startsExpr:!0}),at:O(`@`),hash:O(`#`,{startsExpr:!0}),interpreterDirective:O(`#!...`),eq:O(`=`,{beforeExpr:!0,isAssign:!0}),assign:O(`_=`,{beforeExpr:!0,isAssign:!0}),slashAssign:O(`_=`,{beforeExpr:!0,isAssign:!0}),xorAssign:O(`_=`,{beforeExpr:!0,isAssign:!0}),moduloAssign:O(`_=`,{beforeExpr:!0,isAssign:!0}),incDec:O(`++/--`,{prefix:!0,postfix:!0,startsExpr:!0}),bang:O(`!`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),tilde:O(`~`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),doubleCaret:O(`^^`,{startsExpr:!0}),doubleAt:O(`@@`,{startsExpr:!0}),pipeline:T(`|>`,0),nullishCoalescing:T(`??`,1),logicalOR:T(`||`,1),logicalAND:T(`&&`,2),bitwiseOR:T(`|`,3),bitwiseXOR:T(`^`,4),bitwiseAND:T(`&`,5),equality:T(`==/!=/===/!==`,6),lt:T(`</>/<=/>=`,7),gt:T(`</>/<=/>=`,7),relational:T(`</>/<=/>=`,7),bitShift:T(`<</>>/>>>`,8),bitShiftL:T(`<</>>/>>>`,8),bitShiftR:T(`<</>>/>>>`,8),plusMin:O(`+/-`,{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:O(`%`,{binop:10,startsExpr:!0}),star:O(`*`,{binop:10}),slash:T(`/`,10),exponent:O(`**`,{beforeExpr:!0,binop:11,rightAssociative:!0}),_in:w(`in`,{beforeExpr:!0,binop:7}),_instanceof:w(`instanceof`,{beforeExpr:!0,binop:7}),_break:w(`break`),_case:w(`case`,{beforeExpr:!0}),_catch:w(`catch`),_continue:w(`continue`),_debugger:w(`debugger`),_default:w(`default`,{beforeExpr:!0}),_else:w(`else`,{beforeExpr:!0}),_finally:w(`finally`),_function:w(`function`,{startsExpr:!0}),_if:w(`if`),_return:w(`return`,{beforeExpr:!0}),_switch:w(`switch`),_throw:w(`throw`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),_try:w(`try`),_var:w(`var`),_const:w(`const`),_with:w(`with`),_new:w(`new`,{beforeExpr:!0,startsExpr:!0}),_this:w(`this`,{startsExpr:!0}),_super:w(`super`,{startsExpr:!0}),_class:w(`class`,{startsExpr:!0}),_extends:w(`extends`,{beforeExpr:!0}),_export:w(`export`),_import:w(`import`,{startsExpr:!0}),_null:w(`null`,{startsExpr:!0}),_true:w(`true`,{startsExpr:!0}),_false:w(`false`,{startsExpr:!0}),_typeof:w(`typeof`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:w(`void`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:w(`delete`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),_do:w(`do`,{isLoop:!0,beforeExpr:!0}),_for:w(`for`,{isLoop:!0}),_while:w(`while`,{isLoop:!0}),_as:k(`as`,{startsExpr:!0}),_assert:k(`assert`,{startsExpr:!0}),_async:k(`async`,{startsExpr:!0}),_await:k(`await`,{startsExpr:!0}),_defer:k(`defer`,{startsExpr:!0}),_from:k(`from`,{startsExpr:!0}),_get:k(`get`,{startsExpr:!0}),_let:k(`let`,{startsExpr:!0}),_meta:k(`meta`,{startsExpr:!0}),_of:k(`of`,{startsExpr:!0}),_sent:k(`sent`,{startsExpr:!0}),_set:k(`set`,{startsExpr:!0}),_source:k(`source`,{startsExpr:!0}),_static:k(`static`,{startsExpr:!0}),_using:k(`using`,{startsExpr:!0}),_yield:k(`yield`,{startsExpr:!0}),_asserts:k(`asserts`,{startsExpr:!0}),_checks:k(`checks`,{startsExpr:!0}),_exports:k(`exports`,{startsExpr:!0}),_global:k(`global`,{startsExpr:!0}),_implements:k(`implements`,{startsExpr:!0}),_intrinsic:k(`intrinsic`,{startsExpr:!0}),_infer:k(`infer`,{startsExpr:!0}),_is:k(`is`,{startsExpr:!0}),_mixins:k(`mixins`,{startsExpr:!0}),_proto:k(`proto`,{startsExpr:!0}),_require:k(`require`,{startsExpr:!0}),_satisfies:k(`satisfies`,{startsExpr:!0}),_keyof:k(`keyof`,{startsExpr:!0}),_readonly:k(`readonly`,{startsExpr:!0}),_unique:k(`unique`,{startsExpr:!0}),_abstract:k(`abstract`,{startsExpr:!0}),_declare:k(`declare`,{startsExpr:!0}),_enum:k(`enum`,{startsExpr:!0}),_module:k(`module`,{startsExpr:!0}),_namespace:k(`namespace`,{startsExpr:!0}),_interface:k(`interface`,{startsExpr:!0}),_type:k(`type`,{startsExpr:!0}),_opaque:k(`opaque`,{startsExpr:!0}),name:O(`name`,{startsExpr:!0}),placeholder:O(`%%`,{startsExpr:!0}),string:O(`string`,{startsExpr:!0}),num:O(`num`,{startsExpr:!0}),bigint:O(`bigint`,{startsExpr:!0}),decimal:O(`decimal`,{startsExpr:!0}),regexp:O(`regexp`,{startsExpr:!0}),privateName:O(`#name`,{startsExpr:!0}),eof:O(`eof`),jsxName:O(`jsxName`),jsxText:O(`jsxText`,{beforeExpr:!0}),jsxTagStart:O(`jsxTagStart`,{startsExpr:!0}),jsxTagEnd:O(`jsxTagEnd`)};function A(e){return e>=93&&e<=133}function de(e){return e<=92}function j(e){return e>=58&&e<=133}function fe(e){return e>=58&&e<=137}function pe(e){return se[e]}function me(e){return ce[e]}function he(e){return e>=29&&e<=33}function ge(e){return e>=129&&e<=131}function _e(e){return e>=90&&e<=92}function ve(e){return e>=58&&e<=92}function ye(e){return e>=39&&e<=59}function be(e){return e===34}function xe(e){return le[e]}function Se(e){return e>=121&&e<=123}function Ce(e){return e>=124&&e<=130}function we(e){return ae[e]}function Te(e){return oe[e]}function M(e){return e===57}function Ee(e){return e>=24&&e<=25}function N(e){return D[e]}D[8].updateContext=e=>{e.pop()},D[5].updateContext=D[7].updateContext=D[23].updateContext=e=>{e.push(C.brace)},D[22].updateContext=e=>{e[e.length-1]===C.template?e.pop():e.push(C.template)},D[143].updateContext=e=>{e.push(C.j_expr,C.j_oTag)};let P=`ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-࢏ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚ౜ౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ೜-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ƛ꟱-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ`,De=`·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-᫝᫠-᫫ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・`,Oe=RegExp(`[`+P+`]`),ke=RegExp(`[`+P+De+`]`);P=De=null;let Ae=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],je=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239];function F(e,t){let n=65536;for(let r=0,i=t.length;r<i;r+=2){if(n+=t[r],n>e)return!1;if(n+=t[r+1],n>=e)return!0}return!1}function Me(e){return e<65?e===36:e<=90?!0:e<97?e===95:e<=122?!0:e<=65535?e>=170&&Oe.test(String.fromCharCode(e)):F(e,Ae)}function Ne(e){return e<48?e===36:e<58?!0:e<65?!1:e<=90?!0:e<97?e===95:e<=122?!0:e<=65535?e>=170&&ke.test(String.fromCharCode(e)):F(e,Ae)||F(e,je)}let Pe={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`.split(`.`),strict:[`implements`,`interface`,`let`,`package`,`private`,`protected`,`public`,`static`,`yield`],strictBind:[`eval`,`arguments`]},Fe=new Set(Pe.keyword),Ie=new Set(Pe.strict),Le=new Set(Pe.strictBind);function Re(e,t){return t&&e===`await`||e===`enum`}function ze(e,t){return Re(e,t)||Ie.has(e)}function Be(e){return Le.has(e)}function Ve(e,t){return ze(e,t)||Be(e)}function He(e){return Fe.has(e)}function Ue(e,t,n){return e===64&&t===64&&Me(n)}let We=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`.split(`.`));function Ge(e){return We.has(e)}var Ke=class{constructor(e){this.flags=0,this.names=new Map,this.firstLexicalName=``,this.flags=e}},qe=class{constructor(e,t){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=new Map,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&1731)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 Ke(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,n){let r=this.currentScope();if(t&8||t&16){this.checkRedeclarationInScope(r,e,t,n);let i=r.names.get(e)||0;t&16?i|=4:(r.firstLexicalName||=e,i|=2),r.names.set(e,i),t&8&&this.maybeExportDefined(r,e)}else if(t&4)for(let i=this.scopeStack.length-1;i>=0&&(r=this.scopeStack[i],this.checkRedeclarationInScope(r,e,t,n),r.names.set(e,(r.names.get(e)||0)|1),this.maybeExportDefined(r,e),!(r.flags&1667));--i);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,n,r){this.isRedeclaredInScope(e,t,n)&&this.parser.raise(v.VarRedeclaration,r,{identifierName:t})}isRedeclaredInScope(e,t,n){if(!(n&1))return!1;if(n&8)return e.names.has(t);let r=e.names.get(t)||0;return n&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.loc.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&1667)return t}}currentThisScopeFlags(){for(let e=this.scopeStack.length-1;;e--){let{flags:t}=this.scopeStack[e];if(t&1731&&!(t&4))return t}}},Je=class extends Ke{constructor(...e){super(...e),this.declareFunctions=new Set}},Ye=class extends qe{createScope(e){return new Je(e)}declareName(e,t,n){let r=this.currentScope();if(t&2048){this.checkRedeclarationInScope(r,e,t,n),this.maybeExportDefined(r,e),r.declareFunctions.add(e);return}super.declareName(e,t,n)}isRedeclaredInScope(e,t,n){if(super.isRedeclaredInScope(e,t,n))return!0;if(n&2048&&!e.declareFunctions.has(t)){let n=e.names.get(t);return(n&4)>0||(n&2)>0}return!1}checkLocalExport(e){this.scopeStack[0].declareFunctions.has(e.name)||super.checkLocalExport(e)}};let Xe=new Set([`_`,`any`,`bool`,`boolean`,`empty`,`extends`,`false`,`interface`,`mixed`,`null`,`number`,`static`,`string`,`true`,`typeof`,`void`]),I=_`flow`({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:e})=>`Cannot overwrite reserved type ${e}.`,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:e,enumName:t})=>`Boolean enum members need to be initialized. Use either \`${e} = true,\` or \`${e} = false,\` in enum \`${t}\`.`,EnumDuplicateMemberName:({memberName:e,enumName:t})=>`Enum member names need to be unique, but the name \`${e}\` has already been used before in enum \`${t}\`.`,EnumInconsistentMemberValues:({enumName:e})=>`Enum \`${e}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:e,enumName:t})=>`Enum type \`${e}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${t}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:e})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${e}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:e,memberName:t,explicitType:n})=>`Enum \`${e}\` has type \`${n}\`, so the initializer of \`${t}\` needs to be a ${n} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:e,memberName:t})=>`Symbol enum members cannot be initialized. Use \`${t},\` in enum \`${e}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:e,memberName:t})=>`The enum member initializer for \`${t}\` needs to be a literal (either a boolean, number, or string) in enum \`${e}\`.`,EnumInvalidMemberName:({enumName:e,memberName:t,suggestion:n})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${t}\`, consider using \`${n}\`, in enum \`${e}\`.`,EnumNumberMemberNotInitialized:({enumName:e,memberName:t})=>`Number enum members need to be initialized, e.g. \`${t} = 1\` in enum \`${e}\`.`,EnumStringMemberInconsistentlyInitialized:({enumName:e})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${e}\`.`,GetterMayNotHaveThisParam:"A getter cannot have a `this` parameter.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` or `typeof` keyword.",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:Object.assign({message:`A binding pattern parameter cannot be optional in an implementation signature.`},{reasonCode:`OptionalBindingPattern`}),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:e})=>`Unexpected reserved type ${e}.`,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:e,suggestion:t})=>`\`declare export ${e}\` is not supported. Use \`${t}\` instead.`,UnsupportedStatementInDeclareModule:`Only declares and type imports are allowed inside declare module.`,UnterminatedFlowComment:`Unterminated flow-comment.`});function Ze(e){return e.type===`DeclareExportAllDeclaration`||e.type===`DeclareExportDeclaration`&&(!e.declaration||e.declaration.type!==`TypeAlias`&&e.declaration.type!==`InterfaceDeclaration`)}function Qe(e){return e.importKind===`type`||e.importKind===`typeof`}let $e={const:`declare export var`,let:`declare export var`,type:`export type`,interface:`export interface`};function et(e,t){let n=[],r=[];for(let i=0;i<e.length;i++)(t(e[i],i,e)?n:r).push(e[i]);return[n,r]}let tt=/\*?\s*@((?:no)?flow)\b/;var nt=e=>class extends e{constructor(...e){super(...e),this.flowPragma=void 0}getScopeHandler(){return Ye}shouldParseTypes(){return this.getPluginOption(`flow`,`all`)||this.flowPragma===`flow`}finishToken(e,t){e!==134&&e!==13&&e!==28&&this.flowPragma===void 0&&(this.flowPragma=null),super.finishToken(e,t)}addComment(e){if(this.flowPragma===void 0){let t=tt.exec(e.value);if(t)if(t[1]===`flow`)this.flowPragma=`flow`;else if(t[1]===`noflow`)this.flowPragma=`noflow`;else throw Error(`Unexpected flow pragma`)}super.addComment(e)}flowParseTypeInitialiser(e){let t=this.state.inType;this.state.inType=!0,this.expect(e||14);let n=this.flowParseType();return this.state.inType=t,n}flowParsePredicate(){let e=this.startNode(),t=this.state.startLoc;return this.next(),this.expectContextual(110),this.state.lastTokStartLoc.index>t.index+1&&this.raise(I.UnexpectedSpaceBetweenModuloChecks,t),this.eat(10)?(e.value=super.parseExpression(),this.expect(11),this.finishNode(e,`DeclaredPredicate`)):this.finishNode(e,`InferredPredicate`)}flowParseTypeAndPredicateInitialiser(){let e=this.state.inType;this.state.inType=!0,this.expect(14);let t=null,n=null;return this.match(54)?(this.state.inType=e,n=this.flowParsePredicate()):(t=this.flowParseType(),this.state.inType=e,this.match(54)&&(n=this.flowParsePredicate())),[t,n]}flowParseDeclareClass(e){return this.next(),this.flowParseInterfaceish(e,!0),this.finishNode(e,`DeclareClass`)}flowParseDeclareFunction(e){this.next();let t=e.id=this.parseIdentifier(),n=this.startNode(),r=this.startNode();this.match(47)?n.typeParameters=this.flowParseTypeParameterDeclaration():n.typeParameters=null,this.expect(10);let i=this.flowParseFunctionTypeParams();return n.params=i.params,n.rest=i.rest,n.this=i._this,this.expect(11),[n.returnType,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),r.typeAnnotation=this.finishNode(n,`FunctionTypeAnnotation`),t.typeAnnotation=this.finishNode(r,`TypeAnnotation`),this.resetEndLocation(t),this.semicolon(),this.scope.declareName(e.id.name,2048,e.id.loc.start),this.finishNode(e,`DeclareFunction`)}flowParseDeclare(e,t){if(this.match(80))return this.flowParseDeclareClass(e);if(this.match(68))return this.flowParseDeclareFunction(e);if(this.match(74))return this.flowParseDeclareVariable(e);if(this.eatContextual(127))return this.match(16)?this.flowParseDeclareModuleExports(e):(t&&this.raise(I.NestedDeclareModule,this.state.lastTokStartLoc),this.flowParseDeclareModule(e));if(this.isContextual(130))return this.flowParseDeclareTypeAlias(e);if(this.isContextual(131))return this.flowParseDeclareOpaqueType(e);if(this.isContextual(129))return this.flowParseDeclareInterface(e);if(this.match(82))return this.flowParseDeclareExportDeclaration(e,t);throw this.unexpected()}flowParseDeclareVariable(e){return this.next(),e.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(e.id.name,5,e.id.loc.start),this.semicolon(),this.finishNode(e,`DeclareVariable`)}flowParseDeclareModule(e){this.scope.enter(0),this.match(134)?e.id=super.parseExprAtom():e.id=this.parseIdentifier();let t=e.body=this.startNode(),n=t.body=[];for(this.expect(5);!this.match(8);){let e=this.startNode();this.match(83)?(this.next(),!this.isContextual(130)&&!this.match(87)&&this.raise(I.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc),n.push(super.parseImport(e))):(this.expectContextual(125,I.UnsupportedStatementInDeclareModule),n.push(this.flowParseDeclare(e,!0)))}this.scope.exit(),this.expect(8),this.finishNode(t,`BlockStatement`);let r=null,i=!1;return n.forEach(e=>{Ze(e)?(r===`CommonJS`&&this.raise(I.AmbiguousDeclareModuleKind,e),r=`ES`):e.type===`DeclareModuleExports`&&(i&&this.raise(I.DuplicateDeclareModuleExports,e),r===`ES`&&this.raise(I.AmbiguousDeclareModuleKind,e),r=`CommonJS`,i=!0)}),e.kind=r||`CommonJS`,this.finishNode(e,`DeclareModule`)}flowParseDeclareExportDeclaration(e,t){if(this.expect(82),this.eat(65))return this.match(68)||this.match(80)?e.declaration=this.flowParseDeclare(this.startNode()):(e.declaration=this.flowParseType(),this.semicolon()),e.default=!0,this.finishNode(e,`DeclareExportDeclaration`);if(this.match(75)||this.isLet()||(this.isContextual(130)||this.isContextual(129))&&!t){let e=this.state.value;throw this.raise(I.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:e,suggestion:$e[e]})}if(this.match(74)||this.match(68)||this.match(80)||this.isContextual(131))return e.declaration=this.flowParseDeclare(this.startNode()),e.default=!1,this.finishNode(e,`DeclareExportDeclaration`);if(this.match(55)||this.match(5)||this.isContextual(129)||this.isContextual(130)||this.isContextual(131))return e=this.parseExport(e,null),e.type===`ExportNamedDeclaration`?(e.default=!1,delete e.exportKind,this.castNodeTo(e,`DeclareExportDeclaration`)):this.castNodeTo(e,`DeclareExportAllDeclaration`);throw this.unexpected()}flowParseDeclareModuleExports(e){return this.next(),this.expectContextual(111),e.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(e,`DeclareModuleExports`)}flowParseDeclareTypeAlias(e){this.next();let t=this.flowParseTypeAlias(e);return this.castNodeTo(t,`DeclareTypeAlias`),t}flowParseDeclareOpaqueType(e){this.next();let t=this.flowParseOpaqueType(e,!0);return this.castNodeTo(t,`DeclareOpaqueType`),t}flowParseDeclareInterface(e){return this.next(),this.flowParseInterfaceish(e,!1),this.finishNode(e,`DeclareInterface`)}flowParseInterfaceish(e,t){if(e.id=this.flowParseRestrictedIdentifier(!t,!0),this.scope.declareName(e.id.name,t?17:8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.extends=[],this.eat(81))do e.extends.push(this.flowParseInterfaceExtends());while(!t&&this.eat(12));if(t){if(e.implements=[],e.mixins=[],this.eatContextual(117))do e.mixins.push(this.flowParseInterfaceExtends());while(this.eat(12));if(this.eatContextual(113))do e.implements.push(this.flowParseInterfaceExtends());while(this.eat(12))}e.body=this.flowParseObjectType({allowStatic:t,allowExact:!1,allowSpread:!1,allowProto:t,allowInexact:!1})}flowParseInterfaceExtends(){let e=this.startNode();return e.id=this.flowParseQualifiedTypeIdentifier(),this.match(47)?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,this.finishNode(e,`InterfaceExtends`)}flowParseInterface(e){return this.flowParseInterfaceish(e,!1),this.finishNode(e,`InterfaceDeclaration`)}checkNotUnderscore(e){e===`_`&&this.raise(I.UnexpectedReservedUnderscore,this.state.startLoc)}checkReservedType(e,t,n){Xe.has(e)&&this.raise(n?I.AssignReservedType:I.UnexpectedReservedType,t,{reservedType:e})}flowParseRestrictedIdentifier(e,t){return this.checkReservedType(this.state.value,this.state.startLoc,t),this.parseIdentifier(e)}flowParseTypeAlias(e){return e.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(e.id.name,8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(e,`TypeAlias`)}flowParseOpaqueType(e,t){return this.expectContextual(130),e.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(e.id.name,8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.supertype=null,this.match(14)&&(e.supertype=this.flowParseTypeInitialiser(14)),e.impltype=null,t||(e.impltype=this.flowParseTypeInitialiser(29)),this.semicolon(),this.finishNode(e,`OpaqueType`)}flowParseTypeParameter(e=!1){let t=this.state.startLoc,n=this.startNode(),r=this.flowParseVariance(),i=this.flowParseTypeAnnotatableIdentifier();return n.name=i.name,n.variance=r,n.bound=i.typeAnnotation,this.match(29)?(this.eat(29),n.default=this.flowParseType()):e&&this.raise(I.MissingTypeParamDefault,t),this.finishNode(n,`TypeParameter`)}flowParseTypeParameterDeclaration(){let e=this.state.inType,t=this.startNode();t.params=[],this.state.inType=!0,this.match(47)||this.match(143)?this.next():this.unexpected();let n=!1;do{let e=this.flowParseTypeParameter(n);t.params.push(e),e.default&&(n=!0),this.match(48)||this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=e,this.finishNode(t,`TypeParameterDeclaration`)}flowInTopLevelContext(e){if(this.curContext()!==C.brace){let t=this.state.context;this.state.context=[t[0]];try{return e()}finally{this.state.context=t}}else return e()}flowParseTypeParameterInstantiationInExpression(){if(this.reScan_lt()===47)return this.flowParseTypeParameterInstantiation()}flowParseTypeParameterInstantiation(){let e=this.startNode(),t=this.state.inType;return this.state.inType=!0,e.params=[],this.flowInTopLevelContext(()=>{this.expect(47);let t=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(48);)e.params.push(this.flowParseType()),this.match(48)||this.expect(12);this.state.noAnonFunctionType=t}),this.state.inType=t,!this.state.inType&&this.curContext()===C.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(e,`TypeParameterInstantiation`)}flowParseTypeParameterInstantiationCallOrNew(){if(this.reScan_lt()!==47)return null;let e=this.startNode(),t=this.state.inType;for(e.params=[],this.state.inType=!0,this.expect(47);!this.match(48);)e.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(48)||this.expect(12);return this.expect(48),this.state.inType=t,this.finishNode(e,`TypeParameterInstantiation`)}flowParseInterfaceType(){let e=this.startNode();if(this.expectContextual(129),e.extends=[],this.eat(81))do e.extends.push(this.flowParseInterfaceExtends());while(this.eat(12));return e.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(e,`InterfaceTypeAnnotation`)}flowParseObjectPropertyKey(){return this.match(135)||this.match(134)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(e,t,n){return e.static=t,this.lookahead().type===14?(e.id=this.flowParseObjectPropertyKey(),e.key=this.flowParseTypeInitialiser()):(e.id=null,e.key=this.flowParseType()),this.expect(3),e.value=this.flowParseTypeInitialiser(),e.variance=n,this.finishNode(e,`ObjectTypeIndexer`)}flowParseObjectTypeInternalSlot(e,t){return e.static=t,e.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(47)||this.match(10)?(e.method=!0,e.optional=!1,e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start))):(e.method=!1,this.eat(17)&&(e.optional=!0),e.value=this.flowParseTypeInitialiser()),this.finishNode(e,`ObjectTypeInternalSlot`)}flowParseObjectTypeMethodish(e){for(e.params=[],e.rest=null,e.typeParameters=null,e.this=null,this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(10),this.match(78)&&(e.this=this.flowParseFunctionTypeParam(!0),e.this.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)e.params.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(e.rest=this.flowParseFunctionTypeParam(!1)),this.expect(11),e.returnType=this.flowParseTypeInitialiser(),this.finishNode(e,`FunctionTypeAnnotation`)}flowParseObjectTypeCallProperty(e,t){let n=this.startNode();return e.static=t,e.value=this.flowParseObjectTypeMethodish(n),this.finishNode(e,`ObjectTypeCallProperty`)}flowParseObjectType({allowStatic:e,allowExact:t,allowSpread:n,allowProto:r,allowInexact:i}){let a=this.state.inType;this.state.inType=!0;let o=this.startNode();o.callProperties=[],o.properties=[],o.indexers=[],o.internalSlots=[];let s,c,l=!1;for(t&&this.match(6)?(this.expect(6),s=9,c=!0):(this.expect(5),s=8,c=!1),o.exact=c;!this.match(s);){let t=!1,a=null,s=null,u=this.startNode();if(r&&this.isContextual(118)){let t=this.lookahead();t.type!==14&&t.type!==17&&(this.next(),a=this.state.startLoc,e=!1)}if(e&&this.isContextual(106)){let e=this.lookahead();e.type!==14&&e.type!==17&&(this.next(),t=!0)}let d=this.flowParseVariance();if(this.eat(0))a!=null&&this.unexpected(a),this.eat(0)?(d&&this.unexpected(d.loc.start),o.internalSlots.push(this.flowParseObjectTypeInternalSlot(u,t))):o.indexers.push(this.flowParseObjectTypeIndexer(u,t,d));else if(this.match(10)||this.match(47))a!=null&&this.unexpected(a),d&&this.unexpected(d.loc.start),o.callProperties.push(this.flowParseObjectTypeCallProperty(u,t));else{let e=`init`;(this.isContextual(99)||this.isContextual(104))&&fe(this.lookahead().type)&&(e=this.state.value,this.next());let r=this.flowParseObjectTypeProperty(u,t,a,d,e,n,i??!c);r===null?(l=!0,s=this.state.lastTokStartLoc):o.properties.push(r)}this.flowObjectTypeSemicolon(),s&&!this.match(8)&&!this.match(9)&&this.raise(I.UnexpectedExplicitInexactInObject,s)}this.expect(s),n&&(o.inexact=l);let u=this.finishNode(o,`ObjectTypeAnnotation`);return this.state.inType=a,u}flowParseObjectTypeProperty(e,t,n,r,i,a,o){if(this.eat(21))return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(a?o||this.raise(I.InexactInsideExact,this.state.lastTokStartLoc):this.raise(I.InexactInsideNonObject,this.state.lastTokStartLoc),r&&this.raise(I.InexactVariance,r),null):(a||this.raise(I.UnexpectedSpreadType,this.state.lastTokStartLoc),n!=null&&this.unexpected(n),r&&this.raise(I.SpreadVariance,r),e.argument=this.flowParseType(),this.finishNode(e,`ObjectTypeSpreadProperty`));{e.key=this.flowParseObjectPropertyKey(),e.static=t,e.proto=n!=null,e.kind=i;let o=!1;return this.match(47)||this.match(10)?(e.method=!0,n!=null&&this.unexpected(n),r&&this.unexpected(r.loc.start),e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start)),(i===`get`||i===`set`)&&this.flowCheckGetterSetterParams(e),!a&&e.key.name===`constructor`&&e.value.this&&this.raise(I.ThisParamBannedInConstructor,e.value.this)):(i!==`init`&&this.unexpected(),e.method=!1,this.eat(17)&&(o=!0),e.value=this.flowParseTypeInitialiser(),e.variance=r),e.optional=o,this.finishNode(e,`ObjectTypeProperty`)}}flowCheckGetterSetterParams(e){let t=e.kind===`get`?0:1,n=e.value.params.length+(e.value.rest?1:0);e.value.this&&this.raise(e.kind===`get`?I.GetterMayNotHaveThisParam:I.SetterMayNotHaveThisParam,e.value.this),n!==t&&this.raise(e.kind===`get`?v.BadGetterArity:v.BadSetterArity,e),e.kind===`set`&&e.value.rest&&this.raise(v.BadSetterRestParameter,e)}flowObjectTypeSemicolon(){!this.eat(13)&&!this.eat(12)&&!this.match(8)&&!this.match(9)&&this.unexpected()}flowParseQualifiedTypeIdentifier(e,t){e??=this.state.startLoc;let n=t||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){let t=this.startNodeAt(e);t.qualification=n,t.id=this.flowParseRestrictedIdentifier(!0),n=this.finishNode(t,`QualifiedTypeIdentifier`)}return n}flowParseGenericType(e,t){let n=this.startNodeAt(e);return n.typeParameters=null,n.id=this.flowParseQualifiedTypeIdentifier(e,t),this.match(47)&&(n.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(n,`GenericTypeAnnotation`)}flowParseTypeofType(){let e=this.startNode();return this.expect(87),e.argument=this.flowParsePrimaryType(),this.finishNode(e,`TypeofTypeAnnotation`)}flowParseTupleType(){let e=this.startNode();for(e.types=[],this.expect(0);this.state.pos<this.length&&!this.match(3)&&(e.types.push(this.flowParseType()),!this.match(3));)this.expect(12);return this.expect(3),this.finishNode(e,`TupleTypeAnnotation`)}flowParseFunctionTypeParam(e){let t=null,n=!1,r=null,i=this.startNode(),a=this.lookahead(),o=this.state.type===78;return a.type===14||a.type===17?(o&&!e&&this.raise(I.ThisParamMustBeFirst,i),t=this.parseIdentifier(o),this.eat(17)&&(n=!0,o&&this.raise(I.ThisParamMayNotBeOptional,i)),r=this.flowParseTypeInitialiser()):r=this.flowParseType(),i.name=t,i.optional=n,i.typeAnnotation=r,this.finishNode(i,`FunctionTypeParam`)}reinterpretTypeAsFunctionTypeParam(e){let t=this.startNodeAt(e.loc.start);return t.name=null,t.optional=!1,t.typeAnnotation=e,this.finishNode(t,`FunctionTypeParam`)}flowParseFunctionTypeParams(e=[]){let t=null,n=null;for(this.match(78)&&(n=this.flowParseFunctionTypeParam(!0),n.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)e.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(t=this.flowParseFunctionTypeParam(!1)),{params:e,rest:t,_this:n}}flowIdentToTypeAnnotation(e,t,n){switch(n.name){case`any`:return this.finishNode(t,`AnyTypeAnnotation`);case`bool`:case`boolean`:return this.finishNode(t,`BooleanTypeAnnotation`);case`mixed`:return this.finishNode(t,`MixedTypeAnnotation`);case`empty`:return this.finishNode(t,`EmptyTypeAnnotation`);case`number`:return this.finishNode(t,`NumberTypeAnnotation`);case`string`:return this.finishNode(t,`StringTypeAnnotation`);case`symbol`:return this.finishNode(t,`SymbolTypeAnnotation`);default:return this.checkNotUnderscore(n.name),this.flowParseGenericType(e,n)}}flowParsePrimaryType(){let e=this.state.startLoc,t=this.startNode(),n,r,i=!1,a=this.state.noAnonFunctionType;switch(this.state.type){case 5:return this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!0,allowProto:!1,allowInexact:!0});case 6:return this.flowParseObjectType({allowStatic:!1,allowExact:!0,allowSpread:!0,allowProto:!1,allowInexact:!1});case 0:return this.state.noAnonFunctionType=!1,r=this.flowParseTupleType(),this.state.noAnonFunctionType=a,r;case 47:{let e=this.startNode();return e.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(10),n=this.flowParseFunctionTypeParams(),e.params=n.params,e.rest=n.rest,e.this=n._this,this.expect(11),this.expect(19),e.returnType=this.flowParseType(),this.finishNode(e,`FunctionTypeAnnotation`)}case 10:{let e=this.startNode();if(this.next(),!this.match(11)&&!this.match(21))if(A(this.state.type)||this.match(78)){let e=this.lookahead().type;i=e!==17&&e!==14}else i=!0;if(i){if(this.state.noAnonFunctionType=!1,r=this.flowParseType(),this.state.noAnonFunctionType=a,this.state.noAnonFunctionType||!(this.match(12)||this.match(11)&&this.lookahead().type===19))return this.expect(11),r;this.eat(12)}return n=r?this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(r)]):this.flowParseFunctionTypeParams(),e.params=n.params,e.rest=n.rest,e.this=n._this,this.expect(11),this.expect(19),e.returnType=this.flowParseType(),e.typeParameters=null,this.finishNode(e,`FunctionTypeAnnotation`)}case 134:return this.parseLiteral(this.state.value,`StringLiteralTypeAnnotation`);case 85:case 86:return t.value=this.match(85),this.next(),this.finishNode(t,`BooleanLiteralTypeAnnotation`);case 53:if(this.state.value===`-`){if(this.next(),this.match(135))return this.parseLiteralAtNode(-this.state.value,`NumberLiteralTypeAnnotation`,t);if(this.match(136))return this.parseLiteralAtNode(-this.state.value,`BigIntLiteralTypeAnnotation`,t);throw this.raise(I.UnexpectedSubtractionOperand,this.state.startLoc)}throw this.unexpected();case 135:return this.parseLiteral(this.state.value,`NumberLiteralTypeAnnotation`);case 136:return this.parseLiteral(this.state.value,`BigIntLiteralTypeAnnotation`);case 88:return this.next(),this.finishNode(t,`VoidTypeAnnotation`);case 84:return this.next(),this.finishNode(t,`NullLiteralTypeAnnotation`);case 78:return this.next(),this.finishNode(t,`ThisTypeAnnotation`);case 55:return this.next(),this.finishNode(t,`ExistsTypeAnnotation`);case 87:return this.flowParseTypeofType();default:if(ve(this.state.type)){let e=we(this.state.type);return this.next(),super.createIdentifier(t,e)}else if(A(this.state.type))return this.isContextual(129)?this.flowParseInterfaceType():this.flowIdentToTypeAnnotation(e,t,this.parseIdentifier())}throw this.unexpected()}flowParsePostfixType(){let e=this.state.startLoc,t=this.flowParsePrimaryType(),n=!1;for(;(this.match(0)||this.match(18))&&!this.canInsertSemicolon();){let r=this.startNodeAt(e),i=this.eat(18);n||=i,this.expect(0),!i&&this.match(3)?(r.elementType=t,this.next(),t=this.finishNode(r,`ArrayTypeAnnotation`)):(r.objectType=t,r.indexType=this.flowParseType(),this.expect(3),n?(r.optional=i,t=this.finishNode(r,`OptionalIndexedAccessType`)):t=this.finishNode(r,`IndexedAccessType`))}return t}flowParsePrefixType(){let e=this.startNode();return this.eat(17)?(e.typeAnnotation=this.flowParsePrefixType(),this.finishNode(e,`NullableTypeAnnotation`)):this.flowParsePostfixType()}flowParseAnonFunctionWithoutParens(){let e=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(19)){let t=this.startNodeAt(e.loc.start);return t.params=[this.reinterpretTypeAsFunctionTypeParam(e)],t.rest=null,t.this=null,t.returnType=this.flowParseType(),t.typeParameters=null,this.finishNode(t,`FunctionTypeAnnotation`)}return e}flowParseIntersectionType(){let e=this.startNode();this.eat(45);let t=this.flowParseAnonFunctionWithoutParens();for(e.types=[t];this.eat(45);)e.types.push(this.flowParseAnonFunctionWithoutParens());return e.types.length===1?t:this.finishNode(e,`IntersectionTypeAnnotation`)}flowParseUnionType(){let e=this.startNode();this.eat(43);let t=this.flowParseIntersectionType();for(e.types=[t];this.eat(43);)e.types.push(this.flowParseIntersectionType());return e.types.length===1?t:this.finishNode(e,`UnionTypeAnnotation`)}flowParseType(){let e=this.state.inType;this.state.inType=!0;let t=this.flowParseUnionType();return this.state.inType=e,t}flowParseTypeOrImplicitInstantiation(){if(this.state.type===132&&this.state.value===`_`){let e=this.state.startLoc,t=this.parseIdentifier();return this.flowParseGenericType(e,t)}else return this.flowParseType()}flowParseTypeAnnotation(){let e=this.startNode();return e.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(e,`TypeAnnotation`)}flowParseTypeAnnotatableIdentifier(e){let t=e?this.parseIdentifier():this.flowParseRestrictedIdentifier();return this.match(14)&&(t.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(t)),t}typeCastToParameter(e){return e.expression.typeAnnotation=e.typeAnnotation,this.resetEndLocation(e.expression,e.typeAnnotation.loc.end),e.expression}flowParseVariance(){let e=null;return this.match(53)?(e=this.startNode(),this.state.value===`+`?e.kind=`plus`:e.kind=`minus`,this.next(),this.finishNode(e,`Variance`)):e}parseFunctionBody(e,t,n=!1){if(t){this.forwardNoArrowParamsConversionAt(e,()=>super.parseFunctionBody(e,!0,n));return}super.parseFunctionBody(e,!1,n)}parseFunctionBodyAndFinish(e,t,n=!1){if(this.match(14)){let t=this.startNode();[t.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),e.returnType=t.typeAnnotation?this.finishNode(t,`TypeAnnotation`):null}return super.parseFunctionBodyAndFinish(e,t,n)}parseStatementLike(e){if(this.state.strict&&this.isContextual(129)){if(j(this.lookahead().type)){let e=this.startNode();return this.next(),this.flowParseInterface(e)}}else if(this.isContextual(126)){let e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}let t=super.parseStatementLike(e);return this.flowPragma===void 0&&!this.isValidDirective(t)&&(this.flowPragma=null),t}parseExpressionStatement(e,t,n){if(t.type===`Identifier`){if(t.name===`declare`){if(this.match(80)||A(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(e)}else if(A(this.state.type)){if(t.name===`interface`)return this.flowParseInterface(e);if(t.name===`type`)return this.flowParseTypeAlias(e);if(t.name===`opaque`)return this.flowParseOpaqueType(e,!1)}}return super.parseExpressionStatement(e,t,n)}shouldParseExportDeclaration(){let{type:e}=this.state;return e===126||ge(e)?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){let{type:e}=this.state;return e===126||ge(e)?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.isContextual(126)){let e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}return super.parseExportDefaultExpression()}parseConditional(e,t,n){if(!this.match(17))return e;if(this.state.maybeInArrowParameters){let t=this.lookaheadCharCode();if(t===44||t===61||t===58||t===41)return this.setOptionalParametersError(n),e}this.expect(17);let r=this.state.clone(),i=this.state.noArrowAt,a=this.startNodeAt(t),{consequent:o,failed:s}=this.tryParseConditionalConsequent(),[c,l]=this.getArrowLikeExpressions(o);if(s||l.length>0){let e=[...i];if(l.length>0){this.state=r,this.state.noArrowAt=e;for(let t=0;t<l.length;t++)e.push(l[t].start);({consequent:o,failed:s}=this.tryParseConditionalConsequent()),[c,l]=this.getArrowLikeExpressions(o)}s&&c.length>1&&this.raise(I.AmbiguousConditionalArrow,r.startLoc),s&&c.length===1&&(this.state=r,e.push(c[0].start),this.state.noArrowAt=e,{consequent:o,failed:s}=this.tryParseConditionalConsequent())}return this.getArrowLikeExpressions(o,!0),this.state.noArrowAt=i,this.expect(14),a.test=e,a.consequent=o,a.alternate=this.forwardNoArrowParamsConversionAt(a,()=>this.parseMaybeAssign(void 0,void 0)),this.finishNode(a,`ConditionalExpression`)}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);let e=this.parseMaybeAssignAllowIn(),t=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:e,failed:t}}getArrowLikeExpressions(e,t){let n=[e],r=[];for(;n.length!==0;){let e=n.pop();e.type===`ArrowFunctionExpression`&&e.body.type!==`BlockStatement`?(e.typeParameters||!e.returnType?this.finishArrowValidation(e):r.push(e),n.push(e.body)):e.type===`ConditionalExpression`&&(n.push(e.consequent),n.push(e.alternate))}return t?(r.forEach(e=>this.finishArrowValidation(e)),[r,[]]):et(r,e=>e.params.every(e=>this.isAssignable(e,!0)))}finishArrowValidation(e){this.toAssignableList(e.params,e.extra?.trailingCommaLoc,!1),this.scope.enter(518),super.checkParams(e,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(e,t){let n;return this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(e.start))?(this.state.noArrowParamsConversionAt.push(this.state.start),n=t(),this.state.noArrowParamsConversionAt.pop()):n=t(),n}parseParenItem(e,t){let n=super.parseParenItem(e,t);if(this.eat(17)&&(n.optional=!0,this.resetEndLocation(e)),this.match(14)){let e=this.startNodeAt(t);return e.expression=n,e.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(e,`TypeCastExpression`)}return n}assertModuleNodeAllowed(e){e.type===`ImportDeclaration`&&(e.importKind===`type`||e.importKind===`typeof`)||e.type===`ExportNamedDeclaration`&&e.exportKind===`type`||e.type===`ExportAllDeclaration`&&e.exportKind===`type`||super.assertModuleNodeAllowed(e)}parseExportDeclaration(e){if(this.isContextual(130)){e.exportKind=`type`;let t=this.startNode();return this.next(),this.match(5)?(e.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(e),null):this.flowParseTypeAlias(t)}else if(this.isContextual(131)){e.exportKind=`type`;let t=this.startNode();return this.next(),this.flowParseOpaqueType(t,!1)}else if(this.isContextual(129)){e.exportKind=`type`;let t=this.startNode();return this.next(),this.flowParseInterface(t)}else if(this.isContextual(126)){e.exportKind=`value`;let t=this.startNode();return this.next(),this.flowParseEnumDeclaration(t)}else return super.parseExportDeclaration(e)}eatExportStar(e){return super.eatExportStar(e)?!0:this.isContextual(130)&&this.lookahead().type===55?(e.exportKind=`type`,this.next(),this.next(),!0):!1}maybeParseExportNamespaceSpecifier(e){let{startLoc:t}=this.state,n=super.maybeParseExportNamespaceSpecifier(e);return n&&e.exportKind===`type`&&this.unexpected(t),n}parseClassId(e,t,n){super.parseClassId(e,t,n),this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(e,t,n){let{startLoc:r}=this.state;if(this.isContextual(125)){if(super.parseClassMemberFromModifier(e,t))return;t.declare=!0}super.parseClassMember(e,t,n),t.declare&&(t.type!==`ClassProperty`&&t.type!==`ClassPrivateProperty`&&t.type!==`PropertyDefinition`?this.raise(I.DeclareClassElement,r):t.value&&this.raise(I.DeclareClassFieldInitializer,t.value))}isIterator(e){return e===`iterator`||e===`asyncIterator`}readIterator(){let e=super.readWord1(),t=`@@`+e;(!this.isIterator(e)||!this.state.inType)&&this.raise(v.InvalidIdentifier,this.state.curPosition(),{identifierName:t}),this.finishToken(132,t)}getTokenFromCode(e){let t=this.input.charCodeAt(this.state.pos+1);e===123&&t===124?this.finishOp(6,2):this.state.inType&&(e===62||e===60)?this.finishOp(e===62?48:47,1):this.state.inType&&e===63?t===46?this.finishOp(18,2):this.finishOp(17,1):Ue(e,t,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(e)}isAssignable(e,t){return e.type===`TypeCastExpression`?this.isAssignable(e.expression,t):super.isAssignable(e,t)}toAssignable(e,t=!1){!t&&e.type===`AssignmentExpression`&&e.left.type===`TypeCastExpression`&&(e.left=this.typeCastToParameter(e.left)),super.toAssignable(e,t)}toAssignableList(e,t,n){for(let t=0;t<e.length;t++){let n=e[t];n?.type===`TypeCastExpression`&&(e[t]=this.typeCastToParameter(n))}super.toAssignableList(e,t,n)}toReferencedList(e,t){for(let r=0;r<e.length;r++){var n;let i=e[r];i&&i.type===`TypeCastExpression`&&!((n=i.extra)!=null&&n.parenthesized)&&(e.length>1||!t)&&this.raise(I.TypeCastInPattern,i.typeAnnotation)}return e}parseArrayLike(e,t,n){let r=super.parseArrayLike(e,t,n);return n!=null&&!this.state.maybeInArrowParameters&&this.toReferencedList(r.elements),r}isValidLVal(e,t,n,r){return e===`TypeCastExpression`||super.isValidLVal(e,t,n,r)}parseClassProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(e)}parseClassPrivateProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(e){return!this.match(14)&&super.isNonstaticConstructor(e)}pushClassMethod(e,t,n,r,i,a){if(t.variance&&this.unexpected(t.variance.loc.start),delete t.variance,this.match(47)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(e,t,n,r,i,a),t.params&&i){let e=t.params;e.length>0&&this.isThisParam(e[0])&&this.raise(I.ThisParamBannedInConstructor,t)}else if(t.type===`MethodDefinition`&&i&&t.value.params){let e=t.value.params;e.length>0&&this.isThisParam(e[0])&&this.raise(I.ThisParamBannedInConstructor,t)}}pushClassPrivateMethod(e,t,n,r){t.variance&&this.unexpected(t.variance.loc.start),delete t.variance,this.match(47)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(e,t,n,r)}parseClassSuper(e){if(super.parseClassSuper(e),e.superClass&&(this.match(47)||this.match(51))&&(e.superTypeParameters=this.flowParseTypeParameterInstantiationInExpression()),this.isContextual(113)){this.next();let t=e.implements=[];do{let e=this.startNode();e.id=this.flowParseRestrictedIdentifier(!0),this.match(47)?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,t.push(this.finishNode(e,`ClassImplements`))}while(this.eat(12))}}checkGetterSetterParams(e){super.checkGetterSetterParams(e);let t=this.getObjectOrClassMethodParams(e);if(t.length>0){let n=t[0];this.isThisParam(n)&&e.kind===`get`?this.raise(I.GetterMayNotHaveThisParam,n):this.isThisParam(n)&&this.raise(I.SetterMayNotHaveThisParam,n)}}parsePropertyNamePrefixOperator(e){e.variance=this.flowParseVariance()}parseObjPropValue(e,t,n,r,i,a,o){e.variance&&this.unexpected(e.variance.loc.start),delete e.variance;let s;this.match(47)&&!a&&(s=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());let c=super.parseObjPropValue(e,t,n,r,i,a,o);return s&&((c.value||c).typeParameters=s),c}parseFunctionParamType(e){return this.eat(17)&&(e.type!==`Identifier`&&this.raise(I.PatternIsOptional,e),this.isThisParam(e)&&this.raise(I.ThisParamMayNotBeOptional,e),e.optional=!0),this.match(14)?e.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(e)&&this.raise(I.ThisParamAnnotationRequired,e),this.match(29)&&this.isThisParam(e)&&this.raise(I.ThisParamNoDefault,e),this.resetEndLocation(e),e}parseMaybeDefault(e,t){let n=super.parseMaybeDefault(e,t);return n.type===`AssignmentPattern`&&n.typeAnnotation&&n.right.start<n.typeAnnotation.start&&this.raise(I.TypeBeforeInitializer,n.typeAnnotation),n}checkImportReflection(e){super.checkImportReflection(e),e.module&&e.importKind!==`value`&&this.raise(I.ImportReflectionHasImportType,e.specifiers[0].loc.start)}parseImportSpecifierLocal(e,t,n){t.local=Qe(e)?this.flowParseRestrictedIdentifier(!0,!0):this.parseIdentifier(),e.specifiers.push(this.finishImportSpecifier(t,n))}isPotentialImportPhase(e){if(super.isPotentialImportPhase(e))return!0;if(this.isContextual(130)){if(!e)return!0;let t=this.lookaheadCharCode();return t===123||t===42}return!e&&this.isContextual(87)}applyImportPhase(e,t,n,r){if(super.applyImportPhase(e,t,n,r),t){if(!n&&this.match(65))return;e.exportKind=n===`type`?n:`value`}else n===`type`&&this.match(55)&&this.unexpected(),e.importKind=n===`type`||n===`typeof`?n:`value`}parseImportSpecifier(e,t,n,r,i){let a=e.imported,o=null;a.type===`Identifier`&&(a.name===`type`?o=`type`:a.name===`typeof`&&(o=`typeof`));let s=!1;if(this.isContextual(93)&&!this.isLookaheadContextual(`as`)){let t=this.parseIdentifier(!0);o!==null&&!j(this.state.type)?(e.imported=t,e.importKind=o,e.local=this.cloneIdentifier(t)):(e.imported=a,e.importKind=null,e.local=this.parseIdentifier())}else{if(o!==null&&j(this.state.type))e.imported=this.parseIdentifier(!0),e.importKind=o;else{if(t)throw this.raise(v.ImportBindingIsString,e,{importName:a.value});e.imported=a,e.importKind=null}this.eatContextual(93)?e.local=this.parseIdentifier():(s=!0,e.local=this.cloneIdentifier(e.imported))}let c=Qe(e);return n&&c&&this.raise(I.ImportTypeShorthandOnlyInPureImport,e),(n||c)&&this.checkReservedType(e.local.name,e.local.loc.start,!0),s&&!n&&!c&&this.checkReservedWord(e.local.name,e.loc.start,!0,!0),this.finishImportSpecifier(e,`ImportSpecifier`)}parseBindingAtom(){switch(this.state.type){case 78:return this.parseIdentifier(!0);default:return super.parseBindingAtom()}}parseFunctionParams(e,t){let n=e.kind;n!==`get`&&n!==`set`&&this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),super.parseFunctionParams(e,t)}parseVarId(e,t){super.parseVarId(e,t),this.match(14)&&(e.id.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,t){if(this.match(14)){let t=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,e.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=t}return super.parseAsyncArrowFromCallExpression(e,t)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}parseMaybeAssign(e,t){var n;let r=null,i;if(this.hasPlugin(`jsx`)&&(this.match(143)||this.match(47))){if(r=this.state.clone(),i=this.tryParse(()=>super.parseMaybeAssign(e,t),r),!i.error)return i.node;let{context:n}=this.state,a=n[n.length-1];(a===C.j_oTag||a===C.j_expr)&&n.pop()}if((n=i)!=null&&n.error||this.match(47)){var a,o;r||=this.state.clone();let n,s=this.tryParse(r=>{var i;n=this.flowParseTypeParameterDeclaration();let a=this.forwardNoArrowParamsConversionAt(n,()=>{let r=super.parseMaybeAssign(e,t);return this.resetStartLocationFromNode(r,n),r});(i=a.extra)!=null&&i.parenthesized&&r();let o=this.maybeUnwrapTypeCastExpression(a);return o.type!==`ArrowFunctionExpression`&&r(),o.typeParameters=n,this.resetStartLocationFromNode(o,n),a},r),c=null;if(s.node&&this.maybeUnwrapTypeCastExpression(s.node).type===`ArrowFunctionExpression`){if(!s.error&&!s.aborted)return s.node.async&&this.raise(I.UnexpectedTypeParameterBeforeAsyncArrowFunction,n),s.node;c=s.node}if((a=i)!=null&&a.node)return this.state=i.failState,i.node;if(c)return this.state=s.failState,c;throw(o=i)!=null&&o.thrown?i.error:s.thrown?s.error:this.raise(I.UnexpectedTokenAfterTypeParameter,n)}return super.parseMaybeAssign(e,t)}parseArrow(e){if(this.match(14)){let t=this.tryParse(()=>{let t=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;let n=this.startNode();return[n.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=t,this.canInsertSemicolon()&&this.unexpected(),this.match(19)||this.unexpected(),n});if(t.thrown)return null;t.error&&(this.state=t.failState),e.returnType=t.node.typeAnnotation?this.finishNode(t.node,`TypeAnnotation`):null}return super.parseArrow(e)}shouldParseArrow(e){return this.match(14)||super.shouldParseArrow(e)}setArrowFunctionParameters(e,t){this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(e.start))?e.params=t:super.setArrowFunctionParameters(e,t)}checkParams(e,t,n,r=!0){if(!(n&&this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(e.start)))){for(let t=0;t<e.params.length;t++)this.isThisParam(e.params[t])&&t>0&&this.raise(I.ThisParamMustBeFirst,e.params[t]);super.checkParams(e,t,n,r)}}parseParenAndDistinguishExpression(e){return super.parseParenAndDistinguishExpression(e&&!this.state.noArrowAt.includes(this.sourceToOffsetPos(this.state.start)))}parseSubscripts(e,t,n){if(e.type===`Identifier`&&e.name===`async`&&this.state.noArrowAt.includes(t.index)){this.next();let n=this.startNodeAt(t);n.callee=e,n.arguments=super.parseCallExpressionArguments(),e=this.finishNode(n,`CallExpression`)}else if(e.type===`Identifier`&&e.name===`async`&&this.match(47)){let r=this.state.clone(),i=this.tryParse(e=>this.parseAsyncArrowWithTypeParameters(t)||e(),r);if(!i.error&&!i.aborted)return i.node;let a=this.tryParse(()=>super.parseSubscripts(e,t,n),r);if(a.node&&!a.error)return a.node;if(i.node)return this.state=i.failState,i.node;if(a.node)return this.state=a.failState,a.node;throw i.error||a.error}return super.parseSubscripts(e,t,n)}parseSubscript(e,t,n,r){if(this.match(18)&&this.isLookaheadToken_lt()){if(r.optionalChainMember=!0,n)return r.stop=!0,e;this.next();let i=this.startNodeAt(t);return i.callee=e,i.typeArguments=this.flowParseTypeParameterInstantiationInExpression(),this.expect(10),i.arguments=this.parseCallExpressionArguments(),i.optional=!0,this.finishCallExpression(i,!0)}else if(!n&&this.shouldParseTypes()&&(this.match(47)||this.match(51))){let n=this.startNodeAt(t);n.callee=e;let i=this.tryParse(()=>(n.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),n.arguments=super.parseCallExpressionArguments(),r.optionalChainMember&&(n.optional=!1),this.finishCallExpression(n,r.optionalChainMember)));if(i.node)return i.error&&(this.state=i.failState),i.node}return super.parseSubscript(e,t,n,r)}parseNewCallee(e){super.parseNewCallee(e);let t=null;this.shouldParseTypes()&&this.match(47)&&(t=this.tryParse(()=>this.flowParseTypeParameterInstantiationCallOrNew()).node),e.typeArguments=t}parseAsyncArrowWithTypeParameters(e){let t=this.startNodeAt(e);if(this.parseFunctionParams(t,!1),this.parseArrow(t))return super.parseArrowExpression(t,void 0,!0)}readToken_mult_modulo(e){let t=this.input.charCodeAt(this.state.pos+1);if(e===42&&t===47&&this.state.hasFlowComment){this.state.hasFlowComment=!1,this.state.pos+=2,this.nextToken();return}super.readToken_mult_modulo(e)}readToken_pipe_amp(e){let t=this.input.charCodeAt(this.state.pos+1);if(e===124&&t===125){this.finishOp(9,2);return}super.readToken_pipe_amp(e)}parseTopLevel(e,t){let n=super.parseTopLevel(e,t);return this.state.hasFlowComment&&this.raise(I.UnterminatedFlowComment,this.state.curPosition()),n}skipBlockComment(){if(this.hasPlugin(`flowComments`)&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(I.NestedFlowComment,this.state.startLoc);this.hasFlowCommentCompletion();let e=this.skipFlowComment();e&&(this.state.pos+=e,this.state.hasFlowComment=!0);return}return super.skipBlockComment(this.state.hasFlowComment?`*-/`:`*/`)}skipFlowComment(){let{pos:e}=this.state,t=2;for(;[32,9].includes(this.input.charCodeAt(e+t));)t++;let n=this.input.charCodeAt(t+e),r=this.input.charCodeAt(t+e+1);return n===58&&r===58?t+2:this.input.slice(t+e,t+e+12)===`flow-include`?t+12:n===58&&r!==58?t:!1}hasFlowCommentCompletion(){if(this.input.indexOf(`*/`,this.state.pos)===-1)throw this.raise(v.UnterminatedComment,this.state.curPosition())}flowEnumErrorBooleanMemberNotInitialized(e,{enumName:t,memberName:n}){this.raise(I.EnumBooleanMemberNotInitialized,e,{memberName:n,enumName:t})}flowEnumErrorInvalidMemberInitializer(e,t){return this.raise(t.explicitType?t.explicitType===`symbol`?I.EnumInvalidMemberInitializerSymbolType:I.EnumInvalidMemberInitializerPrimaryType:I.EnumInvalidMemberInitializerUnknownType,e,t)}flowEnumErrorNumberMemberNotInitialized(e,t){this.raise(I.EnumNumberMemberNotInitialized,e,t)}flowEnumErrorStringMemberInconsistentlyInitialized(e,t){this.raise(I.EnumStringMemberInconsistentlyInitialized,e,t)}flowEnumMemberInit(){let e=this.state.startLoc,t=()=>this.match(12)||this.match(8);switch(this.state.type){case 135:{let n=this.parseNumericLiteral(this.state.value);return t()?{type:`number`,loc:n.loc.start,value:n}:{type:`invalid`,loc:e}}case 134:{let n=this.parseStringLiteral(this.state.value);return t()?{type:`string`,loc:n.loc.start,value:n}:{type:`invalid`,loc:e}}case 85:case 86:{let n=this.parseBooleanLiteral(this.match(85));return t()?{type:`boolean`,loc:n.loc.start,value:n}:{type:`invalid`,loc:e}}default:return{type:`invalid`,loc:e}}}flowEnumMemberRaw(){let e=this.state.startLoc;return{id:this.parseIdentifier(!0),init:this.eat(29)?this.flowEnumMemberInit():{type:`none`,loc:e}}}flowEnumCheckExplicitTypeMismatch(e,t,n){let{explicitType:r}=t;r!==null&&r!==n&&this.flowEnumErrorInvalidMemberInitializer(e,t)}flowEnumMembers({enumName:e,explicitType:t}){let n=new Set,r={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]},i=!1;for(;!this.match(8);){if(this.eat(21)){i=!0;break}let a=this.startNode(),{id:o,init:s}=this.flowEnumMemberRaw(),c=o.name;if(c===``)continue;/^[a-z]/.test(c)&&this.raise(I.EnumInvalidMemberName,o,{memberName:c,suggestion:c[0].toUpperCase()+c.slice(1),enumName:e}),n.has(c)&&this.raise(I.EnumDuplicateMemberName,o,{memberName:c,enumName:e}),n.add(c);let l={enumName:e,explicitType:t,memberName:c};switch(a.id=o,s.type){case`boolean`:this.flowEnumCheckExplicitTypeMismatch(s.loc,l,`boolean`),a.init=s.value,r.booleanMembers.push(this.finishNode(a,`EnumBooleanMember`));break;case`number`:this.flowEnumCheckExplicitTypeMismatch(s.loc,l,`number`),a.init=s.value,r.numberMembers.push(this.finishNode(a,`EnumNumberMember`));break;case`string`:this.flowEnumCheckExplicitTypeMismatch(s.loc,l,`string`),a.init=s.value,r.stringMembers.push(this.finishNode(a,`EnumStringMember`));break;case`invalid`:throw this.flowEnumErrorInvalidMemberInitializer(s.loc,l);case`none`:switch(t){case`boolean`:this.flowEnumErrorBooleanMemberNotInitialized(s.loc,l);break;case`number`:this.flowEnumErrorNumberMemberNotInitialized(s.loc,l);break;default:r.defaultedMembers.push(this.finishNode(a,`EnumDefaultedMember`))}}this.match(8)||this.expect(12)}return{members:r,hasUnknownMembers:i}}flowEnumStringMembers(e,t,{enumName:n}){if(e.length===0)return t;if(t.length===0)return e;if(t.length>e.length){for(let t of e)this.flowEnumErrorStringMemberInconsistentlyInitialized(t,{enumName:n});return t}else{for(let e of t)this.flowEnumErrorStringMemberInconsistentlyInitialized(e,{enumName:n});return e}}flowEnumParseExplicitType({enumName:e}){if(!this.eatContextual(102))return null;if(!A(this.state.type))throw this.raise(I.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName:e});let{value:t}=this.state;return this.next(),t!==`boolean`&&t!==`number`&&t!==`string`&&t!==`symbol`&&this.raise(I.EnumInvalidExplicitType,this.state.startLoc,{enumName:e,invalidEnumType:t}),t}flowEnumBody(e,t){let n=t.name,r=t.loc.start,i=this.flowEnumParseExplicitType({enumName:n});this.expect(5);let{members:a,hasUnknownMembers:o}=this.flowEnumMembers({enumName:n,explicitType:i});switch(e.hasUnknownMembers=o,i){case`boolean`:return e.explicitType=!0,e.members=a.booleanMembers,this.expect(8),this.finishNode(e,`EnumBooleanBody`);case`number`:return e.explicitType=!0,e.members=a.numberMembers,this.expect(8),this.finishNode(e,`EnumNumberBody`);case`string`:return e.explicitType=!0,e.members=this.flowEnumStringMembers(a.stringMembers,a.defaultedMembers,{enumName:n}),this.expect(8),this.finishNode(e,`EnumStringBody`);case`symbol`:return e.members=a.defaultedMembers,this.expect(8),this.finishNode(e,`EnumSymbolBody`);default:{let t=()=>(e.members=[],this.expect(8),this.finishNode(e,`EnumStringBody`));e.explicitType=!1;let i=a.booleanMembers.length,o=a.numberMembers.length,s=a.stringMembers.length,c=a.defaultedMembers.length;if(!i&&!o&&!s&&!c)return t();if(!i&&!o)return e.members=this.flowEnumStringMembers(a.stringMembers,a.defaultedMembers,{enumName:n}),this.expect(8),this.finishNode(e,`EnumStringBody`);if(!o&&!s&&i>=c){for(let e of a.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(e.loc.start,{enumName:n,memberName:e.id.name});return e.members=a.booleanMembers,this.expect(8),this.finishNode(e,`EnumBooleanBody`)}else if(!i&&!s&&o>=c){for(let e of a.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(e.loc.start,{enumName:n,memberName:e.id.name});return e.members=a.numberMembers,this.expect(8),this.finishNode(e,`EnumNumberBody`)}else return this.raise(I.EnumInconsistentMemberValues,r,{enumName:n}),t()}}}flowParseEnumDeclaration(e){let t=this.parseIdentifier();return e.id=t,e.body=this.flowEnumBody(this.startNode(),t),this.finishNode(e,`EnumDeclaration`)}jsxParseOpeningElementAfterName(e){return this.shouldParseTypes()&&(this.match(47)||this.match(51))&&(e.typeArguments=this.flowParseTypeParameterInstantiationInExpression()),super.jsxParseOpeningElementAfterName(e)}isLookaheadToken_lt(){let e=this.nextTokenStart();if(this.input.charCodeAt(e)===60){let t=this.input.charCodeAt(e+1);return t!==60&&t!==61}return!1}reScan_lt_gt(){let{type:e}=this.state;e===47?(--this.state.pos,this.readToken_lt()):e===48&&(--this.state.pos,this.readToken_gt())}reScan_lt(){let{type:e}=this.state;return e===51?(this.state.pos-=2,this.finishOp(47,1),47):e}maybeUnwrapTypeCastExpression(e){return e.type===`TypeCastExpression`?e.expression:e}};let rt={__proto__:null,quot:`"`,amp:`&`,apos:`'`,lt:`<`,gt:`>`,nbsp:`\xA0`,iexcl:`¡`,cent:`¢`,pound:`£`,curren:`¤`,yen:`¥`,brvbar:`¦`,sect:`§`,uml:`¨`,copy:`©`,ordf:`ª`,laquo:`«`,not:`¬`,shy:`­`,reg:`®`,macr:`¯`,deg:`°`,plusmn:`±`,sup2:`²`,sup3:`³`,acute:`´`,micro:`µ`,para:`¶`,middot:`·`,cedil:`¸`,sup1:`¹`,ordm:`º`,raquo:`»`,frac14:`¼`,frac12:`½`,frac34:`¾`,iquest:`¿`,Agrave:`À`,Aacute:`Á`,Acirc:`Â`,Atilde:`Ã`,Auml:`Ä`,Aring:`Å`,AElig:`Æ`,Ccedil:`Ç`,Egrave:`È`,Eacute:`É`,Ecirc:`Ê`,Euml:`Ë`,Igrave:`Ì`,Iacute:`Í`,Icirc:`Î`,Iuml:`Ï`,ETH:`Ð`,Ntilde:`Ñ`,Ograve:`Ò`,Oacute:`Ó`,Ocirc:`Ô`,Otilde:`Õ`,Ouml:`Ö`,times:`×`,Oslash:`Ø`,Ugrave:`Ù`,Uacute:`Ú`,Ucirc:`Û`,Uuml:`Ü`,Yacute:`Ý`,THORN:`Þ`,szlig:`ß`,agrave:`à`,aacute:`á`,acirc:`â`,atilde:`ã`,auml:`ä`,aring:`å`,aelig:`æ`,ccedil:`ç`,egrave:`è`,eacute:`é`,ecirc:`ê`,euml:`ë`,igrave:`ì`,iacute:`í`,icirc:`î`,iuml:`ï`,eth:`ð`,ntilde:`ñ`,ograve:`ò`,oacute:`ó`,ocirc:`ô`,otilde:`õ`,ouml:`ö`,divide:`÷`,oslash:`ø`,ugrave:`ù`,uacute:`ú`,ucirc:`û`,uuml:`ü`,yacute:`ý`,thorn:`þ`,yuml:`ÿ`,OElig:`Œ`,oelig:`œ`,Scaron:`Š`,scaron:`š`,Yuml:`Ÿ`,fnof:`ƒ`,circ:`ˆ`,tilde:`˜`,Alpha:`Α`,Beta:`Β`,Gamma:`Γ`,Delta:`Δ`,Epsilon:`Ε`,Zeta:`Ζ`,Eta:`Η`,Theta:`Θ`,Iota:`Ι`,Kappa:`Κ`,Lambda:`Λ`,Mu:`Μ`,Nu:`Ν`,Xi:`Ξ`,Omicron:`Ο`,Pi:`Π`,Rho:`Ρ`,Sigma:`Σ`,Tau:`Τ`,Upsilon:`Υ`,Phi:`Φ`,Chi:`Χ`,Psi:`Ψ`,Omega:`Ω`,alpha:`α`,beta:`β`,gamma:`γ`,delta:`δ`,epsilon:`ε`,zeta:`ζ`,eta:`η`,theta:`θ`,iota:`ι`,kappa:`κ`,lambda:`λ`,mu:`μ`,nu:`ν`,xi:`ξ`,omicron:`ο`,pi:`π`,rho:`ρ`,sigmaf:`ς`,sigma:`σ`,tau:`τ`,upsilon:`υ`,phi:`φ`,chi:`χ`,psi:`ψ`,omega:`ω`,thetasym:`ϑ`,upsih:`ϒ`,piv:`ϖ`,ensp:` `,emsp:` `,thinsp:` `,zwnj:`‌`,zwj:`‍`,lrm:`‎`,rlm:`‏`,ndash:`–`,mdash:`—`,lsquo:`‘`,rsquo:`’`,sbquo:`‚`,ldquo:`“`,rdquo:`”`,bdquo:`„`,dagger:`†`,Dagger:`‡`,bull:`•`,hellip:`…`,permil:`‰`,prime:`′`,Prime:`″`,lsaquo:`‹`,rsaquo:`›`,oline:`‾`,frasl:`⁄`,euro:`€`,image:`ℑ`,weierp:`℘`,real:`ℜ`,trade:`™`,alefsym:`ℵ`,larr:`←`,uarr:`↑`,rarr:`→`,darr:`↓`,harr:`↔`,crarr:`↵`,lArr:`⇐`,uArr:`⇑`,rArr:`⇒`,dArr:`⇓`,hArr:`⇔`,forall:`∀`,part:`∂`,exist:`∃`,empty:`∅`,nabla:`∇`,isin:`∈`,notin:`∉`,ni:`∋`,prod:`∏`,sum:`∑`,minus:`−`,lowast:`∗`,radic:`√`,prop:`∝`,infin:`∞`,ang:`∠`,and:`∧`,or:`∨`,cap:`∩`,cup:`∪`,int:`∫`,there4:`∴`,sim:`∼`,cong:`≅`,asymp:`≈`,ne:`≠`,equiv:`≡`,le:`≤`,ge:`≥`,sub:`⊂`,sup:`⊃`,nsub:`⊄`,sube:`⊆`,supe:`⊇`,oplus:`⊕`,otimes:`⊗`,perp:`⊥`,sdot:`⋅`,lceil:`⌈`,rceil:`⌉`,lfloor:`⌊`,rfloor:`⌋`,lang:`〈`,rang:`〉`,loz:`◊`,spades:`♠`,clubs:`♣`,hearts:`♥`,diams:`♦`},it=RegExp(`\\r\\n|[\\r\\n\\u2028\\u2029]`,`g`);function L(e){switch(e){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}function at(e,t,n){for(let r=t;r<n;r++)if(L(e.charCodeAt(r)))return!0;return!1}let ot=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,st=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g;function ct(e){switch(e){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}}let lt=_`jsx`({AttributeIsEmpty:`JSX attributes must only be assigned a non-empty expression.`,MissingClosingTagElement:({openingTagName:e})=>`Expected corresponding JSX closing tag for <${e}>.`,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:e,HTMLEntity:t})=>`Unexpected token \`${e}\`. Did you mean \`${t}\` or \`{'${e}'}\`?`,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 <>...</>?`});function ut(e){return e?e.type===`JSXOpeningFragment`||e.type===`JSXClosingFragment`:!1}function dt(e){if(e.type===`JSXIdentifier`)return e.name;if(e.type===`JSXNamespacedName`)return e.namespace.name+`:`+e.name.name;if(e.type===`JSXMemberExpression`)return dt(e.object)+`.`+dt(e.property);throw Error(`Node had unexpected type: `+e.type)}var ft=e=>class extends e{jsxReadToken(){let e=``,t=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(lt.UnterminatedJsxContent,this.state.startLoc);let n=this.input.charCodeAt(this.state.pos);switch(n){case 60:case 123:if(this.state.pos===this.state.start){n===60&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(143)):super.getTokenFromCode(n);return}e+=this.input.slice(t,this.state.pos),this.finishToken(142,e);return;case 38:e+=this.input.slice(t,this.state.pos),e+=this.jsxReadEntity(),t=this.state.pos;break;case 62:case 125:default:L(n)?(e+=this.input.slice(t,this.state.pos),e+=this.jsxReadNewLine(!0),t=this.state.pos):++this.state.pos}}}jsxReadNewLine(e){let t=this.input.charCodeAt(this.state.pos),n;return++this.state.pos,t===13&&this.input.charCodeAt(this.state.pos)===10?(++this.state.pos,n=e?`
2
+ `:`\r
3
+ `):n=String.fromCharCode(t),++this.state.curLine,this.state.lineStart=this.state.pos,n}jsxReadString(e){let t=``,n=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(v.UnterminatedString,this.state.startLoc);let r=this.input.charCodeAt(this.state.pos);if(r===e)break;r===38?(t+=this.input.slice(n,this.state.pos),t+=this.jsxReadEntity(),n=this.state.pos):L(r)?(t+=this.input.slice(n,this.state.pos),t+=this.jsxReadNewLine(!1),n=this.state.pos):++this.state.pos}t+=this.input.slice(n,this.state.pos++),this.finishToken(134,t)}jsxReadEntity(){let e=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let e=10;this.codePointAtPos(this.state.pos)===120&&(e=16,++this.state.pos);let t=this.readInt(e,void 0,!1,`bail`);if(t!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(t)}else{let t=0,n=!1;for(;t++<10&&this.state.pos<this.length&&!(n=this.codePointAtPos(this.state.pos)===59);)++this.state.pos;if(n){let t=rt[this.input.slice(e,this.state.pos)];if(++this.state.pos,t)return t}}return this.state.pos=e,`&`}jsxReadWord(){let e,t=this.state.pos;do e=this.input.charCodeAt(++this.state.pos);while(Ne(e)||e===45);this.finishToken(141,this.input.slice(t,this.state.pos))}jsxParseIdentifier(){let e=this.startNode();return this.match(141)?e.name=this.state.value:ve(this.state.type)?e.name=we(this.state.type):this.unexpected(),this.next(),this.finishNode(e,`JSXIdentifier`)}jsxParseNamespacedName(){let e=this.state.startLoc,t=this.jsxParseIdentifier();if(!this.eat(14))return t;let n=this.startNodeAt(e);return n.namespace=t,n.name=this.jsxParseIdentifier(),this.finishNode(n,`JSXNamespacedName`)}jsxParseElementName(){let e=this.state.startLoc,t=this.jsxParseNamespacedName();if(t.type===`JSXNamespacedName`)return t;for(;this.eat(16);){let n=this.startNodeAt(e);n.object=t,n.property=this.jsxParseIdentifier(),t=this.finishNode(n,`JSXMemberExpression`)}return t}jsxParseAttributeValue(){let e;switch(this.state.type){case 5:return e=this.startNode(),this.setContext(C.brace),this.next(),e=this.jsxParseExpressionContainer(e,C.j_oTag),e.expression.type===`JSXEmptyExpression`&&this.raise(lt.AttributeIsEmpty,e),e;case 143:case 134:return this.parseExprAtom();default:throw this.raise(lt.UnsupportedJsxValue,this.state.startLoc)}}jsxParseEmptyExpression(){let e=this.startNodeAt(this.state.lastTokEndLoc);return this.finishNodeAt(e,`JSXEmptyExpression`,this.state.startLoc)}jsxParseSpreadChild(e){return this.next(),e.expression=this.parseExpression(),this.setContext(C.j_expr),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,`JSXSpreadChild`)}jsxParseExpressionContainer(e,t){return this.match(8)?e.expression=this.jsxParseEmptyExpression():e.expression=this.parseExpression(),this.setContext(t),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,`JSXExpressionContainer`)}jsxParseAttribute(){let e=this.startNode();return this.match(5)?(this.setContext(C.brace),this.next(),this.expect(21),e.argument=this.parseMaybeAssignAllowIn(),this.setContext(C.j_oTag),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,`JSXSpreadAttribute`)):(e.name=this.jsxParseNamespacedName(),e.value=this.eat(29)?this.jsxParseAttributeValue():null,this.finishNode(e,`JSXAttribute`))}jsxParseOpeningElementAt(e){let t=this.startNodeAt(e);return this.eat(144)?this.finishNode(t,`JSXOpeningFragment`):(t.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(t))}jsxParseOpeningElementAfterName(e){let t=[];for(;!this.match(56)&&!this.match(144);)t.push(this.jsxParseAttribute());return e.attributes=t,e.selfClosing=this.eat(56),this.expect(144),this.finishNode(e,`JSXOpeningElement`)}jsxParseClosingElementAt(e){let t=this.startNodeAt(e);return this.eat(144)?this.finishNode(t,`JSXClosingFragment`):(t.name=this.jsxParseElementName(),this.expect(144),this.finishNode(t,`JSXClosingElement`))}jsxParseElementAt(e){let t=this.startNodeAt(e),n=[],r=this.jsxParseOpeningElementAt(e),i=null;if(!r.selfClosing){contents:for(;;)switch(this.state.type){case 143:if(e=this.state.startLoc,this.next(),this.eat(56)){i=this.jsxParseClosingElementAt(e);break contents}n.push(this.jsxParseElementAt(e));break;case 142:n.push(this.parseLiteral(this.state.value,`JSXText`));break;case 5:{let e=this.startNode();this.setContext(C.brace),this.next(),this.match(21)?n.push(this.jsxParseSpreadChild(e)):n.push(this.jsxParseExpressionContainer(e,C.j_expr));break}default:this.unexpected()}ut(r)&&!ut(i)&&i!==null?this.raise(lt.MissingClosingTagFragment,i):(!ut(r)&&ut(i)||!ut(r)&&!ut(i)&&dt(i.name)!==dt(r.name))&&this.raise(lt.MissingClosingTagElement,i,{openingTagName:dt(r.name)})}if(ut(r)?(t.openingFragment=r,t.closingFragment=i):(t.openingElement=r,t.closingElement=i),t.children=n,this.match(47))throw this.raise(lt.UnwrappedAdjacentJSXElements,this.state.startLoc);return ut(r)?this.finishNode(t,`JSXFragment`):this.finishNode(t,`JSXElement`)}jsxParseElement(){let e=this.state.startLoc;return this.next(),this.jsxParseElementAt(e)}setContext(e){let{context:t}=this.state;t[t.length-1]=e}parseExprAtom(e){return this.match(143)?this.jsxParseElement():this.match(47)&&this.input.charCodeAt(this.state.pos)!==33?(this.replaceToken(143),this.jsxParseElement()):super.parseExprAtom(e)}skipSpace(){this.curContext().preserveSpace||super.skipSpace()}getTokenFromCode(e){let t=this.curContext();if(t===C.j_expr){this.jsxReadToken();return}if(t===C.j_oTag||t===C.j_cTag){if(Me(e)){this.jsxReadWord();return}if(e===62){++this.state.pos,this.finishToken(144);return}if((e===34||e===39)&&t===C.j_oTag){this.jsxReadString(e);return}}if(e===60&&this.state.canStartJSXElement&&this.input.charCodeAt(this.state.pos+1)!==33){++this.state.pos,this.finishToken(143);return}super.getTokenFromCode(e)}updateContext(e){let{context:t,type:n}=this.state;if(n===56&&e===143)t.splice(-2,2,C.j_cTag),this.state.canStartJSXElement=!1;else if(n===143)t.push(C.j_oTag);else if(n===144){let n=t[t.length-1];n===C.j_oTag&&e===56||n===C.j_cTag?(t.pop(),this.state.canStartJSXElement=t[t.length-1]===C.j_expr):(this.setContext(C.j_expr),this.state.canStartJSXElement=!0)}else this.state.canStartJSXElement=pe(n)}},pt=class extends Ke{constructor(...e){super(...e),this.tsNames=new Map}},mt=class extends qe{constructor(...e){super(...e),this.importsStack=[]}createScope(e){return this.importsStack.push(new Set),new pt(e)}enter(e){e===1024&&this.importsStack.push(new Set),super.enter(e)}exit(){let e=super.exit();return e===1024&&this.importsStack.pop(),e}hasImport(e,t){let n=this.importsStack.length;if(this.importsStack[n-1].has(e))return!0;if(!t&&n>1){for(let t=0;t<n-1;t++)if(this.importsStack[t].has(e))return!0}return!1}declareName(e,t,n){if(t&4096){this.hasImport(e,!0)&&this.parser.raise(v.VarRedeclaration,n,{identifierName:e}),this.importsStack[this.importsStack.length-1].add(e);return}let r=this.currentScope(),i=r.tsNames.get(e)||0;if(t&1024){this.maybeExportDefined(r,e),r.tsNames.set(e,i|16);return}super.declareName(e,t,n),t&2&&(t&1||(this.checkRedeclarationInScope(r,e,t,n),this.maybeExportDefined(r,e)),i|=1),t&256&&(i|=2),t&512&&(i|=4),t&128&&(i|=8),i&&r.tsNames.set(e,i)}isRedeclaredInScope(e,t,n){let r=e.tsNames.get(t);return(r&2)>0?n&256?!!(n&512)!=(r&4)>0:!0:n&128&&(r&8)>0?e.names.get(t)&2?!!(n&1):!1:n&2&&(r&1)>0?!0:super.isRedeclaredInScope(e,t,n)}checkLocalExport(e){let{name:t}=e;if(this.hasImport(t))return;let n=this.scopeStack.length;for(let e=n-1;e>=0;e--){let n=this.scopeStack[e].tsNames.get(t);if((n&1)>0||(n&16)>0)return}super.checkLocalExport(e)}},ht=class{constructor(){this.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}};function gt(e,t){return(e?2:0)|(t?1:0)}var _t=class{constructor(){this.sawUnambiguousESM=!1,this.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,n]=e;if(!this.hasPlugin(t))return!1;let r=this.plugins.get(t);for(let e of Object.keys(n))if(r?.[e]!==n[e])return!1;return!0}}getPluginOption(e,t){return this.plugins.get(e)?.[t]}};function vt(e,t){e.trailingComments===void 0?e.trailingComments=t:e.trailingComments.unshift(...t)}function yt(e,t){e.leadingComments===void 0?e.leadingComments=t:e.leadingComments.unshift(...t)}function R(e,t){e.innerComments===void 0?e.innerComments=t:e.innerComments.unshift(...t)}function z(e,t,n){let r=null,i=t.length;for(;r===null&&i>0;)r=t[--i];r===null||r.start>n.start?R(e,n.comments):vt(r,n.comments)}var bt=class extends _t{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,n=t.length;if(n===0)return;let r=n-1,i=t[r];i.start===e.end&&(i.leadingNode=e,r--);let{start:a}=e;for(;r>=0;r--){let n=t[r],i=n.end;if(i>a)n.containingNode=e,this.finalizeComment(n),t.splice(r,1);else{i===a&&(n.trailingNode=e);break}}}finalizeComment(e){let{comments:t}=e;if(e.leadingNode!==null||e.trailingNode!==null)e.leadingNode!==null&&vt(e.leadingNode,t),e.trailingNode!==null&&yt(e.trailingNode,t);else{let n=e.containingNode,r=e.start;if(this.input.charCodeAt(this.offsetToSourcePos(r)-1)===44)switch(n.type){case`ObjectExpression`:case`ObjectPattern`:z(n,n.properties,e);break;case`CallExpression`:case`OptionalCallExpression`:z(n,n.arguments,e);break;case`ImportExpression`:z(n,[n.source,n.options??null],e);break;case`FunctionDeclaration`:case`FunctionExpression`:case`ArrowFunctionExpression`:case`ObjectMethod`:case`ClassMethod`:case`ClassPrivateMethod`:z(n,n.params,e);break;case`ArrayExpression`:case`ArrayPattern`:z(n,n.elements,e);break;case`ExportNamedDeclaration`:case`ImportDeclaration`:z(n,n.specifiers,e);break;case`TSEnumDeclaration`:z(n,n.members,e);break;case`TSEnumBody`:z(n,n.members,e);break;default:if(n.type===`RecordExpression`){z(n,n.properties,e);break}if(n.type===`TupleExpression`){z(n,n.elements,e);break}R(n,t)}else R(n,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:n}=t;if(n===0)return;let r=t[n-1];r.leadingNode===e&&(r.leadingNode=null)}takeSurroundingComments(e,t,n){let{commentStack:r}=this.state,i=r.length;if(i===0)return;let a=i-1;for(;a>=0;a--){let i=r[a],o=i.end;if(i.start===n)i.leadingNode=e;else if(o===t)i.trailingNode=e;else if(o<t)break}}},xt=class e{constructor(){this.flags=1024,this.startIndex=void 0,this.curLine=void 0,this.lineStart=void 0,this.startLoc=void 0,this.endLoc=void 0,this.errors=[],this.potentialArrowAt=-1,this.noArrowAt=[],this.noArrowParamsConversionAt=[],this.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null},this.labels=[],this.commentsLen=0,this.commentStack=[],this.pos=0,this.type=140,this.value=null,this.start=0,this.end=0,this.lastTokEndLoc=null,this.lastTokStartLoc=null,this.context=[C.brace],this.firstInvalidTemplateEscapePos=null,this.strictErrors=new Map,this.tokensLength=0}get strict(){return(this.flags&1)>0}set strict(e){e?this.flags|=1:this.flags&=-2}init({strictMode:e,sourceType:t,startIndex:r,startLine:i,startColumn:a}){this.strict=e===!1?!1:e===!0?!0:t===`module`,this.startIndex=r,this.curLine=i,this.lineStart=-a,this.startLoc=this.endLoc=new n(i,a,r)}get maybeInArrowParameters(){return(this.flags&2)>0}set maybeInArrowParameters(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 soloAwait(){return(this.flags&256)>0}set soloAwait(e){e?this.flags|=256:this.flags&=-257}get inFSharpPipelineDirectBody(){return(this.flags&512)>0}set inFSharpPipelineDirectBody(e){e?this.flags|=512:this.flags&=-513}get canStartJSXElement(){return(this.flags&1024)>0}set canStartJSXElement(e){e?this.flags|=1024:this.flags&=-1025}get containsEsc(){return(this.flags&2048)>0}set containsEsc(e){e?this.flags|=2048:this.flags&=-2049}get hasTopLevelAwait(){return(this.flags&4096)>0}set hasTopLevelAwait(e){e?this.flags|=4096:this.flags&=-4097}curPosition(){return new n(this.curLine,this.pos-this.lineStart,this.pos+this.startIndex)}clone(){let t=new e;return t.flags=this.flags,t.startIndex=this.startIndex,t.curLine=this.curLine,t.lineStart=this.lineStart,t.startLoc=this.startLoc,t.endLoc=this.endLoc,t.errors=this.errors.slice(),t.potentialArrowAt=this.potentialArrowAt,t.noArrowAt=this.noArrowAt.slice(),t.noArrowParamsConversionAt=this.noArrowParamsConversionAt.slice(),t.topicContext=this.topicContext,t.labels=this.labels.slice(),t.commentsLen=this.commentsLen,t.commentStack=this.commentStack.slice(),t.pos=this.pos,t.type=this.type,t.value=this.value,t.start=this.start,t.end=this.end,t.lastTokEndLoc=this.lastTokEndLoc,t.lastTokStartLoc=this.lastTokStartLoc,t.context=this.context.slice(),t.firstInvalidTemplateEscapePos=this.firstInvalidTemplateEscapePos,t.strictErrors=this.strictErrors,t.tokensLength=this.tokensLength,t}},St=function(e){return e>=48&&e<=57};let Ct={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},wt={bin:e=>e===48||e===49,oct:e=>e>=48&&e<=55,dec:e=>e>=48&&e<=57,hex:e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102};function Tt(e,t,n,r,i,a){let o=n,s=r,c=i,l=``,u=null,d=n,{length:f}=t;for(;;){if(n>=f){a.unterminated(o,s,c),l+=t.slice(d,n);break}let p=t.charCodeAt(n);if(Et(e,p,t,n)){l+=t.slice(d,n);break}if(p===92){l+=t.slice(d,n);let o=B(t,n,r,i,e===`template`,a);o.ch===null&&!u?u={pos:n,lineStart:r,curLine:i}:l+=o.ch,{pos:n,lineStart:r,curLine:i}=o,d=n}else p===8232||p===8233?(++n,++i,r=n):p===10||p===13?e===`template`?(l+=t.slice(d,n)+`
4
+ `,++n,p===13&&t.charCodeAt(n)===10&&++n,++i,d=r=n):a.unterminated(o,s,c):++n}return{pos:n,str:l,firstInvalidLoc:u,lineStart:r,curLine:i,containsInvalid:!!u}}function Et(e,t,n,r){return e===`template`?t===96||t===36&&n.charCodeAt(r+1)===123:t===(e===`double`?34:39)}function B(e,t,n,r,i,a){let o=!i;t++;let s=e=>({pos:t,ch:e,lineStart:n,curLine:r}),c=e.charCodeAt(t++);switch(c){case 110:return s(`
5
+ `);case 114:return s(`\r`);case 120:{let i;return{code:i,pos:t}=Dt(e,t,n,r,2,!1,o,a),s(i===null?null:String.fromCharCode(i))}case 117:{let i;return{code:i,pos:t}=V(e,t,n,r,o,a),s(i===null?null:String.fromCodePoint(i))}case 116:return s(` `);case 98:return s(`\b`);case 118:return s(`\v`);case 102:return s(`\f`);case 13:e.charCodeAt(t)===10&&++t;case 10:n=t,++r;case 8232:case 8233:return s(``);case 56:case 57:if(i)return s(null);a.strictNumericEscape(t-1,n,r);default:if(c>=48&&c<=55){let o=t-1,c=/^[0-7]+/.exec(e.slice(o,t+2))[0],l=parseInt(c,8);l>255&&(c=c.slice(0,-1),l=parseInt(c,8)),t+=c.length-1;let u=e.charCodeAt(t);if(c!==`0`||u===56||u===57){if(i)return s(null);a.strictNumericEscape(o,n,r)}return s(String.fromCharCode(l))}return s(String.fromCharCode(c))}}function Dt(e,t,n,r,i,a,o,s){let c=t,l;return{n:l,pos:t}=Ot(e,t,n,r,16,i,a,!1,s,!o),l===null&&(o?s.invalidEscapeSequence(c,n,r):t=c-1),{code:l,pos:t}}function Ot(e,t,n,r,i,a,o,s,c,l){let u=t,d=i===16?Ct.hex:Ct.decBinOct,f=i===16?wt.hex:i===10?wt.dec:i===8?wt.oct:wt.bin,p=!1,m=0;for(let u=0,h=a??1/0;u<h;++u){let a=e.charCodeAt(t),u;if(a===95&&s!==`bail`){let i=e.charCodeAt(t-1),a=e.charCodeAt(t+1);if(s){if(Number.isNaN(a)||!f(a)||d.has(i)||d.has(a)){if(l)return{n:null,pos:t};c.unexpectedNumericSeparator(t,n,r)}}else{if(l)return{n:null,pos:t};c.numericSeparatorInEscapeSequence(t,n,r)}++t;continue}if(u=a>=97?a-97+10:a>=65?a-65+10:St(a)?a-48:1/0,u>=i){if(u<=9&&l)return{n:null,pos:t};if(u<=9&&c.invalidDigit(t,n,r,i))u=0;else if(o)u=0,p=!0;else break}++t,m=m*i+u}return t===u||a!=null&&t-u!==a||p?{n:null,pos:t}:{n:m,pos:t}}function V(e,t,n,r,i,a){let o=e.charCodeAt(t),s;if(o===123){if(++t,{code:s,pos:t}=Dt(e,t,n,r,e.indexOf(`}`,t)-t,!0,i,a),++t,s!==null&&s>1114111)if(i)a.invalidCodePoint(t,n,r);else return{code:null,pos:t}}else ({code:s,pos:t}=Dt(e,t,n,r,4,!1,i,a));return{code:s,pos:t}}function H(e,t,r){return new n(r,e-t,e)}let kt=new Set([103,109,115,105,121,117,100,118]);var U=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 r(e.startLoc,e.endLoc)}},At=class extends bt{constructor(e,t){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(e,t,n,r)=>this.optionFlags&2048?(this.raise(v.InvalidDigit,H(e,t,n),{radix:r}),!0):!1,numericSeparatorInEscapeSequence:this.errorBuilder(v.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(v.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(v.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(v.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(e,t,n)=>{this.recordStrictModeErrors(v.StrictNumericEscape,H(e,t,n))},unterminated:(e,t,n)=>{throw this.raise(v.UnterminatedString,H(e-1,t,n))}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(v.StrictNumericEscape),unterminated:(e,t,n)=>{throw this.raise(v.UnterminatedTemplate,H(e,t,n))}}),this.state=new xt,this.state.init(e),this.input=t,this.length=t.length,this.comments=[],this.isLookahead=!1}pushToken(e){this.tokens.length=this.state.tokensLength,this.tokens.push(e),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.optionFlags&256&&this.pushToken(new U(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 ot.lastIndex=e,ot.test(this.input)?ot.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 st.lastIndex=e,st.test(this.input)?st.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 n=this.input.charCodeAt(e);(n&64512)==56320&&(t=65536+((t&1023)<<10)+(n&1023))}return t}setStrict(e){this.state.strict=e,e&&(this.state.strictErrors.forEach(([e,t])=>this.raise(e,t)),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(140);return}this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(e){let t;this.isLookahead||(t=this.state.curPosition());let n=this.state.pos,i=this.input.indexOf(e,n+2);if(i===-1)throw this.raise(v.UnterminatedComment,this.state.curPosition());for(this.state.pos=i+e.length,it.lastIndex=n+2;it.test(this.input)&&it.lastIndex<=i;)++this.state.curLine,this.state.lineStart=it.lastIndex;if(this.isLookahead)return;let a={type:`CommentBlock`,value:this.input.slice(n+2,i),start:this.sourceToOffsetPos(n),end:this.sourceToOffsetPos(i+e.length),loc:new r(t,this.state.curPosition())};return this.optionFlags&256&&this.pushToken(a),a}skipLineComment(e){let t=this.state.pos,n;this.isLookahead||(n=this.state.curPosition());let i=this.input.charCodeAt(this.state.pos+=e);if(this.state.pos<this.length)for(;!L(i)&&++this.state.pos<this.length;)i=this.input.charCodeAt(this.state.pos);if(this.isLookahead)return;let a=this.state.pos,o={type:`CommentLine`,value:this.input.slice(t+e,a),start:this.sourceToOffsetPos(t),end:this.sourceToOffsetPos(a),loc:new r(n,this.state.curPosition())};return this.optionFlags&256&&this.pushToken(o),o}skipSpace(){let e=this.state.pos,t=this.optionFlags&4096?[]:null;loop:for(;this.state.pos<this.length;){let n=this.input.charCodeAt(this.state.pos);switch(n){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 e=this.skipBlockComment(`*/`);e!==void 0&&(this.addComment(e),t?.push(e));break}case 47:{let e=this.skipLineComment(2);e!==void 0&&(this.addComment(e),t?.push(e));break}default:break loop}break;default:if(ct(n))++this.state.pos;else if(n===45&&!this.inModule&&this.optionFlags&8192){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 e=this.skipLineComment(3);e!==void 0&&(this.addComment(e),t?.push(e))}else break loop}else if(n===60&&!this.inModule&&this.optionFlags&8192){let e=this.state.pos;if(this.input.charCodeAt(e+1)===33&&this.input.charCodeAt(e+2)===45&&this.input.charCodeAt(e+3)===45){let e=this.skipLineComment(4);e!==void 0&&(this.addComment(e),t?.push(e))}else break loop}else break loop}}if(t?.length>0){let n=this.state.pos,r={start:this.sourceToOffsetPos(e),end:this.sourceToOffsetPos(n),comments:t,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(r)}}finishToken(e,t){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();let n=this.state.type;this.state.type=e,this.state.value=t,this.isLookahead||this.updateContext(n)}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(v.UnexpectedDigitAfterHash,this.state.curPosition());if(t===123||t===91&&this.hasPlugin(`recordAndTuple`)){if(this.expectPlugin(`recordAndTuple`),this.getPluginOption(`recordAndTuple`,`syntaxType`)===`bar`)throw this.raise(t===123?v.RecordExpressionHashIncorrectStartSyntaxType:v.TupleExpressionHashIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,t===123?this.finishToken(7):this.finishToken(1)}else Me(t)?(++this.state.pos,this.finishToken(139,this.readWord1(t))):t===92?(++this.state.pos,this.finishToken(139,this.readWord1())):this.finishOp(27,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(21)):(++this.state.pos,this.finishToken(16))}readToken_slash(){this.input.charCodeAt(this.state.pos+1)===61?this.finishOp(31,2):this.finishOp(56,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;!L(e)&&++this.state.pos<this.length;)e=this.input.charCodeAt(this.state.pos);let n=this.input.slice(t+2,this.state.pos);return this.finishToken(28,n),!0}readToken_mult_modulo(e){let t=e===42?55:54,n=1,r=this.input.charCodeAt(this.state.pos+1);e===42&&r===42&&(n++,r=this.input.charCodeAt(this.state.pos+2),t=57),r===61&&!this.state.inType&&(n++,t=e===37?33:30),this.finishOp(t,n)}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(30,3):this.finishOp(e===124?41:42,2);return}if(e===124){if(t===62){this.finishOp(39,2);return}if(this.hasPlugin(`recordAndTuple`)&&t===125){if(this.getPluginOption(`recordAndTuple`,`syntaxType`)!==`bar`)throw this.raise(v.RecordExpressionBarIncorrectEndSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(9);return}if(this.hasPlugin(`recordAndTuple`)&&t===93){if(this.getPluginOption(`recordAndTuple`,`syntaxType`)!==`bar`)throw this.raise(v.TupleExpressionBarIncorrectEndSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(4);return}}if(t===61){this.finishOp(30,2);return}this.finishOp(e===124?43:45,1)}readToken_caret(){let e=this.input.charCodeAt(this.state.pos+1);e===61&&!this.state.inType?this.finishOp(32,2):e===94&&this.hasPlugin([`pipelineOperator`,{proposal:`hack`,topicToken:`^^`}])?(this.finishOp(37,2),this.input.codePointAt(this.state.pos)===94&&this.unexpected()):this.finishOp(44,1)}readToken_atSign(){this.input.charCodeAt(this.state.pos+1)===64&&this.hasPlugin([`pipelineOperator`,{proposal:`hack`,topicToken:`@@`}])?this.finishOp(38,2):this.finishOp(26,1)}readToken_plus_min(e){let t=this.input.charCodeAt(this.state.pos+1);if(t===e){this.finishOp(34,2);return}t===61?this.finishOp(30,2):this.finishOp(53,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(30,3);return}this.finishOp(51,2);return}if(t===61){this.finishOp(49,2);return}this.finishOp(47,1)}readToken_gt(){let{pos:e}=this.state,t=this.input.charCodeAt(e+1);if(t===62){let t=this.input.charCodeAt(e+2)===62?3:2;if(this.input.charCodeAt(e+t)===61){this.finishOp(30,t+1);return}this.finishOp(52,t);return}if(t===61){this.finishOp(49,2);return}this.finishOp(48,1)}readToken_eq_excl(e){let t=this.input.charCodeAt(this.state.pos+1);if(t===61){this.finishOp(46,this.input.charCodeAt(this.state.pos+2)===61?3:2);return}if(e===61&&t===62){this.state.pos+=2,this.finishToken(19);return}this.finishOp(e===61?29:35,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(30,3):this.finishOp(40,2):e===46&&!(t>=48&&t<=57)?(this.state.pos+=2,this.finishToken(18)):(++this.state.pos,this.finishToken(17))}getTokenFromCode(e){switch(e){case 46:this.readToken_dot();return;case 40:++this.state.pos,this.finishToken(10);return;case 41:++this.state.pos,this.finishToken(11);return;case 59:++this.state.pos,this.finishToken(13);return;case 44:++this.state.pos,this.finishToken(12);return;case 91:if(this.hasPlugin(`recordAndTuple`)&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption(`recordAndTuple`,`syntaxType`)!==`bar`)throw this.raise(v.TupleExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(2)}else ++this.state.pos,this.finishToken(0);return;case 93:++this.state.pos,this.finishToken(3);return;case 123:if(this.hasPlugin(`recordAndTuple`)&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption(`recordAndTuple`,`syntaxType`)!==`bar`)throw this.raise(v.RecordExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(6)}else ++this.state.pos,this.finishToken(5);return;case 125:++this.state.pos,this.finishToken(8);return;case 58:this.hasPlugin(`functionBind`)&&this.input.charCodeAt(this.state.pos+1)===58?this.finishOp(15,2):(++this.state.pos,this.finishToken(14));return;case 63:this.readToken_question();return;case 96:this.readTemplateToken();return;case 48:{let e=this.input.charCodeAt(this.state.pos+1);if(e===120||e===88){this.readRadixNumber(16);return}if(e===111||e===79){this.readRadixNumber(8);return}if(e===98||e===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(36,1);return;case 64:this.readToken_atSign();return;case 35:this.readToken_numberSign();return;case 92:this.readWord();return;default:if(Me(e)){this.readWord(e);return}}throw this.raise(v.InvalidOrUnexpectedToken,this.state.curPosition(),{unexpected:String.fromCodePoint(e)})}finishOp(e,t){let n=this.input.slice(this.state.pos,this.state.pos+t);this.state.pos+=t,this.finishToken(e,n)}readRegexp(){let e=this.state.startLoc,t=this.state.start+1,n,r,{pos:a}=this.state;for(;;++a){if(a>=this.length)throw this.raise(v.UnterminatedRegExp,i(e,1));let t=this.input.charCodeAt(a);if(L(t))throw this.raise(v.UnterminatedRegExp,i(e,1));if(n)n=!1;else{if(t===91)r=!0;else if(t===93&&r)r=!1;else if(t===47&&!r)break;n=t===92}}let o=this.input.slice(t,a);++a;let s=``,c=()=>i(e,a+2-t);for(;a<this.length;){let e=this.codePointAtPos(a),t=String.fromCharCode(e);if(kt.has(e))e===118?s.includes(`u`)&&this.raise(v.IncompatibleRegExpUVFlags,c()):e===117&&s.includes(`v`)&&this.raise(v.IncompatibleRegExpUVFlags,c()),s.includes(t)&&this.raise(v.DuplicateRegExpFlags,c());else if(Ne(e)||e===92)this.raise(v.MalformedRegExpFlags,c());else break;++a,s+=t}this.state.pos=a,this.finishToken(138,{pattern:o,flags:s})}readInt(e,t,n=!1,r=!0){let{n:i,pos:a}=Ot(this.input,this.state.pos,this.state.lineStart,this.state.curLine,e,t,n,r,this.errorHandlers_readInt,!1);return this.state.pos=a,i}readRadixNumber(e){let t=this.state.pos,n=this.state.curPosition(),r=!1;this.state.pos+=2;let a=this.readInt(e);a??this.raise(v.InvalidDigit,i(n,2),{radix:e});let o=this.input.charCodeAt(this.state.pos);if(o===110)++this.state.pos,r=!0;else if(o===109)throw this.raise(v.InvalidDecimal,n);if(Me(this.codePointAtPos(this.state.pos)))throw this.raise(v.NumberIdentifier,this.state.curPosition());if(r){let e=this.input.slice(t,this.state.pos).replace(/[_n]/g,``);this.finishToken(136,e);return}this.finishToken(135,a)}readNumber(e){let t=this.state.pos,n=this.state.curPosition(),r=!1,a=!1,o=!1,s=!1;!e&&this.readInt(10)===null&&this.raise(v.InvalidNumber,this.state.curPosition());let c=this.state.pos-t>=2&&this.input.charCodeAt(t)===48;if(c){let e=this.input.slice(t,this.state.pos);if(this.recordStrictModeErrors(v.StrictOctalLiteral,n),!this.state.strict){let t=e.indexOf(`_`);t>0&&this.raise(v.ZeroDigitNumericSeparator,i(n,t))}s=c&&!/[89]/.test(e)}let l=this.input.charCodeAt(this.state.pos);if(l===46&&!s&&(++this.state.pos,this.readInt(10),r=!0,l=this.input.charCodeAt(this.state.pos)),(l===69||l===101)&&!s&&(l=this.input.charCodeAt(++this.state.pos),(l===43||l===45)&&++this.state.pos,this.readInt(10)===null&&this.raise(v.InvalidOrMissingExponent,n),r=!0,o=!0,l=this.input.charCodeAt(this.state.pos)),l===110&&((r||c)&&this.raise(v.InvalidBigIntLiteral,n),++this.state.pos,a=!0),l===109){this.expectPlugin(`decimal`,this.state.curPosition()),(o||c)&&this.raise(v.InvalidDecimal,n),++this.state.pos;var u=!0}if(Me(this.codePointAtPos(this.state.pos)))throw this.raise(v.NumberIdentifier,this.state.curPosition());let d=this.input.slice(t,this.state.pos).replace(/[_mn]/g,``);if(a){this.finishToken(136,d);return}if(u){this.finishToken(137,d);return}let f=s?parseInt(d,8):parseFloat(d);this.finishToken(135,f)}readCodePoint(e){let{code:t,pos:n}=V(this.input,this.state.pos,this.state.lineStart,this.state.curLine,e,this.errorHandlers_readCodePoint);return this.state.pos=n,t}readString(e){let{str:t,pos:n,curLine:r,lineStart:i}=Tt(e===34?`double`:`single`,this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string);this.state.pos=n+1,this.state.lineStart=i,this.state.curLine=r,this.finishToken(134,t)}readTemplateContinuation(){this.match(8)||this.unexpected(null,8),this.state.pos--,this.readTemplateToken()}readTemplateToken(){let e=this.input[this.state.pos],{str:t,firstInvalidLoc:r,pos:i,curLine:a,lineStart:o}=Tt(`template`,this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=i+1,this.state.lineStart=o,this.state.curLine=a,r&&(this.state.firstInvalidTemplateEscapePos=new n(r.curLine,r.pos-r.lineStart,this.sourceToOffsetPos(r.pos))),this.input.codePointAt(i)===96?this.finishToken(24,r?null:e+t+"`"):(this.state.pos++,this.finishToken(25,r?null:e+t+"${"))}recordStrictModeErrors(e,t){let n=t.index;this.state.strict&&!this.state.strictErrors.has(n)?this.raise(e,t):this.state.strictErrors.set(n,[e,t])}readWord1(e){this.state.containsEsc=!1;let t=``,n=this.state.pos,r=this.state.pos;for(e!==void 0&&(this.state.pos+=e<=65535?1:2);this.state.pos<this.length;){let e=this.codePointAtPos(this.state.pos);if(Ne(e))this.state.pos+=e<=65535?1:2;else if(e===92){this.state.containsEsc=!0,t+=this.input.slice(r,this.state.pos);let e=this.state.curPosition(),i=this.state.pos===n?Me:Ne;if(this.input.charCodeAt(++this.state.pos)!==117){this.raise(v.MissingUnicodeEscape,this.state.curPosition()),r=this.state.pos-1;continue}++this.state.pos;let a=this.readCodePoint(!0);a!==null&&(i(a)||this.raise(v.EscapedCharNotAnIdentifier,e),t+=String.fromCodePoint(a)),r=this.state.pos}else break}return t+this.input.slice(r,this.state.pos)}readWord(e){let t=this.readWord1(e),n=ie.get(t);n===void 0?this.finishToken(132,t):this.finishToken(n,we(n))}checkKeywordEscapes(){let{type:e}=this.state;ve(e)&&this.state.containsEsc&&this.raise(v.InvalidEscapedReservedWord,this.state.startLoc,{reservedWord:we(e)})}raise(e,t,r={}){let i=e(t instanceof n?t:t.loc.start,r);if(!(this.optionFlags&2048))throw i;return this.isLookahead||this.state.errors.push(i),i}raiseOverwrite(e,t,r={}){let i=t instanceof n?t:t.loc.start,a=i.index,o=this.state.errors;for(let t=o.length-1;t>=0;t--){let n=o[t];if(n.loc.index===a)return o[t]=e(i,r);if(n.loc.index<a)break}return this.raise(e,t,r)}updateContext(e){}unexpected(e,t){throw this.raise(v.UnexpectedToken,e??this.state.startLoc,{expected:t?we(t):null})}expectPlugin(e,t){if(this.hasPlugin(e))return!0;throw this.raise(v.MissingPlugin,t??this.state.startLoc,{missingPlugin:[e]})}expectOnePlugin(e){if(!e.some(e=>this.hasPlugin(e)))throw this.raise(v.MissingOneOfPlugins,this.state.startLoc,{missingPlugin:e})}errorBuilder(e){return(t,n,r)=>{this.raise(e,H(t,n,r))}}},jt=class{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}},Mt=class{constructor(e){this.parser=void 0,this.stack=[],this.undefinedPrivateNames=new Map,this.parser=e}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new jt)}exit(){let e=this.stack.pop(),t=this.current();for(let[n,r]of Array.from(e.undefinedPrivateNames))t?t.undefinedPrivateNames.has(n)||t.undefinedPrivateNames.set(n,r):this.parser.raise(v.InvalidPrivateFieldResolution,r,{identifierName:n})}declarePrivateName(e,t,n){let{privateNames:r,loneAccessors:i,undefinedPrivateNames:a}=this.current(),o=r.has(e);if(t&3){let n=o&&i.get(e);if(n){let r=n&4,a=t&4;o=(n&3)==(t&3)||r!==a,o||i.delete(e)}else o||i.set(e,t)}o&&this.parser.raise(v.PrivateNameRedeclaration,n,{identifierName:e}),r.add(e),a.delete(e)}usePrivateName(e,t){let n;for(n of this.stack)if(n.privateNames.has(e))return;n?n.undefinedPrivateNames.set(e,t):this.parser.raise(v.InvalidPrivateFieldResolution,t,{identifierName:e})}},Nt=class{constructor(e=0){this.type=e}canBeArrowParameterDeclaration(){return this.type===2||this.type===1}isCertainlyParameterDeclaration(){return this.type===3}},Pt=class extends Nt{constructor(e){super(e),this.declarationErrors=new Map}recordDeclarationError(e,t){let n=t.index;this.declarationErrors.set(n,[e,t])}clearDeclarationError(e){this.declarationErrors.delete(e)}iterateErrors(e){this.declarationErrors.forEach(e)}},Ft=class{constructor(e){this.parser=void 0,this.stack=[new Nt],this.parser=e}enter(e){this.stack.push(e)}exit(){this.stack.pop()}recordParameterInitializerError(e,t){let n=t.loc.start,{stack:r}=this,i=r.length-1,a=r[i];for(;!a.isCertainlyParameterDeclaration();){if(a.canBeArrowParameterDeclaration())a.recordDeclarationError(e,n);else return;a=r[--i]}this.parser.raise(e,n)}recordArrowParameterBindingError(e,t){let{stack:n}=this,r=n[n.length-1],i=t.loc.start;if(r.isCertainlyParameterDeclaration())this.parser.raise(e,i);else if(r.canBeArrowParameterDeclaration())r.recordDeclarationError(e,i);else return}recordAsyncArrowParametersError(e){let{stack:t}=this,n=t.length-1,r=t[n];for(;r.canBeArrowParameterDeclaration();)r.type===2&&r.recordDeclarationError(v.AwaitBindingIdentifier,e),r=t[--n]}validateAsPattern(){let{stack:e}=this,t=e[e.length-1];t.canBeArrowParameterDeclaration()&&t.iterateErrors(([t,n])=>{this.parser.raise(t,n);let r=e.length-2,i=e[r];for(;i.canBeArrowParameterDeclaration();)i.clearDeclarationError(n.index),i=e[--r]})}};function It(){return new Nt(3)}function Lt(){return new Pt(1)}function Rt(){return new Pt(2)}function zt(){return new Nt}var Bt=class extends At{addExtra(e,t,n,r=!0){if(!e)return;let{extra:i}=e;i??(i={},e.extra=i),r?i[t]=n:Object.defineProperty(i,t,{enumerable:r,value:n})}isContextual(e){return this.state.type===e&&!this.state.containsEsc}isUnparsedContextual(e,t){if(this.input.startsWith(t,e)){let n=this.input.charCodeAt(e+t.length);return!(Ne(n)||(n&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(140)||this.match(8)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return at(this.input,this.offsetToSourcePos(this.state.lastTokEndLoc.index),this.state.start)}hasFollowingLineBreak(){return at(this.input,this.state.end,this.nextTokenStart())}isLineTerminator(){return this.eat(13)||this.canInsertSemicolon()}semicolon(e=!0){(e?this.isLineTerminator():this.eat(13))||this.raise(v.MissingSemicolon,this.state.lastTokEndLoc)}expect(e,t){this.eat(e)||this.unexpected(t,e)}tryParse(e,t=this.state.clone()){let n={node:null};try{let r=e((e=null)=>{throw n.node=e,n});if(this.state.errors.length>t.errors.length){let e=this.state;return this.state=t,this.state.tokensLength=e.tokensLength,{node:r,error:e.errors[t.errors.length],thrown:!1,aborted:!1,failState:e}}return{node:r,error:null,thrown:!1,aborted:!1,failState:null}}catch(e){let r=this.state;if(this.state=t,e instanceof SyntaxError)return{node:null,error:e,thrown:!0,aborted:!1,failState:r};if(e===n)return{node:n.node,error:null,thrown:!1,aborted:!0,failState:r};throw e}}checkExpressionErrors(e,t){if(!e)return!1;let{shorthandAssignLoc:n,doubleProtoLoc:r,privateKeyLoc:i,optionalParametersLoc:a,voidPatternLoc:o}=e,s=!!n||!!r||!!a||!!i||!!o;if(!t)return s;n!=null&&this.raise(v.InvalidCoverInitializedName,n),r!=null&&this.raise(v.DuplicateProto,r),i!=null&&this.raise(v.UnexpectedPrivateField,i),a!=null&&this.unexpected(a),o!=null&&this.raise(v.InvalidCoverDiscardElement,o)}isLiteralPropertyName(){return fe(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 n=this.exportedIdentifiers;this.exportedIdentifiers=new Set;let r=this.inModule;this.inModule=e;let i=this.scope;this.scope=new(this.getScopeHandler())(this,e);let a=this.prodParam;this.prodParam=new ht;let o=this.classScope;this.classScope=new Mt(this);let s=this.expressionScope;return this.expressionScope=new Ft(this),()=>{this.state.labels=t,this.exportedIdentifiers=n,this.inModule=r,this.scope=i,this.prodParam=a,this.classScope=o,this.expressionScope=s}}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 n=t?514:1;this.optionFlags&4&&(n|=512),this.scope.enter(n)}checkDestructuringPrivate(e){let{privateKeyLoc:t}=e;t!==null&&this.expectPlugin(`destructuringPrivate`,t)}},Vt=class{constructor(){this.shorthandAssignLoc=null,this.doubleProtoLoc=null,this.privateKeyLoc=null,this.optionalParametersLoc=null,this.voidPatternLoc=null}},Ht=class{constructor(e,t,n){this.type=``,this.start=t,this.end=0,this.loc=new r(n),e?.optionFlags&128&&(this.range=[t,0]),e!=null&&e.filename&&(this.loc.filename=e.filename)}};let Ut=Ht.prototype;Ut.__clone=function(){let e=new Ht(void 0,this.start,this.loc.start),t=Object.keys(this);for(let n=0,r=t.length;n<r;n++){let r=t[n];r!==`leadingComments`&&r!==`trailingComments`&&r!==`innerComments`&&(e[r]=this[r])}return e};var Wt=class extends Bt{startNode(){let e=this.state.startLoc;return new Ht(this,e.index,e)}startNodeAt(e){return new Ht(this,e.index,e)}startNodeAtNode(e){return this.startNodeAt(e.loc.start)}finishNode(e,t){return this.finishNodeAt(e,t,this.state.lastTokEndLoc)}finishNodeAt(e,t,n){return e.type=t,e.end=n.index,e.loc.end=n,this.optionFlags&128&&(e.range[1]=n.index),this.optionFlags&4096&&this.processComment(e),e}resetStartLocation(e,t){e.start=t.index,e.loc.start=t,this.optionFlags&128&&(e.range[0]=t.index)}resetEndLocation(e,t=this.state.lastTokEndLoc){e.end=t.index,e.loc.end=t,this.optionFlags&128&&(e.range[1]=t.index)}resetStartLocationFromNode(e,t){this.resetStartLocation(e,t.loc.start)}castNodeTo(e,t){return e.type=t,e}cloneIdentifier(e){let{type:t,start:n,end:r,loc:i,range:a,name:o}=e,s=Object.create(Ut);return s.type=t,s.start=n,s.end=r,s.loc=i,s.range=a,s.name=o,e.extra&&(s.extra=e.extra),s}cloneStringLiteral(e){let{type:t,start:n,end:r,loc:i,range:a,extra:o}=e,s=Object.create(Ut);return s.type=t,s.start=n,s.end=r,s.loc=i,s.range=a,s.extra=o,s.value=e.value,s}};let Gt=e=>e.type===`ParenthesizedExpression`?Gt(e.expression):e;var Kt=class extends Wt{toAssignable(e,t=!1){var n;let r;switch((e.type===`ParenthesizedExpression`||(n=e.extra)!=null&&n.parenthesized)&&(r=Gt(e),t?r.type===`Identifier`?this.expressionScope.recordArrowParameterBindingError(v.InvalidParenthesizedAssignment,e):r.type!==`CallExpression`&&r.type!==`MemberExpression`&&!this.isOptionalMemberExpression(r)&&this.raise(v.InvalidParenthesizedAssignment,e):this.raise(v.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 n=0,r=e.properties.length,a=r-1;n<r;n++){var i;let r=e.properties[n],o=n===a;this.toAssignableObjectExpressionProp(r,o,t),o&&r.type===`RestElement`&&(i=e.extra)!=null&&i.trailingCommaLoc&&this.raise(v.RestTrailingComma,e.extra.trailingCommaLoc)}break;case`ObjectProperty`:{let{key:n,value:r}=e;this.isPrivateName(n)&&this.classScope.usePrivateName(this.getPrivateNameSV(n),n.loc.start),this.toAssignable(r,t);break}case`SpreadElement`:throw 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(v.MissingEqInAssignment,e.left.loc.end),this.castNodeTo(e,`AssignmentPattern`),delete e.operator,e.left.type===`VoidPattern`&&this.raise(v.VoidPatternInitializer,e.left),this.toAssignable(e.left,t);break;case`ParenthesizedExpression`:this.toAssignable(r,t);break}}toAssignableObjectExpressionProp(e,t,n){if(e.type===`ObjectMethod`)this.raise(e.kind===`get`||e.kind===`set`?v.PatternHasAccessor:v.PatternHasMethod,e.key);else if(e.type===`SpreadElement`){this.castNodeTo(e,`RestElement`);let r=e.argument;this.checkToRestConversion(r,!1),this.toAssignable(r,n),t||this.raise(v.RestTrailingComma,e)}else this.toAssignable(e,n)}toAssignableList(e,t,n){let r=e.length-1;for(let i=0;i<=r;i++){let a=e[i];a&&(this.toAssignableListItem(e,i,n),a.type===`RestElement`&&(i<r?this.raise(v.RestTrailingComma,a):t&&this.raise(v.RestTrailingComma,t)))}}toAssignableListItem(e,t,n){let r=e[t];if(r.type===`SpreadElement`){this.castNodeTo(r,`RestElement`);let e=r.argument;this.checkToRestConversion(e,!0),this.toAssignable(e,n)}else this.toAssignable(r,n)}isAssignable(e,t){switch(e.type){case`Identifier`:case`ObjectPattern`:case`ArrayPattern`:case`AssignmentPattern`:case`RestElement`:case`VoidPattern`:return!0;case`ObjectExpression`:{let t=e.properties.length-1;return e.properties.every((e,n)=>e.type!==`ObjectMethod`&&(n===t||e.type!==`SpreadElement`)&&this.isAssignable(e))}case`ObjectProperty`:return this.isAssignable(e.value);case`SpreadElement`:return this.isAssignable(e.argument);case`ArrayExpression`:return e.elements.every(e=>e===null||this.isAssignable(e));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}toReferencedListDeep(e,t){this.toReferencedList(e,t);for(let t of e)t?.type===`ArrayExpression`&&this.toReferencedListDeep(t.elements)}parseSpread(e){let t=this.startNode();return this.next(),t.argument=this.parseMaybeAssignAllowIn(e,void 0),this.finishNode(t,`SpreadElement`)}parseRestBinding(){let e=this.startNode();this.next();let t=this.parseBindingAtom();return t.type===`VoidPattern`&&this.raise(v.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(3,93,1),this.finishNode(e,`ArrayPattern`)}case 5:return this.parseObjectLike(8,!0);case 88:return this.parseVoidPattern(null)}return this.parseIdentifier()}parseBindingList(e,t,n){let r=n&1,i=[],a=!0;for(;!this.eat(e);)if(a?a=!1:this.expect(12),r&&this.match(12))i.push(null);else if(this.eat(e))break;else if(this.match(21)){let r=this.parseRestBinding();if((this.hasPlugin(`flow`)||n&2)&&(r=this.parseFunctionParamType(r)),i.push(r),!this.checkCommaAfterRest(t)){this.expect(e);break}}else{let e=[];if(n&2)for(this.match(26)&&this.hasPlugin(`decorators`)&&this.raise(v.UnsupportedParameterDecorator,this.state.startLoc);this.match(26);)e.push(this.parseDecorator());i.push(this.parseBindingElement(n,e))}return i}parseBindingRestProperty(e){return this.next(),this.hasPlugin(`discardBinding`)&&this.match(88)?(e.argument=this.parseVoidPattern(null),this.raise(v.UnexpectedVoidPattern,e.argument)):e.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(e,`RestElement`)}parseBindingProperty(){let{type:e,startLoc:t}=this.state;if(e===21)return this.parseBindingRestProperty(this.startNode());let n=this.startNode();return e===139?(this.expectPlugin(`destructuringPrivate`,t),this.classScope.usePrivateName(this.state.value,t),n.key=this.parsePrivateName()):this.parsePropertyName(n),n.method=!1,this.parseObjPropValue(n,t,!1,!1,!0,!1)}parseBindingElement(e,t){let n=this.parseMaybeDefault();return(this.hasPlugin(`flow`)||e&2)&&this.parseFunctionParamType(n),t.length&&(n.decorators=t,this.resetStartLocationFromNode(n,t[0])),this.parseMaybeDefault(n.loc.start,n)}parseFunctionParamType(e){return e}parseMaybeDefault(e,t){if(e??=this.state.startLoc,t??=this.parseBindingAtom(),!this.eat(29))return t;let n=this.startNodeAt(e);return t.type===`VoidPattern`&&this.raise(v.VoidPatternInitializer,t),n.left=t,n.right=this.parseMaybeAssignAllowIn(),this.finishNode(n,`AssignmentPattern`)}isValidLVal(e,t,n,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&8192)return!0}return!1}isOptionalMemberExpression(e){return e.type===`OptionalMemberExpression`}checkLVal(e,t,n=64,r=!1,i=!1,a=!1,o=!1){var s;let c=e.type;if(this.isObjectMethod(e))return;let l=this.isOptionalMemberExpression(e);if(l||c===`MemberExpression`){l&&(this.expectPlugin(`optionalChainingAssign`,e.loc.start),t.type!==`AssignmentExpression`&&this.raise(v.InvalidLhsOptionalChaining,e,{ancestor:t})),n!==64&&this.raise(v.InvalidPropertyBindingPattern,e);return}if(c===`Identifier`){this.checkIdentifier(e,n,i);let{name:t}=e;r&&(r.has(t)?this.raise(v.ParamDupe,e):r.add(t));return}else c===`VoidPattern`&&t.type===`CatchClause`&&this.raise(v.VoidPatternCatchClauseParam,e);let u=Gt(e);o||=u.type===`CallExpression`&&(u.callee.type===`Import`||u.callee.type===`Super`);let d=this.isValidLVal(c,o,!(a||(s=e.extra)!=null&&s.parenthesized)&&t.type===`AssignmentExpression`,n);if(d===!0)return;if(d===!1){let r=n===64?v.InvalidLhs:v.InvalidLhsBinding;this.raise(r,e,{ancestor:t});return}let f,p;typeof d==`string`?(f=d,p=c===`ParenthesizedExpression`):[f,p]=d;let m=c===`ArrayPattern`||c===`ObjectPattern`?{type:c}:t,h=e[f];if(Array.isArray(h))for(let e of h)e&&this.checkLVal(e,m,n,r,i,p,!0);else h&&this.checkLVal(h,m,n,r,i,p,o)}checkIdentifier(e,t,n=!1){this.state.strict&&(n?Ve(e.name,this.inModule):Be(e.name))&&(t===64?this.raise(v.StrictEvalArguments,e,{referenceName:e.name}):this.raise(v.StrictEvalArgumentsBinding,e,{bindingName:e.name})),t&8192&&e.name===`let`&&this.raise(v.LetInLexicalBinding,e),t&64||this.declareNameFromIdentifier(e,t)}declareNameFromIdentifier(e,t){this.scope.declareName(e.name,t,e.loc.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(v.InvalidRestAssignmentPattern,e)}}checkCommaAfterRest(e){return this.match(12)?(this.raise(this.lookaheadCharCode()===e?v.RestTrailingComma:v.ElementAfterRest,this.state.startLoc),!0):!1}};let qt=/in(?:stanceof)?|as|satisfies/y;function Jt(e){if(e==null)throw Error(`Unexpected ${e} value.`);return e}function W(e){if(!e)throw Error(`Assert fail`)}let G=_`typescript`({AbstractMethodHasImplementation:({methodName:e})=>`Method '${e}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:e})=>`Property '${e}' cannot have an initializer because it is marked abstract.`,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.`,DeclareAccessor:({kind:e})=>`'declare' is not allowed in ${e}ters.`,DeclareClassFieldHasInitializer:`Initializers are not allowed in ambient contexts.`,DeclareFunctionHasImplementation:`An implementation cannot be declared in ambient contexts.`,DuplicateAccessibilityModifier:({modifier:e})=>`Accessibility modifier already seen: '${e}'.`,DuplicateModifier:({modifier:e})=>`Duplicate modifier: '${e}'.`,EmptyHeritageClauseType:({token:e})=>`'${e}' list cannot be empty.`,EmptyTypeArguments:`Type argument list cannot be empty.`,EmptyTypeParameters:`Type parameter list cannot be empty.`,ExpectedAmbientAfterExportDeclare:`'export declare' must be followed by an ambient declaration.`,ImportAliasHasImportType:`An import alias can not use 'import type'.`,ImportReflectionHasImportType:"An `import module` declaration can not use `type` modifier",IncompatibleModifiers:({modifiers:e})=>`'${e[0]}' modifier cannot be used with '${e[1]}' modifier.`,IndexSignatureHasAbstract:`Index signatures cannot have the 'abstract' modifier.`,IndexSignatureHasAccessibility:({modifier:e})=>`Index signatures cannot have an accessibility modifier ('${e}').`,IndexSignatureHasDeclare:`Index signatures cannot have the 'declare' modifier.`,IndexSignatureHasOverride:`'override' modifier cannot appear on an index signature.`,IndexSignatureHasStatic:`Index signatures cannot have the 'static' modifier.`,InitializerNotAllowedInAmbientContext:`Initializers are not allowed in ambient contexts.`,InvalidHeritageClauseType:({token:e})=>`'${e}' list can only include identifiers or qualified-names with optional type arguments.`,InvalidModifierOnAwaitUsingDeclaration:e=>`'${e}' modifier cannot appear on an await using declaration.`,InvalidModifierOnTypeMember:({modifier:e})=>`'${e}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:e})=>`'${e}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:e})=>`'${e}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifierOnUsingDeclaration:e=>`'${e}' modifier cannot appear on a using declaration.`,InvalidModifiersOrder:({orderedModifiers:e})=>`'${e[0]}' modifier must precede '${e[1]}' modifier.`,InvalidPropertyAccessAfterInstantiationExpression:`Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.`,InvalidTupleMemberLabel:`Tuple members must be labeled with a simple identifier.`,MissingInterfaceName:`'interface' declarations must be followed by an identifier.`,NonAbstractClassHasAbstractMethod:`Abstract methods can only appear within an abstract class.`,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:e})=>`Private elements cannot have an accessibility modifier ('${e}').`,ReadonlyForMethodSignature:`'readonly' modifier can only appear on a property declaration or index signature.`,ReservedArrowTypeParam:"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `<T,>() => ...`.",ReservedTypeAssertion:"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",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:e})=>`Single type parameter ${e} should have a trailing comma. Example usage: <${e},>.`,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.`,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.`,UnsupportedImportTypeArgument:`Argument in a type import must be a string literal.`,UnsupportedParameterPropertyKind:`A parameter property may not be declared using a binding pattern.`,UnsupportedSignatureParameterKind:({type:e})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${e}.`,UsingDeclarationInAmbientContext:e=>`'${e}' declarations are not allowed in ambient contexts.`});function Yt(e){switch(e){case`any`:return`TSAnyKeyword`;case`boolean`:return`TSBooleanKeyword`;case`bigint`:return`TSBigIntKeyword`;case`never`:return`TSNeverKeyword`;case`number`:return`TSNumberKeyword`;case`object`:return`TSObjectKeyword`;case`string`:return`TSStringKeyword`;case`symbol`:return`TSSymbolKeyword`;case`undefined`:return`TSUndefinedKeyword`;case`unknown`:return`TSUnknownKeyword`;default:return}}function Xt(e){return e===`private`||e===`public`||e===`protected`}function Zt(e){return e===`in`||e===`out`}var K=e=>class extends e{constructor(...e){super(...e),this.tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:[`in`,`out`],disallowedModifiers:[`const`,`public`,`private`,`protected`,`readonly`,`declare`,`abstract`,`override`],errorTemplate:G.InvalidModifierOnTypeParameter}),this.tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:[`const`],disallowedModifiers:[`in`,`out`],errorTemplate:G.InvalidModifierOnTypeParameterPositions}),this.tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:[`in`,`out`,`const`],disallowedModifiers:[`public`,`private`,`protected`,`readonly`,`declare`,`abstract`,`override`],errorTemplate:G.InvalidModifierOnTypeParameter})}getScopeHandler(){return mt}tsIsIdentifier(){return A(this.state.type)}tsTokenCanFollowModifier(){return this.match(0)||this.match(5)||this.match(55)||this.match(21)||this.match(139)||this.isLiteralPropertyName()}tsNextTokenOnSameLineAndCanFollowModifier(){return this.next(),this.hasPrecedingLineBreak()?!1:this.tsTokenCanFollowModifier()}tsNextTokenCanFollowModifier(){return this.match(106)?(this.next(),this.tsTokenCanFollowModifier()):this.tsNextTokenOnSameLineAndCanFollowModifier()}tsParseModifier(e,t,n){if(!A(this.state.type)&&this.state.type!==58&&this.state.type!==75)return;let r=this.state.value;if(e.includes(r)){if(n&&this.match(106)||t&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return r}}tsParseModifiers({allowedModifiers:e,disallowedModifiers:t,stopOnStartOfClassStaticBlock:n,errorTemplate:r=G.InvalidModifierOnTypeMember},i){let a=(e,t,n,r)=>{t===n&&i[r]&&this.raise(G.InvalidModifiersOrder,e,{orderedModifiers:[n,r]})},o=(e,t,n,r)=>{(i[n]&&t===r||i[r]&&t===n)&&this.raise(G.IncompatibleModifiers,e,{modifiers:[n,r]})};for(;;){let{startLoc:s}=this.state,c=this.tsParseModifier(e.concat(t??[]),n,i.static);if(!c)break;Xt(c)?i.accessibility?this.raise(G.DuplicateAccessibilityModifier,s,{modifier:c}):(a(s,c,c,`override`),a(s,c,c,`static`),a(s,c,c,`readonly`),i.accessibility=c):Zt(c)?(i[c]&&this.raise(G.DuplicateModifier,s,{modifier:c}),i[c]=!0,a(s,c,`in`,`out`)):(hasOwnProperty.call(i,c)?this.raise(G.DuplicateModifier,s,{modifier:c}):(a(s,c,`static`,`readonly`),a(s,c,`static`,`override`),a(s,c,`override`,`readonly`),a(s,c,`abstract`,`override`),o(s,c,`declare`,`override`),o(s,c,`static`,`abstract`)),i[c]=!0),t!=null&&t.includes(c)&&this.raise(r,s,{modifier:c})}}tsIsListTerminator(e){switch(e){case`EnumMembers`:case`TypeMembers`:return this.match(8);case`HeritageClauseElement`:return this.match(5);case`TupleElementTypes`:return this.match(3);case`TypeParametersOrArguments`:return this.match(48)}}tsParseList(e,t){let n=[];for(;!this.tsIsListTerminator(e);)n.push(t());return n}tsParseDelimitedList(e,t,n){return Jt(this.tsParseDelimitedListWorker(e,t,!0,n))}tsParseDelimitedListWorker(e,t,n,r){let i=[],a=-1;for(;!this.tsIsListTerminator(e);){a=-1;let r=t();if(r==null)return;if(i.push(r),this.eat(12)){a=this.state.lastTokStartLoc.index;continue}if(this.tsIsListTerminator(e))break;n&&this.expect(12);return}return r&&(r.value=a),i}tsParseBracketedList(e,t,n,r,i){r||(n?this.expect(0):this.expect(47));let a=this.tsParseDelimitedList(e,t,i);return n?this.expect(3):this.expect(48),a}tsParseImportType(){let e=this.startNode();return this.expect(83),this.expect(10),this.match(134)?e.argument=this.parseStringLiteral(this.state.value):(this.raise(G.UnsupportedImportTypeArgument,this.state.startLoc),e.argument=super.parseExprAtom()),this.eat(12)?e.options=this.tsParseImportTypeOptions():e.options=null,this.expect(11),this.eat(16)&&(e.qualifier=this.tsParseEntityName(3)),this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,`TSImportType`)}tsParseImportTypeOptions(){let e=this.startNode();this.expect(5);let t=this.startNode();return this.isContextual(76)?(t.method=!1,t.key=this.parseIdentifier(!0),t.computed=!1,t.shorthand=!1):this.unexpected(null,76),this.expect(14),t.value=this.tsParseImportTypeWithPropertyValue(),e.properties=[this.finishObjectProperty(t)],this.eat(12),this.expect(8),this.finishNode(e,`ObjectExpression`)}tsParseImportTypeWithPropertyValue(){let e=this.startNode(),t=[];for(this.expect(5);!this.match(8);){let e=this.state.type;A(e)||e===134?t.push(super.parsePropertyDefinition(null)):this.unexpected(),this.eat(12)}return e.properties=t,this.next(),this.finishNode(e,`ObjectExpression`)}tsParseEntityName(e){let t;if(e&1&&this.match(78))if(e&2)t=this.parseIdentifier(!0);else{let e=this.startNode();this.next(),t=this.finishNode(e,`ThisExpression`)}else t=this.parseIdentifier(!!(e&1));for(;this.eat(16);){let n=this.startNodeAtNode(t);n.left=t,n.right=this.parseIdentifier(!!(e&1)),t=this.finishNode(n,`TSQualifiedName`)}return t}tsParseTypeReference(){let e=this.startNode();return e.typeName=this.tsParseEntityName(1),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,`TSTypeReference`)}tsParseThisTypePredicate(e){this.next();let t=this.startNodeAtNode(e);return t.parameterName=e,t.typeAnnotation=this.tsParseTypeAnnotation(!1),t.asserts=!1,this.finishNode(t,`TSTypePredicate`)}tsParseThisTypeNode(){let e=this.startNode();return this.next(),this.finishNode(e,`TSThisType`)}tsParseTypeQuery(){let e=this.startNode();return this.expect(87),this.match(83)?e.exprName=this.tsParseImportType():e.exprName=this.tsParseEntityName(3),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,`TSTypeQuery`)}tsParseTypeParameter(e){let t=this.startNode();return e(t),t.name=this.tsParseTypeParameterName(),t.constraint=this.tsEatThenParseType(81),t.default=this.tsEatThenParseType(29),this.finishNode(t,`TSTypeParameter`)}tsTryParseTypeParameters(e){if(this.match(47))return this.tsParseTypeParameters(e)}tsParseTypeParameters(e){let t=this.startNode();this.match(47)||this.match(143)?this.next():this.unexpected();let n={value:-1};return t.params=this.tsParseBracketedList(`TypeParametersOrArguments`,this.tsParseTypeParameter.bind(this,e),!1,!0,n),t.params.length===0&&this.raise(G.EmptyTypeParameters,t),n.value!==-1&&this.addExtra(t,`trailingComma`,n.value),this.finishNode(t,`TSTypeParameterDeclaration`)}tsFillSignature(e,t){let n=e===19;t.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),t.parameters=this.tsParseBindingListForSignature(),(n||this.match(e))&&(t.typeAnnotation=this.tsParseTypeOrTypePredicateAnnotation(e))}tsParseBindingListForSignature(){let e=super.parseBindingList(11,41,2);for(let t of e){let{type:e}=t;(e===`AssignmentPattern`||e===`TSParameterProperty`)&&this.raise(G.UnsupportedSignatureParameterKind,t,{type:e})}return e}tsParseTypeMemberSemicolon(){!this.eat(12)&&!this.isLineTerminator()&&this.expect(13)}tsParseSignatureMember(e,t){return this.tsFillSignature(14,t),this.tsParseTypeMemberSemicolon(),this.finishNode(t,e)}tsIsUnambiguouslyIndexSignature(){return this.next(),A(this.state.type)?(this.next(),this.match(14)):!1}tsTryParseIndexSignature(e){if(!(this.match(0)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))))return;this.expect(0);let t=this.parseIdentifier();t.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(t),this.expect(3),e.parameters=[t];let n=this.tsTryParseTypeAnnotation();return n&&(e.typeAnnotation=n),this.tsParseTypeMemberSemicolon(),this.finishNode(e,`TSIndexSignature`)}tsParsePropertyOrMethodSignature(e,t){if(this.eat(17)&&(e.optional=!0),this.match(10)||this.match(47)){t&&this.raise(G.ReadonlyForMethodSignature,e);let n=e;n.kind&&this.match(47)&&this.raise(G.AccessorCannotHaveTypeParameters,this.state.curPosition()),this.tsFillSignature(14,n),this.tsParseTypeMemberSemicolon();let r=`parameters`,i=`typeAnnotation`;if(n.kind===`get`)n[r].length>0&&(this.raise(v.BadGetterArity,this.state.curPosition()),this.isThisParam(n[r][0])&&this.raise(G.AccessorCannotDeclareThisParameter,this.state.curPosition()));else if(n.kind===`set`){if(n[r].length!==1)this.raise(v.BadSetterArity,this.state.curPosition());else{let e=n[r][0];this.isThisParam(e)&&this.raise(G.AccessorCannotDeclareThisParameter,this.state.curPosition()),e.type===`Identifier`&&e.optional&&this.raise(G.SetAccessorCannotHaveOptionalParameter,this.state.curPosition()),e.type===`RestElement`&&this.raise(G.SetAccessorCannotHaveRestParameter,this.state.curPosition())}n[i]&&this.raise(G.SetAccessorCannotHaveReturnType,n[i])}else n.kind=`method`;return this.finishNode(n,`TSMethodSignature`)}else{let n=e;t&&(n.readonly=!0);let r=this.tsTryParseTypeAnnotation();return r&&(n.typeAnnotation=r),this.tsParseTypeMemberSemicolon(),this.finishNode(n,`TSPropertySignature`)}}tsParseTypeMember(){let e=this.startNode();if(this.match(10)||this.match(47))return this.tsParseSignatureMember(`TSCallSignatureDeclaration`,e);if(this.match(77)){let t=this.startNode();return this.next(),this.match(10)||this.match(47)?this.tsParseSignatureMember(`TSConstructSignatureDeclaration`,e):(e.key=this.createIdentifier(t,`new`),this.tsParsePropertyOrMethodSignature(e,!1))}return this.tsParseModifiers({allowedModifiers:[`readonly`],disallowedModifiers:[`declare`,`abstract`,`private`,`protected`,`public`,`static`,`override`]},e),this.tsTryParseIndexSignature(e)||(super.parsePropertyName(e),!e.computed&&e.key.type===`Identifier`&&(e.key.name===`get`||e.key.name===`set`)&&this.tsTokenCanFollowModifier()&&(e.kind=e.key.name,super.parsePropertyName(e),!this.match(10)&&!this.match(47)&&this.unexpected(null,10)),this.tsParsePropertyOrMethodSignature(e,!!e.readonly))}tsParseTypeLiteral(){let e=this.startNode();return e.members=this.tsParseObjectTypeMembers(),this.finishNode(e,`TSTypeLiteral`)}tsParseObjectTypeMembers(){this.expect(5);let e=this.tsParseList(`TypeMembers`,this.tsParseTypeMember.bind(this));return this.expect(8),e}tsIsStartOfMappedType(){return this.next(),this.eat(53)?this.isContextual(122):(this.isContextual(122)&&this.next(),!this.match(0)||(this.next(),!this.tsIsIdentifier())?!1:(this.next(),this.match(58)))}tsParseMappedType(){let e=this.startNode();this.expect(5),this.match(53)?(e.readonly=this.state.value,this.next(),this.expectContextual(122)):this.eatContextual(122)&&(e.readonly=!0),this.expect(0);let t=this.startNode();return t.name=this.tsParseTypeParameterName(),t.constraint=this.tsExpectThenParseType(58),e.typeParameter=this.finishNode(t,`TSTypeParameter`),e.nameType=this.eatContextual(93)?this.tsParseType():null,this.expect(3),this.match(53)?(e.optional=this.state.value,this.next(),this.expect(17)):this.eat(17)&&(e.optional=!0),e.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(8),this.finishNode(e,`TSMappedType`)}tsParseTupleType(){let e=this.startNode();e.elementTypes=this.tsParseBracketedList(`TupleElementTypes`,this.tsParseTupleElementType.bind(this),!0,!1);let t=!1;return e.elementTypes.forEach(e=>{let{type:n}=e;t&&n!==`TSRestType`&&n!==`TSOptionalType`&&!(n===`TSNamedTupleMember`&&e.optional)&&this.raise(G.OptionalTypeBeforeRequired,e),t||=n===`TSNamedTupleMember`&&e.optional||n===`TSOptionalType`}),this.finishNode(e,`TSTupleType`)}tsParseTupleElementType(){let e=this.state.startLoc,t=this.eat(21),{startLoc:n}=this.state,r,i,a,o,s=j(this.state.type)?this.lookaheadCharCode():null;if(s===58)r=!0,a=!1,i=this.parseIdentifier(!0),this.expect(14),o=this.tsParseType();else if(s===63){a=!0;let e=this.state.value,t=this.tsParseNonArrayType();this.lookaheadCharCode()===58?(r=!0,i=this.createIdentifier(this.startNodeAt(n),e),this.expect(17),this.expect(14),o=this.tsParseType()):(r=!1,o=t,this.expect(17))}else o=this.tsParseType(),a=this.eat(17),r=this.eat(14);if(r){let e;i?(e=this.startNodeAt(n),e.optional=a,e.label=i,e.elementType=o,this.eat(17)&&(e.optional=!0,this.raise(G.TupleOptionalAfterType,this.state.lastTokStartLoc))):(e=this.startNodeAt(n),e.optional=a,this.raise(G.InvalidTupleMemberLabel,o),e.label=o,e.elementType=this.tsParseType()),o=this.finishNode(e,`TSNamedTupleMember`)}else if(a){let e=this.startNodeAt(n);e.typeAnnotation=o,o=this.finishNode(e,`TSOptionalType`)}if(t){let t=this.startNodeAt(e);t.typeAnnotation=o,o=this.finishNode(t,`TSRestType`)}return o}tsParseParenthesizedType(){let e=this.startNode();return this.expect(10),e.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(e,`TSParenthesizedType`)}tsParseFunctionOrConstructorType(e,t){let n=this.startNode();return e===`TSConstructorType`&&(n.abstract=!!t,t&&this.next(),this.next()),this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(19,n)),this.finishNode(n,e)}tsParseLiteralTypeNode(){let e=this.startNode();switch(this.state.type){case 135:case 136:case 134:case 85:case 86:e.literal=super.parseExprAtom();break;default:this.unexpected()}return this.finishNode(e,`TSLiteralType`)}tsParseTemplateLiteralType(){let e=this.startNode();return e.literal=super.parseTemplate(!1),this.finishNode(e,`TSLiteralType`)}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){let e=this.tsParseThisTypeNode();return this.isContextual(116)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(e):e}tsParseNonArrayType(){switch(this.state.type){case 134:case 135:case 136:case 85:case 86:return this.tsParseLiteralTypeNode();case 53:if(this.state.value===`-`){let e=this.startNode(),t=this.lookahead();return t.type!==135&&t.type!==136&&this.unexpected(),e.literal=this.parseMaybeUnary(),this.finishNode(e,`TSLiteralType`)}break;case 78:return this.tsParseThisTypeOrThisTypePredicate();case 87:return this.tsParseTypeQuery();case 83:return this.tsParseImportType();case 5:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case 0:return this.tsParseTupleType();case 10:return this.tsParseParenthesizedType();case 25:case 24:return this.tsParseTemplateLiteralType();default:{let{type:e}=this.state;if(A(e)||e===88||e===84){let t=e===88?`TSVoidKeyword`:e===84?`TSNullKeyword`:Yt(this.state.value);if(t!==void 0&&this.lookaheadCharCode()!==46){let e=this.startNode();return this.next(),this.finishNode(e,t)}return this.tsParseTypeReference()}}}throw this.unexpected()}tsParseArrayTypeOrHigher(){let{startLoc:e}=this.state,t=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(3)){let n=this.startNodeAt(e);n.elementType=t,this.expect(3),t=this.finishNode(n,`TSArrayType`)}else{let n=this.startNodeAt(e);n.objectType=t,n.indexType=this.tsParseType(),this.expect(3),t=this.finishNode(n,`TSIndexedAccessType`)}return t}tsParseTypeOperator(){let e=this.startNode(),t=this.state.value;return this.next(),e.operator=t,e.typeAnnotation=this.tsParseTypeOperatorOrHigher(),t===`readonly`&&this.tsCheckTypeAnnotationForReadOnly(e),this.finishNode(e,`TSTypeOperator`)}tsCheckTypeAnnotationForReadOnly(e){switch(e.typeAnnotation.type){case`TSTupleType`:case`TSArrayType`:return;default:this.raise(G.UnexpectedReadonly,e)}}tsParseInferType(){let e=this.startNode();this.expectContextual(115);let t=this.startNode();return t.name=this.tsParseTypeParameterName(),t.constraint=this.tsTryParse(()=>this.tsParseConstraintForInferType()),e.typeParameter=this.finishNode(t,`TSTypeParameter`),this.finishNode(e,`TSInferType`)}tsParseConstraintForInferType(){if(this.eat(81)){let e=this.tsInDisallowConditionalTypesContext(()=>this.tsParseType());if(this.state.inDisallowConditionalTypesContext||!this.match(17))return e}}tsParseTypeOperatorOrHigher(){return Se(this.state.type)&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(115)?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseUnionOrIntersectionType(e,t,n){let r=this.startNode(),i=this.eat(n),a=[];do a.push(t());while(this.eat(n));return a.length===1&&!i?a[0]:(r.types=a,this.finishNode(r,e))}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType(`TSIntersectionType`,this.tsParseTypeOperatorOrHigher.bind(this),45)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType(`TSUnionType`,this.tsParseIntersectionTypeOrHigher.bind(this),43)}tsIsStartOfFunctionType(){return this.match(47)?!0:this.match(10)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(A(this.state.type)||this.match(78))return this.next(),!0;if(this.match(5)){let{errors:e}=this.state,t=e.length;try{return this.parseObjectLike(8,!0),e.length===t}catch{return!1}}if(this.match(0)){this.next();let{errors:e}=this.state,t=e.length;try{return super.parseBindingList(3,93,1),e.length===t}catch{return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){return this.next(),!!(this.match(11)||this.match(21)||this.tsSkipParameterStart()&&(this.match(14)||this.match(12)||this.match(17)||this.match(29)||this.match(11)&&(this.next(),this.match(19))))}tsParseTypeOrTypePredicateAnnotation(e){return this.tsInType(()=>{let t=this.startNode();this.expect(e);let n=this.startNode(),r=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(r&&this.match(78)){let e=this.tsParseThisTypeOrThisTypePredicate();return e.type===`TSThisType`?(n.parameterName=e,n.asserts=!0,n.typeAnnotation=null,e=this.finishNode(n,`TSTypePredicate`)):(this.resetStartLocationFromNode(e,n),e.asserts=!0),t.typeAnnotation=e,this.finishNode(t,`TSTypeAnnotation`)}let i=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!i)return r?(n.parameterName=this.parseIdentifier(),n.asserts=r,n.typeAnnotation=null,t.typeAnnotation=this.finishNode(n,`TSTypePredicate`),this.finishNode(t,`TSTypeAnnotation`)):this.tsParseTypeAnnotation(!1,t);let a=this.tsParseTypeAnnotation(!1);return n.parameterName=i,n.typeAnnotation=a,n.asserts=r,t.typeAnnotation=this.finishNode(n,`TSTypePredicate`),this.finishNode(t,`TSTypeAnnotation`)})}tsTryParseTypeOrTypePredicateAnnotation(){if(this.match(14))return this.tsParseTypeOrTypePredicateAnnotation(14)}tsTryParseTypeAnnotation(){if(this.match(14))return this.tsParseTypeAnnotation()}tsTryParseType(){return this.tsEatThenParseType(14)}tsParseTypePredicatePrefix(){let e=this.parseIdentifier();if(this.isContextual(116)&&!this.hasPrecedingLineBreak())return this.next(),e}tsParseTypePredicateAsserts(){if(this.state.type!==109)return!1;let e=this.state.containsEsc;return this.next(),!A(this.state.type)&&!this.match(78)?!1:(e&&this.raise(v.InvalidEscapedReservedWord,this.state.lastTokStartLoc,{reservedWord:`asserts`}),!0)}tsParseTypeAnnotation(e=!0,t=this.startNode()){return this.tsInType(()=>{e&&this.expect(14),t.typeAnnotation=this.tsParseType()}),this.finishNode(t,`TSTypeAnnotation`)}tsParseType(){W(this.state.inType);let e=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(81))return e;let t=this.startNodeAtNode(e);return t.checkType=e,t.extendsType=this.tsInDisallowConditionalTypesContext(()=>this.tsParseNonConditionalType()),this.expect(17),t.trueType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.expect(14),t.falseType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.finishNode(t,`TSConditionalType`)}isAbstractConstructorSignature(){return this.isContextual(124)&&this.isLookaheadContextual(`new`)}tsParseNonConditionalType(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType(`TSFunctionType`):this.match(77)?this.tsParseFunctionOrConstructorType(`TSConstructorType`):this.isAbstractConstructorSignature()?this.tsParseFunctionOrConstructorType(`TSConstructorType`,!0):this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){this.getPluginOption(`typescript`,`disallowAmbiguousJSXLike`)&&this.raise(G.ReservedTypeAssertion,this.state.startLoc);let e=this.startNode();return e.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?this.tsParseTypeReference():this.tsParseType())),this.expect(48),e.expression=this.parseMaybeUnary(),this.finishNode(e,`TSTypeAssertion`)}tsParseHeritageClause(e){let t=this.state.startLoc,n=this.tsParseDelimitedList(`HeritageClauseElement`,()=>{let e=this.startNode();return e.expression=this.tsParseEntityName(3),this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,`TSExpressionWithTypeArguments`)});return n.length||this.raise(G.EmptyHeritageClauseType,t,{token:e}),n}tsParseInterfaceDeclaration(e,t={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(129),t.declare&&(e.declare=!0),A(this.state.type)?(e.id=this.parseIdentifier(),this.checkIdentifier(e.id,130)):(e.id=null,this.raise(G.MissingInterfaceName,this.state.startLoc)),e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(81)&&(e.extends=this.tsParseHeritageClause(`extends`));let n=this.startNode();return n.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),e.body=this.finishNode(n,`TSInterfaceBody`),this.finishNode(e,`TSInterfaceDeclaration`)}tsParseTypeAliasDeclaration(e){return e.id=this.parseIdentifier(),this.checkIdentifier(e.id,2),e.typeAnnotation=this.tsInType(()=>{if(e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers),this.expect(29),this.isContextual(114)&&this.lookaheadCharCode()!==46){let e=this.startNode();return this.next(),this.finishNode(e,`TSIntrinsicKeyword`)}return this.tsParseType()}),this.semicolon(),this.finishNode(e,`TSTypeAliasDeclaration`)}tsInTopLevelContext(e){if(this.curContext()!==C.brace){let t=this.state.context;this.state.context=[t[0]];try{return e()}finally{this.state.context=t}}else return e()}tsInType(e){let t=this.state.inType;this.state.inType=!0;try{return e()}finally{this.state.inType=t}}tsInDisallowConditionalTypesContext(e){let t=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return e()}finally{this.state.inDisallowConditionalTypesContext=t}}tsInAllowConditionalTypesContext(e){let t=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return e()}finally{this.state.inDisallowConditionalTypesContext=t}}tsEatThenParseType(e){if(this.match(e))return this.tsNextThenParseType()}tsExpectThenParseType(e){return this.tsInType(()=>(this.expect(e),this.tsParseType()))}tsNextThenParseType(){return this.tsInType(()=>(this.next(),this.tsParseType()))}tsParseEnumMember(){let e=this.startNode();return e.id=this.match(134)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(29)&&(e.initializer=super.parseMaybeAssignAllowIn()),this.finishNode(e,`TSEnumMember`)}tsParseEnumDeclaration(e,t={}){return t.const&&(e.const=!0),t.declare&&(e.declare=!0),this.expectContextual(126),e.id=this.parseIdentifier(),this.checkIdentifier(e.id,e.const?8971:8459),this.expect(5),e.members=this.tsParseDelimitedList(`EnumMembers`,this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(e,`TSEnumDeclaration`)}tsParseEnumBody(){let e=this.startNode();return this.expect(5),e.members=this.tsParseDelimitedList(`EnumMembers`,this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(e,`TSEnumBody`)}tsParseModuleBlock(){let e=this.startNode();return this.scope.enter(0),this.expect(5),super.parseBlockOrModuleBlockBody(e.body=[],void 0,!0,8),this.scope.exit(),this.finishNode(e,`TSModuleBlock`)}tsParseModuleOrNamespaceDeclaration(e,t=!1){if(e.id=this.parseIdentifier(),t||this.checkIdentifier(e.id,1024),this.eat(16)){let t=this.startNode();this.tsParseModuleOrNamespaceDeclaration(t,!0),e.body=t}else this.scope.enter(1024),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(e,`TSModuleDeclaration`)}tsParseAmbientExternalModuleDeclaration(e){return this.isContextual(112)?(e.kind=`global`,e.global=!0,e.id=this.parseIdentifier()):this.match(134)?(e.kind=`module`,e.id=super.parseStringLiteral(this.state.value)):this.unexpected(),this.match(5)?(this.scope.enter(1024),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(e,`TSModuleDeclaration`)}tsParseImportEqualsDeclaration(e,t,n){e.isExport=n||!1,e.id=t||this.parseIdentifier(),this.checkIdentifier(e.id,4096),this.expect(29);let r=this.tsParseModuleReference();return e.importKind===`type`&&r.type!==`TSExternalModuleReference`&&this.raise(G.ImportAliasHasImportType,r),e.moduleReference=r,this.semicolon(),this.finishNode(e,`TSImportEqualsDeclaration`)}tsIsExternalModuleReference(){return this.isContextual(119)&&this.lookaheadCharCode()===40}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(0)}tsParseExternalModuleReference(){let e=this.startNode();return this.expectContextual(119),this.expect(10),this.match(134)||this.unexpected(),e.expression=super.parseExprAtom(),this.expect(11),this.sawUnambiguousESM=!0,this.finishNode(e,`TSExternalModuleReference`)}tsLookAhead(e){let t=this.state.clone(),n=e();return this.state=t,n}tsTryParseAndCatch(e){let t=this.tryParse(t=>e()||t());if(!(t.aborted||!t.node))return t.error&&(this.state=t.failState),t.node}tsTryParse(e){let t=this.state.clone(),n=e();if(n!==void 0&&n!==!1)return n;this.state=t}tsTryParseDeclare(e){if(this.isLineTerminator())return;let t=this.state.type;return this.tsInAmbientContext(()=>{switch(t){case 68:return e.declare=!0,super.parseFunctionStatement(e,!1,!1);case 80:return e.declare=!0,this.parseClass(e,!0,!1);case 126:return this.tsParseEnumDeclaration(e,{declare:!0});case 112:return this.tsParseAmbientExternalModuleDeclaration(e);case 100:if(this.state.containsEsc)return;case 75:case 74:return!this.match(75)||!this.isLookaheadContextual(`enum`)?(e.declare=!0,this.parseVarStatement(e,this.state.value,!0)):(this.expect(75),this.tsParseEnumDeclaration(e,{const:!0,declare:!0}));case 107:if(this.isUsing())return this.raise(G.InvalidModifierOnUsingDeclaration,this.state.startLoc,`declare`),e.declare=!0,this.parseVarStatement(e,`using`,!0);break;case 96:if(this.isAwaitUsing())return this.raise(G.InvalidModifierOnAwaitUsingDeclaration,this.state.startLoc,`declare`),e.declare=!0,this.next(),this.parseVarStatement(e,`await using`,!0);break;case 129:{let t=this.tsParseInterfaceDeclaration(e,{declare:!0});if(t)return t}default:if(A(t))return this.tsParseDeclaration(e,this.state.type,!0,null)}})}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.type,!0,null)}tsParseDeclaration(e,t,n,r){switch(t){case 124:if(this.tsCheckLineTerminator(n)&&(this.match(80)||A(this.state.type)))return this.tsParseAbstractDeclaration(e,r);break;case 127:if(this.tsCheckLineTerminator(n)){if(this.match(134))return this.tsParseAmbientExternalModuleDeclaration(e);if(A(this.state.type))return e.kind=`module`,this.tsParseModuleOrNamespaceDeclaration(e)}break;case 128:if(this.tsCheckLineTerminator(n)&&A(this.state.type))return e.kind=`namespace`,this.tsParseModuleOrNamespaceDeclaration(e);break;case 130:if(this.tsCheckLineTerminator(n)&&A(this.state.type))return this.tsParseTypeAliasDeclaration(e);break}}tsCheckLineTerminator(e){return e?this.hasFollowingLineBreak()?!1:(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(e){if(!this.match(47))return;let t=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;let n=this.tsTryParseAndCatch(()=>{let t=this.startNodeAt(e);return t.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(t),t.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(19),t});if(this.state.maybeInArrowParameters=t,n)return super.parseArrowExpression(n,null,!0)}tsParseTypeArgumentsInExpression(){if(this.reScan_lt()===47)return this.tsParseTypeArguments()}tsParseTypeArguments(){let e=this.startNode();return e.params=this.tsInType(()=>this.tsInTopLevelContext(()=>(this.expect(47),this.tsParseDelimitedList(`TypeParametersOrArguments`,this.tsParseType.bind(this))))),e.params.length===0?this.raise(G.EmptyTypeArguments,e):!this.state.inType&&this.curContext()===C.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(e,`TSTypeParameterInstantiation`)}tsIsDeclarationStart(){return Ce(this.state.type)}isExportDefaultSpecifier(){return this.tsIsDeclarationStart()?!1:super.isExportDefaultSpecifier()}parseBindingElement(e,t){let n=t.length?t[0].loc.start:this.state.startLoc,r={};this.tsParseModifiers({allowedModifiers:[`public`,`private`,`protected`,`override`,`readonly`]},r);let i=r.accessibility,a=r.override,o=r.readonly;!(e&4)&&(i||o||a)&&this.raise(G.UnexpectedParameterModifier,n);let s=this.parseMaybeDefault();e&2&&this.parseFunctionParamType(s);let c=this.parseMaybeDefault(s.loc.start,s);if(i||o||a){let e=this.startNodeAt(n);return t.length&&(e.decorators=t),i&&(e.accessibility=i),o&&(e.readonly=o),a&&(e.override=a),c.type!==`Identifier`&&c.type!==`AssignmentPattern`&&this.raise(G.UnsupportedParameterPropertyKind,e),e.parameter=c,this.finishNode(e,`TSParameterProperty`)}return t.length&&(s.decorators=t),c}isSimpleParameter(e){return e.type===`TSParameterProperty`&&super.isSimpleParameter(e.parameter)||super.isSimpleParameter(e)}tsDisallowOptionalPattern(e){for(let t of e.params)t.type!==`Identifier`&&t.optional&&!this.state.isAmbientContext&&this.raise(G.PatternIsOptional,t)}setArrowFunctionParameters(e,t,n){super.setArrowFunctionParameters(e,t,n),this.tsDisallowOptionalPattern(e)}parseFunctionBodyAndFinish(e,t,n=!1){this.match(14)&&(e.returnType=this.tsParseTypeOrTypePredicateAnnotation(14));let r=t===`FunctionDeclaration`?`TSDeclareFunction`:t===`ClassMethod`||t===`ClassPrivateMethod`?`TSDeclareMethod`:void 0;return r&&!this.match(5)&&this.isLineTerminator()?this.finishNode(e,r):r===`TSDeclareFunction`&&this.state.isAmbientContext&&(this.raise(G.DeclareFunctionHasImplementation,e),e.declare)?super.parseFunctionBodyAndFinish(e,r,n):(this.tsDisallowOptionalPattern(e),super.parseFunctionBodyAndFinish(e,t,n))}registerFunctionStatementId(e){!e.body&&e.id?this.checkIdentifier(e.id,1024):super.registerFunctionStatementId(e)}tsCheckForInvalidTypeCasts(e){e.forEach(e=>{e?.type===`TSTypeCastExpression`&&this.raise(G.UnexpectedTypeAnnotation,e.typeAnnotation)})}toReferencedList(e,t){return this.tsCheckForInvalidTypeCasts(e),e}parseArrayLike(e,t,n){let r=super.parseArrayLike(e,t,n);return r.type===`ArrayExpression`&&this.tsCheckForInvalidTypeCasts(r.elements),r}parseSubscript(e,t,n,r){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();let n=this.startNodeAt(t);return n.expression=e,this.finishNode(n,`TSNonNullExpression`)}let i=!1;if(this.match(18)&&this.lookaheadCharCode()===60){if(n)return r.stop=!0,e;r.optionalChainMember=i=!0,this.next()}if(this.match(47)||this.match(51)){let a,o=this.tsTryParseAndCatch(()=>{if(!n&&this.atPossibleAsyncArrow(e)){let e=this.tsTryParseGenericAsyncArrowFunction(t);if(e)return r.stop=!0,e}let o=this.tsParseTypeArgumentsInExpression();if(!o)return;if(i&&!this.match(10)){a=this.state.curPosition();return}if(Ee(this.state.type)){let n=super.parseTaggedTemplateExpression(e,t,r);return n.typeParameters=o,n}if(!n&&this.eat(10)){let n=this.startNodeAt(t);return n.callee=e,n.arguments=this.parseCallExpressionArguments(),this.tsCheckForInvalidTypeCasts(n.arguments),n.typeParameters=o,r.optionalChainMember&&(n.optional=i),this.finishCallExpression(n,r.optionalChainMember)}let s=this.state.type;if(s===48||s===52||s!==10&&s!==93&&s!==120&&me(s)&&!this.hasPrecedingLineBreak())return;let c=this.startNodeAt(t);return c.expression=e,c.typeParameters=o,this.finishNode(c,`TSInstantiationExpression`)});if(a&&this.unexpected(a,10),o)return o.type===`TSInstantiationExpression`&&((this.match(16)||this.match(18)&&this.lookaheadCharCode()!==40)&&this.raise(G.InvalidPropertyAccessAfterInstantiationExpression,this.state.startLoc),!this.match(16)&&!this.match(18)&&(o.expression=super.stopParseSubscript(e,r))),o}return super.parseSubscript(e,t,n,r)}parseNewCallee(e){var t;super.parseNewCallee(e);let{callee:n}=e;n.type===`TSInstantiationExpression`&&!((t=n.extra)!=null&&t.parenthesized)&&(e.typeParameters=n.typeParameters,e.callee=n.expression)}parseExprOp(e,t,n){let r;if(Te(58)>n&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(r=this.isContextual(120)))){let i=this.startNodeAt(t);return i.expression=e,i.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?(r&&this.raise(v.UnexpectedKeyword,this.state.startLoc,{keyword:`const`}),this.tsParseTypeReference()):this.tsParseType())),this.finishNode(i,r?`TSSatisfiesExpression`:`TSAsExpression`),this.reScan_lt_gt(),this.parseExprOp(i,t,n)}return super.parseExprOp(e,t,n)}checkReservedWord(e,t,n,r){this.state.isAmbientContext||super.checkReservedWord(e,t,n,r)}checkImportReflection(e){super.checkImportReflection(e),e.module&&e.importKind!==`value`&&this.raise(G.ImportReflectionHasImportType,e.specifiers[0].loc.start)}checkDuplicateExports(){}isPotentialImportPhase(e){if(super.isPotentialImportPhase(e))return!0;if(this.isContextual(130)){let t=this.lookaheadCharCode();return e?t===123||t===42:t!==61}return!e&&this.isContextual(87)}applyImportPhase(e,t,n,r){super.applyImportPhase(e,t,n,r),t?e.exportKind=n===`type`?`type`:`value`:e.importKind=n===`type`||n===`typeof`?n:`value`}parseImport(e){if(this.match(134))return e.importKind=`value`,super.parseImport(e);let t;if(A(this.state.type)&&this.lookaheadCharCode()===61)return e.importKind=`value`,this.tsParseImportEqualsDeclaration(e);if(this.isContextual(130)){let n=this.parseMaybeImportPhase(e,!1);if(this.lookaheadCharCode()===61)return this.tsParseImportEqualsDeclaration(e,n);t=super.parseImportSpecifiersAndAfter(e,n)}else t=super.parseImport(e);return t.importKind===`type`&&t.specifiers.length>1&&t.specifiers[0].type===`ImportDefaultSpecifier`&&this.raise(G.TypeImportCannotSpecifyDefaultAndNamed,t),t}parseExport(e,t){if(this.match(83)){let t=e;this.next();let n=null;return this.isContextual(130)&&this.isPotentialImportPhase(!1)?n=this.parseMaybeImportPhase(t,!1):t.importKind=`value`,this.tsParseImportEqualsDeclaration(t,n,!0)}else if(this.eat(29)){let t=e;return t.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(t,`TSExportAssignment`)}else if(this.eatContextual(93)){let t=e;return this.expectContextual(128),t.id=this.parseIdentifier(),this.semicolon(),this.finishNode(t,`TSNamespaceExportDeclaration`)}else return super.parseExport(e,t)}isAbstractClass(){return this.isContextual(124)&&this.isLookaheadContextual(`class`)}parseExportDefaultExpression(){if(this.isAbstractClass()){let e=this.startNode();return this.next(),e.abstract=!0,this.parseClass(e,!0,!0)}if(this.match(129)){let e=this.tsParseInterfaceDeclaration(this.startNode());if(e)return e}return super.parseExportDefaultExpression()}parseVarStatement(e,t,n=!1){let{isAmbientContext:r}=this.state,i=super.parseVarStatement(e,t,n||r);if(!r)return i;if(!e.declare&&(t===`using`||t===`await using`))return this.raiseOverwrite(G.UsingDeclarationInAmbientContext,e,t),i;for(let{id:e,init:n}of i.declarations)n&&(t===`var`||t===`let`||e.typeAnnotation?this.raise(G.InitializerNotAllowedInAmbientContext,n):$t(n,this.hasPlugin(`estree`))||this.raise(G.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference,n));return i}parseStatementContent(e,t){if(!this.state.containsEsc)switch(this.state.type){case 75:if(this.isLookaheadContextual(`enum`)){let e=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(e,{const:!0})}break;case 124:case 125:if(this.nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine()){let e=this.state.type,n=this.startNode();this.next();let r=e===125?this.tsTryParseDeclare(n):this.tsParseAbstractDeclaration(n,t);return r?(e===125&&(r.declare=!0),r):(n.expression=this.createIdentifier(this.startNodeAt(n.loc.start),e===125?`declare`:`abstract`),this.semicolon(!1),this.finishNode(n,`ExpressionStatement`))}break;case 126:return this.tsParseEnumDeclaration(this.startNode());case 112:if(this.lookaheadCharCode()===123){let e=this.startNode();return this.tsParseAmbientExternalModuleDeclaration(e)}break;case 129:{let e=this.tsParseInterfaceDeclaration(this.startNode());if(e)return e;break}case 127:if(this.nextTokenIsIdentifierOrStringLiteralOnSameLine()){let e=this.startNode();return this.next(),this.tsParseDeclaration(e,127,!1,t)}break;case 128:if(this.nextTokenIsIdentifierOnSameLine()){let e=this.startNode();return this.next(),this.tsParseDeclaration(e,128,!1,t)}break;case 130:if(this.nextTokenIsIdentifierOnSameLine()){let e=this.startNode();return this.next(),this.tsParseTypeAliasDeclaration(e)}break}return super.parseStatementContent(e,t)}parseAccessModifier(){return this.tsParseModifier([`public`,`protected`,`private`])}tsHasSomeModifiers(e,t){return t.some(t=>Xt(t)?e.accessibility===t:!!e[t])}tsIsStartOfStaticBlocks(){return this.isContextual(106)&&this.lookaheadCharCode()===123}parseClassMember(e,t,n){let r=[`declare`,`private`,`public`,`protected`,`override`,`abstract`,`readonly`,`static`];this.tsParseModifiers({allowedModifiers:r,disallowedModifiers:[`in`,`out`],stopOnStartOfClassStaticBlock:!0,errorTemplate:G.InvalidModifierOnTypeParameterPositions},t);let i=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(t,r)&&this.raise(G.StaticBlockCannotHaveModifier,this.state.curPosition()),super.parseClassStaticBlock(e,t)):this.parseClassMemberWithIsStatic(e,t,n,!!t.static)};t.declare?this.tsInAmbientContext(i):i()}parseClassMemberWithIsStatic(e,t,n,r){let i=this.tsTryParseIndexSignature(t);if(i){e.body.push(i),t.abstract&&this.raise(G.IndexSignatureHasAbstract,t),t.accessibility&&this.raise(G.IndexSignatureHasAccessibility,t,{modifier:t.accessibility}),t.declare&&this.raise(G.IndexSignatureHasDeclare,t),t.override&&this.raise(G.IndexSignatureHasOverride,t);return}!this.state.inAbstractClass&&t.abstract&&this.raise(G.NonAbstractClassHasAbstractMethod,t),t.override&&(n.hadSuperClass||this.raise(G.OverrideNotInSubClass,t)),super.parseClassMemberWithIsStatic(e,t,n,r)}parsePostMemberNameModifiers(e){this.eat(17)&&(e.optional=!0),e.readonly&&this.match(10)&&this.raise(G.ClassMethodHasReadonly,e),e.declare&&this.match(10)&&this.raise(G.ClassMethodHasDeclare,e)}shouldParseExportDeclaration(){return this.tsIsDeclarationStart()?!0:super.shouldParseExportDeclaration()}parseConditional(e,t,n){if(!this.match(17))return e;if(this.state.maybeInArrowParameters){let t=this.lookaheadCharCode();if(t===44||t===61||t===58||t===41)return this.setOptionalParametersError(n),e}return super.parseConditional(e,t,n)}parseParenItem(e,t){let n=super.parseParenItem(e,t);if(this.eat(17)&&(n.optional=!0,this.resetEndLocation(e)),this.match(14)){let n=this.startNodeAt(t);return n.expression=e,n.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(n,`TSTypeCastExpression`)}return e}parseExportDeclaration(e){if(!this.state.isAmbientContext&&this.isContextual(125))return this.tsInAmbientContext(()=>this.parseExportDeclaration(e));let t=this.state.startLoc,n=this.eatContextual(125);if(n&&(this.isContextual(125)||!this.shouldParseExportDeclaration()))throw this.raise(G.ExpectedAmbientAfterExportDeclare,this.state.startLoc);let r=A(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(e);return r?((r.type===`TSInterfaceDeclaration`||r.type===`TSTypeAliasDeclaration`||n)&&(e.exportKind=`type`),n&&r.type!==`TSImportEqualsDeclaration`&&(this.resetStartLocation(r,t),r.declare=!0),r):null}parseClassId(e,t,n,r){if((!t||n)&&this.isContextual(113))return;super.parseClassId(e,t,n,e.declare?1024:8331);let i=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);i&&(e.typeParameters=i)}parseClassPropertyAnnotation(e){e.optional||(this.eat(35)?e.definite=!0:this.eat(17)&&(e.optional=!0));let t=this.tsTryParseTypeAnnotation();t&&(e.typeAnnotation=t)}parseClassProperty(e){if(this.parseClassPropertyAnnotation(e),this.state.isAmbientContext&&!(e.readonly&&!e.typeAnnotation)&&this.match(29)&&this.raise(G.DeclareClassFieldHasInitializer,this.state.startLoc),e.abstract&&this.match(29)){let{key:t}=e;this.raise(G.AbstractPropertyHasInitializer,this.state.startLoc,{propertyName:t.type===`Identifier`&&!e.computed?t.name:`[${this.input.slice(this.offsetToSourcePos(t.start),this.offsetToSourcePos(t.end))}]`})}return super.parseClassProperty(e)}parseClassPrivateProperty(e){return e.abstract&&this.raise(G.PrivateElementHasAbstract,e),e.accessibility&&this.raise(G.PrivateElementHasAccessibility,e,{modifier:e.accessibility}),this.parseClassPropertyAnnotation(e),super.parseClassPrivateProperty(e)}parseClassAccessorProperty(e){return this.parseClassPropertyAnnotation(e),e.optional&&this.raise(G.AccessorCannotBeOptional,e),super.parseClassAccessorProperty(e)}pushClassMethod(e,t,n,r,i,a){let o=this.tsTryParseTypeParameters(this.tsParseConstModifier);o&&i&&this.raise(G.ConstructorHasTypeParameters,o);let{declare:s=!1,kind:c}=t;s&&(c===`get`||c===`set`)&&this.raise(G.DeclareAccessor,t,{kind:c}),o&&(t.typeParameters=o),super.pushClassMethod(e,t,n,r,i,a)}pushClassPrivateMethod(e,t,n,r){let i=this.tsTryParseTypeParameters(this.tsParseConstModifier);i&&(t.typeParameters=i),super.pushClassPrivateMethod(e,t,n,r)}declareClassPrivateMethodInScope(e,t){e.type!==`TSDeclareMethod`&&(e.type===`MethodDefinition`&&e.value.body==null||super.declareClassPrivateMethodInScope(e,t))}parseClassSuper(e){if(super.parseClassSuper(e),e.superClass)if(e.superClass.type===`TSInstantiationExpression`){let t=e.superClass,n=t.expression;this.takeSurroundingComments(n,n.start,n.end);let r=t.typeParameters;this.takeSurroundingComments(r,r.start,r.end),e.superClass=n,e.superTypeParameters=r}else (this.match(47)||this.match(51))&&(e.superTypeParameters=this.tsParseTypeArgumentsInExpression());this.eatContextual(113)&&(e.implements=this.tsParseHeritageClause(`implements`))}parseObjPropValue(e,t,n,r,i,a,o){let s=this.tsTryParseTypeParameters(this.tsParseConstModifier);return s&&(e.typeParameters=s),super.parseObjPropValue(e,t,n,r,i,a,o)}parseFunctionParams(e,t){let n=this.tsTryParseTypeParameters(this.tsParseConstModifier);n&&(e.typeParameters=n),super.parseFunctionParams(e,t)}parseVarId(e,t){super.parseVarId(e,t),e.id.type===`Identifier`&&!this.hasPrecedingLineBreak()&&this.eat(35)&&(e.definite=!0);let n=this.tsTryParseTypeAnnotation();n&&(e.id.typeAnnotation=n,this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,t){return this.match(14)&&(e.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(e,t)}parseMaybeAssign(e,t){var n,r,i;let a,o,s;if(this.hasPlugin(`jsx`)&&(this.match(143)||this.match(47))){if(a=this.state.clone(),o=this.tryParse(()=>super.parseMaybeAssign(e,t),a),!o.error)return o.node;let{context:n}=this.state,r=n[n.length-1];(r===C.j_oTag||r===C.j_expr)&&n.pop()}if(!((n=o)!=null&&n.error)&&!this.match(47))return super.parseMaybeAssign(e,t);(!a||a===this.state)&&(a=this.state.clone());let c,l=this.tryParse(n=>{var r;c=this.tsParseTypeParameters(this.tsParseConstModifier);let i=super.parseMaybeAssign(e,t);return(i.type!==`ArrowFunctionExpression`||(r=i.extra)!=null&&r.parenthesized)&&n(),c?.params.length!==0&&this.resetStartLocationFromNode(i,c),i.typeParameters=c,i},a);if(!l.error&&!l.aborted)return c&&this.reportReservedArrowTypeParam(c),l.node;if(!o&&(W(!this.hasPlugin(`jsx`)),s=this.tryParse(()=>super.parseMaybeAssign(e,t),a),!s.error))return s.node;if((r=o)!=null&&r.node)return this.state=o.failState,o.node;if(l.node)return this.state=l.failState,c&&this.reportReservedArrowTypeParam(c),l.node;if((i=s)!=null&&i.node)return this.state=s.failState,s.node;throw o?.error||l.error||s?.error}reportReservedArrowTypeParam(e){var t;e.params.length===1&&!e.params[0].constraint&&!((t=e.extra)!=null&&t.trailingComma)&&this.getPluginOption(`typescript`,`disallowAmbiguousJSXLike`)&&this.raise(G.ReservedArrowTypeParam,e)}parseMaybeUnary(e,t){return!this.hasPlugin(`jsx`)&&this.match(47)?this.tsParseTypeAssertion():super.parseMaybeUnary(e,t)}parseArrow(e){if(this.match(14)){let t=this.tryParse(e=>{let t=this.tsParseTypeOrTypePredicateAnnotation(14);return(this.canInsertSemicolon()||!this.match(19))&&e(),t});if(t.aborted)return;t.thrown||(t.error&&(this.state=t.failState),e.returnType=t.node)}return super.parseArrow(e)}parseFunctionParamType(e){this.eat(17)&&(e.optional=!0);let t=this.tsTryParseTypeAnnotation();return t&&(e.typeAnnotation=t),this.resetEndLocation(e),e}isAssignable(e,t){switch(e.type){case`TSTypeCastExpression`:return this.isAssignable(e.expression,t);case`TSParameterProperty`:return!0;default:return super.isAssignable(e,t)}}toAssignable(e,t=!1){switch(e.type){case`ParenthesizedExpression`:this.toAssignableParenthesizedExpression(e,t);break;case`TSAsExpression`:case`TSSatisfiesExpression`:case`TSNonNullExpression`:case`TSTypeAssertion`:t?this.expressionScope.recordArrowParameterBindingError(G.UnexpectedTypeCastInParameter,e):this.raise(G.UnexpectedTypeCastInParameter,e),this.toAssignable(e.expression,t);break;case`AssignmentExpression`:!t&&e.left.type===`TSTypeCastExpression`&&(e.left=this.typeCastToParameter(e.left));default:super.toAssignable(e,t)}}toAssignableParenthesizedExpression(e,t){switch(e.expression.type){case`TSAsExpression`:case`TSSatisfiesExpression`:case`TSNonNullExpression`:case`TSTypeAssertion`:case`ParenthesizedExpression`:this.toAssignable(e.expression,t);break;default:super.toAssignable(e,t)}}checkToRestConversion(e,t){switch(e.type){case`TSAsExpression`:case`TSSatisfiesExpression`:case`TSTypeAssertion`:case`TSNonNullExpression`:this.checkToRestConversion(e.expression,!1);break;default:super.checkToRestConversion(e,t)}}isValidLVal(e,t,n,r){switch(e){case`TSTypeCastExpression`:return!0;case`TSParameterProperty`:return`parameter`;case`TSNonNullExpression`:return`expression`;case`TSAsExpression`:case`TSSatisfiesExpression`:case`TSTypeAssertion`:return(r!==64||!n)&&[`expression`,!0];default:return super.isValidLVal(e,t,n,r)}}parseBindingAtom(){return this.state.type===78?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(e,t){if(this.match(47)||this.match(51)){let n=this.tsParseTypeArgumentsInExpression();if(this.match(10)){let r=super.parseMaybeDecoratorArguments(e,t);return r.typeParameters=n,r}this.unexpected(null,10)}return super.parseMaybeDecoratorArguments(e,t)}checkCommaAfterRest(e){return this.state.isAmbientContext&&this.match(12)&&this.lookaheadCharCode()===e?(this.next(),!1):super.checkCommaAfterRest(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(35)||this.match(14)||super.isClassProperty()}parseMaybeDefault(e,t){let n=super.parseMaybeDefault(e,t);return n.type===`AssignmentPattern`&&n.typeAnnotation&&n.right.start<n.typeAnnotation.start&&this.raise(G.TypeAnnotationAfterAssign,n.typeAnnotation),n}getTokenFromCode(e){if(this.state.inType){if(e===62){this.finishOp(48,1);return}if(e===60){this.finishOp(47,1);return}}super.getTokenFromCode(e)}reScan_lt_gt(){let{type:e}=this.state;e===47?(--this.state.pos,this.readToken_lt()):e===48&&(--this.state.pos,this.readToken_gt())}reScan_lt(){let{type:e}=this.state;return e===51?(this.state.pos-=2,this.finishOp(47,1),47):e}toAssignableListItem(e,t,n){let r=e[t];r.type===`TSTypeCastExpression`&&(e[t]=this.typeCastToParameter(r)),super.toAssignableListItem(e,t,n)}typeCastToParameter(e){return e.expression.typeAnnotation=e.typeAnnotation,this.resetEndLocation(e.expression,e.typeAnnotation.loc.end),e.expression}shouldParseArrow(e){return this.match(14)?e.every(e=>this.isAssignable(e,!0)):super.shouldParseArrow(e)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(e){if(this.match(47)||this.match(51)){let t=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());t&&(e.typeParameters=t)}return super.jsxParseOpeningElementAfterName(e)}getGetterSetterExpectedParamCount(e){let t=super.getGetterSetterExpectedParamCount(e),n=this.getObjectOrClassMethodParams(e)[0];return n&&this.isThisParam(n)?t+1:t}parseCatchClauseParam(){let e=super.parseCatchClauseParam(),t=this.tsTryParseTypeAnnotation();return t&&(e.typeAnnotation=t,this.resetEndLocation(e)),e}tsInAmbientContext(e){let{isAmbientContext:t,strict:n}=this.state;this.state.isAmbientContext=!0,this.state.strict=!1;try{return e()}finally{this.state.isAmbientContext=t,this.state.strict=n}}parseClass(e,t,n){let r=this.state.inAbstractClass;this.state.inAbstractClass=!!e.abstract;try{return super.parseClass(e,t,n)}finally{this.state.inAbstractClass=r}}tsParseAbstractDeclaration(e,t){if(this.match(80))return e.abstract=!0,this.maybeTakeDecorators(t,this.parseClass(e,!0,!1));if(this.isContextual(129))return this.hasFollowingLineBreak()?null:(e.abstract=!0,this.raise(G.NonClassMethodPropertyHasAbstractModifier,e),this.tsParseInterfaceDeclaration(e));throw this.unexpected(null,80)}parseMethod(e,t,n,r,i,a,o){let s=super.parseMethod(e,t,n,r,i,a,o);if((s.abstract||s.type===`TSAbstractMethodDefinition`)&&(this.hasPlugin(`estree`)?s.value:s).body){let{key:e}=s;this.raise(G.AbstractMethodHasImplementation,s,{methodName:e.type===`Identifier`&&!s.computed?e.name:`[${this.input.slice(this.offsetToSourcePos(e.start),this.offsetToSourcePos(e.end))}]`})}return s}tsParseTypeParameterName(){return this.parseIdentifier().name}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(e,t,n,r){return!t&&r?(this.parseTypeOnlyImportExportSpecifier(e,!1,n),this.finishNode(e,`ExportSpecifier`)):(e.exportKind=`value`,super.parseExportSpecifier(e,t,n,r))}parseImportSpecifier(e,t,n,r,i){return!t&&r?(this.parseTypeOnlyImportExportSpecifier(e,!0,n),this.finishNode(e,`ImportSpecifier`)):(e.importKind=`value`,super.parseImportSpecifier(e,t,n,r,n?4098:4096))}parseTypeOnlyImportExportSpecifier(e,t,n){let r=t?`imported`:`local`,i=t?`local`:`exported`,a=e[r],o,s=!1,c=!0,l=a.loc.start;if(this.isContextual(93)){let e=this.parseIdentifier();if(this.isContextual(93)){let n=this.parseIdentifier();j(this.state.type)?(s=!0,a=e,o=t?this.parseIdentifier():this.parseModuleExportName(),c=!1):(o=n,c=!1)}else j(this.state.type)?(c=!1,o=t?this.parseIdentifier():this.parseModuleExportName()):(s=!0,a=e)}else j(this.state.type)&&(s=!0,t?(a=this.parseIdentifier(!0),this.isContextual(93)||this.checkReservedWord(a.name,a.loc.start,!0,!0)):a=this.parseModuleExportName());s&&n&&this.raise(t?G.TypeModifierIsUsedInTypeImports:G.TypeModifierIsUsedInTypeExports,l),e[r]=a,e[i]=o;let u=t?`importKind`:`exportKind`;e[u]=s?`type`:`value`,c&&this.eatContextual(93)&&(e[i]=t?this.parseIdentifier():this.parseModuleExportName()),e[i]||(e[i]=this.cloneIdentifier(e[r])),t&&this.checkIdentifier(e[i],s?4098:4096)}fillOptionalPropertiesForTSESLint(e){switch(e.type){case`ExpressionStatement`:e.directive??=void 0;return;case`RestElement`:e.value=void 0;case`Identifier`:case`ArrayPattern`:case`AssignmentPattern`:case`ObjectPattern`:e.decorators??=[],e.optional??=!1,e.typeAnnotation??=void 0;return;case`TSParameterProperty`:e.accessibility??=void 0,e.decorators??=[],e.override??=!1,e.readonly??=!1,e.static??=!1;return;case`TSEmptyBodyFunctionExpression`:e.body=null;case`TSDeclareFunction`:case`FunctionDeclaration`:case`FunctionExpression`:case`ClassMethod`:case`ClassPrivateMethod`:e.declare??=!1,e.returnType??=void 0,e.typeParameters??=void 0;return;case`Property`:e.optional??=!1;return;case`TSMethodSignature`:case`TSPropertySignature`:e.optional??=!1;case`TSIndexSignature`:e.accessibility??=void 0,e.readonly??=!1,e.static??=!1;return;case`TSAbstractPropertyDefinition`:case`PropertyDefinition`:case`TSAbstractAccessorProperty`:case`AccessorProperty`:e.declare??=!1,e.definite??=!1,e.readonly??=!1,e.typeAnnotation??=void 0;case`TSAbstractMethodDefinition`:case`MethodDefinition`:e.accessibility??=void 0,e.decorators??=[],e.override??=!1,e.optional??=!1;return;case`ClassExpression`:e.id??=null;case`ClassDeclaration`:e.abstract??=!1,e.declare??=!1,e.decorators??=[],e.implements??=[],e.superTypeArguments??=void 0,e.typeParameters??=void 0;return;case`TSTypeAliasDeclaration`:case`VariableDeclaration`:e.declare??=!1;return;case`VariableDeclarator`:e.definite??=!1;return;case`TSEnumDeclaration`:e.const??=!1,e.declare??=!1;return;case`TSEnumMember`:e.computed??=!1;return;case`TSImportType`:e.qualifier??=null,e.options??=null;return;case`TSInterfaceDeclaration`:e.declare??=!1,e.extends??=[];return;case`TSMappedType`:e.optional??=!1,e.readonly??=void 0;return;case`TSModuleDeclaration`:e.declare??=!1,e.global??=e.kind===`global`;return;case`TSTypeParameter`:e.const??=!1,e.in??=!1,e.out??=!1;return}}chStartsBindingIdentifierAndNotRelationalOperator(e,t){if(Me(e)){if(qt.lastIndex=t,qt.test(this.input)){let e=this.codePointAtPos(qt.lastIndex);if(!Ne(e)&&e!==92)return!1}return!0}else if(e===92)return!0;else return!1}nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine(){let e=this.nextTokenInLineStart(),t=this.codePointAtPos(e);return this.chStartsBindingIdentifierAndNotRelationalOperator(t,e)}nextTokenIsIdentifierOrStringLiteralOnSameLine(){let e=this.nextTokenInLineStart(),t=this.codePointAtPos(e);return this.chStartsBindingIdentifier(t,e)||t===34||t===39}};function Qt(e){if(e.type!==`MemberExpression`)return!1;let{computed:t,property:n}=e;return t&&n.type!==`StringLiteral`&&(n.type!==`TemplateLiteral`||n.expressions.length>0)?!1:nn(e.object)}function $t(e,t){var n;let{type:r}=e;if((n=e.extra)!=null&&n.parenthesized)return!1;if(t){if(r===`Literal`){let{value:t}=e;if(typeof t==`string`||typeof t==`boolean`)return!0}}else if(r===`StringLiteral`||r===`BooleanLiteral`)return!0;return!!(en(e,t)||tn(e,t)||r===`TemplateLiteral`&&e.expressions.length===0||Qt(e))}function en(e,t){return t?e.type===`Literal`&&(typeof e.value==`number`||`bigint`in e):e.type===`NumericLiteral`||e.type===`BigIntLiteral`}function tn(e,t){if(e.type===`UnaryExpression`){let{operator:n,argument:r}=e;if(n===`-`&&en(r,t))return!0}return!1}function nn(e){return e.type===`Identifier`?!0:e.type!==`MemberExpression`||e.computed?!1:nn(e.object)}let rn=_`placeholders`({ClassNameIsRequired:`A class name is required.`,UnexpectedSpace:`Unexpected space in placeholder.`});var an=e=>class extends e{parsePlaceholder(e){if(this.match(133)){let t=this.startNode();return this.next(),this.assertNoSpace(),t.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(133),this.finishPlaceholder(t,e)}}finishPlaceholder(e,t){let n=e;return(!n.expectedNode||!n.type)&&(n=this.finishNode(n,`Placeholder`)),n.expectedNode=t,n}getTokenFromCode(e){e===37&&this.input.charCodeAt(this.state.pos+1)===37?this.finishOp(133,2):super.getTokenFromCode(e)}parseExprAtom(e){return this.parsePlaceholder(`Expression`)||super.parseExprAtom(e)}parseIdentifier(e){return this.parsePlaceholder(`Identifier`)||super.parseIdentifier(e)}checkReservedWord(e,t,n,r){e!==void 0&&super.checkReservedWord(e,t,n,r)}cloneIdentifier(e){let t=super.cloneIdentifier(e);return t.type===`Placeholder`&&(t.expectedNode=e.expectedNode),t}cloneStringLiteral(e){return e.type===`Placeholder`?this.cloneIdentifier(e):super.cloneStringLiteral(e)}parseBindingAtom(){return this.parsePlaceholder(`Pattern`)||super.parseBindingAtom()}isValidLVal(e,t,n,r){return e===`Placeholder`||super.isValidLVal(e,t,n,r)}toAssignable(e,t){e&&e.type===`Placeholder`&&e.expectedNode===`Expression`?e.expectedNode=`Pattern`:super.toAssignable(e,t)}chStartsBindingIdentifier(e,t){if(super.chStartsBindingIdentifier(e,t))return!0;let n=this.nextTokenStart();return this.input.charCodeAt(n)===37&&this.input.charCodeAt(n+1)===37}verifyBreakContinue(e,t){e.label?.type!==`Placeholder`&&super.verifyBreakContinue(e,t)}parseExpressionStatement(e,t){var n;if(t.type!==`Placeholder`||(n=t.extra)!=null&&n.parenthesized)return super.parseExpressionStatement(e,t);if(this.match(14)){let n=e;return n.label=this.finishPlaceholder(t,`Identifier`),this.next(),n.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(n,`LabeledStatement`)}this.semicolon();let r=e;return r.name=t.name,this.finishPlaceholder(r,`Statement`)}parseBlock(e,t,n){return this.parsePlaceholder(`BlockStatement`)||super.parseBlock(e,t,n)}parseFunctionId(e){return this.parsePlaceholder(`Identifier`)||super.parseFunctionId(e)}parseClass(e,t,n){let r=t?`ClassDeclaration`:`ClassExpression`;this.next();let i=this.state.strict,a=this.parsePlaceholder(`Identifier`);if(a)if(this.match(81)||this.match(133)||this.match(5))e.id=a;else if(n||!t)return e.id=null,e.body=this.finishPlaceholder(a,`ClassBody`),this.finishNode(e,r);else throw this.raise(rn.ClassNameIsRequired,this.state.startLoc);else this.parseClassId(e,t,n);return super.parseClassSuper(e),e.body=this.parsePlaceholder(`ClassBody`)||super.parseClassBody(!!e.superClass,i),this.finishNode(e,r)}parseExport(e,t){let n=this.parsePlaceholder(`Identifier`);if(!n)return super.parseExport(e,t);let r=e;if(!this.isContextual(98)&&!this.match(12))return r.specifiers=[],r.source=null,r.declaration=this.finishPlaceholder(n,`Declaration`),this.finishNode(r,`ExportNamedDeclaration`);this.expectPlugin(`exportDefaultFrom`);let i=this.startNode();return i.exported=n,r.specifiers=[this.finishNode(i,`ExportDefaultSpecifier`)],super.parseExport(r,t)}isExportDefaultSpecifier(){if(this.match(65)){let e=this.nextTokenStart();if(this.isUnparsedContextual(e,`from`)&&this.input.startsWith(we(133),this.nextTokenStartSince(e+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(e,t){var n;return(n=e.specifiers)!=null&&n.length?!0:super.maybeParseExportDefaultSpecifier(e,t)}checkExport(e){let{specifiers:t}=e;t!=null&&t.length&&(e.specifiers=t.filter(e=>e.exported.type===`Placeholder`)),super.checkExport(e),e.specifiers=t}parseImport(e){let t=this.parsePlaceholder(`Identifier`);if(!t)return super.parseImport(e);if(e.specifiers=[],!this.isContextual(98)&&!this.match(12))return e.source=this.finishPlaceholder(t,`StringLiteral`),this.semicolon(),this.finishNode(e,`ImportDeclaration`);let n=this.startNodeAtNode(t);return n.local=t,e.specifiers.push(this.finishNode(n,`ImportDefaultSpecifier`)),this.eat(12)&&(this.maybeParseStarImportSpecifier(e)||this.parseNamedImportSpecifiers(e)),this.expectContextual(98),e.source=this.parseImportSource(),this.semicolon(),this.finishNode(e,`ImportDeclaration`)}parseImportSource(){return this.parsePlaceholder(`StringLiteral`)||super.parseImportSource()}assertNoSpace(){this.state.start>this.offsetToSourcePos(this.state.lastTokEndLoc.index)&&this.raise(rn.UnexpectedSpace,this.state.lastTokEndLoc)}},on=e=>class extends e{parseV8Intrinsic(){if(this.match(54)){let e=this.state.startLoc,t=this.startNode();if(this.next(),A(this.state.type)){let e=this.parseIdentifierName(),n=this.createIdentifier(t,e);if(this.castNodeTo(n,`V8IntrinsicIdentifier`),this.match(10))return n}this.unexpected(e)}}parseExprAtom(e){return this.parseV8Intrinsic()||super.parseExprAtom(e)}};let sn=[`minimal`,`fsharp`,`hack`,`smart`],cn=[`^^`,`@@`,`^`,`%`,`#`];function ln(e){if(e.has(`decorators`)){if(e.has(`decorators-legacy`))throw Error(`Cannot use the decorators and decorators-legacy plugin together`);let t=e.get(`decorators`).decoratorsBeforeExport;if(t!=null&&typeof t!=`boolean`)throw Error(`'decoratorsBeforeExport' must be a boolean, if specified.`);let n=e.get(`decorators`).allowCallParenthesized;if(n!=null&&typeof n!=`boolean`)throw Error(`'allowCallParenthesized' must be a boolean.`)}if(e.has(`flow`)&&e.has(`typescript`))throw Error(`Cannot combine flow and typescript plugins.`);if(e.has(`placeholders`)&&e.has(`v8intrinsic`))throw Error(`Cannot combine placeholders and v8intrinsic plugins.`);if(e.has(`pipelineOperator`)){let t=e.get(`pipelineOperator`).proposal;if(!sn.includes(t)){let e=sn.map(e=>`"${e}"`).join(`, `);throw Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${e}.`)}if(t===`hack`){if(e.has(`placeholders`))throw Error(`Cannot combine placeholders plugin and Hack-style pipes.`);if(e.has(`v8intrinsic`))throw Error(`Cannot combine v8intrinsic plugin and Hack-style pipes.`);let t=e.get(`pipelineOperator`).topicToken;if(!cn.includes(t)){let e=cn.map(e=>`"${e}"`).join(`, `);throw Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${e}.`)}if(t===`#`&&e.get(`recordAndTuple`)?.syntaxType===`hash`)throw Error(`Plugin conflict between \`["pipelineOperator", { proposal: "hack", topicToken: "#" }]\` and \`${JSON.stringify([`recordAndTuple`,e.get(`recordAndTuple`)])}\`.`)}else if(t===`smart`&&e.get(`recordAndTuple`)?.syntaxType===`hash`)throw Error(`Plugin conflict between \`["pipelineOperator", { proposal: "smart" }]\` and \`${JSON.stringify([`recordAndTuple`,e.get(`recordAndTuple`)])}\`.`)}if(e.has(`moduleAttributes`)){if(e.has(`deprecatedImportAssert`)||e.has(`importAssertions`))throw Error(`Cannot combine importAssertions, deprecatedImportAssert and moduleAttributes plugins.`);if(e.get(`moduleAttributes`).version!==`may-2020`)throw Error(`The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.`)}if(e.has(`importAssertions`)&&e.has(`deprecatedImportAssert`))throw Error(`Cannot combine importAssertions and deprecatedImportAssert plugins.`);if(e.has(`deprecatedImportAssert`)||e.has(`importAttributes`)&&e.get(`importAttributes`).deprecatedAssertSyntax&&e.set(`deprecatedImportAssert`,{}),e.has(`recordAndTuple`)){let t=e.get(`recordAndTuple`).syntaxType;if(t!=null){let e=[`hash`,`bar`];if(!e.includes(t))throw Error(`The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: `+e.map(e=>`'${e}'`).join(`, `))}}if(e.has(`asyncDoExpressions`)&&!e.has(`doExpressions`)){let e=Error(`'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.`);throw e.missingPlugins=`doExpressions`,e}if(e.has(`optionalChainingAssign`)&&e.get(`optionalChainingAssign`).version!==`2023-07`)throw Error(`The 'optionalChainingAssign' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is '2023-07'.`);if(e.has(`discardBinding`)&&e.get(`discardBinding`).syntaxType!==`void`)throw Error(`The 'discardBinding' plugin requires a 'syntaxType' option. Currently the only supported value is 'void'.`)}let un={estree:te,jsx:ft,flow:nt,typescript:K,v8intrinsic:on,placeholders:an},dn=Object.keys(un);var fn=class extends Kt{checkProto(e,t,n,r){if(e.type===`SpreadElement`||this.isObjectMethod(e)||e.computed||e.shorthand)return n;let i=e.key;return(i.type===`Identifier`?i.name:i.value)===`__proto__`?t?(this.raise(v.RecordNoProto,i),!0):(n&&(r?r.doubleProtoLoc===null&&(r.doubleProtoLoc=i.loc.start):this.raise(v.DuplicateProto,i)),!0):n}shouldExitDescending(e,t){return e.type===`ArrowFunctionExpression`&&this.offsetToSourcePos(e.start)===t}getExpression(){if(this.enterInitialScopes(),this.nextToken(),this.match(140))throw this.raise(v.ParseExpressionEmptyInput,this.state.startLoc);let e=this.parseExpression();if(!this.match(140))throw this.raise(v.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&256&&(e.tokens=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,n=this.parseMaybeAssign(e);if(this.match(12)){let r=this.startNodeAt(t);for(r.expressions=[n];this.eat(12);)r.expressions.push(this.parseMaybeAssign(e));return this.toReferencedList(r.expressions),this.finishNode(r,`SequenceExpression`)}return n}parseMaybeAssignDisallowIn(e,t){return this.disallowInAnd(()=>this.parseMaybeAssign(e,t))}parseMaybeAssignAllowIn(e,t){return this.allowInAnd(()=>this.parseMaybeAssign(e,t))}setOptionalParametersError(e){e.optionalParametersLoc=this.state.startLoc}parseMaybeAssign(e,t){let n=this.state.startLoc,r=this.isContextual(108);if(r&&this.prodParam.hasYield){this.next();let e=this.parseYield(n);return t&&(e=t.call(this,e,n)),e}let i;e?i=!1:(e=new Vt,i=!0);let{type:a}=this.state;(a===10||A(a))&&(this.state.potentialArrowAt=this.state.start);let o=this.parseMaybeConditional(e);if(t&&(o=t.call(this,o,n)),he(this.state.type)){let t=this.startNodeAt(n),r=this.state.value;if(t.operator=r,this.match(29)){this.toAssignable(o,!0),t.left=o;let r=n.index;e.doubleProtoLoc!=null&&e.doubleProtoLoc.index>=r&&(e.doubleProtoLoc=null),e.shorthandAssignLoc!=null&&e.shorthandAssignLoc.index>=r&&(e.shorthandAssignLoc=null),e.privateKeyLoc!=null&&e.privateKeyLoc.index>=r&&(this.checkDestructuringPrivate(e),e.privateKeyLoc=null),e.voidPatternLoc!=null&&e.voidPatternLoc.index>=r&&(e.voidPatternLoc=null)}else t.left=o;return this.next(),t.right=this.parseMaybeAssign(),this.checkLVal(o,this.finishNode(t,`AssignmentExpression`),void 0,void 0,void 0,void 0,r===`||=`||r===`&&=`||r===`??=`),t}else i&&this.checkExpressionErrors(e,!0);if(r){let{type:e}=this.state;if((this.hasPlugin(`v8intrinsic`)?me(e):me(e)&&!this.match(54))&&!this.isAmbiguousPrefixOrIdentifier())return this.raiseOverwrite(v.YieldNotInGeneratorFunction,n),this.parseYield(n)}return o}parseMaybeConditional(e){let t=this.state.startLoc,n=this.state.potentialArrowAt,r=this.parseExprOps(e);return this.shouldExitDescending(r,n)?r:this.parseConditional(r,t,e)}parseConditional(e,t,n){if(this.eat(17)){let n=this.startNodeAt(t);return n.test=e,n.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),n.alternate=this.parseMaybeAssign(),this.finishNode(n,`ConditionalExpression`)}return e}parseMaybeUnaryOrPrivate(e){return this.match(139)?this.parsePrivateName():this.parseMaybeUnary(e)}parseExprOps(e){let t=this.state.startLoc,n=this.state.potentialArrowAt,r=this.parseMaybeUnaryOrPrivate(e);return this.shouldExitDescending(r,n)?r:this.parseExprOp(r,t,-1)}parseExprOp(e,t,n){if(this.isPrivateName(e)){let t=this.getPrivateNameSV(e);(n>=Te(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise(v.PrivateInExpectedIn,e,{identifierName:t}),this.classScope.usePrivateName(t,e.loc.start)}let r=this.state.type;if(ye(r)&&(this.prodParam.hasIn||!this.match(58))){let i=Te(r);if(i>n){if(r===39){if(this.expectPlugin(`pipelineOperator`),this.state.inFSharpPipelineDirectBody)return e;this.checkPipelineAtInfixOperator(e,t)}let a=this.startNodeAt(t);a.left=e,a.operator=this.state.value;let o=r===41||r===42,s=r===40;if(s&&(i=Te(42)),this.next(),r===39&&this.hasPlugin([`pipelineOperator`,{proposal:`minimal`}])&&this.state.type===96&&this.prodParam.hasAwait)throw this.raise(v.UnexpectedAwaitAfterPipelineBody,this.state.startLoc);a.right=this.parseExprOpRightExpr(r,i);let c=this.finishNode(a,o||s?`LogicalExpression`:`BinaryExpression`),l=this.state.type;if(s&&(l===41||l===42)||o&&l===40)throw this.raise(v.MixingCoalesceWithLogical,this.state.startLoc);return this.parseExprOp(c,t,n)}}return e}parseExprOpRightExpr(e,t){let n=this.state.startLoc;switch(e){case 39:switch(this.getPluginOption(`pipelineOperator`,`proposal`)){case`hack`:return this.withTopicBindingContext(()=>this.parseHackPipeBody());case`fsharp`:return this.withSoloAwaitPermittingContext(()=>this.parseFSharpPipelineBody(t))}if(this.getPluginOption(`pipelineOperator`,`proposal`)===`smart`)return this.withTopicBindingContext(()=>{if(this.prodParam.hasYield&&this.isContextual(108))throw this.raise(v.PipeBodyIsTighter,this.state.startLoc);return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(e,t),n)});default:return this.parseExprOpBaseRightExpr(e,t)}}parseExprOpBaseRightExpr(e,t){let n=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),n,M(e)?t-1:t)}parseHackPipeBody(){var e;let{startLoc:t}=this.state,n=this.parseMaybeAssign();return f.has(n.type)&&!((e=n.extra)!=null&&e.parenthesized)&&this.raise(v.PipeUnparenthesizedBody,t,{type:n.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(v.PipeTopicUnused,t),n}checkExponentialAfterUnary(e){this.match(57)&&this.raise(v.UnexpectedTokenUnaryExponentiation,e.argument)}parseMaybeUnary(e,t){let n=this.state.startLoc,r=this.isContextual(96);if(r&&this.recordAwaitIfAllowed()){this.next();let e=this.parseAwait(n);return t||this.checkExponentialAfterUnary(e),e}let i=this.match(34),a=this.startNode();if(xe(this.state.type)){a.operator=this.state.value,a.prefix=!0,this.match(72)&&this.expectPlugin(`throwExpressions`);let n=this.match(89);if(this.next(),a.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(e,!0),this.state.strict&&n){let e=a.argument;e.type===`Identifier`?this.raise(v.StrictDelete,a):this.hasPropertyAsPrivateName(e)&&this.raise(v.DeletePrivateField,a)}if(!i)return t||this.checkExponentialAfterUnary(a),this.finishNode(a,`UnaryExpression`)}let o=this.parseUpdate(a,i,e);if(r){let{type:e}=this.state;if((this.hasPlugin(`v8intrinsic`)?me(e):me(e)&&!this.match(54))&&!this.isAmbiguousPrefixOrIdentifier())return this.raiseOverwrite(v.AwaitNotInAsyncContext,n),this.parseAwait(n)}return o}parseUpdate(e,t,n){if(t){let t=e;return this.checkLVal(t.argument,this.finishNode(t,`UpdateExpression`)),e}let r=this.state.startLoc,i=this.parseExprSubscripts(n);if(this.checkExpressionErrors(n,!1))return i;for(;be(this.state.type)&&!this.canInsertSemicolon();){let e=this.startNodeAt(r);e.operator=this.state.value,e.prefix=!1,e.argument=i,this.next(),this.checkLVal(i,i=this.finishNode(e,`UpdateExpression`))}return i}parseExprSubscripts(e){let t=this.state.startLoc,n=this.state.potentialArrowAt,r=this.parseExprAtom(e);return this.shouldExitDescending(r,n)?r:this.parseSubscripts(r,t)}parseSubscripts(e,t,n){let r={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(e),stop:!1};do e=this.parseSubscript(e,t,n,r),r.maybeAsyncArrow=!1;while(!r.stop);return e}parseSubscript(e,t,n,r){let{type:i}=this.state;if(!n&&i===15)return this.parseBind(e,t,n,r);if(Ee(i))return this.parseTaggedTemplateExpression(e,t,r);let a=!1;if(i===18){if(n&&(this.raise(v.OptionalChainingNoNew,this.state.startLoc),this.lookaheadCharCode()===40))return this.stopParseSubscript(e,r);r.optionalChainMember=a=!0,this.next()}if(!n&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(e,t,r,a);{let n=this.eat(0);return n||a||this.eat(16)?this.parseMember(e,t,r,n,a):this.stopParseSubscript(e,r)}}stopParseSubscript(e,t){return t.stop=!0,e}parseMember(e,t,n,r,i){let a=this.startNodeAt(t);return a.object=e,a.computed=r,r?(a.property=this.parseExpression(),this.expect(3)):this.match(139)?(e.type===`Super`&&this.raise(v.SuperPrivateField,t),this.classScope.usePrivateName(this.state.value,this.state.startLoc),a.property=this.parsePrivateName()):a.property=this.parseIdentifier(!0),n.optionalChainMember?(a.optional=i,this.finishNode(a,`OptionalMemberExpression`)):this.finishNode(a,`MemberExpression`)}parseBind(e,t,n,r){let i=this.startNodeAt(t);return i.object=e,this.next(),i.callee=this.parseNoCallExpr(),r.stop=!0,this.parseSubscripts(this.finishNode(i,`BindExpression`),t,n)}parseCoverCallAndAsyncArrowHead(e,t,n,r){let i=this.state.maybeInArrowParameters,a=null;this.state.maybeInArrowParameters=!0,this.next();let o=this.startNodeAt(t);o.callee=e;let{maybeAsyncArrow:s,optionalChainMember:c}=n;s&&(this.expressionScope.enter(Rt()),a=new Vt),c&&(o.optional=r),r?o.arguments=this.parseCallExpressionArguments():o.arguments=this.parseCallExpressionArguments(e.type!==`Super`,o,a);let l=this.finishCallExpression(o,c);return s&&this.shouldParseAsyncArrow()&&!r?(n.stop=!0,this.checkDestructuringPrivate(a),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),l=this.parseAsyncArrowFromCallExpression(this.startNodeAt(t),l)):(s&&(this.checkExpressionErrors(a,!0),this.expressionScope.exit()),this.toReferencedArguments(l)),this.state.maybeInArrowParameters=i,l}toReferencedArguments(e,t){this.toReferencedListDeep(e.arguments,t)}parseTaggedTemplateExpression(e,t,n){let r=this.startNodeAt(t);return r.tag=e,r.quasi=this.parseTemplate(!0),n.optionalChainMember&&this.raise(v.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.offsetToSourcePos(e.start)===this.state.potentialArrowAt}finishCallExpression(e,t){if(e.callee.type===`Import`)if(e.arguments.length===0||e.arguments.length>2)this.raise(v.ImportCallArity,e);else for(let t of e.arguments)t.type===`SpreadElement`&&this.raise(v.ImportCallSpreadArgument,t);return this.finishNode(e,t?`OptionalCallExpression`:`CallExpression`)}parseCallExpressionArguments(e,t,n){let r=[],i=!0,a=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(11);){if(i)i=!1;else if(this.expect(12),this.match(11)){t&&this.addTrailingCommaExtraToNode(t),this.next();break}r.push(this.parseExprListItem(11,!1,n,e))}return this.state.inFSharpPipelineDirectBody=a,r}shouldParseAsyncArrow(){return this.match(19)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(e,t){return this.resetPreviousNodeTrailingComments(t),this.expect(19),this.parseArrowExpression(e,t.arguments,!0,t.extra?.trailingCommaLoc),t.innerComments&&R(e,t.innerComments),t.callee.trailingComments&&R(e,t.callee.trailingComments),e}parseNoCallExpr(){let e=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),e,!0)}parseExprAtom(e){let t,n=null,{type:r}=this.state;switch(r){case 79:return this.parseSuper();case 83:return t=this.startNode(),this.next(),this.match(16)?this.parseImportMetaPropertyOrPhaseCall(t):this.match(10)?this.optionFlags&512?this.parseImportCall(t):this.finishNode(t,`Import`):(this.raise(v.UnsupportedImport,this.state.lastTokStartLoc),this.finishNode(t,`Import`));case 78:return t=this.startNode(),this.next(),this.finishNode(t,`ThisExpression`);case 90:return this.parseDo(this.startNode(),!1);case 56:case 31:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 135:return this.parseNumericLiteral(this.state.value);case 136:return this.parseBigIntLiteral(this.state.value);case 134:return this.parseStringLiteral(this.state.value);case 84:return this.parseNullLiteral();case 85:return this.parseBooleanLiteral(!0);case 86:return this.parseBooleanLiteral(!1);case 10:{let e=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(e)}case 0:return this.parseArrayLike(3,!1,e);case 5:return this.parseObjectLike(8,!1,!1,e);case 68:return this.parseFunctionOrFunctionSent();case 26:n=this.parseDecorators();case 80:return this.parseClass(this.maybeTakeDecorators(n,this.startNode()),!1);case 77:return this.parseNewOrNewTarget();case 25:case 24:return this.parseTemplate(!1);case 15:{t=this.startNode(),this.next(),t.object=null;let e=t.callee=this.parseNoCallExpr();if(e.type===`MemberExpression`)return this.finishNode(t,`BindExpression`);throw this.raise(v.UnsupportedBind,e)}case 139:return this.raise(v.PrivateInExpectedIn,this.state.startLoc,{identifierName:this.state.value}),this.parsePrivateName();case 33:return this.parseTopicReferenceThenEqualsSign(54,`%`);case 32:return this.parseTopicReferenceThenEqualsSign(44,`^`);case 37:case 38:return this.parseTopicReference(`hack`);case 44:case 54:case 27:{let e=this.getPluginOption(`pipelineOperator`,`proposal`);if(e)return this.parseTopicReference(e);throw this.unexpected()}case 47:{let e=this.input.codePointAt(this.nextTokenStart());throw Me(e)||e===62?this.expectOnePlugin([`jsx`,`flow`,`typescript`]):this.unexpected()}default:if(r===137)return this.parseDecimalLiteral(this.state.value);if(r===2||r===1)return this.parseArrayLike(this.state.type===2?4:3,!0);if(r===6||r===7)return this.parseObjectLike(this.state.type===6?9:8,!1,!0);if(A(r)){if(this.isContextual(127)&&this.lookaheadInLineCharCode()===123)return this.parseModuleExpression();let e=this.state.potentialArrowAt===this.state.start,t=this.state.containsEsc,n=this.parseIdentifier();if(!t&&n.name===`async`&&!this.canInsertSemicolon()){let{type:e}=this.state;if(e===68)return this.resetPreviousNodeTrailingComments(n),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(n));if(A(e))return this.lookaheadCharCode()===61?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(n)):n;if(e===90)return this.resetPreviousNodeTrailingComments(n),this.parseDo(this.startNodeAtNode(n),!0)}return e&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(n),[n],!1)):n}else throw this.unexpected()}}parseTopicReferenceThenEqualsSign(e,t){let n=this.getPluginOption(`pipelineOperator`,`proposal`);if(n)return this.state.type=e,this.state.value=t,this.state.pos--,this.state.end--,this.state.endLoc=i(this.state.endLoc,-1),this.parseTopicReference(n);throw this.unexpected()}parseTopicReference(e){let t=this.startNode(),n=this.state.startLoc,r=this.state.type;return this.next(),this.finishTopicReference(t,n,e,r)}finishTopicReference(e,t,n,r){if(this.testTopicReferenceConfiguration(n,t,r))return n===`hack`?(this.topicReferenceIsAllowedInCurrentContext()||this.raise(v.PipeTopicUnbound,t),this.registerTopicReference(),this.finishNode(e,`TopicReference`)):(this.topicReferenceIsAllowedInCurrentContext()||this.raise(v.PrimaryTopicNotAllowed,t),this.registerTopicReference(),this.finishNode(e,`PipelinePrimaryTopicReference`));throw this.raise(v.PipeTopicUnconfiguredToken,t,{token:we(r)})}testTopicReferenceConfiguration(e,t,n){switch(e){case`hack`:return this.hasPlugin([`pipelineOperator`,{topicToken:we(n)}]);case`smart`:return n===27;default:throw this.raise(v.PipeTopicRequiresHackPipes,t)}}parseAsyncArrowUnaryFunction(e){this.prodParam.enter(gt(!0,this.prodParam.hasYield));let t=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(v.LineTerminatorBeforeArrow,this.state.curPosition()),this.expect(19),this.parseArrowExpression(e,t,!0)}parseDo(e,t){this.expectPlugin(`doExpressions`),t&&this.expectPlugin(`asyncDoExpressions`),e.async=t,this.next();let n=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=n,this.finishNode(e,`DoExpression`)}parseSuper(){let e=this.startNode();return this.next(),this.match(10)&&!this.scope.allowDirectSuper?this.optionFlags&16||this.raise(v.SuperNotAllowed,e):this.scope.allowSuper||this.optionFlags&16||this.raise(v.UnexpectedSuper,e),!this.match(10)&&!this.match(0)&&!this.match(16)&&this.raise(v.UnsupportedSuper,e),this.finishNode(e,`Super`)}parsePrivateName(){let e=this.startNode(),t=this.startNodeAt(i(this.state.startLoc,1)),n=this.state.value;return this.next(),e.id=this.createIdentifier(t,n),this.finishNode(e,`PrivateName`)}parseFunctionOrFunctionSent(){let e=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(16)){let t=this.createIdentifier(this.startNodeAtNode(e),`function`);return this.next(),this.match(103)?this.expectPlugin(`functionSent`):this.hasPlugin(`functionSent`)||this.unexpected(),this.parseMetaProperty(e,t,`sent`)}return this.parseFunction(e)}parseMetaProperty(e,t,n){e.meta=t;let r=this.state.containsEsc;return e.property=this.parseIdentifier(!0),(e.property.name!==n||r)&&this.raise(v.UnsupportedMetaProperty,e.property,{target:t.name,onlyValidPropertyName:n}),this.finishNode(e,`MetaProperty`)}parseImportMetaPropertyOrPhaseCall(e){if(this.next(),this.isContextual(105)||this.isContextual(97)){let t=this.isContextual(105);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(101)&&(this.inModule||this.raise(v.ImportMetaOutsideModule,t),this.sawUnambiguousESM=!0),this.parseMetaProperty(e,t,`meta`)}}parseLiteralAtNode(e,t,n){return this.addExtra(n,`rawValue`,e),this.addExtra(n,`raw`,this.input.slice(this.offsetToSourcePos(n.start),this.state.end)),n.value=e,this.next(),this.finishNode(n,t)}parseLiteral(e,t){let n=this.startNode();return this.parseLiteralAtNode(e,t,n)}parseStringLiteral(e){return this.parseLiteral(e,`StringLiteral`)}parseNumericLiteral(e){return this.parseLiteral(e,`NumericLiteral`)}parseBigIntLiteral(e){return this.parseLiteral(e,`BigIntLiteral`)}parseDecimalLiteral(e){return this.parseLiteral(e,`DecimalLiteral`)}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,n;this.next(),this.expressionScope.enter(Lt());let r=this.state.maybeInArrowParameters,i=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;let a=this.state.startLoc,o=[],s=new Vt,c=!0,l,u;for(;!this.match(11);){if(c)c=!1;else if(this.expect(12,s.optionalParametersLoc===null?null:s.optionalParametersLoc),this.match(11)){u=this.state.startLoc;break}if(this.match(21)){let e=this.state.startLoc;if(l=this.state.startLoc,o.push(this.parseParenItem(this.parseRestBinding(),e)),!this.checkCommaAfterRest(41))break}else o.push(this.parseMaybeAssignAllowInOrVoidPattern(11,s,this.parseParenItem))}let d=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=r,this.state.inFSharpPipelineDirectBody=i;let f=this.startNodeAt(t);return e&&this.shouldParseArrow(o)&&(f=this.parseArrow(f))?(this.checkDestructuringPrivate(s),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(f,o,!1),f):(this.expressionScope.exit(),o.length||this.unexpected(this.state.lastTokStartLoc),u&&this.unexpected(u),l&&this.unexpected(l),this.checkExpressionErrors(s,!0),this.toReferencedListDeep(o,!0),o.length>1?(n=this.startNodeAt(a),n.expressions=o,this.finishNode(n,`SequenceExpression`),this.resetEndLocation(n,d)):n=o[0],this.wrapParenthesis(t,n))}wrapParenthesis(e,t){if(!(this.optionFlags&1024))return this.addExtra(t,`parenthesized`,!0),this.addExtra(t,`parenStart`,e.index),this.takeSurroundingComments(t,e.index,this.state.lastTokEndLoc.index),t;let n=this.startNodeAt(e);return n.expression=t,this.finishNode(n,`ParenthesizedExpression`)}shouldParseArrow(e){return!this.canInsertSemicolon()}parseArrow(e){if(this.eat(19))return e}parseParenItem(e,t){return e}parseNewOrNewTarget(){let e=this.startNode();if(this.next(),this.match(16)){let t=this.createIdentifier(this.startNodeAtNode(e),`new`);this.next();let n=this.parseMetaProperty(e,t,`target`);return this.scope.allowNewTarget||this.raise(v.UnexpectedNewTarget,n),n}return this.parseNew(e)}parseNew(e){if(this.parseNewCallee(e),this.eat(10)){let t=this.parseExprList(11);this.toReferencedList(t),e.arguments=t}else e.arguments=[];return this.finishNode(e,`NewExpression`)}parseNewCallee(e){let t=this.match(83),n=this.parseNoCallExpr();e.callee=n,t&&(n.type===`Import`||n.type===`ImportExpression`)&&this.raise(v.ImportCallNotNewExpression,n)}parseTemplateElement(e){let{start:t,startLoc:n,end:r,value:a}=this.state,o=t+1,s=this.startNodeAt(i(n,1));a===null&&(e||this.raise(v.InvalidEscapeSequenceTemplate,i(this.state.firstInvalidTemplateEscapePos,1)));let c=this.match(24),l=c?-1:-2,u=r+l;s.value={raw:this.input.slice(o,u).replace(/\r\n?/g,`
6
+ `),cooked:a===null?null:a.slice(1,l)},s.tail=c,this.next();let d=this.finishNode(s,`TemplateElement`);return this.resetEndLocation(d,i(this.state.lastTokEndLoc,l)),d}parseTemplate(e){let t=this.startNode(),n=this.parseTemplateElement(e),r=[n],i=[];for(;!n.tail;)i.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),r.push(n=this.parseTemplateElement(e));return t.expressions=i,t.quasis=r,this.finishNode(t,`TemplateLiteral`)}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(e,t,n,r){n&&this.expectPlugin(`recordAndTuple`);let i=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let a=!1,o=!0,s=this.startNode();for(s.properties=[],this.next();!this.match(e);){if(o)o=!1;else if(this.expect(12),this.match(e)){this.addTrailingCommaExtraToNode(s);break}let i;t?i=this.parseBindingProperty():(i=this.parsePropertyDefinition(r),a=this.checkProto(i,n,a,r)),n&&!this.isObjectProperty(i)&&i.type!==`SpreadElement`&&this.raise(v.InvalidRecordProperty,i),i.shorthand&&this.addExtra(i,`shorthand`,!0),s.properties.push(i)}this.next(),this.state.inFSharpPipelineDirectBody=i;let c=`ObjectExpression`;return t?c=`ObjectPattern`:n&&(c=`RecordExpression`),this.finishNode(s,c)}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(55))}parsePropertyDefinition(e){let t=[];if(this.match(26))for(this.hasPlugin(`decorators`)&&this.raise(v.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)t.push(this.parseDecorator());let n=this.startNode(),r=!1,i=!1,a;if(this.match(21))return t.length&&this.unexpected(),this.parseSpread();t.length&&(n.decorators=t,t=[]),n.method=!1,e&&(a=this.state.startLoc);let o=this.eat(55);this.parsePropertyNamePrefixOperator(n);let s=this.state.containsEsc;if(this.parsePropertyName(n,e),!o&&!s&&this.maybeAsyncOrAccessorProp(n)){let{key:e}=n,t=e.name;t===`async`&&!this.hasPrecedingLineBreak()&&(r=!0,this.resetPreviousNodeTrailingComments(e),o=this.eat(55),this.parsePropertyName(n)),(t===`get`||t===`set`)&&(i=!0,this.resetPreviousNodeTrailingComments(e),n.kind=t,this.match(55)&&(o=!0,this.raise(v.AccessorIsGenerator,this.state.curPosition(),{kind:t}),this.next()),this.parsePropertyName(n))}return this.parseObjPropValue(n,a,o,r,!1,i,e)}getGetterSetterExpectedParamCount(e){return e.kind===`get`?0:1}getObjectOrClassMethodParams(e){return e.params}checkGetterSetterParams(e){let t=this.getGetterSetterExpectedParamCount(e),n=this.getObjectOrClassMethodParams(e);n.length!==t&&this.raise(e.kind===`get`?v.BadGetterArity:v.BadSetterArity,e),e.kind===`set`&&n[n.length-1]?.type===`RestElement`&&this.raise(v.BadSetterRestParameter,e)}parseObjectMethod(e,t,n,r,i){if(i){let n=this.parseMethod(e,t,!1,!1,!1,`ObjectMethod`);return this.checkGetterSetterParams(n),n}if(n||t||this.match(10))return r&&this.unexpected(),e.kind=`method`,e.method=!0,this.parseMethod(e,t,n,!1,!1,`ObjectMethod`)}parseObjectProperty(e,t,n,r){if(e.shorthand=!1,this.eat(14))return e.value=n?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowInOrVoidPattern(8,r),this.finishObjectProperty(e);if(!e.computed&&e.key.type===`Identifier`){if(this.checkReservedWord(e.key.name,e.key.loc.start,!0,!1),n)e.value=this.parseMaybeDefault(t,this.cloneIdentifier(e.key));else if(this.match(29)){let n=this.state.startLoc;r==null?this.raise(v.InvalidCoverInitializedName,n):r.shorthandAssignLoc===null&&(r.shorthandAssignLoc=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,n,r,i,a,o){let s=this.parseObjectMethod(e,n,r,i,a)||this.parseObjectProperty(e,t,i,o);return s||this.unexpected(),s}parsePropertyName(e,t){if(this.eat(0))e.computed=!0,e.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{let{type:n,value:r}=this.state,i;if(j(n))i=this.parseIdentifier(!0);else switch(n){case 135:i=this.parseNumericLiteral(r);break;case 134:i=this.parseStringLiteral(r);break;case 136:i=this.parseBigIntLiteral(r);break;case 139:{let e=this.state.startLoc;t==null?this.raise(v.UnexpectedPrivateField,e):t.privateKeyLoc===null&&(t.privateKeyLoc=e),i=this.parsePrivateName();break}default:if(n===137){i=this.parseDecimalLiteral(r);break}this.unexpected()}e.key=i,n!==139&&(e.computed=!1)}}initFunction(e,t){e.id=null,e.generator=!1,e.async=t}parseMethod(e,t,n,r,i,a,o=!1){this.initFunction(e,n),e.generator=t,this.scope.enter(530|(o?576:0)|(i?32:0)),this.prodParam.enter(gt(n,e.generator)),this.parseFunctionParams(e,r);let s=this.parseFunctionBodyAndFinish(e,a,!0);return this.prodParam.exit(),this.scope.exit(),s}parseArrayLike(e,t,n){t&&this.expectPlugin(`recordAndTuple`);let r=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let i=this.startNode();return this.next(),i.elements=this.parseExprList(e,!t,n,i),this.state.inFSharpPipelineDirectBody=r,this.finishNode(i,t?`TupleExpression`:`ArrayExpression`)}parseArrowExpression(e,t,n,r){this.scope.enter(518);let i=gt(n,!1);!this.match(5)&&this.prodParam.hasIn&&(i|=8),this.prodParam.enter(i),this.initFunction(e,n);let a=this.state.maybeInArrowParameters;return t&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(e,t,r)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(e,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=a,this.finishNode(e,`ArrowFunctionExpression`)}setArrowFunctionParameters(e,t,n){this.toAssignableList(t,n,!1),e.params=t}parseFunctionBodyAndFinish(e,t,n=!1){return this.parseFunctionBody(e,!1,n),this.finishNode(e,t)}parseFunctionBody(e,t,n=!1){let r=t&&!this.match(5);if(this.expressionScope.enter(zt()),r)e.body=this.parseMaybeAssign(),this.checkParams(e,!1,t,!1);else{let r=this.state.strict,i=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|4),e.body=this.parseBlock(!0,!1,i=>{let a=!this.isSimpleParamList(e.params);i&&a&&this.raise(v.IllegalLanguageModeDirective,(e.kind===`method`||e.kind===`constructor`)&&e.key?e.key.loc.end:e);let o=!r&&this.state.strict;this.checkParams(e,!this.state.strict&&!t&&!n&&!a,t,o),this.state.strict&&e.id&&this.checkIdentifier(e.id,65,o)}),this.prodParam.exit(),this.state.labels=i}this.expressionScope.exit()}isSimpleParameter(e){return e.type===`Identifier`}isSimpleParamList(e){for(let t=0,n=e.length;t<n;t++)if(!this.isSimpleParameter(e[t]))return!1;return!0}checkParams(e,t,n,r=!0){let i=!t&&new Set,a={type:`FormalParameters`};for(let t of e.params)this.checkLVal(t,a,5,i,r)}parseExprList(e,t,n,r){let i=[],a=!0;for(;!this.eat(e);){if(a)a=!1;else if(this.expect(12),this.match(e)){r&&this.addTrailingCommaExtraToNode(r),this.next();break}i.push(this.parseExprListItem(e,t,n))}return i}parseExprListItem(e,t,n,r){let i;if(this.match(12))t||this.raise(v.UnexpectedToken,this.state.curPosition(),{unexpected:`,`}),i=null;else if(this.match(21)){let e=this.state.startLoc;i=this.parseParenItem(this.parseSpread(n),e)}else if(this.match(17)){this.expectPlugin(`partialApplication`),r||this.raise(v.UnexpectedArgumentPlaceholder,this.state.startLoc);let e=this.startNode();this.next(),i=this.finishNode(e,`ArgumentPlaceholder`)}else i=this.parseMaybeAssignAllowInOrVoidPattern(e,n,this.parseParenItem);return i}parseIdentifier(e){let t=this.startNode(),n=this.parseIdentifierName(e);return this.createIdentifier(t,n)}createIdentifier(e,t){return e.name=t,e.loc.identifierName=t,this.finishNode(e,`Identifier`)}createIdentifierAt(e,t,n){return e.name=t,e.loc.identifierName=t,this.finishNodeAt(e,`Identifier`,n)}parseIdentifierName(e){let t,{startLoc:n,type:r}=this.state;j(r)?t=this.state.value:this.unexpected();let i=de(r);return e?i&&this.replaceToken(132):this.checkReservedWord(t,n,i,!1),this.next(),t}checkReservedWord(e,t,n,r){if(!(e.length>10)&&Ge(e)){if(n&&He(e)){this.raise(v.UnexpectedKeyword,t,{keyword:e});return}if((this.state.strict?r?Ve:ze:Re)(e,this.inModule)){this.raise(v.UnexpectedReservedWord,t,{reservedWord:e});return}else if(e===`yield`){if(this.prodParam.hasYield){this.raise(v.YieldBindingIdentifier,t);return}}else if(e===`await`){if(this.prodParam.hasAwait){this.raise(v.AwaitBindingIdentifier,t);return}if(this.scope.inStaticBlock){this.raise(v.AwaitBindingIdentifierInStaticBlock,t);return}this.expressionScope.recordAsyncArrowParametersError(t)}else if(e===`arguments`&&this.scope.inClassAndNotInNonArrowFunction){this.raise(v.ArgumentsInClass,t);return}}}recordAwaitIfAllowed(){let e=this.prodParam.hasAwait;return e&&!this.scope.inFunction&&(this.state.hasTopLevelAwait=!0),e}parseAwait(e){let t=this.startNodeAt(e);return this.expressionScope.recordParameterInitializerError(v.AwaitExpressionFormalParameter,t),this.eat(55)&&this.raise(v.ObsoleteAwaitStar,t),!this.scope.inFunction&&!(this.optionFlags&1)&&(this.isAmbiguousPrefixOrIdentifier()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(t.argument=this.parseMaybeUnary(null,!0)),this.finishNode(t,`AwaitExpression`)}isAmbiguousPrefixOrIdentifier(){if(this.hasPrecedingLineBreak())return!0;let{type:e}=this.state;return e===53||e===10||e===0||Ee(e)||e===102&&!this.state.containsEsc||e===138||e===56||this.hasPlugin(`v8intrinsic`)&&e===54}parseYield(e){let t=this.startNodeAt(e);this.expressionScope.recordParameterInitializerError(v.YieldInParameter,t);let n=!1,r=null;if(!this.hasPrecedingLineBreak())switch(n=this.eat(55),this.state.type){case 13:case 140:case 8:case 11:case 3:case 9:case 14:case 12:if(!n)break;default:r=this.parseMaybeAssign()}return t.delegate=n,t.argument=r,this.finishNode(t,`YieldExpression`)}parseImportCall(e){if(this.next(),e.source=this.parseMaybeAssignAllowIn(),e.options=null,this.eat(12)){if(this.match(11))this.addTrailingCommaExtraToNode(e.source);else if(e.options=this.parseMaybeAssignAllowIn(),this.eat(12)&&(this.addTrailingCommaExtraToNode(e.options),!this.match(11))){do this.parseMaybeAssignAllowIn();while(this.eat(12)&&!this.match(11));this.raise(v.ImportCallArity,e)}}return this.expect(11),this.finishNode(e,`ImportExpression`)}checkPipelineAtInfixOperator(e,t){this.hasPlugin([`pipelineOperator`,{proposal:`smart`}])&&e.type===`SequenceExpression`&&this.raise(v.PipelineHeadSequenceExpression,t)}parseSmartPipelineBodyInStyle(e,t){if(this.isSimpleReference(e)){let n=this.startNodeAt(t);return n.callee=e,this.finishNode(n,`PipelineBareFunction`)}else{let n=this.startNodeAt(t);return this.checkSmartPipeTopicBodyEarlyErrors(t),n.expression=e,this.finishNode(n,`PipelineTopicExpression`)}}isSimpleReference(e){switch(e.type){case`MemberExpression`:return!e.computed&&this.isSimpleReference(e.object);case`Identifier`:return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(e){if(this.match(19))throw this.raise(v.PipelineBodyNoArrow,this.state.startLoc);this.topicReferenceWasUsedInCurrentContext()||this.raise(v.PipelineTopicUnused,e)}withTopicBindingContext(e){let t=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return e()}finally{this.state.topicContext=t}}withSmartMixTopicForbiddingContext(e){if(this.hasPlugin([`pipelineOperator`,{proposal:`smart`}])){let t=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return e()}finally{this.state.topicContext=t}}else return e()}withSoloAwaitPermittingContext(e){let t=this.state.soloAwait;this.state.soloAwait=!0;try{return e()}finally{this.state.soloAwait=t}}allowInAnd(e){let t=this.prodParam.currentFlags();if(8&~t){this.prodParam.enter(t|8);try{return e()}finally{this.prodParam.exit()}}return e()}disallowInAnd(e){let t=this.prodParam.currentFlags();if(8&t){this.prodParam.enter(t&-9);try{return e()}finally{this.prodParam.exit()}}return e()}registerTopicReference(){this.state.topicContext.maxTopicIndex=0}topicReferenceIsAllowedInCurrentContext(){return this.state.topicContext.maxNumOfResolvableTopics>=1}topicReferenceWasUsedInCurrentContext(){return this.state.topicContext.maxTopicIndex!=null&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(e){let t=this.state.startLoc;this.state.potentialArrowAt=this.state.start;let n=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;let r=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),t,e);return this.state.inFSharpPipelineDirectBody=n,r}parseModuleExpression(){this.expectPlugin(`moduleBlocks`);let e=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);let t=this.startNodeAt(this.state.endLoc);this.next();let n=this.initializeScopes(!0);this.enterInitialScopes();try{e.body=this.parseProgram(t,8,`module`)}finally{n()}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,n){if(t!=null&&this.match(88)){let n=this.lookaheadCharCode();if(n===44||n===(e===3?93:e===8?125:41)||n===61)return this.parseMaybeDefault(this.state.startLoc,this.parseVoidPattern(t))}return this.parseMaybeAssignAllowIn(t,n)}parsePropertyNamePrefixOperator(e){}};let pn={kind:1},mn={kind:2},hn=/[\uD800-\uDFFF]/u,gn=/in(?:stanceof)?/y;function _n(e,t,n){for(let r=0;r<e.length;r++){let a=e[r],{type:o}=a;if(typeof o==`number`){if(o===139){let{loc:t,start:n,value:o,end:s}=a,c=n+1,l=i(t.start,1);e.splice(r,1,new U({type:N(27),value:`#`,start:n,end:c,startLoc:t.start,endLoc:l}),new U({type:N(132),value:o,start:c,end:s,startLoc:l,endLoc:t.end})),r++;continue}if(Ee(o)){let{loc:s,start:c,value:l,end:u}=a,d=c+1,f=i(s.start,1),p;p=t.charCodeAt(c-n)===96?new U({type:N(22),value:"`",start:c,end:d,startLoc:s.start,endLoc:f}):new U({type:N(8),value:`}`,start:c,end:d,startLoc:s.start,endLoc:f});let m,h,g,_;o===24?(h=u-1,g=i(s.end,-1),m=l===null?null:l.slice(1,-1),_=new U({type:N(22),value:"`",start:h,end:u,startLoc:g,endLoc:s.end})):(h=u-2,g=i(s.end,-2),m=l===null?null:l.slice(1,-2),_=new U({type:N(23),value:"${",start:h,end:u,startLoc:g,endLoc:s.end})),e.splice(r,1,p,new U({type:N(20),value:m,start:d,end:h,startLoc:f,endLoc:g}),_),r+=2;continue}a.type=N(o)}}return e}var vn=class extends fn{parseTopLevel(e,t){return e.program=this.parseProgram(t,140,this.options.sourceType===`module`?`module`:`script`),e.comments=this.comments,this.optionFlags&256&&(e.tokens=_n(this.tokens,this.input,this.startIndex)),this.finishNode(e,`File`)}parseProgram(e,t,n){if(e.sourceType=n,e.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(e,!0,!0,t),this.inModule){if(!(this.optionFlags&64)&&this.scope.undefinedExports.size>0)for(let[e,t]of Array.from(this.scope.undefinedExports))this.raise(v.ModuleExportUndefined,t,{localName:e});this.addExtra(e,`topLevelAwait`,this.state.hasTopLevelAwait)}let r;return r=t===140?this.finishNode(e,`Program`):this.finishNodeAt(e,`Program`,i(this.state.startLoc,-1)),r}stmtToDirective(e){let t=this.castNodeTo(e,`Directive`),n=this.castNodeTo(e.expression,`DirectiveLiteral`),r=n.value,i=this.input.slice(this.offsetToSourcePos(n.start),this.offsetToSourcePos(n.end)),a=n.value=i.slice(1,-1);return this.addExtra(n,`raw`,i),this.addExtra(n,`rawValue`,a),this.addExtra(n,`expressionValue`,r),t.value=n,delete e.expression,t}parseInterpreterDirective(){if(!this.match(28))return null;let e=this.startNode();return e.value=this.state.value,this.next(),this.finishNode(e,`InterpreterDirective`)}isLet(){return this.isContextual(100)?this.hasFollowingBindingAtom():!1}isUsing(){return this.isContextual(107)?this.nextTokenIsIdentifierOnSameLine():!1}isForUsing(){if(!this.isContextual(107))return!1;let e=this.nextTokenInLineStart(),t=this.codePointAtPos(e);if(this.isUnparsedContextual(e,`of`)){let t=this.lookaheadCharCodeSince(e+2);if(t!==61&&t!==58&&t!==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(96))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(Me(e)){if(gn.lastIndex=t,gn.test(this.input)){let e=this.codePointAtPos(gn.lastIndex);if(!Ne(e)&&e!==92)return!1}return!0}else if(e===92)return!0;else return!1}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(26)&&(t=this.parseDecorators(!0)),this.parseStatementContent(e,t)}parseStatementContent(e,t){let n=this.state.type,r=this.startNode(),i=!!(e&2),a=!!(e&4),o=e&1;switch(n){case 60:return this.parseBreakContinueStatement(r,!0);case 63:return this.parseBreakContinueStatement(r,!1);case 64:return this.parseDebuggerStatement(r);case 90:return this.parseDoWhileStatement(r);case 91:return this.parseForStatement(r);case 68:if(this.lookaheadCharCode()===46)break;return a||this.raise(this.state.strict?v.StrictFunction:this.options.annexB?v.SloppyFunctionAnnexB:v.SloppyFunction,this.state.startLoc),this.parseFunctionStatement(r,!1,!i&&a);case 80:return i||this.unexpected(),this.parseClass(this.maybeTakeDecorators(t,r),!0);case 69:return this.parseIfStatement(r);case 70:return this.parseReturnStatement(r);case 71:return this.parseSwitchStatement(r);case 72:return this.parseThrowStatement(r);case 73:return this.parseTryStatement(r);case 96:if(this.isAwaitUsing())return this.allowsUsing()?i?this.recordAwaitIfAllowed()||this.raise(v.AwaitUsingNotInAsyncContext,r):this.raise(v.UnexpectedLexicalDeclaration,r):this.raise(v.UnexpectedUsingDeclaration,r),this.next(),this.parseVarStatement(r,`await using`);break;case 107:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifierOrBrace())break;return this.allowsUsing()?i||this.raise(v.UnexpectedLexicalDeclaration,this.state.startLoc):this.raise(v.UnexpectedUsingDeclaration,this.state.startLoc),this.parseVarStatement(r,`using`);case 100:{if(this.state.containsEsc)break;let e=this.nextTokenStart(),t=this.codePointAtPos(e);if(t!==91&&(!i&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(t,e)&&t!==123))break}case 75:i||this.raise(v.UnexpectedLexicalDeclaration,this.state.startLoc);case 74:{let e=this.state.value;return this.parseVarStatement(r,e)}case 92:return this.parseWhileStatement(r);case 76:return this.parseWithStatement(r);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(r);case 83:{let e=this.lookaheadCharCode();if(e===40||e===46)break}case 82:{!(this.optionFlags&8)&&!o&&this.raise(v.UnexpectedImportExport,this.state.startLoc),this.next();let e;return e=n===83?this.parseImport(r):this.parseExport(r,t),this.assertModuleNodeAllowed(e),e}default:if(this.isAsyncFunction())return i||this.raise(v.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(r,!0,!i&&a)}let s=this.state.value,c=this.parseExpression();return A(n)&&c.type===`Identifier`&&this.eat(14)?this.parseLabeledStatement(r,s,c,e):this.parseExpressionStatement(r,c,t)}assertModuleNodeAllowed(e){!(this.optionFlags&8)&&!this.inModule&&this.raise(v.ImportOutsideModule,e)}decoratorsEnabledBeforeExport(){return this.hasPlugin(`decorators-legacy`)?!0:this.hasPlugin(`decorators`)&&this.getPluginOption(`decorators`,`decoratorsBeforeExport`)!==!1}maybeTakeDecorators(e,t,n){if(e){var r;(r=t.decorators)!=null&&r.length?(typeof this.getPluginOption(`decorators`,`decoratorsBeforeExport`)!=`boolean`&&this.raise(v.DecoratorsBeforeAfterExport,t.decorators[0]),t.decorators.unshift(...e)):t.decorators=e,this.resetStartLocationFromNode(t,e[0]),n&&this.resetStartLocationFromNode(n,t)}return t}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(e){let t=[];do t.push(this.parseDecorator());while(this.match(26));if(this.match(82))e||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(v.DecoratorExportClass,this.state.startLoc);else if(!this.canHaveLeadingDecorator())throw this.raise(v.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,n;if(this.match(10)){let t=this.state.startLoc;this.next(),n=this.parseExpression(),this.expect(11),n=this.wrapParenthesis(t,n);let r=this.state.startLoc;e.expression=this.parseMaybeDecoratorArguments(n,t),this.getPluginOption(`decorators`,`allowCallParenthesized`)===!1&&e.expression!==n&&this.raise(v.DecoratorArgumentsOutsideParentheses,r)}else{for(n=this.parseIdentifier(!1);this.eat(16);){let e=this.startNodeAt(t);e.object=n,this.match(139)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),e.property=this.parsePrivateName()):e.property=this.parseIdentifier(!0),e.computed=!1,n=this.finishNode(e,`MemberExpression`)}e.expression=this.parseMaybeDecoratorArguments(n,t)}}else e.expression=this.parseExprSubscripts();return this.finishNode(e,`Decorator`)}parseMaybeDecoratorArguments(e,t){if(this.eat(10)){let n=this.startNodeAt(t);return n.callee=e,n.arguments=this.parseCallExpressionArguments(),this.toReferencedList(n.arguments),this.finishNode(n,`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 n;for(n=0;n<this.state.labels.length;++n){let r=this.state.labels[n];if((e.label==null||r.name===e.label.name)&&(r.kind!=null&&(t||r.kind===1)||e.label&&t))break}if(n===this.state.labels.length){let n=t?`BreakStatement`:`ContinueStatement`;this.raise(v.IllegalBreakContinue,e,{type:n})}}parseDebuggerStatement(e){return this.next(),this.semicolon(),this.finishNode(e,`DebuggerStatement`)}parseHeaderExpression(){this.expect(10);let e=this.parseExpression();return this.expect(11),e}parseDoWhileStatement(e){return this.next(),this.state.labels.push(pn),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.expect(92),e.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(e,`DoWhileStatement`)}parseForStatement(e){this.next(),this.state.labels.push(pn);let t=null;if(this.isContextual(96)&&this.recordAwaitIfAllowed()&&(t=this.state.startLoc,this.next()),this.scope.enter(0),this.expect(10),this.match(13))return t!==null&&this.unexpected(t),this.parseFor(e,null);let n=this.isContextual(100);{let r=this.isAwaitUsing(),i=r||this.isForUsing(),a=n&&this.hasFollowingBindingAtom()||i;if(this.match(74)||this.match(75)||a){let n=this.startNode(),a;r?(a=`await using`,this.recordAwaitIfAllowed()||this.raise(v.AwaitUsingNotInAsyncContext,this.state.startLoc),this.next()):a=this.state.value,this.next(),this.parseVar(n,!0,a);let o=this.finishNode(n,`VariableDeclaration`),s=this.match(58);return s&&i&&this.raise(v.ForInUsing,o),(s||this.isContextual(102))&&o.declarations.length===1?this.parseForIn(e,o,t):(t!==null&&this.unexpected(t),this.parseFor(e,o))}}let r=this.isContextual(95),i=new Vt,a=this.parseExpression(!0,i),o=this.isContextual(102);if(o&&(n&&this.raise(v.ForOfLet,a),t===null&&r&&a.type===`Identifier`&&this.raise(v.ForOfAsync,a)),o||this.match(58)){this.checkDestructuringPrivate(i),this.toAssignable(a,!0);let n=o?`ForOfStatement`:`ForInStatement`;return this.checkLVal(a,{type:n}),this.parseForIn(e,a,t)}else this.checkExpressionErrors(i,!0);return t!==null&&this.unexpected(t),this.parseFor(e,a)}parseFunctionStatement(e,t,n){return this.next(),this.parseFunction(e,1|(n?2:0)|(t?8:0))}parseIfStatement(e){return this.next(),e.test=this.parseHeaderExpression(),e.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),e.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(e,`IfStatement`)}parseReturnStatement(e){return this.prodParam.hasReturn||this.raise(v.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(5),this.state.labels.push(mn),this.scope.enter(256);let n;for(let e;!this.match(8);)if(this.match(61)||this.match(65)){let r=this.match(61);n&&this.finishNode(n,`SwitchCase`),t.push(n=this.startNode()),n.consequent=[],this.next(),r?n.test=this.parseExpression():(e&&this.raise(v.MultipleDefaultsInSwitch,this.state.lastTokStartLoc),e=!0,n.test=null),this.expect(14)}else n?n.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),n&&this.finishNode(n,`SwitchCase`),this.next(),this.state.labels.pop(),this.finishNode(e,`SwitchStatement`)}parseThrowStatement(e){return this.next(),this.hasPrecedingLineBreak()&&this.raise(v.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(62)){let t=this.startNode();this.next(),this.match(10)?(this.expect(10),t.param=this.parseCatchClauseParam(),this.expect(11)):(t.param=null,this.scope.enter(0)),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseBlock(!1,!1)),this.scope.exit(),e.handler=this.finishNode(t,`CatchClause`)}return e.finalizer=this.eat(67)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(v.NoCatchOrFinally,e),this.finishNode(e,`TryStatement`)}parseVarStatement(e,t,n=!1){return this.next(),this.parseVar(e,!1,t,n),this.semicolon(),this.finishNode(e,`VariableDeclaration`)}parseWhileStatement(e){return this.next(),e.test=this.parseHeaderExpression(),this.state.labels.push(pn),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.finishNode(e,`WhileStatement`)}parseWithStatement(e){return this.state.strict&&this.raise(v.StrictWith,this.state.startLoc),this.next(),e.object=this.parseHeaderExpression(),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.finishNode(e,`WithStatement`)}parseEmptyStatement(e){return this.next(),this.finishNode(e,`EmptyStatement`)}parseLabeledStatement(e,t,n,r){for(let e of this.state.labels)e.name===t&&this.raise(v.LabelRedeclaration,n,{labelName:t});let i=_e(this.state.type)?1:this.match(71)?2:null;for(let t=this.state.labels.length-1;t>=0;t--){let n=this.state.labels[t];if(n.statementStart===e.start)n.statementStart=this.sourceToOffsetPos(this.state.start),n.kind=i;else break}return this.state.labels.push({name:t,kind:i,statementStart:this.sourceToOffsetPos(this.state.start)}),e.body=r&8?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),e.label=n,this.finishNode(e,`LabeledStatement`)}parseExpressionStatement(e,t,n){return e.expression=t,this.semicolon(),this.finishNode(e,`ExpressionStatement`)}parseBlock(e=!1,t=!0,n){let r=this.startNode();return e&&this.state.strictErrors.clear(),this.expect(5),t&&this.scope.enter(0),this.parseBlockBody(r,e,!1,8,n),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,n,r,i){let a=e.body=[],o=e.directives=[];this.parseBlockOrModuleBlockBody(a,t?o:void 0,n,r,i)}parseBlockOrModuleBlockBody(e,t,n,r,i){let a=this.state.strict,o=!1,s=!1;for(;!this.match(r);){let r=n?this.parseModuleItem():this.parseStatementListItem();if(t&&!s){if(this.isValidDirective(r)){let e=this.stmtToDirective(r);t.push(e),!o&&e.value.value===`use strict`&&(o=!0,this.setStrict(!0));continue}s=!0,this.state.strictErrors.clear()}e.push(r)}i?.call(this,o),a||this.setStrict(!1),this.next()}parseFor(e,t){return e.init=t,this.semicolon(!1),e.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),e.update=this.match(11)?null:this.parseExpression(),this.expect(11),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,`ForStatement`)}parseForIn(e,t,n){let r=this.match(58);return this.next(),r?n!==null&&this.unexpected(n):e.await=n!==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(v.ForInOfLoopInitializer,t,{type:r?`ForInStatement`:`ForOfStatement`}),t.type===`AssignmentPattern`&&this.raise(v.InvalidLhs,t,{ancestor:{type:`ForStatement`}}),e.left=t,e.right=r?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,r?`ForInStatement`:`ForOfStatement`)}parseVar(e,t,n,r=!1){let i=e.declarations=[];for(e.kind=n;;){let e=this.startNode();if(this.parseVarId(e,n),e.init=this.eat(29)?t?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,e.init===null&&!r&&(e.id.type!==`Identifier`&&!(t&&(this.match(58)||this.isContextual(102)))?this.raise(v.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:`destructuring`}):(n===`const`||n===`using`||n===`await using`)&&!(this.match(58)||this.isContextual(102))&&this.raise(v.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:n})),i.push(this.finishNode(e,`VariableDeclarator`)),!this.eat(12))break}return e}parseVarId(e,t){let n=this.parseBindingAtom();t===`using`||t===`await using`?(n.type===`ArrayPattern`||n.type===`ObjectPattern`)&&this.raise(v.UsingDeclarationHasBindingPattern,n.loc.start):n.type===`VoidPattern`&&this.raise(v.UnexpectedVoidPattern,n.loc.start),this.checkLVal(n,{type:`VariableDeclarator`},t===`var`?5:8201),e.id=n}parseAsyncFunctionExpression(e){return this.parseFunction(e,8)}parseFunction(e,t=0){let n=t&2,r=!!(t&1),i=r&&!(t&4),a=!!(t&8);this.initFunction(e,a),this.match(55)&&(n&&this.raise(v.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),e.generator=!0),r&&(e.id=this.parseFunctionId(i));let o=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(514),this.prodParam.enter(gt(a,e.generator)),r||(e.id=this.parseFunctionId()),this.parseFunctionParams(e,!1),this.withSmartMixTopicForbiddingContext(()=>{this.parseFunctionBodyAndFinish(e,r?`FunctionDeclaration`:`FunctionExpression`)}),this.prodParam.exit(),this.scope.exit(),r&&!n&&this.registerFunctionStatementId(e),this.state.maybeInArrowParameters=o,e}parseFunctionId(e){return e||A(this.state.type)?this.parseIdentifier():null}parseFunctionParams(e,t){this.expect(10),this.expressionScope.enter(It()),e.params=this.parseBindingList(11,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.loc.start)}parseClass(e,t,n){this.next();let r=this.state.strict;return this.state.strict=!0,this.parseClassId(e,t,n),this.parseClassSuper(e),e.body=this.parseClassBody(!!e.superClass,r),this.finishNode(e,t?`ClassDeclaration`:`ClassExpression`)}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}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 n={hadConstructor:!1,hadSuperClass:e},r=[],i=this.startNode();if(i.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext(()=>{for(;!this.match(8);){if(this.eat(13)){if(r.length>0)throw this.raise(v.DecoratorSemicolon,this.state.lastTokEndLoc);continue}if(this.match(26)){r.push(this.parseDecorator());continue}let e=this.startNode();r.length&&(e.decorators=r,this.resetStartLocationFromNode(e,r[0]),r=[]),this.parseClassMember(i,e,n),e.kind===`constructor`&&e.decorators&&e.decorators.length>0&&this.raise(v.DecoratorConstructor,e)}}),this.state.strict=t,this.next(),r.length)throw this.raise(v.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(i,`ClassBody`)}parseClassMemberFromModifier(e,t){let n=this.parseIdentifier(!0);if(this.isClassMethod()){let r=t;return r.kind=`method`,r.computed=!1,r.key=n,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=n,r.static=!1,e.body.push(this.parseClassProperty(r)),!0}return this.resetPreviousNodeTrailingComments(n),!1}parseClassMember(e,t,n){let r=this.isContextual(106);if(r){if(this.parseClassMemberFromModifier(e,t))return;if(this.eat(5)){this.parseClassStaticBlock(e,t);return}}this.parseClassMemberWithIsStatic(e,t,n,r)}parseClassMemberWithIsStatic(e,t,n,r){let i=t,a=t,o=t,s=t,c=t,l=i,u=i;if(t.static=r,this.parsePropertyNamePrefixOperator(t),this.eat(55)){l.kind=`method`;let t=this.match(139);if(this.parseClassElementName(l),this.parsePostMemberNameModifiers(l),t){this.pushClassPrivateMethod(e,a,!0,!1);return}this.isNonstaticConstructor(i)&&this.raise(v.ConstructorIsGenerator,i.key),this.pushClassMethod(e,i,!0,!1,!1,!1);return}let d=!this.state.containsEsc&&A(this.state.type),f=this.parseClassElementName(t),p=d?f.name:null,m=this.isPrivateName(f),h=this.state.startLoc;if(this.parsePostMemberNameModifiers(u),this.isClassMethod()){if(l.kind=`method`,m){this.pushClassPrivateMethod(e,a,!1,!1);return}let r=this.isNonstaticConstructor(i),o=!1;r&&(i.kind=`constructor`,n.hadConstructor&&!this.hasPlugin(`typescript`)&&this.raise(v.DuplicateConstructor,f),r&&this.hasPlugin(`typescript`)&&t.override&&this.raise(v.OverrideOnConstructor,f),n.hadConstructor=!0,o=n.hadSuperClass),this.pushClassMethod(e,i,!1,!1,r,o)}else if(this.isClassProperty())m?this.pushClassPrivateProperty(e,s):this.pushClassProperty(e,o);else if(p===`async`&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(f);let t=this.eat(55);u.optional&&this.unexpected(h),l.kind=`method`;let n=this.match(139);this.parseClassElementName(l),this.parsePostMemberNameModifiers(u),n?this.pushClassPrivateMethod(e,a,t,!0):(this.isNonstaticConstructor(i)&&this.raise(v.ConstructorIsAsync,i.key),this.pushClassMethod(e,i,t,!0,!1,!1))}else if((p===`get`||p===`set`)&&!(this.match(55)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(f),l.kind=p;let t=this.match(139);this.parseClassElementName(i),t?this.pushClassPrivateMethod(e,a,!1,!1):(this.isNonstaticConstructor(i)&&this.raise(v.ConstructorIsAccessor,i.key),this.pushClassMethod(e,i,!1,!1,!1,!1)),this.checkGetterSetterParams(i)}else if(p===`accessor`&&!this.isLineTerminator()){this.expectPlugin(`decoratorAutoAccessors`),this.resetPreviousNodeTrailingComments(f);let t=this.match(139);this.parseClassElementName(o),this.pushClassAccessorProperty(e,c,t)}else this.isLineTerminator()?m?this.pushClassPrivateProperty(e,s):this.pushClassProperty(e,o):this.unexpected()}parseClassElementName(e){let{type:t,value:n}=this.state;if((t===132||t===134)&&e.static&&n===`prototype`&&this.raise(v.StaticPrototype,this.state.startLoc),t===139){n===`constructor`&&this.raise(v.ConstructorClassPrivateField,this.state.startLoc);let t=this.parsePrivateName();return e.key=t,t}return this.parsePropertyName(e),e.key}parseClassStaticBlock(e,t){var n;this.scope.enter(720);let r=this.state.labels;this.state.labels=[],this.prodParam.enter(0);let i=t.body=[];this.parseBlockOrModuleBlockBody(i,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=r,e.body.push(this.finishNode(t,`StaticBlock`)),(n=t.decorators)!=null&&n.length&&this.raise(v.DecoratorStaticBlock,t)}pushClassProperty(e,t){!t.computed&&this.nameIsConstructor(t.key)&&this.raise(v.ConstructorClassField,t.key),e.body.push(this.parseClassProperty(t))}pushClassPrivateProperty(e,t){let n=this.parseClassPrivateProperty(t);e.body.push(n),this.classScope.declarePrivateName(this.getPrivateNameSV(n.key),0,n.key.loc.start)}pushClassAccessorProperty(e,t,n){!n&&!t.computed&&this.nameIsConstructor(t.key)&&this.raise(v.ConstructorClassField,t.key);let r=this.parseClassAccessorProperty(t);e.body.push(r),n&&this.classScope.declarePrivateName(this.getPrivateNameSV(r.key),0,r.key.loc.start)}pushClassMethod(e,t,n,r,i,a){e.body.push(this.parseMethod(t,n,r,i,a,`ClassMethod`,!0))}pushClassPrivateMethod(e,t,n,r){let i=this.parseMethod(t,n,r,!1,!1,`ClassPrivateMethod`,!0);e.body.push(i);let a=i.kind===`get`?i.static?6:2:i.kind===`set`?i.static?5:1:0;this.declareClassPrivateMethodInScope(i,a)}declareClassPrivateMethodInScope(e,t){this.classScope.declarePrivateName(this.getPrivateNameSV(e.key),t,e.key.loc.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(zt()),this.prodParam.enter(0),e.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(e,t,n,r=8331){if(A(this.state.type))e.id=this.parseIdentifier(),t&&this.declareNameFromIdentifier(e.id,r);else if(n||!t)e.id=null;else throw this.raise(v.MissingClassName,this.state.startLoc)}parseClassSuper(e){e.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(e,t){let n=this.parseMaybeImportPhase(e,!0),r=this.maybeParseExportDefaultSpecifier(e,n),i=!r||this.eat(12),a=i&&this.eatExportStar(e),o=a&&this.maybeParseExportNamespaceSpecifier(e),s=i&&(!o||this.eat(12)),c=r||a;if(a&&!o){if(r&&this.unexpected(),t)throw this.raise(v.UnsupportedDecoratorExport,e);return this.parseExportFrom(e,!0),this.sawUnambiguousESM=!0,this.finishNode(e,`ExportAllDeclaration`)}let l=this.maybeParseExportNamedSpecifiers(e);r&&i&&!a&&!l&&this.unexpected(null,5),o&&s&&this.unexpected(null,98);let u;if(c||l){if(u=!1,t)throw this.raise(v.UnsupportedDecoratorExport,e);this.parseExportFrom(e,c)}else u=this.maybeParseExportDeclaration(e);if(c||l||u){let n=e;if(this.checkExport(n,!0,!1,!!n.source),n.declaration?.type===`ClassDeclaration`)this.maybeTakeDecorators(t,n.declaration,n);else if(t)throw this.raise(v.UnsupportedDecoratorExport,e);return this.sawUnambiguousESM=!0,this.finishNode(n,`ExportNamedDeclaration`)}if(this.eat(65)){let n=e,r=this.parseExportDefaultExpression();if(n.declaration=r,r.type===`ClassDeclaration`)this.maybeTakeDecorators(t,r,n);else if(t)throw this.raise(v.UnsupportedDecoratorExport,e);return this.checkExport(n,!0,!0),this.sawUnambiguousESM=!0,this.finishNode(n,`ExportDefaultDeclaration`)}throw this.unexpected(null,5)}eatExportStar(e){return this.eat(55)}maybeParseExportDefaultSpecifier(e,t){if(t||this.isExportDefaultSpecifier()){this.expectPlugin(`exportDefaultFrom`,t?.loc.start);let n=t||this.parseIdentifier(!0),r=this.startNodeAtNode(n);return r.exported=n,e.specifiers=[this.finishNode(r,`ExportDefaultSpecifier`)],!0}return!1}maybeParseExportNamespaceSpecifier(e){if(this.isContextual(93)){var t;(t=e).specifiers??(t.specifiers=[]);let n=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),n.exported=this.parseModuleExportName(),e.specifiers.push(this.finishNode(n,`ExportNamespaceSpecifier`)),!0}return!1}maybeParseExportNamedSpecifiers(e){if(this.match(5)){let t=e;t.specifiers||=[];let n=t.exportKind===`type`;return t.specifiers.push(...this.parseExportSpecifiers(n)),t.source=null,this.hasPlugin(`importAssertions`)?t.assertions=[]:t.attributes=[],t.declaration=null,!0}return!1}maybeParseExportDeclaration(e){return this.shouldParseExportDeclaration()?(e.specifiers=[],e.source=null,this.hasPlugin(`importAssertions`)?e.assertions=[]:e.attributes=[],e.declaration=this.parseExportDeclaration(e),!0):!1}isAsyncFunction(){if(!this.isContextual(95))return!1;let e=this.nextTokenInLineStart();return this.isUnparsedContextual(e,`function`)}parseExportDefaultExpression(){let e=this.startNode();if(this.match(68))return this.next(),this.parseFunction(e,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(e,13);if(this.match(80))return this.parseClass(e,!0,!0);if(this.match(26))return this.hasPlugin(`decorators`)&&this.getPluginOption(`decorators`,`decoratorsBeforeExport`)===!0&&this.raise(v.DecoratorBeforeExport,this.state.startLoc),this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0);if(this.match(75)||this.match(74)||this.isLet()||this.isUsing()||this.isAwaitUsing())throw this.raise(v.UnsupportedDefaultExport,this.state.startLoc);let t=this.parseMaybeAssignAllowIn();return this.semicolon(),t}parseExportDeclaration(e){return this.match(80)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){let{type:e}=this.state;if(A(e)){if(e===95&&!this.state.containsEsc||e===100)return!1;if((e===130||e===129)&&!this.state.containsEsc){let e=this.nextTokenStart(),t=this.input.charCodeAt(e);if(t===123||this.chStartsBindingIdentifier(t,e)&&!this.input.startsWith(`from`,e))return this.expectOnePlugin([`flow`,`typescript`]),!1}}else if(!this.match(65))return!1;let t=this.nextTokenStart(),n=this.isUnparsedContextual(t,`from`);if(this.input.charCodeAt(t)===44||A(this.state.type)&&n)return!0;if(this.match(65)&&n){let e=this.input.charCodeAt(this.nextTokenStartSince(t+4));return e===34||e===39}return!1}parseExportFrom(e,t){this.eatContextual(98)?(e.source=this.parseImportSource(),this.checkExport(e),this.maybeParseImportAttributes(e),this.checkJSONModuleImport(e)):t&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){let{type:e}=this.state;return e===26&&(this.expectOnePlugin([`decorators`,`decorators-legacy`]),this.hasPlugin(`decorators`))?(this.getPluginOption(`decorators`,`decoratorsBeforeExport`)===!0&&this.raise(v.DecoratorBeforeExport,this.state.startLoc),!0):this.isUsing()||this.isAwaitUsing()?(this.raise(v.UsingDeclarationExport,this.state.startLoc),!0):e===74||e===75||e===68||e===80||this.isLet()||this.isAsyncFunction()}checkExport(e,t,n,r){if(t){var i;if(n){if(this.checkDuplicateExports(e,`default`),this.hasPlugin(`exportDefaultFrom`)){var a;let t=e.declaration;t.type===`Identifier`&&t.name===`from`&&t.end-t.start===4&&!((a=t.extra)!=null&&a.parenthesized)&&this.raise(v.ExportDefaultFromAsIdentifier,t)}}else if((i=e.specifiers)!=null&&i.length)for(let t of e.specifiers){let{exported:e}=t,n=e.type===`Identifier`?e.name:e.value;if(this.checkDuplicateExports(t,n),!r&&t.local){let{local:e}=t;e.type===`Identifier`?(this.checkReservedWord(e.name,e.loc.start,!0,!1),this.scope.checkLocalExport(e)):this.raise(v.ExportBindingIsString,t,{localName:e.value,exportName:n})}}else if(e.declaration){let t=e.declaration;if(t.type===`FunctionDeclaration`||t.type===`ClassDeclaration`){let{id:n}=t;if(!n)throw Error(`Assertion failure`);this.checkDuplicateExports(e,n.name)}else if(t.type===`VariableDeclaration`)for(let e of t.declarations)this.checkDeclaration(e.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(v.DuplicateDefaultExport,e):this.raise(v.DuplicateExport,e,{exportName:t})),this.exportedIdentifiers.add(t)}parseExportSpecifiers(e){let t=[],n=!0;for(this.expect(5);!this.eat(8);){if(n)n=!1;else if(this.expect(12),this.eat(8))break;let r=this.isContextual(130),i=this.match(134),a=this.startNode();a.local=this.parseModuleExportName(),t.push(this.parseExportSpecifier(a,i,e,r))}return t}parseExportSpecifier(e,t,n,r){return this.eatContextual(93)?e.exported=this.parseModuleExportName():t?e.exported=this.cloneStringLiteral(e.local):e.exported||=this.cloneIdentifier(e.local),this.finishNode(e,`ExportSpecifier`)}parseModuleExportName(){if(this.match(134)){let e=this.parseStringLiteral(this.state.value),t=hn.exec(e.value);return t&&this.raise(v.ModuleExportNameHasLoneSurrogate,e,{surrogateCharCode:t[0].charCodeAt(0)}),e}return this.parseIdentifier(!0)}isJSONModuleImport(e){return e.assertions==null?!1:e.assertions.some(({key:e,value:t})=>t.value===`json`&&(e.type===`Identifier`?e.name===`type`:e.value===`type`))}checkImportReflection(e){let{specifiers:t}=e,n=t.length===1?t[0].type:null;e.phase===`source`?n!==`ImportDefaultSpecifier`&&this.raise(v.SourcePhaseImportRequiresDefault,t[0].loc.start):e.phase===`defer`?n!==`ImportNamespaceSpecifier`&&this.raise(v.DeferImportRequiresNamespace,t[0].loc.start):e.module&&(n!==`ImportDefaultSpecifier`&&this.raise(v.ImportReflectionNotBinding,t[0].loc.start),e.assertions?.length>0&&this.raise(v.ImportReflectionHasAssertion,t[0].loc.start))}checkJSONModuleImport(e){if(this.isJSONModuleImport(e)&&e.type!==`ExportAllDeclaration`){let{specifiers:t}=e;if(t!=null){let e=t.find(e=>{let t;if(e.type===`ExportSpecifier`?t=e.local:e.type===`ImportSpecifier`&&(t=e.imported),t!==void 0)return t.type===`Identifier`?t.name!==`default`:t.value!==`default`});e!==void 0&&this.raise(v.ImportJSONBindingNotDefault,e.loc.start)}}}isPotentialImportPhase(e){return e?!1:this.isContextual(105)||this.isContextual(97)||this.isContextual(127)}applyImportPhase(e,t,n,r){t||(n===`module`?(this.expectPlugin(`importReflection`,r),e.module=!0):this.hasPlugin(`importReflection`)&&(e.module=!1),n===`source`?(this.expectPlugin(`sourcePhaseImports`,r),e.phase=`source`):n===`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 n=this.startNode(),r=this.parseIdentifierName(!0),{type:i}=this.state;return(j(i)?i!==98||this.lookaheadCharCode()===102:i!==12)?(this.applyImportPhase(e,t,r,n.loc.start),null):(this.applyImportPhase(e,t,null),this.createIdentifier(n,r))}isPrecedingIdImportPhase(e){let{type:t}=this.state;return A(t)?t!==98||this.lookaheadCharCode()===102:t!==12}parseImport(e){return this.match(134)?this.parseImportSourceAndAttributes(e):this.parseImportSpecifiersAndAfter(e,this.parseMaybeImportPhase(e,!1))}parseImportSpecifiersAndAfter(e,t){e.specifiers=[];let n=!this.maybeParseDefaultImportSpecifier(e,t)||this.eat(12),r=n&&this.maybeParseStarImportSpecifier(e);return n&&!r&&this.parseNamedImportSpecifiers(e),this.expectContextual(98),this.parseImportSourceAndAttributes(e)}parseImportSourceAndAttributes(e){return e.specifiers??=[],e.source=this.parseImportSource(),this.maybeParseImportAttributes(e),this.checkImportReflection(e),this.checkJSONModuleImport(e),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(e,`ImportDeclaration`)}parseImportSource(){return this.match(134)||this.unexpected(),this.parseExprAtom()}parseImportSpecifierLocal(e,t,n){t.local=this.parseIdentifier(),e.specifiers.push(this.finishImportSpecifier(t,n))}finishImportSpecifier(e,t,n=8201){return this.checkLVal(e.local,{type:t},n),this.finishNode(e,t)}parseImportAttributes(){this.expect(5);let e=[],t=new Set;do{if(this.match(8))break;let n=this.startNode(),r=this.state.value;if(t.has(r)&&this.raise(v.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:r}),t.add(r),this.match(134)?n.key=this.parseStringLiteral(r):n.key=this.parseIdentifier(!0),this.expect(14),!this.match(134))throw this.raise(v.ModuleAttributeInvalidValue,this.state.startLoc);n.value=this.parseStringLiteral(this.state.value),e.push(this.finishNode(n,`ImportAttribute`))}while(this.eat(12));return this.expect(8),e}parseModuleAttributes(){let e=[],t=new Set;do{let n=this.startNode();if(n.key=this.parseIdentifier(!0),n.key.name!==`type`&&this.raise(v.ModuleAttributeDifferentFromType,n.key),t.has(n.key.name)&&this.raise(v.ModuleAttributesWithDuplicateKeys,n.key,{key:n.key.name}),t.add(n.key.name),this.expect(14),!this.match(134))throw this.raise(v.ModuleAttributeInvalidValue,this.state.startLoc);n.value=this.parseStringLiteral(this.state.value),e.push(this.finishNode(n,`ImportAttribute`))}while(this.eat(12));return e}maybeParseImportAttributes(e){let t;var n=!1;if(this.match(76)){if(this.hasPrecedingLineBreak()&&this.lookaheadCharCode()===40)return;this.next(),this.hasPlugin(`moduleAttributes`)?(t=this.parseModuleAttributes(),this.addExtra(e,`deprecatedWithLegacySyntax`,!0)):t=this.parseImportAttributes(),n=!0}else this.isContextual(94)&&!this.hasPrecedingLineBreak()?(!this.hasPlugin(`deprecatedImportAssert`)&&!this.hasPlugin(`importAssertions`)&&this.raise(v.ImportAttributesUseAssert,this.state.startLoc),this.hasPlugin(`importAssertions`)||this.addExtra(e,`deprecatedAssertSyntax`,!0),this.next(),t=this.parseImportAttributes()):t=[];!n&&this.hasPlugin(`importAssertions`)?e.assertions=t:e.attributes=t}maybeParseDefaultImportSpecifier(e,t){if(t){let n=this.startNodeAtNode(t);return n.local=t,e.specifiers.push(this.finishImportSpecifier(n,`ImportDefaultSpecifier`)),!0}else if(j(this.state.type))return this.parseImportSpecifierLocal(e,this.startNode(),`ImportDefaultSpecifier`),!0;return!1}maybeParseStarImportSpecifier(e){if(this.match(55)){let t=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(e,t,`ImportNamespaceSpecifier`),!0}return!1}parseNamedImportSpecifiers(e){let t=!0;for(this.expect(5);!this.eat(8);){if(t)t=!1;else{if(this.eat(14))throw this.raise(v.DestructureNamedImport,this.state.startLoc);if(this.expect(12),this.eat(8))break}let n=this.startNode(),r=this.match(134),i=this.isContextual(130);n.imported=this.parseModuleExportName();let a=this.parseImportSpecifier(n,r,e.importKind===`type`||e.importKind===`typeof`,i,void 0);e.specifiers.push(a)}}parseImportSpecifier(e,t,n,r,i){if(this.eatContextual(93))e.local=this.parseIdentifier();else{let{imported:n}=e;if(t)throw this.raise(v.ImportBindingIsString,e,{importName:n.value});this.checkReservedWord(n.name,e.loc.start,!0,!0),e.local||=this.cloneIdentifier(n)}return this.finishImportSpecifier(e,`ImportSpecifier`,i)}isThisParam(e){return e.type===`Identifier`&&e.name===`this`}},yn=class extends vn{constructor(e,t,n){let r=b(e);super(r,t),this.options=r,this.initializeScopes(),this.plugins=n,this.filename=r.sourceFilename,this.startIndex=r.startIndex;let i=0;r.allowAwaitOutsideFunction&&(i|=1),r.allowReturnOutsideFunction&&(i|=2),r.allowImportExportEverywhere&&(i|=8),r.allowSuperOutsideMethod&&(i|=16),r.allowUndeclaredExports&&(i|=64),r.allowNewTargetOutsideFunction&&(i|=4),r.allowYieldOutsideFunction&&(i|=32),r.ranges&&(i|=128),r.tokens&&(i|=256),r.createImportExpressions&&(i|=512),r.createParenthesizedExpressions&&(i|=1024),r.errorRecovery&&(i|=2048),r.attachComment&&(i|=4096),r.annexB&&(i|=8192),this.optionFlags=i}getScopeHandler(){return qe}parse(){this.enterInitialScopes();let e=this.startNode(),t=this.startNode();this.nextToken(),e.errors=null;let n=this.parseTopLevel(e,t);return n.errors=this.state.errors,n.comments.length=this.state.commentsLen,n}};function bn(e,t){if(t?.sourceType===`unambiguous`){t=Object.assign({},t);try{t.sourceType=`module`;let n=q(t,e),r=n.parse();if(n.sawUnambiguousESM)return r;if(n.ambiguousScriptDifferentAst)try{return t.sourceType=`script`,q(t,e).parse()}catch{}else r.program.sourceType=`script`;return r}catch(n){try{return t.sourceType=`script`,q(t,e).parse()}catch{}throw n}}else return q(t,e).parse()}function xn(e){let t={};for(let n of Object.keys(e))t[n]=N(e[n]);return t}xn(ue);function q(e,t){let n=yn,r=new Map;if(e!=null&&e.plugins){for(let t of e.plugins){let e,n;typeof t==`string`?e=t:[e,n]=t,r.has(e)||r.set(e,n||{})}ln(r),n=Cn(r)}return new n(e,t,r)}let Sn=new Map;function Cn(e){let t=[];for(let n of dn)e.has(n)&&t.push(n);let n=t.join(`|`),r=Sn.get(n);if(!r){r=yn;for(let e of t)r=un[e](r);Sn.set(n,r)}return r}e.parse=bn}))(),1),i=Object.create,a=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,c=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,u=(e,t)=>function(){return t||(0,e[s(e)[0]])((t={exports:{}}).exports,t),t.exports},d=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=s(t),c=0,u=i.length,d;c<u;c++)d=i[c],!l.call(e,d)&&d!==n&&a(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(r=o(t,d))||r.enumerable});return e},f=(e,t,n)=>(n=e==null?{}:i(c(e)),d(t||!e||!e.__esModule?a(n,`default`,{value:e,enumerable:!0}):n,e));function p(e){var t=e.use(C),n=t.Type,r=t.builtInTypes,i=r.number;function a(e){return n.from(t=>i.check(t)&&t>=e,i+` >= `+e)}let o={null:function(){return null},emptyArray:function(){return[]},false:function(){return!1},true:function(){return!0},undefined:function(){},"use strict":function(){return`use strict`}};var s=n.or(r.string,r.number,r.boolean,r.null,r.undefined);return{geq:a,defaults:o,isPrimitive:n.from(e=>{if(e===null)return!0;var t=typeof e;return!(t===`object`||t===`function`)},s.toString())}}const m=Object.prototype,h=m.toString,g=m.hasOwnProperty;var _=class{assert(e,t){if(!this.check(e,t)){var n=ne(e);throw Error(n+` does not match type `+this)}return!0}arrayOf(){return new v(this)}},v=class extends _{kind=`ArrayType`;constructor(e){super(),this.elemType=e}toString(){return`[`+this.elemType+`]`}check(e,t){return Array.isArray(e)&&e.every(e=>this.elemType.check(e,t))}},y=class extends _{kind=`IdentityType`;constructor(e){super(),this.value=e}toString(){return String(this.value)}check(e,t){let n=e===this.value;return!n&&typeof t==`function`&&t(this,e),n}},b=class extends _{kind=`ObjectType`;constructor(e){super(),this.fields=e}toString(){return`{ `+this.fields.join(`, `)+` }`}check(e,t){return h.call(e)===h.call({})&&this.fields.every(n=>n.type.check(e[n.name],t))}},ee=class extends _{kind=`OrType`;constructor(e){super(),this.types=e}toString(){return this.types.join(` | `)}check(e,t){return this.types.some(n=>n.check(e,!!t))?!0:(typeof t==`function`&&t(this,e),!1)}},x=class extends _{kind=`PredicateType`;constructor(e,t){super(),this.name=e,this.predicate=t}toString(){return this.name}check(e,t){let n=this.predicate(e,t);return!n&&typeof t==`function`&&t(this,e),n}},S=class e{baseNames=[];ownFields=Object.create(null);allSupertypes=Object.create(null);supertypeList=[];allFields=Object.create(null);fieldNames=[];finalized=!1;buildable=!1;buildParams=[];constructor(e,t){this.type=e,this.typeName=t}isSupertypeOf(t){if(t instanceof e){if(this.finalized!==!0||t.finalized!==!0)throw Error(``);return g.call(t.allSupertypes,this.typeName)}else throw Error(t+` is not a Def`)}checkAllFields(e,t){var n=this.allFields;if(this.finalized!==!0)throw Error(``+this.typeName);function r(r){var i=n[r],a=i.type,o=i.getValue(e);return a.check(o,t)}return typeof e==`object`&&!!e&&Object.keys(n).every(r)}bases(...e){var t=this.baseNames;if(this.finalized){if(e.length!==t.length)throw Error(``);for(var n=0;n<e.length;n++)if(e[n]!==t[n])throw Error(``);return this}return e.forEach(e=>{t.indexOf(e)<0&&t.push(e)}),this}},te=class{hidden;constructor(e,t,n,r){this.name=e,this.type=t,this.defaultFn=n,this.hidden=!!r}toString(){return JSON.stringify(this.name)+`: `+this.type}getValue(e){var t=e[this.name];return t===void 0&&typeof this.defaultFn==`function`&&(t=this.defaultFn.call(e)),t}};function ne(e){return Array.isArray(e)?`[`+e.map(ne).join(`, `)+`]`:e&&typeof e==`object`?`{ `+Object.keys(e).map(function(t){return t+`: `+e[t]}).join(`, `)+` }`:JSON.stringify(e)}function C(e){let t={or(...e){return new ee(e.map(e=>t.from(e)))},from(e,i){if(e instanceof v||e instanceof y||e instanceof b||e instanceof ee||e instanceof x)return e;if(e instanceof S)return e.type;if(s.check(e)){if(e.length!==1)throw Error(`only one element type is permitted for typed arrays`);return new v(t.from(e[0]))}if(c.check(e))return new b(Object.keys(e).map(n=>new te(n,t.from(e[n],n))));if(typeof e==`function`){var a=n.indexOf(e);if(a>=0)return r[a];if(typeof i!=`string`)throw Error(`missing name`);return new x(i,e)}return new y(e)},def(e){return g.call(C,e)?C[e]:C[e]=new ie(e)},hasDef(e){return g.call(C,e)}};var n=[],r=[];function i(e,t){let i=h.call(t),a=new x(e,e=>h.call(e)===i);return t&&typeof t.constructor==`function`&&(n.push(t.constructor),r.push(a)),a}let a=i(`string`,`truthy`),o=i(`function`,function(){}),s=i(`array`,[]),c=i(`object`,{}),l=i(`RegExp`,/./),u=i(`Date`,new Date),d=i(`number`,3),f=i(`boolean`,!0),p=i(`null`,null),m=i(`undefined`,void 0),_={string:a,function:o,array:s,object:c,RegExp:l,Date:u,number:d,boolean:f,null:p,undefined:m,BigInt:typeof BigInt==`function`?i(`BigInt`,BigInt(1234)):new x(`BigInt`,()=>!1)};var C=Object.create(null);function re(e){if(e&&typeof e==`object`){var t=e.type;if(typeof t==`string`&&g.call(C,t)){var n=C[t];if(n.finalized)return n}}return null}class ie extends S{constructor(e){super(new x(e,(e,t)=>this.check(e,t)),e)}check(e,t){if(this.finalized!==!0)throw Error(`prematurely checking unfinalized type `+this.typeName);if(typeof e!=`object`||!e)return!1;var n=re(e);return n?t&&n===this?this.checkAllFields(e,t):this.isSupertypeOf(n)?t?n.checkAllFields(e,t)&&this.checkAllFields(e,!1):!0:!1:this.typeName===`SourceLocation`||this.typeName===`Position`?this.checkAllFields(e,t):!1}build(...e){if(this.buildParams=e,this.buildable)return this;this.field(`type`,String,()=>this.typeName),this.buildable=!0;let t=(e,t,n,r)=>{if(!g.call(e,t)){var i=this.allFields;if(!g.call(i,t))throw Error(``+t);var a=i[t],o=a.type,s;if(r)s=n;else if(a.defaultFn)s=a.defaultFn.call(e);else{var c=`no value or default function given for field `+JSON.stringify(t)+` of `+this.typeName+`(`+this.buildParams.map(function(e){return i[e]}).join(`, `)+`)`;throw Error(c)}if(!o.check(s))throw Error(ne(s)+` does not match field `+a+` of type `+this.typeName);e[t]=s}},n=(...e)=>{var n=e.length;if(!this.finalized)throw Error(`attempting to instantiate unfinalized type `+this.typeName);var r=Object.create(D);if(this.buildParams.forEach(function(i,a){a<n?t(r,i,e[a],!0):t(r,i,null,!1)}),Object.keys(this.allFields).forEach(function(e){t(r,e,null,!1)}),r.type!==this.typeName)throw Error(``);return r};return n.from=e=>{if(!this.finalized)throw Error(`attempting to instantiate unfinalized type `+this.typeName);var n=Object.create(D);if(Object.keys(this.allFields).forEach(function(r){g.call(e,r)?t(n,r,e[r],!0):t(n,r,null,!1)}),n.type!==this.typeName)throw Error(``);return n},Object.defineProperty(E,oe(this.typeName),{enumerable:!0,value:n}),this}field(e,n,r,i){return this.finalized?(console.error(`Ignoring attempt to redefine field `+JSON.stringify(e)+` of finalized type `+JSON.stringify(this.typeName)),this):(this.ownFields[e]=new te(e,t.from(n),r,i),this)}finalize(){if(!this.finalized){var e=this.allFields,t=this.allSupertypes;for(var n in this.baseNames.forEach(n=>{var r=C[n];if(r instanceof S)r.finalize(),j(e,r.allFields),j(t,r.allSupertypes);else{var i=`unknown supertype name `+JSON.stringify(n)+` for subtype `+JSON.stringify(this.typeName);throw Error(i)}}),j(e,this.ownFields),t[this.typeName]=this,this.fieldNames.length=0,e)g.call(e,n)&&!e[n].hidden&&this.fieldNames.push(n);Object.defineProperty(ce,this.typeName,{enumerable:!0,value:this.type}),this.finalized=!0,de(this.typeName,this.supertypeList),this.buildable&&this.supertypeList.lastIndexOf(`Expression`)>=0&&A(this.typeName)}}}function w(e){if(!g.call(C,e))throw Error(``);var t=C[e];if(t.finalized!==!0)throw Error(``);return t.supertypeList.slice(1)}function T(e){for(var t={},n=Object.keys(C),r=n.length,i=0;i<r;++i){var a=n[i],o=C[a];if(o.finalized!==!0)throw Error(``+a);for(var s=0;s<o.supertypeList.length;++s){var c=o.supertypeList[s];if(g.call(e,c)){t[a]=c;break}}}return t}var E=Object.create(null),D={};function ae(e,t){var n=D[e];return m.check(t)?delete D[e]:(o.assert(t),Object.defineProperty(D,e,{enumerable:!0,configurable:!0,value:t})),n}function oe(e){return e.replace(/^[A-Z]+/,function(e){var t=e.length;switch(t){case 0:return``;case 1:return e.toLowerCase();default:return e.slice(0,t-1).toLowerCase()+e.charAt(t-1)}})}function se(e){return e=oe(e),e.replace(/(Expression)?$/,`Statement`)}var ce={};function le(e){var t=re(e);if(t)return t.fieldNames.slice(0);if(`type`in e)throw Error(`did not recognize object of type `+JSON.stringify(e.type));return Object.keys(e)}function O(e,t){var n=re(e);if(n){var r=n.allFields[t];if(r)return r.getValue(e)}return e&&e[t]}function k(e,t,n){le(e).forEach(function(n){t.call(this,n,O(e,n))},n)}function ue(e,t,n){return le(e).some(function(n){return t.call(this,n,O(e,n))},n)}function A(e){var t=se(e);if(E[t])return;var n=E[oe(e)];if(!n)return;let r=function(...e){return E.expressionStatement(n.apply(E,e))};r.from=function(...e){return E.expressionStatement(n.from.apply(E,e))},E[t]=r}function de(e,t){t.length=0,t.push(e);for(var n=Object.create(null),r=0;r<t.length;++r){e=t[r];var i=C[e];if(i.finalized!==!0)throw Error(``);g.call(n,e)&&delete t[n[e]],n[e]=r,t.push.apply(t,i.baseNames)}for(var a=0,o=a,s=t.length;o<s;++o)g.call(t,o)&&(t[a++]=t[o]);t.length=a}function j(e,t){return Object.keys(t).forEach(function(n){e[n]=t[n]}),e}function fe(){Object.keys(C).forEach(function(e){C[e].finalize()})}return{Type:t,builtInTypes:_,getSupertypeNames:w,computeSupertypeLookupTable:T,builders:E,defineMethod:ae,getBuilderName:oe,getStatementBuilderName:se,namedTypes:ce,getFieldNames:le,getFieldValue:O,eachField:k,someField:ue,finalize:fe}}var re=Object.prototype.hasOwnProperty;function ie(e){var t=e.use(C),n=t.builtInTypes.array,r=t.builtInTypes.number;let i=function e(t,n,r){if(!(this instanceof e))throw Error(`Path constructor cannot be invoked without 'new'`);if(n){if(!(n instanceof e))throw Error(``)}else n=null,r=null;this.value=t,this.parentPath=n,this.name=r,this.__childCache=null};var a=i.prototype;function o(e){return e.__childCache||=Object.create(null)}function s(e,t){var n=o(e),r=e.getValueProperty(t),i=n[t];return(!re.call(n,t)||i.value!==r)&&(i=n[t]=new e.constructor(r,e,t)),i}a.getValueProperty=function(e){return this.value[e]},a.get=function(...e){for(var t=this,n=e.length,r=0;r<n;++r)t=s(t,e[r]);return t},a.each=function(e,t){for(var n=[],r=this.value.length,i=0,i=0;i<r;++i)re.call(this.value,i)&&(n[i]=this.get(i));for(t||=this,i=0;i<r;++i)re.call(n,i)&&e.call(t,n[i])},a.map=function(e,t){var n=[];return this.each(function(t){n.push(e.call(this,t))},t),n},a.filter=function(e,t){var n=[];return this.each(function(t){e.call(this,t)&&n.push(t)},t),n};function c(){}function l(e,t,i,a){if(n.assert(e.value),t===0)return c;var s=e.value.length;if(s<1)return c;var l=arguments.length;l===2?(i=0,a=s):l===3?(i=Math.max(i,0),a=s):(i=Math.max(i,0),a=Math.min(a,s)),r.assert(i),r.assert(a);for(var u=Object.create(null),d=o(e),f=i;f<a;++f)if(re.call(e.value,f)){var p=e.get(f);if(p.name!==f)throw Error(``);var m=f+t;p.name=m,u[m]=p,delete d[f]}return delete d.length,function(){for(var t in u){var n=u[t];if(n.name!==+t)throw Error(``);d[t]=n,e.value[t]=n.value}}}a.shift=function(){var e=l(this,-1),t=this.value.shift();return e(),t},a.unshift=function(...e){var t=l(this,e.length),n=this.value.unshift.apply(this.value,e);return t(),n},a.push=function(...e){return n.assert(this.value),delete o(this).length,this.value.push.apply(this.value,e)},a.pop=function(){n.assert(this.value);var e=o(this);return delete e[this.value.length-1],delete e.length,this.value.pop()},a.insertAt=function(e){var t=arguments.length,n=l(this,t-1,e);if(n===c&&t<=1)return this;e=Math.max(e,0);for(var r=1;r<t;++r)this.value[e+r-1]=arguments[r];return n(),this},a.insertBefore=function(...e){for(var t=this.parentPath,n=e.length,r=[this.name],i=0;i<n;++i)r.push(e[i]);return t.insertAt.apply(t,r)},a.insertAfter=function(...e){for(var t=this.parentPath,n=e.length,r=[this.name+1],i=0;i<n;++i)r.push(e[i]);return t.insertAt.apply(t,r)};function u(e){if(!(e instanceof i))throw Error(``);var t=e.parentPath;if(!t)return e;var r=t.value,a=o(t);if(r[e.name]===e.value)a[e.name]=e;else if(n.check(r)){var s=r.indexOf(e.value);s>=0&&(a[e.name=s]=e)}else r[e.name]=e.value,a[e.name]=e;if(r[e.name]!==e.value||e.parentPath.get(e.name)!==e)throw Error(``);return e}return a.replace=function(e){var t=[],r=this.parentPath.value,i=o(this.parentPath),a=arguments.length;if(u(this),n.check(r)){for(var s=r.length,c=l(this.parentPath,a-1,this.name+1),d=[this.name,1],f=0;f<a;++f)d.push(arguments[f]);if(r.splice.apply(r,d)[0]!==this.value||r.length!==s-1+a)throw Error(``);if(c(),a===0)delete this.value,delete i[this.name],this.__childCache=null;else{if(r[this.name]!==e)throw Error(``);for(this.value!==e&&(this.value=e,this.__childCache=null),f=0;f<a;++f)t.push(this.parentPath.get(this.name+f));if(t[0]!==this)throw Error(``)}}else if(a===1)this.value!==e&&(this.__childCache=null),this.value=r[this.name]=e,t.push(this);else if(a===0)delete r[this.name],delete this.value,this.__childCache=null;else throw Error(`Could not replace path`);return t},i}var w=Object.prototype.hasOwnProperty;function T(e){var t=e.use(C),n=t.Type,r=t.namedTypes,i=r.Node,a=r.Expression,o=t.builtInTypes.array,s=t.builders;let c=function e(t,n){if(!(this instanceof e))throw Error(`Scope constructor cannot be invoked without 'new'`);u.check(t.value)||l.assert(t.value);var r;if(n){if(!(n instanceof e))throw Error(``);r=n.depth+1}else n=null,r=0;Object.defineProperties(this,{path:{value:t},node:{value:t.value},isGlobal:{value:!n,enumerable:!0},depth:{value:r},parent:{value:n},bindings:{value:{}},types:{value:{}}})};var l=n.or(r.Program,r.Function,r.CatchClause),u=n.or(r.Function,r.ClassDeclaration,r.ClassExpression,r.InterfaceDeclaration,r.TSInterfaceDeclaration,r.TypeAlias,r.TSTypeAliasDeclaration),d=n.or(r.TypeParameter,r.TSTypeParameter);c.isEstablishedBy=function(e){return l.check(e)||u.check(e)};var f=c.prototype;f.didScan=!1,f.declares=function(e){return this.scan(),w.call(this.bindings,e)},f.declaresType=function(e){return this.scan(),w.call(this.types,e)},f.declareTemporary=function(e){if(e){if(!/^[a-z$_]/i.test(e))throw Error(``)}else e=`t$`;e+=this.depth.toString(36)+`$`,this.scan();for(var n=0;this.declares(e+n);)++n;var r=e+n;return this.bindings[r]=t.builders.identifier(r)},f.injectTemporary=function(e,t){e||=this.declareTemporary();var n=this.path.get(`body`);return r.BlockStatement.check(n.value)&&(n=n.get(`body`)),n.unshift(s.variableDeclaration(`var`,[s.variableDeclarator(e,t||null)])),e},f.scan=function(e){if(e||!this.didScan){for(var t in this.bindings)delete this.bindings[t];for(var t in this.types)delete this.types[t];p(this.path,this.bindings,this.types),this.didScan=!0}},f.getBindings=function(){return this.scan(),this.bindings},f.getTypes=function(){return this.scan(),this.types};function p(e,t,n){var i=e.value;if(u.check(i)){let t=e.get(`typeParameters`,`params`);o.check(t.value)&&t.each(e=>{y(e,n)})}l.check(i)&&(r.CatchClause.check(i)?_(e.get(`param`),t):m(e,t,n))}function m(e,n,s){var c=e.value;e.parent&&r.FunctionExpression.check(e.parent.node)&&e.parent.node.id&&_(e.parent.get(`id`),n),c&&(o.check(c)?e.each(e=>{g(e,n,s)}):r.Function.check(c)?(e.get(`params`).each(e=>{_(e,n)}),g(e.get(`body`),n,s),m(e.get(`typeParameters`),n,s)):r.TypeAlias&&r.TypeAlias.check(c)||r.InterfaceDeclaration&&r.InterfaceDeclaration.check(c)||r.TSTypeAliasDeclaration&&r.TSTypeAliasDeclaration.check(c)||r.TSInterfaceDeclaration&&r.TSInterfaceDeclaration.check(c)?v(e.get(`id`),s):r.VariableDeclarator.check(c)?(_(e.get(`id`),n),g(e.get(`init`),n,s)):c.type===`ImportSpecifier`||c.type===`ImportNamespaceSpecifier`||c.type===`ImportDefaultSpecifier`?_(e.get(c.local?`local`:c.name?`name`:`id`),n):i.check(c)&&!a.check(c)&&t.eachField(c,function(t,r){var i=e.get(t);if(!h(i,r))throw Error(``);g(i,n,s)}))}function h(e,t){return!!(e.value===t||Array.isArray(e.value)&&e.value.length===0&&Array.isArray(t)&&t.length===0)}function g(e,t,n){var i=e.value;if(!(!i||a.check(i)))if(r.FunctionDeclaration.check(i)&&i.id!==null)_(e.get(`id`),t);else if(r.ClassDeclaration&&r.ClassDeclaration.check(i)&&i.id!==null)_(e.get(`id`),t),m(e.get(`typeParameters`),t,n);else if(r.InterfaceDeclaration&&r.InterfaceDeclaration.check(i)||r.TSInterfaceDeclaration&&r.TSInterfaceDeclaration.check(i))v(e.get(`id`),n);else if(l.check(i)){if(r.CatchClause.check(i)&&r.Identifier.check(i.param)){var o=i.param.name,s=w.call(t,o);m(e.get(`body`),t,n),s||delete t[o]}}else m(e,t,n)}function _(e,t){var n=e.value;r.Pattern.assert(n),r.Identifier.check(n)?w.call(t,n.name)?t[n.name].push(e):t[n.name]=[e]:r.AssignmentPattern&&r.AssignmentPattern.check(n)?_(e.get(`left`),t):r.ObjectPattern&&r.ObjectPattern.check(n)?e.get(`properties`).each(function(e){var n=e.value;r.Pattern.check(n)?_(e,t):r.Property.check(n)||r.ObjectProperty&&r.ObjectProperty.check(n)?_(e.get(`value`),t):r.SpreadProperty&&r.SpreadProperty.check(n)&&_(e.get(`argument`),t)}):r.ArrayPattern&&r.ArrayPattern.check(n)?e.get(`elements`).each(function(e){var n=e.value;r.Pattern.check(n)?_(e,t):r.SpreadElement&&r.SpreadElement.check(n)&&_(e.get(`argument`),t)}):r.PropertyPattern&&r.PropertyPattern.check(n)?_(e.get(`pattern`),t):(r.SpreadElementPattern&&r.SpreadElementPattern.check(n)||r.RestElement&&r.RestElement.check(n)||r.SpreadPropertyPattern&&r.SpreadPropertyPattern.check(n))&&_(e.get(`argument`),t)}function v(e,t){var n=e.value;r.Pattern.assert(n),r.Identifier.check(n)&&(w.call(t,n.name)?t[n.name].push(e):t[n.name]=[e])}function y(e,t){var n=e.value;d.assert(n),w.call(t,n.name)?t[n.name].push(e):t[n.name]=[e]}return f.lookup=function(e){for(var t=this;t&&!t.declares(e);t=t.parent);return t},f.lookupType=function(e){for(var t=this;t&&!t.declaresType(e);t=t.parent);return t},f.getGlobalScope=function(){for(var e=this;!e.isGlobal;)e=e.parent;return e},c}function E(e){var t=e.use(C),n=t.namedTypes,r=t.builders,i=t.builtInTypes.number,a=t.builtInTypes.array,o=e.use(ie),s=e.use(T);let c=function e(t,n,r){if(!(this instanceof e))throw Error(`NodePath constructor cannot be invoked without 'new'`);o.call(this,t,n,r)};var l=c.prototype=Object.create(o.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}});Object.defineProperties(l,{node:{get:function(){return Object.defineProperty(this,`node`,{configurable:!0,value:this._computeNode()}),this.node}},parent:{get:function(){return Object.defineProperty(this,`parent`,{configurable:!0,value:this._computeParent()}),this.parent}},scope:{get:function(){return Object.defineProperty(this,`scope`,{configurable:!0,value:this._computeScope()}),this.scope}}}),l.replace=function(){return delete this.node,delete this.parent,delete this.scope,o.prototype.replace.apply(this,arguments)},l.prune=function(){var e=this.parent;return this.replace(),m(e)},l._computeNode=function(){var e=this.value;if(n.Node.check(e))return e;var t=this.parentPath;return t&&t.node||null},l._computeParent=function(){var e=this.value,t=this.parentPath;if(!n.Node.check(e)){for(;t&&!n.Node.check(t.value);)t=t.parentPath;t&&=t.parentPath}for(;t&&!n.Node.check(t.value);)t=t.parentPath;return t||null},l._computeScope=function(){var e=this.value,t=this.parentPath,r=t&&t.scope;return n.Node.check(e)&&s.isEstablishedBy(e)&&(r=new s(this,r)),r||null},l.getValueProperty=function(e){return t.getFieldValue(this.value,e)},l.needsParens=function(e){var t=this.parentPath;if(!t)return!1;var r=this.value;if(!n.Expression.check(r)||r.type===`Identifier`)return!1;for(;!n.Node.check(t.value);)if(t=t.parentPath,!t)return!1;var a=t.value;switch(r.type){case`UnaryExpression`:case`SpreadElement`:case`SpreadProperty`:return a.type===`MemberExpression`&&this.name===`object`&&a.object===r;case`BinaryExpression`:case`LogicalExpression`:switch(a.type){case`CallExpression`:return this.name===`callee`&&a.callee===r;case`UnaryExpression`:case`SpreadElement`:case`SpreadProperty`:return!0;case`MemberExpression`:return this.name===`object`&&a.object===r;case`BinaryExpression`:case`LogicalExpression`:{let e=r,t=d[a.operator],n=d[e.operator];if(t>n)return!0;if(t===n&&this.name===`right`){if(a.right!==e)throw Error(`Nodes must be equal`);return!0}}default:return!1}case`SequenceExpression`:switch(a.type){case`ForStatement`:return!1;case`ExpressionStatement`:return this.name!==`expression`;default:return!0}case`YieldExpression`:switch(a.type){case`BinaryExpression`:case`LogicalExpression`:case`UnaryExpression`:case`SpreadElement`:case`SpreadProperty`:case`CallExpression`:case`MemberExpression`:case`NewExpression`:case`ConditionalExpression`:case`YieldExpression`:return!0;default:return!1}case`Literal`:return a.type===`MemberExpression`&&i.check(r.value)&&this.name===`object`&&a.object===r;case`AssignmentExpression`:case`ConditionalExpression`:switch(a.type){case`UnaryExpression`:case`SpreadElement`:case`SpreadProperty`:case`BinaryExpression`:case`LogicalExpression`:return!0;case`CallExpression`:return this.name===`callee`&&a.callee===r;case`ConditionalExpression`:return this.name===`test`&&a.test===r;case`MemberExpression`:return this.name===`object`&&a.object===r;default:return!1}default:if(a.type===`NewExpression`&&this.name===`callee`&&a.callee===r)return f(r)}return!!(e!==!0&&!this.canBeFirstInStatement()&&this.firstInStatement())};function u(e){return n.BinaryExpression.check(e)||n.LogicalExpression.check(e)}var d={};[[`||`],[`&&`],[`|`],[`^`],[`&`],[`==`,`===`,`!=`,`!==`],[`<`,`>`,`<=`,`>=`,`in`,`instanceof`],[`>>`,`<<`,`>>>`],[`+`,`-`],[`*`,`/`,`%`]].forEach(function(e,t){e.forEach(function(e){d[e]=t})});function f(e){return n.CallExpression.check(e)?!0:a.check(e)?e.some(f):n.Node.check(e)?t.someField(e,function(e,t){return f(t)}):!1}l.canBeFirstInStatement=function(){var e=this.node;return!n.FunctionExpression.check(e)&&!n.ObjectExpression.check(e)},l.firstInStatement=function(){return p(this)};function p(e){for(var t,r;e.parent;e=e.parent){if(t=e.node,r=e.parent.node,n.BlockStatement.check(r)&&e.parent.name===`body`&&e.name===0){if(r.body[0]!==t)throw Error(`Nodes must be equal`);return!0}if(n.ExpressionStatement.check(r)&&e.name===`expression`){if(r.expression!==t)throw Error(`Nodes must be equal`);return!0}if(n.SequenceExpression.check(r)&&e.parent.name===`expressions`&&e.name===0){if(r.expressions[0]!==t)throw Error(`Nodes must be equal`);continue}if(n.CallExpression.check(r)&&e.name===`callee`){if(r.callee!==t)throw Error(`Nodes must be equal`);continue}if(n.MemberExpression.check(r)&&e.name===`object`){if(r.object!==t)throw Error(`Nodes must be equal`);continue}if(n.ConditionalExpression.check(r)&&e.name===`test`){if(r.test!==t)throw Error(`Nodes must be equal`);continue}if(u(r)&&e.name===`left`){if(r.left!==t)throw Error(`Nodes must be equal`);continue}if(n.UnaryExpression.check(r)&&!r.prefix&&e.name===`argument`){if(r.argument!==t)throw Error(`Nodes must be equal`);continue}return!1}return!0}function m(e){if(n.VariableDeclaration.check(e.node)){var t=e.get(`declarations`).value;if(!t||t.length===0)return e.prune()}else if(n.ExpressionStatement.check(e.node)){if(!e.get(`expression`).value)return e.prune()}else n.IfStatement.check(e.node)&&h(e);return e}function h(e){var t=e.get(`test`).value,i=e.get(`alternate`).value,a=e.get(`consequent`).value;if(!a&&!i){var o=r.expressionStatement(t);e.replace(o)}else if(!a&&i){var s=r.unaryExpression(`!`,t,!0);n.UnaryExpression.check(t)&&t.operator===`!`&&(s=t.argument),e.get(`test`).replace(s),e.get(`consequent`).replace(i),e.get(`alternate`).replace()}}return c}var D=Object.prototype.hasOwnProperty;function ae(e){var t=e.use(C),n=e.use(E),r=t.builtInTypes.array,i=t.builtInTypes.object,a=t.builtInTypes.function,o;let s=function e(){if(!(this instanceof e))throw Error(`PathVisitor constructor cannot be invoked without 'new'`);this._reusableContextStack=[],this._methodNameTable=c(this),this._shouldVisitComments=D.call(this._methodNameTable,`Block`)||D.call(this._methodNameTable,`Line`),this.Context=f(this),this._visiting=!1,this._changeReported=!1};function c(e){var n=Object.create(null);for(var r in e)/^visit[A-Z]/.test(r)&&(n[r.slice(5)]=!0);for(var i=t.computeSupertypeLookupTable(n),o=Object.create(null),s=Object.keys(i),c=s.length,l=0;l<c;++l){var u=s[l];r=`visit`+i[u],a.check(e[r])&&(o[u]=r)}return o}s.fromMethodsObject=function(e){if(e instanceof s)return e;if(!i.check(e))return new s;let t=function e(){if(!(this instanceof e))throw Error(`Visitor constructor cannot be invoked without 'new'`);s.call(this)};var n=t.prototype=Object.create(u);return n.constructor=t,l(n,e),l(t,s),a.assert(t.fromMethodsObject),a.assert(t.visit),new t};function l(e,t){for(var n in t)D.call(t,n)&&(e[n]=t[n]);return e}s.visit=function(e,t){return s.fromMethodsObject(t).visit(e)};var u=s.prototype;u.visit=function(){if(this._visiting)throw Error(`Recursively calling visitor.visit(path) resets visitor state. Try this.visit(path) or this.traverse(path) instead.`);this._visiting=!0,this._changeReported=!1,this._abortRequested=!1;var e=[...arguments];e[0]instanceof n||(e[0]=new n({root:e[0]}).get(`root`)),this.reset.apply(this,e);var t;try{var r=this.visitWithoutReset(e[0]);t=!0}finally{if(this._visiting=!1,!t&&this._abortRequested)return e[0].value}return r},u.AbortRequest=function(){},u.abort=function(){var e=this;e._abortRequested=!0;var t=new e.AbortRequest;throw t.cancel=function(){e._abortRequested=!1},t},u.reset=function(e){},u.visitWithoutReset=function(e){if(this instanceof this.Context)return this.visitor.visitWithoutReset(e);if(!(e instanceof n))throw Error(``);var t=e.value,r=t&&typeof t==`object`&&typeof t.type==`string`&&this._methodNameTable[t.type];if(r){var i=this.acquireContext(e);try{return i.invokeVisitorMethod(r)}finally{this.releaseContext(i)}}else return d(e,this)};function d(e,a){if(!(e instanceof n)||!(a instanceof s))throw Error(``);var o=e.value;if(r.check(o))e.each(a.visitWithoutReset,a);else if(i.check(o)){var c=t.getFieldNames(o);a._shouldVisitComments&&o.comments&&c.indexOf(`comments`)<0&&c.push(`comments`);for(var l=c.length,u=[],d=0;d<l;++d){var f=c[d];D.call(o,f)||(o[f]=t.getFieldValue(o,f)),u.push(e.get(f))}for(var d=0;d<l;++d)a.visitWithoutReset(u[d])}return e.value}u.acquireContext=function(e){return this._reusableContextStack.length===0?new this.Context(e):this._reusableContextStack.pop().reset(e)},u.releaseContext=function(e){if(!(e instanceof this.Context))throw Error(``);this._reusableContextStack.push(e),e.currentPath=null},u.reportChanged=function(){this._changeReported=!0},u.wasChangeReported=function(){return this._changeReported};function f(e){function t(r){if(!(this instanceof t)||!(this instanceof s)||!(r instanceof n))throw Error(``);Object.defineProperty(this,`visitor`,{value:e,writable:!1,enumerable:!0,configurable:!1}),this.currentPath=r,this.needToCallTraverse=!0,Object.seal(this)}if(!(e instanceof s))throw Error(``);var r=t.prototype=Object.create(e);return r.constructor=t,l(r,p),t}var p=Object.create(null);return p.reset=function(e){if(!(this instanceof this.Context)||!(e instanceof n))throw Error(``);return this.currentPath=e,this.needToCallTraverse=!0,this},p.invokeVisitorMethod=function(e){if(!(this instanceof this.Context)||!(this.currentPath instanceof n))throw Error(``);var t=this.visitor[e].call(this,this.currentPath);if(t===!1?this.needToCallTraverse=!1:t!==o&&(this.currentPath=this.currentPath.replace(t)[0],this.needToCallTraverse&&this.traverse(this.currentPath)),this.needToCallTraverse!==!1)throw Error(`Must either call this.traverse or return false in `+e);var r=this.currentPath;return r&&r.value},p.traverse=function(e,t){if(!(this instanceof this.Context)||!(e instanceof n)||!(this.currentPath instanceof n))throw Error(``);return this.needToCallTraverse=!1,d(e,s.fromMethodsObject(t||this.visitor))},p.visit=function(e,t){if(!(this instanceof this.Context)||!(e instanceof n)||!(this.currentPath instanceof n))throw Error(``);return this.needToCallTraverse=!1,s.fromMethodsObject(t||this.visitor).visitWithoutReset(e)},p.reportChanged=function(){this.visitor.reportChanged()},p.abort=function(){this.needToCallTraverse=!1,this.visitor.abort()},s}function oe(e){var t=e.use(C),n=t.getFieldNames,r=t.getFieldValue,i=t.builtInTypes.array,a=t.builtInTypes.object,o=t.builtInTypes.Date,s=t.builtInTypes.RegExp,c=Object.prototype.hasOwnProperty;function l(e,t,n){return i.check(n)?n.length=0:n=null,d(e,t,n)}l.assert=function(e,t){var n=[];if(!l(e,t,n))if(n.length===0){if(e!==t)throw Error(`Nodes must be equal`)}else throw Error(`Nodes differ in the following path: `+n.map(u).join(``))};function u(e){return/[_$a-z][_$a-z0-9]*/i.test(e)?`.`+e:`[`+JSON.stringify(e)+`]`}function d(e,t,n){return e===t?!0:i.check(e)?f(e,t,n):a.check(e)?p(e,t,n):o.check(e)?o.check(t)&&+e==+t:s.check(e)?s.check(t)&&e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.ignoreCase===t.ignoreCase:e==t}function f(e,t,n){i.assert(e);var r=e.length;if(!i.check(t)||t.length!==r)return n&&n.push(`length`),!1;for(var a=0;a<r;++a){if(n&&n.push(a),a in e!=a in t||!d(e[a],t[a],n))return!1;if(n){var o=n.pop();if(o!==a)throw Error(``+o)}}return!0}function p(e,t,i){if(a.assert(e),!a.check(t))return!1;if(e.type!==t.type)return i&&i.push(`type`),!1;var o=n(e),s=o.length,l=n(t),u=l.length;if(s===u){for(var f=0;f<s;++f){var p=o[f],m=r(e,p),h=r(t,p);if(i&&i.push(p),!d(m,h,i))return!1;if(i){var g=i.pop();if(g!==p)throw Error(``+g)}}return!0}if(!i)return!1;var _=Object.create(null);for(f=0;f<s;++f)_[o[f]]=!0;for(f=0;f<u;++f){if(p=l[f],!c.call(_,p))return i.push(p),!1;delete _[p]}for(p in _){i.push(p);break}return!1}return l}function se(e){let t=ce(),n=t.use(C);e.forEach(t.use),n.finalize();let r=t.use(ae);return{Type:n.Type,builtInTypes:n.builtInTypes,namedTypes:n.namedTypes,builders:n.builders,defineMethod:n.defineMethod,getFieldNames:n.getFieldNames,getFieldValue:n.getFieldValue,eachField:n.eachField,someField:n.someField,getSupertypeNames:n.getSupertypeNames,getBuilderName:n.getBuilderName,astNodesAreEquivalent:t.use(oe),finalize:n.finalize,Path:t.use(ie),NodePath:t.use(E),PathVisitor:r,use:t.use,visit:r.visit}}function ce(){let e=[],t=[];function n(n){var i=e.indexOf(n);return i===-1&&(i=e.length,e.push(n),t[i]=n(r)),t[i]}var r={use:n};return r}function le(){return{BinaryOperators:[`==`,`!=`,`===`,`!==`,`<`,`<=`,`>`,`>=`,`<<`,`>>`,`>>>`,`+`,`-`,`*`,`/`,`%`,`&`,`|`,`^`,`in`,`instanceof`],AssignmentOperators:[`=`,`+=`,`-=`,`*=`,`/=`,`%=`,`<<=`,`>>=`,`>>>=`,`|=`,`^=`,`&=`],LogicalOperators:[`||`,`&&`]}}function O(e){let t=e.use(le);return t.BinaryOperators.indexOf(`**`)<0&&t.BinaryOperators.push(`**`),t.AssignmentOperators.indexOf(`**=`)<0&&t.AssignmentOperators.push(`**=`),t}function k(e){let t=e.use(O);return t.LogicalOperators.indexOf(`??`)<0&&t.LogicalOperators.push(`??`),t}function ue(e){let t=e.use(k);return t.LogicalOperators.forEach(e=>{let n=e+`=`;t.AssignmentOperators.indexOf(n)<0&&t.AssignmentOperators.push(n)}),t}function A(e){var t=e.use(C).Type,n=t.def,r=t.or,i=e.use(p),a=i.defaults,o=i.geq;let{BinaryOperators:s,AssignmentOperators:c,LogicalOperators:l}=e.use(le);n(`Printable`).field(`loc`,r(n(`SourceLocation`),null),a.null,!0),n(`Node`).bases(`Printable`).field(`type`,String).field(`comments`,r([n(`Comment`)],null),a.null,!0),n(`SourceLocation`).field(`start`,n(`Position`)).field(`end`,n(`Position`)).field(`source`,r(String,null),a.null),n(`Position`).field(`line`,o(1)).field(`column`,o(0)),n(`File`).bases(`Node`).build(`program`,`name`).field(`program`,n(`Program`)).field(`name`,r(String,null),a.null),n(`Program`).bases(`Node`).build(`body`).field(`body`,[n(`Statement`)]),n(`Function`).bases(`Node`).field(`id`,r(n(`Identifier`),null),a.null).field(`params`,[n(`Pattern`)]).field(`body`,n(`BlockStatement`)).field(`generator`,Boolean,a.false).field(`async`,Boolean,a.false),n(`Statement`).bases(`Node`),n(`EmptyStatement`).bases(`Statement`).build(),n(`BlockStatement`).bases(`Statement`).build(`body`).field(`body`,[n(`Statement`)]),n(`ExpressionStatement`).bases(`Statement`).build(`expression`).field(`expression`,n(`Expression`)),n(`IfStatement`).bases(`Statement`).build(`test`,`consequent`,`alternate`).field(`test`,n(`Expression`)).field(`consequent`,n(`Statement`)).field(`alternate`,r(n(`Statement`),null),a.null),n(`LabeledStatement`).bases(`Statement`).build(`label`,`body`).field(`label`,n(`Identifier`)).field(`body`,n(`Statement`)),n(`BreakStatement`).bases(`Statement`).build(`label`).field(`label`,r(n(`Identifier`),null),a.null),n(`ContinueStatement`).bases(`Statement`).build(`label`).field(`label`,r(n(`Identifier`),null),a.null),n(`WithStatement`).bases(`Statement`).build(`object`,`body`).field(`object`,n(`Expression`)).field(`body`,n(`Statement`)),n(`SwitchStatement`).bases(`Statement`).build(`discriminant`,`cases`,`lexical`).field(`discriminant`,n(`Expression`)).field(`cases`,[n(`SwitchCase`)]).field(`lexical`,Boolean,a.false),n(`ReturnStatement`).bases(`Statement`).build(`argument`).field(`argument`,r(n(`Expression`),null)),n(`ThrowStatement`).bases(`Statement`).build(`argument`).field(`argument`,n(`Expression`)),n(`TryStatement`).bases(`Statement`).build(`block`,`handler`,`finalizer`).field(`block`,n(`BlockStatement`)).field(`handler`,r(n(`CatchClause`),null),function(){return this.handlers&&this.handlers[0]||null}).field(`handlers`,[n(`CatchClause`)],function(){return this.handler?[this.handler]:[]},!0).field(`guardedHandlers`,[n(`CatchClause`)],a.emptyArray).field(`finalizer`,r(n(`BlockStatement`),null),a.null),n(`CatchClause`).bases(`Node`).build(`param`,`guard`,`body`).field(`param`,n(`Pattern`)).field(`guard`,r(n(`Expression`),null),a.null).field(`body`,n(`BlockStatement`)),n(`WhileStatement`).bases(`Statement`).build(`test`,`body`).field(`test`,n(`Expression`)).field(`body`,n(`Statement`)),n(`DoWhileStatement`).bases(`Statement`).build(`body`,`test`).field(`body`,n(`Statement`)).field(`test`,n(`Expression`)),n(`ForStatement`).bases(`Statement`).build(`init`,`test`,`update`,`body`).field(`init`,r(n(`VariableDeclaration`),n(`Expression`),null)).field(`test`,r(n(`Expression`),null)).field(`update`,r(n(`Expression`),null)).field(`body`,n(`Statement`)),n(`ForInStatement`).bases(`Statement`).build(`left`,`right`,`body`).field(`left`,r(n(`VariableDeclaration`),n(`Expression`))).field(`right`,n(`Expression`)).field(`body`,n(`Statement`)),n(`DebuggerStatement`).bases(`Statement`).build(),n(`Declaration`).bases(`Statement`),n(`FunctionDeclaration`).bases(`Function`,`Declaration`).build(`id`,`params`,`body`).field(`id`,n(`Identifier`)),n(`FunctionExpression`).bases(`Function`,`Expression`).build(`id`,`params`,`body`),n(`VariableDeclaration`).bases(`Declaration`).build(`kind`,`declarations`).field(`kind`,r(`var`,`let`,`const`)).field(`declarations`,[n(`VariableDeclarator`)]),n(`VariableDeclarator`).bases(`Node`).build(`id`,`init`).field(`id`,n(`Pattern`)).field(`init`,r(n(`Expression`),null),a.null),n(`Expression`).bases(`Node`),n(`ThisExpression`).bases(`Expression`).build(),n(`ArrayExpression`).bases(`Expression`).build(`elements`).field(`elements`,[r(n(`Expression`),null)]),n(`ObjectExpression`).bases(`Expression`).build(`properties`).field(`properties`,[n(`Property`)]),n(`Property`).bases(`Node`).build(`kind`,`key`,`value`).field(`kind`,r(`init`,`get`,`set`)).field(`key`,r(n(`Literal`),n(`Identifier`))).field(`value`,n(`Expression`)),n(`SequenceExpression`).bases(`Expression`).build(`expressions`).field(`expressions`,[n(`Expression`)]);var u=r(`-`,`+`,`!`,`~`,`typeof`,`void`,`delete`);n(`UnaryExpression`).bases(`Expression`).build(`operator`,`argument`,`prefix`).field(`operator`,u).field(`argument`,n(`Expression`)).field(`prefix`,Boolean,a.true);let d=r(...s);n(`BinaryExpression`).bases(`Expression`).build(`operator`,`left`,`right`).field(`operator`,d).field(`left`,n(`Expression`)).field(`right`,n(`Expression`));let f=r(...c);n(`AssignmentExpression`).bases(`Expression`).build(`operator`,`left`,`right`).field(`operator`,f).field(`left`,r(n(`Pattern`),n(`MemberExpression`))).field(`right`,n(`Expression`));var m=r(`++`,`--`);n(`UpdateExpression`).bases(`Expression`).build(`operator`,`argument`,`prefix`).field(`operator`,m).field(`argument`,n(`Expression`)).field(`prefix`,Boolean);var h=r(...l);n(`LogicalExpression`).bases(`Expression`).build(`operator`,`left`,`right`).field(`operator`,h).field(`left`,n(`Expression`)).field(`right`,n(`Expression`)),n(`ConditionalExpression`).bases(`Expression`).build(`test`,`consequent`,`alternate`).field(`test`,n(`Expression`)).field(`consequent`,n(`Expression`)).field(`alternate`,n(`Expression`)),n(`NewExpression`).bases(`Expression`).build(`callee`,`arguments`).field(`callee`,n(`Expression`)).field(`arguments`,[n(`Expression`)]),n(`CallExpression`).bases(`Expression`).build(`callee`,`arguments`).field(`callee`,n(`Expression`)).field(`arguments`,[n(`Expression`)]),n(`MemberExpression`).bases(`Expression`).build(`object`,`property`,`computed`).field(`object`,n(`Expression`)).field(`property`,r(n(`Identifier`),n(`Expression`))).field(`computed`,Boolean,function(){var e=this.property.type;return e===`Literal`||e===`MemberExpression`||e===`BinaryExpression`}),n(`Pattern`).bases(`Node`),n(`SwitchCase`).bases(`Node`).build(`test`,`consequent`).field(`test`,r(n(`Expression`),null)).field(`consequent`,[n(`Statement`)]),n(`Identifier`).bases(`Expression`,`Pattern`).build(`name`).field(`name`,String).field(`optional`,Boolean,a.false),n(`Literal`).bases(`Expression`).build(`value`).field(`value`,r(String,Boolean,null,Number,RegExp,BigInt)),n(`Comment`).bases(`Printable`).field(`value`,String).field(`leading`,Boolean,a.true).field(`trailing`,Boolean,a.false)}function de(e){e.use(A);let t=e.use(C),n=t.Type.def,r=t.Type.or,i=e.use(p).defaults;n(`Function`).field(`generator`,Boolean,i.false).field(`expression`,Boolean,i.false).field(`defaults`,[r(n(`Expression`),null)],i.emptyArray).field(`rest`,r(n(`Identifier`),null),i.null),n(`RestElement`).bases(`Pattern`).build(`argument`).field(`argument`,n(`Pattern`)).field(`typeAnnotation`,r(n(`TypeAnnotation`),n(`TSTypeAnnotation`),null),i.null),n(`SpreadElementPattern`).bases(`Pattern`).build(`argument`).field(`argument`,n(`Pattern`)),n(`FunctionDeclaration`).build(`id`,`params`,`body`,`generator`,`expression`).field(`id`,r(n(`Identifier`),null)),n(`FunctionExpression`).build(`id`,`params`,`body`,`generator`,`expression`),n(`ArrowFunctionExpression`).bases(`Function`,`Expression`).build(`params`,`body`,`expression`).field(`id`,null,i.null).field(`body`,r(n(`BlockStatement`),n(`Expression`))).field(`generator`,!1,i.false),n(`ForOfStatement`).bases(`Statement`).build(`left`,`right`,`body`).field(`left`,r(n(`VariableDeclaration`),n(`Pattern`))).field(`right`,n(`Expression`)).field(`body`,n(`Statement`)),n(`YieldExpression`).bases(`Expression`).build(`argument`,`delegate`).field(`argument`,r(n(`Expression`),null)).field(`delegate`,Boolean,i.false),n(`GeneratorExpression`).bases(`Expression`).build(`body`,`blocks`,`filter`).field(`body`,n(`Expression`)).field(`blocks`,[n(`ComprehensionBlock`)]).field(`filter`,r(n(`Expression`),null)),n(`ComprehensionExpression`).bases(`Expression`).build(`body`,`blocks`,`filter`).field(`body`,n(`Expression`)).field(`blocks`,[n(`ComprehensionBlock`)]).field(`filter`,r(n(`Expression`),null)),n(`ComprehensionBlock`).bases(`Node`).build(`left`,`right`,`each`).field(`left`,n(`Pattern`)).field(`right`,n(`Expression`)).field(`each`,Boolean),n(`Property`).field(`key`,r(n(`Literal`),n(`Identifier`),n(`Expression`))).field(`value`,r(n(`Expression`),n(`Pattern`))).field(`method`,Boolean,i.false).field(`shorthand`,Boolean,i.false).field(`computed`,Boolean,i.false),n(`ObjectProperty`).field(`shorthand`,Boolean,i.false),n(`PropertyPattern`).bases(`Pattern`).build(`key`,`pattern`).field(`key`,r(n(`Literal`),n(`Identifier`),n(`Expression`))).field(`pattern`,n(`Pattern`)).field(`computed`,Boolean,i.false),n(`ObjectPattern`).bases(`Pattern`).build(`properties`).field(`properties`,[r(n(`PropertyPattern`),n(`Property`))]),n(`ArrayPattern`).bases(`Pattern`).build(`elements`).field(`elements`,[r(n(`Pattern`),null)]),n(`SpreadElement`).bases(`Node`).build(`argument`).field(`argument`,n(`Expression`)),n(`ArrayExpression`).field(`elements`,[r(n(`Expression`),n(`SpreadElement`),n(`RestElement`),null)]),n(`NewExpression`).field(`arguments`,[r(n(`Expression`),n(`SpreadElement`))]),n(`CallExpression`).field(`arguments`,[r(n(`Expression`),n(`SpreadElement`))]),n(`AssignmentPattern`).bases(`Pattern`).build(`left`,`right`).field(`left`,n(`Pattern`)).field(`right`,n(`Expression`)),n(`MethodDefinition`).bases(`Declaration`).build(`kind`,`key`,`value`,`static`).field(`kind`,r(`constructor`,`method`,`get`,`set`)).field(`key`,n(`Expression`)).field(`value`,n(`Function`)).field(`computed`,Boolean,i.false).field(`static`,Boolean,i.false);let a=r(n(`MethodDefinition`),n(`VariableDeclarator`),n(`ClassPropertyDefinition`),n(`ClassProperty`),n(`StaticBlock`));n(`ClassProperty`).bases(`Declaration`).build(`key`).field(`key`,r(n(`Literal`),n(`Identifier`),n(`Expression`))).field(`computed`,Boolean,i.false),n(`ClassPropertyDefinition`).bases(`Declaration`).build(`definition`).field(`definition`,a),n(`ClassBody`).bases(`Declaration`).build(`body`).field(`body`,[a]),n(`ClassDeclaration`).bases(`Declaration`).build(`id`,`body`,`superClass`).field(`id`,r(n(`Identifier`),null)).field(`body`,n(`ClassBody`)).field(`superClass`,r(n(`Expression`),null),i.null),n(`ClassExpression`).bases(`Expression`).build(`id`,`body`,`superClass`).field(`id`,r(n(`Identifier`),null),i.null).field(`body`,n(`ClassBody`)).field(`superClass`,r(n(`Expression`),null),i.null),n(`Super`).bases(`Expression`).build(),n(`Specifier`).bases(`Node`),n(`ModuleSpecifier`).bases(`Specifier`).field(`local`,r(n(`Identifier`),null),i.null).field(`id`,r(n(`Identifier`),null),i.null).field(`name`,r(n(`Identifier`),null),i.null),n(`ImportSpecifier`).bases(`ModuleSpecifier`).build(`imported`,`local`).field(`imported`,n(`Identifier`)),n(`ImportDefaultSpecifier`).bases(`ModuleSpecifier`).build(`local`),n(`ImportNamespaceSpecifier`).bases(`ModuleSpecifier`).build(`local`),n(`ImportDeclaration`).bases(`Declaration`).build(`specifiers`,`source`,`importKind`).field(`specifiers`,[r(n(`ImportSpecifier`),n(`ImportNamespaceSpecifier`),n(`ImportDefaultSpecifier`))],i.emptyArray).field(`source`,n(`Literal`)).field(`importKind`,r(`value`,`type`),function(){return`value`}),n(`ExportNamedDeclaration`).bases(`Declaration`).build(`declaration`,`specifiers`,`source`).field(`declaration`,r(n(`Declaration`),null)).field(`specifiers`,[n(`ExportSpecifier`)],i.emptyArray).field(`source`,r(n(`Literal`),null),i.null),n(`ExportSpecifier`).bases(`ModuleSpecifier`).build(`local`,`exported`).field(`exported`,n(`Identifier`)),n(`ExportDefaultDeclaration`).bases(`Declaration`).build(`declaration`).field(`declaration`,r(n(`Declaration`),n(`Expression`))),n(`ExportAllDeclaration`).bases(`Declaration`).build(`source`).field(`source`,n(`Literal`)),n(`TaggedTemplateExpression`).bases(`Expression`).build(`tag`,`quasi`).field(`tag`,n(`Expression`)).field(`quasi`,n(`TemplateLiteral`)),n(`TemplateLiteral`).bases(`Expression`).build(`quasis`,`expressions`).field(`quasis`,[n(`TemplateElement`)]).field(`expressions`,[n(`Expression`)]),n(`TemplateElement`).bases(`Node`).build(`value`,`tail`).field(`value`,{cooked:String,raw:String}).field(`tail`,Boolean),n(`MetaProperty`).bases(`Expression`).build(`meta`,`property`).field(`meta`,n(`Identifier`)).field(`property`,n(`Identifier`))}function j(e){e.use(O),e.use(de)}function fe(e){e.use(j);let t=e.use(C).Type.def,n=e.use(p).defaults;t(`Function`).field(`async`,Boolean,n.false),t(`AwaitExpression`).bases(`Expression`).build(`argument`).field(`argument`,t(`Expression`))}function pe(e){e.use(fe);let t=e.use(C),n=t.Type.def,r=t.Type.or,i=e.use(p).defaults;n(`ForOfStatement`).field(`await`,Boolean,i.false),n(`SpreadProperty`).bases(`Node`).build(`argument`).field(`argument`,n(`Expression`)),n(`ObjectExpression`).field(`properties`,[r(n(`Property`),n(`SpreadProperty`),n(`SpreadElement`))]),n(`TemplateElement`).field(`value`,{cooked:r(String,null),raw:String}),n(`SpreadPropertyPattern`).bases(`Pattern`).build(`argument`).field(`argument`,n(`Pattern`)),n(`ObjectPattern`).field(`properties`,[r(n(`PropertyPattern`),n(`Property`),n(`RestElement`),n(`SpreadPropertyPattern`))])}function me(e){e.use(pe);let t=e.use(C),n=t.Type.def,r=t.Type.or,i=e.use(p).defaults;n(`CatchClause`).field(`param`,r(n(`Pattern`),null),i.null)}function he(e){e.use(k),e.use(me);let t=e.use(C),n=t.Type.def,r=t.Type.or,i=e.use(p).defaults;n(`ImportExpression`).bases(`Expression`).build(`source`).field(`source`,n(`Expression`)),n(`ExportAllDeclaration`).bases(`Declaration`).build(`source`,`exported`).field(`source`,n(`Literal`)).field(`exported`,r(n(`Identifier`),null,void 0),i.null),n(`ChainElement`).bases(`Node`).field(`optional`,Boolean,i.false),n(`CallExpression`).bases(`Expression`,`ChainElement`),n(`MemberExpression`).bases(`Expression`,`ChainElement`),n(`ChainExpression`).bases(`Expression`).build(`expression`).field(`expression`,n(`ChainElement`)),n(`OptionalCallExpression`).bases(`CallExpression`).build(`callee`,`arguments`,`optional`).field(`optional`,Boolean,i.true),n(`OptionalMemberExpression`).bases(`MemberExpression`).build(`object`,`property`,`computed`,`optional`).field(`optional`,Boolean,i.true)}function ge(e){e.use(ue),e.use(he)}function _e(e){e.use(ge);let t=e.use(C).Type.def;t(`StaticBlock`).bases(`Declaration`).build(`body`).field(`body`,[t(`Statement`)])}function ve(e){e.use(_e);let t=e.use(C),n=t.Type,r=t.Type.def,i=n.or,a=e.use(p).defaults;r(`AwaitExpression`).build(`argument`,`all`).field(`argument`,i(r(`Expression`),null)).field(`all`,Boolean,a.false),r(`Decorator`).bases(`Node`).build(`expression`).field(`expression`,r(`Expression`)),r(`Property`).field(`decorators`,i([r(`Decorator`)],null),a.null),r(`MethodDefinition`).field(`decorators`,i([r(`Decorator`)],null),a.null),r(`PrivateName`).bases(`Expression`,`Pattern`).build(`id`).field(`id`,r(`Identifier`)),r(`ClassPrivateProperty`).bases(`ClassProperty`).build(`key`,`value`).field(`key`,r(`PrivateName`)).field(`value`,i(r(`Expression`),null),a.null),r(`ImportAttribute`).bases(`Node`).build(`key`,`value`).field(`key`,i(r(`Identifier`),r(`Literal`))).field(`value`,r(`Expression`)),[`ImportDeclaration`,`ExportAllDeclaration`,`ExportNamedDeclaration`].forEach(e=>{r(e).field(`assertions`,[r(`ImportAttribute`)],a.emptyArray)}),r(`RecordExpression`).bases(`Expression`).build(`properties`).field(`properties`,[i(r(`ObjectProperty`),r(`ObjectMethod`),r(`SpreadElement`))]),r(`TupleExpression`).bases(`Expression`).build(`elements`).field(`elements`,[i(r(`Expression`),r(`SpreadElement`),null)]),r(`ModuleExpression`).bases(`Node`).build(`body`).field(`body`,r(`Program`))}function ye(e){e.use(ve);let t=e.use(C),n=t.Type.def,r=t.Type.or,i=e.use(p).defaults;n(`JSXAttribute`).bases(`Node`).build(`name`,`value`).field(`name`,r(n(`JSXIdentifier`),n(`JSXNamespacedName`))).field(`value`,r(n(`Literal`),n(`JSXExpressionContainer`),n(`JSXElement`),n(`JSXFragment`),null),i.null),n(`JSXIdentifier`).bases(`Identifier`).build(`name`).field(`name`,String),n(`JSXNamespacedName`).bases(`Node`).build(`namespace`,`name`).field(`namespace`,n(`JSXIdentifier`)).field(`name`,n(`JSXIdentifier`)),n(`JSXMemberExpression`).bases(`MemberExpression`).build(`object`,`property`).field(`object`,r(n(`JSXIdentifier`),n(`JSXMemberExpression`))).field(`property`,n(`JSXIdentifier`)).field(`computed`,Boolean,i.false);let a=r(n(`JSXIdentifier`),n(`JSXNamespacedName`),n(`JSXMemberExpression`));n(`JSXSpreadAttribute`).bases(`Node`).build(`argument`).field(`argument`,n(`Expression`));let o=[r(n(`JSXAttribute`),n(`JSXSpreadAttribute`))];n(`JSXExpressionContainer`).bases(`Expression`).build(`expression`).field(`expression`,r(n(`Expression`),n(`JSXEmptyExpression`)));let s=[r(n(`JSXText`),n(`JSXExpressionContainer`),n(`JSXSpreadChild`),n(`JSXElement`),n(`JSXFragment`),n(`Literal`))];n(`JSXElement`).bases(`Expression`).build(`openingElement`,`closingElement`,`children`).field(`openingElement`,n(`JSXOpeningElement`)).field(`closingElement`,r(n(`JSXClosingElement`),null),i.null).field(`children`,s,i.emptyArray).field(`name`,a,function(){return this.openingElement.name},!0).field(`selfClosing`,Boolean,function(){return this.openingElement.selfClosing},!0).field(`attributes`,o,function(){return this.openingElement.attributes},!0),n(`JSXOpeningElement`).bases(`Node`).build(`name`,`attributes`,`selfClosing`).field(`name`,a).field(`attributes`,o,i.emptyArray).field(`selfClosing`,Boolean,i.false),n(`JSXClosingElement`).bases(`Node`).build(`name`).field(`name`,a),n(`JSXFragment`).bases(`Expression`).build(`openingFragment`,`closingFragment`,`children`).field(`openingFragment`,n(`JSXOpeningFragment`)).field(`closingFragment`,n(`JSXClosingFragment`)).field(`children`,s,i.emptyArray),n(`JSXOpeningFragment`).bases(`Node`).build(),n(`JSXClosingFragment`).bases(`Node`).build(),n(`JSXText`).bases(`Literal`).build(`value`,`raw`).field(`value`,String).field(`raw`,String,function(){return this.value}),n(`JSXEmptyExpression`).bases(`Node`).build(),n(`JSXSpreadChild`).bases(`Node`).build(`expression`).field(`expression`,n(`Expression`))}function be(e){var t=e.use(C),n=t.Type.def,r=t.Type.or,i=e.use(p).defaults,a=r(n(`TypeAnnotation`),n(`TSTypeAnnotation`),null),o=r(n(`TypeParameterDeclaration`),n(`TSTypeParameterDeclaration`),null);n(`Identifier`).field(`typeAnnotation`,a,i.null),n(`ObjectPattern`).field(`typeAnnotation`,a,i.null),n(`Function`).field(`returnType`,a,i.null).field(`typeParameters`,o,i.null),n(`ClassProperty`).build(`key`,`value`,`typeAnnotation`,`static`).field(`value`,r(n(`Expression`),null)).field(`static`,Boolean,i.false).field(`typeAnnotation`,a,i.null),[`ClassDeclaration`,`ClassExpression`].forEach(e=>{n(e).field(`typeParameters`,o,i.null).field(`superTypeParameters`,r(n(`TypeParameterInstantiation`),n(`TSTypeParameterInstantiation`),null),i.null).field(`implements`,r([n(`ClassImplements`)],[n(`TSExpressionWithTypeArguments`)]),i.emptyArray)})}function xe(e){e.use(ve),e.use(be);let t=e.use(C),n=t.Type.def,r=t.Type.or,i=e.use(p).defaults;n(`Flow`).bases(`Node`),n(`FlowType`).bases(`Flow`),n(`AnyTypeAnnotation`).bases(`FlowType`).build(),n(`EmptyTypeAnnotation`).bases(`FlowType`).build(),n(`MixedTypeAnnotation`).bases(`FlowType`).build(),n(`VoidTypeAnnotation`).bases(`FlowType`).build(),n(`SymbolTypeAnnotation`).bases(`FlowType`).build(),n(`NumberTypeAnnotation`).bases(`FlowType`).build(),n(`BigIntTypeAnnotation`).bases(`FlowType`).build(),n(`NumberLiteralTypeAnnotation`).bases(`FlowType`).build(`value`,`raw`).field(`value`,Number).field(`raw`,String),n(`NumericLiteralTypeAnnotation`).bases(`FlowType`).build(`value`,`raw`).field(`value`,Number).field(`raw`,String),n(`BigIntLiteralTypeAnnotation`).bases(`FlowType`).build(`value`,`raw`).field(`value`,null).field(`raw`,String),n(`StringTypeAnnotation`).bases(`FlowType`).build(),n(`StringLiteralTypeAnnotation`).bases(`FlowType`).build(`value`,`raw`).field(`value`,String).field(`raw`,String),n(`BooleanTypeAnnotation`).bases(`FlowType`).build(),n(`BooleanLiteralTypeAnnotation`).bases(`FlowType`).build(`value`,`raw`).field(`value`,Boolean).field(`raw`,String),n(`TypeAnnotation`).bases(`Node`).build(`typeAnnotation`).field(`typeAnnotation`,n(`FlowType`)),n(`NullableTypeAnnotation`).bases(`FlowType`).build(`typeAnnotation`).field(`typeAnnotation`,n(`FlowType`)),n(`NullLiteralTypeAnnotation`).bases(`FlowType`).build(),n(`NullTypeAnnotation`).bases(`FlowType`).build(),n(`ThisTypeAnnotation`).bases(`FlowType`).build(),n(`ExistsTypeAnnotation`).bases(`FlowType`).build(),n(`ExistentialTypeParam`).bases(`FlowType`).build(),n(`FunctionTypeAnnotation`).bases(`FlowType`).build(`params`,`returnType`,`rest`,`typeParameters`).field(`params`,[n(`FunctionTypeParam`)]).field(`returnType`,n(`FlowType`)).field(`rest`,r(n(`FunctionTypeParam`),null)).field(`typeParameters`,r(n(`TypeParameterDeclaration`),null)),n(`FunctionTypeParam`).bases(`Node`).build(`name`,`typeAnnotation`,`optional`).field(`name`,r(n(`Identifier`),null)).field(`typeAnnotation`,n(`FlowType`)).field(`optional`,Boolean),n(`ArrayTypeAnnotation`).bases(`FlowType`).build(`elementType`).field(`elementType`,n(`FlowType`)),n(`ObjectTypeAnnotation`).bases(`FlowType`).build(`properties`,`indexers`,`callProperties`).field(`properties`,[r(n(`ObjectTypeProperty`),n(`ObjectTypeSpreadProperty`))]).field(`indexers`,[n(`ObjectTypeIndexer`)],i.emptyArray).field(`callProperties`,[n(`ObjectTypeCallProperty`)],i.emptyArray).field(`inexact`,r(Boolean,void 0),i.undefined).field(`exact`,Boolean,i.false).field(`internalSlots`,[n(`ObjectTypeInternalSlot`)],i.emptyArray),n(`Variance`).bases(`Node`).build(`kind`).field(`kind`,r(`plus`,`minus`));let a=r(n(`Variance`),`plus`,`minus`,null);n(`ObjectTypeProperty`).bases(`Node`).build(`key`,`value`,`optional`).field(`key`,r(n(`Literal`),n(`Identifier`))).field(`value`,n(`FlowType`)).field(`optional`,Boolean).field(`variance`,a,i.null),n(`ObjectTypeIndexer`).bases(`Node`).build(`id`,`key`,`value`).field(`id`,n(`Identifier`)).field(`key`,n(`FlowType`)).field(`value`,n(`FlowType`)).field(`variance`,a,i.null).field(`static`,Boolean,i.false),n(`ObjectTypeCallProperty`).bases(`Node`).build(`value`).field(`value`,n(`FunctionTypeAnnotation`)).field(`static`,Boolean,i.false),n(`QualifiedTypeIdentifier`).bases(`Node`).build(`qualification`,`id`).field(`qualification`,r(n(`Identifier`),n(`QualifiedTypeIdentifier`))).field(`id`,n(`Identifier`)),n(`GenericTypeAnnotation`).bases(`FlowType`).build(`id`,`typeParameters`).field(`id`,r(n(`Identifier`),n(`QualifiedTypeIdentifier`))).field(`typeParameters`,r(n(`TypeParameterInstantiation`),null)),n(`MemberTypeAnnotation`).bases(`FlowType`).build(`object`,`property`).field(`object`,n(`Identifier`)).field(`property`,r(n(`MemberTypeAnnotation`),n(`GenericTypeAnnotation`))),n(`IndexedAccessType`).bases(`FlowType`).build(`objectType`,`indexType`).field(`objectType`,n(`FlowType`)).field(`indexType`,n(`FlowType`)),n(`OptionalIndexedAccessType`).bases(`FlowType`).build(`objectType`,`indexType`,`optional`).field(`objectType`,n(`FlowType`)).field(`indexType`,n(`FlowType`)).field(`optional`,Boolean),n(`UnionTypeAnnotation`).bases(`FlowType`).build(`types`).field(`types`,[n(`FlowType`)]),n(`IntersectionTypeAnnotation`).bases(`FlowType`).build(`types`).field(`types`,[n(`FlowType`)]),n(`TypeofTypeAnnotation`).bases(`FlowType`).build(`argument`).field(`argument`,n(`FlowType`)),n(`ObjectTypeSpreadProperty`).bases(`Node`).build(`argument`).field(`argument`,n(`FlowType`)),n(`ObjectTypeInternalSlot`).bases(`Node`).build(`id`,`value`,`optional`,`static`,`method`).field(`id`,n(`Identifier`)).field(`value`,n(`FlowType`)).field(`optional`,Boolean).field(`static`,Boolean).field(`method`,Boolean),n(`TypeParameterDeclaration`).bases(`Node`).build(`params`).field(`params`,[n(`TypeParameter`)]),n(`TypeParameterInstantiation`).bases(`Node`).build(`params`).field(`params`,[n(`FlowType`)]),n(`TypeParameter`).bases(`FlowType`).build(`name`,`variance`,`bound`,`default`).field(`name`,String).field(`variance`,a,i.null).field(`bound`,r(n(`TypeAnnotation`),null),i.null).field(`default`,r(n(`FlowType`),null),i.null),n(`ClassProperty`).field(`variance`,a,i.null),n(`ClassImplements`).bases(`Node`).build(`id`).field(`id`,n(`Identifier`)).field(`superClass`,r(n(`Expression`),null),i.null).field(`typeParameters`,r(n(`TypeParameterInstantiation`),null),i.null),n(`InterfaceTypeAnnotation`).bases(`FlowType`).build(`body`,`extends`).field(`body`,n(`ObjectTypeAnnotation`)).field(`extends`,r([n(`InterfaceExtends`)],null),i.null),n(`InterfaceDeclaration`).bases(`Declaration`).build(`id`,`body`,`extends`).field(`id`,n(`Identifier`)).field(`typeParameters`,r(n(`TypeParameterDeclaration`),null),i.null).field(`body`,n(`ObjectTypeAnnotation`)).field(`extends`,[n(`InterfaceExtends`)]),n(`DeclareInterface`).bases(`InterfaceDeclaration`).build(`id`,`body`,`extends`),n(`InterfaceExtends`).bases(`Node`).build(`id`).field(`id`,n(`Identifier`)).field(`typeParameters`,r(n(`TypeParameterInstantiation`),null),i.null),n(`TypeAlias`).bases(`Declaration`).build(`id`,`typeParameters`,`right`).field(`id`,n(`Identifier`)).field(`typeParameters`,r(n(`TypeParameterDeclaration`),null)).field(`right`,n(`FlowType`)),n(`DeclareTypeAlias`).bases(`TypeAlias`).build(`id`,`typeParameters`,`right`),n(`OpaqueType`).bases(`Declaration`).build(`id`,`typeParameters`,`impltype`,`supertype`).field(`id`,n(`Identifier`)).field(`typeParameters`,r(n(`TypeParameterDeclaration`),null)).field(`impltype`,n(`FlowType`)).field(`supertype`,r(n(`FlowType`),null)),n(`DeclareOpaqueType`).bases(`OpaqueType`).build(`id`,`typeParameters`,`supertype`).field(`impltype`,r(n(`FlowType`),null)),n(`TypeCastExpression`).bases(`Expression`).build(`expression`,`typeAnnotation`).field(`expression`,n(`Expression`)).field(`typeAnnotation`,n(`TypeAnnotation`)),n(`TupleTypeAnnotation`).bases(`FlowType`).build(`types`).field(`types`,[n(`FlowType`)]),n(`DeclareVariable`).bases(`Statement`).build(`id`).field(`id`,n(`Identifier`)),n(`DeclareFunction`).bases(`Statement`).build(`id`).field(`id`,n(`Identifier`)).field(`predicate`,r(n(`FlowPredicate`),null),i.null),n(`DeclareClass`).bases(`InterfaceDeclaration`).build(`id`),n(`DeclareModule`).bases(`Statement`).build(`id`,`body`).field(`id`,r(n(`Identifier`),n(`Literal`))).field(`body`,n(`BlockStatement`)),n(`DeclareModuleExports`).bases(`Statement`).build(`typeAnnotation`).field(`typeAnnotation`,n(`TypeAnnotation`)),n(`DeclareExportDeclaration`).bases(`Declaration`).build(`default`,`declaration`,`specifiers`,`source`).field(`default`,Boolean).field(`declaration`,r(n(`DeclareVariable`),n(`DeclareFunction`),n(`DeclareClass`),n(`FlowType`),n(`TypeAlias`),n(`DeclareOpaqueType`),n(`InterfaceDeclaration`),null)).field(`specifiers`,[r(n(`ExportSpecifier`),n(`ExportBatchSpecifier`))],i.emptyArray).field(`source`,r(n(`Literal`),null),i.null),n(`DeclareExportAllDeclaration`).bases(`Declaration`).build(`source`).field(`source`,r(n(`Literal`),null),i.null),n(`ImportDeclaration`).field(`importKind`,r(`value`,`type`,`typeof`),()=>`value`),n(`FlowPredicate`).bases(`Flow`),n(`InferredPredicate`).bases(`FlowPredicate`).build(),n(`DeclaredPredicate`).bases(`FlowPredicate`).build(`value`).field(`value`,n(`Expression`)),n(`Function`).field(`predicate`,r(n(`FlowPredicate`),null),i.null),n(`CallExpression`).field(`typeArguments`,r(null,n(`TypeParameterInstantiation`)),i.null),n(`NewExpression`).field(`typeArguments`,r(null,n(`TypeParameterInstantiation`)),i.null),n(`EnumDeclaration`).bases(`Declaration`).build(`id`,`body`).field(`id`,n(`Identifier`)).field(`body`,r(n(`EnumBooleanBody`),n(`EnumNumberBody`),n(`EnumStringBody`),n(`EnumSymbolBody`))),n(`EnumBooleanBody`).build(`members`,`explicitType`).field(`members`,[n(`EnumBooleanMember`)]).field(`explicitType`,Boolean),n(`EnumNumberBody`).build(`members`,`explicitType`).field(`members`,[n(`EnumNumberMember`)]).field(`explicitType`,Boolean),n(`EnumStringBody`).build(`members`,`explicitType`).field(`members`,r([n(`EnumStringMember`)],[n(`EnumDefaultedMember`)])).field(`explicitType`,Boolean),n(`EnumSymbolBody`).build(`members`).field(`members`,[n(`EnumDefaultedMember`)]),n(`EnumBooleanMember`).build(`id`,`init`).field(`id`,n(`Identifier`)).field(`init`,r(n(`Literal`),Boolean)),n(`EnumNumberMember`).build(`id`,`init`).field(`id`,n(`Identifier`)).field(`init`,n(`Literal`)),n(`EnumStringMember`).build(`id`,`init`).field(`id`,n(`Identifier`)).field(`init`,n(`Literal`)),n(`EnumDefaultedMember`).build(`id`).field(`id`,n(`Identifier`))}function Se(e){e.use(ve);var t=e.use(C),n=e.use(p).defaults,r=t.Type.def,i=t.Type.or;r(`VariableDeclaration`).field(`declarations`,[i(r(`VariableDeclarator`),r(`Identifier`))]),r(`Property`).field(`value`,i(r(`Expression`),r(`Pattern`))),r(`ArrayPattern`).field(`elements`,[i(r(`Pattern`),r(`SpreadElement`),null)]),r(`ObjectPattern`).field(`properties`,[i(r(`Property`),r(`PropertyPattern`),r(`SpreadPropertyPattern`),r(`SpreadProperty`))]),r(`ExportSpecifier`).bases(`ModuleSpecifier`).build(`id`,`name`),r(`ExportBatchSpecifier`).bases(`Specifier`).build(),r(`ExportDeclaration`).bases(`Declaration`).build(`default`,`declaration`,`specifiers`,`source`).field(`default`,Boolean).field(`declaration`,i(r(`Declaration`),r(`Expression`),null)).field(`specifiers`,[i(r(`ExportSpecifier`),r(`ExportBatchSpecifier`))],n.emptyArray).field(`source`,i(r(`Literal`),null),n.null),r(`Block`).bases(`Comment`).build(`value`,`leading`,`trailing`),r(`Line`).bases(`Comment`).build(`value`,`leading`,`trailing`)}function Ce(e){e.use(ve);let t=e.use(C),n=e.use(p).defaults,r=t.Type.def,i=t.Type.or,{undefined:a}=t.builtInTypes;r(`Noop`).bases(`Statement`).build(),r(`DoExpression`).bases(`Expression`).build(`body`).field(`body`,[r(`Statement`)]),r(`BindExpression`).bases(`Expression`).build(`object`,`callee`).field(`object`,i(r(`Expression`),null)).field(`callee`,r(`Expression`)),r(`ParenthesizedExpression`).bases(`Expression`).build(`expression`).field(`expression`,r(`Expression`)),r(`ExportNamespaceSpecifier`).bases(`Specifier`).build(`exported`).field(`exported`,r(`Identifier`)),r(`ExportDefaultSpecifier`).bases(`Specifier`).build(`exported`).field(`exported`,r(`Identifier`)),r(`CommentBlock`).bases(`Comment`).build(`value`,`leading`,`trailing`),r(`CommentLine`).bases(`Comment`).build(`value`,`leading`,`trailing`),r(`Directive`).bases(`Node`).build(`value`).field(`value`,r(`DirectiveLiteral`)),r(`DirectiveLiteral`).bases(`Node`,`Expression`).build(`value`).field(`value`,String,n[`use strict`]),r(`InterpreterDirective`).bases(`Node`).build(`value`).field(`value`,String),r(`BlockStatement`).bases(`Statement`).build(`body`).field(`body`,[r(`Statement`)]).field(`directives`,[r(`Directive`)],n.emptyArray),r(`Program`).bases(`Node`).build(`body`).field(`body`,[r(`Statement`)]).field(`directives`,[r(`Directive`)],n.emptyArray).field(`interpreter`,i(r(`InterpreterDirective`),null),n.null);function o(e=String,n){return[`extra`,{rawValue:e,raw:String},function(){let e=t.getFieldValue(this,`value`);return{rawValue:e,raw:n?n(e):String(e)}}]}r(`StringLiteral`).bases(`Literal`).build(`value`).field(`value`,String).field(...o(String,e=>JSON.stringify(e))),r(`NumericLiteral`).bases(`Literal`).build(`value`).field(`value`,Number).field(`raw`,i(String,null),n.null).field(...o(Number)),r(`BigIntLiteral`).bases(`Literal`).build(`value`).field(`value`,i(String,Number)).field(...o(String,e=>e+`n`)),r(`DecimalLiteral`).bases(`Literal`).build(`value`).field(`value`,String).field(...o(String,e=>e+`m`)),r(`NullLiteral`).bases(`Literal`).build().field(`value`,null,n.null),r(`BooleanLiteral`).bases(`Literal`).build(`value`).field(`value`,Boolean),r(`RegExpLiteral`).bases(`Literal`).build(`pattern`,`flags`).field(`pattern`,String).field(`flags`,String).field(`value`,RegExp,function(){return new RegExp(this.pattern,this.flags)}).field(...o(i(RegExp,a),e=>`/${e.pattern}/${e.flags||``}`)).field(`regex`,{pattern:String,flags:String},function(){return{pattern:this.pattern,flags:this.flags}});var s=i(r(`Property`),r(`ObjectMethod`),r(`ObjectProperty`),r(`SpreadProperty`),r(`SpreadElement`));r(`ObjectExpression`).bases(`Expression`).build(`properties`).field(`properties`,[s]),r(`ObjectMethod`).bases(`Node`,`Function`).build(`kind`,`key`,`params`,`body`,`computed`).field(`kind`,i(`method`,`get`,`set`)).field(`key`,i(r(`Literal`),r(`Identifier`),r(`Expression`))).field(`params`,[r(`Pattern`)]).field(`body`,r(`BlockStatement`)).field(`computed`,Boolean,n.false).field(`generator`,Boolean,n.false).field(`async`,Boolean,n.false).field(`accessibility`,i(r(`Literal`),null),n.null).field(`decorators`,i([r(`Decorator`)],null),n.null),r(`ObjectProperty`).bases(`Node`).build(`key`,`value`).field(`key`,i(r(`Literal`),r(`Identifier`),r(`Expression`))).field(`value`,i(r(`Expression`),r(`Pattern`))).field(`accessibility`,i(r(`Literal`),null),n.null).field(`computed`,Boolean,n.false);var c=i(r(`MethodDefinition`),r(`VariableDeclarator`),r(`ClassPropertyDefinition`),r(`ClassProperty`),r(`ClassPrivateProperty`),r(`ClassMethod`),r(`ClassPrivateMethod`),r(`ClassAccessorProperty`),r(`StaticBlock`));r(`ClassBody`).bases(`Declaration`).build(`body`).field(`body`,[c]),r(`ClassMethod`).bases(`Declaration`,`Function`).build(`kind`,`key`,`params`,`body`,`computed`,`static`).field(`key`,i(r(`Literal`),r(`Identifier`),r(`Expression`))),r(`ClassPrivateMethod`).bases(`Declaration`,`Function`).build(`key`,`params`,`body`,`kind`,`computed`,`static`).field(`key`,r(`PrivateName`)),r(`ClassAccessorProperty`).bases(`Declaration`).build(`key`,`value`,`decorators`,`computed`,`static`).field(`key`,i(r(`Literal`),r(`Identifier`),r(`PrivateName`),r(`Expression`))).field(`value`,i(r(`Expression`),null),n.null),[`ClassMethod`,`ClassPrivateMethod`].forEach(e=>{r(e).field(`kind`,i(`get`,`set`,`method`,`constructor`),()=>`method`).field(`body`,r(`BlockStatement`)).field(`access`,i(`public`,`private`,`protected`,null),n.null)}),[`ClassMethod`,`ClassPrivateMethod`,`ClassAccessorProperty`].forEach(e=>{r(e).field(`computed`,Boolean,n.false).field(`static`,Boolean,n.false).field(`abstract`,Boolean,n.false).field(`accessibility`,i(`public`,`private`,`protected`,null),n.null).field(`decorators`,i([r(`Decorator`)],null),n.null).field(`definite`,Boolean,n.false).field(`optional`,Boolean,n.false).field(`override`,Boolean,n.false).field(`readonly`,Boolean,n.false)});var l=i(r(`Property`),r(`PropertyPattern`),r(`SpreadPropertyPattern`),r(`SpreadProperty`),r(`ObjectProperty`),r(`RestProperty`),r(`RestElement`));r(`ObjectPattern`).bases(`Pattern`).build(`properties`).field(`properties`,[l]).field(`decorators`,i([r(`Decorator`)],null),n.null),r(`SpreadProperty`).bases(`Node`).build(`argument`).field(`argument`,r(`Expression`)),r(`RestProperty`).bases(`Node`).build(`argument`).field(`argument`,r(`Expression`)),r(`ForAwaitStatement`).bases(`Statement`).build(`left`,`right`,`body`).field(`left`,i(r(`VariableDeclaration`),r(`Expression`))).field(`right`,r(`Expression`)).field(`body`,r(`Statement`)),r(`Import`).bases(`Expression`).build()}function we(e){let t=e.use(C).Type.def;e.use(Ce),e.use(xe),t(`V8IntrinsicIdentifier`).bases(`Expression`).build(`name`).field(`name`,String),t(`TopicReference`).bases(`Expression`).build()}function Te(e){e.use(Ce),e.use(be);var t=e.use(C),n=t.namedTypes,r=t.Type.def,i=t.Type.or,a=e.use(p).defaults,o=t.Type.from(function(e,t){return!!(n.StringLiteral&&n.StringLiteral.check(e,t)||n.Literal&&n.Literal.check(e,t)&&typeof e.value==`string`)},`StringLiteral`);r(`TSType`).bases(`Node`);var s=i(r(`Identifier`),r(`TSQualifiedName`));r(`TSTypeReference`).bases(`TSType`,`TSHasOptionalTypeParameterInstantiation`).build(`typeName`,`typeParameters`).field(`typeName`,s),r(`TSHasOptionalTypeParameterInstantiation`).field(`typeParameters`,i(r(`TSTypeParameterInstantiation`),null),a.null),r(`TSHasOptionalTypeParameters`).field(`typeParameters`,i(r(`TSTypeParameterDeclaration`),null,void 0),a.null),r(`TSHasOptionalTypeAnnotation`).field(`typeAnnotation`,i(r(`TSTypeAnnotation`),null),a.null),r(`TSQualifiedName`).bases(`Node`).build(`left`,`right`).field(`left`,s).field(`right`,s),r(`TSAsExpression`).bases(`Expression`,`Pattern`).build(`expression`,`typeAnnotation`).field(`expression`,r(`Expression`)).field(`typeAnnotation`,r(`TSType`)).field(`extra`,i({parenthesized:Boolean},null),a.null),r(`TSTypeCastExpression`).bases(`Expression`).build(`expression`,`typeAnnotation`).field(`expression`,r(`Expression`)).field(`typeAnnotation`,r(`TSType`)),r(`TSSatisfiesExpression`).bases(`Expression`,`Pattern`).build(`expression`,`typeAnnotation`).field(`expression`,r(`Expression`)).field(`typeAnnotation`,r(`TSType`)),r(`TSNonNullExpression`).bases(`Expression`,`Pattern`).build(`expression`).field(`expression`,r(`Expression`)),[`TSAnyKeyword`,`TSBigIntKeyword`,`TSBooleanKeyword`,`TSNeverKeyword`,`TSNullKeyword`,`TSNumberKeyword`,`TSObjectKeyword`,`TSStringKeyword`,`TSSymbolKeyword`,`TSUndefinedKeyword`,`TSUnknownKeyword`,`TSVoidKeyword`,`TSIntrinsicKeyword`,`TSThisType`].forEach(e=>{r(e).bases(`TSType`).build()}),r(`TSArrayType`).bases(`TSType`).build(`elementType`).field(`elementType`,r(`TSType`)),r(`TSLiteralType`).bases(`TSType`).build(`literal`).field(`literal`,i(r(`NumericLiteral`),r(`StringLiteral`),r(`BooleanLiteral`),r(`TemplateLiteral`),r(`UnaryExpression`),r(`BigIntLiteral`))),r(`TemplateLiteral`).field(`expressions`,i([r(`Expression`)],[r(`TSType`)])),[`TSUnionType`,`TSIntersectionType`].forEach(e=>{r(e).bases(`TSType`).build(`types`).field(`types`,[r(`TSType`)])}),r(`TSConditionalType`).bases(`TSType`).build(`checkType`,`extendsType`,`trueType`,`falseType`).field(`checkType`,r(`TSType`)).field(`extendsType`,r(`TSType`)).field(`trueType`,r(`TSType`)).field(`falseType`,r(`TSType`)),r(`TSInferType`).bases(`TSType`).build(`typeParameter`).field(`typeParameter`,r(`TSTypeParameter`)),r(`TSParenthesizedType`).bases(`TSType`).build(`typeAnnotation`).field(`typeAnnotation`,r(`TSType`));var c=[i(r(`Identifier`),r(`RestElement`),r(`ArrayPattern`),r(`ObjectPattern`))];[`TSFunctionType`,`TSConstructorType`].forEach(e=>{r(e).bases(`TSType`,`TSHasOptionalTypeParameters`,`TSHasOptionalTypeAnnotation`).build(`parameters`).field(`parameters`,c)}),r(`TSDeclareFunction`).bases(`Declaration`,`TSHasOptionalTypeParameters`).build(`id`,`params`,`returnType`).field(`declare`,Boolean,a.false).field(`async`,Boolean,a.false).field(`generator`,Boolean,a.false).field(`id`,i(r(`Identifier`),null),a.null).field(`params`,[r(`Pattern`)]).field(`returnType`,i(r(`TSTypeAnnotation`),r(`Noop`),null),a.null),r(`TSDeclareMethod`).bases(`Declaration`,`TSHasOptionalTypeParameters`).build(`key`,`params`,`returnType`).field(`async`,Boolean,a.false).field(`generator`,Boolean,a.false).field(`params`,[r(`Pattern`)]).field(`abstract`,Boolean,a.false).field(`accessibility`,i(`public`,`private`,`protected`,void 0),a.undefined).field(`static`,Boolean,a.false).field(`computed`,Boolean,a.false).field(`optional`,Boolean,a.false).field(`key`,i(r(`Identifier`),r(`StringLiteral`),r(`NumericLiteral`),r(`Expression`))).field(`kind`,i(`get`,`set`,`method`,`constructor`),function(){return`method`}).field(`access`,i(`public`,`private`,`protected`,void 0),a.undefined).field(`decorators`,i([r(`Decorator`)],null),a.null).field(`returnType`,i(r(`TSTypeAnnotation`),r(`Noop`),null),a.null),r(`TSMappedType`).bases(`TSType`).build(`typeParameter`,`typeAnnotation`).field(`readonly`,i(Boolean,`+`,`-`),a.false).field(`typeParameter`,r(`TSTypeParameter`)).field(`optional`,i(Boolean,`+`,`-`),a.false).field(`typeAnnotation`,i(r(`TSType`),null),a.null),r(`TSTupleType`).bases(`TSType`).build(`elementTypes`).field(`elementTypes`,[i(r(`TSType`),r(`TSNamedTupleMember`))]),r(`TSNamedTupleMember`).bases(`TSType`).build(`label`,`elementType`,`optional`).field(`label`,r(`Identifier`)).field(`optional`,Boolean,a.false).field(`elementType`,r(`TSType`)),r(`TSRestType`).bases(`TSType`).build(`typeAnnotation`).field(`typeAnnotation`,r(`TSType`)),r(`TSOptionalType`).bases(`TSType`).build(`typeAnnotation`).field(`typeAnnotation`,r(`TSType`)),r(`TSIndexedAccessType`).bases(`TSType`).build(`objectType`,`indexType`).field(`objectType`,r(`TSType`)).field(`indexType`,r(`TSType`)),r(`TSTypeOperator`).bases(`TSType`).build(`operator`).field(`operator`,String).field(`typeAnnotation`,r(`TSType`)),r(`TSTypeAnnotation`).bases(`Node`).build(`typeAnnotation`).field(`typeAnnotation`,i(r(`TSType`),r(`TSTypeAnnotation`))),r(`TSIndexSignature`).bases(`Declaration`,`TSHasOptionalTypeAnnotation`).build(`parameters`,`typeAnnotation`).field(`parameters`,[r(`Identifier`)]).field(`readonly`,Boolean,a.false),r(`TSPropertySignature`).bases(`Declaration`,`TSHasOptionalTypeAnnotation`).build(`key`,`typeAnnotation`,`optional`).field(`key`,r(`Expression`)).field(`computed`,Boolean,a.false).field(`readonly`,Boolean,a.false).field(`optional`,Boolean,a.false).field(`initializer`,i(r(`Expression`),null),a.null),r(`TSMethodSignature`).bases(`Declaration`,`TSHasOptionalTypeParameters`,`TSHasOptionalTypeAnnotation`).build(`key`,`parameters`,`typeAnnotation`).field(`key`,r(`Expression`)).field(`computed`,Boolean,a.false).field(`optional`,Boolean,a.false).field(`parameters`,c),r(`TSTypePredicate`).bases(`TSTypeAnnotation`,`TSType`).build(`parameterName`,`typeAnnotation`,`asserts`).field(`parameterName`,i(r(`Identifier`),r(`TSThisType`))).field(`typeAnnotation`,i(r(`TSTypeAnnotation`),null),a.null).field(`asserts`,Boolean,a.false),[`TSCallSignatureDeclaration`,`TSConstructSignatureDeclaration`].forEach(e=>{r(e).bases(`Declaration`,`TSHasOptionalTypeParameters`,`TSHasOptionalTypeAnnotation`).build(`parameters`,`typeAnnotation`).field(`parameters`,c)}),r(`TSEnumMember`).bases(`Node`).build(`id`,`initializer`).field(`id`,i(r(`Identifier`),o)).field(`initializer`,i(r(`Expression`),null),a.null),r(`TSTypeQuery`).bases(`TSType`).build(`exprName`).field(`exprName`,i(s,r(`TSImportType`)));var l=i(r(`TSCallSignatureDeclaration`),r(`TSConstructSignatureDeclaration`),r(`TSIndexSignature`),r(`TSMethodSignature`),r(`TSPropertySignature`));r(`TSTypeLiteral`).bases(`TSType`).build(`members`).field(`members`,[l]),r(`TSTypeParameter`).bases(`Identifier`).build(`name`,`constraint`,`default`).field(`name`,i(r(`Identifier`),String)).field(`constraint`,i(r(`TSType`),void 0),a.undefined).field(`default`,i(r(`TSType`),void 0),a.undefined),r(`TSTypeAssertion`).bases(`Expression`,`Pattern`).build(`typeAnnotation`,`expression`).field(`typeAnnotation`,r(`TSType`)).field(`expression`,r(`Expression`)).field(`extra`,i({parenthesized:Boolean},null),a.null),r(`TSTypeParameterDeclaration`).bases(`Declaration`).build(`params`).field(`params`,[r(`TSTypeParameter`)]),r(`TSInstantiationExpression`).bases(`Expression`,`TSHasOptionalTypeParameterInstantiation`).build(`expression`,`typeParameters`).field(`expression`,r(`Expression`)),r(`TSTypeParameterInstantiation`).bases(`Node`).build(`params`).field(`params`,[r(`TSType`)]),r(`TSEnumDeclaration`).bases(`Declaration`).build(`id`,`members`).field(`id`,r(`Identifier`)).field(`const`,Boolean,a.false).field(`declare`,Boolean,a.false).field(`members`,[r(`TSEnumMember`)]).field(`initializer`,i(r(`Expression`),null),a.null),r(`TSTypeAliasDeclaration`).bases(`Declaration`,`TSHasOptionalTypeParameters`).build(`id`,`typeAnnotation`).field(`id`,r(`Identifier`)).field(`declare`,Boolean,a.false).field(`typeAnnotation`,r(`TSType`)),r(`TSModuleBlock`).bases(`Node`).build(`body`).field(`body`,[r(`Statement`)]),r(`TSModuleDeclaration`).bases(`Declaration`).build(`id`,`body`).field(`id`,i(o,s)).field(`declare`,Boolean,a.false).field(`global`,Boolean,a.false).field(`body`,i(r(`TSModuleBlock`),r(`TSModuleDeclaration`),null),a.null),r(`TSImportType`).bases(`TSType`,`TSHasOptionalTypeParameterInstantiation`).build(`argument`,`qualifier`,`typeParameters`).field(`argument`,o).field(`qualifier`,i(s,void 0),a.undefined),r(`TSImportEqualsDeclaration`).bases(`Declaration`).build(`id`,`moduleReference`).field(`id`,r(`Identifier`)).field(`isExport`,Boolean,a.false).field(`moduleReference`,i(s,r(`TSExternalModuleReference`))),r(`TSExternalModuleReference`).bases(`Declaration`).build(`expression`).field(`expression`,o),r(`TSExportAssignment`).bases(`Statement`).build(`expression`).field(`expression`,r(`Expression`)),r(`TSNamespaceExportDeclaration`).bases(`Declaration`).build(`id`).field(`id`,r(`Identifier`)),r(`TSInterfaceBody`).bases(`Node`).build(`body`).field(`body`,[l]),r(`TSExpressionWithTypeArguments`).bases(`TSType`,`TSHasOptionalTypeParameterInstantiation`).build(`expression`,`typeParameters`).field(`expression`,s),r(`TSInterfaceDeclaration`).bases(`Declaration`,`TSHasOptionalTypeParameters`).build(`id`,`body`).field(`id`,s).field(`declare`,Boolean,a.false).field(`extends`,i([r(`TSExpressionWithTypeArguments`)],null),a.null).field(`body`,r(`TSInterfaceBody`)),r(`TSParameterProperty`).bases(`Pattern`).build(`parameter`).field(`accessibility`,i(`public`,`private`,`protected`,void 0),a.undefined).field(`readonly`,Boolean,a.false).field(`parameter`,i(r(`Identifier`),r(`AssignmentPattern`))),r(`ClassProperty`).field(`access`,i(`public`,`private`,`protected`,void 0),a.undefined),r(`ClassAccessorProperty`).bases(`Declaration`,`TSHasOptionalTypeAnnotation`),r(`ClassBody`).field(`body`,[i(r(`MethodDefinition`),r(`VariableDeclarator`),r(`ClassPropertyDefinition`),r(`ClassProperty`),r(`ClassPrivateProperty`),r(`ClassAccessorProperty`),r(`ClassMethod`),r(`ClassPrivateMethod`),r(`StaticBlock`),r(`TSDeclareMethod`),l)])}let M;(function(e){})(M||={});const{astNodesAreEquivalent:Ee,builders:N,builtInTypes:P,defineMethod:De,eachField:Oe,finalize:ke,getBuilderName:Ae,getFieldNames:je,getFieldValue:F,getSupertypeNames:Me,namedTypes:Ne,NodePath:Pe,Path:Fe,PathVisitor:Ie,someField:Le,Type:Re,use:ze,visit:Be}=se([ve,ye,xe,Se,we,Te]);Object.assign(M,Ne);var Ve=u({"node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/base64.js":(e=>{var t=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`.split(``);e.encode=function(e){if(0<=e&&e<t.length)return t[e];throw TypeError(`Must be between 0 and 63: `+e)},e.decode=function(e){var t=65,n=90,r=97,i=122,a=48;return t<=e&&e<=n?e-t:r<=e&&e<=i?e-r+26:a<=e&&e<=57?e-a+52:e==43?62:e==47?63:-1}})}),He=u({"node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/base64-vlq.js":(e=>{var t=Ve(),n=5,r=1<<n,i=r-1,a=r;function o(e){return e<0?(-e<<1)+1:(e<<1)+0}function s(e){var t=(e&1)==1,n=e>>1;return t?-n:n}e.encode=function(e){var r=``,s,c=o(e);do s=c&i,c>>>=n,c>0&&(s|=a),r+=t.encode(s);while(c>0);return r},e.decode=function(e,r,o){var c=e.length,l=0,u=0,d,f;do{if(r>=c)throw Error(`Expected more digits in base 64 VLQ value.`);if(f=t.decode(e.charCodeAt(r++)),f===-1)throw Error(`Invalid base64 digit: `+e.charAt(r-1));d=!!(f&a),f&=i,l+=f<<u,u+=n}while(d);o.value=s(l),o.rest=r}})}),Ue=u({"node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/util.js":(e=>{function t(e,t,n){if(t in e)return e[t];if(arguments.length===3)return n;throw Error(`"`+t+`" is a required argument.`)}e.getArg=t;var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,r=/^data:.+\,.+$/;function i(e){var t=e.match(n);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}e.urlParse=i;function a(e){var t=``;return e.scheme&&(t+=e.scheme+`:`),t+=`//`,e.auth&&(t+=e.auth+`@`),e.host&&(t+=e.host),e.port&&(t+=`:`+e.port),e.path&&(t+=e.path),t}e.urlGenerate=a;var o=32;function s(e){var t=[];return function(n){for(var r=0;r<t.length;r++)if(t[r].input===n){var i=t[0];return t[0]=t[r],t[r]=i,t[0].result}var a=e(n);return t.unshift({input:n,result:a}),t.length>o&&t.pop(),a}}var c=s(function(t){var n=t,r=i(t);if(r){if(!r.path)return t;n=r.path}for(var o=e.isAbsolute(n),s=[],c=0,l=0;;)if(c=l,l=n.indexOf(`/`,c),l===-1){s.push(n.slice(c));break}else for(s.push(n.slice(c,l));l<n.length&&n[l]===`/`;)l++;for(var u,d=0,l=s.length-1;l>=0;l--)u=s[l],u===`.`?s.splice(l,1):u===`..`?d++:d>0&&(u===``?(s.splice(l+1,d),d=0):(s.splice(l,2),d--));return n=s.join(`/`),n===``&&(n=o?`/`:`.`),r?(r.path=n,a(r)):n});e.normalize=c;function l(e,t){e===``&&(e=`.`),t===``&&(t=`.`);var n=i(t),o=i(e);if(o&&(e=o.path||`/`),n&&!n.scheme)return o&&(n.scheme=o.scheme),a(n);if(n||t.match(r))return t;if(o&&!o.host&&!o.path)return o.host=t,a(o);var s=t.charAt(0)===`/`?t:c(e.replace(/\/+$/,``)+`/`+t);return o?(o.path=s,a(o)):s}e.join=l,e.isAbsolute=function(e){return e.charAt(0)===`/`||n.test(e)};function u(e,t){e===``&&(e=`.`),e=e.replace(/\/$/,``);for(var n=0;t.indexOf(e+`/`)!==0;){var r=e.lastIndexOf(`/`);if(r<0||(e=e.slice(0,r),e.match(/^([^\/]+:\/)?\/*$/)))return t;++n}return Array(n+1).join(`../`)+t.substr(e.length+1)}e.relative=u;var d=function(){return!(`__proto__`in Object.create(null))}();function f(e){return e}function p(e){return h(e)?`$`+e:e}e.toSetString=d?f:p;function m(e){return h(e)?e.slice(1):e}e.fromSetString=d?f:m;function h(e){if(!e)return!1;var t=e.length;if(t<9||e.charCodeAt(t-1)!==95||e.charCodeAt(t-2)!==95||e.charCodeAt(t-3)!==111||e.charCodeAt(t-4)!==116||e.charCodeAt(t-5)!==111||e.charCodeAt(t-6)!==114||e.charCodeAt(t-7)!==112||e.charCodeAt(t-8)!==95||e.charCodeAt(t-9)!==95)return!1;for(var n=t-10;n>=0;n--)if(e.charCodeAt(n)!==36)return!1;return!0}function g(e,t,n){var r=b(e.source,t.source);return r!==0||(r=e.originalLine-t.originalLine,r!==0)||(r=e.originalColumn-t.originalColumn,r!==0||n)||(r=e.generatedColumn-t.generatedColumn,r!==0)||(r=e.generatedLine-t.generatedLine,r!==0)?r:b(e.name,t.name)}e.compareByOriginalPositions=g;function _(e,t,n){var r=e.originalLine-t.originalLine;return r!==0||(r=e.originalColumn-t.originalColumn,r!==0||n)||(r=e.generatedColumn-t.generatedColumn,r!==0)||(r=e.generatedLine-t.generatedLine,r!==0)?r:b(e.name,t.name)}e.compareByOriginalPositionsNoSource=_;function v(e,t,n){var r=e.generatedLine-t.generatedLine;return r!==0||(r=e.generatedColumn-t.generatedColumn,r!==0||n)||(r=b(e.source,t.source),r!==0)||(r=e.originalLine-t.originalLine,r!==0)||(r=e.originalColumn-t.originalColumn,r!==0)?r:b(e.name,t.name)}e.compareByGeneratedPositionsDeflated=v;function y(e,t,n){var r=e.generatedColumn-t.generatedColumn;return r!==0||n||(r=b(e.source,t.source),r!==0)||(r=e.originalLine-t.originalLine,r!==0)||(r=e.originalColumn-t.originalColumn,r!==0)?r:b(e.name,t.name)}e.compareByGeneratedPositionsDeflatedNoLine=y;function b(e,t){return e===t?0:e===null?1:t===null?-1:e>t?1:-1}function ee(e,t){var n=e.generatedLine-t.generatedLine;return n!==0||(n=e.generatedColumn-t.generatedColumn,n!==0)||(n=b(e.source,t.source),n!==0)||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0)?n:b(e.name,t.name)}e.compareByGeneratedPositionsInflated=ee;function x(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,``))}e.parseSourceMapInput=x;function S(e,t,n){if(t||=``,e&&(e[e.length-1]!==`/`&&t[0]!==`/`&&(e+=`/`),t=e+t),n){var r=i(n);if(!r)throw Error(`sourceMapURL could not be parsed`);if(r.path){var o=r.path.lastIndexOf(`/`);o>=0&&(r.path=r.path.substring(0,o+1))}t=l(a(r),t)}return c(t)}e.computeSourceURL=S})}),We=u({"node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/array-set.js":(e=>{var t=Ue(),n=Object.prototype.hasOwnProperty,r=typeof Map<`u`;function i(){this._array=[],this._set=r?new Map:Object.create(null)}i.fromArray=function(e,t){for(var n=new i,r=0,a=e.length;r<a;r++)n.add(e[r],t);return n},i.prototype.size=function(){return r?this._set.size:Object.getOwnPropertyNames(this._set).length},i.prototype.add=function(e,i){var a=r?e:t.toSetString(e),o=r?this.has(e):n.call(this._set,a),s=this._array.length;(!o||i)&&this._array.push(e),o||(r?this._set.set(e,s):this._set[a]=s)},i.prototype.has=function(e){if(r)return this._set.has(e);var i=t.toSetString(e);return n.call(this._set,i)},i.prototype.indexOf=function(e){if(r){var i=this._set.get(e);if(i>=0)return i}else{var a=t.toSetString(e);if(n.call(this._set,a))return this._set[a]}throw Error(`"`+e+`" is not in the set.`)},i.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw Error(`No element indexed by `+e)},i.prototype.toArray=function(){return this._array.slice()},e.ArraySet=i})}),Ge=u({"node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/mapping-list.js":(e=>{var t=Ue();function n(e,n){var r=e.generatedLine,i=n.generatedLine,a=e.generatedColumn,o=n.generatedColumn;return i>r||i==r&&o>=a||t.compareByGeneratedPositionsInflated(e,n)<=0}function r(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}r.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},r.prototype.add=function(e){n(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},r.prototype.toArray=function(){return this._sorted||=(this._array.sort(t.compareByGeneratedPositionsInflated),!0),this._array},e.MappingList=r})}),Ke=u({"node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/source-map-generator.js":(e=>{var t=He(),n=Ue(),r=We().ArraySet,i=Ge().MappingList;function a(e){e||={},this._file=n.getArg(e,`file`,null),this._sourceRoot=n.getArg(e,`sourceRoot`,null),this._skipValidation=n.getArg(e,`skipValidation`,!1),this._ignoreInvalidMapping=n.getArg(e,`ignoreInvalidMapping`,!1),this._sources=new r,this._names=new r,this._mappings=new i,this._sourcesContents=null}a.prototype._version=3,a.fromSourceMap=function(e,t){var r=e.sourceRoot,i=new a(Object.assign(t||{},{file:e.file,sourceRoot:r}));return e.eachMapping(function(e){var t={generated:{line:e.generatedLine,column:e.generatedColumn}};e.source!=null&&(t.source=e.source,r!=null&&(t.source=n.relative(r,t.source)),t.original={line:e.originalLine,column:e.originalColumn},e.name!=null&&(t.name=e.name)),i.addMapping(t)}),e.sources.forEach(function(t){var a=t;r!==null&&(a=n.relative(r,t)),i._sources.has(a)||i._sources.add(a);var o=e.sourceContentFor(t);o!=null&&i.setSourceContent(t,o)}),i},a.prototype.addMapping=function(e){var t=n.getArg(e,`generated`),r=n.getArg(e,`original`,null),i=n.getArg(e,`source`,null),a=n.getArg(e,`name`,null);!this._skipValidation&&this._validateMapping(t,r,i,a)===!1||(i!=null&&(i=String(i),this._sources.has(i)||this._sources.add(i)),a!=null&&(a=String(a),this._names.has(a)||this._names.add(a)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:r!=null&&r.line,originalColumn:r!=null&&r.column,source:i,name:a}))},a.prototype.setSourceContent=function(e,t){var r=e;this._sourceRoot!=null&&(r=n.relative(this._sourceRoot,r)),t==null?this._sourcesContents&&(delete this._sourcesContents[n.toSetString(r)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null)):(this._sourcesContents||=Object.create(null),this._sourcesContents[n.toSetString(r)]=t)},a.prototype.applySourceMap=function(e,t,i){var a=t;if(t==null){if(e.file==null)throw Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);a=e.file}var o=this._sourceRoot;o!=null&&(a=n.relative(o,a));var s=new r,c=new r;this._mappings.unsortedForEach(function(t){if(t.source===a&&t.originalLine!=null){var r=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});r.source!=null&&(t.source=r.source,i!=null&&(t.source=n.join(i,t.source)),o!=null&&(t.source=n.relative(o,t.source)),t.originalLine=r.line,t.originalColumn=r.column,r.name!=null&&(t.name=r.name))}var l=t.source;l!=null&&!s.has(l)&&s.add(l);var u=t.name;u!=null&&!c.has(u)&&c.add(u)},this),this._sources=s,this._names=c,e.sources.forEach(function(t){var r=e.sourceContentFor(t);r!=null&&(i!=null&&(t=n.join(i,t)),o!=null&&(t=n.relative(o,t)),this.setSourceContent(t,r))},this)},a.prototype._validateMapping=function(e,t,n,r){if(t&&typeof t.line!=`number`&&typeof t.column!=`number`){var i=`original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.`;if(this._ignoreInvalidMapping)return typeof console<`u`&&console.warn&&console.warn(i),!1;throw Error(i)}if(!(e&&`line`in e&&`column`in e&&e.line>0&&e.column>=0&&!t&&!n&&!r)&&!(e&&`line`in e&&`column`in e&&t&&`line`in t&&`column`in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&n)){var i=`Invalid mapping: `+JSON.stringify({generated:e,source:n,original:t,name:r});if(this._ignoreInvalidMapping)return typeof console<`u`&&console.warn&&console.warn(i),!1;throw Error(i)}},a.prototype._serializeMappings=function(){for(var e=0,r=1,i=0,a=0,o=0,s=0,c=``,l,u,d,f,p=this._mappings.toArray(),m=0,h=p.length;m<h;m++){if(u=p[m],l=``,u.generatedLine!==r)for(e=0;u.generatedLine!==r;)l+=`;`,r++;else if(m>0){if(!n.compareByGeneratedPositionsInflated(u,p[m-1]))continue;l+=`,`}l+=t.encode(u.generatedColumn-e),e=u.generatedColumn,u.source!=null&&(f=this._sources.indexOf(u.source),l+=t.encode(f-s),s=f,l+=t.encode(u.originalLine-1-a),a=u.originalLine-1,l+=t.encode(u.originalColumn-i),i=u.originalColumn,u.name!=null&&(d=this._names.indexOf(u.name),l+=t.encode(d-o),o=d)),c+=l}return c},a.prototype._generateSourcesContent=function(e,t){return e.map(function(e){if(!this._sourcesContents)return null;t!=null&&(e=n.relative(t,e));var r=n.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null},this)},a.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(e.file=this._file),this._sourceRoot!=null&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},a.prototype.toString=function(){return JSON.stringify(this.toJSON())},e.SourceMapGenerator=a})}),qe=u({"node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/binary-search.js":(e=>{e.GREATEST_LOWER_BOUND=1,e.LEAST_UPPER_BOUND=2;function t(n,r,i,a,o,s){var c=Math.floor((r-n)/2)+n,l=o(i,a[c],!0);return l===0?c:l>0?r-c>1?t(c,r,i,a,o,s):s==e.LEAST_UPPER_BOUND?r<a.length?r:-1:c:c-n>1?t(n,c,i,a,o,s):s==e.LEAST_UPPER_BOUND?c:n<0?-1:n}e.search=function(n,r,i,a){if(r.length===0)return-1;var o=t(-1,r.length,n,r,i,a||e.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&i(r[o],r[o-1],!0)===0;)--o;return o}})}),Je=u({"node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/quick-sort.js":(e=>{function t(e){function t(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function n(e,t){return Math.round(e+Math.random()*(t-e))}function r(e,i,a,o){if(a<o){var s=n(a,o),c=a-1;t(e,s,o);for(var l=e[o],u=a;u<o;u++)i(e[u],l,!1)<=0&&(c+=1,t(e,c,u));t(e,c+1,u);var d=c+1;r(e,i,a,d-1),r(e,i,d+1,o)}}return r}function n(e){let n=t.toString();return Function(`return ${n}`)()(e)}let r=new WeakMap;e.quickSort=function(e,t,i=0){let a=r.get(t);a===void 0&&(a=n(t),r.set(t,a)),a(e,t,i,e.length-1)}})}),Ye=u({"node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/source-map-consumer.js":(e=>{var t=Ue(),n=qe(),r=We().ArraySet,i=He(),a=Je().quickSort;function o(e,n){var r=e;return typeof e==`string`&&(r=t.parseSourceMapInput(e)),r.sections==null?new s(r,n):new d(r,n)}o.fromSourceMap=function(e,t){return s.fromSourceMap(e,t)},o.prototype._version=3,o.prototype.__generatedMappings=null,Object.defineProperty(o.prototype,`_generatedMappings`,{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),o.prototype.__originalMappings=null,Object.defineProperty(o.prototype,`_originalMappings`,{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),o.prototype._charIsMappingSeparator=function(e,t){var n=e.charAt(t);return n===`;`||n===`,`},o.prototype._parseMappings=function(e,t){throw Error(`Subclasses must implement _parseMappings`)},o.GENERATED_ORDER=1,o.ORIGINAL_ORDER=2,o.GREATEST_LOWER_BOUND=1,o.LEAST_UPPER_BOUND=2,o.prototype.eachMapping=function(e,n,r){var i=n||null,a=r||o.GENERATED_ORDER,s;switch(a){case o.GENERATED_ORDER:s=this._generatedMappings;break;case o.ORIGINAL_ORDER:s=this._originalMappings;break;default:throw Error(`Unknown order of iteration.`)}for(var c=this.sourceRoot,l=e.bind(i),u=this._names,d=this._sources,f=this._sourceMapURL,p=0,m=s.length;p<m;p++){var h=s[p],g=h.source===null?null:d.at(h.source);g!==null&&(g=t.computeSourceURL(c,g,f)),l({source:g,generatedLine:h.generatedLine,generatedColumn:h.generatedColumn,originalLine:h.originalLine,originalColumn:h.originalColumn,name:h.name===null?null:u.at(h.name)})}},o.prototype.allGeneratedPositionsFor=function(e){var r=t.getArg(e,`line`),i={source:t.getArg(e,`source`),originalLine:r,originalColumn:t.getArg(e,`column`,0)};if(i.source=this._findSourceIndex(i.source),i.source<0)return[];var a=[],o=this._findMapping(i,this._originalMappings,`originalLine`,`originalColumn`,t.compareByOriginalPositions,n.LEAST_UPPER_BOUND);if(o>=0){var s=this._originalMappings[o];if(e.column===void 0)for(var c=s.originalLine;s&&s.originalLine===c;)a.push({line:t.getArg(s,`generatedLine`,null),column:t.getArg(s,`generatedColumn`,null),lastColumn:t.getArg(s,`lastGeneratedColumn`,null)}),s=this._originalMappings[++o];else for(var l=s.originalColumn;s&&s.originalLine===r&&s.originalColumn==l;)a.push({line:t.getArg(s,`generatedLine`,null),column:t.getArg(s,`generatedColumn`,null),lastColumn:t.getArg(s,`lastGeneratedColumn`,null)}),s=this._originalMappings[++o]}return a},e.SourceMapConsumer=o;function s(e,n){var i=e;typeof e==`string`&&(i=t.parseSourceMapInput(e));var a=t.getArg(i,`version`),o=t.getArg(i,`sources`),s=t.getArg(i,`names`,[]),c=t.getArg(i,`sourceRoot`,null),l=t.getArg(i,`sourcesContent`,null),u=t.getArg(i,`mappings`),d=t.getArg(i,`file`,null);if(a!=this._version)throw Error(`Unsupported version: `+a);c&&=t.normalize(c),o=o.map(String).map(t.normalize).map(function(e){return c&&t.isAbsolute(c)&&t.isAbsolute(e)?t.relative(c,e):e}),this._names=r.fromArray(s.map(String),!0),this._sources=r.fromArray(o,!0),this._absoluteSources=this._sources.toArray().map(function(e){return t.computeSourceURL(c,e,n)}),this.sourceRoot=c,this.sourcesContent=l,this._mappings=u,this._sourceMapURL=n,this.file=d}s.prototype=Object.create(o.prototype),s.prototype.consumer=o,s.prototype._findSourceIndex=function(e){var n=e;if(this.sourceRoot!=null&&(n=t.relative(this.sourceRoot,n)),this._sources.has(n))return this._sources.indexOf(n);var r;for(r=0;r<this._absoluteSources.length;++r)if(this._absoluteSources[r]==e)return r;return-1},s.fromSourceMap=function(e,n){var i=Object.create(s.prototype),o=i._names=r.fromArray(e._names.toArray(),!0),l=i._sources=r.fromArray(e._sources.toArray(),!0);i.sourceRoot=e._sourceRoot,i.sourcesContent=e._generateSourcesContent(i._sources.toArray(),i.sourceRoot),i.file=e._file,i._sourceMapURL=n,i._absoluteSources=i._sources.toArray().map(function(e){return t.computeSourceURL(i.sourceRoot,e,n)});for(var u=e._mappings.toArray().slice(),d=i.__generatedMappings=[],f=i.__originalMappings=[],p=0,m=u.length;p<m;p++){var h=u[p],g=new c;g.generatedLine=h.generatedLine,g.generatedColumn=h.generatedColumn,h.source&&(g.source=l.indexOf(h.source),g.originalLine=h.originalLine,g.originalColumn=h.originalColumn,h.name&&(g.name=o.indexOf(h.name)),f.push(g)),d.push(g)}return a(i.__originalMappings,t.compareByOriginalPositions),i},s.prototype._version=3,Object.defineProperty(s.prototype,`sources`,{get:function(){return this._absoluteSources.slice()}});function c(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}let l=t.compareByGeneratedPositionsDeflatedNoLine;function u(e,t){let n=e.length,r=e.length-t;if(!(r<=1))if(r==2){let n=e[t],r=e[t+1];l(n,r)>0&&(e[t]=r,e[t+1]=n)}else if(r<20)for(let r=t;r<n;r++)for(let n=r;n>t;n--){let t=e[n-1],r=e[n];if(l(t,r)<=0)break;e[n-1]=r,e[n]=t}else a(e,l,t)}s.prototype._parseMappings=function(e,n){var r=1,o=0,s=0,l=0,d=0,f=0,p=e.length,m=0,h={},g=[],_=[],v,y,b,ee;let x=0;for(;m<p;)if(e.charAt(m)===`;`)r++,m++,o=0,u(_,x),x=_.length;else if(e.charAt(m)===`,`)m++;else{for(v=new c,v.generatedLine=r,b=m;b<p&&!this._charIsMappingSeparator(e,b);b++);for(e.slice(m,b),y=[];m<b;)i.decode(e,m,h),ee=h.value,m=h.rest,y.push(ee);if(y.length===2)throw Error(`Found a source, but no line and column`);if(y.length===3)throw Error(`Found a source and line, but no column`);if(v.generatedColumn=o+y[0],o=v.generatedColumn,y.length>1&&(v.source=d+y[1],d+=y[1],v.originalLine=s+y[2],s=v.originalLine,v.originalLine+=1,v.originalColumn=l+y[3],l=v.originalColumn,y.length>4&&(v.name=f+y[4],f+=y[4])),_.push(v),typeof v.originalLine==`number`){let e=v.source;for(;g.length<=e;)g.push(null);g[e]===null&&(g[e]=[]),g[e].push(v)}}u(_,x),this.__generatedMappings=_;for(var S=0;S<g.length;S++)g[S]!=null&&a(g[S],t.compareByOriginalPositionsNoSource);this.__originalMappings=[].concat(...g)},s.prototype._findMapping=function(e,t,r,i,a,o){if(e[r]<=0)throw TypeError(`Line must be greater than or equal to 1, got `+e[r]);if(e[i]<0)throw TypeError(`Column must be greater than or equal to 0, got `+e[i]);return n.search(e,t,a,o)},s.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var t=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var n=this._generatedMappings[e+1];if(t.generatedLine===n.generatedLine){t.lastGeneratedColumn=n.generatedColumn-1;continue}}t.lastGeneratedColumn=1/0}},s.prototype.originalPositionFor=function(e){var n={generatedLine:t.getArg(e,`line`),generatedColumn:t.getArg(e,`column`)},r=this._findMapping(n,this._generatedMappings,`generatedLine`,`generatedColumn`,t.compareByGeneratedPositionsDeflated,t.getArg(e,`bias`,o.GREATEST_LOWER_BOUND));if(r>=0){var i=this._generatedMappings[r];if(i.generatedLine===n.generatedLine){var a=t.getArg(i,`source`,null);a!==null&&(a=this._sources.at(a),a=t.computeSourceURL(this.sourceRoot,a,this._sourceMapURL));var s=t.getArg(i,`name`,null);return s!==null&&(s=this._names.at(s)),{source:a,line:t.getArg(i,`originalLine`,null),column:t.getArg(i,`originalColumn`,null),name:s}}}return{source:null,line:null,column:null,name:null}},s.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1},s.prototype.sourceContentFor=function(e,n){if(!this.sourcesContent)return null;var r=this._findSourceIndex(e);if(r>=0)return this.sourcesContent[r];var i=e;this.sourceRoot!=null&&(i=t.relative(this.sourceRoot,i));var a;if(this.sourceRoot!=null&&(a=t.urlParse(this.sourceRoot))){var o=i.replace(/^file:\/\//,``);if(a.scheme==`file`&&this._sources.has(o))return this.sourcesContent[this._sources.indexOf(o)];if((!a.path||a.path==`/`)&&this._sources.has(`/`+i))return this.sourcesContent[this._sources.indexOf(`/`+i)]}if(n)return null;throw Error(`"`+i+`" is not in the SourceMap.`)},s.prototype.generatedPositionFor=function(e){var n=t.getArg(e,`source`);if(n=this._findSourceIndex(n),n<0)return{line:null,column:null,lastColumn:null};var r={source:n,originalLine:t.getArg(e,`line`),originalColumn:t.getArg(e,`column`)},i=this._findMapping(r,this._originalMappings,`originalLine`,`originalColumn`,t.compareByOriginalPositions,t.getArg(e,`bias`,o.GREATEST_LOWER_BOUND));if(i>=0){var a=this._originalMappings[i];if(a.source===r.source)return{line:t.getArg(a,`generatedLine`,null),column:t.getArg(a,`generatedColumn`,null),lastColumn:t.getArg(a,`lastGeneratedColumn`,null)}}return{line:null,column:null,lastColumn:null}},e.BasicSourceMapConsumer=s;function d(e,n){var i=e;typeof e==`string`&&(i=t.parseSourceMapInput(e));var a=t.getArg(i,`version`),s=t.getArg(i,`sections`);if(a!=this._version)throw Error(`Unsupported version: `+a);this._sources=new r,this._names=new r;var c={line:-1,column:0};this._sections=s.map(function(e){if(e.url)throw Error(`Support for url field in sections not implemented.`);var r=t.getArg(e,`offset`),i=t.getArg(r,`line`),a=t.getArg(r,`column`);if(i<c.line||i===c.line&&a<c.column)throw Error(`Section offsets must be ordered and non-overlapping.`);return c=r,{generatedOffset:{generatedLine:i+1,generatedColumn:a+1},consumer:new o(t.getArg(e,`map`),n)}})}d.prototype=Object.create(o.prototype),d.prototype.constructor=o,d.prototype._version=3,Object.defineProperty(d.prototype,`sources`,{get:function(){for(var e=[],t=0;t<this._sections.length;t++)for(var n=0;n<this._sections[t].consumer.sources.length;n++)e.push(this._sections[t].consumer.sources[n]);return e}}),d.prototype.originalPositionFor=function(e){var r={generatedLine:t.getArg(e,`line`),generatedColumn:t.getArg(e,`column`)},i=n.search(r,this._sections,function(e,t){return e.generatedLine-t.generatedOffset.generatedLine||e.generatedColumn-t.generatedOffset.generatedColumn}),a=this._sections[i];return a?a.consumer.originalPositionFor({line:r.generatedLine-(a.generatedOffset.generatedLine-1),column:r.generatedColumn-(a.generatedOffset.generatedLine===r.generatedLine?a.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}},d.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})},d.prototype.sourceContentFor=function(e,t){for(var n=0;n<this._sections.length;n++){var r=this._sections[n].consumer.sourceContentFor(e,!0);if(r||r===``)return r}if(t)return null;throw Error(`"`+e+`" is not in the SourceMap.`)},d.prototype.generatedPositionFor=function(e){for(var n=0;n<this._sections.length;n++){var r=this._sections[n];if(r.consumer._findSourceIndex(t.getArg(e,`source`))!==-1){var i=r.consumer.generatedPositionFor(e);if(i)return{line:i.line+(r.generatedOffset.generatedLine-1),column:i.column+(r.generatedOffset.generatedLine===i.line?r.generatedOffset.generatedColumn-1:0)}}}return{line:null,column:null}},d.prototype._parseMappings=function(e,n){this.__generatedMappings=[],this.__originalMappings=[];for(var r=0;r<this._sections.length;r++)for(var i=this._sections[r],o=i.consumer._generatedMappings,s=0;s<o.length;s++){var c=o[s],l=i.consumer._sources.at(c.source);l!==null&&(l=t.computeSourceURL(i.consumer.sourceRoot,l,this._sourceMapURL)),this._sources.add(l),l=this._sources.indexOf(l);var u=null;c.name&&(u=i.consumer._names.at(c.name),this._names.add(u),u=this._names.indexOf(u));var d={source:l,generatedLine:c.generatedLine+(i.generatedOffset.generatedLine-1),generatedColumn:c.generatedColumn+(i.generatedOffset.generatedLine===c.generatedLine?i.generatedOffset.generatedColumn-1:0),originalLine:c.originalLine,originalColumn:c.originalColumn,name:u};this.__generatedMappings.push(d),typeof d.originalLine==`number`&&this.__originalMappings.push(d)}a(this.__generatedMappings,t.compareByGeneratedPositionsDeflated),a(this.__originalMappings,t.compareByOriginalPositions)},e.IndexedSourceMapConsumer=d})}),Xe=u({"node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/source-node.js":(e=>{var t=Ke().SourceMapGenerator,n=Ue(),r=/(\r?\n)/,i=10,a=`$$$isSourceNode$$$`;function o(e,t,n,r,i){this.children=[],this.sourceContents={},this.line=e??null,this.column=t??null,this.source=n??null,this.name=i??null,this[a]=!0,r!=null&&this.add(r)}o.fromStringWithSourceMap=function(e,t,i){var a=new o,s=e.split(r),c=0,l=function(){return e()+(e()||``);function e(){return c<s.length?s[c++]:void 0}},u=1,d=0,f=null;return t.eachMapping(function(e){if(f!==null)if(u<e.generatedLine)p(f,l()),u++,d=0;else{var t=s[c]||``,n=t.substr(0,e.generatedColumn-d);s[c]=t.substr(e.generatedColumn-d),d=e.generatedColumn,p(f,n),f=e;return}for(;u<e.generatedLine;)a.add(l()),u++;if(d<e.generatedColumn){var t=s[c]||``;a.add(t.substr(0,e.generatedColumn)),s[c]=t.substr(e.generatedColumn),d=e.generatedColumn}f=e},this),c<s.length&&(f&&p(f,l()),a.add(s.splice(c).join(``))),t.sources.forEach(function(e){var r=t.sourceContentFor(e);r!=null&&(i!=null&&(e=n.join(i,e)),a.setSourceContent(e,r))}),a;function p(e,t){if(e===null||e.source===void 0)a.add(t);else{var r=i?n.join(i,e.source):e.source;a.add(new o(e.originalLine,e.originalColumn,r,t,e.name))}}},o.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(e){this.add(e)},this);else if(e[a]||typeof e==`string`)e&&this.children.push(e);else throw TypeError(`Expected a SourceNode, string, or an array of SourceNodes and strings. Got `+e);return this},o.prototype.prepend=function(e){if(Array.isArray(e))for(var t=e.length-1;t>=0;t--)this.prepend(e[t]);else if(e[a]||typeof e==`string`)this.children.unshift(e);else throw TypeError(`Expected a SourceNode, string, or an array of SourceNodes and strings. Got `+e);return this},o.prototype.walk=function(e){for(var t,n=0,r=this.children.length;n<r;n++)t=this.children[n],t[a]?t.walk(e):t!==``&&e(t,{source:this.source,line:this.line,column:this.column,name:this.name})},o.prototype.join=function(e){var t,n,r=this.children.length;if(r>0){for(t=[],n=0;n<r-1;n++)t.push(this.children[n]),t.push(e);t.push(this.children[n]),this.children=t}return this},o.prototype.replaceRight=function(e,t){var n=this.children[this.children.length-1];return n[a]?n.replaceRight(e,t):typeof n==`string`?this.children[this.children.length-1]=n.replace(e,t):this.children.push(``.replace(e,t)),this},o.prototype.setSourceContent=function(e,t){this.sourceContents[n.toSetString(e)]=t},o.prototype.walkSourceContents=function(e){for(var t=0,r=this.children.length;t<r;t++)this.children[t][a]&&this.children[t].walkSourceContents(e);for(var i=Object.keys(this.sourceContents),t=0,r=i.length;t<r;t++)e(n.fromSetString(i[t]),this.sourceContents[i[t]])},o.prototype.toString=function(){var e=``;return this.walk(function(t){e+=t}),e},o.prototype.toStringWithSourceMap=function(e){var n={code:``,line:1,column:0},r=new t(e),a=!1,o=null,s=null,c=null,l=null;return this.walk(function(e,t){n.code+=e,t.source!==null&&t.line!==null&&t.column!==null?((o!==t.source||s!==t.line||c!==t.column||l!==t.name)&&r.addMapping({source:t.source,original:{line:t.line,column:t.column},generated:{line:n.line,column:n.column},name:t.name}),o=t.source,s=t.line,c=t.column,l=t.name,a=!0):a&&=(r.addMapping({generated:{line:n.line,column:n.column}}),o=null,!1);for(var u=0,d=e.length;u<d;u++)e.charCodeAt(u)===i?(n.line++,n.column=0,u+1===d?(o=null,a=!1):a&&r.addMapping({source:t.source,original:{line:t.line,column:t.column},generated:{line:n.line,column:n.column},name:t.name})):n.column++}),this.walkSourceContents(function(e,t){r.setSourceContent(e,t)}),{code:n.code,map:r}},e.SourceNode=o})}),I=u({"node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/source-map.js":(e=>{e.SourceMapGenerator=Ke().SourceMapGenerator,e.SourceMapConsumer=Ye().SourceMapConsumer,e.SourceNode=Xe().SourceNode})}),Ze=f(I());const Qe=M,$e=Ze.SourceMapConsumer,et=Ze.SourceMapGenerator,tt=Object.prototype.hasOwnProperty;function nt(){return`
7
+ `}function rt(e,t,n){return e&&tt.call(e,t)?e[t]:n}function it(...e){let t={},n=e.length;for(let r=0;r<n;++r){let n=Object.keys(e[r]),i=n.length;for(let e=0;e<i;++e)t[n[e]]=!0}return t}function L(e,t){return e.line-t.line||e.column-t.column}function at(e){return{line:e.line,column:e.column}}function ot(e,t){if(e){if(!t)return e}else return t||null;let n=new $e(e),r=new $e(t),i=new et({file:t.file,sourceRoot:t.sourceRoot}),a={};return r.eachMapping(function(e){let t=n.originalPositionFor({line:e.originalLine,column:e.originalColumn}),r=t.source;if(r===null)return;i.addMapping({source:r,original:at(t),generated:{line:e.generatedLine,column:e.generatedColumn},name:e.name});let o=n.sourceContentFor(r);o&&!tt.call(a,r)&&(a[r]=o,i.setSourceContent(r,o))}),i.toJSON()}function st(e,t){if(!e.loc)return null;let n={start:e.loc.start,end:e.loc.end};function r(e){ct(n,e.loc)}return e.declaration&&e.declaration.decorators&&ft(e)&&e.declaration.decorators.forEach(r),L(n.start,n.end)<0&&(n.start=at(n.start),t.skipSpaces(n.start,!1,!0),L(n.start,n.end)<0&&(n.end=at(n.end),t.skipSpaces(n.end,!0,!0))),e.comments&&e.comments.forEach(r),n}function ct(e,t){e&&t&&(L(t.start,e.start)<0&&(e.start=t.start),L(e.end,t.end)<0&&(e.end=t.end))}function lt(e,t){let n=e.loc;if(n&&(n.start.line<1&&(n.start.line=1),n.end.line<1&&(n.end.line=1)),e.type===`File`&&(n.start=t.firstPos(),n.end=t.lastPos()),ut(e,t),dt(e,t),n&&e.decorators)e.decorators.forEach(function(e){ct(n,e.loc)});else if(e.declaration&&ft(e)){e.declaration.loc=null;let t=e.declaration.decorators;t&&t.forEach(function(e){ct(n,e.loc)})}else if(Qe.MethodDefinition&&Qe.MethodDefinition.check(e)||Qe.Property.check(e)&&(e.method||e.shorthand))e.value.loc=null,Qe.FunctionExpression.check(e.value)&&(e.value.id=null);else if(e.type===`ObjectTypeProperty`){let n=e.loc,r=n&&n.end;r&&(r=at(r),t.prevPos(r)&&t.charAt(r)===`,`&&(r=t.skipSpaces(r,!0,!0))&&(n.end=r))}}function ut(e,t){if(e.type!==`ForStatement`)return;function n(e){let n=e&&e.loc,r=n&&n.start,i=n&&at(n.end);for(;r&&i&&L(r,i)<0&&(t.prevPos(i),t.charAt(i)===`;`);)n.end.line=i.line,n.end.column=i.column}n(e.init),n(e.test),n(e.update)}function dt(e,t){if(e.type===`TemplateLiteral`&&e.quasis.length!==0){if(e.loc){let t=at(e.loc.start),n=e.quasis[0];L(n.loc.start,t)<0&&(n.loc.start=t);let r=at(e.loc.end),i=e.quasis[e.quasis.length-1];L(r,i.loc.end)<0&&(i.loc.end=r)}e.expressions.forEach(function(n,r){let i=t.skipSpaces(n.loc.start,!0,!1);if(t.prevPos(i)&&t.charAt(i)===`{`&&t.prevPos(i)&&t.charAt(i)===`$`){let t=e.quasis[r];L(i,t.loc.end)<0&&(t.loc.end=i)}let a=t.skipSpaces(n.loc.end,!1,!1);if(t.charAt(a)===`}`){let t=e.quasis[r+1];L(t.loc.start,a)<0&&(t.loc.start=a)}})}}function ft(e){if(e)switch(e.type){case`ExportDeclaration`:case`ExportDefaultDeclaration`:case`ExportDefaultSpecifier`:case`DeclareExportDeclaration`:case`ExportNamedDeclaration`:case`ExportAllDeclaration`:return!0}return!1}function pt(e){let t=e.getParentNode();return e.getName()===`declaration`&&ft(t)?t:null}function mt(e,t){let n=e.trailingComma;return typeof n==`object`?!!n[t]:!!n}const ht={tabWidth:4,useTabs:!1,reuseWhitespace:!0,lineTerminator:nt(),wrapColumn:74,sourceFileName:null,sourceMapName:null,sourceRoot:null,inputSourceMap:null,range:!1,tolerant:!0,quote:null,trailingComma:!1,arrayBracketSpacing:!1,objectCurlySpacing:!0,arrowParensAlways:!1,flowObjectCommas:!0,tokens:!0},gt=ht.hasOwnProperty;function _t(e){let t=e||ht;function n(e){return gt.call(t,e)?t[e]:ht[e]}return{tabWidth:+n(`tabWidth`),useTabs:!!n(`useTabs`),reuseWhitespace:!!n(`reuseWhitespace`),lineTerminator:n(`lineTerminator`),wrapColumn:Math.max(n(`wrapColumn`),0),sourceFileName:n(`sourceFileName`),sourceMapName:n(`sourceMapName`),sourceRoot:n(`sourceRoot`),inputSourceMap:n(`inputSourceMap`),parser:n(`esprima`)||n(`parser`),range:n(`range`),tolerant:n(`tolerant`),quote:n(`quote`),trailingComma:n(`trailingComma`),arrayBracketSpacing:n(`arrayBracketSpacing`),objectCurlySpacing:n(`objectCurlySpacing`),arrowParensAlways:n(`arrowParensAlways`),flowObjectCommas:n(`flowObjectCommas`),tokens:!!n(`tokens`)}}var vt=class e{constructor(e,t,n=t){this.sourceLines=e,this.sourceLoc=t,this.targetLoc=n}slice(t,n,r=t.lastPos()){let i=this.sourceLines,a=this.sourceLoc,o=this.targetLoc;function s(e){let s=a[e],c=o[e],l=n;return e===`end`&&(l=r),z(i,s,t,c,l)}if(L(n,o.start)<=0)if(L(o.end,r)<=0)o={start:R(o.start,n.line,n.column),end:R(o.end,n.line,n.column)};else if(L(r,o.start)<=0)return null;else a={start:a.start,end:s(`end`)},o={start:R(o.start,n.line,n.column),end:R(r,n.line,n.column)};else{if(L(o.end,n)<=0)return null;L(o.end,r)<=0?(a={start:s(`start`),end:a.end},o={start:{line:1,column:0},end:R(o.end,n.line,n.column)}):(a={start:s(`start`),end:s(`end`)},o={start:{line:1,column:0},end:R(r,n.line,n.column)})}return new e(this.sourceLines,a,o)}add(t,n){return new e(this.sourceLines,this.sourceLoc,{start:yt(this.targetLoc.start,t,n),end:yt(this.targetLoc.end,t,n)})}subtract(t,n){return new e(this.sourceLines,this.sourceLoc,{start:R(this.targetLoc.start,t,n),end:R(this.targetLoc.end,t,n)})}indent(t,n=!1,r=!1){if(t===0)return this;let i=this.targetLoc,a=i.start.line,o=i.end.line;if(n&&a===1&&o===1)return this;if(i={start:i.start,end:i.end},!n||a>1){let e=i.start.column+t;i.start={line:a,column:r?Math.max(0,e):e}}if(!n||o>1){let e=i.end.column+t;i.end={line:o,column:r?Math.max(0,e):e}}return new e(this.sourceLines,this.sourceLoc,i)}};function yt(e,t,n){return{line:e.line+t-1,column:e.line===1?e.column+n:e.column}}function R(e,t,n){return{line:e.line-t+1,column:e.line===t?e.column-n:e.column}}function z(e,t,n,r,i){let a=L(r,i);if(a===0)return t;let o,s;if(a<0){o=e.skipSpaces(t)||e.lastPos(),s=n.skipSpaces(r)||n.lastPos();let a=i.line-s.line;for(o.line+=a,s.line+=a,a>0&&(o.column=0,s.column=0);L(s,i)<0&&n.nextPos(s,!0););}else{o=e.skipSpaces(t,!0)||e.firstPos(),s=n.skipSpaces(r,!0)||n.firstPos();let a=i.line-s.line;for(o.line+=a,s.line+=a,a<0&&(o.column=e.getLineLength(o.line),s.column=n.getLineLength(s.line));L(i,s)<0&&n.prevPos(s,!0););}return o}var bt=f(I()),xt=class e{length;name;mappings=[];cachedSourceMap=null;cachedTabWidth=void 0;constructor(e,t=null){this.infos=e,this.length=e.length,this.name=t||null,this.name&&this.mappings.push(new vt(this,{start:this.firstPos(),end:this.lastPos()}))}toString(e){return this.sliceString(this.firstPos(),this.lastPos(),e)}getSourceMap(e,t){if(!e)return null;let n=this;function r(n){return n||={},n.file=e,t&&(n.sourceRoot=t),n}if(n.cachedSourceMap)return r(n.cachedSourceMap.toJSON());let i=new bt.SourceMapGenerator(r()),a={};return n.mappings.forEach(function(e){let t=e.sourceLines.skipSpaces(e.sourceLoc.start)||e.sourceLines.lastPos(),r=n.skipSpaces(e.targetLoc.start)||n.lastPos();for(;L(t,e.sourceLoc.end)<0&&L(r,e.targetLoc.end)<0;){e.sourceLines.charAt(t),n.charAt(r);let o=e.sourceLines.name;if(i.addMapping({source:o,original:{line:t.line,column:t.column},generated:{line:r.line,column:r.column}}),!Ct.call(a,o)){let t=e.sourceLines.toString();i.setSourceContent(o,t),a[o]=t}n.nextPos(r,!0),e.sourceLines.nextPos(t,!0)}}),n.cachedSourceMap=i,i.toJSON()}bootstrapCharAt(e){let t=e.line,n=e.column,r=this.toString().split(Et),i=r[t-1];return i===void 0?``:n===i.length&&t<r.length?`
8
+ `:n>=i.length?``:i.charAt(n)}charAt(e){let t=e.line,n=e.column,r=this.infos[t-1],i=n;if(r===void 0||i<0)return``;let a=this.getIndentAt(t);return i<a?` `:(i+=r.sliceStart-a,i===r.sliceEnd&&t<this.length?`
9
+ `:i>=r.sliceEnd?``:r.line.charAt(i))}stripMargin(t,n){if(t===0||n&&this.length===1)return this;let r=new e(this.infos.map(function(e,r){return e.line&&(r>0||!n)&&(e={...e,indent:Math.max(0,e.indent-t)}),e}));if(this.mappings.length>0){let e=r.mappings;this.mappings.forEach(function(r){e.push(r.indent(t,n,!0))})}return r}indent(t){if(t===0)return this;let n=new e(this.infos.map(function(e){return e.line&&!e.locked&&(e={...e,indent:e.indent+t}),e}));if(this.mappings.length>0){let e=n.mappings;this.mappings.forEach(function(n){e.push(n.indent(t))})}return n}indentTail(t){if(t===0||this.length<2)return this;let n=new e(this.infos.map(function(e,n){return n>0&&e.line&&!e.locked&&(e={...e,indent:e.indent+t}),e}));if(this.mappings.length>0){let e=n.mappings;this.mappings.forEach(function(n){e.push(n.indent(t,!0))})}return n}lockIndentTail(){return this.length<2?this:new e(this.infos.map((e,t)=>({...e,locked:t>0})))}getIndentAt(e){return Math.max(this.infos[e-1].indent,0)}guessTabWidth(){if(typeof this.cachedTabWidth==`number`)return this.cachedTabWidth;let e=[],t=0;for(let n=1,r=this.length;n<=r;++n){let r=this.infos[n-1];if(Dt(r.line.slice(r.sliceStart,r.sliceEnd)))continue;let i=Math.abs(r.indent-t);e[i]=~~e[i]+1,t=r.indent}let n=-1,r=2;for(let t=1;t<e.length;t+=1)Ct.call(e,t)&&e[t]>n&&(n=e[t],r=t);return this.cachedTabWidth=r}startsWithComment(){if(this.infos.length===0)return!1;let e=this.infos[0],t=e.sliceStart,n=e.sliceEnd,r=e.line.slice(t,n).trim();return r.length===0||r.slice(0,2)===`//`||r.slice(0,2)===`/*`}isOnlyWhitespace(){return Dt(this.toString())}isPrecededOnlyByWhitespace(e){let t=this.infos[e.line-1],n=Math.max(t.indent,0),r=e.column-n;if(r<=0)return!0;let i=t.sliceStart,a=Math.min(i+r,t.sliceEnd);return Dt(t.line.slice(i,a))}getLineLength(e){let t=this.infos[e-1];return this.getIndentAt(e)+t.sliceEnd-t.sliceStart}nextPos(e,t=!1){let n=Math.max(e.line,0);return Math.max(e.column,0)<this.getLineLength(n)?(e.column+=1,t?!!this.skipSpaces(e,!1,!0):!0):n<this.length?(e.line+=1,e.column=0,t?!!this.skipSpaces(e,!1,!0):!0):!1}prevPos(e,t=!1){let n=e.line,r=e.column;if(r<1){if(--n,n<1)return!1;r=this.getLineLength(n)}else r=Math.min(r-1,this.getLineLength(n));return e.line=n,e.column=r,t?!!this.skipSpaces(e,!0,!0):!0}firstPos(){return{line:1,column:0}}lastPos(){return{line:this.length,column:this.getLineLength(this.length)}}skipSpaces(e,t=!1,n=!1){if(e=e?n?e:{line:e.line,column:e.column}:t?this.lastPos():this.firstPos(),t){for(;this.prevPos(e);)if(!Dt(this.charAt(e))&&this.nextPos(e))return e;return null}else{for(;Dt(this.charAt(e));)if(!this.nextPos(e))return null;return e}}trimLeft(){let e=this.skipSpaces(this.firstPos(),!1,!0);return e?this.slice(e):H}trimRight(){let e=this.skipSpaces(this.lastPos(),!0,!0);return e?this.slice(this.firstPos(),e):H}trim(){let e=this.skipSpaces(this.firstPos(),!1,!0);if(e===null)return H;let t=this.skipSpaces(this.lastPos(),!0,!0);return t===null?H:this.slice(e,t)}eachPos(e,t=this.firstPos(),n=!1){let r=this.firstPos();if(t&&(r.line=t.line,r.column=t.column),!(n&&!this.skipSpaces(r,!1,!0)))do e.call(this,r);while(this.nextPos(r,n))}bootstrapSlice(e,t){let n=this.toString().split(Et).slice(e.line-1,t.line);return n.length>0&&(n.push(n.pop().slice(0,t.column)),n[0]=n[0].slice(e.column)),B(n.join(`
10
+ `))}slice(t,n){if(!n){if(!t)return this;n=this.lastPos()}if(!t)throw Error(`cannot slice with end but not start`);let r=this.infos.slice(t.line-1,n.line);t.line===n.line?r[0]=Ot(r[0],t.column,n.column):(r[0]=Ot(r[0],t.column),r.push(Ot(r.pop(),0,n.column)));let i=new e(r);if(this.mappings.length>0){let e=i.mappings;this.mappings.forEach(function(r){let i=r.slice(this,t,n);i&&e.push(i)},this)}return i}bootstrapSliceString(e,t,n){return this.slice(e,t).toString(n)}sliceString(e=this.firstPos(),t=this.lastPos(),n){let{tabWidth:r,useTabs:i,reuseWhitespace:a,lineTerminator:o}=_t(n),s=[];for(let n=e.line;n<=t.line;++n){let o=this.infos[n-1];n===e.line?o=n===t.line?Ot(o,e.column,t.column):Ot(o,e.column):n===t.line&&(o=Ot(o,0,t.column));let c=Math.max(o.indent,0),l=o.line.slice(0,o.sliceStart);if(a&&Dt(l)&&wt(l,r)===c){s.push(o.line.slice(0,o.sliceEnd));continue}let u=0,d=c;i&&(u=Math.floor(c/r),d-=u*r);let f=``;u>0&&(f+=Array(u+1).join(` `)),d>0&&(f+=Array(d+1).join(` `)),f+=o.line.slice(o.sliceStart,o.sliceEnd),s.push(f)}return s.join(o)}isEmpty(){return this.length<2&&this.getLineLength(1)<1}join(t){let n=this,r=[],i=[],a;function o(e){if(e!==null){if(a){let t=e.infos[0],n=Array(t.indent+1).join(` `),o=r.length,s=Math.max(a.indent,0)+a.sliceEnd-a.sliceStart;a.line=a.line.slice(0,a.sliceEnd)+n+t.line.slice(t.sliceStart,t.sliceEnd),a.locked=a.locked||t.locked,a.sliceEnd=a.line.length,e.mappings.length>0&&e.mappings.forEach(function(e){i.push(e.add(o,s))})}else e.mappings.length>0&&i.push.apply(i,e.mappings);e.infos.forEach(function(e,t){(!a||t>0)&&(a={...e},r.push(a))})}}function s(e,t){t>0&&o(n),o(e)}if(t.map(function(e){let t=B(e);return t.isEmpty()?null:t}).forEach((e,t)=>{n.isEmpty()?o(e):s(e,t)}),r.length<1)return H;let c=new e(r);return c.mappings=i,c}concat(...e){let t=[this];return t.push.apply(t,e),H.join(t)}};const St={},Ct=St.hasOwnProperty;function wt(e,t){let n=0,r=e.length;for(let i=0;i<r;++i)switch(e.charCodeAt(i)){case 9:{let e=Math.ceil(n/t)*t;e===n?n+=t:n=e;break}case 11:case 12:case 13:case 65279:break;case 32:default:n+=1;break}return n}const Tt=/^\s*/,Et=/\u000D\u000A|\u000D(?!\u000A)|\u000A|\u2028|\u2029/;function B(e,t){if(e instanceof xt)return e;e+=``;let n=t&&t.tabWidth,r=e.indexOf(` `)<0,i=!t&&r&&e.length<=10;if(i&&Ct.call(St,e))return St[e];let a=new xt(e.split(Et).map(function(e){let t=Tt.exec(e)[0];return{line:e,indent:wt(t,n),locked:!1,sliceStart:t.length,sliceEnd:e.length}}),_t(t).sourceFileName);return i&&(St[e]=a),a}function Dt(e){return!/\S/.test(e)}function Ot(e,t,n){let r=e.sliceStart,i=e.sliceEnd,a=Math.max(e.indent,0),o=a+i-r;return n===void 0&&(n=o),t=Math.max(t,0),n=Math.min(n,o),n=Math.max(n,t),n<a?(a=n,i=r):i-=o-n,o=n,o-=t,t<a?a-=t:(t-=a,a=0,r+=t),e.indent===a&&e.sliceStart===r&&e.sliceEnd===i?e:{line:e.line,indent:a,locked:!1,sliceStart:r,sliceEnd:i}}function V(e){return H.join(e)}const H=B(``),kt=M,U=P.array,At=P.object,jt=new WeakMap;function Mt(e,t,n){if(!e)return n;if(lt(e,t),n){if(kt.Node.check(e)&&kt.SourceLocation.check(e.loc)){let t=n.length-1;for(;t>=0;--t){let r=n[t];if(r&&r.loc&&L(r.loc.end,e.loc.start)<=0)break}return n.splice(t+1,0,e),n}}else{let t=jt.get(e);if(t)return t}let r;if(U.check(e))r=Object.keys(e);else if(At.check(e))r=je(e);else return n;n||jt.set(e,n=[]);for(let i=0,a=r.length;i<a;++i)Mt(e[r[i]],t,n);return n}function Nt(e,t,n){let r=Mt(e,n),i=0,a=r&&r.length,o,s;for(;typeof a==`number`&&i<a;){let e=i+a>>1,c=r[e];if(L(c.loc.start,t.loc.start)<=0&&L(t.loc.end,c.loc.end)<=0){Nt(t.enclosingNode=c,t,n);return}if(L(c.loc.end,t.loc.start)<=0){o=c,i=e+1;continue}if(L(t.loc.end,c.loc.start)<=0){s=c,a=e;continue}throw Error(`Comment location overlaps with node location`)}o&&(t.precedingNode=o),s&&(t.followingNode=s)}function Pt(e,t,n){if(!U.check(e))return;let r=[];e.forEach(function(e){e.loc.lines=n,Nt(t,e,n);let i=e.precedingNode,a=e.enclosingNode,o=e.followingNode;if(i&&o){let t=r.length;t>0&&r[t-1].followingNode!==e.followingNode&&Ft(r,n),r.push(e)}else if(i)Ft(r,n),zt(i,e);else if(o)Ft(r,n),Lt(o,e);else if(a)Ft(r,n),Rt(a,e);else throw Error(`AST contains no nodes at all?`)}),Ft(r,n),e.forEach(function(e){delete e.precedingNode,delete e.enclosingNode,delete e.followingNode})}function Ft(e,t){let n=e.length;if(n===0)return;let r=e[0].precedingNode,i=e[0].followingNode,a=i.loc.start,o=n,s;for(;o>0;--o){s=e[o-1];let n=t.sliceString(s.loc.end,a);if(/\S/.test(n))break;a=s.loc.start}for(;o<=n&&(s=e[o])&&(s.type===`Line`||s.type===`CommentLine`)&&s.loc.start.column>i.loc.start.column;)++o;if(o){let{enclosingNode:t}=e[o-1];t?.type===`CallExpression`&&--o}e.forEach(function(e,t){t<o?zt(r,e):Lt(i,e)}),e.length=0}function It(e,t){(e.comments||=[]).push(t)}function Lt(e,t){t.leading=!0,t.trailing=!1,It(e,t)}function Rt(e,t){t.leading=!1,t.trailing=!1,It(e,t)}function zt(e,t){t.leading=!1,t.trailing=!0,It(e,t)}function Bt(e,t){let n=e.getValue();kt.Comment.assert(n);let r=n.loc,i=r&&r.lines,a=[t(e)];if(n.trailing)a.push(`
11
+ `);else if(i instanceof xt){let e=i.slice(r.end,i.skipSpaces(r.end)||i.lastPos());e.length===1?a.push(e):a.push(Array(e.length).join(`
12
+ `))}else a.push(`
13
+ `);return V(a)}function Vt(e,t){let n=e.getValue(e);kt.Comment.assert(n);let r=n.loc,i=r&&r.lines,a=[];if(i instanceof xt){let e=i.skipSpaces(r.start,!0)||i.firstPos(),t=i.slice(e,r.start);t.length===1?a.push(t):a.push(Array(t.length).join(`
14
+ `))}return a.push(t(e)),V(a)}function Ht(e,t){let n=e.getValue(),r=t(e),i=kt.Node.check(n)&&F(n,`comments`);if(!i||i.length===0)return r;let a=[],o=[r];return e.each(function(e){let r=e.getValue(),i=F(r,`leading`),s=F(r,`trailing`);i||s&&!(kt.Statement.check(n)||r.type===`Block`||r.type===`CommentBlock`)?a.push(Bt(e,t)):s&&o.push(Vt(e,t))},`comments`),a.push.apply(a,o),V(a)}const Ut=N,Wt=P.object,Gt=P.array;function Kt(e,t){t=_t(t);let n=B(e,t),r=n.toString({tabWidth:t.tabWidth,reuseWhitespace:!1,useTabs:!1}),i=[],a=t.parser.parse(r,{jsx:!0,loc:!0,locations:!0,range:t.range,comment:!0,onComment:i,tolerant:rt(t,`tolerant`,!0),ecmaVersion:6,sourceType:rt(t,`sourceType`,`module`)}),o=Array.isArray(a.tokens)?a.tokens:!1;delete a.tokens,o.forEach(function(e){typeof e.value!=`string`&&(e.value=n.sliceString(e.loc.start,e.loc.end))}),Array.isArray(a.comments)&&(i=a.comments,delete a.comments),a.loc?lt(a,n):a.loc={start:n.firstPos(),end:n.lastPos()},a.loc.lines=n,a.loc.indent=0;let s,c;a.type===`Program`?(c=a,s=Ut.file(a,t.sourceFileName||null),s.loc={start:n.firstPos(),end:n.lastPos(),lines:n,indent:0}):a.type===`File`&&(s=a,c=s.program),t.tokens&&(s.tokens=o);let l=st({type:c.type,loc:c.loc,body:[],comments:i},n);return c.loc.start=l.start,c.loc.end=l.end,Pt(i,c.body.length?s.program:s,n),new qt(n,o).copy(s)}const qt=function(e,t){this.lines=e,this.tokens=t,this.startTokenIndex=0,this.endTokenIndex=t.length,this.indent=0,this.seen=new Map},Jt=qt.prototype;Jt.copy=function(e){if(this.seen.has(e))return this.seen.get(e);if(Gt.check(e)){let t=Array(e.length);return this.seen.set(e,t),e.forEach(function(e,n){t[n]=this.copy(e)},this),t}if(!Wt.check(e))return e;lt(e,this.lines);let t=Object.create(Object.getPrototypeOf(e),{original:{value:e,configurable:!1,enumerable:!1,writable:!0}});this.seen.set(e,t);let n=e.loc,r=this.indent,i=r,a=this.startTokenIndex,o=this.endTokenIndex;n&&((e.type===`Block`||e.type===`Line`||e.type===`CommentBlock`||e.type===`CommentLine`||this.lines.isPrecededOnlyByWhitespace(n.start))&&(i=this.indent=n.start.column),n.lines=this.lines,n.tokens=this.tokens,n.indent=i,this.findTokenRange(n));let s=Object.keys(e),c=s.length;for(let n=0;n<c;++n){let r=s[n];r===`loc`||r===`tokens`&&e.type===`File`?t[r]=e[r]:t[r]=this.copy(e[r])}return this.indent=r,this.startTokenIndex=a,this.endTokenIndex=o,t},Jt.findTokenRange=function(e){for(;this.startTokenIndex>0;){let t=e.tokens[this.startTokenIndex];if(L(e.start,t.loc.start)<0)--this.startTokenIndex;else break}for(;this.endTokenIndex<e.tokens.length;){let t=e.tokens[this.endTokenIndex];if(L(t.loc.end,e.end)<0)++this.endTokenIndex;else break}for(;this.startTokenIndex<this.endTokenIndex;){let t=e.tokens[this.startTokenIndex];if(L(t.loc.start,e.start)<0)++this.startTokenIndex;else break}for(e.start.token=this.startTokenIndex;this.endTokenIndex>this.startTokenIndex;){let t=e.tokens[this.endTokenIndex-1];if(L(e.end,t.loc.end)<0)--this.endTokenIndex;else break}e.end.token=this.endTokenIndex};const W=M,G=P.array,Yt=P.number,Xt={};[[`??`],[`||`],[`&&`],[`|`],[`^`],[`&`],[`==`,`===`,`!=`,`!==`],[`<`,`>`,`<=`,`>=`,`in`,`instanceof`],[`>>`,`<<`,`>>>`],[`+`,`-`],[`*`,`/`,`%`],[`**`]].forEach(function(e,t){e.forEach(function(e){Xt[e]=t})});const Zt=function(e){this.stack=[e]},K=Zt.prototype;Zt.from=function(e){if(e instanceof Zt)return e.copy();if(e instanceof Pe){let t=Object.create(Zt.prototype),n=[e.value];for(let t;t=e.parentPath;e=t)n.push(e.name,t.value);return t.stack=n.reverse(),t}return new Zt(e)},K.copy=function(){let e=Object.create(Zt.prototype);return e.stack=this.stack.slice(0),e},K.getName=function(){let e=this.stack,t=e.length;return t>1?e[t-2]:null},K.getValue=function(){let e=this.stack;return e[e.length-1]},K.valueIsDuplicate=function(){let e=this.stack,t=e.length-1;return e.lastIndexOf(e[t],t-1)>=0};function Qt(e,t){let n=e.stack;for(let e=n.length-1;e>=0;e-=2){let r=n[e];if(W.Node.check(r)&&--t<0)return r}return null}K.getNode=function(e=0){return Qt(this,~~e)},K.getParentNode=function(e=0){return Qt(this,~~e+1)},K.getRootValue=function(){let e=this.stack;return e.length%2==0?e[1]:e[0]},K.call=function(e){let t=this.stack,n=t.length,r=t[n-1],i=arguments.length;for(let e=1;e<i;++e){let n=arguments[e];r=r[n],t.push(n,r)}let a=e(this);return t.length=n,a},K.each=function(e){let t=this.stack,n=t.length,r=t[n-1],i=arguments.length;for(let e=1;e<i;++e){let n=arguments[e];r=r[n],t.push(n,r)}for(let n=0;n<r.length;++n)n in r&&(t.push(n,r[n]),e(this),t.length-=2);t.length=n},K.map=function(e){let t=this.stack,n=t.length,r=t[n-1],i=arguments.length;for(let e=1;e<i;++e){let n=arguments[e];r=r[n],t.push(n,r)}let a=Array(r.length);for(let n=0;n<r.length;++n)n in r&&(t.push(n,r[n]),a[n]=e(this,n),t.length-=2);return t.length=n,a},K.hasParens=function(){let e=this.getNode(),t=this.getPrevToken(e);if(!t)return!1;let n=this.getNextToken(e);return n?!!(t.value===`(`&&(n.value===`)`||!this.canBeFirstInStatement()&&this.firstInStatement()&&!this.needsParens(!0))):!1},K.getPrevToken=function(e){e||=this.getNode();let t=e&&e.loc,n=t&&t.tokens;if(n&&t.start.token>0){let e=n[t.start.token-1];if(e){let t=this.getRootValue().loc;if(L(t.start,e.loc.start)<=0)return e}}return null},K.getNextToken=function(e){e||=this.getNode();let t=e&&e.loc,n=t&&t.tokens;if(n&&t.end.token<n.length){let e=n[t.end.token];if(e){let t=this.getRootValue().loc;if(L(e.loc.end,t.end)<=0)return e}}return null},K.needsParens=function(e){let t=this.getNode();if(t.type===`AssignmentExpression`&&t.left.type===`ObjectPattern`)return!0;let n=this.getParentNode(),r=this.getName();if(this.getValue()!==t||W.Statement.check(t)||t.type===`Identifier`||n&&n.type===`ParenthesizedExpression`)return!1;if(t.extra&&t.extra.parenthesized)return!0;if(!n)return!1;if(t.type===`UnaryExpression`&&n.type===`BinaryExpression`&&r===`left`&&n.left===t&&n.operator===`**`)return!0;switch(t.type){case`UnaryExpression`:case`SpreadElement`:case`SpreadProperty`:return n.type===`MemberExpression`&&r===`object`&&n.object===t;case`BinaryExpression`:case`LogicalExpression`:switch(n.type){case`CallExpression`:return r===`callee`&&n.callee===t;case`UnaryExpression`:case`SpreadElement`:case`SpreadProperty`:return!0;case`MemberExpression`:return r===`object`&&n.object===t;case`BinaryExpression`:case`LogicalExpression`:{let e=Xt[n.operator],i=Xt[t.operator];if(e>i||e===i&&r===`right`)return!0;break}default:return!1}break;case`SequenceExpression`:switch(n.type){case`ReturnStatement`:return!1;case`ForStatement`:return!1;case`ExpressionStatement`:return r!==`expression`;default:return!0}case`OptionalIndexedAccessType`:return t.optional&&n.type===`IndexedAccessType`;case`IntersectionTypeAnnotation`:case`UnionTypeAnnotation`:return n.type===`NullableTypeAnnotation`;case`Literal`:return n.type===`MemberExpression`&&Yt.check(t.value)&&r===`object`&&n.object===t;case`NumericLiteral`:return n.type===`MemberExpression`&&r===`object`&&n.object===t;case`YieldExpression`:case`AwaitExpression`:case`AssignmentExpression`:case`ConditionalExpression`:switch(n.type){case`UnaryExpression`:case`SpreadElement`:case`SpreadProperty`:case`BinaryExpression`:case`LogicalExpression`:return!0;case`CallExpression`:case`NewExpression`:return r===`callee`&&n.callee===t;case`ConditionalExpression`:return r===`test`&&n.test===t;case`MemberExpression`:return r===`object`&&n.object===t;default:return!1}case`ArrowFunctionExpression`:return W.CallExpression.check(n)&&r===`callee`&&n.callee===t||W.MemberExpression.check(n)&&r===`object`&&n.object===t||W.TSAsExpression&&W.TSAsExpression.check(n)&&r===`expression`&&n.expression===t?!0:$t(n);case`ObjectExpression`:if(n.type===`ArrowFunctionExpression`&&r===`body`&&n.body===t)return!0;break;case`TSAsExpression`:if(n.type===`ArrowFunctionExpression`&&r===`body`&&n.body===t&&t.expression.type===`ObjectExpression`)return!0;break;case`CallExpression`:if(r===`declaration`&&W.ExportDefaultDeclaration.check(n)&&W.FunctionExpression.check(t.callee))return!0}return n.type===`NewExpression`&&r===`callee`&&n.callee===t?en(t):!!(e!==!0&&!this.canBeFirstInStatement()&&this.firstInStatement())};function $t(e){return W.BinaryExpression.check(e)||W.LogicalExpression.check(e)}function en(e){return W.CallExpression.check(e)?!0:G.check(e)?e.some(en):W.Node.check(e)?Le(e,(e,t)=>en(t)):!1}K.canBeFirstInStatement=function(){let e=this.getNode();return!(W.FunctionExpression.check(e)||W.ObjectExpression.check(e)||W.ClassExpression.check(e))},K.firstInStatement=function(){let e=this.stack,t,n,r,i;for(let a=e.length-1;a>=0;a-=2)if(W.Node.check(e[a])&&(r=t,i=n,t=e[a-1],n=e[a]),!(!n||!i)){if(W.BlockStatement.check(n)&&t===`body`&&r===0||W.ExpressionStatement.check(n)&&r===`expression`||W.AssignmentExpression.check(n)&&r===`left`||W.ArrowFunctionExpression.check(n)&&r===`body`)return!0;if(!(W.SequenceExpression.check(n)&&e[a+1]===`expressions`&&r===0)&&!(W.CallExpression.check(n)&&r===`callee`)&&!(W.MemberExpression.check(n)&&r===`object`)&&!(W.ConditionalExpression.check(n)&&r===`test`)&&!($t(n)&&r===`left`)&&!(W.UnaryExpression.check(n)&&!n.prefix&&r===`argument`))return!1}return!0};var tn=Zt;const nn=M.Printable,rn=M.Expression,an=M.ReturnStatement,on=M.SourceLocation,sn=P.object,cn=P.array,ln=P.string,un=/[0-9a-z_$]/i,dn=function(e){let t=this,n=[];t.replace=function(e,t){ln.check(t)&&(t=B(t)),n.push({lines:t,start:e.start,end:e.end})},t.get=function(t){t||={start:{line:1,column:0},end:{line:e.length,column:e.getLineLength(e.length)}};let r=t.start,i=[];function a(t,n){i.push(e.slice(t,n))}return n.sort((e,t)=>L(e.start,t.start)).forEach(function(e){L(r,e.start)>0||(a(r,e.start),i.push(e.lines),r=e.end)}),a(r,t.end),V(i)}},fn=dn.prototype;fn.tryToReprintComments=function(e,t,n){let r=this;if(!e.comments&&!t.comments)return!0;let i=tn.from(e),a=tn.from(t);i.stack.push(`comments`,pn(e)),a.stack.push(`comments`,pn(t));let o=[],s=yn(i,a,o);return s&&o.length>0&&o.forEach(function(e){let t=e.oldPath.getValue();r.replace(t.loc,n(e.newPath).indentTail(t.loc.indent))}),s};function pn(e){let t=[];return e.comments&&e.comments.length>0&&e.comments.forEach(function(e){(e.leading||e.trailing)&&t.push(e)}),t}fn.deleteComments=function(e){if(!e.comments)return;let t=this;e.comments.forEach(function(n){n.leading?t.replace({start:n.loc.start,end:e.loc.lines.skipSpaces(n.loc.end,!1,!1)},``):n.trailing&&t.replace({start:e.loc.lines.skipSpaces(n.loc.start,!0,!1),end:n.loc.end},``)})};function mn(e){let t=e.getValue();if(!nn.check(t))return;let n=t.original,r=n&&n.loc,i=r&&r.lines,a=[];if(!(!i||!_n(e,a)))return function(t){let o=new dn(i);a.forEach(function(e){let n=e.newPath.getValue(),r=e.oldPath.getValue();on.assert(r.loc,!0);let a=!o.tryToReprintComments(n,r,t);a&&o.deleteComments(r);let s=t(e.newPath,{includeComments:a,avoidRootParens:r.type===n.type&&e.oldPath.hasParens()}).indentTail(r.loc.indent),c=hn(i,r.loc,s),l=gn(i,r.loc,s);if(c||l){let e=[];c&&e.push(` `),e.push(s),l&&e.push(` `),s=V(e)}o.replace(r.loc,s)});let s=o.get(r).indentTail(-n.loc.indent);return e.needsParens()?V([`(`,s,`)`]):s}}function hn(e,t,n){let r=at(t.start),i=e.prevPos(r)&&e.charAt(r),a=n.charAt(n.firstPos());return i&&un.test(i)&&a&&un.test(a)}function gn(e,t,n){let r=e.charAt(t.end),i=n.lastPos(),a=n.prevPos(i)&&n.charAt(i);return a&&un.test(a)&&r&&un.test(r)}function _n(e,t){let n=e.getValue();nn.assert(n);let r=n.original;if(nn.assert(r),n.type!==r.type)return!1;let i=xn(e,new tn(r),t);return i||(t.length=0),i}function vn(e,t,n){let r=e.getValue();return r===t.getValue()?!0:cn.check(r)?yn(e,t,n):sn.check(r)?bn(e,t,n):!1}function yn(e,t,n){let r=e.getValue(),i=t.getValue();if(r===i||e.valueIsDuplicate()||t.valueIsDuplicate())return!0;cn.assert(r);let a=r.length;if(!(cn.check(i)&&i.length===a))return!1;for(let o=0;o<a;++o){e.stack.push(o,r[o]),t.stack.push(o,i[o]);let a=vn(e,t,n);if(e.stack.length-=2,t.stack.length-=2,!a)return!1}return!0}function bn(e,t,n){let r=e.getValue();if(sn.assert(r),r.original===null)return!1;let i=t.getValue();if(!sn.check(i))return!1;if(r===i||e.valueIsDuplicate()||t.valueIsDuplicate())return!0;if(nn.check(r)){if(!nn.check(i))return!1;let a=e.getParentNode(),o=t.getParentNode();if(o!==null&&o.type===`FunctionTypeAnnotation`&&a!==null&&a.type===`FunctionTypeAnnotation`){let e=o.params.length!==1||!!o.params[0].name,t=a.params.length!==1||!!a.params[0].name;if(!e&&t)return!1}if(r.type===i.type){let r=[];if(xn(e,t,r))n.push.apply(n,r);else if(i.loc)n.push({oldPath:t.copy(),newPath:e.copy()});else return!1;return!0}return rn.check(r)&&rn.check(i)&&i.loc?(n.push({oldPath:t.copy(),newPath:e.copy()}),!0):!1}return xn(e,t,n)}function xn(e,t,n){let r=e.getValue(),i=t.getValue();if(sn.assert(r),sn.assert(i),r.original===null||e.needsParens()&&!t.hasParens())return!1;let a=it(i,r);(i.type===`File`||r.type===`File`)&&delete a.tokens,delete a.loc;let o=n.length;for(let o in a){if(o.charAt(0)===`_`)continue;e.stack.push(o,F(r,o)),t.stack.push(o,F(i,o));let a=vn(e,t,n);if(e.stack.length-=2,t.stack.length-=2,!a)return!1}return!(an.check(e.getNode())&&n.length>o)}const q=M,Sn=P.string,Cn=P.object,wn=function(e,t){Sn.assert(e),this.code=e,t&&(Cn.assert(t),this.map=t)},Tn=wn.prototype;let En=!1;Tn.toString=function(){return En||=(console.warn(`Deprecation warning: recast.print now returns an object with a .code property. You appear to be treating the object as a string, which might still work but is strongly discouraged.`),!0),this.code};const Dn=new wn(``),On=function(e){let t=e&&e.tabWidth;e=_t(e),e.sourceFileName=null;function n(e,t){return e=Object.assign({},e,t),t=>r(t,e)}function r(i,a){if(a||={},a.includeComments)return Ht(i,n(a,{includeComments:!1}));let o=e.tabWidth;if(!t){let t=i.getNode().loc;t&&t.lines&&t.lines.guessTabWidth&&(e.tabWidth=t.lines.guessTabWidth())}let s=mn(i),c=s?s(r):kn(i,e,a,n(a,{includeComments:!0,avoidRootParens:!1}));return e.tabWidth=o,c}this.print=function(t){if(!t)return Dn;let n=r(tn.from(t),{includeComments:!0,avoidRootParens:!1});return new wn(n.toString(e),ot(e.inputSourceMap,n.getSourceMap(e.sourceMapName,e.sourceRoot)))},this.printGenerically=function(t){if(!t)return Dn;function n(t){return Ht(t,t=>kn(t,e,{includeComments:!0,avoidRootParens:!1},n))}let r=tn.from(t),i=e.reuseWhitespace;e.reuseWhitespace=!1;let a=new wn(n(r).toString(e));return e.reuseWhitespace=i,a}};function kn(e,t,n,r){let i=e.getValue(),a=[],o=An(e,t,r);if(!i||o.isEmpty())return o;let s=!1,c=jn(e,r);return c.isEmpty()?n.avoidRootParens||(s=e.needsParens()):a.push(c),s&&a.unshift(`(`),a.push(o),s&&a.push(`)`),V(a)}function An(e,t,n){let r=e.getValue();if(!r)return B(``);if(typeof r==`string`)return B(r,t);q.Printable.assert(r);let i=[];switch(r.type){case`File`:return e.call(n,`program`);case`Program`:return r.directives&&e.each(function(e){i.push(n(e),`;
15
+ `)},`directives`),r.interpreter&&i.push(e.call(n,`interpreter`)),i.push(e.call(e=>Mn(e,t,n),`body`)),V(i);case`Noop`:case`EmptyStatement`:return B(``);case`ExpressionStatement`:return V([e.call(n,`expression`),`;`]);case`ParenthesizedExpression`:return V([`(`,e.call(n,`expression`),`)`]);case`BinaryExpression`:case`LogicalExpression`:case`AssignmentExpression`:return B(` `).join([e.call(n,`left`),r.operator,e.call(n,`right`)]);case`AssignmentPattern`:return V([e.call(n,`left`),` = `,e.call(n,`right`)]);case`MemberExpression`:case`OptionalMemberExpression`:{i.push(e.call(n,`object`));let t=e.call(n,`property`),a=F(r,`optional`);return r.computed?i.push(a?`?.[`:`[`,t,`]`):i.push(a?`?.`:`.`,t),V(i)}case`ChainExpression`:return e.call(n,`expression`);case`MetaProperty`:return V([e.call(n,`meta`),`.`,e.call(n,`property`)]);case`BindExpression`:return r.object&&i.push(e.call(n,`object`)),i.push(`::`,e.call(n,`callee`)),V(i);case`Path`:return B(`.`).join(r.body);case`Identifier`:return V([B(r.name,t),r.optional?`?`:``,e.call(n,`typeAnnotation`)]);case`SpreadElement`:case`SpreadElementPattern`:case`RestProperty`:case`SpreadProperty`:case`SpreadPropertyPattern`:case`ObjectTypeSpreadProperty`:case`RestElement`:return V([`...`,e.call(n,`argument`),e.call(n,`typeAnnotation`)]);case`FunctionDeclaration`:case`FunctionExpression`:case`TSDeclareFunction`:return r.declare&&i.push(`declare `),r.async&&i.push(`async `),i.push(`function`),r.generator&&i.push(`*`),r.id?i.push(` `,e.call(n,`id`),e.call(n,`typeParameters`)):r.typeParameters&&i.push(e.call(n,`typeParameters`)),i.push(`(`,Ln(e,t,n),`)`,e.call(n,`returnType`)),r.body&&i.push(` `,e.call(n,`body`)),V(i);case`ArrowFunctionExpression`:return r.async&&i.push(`async `),r.typeParameters&&i.push(e.call(n,`typeParameters`)),!t.arrowParensAlways&&r.params.length===1&&!r.rest&&r.params[0].type===`Identifier`&&!r.params[0].typeAnnotation&&!r.returnType?i.push(e.call(n,`params`,0)):i.push(`(`,Ln(e,t,n),`)`,e.call(n,`returnType`)),i.push(` => `,e.call(n,`body`)),V(i);case`MethodDefinition`:return Fn(e,t,n);case`YieldExpression`:return i.push(`yield`),r.delegate&&i.push(`*`),r.argument&&i.push(` `,e.call(n,`argument`)),V(i);case`AwaitExpression`:return i.push(`await`),r.all&&i.push(`*`),r.argument&&i.push(` `,e.call(n,`argument`)),V(i);case`ModuleExpression`:return V([`module {
16
+ `,e.call(n,`body`).indent(t.tabWidth),`
17
+ }`]);case`ModuleDeclaration`:return i.push(`module`,e.call(n,`id`)),r.source?i.push(`from`,e.call(n,`source`)):i.push(e.call(n,`body`)),B(` `).join(i);case`ImportSpecifier`:return r.importKind&&r.importKind!==`value`&&i.push(r.importKind+` `),r.imported?(i.push(e.call(n,`imported`)),r.local&&r.local.name!==r.imported.name&&i.push(` as `,e.call(n,`local`))):r.id&&(i.push(e.call(n,`id`)),r.name&&i.push(` as `,e.call(n,`name`))),V(i);case`ExportSpecifier`:return r.exportKind&&r.exportKind!==`value`&&i.push(r.exportKind+` `),r.local?(i.push(e.call(n,`local`)),r.exported&&r.exported.name!==r.local.name&&i.push(` as `,e.call(n,`exported`))):r.id&&(i.push(e.call(n,`id`)),r.name&&i.push(` as `,e.call(n,`name`))),V(i);case`ExportBatchSpecifier`:return B(`*`);case`ImportNamespaceSpecifier`:return i.push(`* as `),r.local?i.push(e.call(n,`local`)):r.id&&i.push(e.call(n,`id`)),V(i);case`ImportDefaultSpecifier`:return r.local?e.call(n,`local`):e.call(n,`id`);case`TSExportAssignment`:return V([`export = `,e.call(n,`expression`)]);case`ExportDeclaration`:case`ExportDefaultDeclaration`:case`ExportNamedDeclaration`:return zn(e,t,n);case`ExportAllDeclaration`:return i.push(`export *`),r.exported&&i.push(` as `,e.call(n,`exported`)),i.push(` from `,e.call(n,`source`),`;`),V(i);case`TSNamespaceExportDeclaration`:return i.push(`export as namespace `,e.call(n,`id`)),Yn(V(i));case`ExportNamespaceSpecifier`:return V([`* as `,e.call(n,`exported`)]);case`ExportDefaultSpecifier`:return e.call(n,`exported`);case`Import`:return B(`import`,t);case`ImportExpression`:return V([`import(`,e.call(n,`source`),`)`]);case`ImportDeclaration`:if(i.push(`import `),r.importKind&&r.importKind!==`value`&&i.push(r.importKind+` `),r.specifiers&&r.specifiers.length>0){let r=[],a=[];if(e.each(function(e){let t=e.getValue();t.type===`ImportSpecifier`?a.push(n(e)):(t.type===`ImportDefaultSpecifier`||t.type===`ImportNamespaceSpecifier`)&&r.push(n(e))},`specifiers`),r.forEach((e,t)=>{t>0&&i.push(`, `),i.push(e)}),a.length>0){let e=B(`, `).join(a);e.getLineLength(1)>t.wrapColumn&&(e=V([B(`,
18
+ `).join(a).indent(t.tabWidth),`,`])),r.length>0&&i.push(`, `),e.length>1?i.push(`{
19
+ `,e,`
20
+ }`):t.objectCurlySpacing?i.push(`{ `,e,` }`):i.push(`{`,e,`}`)}i.push(` from `)}return i.push(e.call(n,`source`),Rn(e,t,n),`;`),V(i);case`ImportAttribute`:return V([e.call(n,`key`),`: `,e.call(n,`value`)]);case`StaticBlock`:i.push(`static `);case`BlockStatement`:{let a=e.call(e=>Mn(e,t,n),`body`);return a.isEmpty()&&(!r.directives||r.directives.length===0)?(i.push(`{}`),V(i)):(i.push(`{
21
+ `),r.directives&&e.each(function(e){i.push(Yn(n(e).indent(t.tabWidth)),r.directives.length>1||!a.isEmpty()?`
22
+ `:``)},`directives`),i.push(a.indent(t.tabWidth)),i.push(`
23
+ }`),V(i))}case`ReturnStatement`:if(i.push(`return`),r.argument){let a=e.call(n,`argument`);a.startsWithComment()||a.length>1&&q.JSXElement&&q.JSXElement.check(r.argument)?i.push(` (
24
+ `,a.indent(t.tabWidth),`
25
+ )`):i.push(` `,a)}return i.push(`;`),V(i);case`CallExpression`:case`OptionalCallExpression`:return i.push(e.call(n,`callee`)),r.typeParameters&&i.push(e.call(n,`typeParameters`)),r.typeArguments&&i.push(e.call(n,`typeArguments`)),F(r,`optional`)&&i.push(`?.`),i.push(In(e,t,n)),V(i);case`RecordExpression`:i.push(`#`);case`ObjectExpression`:case`ObjectPattern`:case`ObjectTypeAnnotation`:{let a=r.type===`ObjectTypeAnnotation`,o=t.flowObjectCommas?`,`:a?`;`:`,`,s=[],c=!1;a&&(s.push(`indexers`,`callProperties`),r.internalSlots!=null&&s.push(`internalSlots`)),s.push(`properties`);let l=0;s.forEach(function(e){l+=r[e].length});let u=a&&l===1||l===0,d=r.exact?`{|`:`{`,f=r.exact?`|}`:`}`;i.push(u?d:d+`
26
+ `);let p=i.length-1,m=0;if(s.forEach(function(r){e.each(function(e){let r=n(e);u||(r=r.indent(t.tabWidth));let s=!a&&r.length>1;s&&c&&i.push(`
27
+ `),i.push(r),m<l-1?(i.push(o+(s?`
28
+
29
+ `:`
30
+ `)),c=!s):(l!==1&&a||!u&&mt(t,`objects`)&&e.getValue().type!==`RestElement`)&&i.push(o),m++},r)}),r.inexact){let e=B(`...`,t);u?(l>0&&i.push(o,` `),i.push(e)):i.push(`
31
+ `,e.indent(t.tabWidth))}return i.push(u?f:`
32
+ `+f),m!==0&&u&&t.objectCurlySpacing&&(i[p]=d+` `,i[i.length-1]=` `+f),r.typeAnnotation&&i.push(e.call(n,`typeAnnotation`)),V(i)}case`PropertyPattern`:return V([e.call(n,`key`),`: `,e.call(n,`pattern`)]);case`ObjectProperty`:case`Property`:{if(r.method||r.kind===`get`||r.kind===`set`)return Fn(e,t,n);if(r.shorthand&&r.value.type===`AssignmentPattern`)return e.call(n,`value`);let a=e.call(n,`key`);return r.computed?i.push(`[`,a,`]`):i.push(a),(!r.shorthand||r.key.name!==r.value.name)&&i.push(`: `,e.call(n,`value`)),V(i)}case`ClassMethod`:case`ObjectMethod`:case`ClassPrivateMethod`:case`TSDeclareMethod`:return Fn(e,t,n);case`PrivateName`:return V([`#`,e.call(n,`id`)]);case`Decorator`:return V([`@`,e.call(n,`expression`)]);case`TupleExpression`:i.push(`#`);case`ArrayExpression`:case`ArrayPattern`:{let a=r.elements.length,o=e.map(n,`elements`),s=B(`, `).join(o).getLineLength(1)<=t.wrapColumn;return s?t.arrayBracketSpacing?i.push(`[ `):i.push(`[`):i.push(`[
33
+ `),e.each(function(e){let n=e.getName();if(!e.getValue())i.push(`,`);else{let e=o[n];s?n>0&&i.push(` `):e=e.indent(t.tabWidth),i.push(e),(n<a-1||!s&&mt(t,`arrays`))&&i.push(`,`),s||i.push(`
34
+ `)}},`elements`),s&&t.arrayBracketSpacing?i.push(` ]`):i.push(`]`),r.typeAnnotation&&i.push(e.call(n,`typeAnnotation`)),V(i)}case`SequenceExpression`:return B(`, `).join(e.map(n,`expressions`));case`ThisExpression`:return B(`this`);case`Super`:return B(`super`);case`NullLiteral`:return B(`null`);case`RegExpLiteral`:return B(Kn(r)||`/${r.pattern}/${r.flags||``}`,t);case`BigIntLiteral`:return B(Kn(r)||r.value+`n`,t);case`NumericLiteral`:return B(Kn(r)||r.value,t);case`DecimalLiteral`:return B(Kn(r)||r.value+`m`,t);case`StringLiteral`:return B(Jn(r.value,t));case`BooleanLiteral`:case`Literal`:return B(Kn(r)||(typeof r.value==`string`?Jn(r.value,t):r.value),t);case`Directive`:return e.call(n,`value`);case`DirectiveLiteral`:return B(Kn(r)||Jn(r.value,t),t);case`InterpreterDirective`:return B(`#!${r.value}\n`,t);case`ModuleSpecifier`:if(r.local)throw Error(`The ESTree ModuleSpecifier type should be abstract`);return B(Jn(r.value,t),t);case`UnaryExpression`:return i.push(r.operator),/[a-z]$/.test(r.operator)&&i.push(` `),i.push(e.call(n,`argument`)),V(i);case`UpdateExpression`:return i.push(e.call(n,`argument`),r.operator),r.prefix&&i.reverse(),V(i);case`ConditionalExpression`:return V([e.call(n,`test`),` ? `,e.call(n,`consequent`),` : `,e.call(n,`alternate`)]);case`NewExpression`:return i.push(`new `,e.call(n,`callee`)),r.typeParameters&&i.push(e.call(n,`typeParameters`)),r.typeArguments&&i.push(e.call(n,`typeArguments`)),r.arguments&&i.push(In(e,t,n)),V(i);case`VariableDeclaration`:{r.declare&&i.push(`declare `),i.push(r.kind,` `);let t=0,a=e.map(function(e){let r=n(e);return t=Math.max(r.length,t),r},`declarations`);t===1?i.push(B(`, `).join(a)):a.length>1?i.push(B(`,
35
+ `).join(a).indentTail(r.kind.length+1)):i.push(a[0]);let o=e.getParentNode();return!q.ForStatement.check(o)&&!q.ForInStatement.check(o)&&!(q.ForOfStatement&&q.ForOfStatement.check(o))&&!(q.ForAwaitStatement&&q.ForAwaitStatement.check(o))&&i.push(`;`),V(i)}case`VariableDeclarator`:return r.init?B(` = `).join([e.call(n,`id`),e.call(n,`init`)]):e.call(n,`id`);case`WithStatement`:return V([`with (`,e.call(n,`object`),`) `,e.call(n,`body`)]);case`IfStatement`:{let a=Hn(e.call(n,`consequent`),t);return i.push(`if (`,e.call(n,`test`),`)`,a),r.alternate&&i.push(Wn(a)?` else`:`
36
+ else`,Hn(e.call(n,`alternate`),t)),V(i)}case`ForStatement`:{let r=e.call(n,`init`),a=V([`for (`,B(r.length>1?`;
37
+ `:`; `).join([r,e.call(n,`test`),e.call(n,`update`)]).indentTail(5),`)`]),o=Hn(e.call(n,`body`),t);return i.push(a),a.length>1&&(i.push(`
38
+ `),o=o.trimLeft()),i.push(o),V(i)}case`WhileStatement`:return V([`while (`,e.call(n,`test`),`)`,Hn(e.call(n,`body`),t)]);case`ForInStatement`:return V([r.each?`for each (`:`for (`,e.call(n,`left`),` in `,e.call(n,`right`),`)`,Hn(e.call(n,`body`),t)]);case`ForOfStatement`:case`ForAwaitStatement`:return i.push(`for `),(r.await||r.type===`ForAwaitStatement`)&&i.push(`await `),i.push(`(`,e.call(n,`left`),` of `,e.call(n,`right`),`)`,Hn(e.call(n,`body`),t)),V(i);case`DoWhileStatement`:{let r=V([`do`,Hn(e.call(n,`body`),t)]);return i.push(r),Wn(r)?i.push(` while`):i.push(`
39
+ while`),i.push(` (`,e.call(n,`test`),`);`),V(i)}case`DoExpression`:return V([`do {
40
+ `,e.call(e=>Mn(e,t,n),`body`).indent(t.tabWidth),`
41
+ }`]);case`BreakStatement`:return i.push(`break`),r.label&&i.push(` `,e.call(n,`label`)),i.push(`;`),V(i);case`ContinueStatement`:return i.push(`continue`),r.label&&i.push(` `,e.call(n,`label`)),i.push(`;`),V(i);case`LabeledStatement`:return V([e.call(n,`label`),`:
42
+ `,e.call(n,`body`)]);case`TryStatement`:return i.push(`try `,e.call(n,`block`)),r.handler?i.push(` `,e.call(n,`handler`)):r.handlers&&e.each(function(e){i.push(` `,n(e))},`handlers`),r.finalizer&&i.push(` finally `,e.call(n,`finalizer`)),V(i);case`CatchClause`:return i.push(`catch `),r.param&&i.push(`(`,e.call(n,`param`)),r.guard&&i.push(` if `,e.call(n,`guard`)),r.param&&i.push(`) `),i.push(e.call(n,`body`)),V(i);case`ThrowStatement`:return V([`throw `,e.call(n,`argument`),`;`]);case`SwitchStatement`:return V([`switch (`,e.call(n,`discriminant`),`) {
43
+ `,B(`
44
+ `).join(e.map(n,`cases`)),`
45
+ }`]);case`SwitchCase`:return r.test?i.push(`case `,e.call(n,`test`),`:`):i.push(`default:`),r.consequent.length>0&&i.push(`
46
+ `,e.call(e=>Mn(e,t,n),`consequent`).indent(t.tabWidth)),V(i);case`DebuggerStatement`:return B(`debugger;`);case`JSXAttribute`:return i.push(e.call(n,`name`)),r.value&&i.push(`=`,e.call(n,`value`)),V(i);case`JSXIdentifier`:return B(r.name,t);case`JSXNamespacedName`:return B(`:`).join([e.call(n,`namespace`),e.call(n,`name`)]);case`JSXMemberExpression`:return B(`.`).join([e.call(n,`object`),e.call(n,`property`)]);case`JSXSpreadAttribute`:return V([`{...`,e.call(n,`argument`),`}`]);case`JSXSpreadChild`:return V([`{...`,e.call(n,`expression`),`}`]);case`JSXExpressionContainer`:return V([`{`,e.call(n,`expression`),`}`]);case`JSXElement`:case`JSXFragment`:{let i=`opening`+(r.type===`JSXElement`?`Element`:`Fragment`),a=`closing`+(r.type===`JSXElement`?`Element`:`Fragment`),o=e.call(n,i);return r[i].selfClosing?o:V([o,V(e.map(function(e){let t=e.getValue();if(q.Literal.check(t)&&typeof t.value==`string`){if(/\S/.test(t.value))return t.value.replace(/^\s+|\s+$/g,``);if(/\n/.test(t.value))return`
47
+ `}return n(e)},`children`)).indentTail(t.tabWidth),e.call(n,a)])}case`JSXOpeningElement`:{i.push(`<`,e.call(n,`name`));let a=[];e.each(function(e){a.push(` `,n(e))},`attributes`);let o=V(a);return(o.length>1||o.getLineLength(1)>t.wrapColumn)&&(a.forEach(function(e,t){e===` `&&(a[t]=`
48
+ `)}),o=V(a).indentTail(t.tabWidth)),i.push(o,r.selfClosing?` />`:`>`),V(i)}case`JSXClosingElement`:return V([`</`,e.call(n,`name`),`>`]);case`JSXOpeningFragment`:return B(`<>`);case`JSXClosingFragment`:return B(`</>`);case`JSXText`:return B(r.value,t);case`JSXEmptyExpression`:return B(``);case`TypeAnnotatedIdentifier`:return V([e.call(n,`annotation`),` `,e.call(n,`identifier`)]);case`ClassBody`:return r.body.length===0?B(`{}`):V([`{
49
+ `,e.call(e=>Mn(e,t,n),`body`).indent(t.tabWidth),`
50
+ }`]);case`ClassPropertyDefinition`:return i.push(`static `,e.call(n,`definition`)),q.MethodDefinition.check(r.definition)||i.push(`;`),V(i);case`ClassProperty`:{r.declare&&i.push(`declare `);let t=r.accessibility||r.access;typeof t==`string`&&i.push(t,` `),r.static&&i.push(`static `),r.abstract&&i.push(`abstract `),r.readonly&&i.push(`readonly `);let a=e.call(n,`key`);return r.computed&&(a=V([`[`,a,`]`])),r.variance&&(a=V([Vn(e,n),a])),i.push(a),r.optional&&i.push(`?`),r.definite&&i.push(`!`),r.typeAnnotation&&i.push(e.call(n,`typeAnnotation`)),r.value&&i.push(` = `,e.call(n,`value`)),i.push(`;`),V(i)}case`ClassPrivateProperty`:return r.static&&i.push(`static `),i.push(e.call(n,`key`)),r.typeAnnotation&&i.push(e.call(n,`typeAnnotation`)),r.value&&i.push(` = `,e.call(n,`value`)),i.push(`;`),V(i);case`ClassAccessorProperty`:return i.push(...Pn(r),`accessor `),r.computed?i.push(`[`,e.call(n,`key`),`]`):i.push(e.call(n,`key`)),r.optional&&i.push(`?`),r.definite&&i.push(`!`),r.typeAnnotation&&i.push(e.call(n,`typeAnnotation`)),r.value&&i.push(` = `,e.call(n,`value`)),i.push(`;`),V(i);case`ClassDeclaration`:case`ClassExpression`:case`DeclareClass`:return r.declare&&i.push(`declare `),r.abstract&&i.push(`abstract `),i.push(`class`),r.id&&i.push(` `,e.call(n,`id`)),r.typeParameters&&i.push(e.call(n,`typeParameters`)),r.superClass&&i.push(` extends `,e.call(n,`superClass`),e.call(n,`superTypeParameters`)),r.extends&&r.extends.length>0&&i.push(` extends `,B(`, `).join(e.map(n,`extends`))),r.implements&&r.implements.length>0&&i.push(` implements `,B(`, `).join(e.map(n,`implements`))),i.push(` `,e.call(n,`body`)),r.type===`DeclareClass`?Bn(e,i):V(i);case`TemplateElement`:return B(r.value.raw,t).lockIndentTail();case`TemplateLiteral`:{let t=e.map(n,`expressions`);return i.push("`"),e.each(function(e){let r=e.getName();i.push(n(e)),r<t.length&&i.push("${",t[r],`}`)},`quasis`),i.push("`"),V(i).lockIndentTail()}case`TaggedTemplateExpression`:return V([e.call(n,`tag`),e.call(n,`quasi`)]);case`Node`:case`Printable`:case`SourceLocation`:case`Position`:case`Statement`:case`Function`:case`Pattern`:case`Expression`:case`Declaration`:case`Specifier`:case`NamedSpecifier`:case`Comment`:case`Flow`:case`FlowType`:case`FlowPredicate`:case`MemberTypeAnnotation`:case`Type`:case`TSHasOptionalTypeParameterInstantiation`:case`TSHasOptionalTypeParameters`:case`TSHasOptionalTypeAnnotation`:case`ChainElement`:throw Error(`unprintable type: `+JSON.stringify(r.type));case`CommentBlock`:case`Block`:return V([`/*`,B(r.value,t),`*/`]);case`CommentLine`:case`Line`:return V([`//`,B(r.value,t)]);case`TypeAnnotation`:return r.typeAnnotation?(r.typeAnnotation.type!==`FunctionTypeAnnotation`&&i.push(`: `),i.push(e.call(n,`typeAnnotation`)),V(i)):B(``);case`ExistentialTypeParam`:case`ExistsTypeAnnotation`:return B(`*`,t);case`EmptyTypeAnnotation`:return B(`empty`,t);case`AnyTypeAnnotation`:return B(`any`,t);case`MixedTypeAnnotation`:return B(`mixed`,t);case`ArrayTypeAnnotation`:return V([e.call(n,`elementType`),`[]`]);case`TupleTypeAnnotation`:{let a=e.map(n,`types`),o=B(`, `).join(a).getLineLength(1)<=t.wrapColumn;return o?t.arrayBracketSpacing?i.push(`[ `):i.push(`[`):i.push(`[
51
+ `),e.each(function(e){let n=e.getName();if(!e.getValue())i.push(`,`);else{let e=a[n];o?n>0&&i.push(` `):e=e.indent(t.tabWidth),i.push(e),(n<r.types.length-1||!o&&mt(t,`arrays`))&&i.push(`,`),o||i.push(`
52
+ `)}},`types`),o&&t.arrayBracketSpacing?i.push(` ]`):i.push(`]`),V(i)}case`BooleanTypeAnnotation`:return B(`boolean`,t);case`BooleanLiteralTypeAnnotation`:return B(``+r.value,t);case`InterfaceTypeAnnotation`:return i.push(`interface`),r.extends&&r.extends.length>0&&i.push(` extends `,B(`, `).join(e.map(n,`extends`))),i.push(` `,e.call(n,`body`)),V(i);case`DeclareFunction`:return Bn(e,[`function `,e.call(n,`id`),`;`]);case`DeclareModule`:return Bn(e,[`module `,e.call(n,`id`),` `,e.call(n,`body`)]);case`DeclareModuleExports`:return Bn(e,[`module.exports`,e.call(n,`typeAnnotation`)]);case`DeclareVariable`:return Bn(e,[`var `,e.call(n,`id`),`;`]);case`DeclareExportDeclaration`:case`DeclareExportAllDeclaration`:return V([`declare `,zn(e,t,n)]);case`EnumDeclaration`:return V([`enum `,e.call(n,`id`),e.call(n,`body`)]);case`EnumBooleanBody`:case`EnumNumberBody`:case`EnumStringBody`:case`EnumSymbolBody`:return(r.type===`EnumSymbolBody`||r.explicitType)&&i.push(` of `,r.type.slice(4,-4).toLowerCase()),i.push(` {
53
+ `,B(`
54
+ `).join(e.map(n,`members`)).indent(t.tabWidth),`
55
+ }`),V(i);case`EnumDefaultedMember`:return V([e.call(n,`id`),`,`]);case`EnumBooleanMember`:case`EnumNumberMember`:case`EnumStringMember`:return V([e.call(n,`id`),` = `,e.call(n,`init`),`,`]);case`InferredPredicate`:return B(`%checks`,t);case`DeclaredPredicate`:return V([`%checks(`,e.call(n,`value`),`)`]);case`FunctionTypeAnnotation`:{let a=e.getParentNode(0),o=!(q.ObjectTypeCallProperty.check(a)||q.ObjectTypeInternalSlot.check(a)&&a.method||q.DeclareFunction.check(e.getParentNode(2)));o&&!q.FunctionTypeParam.check(a)&&!q.TypeAlias.check(a)&&i.push(`: `);let s=!!r.typeParameters,c=s||r.params.length!==1||r.params[0].name;return i.push(s?e.call(n,`typeParameters`):``,c?`(`:``,Ln(e,t,n),c?`)`:``),r.returnType&&i.push(o?` => `:`: `,e.call(n,`returnType`)),V(i)}case`FunctionTypeParam`:{let t=e.call(n,`name`);return i.push(t),r.optional&&i.push(`?`),t.infos[0].line&&i.push(`: `),i.push(e.call(n,`typeAnnotation`)),V(i)}case`GenericTypeAnnotation`:return V([e.call(n,`id`),e.call(n,`typeParameters`)]);case`DeclareInterface`:i.push(`declare `);case`InterfaceDeclaration`:case`TSInterfaceDeclaration`:return r.declare&&i.push(`declare `),i.push(`interface `,e.call(n,`id`),e.call(n,`typeParameters`),` `),r.extends&&r.extends.length>0&&i.push(`extends `,B(`, `).join(e.map(n,`extends`)),` `),r.body&&i.push(e.call(n,`body`)),V(i);case`ClassImplements`:case`InterfaceExtends`:return V([e.call(n,`id`),e.call(n,`typeParameters`)]);case`IntersectionTypeAnnotation`:return B(` & `).join(e.map(n,`types`));case`NullableTypeAnnotation`:return V([`?`,e.call(n,`typeAnnotation`)]);case`NullLiteralTypeAnnotation`:return B(`null`,t);case`ThisTypeAnnotation`:return B(`this`,t);case`NumberTypeAnnotation`:return B(`number`,t);case`ObjectTypeCallProperty`:return e.call(n,`value`);case`ObjectTypeIndexer`:return r.static&&i.push(`static `),i.push(Vn(e,n),`[`),r.id&&i.push(e.call(n,`id`),`: `),i.push(e.call(n,`key`),`]: `,e.call(n,`value`)),V(i);case`ObjectTypeProperty`:return V([Vn(e,n),e.call(n,`key`),r.optional?`?`:``,`: `,e.call(n,`value`)]);case`ObjectTypeInternalSlot`:return V([r.static?`static `:``,`[[`,e.call(n,`id`),`]]`,r.optional?`?`:``,r.value.type===`FunctionTypeAnnotation`?``:`: `,e.call(n,`value`)]);case`QualifiedTypeIdentifier`:return V([e.call(n,`qualification`),`.`,e.call(n,`id`)]);case`StringLiteralTypeAnnotation`:return B(Jn(r.value,t),t);case`NumberLiteralTypeAnnotation`:case`NumericLiteralTypeAnnotation`:return B(JSON.stringify(r.value),t);case`BigIntLiteralTypeAnnotation`:return B(r.raw,t);case`StringTypeAnnotation`:return B(`string`,t);case`DeclareTypeAlias`:i.push(`declare `);case`TypeAlias`:return V([`type `,e.call(n,`id`),e.call(n,`typeParameters`),` = `,e.call(n,`right`),`;`]);case`DeclareOpaqueType`:i.push(`declare `);case`OpaqueType`:return i.push(`opaque type `,e.call(n,`id`),e.call(n,`typeParameters`)),r.supertype&&i.push(`: `,e.call(n,`supertype`)),r.impltype&&i.push(` = `,e.call(n,`impltype`)),i.push(`;`),V(i);case`TypeCastExpression`:return V([`(`,e.call(n,`expression`),e.call(n,`typeAnnotation`),`)`]);case`TypeParameterDeclaration`:case`TypeParameterInstantiation`:return V([`<`,B(`, `).join(e.map(n,`params`)),`>`]);case`Variance`:return r.kind===`plus`?B(`+`):r.kind===`minus`?B(`-`):B(``);case`TypeParameter`:return r.variance&&i.push(Vn(e,n)),i.push(e.call(n,`name`)),r.bound&&i.push(e.call(n,`bound`)),r.default&&i.push(`=`,e.call(n,`default`)),V(i);case`TypeofTypeAnnotation`:return V([B(`typeof `,t),e.call(n,`argument`)]);case`IndexedAccessType`:case`OptionalIndexedAccessType`:return V([e.call(n,`objectType`),r.optional?`?.`:``,`[`,e.call(n,`indexType`),`]`]);case`UnionTypeAnnotation`:return B(` | `).join(e.map(n,`types`));case`VoidTypeAnnotation`:return B(`void`,t);case`NullTypeAnnotation`:return B(`null`,t);case`SymbolTypeAnnotation`:return B(`symbol`,t);case`BigIntTypeAnnotation`:return B(`bigint`,t);case`TSType`:throw Error(`unprintable type: `+JSON.stringify(r.type));case`TSNumberKeyword`:return B(`number`,t);case`TSBigIntKeyword`:return B(`bigint`,t);case`TSObjectKeyword`:return B(`object`,t);case`TSBooleanKeyword`:return B(`boolean`,t);case`TSStringKeyword`:return B(`string`,t);case`TSSymbolKeyword`:return B(`symbol`,t);case`TSAnyKeyword`:return B(`any`,t);case`TSVoidKeyword`:return B(`void`,t);case`TSIntrinsicKeyword`:return B(`intrinsic`,t);case`TSThisType`:return B(`this`,t);case`TSNullKeyword`:return B(`null`,t);case`TSUndefinedKeyword`:return B(`undefined`,t);case`TSUnknownKeyword`:return B(`unknown`,t);case`TSNeverKeyword`:return B(`never`,t);case`TSArrayType`:return V([e.call(n,`elementType`),`[]`]);case`TSLiteralType`:return e.call(n,`literal`);case`TSUnionType`:return B(` | `).join(e.map(n,`types`));case`TSIntersectionType`:return B(` & `).join(e.map(n,`types`));case`TSConditionalType`:return i.push(e.call(n,`checkType`),` extends `,e.call(n,`extendsType`),` ? `,e.call(n,`trueType`),` : `,e.call(n,`falseType`)),V(i);case`TSInferType`:return i.push(`infer `,e.call(n,`typeParameter`)),V(i);case`TSParenthesizedType`:return V([`(`,e.call(n,`typeAnnotation`),`)`]);case`TSFunctionType`:return V([e.call(n,`typeParameters`),`(`,Ln(e,t,n),`) => `,e.call(n,`typeAnnotation`,`typeAnnotation`)]);case`TSConstructorType`:return V([`new `,e.call(n,`typeParameters`),`(`,Ln(e,t,n),`) => `,e.call(n,`typeAnnotation`,`typeAnnotation`)]);case`TSMappedType`:return i.push(r.readonly?`readonly `:``,`[`,e.call(n,`typeParameter`),`]`,r.optional?`?`:``),r.typeAnnotation&&i.push(`: `,e.call(n,`typeAnnotation`),`;`),V([`{
56
+ `,V(i).indent(t.tabWidth),`
57
+ }`]);case`TSTupleType`:return V([`[`,B(`, `).join(e.map(n,`elementTypes`)),`]`]);case`TSNamedTupleMember`:return i.push(e.call(n,`label`)),r.optional&&i.push(`?`),i.push(`: `,e.call(n,`elementType`)),V(i);case`TSRestType`:return V([`...`,e.call(n,`typeAnnotation`)]);case`TSOptionalType`:return V([e.call(n,`typeAnnotation`),`?`]);case`TSIndexedAccessType`:return V([e.call(n,`objectType`),`[`,e.call(n,`indexType`),`]`]);case`TSTypeOperator`:return V([e.call(n,`operator`),` `,e.call(n,`typeAnnotation`)]);case`TSTypeLiteral`:{let r=B(`
58
+ `).join(e.map(n,`members`).map(e=>Un(e)===`;`?e:e.concat(`;`)));return r.isEmpty()?B(`{}`,t):(i.push(`{
59
+ `,r.indent(t.tabWidth),`
60
+ }`),V(i))}case`TSEnumMember`:return i.push(e.call(n,`id`)),r.initializer&&i.push(` = `,e.call(n,`initializer`)),V(i);case`TSTypeQuery`:return V([`typeof `,e.call(n,`exprName`)]);case`TSParameterProperty`:return r.accessibility&&i.push(r.accessibility,` `),r.export&&i.push(`export `),r.static&&i.push(`static `),r.readonly&&i.push(`readonly `),i.push(e.call(n,`parameter`)),V(i);case`TSTypeReference`:return V([e.call(n,`typeName`),e.call(n,`typeParameters`)]);case`TSQualifiedName`:return V([e.call(n,`left`),`.`,e.call(n,`right`)]);case`TSAsExpression`:case`TSSatisfiesExpression`:{let t=e.call(n,`expression`);return i.push(t,r.type===`TSSatisfiesExpression`?` satisfies `:` as `,e.call(n,`typeAnnotation`)),V(i)}case`TSTypeCastExpression`:return V([e.call(n,`expression`),e.call(n,`typeAnnotation`)]);case`TSNonNullExpression`:return V([e.call(n,`expression`),`!`]);case`TSTypeAnnotation`:return V([`: `,e.call(n,`typeAnnotation`)]);case`TSIndexSignature`:return V([r.readonly?`readonly `:``,`[`,e.map(n,`parameters`),`]`,e.call(n,`typeAnnotation`)]);case`TSPropertySignature`:return i.push(Vn(e,n),r.readonly?`readonly `:``),r.computed?i.push(`[`,e.call(n,`key`),`]`):i.push(e.call(n,`key`)),i.push(r.optional?`?`:``,e.call(n,`typeAnnotation`)),V(i);case`TSMethodSignature`:return r.computed?i.push(`[`,e.call(n,`key`),`]`):i.push(e.call(n,`key`)),r.optional&&i.push(`?`),i.push(e.call(n,`typeParameters`),`(`,Ln(e,t,n),`)`,e.call(n,`typeAnnotation`)),V(i);case`TSTypePredicate`:return r.asserts&&i.push(`asserts `),i.push(e.call(n,`parameterName`)),r.typeAnnotation&&i.push(` is `,e.call(n,`typeAnnotation`,`typeAnnotation`)),V(i);case`TSCallSignatureDeclaration`:return V([e.call(n,`typeParameters`),`(`,Ln(e,t,n),`)`,e.call(n,`typeAnnotation`)]);case`TSConstructSignatureDeclaration`:return r.typeParameters?i.push(`new`,e.call(n,`typeParameters`)):i.push(`new `),i.push(`(`,Ln(e,t,n),`)`,e.call(n,`typeAnnotation`)),V(i);case`TSTypeAliasDeclaration`:return V([r.declare?`declare `:``,`type `,e.call(n,`id`),e.call(n,`typeParameters`),` = `,e.call(n,`typeAnnotation`),`;`]);case`TSTypeParameter`:{i.push(e.call(n,`name`));let t=e.getParentNode(0),a=q.TSMappedType.check(t);return r.constraint&&i.push(a?` in `:` extends `,e.call(n,`constraint`)),r.default&&i.push(` = `,e.call(n,`default`)),V(i)}case`TSTypeAssertion`:return i.push(`<`,e.call(n,`typeAnnotation`),`> `,e.call(n,`expression`)),V(i);case`TSTypeParameterDeclaration`:case`TSTypeParameterInstantiation`:return V([`<`,B(`, `).join(e.map(n,`params`)),`>`]);case`TSEnumDeclaration`:{i.push(r.declare?`declare `:``,r.const?`const `:``,`enum `,e.call(n,`id`));let a=B(`,
61
+ `).join(e.map(n,`members`));return a.isEmpty()?i.push(` {}`):i.push(` {
62
+ `,a.indent(t.tabWidth),`
63
+ }`),V(i)}case`TSExpressionWithTypeArguments`:return V([e.call(n,`expression`),e.call(n,`typeParameters`)]);case`TSInterfaceBody`:{let r=B(`
64
+ `).join(e.map(n,`body`).map(e=>Un(e)===`;`?e:e.concat(`;`)));return r.isEmpty()?B(`{}`,t):V([`{
65
+ `,r.indent(t.tabWidth),`
66
+ }`])}case`TSImportType`:return i.push(`import(`,e.call(n,`argument`),`)`),r.qualifier&&i.push(`.`,e.call(n,`qualifier`)),r.typeParameters&&i.push(e.call(n,`typeParameters`)),V(i);case`TSImportEqualsDeclaration`:return r.isExport&&i.push(`export `),i.push(`import `,e.call(n,`id`),` = `,e.call(n,`moduleReference`)),Yn(V(i));case`TSExternalModuleReference`:return V([`require(`,e.call(n,`expression`),`)`]);case`TSModuleDeclaration`:return e.getParentNode().type===`TSModuleDeclaration`?i.push(`.`):(r.declare&&i.push(`declare `),r.global||(r.id.type===`StringLiteral`||r.id.type===`Literal`&&typeof r.id.value==`string`||r.loc&&r.loc.lines&&r.id.loc&&r.loc.lines.sliceString(r.loc.start,r.id.loc.start).indexOf(`module`)>=0?i.push(`module `):i.push(`namespace `))),i.push(e.call(n,`id`)),r.body&&(i.push(` `),i.push(e.call(n,`body`))),V(i);case`TSModuleBlock`:{let r=e.call(e=>Mn(e,t,n),`body`);return r.isEmpty()?i.push(`{}`):i.push(`{
67
+ `,r.indent(t.tabWidth),`
68
+ }`),V(i)}case`TSInstantiationExpression`:return i.push(e.call(n,`expression`),e.call(n,`typeParameters`)),V(i);case`V8IntrinsicIdentifier`:return V([`%`,e.call(n,`name`)]);case`TopicReference`:return B(`#`);case`ClassHeritage`:case`ComprehensionBlock`:case`ComprehensionExpression`:case`Glob`:case`GeneratorExpression`:case`LetStatement`:case`LetExpression`:case`GraphExpression`:case`GraphIndexExpression`:case`XMLDefaultDeclaration`:case`XMLAnyName`:case`XMLQualifiedIdentifier`:case`XMLFunctionQualifiedIdentifier`:case`XMLAttributeSelector`:case`XMLFilterExpression`:case`XML`:case`XMLElement`:case`XMLList`:case`XMLEscape`:case`XMLText`:case`XMLStartTag`:case`XMLEndTag`:case`XMLPointTag`:case`XMLName`:case`XMLAttribute`:case`XMLCdata`:case`XMLComment`:case`XMLProcessingInstruction`:default:throw Error(`unknown type: `+JSON.stringify(r.type))}}function jn(e,t){let n=[],r=e.getValue();return r.decorators&&r.decorators.length>0&&!pt(e)?e.each(function(e){n.push(t(e),`
69
+ `)},`decorators`):ft(r)&&r.declaration&&r.declaration.decorators&&e.each(function(e){n.push(t(e),`
70
+ `)},`declaration`,`decorators`),V(n)}function Mn(e,t,n){let r=[];e.each(function(e){let t=e.getValue();t&&(t.type===`EmptyStatement`&&!(t.comments&&t.comments.length>0)||(q.Comment.check(t)||q.Statement.check(t)||Sn.assert(t),r.push({node:t,printed:n(e)})))});let i=null,a=r.length,o=[];return r.forEach(function(e,n){let r=e.printed,s=e.node,c=r.length>1,l=n>0,u=n<a-1,d,f,p=s&&s.loc&&s.loc.lines,m=p&&t.reuseWhitespace&&st(s,p);if(l)if(m){let e=p.skipSpaces(m.start,!0),t=e?e.line:1,n=m.start.line-t;d=Array(n+1).join(`
71
+ `)}else d=c?`
72
+
73
+ `:`
74
+ `;else d=``;if(u)if(m){let e=p.skipSpaces(m.end),t=(e?e.line:p.length)-m.end.line;f=Array(t+1).join(`
75
+ `)}else f=c?`
76
+
77
+ `:`
78
+ `;else f=``;o.push(Nn(i,d),r),u?i=f:f&&o.push(f)}),V(o)}function Nn(e,t){if(!e&&!t)return B(``);if(!e)return B(t);if(!t)return B(e);let n=B(e),r=B(t);return r.length>n.length?r:n}function Pn(e){let t=[];e.declare&&t.push(`declare `);let n=e.accessibility||e.access;return typeof n==`string`&&t.push(n,` `),e.static&&t.push(`static `),e.override&&t.push(`override `),e.abstract&&t.push(`abstract `),e.readonly&&t.push(`readonly `),t}function Fn(e,t,n){let r=e.getNode(),i=r.kind,a=[],o=r.value;q.FunctionExpression.check(o)||(o=r),a.push(...Pn(r)),o.async&&a.push(`async `),o.generator&&a.push(`*`),(i===`get`||i===`set`)&&a.push(i,` `);let s=e.call(n,`key`);return r.computed&&(s=V([`[`,s,`]`])),a.push(s),r.optional&&a.push(`?`),r===o?(a.push(e.call(n,`typeParameters`),`(`,Ln(e,t,n),`)`,e.call(n,`returnType`)),r.body?a.push(` `,e.call(n,`body`)):a.push(`;`)):(a.push(e.call(n,`value`,`typeParameters`),`(`,e.call(e=>Ln(e,t,n),`value`),`)`,e.call(n,`value`,`returnType`)),o.body?a.push(` `,e.call(n,`value`,`body`)):a.push(`;`)),V(a)}function In(e,t,n){let r=e.map(n,`arguments`),i=mt(t,`parameters`),a=B(`, `).join(r);return a.getLineLength(1)>t.wrapColumn?(a=B(`,
79
+ `).join(r),V([`(
80
+ `,a.indent(t.tabWidth),i?`,
81
+ )`:`
82
+ )`])):V([`(`,a,`)`])}function Ln(e,t,n){let r=e.getValue(),i,a=[];r.params?(i=r.params,a=e.map(n,`params`)):r.parameters&&(i=r.parameters,a=e.map(n,`parameters`)),r.defaults&&e.each(function(e){let t=e.getName(),r=a[t];r&&e.getValue()&&(a[t]=V([r,` = `,n(e)]))},`defaults`),r.rest&&a.push(V([`...`,e.call(n,`rest`)]));let o=B(`, `).join(a);return o.length>1||o.getLineLength(1)>t.wrapColumn?(o=B(`,
83
+ `).join(a),o=mt(t,`parameters`)&&!r.rest&&i[i.length-1].type!==`RestElement`?V([o,`,
84
+ `]):V([o,`
85
+ `]),V([`
86
+ `,o.indent(t.tabWidth)])):o}function Rn(e,t,n){let r=e.getValue();if(r.assertions&&r.assertions.length>0){let r=[` assert {`],i=e.map(n,`assertions`),a=B(`, `).join(i);return a.length>1||a.getLineLength(1)>t.wrapColumn?r.push(`
87
+ `,B(`,
88
+ `).join(i).indent(t.tabWidth),`
89
+ }`):r.push(` `,a,` }`),V(r)}return B(``)}function zn(e,t,n){let r=e.getValue(),i=[`export `];r.exportKind&&r.exportKind===`type`&&(r.declaration||i.push(`type `));let a=t.objectCurlySpacing;if(q.Declaration.assert(r),(r.default||r.type===`ExportDefaultDeclaration`)&&i.push(`default `),r.declaration)i.push(e.call(n,`declaration`));else if(r.specifiers){if(r.specifiers.length===1&&r.specifiers[0].type===`ExportBatchSpecifier`)i.push(`*`);else if(r.specifiers.length===0)i.push(`{}`);else if(r.specifiers[0].type===`ExportDefaultSpecifier`){let r=[],a=[];if(e.each(function(e){e.getValue().type===`ExportDefaultSpecifier`?r.push(n(e)):a.push(n(e))},`specifiers`),r.forEach((e,t)=>{t>0&&i.push(`, `),i.push(e)}),a.length>0){let e=B(`, `).join(a);e.getLineLength(1)>t.wrapColumn&&(e=V([B(`,
90
+ `).join(a).indent(t.tabWidth),`,`])),r.length>0&&i.push(`, `),e.length>1?i.push(`{
91
+ `,e,`
92
+ }`):t.objectCurlySpacing?i.push(`{ `,e,` }`):i.push(`{`,e,`}`)}}else i.push(a?`{ `:`{`,B(`, `).join(e.map(n,`specifiers`)),a?` }`:`}`);r.source&&i.push(` from `,e.call(n,`source`),Rn(e,t,n))}let o=V(i);return Un(o)!==`;`&&!(r.declaration&&(r.declaration.type===`FunctionDeclaration`||r.declaration.type===`ClassDeclaration`||r.declaration.type===`TSModuleDeclaration`||r.declaration.type===`TSInterfaceDeclaration`||r.declaration.type===`TSEnumDeclaration`))&&(o=V([o,`;`])),o}function Bn(e,t){return pt(e)||t.unshift(`declare `),V(t)}function Vn(e,t){return e.call(function(e){let n=e.getValue();return n?n===`plus`?B(`+`):n===`minus`?B(`-`):t(e):B(``)},`variance`)}function Hn(e,t){return e.length>1?V([` `,e]):V([`
93
+ `,Yn(e).indent(t.tabWidth)])}function Un(e){let t=e.lastPos();do{let n=e.charAt(t);if(/\S/.test(n))return n}while(e.prevPos(t))}function Wn(e){return Un(e)===`}`}function Gn(e){return e.replace(/['"]/g,e=>e===`"`?`'`:`"`)}function Kn(e){let t=F(e,`value`),n=F(e,`extra`);if(n&&typeof n.raw==`string`&&t==n.rawValue)return n.raw;if(e.type===`Literal`){let n=e.raw;if(typeof n==`string`&&t==n)return n}}function qn(e){return JSON.stringify(e).replace(/[\u2028\u2029]/g,function(e){return`\\u`+e.charCodeAt(0).toString(16)})}function Jn(e,t){switch(Sn.assert(e),t.quote){case`auto`:{let t=qn(e),n=Gn(qn(Gn(e)));return t.length>n.length?n:t}case`single`:return Gn(qn(Gn(e)));case`double`:default:return qn(e)}}function Yn(e){let t=Un(e);return!t||`
94
+ };`.indexOf(t)<0?V([e,`;`]):e}function Xn(e,t){return new On(t).print(e)}let Zn;function Qn(){if(Zn)return Zn;let e=$n();return Zn={parse(t,n){return r.parse(t,{...e,...n})}},Zn}function $n(){return{sourceType:`module`,strictMode:!1,allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,startLine:1,tokens:!0,plugins:[`asyncGenerators`,`bigInt`,`classPrivateMethods`,`classPrivateProperties`,`classProperties`,`classStaticBlock`,`decimal`,`decorators-legacy`,`doExpressions`,`dynamicImport`,`exportDefaultFrom`,`exportExtensions`,`exportNamespaceFrom`,`functionBind`,`functionSent`,`importAssertions`,`importMeta`,`nullishCoalescingOperator`,`numericSeparator`,`objectRestSpread`,`optionalCatchBinding`,`optionalChaining`,[`pipelineOperator`,{proposal:`minimal`}],[`recordAndTuple`,{syntaxType:`hash`}],`throwExpressions`,`topLevelAwait`,`v8intrinsic`,`jsx`,`typescript`]}}var J=class extends Error{rawMessage;options;constructor(e,t){if(super(``),this.name=`MagicastError`,this.rawMessage=e,this.options=t,t?.ast&&t?.code&&t.ast.loc){let{line:n,column:r}=t.ast.loc.start,i=t.code.split(`
95
+ `),a=Math.max(0,n-3),o=Math.min(i.length,n+3),s=i.slice(a,o).map((e,t)=>(e=`${(a+t+1).toString().padStart(3,` `)} | ${e}`,a+t===n-1&&(e+=`\n${` `.repeat(6+r)}^`),e));e+=`\n\n${s.join(`
96
+ `)}\n`}this.message=e}};const er=new Set([`Literal`,`StringLiteral`,`NumericLiteral`,`BooleanLiteral`,`NullLiteral`,`BigIntLiteral`]),tr=new Set([`string`,`number`,`boolean`,`bigint`,`symbol`,`undefined`]),Y=N;function nr(e){return/^[$A-Z_a-z][\w$]*$/.test(e)}const rr=`__magicast_proxy`;function X(e,t=new Set){if(e===void 0)return Y.identifier(`undefined`);if(e===null)return Y.literal(null);if(tr.has(typeof e))return Y.literal(e);if(t.has(e))throw new J(`Can not serialize circular reference`);if(t.add(e),e[rr])return e.$ast;if(e instanceof RegExp){let t=Y.regExpLiteral(e.source,e.flags);return delete t.extra.raw,t}return e instanceof Set?Y.newExpression(Y.identifier(`Set`),[Y.arrayExpression([...e].map(e=>X(e,t)))]):e instanceof Date?Y.newExpression(Y.identifier(`Date`),[Y.literal(e.toISOString())]):e instanceof Map?Y.newExpression(Y.identifier(`Map`),[Y.arrayExpression([...e].map(([e,n])=>Y.arrayExpression([X(e,t),X(n,t)])))]):Array.isArray(e)?Y.arrayExpression(e.map(e=>X(e,t))):typeof e==`object`?Y.objectExpression(Object.entries(e).map(([e,n])=>Y.property(`init`,/^[$A-Z_a-z][\w$]*$/g.test(e)?Y.identifier(e):Y.literal(e),X(n,t)))):Y.literal(e)}function ir(e,t={}){let n=t;return n[rr]=!0,n.$ast=e,n.$type||=`object`,n}const ar={enumerable:!0,configurable:!0};function Z(e,t,n){let r=ir(e,t);return new Proxy({},{ownKeys(){return Object.keys(r).filter(e=>e!==rr&&!e.startsWith(`$`))},getOwnPropertyDescriptor(){return ar},has(e,t){return t in r},...n,get(e,t,i){if(t in r)return r[t];if(n.get)return n.get(e,t,i)},set(e,t,i,a){return t in r?(r[t]=i,!0):n.set?n.set(e,t,i,a):!1}})}const Q=N,or=new WeakMap;function sr(e,t,n){if(or.has(t))return or.get(t);let r=Z(t,{get $declaration(){return e},get imported(){return t.type===`ImportDefaultSpecifier`?`default`:t.type===`ImportNamespaceSpecifier`?`*`:t.imported.type===`Identifier`?t.imported.name:t.imported.value},set imported(e){if(t.type!==`ImportSpecifier`)throw new J(`Changing import name is not yet implemented`);t.imported.type===`Identifier`?t.imported.name=e:t.imported.value=e},get local(){return t.local.name},set local(e){t.local.name=e},get from(){return e.source.value},set from(r){if(r===e.source.value)return;e.specifiers=e.specifiers.filter(e=>e!==t),e.specifiers.length===0&&(n.body=n.body.filter(t=>t!==e));let i=n.body.find(e=>e.type===`ImportDeclaration`&&e.source.value===r);i?i.specifiers.push(t):n.body.unshift(Q.importDeclaration([t],Q.stringLiteral(r)))},toJSON(){return{imported:this.imported,local:this.local,from:this.from}}},{ownKeys(){return[`imported`,`local`,`from`,`toJSON`]}});return or.set(t,r),r}function cr(e,t){let n=()=>{let t=[];for(let n of e.body)if(n.type===`ImportDeclaration`)for(let r of n.specifiers)t.push(sr(n,r,e));return t},r=(t,r,i)=>{let a=n(),o=a.find(e=>e.local===t),s=r.local||t;if(o)return o.imported=r.imported,o.local=s,o.from=r.from,!0;let c=r.imported===`default`?Q.importDefaultSpecifier(Q.identifier(s)):r.imported===`*`?Q.importNamespaceSpecifier(Q.identifier(s)):Q.importSpecifier(Q.identifier(r.imported),Q.identifier(s)),l=a.find(e=>e.from===r.from)?.$declaration;if(l)l.specifiers.push(c);else if(i===`prepend`||a.length===0)e.body.unshift(Q.importDeclaration([c],Q.stringLiteral(r.from)));else{let t=a.at(-1).$declaration,n=e.body.indexOf(t);e.body.splice(n+1,0,Q.importDeclaration([c],Q.stringLiteral(r.from)))}return!0},i=t=>{let r=n().find(e=>e.local===t);if(!r)return!1;let i=r.$declaration,a=r.$ast;return i.specifiers=i.specifiers.filter(e=>e!==a),i.specifiers.length===0&&(e.body=e.body.filter(e=>e!==i)),!0};return Z(e,{$type:`imports`,$add(e){r(e.local||e.imported,e,`prepend`)},$prepend(e){r(e.local||e.imported,e,`prepend`)},$append(e){r(e.local||e.imported,e,`append`)},get $items(){return n()},toJSON(){return n().reduce((e,t)=>(e[t.local]=t,e),{})}},{get(e,t){return n().find(e=>e.local===t)},set(e,t,n){return r(t,n,`prepend`)},deleteProperty(e,t){return i(t)},ownKeys(){return n().map(e=>e.local)},has(e,t){return n().some(e=>e.local===t)}})}function lr(e,t,n){let r=ir(e,{$type:`array`,push(e){t.push(X(e))},pop(){return $(t.pop(),n)},unshift(e){t.unshift(X(e))},shift(){return $(t.shift(),n)},splice(e,r,...i){return t.splice(e,r,...i.map(e=>X(e))).map(e=>$(e,n))},toJSON(){return t.map(e=>$(e,n))}});return new Proxy([],{get(e,i,a){if(i in r)return r[i];let o=a;if(i===`map`)return e=>{let t=[],n=0;for(let r of o)t.push(e(r,n,o)),n++;return t};if(i===`filter`)return e=>{let t=[],n=0;for(let r of o)e(r,n,o)&&t.push(r),n++;return t};if(i===`forEach`)return e=>{let t=0;for(let n of o)e(n,t,o),t++};if(i===`reduce`)return(e,...t)=>{let n=[...o];if(n.length===0&&t.length===0)throw TypeError(`Reduce of empty array with no initial value`);let r,i=0;t.length>0?r=t[0]:(r=n[0],i=1);for(let t=i;t<n.length;t++)r=e(r,n[t],t,n);return r};if(i===`find`)return e=>{let t=0;for(let n of o){if(e(n,t,o))return n;t++}};if(i===`findIndex`)return e=>{let t=0;for(let n of o){if(e(n,t,o))return t;t++}return-1};if(i===`includes`)return(e,t)=>[...o].includes(e,t);if(i===`length`)return t.length;if(i===Symbol.iterator)return function*(){for(let e of t)yield $(e,n)};if(typeof i==`symbol`)return Reflect.get(e,i,a);let s=+i;if(!Number.isNaN(s)){let e=t[s];if(e)return $(e,n)}return Reflect.get(e,i,a)},set(e,n,r,i){if(typeof n==`symbol`)return Reflect.set(e,n,r,i);let a=+n;return Number.isNaN(a)?Reflect.set(e,n,r,i):(t[a]=X(r),!0)},deleteProperty(e,n){if(typeof n==`symbol`)return Reflect.deleteProperty(e,n);let r=+n;return Number.isNaN(r)?Reflect.deleteProperty(e,n):(t[r]=X(void 0),!0)},ownKeys(){return[`length`,...t.map((e,t)=>t.toString())]},getOwnPropertyDescriptor(e,i){if(i in r)return{configurable:!0,enumerable:!0,value:r[i]};if(i===`length`)return{value:t.length,writable:!0,enumerable:!1,configurable:!1};if(typeof i==`symbol`)return Reflect.getOwnPropertyDescriptor(e,i);let a=+i;return!Number.isNaN(a)&&a<t.length?{value:$(t[a],n),writable:!0,enumerable:!0,configurable:!0}:Reflect.getOwnPropertyDescriptor(e,i)}})}function ur(e,t){if(`elements`in e)return lr(e,e.elements,t)}function dr(e,t){if(e.type!==`CallExpression`)throw new J(`Not a function call`);function n(e){if(e.type===`Identifier`)return e.name;if(e.type===`MemberExpression`)return`${n(e.object)}.${n(e.property)}`;throw new J(`Not implemented`)}let r=lr(e,e.arguments,t);return Z(e,{$type:`function-call`,$callee:n(e.callee),$args:r},{})}function fr(e,t){if(e.type!==`ArrowFunctionExpression`)throw new J(`Not an arrow function expression`);let n=ir(e,{$type:`arrow-function-expression`,$params:lr(e,e.params,t),$body:$(e.body,t)});return new Proxy(()=>{},{get(e,t,r){return t in n?n[t]:Reflect.get(e,t,r)},apply(){throw new J("Calling proxified functions is not supported. Use `generateCode` to get the code string.")}})}const pr=N;function mr(e,t){if(!(`properties`in e))return;let n=(e,n=!1)=>{let r=e.type;if(r===`Property`||r===`ObjectProperty`||r===`ObjectMethod`){let t=e.key;if(t.type===`Identifier`)return t.name;if(t.type===`StringLiteral`||t.type===`NumericLiteral`||t.type===`BooleanLiteral`)return t.value.toString()}if(n)throw new J(`Casting "${e.type}" is not supported`,{ast:e,code:t?.$code})},r=t=>{let r=String(t);for(let t of e.properties)if(n(t)===r){let e=t.type;if(e===`Property`||e===`ObjectProperty`)return t.value;if(t.type===`ObjectMethod`){let e=pr.functionExpression(null,t.params,t.body,t.generator,t.async);return e.async=t.async,e.loc=t.loc,e}}},i=(t,r)=>{let i=e.properties.find(e=>n(e)===t);if(i){let n=i.type;if(n===`Property`||n===`ObjectProperty`)i.value=r;else if(i.type===`ObjectMethod`){let n=pr.property(`init`,pr.identifier(t),r),a=e.properties.indexOf(i);a!==-1&&(e.properties[a]=n)}}else{let n=pr.property(`init`,nr(t)?pr.identifier(t):pr.stringLiteral(t),r);e.properties.push(n)}};return Z(e,{$type:`object`,toJSON(){return e.properties.reduce((e,r)=>{let i=n(r);if(i){let n=r.type;if(n===`Property`||n===`ObjectProperty`)e[i]=$(r.value,t);else if(r.type===`ObjectMethod`){let n=pr.functionExpression(null,r.params,r.body,r.generator,r.async);n.async=r.async,n.loc=r.loc,e[i]=$(n,t)}}return e},{})}},{get(e,n){let i=r(n);if(i)return $(i,t)},set(e,t,n){return typeof t!=`string`&&(t=String(t)),i(t,X(n)),!0},deleteProperty(t,r){typeof r!=`string`&&(r=String(r));let i=e.properties.findIndex(e=>n(e)===r);return i!==-1&&e.properties.splice(i,1),!0},ownKeys(){return e.properties.map(e=>n(e)).filter(Boolean)},getOwnPropertyDescriptor(e,t){if(typeof t==`string`&&Array.from(this.ownKeys(e)).includes(t))return{enumerable:!0,configurable:!0}},has(e,t){return typeof t==`string`?Array.from(this.ownKeys(e)).includes(t):!1}})}function hr(e,t){if(e.type!==`NewExpression`)throw new J(`Not a new expression`);function n(e){if(e.type===`Identifier`)return e.name;if(e.type===`MemberExpression`)return`${n(e.object)}.${n(e.property)}`;throw new J(`Not implemented`)}let r=lr(e,e.arguments,t);return Z(e,{$type:`new-expression`,$callee:n(e.callee),$args:r},{})}function gr(e){if(e.type!==`Identifier`)throw new J(`Not an identifier`);return Z(e,{$type:`identifier`,$name:e.name},{})}function _r(e){if(e.type!==`LogicalExpression`)throw new J(`Not a logical expression`);return Z(e,{$type:`logicalExpression`},{})}function vr(e,t){if(e.type!==`MemberExpression`)throw new J(`Not a member expression`);return Z(e,{$type:`member-expression`,$object:$(e.object,t),$property:$(e.property,t)},{})}function yr(e,t){return Z(e,{$type:`binary-expression`,$left:$(e.left,t),$right:$(e.right,t),$operator:e.operator},{})}function br(e,t){return Z(e,{$type:`block-statement`,$body:lr(e,e.body,t)},{})}function xr(e,t){let n=ir(e,{$type:`function-expression`,$params:lr(e,e.params,t),$body:$(e.body,t)});return new Proxy(()=>{},{get(e,t,r){return t in n?n[t]:Reflect.get(e,t,r)},apply(){throw new J("Calling proxified functions is not supported. Use `generateCode` to get the code string.")}})}const Sr=new WeakMap;function $(e,t){if(tr.has(typeof e))return e;if(e.type===`Identifier`&&e.name===`undefined`)return;if(e.type===`RegExpLiteral`){let{pattern:t,flags:n}=e;return new RegExp(t,n)}if(er.has(e.type))return e.value;if(Sr.has(e))return Sr.get(e);let n;switch(e.type){case`ObjectExpression`:n=mr(e,t);break;case`ArrayExpression`:n=ur(e,t);break;case`CallExpression`:n=dr(e,t);break;case`ArrowFunctionExpression`:n=fr(e,t);break;case`FunctionExpression`:n=xr(e,t);break;case`NewExpression`:n=hr(e,t);break;case`Identifier`:n=gr(e);break;case`LogicalExpression`:n=_r(e);break;case`MemberExpression`:n=vr(e);break;case`BinaryExpression`:n=yr(e,t);break;case`BlockStatement`:n=br(e,t);break;case`TSAsExpression`:case`TSSatisfiesExpression`:n=$(e.expression,t);break;default:throw new J(`Casting "${e.type}" is not supported`,{ast:e,code:t?.$code})}return Sr.set(e,n),n}const Cr=N;function wr(e,t){let n=t=>{let n=t===`default`?`ExportDefaultDeclaration`:`ExportNamedDeclaration`;for(let r of e.body)if(r.type===n){if(t===`default`)return r.declaration;if(r.declaration){if(r.declaration.type===`VariableDeclaration`){let e=r.declaration.declarations[0];if(`name`in e.id&&e.id.name===t)return e.init}if(r.declaration.type===`FunctionDeclaration`&&r.declaration.id&&r.declaration.id.name===t){let e=r.declaration,t=Cr.functionExpression(e.id,e.params,e.body,e.generator,e.async);return t.async=e.async,t.loc=e.loc,t}}}},r=(t,n)=>{let r=t===`default`?`ExportDefaultDeclaration`:`ExportNamedDeclaration`,i=X(n);for(let n of e.body)if(n.type===r){if(t===`default`){n.declaration=i;return}if(n.declaration){if(n.declaration.type===`VariableDeclaration`){let e=n.declaration.declarations[0];if(`name`in e.id&&e.id.name===t){e.init=i;return}}if(n.declaration.type===`FunctionDeclaration`&&n.declaration.id&&n.declaration.id.name===t){let r=Cr.exportNamedDeclaration(Cr.variableDeclaration(`const`,[Cr.variableDeclarator(Cr.identifier(t),i)])),a=e.body.indexOf(n);a!==-1&&(e.body[a]=r);return}}}e.body.push(t===`default`?Cr.exportDefaultDeclaration(i):Cr.exportNamedDeclaration(Cr.variableDeclaration(`const`,[Cr.variableDeclarator(Cr.identifier(t),i)])))};return Z(e,{$type:`exports`},{get(e,r){let i=n(r);if(i)return $(i,t)},set(e,t,n){return r(t,n),!0},ownKeys(){return e.body.flatMap(e=>{if(e.type===`ExportDefaultDeclaration`)return[`default`];if(e.type===`ExportNamedDeclaration`&&e.declaration){if(e.declaration.type===`VariableDeclaration`)return e.declaration.declarations.map(e=>`name`in e.id?e.id.name:``);if(e.declaration.type===`FunctionDeclaration`)return e.declaration.id?[e.declaration.id.name]:[]}return[]}).filter(Boolean)},deleteProperty(t,n){let r=n===`default`?`ExportDefaultDeclaration`:`ExportNamedDeclaration`;for(let t=0;t<e.body.length;t++){let i=e.body[t];if(i.type===r){if(n===`default`)return e.body.splice(t,1),!0;if(i.declaration){if(i.declaration.type===`VariableDeclaration`){let r=i.declaration.declarations[0];if(`name`in r.id&&r.id.name===n)return e.body.splice(t,1),!0}if(i.declaration.type===`FunctionDeclaration`&&i.declaration.id&&i.declaration.id.name===n)return e.body.splice(t,1),!0}}}return!1}})}function Tr(e,t){let n=e.program;if(n.type!==`Program`)throw new J(`Cannot proxify ${e.type} as module`);let r={$code:t,$type:`module`},i=Z(n,r,{ownKeys(){return[`imports`,`exports`,`generate`]}});return r.exports=wr(n,i),r.imports=cr(n,i),r.generate=e=>kr(i,e),i}function Er(e,t={}){let n={wrapColumn:t.wrapColumn===void 0,indent:t.tabWidth===void 0||t.useTabs===void 0,quote:t.quote===void 0,arrowParens:t.arrowParensAlways===void 0,trailingComma:t.trailingComma===void 0},r=2,i=0,a=0,o=0,s=0,c=/(?<doubleQuote>"[^"]+")|(?<singleQuote>'[^']+')|(?<singleParam>\([^),]+\)\s*=>)|(?<trailingComma>,\s*[\]}])/g,l={doubleQuote:0,singleQuote:0,singleParam:0,trailingComma:0},u=(e||``).split(`
97
+ `),d=!1;for(let e of u){let t=e.trim();if(t.length!==0){if(n.wrapColumn&&e.length>o&&(o=e.length),n.indent){let t=e.match(/^\s+/)?.[0]||``;t.length>0&&(t.length>0&&t.length<r&&(r=t.length),t[0]===` `?i++:t.length>0&&i--)}if(t.at(-1)===`;`?a++:t.length>0&&a--,n.quote||n.arrowParens){let e=t.matchAll(c);for(let t of e)if(t.groups)for(let e in l)t.groups[e]&&l[e]++}n.trailingComma&&((e.startsWith(`}`)||e.startsWith(`]`))&&(d?s++:s--),d=t.endsWith(`,`))}}return{wrapColumn:o,useTabs:i>0,tabWidth:r,quote:l.singleQuote>l.doubleQuote?`single`:`double`,arrowParensAlways:l.singleParam>0,trailingComma:s>0||l.trailingComma>0,useSemi:a>0,arrayBracketSpacing:void 0,objectCurlySpacing:void 0,...t}}const Dr=N;function Or(e,t){return Tr(Kt(e,{parser:t?.parser||Qn(),...t}),e)}function kr(e,t={}){let n=e.$ast||e;n.type===`FunctionExpression`&&(n=Dr.expressionStatement(n));let r=t.format===!1||!(`$code`in e)?{}:Er(e.$code,t.format),{code:i,map:a}=Xn(n,{...t,...r});return{code:i,map:a}}async function Ar(e,t={}){let r=await n.readFile(e,`utf8`);return t.sourceFileName=t.sourceFileName??e,Or(r,t)}async function jr(e,t,r){let{code:i,map:a}=kr(`$ast`in e?e.$ast:e,r);await n.writeFile(t,i),a&&await n.writeFile(t+`.map`,a)}export{jr as n,Ar as t};