@vuebro/runtime 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.vite/manifest.json +10 -10
- package/dist/assets/{NotFoundView-DD6YcdfV.js → NotFoundView-mNnyFEmq.js} +1 -1
- package/dist/assets/PageView-Bc8__PDR.js +1 -0
- package/dist/assets/RootView-Bo1pisMY.js +1 -0
- package/dist/assets/{compiler-sfc-DIe3h52S.js → compiler-sfc-CHbDt8t7.js} +9 -9
- package/dist/assets/index-DZp-kO1Q.js +415 -0
- package/dist/index.html +2 -2
- package/package.json +22 -22
- package/dist/assets/PageView-C-9kvHc-.js +0 -1
- package/dist/assets/RootView-GkLpOmYa.js +0 -1
- package/dist/assets/index-DzCtUPEU.js +0 -415
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
Details: ${c}`:""}`,u=new SyntaxError(p);u.code=t,r&&(u.loc=r),e.onWarn(u)}function jl(t){throw t}function Kd(t){console.warn(`[Vue warn] ${t.message}`)}function we(t,e,r,i){const n=(r||Vl)[t]+(i||""),l=new SyntaxError(String(n));return l.code=t,l.loc=e,l}const tE={ABRUPT_CLOSING_OF_EMPTY_COMMENT:0,0:"ABRUPT_CLOSING_OF_EMPTY_COMMENT",CDATA_IN_HTML_CONTENT:1,1:"CDATA_IN_HTML_CONTENT",DUPLICATE_ATTRIBUTE:2,2:"DUPLICATE_ATTRIBUTE",END_TAG_WITH_ATTRIBUTES:3,3:"END_TAG_WITH_ATTRIBUTES",END_TAG_WITH_TRAILING_SOLIDUS:4,4:"END_TAG_WITH_TRAILING_SOLIDUS",EOF_BEFORE_TAG_NAME:5,5:"EOF_BEFORE_TAG_NAME",EOF_IN_CDATA:6,6:"EOF_IN_CDATA",EOF_IN_COMMENT:7,7:"EOF_IN_COMMENT",EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT:8,8:"EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT",EOF_IN_TAG:9,9:"EOF_IN_TAG",INCORRECTLY_CLOSED_COMMENT:10,10:"INCORRECTLY_CLOSED_COMMENT",INCORRECTLY_OPENED_COMMENT:11,11:"INCORRECTLY_OPENED_COMMENT",INVALID_FIRST_CHARACTER_OF_TAG_NAME:12,12:"INVALID_FIRST_CHARACTER_OF_TAG_NAME",MISSING_ATTRIBUTE_VALUE:13,13:"MISSING_ATTRIBUTE_VALUE",MISSING_END_TAG_NAME:14,14:"MISSING_END_TAG_NAME",MISSING_WHITESPACE_BETWEEN_ATTRIBUTES:15,15:"MISSING_WHITESPACE_BETWEEN_ATTRIBUTES",NESTED_COMMENT:16,16:"NESTED_COMMENT",UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME:17,17:"UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME",UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE:18,18:"UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE",UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME:19,19:"UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME",UNEXPECTED_NULL_CHARACTER:20,20:"UNEXPECTED_NULL_CHARACTER",UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME:21,21:"UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME",UNEXPECTED_SOLIDUS_IN_TAG:22,22:"UNEXPECTED_SOLIDUS_IN_TAG",X_INVALID_END_TAG:23,23:"X_INVALID_END_TAG",X_MISSING_END_TAG:24,24:"X_MISSING_END_TAG",X_MISSING_INTERPOLATION_END:25,25:"X_MISSING_INTERPOLATION_END",X_MISSING_DIRECTIVE_NAME:26,26:"X_MISSING_DIRECTIVE_NAME",X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END:27,27:"X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END",X_V_IF_NO_EXPRESSION:28,28:"X_V_IF_NO_EXPRESSION",X_V_IF_SAME_KEY:29,29:"X_V_IF_SAME_KEY",X_V_ELSE_NO_ADJACENT_IF:30,30:"X_V_ELSE_NO_ADJACENT_IF",X_V_FOR_NO_EXPRESSION:31,31:"X_V_FOR_NO_EXPRESSION",X_V_FOR_MALFORMED_EXPRESSION:32,32:"X_V_FOR_MALFORMED_EXPRESSION",X_V_FOR_TEMPLATE_KEY_PLACEMENT:33,33:"X_V_FOR_TEMPLATE_KEY_PLACEMENT",X_V_BIND_NO_EXPRESSION:34,34:"X_V_BIND_NO_EXPRESSION",X_V_ON_NO_EXPRESSION:35,35:"X_V_ON_NO_EXPRESSION",X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET:36,36:"X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET",X_V_SLOT_MIXED_SLOT_USAGE:37,37:"X_V_SLOT_MIXED_SLOT_USAGE",X_V_SLOT_DUPLICATE_SLOT_NAMES:38,38:"X_V_SLOT_DUPLICATE_SLOT_NAMES",X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN:39,39:"X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN",X_V_SLOT_MISPLACED:40,40:"X_V_SLOT_MISPLACED",X_V_MODEL_NO_EXPRESSION:41,41:"X_V_MODEL_NO_EXPRESSION",X_V_MODEL_MALFORMED_EXPRESSION:42,42:"X_V_MODEL_MALFORMED_EXPRESSION",X_V_MODEL_ON_SCOPE_VARIABLE:43,43:"X_V_MODEL_ON_SCOPE_VARIABLE",X_V_MODEL_ON_PROPS:44,44:"X_V_MODEL_ON_PROPS",X_INVALID_EXPRESSION:45,45:"X_INVALID_EXPRESSION",X_KEEP_ALIVE_INVALID_CHILDREN:46,46:"X_KEEP_ALIVE_INVALID_CHILDREN",X_PREFIX_ID_NOT_SUPPORTED:47,47:"X_PREFIX_ID_NOT_SUPPORTED",X_MODULE_MODE_NOT_SUPPORTED:48,48:"X_MODULE_MODE_NOT_SUPPORTED",X_CACHE_HANDLER_NOT_SUPPORTED:49,49:"X_CACHE_HANDLER_NOT_SUPPORTED",X_SCOPE_ID_NOT_SUPPORTED:50,50:"X_SCOPE_ID_NOT_SUPPORTED",X_VNODE_HOOKS:51,51:"X_VNODE_HOOKS",X_V_BIND_INVALID_SAME_NAME_ARGUMENT:52,52:"X_V_BIND_INVALID_SAME_NAME_ARGUMENT",__EXTEND_POINT__:53,53:"__EXTEND_POINT__"},Vl={0:"Illegal comment.",1:"CDATA section is allowed only in XML context.",2:"Duplicate attribute.",3:"End tag cannot have attributes.",4:"Illegal '/' in tags.",5:"Unexpected EOF in tag.",6:"Unexpected EOF in CDATA section.",7:"Unexpected EOF in comment.",8:"Unexpected EOF in script.",9:"Unexpected EOF in tag.",10:"Incorrectly closed comment.",11:"Incorrectly opened comment.",12:"Illegal tag name. Use '<' to print '<'.",13:"Attribute value was expected.",14:"End tag name was expected.",15:"Whitespace was expected.",16:"Unexpected '<!--' in comment.",17:`Attribute name cannot contain U+0022 ("), U+0027 ('), and U+003C (<).`,18:"Unquoted attribute value cannot contain U+0022 (\"), U+0027 ('), U+003C (<), U+003D (=), and U+0060 (`).",19:"Attribute name cannot start with '='.",21:"'<?' is allowed only in XML context.",20:"Unexpected null character.",22:"Illegal '/' in tags.",23:"Invalid end tag.",24:"Element is missing end tag.",25:"Interpolation end sign was not found.",27:"End bracket for dynamic directive argument was not found. Note that dynamic directive argument cannot contain spaces.",26:"Legal directive name was expected.",28:"v-if/v-else-if is missing expression.",29:"v-if/else branches must use unique keys.",30:"v-else/v-else-if has no adjacent v-if or v-else-if.",31:"v-for is missing expression.",32:"v-for has invalid expression.",33:"<template v-for> key should be placed on the <template> tag.",34:"v-bind is missing expression.",52:"v-bind with same-name shorthand only allows static argument.",35:"v-on is missing expression.",36:"Unexpected custom directive on <slot> outlet.",37:"Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.",38:"Duplicate slot names found. ",39:"Extraneous children found when component already has explicitly named default slot. These children will be ignored.",40:"v-slot can only be used on components or <template> tags.",41:"v-model is missing expression.",42:"v-model value must be a valid JavaScript member expression.",43:"v-model cannot be used on v-for or v-slot scope variables because they are not writable.",44:`v-model cannot be used on a prop, because local prop bindings are not writable.
|
|
8
8
|
Use a v-bind binding combined with a v-on listener that emits update:x event instead.`,45:"Error parsing JavaScript expression: ",46:"<KeepAlive> expects exactly one child component.",51:"@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.",47:'"prefixIdentifiers" option is not supported in this build of compiler.',48:"ES module mode is not supported in this build of compiler.",49:'"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.',50:'"scopeId" option is only supported in module mode.',53:""};function Kn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Yn(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var r=function i(){var n=!1;try{n=this instanceof i}catch{}return n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(i){var n=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(r,i,n.get?n:{enumerable:!0,get:function(){return t[i]}})}),r}var Gr={},dh;function rE(){if(dh)return Gr;dh=1,Object.defineProperty(Gr,"__esModule",{value:!0});function t(b,a){if(b==null)return{};var s={};for(var o in b)if({}.hasOwnProperty.call(b,o)){if(a.indexOf(o)!==-1)continue;s[o]=b[o]}return s}class e{constructor(a,s,o){this.line=void 0,this.column=void 0,this.index=void 0,this.line=a,this.column=s,this.index=o}}class r{constructor(a,s){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=a,this.end=s}}function i(b,a){const{line:s,column:o,index:h}=b;return new e(s,o+a,h+a)}const n="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED";var l={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:n},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:n}};const c={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"},p=b=>b.type==="UpdateExpression"?c.UpdateExpression[`${b.prefix}`]:c[b.type];var u={AccessorIsGenerator:({kind:b})=>`A ${b}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:b})=>`Missing initializer in ${b} 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:b})=>`\`${b}\` 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:b,exportName:a})=>`A string literal cannot be used as an exported binding without \`from\`.
|
|
9
9
|
- Did you mean \`export { '${b}' as '${a}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:b})=>`'${b==="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:b})=>`Unsyntactic ${b==="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:b})=>`A string literal cannot be used as an imported binding.
|
|
10
|
-
- Did you mean \`import { "${b}" 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.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:({radix:b})=>`Expected number in radix ${b}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:b})=>`Escape sequence in keyword ${b}.`,InvalidIdentifier:({identifierName:b})=>`Invalid identifier ${b}.`,InvalidLhs:({ancestor:b})=>`Invalid left-hand side in ${p(b)}.`,InvalidLhsBinding:({ancestor:b})=>`Binding invalid left-hand side in ${p(b)}.`,InvalidLhsOptionalChaining:({ancestor:b})=>`Invalid optional chaining in the left-hand side of ${p(b)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:b})=>`Unexpected character '${b}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:b})=>`Private name #${b} 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:b})=>`Label '${b}' 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:b})=>`This experimental syntax requires enabling the parser plugin: ${b.map(a=>JSON.stringify(a)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:b})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${b.map(a=>JSON.stringify(a)).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:b})=>`Duplicate key "${b}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:b})=>`An export name cannot include a lone surrogate, found '\\u${b.toString(16)}'.`,ModuleExportUndefined:({localName:b})=>`Export '${b}' 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:b})=>`Private names are only allowed in property accesses (\`obj.#${b}\`) or in \`in\` expressions (\`#${b} in obj\`).`,PrivateNameRedeclaration:({identifierName:b})=>`Duplicate private name #${b}.`,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:b})=>`Unexpected keyword '${b}'.`,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:b})=>`Unexpected reserved word '${b}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:b,unexpected:a})=>`Unexpected token${a?` '${a}'.`:""}${b?`, expected "${b}"`:""}`,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.",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:b,onlyValidPropertyName:a})=>`The only valid meta property for ${b} is ${b}.${a}.`,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:b})=>`Identifier '${b}' has already been declared.`,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."},f={StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:b})=>`Assigning to '${b}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:b})=>`Binding '${b}' 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:b})=>`Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`${String.fromCodePoint(b)}\`.`};const m=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]);var y=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:b})=>`Invalid topic token ${b}. In order to use ${b} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${b}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:b})=>`Hack-style pipe body cannot be an unparenthesized ${p({type:b})}; 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.'});const g=["message"];function w(b,a,s){Object.defineProperty(b,a,{enumerable:!1,configurable:!0,value:s})}function v({toMessage:b,code:a,reasonCode:s,syntaxPlugin:o}){const h=s==="MissingPlugin"||s==="MissingOneOfPlugins";{const S={AccessorCannotDeclareThisParameter:"AccesorCannotDeclareThisParameter",AccessorCannotHaveTypeParameters:"AccesorCannotHaveTypeParameters",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference",SetAccessorCannotHaveOptionalParameter:"SetAccesorCannotHaveOptionalParameter",SetAccessorCannotHaveRestParameter:"SetAccesorCannotHaveRestParameter",SetAccessorCannotHaveReturnType:"SetAccesorCannotHaveReturnType"};S[s]&&(s=S[s])}return function S(P,C){const R=new SyntaxError;return R.code=a,R.reasonCode=s,R.loc=P,R.pos=P.index,R.syntaxPlugin=o,h&&(R.missingPlugin=C.missingPlugin),w(R,"clone",function($={}){var q;const{line:J,column:ee,index:oe}=(q=$.loc)!=null?q:P;return S(new e(J,ee,oe),Object.assign({},C,$.details))}),w(R,"details",C),Object.defineProperty(R,"message",{configurable:!0,get(){const F=`${b(C)} (${P.line}:${P.column})`;return this.message=F,F},set(F){Object.defineProperty(this,"message",{value:F,writable:!0})}}),R}}function T(b,a){if(Array.isArray(b))return o=>T(o,b[0]);const s={};for(const o of Object.keys(b)){const h=b[o],S=typeof h=="string"?{message:()=>h}:typeof h=="function"?{message:h}:h,{message:P}=S,C=t(S,g),R=typeof P=="string"?()=>P:P;s[o]=v(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:o,toMessage:R},a?{syntaxPlugin:a}:{},C))}return s}const E=Object.assign({},T(l),T(u),T(f),T(d),T`pipelineOperator`(y));function x(){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:null,ranges:!1,tokens:!1,createImportExpressions:!1,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0}}function A(b){const a=x();if(b==null)return a;if(b.annexB!=null&&b.annexB!==!1)throw new Error("The `annexB` option can only be set to `false`.");for(const s of Object.keys(a))b[s]!=null&&(a[s]=b[s]);if(a.startLine===1)b.startIndex==null&&a.startColumn>0?a.startIndex=a.startColumn:b.startColumn==null&&a.startIndex>0&&(a.startColumn=a.startIndex);else if((b.startColumn==null||b.startIndex==null)&&b.startIndex!=null)throw new Error("With a `startLine > 1` you must also specify `startIndex` and `startColumn`.");return a}const{defineProperty:N}=Object,_=(b,a)=>{b&&N(b,a,{enumerable:!1,value:b[a]})};function M(b){return _(b.loc.start,"index"),_(b.loc.end,"index"),b}var D=b=>class extends b{parse(){const s=M(super.parse());return this.optionFlags&256&&(s.tokens=s.tokens.map(M)),s}parseRegExpLiteral({pattern:s,flags:o}){let h=null;try{h=new RegExp(s,o)}catch{}const S=this.estreeParseLiteral(h);return S.regex={pattern:s,flags:o},S}parseBigIntLiteral(s){let o;try{o=BigInt(s)}catch{o=null}const h=this.estreeParseLiteral(o);return h.bigint=String(h.value||s),h}parseDecimalLiteral(s){const h=this.estreeParseLiteral(null);return h.decimal=String(h.value||s),h}estreeParseLiteral(s){return this.parseLiteral(s,"Literal")}parseStringLiteral(s){return this.estreeParseLiteral(s)}parseNumericLiteral(s){return this.estreeParseLiteral(s)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(s){return this.estreeParseLiteral(s)}estreeParseChainExpression(s,o){const h=this.startNodeAtNode(s);return h.expression=s,this.finishNodeAt(h,"ChainExpression",o)}directiveToStmt(s){const o=s.value;delete s.value,this.castNodeTo(o,"Literal"),o.raw=o.extra.raw,o.value=o.extra.expressionValue;const h=this.castNodeTo(s,"ExpressionStatement");return h.expression=o,h.directive=o.extra.rawValue,delete o.extra,h}fillOptionalPropertiesForTSESLint(s){}cloneEstreeStringLiteral(s){const{start:o,end:h,loc:S,range:P,raw:C,value:R}=s,F=Object.create(s.constructor.prototype);return F.type="Literal",F.start=o,F.end=h,F.loc=S,F.range=P,F.raw=C,F.value=R,F}initFunction(s,o){super.initFunction(s,o),s.expression=!1}checkDeclaration(s){s!=null&&this.isObjectProperty(s)?this.checkDeclaration(s.value):super.checkDeclaration(s)}getObjectOrClassMethodParams(s){return s.value.params}isValidDirective(s){var o;return s.type==="ExpressionStatement"&&s.expression.type==="Literal"&&typeof s.expression.value=="string"&&!((o=s.expression.extra)!=null&&o.parenthesized)}parseBlockBody(s,o,h,S,P){super.parseBlockBody(s,o,h,S,P);const C=s.directives.map(R=>this.directiveToStmt(R));s.body=C.concat(s.body),delete s.directives}parsePrivateName(){const s=super.parsePrivateName();return this.getPluginOption("estree","classFeatures")?this.convertPrivateNameToPrivateIdentifier(s):s}convertPrivateNameToPrivateIdentifier(s){const o=super.getPrivateNameSV(s);return s=s,delete s.id,s.name=o,this.castNodeTo(s,"PrivateIdentifier")}isPrivateName(s){return this.getPluginOption("estree","classFeatures")?s.type==="PrivateIdentifier":super.isPrivateName(s)}getPrivateNameSV(s){return this.getPluginOption("estree","classFeatures")?s.name:super.getPrivateNameSV(s)}parseLiteral(s,o){const h=super.parseLiteral(s,o);return h.raw=h.extra.raw,delete h.extra,h}parseFunctionBody(s,o,h=!1){super.parseFunctionBody(s,o,h),s.expression=s.body.type!=="BlockStatement"}parseMethod(s,o,h,S,P,C,R=!1){let F=this.startNode();F.kind=s.kind,F=super.parseMethod(F,o,h,S,P,C,R),delete F.kind;const{typeParameters:$}=s;$&&(delete s.typeParameters,F.typeParameters=$,this.resetStartLocationFromNode(F,$));const q=this.castNodeTo(F,"FunctionExpression");return s.value=q,C==="ClassPrivateMethod"&&(s.computed=!1),C==="ObjectMethod"?(s.kind==="method"&&(s.kind="init"),s.shorthand=!1,this.finishNode(s,"Property")):this.finishNode(s,"MethodDefinition")}nameIsConstructor(s){return s.type==="Literal"?s.value==="constructor":super.nameIsConstructor(s)}parseClassProperty(...s){const o=super.parseClassProperty(...s);return this.getPluginOption("estree","classFeatures")&&this.castNodeTo(o,"PropertyDefinition"),o}parseClassPrivateProperty(...s){const o=super.parseClassPrivateProperty(...s);return this.getPluginOption("estree","classFeatures")&&(this.castNodeTo(o,"PropertyDefinition"),o.computed=!1),o}parseClassAccessorProperty(s){const o=super.parseClassAccessorProperty(s);return this.getPluginOption("estree","classFeatures")&&(o.abstract&&this.hasPlugin("typescript")?(delete o.abstract,this.castNodeTo(o,"TSAbstractAccessorProperty")):this.castNodeTo(o,"AccessorProperty")),o}parseObjectProperty(s,o,h,S){const P=super.parseObjectProperty(s,o,h,S);return P&&(P.kind="init",this.castNodeTo(P,"Property")),P}finishObjectProperty(s){return s.kind="init",this.finishNode(s,"Property")}isValidLVal(s,o,h){return s==="Property"?"value":super.isValidLVal(s,o,h)}isAssignable(s,o){return s!=null&&this.isObjectProperty(s)?this.isAssignable(s.value,o):super.isAssignable(s,o)}toAssignable(s,o=!1){if(s!=null&&this.isObjectProperty(s)){const{key:h,value:S}=s;this.isPrivateName(h)&&this.classScope.usePrivateName(this.getPrivateNameSV(h),h.loc.start),this.toAssignable(S,o)}else super.toAssignable(s,o)}toAssignableObjectExpressionProp(s,o,h){s.type==="Property"&&(s.kind==="get"||s.kind==="set")?this.raise(E.PatternHasAccessor,s.key):s.type==="Property"&&s.method?this.raise(E.PatternHasMethod,s.key):super.toAssignableObjectExpressionProp(s,o,h)}finishCallExpression(s,o){const h=super.finishCallExpression(s,o);if(h.callee.type==="Import"){var S,P;this.castNodeTo(h,"ImportExpression"),h.source=h.arguments[0],h.options=(S=h.arguments[1])!=null?S:null,h.attributes=(P=h.arguments[1])!=null?P:null,delete h.arguments,delete h.callee}else h.type==="OptionalCallExpression"?this.castNodeTo(h,"CallExpression"):h.optional=!1;return h}toReferencedArguments(s){s.type!=="ImportExpression"&&super.toReferencedArguments(s)}parseExport(s,o){const h=this.state.lastTokStartLoc,S=super.parseExport(s,o);switch(S.type){case"ExportAllDeclaration":S.exported=null;break;case"ExportNamedDeclaration":S.specifiers.length===1&&S.specifiers[0].type==="ExportNamespaceSpecifier"&&(this.castNodeTo(S,"ExportAllDeclaration"),S.exported=S.specifiers[0].exported,delete S.specifiers);case"ExportDefaultDeclaration":{var P;const{declaration:C}=S;(C==null?void 0:C.type)==="ClassDeclaration"&&((P=C.decorators)==null?void 0:P.length)>0&&C.start===S.start&&this.resetStartLocation(S,h)}break}return S}stopParseSubscript(s,o){const h=super.stopParseSubscript(s,o);return o.optionalChainMember?this.estreeParseChainExpression(h,s.loc.end):h}parseMember(s,o,h,S,P){const C=super.parseMember(s,o,h,S,P);return C.type==="OptionalMemberExpression"?this.castNodeTo(C,"MemberExpression"):C.optional=!1,C}isOptionalMemberExpression(s){return s.type==="ChainExpression"?s.expression.type==="MemberExpression":super.isOptionalMemberExpression(s)}hasPropertyAsPrivateName(s){return s.type==="ChainExpression"&&(s=s.expression),super.hasPropertyAsPrivateName(s)}isObjectProperty(s){return s.type==="Property"&&s.kind==="init"&&!s.method}isObjectMethod(s){return s.type==="Property"&&(s.method||s.kind==="get"||s.kind==="set")}castNodeTo(s,o){const h=super.castNodeTo(s,o);return this.fillOptionalPropertiesForTSESLint(h),h}cloneIdentifier(s){const o=super.cloneIdentifier(s);return this.fillOptionalPropertiesForTSESLint(o),o}cloneStringLiteral(s){return s.type==="Literal"?this.cloneEstreeStringLiteral(s):super.cloneStringLiteral(s)}finishNodeAt(s,o,h){return M(super.finishNodeAt(s,o,h))}finishNode(s,o){const h=super.finishNode(s,o);return this.fillOptionalPropertiesForTSESLint(h),h}resetStartLocation(s,o){super.resetStartLocation(s,o),M(s)}resetEndLocation(s,o=this.state.lastTokEndLoc){super.resetEndLocation(s,o),M(s)}};class O{constructor(a,s){this.token=void 0,this.preserveSpace=void 0,this.token=a,this.preserveSpace=!!s}}const I={brace:new O("{"),j_oTag:new O("<tag"),j_cTag:new O("</tag"),j_expr:new O("<tag>...</tag>",!0)};I.template=new O("`",!0);const k=!0,L=!0,V=!0,K=!0,re=!0,z=!0;class se{constructor(a,s={}){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=a,this.keyword=s.keyword,this.beforeExpr=!!s.beforeExpr,this.startsExpr=!!s.startsExpr,this.rightAssociative=!!s.rightAssociative,this.isLoop=!!s.isLoop,this.isAssign=!!s.isAssign,this.prefix=!!s.prefix,this.postfix=!!s.postfix,this.binop=s.binop!=null?s.binop:null,this.updateContext=null}}const he=new Map;function ne(b,a={}){a.keyword=b;const s=B(b,a);return he.set(b,s),s}function ge(b,a){return B(b,{beforeExpr:k,binop:a})}let ve=-1;const Q=[],ie=[],G=[],j=[],U=[],H=[];function B(b,a={}){var s,o,h,S;return++ve,ie.push(b),G.push((s=a.binop)!=null?s:-1),j.push((o=a.beforeExpr)!=null?o:!1),U.push((h=a.startsExpr)!=null?h:!1),H.push((S=a.prefix)!=null?S:!1),Q.push(new se(b,a)),ve}function W(b,a={}){var s,o,h,S;return++ve,he.set(b,ve),ie.push(b),G.push((s=a.binop)!=null?s:-1),j.push((o=a.beforeExpr)!=null?o:!1),U.push((h=a.startsExpr)!=null?h:!1),H.push((S=a.prefix)!=null?S:!1),Q.push(new se("name",a)),ve}const ue={bracketL:B("[",{beforeExpr:k,startsExpr:L}),bracketHashL:B("#[",{beforeExpr:k,startsExpr:L}),bracketBarL:B("[|",{beforeExpr:k,startsExpr:L}),bracketR:B("]"),bracketBarR:B("|]"),braceL:B("{",{beforeExpr:k,startsExpr:L}),braceBarL:B("{|",{beforeExpr:k,startsExpr:L}),braceHashL:B("#{",{beforeExpr:k,startsExpr:L}),braceR:B("}"),braceBarR:B("|}"),parenL:B("(",{beforeExpr:k,startsExpr:L}),parenR:B(")"),comma:B(",",{beforeExpr:k}),semi:B(";",{beforeExpr:k}),colon:B(":",{beforeExpr:k}),doubleColon:B("::",{beforeExpr:k}),dot:B("."),question:B("?",{beforeExpr:k}),questionDot:B("?."),arrow:B("=>",{beforeExpr:k}),template:B("template"),ellipsis:B("...",{beforeExpr:k}),backQuote:B("`",{startsExpr:L}),dollarBraceL:B("${",{beforeExpr:k,startsExpr:L}),templateTail:B("...`",{startsExpr:L}),templateNonTail:B("...${",{beforeExpr:k,startsExpr:L}),at:B("@"),hash:B("#",{startsExpr:L}),interpreterDirective:B("#!..."),eq:B("=",{beforeExpr:k,isAssign:K}),assign:B("_=",{beforeExpr:k,isAssign:K}),slashAssign:B("_=",{beforeExpr:k,isAssign:K}),xorAssign:B("_=",{beforeExpr:k,isAssign:K}),moduloAssign:B("_=",{beforeExpr:k,isAssign:K}),incDec:B("++/--",{prefix:re,postfix:z,startsExpr:L}),bang:B("!",{beforeExpr:k,prefix:re,startsExpr:L}),tilde:B("~",{beforeExpr:k,prefix:re,startsExpr:L}),doubleCaret:B("^^",{startsExpr:L}),doubleAt:B("@@",{startsExpr:L}),pipeline:ge("|>",0),nullishCoalescing:ge("??",1),logicalOR:ge("||",1),logicalAND:ge("&&",2),bitwiseOR:ge("|",3),bitwiseXOR:ge("^",4),bitwiseAND:ge("&",5),equality:ge("==/!=/===/!==",6),lt:ge("</>/<=/>=",7),gt:ge("</>/<=/>=",7),relational:ge("</>/<=/>=",7),bitShift:ge("<</>>/>>>",8),bitShiftL:ge("<</>>/>>>",8),bitShiftR:ge("<</>>/>>>",8),plusMin:B("+/-",{beforeExpr:k,binop:9,prefix:re,startsExpr:L}),modulo:B("%",{binop:10,startsExpr:L}),star:B("*",{binop:10}),slash:ge("/",10),exponent:B("**",{beforeExpr:k,binop:11,rightAssociative:!0}),_in:ne("in",{beforeExpr:k,binop:7}),_instanceof:ne("instanceof",{beforeExpr:k,binop:7}),_break:ne("break"),_case:ne("case",{beforeExpr:k}),_catch:ne("catch"),_continue:ne("continue"),_debugger:ne("debugger"),_default:ne("default",{beforeExpr:k}),_else:ne("else",{beforeExpr:k}),_finally:ne("finally"),_function:ne("function",{startsExpr:L}),_if:ne("if"),_return:ne("return",{beforeExpr:k}),_switch:ne("switch"),_throw:ne("throw",{beforeExpr:k,prefix:re,startsExpr:L}),_try:ne("try"),_var:ne("var"),_const:ne("const"),_with:ne("with"),_new:ne("new",{beforeExpr:k,startsExpr:L}),_this:ne("this",{startsExpr:L}),_super:ne("super",{startsExpr:L}),_class:ne("class",{startsExpr:L}),_extends:ne("extends",{beforeExpr:k}),_export:ne("export"),_import:ne("import",{startsExpr:L}),_null:ne("null",{startsExpr:L}),_true:ne("true",{startsExpr:L}),_false:ne("false",{startsExpr:L}),_typeof:ne("typeof",{beforeExpr:k,prefix:re,startsExpr:L}),_void:ne("void",{beforeExpr:k,prefix:re,startsExpr:L}),_delete:ne("delete",{beforeExpr:k,prefix:re,startsExpr:L}),_do:ne("do",{isLoop:V,beforeExpr:k}),_for:ne("for",{isLoop:V}),_while:ne("while",{isLoop:V}),_as:W("as",{startsExpr:L}),_assert:W("assert",{startsExpr:L}),_async:W("async",{startsExpr:L}),_await:W("await",{startsExpr:L}),_defer:W("defer",{startsExpr:L}),_from:W("from",{startsExpr:L}),_get:W("get",{startsExpr:L}),_let:W("let",{startsExpr:L}),_meta:W("meta",{startsExpr:L}),_of:W("of",{startsExpr:L}),_sent:W("sent",{startsExpr:L}),_set:W("set",{startsExpr:L}),_source:W("source",{startsExpr:L}),_static:W("static",{startsExpr:L}),_using:W("using",{startsExpr:L}),_yield:W("yield",{startsExpr:L}),_asserts:W("asserts",{startsExpr:L}),_checks:W("checks",{startsExpr:L}),_exports:W("exports",{startsExpr:L}),_global:W("global",{startsExpr:L}),_implements:W("implements",{startsExpr:L}),_intrinsic:W("intrinsic",{startsExpr:L}),_infer:W("infer",{startsExpr:L}),_is:W("is",{startsExpr:L}),_mixins:W("mixins",{startsExpr:L}),_proto:W("proto",{startsExpr:L}),_require:W("require",{startsExpr:L}),_satisfies:W("satisfies",{startsExpr:L}),_keyof:W("keyof",{startsExpr:L}),_readonly:W("readonly",{startsExpr:L}),_unique:W("unique",{startsExpr:L}),_abstract:W("abstract",{startsExpr:L}),_declare:W("declare",{startsExpr:L}),_enum:W("enum",{startsExpr:L}),_module:W("module",{startsExpr:L}),_namespace:W("namespace",{startsExpr:L}),_interface:W("interface",{startsExpr:L}),_type:W("type",{startsExpr:L}),_opaque:W("opaque",{startsExpr:L}),name:B("name",{startsExpr:L}),placeholder:B("%%",{startsExpr:!0}),string:B("string",{startsExpr:L}),num:B("num",{startsExpr:L}),bigint:B("bigint",{startsExpr:L}),decimal:B("decimal",{startsExpr:L}),regexp:B("regexp",{startsExpr:L}),privateName:B("#name",{startsExpr:L}),eof:B("eof"),jsxName:B("jsxName"),jsxText:B("jsxText",{beforeExpr:!0}),jsxTagStart:B("jsxTagStart",{startsExpr:!0}),jsxTagEnd:B("jsxTagEnd")};function Y(b){return b>=93&&b<=133}function Z(b){return b<=92}function ce(b){return b>=58&&b<=133}function Ee(b){return b>=58&&b<=137}function de(b){return j[b]}function be(b){return U[b]}function it(b){return b>=29&&b<=33}function dt(b){return b>=129&&b<=131}function tt(b){return b>=90&&b<=92}function Be(b){return b>=58&&b<=92}function mt(b){return b>=39&&b<=59}function yt(b){return b===34}function Nt(b){return H[b]}function $r(b){return b>=121&&b<=123}function Ur(b){return b>=124&&b<=130}function nt(b){return ie[b]}function qr(b){return G[b]}function Ca(b){return b===57}function jr(b){return b>=24&&b<=25}function bt(b){return Q[b]}Q[8].updateContext=b=>{b.pop()},Q[5].updateContext=Q[7].updateContext=Q[23].updateContext=b=>{b.push(I.brace)},Q[22].updateContext=b=>{b[b.length-1]===I.template?b.pop():b.push(I.template)},Q[143].updateContext=b=>{b.push(I.j_expr,I.j_oTag)};let Ss="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ꟑꟑꟓꟕ-ꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",ci="·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・";const Xg=new RegExp("["+Ss+"]"),Jg=new RegExp("["+Ss+ci+"]");Ss=ci=null;const uu=[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,71,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,2,60,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,328,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,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,42,9,8936,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,496,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,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],Kg=[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,80,3,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,343,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,330,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,726,6,110,6,6,9,4759,9,787719,239];function Ia(b,a){let s=65536;for(let o=0,h=a.length;o<h;o+=2){if(s+=a[o],s>b)return!1;if(s+=a[o+1],s>=b)return!0}return!1}function jt(b){return b<65?b===36:b<=90?!0:b<97?b===95:b<=122?!0:b<=65535?b>=170&&Xg.test(String.fromCharCode(b)):Ia(b,uu)}function Vr(b){return b<48?b===36:b<58?!0:b<65?!1:b<=90?!0:b<97?b===95:b<=122?!0:b<=65535?b>=170&&Jg.test(String.fromCharCode(b)):Ia(b,uu)||Ia(b,Kg)}const Na={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},Yg=new Set(Na.keyword),Qg=new Set(Na.strict),Zg=new Set(Na.strictBind);function hu(b,a){return a&&b==="await"||b==="enum"}function pu(b,a){return hu(b,a)||Qg.has(b)}function fu(b){return Zg.has(b)}function du(b,a){return pu(b,a)||fu(b)}function ev(b){return Yg.has(b)}function tv(b,a,s){return b===64&&a===64&&jt(s)}const rv=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete","implements","interface","let","package","private","protected","public","static","yield","eval","arguments","enum","await"]);function sv(b){return rv.has(b)}class Oa{constructor(a){this.flags=0,this.names=new Map,this.firstLexicalName="",this.flags=a}}class ka{constructor(a,s){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=new Map,this.parser=a,this.inModule=s}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 inClass(){return(this.currentThisScopeFlags()&64)>0}get inClassAndNotInNonArrowFunction(){const a=this.currentThisScopeFlags();return(a&64)>0&&(a&2)===0}get inStaticBlock(){for(let a=this.scopeStack.length-1;;a--){const{flags:s}=this.scopeStack[a];if(s&128)return!0;if(s&707)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(a){return new Oa(a)}enter(a){this.scopeStack.push(this.createScope(a))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(a){return!!(a.flags&130||!this.parser.inModule&&a.flags&1)}declareName(a,s,o){let h=this.currentScope();if(s&8||s&16){this.checkRedeclarationInScope(h,a,s,o);let S=h.names.get(a)||0;s&16?S=S|4:(h.firstLexicalName||(h.firstLexicalName=a),S=S|2),h.names.set(a,S),s&8&&this.maybeExportDefined(h,a)}else if(s&4)for(let S=this.scopeStack.length-1;S>=0&&(h=this.scopeStack[S],this.checkRedeclarationInScope(h,a,s,o),h.names.set(a,(h.names.get(a)||0)|1),this.maybeExportDefined(h,a),!(h.flags&643));--S);this.parser.inModule&&h.flags&1&&this.undefinedExports.delete(a)}maybeExportDefined(a,s){this.parser.inModule&&a.flags&1&&this.undefinedExports.delete(s)}checkRedeclarationInScope(a,s,o,h){this.isRedeclaredInScope(a,s,o)&&this.parser.raise(E.VarRedeclaration,h,{identifierName:s})}isRedeclaredInScope(a,s,o){if(!(o&1))return!1;if(o&8)return a.names.has(s);const h=a.names.get(s);return o&16?(h&2)>0||!this.treatFunctionsAsVarInScope(a)&&(h&1)>0:(h&2)>0&&!(a.flags&8&&a.firstLexicalName===s)||!this.treatFunctionsAsVarInScope(a)&&(h&4)>0}checkLocalExport(a){const{name:s}=a;this.scopeStack[0].names.has(s)||this.undefinedExports.set(s,a.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let a=this.scopeStack.length-1;;a--){const{flags:s}=this.scopeStack[a];if(s&643)return s}}currentThisScopeFlags(){for(let a=this.scopeStack.length-1;;a--){const{flags:s}=this.scopeStack[a];if(s&707&&!(s&4))return s}}}class iv extends Oa{constructor(...a){super(...a),this.declareFunctions=new Set}}class nv extends ka{createScope(a){return new iv(a)}declareName(a,s,o){const h=this.currentScope();if(s&2048){this.checkRedeclarationInScope(h,a,s,o),this.maybeExportDefined(h,a),h.declareFunctions.add(a);return}super.declareName(a,s,o)}isRedeclaredInScope(a,s,o){if(super.isRedeclaredInScope(a,s,o))return!0;if(o&2048&&!a.declareFunctions.has(s)){const h=a.names.get(s);return(h&4)>0||(h&2)>0}return!1}checkLocalExport(a){this.scopeStack[0].declareFunctions.has(a.name)||super.checkLocalExport(a)}}const av=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),pe=T`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:b})=>`Cannot overwrite reserved type ${b}.`,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:b,enumName:a})=>`Boolean enum members need to be initialized. Use either \`${b} = true,\` or \`${b} = false,\` in enum \`${a}\`.`,EnumDuplicateMemberName:({memberName:b,enumName:a})=>`Enum member names need to be unique, but the name \`${b}\` has already been used before in enum \`${a}\`.`,EnumInconsistentMemberValues:({enumName:b})=>`Enum \`${b}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:b,enumName:a})=>`Enum type \`${b}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${a}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:b})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${b}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:b,memberName:a,explicitType:s})=>`Enum \`${b}\` has type \`${s}\`, so the initializer of \`${a}\` needs to be a ${s} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:b,memberName:a})=>`Symbol enum members cannot be initialized. Use \`${a},\` in enum \`${b}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:b,memberName:a})=>`The enum member initializer for \`${a}\` needs to be a literal (either a boolean, number, or string) in enum \`${b}\`.`,EnumInvalidMemberName:({enumName:b,memberName:a,suggestion:s})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${a}\`, consider using \`${s}\`, in enum \`${b}\`.`,EnumNumberMemberNotInitialized:({enumName:b,memberName:a})=>`Number enum members need to be initialized, e.g. \`${a} = 1\` in enum \`${b}\`.`,EnumStringMemberInconsistentlyInitialized:({enumName:b})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${b}\`.`,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:b})=>`Unexpected reserved type ${b}.`,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:b,suggestion:a})=>`\`declare export ${b}\` is not supported. Use \`${a}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function ov(b){return b.type==="DeclareExportAllDeclaration"||b.type==="DeclareExportDeclaration"&&(!b.declaration||b.declaration.type!=="TypeAlias"&&b.declaration.type!=="InterfaceDeclaration")}function mu(b){return b.importKind==="type"||b.importKind==="typeof"}const lv={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};function cv(b,a){const s=[],o=[];for(let h=0;h<b.length;h++)(a(b[h],h,b)?s:o).push(b[h]);return[s,o]}const uv=/\*?\s*@((?:no)?flow)\b/;var hv=b=>class extends b{constructor(...s){super(...s),this.flowPragma=void 0}getScopeHandler(){return nv}shouldParseTypes(){return this.getPluginOption("flow","all")||this.flowPragma==="flow"}finishToken(s,o){s!==134&&s!==13&&s!==28&&this.flowPragma===void 0&&(this.flowPragma=null),super.finishToken(s,o)}addComment(s){if(this.flowPragma===void 0){const o=uv.exec(s.value);if(o)if(o[1]==="flow")this.flowPragma="flow";else if(o[1]==="noflow")this.flowPragma="noflow";else throw new Error("Unexpected flow pragma")}super.addComment(s)}flowParseTypeInitialiser(s){const o=this.state.inType;this.state.inType=!0,this.expect(s||14);const h=this.flowParseType();return this.state.inType=o,h}flowParsePredicate(){const s=this.startNode(),o=this.state.startLoc;return this.next(),this.expectContextual(110),this.state.lastTokStartLoc.index>o.index+1&&this.raise(pe.UnexpectedSpaceBetweenModuloChecks,o),this.eat(10)?(s.value=super.parseExpression(),this.expect(11),this.finishNode(s,"DeclaredPredicate")):this.finishNode(s,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){const s=this.state.inType;this.state.inType=!0,this.expect(14);let o=null,h=null;return this.match(54)?(this.state.inType=s,h=this.flowParsePredicate()):(o=this.flowParseType(),this.state.inType=s,this.match(54)&&(h=this.flowParsePredicate())),[o,h]}flowParseDeclareClass(s){return this.next(),this.flowParseInterfaceish(s,!0),this.finishNode(s,"DeclareClass")}flowParseDeclareFunction(s){this.next();const o=s.id=this.parseIdentifier(),h=this.startNode(),S=this.startNode();this.match(47)?h.typeParameters=this.flowParseTypeParameterDeclaration():h.typeParameters=null,this.expect(10);const P=this.flowParseFunctionTypeParams();return h.params=P.params,h.rest=P.rest,h.this=P._this,this.expect(11),[h.returnType,s.predicate]=this.flowParseTypeAndPredicateInitialiser(),S.typeAnnotation=this.finishNode(h,"FunctionTypeAnnotation"),o.typeAnnotation=this.finishNode(S,"TypeAnnotation"),this.resetEndLocation(o),this.semicolon(),this.scope.declareName(s.id.name,2048,s.id.loc.start),this.finishNode(s,"DeclareFunction")}flowParseDeclare(s,o){if(this.match(80))return this.flowParseDeclareClass(s);if(this.match(68))return this.flowParseDeclareFunction(s);if(this.match(74))return this.flowParseDeclareVariable(s);if(this.eatContextual(127))return this.match(16)?this.flowParseDeclareModuleExports(s):(o&&this.raise(pe.NestedDeclareModule,this.state.lastTokStartLoc),this.flowParseDeclareModule(s));if(this.isContextual(130))return this.flowParseDeclareTypeAlias(s);if(this.isContextual(131))return this.flowParseDeclareOpaqueType(s);if(this.isContextual(129))return this.flowParseDeclareInterface(s);if(this.match(82))return this.flowParseDeclareExportDeclaration(s,o);this.unexpected()}flowParseDeclareVariable(s){return this.next(),s.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(s.id.name,5,s.id.loc.start),this.semicolon(),this.finishNode(s,"DeclareVariable")}flowParseDeclareModule(s){this.scope.enter(0),this.match(134)?s.id=super.parseExprAtom():s.id=this.parseIdentifier();const o=s.body=this.startNode(),h=o.body=[];for(this.expect(5);!this.match(8);){let C=this.startNode();this.match(83)?(this.next(),!this.isContextual(130)&&!this.match(87)&&this.raise(pe.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc),super.parseImport(C)):(this.expectContextual(125,pe.UnsupportedStatementInDeclareModule),C=this.flowParseDeclare(C,!0)),h.push(C)}this.scope.exit(),this.expect(8),this.finishNode(o,"BlockStatement");let S=null,P=!1;return h.forEach(C=>{ov(C)?(S==="CommonJS"&&this.raise(pe.AmbiguousDeclareModuleKind,C),S="ES"):C.type==="DeclareModuleExports"&&(P&&this.raise(pe.DuplicateDeclareModuleExports,C),S==="ES"&&this.raise(pe.AmbiguousDeclareModuleKind,C),S="CommonJS",P=!0)}),s.kind=S||"CommonJS",this.finishNode(s,"DeclareModule")}flowParseDeclareExportDeclaration(s,o){if(this.expect(82),this.eat(65))return this.match(68)||this.match(80)?s.declaration=this.flowParseDeclare(this.startNode()):(s.declaration=this.flowParseType(),this.semicolon()),s.default=!0,this.finishNode(s,"DeclareExportDeclaration");if(this.match(75)||this.isLet()||(this.isContextual(130)||this.isContextual(129))&&!o){const h=this.state.value;throw this.raise(pe.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:h,suggestion:lv[h]})}if(this.match(74)||this.match(68)||this.match(80)||this.isContextual(131))return s.declaration=this.flowParseDeclare(this.startNode()),s.default=!1,this.finishNode(s,"DeclareExportDeclaration");if(this.match(55)||this.match(5)||this.isContextual(129)||this.isContextual(130)||this.isContextual(131))return s=this.parseExport(s,null),s.type==="ExportNamedDeclaration"?(s.default=!1,delete s.exportKind,this.castNodeTo(s,"DeclareExportDeclaration")):this.castNodeTo(s,"DeclareExportAllDeclaration");this.unexpected()}flowParseDeclareModuleExports(s){return this.next(),this.expectContextual(111),s.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(s,"DeclareModuleExports")}flowParseDeclareTypeAlias(s){this.next();const o=this.flowParseTypeAlias(s);return this.castNodeTo(o,"DeclareTypeAlias"),o}flowParseDeclareOpaqueType(s){this.next();const o=this.flowParseOpaqueType(s,!0);return this.castNodeTo(o,"DeclareOpaqueType"),o}flowParseDeclareInterface(s){return this.next(),this.flowParseInterfaceish(s,!1),this.finishNode(s,"DeclareInterface")}flowParseInterfaceish(s,o){if(s.id=this.flowParseRestrictedIdentifier(!o,!0),this.scope.declareName(s.id.name,o?17:8201,s.id.loc.start),this.match(47)?s.typeParameters=this.flowParseTypeParameterDeclaration():s.typeParameters=null,s.extends=[],this.eat(81))do s.extends.push(this.flowParseInterfaceExtends());while(!o&&this.eat(12));if(o){if(s.implements=[],s.mixins=[],this.eatContextual(117))do s.mixins.push(this.flowParseInterfaceExtends());while(this.eat(12));if(this.eatContextual(113))do s.implements.push(this.flowParseInterfaceExtends());while(this.eat(12))}s.body=this.flowParseObjectType({allowStatic:o,allowExact:!1,allowSpread:!1,allowProto:o,allowInexact:!1})}flowParseInterfaceExtends(){const s=this.startNode();return s.id=this.flowParseQualifiedTypeIdentifier(),this.match(47)?s.typeParameters=this.flowParseTypeParameterInstantiation():s.typeParameters=null,this.finishNode(s,"InterfaceExtends")}flowParseInterface(s){return this.flowParseInterfaceish(s,!1),this.finishNode(s,"InterfaceDeclaration")}checkNotUnderscore(s){s==="_"&&this.raise(pe.UnexpectedReservedUnderscore,this.state.startLoc)}checkReservedType(s,o,h){av.has(s)&&this.raise(h?pe.AssignReservedType:pe.UnexpectedReservedType,o,{reservedType:s})}flowParseRestrictedIdentifier(s,o){return this.checkReservedType(this.state.value,this.state.startLoc,o),this.parseIdentifier(s)}flowParseTypeAlias(s){return s.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(s.id.name,8201,s.id.loc.start),this.match(47)?s.typeParameters=this.flowParseTypeParameterDeclaration():s.typeParameters=null,s.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(s,"TypeAlias")}flowParseOpaqueType(s,o){return this.expectContextual(130),s.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(s.id.name,8201,s.id.loc.start),this.match(47)?s.typeParameters=this.flowParseTypeParameterDeclaration():s.typeParameters=null,s.supertype=null,this.match(14)&&(s.supertype=this.flowParseTypeInitialiser(14)),s.impltype=null,o||(s.impltype=this.flowParseTypeInitialiser(29)),this.semicolon(),this.finishNode(s,"OpaqueType")}flowParseTypeParameter(s=!1){const o=this.state.startLoc,h=this.startNode(),S=this.flowParseVariance(),P=this.flowParseTypeAnnotatableIdentifier();return h.name=P.name,h.variance=S,h.bound=P.typeAnnotation,this.match(29)?(this.eat(29),h.default=this.flowParseType()):s&&this.raise(pe.MissingTypeParamDefault,o),this.finishNode(h,"TypeParameter")}flowParseTypeParameterDeclaration(){const s=this.state.inType,o=this.startNode();o.params=[],this.state.inType=!0,this.match(47)||this.match(143)?this.next():this.unexpected();let h=!1;do{const S=this.flowParseTypeParameter(h);o.params.push(S),S.default&&(h=!0),this.match(48)||this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=s,this.finishNode(o,"TypeParameterDeclaration")}flowInTopLevelContext(s){if(this.curContext()!==I.brace){const o=this.state.context;this.state.context=[o[0]];try{return s()}finally{this.state.context=o}}else return s()}flowParseTypeParameterInstantiationInExpression(){if(this.reScan_lt()===47)return this.flowParseTypeParameterInstantiation()}flowParseTypeParameterInstantiation(){const s=this.startNode(),o=this.state.inType;return this.state.inType=!0,s.params=[],this.flowInTopLevelContext(()=>{this.expect(47);const h=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(48);)s.params.push(this.flowParseType()),this.match(48)||this.expect(12);this.state.noAnonFunctionType=h}),this.state.inType=o,!this.state.inType&&this.curContext()===I.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(s,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){if(this.reScan_lt()!==47)return;const s=this.startNode(),o=this.state.inType;for(s.params=[],this.state.inType=!0,this.expect(47);!this.match(48);)s.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(48)||this.expect(12);return this.expect(48),this.state.inType=o,this.finishNode(s,"TypeParameterInstantiation")}flowParseInterfaceType(){const s=this.startNode();if(this.expectContextual(129),s.extends=[],this.eat(81))do s.extends.push(this.flowParseInterfaceExtends());while(this.eat(12));return s.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(s,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(135)||this.match(134)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(s,o,h){return s.static=o,this.lookahead().type===14?(s.id=this.flowParseObjectPropertyKey(),s.key=this.flowParseTypeInitialiser()):(s.id=null,s.key=this.flowParseType()),this.expect(3),s.value=this.flowParseTypeInitialiser(),s.variance=h,this.finishNode(s,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(s,o){return s.static=o,s.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(47)||this.match(10)?(s.method=!0,s.optional=!1,s.value=this.flowParseObjectTypeMethodish(this.startNodeAt(s.loc.start))):(s.method=!1,this.eat(17)&&(s.optional=!0),s.value=this.flowParseTypeInitialiser()),this.finishNode(s,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(s){for(s.params=[],s.rest=null,s.typeParameters=null,s.this=null,this.match(47)&&(s.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(10),this.match(78)&&(s.this=this.flowParseFunctionTypeParam(!0),s.this.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)s.params.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(s.rest=this.flowParseFunctionTypeParam(!1)),this.expect(11),s.returnType=this.flowParseTypeInitialiser(),this.finishNode(s,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(s,o){const h=this.startNode();return s.static=o,s.value=this.flowParseObjectTypeMethodish(h),this.finishNode(s,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:s,allowExact:o,allowSpread:h,allowProto:S,allowInexact:P}){const C=this.state.inType;this.state.inType=!0;const R=this.startNode();R.callProperties=[],R.properties=[],R.indexers=[],R.internalSlots=[];let F,$,q=!1;for(o&&this.match(6)?(this.expect(6),F=9,$=!0):(this.expect(5),F=8,$=!1),R.exact=$;!this.match(F);){let ee=!1,oe=null,me=null;const Me=this.startNode();if(S&&this.isContextual(118)){const _e=this.lookahead();_e.type!==14&&_e.type!==17&&(this.next(),oe=this.state.startLoc,s=!1)}if(s&&this.isContextual(106)){const _e=this.lookahead();_e.type!==14&&_e.type!==17&&(this.next(),ee=!0)}const ye=this.flowParseVariance();if(this.eat(0))oe!=null&&this.unexpected(oe),this.eat(0)?(ye&&this.unexpected(ye.loc.start),R.internalSlots.push(this.flowParseObjectTypeInternalSlot(Me,ee))):R.indexers.push(this.flowParseObjectTypeIndexer(Me,ee,ye));else if(this.match(10)||this.match(47))oe!=null&&this.unexpected(oe),ye&&this.unexpected(ye.loc.start),R.callProperties.push(this.flowParseObjectTypeCallProperty(Me,ee));else{let _e="init";if(this.isContextual(99)||this.isContextual(104)){const rr=this.lookahead();Ee(rr.type)&&(_e=this.state.value,this.next())}const gr=this.flowParseObjectTypeProperty(Me,ee,oe,ye,_e,h,P??!$);gr===null?(q=!0,me=this.state.lastTokStartLoc):R.properties.push(gr)}this.flowObjectTypeSemicolon(),me&&!this.match(8)&&!this.match(9)&&this.raise(pe.UnexpectedExplicitInexactInObject,me)}this.expect(F),h&&(R.inexact=q);const J=this.finishNode(R,"ObjectTypeAnnotation");return this.state.inType=C,J}flowParseObjectTypeProperty(s,o,h,S,P,C,R){if(this.eat(21))return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(C?R||this.raise(pe.InexactInsideExact,this.state.lastTokStartLoc):this.raise(pe.InexactInsideNonObject,this.state.lastTokStartLoc),S&&this.raise(pe.InexactVariance,S),null):(C||this.raise(pe.UnexpectedSpreadType,this.state.lastTokStartLoc),h!=null&&this.unexpected(h),S&&this.raise(pe.SpreadVariance,S),s.argument=this.flowParseType(),this.finishNode(s,"ObjectTypeSpreadProperty"));{s.key=this.flowParseObjectPropertyKey(),s.static=o,s.proto=h!=null,s.kind=P;let F=!1;return this.match(47)||this.match(10)?(s.method=!0,h!=null&&this.unexpected(h),S&&this.unexpected(S.loc.start),s.value=this.flowParseObjectTypeMethodish(this.startNodeAt(s.loc.start)),(P==="get"||P==="set")&&this.flowCheckGetterSetterParams(s),!C&&s.key.name==="constructor"&&s.value.this&&this.raise(pe.ThisParamBannedInConstructor,s.value.this)):(P!=="init"&&this.unexpected(),s.method=!1,this.eat(17)&&(F=!0),s.value=this.flowParseTypeInitialiser(),s.variance=S),s.optional=F,this.finishNode(s,"ObjectTypeProperty")}}flowCheckGetterSetterParams(s){const o=s.kind==="get"?0:1,h=s.value.params.length+(s.value.rest?1:0);s.value.this&&this.raise(s.kind==="get"?pe.GetterMayNotHaveThisParam:pe.SetterMayNotHaveThisParam,s.value.this),h!==o&&this.raise(s.kind==="get"?E.BadGetterArity:E.BadSetterArity,s),s.kind==="set"&&s.value.rest&&this.raise(E.BadSetterRestParameter,s)}flowObjectTypeSemicolon(){!this.eat(13)&&!this.eat(12)&&!this.match(8)&&!this.match(9)&&this.unexpected()}flowParseQualifiedTypeIdentifier(s,o){s??(s=this.state.startLoc);let h=o||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){const S=this.startNodeAt(s);S.qualification=h,S.id=this.flowParseRestrictedIdentifier(!0),h=this.finishNode(S,"QualifiedTypeIdentifier")}return h}flowParseGenericType(s,o){const h=this.startNodeAt(s);return h.typeParameters=null,h.id=this.flowParseQualifiedTypeIdentifier(s,o),this.match(47)&&(h.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(h,"GenericTypeAnnotation")}flowParseTypeofType(){const s=this.startNode();return this.expect(87),s.argument=this.flowParsePrimaryType(),this.finishNode(s,"TypeofTypeAnnotation")}flowParseTupleType(){const s=this.startNode();for(s.types=[],this.expect(0);this.state.pos<this.length&&!this.match(3)&&(s.types.push(this.flowParseType()),!this.match(3));)this.expect(12);return this.expect(3),this.finishNode(s,"TupleTypeAnnotation")}flowParseFunctionTypeParam(s){let o=null,h=!1,S=null;const P=this.startNode(),C=this.lookahead(),R=this.state.type===78;return C.type===14||C.type===17?(R&&!s&&this.raise(pe.ThisParamMustBeFirst,P),o=this.parseIdentifier(R),this.eat(17)&&(h=!0,R&&this.raise(pe.ThisParamMayNotBeOptional,P)),S=this.flowParseTypeInitialiser()):S=this.flowParseType(),P.name=o,P.optional=h,P.typeAnnotation=S,this.finishNode(P,"FunctionTypeParam")}reinterpretTypeAsFunctionTypeParam(s){const o=this.startNodeAt(s.loc.start);return o.name=null,o.optional=!1,o.typeAnnotation=s,this.finishNode(o,"FunctionTypeParam")}flowParseFunctionTypeParams(s=[]){let o=null,h=null;for(this.match(78)&&(h=this.flowParseFunctionTypeParam(!0),h.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)s.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(o=this.flowParseFunctionTypeParam(!1)),{params:s,rest:o,_this:h}}flowIdentToTypeAnnotation(s,o,h){switch(h.name){case"any":return this.finishNode(o,"AnyTypeAnnotation");case"bool":case"boolean":return this.finishNode(o,"BooleanTypeAnnotation");case"mixed":return this.finishNode(o,"MixedTypeAnnotation");case"empty":return this.finishNode(o,"EmptyTypeAnnotation");case"number":return this.finishNode(o,"NumberTypeAnnotation");case"string":return this.finishNode(o,"StringTypeAnnotation");case"symbol":return this.finishNode(o,"SymbolTypeAnnotation");default:return this.checkNotUnderscore(h.name),this.flowParseGenericType(s,h)}}flowParsePrimaryType(){const s=this.state.startLoc,o=this.startNode();let h,S,P=!1;const C=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,S=this.flowParseTupleType(),this.state.noAnonFunctionType=C,S;case 47:{const R=this.startNode();return R.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(10),h=this.flowParseFunctionTypeParams(),R.params=h.params,R.rest=h.rest,R.this=h._this,this.expect(11),this.expect(19),R.returnType=this.flowParseType(),this.finishNode(R,"FunctionTypeAnnotation")}case 10:{const R=this.startNode();if(this.next(),!this.match(11)&&!this.match(21))if(Y(this.state.type)||this.match(78)){const F=this.lookahead().type;P=F!==17&&F!==14}else P=!0;if(P){if(this.state.noAnonFunctionType=!1,S=this.flowParseType(),this.state.noAnonFunctionType=C,this.state.noAnonFunctionType||!(this.match(12)||this.match(11)&&this.lookahead().type===19))return this.expect(11),S;this.eat(12)}return S?h=this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(S)]):h=this.flowParseFunctionTypeParams(),R.params=h.params,R.rest=h.rest,R.this=h._this,this.expect(11),this.expect(19),R.returnType=this.flowParseType(),R.typeParameters=null,this.finishNode(R,"FunctionTypeAnnotation")}case 134:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case 85:case 86:return o.value=this.match(85),this.next(),this.finishNode(o,"BooleanLiteralTypeAnnotation");case 53:if(this.state.value==="-"){if(this.next(),this.match(135))return this.parseLiteralAtNode(-this.state.value,"NumberLiteralTypeAnnotation",o);if(this.match(136))return this.parseLiteralAtNode(-this.state.value,"BigIntLiteralTypeAnnotation",o);throw this.raise(pe.UnexpectedSubtractionOperand,this.state.startLoc)}this.unexpected();return;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(o,"VoidTypeAnnotation");case 84:return this.next(),this.finishNode(o,"NullLiteralTypeAnnotation");case 78:return this.next(),this.finishNode(o,"ThisTypeAnnotation");case 55:return this.next(),this.finishNode(o,"ExistsTypeAnnotation");case 87:return this.flowParseTypeofType();default:if(Be(this.state.type)){const R=nt(this.state.type);return this.next(),super.createIdentifier(o,R)}else if(Y(this.state.type))return this.isContextual(129)?this.flowParseInterfaceType():this.flowIdentToTypeAnnotation(s,o,this.parseIdentifier())}this.unexpected()}flowParsePostfixType(){const s=this.state.startLoc;let o=this.flowParsePrimaryType(),h=!1;for(;(this.match(0)||this.match(18))&&!this.canInsertSemicolon();){const S=this.startNodeAt(s),P=this.eat(18);h=h||P,this.expect(0),!P&&this.match(3)?(S.elementType=o,this.next(),o=this.finishNode(S,"ArrayTypeAnnotation")):(S.objectType=o,S.indexType=this.flowParseType(),this.expect(3),h?(S.optional=P,o=this.finishNode(S,"OptionalIndexedAccessType")):o=this.finishNode(S,"IndexedAccessType"))}return o}flowParsePrefixType(){const s=this.startNode();return this.eat(17)?(s.typeAnnotation=this.flowParsePrefixType(),this.finishNode(s,"NullableTypeAnnotation")):this.flowParsePostfixType()}flowParseAnonFunctionWithoutParens(){const s=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(19)){const o=this.startNodeAt(s.loc.start);return o.params=[this.reinterpretTypeAsFunctionTypeParam(s)],o.rest=null,o.this=null,o.returnType=this.flowParseType(),o.typeParameters=null,this.finishNode(o,"FunctionTypeAnnotation")}return s}flowParseIntersectionType(){const s=this.startNode();this.eat(45);const o=this.flowParseAnonFunctionWithoutParens();for(s.types=[o];this.eat(45);)s.types.push(this.flowParseAnonFunctionWithoutParens());return s.types.length===1?o:this.finishNode(s,"IntersectionTypeAnnotation")}flowParseUnionType(){const s=this.startNode();this.eat(43);const o=this.flowParseIntersectionType();for(s.types=[o];this.eat(43);)s.types.push(this.flowParseIntersectionType());return s.types.length===1?o:this.finishNode(s,"UnionTypeAnnotation")}flowParseType(){const s=this.state.inType;this.state.inType=!0;const o=this.flowParseUnionType();return this.state.inType=s,o}flowParseTypeOrImplicitInstantiation(){if(this.state.type===132&&this.state.value==="_"){const s=this.state.startLoc,o=this.parseIdentifier();return this.flowParseGenericType(s,o)}else return this.flowParseType()}flowParseTypeAnnotation(){const s=this.startNode();return s.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(s,"TypeAnnotation")}flowParseTypeAnnotatableIdentifier(s){const o=s?this.parseIdentifier():this.flowParseRestrictedIdentifier();return this.match(14)&&(o.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(o)),o}typeCastToParameter(s){return s.expression.typeAnnotation=s.typeAnnotation,this.resetEndLocation(s.expression,s.typeAnnotation.loc.end),s.expression}flowParseVariance(){let s=null;return this.match(53)?(s=this.startNode(),this.state.value==="+"?s.kind="plus":s.kind="minus",this.next(),this.finishNode(s,"Variance")):s}parseFunctionBody(s,o,h=!1){if(o){this.forwardNoArrowParamsConversionAt(s,()=>super.parseFunctionBody(s,!0,h));return}super.parseFunctionBody(s,!1,h)}parseFunctionBodyAndFinish(s,o,h=!1){if(this.match(14)){const S=this.startNode();[S.typeAnnotation,s.predicate]=this.flowParseTypeAndPredicateInitialiser(),s.returnType=S.typeAnnotation?this.finishNode(S,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(s,o,h)}parseStatementLike(s){if(this.state.strict&&this.isContextual(129)){const h=this.lookahead();if(ce(h.type)){const S=this.startNode();return this.next(),this.flowParseInterface(S)}}else if(this.isContextual(126)){const h=this.startNode();return this.next(),this.flowParseEnumDeclaration(h)}const o=super.parseStatementLike(s);return this.flowPragma===void 0&&!this.isValidDirective(o)&&(this.flowPragma=null),o}parseExpressionStatement(s,o,h){if(o.type==="Identifier"){if(o.name==="declare"){if(this.match(80)||Y(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(s)}else if(Y(this.state.type)){if(o.name==="interface")return this.flowParseInterface(s);if(o.name==="type")return this.flowParseTypeAlias(s);if(o.name==="opaque")return this.flowParseOpaqueType(s,!1)}}return super.parseExpressionStatement(s,o,h)}shouldParseExportDeclaration(){const{type:s}=this.state;return s===126||dt(s)?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){const{type:s}=this.state;return s===126||dt(s)?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.isContextual(126)){const s=this.startNode();return this.next(),this.flowParseEnumDeclaration(s)}return super.parseExportDefaultExpression()}parseConditional(s,o,h){if(!this.match(17))return s;if(this.state.maybeInArrowParameters){const J=this.lookaheadCharCode();if(J===44||J===61||J===58||J===41)return this.setOptionalParametersError(h),s}this.expect(17);const S=this.state.clone(),P=this.state.noArrowAt,C=this.startNodeAt(o);let{consequent:R,failed:F}=this.tryParseConditionalConsequent(),[$,q]=this.getArrowLikeExpressions(R);if(F||q.length>0){const J=[...P];if(q.length>0){this.state=S,this.state.noArrowAt=J;for(let ee=0;ee<q.length;ee++)J.push(q[ee].start);({consequent:R,failed:F}=this.tryParseConditionalConsequent()),[$,q]=this.getArrowLikeExpressions(R)}F&&$.length>1&&this.raise(pe.AmbiguousConditionalArrow,S.startLoc),F&&$.length===1&&(this.state=S,J.push($[0].start),this.state.noArrowAt=J,{consequent:R,failed:F}=this.tryParseConditionalConsequent())}return this.getArrowLikeExpressions(R,!0),this.state.noArrowAt=P,this.expect(14),C.test=s,C.consequent=R,C.alternate=this.forwardNoArrowParamsConversionAt(C,()=>this.parseMaybeAssign(void 0,void 0)),this.finishNode(C,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);const s=this.parseMaybeAssignAllowIn(),o=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:s,failed:o}}getArrowLikeExpressions(s,o){const h=[s],S=[];for(;h.length!==0;){const P=h.pop();P.type==="ArrowFunctionExpression"&&P.body.type!=="BlockStatement"?(P.typeParameters||!P.returnType?this.finishArrowValidation(P):S.push(P),h.push(P.body)):P.type==="ConditionalExpression"&&(h.push(P.consequent),h.push(P.alternate))}return o?(S.forEach(P=>this.finishArrowValidation(P)),[S,[]]):cv(S,P=>P.params.every(C=>this.isAssignable(C,!0)))}finishArrowValidation(s){var o;this.toAssignableList(s.params,(o=s.extra)==null?void 0:o.trailingCommaLoc,!1),this.scope.enter(6),super.checkParams(s,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(s,o){let h;return this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(s.start))?(this.state.noArrowParamsConversionAt.push(this.state.start),h=o(),this.state.noArrowParamsConversionAt.pop()):h=o(),h}parseParenItem(s,o){const h=super.parseParenItem(s,o);if(this.eat(17)&&(h.optional=!0,this.resetEndLocation(s)),this.match(14)){const S=this.startNodeAt(o);return S.expression=h,S.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(S,"TypeCastExpression")}return h}assertModuleNodeAllowed(s){s.type==="ImportDeclaration"&&(s.importKind==="type"||s.importKind==="typeof")||s.type==="ExportNamedDeclaration"&&s.exportKind==="type"||s.type==="ExportAllDeclaration"&&s.exportKind==="type"||super.assertModuleNodeAllowed(s)}parseExportDeclaration(s){if(this.isContextual(130)){s.exportKind="type";const o=this.startNode();return this.next(),this.match(5)?(s.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(s),null):this.flowParseTypeAlias(o)}else if(this.isContextual(131)){s.exportKind="type";const o=this.startNode();return this.next(),this.flowParseOpaqueType(o,!1)}else if(this.isContextual(129)){s.exportKind="type";const o=this.startNode();return this.next(),this.flowParseInterface(o)}else if(this.isContextual(126)){s.exportKind="value";const o=this.startNode();return this.next(),this.flowParseEnumDeclaration(o)}else return super.parseExportDeclaration(s)}eatExportStar(s){return super.eatExportStar(s)?!0:this.isContextual(130)&&this.lookahead().type===55?(s.exportKind="type",this.next(),this.next(),!0):!1}maybeParseExportNamespaceSpecifier(s){const{startLoc:o}=this.state,h=super.maybeParseExportNamespaceSpecifier(s);return h&&s.exportKind==="type"&&this.unexpected(o),h}parseClassId(s,o,h){super.parseClassId(s,o,h),this.match(47)&&(s.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(s,o,h){const{startLoc:S}=this.state;if(this.isContextual(125)){if(super.parseClassMemberFromModifier(s,o))return;o.declare=!0}super.parseClassMember(s,o,h),o.declare&&(o.type!=="ClassProperty"&&o.type!=="ClassPrivateProperty"&&o.type!=="PropertyDefinition"?this.raise(pe.DeclareClassElement,S):o.value&&this.raise(pe.DeclareClassFieldInitializer,o.value))}isIterator(s){return s==="iterator"||s==="asyncIterator"}readIterator(){const s=super.readWord1(),o="@@"+s;(!this.isIterator(s)||!this.state.inType)&&this.raise(E.InvalidIdentifier,this.state.curPosition(),{identifierName:o}),this.finishToken(132,o)}getTokenFromCode(s){const o=this.input.charCodeAt(this.state.pos+1);s===123&&o===124?this.finishOp(6,2):this.state.inType&&(s===62||s===60)?this.finishOp(s===62?48:47,1):this.state.inType&&s===63?o===46?this.finishOp(18,2):this.finishOp(17,1):tv(s,o,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(s)}isAssignable(s,o){return s.type==="TypeCastExpression"?this.isAssignable(s.expression,o):super.isAssignable(s,o)}toAssignable(s,o=!1){!o&&s.type==="AssignmentExpression"&&s.left.type==="TypeCastExpression"&&(s.left=this.typeCastToParameter(s.left)),super.toAssignable(s,o)}toAssignableList(s,o,h){for(let S=0;S<s.length;S++){const P=s[S];(P==null?void 0:P.type)==="TypeCastExpression"&&(s[S]=this.typeCastToParameter(P))}super.toAssignableList(s,o,h)}toReferencedList(s,o){for(let S=0;S<s.length;S++){var h;const P=s[S];P&&P.type==="TypeCastExpression"&&!((h=P.extra)!=null&&h.parenthesized)&&(s.length>1||!o)&&this.raise(pe.TypeCastInPattern,P.typeAnnotation)}return s}parseArrayLike(s,o,h,S){const P=super.parseArrayLike(s,o,h,S);return o&&!this.state.maybeInArrowParameters&&this.toReferencedList(P.elements),P}isValidLVal(s,o,h){return s==="TypeCastExpression"||super.isValidLVal(s,o,h)}parseClassProperty(s){return this.match(14)&&(s.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(s)}parseClassPrivateProperty(s){return this.match(14)&&(s.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(s)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(s){return!this.match(14)&&super.isNonstaticConstructor(s)}pushClassMethod(s,o,h,S,P,C){if(o.variance&&this.unexpected(o.variance.loc.start),delete o.variance,this.match(47)&&(o.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(s,o,h,S,P,C),o.params&&P){const R=o.params;R.length>0&&this.isThisParam(R[0])&&this.raise(pe.ThisParamBannedInConstructor,o)}else if(o.type==="MethodDefinition"&&P&&o.value.params){const R=o.value.params;R.length>0&&this.isThisParam(R[0])&&this.raise(pe.ThisParamBannedInConstructor,o)}}pushClassPrivateMethod(s,o,h,S){o.variance&&this.unexpected(o.variance.loc.start),delete o.variance,this.match(47)&&(o.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(s,o,h,S)}parseClassSuper(s){if(super.parseClassSuper(s),s.superClass&&(this.match(47)||this.match(51))&&(s.superTypeParameters=this.flowParseTypeParameterInstantiationInExpression()),this.isContextual(113)){this.next();const o=s.implements=[];do{const h=this.startNode();h.id=this.flowParseRestrictedIdentifier(!0),this.match(47)?h.typeParameters=this.flowParseTypeParameterInstantiation():h.typeParameters=null,o.push(this.finishNode(h,"ClassImplements"))}while(this.eat(12))}}checkGetterSetterParams(s){super.checkGetterSetterParams(s);const o=this.getObjectOrClassMethodParams(s);if(o.length>0){const h=o[0];this.isThisParam(h)&&s.kind==="get"?this.raise(pe.GetterMayNotHaveThisParam,h):this.isThisParam(h)&&this.raise(pe.SetterMayNotHaveThisParam,h)}}parsePropertyNamePrefixOperator(s){s.variance=this.flowParseVariance()}parseObjPropValue(s,o,h,S,P,C,R){s.variance&&this.unexpected(s.variance.loc.start),delete s.variance;let F;this.match(47)&&!C&&(F=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());const $=super.parseObjPropValue(s,o,h,S,P,C,R);return F&&(($.value||$).typeParameters=F),$}parseFunctionParamType(s){return this.eat(17)&&(s.type!=="Identifier"&&this.raise(pe.PatternIsOptional,s),this.isThisParam(s)&&this.raise(pe.ThisParamMayNotBeOptional,s),s.optional=!0),this.match(14)?s.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(s)&&this.raise(pe.ThisParamAnnotationRequired,s),this.match(29)&&this.isThisParam(s)&&this.raise(pe.ThisParamNoDefault,s),this.resetEndLocation(s),s}parseMaybeDefault(s,o){const h=super.parseMaybeDefault(s,o);return h.type==="AssignmentPattern"&&h.typeAnnotation&&h.right.start<h.typeAnnotation.start&&this.raise(pe.TypeBeforeInitializer,h.typeAnnotation),h}checkImportReflection(s){super.checkImportReflection(s),s.module&&s.importKind!=="value"&&this.raise(pe.ImportReflectionHasImportType,s.specifiers[0].loc.start)}parseImportSpecifierLocal(s,o,h){o.local=mu(s)?this.flowParseRestrictedIdentifier(!0,!0):this.parseIdentifier(),s.specifiers.push(this.finishImportSpecifier(o,h))}isPotentialImportPhase(s){if(super.isPotentialImportPhase(s))return!0;if(this.isContextual(130)){if(!s)return!0;const o=this.lookaheadCharCode();return o===123||o===42}return!s&&this.isContextual(87)}applyImportPhase(s,o,h,S){if(super.applyImportPhase(s,o,h,S),o){if(!h&&this.match(65))return;s.exportKind=h==="type"?h:"value"}else h==="type"&&this.match(55)&&this.unexpected(),s.importKind=h==="type"||h==="typeof"?h:"value"}parseImportSpecifier(s,o,h,S,P){const C=s.imported;let R=null;C.type==="Identifier"&&(C.name==="type"?R="type":C.name==="typeof"&&(R="typeof"));let F=!1;if(this.isContextual(93)&&!this.isLookaheadContextual("as")){const q=this.parseIdentifier(!0);R!==null&&!ce(this.state.type)?(s.imported=q,s.importKind=R,s.local=this.cloneIdentifier(q)):(s.imported=C,s.importKind=null,s.local=this.parseIdentifier())}else{if(R!==null&&ce(this.state.type))s.imported=this.parseIdentifier(!0),s.importKind=R;else{if(o)throw this.raise(E.ImportBindingIsString,s,{importName:C.value});s.imported=C,s.importKind=null}this.eatContextual(93)?s.local=this.parseIdentifier():(F=!0,s.local=this.cloneIdentifier(s.imported))}const $=mu(s);return h&&$&&this.raise(pe.ImportTypeShorthandOnlyInPureImport,s),(h||$)&&this.checkReservedType(s.local.name,s.local.loc.start,!0),F&&!h&&!$&&this.checkReservedWord(s.local.name,s.loc.start,!0,!0),this.finishImportSpecifier(s,"ImportSpecifier")}parseBindingAtom(){switch(this.state.type){case 78:return this.parseIdentifier(!0);default:return super.parseBindingAtom()}}parseFunctionParams(s,o){const h=s.kind;h!=="get"&&h!=="set"&&this.match(47)&&(s.typeParameters=this.flowParseTypeParameterDeclaration()),super.parseFunctionParams(s,o)}parseVarId(s,o){super.parseVarId(s,o),this.match(14)&&(s.id.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(s.id))}parseAsyncArrowFromCallExpression(s,o){if(this.match(14)){const h=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,s.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=h}return super.parseAsyncArrowFromCallExpression(s,o)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}parseMaybeAssign(s,o){var h;let S=null,P;if(this.hasPlugin("jsx")&&(this.match(143)||this.match(47))){if(S=this.state.clone(),P=this.tryParse(()=>super.parseMaybeAssign(s,o),S),!P.error)return P.node;const{context:F}=this.state,$=F[F.length-1];($===I.j_oTag||$===I.j_expr)&&F.pop()}if((h=P)!=null&&h.error||this.match(47)){var C,R;S=S||this.state.clone();let F;const $=this.tryParse(J=>{var ee;F=this.flowParseTypeParameterDeclaration();const oe=this.forwardNoArrowParamsConversionAt(F,()=>{const Me=super.parseMaybeAssign(s,o);return this.resetStartLocationFromNode(Me,F),Me});(ee=oe.extra)!=null&&ee.parenthesized&&J();const me=this.maybeUnwrapTypeCastExpression(oe);return me.type!=="ArrowFunctionExpression"&&J(),me.typeParameters=F,this.resetStartLocationFromNode(me,F),oe},S);let q=null;if($.node&&this.maybeUnwrapTypeCastExpression($.node).type==="ArrowFunctionExpression"){if(!$.error&&!$.aborted)return $.node.async&&this.raise(pe.UnexpectedTypeParameterBeforeAsyncArrowFunction,F),$.node;q=$.node}if((C=P)!=null&&C.node)return this.state=P.failState,P.node;if(q)return this.state=$.failState,q;throw(R=P)!=null&&R.thrown?P.error:$.thrown?$.error:this.raise(pe.UnexpectedTokenAfterTypeParameter,F)}return super.parseMaybeAssign(s,o)}parseArrow(s){if(this.match(14)){const o=this.tryParse(()=>{const h=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;const S=this.startNode();return[S.typeAnnotation,s.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=h,this.canInsertSemicolon()&&this.unexpected(),this.match(19)||this.unexpected(),S});if(o.thrown)return null;o.error&&(this.state=o.failState),s.returnType=o.node.typeAnnotation?this.finishNode(o.node,"TypeAnnotation"):null}return super.parseArrow(s)}shouldParseArrow(s){return this.match(14)||super.shouldParseArrow(s)}setArrowFunctionParameters(s,o){this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(s.start))?s.params=o:super.setArrowFunctionParameters(s,o)}checkParams(s,o,h,S=!0){if(!(h&&this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(s.start)))){for(let P=0;P<s.params.length;P++)this.isThisParam(s.params[P])&&P>0&&this.raise(pe.ThisParamMustBeFirst,s.params[P]);super.checkParams(s,o,h,S)}}parseParenAndDistinguishExpression(s){return super.parseParenAndDistinguishExpression(s&&!this.state.noArrowAt.includes(this.sourceToOffsetPos(this.state.start)))}parseSubscripts(s,o,h){if(s.type==="Identifier"&&s.name==="async"&&this.state.noArrowAt.includes(o.index)){this.next();const S=this.startNodeAt(o);S.callee=s,S.arguments=super.parseCallExpressionArguments(11),s=this.finishNode(S,"CallExpression")}else if(s.type==="Identifier"&&s.name==="async"&&this.match(47)){const S=this.state.clone(),P=this.tryParse(R=>this.parseAsyncArrowWithTypeParameters(o)||R(),S);if(!P.error&&!P.aborted)return P.node;const C=this.tryParse(()=>super.parseSubscripts(s,o,h),S);if(C.node&&!C.error)return C.node;if(P.node)return this.state=P.failState,P.node;if(C.node)return this.state=C.failState,C.node;throw P.error||C.error}return super.parseSubscripts(s,o,h)}parseSubscript(s,o,h,S){if(this.match(18)&&this.isLookaheadToken_lt()){if(S.optionalChainMember=!0,h)return S.stop=!0,s;this.next();const P=this.startNodeAt(o);return P.callee=s,P.typeArguments=this.flowParseTypeParameterInstantiationInExpression(),this.expect(10),P.arguments=this.parseCallExpressionArguments(11),P.optional=!0,this.finishCallExpression(P,!0)}else if(!h&&this.shouldParseTypes()&&(this.match(47)||this.match(51))){const P=this.startNodeAt(o);P.callee=s;const C=this.tryParse(()=>(P.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),P.arguments=super.parseCallExpressionArguments(11),S.optionalChainMember&&(P.optional=!1),this.finishCallExpression(P,S.optionalChainMember)));if(C.node)return C.error&&(this.state=C.failState),C.node}return super.parseSubscript(s,o,h,S)}parseNewCallee(s){super.parseNewCallee(s);let o=null;this.shouldParseTypes()&&this.match(47)&&(o=this.tryParse(()=>this.flowParseTypeParameterInstantiationCallOrNew()).node),s.typeArguments=o}parseAsyncArrowWithTypeParameters(s){const o=this.startNodeAt(s);if(this.parseFunctionParams(o,!1),!!this.parseArrow(o))return super.parseArrowExpression(o,void 0,!0)}readToken_mult_modulo(s){const o=this.input.charCodeAt(this.state.pos+1);if(s===42&&o===47&&this.state.hasFlowComment){this.state.hasFlowComment=!1,this.state.pos+=2,this.nextToken();return}super.readToken_mult_modulo(s)}readToken_pipe_amp(s){const o=this.input.charCodeAt(this.state.pos+1);if(s===124&&o===125){this.finishOp(9,2);return}super.readToken_pipe_amp(s)}parseTopLevel(s,o){const h=super.parseTopLevel(s,o);return this.state.hasFlowComment&&this.raise(pe.UnterminatedFlowComment,this.state.curPosition()),h}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(pe.NestedFlowComment,this.state.startLoc);this.hasFlowCommentCompletion();const s=this.skipFlowComment();s&&(this.state.pos+=s,this.state.hasFlowComment=!0);return}return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/")}skipFlowComment(){const{pos:s}=this.state;let o=2;for(;[32,9].includes(this.input.charCodeAt(s+o));)o++;const h=this.input.charCodeAt(o+s),S=this.input.charCodeAt(o+s+1);return h===58&&S===58?o+2:this.input.slice(o+s,o+s+12)==="flow-include"?o+12:h===58&&S!==58?o:!1}hasFlowCommentCompletion(){if(this.input.indexOf("*/",this.state.pos)===-1)throw this.raise(E.UnterminatedComment,this.state.curPosition())}flowEnumErrorBooleanMemberNotInitialized(s,{enumName:o,memberName:h}){this.raise(pe.EnumBooleanMemberNotInitialized,s,{memberName:h,enumName:o})}flowEnumErrorInvalidMemberInitializer(s,o){return this.raise(o.explicitType?o.explicitType==="symbol"?pe.EnumInvalidMemberInitializerSymbolType:pe.EnumInvalidMemberInitializerPrimaryType:pe.EnumInvalidMemberInitializerUnknownType,s,o)}flowEnumErrorNumberMemberNotInitialized(s,o){this.raise(pe.EnumNumberMemberNotInitialized,s,o)}flowEnumErrorStringMemberInconsistentlyInitialized(s,o){this.raise(pe.EnumStringMemberInconsistentlyInitialized,s,o)}flowEnumMemberInit(){const s=this.state.startLoc,o=()=>this.match(12)||this.match(8);switch(this.state.type){case 135:{const h=this.parseNumericLiteral(this.state.value);return o()?{type:"number",loc:h.loc.start,value:h}:{type:"invalid",loc:s}}case 134:{const h=this.parseStringLiteral(this.state.value);return o()?{type:"string",loc:h.loc.start,value:h}:{type:"invalid",loc:s}}case 85:case 86:{const h=this.parseBooleanLiteral(this.match(85));return o()?{type:"boolean",loc:h.loc.start,value:h}:{type:"invalid",loc:s}}default:return{type:"invalid",loc:s}}}flowEnumMemberRaw(){const s=this.state.startLoc,o=this.parseIdentifier(!0),h=this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:s};return{id:o,init:h}}flowEnumCheckExplicitTypeMismatch(s,o,h){const{explicitType:S}=o;S!==null&&S!==h&&this.flowEnumErrorInvalidMemberInitializer(s,o)}flowEnumMembers({enumName:s,explicitType:o}){const h=new Set,S={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]};let P=!1;for(;!this.match(8);){if(this.eat(21)){P=!0;break}const C=this.startNode(),{id:R,init:F}=this.flowEnumMemberRaw(),$=R.name;if($==="")continue;/^[a-z]/.test($)&&this.raise(pe.EnumInvalidMemberName,R,{memberName:$,suggestion:$[0].toUpperCase()+$.slice(1),enumName:s}),h.has($)&&this.raise(pe.EnumDuplicateMemberName,R,{memberName:$,enumName:s}),h.add($);const q={enumName:s,explicitType:o,memberName:$};switch(C.id=R,F.type){case"boolean":{this.flowEnumCheckExplicitTypeMismatch(F.loc,q,"boolean"),C.init=F.value,S.booleanMembers.push(this.finishNode(C,"EnumBooleanMember"));break}case"number":{this.flowEnumCheckExplicitTypeMismatch(F.loc,q,"number"),C.init=F.value,S.numberMembers.push(this.finishNode(C,"EnumNumberMember"));break}case"string":{this.flowEnumCheckExplicitTypeMismatch(F.loc,q,"string"),C.init=F.value,S.stringMembers.push(this.finishNode(C,"EnumStringMember"));break}case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(F.loc,q);case"none":switch(o){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(F.loc,q);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(F.loc,q);break;default:S.defaultedMembers.push(this.finishNode(C,"EnumDefaultedMember"))}}this.match(8)||this.expect(12)}return{members:S,hasUnknownMembers:P}}flowEnumStringMembers(s,o,{enumName:h}){if(s.length===0)return o;if(o.length===0)return s;if(o.length>s.length){for(const S of s)this.flowEnumErrorStringMemberInconsistentlyInitialized(S,{enumName:h});return o}else{for(const S of o)this.flowEnumErrorStringMemberInconsistentlyInitialized(S,{enumName:h});return s}}flowEnumParseExplicitType({enumName:s}){if(!this.eatContextual(102))return null;if(!Y(this.state.type))throw this.raise(pe.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName:s});const{value:o}=this.state;return this.next(),o!=="boolean"&&o!=="number"&&o!=="string"&&o!=="symbol"&&this.raise(pe.EnumInvalidExplicitType,this.state.startLoc,{enumName:s,invalidEnumType:o}),o}flowEnumBody(s,o){const h=o.name,S=o.loc.start,P=this.flowEnumParseExplicitType({enumName:h});this.expect(5);const{members:C,hasUnknownMembers:R}=this.flowEnumMembers({enumName:h,explicitType:P});switch(s.hasUnknownMembers=R,P){case"boolean":return s.explicitType=!0,s.members=C.booleanMembers,this.expect(8),this.finishNode(s,"EnumBooleanBody");case"number":return s.explicitType=!0,s.members=C.numberMembers,this.expect(8),this.finishNode(s,"EnumNumberBody");case"string":return s.explicitType=!0,s.members=this.flowEnumStringMembers(C.stringMembers,C.defaultedMembers,{enumName:h}),this.expect(8),this.finishNode(s,"EnumStringBody");case"symbol":return s.members=C.defaultedMembers,this.expect(8),this.finishNode(s,"EnumSymbolBody");default:{const F=()=>(s.members=[],this.expect(8),this.finishNode(s,"EnumStringBody"));s.explicitType=!1;const $=C.booleanMembers.length,q=C.numberMembers.length,J=C.stringMembers.length,ee=C.defaultedMembers.length;if(!$&&!q&&!J&&!ee)return F();if(!$&&!q)return s.members=this.flowEnumStringMembers(C.stringMembers,C.defaultedMembers,{enumName:h}),this.expect(8),this.finishNode(s,"EnumStringBody");if(!q&&!J&&$>=ee){for(const oe of C.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(oe.loc.start,{enumName:h,memberName:oe.id.name});return s.members=C.booleanMembers,this.expect(8),this.finishNode(s,"EnumBooleanBody")}else if(!$&&!J&&q>=ee){for(const oe of C.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(oe.loc.start,{enumName:h,memberName:oe.id.name});return s.members=C.numberMembers,this.expect(8),this.finishNode(s,"EnumNumberBody")}else return this.raise(pe.EnumInconsistentMemberValues,S,{enumName:h}),F()}}}flowParseEnumDeclaration(s){const o=this.parseIdentifier();return s.id=o,s.body=this.flowEnumBody(this.startNode(),o),this.finishNode(s,"EnumDeclaration")}jsxParseOpeningElementAfterName(s){return this.shouldParseTypes()&&(this.match(47)||this.match(51))&&(s.typeArguments=this.flowParseTypeParameterInstantiationInExpression()),super.jsxParseOpeningElementAfterName(s)}isLookaheadToken_lt(){const s=this.nextTokenStart();if(this.input.charCodeAt(s)===60){const o=this.input.charCodeAt(s+1);return o!==60&&o!==61}return!1}reScan_lt_gt(){const{type:s}=this.state;s===47?(this.state.pos-=1,this.readToken_lt()):s===48&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){const{type:s}=this.state;return s===51?(this.state.pos-=2,this.finishOp(47,1),47):s}maybeUnwrapTypeCastExpression(s){return s.type==="TypeCastExpression"?s.expression:s}};const pv={__proto__:null,quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"},fv=/\r\n|[\r\n\u2028\u2029]/,ui=new RegExp(fv.source,"g");function zr(b){switch(b){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}function yu(b,a,s){for(let o=a;o<s;o++)if(zr(b.charCodeAt(o)))return!0;return!1}const La=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,Ma=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g;function dv(b){switch(b){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}}const yr=T`jsx`({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:({openingTagName:b})=>`Expected corresponding JSX closing tag for <${b}>.`,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:b,HTMLEntity:a})=>`Unexpected token \`${b}\`. Did you mean \`${a}\` or \`{'${b}'}\`?`,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 Zt(b){return b?b.type==="JSXOpeningFragment"||b.type==="JSXClosingFragment":!1}function Wr(b){if(b.type==="JSXIdentifier")return b.name;if(b.type==="JSXNamespacedName")return b.namespace.name+":"+b.name.name;if(b.type==="JSXMemberExpression")return Wr(b.object)+"."+Wr(b.property);throw new Error("Node had unexpected type: "+b.type)}var mv=b=>class extends b{jsxReadToken(){let s="",o=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(yr.UnterminatedJsxContent,this.state.startLoc);const h=this.input.charCodeAt(this.state.pos);switch(h){case 60:case 123:if(this.state.pos===this.state.start){h===60&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(143)):super.getTokenFromCode(h);return}s+=this.input.slice(o,this.state.pos),this.finishToken(142,s);return;case 38:s+=this.input.slice(o,this.state.pos),s+=this.jsxReadEntity(),o=this.state.pos;break;case 62:case 125:default:zr(h)?(s+=this.input.slice(o,this.state.pos),s+=this.jsxReadNewLine(!0),o=this.state.pos):++this.state.pos}}}jsxReadNewLine(s){const o=this.input.charCodeAt(this.state.pos);let h;return++this.state.pos,o===13&&this.input.charCodeAt(this.state.pos)===10?(++this.state.pos,h=s?`
|
|
10
|
+
- Did you mean \`import { "${b}" 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.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:({radix:b})=>`Expected number in radix ${b}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:b})=>`Escape sequence in keyword ${b}.`,InvalidIdentifier:({identifierName:b})=>`Invalid identifier ${b}.`,InvalidLhs:({ancestor:b})=>`Invalid left-hand side in ${p(b)}.`,InvalidLhsBinding:({ancestor:b})=>`Binding invalid left-hand side in ${p(b)}.`,InvalidLhsOptionalChaining:({ancestor:b})=>`Invalid optional chaining in the left-hand side of ${p(b)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:b})=>`Unexpected character '${b}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:b})=>`Private name #${b} 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:b})=>`Label '${b}' 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:b})=>`This experimental syntax requires enabling the parser plugin: ${b.map(a=>JSON.stringify(a)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:b})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${b.map(a=>JSON.stringify(a)).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:b})=>`Duplicate key "${b}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:b})=>`An export name cannot include a lone surrogate, found '\\u${b.toString(16)}'.`,ModuleExportUndefined:({localName:b})=>`Export '${b}' 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:b})=>`Private names are only allowed in property accesses (\`obj.#${b}\`) or in \`in\` expressions (\`#${b} in obj\`).`,PrivateNameRedeclaration:({identifierName:b})=>`Duplicate private name #${b}.`,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:b})=>`Unexpected keyword '${b}'.`,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:b})=>`Unexpected reserved word '${b}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:b,unexpected:a})=>`Unexpected token${a?` '${a}'.`:""}${b?`, expected "${b}"`:""}`,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.",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:b,onlyValidPropertyName:a})=>`The only valid meta property for ${b} is ${b}.${a}.`,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:b})=>`Identifier '${b}' has already been declared.`,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."},f={StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:b})=>`Assigning to '${b}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:b})=>`Binding '${b}' 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:b})=>`Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`${String.fromCodePoint(b)}\`.`};const m=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]);var y=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:b})=>`Invalid topic token ${b}. In order to use ${b} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${b}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:b})=>`Hack-style pipe body cannot be an unparenthesized ${p({type:b})}; 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.'});const g=["message"];function w(b,a,s){Object.defineProperty(b,a,{enumerable:!1,configurable:!0,value:s})}function v({toMessage:b,code:a,reasonCode:s,syntaxPlugin:o}){const h=s==="MissingPlugin"||s==="MissingOneOfPlugins";{const S={AccessorCannotDeclareThisParameter:"AccesorCannotDeclareThisParameter",AccessorCannotHaveTypeParameters:"AccesorCannotHaveTypeParameters",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference",SetAccessorCannotHaveOptionalParameter:"SetAccesorCannotHaveOptionalParameter",SetAccessorCannotHaveRestParameter:"SetAccesorCannotHaveRestParameter",SetAccessorCannotHaveReturnType:"SetAccesorCannotHaveReturnType"};S[s]&&(s=S[s])}return function S(P,C){const R=new SyntaxError;return R.code=a,R.reasonCode=s,R.loc=P,R.pos=P.index,R.syntaxPlugin=o,h&&(R.missingPlugin=C.missingPlugin),w(R,"clone",function($={}){var q;const{line:J,column:ee,index:oe}=(q=$.loc)!=null?q:P;return S(new e(J,ee,oe),Object.assign({},C,$.details))}),w(R,"details",C),Object.defineProperty(R,"message",{configurable:!0,get(){const F=`${b(C)} (${P.line}:${P.column})`;return this.message=F,F},set(F){Object.defineProperty(this,"message",{value:F,writable:!0})}}),R}}function T(b,a){if(Array.isArray(b))return o=>T(o,b[0]);const s={};for(const o of Object.keys(b)){const h=b[o],S=typeof h=="string"?{message:()=>h}:typeof h=="function"?{message:h}:h,{message:P}=S,C=t(S,g),R=typeof P=="string"?()=>P:P;s[o]=v(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:o,toMessage:R},a?{syntaxPlugin:a}:{},C))}return s}const E=Object.assign({},T(l),T(u),T(f),T(d),T`pipelineOperator`(y));function x(){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:null,ranges:!1,tokens:!1,createImportExpressions:!1,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0}}function A(b){const a=x();if(b==null)return a;if(b.annexB!=null&&b.annexB!==!1)throw new Error("The `annexB` option can only be set to `false`.");for(const s of Object.keys(a))b[s]!=null&&(a[s]=b[s]);if(a.startLine===1)b.startIndex==null&&a.startColumn>0?a.startIndex=a.startColumn:b.startColumn==null&&a.startIndex>0&&(a.startColumn=a.startIndex);else if((b.startColumn==null||b.startIndex==null)&&b.startIndex!=null)throw new Error("With a `startLine > 1` you must also specify `startIndex` and `startColumn`.");return a}const{defineProperty:N}=Object,_=(b,a)=>{b&&N(b,a,{enumerable:!1,value:b[a]})};function M(b){return _(b.loc.start,"index"),_(b.loc.end,"index"),b}var D=b=>class extends b{parse(){const s=M(super.parse());return this.optionFlags&256&&(s.tokens=s.tokens.map(M)),s}parseRegExpLiteral({pattern:s,flags:o}){let h=null;try{h=new RegExp(s,o)}catch{}const S=this.estreeParseLiteral(h);return S.regex={pattern:s,flags:o},S}parseBigIntLiteral(s){let o;try{o=BigInt(s)}catch{o=null}const h=this.estreeParseLiteral(o);return h.bigint=String(h.value||s),h}parseDecimalLiteral(s){const h=this.estreeParseLiteral(null);return h.decimal=String(h.value||s),h}estreeParseLiteral(s){return this.parseLiteral(s,"Literal")}parseStringLiteral(s){return this.estreeParseLiteral(s)}parseNumericLiteral(s){return this.estreeParseLiteral(s)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(s){return this.estreeParseLiteral(s)}estreeParseChainExpression(s,o){const h=this.startNodeAtNode(s);return h.expression=s,this.finishNodeAt(h,"ChainExpression",o)}directiveToStmt(s){const o=s.value;delete s.value,this.castNodeTo(o,"Literal"),o.raw=o.extra.raw,o.value=o.extra.expressionValue;const h=this.castNodeTo(s,"ExpressionStatement");return h.expression=o,h.directive=o.extra.rawValue,delete o.extra,h}fillOptionalPropertiesForTSESLint(s){}cloneEstreeStringLiteral(s){const{start:o,end:h,loc:S,range:P,raw:C,value:R}=s,F=Object.create(s.constructor.prototype);return F.type="Literal",F.start=o,F.end=h,F.loc=S,F.range=P,F.raw=C,F.value=R,F}initFunction(s,o){super.initFunction(s,o),s.expression=!1}checkDeclaration(s){s!=null&&this.isObjectProperty(s)?this.checkDeclaration(s.value):super.checkDeclaration(s)}getObjectOrClassMethodParams(s){return s.value.params}isValidDirective(s){var o;return s.type==="ExpressionStatement"&&s.expression.type==="Literal"&&typeof s.expression.value=="string"&&!((o=s.expression.extra)!=null&&o.parenthesized)}parseBlockBody(s,o,h,S,P){super.parseBlockBody(s,o,h,S,P);const C=s.directives.map(R=>this.directiveToStmt(R));s.body=C.concat(s.body),delete s.directives}parsePrivateName(){const s=super.parsePrivateName();return this.getPluginOption("estree","classFeatures")?this.convertPrivateNameToPrivateIdentifier(s):s}convertPrivateNameToPrivateIdentifier(s){const o=super.getPrivateNameSV(s);return s=s,delete s.id,s.name=o,this.castNodeTo(s,"PrivateIdentifier")}isPrivateName(s){return this.getPluginOption("estree","classFeatures")?s.type==="PrivateIdentifier":super.isPrivateName(s)}getPrivateNameSV(s){return this.getPluginOption("estree","classFeatures")?s.name:super.getPrivateNameSV(s)}parseLiteral(s,o){const h=super.parseLiteral(s,o);return h.raw=h.extra.raw,delete h.extra,h}parseFunctionBody(s,o,h=!1){super.parseFunctionBody(s,o,h),s.expression=s.body.type!=="BlockStatement"}parseMethod(s,o,h,S,P,C,R=!1){let F=this.startNode();F.kind=s.kind,F=super.parseMethod(F,o,h,S,P,C,R),delete F.kind;const{typeParameters:$}=s;$&&(delete s.typeParameters,F.typeParameters=$,this.resetStartLocationFromNode(F,$));const q=this.castNodeTo(F,"FunctionExpression");return s.value=q,C==="ClassPrivateMethod"&&(s.computed=!1),C==="ObjectMethod"?(s.kind==="method"&&(s.kind="init"),s.shorthand=!1,this.finishNode(s,"Property")):this.finishNode(s,"MethodDefinition")}nameIsConstructor(s){return s.type==="Literal"?s.value==="constructor":super.nameIsConstructor(s)}parseClassProperty(...s){const o=super.parseClassProperty(...s);return this.getPluginOption("estree","classFeatures")&&this.castNodeTo(o,"PropertyDefinition"),o}parseClassPrivateProperty(...s){const o=super.parseClassPrivateProperty(...s);return this.getPluginOption("estree","classFeatures")&&(this.castNodeTo(o,"PropertyDefinition"),o.computed=!1),o}parseClassAccessorProperty(s){const o=super.parseClassAccessorProperty(s);return this.getPluginOption("estree","classFeatures")&&(o.abstract&&this.hasPlugin("typescript")?(delete o.abstract,this.castNodeTo(o,"TSAbstractAccessorProperty")):this.castNodeTo(o,"AccessorProperty")),o}parseObjectProperty(s,o,h,S){const P=super.parseObjectProperty(s,o,h,S);return P&&(P.kind="init",this.castNodeTo(P,"Property")),P}finishObjectProperty(s){return s.kind="init",this.finishNode(s,"Property")}isValidLVal(s,o,h){return s==="Property"?"value":super.isValidLVal(s,o,h)}isAssignable(s,o){return s!=null&&this.isObjectProperty(s)?this.isAssignable(s.value,o):super.isAssignable(s,o)}toAssignable(s,o=!1){if(s!=null&&this.isObjectProperty(s)){const{key:h,value:S}=s;this.isPrivateName(h)&&this.classScope.usePrivateName(this.getPrivateNameSV(h),h.loc.start),this.toAssignable(S,o)}else super.toAssignable(s,o)}toAssignableObjectExpressionProp(s,o,h){s.type==="Property"&&(s.kind==="get"||s.kind==="set")?this.raise(E.PatternHasAccessor,s.key):s.type==="Property"&&s.method?this.raise(E.PatternHasMethod,s.key):super.toAssignableObjectExpressionProp(s,o,h)}finishCallExpression(s,o){const h=super.finishCallExpression(s,o);if(h.callee.type==="Import"){var S,P;this.castNodeTo(h,"ImportExpression"),h.source=h.arguments[0],h.options=(S=h.arguments[1])!=null?S:null,h.attributes=(P=h.arguments[1])!=null?P:null,delete h.arguments,delete h.callee}else h.type==="OptionalCallExpression"?this.castNodeTo(h,"CallExpression"):h.optional=!1;return h}toReferencedArguments(s){s.type!=="ImportExpression"&&super.toReferencedArguments(s)}parseExport(s,o){const h=this.state.lastTokStartLoc,S=super.parseExport(s,o);switch(S.type){case"ExportAllDeclaration":S.exported=null;break;case"ExportNamedDeclaration":S.specifiers.length===1&&S.specifiers[0].type==="ExportNamespaceSpecifier"&&(this.castNodeTo(S,"ExportAllDeclaration"),S.exported=S.specifiers[0].exported,delete S.specifiers);case"ExportDefaultDeclaration":{var P;const{declaration:C}=S;C?.type==="ClassDeclaration"&&((P=C.decorators)==null?void 0:P.length)>0&&C.start===S.start&&this.resetStartLocation(S,h)}break}return S}stopParseSubscript(s,o){const h=super.stopParseSubscript(s,o);return o.optionalChainMember?this.estreeParseChainExpression(h,s.loc.end):h}parseMember(s,o,h,S,P){const C=super.parseMember(s,o,h,S,P);return C.type==="OptionalMemberExpression"?this.castNodeTo(C,"MemberExpression"):C.optional=!1,C}isOptionalMemberExpression(s){return s.type==="ChainExpression"?s.expression.type==="MemberExpression":super.isOptionalMemberExpression(s)}hasPropertyAsPrivateName(s){return s.type==="ChainExpression"&&(s=s.expression),super.hasPropertyAsPrivateName(s)}isObjectProperty(s){return s.type==="Property"&&s.kind==="init"&&!s.method}isObjectMethod(s){return s.type==="Property"&&(s.method||s.kind==="get"||s.kind==="set")}castNodeTo(s,o){const h=super.castNodeTo(s,o);return this.fillOptionalPropertiesForTSESLint(h),h}cloneIdentifier(s){const o=super.cloneIdentifier(s);return this.fillOptionalPropertiesForTSESLint(o),o}cloneStringLiteral(s){return s.type==="Literal"?this.cloneEstreeStringLiteral(s):super.cloneStringLiteral(s)}finishNodeAt(s,o,h){return M(super.finishNodeAt(s,o,h))}finishNode(s,o){const h=super.finishNode(s,o);return this.fillOptionalPropertiesForTSESLint(h),h}resetStartLocation(s,o){super.resetStartLocation(s,o),M(s)}resetEndLocation(s,o=this.state.lastTokEndLoc){super.resetEndLocation(s,o),M(s)}};class O{constructor(a,s){this.token=void 0,this.preserveSpace=void 0,this.token=a,this.preserveSpace=!!s}}const I={brace:new O("{"),j_oTag:new O("<tag"),j_cTag:new O("</tag"),j_expr:new O("<tag>...</tag>",!0)};I.template=new O("`",!0);const k=!0,L=!0,V=!0,K=!0,re=!0,z=!0;class se{constructor(a,s={}){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=a,this.keyword=s.keyword,this.beforeExpr=!!s.beforeExpr,this.startsExpr=!!s.startsExpr,this.rightAssociative=!!s.rightAssociative,this.isLoop=!!s.isLoop,this.isAssign=!!s.isAssign,this.prefix=!!s.prefix,this.postfix=!!s.postfix,this.binop=s.binop!=null?s.binop:null,this.updateContext=null}}const he=new Map;function ne(b,a={}){a.keyword=b;const s=B(b,a);return he.set(b,s),s}function ge(b,a){return B(b,{beforeExpr:k,binop:a})}let ve=-1;const Q=[],ie=[],G=[],j=[],U=[],H=[];function B(b,a={}){var s,o,h,S;return++ve,ie.push(b),G.push((s=a.binop)!=null?s:-1),j.push((o=a.beforeExpr)!=null?o:!1),U.push((h=a.startsExpr)!=null?h:!1),H.push((S=a.prefix)!=null?S:!1),Q.push(new se(b,a)),ve}function W(b,a={}){var s,o,h,S;return++ve,he.set(b,ve),ie.push(b),G.push((s=a.binop)!=null?s:-1),j.push((o=a.beforeExpr)!=null?o:!1),U.push((h=a.startsExpr)!=null?h:!1),H.push((S=a.prefix)!=null?S:!1),Q.push(new se("name",a)),ve}const ue={bracketL:B("[",{beforeExpr:k,startsExpr:L}),bracketHashL:B("#[",{beforeExpr:k,startsExpr:L}),bracketBarL:B("[|",{beforeExpr:k,startsExpr:L}),bracketR:B("]"),bracketBarR:B("|]"),braceL:B("{",{beforeExpr:k,startsExpr:L}),braceBarL:B("{|",{beforeExpr:k,startsExpr:L}),braceHashL:B("#{",{beforeExpr:k,startsExpr:L}),braceR:B("}"),braceBarR:B("|}"),parenL:B("(",{beforeExpr:k,startsExpr:L}),parenR:B(")"),comma:B(",",{beforeExpr:k}),semi:B(";",{beforeExpr:k}),colon:B(":",{beforeExpr:k}),doubleColon:B("::",{beforeExpr:k}),dot:B("."),question:B("?",{beforeExpr:k}),questionDot:B("?."),arrow:B("=>",{beforeExpr:k}),template:B("template"),ellipsis:B("...",{beforeExpr:k}),backQuote:B("`",{startsExpr:L}),dollarBraceL:B("${",{beforeExpr:k,startsExpr:L}),templateTail:B("...`",{startsExpr:L}),templateNonTail:B("...${",{beforeExpr:k,startsExpr:L}),at:B("@"),hash:B("#",{startsExpr:L}),interpreterDirective:B("#!..."),eq:B("=",{beforeExpr:k,isAssign:K}),assign:B("_=",{beforeExpr:k,isAssign:K}),slashAssign:B("_=",{beforeExpr:k,isAssign:K}),xorAssign:B("_=",{beforeExpr:k,isAssign:K}),moduloAssign:B("_=",{beforeExpr:k,isAssign:K}),incDec:B("++/--",{prefix:re,postfix:z,startsExpr:L}),bang:B("!",{beforeExpr:k,prefix:re,startsExpr:L}),tilde:B("~",{beforeExpr:k,prefix:re,startsExpr:L}),doubleCaret:B("^^",{startsExpr:L}),doubleAt:B("@@",{startsExpr:L}),pipeline:ge("|>",0),nullishCoalescing:ge("??",1),logicalOR:ge("||",1),logicalAND:ge("&&",2),bitwiseOR:ge("|",3),bitwiseXOR:ge("^",4),bitwiseAND:ge("&",5),equality:ge("==/!=/===/!==",6),lt:ge("</>/<=/>=",7),gt:ge("</>/<=/>=",7),relational:ge("</>/<=/>=",7),bitShift:ge("<</>>/>>>",8),bitShiftL:ge("<</>>/>>>",8),bitShiftR:ge("<</>>/>>>",8),plusMin:B("+/-",{beforeExpr:k,binop:9,prefix:re,startsExpr:L}),modulo:B("%",{binop:10,startsExpr:L}),star:B("*",{binop:10}),slash:ge("/",10),exponent:B("**",{beforeExpr:k,binop:11,rightAssociative:!0}),_in:ne("in",{beforeExpr:k,binop:7}),_instanceof:ne("instanceof",{beforeExpr:k,binop:7}),_break:ne("break"),_case:ne("case",{beforeExpr:k}),_catch:ne("catch"),_continue:ne("continue"),_debugger:ne("debugger"),_default:ne("default",{beforeExpr:k}),_else:ne("else",{beforeExpr:k}),_finally:ne("finally"),_function:ne("function",{startsExpr:L}),_if:ne("if"),_return:ne("return",{beforeExpr:k}),_switch:ne("switch"),_throw:ne("throw",{beforeExpr:k,prefix:re,startsExpr:L}),_try:ne("try"),_var:ne("var"),_const:ne("const"),_with:ne("with"),_new:ne("new",{beforeExpr:k,startsExpr:L}),_this:ne("this",{startsExpr:L}),_super:ne("super",{startsExpr:L}),_class:ne("class",{startsExpr:L}),_extends:ne("extends",{beforeExpr:k}),_export:ne("export"),_import:ne("import",{startsExpr:L}),_null:ne("null",{startsExpr:L}),_true:ne("true",{startsExpr:L}),_false:ne("false",{startsExpr:L}),_typeof:ne("typeof",{beforeExpr:k,prefix:re,startsExpr:L}),_void:ne("void",{beforeExpr:k,prefix:re,startsExpr:L}),_delete:ne("delete",{beforeExpr:k,prefix:re,startsExpr:L}),_do:ne("do",{isLoop:V,beforeExpr:k}),_for:ne("for",{isLoop:V}),_while:ne("while",{isLoop:V}),_as:W("as",{startsExpr:L}),_assert:W("assert",{startsExpr:L}),_async:W("async",{startsExpr:L}),_await:W("await",{startsExpr:L}),_defer:W("defer",{startsExpr:L}),_from:W("from",{startsExpr:L}),_get:W("get",{startsExpr:L}),_let:W("let",{startsExpr:L}),_meta:W("meta",{startsExpr:L}),_of:W("of",{startsExpr:L}),_sent:W("sent",{startsExpr:L}),_set:W("set",{startsExpr:L}),_source:W("source",{startsExpr:L}),_static:W("static",{startsExpr:L}),_using:W("using",{startsExpr:L}),_yield:W("yield",{startsExpr:L}),_asserts:W("asserts",{startsExpr:L}),_checks:W("checks",{startsExpr:L}),_exports:W("exports",{startsExpr:L}),_global:W("global",{startsExpr:L}),_implements:W("implements",{startsExpr:L}),_intrinsic:W("intrinsic",{startsExpr:L}),_infer:W("infer",{startsExpr:L}),_is:W("is",{startsExpr:L}),_mixins:W("mixins",{startsExpr:L}),_proto:W("proto",{startsExpr:L}),_require:W("require",{startsExpr:L}),_satisfies:W("satisfies",{startsExpr:L}),_keyof:W("keyof",{startsExpr:L}),_readonly:W("readonly",{startsExpr:L}),_unique:W("unique",{startsExpr:L}),_abstract:W("abstract",{startsExpr:L}),_declare:W("declare",{startsExpr:L}),_enum:W("enum",{startsExpr:L}),_module:W("module",{startsExpr:L}),_namespace:W("namespace",{startsExpr:L}),_interface:W("interface",{startsExpr:L}),_type:W("type",{startsExpr:L}),_opaque:W("opaque",{startsExpr:L}),name:B("name",{startsExpr:L}),placeholder:B("%%",{startsExpr:!0}),string:B("string",{startsExpr:L}),num:B("num",{startsExpr:L}),bigint:B("bigint",{startsExpr:L}),decimal:B("decimal",{startsExpr:L}),regexp:B("regexp",{startsExpr:L}),privateName:B("#name",{startsExpr:L}),eof:B("eof"),jsxName:B("jsxName"),jsxText:B("jsxText",{beforeExpr:!0}),jsxTagStart:B("jsxTagStart",{startsExpr:!0}),jsxTagEnd:B("jsxTagEnd")};function Y(b){return b>=93&&b<=133}function Z(b){return b<=92}function ce(b){return b>=58&&b<=133}function Ee(b){return b>=58&&b<=137}function de(b){return j[b]}function be(b){return U[b]}function it(b){return b>=29&&b<=33}function dt(b){return b>=129&&b<=131}function tt(b){return b>=90&&b<=92}function Be(b){return b>=58&&b<=92}function mt(b){return b>=39&&b<=59}function yt(b){return b===34}function Nt(b){return H[b]}function $r(b){return b>=121&&b<=123}function Ur(b){return b>=124&&b<=130}function nt(b){return ie[b]}function qr(b){return G[b]}function Ca(b){return b===57}function jr(b){return b>=24&&b<=25}function bt(b){return Q[b]}Q[8].updateContext=b=>{b.pop()},Q[5].updateContext=Q[7].updateContext=Q[23].updateContext=b=>{b.push(I.brace)},Q[22].updateContext=b=>{b[b.length-1]===I.template?b.pop():b.push(I.template)},Q[143].updateContext=b=>{b.push(I.j_expr,I.j_oTag)};let Ss="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ꟑꟑꟓꟕ-ꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",ci="·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・";const Xg=new RegExp("["+Ss+"]"),Jg=new RegExp("["+Ss+ci+"]");Ss=ci=null;const uu=[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,71,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,2,60,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,328,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,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,42,9,8936,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,496,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,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],Kg=[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,80,3,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,343,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,330,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,726,6,110,6,6,9,4759,9,787719,239];function Ia(b,a){let s=65536;for(let o=0,h=a.length;o<h;o+=2){if(s+=a[o],s>b)return!1;if(s+=a[o+1],s>=b)return!0}return!1}function jt(b){return b<65?b===36:b<=90?!0:b<97?b===95:b<=122?!0:b<=65535?b>=170&&Xg.test(String.fromCharCode(b)):Ia(b,uu)}function Vr(b){return b<48?b===36:b<58?!0:b<65?!1:b<=90?!0:b<97?b===95:b<=122?!0:b<=65535?b>=170&&Jg.test(String.fromCharCode(b)):Ia(b,uu)||Ia(b,Kg)}const Na={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},Yg=new Set(Na.keyword),Qg=new Set(Na.strict),Zg=new Set(Na.strictBind);function hu(b,a){return a&&b==="await"||b==="enum"}function pu(b,a){return hu(b,a)||Qg.has(b)}function fu(b){return Zg.has(b)}function du(b,a){return pu(b,a)||fu(b)}function ev(b){return Yg.has(b)}function tv(b,a,s){return b===64&&a===64&&jt(s)}const rv=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete","implements","interface","let","package","private","protected","public","static","yield","eval","arguments","enum","await"]);function sv(b){return rv.has(b)}class Oa{constructor(a){this.flags=0,this.names=new Map,this.firstLexicalName="",this.flags=a}}class ka{constructor(a,s){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=new Map,this.parser=a,this.inModule=s}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 inClass(){return(this.currentThisScopeFlags()&64)>0}get inClassAndNotInNonArrowFunction(){const a=this.currentThisScopeFlags();return(a&64)>0&&(a&2)===0}get inStaticBlock(){for(let a=this.scopeStack.length-1;;a--){const{flags:s}=this.scopeStack[a];if(s&128)return!0;if(s&707)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(a){return new Oa(a)}enter(a){this.scopeStack.push(this.createScope(a))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(a){return!!(a.flags&130||!this.parser.inModule&&a.flags&1)}declareName(a,s,o){let h=this.currentScope();if(s&8||s&16){this.checkRedeclarationInScope(h,a,s,o);let S=h.names.get(a)||0;s&16?S=S|4:(h.firstLexicalName||(h.firstLexicalName=a),S=S|2),h.names.set(a,S),s&8&&this.maybeExportDefined(h,a)}else if(s&4)for(let S=this.scopeStack.length-1;S>=0&&(h=this.scopeStack[S],this.checkRedeclarationInScope(h,a,s,o),h.names.set(a,(h.names.get(a)||0)|1),this.maybeExportDefined(h,a),!(h.flags&643));--S);this.parser.inModule&&h.flags&1&&this.undefinedExports.delete(a)}maybeExportDefined(a,s){this.parser.inModule&&a.flags&1&&this.undefinedExports.delete(s)}checkRedeclarationInScope(a,s,o,h){this.isRedeclaredInScope(a,s,o)&&this.parser.raise(E.VarRedeclaration,h,{identifierName:s})}isRedeclaredInScope(a,s,o){if(!(o&1))return!1;if(o&8)return a.names.has(s);const h=a.names.get(s);return o&16?(h&2)>0||!this.treatFunctionsAsVarInScope(a)&&(h&1)>0:(h&2)>0&&!(a.flags&8&&a.firstLexicalName===s)||!this.treatFunctionsAsVarInScope(a)&&(h&4)>0}checkLocalExport(a){const{name:s}=a;this.scopeStack[0].names.has(s)||this.undefinedExports.set(s,a.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let a=this.scopeStack.length-1;;a--){const{flags:s}=this.scopeStack[a];if(s&643)return s}}currentThisScopeFlags(){for(let a=this.scopeStack.length-1;;a--){const{flags:s}=this.scopeStack[a];if(s&707&&!(s&4))return s}}}class iv extends Oa{constructor(...a){super(...a),this.declareFunctions=new Set}}class nv extends ka{createScope(a){return new iv(a)}declareName(a,s,o){const h=this.currentScope();if(s&2048){this.checkRedeclarationInScope(h,a,s,o),this.maybeExportDefined(h,a),h.declareFunctions.add(a);return}super.declareName(a,s,o)}isRedeclaredInScope(a,s,o){if(super.isRedeclaredInScope(a,s,o))return!0;if(o&2048&&!a.declareFunctions.has(s)){const h=a.names.get(s);return(h&4)>0||(h&2)>0}return!1}checkLocalExport(a){this.scopeStack[0].declareFunctions.has(a.name)||super.checkLocalExport(a)}}const av=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),pe=T`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:b})=>`Cannot overwrite reserved type ${b}.`,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:b,enumName:a})=>`Boolean enum members need to be initialized. Use either \`${b} = true,\` or \`${b} = false,\` in enum \`${a}\`.`,EnumDuplicateMemberName:({memberName:b,enumName:a})=>`Enum member names need to be unique, but the name \`${b}\` has already been used before in enum \`${a}\`.`,EnumInconsistentMemberValues:({enumName:b})=>`Enum \`${b}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:b,enumName:a})=>`Enum type \`${b}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${a}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:b})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${b}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:b,memberName:a,explicitType:s})=>`Enum \`${b}\` has type \`${s}\`, so the initializer of \`${a}\` needs to be a ${s} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:b,memberName:a})=>`Symbol enum members cannot be initialized. Use \`${a},\` in enum \`${b}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:b,memberName:a})=>`The enum member initializer for \`${a}\` needs to be a literal (either a boolean, number, or string) in enum \`${b}\`.`,EnumInvalidMemberName:({enumName:b,memberName:a,suggestion:s})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${a}\`, consider using \`${s}\`, in enum \`${b}\`.`,EnumNumberMemberNotInitialized:({enumName:b,memberName:a})=>`Number enum members need to be initialized, e.g. \`${a} = 1\` in enum \`${b}\`.`,EnumStringMemberInconsistentlyInitialized:({enumName:b})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${b}\`.`,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:b})=>`Unexpected reserved type ${b}.`,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:b,suggestion:a})=>`\`declare export ${b}\` is not supported. Use \`${a}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function ov(b){return b.type==="DeclareExportAllDeclaration"||b.type==="DeclareExportDeclaration"&&(!b.declaration||b.declaration.type!=="TypeAlias"&&b.declaration.type!=="InterfaceDeclaration")}function mu(b){return b.importKind==="type"||b.importKind==="typeof"}const lv={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};function cv(b,a){const s=[],o=[];for(let h=0;h<b.length;h++)(a(b[h],h,b)?s:o).push(b[h]);return[s,o]}const uv=/\*?\s*@((?:no)?flow)\b/;var hv=b=>class extends b{constructor(...s){super(...s),this.flowPragma=void 0}getScopeHandler(){return nv}shouldParseTypes(){return this.getPluginOption("flow","all")||this.flowPragma==="flow"}finishToken(s,o){s!==134&&s!==13&&s!==28&&this.flowPragma===void 0&&(this.flowPragma=null),super.finishToken(s,o)}addComment(s){if(this.flowPragma===void 0){const o=uv.exec(s.value);if(o)if(o[1]==="flow")this.flowPragma="flow";else if(o[1]==="noflow")this.flowPragma="noflow";else throw new Error("Unexpected flow pragma")}super.addComment(s)}flowParseTypeInitialiser(s){const o=this.state.inType;this.state.inType=!0,this.expect(s||14);const h=this.flowParseType();return this.state.inType=o,h}flowParsePredicate(){const s=this.startNode(),o=this.state.startLoc;return this.next(),this.expectContextual(110),this.state.lastTokStartLoc.index>o.index+1&&this.raise(pe.UnexpectedSpaceBetweenModuloChecks,o),this.eat(10)?(s.value=super.parseExpression(),this.expect(11),this.finishNode(s,"DeclaredPredicate")):this.finishNode(s,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){const s=this.state.inType;this.state.inType=!0,this.expect(14);let o=null,h=null;return this.match(54)?(this.state.inType=s,h=this.flowParsePredicate()):(o=this.flowParseType(),this.state.inType=s,this.match(54)&&(h=this.flowParsePredicate())),[o,h]}flowParseDeclareClass(s){return this.next(),this.flowParseInterfaceish(s,!0),this.finishNode(s,"DeclareClass")}flowParseDeclareFunction(s){this.next();const o=s.id=this.parseIdentifier(),h=this.startNode(),S=this.startNode();this.match(47)?h.typeParameters=this.flowParseTypeParameterDeclaration():h.typeParameters=null,this.expect(10);const P=this.flowParseFunctionTypeParams();return h.params=P.params,h.rest=P.rest,h.this=P._this,this.expect(11),[h.returnType,s.predicate]=this.flowParseTypeAndPredicateInitialiser(),S.typeAnnotation=this.finishNode(h,"FunctionTypeAnnotation"),o.typeAnnotation=this.finishNode(S,"TypeAnnotation"),this.resetEndLocation(o),this.semicolon(),this.scope.declareName(s.id.name,2048,s.id.loc.start),this.finishNode(s,"DeclareFunction")}flowParseDeclare(s,o){if(this.match(80))return this.flowParseDeclareClass(s);if(this.match(68))return this.flowParseDeclareFunction(s);if(this.match(74))return this.flowParseDeclareVariable(s);if(this.eatContextual(127))return this.match(16)?this.flowParseDeclareModuleExports(s):(o&&this.raise(pe.NestedDeclareModule,this.state.lastTokStartLoc),this.flowParseDeclareModule(s));if(this.isContextual(130))return this.flowParseDeclareTypeAlias(s);if(this.isContextual(131))return this.flowParseDeclareOpaqueType(s);if(this.isContextual(129))return this.flowParseDeclareInterface(s);if(this.match(82))return this.flowParseDeclareExportDeclaration(s,o);this.unexpected()}flowParseDeclareVariable(s){return this.next(),s.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(s.id.name,5,s.id.loc.start),this.semicolon(),this.finishNode(s,"DeclareVariable")}flowParseDeclareModule(s){this.scope.enter(0),this.match(134)?s.id=super.parseExprAtom():s.id=this.parseIdentifier();const o=s.body=this.startNode(),h=o.body=[];for(this.expect(5);!this.match(8);){let C=this.startNode();this.match(83)?(this.next(),!this.isContextual(130)&&!this.match(87)&&this.raise(pe.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc),super.parseImport(C)):(this.expectContextual(125,pe.UnsupportedStatementInDeclareModule),C=this.flowParseDeclare(C,!0)),h.push(C)}this.scope.exit(),this.expect(8),this.finishNode(o,"BlockStatement");let S=null,P=!1;return h.forEach(C=>{ov(C)?(S==="CommonJS"&&this.raise(pe.AmbiguousDeclareModuleKind,C),S="ES"):C.type==="DeclareModuleExports"&&(P&&this.raise(pe.DuplicateDeclareModuleExports,C),S==="ES"&&this.raise(pe.AmbiguousDeclareModuleKind,C),S="CommonJS",P=!0)}),s.kind=S||"CommonJS",this.finishNode(s,"DeclareModule")}flowParseDeclareExportDeclaration(s,o){if(this.expect(82),this.eat(65))return this.match(68)||this.match(80)?s.declaration=this.flowParseDeclare(this.startNode()):(s.declaration=this.flowParseType(),this.semicolon()),s.default=!0,this.finishNode(s,"DeclareExportDeclaration");if(this.match(75)||this.isLet()||(this.isContextual(130)||this.isContextual(129))&&!o){const h=this.state.value;throw this.raise(pe.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:h,suggestion:lv[h]})}if(this.match(74)||this.match(68)||this.match(80)||this.isContextual(131))return s.declaration=this.flowParseDeclare(this.startNode()),s.default=!1,this.finishNode(s,"DeclareExportDeclaration");if(this.match(55)||this.match(5)||this.isContextual(129)||this.isContextual(130)||this.isContextual(131))return s=this.parseExport(s,null),s.type==="ExportNamedDeclaration"?(s.default=!1,delete s.exportKind,this.castNodeTo(s,"DeclareExportDeclaration")):this.castNodeTo(s,"DeclareExportAllDeclaration");this.unexpected()}flowParseDeclareModuleExports(s){return this.next(),this.expectContextual(111),s.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(s,"DeclareModuleExports")}flowParseDeclareTypeAlias(s){this.next();const o=this.flowParseTypeAlias(s);return this.castNodeTo(o,"DeclareTypeAlias"),o}flowParseDeclareOpaqueType(s){this.next();const o=this.flowParseOpaqueType(s,!0);return this.castNodeTo(o,"DeclareOpaqueType"),o}flowParseDeclareInterface(s){return this.next(),this.flowParseInterfaceish(s,!1),this.finishNode(s,"DeclareInterface")}flowParseInterfaceish(s,o){if(s.id=this.flowParseRestrictedIdentifier(!o,!0),this.scope.declareName(s.id.name,o?17:8201,s.id.loc.start),this.match(47)?s.typeParameters=this.flowParseTypeParameterDeclaration():s.typeParameters=null,s.extends=[],this.eat(81))do s.extends.push(this.flowParseInterfaceExtends());while(!o&&this.eat(12));if(o){if(s.implements=[],s.mixins=[],this.eatContextual(117))do s.mixins.push(this.flowParseInterfaceExtends());while(this.eat(12));if(this.eatContextual(113))do s.implements.push(this.flowParseInterfaceExtends());while(this.eat(12))}s.body=this.flowParseObjectType({allowStatic:o,allowExact:!1,allowSpread:!1,allowProto:o,allowInexact:!1})}flowParseInterfaceExtends(){const s=this.startNode();return s.id=this.flowParseQualifiedTypeIdentifier(),this.match(47)?s.typeParameters=this.flowParseTypeParameterInstantiation():s.typeParameters=null,this.finishNode(s,"InterfaceExtends")}flowParseInterface(s){return this.flowParseInterfaceish(s,!1),this.finishNode(s,"InterfaceDeclaration")}checkNotUnderscore(s){s==="_"&&this.raise(pe.UnexpectedReservedUnderscore,this.state.startLoc)}checkReservedType(s,o,h){av.has(s)&&this.raise(h?pe.AssignReservedType:pe.UnexpectedReservedType,o,{reservedType:s})}flowParseRestrictedIdentifier(s,o){return this.checkReservedType(this.state.value,this.state.startLoc,o),this.parseIdentifier(s)}flowParseTypeAlias(s){return s.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(s.id.name,8201,s.id.loc.start),this.match(47)?s.typeParameters=this.flowParseTypeParameterDeclaration():s.typeParameters=null,s.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(s,"TypeAlias")}flowParseOpaqueType(s,o){return this.expectContextual(130),s.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(s.id.name,8201,s.id.loc.start),this.match(47)?s.typeParameters=this.flowParseTypeParameterDeclaration():s.typeParameters=null,s.supertype=null,this.match(14)&&(s.supertype=this.flowParseTypeInitialiser(14)),s.impltype=null,o||(s.impltype=this.flowParseTypeInitialiser(29)),this.semicolon(),this.finishNode(s,"OpaqueType")}flowParseTypeParameter(s=!1){const o=this.state.startLoc,h=this.startNode(),S=this.flowParseVariance(),P=this.flowParseTypeAnnotatableIdentifier();return h.name=P.name,h.variance=S,h.bound=P.typeAnnotation,this.match(29)?(this.eat(29),h.default=this.flowParseType()):s&&this.raise(pe.MissingTypeParamDefault,o),this.finishNode(h,"TypeParameter")}flowParseTypeParameterDeclaration(){const s=this.state.inType,o=this.startNode();o.params=[],this.state.inType=!0,this.match(47)||this.match(143)?this.next():this.unexpected();let h=!1;do{const S=this.flowParseTypeParameter(h);o.params.push(S),S.default&&(h=!0),this.match(48)||this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=s,this.finishNode(o,"TypeParameterDeclaration")}flowInTopLevelContext(s){if(this.curContext()!==I.brace){const o=this.state.context;this.state.context=[o[0]];try{return s()}finally{this.state.context=o}}else return s()}flowParseTypeParameterInstantiationInExpression(){if(this.reScan_lt()===47)return this.flowParseTypeParameterInstantiation()}flowParseTypeParameterInstantiation(){const s=this.startNode(),o=this.state.inType;return this.state.inType=!0,s.params=[],this.flowInTopLevelContext(()=>{this.expect(47);const h=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(48);)s.params.push(this.flowParseType()),this.match(48)||this.expect(12);this.state.noAnonFunctionType=h}),this.state.inType=o,!this.state.inType&&this.curContext()===I.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(s,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){if(this.reScan_lt()!==47)return;const s=this.startNode(),o=this.state.inType;for(s.params=[],this.state.inType=!0,this.expect(47);!this.match(48);)s.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(48)||this.expect(12);return this.expect(48),this.state.inType=o,this.finishNode(s,"TypeParameterInstantiation")}flowParseInterfaceType(){const s=this.startNode();if(this.expectContextual(129),s.extends=[],this.eat(81))do s.extends.push(this.flowParseInterfaceExtends());while(this.eat(12));return s.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(s,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(135)||this.match(134)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(s,o,h){return s.static=o,this.lookahead().type===14?(s.id=this.flowParseObjectPropertyKey(),s.key=this.flowParseTypeInitialiser()):(s.id=null,s.key=this.flowParseType()),this.expect(3),s.value=this.flowParseTypeInitialiser(),s.variance=h,this.finishNode(s,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(s,o){return s.static=o,s.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(47)||this.match(10)?(s.method=!0,s.optional=!1,s.value=this.flowParseObjectTypeMethodish(this.startNodeAt(s.loc.start))):(s.method=!1,this.eat(17)&&(s.optional=!0),s.value=this.flowParseTypeInitialiser()),this.finishNode(s,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(s){for(s.params=[],s.rest=null,s.typeParameters=null,s.this=null,this.match(47)&&(s.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(10),this.match(78)&&(s.this=this.flowParseFunctionTypeParam(!0),s.this.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)s.params.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(s.rest=this.flowParseFunctionTypeParam(!1)),this.expect(11),s.returnType=this.flowParseTypeInitialiser(),this.finishNode(s,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(s,o){const h=this.startNode();return s.static=o,s.value=this.flowParseObjectTypeMethodish(h),this.finishNode(s,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:s,allowExact:o,allowSpread:h,allowProto:S,allowInexact:P}){const C=this.state.inType;this.state.inType=!0;const R=this.startNode();R.callProperties=[],R.properties=[],R.indexers=[],R.internalSlots=[];let F,$,q=!1;for(o&&this.match(6)?(this.expect(6),F=9,$=!0):(this.expect(5),F=8,$=!1),R.exact=$;!this.match(F);){let ee=!1,oe=null,me=null;const Me=this.startNode();if(S&&this.isContextual(118)){const _e=this.lookahead();_e.type!==14&&_e.type!==17&&(this.next(),oe=this.state.startLoc,s=!1)}if(s&&this.isContextual(106)){const _e=this.lookahead();_e.type!==14&&_e.type!==17&&(this.next(),ee=!0)}const ye=this.flowParseVariance();if(this.eat(0))oe!=null&&this.unexpected(oe),this.eat(0)?(ye&&this.unexpected(ye.loc.start),R.internalSlots.push(this.flowParseObjectTypeInternalSlot(Me,ee))):R.indexers.push(this.flowParseObjectTypeIndexer(Me,ee,ye));else if(this.match(10)||this.match(47))oe!=null&&this.unexpected(oe),ye&&this.unexpected(ye.loc.start),R.callProperties.push(this.flowParseObjectTypeCallProperty(Me,ee));else{let _e="init";if(this.isContextual(99)||this.isContextual(104)){const rr=this.lookahead();Ee(rr.type)&&(_e=this.state.value,this.next())}const gr=this.flowParseObjectTypeProperty(Me,ee,oe,ye,_e,h,P??!$);gr===null?(q=!0,me=this.state.lastTokStartLoc):R.properties.push(gr)}this.flowObjectTypeSemicolon(),me&&!this.match(8)&&!this.match(9)&&this.raise(pe.UnexpectedExplicitInexactInObject,me)}this.expect(F),h&&(R.inexact=q);const J=this.finishNode(R,"ObjectTypeAnnotation");return this.state.inType=C,J}flowParseObjectTypeProperty(s,o,h,S,P,C,R){if(this.eat(21))return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(C?R||this.raise(pe.InexactInsideExact,this.state.lastTokStartLoc):this.raise(pe.InexactInsideNonObject,this.state.lastTokStartLoc),S&&this.raise(pe.InexactVariance,S),null):(C||this.raise(pe.UnexpectedSpreadType,this.state.lastTokStartLoc),h!=null&&this.unexpected(h),S&&this.raise(pe.SpreadVariance,S),s.argument=this.flowParseType(),this.finishNode(s,"ObjectTypeSpreadProperty"));{s.key=this.flowParseObjectPropertyKey(),s.static=o,s.proto=h!=null,s.kind=P;let F=!1;return this.match(47)||this.match(10)?(s.method=!0,h!=null&&this.unexpected(h),S&&this.unexpected(S.loc.start),s.value=this.flowParseObjectTypeMethodish(this.startNodeAt(s.loc.start)),(P==="get"||P==="set")&&this.flowCheckGetterSetterParams(s),!C&&s.key.name==="constructor"&&s.value.this&&this.raise(pe.ThisParamBannedInConstructor,s.value.this)):(P!=="init"&&this.unexpected(),s.method=!1,this.eat(17)&&(F=!0),s.value=this.flowParseTypeInitialiser(),s.variance=S),s.optional=F,this.finishNode(s,"ObjectTypeProperty")}}flowCheckGetterSetterParams(s){const o=s.kind==="get"?0:1,h=s.value.params.length+(s.value.rest?1:0);s.value.this&&this.raise(s.kind==="get"?pe.GetterMayNotHaveThisParam:pe.SetterMayNotHaveThisParam,s.value.this),h!==o&&this.raise(s.kind==="get"?E.BadGetterArity:E.BadSetterArity,s),s.kind==="set"&&s.value.rest&&this.raise(E.BadSetterRestParameter,s)}flowObjectTypeSemicolon(){!this.eat(13)&&!this.eat(12)&&!this.match(8)&&!this.match(9)&&this.unexpected()}flowParseQualifiedTypeIdentifier(s,o){s??(s=this.state.startLoc);let h=o||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){const S=this.startNodeAt(s);S.qualification=h,S.id=this.flowParseRestrictedIdentifier(!0),h=this.finishNode(S,"QualifiedTypeIdentifier")}return h}flowParseGenericType(s,o){const h=this.startNodeAt(s);return h.typeParameters=null,h.id=this.flowParseQualifiedTypeIdentifier(s,o),this.match(47)&&(h.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(h,"GenericTypeAnnotation")}flowParseTypeofType(){const s=this.startNode();return this.expect(87),s.argument=this.flowParsePrimaryType(),this.finishNode(s,"TypeofTypeAnnotation")}flowParseTupleType(){const s=this.startNode();for(s.types=[],this.expect(0);this.state.pos<this.length&&!this.match(3)&&(s.types.push(this.flowParseType()),!this.match(3));)this.expect(12);return this.expect(3),this.finishNode(s,"TupleTypeAnnotation")}flowParseFunctionTypeParam(s){let o=null,h=!1,S=null;const P=this.startNode(),C=this.lookahead(),R=this.state.type===78;return C.type===14||C.type===17?(R&&!s&&this.raise(pe.ThisParamMustBeFirst,P),o=this.parseIdentifier(R),this.eat(17)&&(h=!0,R&&this.raise(pe.ThisParamMayNotBeOptional,P)),S=this.flowParseTypeInitialiser()):S=this.flowParseType(),P.name=o,P.optional=h,P.typeAnnotation=S,this.finishNode(P,"FunctionTypeParam")}reinterpretTypeAsFunctionTypeParam(s){const o=this.startNodeAt(s.loc.start);return o.name=null,o.optional=!1,o.typeAnnotation=s,this.finishNode(o,"FunctionTypeParam")}flowParseFunctionTypeParams(s=[]){let o=null,h=null;for(this.match(78)&&(h=this.flowParseFunctionTypeParam(!0),h.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)s.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(o=this.flowParseFunctionTypeParam(!1)),{params:s,rest:o,_this:h}}flowIdentToTypeAnnotation(s,o,h){switch(h.name){case"any":return this.finishNode(o,"AnyTypeAnnotation");case"bool":case"boolean":return this.finishNode(o,"BooleanTypeAnnotation");case"mixed":return this.finishNode(o,"MixedTypeAnnotation");case"empty":return this.finishNode(o,"EmptyTypeAnnotation");case"number":return this.finishNode(o,"NumberTypeAnnotation");case"string":return this.finishNode(o,"StringTypeAnnotation");case"symbol":return this.finishNode(o,"SymbolTypeAnnotation");default:return this.checkNotUnderscore(h.name),this.flowParseGenericType(s,h)}}flowParsePrimaryType(){const s=this.state.startLoc,o=this.startNode();let h,S,P=!1;const C=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,S=this.flowParseTupleType(),this.state.noAnonFunctionType=C,S;case 47:{const R=this.startNode();return R.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(10),h=this.flowParseFunctionTypeParams(),R.params=h.params,R.rest=h.rest,R.this=h._this,this.expect(11),this.expect(19),R.returnType=this.flowParseType(),this.finishNode(R,"FunctionTypeAnnotation")}case 10:{const R=this.startNode();if(this.next(),!this.match(11)&&!this.match(21))if(Y(this.state.type)||this.match(78)){const F=this.lookahead().type;P=F!==17&&F!==14}else P=!0;if(P){if(this.state.noAnonFunctionType=!1,S=this.flowParseType(),this.state.noAnonFunctionType=C,this.state.noAnonFunctionType||!(this.match(12)||this.match(11)&&this.lookahead().type===19))return this.expect(11),S;this.eat(12)}return S?h=this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(S)]):h=this.flowParseFunctionTypeParams(),R.params=h.params,R.rest=h.rest,R.this=h._this,this.expect(11),this.expect(19),R.returnType=this.flowParseType(),R.typeParameters=null,this.finishNode(R,"FunctionTypeAnnotation")}case 134:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case 85:case 86:return o.value=this.match(85),this.next(),this.finishNode(o,"BooleanLiteralTypeAnnotation");case 53:if(this.state.value==="-"){if(this.next(),this.match(135))return this.parseLiteralAtNode(-this.state.value,"NumberLiteralTypeAnnotation",o);if(this.match(136))return this.parseLiteralAtNode(-this.state.value,"BigIntLiteralTypeAnnotation",o);throw this.raise(pe.UnexpectedSubtractionOperand,this.state.startLoc)}this.unexpected();return;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(o,"VoidTypeAnnotation");case 84:return this.next(),this.finishNode(o,"NullLiteralTypeAnnotation");case 78:return this.next(),this.finishNode(o,"ThisTypeAnnotation");case 55:return this.next(),this.finishNode(o,"ExistsTypeAnnotation");case 87:return this.flowParseTypeofType();default:if(Be(this.state.type)){const R=nt(this.state.type);return this.next(),super.createIdentifier(o,R)}else if(Y(this.state.type))return this.isContextual(129)?this.flowParseInterfaceType():this.flowIdentToTypeAnnotation(s,o,this.parseIdentifier())}this.unexpected()}flowParsePostfixType(){const s=this.state.startLoc;let o=this.flowParsePrimaryType(),h=!1;for(;(this.match(0)||this.match(18))&&!this.canInsertSemicolon();){const S=this.startNodeAt(s),P=this.eat(18);h=h||P,this.expect(0),!P&&this.match(3)?(S.elementType=o,this.next(),o=this.finishNode(S,"ArrayTypeAnnotation")):(S.objectType=o,S.indexType=this.flowParseType(),this.expect(3),h?(S.optional=P,o=this.finishNode(S,"OptionalIndexedAccessType")):o=this.finishNode(S,"IndexedAccessType"))}return o}flowParsePrefixType(){const s=this.startNode();return this.eat(17)?(s.typeAnnotation=this.flowParsePrefixType(),this.finishNode(s,"NullableTypeAnnotation")):this.flowParsePostfixType()}flowParseAnonFunctionWithoutParens(){const s=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(19)){const o=this.startNodeAt(s.loc.start);return o.params=[this.reinterpretTypeAsFunctionTypeParam(s)],o.rest=null,o.this=null,o.returnType=this.flowParseType(),o.typeParameters=null,this.finishNode(o,"FunctionTypeAnnotation")}return s}flowParseIntersectionType(){const s=this.startNode();this.eat(45);const o=this.flowParseAnonFunctionWithoutParens();for(s.types=[o];this.eat(45);)s.types.push(this.flowParseAnonFunctionWithoutParens());return s.types.length===1?o:this.finishNode(s,"IntersectionTypeAnnotation")}flowParseUnionType(){const s=this.startNode();this.eat(43);const o=this.flowParseIntersectionType();for(s.types=[o];this.eat(43);)s.types.push(this.flowParseIntersectionType());return s.types.length===1?o:this.finishNode(s,"UnionTypeAnnotation")}flowParseType(){const s=this.state.inType;this.state.inType=!0;const o=this.flowParseUnionType();return this.state.inType=s,o}flowParseTypeOrImplicitInstantiation(){if(this.state.type===132&&this.state.value==="_"){const s=this.state.startLoc,o=this.parseIdentifier();return this.flowParseGenericType(s,o)}else return this.flowParseType()}flowParseTypeAnnotation(){const s=this.startNode();return s.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(s,"TypeAnnotation")}flowParseTypeAnnotatableIdentifier(s){const o=s?this.parseIdentifier():this.flowParseRestrictedIdentifier();return this.match(14)&&(o.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(o)),o}typeCastToParameter(s){return s.expression.typeAnnotation=s.typeAnnotation,this.resetEndLocation(s.expression,s.typeAnnotation.loc.end),s.expression}flowParseVariance(){let s=null;return this.match(53)?(s=this.startNode(),this.state.value==="+"?s.kind="plus":s.kind="minus",this.next(),this.finishNode(s,"Variance")):s}parseFunctionBody(s,o,h=!1){if(o){this.forwardNoArrowParamsConversionAt(s,()=>super.parseFunctionBody(s,!0,h));return}super.parseFunctionBody(s,!1,h)}parseFunctionBodyAndFinish(s,o,h=!1){if(this.match(14)){const S=this.startNode();[S.typeAnnotation,s.predicate]=this.flowParseTypeAndPredicateInitialiser(),s.returnType=S.typeAnnotation?this.finishNode(S,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(s,o,h)}parseStatementLike(s){if(this.state.strict&&this.isContextual(129)){const h=this.lookahead();if(ce(h.type)){const S=this.startNode();return this.next(),this.flowParseInterface(S)}}else if(this.isContextual(126)){const h=this.startNode();return this.next(),this.flowParseEnumDeclaration(h)}const o=super.parseStatementLike(s);return this.flowPragma===void 0&&!this.isValidDirective(o)&&(this.flowPragma=null),o}parseExpressionStatement(s,o,h){if(o.type==="Identifier"){if(o.name==="declare"){if(this.match(80)||Y(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(s)}else if(Y(this.state.type)){if(o.name==="interface")return this.flowParseInterface(s);if(o.name==="type")return this.flowParseTypeAlias(s);if(o.name==="opaque")return this.flowParseOpaqueType(s,!1)}}return super.parseExpressionStatement(s,o,h)}shouldParseExportDeclaration(){const{type:s}=this.state;return s===126||dt(s)?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){const{type:s}=this.state;return s===126||dt(s)?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.isContextual(126)){const s=this.startNode();return this.next(),this.flowParseEnumDeclaration(s)}return super.parseExportDefaultExpression()}parseConditional(s,o,h){if(!this.match(17))return s;if(this.state.maybeInArrowParameters){const J=this.lookaheadCharCode();if(J===44||J===61||J===58||J===41)return this.setOptionalParametersError(h),s}this.expect(17);const S=this.state.clone(),P=this.state.noArrowAt,C=this.startNodeAt(o);let{consequent:R,failed:F}=this.tryParseConditionalConsequent(),[$,q]=this.getArrowLikeExpressions(R);if(F||q.length>0){const J=[...P];if(q.length>0){this.state=S,this.state.noArrowAt=J;for(let ee=0;ee<q.length;ee++)J.push(q[ee].start);({consequent:R,failed:F}=this.tryParseConditionalConsequent()),[$,q]=this.getArrowLikeExpressions(R)}F&&$.length>1&&this.raise(pe.AmbiguousConditionalArrow,S.startLoc),F&&$.length===1&&(this.state=S,J.push($[0].start),this.state.noArrowAt=J,{consequent:R,failed:F}=this.tryParseConditionalConsequent())}return this.getArrowLikeExpressions(R,!0),this.state.noArrowAt=P,this.expect(14),C.test=s,C.consequent=R,C.alternate=this.forwardNoArrowParamsConversionAt(C,()=>this.parseMaybeAssign(void 0,void 0)),this.finishNode(C,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);const s=this.parseMaybeAssignAllowIn(),o=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:s,failed:o}}getArrowLikeExpressions(s,o){const h=[s],S=[];for(;h.length!==0;){const P=h.pop();P.type==="ArrowFunctionExpression"&&P.body.type!=="BlockStatement"?(P.typeParameters||!P.returnType?this.finishArrowValidation(P):S.push(P),h.push(P.body)):P.type==="ConditionalExpression"&&(h.push(P.consequent),h.push(P.alternate))}return o?(S.forEach(P=>this.finishArrowValidation(P)),[S,[]]):cv(S,P=>P.params.every(C=>this.isAssignable(C,!0)))}finishArrowValidation(s){var o;this.toAssignableList(s.params,(o=s.extra)==null?void 0:o.trailingCommaLoc,!1),this.scope.enter(6),super.checkParams(s,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(s,o){let h;return this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(s.start))?(this.state.noArrowParamsConversionAt.push(this.state.start),h=o(),this.state.noArrowParamsConversionAt.pop()):h=o(),h}parseParenItem(s,o){const h=super.parseParenItem(s,o);if(this.eat(17)&&(h.optional=!0,this.resetEndLocation(s)),this.match(14)){const S=this.startNodeAt(o);return S.expression=h,S.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(S,"TypeCastExpression")}return h}assertModuleNodeAllowed(s){s.type==="ImportDeclaration"&&(s.importKind==="type"||s.importKind==="typeof")||s.type==="ExportNamedDeclaration"&&s.exportKind==="type"||s.type==="ExportAllDeclaration"&&s.exportKind==="type"||super.assertModuleNodeAllowed(s)}parseExportDeclaration(s){if(this.isContextual(130)){s.exportKind="type";const o=this.startNode();return this.next(),this.match(5)?(s.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(s),null):this.flowParseTypeAlias(o)}else if(this.isContextual(131)){s.exportKind="type";const o=this.startNode();return this.next(),this.flowParseOpaqueType(o,!1)}else if(this.isContextual(129)){s.exportKind="type";const o=this.startNode();return this.next(),this.flowParseInterface(o)}else if(this.isContextual(126)){s.exportKind="value";const o=this.startNode();return this.next(),this.flowParseEnumDeclaration(o)}else return super.parseExportDeclaration(s)}eatExportStar(s){return super.eatExportStar(s)?!0:this.isContextual(130)&&this.lookahead().type===55?(s.exportKind="type",this.next(),this.next(),!0):!1}maybeParseExportNamespaceSpecifier(s){const{startLoc:o}=this.state,h=super.maybeParseExportNamespaceSpecifier(s);return h&&s.exportKind==="type"&&this.unexpected(o),h}parseClassId(s,o,h){super.parseClassId(s,o,h),this.match(47)&&(s.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(s,o,h){const{startLoc:S}=this.state;if(this.isContextual(125)){if(super.parseClassMemberFromModifier(s,o))return;o.declare=!0}super.parseClassMember(s,o,h),o.declare&&(o.type!=="ClassProperty"&&o.type!=="ClassPrivateProperty"&&o.type!=="PropertyDefinition"?this.raise(pe.DeclareClassElement,S):o.value&&this.raise(pe.DeclareClassFieldInitializer,o.value))}isIterator(s){return s==="iterator"||s==="asyncIterator"}readIterator(){const s=super.readWord1(),o="@@"+s;(!this.isIterator(s)||!this.state.inType)&&this.raise(E.InvalidIdentifier,this.state.curPosition(),{identifierName:o}),this.finishToken(132,o)}getTokenFromCode(s){const o=this.input.charCodeAt(this.state.pos+1);s===123&&o===124?this.finishOp(6,2):this.state.inType&&(s===62||s===60)?this.finishOp(s===62?48:47,1):this.state.inType&&s===63?o===46?this.finishOp(18,2):this.finishOp(17,1):tv(s,o,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(s)}isAssignable(s,o){return s.type==="TypeCastExpression"?this.isAssignable(s.expression,o):super.isAssignable(s,o)}toAssignable(s,o=!1){!o&&s.type==="AssignmentExpression"&&s.left.type==="TypeCastExpression"&&(s.left=this.typeCastToParameter(s.left)),super.toAssignable(s,o)}toAssignableList(s,o,h){for(let S=0;S<s.length;S++){const P=s[S];P?.type==="TypeCastExpression"&&(s[S]=this.typeCastToParameter(P))}super.toAssignableList(s,o,h)}toReferencedList(s,o){for(let S=0;S<s.length;S++){var h;const P=s[S];P&&P.type==="TypeCastExpression"&&!((h=P.extra)!=null&&h.parenthesized)&&(s.length>1||!o)&&this.raise(pe.TypeCastInPattern,P.typeAnnotation)}return s}parseArrayLike(s,o,h,S){const P=super.parseArrayLike(s,o,h,S);return o&&!this.state.maybeInArrowParameters&&this.toReferencedList(P.elements),P}isValidLVal(s,o,h){return s==="TypeCastExpression"||super.isValidLVal(s,o,h)}parseClassProperty(s){return this.match(14)&&(s.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(s)}parseClassPrivateProperty(s){return this.match(14)&&(s.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(s)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(s){return!this.match(14)&&super.isNonstaticConstructor(s)}pushClassMethod(s,o,h,S,P,C){if(o.variance&&this.unexpected(o.variance.loc.start),delete o.variance,this.match(47)&&(o.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(s,o,h,S,P,C),o.params&&P){const R=o.params;R.length>0&&this.isThisParam(R[0])&&this.raise(pe.ThisParamBannedInConstructor,o)}else if(o.type==="MethodDefinition"&&P&&o.value.params){const R=o.value.params;R.length>0&&this.isThisParam(R[0])&&this.raise(pe.ThisParamBannedInConstructor,o)}}pushClassPrivateMethod(s,o,h,S){o.variance&&this.unexpected(o.variance.loc.start),delete o.variance,this.match(47)&&(o.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(s,o,h,S)}parseClassSuper(s){if(super.parseClassSuper(s),s.superClass&&(this.match(47)||this.match(51))&&(s.superTypeParameters=this.flowParseTypeParameterInstantiationInExpression()),this.isContextual(113)){this.next();const o=s.implements=[];do{const h=this.startNode();h.id=this.flowParseRestrictedIdentifier(!0),this.match(47)?h.typeParameters=this.flowParseTypeParameterInstantiation():h.typeParameters=null,o.push(this.finishNode(h,"ClassImplements"))}while(this.eat(12))}}checkGetterSetterParams(s){super.checkGetterSetterParams(s);const o=this.getObjectOrClassMethodParams(s);if(o.length>0){const h=o[0];this.isThisParam(h)&&s.kind==="get"?this.raise(pe.GetterMayNotHaveThisParam,h):this.isThisParam(h)&&this.raise(pe.SetterMayNotHaveThisParam,h)}}parsePropertyNamePrefixOperator(s){s.variance=this.flowParseVariance()}parseObjPropValue(s,o,h,S,P,C,R){s.variance&&this.unexpected(s.variance.loc.start),delete s.variance;let F;this.match(47)&&!C&&(F=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());const $=super.parseObjPropValue(s,o,h,S,P,C,R);return F&&(($.value||$).typeParameters=F),$}parseFunctionParamType(s){return this.eat(17)&&(s.type!=="Identifier"&&this.raise(pe.PatternIsOptional,s),this.isThisParam(s)&&this.raise(pe.ThisParamMayNotBeOptional,s),s.optional=!0),this.match(14)?s.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(s)&&this.raise(pe.ThisParamAnnotationRequired,s),this.match(29)&&this.isThisParam(s)&&this.raise(pe.ThisParamNoDefault,s),this.resetEndLocation(s),s}parseMaybeDefault(s,o){const h=super.parseMaybeDefault(s,o);return h.type==="AssignmentPattern"&&h.typeAnnotation&&h.right.start<h.typeAnnotation.start&&this.raise(pe.TypeBeforeInitializer,h.typeAnnotation),h}checkImportReflection(s){super.checkImportReflection(s),s.module&&s.importKind!=="value"&&this.raise(pe.ImportReflectionHasImportType,s.specifiers[0].loc.start)}parseImportSpecifierLocal(s,o,h){o.local=mu(s)?this.flowParseRestrictedIdentifier(!0,!0):this.parseIdentifier(),s.specifiers.push(this.finishImportSpecifier(o,h))}isPotentialImportPhase(s){if(super.isPotentialImportPhase(s))return!0;if(this.isContextual(130)){if(!s)return!0;const o=this.lookaheadCharCode();return o===123||o===42}return!s&&this.isContextual(87)}applyImportPhase(s,o,h,S){if(super.applyImportPhase(s,o,h,S),o){if(!h&&this.match(65))return;s.exportKind=h==="type"?h:"value"}else h==="type"&&this.match(55)&&this.unexpected(),s.importKind=h==="type"||h==="typeof"?h:"value"}parseImportSpecifier(s,o,h,S,P){const C=s.imported;let R=null;C.type==="Identifier"&&(C.name==="type"?R="type":C.name==="typeof"&&(R="typeof"));let F=!1;if(this.isContextual(93)&&!this.isLookaheadContextual("as")){const q=this.parseIdentifier(!0);R!==null&&!ce(this.state.type)?(s.imported=q,s.importKind=R,s.local=this.cloneIdentifier(q)):(s.imported=C,s.importKind=null,s.local=this.parseIdentifier())}else{if(R!==null&&ce(this.state.type))s.imported=this.parseIdentifier(!0),s.importKind=R;else{if(o)throw this.raise(E.ImportBindingIsString,s,{importName:C.value});s.imported=C,s.importKind=null}this.eatContextual(93)?s.local=this.parseIdentifier():(F=!0,s.local=this.cloneIdentifier(s.imported))}const $=mu(s);return h&&$&&this.raise(pe.ImportTypeShorthandOnlyInPureImport,s),(h||$)&&this.checkReservedType(s.local.name,s.local.loc.start,!0),F&&!h&&!$&&this.checkReservedWord(s.local.name,s.loc.start,!0,!0),this.finishImportSpecifier(s,"ImportSpecifier")}parseBindingAtom(){switch(this.state.type){case 78:return this.parseIdentifier(!0);default:return super.parseBindingAtom()}}parseFunctionParams(s,o){const h=s.kind;h!=="get"&&h!=="set"&&this.match(47)&&(s.typeParameters=this.flowParseTypeParameterDeclaration()),super.parseFunctionParams(s,o)}parseVarId(s,o){super.parseVarId(s,o),this.match(14)&&(s.id.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(s.id))}parseAsyncArrowFromCallExpression(s,o){if(this.match(14)){const h=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,s.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=h}return super.parseAsyncArrowFromCallExpression(s,o)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}parseMaybeAssign(s,o){var h;let S=null,P;if(this.hasPlugin("jsx")&&(this.match(143)||this.match(47))){if(S=this.state.clone(),P=this.tryParse(()=>super.parseMaybeAssign(s,o),S),!P.error)return P.node;const{context:F}=this.state,$=F[F.length-1];($===I.j_oTag||$===I.j_expr)&&F.pop()}if((h=P)!=null&&h.error||this.match(47)){var C,R;S=S||this.state.clone();let F;const $=this.tryParse(J=>{var ee;F=this.flowParseTypeParameterDeclaration();const oe=this.forwardNoArrowParamsConversionAt(F,()=>{const Me=super.parseMaybeAssign(s,o);return this.resetStartLocationFromNode(Me,F),Me});(ee=oe.extra)!=null&&ee.parenthesized&&J();const me=this.maybeUnwrapTypeCastExpression(oe);return me.type!=="ArrowFunctionExpression"&&J(),me.typeParameters=F,this.resetStartLocationFromNode(me,F),oe},S);let q=null;if($.node&&this.maybeUnwrapTypeCastExpression($.node).type==="ArrowFunctionExpression"){if(!$.error&&!$.aborted)return $.node.async&&this.raise(pe.UnexpectedTypeParameterBeforeAsyncArrowFunction,F),$.node;q=$.node}if((C=P)!=null&&C.node)return this.state=P.failState,P.node;if(q)return this.state=$.failState,q;throw(R=P)!=null&&R.thrown?P.error:$.thrown?$.error:this.raise(pe.UnexpectedTokenAfterTypeParameter,F)}return super.parseMaybeAssign(s,o)}parseArrow(s){if(this.match(14)){const o=this.tryParse(()=>{const h=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;const S=this.startNode();return[S.typeAnnotation,s.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=h,this.canInsertSemicolon()&&this.unexpected(),this.match(19)||this.unexpected(),S});if(o.thrown)return null;o.error&&(this.state=o.failState),s.returnType=o.node.typeAnnotation?this.finishNode(o.node,"TypeAnnotation"):null}return super.parseArrow(s)}shouldParseArrow(s){return this.match(14)||super.shouldParseArrow(s)}setArrowFunctionParameters(s,o){this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(s.start))?s.params=o:super.setArrowFunctionParameters(s,o)}checkParams(s,o,h,S=!0){if(!(h&&this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(s.start)))){for(let P=0;P<s.params.length;P++)this.isThisParam(s.params[P])&&P>0&&this.raise(pe.ThisParamMustBeFirst,s.params[P]);super.checkParams(s,o,h,S)}}parseParenAndDistinguishExpression(s){return super.parseParenAndDistinguishExpression(s&&!this.state.noArrowAt.includes(this.sourceToOffsetPos(this.state.start)))}parseSubscripts(s,o,h){if(s.type==="Identifier"&&s.name==="async"&&this.state.noArrowAt.includes(o.index)){this.next();const S=this.startNodeAt(o);S.callee=s,S.arguments=super.parseCallExpressionArguments(11),s=this.finishNode(S,"CallExpression")}else if(s.type==="Identifier"&&s.name==="async"&&this.match(47)){const S=this.state.clone(),P=this.tryParse(R=>this.parseAsyncArrowWithTypeParameters(o)||R(),S);if(!P.error&&!P.aborted)return P.node;const C=this.tryParse(()=>super.parseSubscripts(s,o,h),S);if(C.node&&!C.error)return C.node;if(P.node)return this.state=P.failState,P.node;if(C.node)return this.state=C.failState,C.node;throw P.error||C.error}return super.parseSubscripts(s,o,h)}parseSubscript(s,o,h,S){if(this.match(18)&&this.isLookaheadToken_lt()){if(S.optionalChainMember=!0,h)return S.stop=!0,s;this.next();const P=this.startNodeAt(o);return P.callee=s,P.typeArguments=this.flowParseTypeParameterInstantiationInExpression(),this.expect(10),P.arguments=this.parseCallExpressionArguments(11),P.optional=!0,this.finishCallExpression(P,!0)}else if(!h&&this.shouldParseTypes()&&(this.match(47)||this.match(51))){const P=this.startNodeAt(o);P.callee=s;const C=this.tryParse(()=>(P.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),P.arguments=super.parseCallExpressionArguments(11),S.optionalChainMember&&(P.optional=!1),this.finishCallExpression(P,S.optionalChainMember)));if(C.node)return C.error&&(this.state=C.failState),C.node}return super.parseSubscript(s,o,h,S)}parseNewCallee(s){super.parseNewCallee(s);let o=null;this.shouldParseTypes()&&this.match(47)&&(o=this.tryParse(()=>this.flowParseTypeParameterInstantiationCallOrNew()).node),s.typeArguments=o}parseAsyncArrowWithTypeParameters(s){const o=this.startNodeAt(s);if(this.parseFunctionParams(o,!1),!!this.parseArrow(o))return super.parseArrowExpression(o,void 0,!0)}readToken_mult_modulo(s){const o=this.input.charCodeAt(this.state.pos+1);if(s===42&&o===47&&this.state.hasFlowComment){this.state.hasFlowComment=!1,this.state.pos+=2,this.nextToken();return}super.readToken_mult_modulo(s)}readToken_pipe_amp(s){const o=this.input.charCodeAt(this.state.pos+1);if(s===124&&o===125){this.finishOp(9,2);return}super.readToken_pipe_amp(s)}parseTopLevel(s,o){const h=super.parseTopLevel(s,o);return this.state.hasFlowComment&&this.raise(pe.UnterminatedFlowComment,this.state.curPosition()),h}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(pe.NestedFlowComment,this.state.startLoc);this.hasFlowCommentCompletion();const s=this.skipFlowComment();s&&(this.state.pos+=s,this.state.hasFlowComment=!0);return}return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/")}skipFlowComment(){const{pos:s}=this.state;let o=2;for(;[32,9].includes(this.input.charCodeAt(s+o));)o++;const h=this.input.charCodeAt(o+s),S=this.input.charCodeAt(o+s+1);return h===58&&S===58?o+2:this.input.slice(o+s,o+s+12)==="flow-include"?o+12:h===58&&S!==58?o:!1}hasFlowCommentCompletion(){if(this.input.indexOf("*/",this.state.pos)===-1)throw this.raise(E.UnterminatedComment,this.state.curPosition())}flowEnumErrorBooleanMemberNotInitialized(s,{enumName:o,memberName:h}){this.raise(pe.EnumBooleanMemberNotInitialized,s,{memberName:h,enumName:o})}flowEnumErrorInvalidMemberInitializer(s,o){return this.raise(o.explicitType?o.explicitType==="symbol"?pe.EnumInvalidMemberInitializerSymbolType:pe.EnumInvalidMemberInitializerPrimaryType:pe.EnumInvalidMemberInitializerUnknownType,s,o)}flowEnumErrorNumberMemberNotInitialized(s,o){this.raise(pe.EnumNumberMemberNotInitialized,s,o)}flowEnumErrorStringMemberInconsistentlyInitialized(s,o){this.raise(pe.EnumStringMemberInconsistentlyInitialized,s,o)}flowEnumMemberInit(){const s=this.state.startLoc,o=()=>this.match(12)||this.match(8);switch(this.state.type){case 135:{const h=this.parseNumericLiteral(this.state.value);return o()?{type:"number",loc:h.loc.start,value:h}:{type:"invalid",loc:s}}case 134:{const h=this.parseStringLiteral(this.state.value);return o()?{type:"string",loc:h.loc.start,value:h}:{type:"invalid",loc:s}}case 85:case 86:{const h=this.parseBooleanLiteral(this.match(85));return o()?{type:"boolean",loc:h.loc.start,value:h}:{type:"invalid",loc:s}}default:return{type:"invalid",loc:s}}}flowEnumMemberRaw(){const s=this.state.startLoc,o=this.parseIdentifier(!0),h=this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:s};return{id:o,init:h}}flowEnumCheckExplicitTypeMismatch(s,o,h){const{explicitType:S}=o;S!==null&&S!==h&&this.flowEnumErrorInvalidMemberInitializer(s,o)}flowEnumMembers({enumName:s,explicitType:o}){const h=new Set,S={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]};let P=!1;for(;!this.match(8);){if(this.eat(21)){P=!0;break}const C=this.startNode(),{id:R,init:F}=this.flowEnumMemberRaw(),$=R.name;if($==="")continue;/^[a-z]/.test($)&&this.raise(pe.EnumInvalidMemberName,R,{memberName:$,suggestion:$[0].toUpperCase()+$.slice(1),enumName:s}),h.has($)&&this.raise(pe.EnumDuplicateMemberName,R,{memberName:$,enumName:s}),h.add($);const q={enumName:s,explicitType:o,memberName:$};switch(C.id=R,F.type){case"boolean":{this.flowEnumCheckExplicitTypeMismatch(F.loc,q,"boolean"),C.init=F.value,S.booleanMembers.push(this.finishNode(C,"EnumBooleanMember"));break}case"number":{this.flowEnumCheckExplicitTypeMismatch(F.loc,q,"number"),C.init=F.value,S.numberMembers.push(this.finishNode(C,"EnumNumberMember"));break}case"string":{this.flowEnumCheckExplicitTypeMismatch(F.loc,q,"string"),C.init=F.value,S.stringMembers.push(this.finishNode(C,"EnumStringMember"));break}case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(F.loc,q);case"none":switch(o){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(F.loc,q);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(F.loc,q);break;default:S.defaultedMembers.push(this.finishNode(C,"EnumDefaultedMember"))}}this.match(8)||this.expect(12)}return{members:S,hasUnknownMembers:P}}flowEnumStringMembers(s,o,{enumName:h}){if(s.length===0)return o;if(o.length===0)return s;if(o.length>s.length){for(const S of s)this.flowEnumErrorStringMemberInconsistentlyInitialized(S,{enumName:h});return o}else{for(const S of o)this.flowEnumErrorStringMemberInconsistentlyInitialized(S,{enumName:h});return s}}flowEnumParseExplicitType({enumName:s}){if(!this.eatContextual(102))return null;if(!Y(this.state.type))throw this.raise(pe.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName:s});const{value:o}=this.state;return this.next(),o!=="boolean"&&o!=="number"&&o!=="string"&&o!=="symbol"&&this.raise(pe.EnumInvalidExplicitType,this.state.startLoc,{enumName:s,invalidEnumType:o}),o}flowEnumBody(s,o){const h=o.name,S=o.loc.start,P=this.flowEnumParseExplicitType({enumName:h});this.expect(5);const{members:C,hasUnknownMembers:R}=this.flowEnumMembers({enumName:h,explicitType:P});switch(s.hasUnknownMembers=R,P){case"boolean":return s.explicitType=!0,s.members=C.booleanMembers,this.expect(8),this.finishNode(s,"EnumBooleanBody");case"number":return s.explicitType=!0,s.members=C.numberMembers,this.expect(8),this.finishNode(s,"EnumNumberBody");case"string":return s.explicitType=!0,s.members=this.flowEnumStringMembers(C.stringMembers,C.defaultedMembers,{enumName:h}),this.expect(8),this.finishNode(s,"EnumStringBody");case"symbol":return s.members=C.defaultedMembers,this.expect(8),this.finishNode(s,"EnumSymbolBody");default:{const F=()=>(s.members=[],this.expect(8),this.finishNode(s,"EnumStringBody"));s.explicitType=!1;const $=C.booleanMembers.length,q=C.numberMembers.length,J=C.stringMembers.length,ee=C.defaultedMembers.length;if(!$&&!q&&!J&&!ee)return F();if(!$&&!q)return s.members=this.flowEnumStringMembers(C.stringMembers,C.defaultedMembers,{enumName:h}),this.expect(8),this.finishNode(s,"EnumStringBody");if(!q&&!J&&$>=ee){for(const oe of C.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(oe.loc.start,{enumName:h,memberName:oe.id.name});return s.members=C.booleanMembers,this.expect(8),this.finishNode(s,"EnumBooleanBody")}else if(!$&&!J&&q>=ee){for(const oe of C.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(oe.loc.start,{enumName:h,memberName:oe.id.name});return s.members=C.numberMembers,this.expect(8),this.finishNode(s,"EnumNumberBody")}else return this.raise(pe.EnumInconsistentMemberValues,S,{enumName:h}),F()}}}flowParseEnumDeclaration(s){const o=this.parseIdentifier();return s.id=o,s.body=this.flowEnumBody(this.startNode(),o),this.finishNode(s,"EnumDeclaration")}jsxParseOpeningElementAfterName(s){return this.shouldParseTypes()&&(this.match(47)||this.match(51))&&(s.typeArguments=this.flowParseTypeParameterInstantiationInExpression()),super.jsxParseOpeningElementAfterName(s)}isLookaheadToken_lt(){const s=this.nextTokenStart();if(this.input.charCodeAt(s)===60){const o=this.input.charCodeAt(s+1);return o!==60&&o!==61}return!1}reScan_lt_gt(){const{type:s}=this.state;s===47?(this.state.pos-=1,this.readToken_lt()):s===48&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){const{type:s}=this.state;return s===51?(this.state.pos-=2,this.finishOp(47,1),47):s}maybeUnwrapTypeCastExpression(s){return s.type==="TypeCastExpression"?s.expression:s}};const pv={__proto__:null,quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"},fv=/\r\n|[\r\n\u2028\u2029]/,ui=new RegExp(fv.source,"g");function zr(b){switch(b){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}function yu(b,a,s){for(let o=a;o<s;o++)if(zr(b.charCodeAt(o)))return!0;return!1}const La=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,Ma=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g;function dv(b){switch(b){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}}const yr=T`jsx`({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:({openingTagName:b})=>`Expected corresponding JSX closing tag for <${b}>.`,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:b,HTMLEntity:a})=>`Unexpected token \`${b}\`. Did you mean \`${a}\` or \`{'${b}'}\`?`,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 Zt(b){return b?b.type==="JSXOpeningFragment"||b.type==="JSXClosingFragment":!1}function Wr(b){if(b.type==="JSXIdentifier")return b.name;if(b.type==="JSXNamespacedName")return b.namespace.name+":"+b.name.name;if(b.type==="JSXMemberExpression")return Wr(b.object)+"."+Wr(b.property);throw new Error("Node had unexpected type: "+b.type)}var mv=b=>class extends b{jsxReadToken(){let s="",o=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(yr.UnterminatedJsxContent,this.state.startLoc);const h=this.input.charCodeAt(this.state.pos);switch(h){case 60:case 123:if(this.state.pos===this.state.start){h===60&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(143)):super.getTokenFromCode(h);return}s+=this.input.slice(o,this.state.pos),this.finishToken(142,s);return;case 38:s+=this.input.slice(o,this.state.pos),s+=this.jsxReadEntity(),o=this.state.pos;break;case 62:case 125:default:zr(h)?(s+=this.input.slice(o,this.state.pos),s+=this.jsxReadNewLine(!0),o=this.state.pos):++this.state.pos}}}jsxReadNewLine(s){const o=this.input.charCodeAt(this.state.pos);let h;return++this.state.pos,o===13&&this.input.charCodeAt(this.state.pos)===10?(++this.state.pos,h=s?`
|
|
11
11
|
`:`\r
|
|
12
|
-
`):h=String.fromCharCode(o),++this.state.curLine,this.state.lineStart=this.state.pos,h}jsxReadString(s){let o="",h=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(E.UnterminatedString,this.state.startLoc);const S=this.input.charCodeAt(this.state.pos);if(S===s)break;S===38?(o+=this.input.slice(h,this.state.pos),o+=this.jsxReadEntity(),h=this.state.pos):zr(S)?(o+=this.input.slice(h,this.state.pos),o+=this.jsxReadNewLine(!1),h=this.state.pos):++this.state.pos}o+=this.input.slice(h,this.state.pos++),this.finishToken(134,o)}jsxReadEntity(){const s=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let o=10;this.codePointAtPos(this.state.pos)===120&&(o=16,++this.state.pos);const h=this.readInt(o,void 0,!1,"bail");if(h!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(h)}else{let o=0,h=!1;for(;o++<10&&this.state.pos<this.length&&!(h=this.codePointAtPos(this.state.pos)===59);)++this.state.pos;if(h){const S=this.input.slice(s,this.state.pos),P=pv[S];if(++this.state.pos,P)return P}}return this.state.pos=s,"&"}jsxReadWord(){let s;const o=this.state.pos;do s=this.input.charCodeAt(++this.state.pos);while(Vr(s)||s===45);this.finishToken(141,this.input.slice(o,this.state.pos))}jsxParseIdentifier(){const s=this.startNode();return this.match(141)?s.name=this.state.value:Be(this.state.type)?s.name=nt(this.state.type):this.unexpected(),this.next(),this.finishNode(s,"JSXIdentifier")}jsxParseNamespacedName(){const s=this.state.startLoc,o=this.jsxParseIdentifier();if(!this.eat(14))return o;const h=this.startNodeAt(s);return h.namespace=o,h.name=this.jsxParseIdentifier(),this.finishNode(h,"JSXNamespacedName")}jsxParseElementName(){const s=this.state.startLoc;let o=this.jsxParseNamespacedName();if(o.type==="JSXNamespacedName")return o;for(;this.eat(16);){const h=this.startNodeAt(s);h.object=o,h.property=this.jsxParseIdentifier(),o=this.finishNode(h,"JSXMemberExpression")}return o}jsxParseAttributeValue(){let s;switch(this.state.type){case 5:return s=this.startNode(),this.setContext(I.brace),this.next(),s=this.jsxParseExpressionContainer(s,I.j_oTag),s.expression.type==="JSXEmptyExpression"&&this.raise(yr.AttributeIsEmpty,s),s;case 143:case 134:return this.parseExprAtom();default:throw this.raise(yr.UnsupportedJsxValue,this.state.startLoc)}}jsxParseEmptyExpression(){const s=this.startNodeAt(this.state.lastTokEndLoc);return this.finishNodeAt(s,"JSXEmptyExpression",this.state.startLoc)}jsxParseSpreadChild(s){return this.next(),s.expression=this.parseExpression(),this.setContext(I.j_expr),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(s,"JSXSpreadChild")}jsxParseExpressionContainer(s,o){if(this.match(8))s.expression=this.jsxParseEmptyExpression();else{const h=this.parseExpression();s.expression=h}return this.setContext(o),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(s,"JSXExpressionContainer")}jsxParseAttribute(){const s=this.startNode();return this.match(5)?(this.setContext(I.brace),this.next(),this.expect(21),s.argument=this.parseMaybeAssignAllowIn(),this.setContext(I.j_oTag),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(s,"JSXSpreadAttribute")):(s.name=this.jsxParseNamespacedName(),s.value=this.eat(29)?this.jsxParseAttributeValue():null,this.finishNode(s,"JSXAttribute"))}jsxParseOpeningElementAt(s){const o=this.startNodeAt(s);return this.eat(144)?this.finishNode(o,"JSXOpeningFragment"):(o.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(o))}jsxParseOpeningElementAfterName(s){const o=[];for(;!this.match(56)&&!this.match(144);)o.push(this.jsxParseAttribute());return s.attributes=o,s.selfClosing=this.eat(56),this.expect(144),this.finishNode(s,"JSXOpeningElement")}jsxParseClosingElementAt(s){const o=this.startNodeAt(s);return this.eat(144)?this.finishNode(o,"JSXClosingFragment"):(o.name=this.jsxParseElementName(),this.expect(144),this.finishNode(o,"JSXClosingElement"))}jsxParseElementAt(s){const o=this.startNodeAt(s),h=[],S=this.jsxParseOpeningElementAt(s);let P=null;if(!S.selfClosing){e:for(;;)switch(this.state.type){case 143:if(s=this.state.startLoc,this.next(),this.eat(56)){P=this.jsxParseClosingElementAt(s);break e}h.push(this.jsxParseElementAt(s));break;case 142:h.push(this.parseLiteral(this.state.value,"JSXText"));break;case 5:{const C=this.startNode();this.setContext(I.brace),this.next(),this.match(21)?h.push(this.jsxParseSpreadChild(C)):h.push(this.jsxParseExpressionContainer(C,I.j_expr));break}default:this.unexpected()}Zt(S)&&!Zt(P)&&P!==null?this.raise(yr.MissingClosingTagFragment,P):!Zt(S)&&Zt(P)?this.raise(yr.MissingClosingTagElement,P,{openingTagName:Wr(S.name)}):!Zt(S)&&!Zt(P)&&Wr(P.name)!==Wr(S.name)&&this.raise(yr.MissingClosingTagElement,P,{openingTagName:Wr(S.name)})}if(Zt(S)?(o.openingFragment=S,o.closingFragment=P):(o.openingElement=S,o.closingElement=P),o.children=h,this.match(47))throw this.raise(yr.UnwrappedAdjacentJSXElements,this.state.startLoc);return Zt(S)?this.finishNode(o,"JSXFragment"):this.finishNode(o,"JSXElement")}jsxParseElement(){const s=this.state.startLoc;return this.next(),this.jsxParseElementAt(s)}setContext(s){const{context:o}=this.state;o[o.length-1]=s}parseExprAtom(s){return this.match(143)?this.jsxParseElement():this.match(47)&&this.input.charCodeAt(this.state.pos)!==33?(this.replaceToken(143),this.jsxParseElement()):super.parseExprAtom(s)}skipSpace(){this.curContext().preserveSpace||super.skipSpace()}getTokenFromCode(s){const o=this.curContext();if(o===I.j_expr){this.jsxReadToken();return}if(o===I.j_oTag||o===I.j_cTag){if(jt(s)){this.jsxReadWord();return}if(s===62){++this.state.pos,this.finishToken(144);return}if((s===34||s===39)&&o===I.j_oTag){this.jsxReadString(s);return}}if(s===60&&this.state.canStartJSXElement&&this.input.charCodeAt(this.state.pos+1)!==33){++this.state.pos,this.finishToken(143);return}super.getTokenFromCode(s)}updateContext(s){const{context:o,type:h}=this.state;if(h===56&&s===143)o.splice(-2,2,I.j_cTag),this.state.canStartJSXElement=!1;else if(h===143)o.push(I.j_oTag);else if(h===144){const S=o[o.length-1];S===I.j_oTag&&s===56||S===I.j_cTag?(o.pop(),this.state.canStartJSXElement=o[o.length-1]===I.j_expr):(this.setContext(I.j_expr),this.state.canStartJSXElement=!0)}else this.state.canStartJSXElement=de(h)}};class yv extends Oa{constructor(...a){super(...a),this.tsNames=new Map}}class gv extends ka{constructor(...a){super(...a),this.importsStack=[]}createScope(a){return this.importsStack.push(new Set),new yv(a)}enter(a){a===512&&this.importsStack.push(new Set),super.enter(a)}exit(){const a=super.exit();return a===512&&this.importsStack.pop(),a}hasImport(a,s){const o=this.importsStack.length;if(this.importsStack[o-1].has(a))return!0;if(!s&&o>1){for(let h=0;h<o-1;h++)if(this.importsStack[h].has(a))return!0}return!1}declareName(a,s,o){if(s&4096){this.hasImport(a,!0)&&this.parser.raise(E.VarRedeclaration,o,{identifierName:a}),this.importsStack[this.importsStack.length-1].add(a);return}const h=this.currentScope();let S=h.tsNames.get(a)||0;if(s&1024){this.maybeExportDefined(h,a),h.tsNames.set(a,S|16);return}super.declareName(a,s,o),s&2&&(s&1||(this.checkRedeclarationInScope(h,a,s,o),this.maybeExportDefined(h,a)),S=S|1),s&256&&(S=S|2),s&512&&(S=S|4),s&128&&(S=S|8),S&&h.tsNames.set(a,S)}isRedeclaredInScope(a,s,o){const h=a.tsNames.get(s);if((h&2)>0){if(o&256){const S=!!(o&512),P=(h&4)>0;return S!==P}return!0}return o&128&&(h&8)>0?a.names.get(s)&2?!!(o&1):!1:o&2&&(h&1)>0?!0:super.isRedeclaredInScope(a,s,o)}checkLocalExport(a){const{name:s}=a;if(this.hasImport(s))return;const o=this.scopeStack.length;for(let h=o-1;h>=0;h--){const P=this.scopeStack[h].tsNames.get(s);if((P&1)>0||(P&16)>0)return}super.checkLocalExport(a)}}class vv{constructor(){this.stacks=[]}enter(a){this.stacks.push(a)}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 hi(b,a){return(b?2:0)|(a?1:0)}class Sv{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}sourceToOffsetPos(a){return a+this.startIndex}offsetToSourcePos(a){return a-this.startIndex}hasPlugin(a){if(typeof a=="string")return this.plugins.has(a);{const[s,o]=a;if(!this.hasPlugin(s))return!1;const h=this.plugins.get(s);for(const S of Object.keys(o))if((h==null?void 0:h[S])!==o[S])return!1;return!0}}getPluginOption(a,s){var o;return(o=this.plugins.get(a))==null?void 0:o[s]}}function gu(b,a){b.trailingComments===void 0?b.trailingComments=a:b.trailingComments.unshift(...a)}function Ev(b,a){b.leadingComments===void 0?b.leadingComments=a:b.leadingComments.unshift(...a)}function Es(b,a){b.innerComments===void 0?b.innerComments=a:b.innerComments.unshift(...a)}function er(b,a,s){let o=null,h=a.length;for(;o===null&&h>0;)o=a[--h];o===null||o.start>s.start?Es(b,s.comments):gu(o,s.comments)}class Tv extends Sv{addComment(a){this.filename&&(a.loc.filename=this.filename);const{commentsLen:s}=this.state;this.comments.length!==s&&(this.comments.length=s),this.comments.push(a),this.state.commentsLen++}processComment(a){const{commentStack:s}=this.state,o=s.length;if(o===0)return;let h=o-1;const S=s[h];S.start===a.end&&(S.leadingNode=a,h--);const{start:P}=a;for(;h>=0;h--){const C=s[h],R=C.end;if(R>P)C.containingNode=a,this.finalizeComment(C),s.splice(h,1);else{R===P&&(C.trailingNode=a);break}}}finalizeComment(a){var s;const{comments:o}=a;if(a.leadingNode!==null||a.trailingNode!==null)a.leadingNode!==null&&gu(a.leadingNode,o),a.trailingNode!==null&&Ev(a.trailingNode,o);else{const{containingNode:h,start:S}=a;if(this.input.charCodeAt(this.offsetToSourcePos(S)-1)===44)switch(h.type){case"ObjectExpression":case"ObjectPattern":case"RecordExpression":er(h,h.properties,a);break;case"CallExpression":case"OptionalCallExpression":er(h,h.arguments,a);break;case"ImportExpression":er(h,[h.source,(s=h.options)!=null?s:null],a);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":er(h,h.params,a);break;case"ArrayExpression":case"ArrayPattern":case"TupleExpression":er(h,h.elements,a);break;case"ExportNamedDeclaration":case"ImportDeclaration":er(h,h.specifiers,a);break;case"TSEnumDeclaration":er(h,h.members,a);break;case"TSEnumBody":er(h,h.members,a);break;default:Es(h,o)}else Es(h,o)}}finalizeRemainingComments(){const{commentStack:a}=this.state;for(let s=a.length-1;s>=0;s--)this.finalizeComment(a[s]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(a){const{commentStack:s}=this.state,{length:o}=s;if(o===0)return;const h=s[o-1];h.leadingNode===a&&(h.leadingNode=null)}takeSurroundingComments(a,s,o){const{commentStack:h}=this.state,S=h.length;if(S===0)return;let P=S-1;for(;P>=0;P--){const C=h[P],R=C.end;if(C.start===o)C.leadingNode=a;else if(R===s)C.trailingNode=a;else if(R<s)break}}}class Ra{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=[I.brace],this.firstInvalidTemplateEscapePos=null,this.strictErrors=new Map,this.tokensLength=0}get strict(){return(this.flags&1)>0}set strict(a){a?this.flags|=1:this.flags&=-2}init({strictMode:a,sourceType:s,startIndex:o,startLine:h,startColumn:S}){this.strict=a===!1?!1:a===!0?!0:s==="module",this.startIndex=o,this.curLine=h,this.lineStart=-S,this.startLoc=this.endLoc=new e(h,S,o)}get maybeInArrowParameters(){return(this.flags&2)>0}set maybeInArrowParameters(a){a?this.flags|=2:this.flags&=-3}get inType(){return(this.flags&4)>0}set inType(a){a?this.flags|=4:this.flags&=-5}get noAnonFunctionType(){return(this.flags&8)>0}set noAnonFunctionType(a){a?this.flags|=8:this.flags&=-9}get hasFlowComment(){return(this.flags&16)>0}set hasFlowComment(a){a?this.flags|=16:this.flags&=-17}get isAmbientContext(){return(this.flags&32)>0}set isAmbientContext(a){a?this.flags|=32:this.flags&=-33}get inAbstractClass(){return(this.flags&64)>0}set inAbstractClass(a){a?this.flags|=64:this.flags&=-65}get inDisallowConditionalTypesContext(){return(this.flags&128)>0}set inDisallowConditionalTypesContext(a){a?this.flags|=128:this.flags&=-129}get soloAwait(){return(this.flags&256)>0}set soloAwait(a){a?this.flags|=256:this.flags&=-257}get inFSharpPipelineDirectBody(){return(this.flags&512)>0}set inFSharpPipelineDirectBody(a){a?this.flags|=512:this.flags&=-513}get canStartJSXElement(){return(this.flags&1024)>0}set canStartJSXElement(a){a?this.flags|=1024:this.flags&=-1025}get containsEsc(){return(this.flags&2048)>0}set containsEsc(a){a?this.flags|=2048:this.flags&=-2049}get hasTopLevelAwait(){return(this.flags&4096)>0}set hasTopLevelAwait(a){a?this.flags|=4096:this.flags&=-4097}curPosition(){return new e(this.curLine,this.pos-this.lineStart,this.pos+this.startIndex)}clone(){const a=new Ra;return a.flags=this.flags,a.startIndex=this.startIndex,a.curLine=this.curLine,a.lineStart=this.lineStart,a.startLoc=this.startLoc,a.endLoc=this.endLoc,a.errors=this.errors.slice(),a.potentialArrowAt=this.potentialArrowAt,a.noArrowAt=this.noArrowAt.slice(),a.noArrowParamsConversionAt=this.noArrowParamsConversionAt.slice(),a.topicContext=this.topicContext,a.labels=this.labels.slice(),a.commentsLen=this.commentsLen,a.commentStack=this.commentStack.slice(),a.pos=this.pos,a.type=this.type,a.value=this.value,a.start=this.start,a.end=this.end,a.lastTokEndLoc=this.lastTokEndLoc,a.lastTokStartLoc=this.lastTokStartLoc,a.context=this.context.slice(),a.firstInvalidTemplateEscapePos=this.firstInvalidTemplateEscapePos,a.strictErrors=this.strictErrors,a.tokensLength=this.tokensLength,a}}var wv=function(a){return a>=48&&a<=57};const vu={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},pi={bin:b=>b===48||b===49,oct:b=>b>=48&&b<=55,dec:b=>b>=48&&b<=57,hex:b=>b>=48&&b<=57||b>=65&&b<=70||b>=97&&b<=102};function Su(b,a,s,o,h,S){const P=s,C=o,R=h;let F="",$=null,q=s;const{length:J}=a;for(;;){if(s>=J){S.unterminated(P,C,R),F+=a.slice(q,s);break}const ee=a.charCodeAt(s);if(bv(b,ee,a,s)){F+=a.slice(q,s);break}if(ee===92){F+=a.slice(q,s);const oe=Pv(a,s,o,h,b==="template",S);oe.ch===null&&!$?$={pos:s,lineStart:o,curLine:h}:F+=oe.ch,{pos:s,lineStart:o,curLine:h}=oe,q=s}else ee===8232||ee===8233?(++s,++h,o=s):ee===10||ee===13?b==="template"?(F+=a.slice(q,s)+`
|
|
12
|
+
`):h=String.fromCharCode(o),++this.state.curLine,this.state.lineStart=this.state.pos,h}jsxReadString(s){let o="",h=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(E.UnterminatedString,this.state.startLoc);const S=this.input.charCodeAt(this.state.pos);if(S===s)break;S===38?(o+=this.input.slice(h,this.state.pos),o+=this.jsxReadEntity(),h=this.state.pos):zr(S)?(o+=this.input.slice(h,this.state.pos),o+=this.jsxReadNewLine(!1),h=this.state.pos):++this.state.pos}o+=this.input.slice(h,this.state.pos++),this.finishToken(134,o)}jsxReadEntity(){const s=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let o=10;this.codePointAtPos(this.state.pos)===120&&(o=16,++this.state.pos);const h=this.readInt(o,void 0,!1,"bail");if(h!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(h)}else{let o=0,h=!1;for(;o++<10&&this.state.pos<this.length&&!(h=this.codePointAtPos(this.state.pos)===59);)++this.state.pos;if(h){const S=this.input.slice(s,this.state.pos),P=pv[S];if(++this.state.pos,P)return P}}return this.state.pos=s,"&"}jsxReadWord(){let s;const o=this.state.pos;do s=this.input.charCodeAt(++this.state.pos);while(Vr(s)||s===45);this.finishToken(141,this.input.slice(o,this.state.pos))}jsxParseIdentifier(){const s=this.startNode();return this.match(141)?s.name=this.state.value:Be(this.state.type)?s.name=nt(this.state.type):this.unexpected(),this.next(),this.finishNode(s,"JSXIdentifier")}jsxParseNamespacedName(){const s=this.state.startLoc,o=this.jsxParseIdentifier();if(!this.eat(14))return o;const h=this.startNodeAt(s);return h.namespace=o,h.name=this.jsxParseIdentifier(),this.finishNode(h,"JSXNamespacedName")}jsxParseElementName(){const s=this.state.startLoc;let o=this.jsxParseNamespacedName();if(o.type==="JSXNamespacedName")return o;for(;this.eat(16);){const h=this.startNodeAt(s);h.object=o,h.property=this.jsxParseIdentifier(),o=this.finishNode(h,"JSXMemberExpression")}return o}jsxParseAttributeValue(){let s;switch(this.state.type){case 5:return s=this.startNode(),this.setContext(I.brace),this.next(),s=this.jsxParseExpressionContainer(s,I.j_oTag),s.expression.type==="JSXEmptyExpression"&&this.raise(yr.AttributeIsEmpty,s),s;case 143:case 134:return this.parseExprAtom();default:throw this.raise(yr.UnsupportedJsxValue,this.state.startLoc)}}jsxParseEmptyExpression(){const s=this.startNodeAt(this.state.lastTokEndLoc);return this.finishNodeAt(s,"JSXEmptyExpression",this.state.startLoc)}jsxParseSpreadChild(s){return this.next(),s.expression=this.parseExpression(),this.setContext(I.j_expr),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(s,"JSXSpreadChild")}jsxParseExpressionContainer(s,o){if(this.match(8))s.expression=this.jsxParseEmptyExpression();else{const h=this.parseExpression();s.expression=h}return this.setContext(o),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(s,"JSXExpressionContainer")}jsxParseAttribute(){const s=this.startNode();return this.match(5)?(this.setContext(I.brace),this.next(),this.expect(21),s.argument=this.parseMaybeAssignAllowIn(),this.setContext(I.j_oTag),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(s,"JSXSpreadAttribute")):(s.name=this.jsxParseNamespacedName(),s.value=this.eat(29)?this.jsxParseAttributeValue():null,this.finishNode(s,"JSXAttribute"))}jsxParseOpeningElementAt(s){const o=this.startNodeAt(s);return this.eat(144)?this.finishNode(o,"JSXOpeningFragment"):(o.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(o))}jsxParseOpeningElementAfterName(s){const o=[];for(;!this.match(56)&&!this.match(144);)o.push(this.jsxParseAttribute());return s.attributes=o,s.selfClosing=this.eat(56),this.expect(144),this.finishNode(s,"JSXOpeningElement")}jsxParseClosingElementAt(s){const o=this.startNodeAt(s);return this.eat(144)?this.finishNode(o,"JSXClosingFragment"):(o.name=this.jsxParseElementName(),this.expect(144),this.finishNode(o,"JSXClosingElement"))}jsxParseElementAt(s){const o=this.startNodeAt(s),h=[],S=this.jsxParseOpeningElementAt(s);let P=null;if(!S.selfClosing){e:for(;;)switch(this.state.type){case 143:if(s=this.state.startLoc,this.next(),this.eat(56)){P=this.jsxParseClosingElementAt(s);break e}h.push(this.jsxParseElementAt(s));break;case 142:h.push(this.parseLiteral(this.state.value,"JSXText"));break;case 5:{const C=this.startNode();this.setContext(I.brace),this.next(),this.match(21)?h.push(this.jsxParseSpreadChild(C)):h.push(this.jsxParseExpressionContainer(C,I.j_expr));break}default:this.unexpected()}Zt(S)&&!Zt(P)&&P!==null?this.raise(yr.MissingClosingTagFragment,P):!Zt(S)&&Zt(P)?this.raise(yr.MissingClosingTagElement,P,{openingTagName:Wr(S.name)}):!Zt(S)&&!Zt(P)&&Wr(P.name)!==Wr(S.name)&&this.raise(yr.MissingClosingTagElement,P,{openingTagName:Wr(S.name)})}if(Zt(S)?(o.openingFragment=S,o.closingFragment=P):(o.openingElement=S,o.closingElement=P),o.children=h,this.match(47))throw this.raise(yr.UnwrappedAdjacentJSXElements,this.state.startLoc);return Zt(S)?this.finishNode(o,"JSXFragment"):this.finishNode(o,"JSXElement")}jsxParseElement(){const s=this.state.startLoc;return this.next(),this.jsxParseElementAt(s)}setContext(s){const{context:o}=this.state;o[o.length-1]=s}parseExprAtom(s){return this.match(143)?this.jsxParseElement():this.match(47)&&this.input.charCodeAt(this.state.pos)!==33?(this.replaceToken(143),this.jsxParseElement()):super.parseExprAtom(s)}skipSpace(){this.curContext().preserveSpace||super.skipSpace()}getTokenFromCode(s){const o=this.curContext();if(o===I.j_expr){this.jsxReadToken();return}if(o===I.j_oTag||o===I.j_cTag){if(jt(s)){this.jsxReadWord();return}if(s===62){++this.state.pos,this.finishToken(144);return}if((s===34||s===39)&&o===I.j_oTag){this.jsxReadString(s);return}}if(s===60&&this.state.canStartJSXElement&&this.input.charCodeAt(this.state.pos+1)!==33){++this.state.pos,this.finishToken(143);return}super.getTokenFromCode(s)}updateContext(s){const{context:o,type:h}=this.state;if(h===56&&s===143)o.splice(-2,2,I.j_cTag),this.state.canStartJSXElement=!1;else if(h===143)o.push(I.j_oTag);else if(h===144){const S=o[o.length-1];S===I.j_oTag&&s===56||S===I.j_cTag?(o.pop(),this.state.canStartJSXElement=o[o.length-1]===I.j_expr):(this.setContext(I.j_expr),this.state.canStartJSXElement=!0)}else this.state.canStartJSXElement=de(h)}};class yv extends Oa{constructor(...a){super(...a),this.tsNames=new Map}}class gv extends ka{constructor(...a){super(...a),this.importsStack=[]}createScope(a){return this.importsStack.push(new Set),new yv(a)}enter(a){a===512&&this.importsStack.push(new Set),super.enter(a)}exit(){const a=super.exit();return a===512&&this.importsStack.pop(),a}hasImport(a,s){const o=this.importsStack.length;if(this.importsStack[o-1].has(a))return!0;if(!s&&o>1){for(let h=0;h<o-1;h++)if(this.importsStack[h].has(a))return!0}return!1}declareName(a,s,o){if(s&4096){this.hasImport(a,!0)&&this.parser.raise(E.VarRedeclaration,o,{identifierName:a}),this.importsStack[this.importsStack.length-1].add(a);return}const h=this.currentScope();let S=h.tsNames.get(a)||0;if(s&1024){this.maybeExportDefined(h,a),h.tsNames.set(a,S|16);return}super.declareName(a,s,o),s&2&&(s&1||(this.checkRedeclarationInScope(h,a,s,o),this.maybeExportDefined(h,a)),S=S|1),s&256&&(S=S|2),s&512&&(S=S|4),s&128&&(S=S|8),S&&h.tsNames.set(a,S)}isRedeclaredInScope(a,s,o){const h=a.tsNames.get(s);if((h&2)>0){if(o&256){const S=!!(o&512),P=(h&4)>0;return S!==P}return!0}return o&128&&(h&8)>0?a.names.get(s)&2?!!(o&1):!1:o&2&&(h&1)>0?!0:super.isRedeclaredInScope(a,s,o)}checkLocalExport(a){const{name:s}=a;if(this.hasImport(s))return;const o=this.scopeStack.length;for(let h=o-1;h>=0;h--){const P=this.scopeStack[h].tsNames.get(s);if((P&1)>0||(P&16)>0)return}super.checkLocalExport(a)}}class vv{constructor(){this.stacks=[]}enter(a){this.stacks.push(a)}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 hi(b,a){return(b?2:0)|(a?1:0)}class Sv{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}sourceToOffsetPos(a){return a+this.startIndex}offsetToSourcePos(a){return a-this.startIndex}hasPlugin(a){if(typeof a=="string")return this.plugins.has(a);{const[s,o]=a;if(!this.hasPlugin(s))return!1;const h=this.plugins.get(s);for(const S of Object.keys(o))if(h?.[S]!==o[S])return!1;return!0}}getPluginOption(a,s){var o;return(o=this.plugins.get(a))==null?void 0:o[s]}}function gu(b,a){b.trailingComments===void 0?b.trailingComments=a:b.trailingComments.unshift(...a)}function Ev(b,a){b.leadingComments===void 0?b.leadingComments=a:b.leadingComments.unshift(...a)}function Es(b,a){b.innerComments===void 0?b.innerComments=a:b.innerComments.unshift(...a)}function er(b,a,s){let o=null,h=a.length;for(;o===null&&h>0;)o=a[--h];o===null||o.start>s.start?Es(b,s.comments):gu(o,s.comments)}class Tv extends Sv{addComment(a){this.filename&&(a.loc.filename=this.filename);const{commentsLen:s}=this.state;this.comments.length!==s&&(this.comments.length=s),this.comments.push(a),this.state.commentsLen++}processComment(a){const{commentStack:s}=this.state,o=s.length;if(o===0)return;let h=o-1;const S=s[h];S.start===a.end&&(S.leadingNode=a,h--);const{start:P}=a;for(;h>=0;h--){const C=s[h],R=C.end;if(R>P)C.containingNode=a,this.finalizeComment(C),s.splice(h,1);else{R===P&&(C.trailingNode=a);break}}}finalizeComment(a){var s;const{comments:o}=a;if(a.leadingNode!==null||a.trailingNode!==null)a.leadingNode!==null&&gu(a.leadingNode,o),a.trailingNode!==null&&Ev(a.trailingNode,o);else{const{containingNode:h,start:S}=a;if(this.input.charCodeAt(this.offsetToSourcePos(S)-1)===44)switch(h.type){case"ObjectExpression":case"ObjectPattern":case"RecordExpression":er(h,h.properties,a);break;case"CallExpression":case"OptionalCallExpression":er(h,h.arguments,a);break;case"ImportExpression":er(h,[h.source,(s=h.options)!=null?s:null],a);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":er(h,h.params,a);break;case"ArrayExpression":case"ArrayPattern":case"TupleExpression":er(h,h.elements,a);break;case"ExportNamedDeclaration":case"ImportDeclaration":er(h,h.specifiers,a);break;case"TSEnumDeclaration":er(h,h.members,a);break;case"TSEnumBody":er(h,h.members,a);break;default:Es(h,o)}else Es(h,o)}}finalizeRemainingComments(){const{commentStack:a}=this.state;for(let s=a.length-1;s>=0;s--)this.finalizeComment(a[s]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(a){const{commentStack:s}=this.state,{length:o}=s;if(o===0)return;const h=s[o-1];h.leadingNode===a&&(h.leadingNode=null)}takeSurroundingComments(a,s,o){const{commentStack:h}=this.state,S=h.length;if(S===0)return;let P=S-1;for(;P>=0;P--){const C=h[P],R=C.end;if(C.start===o)C.leadingNode=a;else if(R===s)C.trailingNode=a;else if(R<s)break}}}class Ra{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=[I.brace],this.firstInvalidTemplateEscapePos=null,this.strictErrors=new Map,this.tokensLength=0}get strict(){return(this.flags&1)>0}set strict(a){a?this.flags|=1:this.flags&=-2}init({strictMode:a,sourceType:s,startIndex:o,startLine:h,startColumn:S}){this.strict=a===!1?!1:a===!0?!0:s==="module",this.startIndex=o,this.curLine=h,this.lineStart=-S,this.startLoc=this.endLoc=new e(h,S,o)}get maybeInArrowParameters(){return(this.flags&2)>0}set maybeInArrowParameters(a){a?this.flags|=2:this.flags&=-3}get inType(){return(this.flags&4)>0}set inType(a){a?this.flags|=4:this.flags&=-5}get noAnonFunctionType(){return(this.flags&8)>0}set noAnonFunctionType(a){a?this.flags|=8:this.flags&=-9}get hasFlowComment(){return(this.flags&16)>0}set hasFlowComment(a){a?this.flags|=16:this.flags&=-17}get isAmbientContext(){return(this.flags&32)>0}set isAmbientContext(a){a?this.flags|=32:this.flags&=-33}get inAbstractClass(){return(this.flags&64)>0}set inAbstractClass(a){a?this.flags|=64:this.flags&=-65}get inDisallowConditionalTypesContext(){return(this.flags&128)>0}set inDisallowConditionalTypesContext(a){a?this.flags|=128:this.flags&=-129}get soloAwait(){return(this.flags&256)>0}set soloAwait(a){a?this.flags|=256:this.flags&=-257}get inFSharpPipelineDirectBody(){return(this.flags&512)>0}set inFSharpPipelineDirectBody(a){a?this.flags|=512:this.flags&=-513}get canStartJSXElement(){return(this.flags&1024)>0}set canStartJSXElement(a){a?this.flags|=1024:this.flags&=-1025}get containsEsc(){return(this.flags&2048)>0}set containsEsc(a){a?this.flags|=2048:this.flags&=-2049}get hasTopLevelAwait(){return(this.flags&4096)>0}set hasTopLevelAwait(a){a?this.flags|=4096:this.flags&=-4097}curPosition(){return new e(this.curLine,this.pos-this.lineStart,this.pos+this.startIndex)}clone(){const a=new Ra;return a.flags=this.flags,a.startIndex=this.startIndex,a.curLine=this.curLine,a.lineStart=this.lineStart,a.startLoc=this.startLoc,a.endLoc=this.endLoc,a.errors=this.errors.slice(),a.potentialArrowAt=this.potentialArrowAt,a.noArrowAt=this.noArrowAt.slice(),a.noArrowParamsConversionAt=this.noArrowParamsConversionAt.slice(),a.topicContext=this.topicContext,a.labels=this.labels.slice(),a.commentsLen=this.commentsLen,a.commentStack=this.commentStack.slice(),a.pos=this.pos,a.type=this.type,a.value=this.value,a.start=this.start,a.end=this.end,a.lastTokEndLoc=this.lastTokEndLoc,a.lastTokStartLoc=this.lastTokStartLoc,a.context=this.context.slice(),a.firstInvalidTemplateEscapePos=this.firstInvalidTemplateEscapePos,a.strictErrors=this.strictErrors,a.tokensLength=this.tokensLength,a}}var wv=function(a){return a>=48&&a<=57};const vu={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},pi={bin:b=>b===48||b===49,oct:b=>b>=48&&b<=55,dec:b=>b>=48&&b<=57,hex:b=>b>=48&&b<=57||b>=65&&b<=70||b>=97&&b<=102};function Su(b,a,s,o,h,S){const P=s,C=o,R=h;let F="",$=null,q=s;const{length:J}=a;for(;;){if(s>=J){S.unterminated(P,C,R),F+=a.slice(q,s);break}const ee=a.charCodeAt(s);if(bv(b,ee,a,s)){F+=a.slice(q,s);break}if(ee===92){F+=a.slice(q,s);const oe=Pv(a,s,o,h,b==="template",S);oe.ch===null&&!$?$={pos:s,lineStart:o,curLine:h}:F+=oe.ch,{pos:s,lineStart:o,curLine:h}=oe,q=s}else ee===8232||ee===8233?(++s,++h,o=s):ee===10||ee===13?b==="template"?(F+=a.slice(q,s)+`
|
|
13
13
|
`,++s,ee===13&&a.charCodeAt(s)===10&&++s,++h,q=o=s):S.unterminated(P,C,R):++s}return{pos:s,str:F,firstInvalidLoc:$,lineStart:o,curLine:h,containsInvalid:!!$}}function bv(b,a,s,o){return b==="template"?a===96||a===36&&s.charCodeAt(o+1)===123:a===(b==="double"?34:39)}function Pv(b,a,s,o,h,S){const P=!h;a++;const C=F=>({pos:a,ch:F,lineStart:s,curLine:o}),R=b.charCodeAt(a++);switch(R){case 110:return C(`
|
|
14
|
-
`);case 114:return C("\r");case 120:{let F;return{code:F,pos:a}=Da(b,a,s,o,2,!1,P,S),C(F===null?null:String.fromCharCode(F))}case 117:{let F;return{code:F,pos:a}=Tu(b,a,s,o,P,S),C(F===null?null:String.fromCodePoint(F))}case 116:return C(" ");case 98:return C("\b");case 118:return C("\v");case 102:return C("\f");case 13:b.charCodeAt(a)===10&&++a;case 10:s=a,++o;case 8232:case 8233:return C("");case 56:case 57:if(h)return C(null);S.strictNumericEscape(a-1,s,o);default:if(R>=48&&R<=55){const F=a-1;let q=/^[0-7]+/.exec(b.slice(F,a+2))[0],J=parseInt(q,8);J>255&&(q=q.slice(0,-1),J=parseInt(q,8)),a+=q.length-1;const ee=b.charCodeAt(a);if(q!=="0"||ee===56||ee===57){if(h)return C(null);S.strictNumericEscape(F,s,o)}return C(String.fromCharCode(J))}return C(String.fromCharCode(R))}}function Da(b,a,s,o,h,S,P,C){const R=a;let F;return{n:F,pos:a}=Eu(b,a,s,o,16,h,S,!1,C,!P),F===null&&(P?C.invalidEscapeSequence(R,s,o):a=R-1),{code:F,pos:a}}function Eu(b,a,s,o,h,S,P,C,R,F){const $=a,q=h===16?vu.hex:vu.decBinOct,J=h===16?pi.hex:h===10?pi.dec:h===8?pi.oct:pi.bin;let ee=!1,oe=0;for(let me=0,Me=S??1/0;me<Me;++me){const ye=b.charCodeAt(a);let _e;if(ye===95&&C!=="bail"){const gr=b.charCodeAt(a-1),rr=b.charCodeAt(a+1);if(C){if(Number.isNaN(rr)||!J(rr)||q.has(gr)||q.has(rr)){if(F)return{n:null,pos:a};R.unexpectedNumericSeparator(a,s,o)}}else{if(F)return{n:null,pos:a};R.numericSeparatorInEscapeSequence(a,s,o)}++a;continue}if(ye>=97?_e=ye-97+10:ye>=65?_e=ye-65+10:wv(ye)?_e=ye-48:_e=1/0,_e>=h){if(_e<=9&&F)return{n:null,pos:a};if(_e<=9&&R.invalidDigit(a,s,o,h))_e=0;else if(P)_e=0,ee=!0;else break}++a,oe=oe*h+_e}return a===$||S!=null&&a-$!==S||ee?{n:null,pos:a}:{n:oe,pos:a}}function Tu(b,a,s,o,h,S){const P=b.charCodeAt(a);let C;if(P===123){if(++a,{code:C,pos:a}=Da(b,a,s,o,b.indexOf("}",a)-a,!0,h,S),++a,C!==null&&C>1114111)if(h)S.invalidCodePoint(a,s,o);else return{code:null,pos:a}}else({code:C,pos:a}=Da(b,a,s,o,4,!1,h,S));return{code:C,pos:a}}function Ts(b,a,s){return new e(s,b-a,b)}const xv=new Set([103,109,115,105,121,117,100,118]);class tr{constructor(a){const s=a.startIndex||0;this.type=a.type,this.value=a.value,this.start=s+a.start,this.end=s+a.end,this.loc=new r(a.startLoc,a.endLoc)}}class _v extends Tv{constructor(a,s){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(o,h,S,P)=>this.optionFlags&2048?(this.raise(E.InvalidDigit,Ts(o,h,S),{radix:P}),!0):!1,numericSeparatorInEscapeSequence:this.errorBuilder(E.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(E.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(E.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(E.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(o,h,S)=>{this.recordStrictModeErrors(E.StrictNumericEscape,Ts(o,h,S))},unterminated:(o,h,S)=>{throw this.raise(E.UnterminatedString,Ts(o-1,h,S))}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(E.StrictNumericEscape),unterminated:(o,h,S)=>{throw this.raise(E.UnterminatedTemplate,Ts(o,h,S))}}),this.state=new Ra,this.state.init(a),this.input=s,this.length=s.length,this.comments=[],this.isLookahead=!1}pushToken(a){this.tokens.length=this.state.tokensLength,this.tokens.push(a),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.optionFlags&256&&this.pushToken(new tr(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(a){return this.match(a)?(this.next(),!0):!1}match(a){return this.state.type===a}createLookaheadState(a){return{pos:a.pos,value:null,type:a.type,start:a.start,end:a.end,context:[this.curContext()],inType:a.inType,startLoc:a.startLoc,lastTokEndLoc:a.lastTokEndLoc,curLine:a.curLine,lineStart:a.lineStart,curPosition:a.curPosition}}lookahead(){const a=this.state;this.state=this.createLookaheadState(a),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;const s=this.state;return this.state=a,s}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(a){return La.lastIndex=a,La.test(this.input)?La.lastIndex:a}lookaheadCharCode(){return this.lookaheadCharCodeSince(this.state.pos)}lookaheadCharCodeSince(a){return this.input.charCodeAt(this.nextTokenStartSince(a))}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(a){return Ma.lastIndex=a,Ma.test(this.input)?Ma.lastIndex:a}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(a){let s=this.input.charCodeAt(a);if((s&64512)===55296&&++a<this.input.length){const o=this.input.charCodeAt(a);(o&64512)===56320&&(s=65536+((s&1023)<<10)+(o&1023))}return s}setStrict(a){this.state.strict=a,a&&(this.state.strictErrors.forEach(([s,o])=>this.raise(s,o)),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(a){let s;this.isLookahead||(s=this.state.curPosition());const o=this.state.pos,h=this.input.indexOf(a,o+2);if(h===-1)throw this.raise(E.UnterminatedComment,this.state.curPosition());for(this.state.pos=h+a.length,ui.lastIndex=o+2;ui.test(this.input)&&ui.lastIndex<=h;)++this.state.curLine,this.state.lineStart=ui.lastIndex;if(this.isLookahead)return;const S={type:"CommentBlock",value:this.input.slice(o+2,h),start:this.sourceToOffsetPos(o),end:this.sourceToOffsetPos(h+a.length),loc:new r(s,this.state.curPosition())};return this.optionFlags&256&&this.pushToken(S),S}skipLineComment(a){const s=this.state.pos;let o;this.isLookahead||(o=this.state.curPosition());let h=this.input.charCodeAt(this.state.pos+=a);if(this.state.pos<this.length)for(;!zr(h)&&++this.state.pos<this.length;)h=this.input.charCodeAt(this.state.pos);if(this.isLookahead)return;const S=this.state.pos,C={type:"CommentLine",value:this.input.slice(s+a,S),start:this.sourceToOffsetPos(s),end:this.sourceToOffsetPos(S),loc:new r(o,this.state.curPosition())};return this.optionFlags&256&&this.pushToken(C),C}skipSpace(){const a=this.state.pos,s=this.optionFlags&4096?[]:null;e:for(;this.state.pos<this.length;){const o=this.input.charCodeAt(this.state.pos);switch(o){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:{const h=this.skipBlockComment("*/");h!==void 0&&(this.addComment(h),s==null||s.push(h));break}case 47:{const h=this.skipLineComment(2);h!==void 0&&(this.addComment(h),s==null||s.push(h));break}default:break e}break;default:if(dv(o))++this.state.pos;else if(o===45&&!this.inModule&&this.optionFlags&8192){const h=this.state.pos;if(this.input.charCodeAt(h+1)===45&&this.input.charCodeAt(h+2)===62&&(a===0||this.state.lineStart>a)){const S=this.skipLineComment(3);S!==void 0&&(this.addComment(S),s==null||s.push(S))}else break e}else if(o===60&&!this.inModule&&this.optionFlags&8192){const h=this.state.pos;if(this.input.charCodeAt(h+1)===33&&this.input.charCodeAt(h+2)===45&&this.input.charCodeAt(h+3)===45){const S=this.skipLineComment(4);S!==void 0&&(this.addComment(S),s==null||s.push(S))}else break e}else break e}}if((s==null?void 0:s.length)>0){const o=this.state.pos,h={start:this.sourceToOffsetPos(a),end:this.sourceToOffsetPos(o),comments:s,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(h)}}finishToken(a,s){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();const o=this.state.type;this.state.type=a,this.state.value=s,this.isLookahead||this.updateContext(o)}replaceToken(a){this.state.type=a,this.updateContext()}readToken_numberSign(){if(this.state.pos===0&&this.readToken_interpreter())return;const a=this.state.pos+1,s=this.codePointAtPos(a);if(s>=48&&s<=57)throw this.raise(E.UnexpectedDigitAfterHash,this.state.curPosition());if(s===123||s===91&&this.hasPlugin("recordAndTuple")){if(this.expectPlugin("recordAndTuple"),this.getPluginOption("recordAndTuple","syntaxType")==="bar")throw this.raise(s===123?E.RecordExpressionHashIncorrectStartSyntaxType:E.TupleExpressionHashIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,s===123?this.finishToken(7):this.finishToken(1)}else jt(s)?(++this.state.pos,this.finishToken(139,this.readWord1(s))):s===92?(++this.state.pos,this.finishToken(139,this.readWord1())):this.finishOp(27,1)}readToken_dot(){const a=this.input.charCodeAt(this.state.pos+1);if(a>=48&&a<=57){this.readNumber(!0);return}a===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 a=this.input.charCodeAt(this.state.pos+1);if(a!==33)return!1;const s=this.state.pos;for(this.state.pos+=1;!zr(a)&&++this.state.pos<this.length;)a=this.input.charCodeAt(this.state.pos);const o=this.input.slice(s+2,this.state.pos);return this.finishToken(28,o),!0}readToken_mult_modulo(a){let s=a===42?55:54,o=1,h=this.input.charCodeAt(this.state.pos+1);a===42&&h===42&&(o++,h=this.input.charCodeAt(this.state.pos+2),s=57),h===61&&!this.state.inType&&(o++,s=a===37?33:30),this.finishOp(s,o)}readToken_pipe_amp(a){const s=this.input.charCodeAt(this.state.pos+1);if(s===a){this.input.charCodeAt(this.state.pos+2)===61?this.finishOp(30,3):this.finishOp(a===124?41:42,2);return}if(a===124){if(s===62){this.finishOp(39,2);return}if(this.hasPlugin("recordAndTuple")&&s===125){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(E.RecordExpressionBarIncorrectEndSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(9);return}if(this.hasPlugin("recordAndTuple")&&s===93){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(E.TupleExpressionBarIncorrectEndSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(4);return}}if(s===61){this.finishOp(30,2);return}this.finishOp(a===124?43:45,1)}readToken_caret(){const a=this.input.charCodeAt(this.state.pos+1);a===61&&!this.state.inType?this.finishOp(32,2):a===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(a){const s=this.input.charCodeAt(this.state.pos+1);if(s===a){this.finishOp(34,2);return}s===61?this.finishOp(30,2):this.finishOp(53,1)}readToken_lt(){const{pos:a}=this.state,s=this.input.charCodeAt(a+1);if(s===60){if(this.input.charCodeAt(a+2)===61){this.finishOp(30,3);return}this.finishOp(51,2);return}if(s===61){this.finishOp(49,2);return}this.finishOp(47,1)}readToken_gt(){const{pos:a}=this.state,s=this.input.charCodeAt(a+1);if(s===62){const o=this.input.charCodeAt(a+2)===62?3:2;if(this.input.charCodeAt(a+o)===61){this.finishOp(30,o+1);return}this.finishOp(52,o);return}if(s===61){this.finishOp(49,2);return}this.finishOp(48,1)}readToken_eq_excl(a){const s=this.input.charCodeAt(this.state.pos+1);if(s===61){this.finishOp(46,this.input.charCodeAt(this.state.pos+2)===61?3:2);return}if(a===61&&s===62){this.state.pos+=2,this.finishToken(19);return}this.finishOp(a===61?29:35,1)}readToken_question(){const a=this.input.charCodeAt(this.state.pos+1),s=this.input.charCodeAt(this.state.pos+2);a===63?s===61?this.finishOp(30,3):this.finishOp(40,2):a===46&&!(s>=48&&s<=57)?(this.state.pos+=2,this.finishToken(18)):(++this.state.pos,this.finishToken(17))}getTokenFromCode(a){switch(a){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(E.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(E.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:{const s=this.input.charCodeAt(this.state.pos+1);if(s===120||s===88){this.readRadixNumber(16);return}if(s===111||s===79){this.readRadixNumber(8);return}if(s===98||s===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(a);return;case 47:this.readToken_slash();return;case 37:case 42:this.readToken_mult_modulo(a);return;case 124:case 38:this.readToken_pipe_amp(a);return;case 94:this.readToken_caret();return;case 43:case 45:this.readToken_plus_min(a);return;case 60:this.readToken_lt();return;case 62:this.readToken_gt();return;case 61:case 33:this.readToken_eq_excl(a);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(jt(a)){this.readWord(a);return}}throw this.raise(E.InvalidOrUnexpectedToken,this.state.curPosition(),{unexpected:String.fromCodePoint(a)})}finishOp(a,s){const o=this.input.slice(this.state.pos,this.state.pos+s);this.state.pos+=s,this.finishToken(a,o)}readRegexp(){const a=this.state.startLoc,s=this.state.start+1;let o,h,{pos:S}=this.state;for(;;++S){if(S>=this.length)throw this.raise(E.UnterminatedRegExp,i(a,1));const F=this.input.charCodeAt(S);if(zr(F))throw this.raise(E.UnterminatedRegExp,i(a,1));if(o)o=!1;else{if(F===91)h=!0;else if(F===93&&h)h=!1;else if(F===47&&!h)break;o=F===92}}const P=this.input.slice(s,S);++S;let C="";const R=()=>i(a,S+2-s);for(;S<this.length;){const F=this.codePointAtPos(S),$=String.fromCharCode(F);if(xv.has(F))F===118?C.includes("u")&&this.raise(E.IncompatibleRegExpUVFlags,R()):F===117&&C.includes("v")&&this.raise(E.IncompatibleRegExpUVFlags,R()),C.includes($)&&this.raise(E.DuplicateRegExpFlags,R());else if(Vr(F)||F===92)this.raise(E.MalformedRegExpFlags,R());else break;++S,C+=$}this.state.pos=S,this.finishToken(138,{pattern:P,flags:C})}readInt(a,s,o=!1,h=!0){const{n:S,pos:P}=Eu(this.input,this.state.pos,this.state.lineStart,this.state.curLine,a,s,o,h,this.errorHandlers_readInt,!1);return this.state.pos=P,S}readRadixNumber(a){const s=this.state.pos,o=this.state.curPosition();let h=!1;this.state.pos+=2;const S=this.readInt(a);S==null&&this.raise(E.InvalidDigit,i(o,2),{radix:a});const P=this.input.charCodeAt(this.state.pos);if(P===110)++this.state.pos,h=!0;else if(P===109)throw this.raise(E.InvalidDecimal,o);if(jt(this.codePointAtPos(this.state.pos)))throw this.raise(E.NumberIdentifier,this.state.curPosition());if(h){const C=this.input.slice(s,this.state.pos).replace(/[_n]/g,"");this.finishToken(136,C);return}this.finishToken(135,S)}readNumber(a){const s=this.state.pos,o=this.state.curPosition();let h=!1,S=!1,P=!1,C=!1;!a&&this.readInt(10)===null&&this.raise(E.InvalidNumber,this.state.curPosition());const R=this.state.pos-s>=2&&this.input.charCodeAt(s)===48;if(R){const ee=this.input.slice(s,this.state.pos);if(this.recordStrictModeErrors(E.StrictOctalLiteral,o),!this.state.strict){const oe=ee.indexOf("_");oe>0&&this.raise(E.ZeroDigitNumericSeparator,i(o,oe))}C=R&&!/[89]/.test(ee)}let F=this.input.charCodeAt(this.state.pos);if(F===46&&!C&&(++this.state.pos,this.readInt(10),h=!0,F=this.input.charCodeAt(this.state.pos)),(F===69||F===101)&&!C&&(F=this.input.charCodeAt(++this.state.pos),(F===43||F===45)&&++this.state.pos,this.readInt(10)===null&&this.raise(E.InvalidOrMissingExponent,o),h=!0,P=!0,F=this.input.charCodeAt(this.state.pos)),F===110&&((h||R)&&this.raise(E.InvalidBigIntLiteral,o),++this.state.pos,S=!0),F===109){this.expectPlugin("decimal",this.state.curPosition()),(P||R)&&this.raise(E.InvalidDecimal,o),++this.state.pos;var $=!0}if(jt(this.codePointAtPos(this.state.pos)))throw this.raise(E.NumberIdentifier,this.state.curPosition());const q=this.input.slice(s,this.state.pos).replace(/[_mn]/g,"");if(S){this.finishToken(136,q);return}if($){this.finishToken(137,q);return}const J=C?parseInt(q,8):parseFloat(q);this.finishToken(135,J)}readCodePoint(a){const{code:s,pos:o}=Tu(this.input,this.state.pos,this.state.lineStart,this.state.curLine,a,this.errorHandlers_readCodePoint);return this.state.pos=o,s}readString(a){const{str:s,pos:o,curLine:h,lineStart:S}=Su(a===34?"double":"single",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string);this.state.pos=o+1,this.state.lineStart=S,this.state.curLine=h,this.finishToken(134,s)}readTemplateContinuation(){this.match(8)||this.unexpected(null,8),this.state.pos--,this.readTemplateToken()}readTemplateToken(){const a=this.input[this.state.pos],{str:s,firstInvalidLoc:o,pos:h,curLine:S,lineStart:P}=Su("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=h+1,this.state.lineStart=P,this.state.curLine=S,o&&(this.state.firstInvalidTemplateEscapePos=new e(o.curLine,o.pos-o.lineStart,this.sourceToOffsetPos(o.pos))),this.input.codePointAt(h)===96?this.finishToken(24,o?null:a+s+"`"):(this.state.pos++,this.finishToken(25,o?null:a+s+"${"))}recordStrictModeErrors(a,s){const o=s.index;this.state.strict&&!this.state.strictErrors.has(o)?this.raise(a,s):this.state.strictErrors.set(o,[a,s])}readWord1(a){this.state.containsEsc=!1;let s="";const o=this.state.pos;let h=this.state.pos;for(a!==void 0&&(this.state.pos+=a<=65535?1:2);this.state.pos<this.length;){const S=this.codePointAtPos(this.state.pos);if(Vr(S))this.state.pos+=S<=65535?1:2;else if(S===92){this.state.containsEsc=!0,s+=this.input.slice(h,this.state.pos);const P=this.state.curPosition(),C=this.state.pos===o?jt:Vr;if(this.input.charCodeAt(++this.state.pos)!==117){this.raise(E.MissingUnicodeEscape,this.state.curPosition()),h=this.state.pos-1;continue}++this.state.pos;const R=this.readCodePoint(!0);R!==null&&(C(R)||this.raise(E.EscapedCharNotAnIdentifier,P),s+=String.fromCodePoint(R)),h=this.state.pos}else break}return s+this.input.slice(h,this.state.pos)}readWord(a){const s=this.readWord1(a),o=he.get(s);o!==void 0?this.finishToken(o,nt(o)):this.finishToken(132,s)}checkKeywordEscapes(){const{type:a}=this.state;Be(a)&&this.state.containsEsc&&this.raise(E.InvalidEscapedReservedWord,this.state.startLoc,{reservedWord:nt(a)})}raise(a,s,o={}){const h=s instanceof e?s:s.loc.start,S=a(h,o);if(!(this.optionFlags&2048))throw S;return this.isLookahead||this.state.errors.push(S),S}raiseOverwrite(a,s,o={}){const h=s instanceof e?s:s.loc.start,S=h.index,P=this.state.errors;for(let C=P.length-1;C>=0;C--){const R=P[C];if(R.loc.index===S)return P[C]=a(h,o);if(R.loc.index<S)break}return this.raise(a,s,o)}updateContext(a){}unexpected(a,s){throw this.raise(E.UnexpectedToken,a??this.state.startLoc,{expected:s?nt(s):null})}expectPlugin(a,s){if(this.hasPlugin(a))return!0;throw this.raise(E.MissingPlugin,s??this.state.startLoc,{missingPlugin:[a]})}expectOnePlugin(a){if(!a.some(s=>this.hasPlugin(s)))throw this.raise(E.MissingOneOfPlugins,this.state.startLoc,{missingPlugin:a})}errorBuilder(a){return(s,o,h)=>{this.raise(a,Ts(s,o,h))}}}class Av{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}}class Cv{constructor(a){this.parser=void 0,this.stack=[],this.undefinedPrivateNames=new Map,this.parser=a}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new Av)}exit(){const a=this.stack.pop(),s=this.current();for(const[o,h]of Array.from(a.undefinedPrivateNames))s?s.undefinedPrivateNames.has(o)||s.undefinedPrivateNames.set(o,h):this.parser.raise(E.InvalidPrivateFieldResolution,h,{identifierName:o})}declarePrivateName(a,s,o){const{privateNames:h,loneAccessors:S,undefinedPrivateNames:P}=this.current();let C=h.has(a);if(s&3){const R=C&&S.get(a);if(R){const F=R&4,$=s&4,q=R&3,J=s&3;C=q===J||F!==$,C||S.delete(a)}else C||S.set(a,s)}C&&this.parser.raise(E.PrivateNameRedeclaration,o,{identifierName:a}),h.add(a),P.delete(a)}usePrivateName(a,s){let o;for(o of this.stack)if(o.privateNames.has(a))return;o?o.undefinedPrivateNames.set(a,s):this.parser.raise(E.InvalidPrivateFieldResolution,s,{identifierName:a})}}class fi{constructor(a=0){this.type=a}canBeArrowParameterDeclaration(){return this.type===2||this.type===1}isCertainlyParameterDeclaration(){return this.type===3}}class wu extends fi{constructor(a){super(a),this.declarationErrors=new Map}recordDeclarationError(a,s){const o=s.index;this.declarationErrors.set(o,[a,s])}clearDeclarationError(a){this.declarationErrors.delete(a)}iterateErrors(a){this.declarationErrors.forEach(a)}}class Iv{constructor(a){this.parser=void 0,this.stack=[new fi],this.parser=a}enter(a){this.stack.push(a)}exit(){this.stack.pop()}recordParameterInitializerError(a,s){const o=s.loc.start,{stack:h}=this;let S=h.length-1,P=h[S];for(;!P.isCertainlyParameterDeclaration();){if(P.canBeArrowParameterDeclaration())P.recordDeclarationError(a,o);else return;P=h[--S]}this.parser.raise(a,o)}recordArrowParameterBindingError(a,s){const{stack:o}=this,h=o[o.length-1],S=s.loc.start;if(h.isCertainlyParameterDeclaration())this.parser.raise(a,S);else if(h.canBeArrowParameterDeclaration())h.recordDeclarationError(a,S);else return}recordAsyncArrowParametersError(a){const{stack:s}=this;let o=s.length-1,h=s[o];for(;h.canBeArrowParameterDeclaration();)h.type===2&&h.recordDeclarationError(E.AwaitBindingIdentifier,a),h=s[--o]}validateAsPattern(){const{stack:a}=this,s=a[a.length-1];s.canBeArrowParameterDeclaration()&&s.iterateErrors(([o,h])=>{this.parser.raise(o,h);let S=a.length-2,P=a[S];for(;P.canBeArrowParameterDeclaration();)P.clearDeclarationError(h.index),P=a[--S]})}}function Nv(){return new fi(3)}function Ov(){return new wu(1)}function kv(){return new wu(2)}function bu(){return new fi}class Lv extends _v{addExtra(a,s,o,h=!0){if(!a)return;let{extra:S}=a;S==null&&(S={},a.extra=S),h?S[s]=o:Object.defineProperty(S,s,{enumerable:h,value:o})}isContextual(a){return this.state.type===a&&!this.state.containsEsc}isUnparsedContextual(a,s){const o=a+s.length;if(this.input.slice(a,o)===s){const h=this.input.charCodeAt(o);return!(Vr(h)||(h&64512)===55296)}return!1}isLookaheadContextual(a){const s=this.nextTokenStart();return this.isUnparsedContextual(s,a)}eatContextual(a){return this.isContextual(a)?(this.next(),!0):!1}expectContextual(a,s){if(!this.eatContextual(a)){if(s!=null)throw this.raise(s,this.state.startLoc);this.unexpected(null,a)}}canInsertSemicolon(){return this.match(140)||this.match(8)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return yu(this.input,this.offsetToSourcePos(this.state.lastTokEndLoc.index),this.state.start)}hasFollowingLineBreak(){return yu(this.input,this.state.end,this.nextTokenStart())}isLineTerminator(){return this.eat(13)||this.canInsertSemicolon()}semicolon(a=!0){(a?this.isLineTerminator():this.eat(13))||this.raise(E.MissingSemicolon,this.state.lastTokEndLoc)}expect(a,s){this.eat(a)||this.unexpected(s,a)}tryParse(a,s=this.state.clone()){const o={node:null};try{const h=a((S=null)=>{throw o.node=S,o});if(this.state.errors.length>s.errors.length){const S=this.state;return this.state=s,this.state.tokensLength=S.tokensLength,{node:h,error:S.errors[s.errors.length],thrown:!1,aborted:!1,failState:S}}return{node:h,error:null,thrown:!1,aborted:!1,failState:null}}catch(h){const S=this.state;if(this.state=s,h instanceof SyntaxError)return{node:null,error:h,thrown:!0,aborted:!1,failState:S};if(h===o)return{node:o.node,error:null,thrown:!1,aborted:!0,failState:S};throw h}}checkExpressionErrors(a,s){if(!a)return!1;const{shorthandAssignLoc:o,doubleProtoLoc:h,privateKeyLoc:S,optionalParametersLoc:P}=a,C=!!o||!!h||!!P||!!S;if(!s)return C;o!=null&&this.raise(E.InvalidCoverInitializedName,o),h!=null&&this.raise(E.DuplicateProto,h),S!=null&&this.raise(E.UnexpectedPrivateField,S),P!=null&&this.unexpected(P)}isLiteralPropertyName(){return Ee(this.state.type)}isPrivateName(a){return a.type==="PrivateName"}getPrivateNameSV(a){return a.id.name}hasPropertyAsPrivateName(a){return(a.type==="MemberExpression"||a.type==="OptionalMemberExpression")&&this.isPrivateName(a.property)}isObjectProperty(a){return a.type==="ObjectProperty"}isObjectMethod(a){return a.type==="ObjectMethod"}initializeScopes(a=this.options.sourceType==="module"){const s=this.state.labels;this.state.labels=[];const o=this.exportedIdentifiers;this.exportedIdentifiers=new Set;const h=this.inModule;this.inModule=a;const S=this.scope,P=this.getScopeHandler();this.scope=new P(this,a);const C=this.prodParam;this.prodParam=new vv;const R=this.classScope;this.classScope=new Cv(this);const F=this.expressionScope;return this.expressionScope=new Iv(this),()=>{this.state.labels=s,this.exportedIdentifiers=o,this.inModule=h,this.scope=S,this.prodParam=C,this.classScope=R,this.expressionScope=F}}enterInitialScopes(){let a=0;this.inModule&&(a|=2),this.optionFlags&32&&(a|=1),this.scope.enter(1),this.prodParam.enter(a)}checkDestructuringPrivate(a){const{privateKeyLoc:s}=a;s!==null&&this.expectPlugin("destructuringPrivate",s)}}class di{constructor(){this.shorthandAssignLoc=null,this.doubleProtoLoc=null,this.privateKeyLoc=null,this.optionalParametersLoc=null}}class mi{constructor(a,s,o){this.type="",this.start=s,this.end=0,this.loc=new r(o),(a==null?void 0:a.optionFlags)&128&&(this.range=[s,0]),a!=null&&a.filename&&(this.loc.filename=a.filename)}}const Fa=mi.prototype;Fa.__clone=function(){const b=new mi(void 0,this.start,this.loc.start),a=Object.keys(this);for(let s=0,o=a.length;s<o;s++){const h=a[s];h!=="leadingComments"&&h!=="trailingComments"&&h!=="innerComments"&&(b[h]=this[h])}return b};class Mv extends Lv{startNode(){const a=this.state.startLoc;return new mi(this,a.index,a)}startNodeAt(a){return new mi(this,a.index,a)}startNodeAtNode(a){return this.startNodeAt(a.loc.start)}finishNode(a,s){return this.finishNodeAt(a,s,this.state.lastTokEndLoc)}finishNodeAt(a,s,o){return a.type=s,a.end=o.index,a.loc.end=o,this.optionFlags&128&&(a.range[1]=o.index),this.optionFlags&4096&&this.processComment(a),a}resetStartLocation(a,s){a.start=s.index,a.loc.start=s,this.optionFlags&128&&(a.range[0]=s.index)}resetEndLocation(a,s=this.state.lastTokEndLoc){a.end=s.index,a.loc.end=s,this.optionFlags&128&&(a.range[1]=s.index)}resetStartLocationFromNode(a,s){this.resetStartLocation(a,s.loc.start)}castNodeTo(a,s){return a.type=s,a}cloneIdentifier(a){const{type:s,start:o,end:h,loc:S,range:P,name:C}=a,R=Object.create(Fa);return R.type=s,R.start=o,R.end=h,R.loc=S,R.range=P,R.name=C,a.extra&&(R.extra=a.extra),R}cloneStringLiteral(a){const{type:s,start:o,end:h,loc:S,range:P,extra:C}=a,R=Object.create(Fa);return R.type=s,R.start=o,R.end=h,R.loc=S,R.range=P,R.extra=C,R.value=a.value,R}}const Pu=b=>b.type==="ParenthesizedExpression"?Pu(b.expression):b;class Rv extends Mv{toAssignable(a,s=!1){var o,h;let S;switch((a.type==="ParenthesizedExpression"||(o=a.extra)!=null&&o.parenthesized)&&(S=Pu(a),s?S.type==="Identifier"?this.expressionScope.recordArrowParameterBindingError(E.InvalidParenthesizedAssignment,a):S.type!=="MemberExpression"&&!this.isOptionalMemberExpression(S)&&this.raise(E.InvalidParenthesizedAssignment,a):this.raise(E.InvalidParenthesizedAssignment,a)),a.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":this.castNodeTo(a,"ObjectPattern");for(let C=0,R=a.properties.length,F=R-1;C<R;C++){var P;const $=a.properties[C],q=C===F;this.toAssignableObjectExpressionProp($,q,s),q&&$.type==="RestElement"&&(P=a.extra)!=null&&P.trailingCommaLoc&&this.raise(E.RestTrailingComma,a.extra.trailingCommaLoc)}break;case"ObjectProperty":{const{key:C,value:R}=a;this.isPrivateName(C)&&this.classScope.usePrivateName(this.getPrivateNameSV(C),C.loc.start),this.toAssignable(R,s);break}case"SpreadElement":throw new Error("Internal @babel/parser error (this is a bug, please report it). SpreadElement should be converted by .toAssignable's caller.");case"ArrayExpression":this.castNodeTo(a,"ArrayPattern"),this.toAssignableList(a.elements,(h=a.extra)==null?void 0:h.trailingCommaLoc,s);break;case"AssignmentExpression":a.operator!=="="&&this.raise(E.MissingEqInAssignment,a.left.loc.end),this.castNodeTo(a,"AssignmentPattern"),delete a.operator,this.toAssignable(a.left,s);break;case"ParenthesizedExpression":this.toAssignable(S,s);break}}toAssignableObjectExpressionProp(a,s,o){if(a.type==="ObjectMethod")this.raise(a.kind==="get"||a.kind==="set"?E.PatternHasAccessor:E.PatternHasMethod,a.key);else if(a.type==="SpreadElement"){this.castNodeTo(a,"RestElement");const h=a.argument;this.checkToRestConversion(h,!1),this.toAssignable(h,o),s||this.raise(E.RestTrailingComma,a)}else this.toAssignable(a,o)}toAssignableList(a,s,o){const h=a.length-1;for(let S=0;S<=h;S++){const P=a[S];P&&(this.toAssignableListItem(a,S,o),P.type==="RestElement"&&(S<h?this.raise(E.RestTrailingComma,P):s&&this.raise(E.RestTrailingComma,s)))}}toAssignableListItem(a,s,o){const h=a[s];if(h.type==="SpreadElement"){this.castNodeTo(h,"RestElement");const S=h.argument;this.checkToRestConversion(S,!0),this.toAssignable(S,o)}else this.toAssignable(h,o)}isAssignable(a,s){switch(a.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":return!0;case"ObjectExpression":{const o=a.properties.length-1;return a.properties.every((h,S)=>h.type!=="ObjectMethod"&&(S===o||h.type!=="SpreadElement")&&this.isAssignable(h))}case"ObjectProperty":return this.isAssignable(a.value);case"SpreadElement":return this.isAssignable(a.argument);case"ArrayExpression":return a.elements.every(o=>o===null||this.isAssignable(o));case"AssignmentExpression":return a.operator==="=";case"ParenthesizedExpression":return this.isAssignable(a.expression);case"MemberExpression":case"OptionalMemberExpression":return!s;default:return!1}}toReferencedList(a,s){return a}toReferencedListDeep(a,s){this.toReferencedList(a,s);for(const o of a)(o==null?void 0:o.type)==="ArrayExpression"&&this.toReferencedListDeep(o.elements)}parseSpread(a){const s=this.startNode();return this.next(),s.argument=this.parseMaybeAssignAllowIn(a,void 0),this.finishNode(s,"SpreadElement")}parseRestBinding(){const a=this.startNode();return this.next(),a.argument=this.parseBindingAtom(),this.finishNode(a,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{const a=this.startNode();return this.next(),a.elements=this.parseBindingList(3,93,1),this.finishNode(a,"ArrayPattern")}case 5:return this.parseObjectLike(8,!0)}return this.parseIdentifier()}parseBindingList(a,s,o){const h=o&1,S=[];let P=!0;for(;!this.eat(a);)if(P?P=!1:this.expect(12),h&&this.match(12))S.push(null);else{if(this.eat(a))break;if(this.match(21)){let C=this.parseRestBinding();if((this.hasPlugin("flow")||o&2)&&(C=this.parseFunctionParamType(C)),S.push(C),!this.checkCommaAfterRest(s)){this.expect(a);break}}else{const C=[];if(o&2)for(this.match(26)&&this.hasPlugin("decorators")&&this.raise(E.UnsupportedParameterDecorator,this.state.startLoc);this.match(26);)C.push(this.parseDecorator());S.push(this.parseBindingElement(o,C))}}return S}parseBindingRestProperty(a){return this.next(),a.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(a,"RestElement")}parseBindingProperty(){const{type:a,startLoc:s}=this.state;if(a===21)return this.parseBindingRestProperty(this.startNode());const o=this.startNode();return a===139?(this.expectPlugin("destructuringPrivate",s),this.classScope.usePrivateName(this.state.value,s),o.key=this.parsePrivateName()):this.parsePropertyName(o),o.method=!1,this.parseObjPropValue(o,s,!1,!1,!0,!1)}parseBindingElement(a,s){const o=this.parseMaybeDefault();return(this.hasPlugin("flow")||a&2)&&this.parseFunctionParamType(o),s.length&&(o.decorators=s,this.resetStartLocationFromNode(o,s[0])),this.parseMaybeDefault(o.loc.start,o)}parseFunctionParamType(a){return a}parseMaybeDefault(a,s){if(a??(a=this.state.startLoc),s=s??this.parseBindingAtom(),!this.eat(29))return s;const o=this.startNodeAt(a);return o.left=s,o.right=this.parseMaybeAssignAllowIn(),this.finishNode(o,"AssignmentPattern")}isValidLVal(a,s,o){switch(a){case"AssignmentPattern":return"left";case"RestElement":return"argument";case"ObjectProperty":return"value";case"ParenthesizedExpression":return"expression";case"ArrayPattern":return"elements";case"ObjectPattern":return"properties"}return!1}isOptionalMemberExpression(a){return a.type==="OptionalMemberExpression"}checkLVal(a,s,o=64,h=!1,S=!1,P=!1){var C;const R=a.type;if(this.isObjectMethod(a))return;const F=this.isOptionalMemberExpression(a);if(F||R==="MemberExpression"){F&&(this.expectPlugin("optionalChainingAssign",a.loc.start),s.type!=="AssignmentExpression"&&this.raise(E.InvalidLhsOptionalChaining,a,{ancestor:s})),o!==64&&this.raise(E.InvalidPropertyBindingPattern,a);return}if(R==="Identifier"){this.checkIdentifier(a,o,S);const{name:me}=a;h&&(h.has(me)?this.raise(E.ParamDupe,a):h.add(me));return}const $=this.isValidLVal(R,!(P||(C=a.extra)!=null&&C.parenthesized)&&s.type==="AssignmentExpression",o);if($===!0)return;if($===!1){const me=o===64?E.InvalidLhs:E.InvalidLhsBinding;this.raise(me,a,{ancestor:s});return}let q,J;typeof $=="string"?(q=$,J=R==="ParenthesizedExpression"):[q,J]=$;const ee=R==="ArrayPattern"||R==="ObjectPattern"?{type:R}:s,oe=a[q];if(Array.isArray(oe))for(const me of oe)me&&this.checkLVal(me,ee,o,h,S,J);else oe&&this.checkLVal(oe,ee,o,h,S,J)}checkIdentifier(a,s,o=!1){this.state.strict&&(o?du(a.name,this.inModule):fu(a.name))&&(s===64?this.raise(E.StrictEvalArguments,a,{referenceName:a.name}):this.raise(E.StrictEvalArgumentsBinding,a,{bindingName:a.name})),s&8192&&a.name==="let"&&this.raise(E.LetInLexicalBinding,a),s&64||this.declareNameFromIdentifier(a,s)}declareNameFromIdentifier(a,s){this.scope.declareName(a.name,s,a.loc.start)}checkToRestConversion(a,s){switch(a.type){case"ParenthesizedExpression":this.checkToRestConversion(a.expression,s);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(s)break;default:this.raise(E.InvalidRestAssignmentPattern,a)}}checkCommaAfterRest(a){return this.match(12)?(this.raise(this.lookaheadCharCode()===a?E.RestTrailingComma:E.ElementAfterRest,this.state.startLoc),!0):!1}}function Dv(b){if(b==null)throw new Error(`Unexpected ${b} value.`);return b}function xu(b){if(!b)throw new Error("Assert fail")}const ae=T`typescript`({AbstractMethodHasImplementation:({methodName:b})=>`Method '${b}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:b})=>`Property '${b}' 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:b})=>`'declare' is not allowed in ${b}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:({modifier:b})=>`Accessibility modifier already seen: '${b}'.`,DuplicateModifier:({modifier:b})=>`Duplicate modifier: '${b}'.`,EmptyHeritageClauseType:({token:b})=>`'${b}' 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:b})=>`'${b[0]}' modifier cannot be used with '${b[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:b})=>`Index signatures cannot have an accessibility modifier ('${b}').`,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:b})=>`'${b}' list can only include identifiers or qualified-names with optional type arguments.`,InvalidModifierOnAwaitUsingDeclaration:b=>`'${b}' modifier cannot appear on an await using declaration.`,InvalidModifierOnTypeMember:({modifier:b})=>`'${b}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:b})=>`'${b}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:b})=>`'${b}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifierOnUsingDeclaration:b=>`'${b}' modifier cannot appear on a using declaration.`,InvalidModifiersOrder:({orderedModifiers:b})=>`'${b[0]}' modifier must precede '${b[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:b})=>`Private elements cannot have an accessibility modifier ('${b}').`,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:b})=>`Single type parameter ${b} should have a trailing comma. Example usage: <${b},>.`,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:b})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${b}.`});function Fv(b){switch(b){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 _u(b){return b==="private"||b==="public"||b==="protected"}function Bv(b){return b==="in"||b==="out"}var $v=b=>class extends b{constructor(...s){super(...s),this.tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out"],disallowedModifiers:["const","public","private","protected","readonly","declare","abstract","override"],errorTemplate:ae.InvalidModifierOnTypeParameter}),this.tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:ae.InvalidModifierOnTypeParameterPositions}),this.tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:ae.InvalidModifierOnTypeParameter})}getScopeHandler(){return gv}tsIsIdentifier(){return Y(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(s,o,h){if(!Y(this.state.type)&&this.state.type!==58&&this.state.type!==75)return;const S=this.state.value;if(s.includes(S)){if(h&&this.match(106)||o&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return S}}tsParseModifiers({allowedModifiers:s,disallowedModifiers:o,stopOnStartOfClassStaticBlock:h,errorTemplate:S=ae.InvalidModifierOnTypeMember},P){const C=(F,$,q,J)=>{$===q&&P[J]&&this.raise(ae.InvalidModifiersOrder,F,{orderedModifiers:[q,J]})},R=(F,$,q,J)=>{(P[q]&&$===J||P[J]&&$===q)&&this.raise(ae.IncompatibleModifiers,F,{modifiers:[q,J]})};for(;;){const{startLoc:F}=this.state,$=this.tsParseModifier(s.concat(o??[]),h,P.static);if(!$)break;_u($)?P.accessibility?this.raise(ae.DuplicateAccessibilityModifier,F,{modifier:$}):(C(F,$,$,"override"),C(F,$,$,"static"),C(F,$,$,"readonly"),P.accessibility=$):Bv($)?(P[$]&&this.raise(ae.DuplicateModifier,F,{modifier:$}),P[$]=!0,C(F,$,"in","out")):(hasOwnProperty.call(P,$)?this.raise(ae.DuplicateModifier,F,{modifier:$}):(C(F,$,"static","readonly"),C(F,$,"static","override"),C(F,$,"override","readonly"),C(F,$,"abstract","override"),R(F,$,"declare","override"),R(F,$,"static","abstract")),P[$]=!0),o!=null&&o.includes($)&&this.raise(S,F,{modifier:$})}}tsIsListTerminator(s){switch(s){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(s,o){const h=[];for(;!this.tsIsListTerminator(s);)h.push(o());return h}tsParseDelimitedList(s,o,h){return Dv(this.tsParseDelimitedListWorker(s,o,!0,h))}tsParseDelimitedListWorker(s,o,h,S){const P=[];let C=-1;for(;!this.tsIsListTerminator(s);){C=-1;const R=o();if(R==null)return;if(P.push(R),this.eat(12)){C=this.state.lastTokStartLoc.index;continue}if(this.tsIsListTerminator(s))break;h&&this.expect(12);return}return S&&(S.value=C),P}tsParseBracketedList(s,o,h,S,P){S||(h?this.expect(0):this.expect(47));const C=this.tsParseDelimitedList(s,o,P);return h?this.expect(3):this.expect(48),C}tsParseImportType(){const s=this.startNode();return this.expect(83),this.expect(10),this.match(134)?s.argument=this.parseStringLiteral(this.state.value):(this.raise(ae.UnsupportedImportTypeArgument,this.state.startLoc),s.argument=super.parseExprAtom()),this.eat(12)?s.options=this.tsParseImportTypeOptions():s.options=null,this.expect(11),this.eat(16)&&(s.qualifier=this.tsParseEntityName(3)),this.match(47)&&(s.typeParameters=this.tsParseTypeArguments()),this.finishNode(s,"TSImportType")}tsParseImportTypeOptions(){const s=this.startNode();this.expect(5);const o=this.startNode();return this.isContextual(76)?(o.method=!1,o.key=this.parseIdentifier(!0),o.computed=!1,o.shorthand=!1):this.unexpected(null,76),this.expect(14),o.value=this.tsParseImportTypeWithPropertyValue(),s.properties=[this.finishObjectProperty(o)],this.expect(8),this.finishNode(s,"ObjectExpression")}tsParseImportTypeWithPropertyValue(){const s=this.startNode(),o=[];for(this.expect(5);!this.match(8);){const h=this.state.type;Y(h)||h===134?o.push(super.parsePropertyDefinition(null)):this.unexpected(),this.eat(12)}return s.properties=o,this.next(),this.finishNode(s,"ObjectExpression")}tsParseEntityName(s){let o;if(s&1&&this.match(78))if(s&2)o=this.parseIdentifier(!0);else{const h=this.startNode();this.next(),o=this.finishNode(h,"ThisExpression")}else o=this.parseIdentifier(!!(s&1));for(;this.eat(16);){const h=this.startNodeAtNode(o);h.left=o,h.right=this.parseIdentifier(!!(s&1)),o=this.finishNode(h,"TSQualifiedName")}return o}tsParseTypeReference(){const s=this.startNode();return s.typeName=this.tsParseEntityName(1),!this.hasPrecedingLineBreak()&&this.match(47)&&(s.typeParameters=this.tsParseTypeArguments()),this.finishNode(s,"TSTypeReference")}tsParseThisTypePredicate(s){this.next();const o=this.startNodeAtNode(s);return o.parameterName=s,o.typeAnnotation=this.tsParseTypeAnnotation(!1),o.asserts=!1,this.finishNode(o,"TSTypePredicate")}tsParseThisTypeNode(){const s=this.startNode();return this.next(),this.finishNode(s,"TSThisType")}tsParseTypeQuery(){const s=this.startNode();return this.expect(87),this.match(83)?s.exprName=this.tsParseImportType():s.exprName=this.tsParseEntityName(3),!this.hasPrecedingLineBreak()&&this.match(47)&&(s.typeParameters=this.tsParseTypeArguments()),this.finishNode(s,"TSTypeQuery")}tsParseTypeParameter(s){const o=this.startNode();return s(o),o.name=this.tsParseTypeParameterName(),o.constraint=this.tsEatThenParseType(81),o.default=this.tsEatThenParseType(29),this.finishNode(o,"TSTypeParameter")}tsTryParseTypeParameters(s){if(this.match(47))return this.tsParseTypeParameters(s)}tsParseTypeParameters(s){const o=this.startNode();this.match(47)||this.match(143)?this.next():this.unexpected();const h={value:-1};return o.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,s),!1,!0,h),o.params.length===0&&this.raise(ae.EmptyTypeParameters,o),h.value!==-1&&this.addExtra(o,"trailingComma",h.value),this.finishNode(o,"TSTypeParameterDeclaration")}tsFillSignature(s,o){const h=s===19,S="parameters",P="typeAnnotation";o.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),o[S]=this.tsParseBindingListForSignature(),h?o[P]=this.tsParseTypeOrTypePredicateAnnotation(s):this.match(s)&&(o[P]=this.tsParseTypeOrTypePredicateAnnotation(s))}tsParseBindingListForSignature(){const s=super.parseBindingList(11,41,2);for(const o of s){const{type:h}=o;(h==="AssignmentPattern"||h==="TSParameterProperty")&&this.raise(ae.UnsupportedSignatureParameterKind,o,{type:h})}return s}tsParseTypeMemberSemicolon(){!this.eat(12)&&!this.isLineTerminator()&&this.expect(13)}tsParseSignatureMember(s,o){return this.tsFillSignature(14,o),this.tsParseTypeMemberSemicolon(),this.finishNode(o,s)}tsIsUnambiguouslyIndexSignature(){return this.next(),Y(this.state.type)?(this.next(),this.match(14)):!1}tsTryParseIndexSignature(s){if(!(this.match(0)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))))return;this.expect(0);const o=this.parseIdentifier();o.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(o),this.expect(3),s.parameters=[o];const h=this.tsTryParseTypeAnnotation();return h&&(s.typeAnnotation=h),this.tsParseTypeMemberSemicolon(),this.finishNode(s,"TSIndexSignature")}tsParsePropertyOrMethodSignature(s,o){if(this.eat(17)&&(s.optional=!0),this.match(10)||this.match(47)){o&&this.raise(ae.ReadonlyForMethodSignature,s);const h=s;h.kind&&this.match(47)&&this.raise(ae.AccessorCannotHaveTypeParameters,this.state.curPosition()),this.tsFillSignature(14,h),this.tsParseTypeMemberSemicolon();const S="parameters",P="typeAnnotation";if(h.kind==="get")h[S].length>0&&(this.raise(E.BadGetterArity,this.state.curPosition()),this.isThisParam(h[S][0])&&this.raise(ae.AccessorCannotDeclareThisParameter,this.state.curPosition()));else if(h.kind==="set"){if(h[S].length!==1)this.raise(E.BadSetterArity,this.state.curPosition());else{const C=h[S][0];this.isThisParam(C)&&this.raise(ae.AccessorCannotDeclareThisParameter,this.state.curPosition()),C.type==="Identifier"&&C.optional&&this.raise(ae.SetAccessorCannotHaveOptionalParameter,this.state.curPosition()),C.type==="RestElement"&&this.raise(ae.SetAccessorCannotHaveRestParameter,this.state.curPosition())}h[P]&&this.raise(ae.SetAccessorCannotHaveReturnType,h[P])}else h.kind="method";return this.finishNode(h,"TSMethodSignature")}else{const h=s;o&&(h.readonly=!0);const S=this.tsTryParseTypeAnnotation();return S&&(h.typeAnnotation=S),this.tsParseTypeMemberSemicolon(),this.finishNode(h,"TSPropertySignature")}}tsParseTypeMember(){const s=this.startNode();if(this.match(10)||this.match(47))return this.tsParseSignatureMember("TSCallSignatureDeclaration",s);if(this.match(77)){const h=this.startNode();return this.next(),this.match(10)||this.match(47)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",s):(s.key=this.createIdentifier(h,"new"),this.tsParsePropertyOrMethodSignature(s,!1))}this.tsParseModifiers({allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]},s);const o=this.tsTryParseIndexSignature(s);return o||(super.parsePropertyName(s),!s.computed&&s.key.type==="Identifier"&&(s.key.name==="get"||s.key.name==="set")&&this.tsTokenCanFollowModifier()&&(s.kind=s.key.name,super.parsePropertyName(s),!this.match(10)&&!this.match(47)&&this.unexpected(null,10)),this.tsParsePropertyOrMethodSignature(s,!!s.readonly))}tsParseTypeLiteral(){const s=this.startNode();return s.members=this.tsParseObjectTypeMembers(),this.finishNode(s,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(5);const s=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(8),s}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(){const s=this.startNode();this.expect(5),this.match(53)?(s.readonly=this.state.value,this.next(),this.expectContextual(122)):this.eatContextual(122)&&(s.readonly=!0),this.expect(0);{const o=this.startNode();o.name=this.tsParseTypeParameterName(),o.constraint=this.tsExpectThenParseType(58),s.typeParameter=this.finishNode(o,"TSTypeParameter")}return s.nameType=this.eatContextual(93)?this.tsParseType():null,this.expect(3),this.match(53)?(s.optional=this.state.value,this.next(),this.expect(17)):this.eat(17)&&(s.optional=!0),s.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(8),this.finishNode(s,"TSMappedType")}tsParseTupleType(){const s=this.startNode();s.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let o=!1;return s.elementTypes.forEach(h=>{const{type:S}=h;o&&S!=="TSRestType"&&S!=="TSOptionalType"&&!(S==="TSNamedTupleMember"&&h.optional)&&this.raise(ae.OptionalTypeBeforeRequired,h),o||(o=S==="TSNamedTupleMember"&&h.optional||S==="TSOptionalType")}),this.finishNode(s,"TSTupleType")}tsParseTupleElementType(){const s=this.state.startLoc,o=this.eat(21),{startLoc:h}=this.state;let S,P,C,R;const $=ce(this.state.type)?this.lookaheadCharCode():null;if($===58)S=!0,C=!1,P=this.parseIdentifier(!0),this.expect(14),R=this.tsParseType();else if($===63){C=!0;const q=this.state.value,J=this.tsParseNonArrayType();this.lookaheadCharCode()===58?(S=!0,P=this.createIdentifier(this.startNodeAt(h),q),this.expect(17),this.expect(14),R=this.tsParseType()):(S=!1,R=J,this.expect(17))}else R=this.tsParseType(),C=this.eat(17),S=this.eat(14);if(S){let q;P?(q=this.startNodeAt(h),q.optional=C,q.label=P,q.elementType=R,this.eat(17)&&(q.optional=!0,this.raise(ae.TupleOptionalAfterType,this.state.lastTokStartLoc))):(q=this.startNodeAt(h),q.optional=C,this.raise(ae.InvalidTupleMemberLabel,R),q.label=R,q.elementType=this.tsParseType()),R=this.finishNode(q,"TSNamedTupleMember")}else if(C){const q=this.startNodeAt(h);q.typeAnnotation=R,R=this.finishNode(q,"TSOptionalType")}if(o){const q=this.startNodeAt(s);q.typeAnnotation=R,R=this.finishNode(q,"TSRestType")}return R}tsParseParenthesizedType(){const s=this.startNode();return this.expect(10),s.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(s,"TSParenthesizedType")}tsParseFunctionOrConstructorType(s,o){const h=this.startNode();return s==="TSConstructorType"&&(h.abstract=!!o,o&&this.next(),this.next()),this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(19,h)),this.finishNode(h,s)}tsParseLiteralTypeNode(){const s=this.startNode();switch(this.state.type){case 135:case 136:case 134:case 85:case 86:s.literal=super.parseExprAtom();break;default:this.unexpected()}return this.finishNode(s,"TSLiteralType")}tsParseTemplateLiteralType(){{const s=this.startNode();return s.literal=super.parseTemplate(!1),this.finishNode(s,"TSLiteralType")}}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){const s=this.tsParseThisTypeNode();return this.isContextual(116)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(s):s}tsParseNonArrayType(){switch(this.state.type){case 134:case 135:case 136:case 85:case 86:return this.tsParseLiteralTypeNode();case 53:if(this.state.value==="-"){const s=this.startNode(),o=this.lookahead();return o.type!==135&&o.type!==136&&this.unexpected(),s.literal=this.parseMaybeUnary(),this.finishNode(s,"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:{const{type:s}=this.state;if(Y(s)||s===88||s===84){const o=s===88?"TSVoidKeyword":s===84?"TSNullKeyword":Fv(this.state.value);if(o!==void 0&&this.lookaheadCharCode()!==46){const h=this.startNode();return this.next(),this.finishNode(h,o)}return this.tsParseTypeReference()}}}this.unexpected()}tsParseArrayTypeOrHigher(){const{startLoc:s}=this.state;let o=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(3)){const h=this.startNodeAt(s);h.elementType=o,this.expect(3),o=this.finishNode(h,"TSArrayType")}else{const h=this.startNodeAt(s);h.objectType=o,h.indexType=this.tsParseType(),this.expect(3),o=this.finishNode(h,"TSIndexedAccessType")}return o}tsParseTypeOperator(){const s=this.startNode(),o=this.state.value;return this.next(),s.operator=o,s.typeAnnotation=this.tsParseTypeOperatorOrHigher(),o==="readonly"&&this.tsCheckTypeAnnotationForReadOnly(s),this.finishNode(s,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(s){switch(s.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(ae.UnexpectedReadonly,s)}}tsParseInferType(){const s=this.startNode();this.expectContextual(115);const o=this.startNode();return o.name=this.tsParseTypeParameterName(),o.constraint=this.tsTryParse(()=>this.tsParseConstraintForInferType()),s.typeParameter=this.finishNode(o,"TSTypeParameter"),this.finishNode(s,"TSInferType")}tsParseConstraintForInferType(){if(this.eat(81)){const s=this.tsInDisallowConditionalTypesContext(()=>this.tsParseType());if(this.state.inDisallowConditionalTypesContext||!this.match(17))return s}}tsParseTypeOperatorOrHigher(){return $r(this.state.type)&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(115)?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseUnionOrIntersectionType(s,o,h){const S=this.startNode(),P=this.eat(h),C=[];do C.push(o());while(this.eat(h));return C.length===1&&!P?C[0]:(S.types=C,this.finishNode(S,s))}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(Y(this.state.type)||this.match(78))return this.next(),!0;if(this.match(5)){const{errors:s}=this.state,o=s.length;try{return this.parseObjectLike(8,!0),s.length===o}catch{return!1}}if(this.match(0)){this.next();const{errors:s}=this.state,o=s.length;try{return super.parseBindingList(3,93,1),s.length===o}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(s){return this.tsInType(()=>{const o=this.startNode();this.expect(s);const h=this.startNode(),S=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(S&&this.match(78)){let R=this.tsParseThisTypeOrThisTypePredicate();return R.type==="TSThisType"?(h.parameterName=R,h.asserts=!0,h.typeAnnotation=null,R=this.finishNode(h,"TSTypePredicate")):(this.resetStartLocationFromNode(R,h),R.asserts=!0),o.typeAnnotation=R,this.finishNode(o,"TSTypeAnnotation")}const P=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!P)return S?(h.parameterName=this.parseIdentifier(),h.asserts=S,h.typeAnnotation=null,o.typeAnnotation=this.finishNode(h,"TSTypePredicate"),this.finishNode(o,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,o);const C=this.tsParseTypeAnnotation(!1);return h.parameterName=P,h.typeAnnotation=C,h.asserts=S,o.typeAnnotation=this.finishNode(h,"TSTypePredicate"),this.finishNode(o,"TSTypeAnnotation")})}tsTryParseTypeOrTypePredicateAnnotation(){if(this.match(14))return this.tsParseTypeOrTypePredicateAnnotation(14)}tsTryParseTypeAnnotation(){if(this.match(14))return this.tsParseTypeAnnotation()}tsTryParseType(){return this.tsEatThenParseType(14)}tsParseTypePredicatePrefix(){const s=this.parseIdentifier();if(this.isContextual(116)&&!this.hasPrecedingLineBreak())return this.next(),s}tsParseTypePredicateAsserts(){if(this.state.type!==109)return!1;const s=this.state.containsEsc;return this.next(),!Y(this.state.type)&&!this.match(78)?!1:(s&&this.raise(E.InvalidEscapedReservedWord,this.state.lastTokStartLoc,{reservedWord:"asserts"}),!0)}tsParseTypeAnnotation(s=!0,o=this.startNode()){return this.tsInType(()=>{s&&this.expect(14),o.typeAnnotation=this.tsParseType()}),this.finishNode(o,"TSTypeAnnotation")}tsParseType(){xu(this.state.inType);const s=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(81))return s;const o=this.startNodeAtNode(s);return o.checkType=s,o.extendsType=this.tsInDisallowConditionalTypesContext(()=>this.tsParseNonConditionalType()),this.expect(17),o.trueType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.expect(14),o.falseType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.finishNode(o,"TSConditionalType")}isAbstractConstructorSignature(){return this.isContextual(124)&&this.lookahead().type===77}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(ae.ReservedTypeAssertion,this.state.startLoc);const s=this.startNode();return s.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?this.tsParseTypeReference():this.tsParseType())),this.expect(48),s.expression=this.parseMaybeUnary(),this.finishNode(s,"TSTypeAssertion")}tsParseHeritageClause(s){const o=this.state.startLoc,h=this.tsParseDelimitedList("HeritageClauseElement",()=>{{const S=this.startNode();return S.expression=this.tsParseEntityName(3),this.match(47)&&(S.typeParameters=this.tsParseTypeArguments()),this.finishNode(S,"TSExpressionWithTypeArguments")}});return h.length||this.raise(ae.EmptyHeritageClauseType,o,{token:s}),h}tsParseInterfaceDeclaration(s,o={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(129),o.declare&&(s.declare=!0),Y(this.state.type)?(s.id=this.parseIdentifier(),this.checkIdentifier(s.id,130)):(s.id=null,this.raise(ae.MissingInterfaceName,this.state.startLoc)),s.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(81)&&(s.extends=this.tsParseHeritageClause("extends"));const h=this.startNode();return h.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),s.body=this.finishNode(h,"TSInterfaceBody"),this.finishNode(s,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(s){return s.id=this.parseIdentifier(),this.checkIdentifier(s.id,2),s.typeAnnotation=this.tsInType(()=>{if(s.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers),this.expect(29),this.isContextual(114)&&this.lookahead().type!==16){const o=this.startNode();return this.next(),this.finishNode(o,"TSIntrinsicKeyword")}return this.tsParseType()}),this.semicolon(),this.finishNode(s,"TSTypeAliasDeclaration")}tsInTopLevelContext(s){if(this.curContext()!==I.brace){const o=this.state.context;this.state.context=[o[0]];try{return s()}finally{this.state.context=o}}else return s()}tsInType(s){const o=this.state.inType;this.state.inType=!0;try{return s()}finally{this.state.inType=o}}tsInDisallowConditionalTypesContext(s){const o=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return s()}finally{this.state.inDisallowConditionalTypesContext=o}}tsInAllowConditionalTypesContext(s){const o=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return s()}finally{this.state.inDisallowConditionalTypesContext=o}}tsEatThenParseType(s){if(this.match(s))return this.tsNextThenParseType()}tsExpectThenParseType(s){return this.tsInType(()=>(this.expect(s),this.tsParseType()))}tsNextThenParseType(){return this.tsInType(()=>(this.next(),this.tsParseType()))}tsParseEnumMember(){const s=this.startNode();return s.id=this.match(134)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(29)&&(s.initializer=super.parseMaybeAssignAllowIn()),this.finishNode(s,"TSEnumMember")}tsParseEnumDeclaration(s,o={}){return o.const&&(s.const=!0),o.declare&&(s.declare=!0),this.expectContextual(126),s.id=this.parseIdentifier(),this.checkIdentifier(s.id,s.const?8971:8459),this.expect(5),s.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(s,"TSEnumDeclaration")}tsParseEnumBody(){const s=this.startNode();return this.expect(5),s.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(s,"TSEnumBody")}tsParseModuleBlock(){const s=this.startNode();return this.scope.enter(0),this.expect(5),super.parseBlockOrModuleBlockBody(s.body=[],void 0,!0,8),this.scope.exit(),this.finishNode(s,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(s,o=!1){if(s.id=this.parseIdentifier(),o||this.checkIdentifier(s.id,1024),this.eat(16)){const h=this.startNode();this.tsParseModuleOrNamespaceDeclaration(h,!0),s.body=h}else this.scope.enter(512),this.prodParam.enter(0),s.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(s,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(s){return this.isContextual(112)?(s.kind="global",s.global=!0,s.id=this.parseIdentifier()):this.match(134)?(s.kind="module",s.id=super.parseStringLiteral(this.state.value)):this.unexpected(),this.match(5)?(this.scope.enter(512),this.prodParam.enter(0),s.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(s,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(s,o,h){s.isExport=h||!1,s.id=o||this.parseIdentifier(),this.checkIdentifier(s.id,4096),this.expect(29);const S=this.tsParseModuleReference();return s.importKind==="type"&&S.type!=="TSExternalModuleReference"&&this.raise(ae.ImportAliasHasImportType,S),s.moduleReference=S,this.semicolon(),this.finishNode(s,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual(119)&&this.lookaheadCharCode()===40}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(0)}tsParseExternalModuleReference(){const s=this.startNode();return this.expectContextual(119),this.expect(10),this.match(134)||this.unexpected(),s.expression=super.parseExprAtom(),this.expect(11),this.sawUnambiguousESM=!0,this.finishNode(s,"TSExternalModuleReference")}tsLookAhead(s){const o=this.state.clone(),h=s();return this.state=o,h}tsTryParseAndCatch(s){const o=this.tryParse(h=>s()||h());if(!(o.aborted||!o.node))return o.error&&(this.state=o.failState),o.node}tsTryParse(s){const o=this.state.clone(),h=s();if(h!==void 0&&h!==!1)return h;this.state=o}tsTryParseDeclare(s){if(this.isLineTerminator())return;const o=this.state.type;return this.tsInAmbientContext(()=>{switch(o){case 68:return s.declare=!0,super.parseFunctionStatement(s,!1,!1);case 80:return s.declare=!0,this.parseClass(s,!0,!1);case 126:return this.tsParseEnumDeclaration(s,{declare:!0});case 112:return this.tsParseAmbientExternalModuleDeclaration(s);case 100:if(this.state.containsEsc)return;case 75:case 74:return!this.match(75)||!this.isLookaheadContextual("enum")?(s.declare=!0,this.parseVarStatement(s,this.state.value,!0)):(this.expect(75),this.tsParseEnumDeclaration(s,{const:!0,declare:!0}));case 107:if(this.hasPlugin("explicitResourceManagement")&&this.isUsing())return this.raise(ae.InvalidModifierOnUsingDeclaration,this.state.startLoc,"declare"),s.declare=!0,this.parseVarStatement(s,"using",!0);break;case 96:if(this.hasPlugin("explicitResourceManagement")&&this.isAwaitUsing())return this.raise(ae.InvalidModifierOnAwaitUsingDeclaration,this.state.startLoc,"declare"),s.declare=!0,this.next(),this.parseVarStatement(s,"await using",!0);break;case 129:{const h=this.tsParseInterfaceDeclaration(s,{declare:!0});if(h)return h}default:if(Y(o))return this.tsParseDeclaration(s,this.state.value,!0,null)}})}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0,null)}tsParseExpressionStatement(s,o,h){switch(o.name){case"declare":{const S=this.tsTryParseDeclare(s);return S&&(S.declare=!0),S}case"global":if(this.match(5)){this.scope.enter(512),this.prodParam.enter(0);const S=s;return S.kind="global",s.global=!0,S.id=o,S.body=this.tsParseModuleBlock(),this.scope.exit(),this.prodParam.exit(),this.finishNode(S,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(s,o.name,!1,h)}}tsParseDeclaration(s,o,h,S){switch(o){case"abstract":if(this.tsCheckLineTerminator(h)&&(this.match(80)||Y(this.state.type)))return this.tsParseAbstractDeclaration(s,S);break;case"module":if(this.tsCheckLineTerminator(h)){if(this.match(134))return this.tsParseAmbientExternalModuleDeclaration(s);if(Y(this.state.type))return s.kind="module",this.tsParseModuleOrNamespaceDeclaration(s)}break;case"namespace":if(this.tsCheckLineTerminator(h)&&Y(this.state.type))return s.kind="namespace",this.tsParseModuleOrNamespaceDeclaration(s);break;case"type":if(this.tsCheckLineTerminator(h)&&Y(this.state.type))return this.tsParseTypeAliasDeclaration(s);break}}tsCheckLineTerminator(s){return s?this.hasFollowingLineBreak()?!1:(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(s){if(!this.match(47))return;const o=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;const h=this.tsTryParseAndCatch(()=>{const S=this.startNodeAt(s);return S.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(S),S.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(19),S});if(this.state.maybeInArrowParameters=o,!!h)return super.parseArrowExpression(h,null,!0)}tsParseTypeArgumentsInExpression(){if(this.reScan_lt()===47)return this.tsParseTypeArguments()}tsParseTypeArguments(){const s=this.startNode();return s.params=this.tsInType(()=>this.tsInTopLevelContext(()=>(this.expect(47),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))),s.params.length===0?this.raise(ae.EmptyTypeArguments,s):!this.state.inType&&this.curContext()===I.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(s,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return Ur(this.state.type)}isExportDefaultSpecifier(){return this.tsIsDeclarationStart()?!1:super.isExportDefaultSpecifier()}parseBindingElement(s,o){const h=o.length?o[0].loc.start:this.state.startLoc,S={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},S);const P=S.accessibility,C=S.override,R=S.readonly;!(s&4)&&(P||R||C)&&this.raise(ae.UnexpectedParameterModifier,h);const F=this.parseMaybeDefault();s&2&&this.parseFunctionParamType(F);const $=this.parseMaybeDefault(F.loc.start,F);if(P||R||C){const q=this.startNodeAt(h);return o.length&&(q.decorators=o),P&&(q.accessibility=P),R&&(q.readonly=R),C&&(q.override=C),$.type!=="Identifier"&&$.type!=="AssignmentPattern"&&this.raise(ae.UnsupportedParameterPropertyKind,q),q.parameter=$,this.finishNode(q,"TSParameterProperty")}return o.length&&(F.decorators=o),$}isSimpleParameter(s){return s.type==="TSParameterProperty"&&super.isSimpleParameter(s.parameter)||super.isSimpleParameter(s)}tsDisallowOptionalPattern(s){for(const o of s.params)o.type!=="Identifier"&&o.optional&&!this.state.isAmbientContext&&this.raise(ae.PatternIsOptional,o)}setArrowFunctionParameters(s,o,h){super.setArrowFunctionParameters(s,o,h),this.tsDisallowOptionalPattern(s)}parseFunctionBodyAndFinish(s,o,h=!1){this.match(14)&&(s.returnType=this.tsParseTypeOrTypePredicateAnnotation(14));const S=o==="FunctionDeclaration"?"TSDeclareFunction":o==="ClassMethod"||o==="ClassPrivateMethod"?"TSDeclareMethod":void 0;return S&&!this.match(5)&&this.isLineTerminator()?this.finishNode(s,S):S==="TSDeclareFunction"&&this.state.isAmbientContext&&(this.raise(ae.DeclareFunctionHasImplementation,s),s.declare)?super.parseFunctionBodyAndFinish(s,S,h):(this.tsDisallowOptionalPattern(s),super.parseFunctionBodyAndFinish(s,o,h))}registerFunctionStatementId(s){!s.body&&s.id?this.checkIdentifier(s.id,1024):super.registerFunctionStatementId(s)}tsCheckForInvalidTypeCasts(s){s.forEach(o=>{(o==null?void 0:o.type)==="TSTypeCastExpression"&&this.raise(ae.UnexpectedTypeAnnotation,o.typeAnnotation)})}toReferencedList(s,o){return this.tsCheckForInvalidTypeCasts(s),s}parseArrayLike(s,o,h,S){const P=super.parseArrayLike(s,o,h,S);return P.type==="ArrayExpression"&&this.tsCheckForInvalidTypeCasts(P.elements),P}parseSubscript(s,o,h,S){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();const C=this.startNodeAt(o);return C.expression=s,this.finishNode(C,"TSNonNullExpression")}let P=!1;if(this.match(18)&&this.lookaheadCharCode()===60){if(h)return S.stop=!0,s;S.optionalChainMember=P=!0,this.next()}if(this.match(47)||this.match(51)){let C;const R=this.tsTryParseAndCatch(()=>{if(!h&&this.atPossibleAsyncArrow(s)){const J=this.tsTryParseGenericAsyncArrowFunction(o);if(J)return J}const F=this.tsParseTypeArgumentsInExpression();if(!F)return;if(P&&!this.match(10)){C=this.state.curPosition();return}if(jr(this.state.type)){const J=super.parseTaggedTemplateExpression(s,o,S);return J.typeParameters=F,J}if(!h&&this.eat(10)){const J=this.startNodeAt(o);return J.callee=s,J.arguments=this.parseCallExpressionArguments(11),this.tsCheckForInvalidTypeCasts(J.arguments),J.typeParameters=F,S.optionalChainMember&&(J.optional=P),this.finishCallExpression(J,S.optionalChainMember)}const $=this.state.type;if($===48||$===52||$!==10&&be($)&&!this.hasPrecedingLineBreak())return;const q=this.startNodeAt(o);return q.expression=s,q.typeParameters=F,this.finishNode(q,"TSInstantiationExpression")});if(C&&this.unexpected(C,10),R)return R.type==="TSInstantiationExpression"&&((this.match(16)||this.match(18)&&this.lookaheadCharCode()!==40)&&this.raise(ae.InvalidPropertyAccessAfterInstantiationExpression,this.state.startLoc),!this.match(16)&&!this.match(18)&&(R.expression=super.stopParseSubscript(s,S))),R}return super.parseSubscript(s,o,h,S)}parseNewCallee(s){var o;super.parseNewCallee(s);const{callee:h}=s;h.type==="TSInstantiationExpression"&&!((o=h.extra)!=null&&o.parenthesized)&&(s.typeParameters=h.typeParameters,s.callee=h.expression)}parseExprOp(s,o,h){let S;if(qr(58)>h&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(S=this.isContextual(120)))){const P=this.startNodeAt(o);return P.expression=s,P.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?(S&&this.raise(E.UnexpectedKeyword,this.state.startLoc,{keyword:"const"}),this.tsParseTypeReference()):this.tsParseType())),this.finishNode(P,S?"TSSatisfiesExpression":"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(P,o,h)}return super.parseExprOp(s,o,h)}checkReservedWord(s,o,h,S){this.state.isAmbientContext||super.checkReservedWord(s,o,h,S)}checkImportReflection(s){super.checkImportReflection(s),s.module&&s.importKind!=="value"&&this.raise(ae.ImportReflectionHasImportType,s.specifiers[0].loc.start)}checkDuplicateExports(){}isPotentialImportPhase(s){if(super.isPotentialImportPhase(s))return!0;if(this.isContextual(130)){const o=this.lookaheadCharCode();return s?o===123||o===42:o!==61}return!s&&this.isContextual(87)}applyImportPhase(s,o,h,S){super.applyImportPhase(s,o,h,S),o?s.exportKind=h==="type"?"type":"value":s.importKind=h==="type"||h==="typeof"?h:"value"}parseImport(s){if(this.match(134))return s.importKind="value",super.parseImport(s);let o;if(Y(this.state.type)&&this.lookaheadCharCode()===61)return s.importKind="value",this.tsParseImportEqualsDeclaration(s);if(this.isContextual(130)){const h=this.parseMaybeImportPhase(s,!1);if(this.lookaheadCharCode()===61)return this.tsParseImportEqualsDeclaration(s,h);o=super.parseImportSpecifiersAndAfter(s,h)}else o=super.parseImport(s);return o.importKind==="type"&&o.specifiers.length>1&&o.specifiers[0].type==="ImportDefaultSpecifier"&&this.raise(ae.TypeImportCannotSpecifyDefaultAndNamed,o),o}parseExport(s,o){if(this.match(83)){const h=s;this.next();let S=null;return this.isContextual(130)&&this.isPotentialImportPhase(!1)?S=this.parseMaybeImportPhase(h,!1):h.importKind="value",this.tsParseImportEqualsDeclaration(h,S,!0)}else if(this.eat(29)){const h=s;return h.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(h,"TSExportAssignment")}else if(this.eatContextual(93)){const h=s;return this.expectContextual(128),h.id=this.parseIdentifier(),this.semicolon(),this.finishNode(h,"TSNamespaceExportDeclaration")}else return super.parseExport(s,o)}isAbstractClass(){return this.isContextual(124)&&this.lookahead().type===80}parseExportDefaultExpression(){if(this.isAbstractClass()){const s=this.startNode();return this.next(),s.abstract=!0,this.parseClass(s,!0,!0)}if(this.match(129)){const s=this.tsParseInterfaceDeclaration(this.startNode());if(s)return s}return super.parseExportDefaultExpression()}parseVarStatement(s,o,h=!1){const{isAmbientContext:S}=this.state,P=super.parseVarStatement(s,o,h||S);if(!S)return P;for(const{id:C,init:R}of P.declarations)R&&(o==="var"||o==="let"||C.typeAnnotation?this.raise(ae.InitializerNotAllowedInAmbientContext,R):qv(R,this.hasPlugin("estree"))||this.raise(ae.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference,R));return P}parseStatementContent(s,o){if(this.match(75)&&this.isLookaheadContextual("enum")){const h=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(h,{const:!0})}if(this.isContextual(126))return this.tsParseEnumDeclaration(this.startNode());if(this.isContextual(129)){const h=this.tsParseInterfaceDeclaration(this.startNode());if(h)return h}return super.parseStatementContent(s,o)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(s,o){return o.some(h=>_u(h)?s.accessibility===h:!!s[h])}tsIsStartOfStaticBlocks(){return this.isContextual(106)&&this.lookaheadCharCode()===123}parseClassMember(s,o,h){const S=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:S,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:ae.InvalidModifierOnTypeParameterPositions},o);const P=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(o,S)&&this.raise(ae.StaticBlockCannotHaveModifier,this.state.curPosition()),super.parseClassStaticBlock(s,o)):this.parseClassMemberWithIsStatic(s,o,h,!!o.static)};o.declare?this.tsInAmbientContext(P):P()}parseClassMemberWithIsStatic(s,o,h,S){const P=this.tsTryParseIndexSignature(o);if(P){s.body.push(P),o.abstract&&this.raise(ae.IndexSignatureHasAbstract,o),o.accessibility&&this.raise(ae.IndexSignatureHasAccessibility,o,{modifier:o.accessibility}),o.declare&&this.raise(ae.IndexSignatureHasDeclare,o),o.override&&this.raise(ae.IndexSignatureHasOverride,o);return}!this.state.inAbstractClass&&o.abstract&&this.raise(ae.NonAbstractClassHasAbstractMethod,o),o.override&&(h.hadSuperClass||this.raise(ae.OverrideNotInSubClass,o)),super.parseClassMemberWithIsStatic(s,o,h,S)}parsePostMemberNameModifiers(s){this.eat(17)&&(s.optional=!0),s.readonly&&this.match(10)&&this.raise(ae.ClassMethodHasReadonly,s),s.declare&&this.match(10)&&this.raise(ae.ClassMethodHasDeclare,s)}parseExpressionStatement(s,o,h){return(o.type==="Identifier"?this.tsParseExpressionStatement(s,o,h):void 0)||super.parseExpressionStatement(s,o,h)}shouldParseExportDeclaration(){return this.tsIsDeclarationStart()?!0:super.shouldParseExportDeclaration()}parseConditional(s,o,h){if(!this.match(17))return s;if(this.state.maybeInArrowParameters){const S=this.lookaheadCharCode();if(S===44||S===61||S===58||S===41)return this.setOptionalParametersError(h),s}return super.parseConditional(s,o,h)}parseParenItem(s,o){const h=super.parseParenItem(s,o);if(this.eat(17)&&(h.optional=!0,this.resetEndLocation(s)),this.match(14)){const S=this.startNodeAt(o);return S.expression=s,S.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(S,"TSTypeCastExpression")}return s}parseExportDeclaration(s){if(!this.state.isAmbientContext&&this.isContextual(125))return this.tsInAmbientContext(()=>this.parseExportDeclaration(s));const o=this.state.startLoc,h=this.eatContextual(125);if(h&&(this.isContextual(125)||!this.shouldParseExportDeclaration()))throw this.raise(ae.ExpectedAmbientAfterExportDeclare,this.state.startLoc);const P=Y(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(s);return P?((P.type==="TSInterfaceDeclaration"||P.type==="TSTypeAliasDeclaration"||h)&&(s.exportKind="type"),h&&P.type!=="TSImportEqualsDeclaration"&&(this.resetStartLocation(P,o),P.declare=!0),P):null}parseClassId(s,o,h,S){if((!o||h)&&this.isContextual(113))return;super.parseClassId(s,o,h,s.declare?1024:8331);const P=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);P&&(s.typeParameters=P)}parseClassPropertyAnnotation(s){s.optional||(this.eat(35)?s.definite=!0:this.eat(17)&&(s.optional=!0));const o=this.tsTryParseTypeAnnotation();o&&(s.typeAnnotation=o)}parseClassProperty(s){if(this.parseClassPropertyAnnotation(s),this.state.isAmbientContext&&!(s.readonly&&!s.typeAnnotation)&&this.match(29)&&this.raise(ae.DeclareClassFieldHasInitializer,this.state.startLoc),s.abstract&&this.match(29)){const{key:o}=s;this.raise(ae.AbstractPropertyHasInitializer,this.state.startLoc,{propertyName:o.type==="Identifier"&&!s.computed?o.name:`[${this.input.slice(this.offsetToSourcePos(o.start),this.offsetToSourcePos(o.end))}]`})}return super.parseClassProperty(s)}parseClassPrivateProperty(s){return s.abstract&&this.raise(ae.PrivateElementHasAbstract,s),s.accessibility&&this.raise(ae.PrivateElementHasAccessibility,s,{modifier:s.accessibility}),this.parseClassPropertyAnnotation(s),super.parseClassPrivateProperty(s)}parseClassAccessorProperty(s){return this.parseClassPropertyAnnotation(s),s.optional&&this.raise(ae.AccessorCannotBeOptional,s),super.parseClassAccessorProperty(s)}pushClassMethod(s,o,h,S,P,C){const R=this.tsTryParseTypeParameters(this.tsParseConstModifier);R&&P&&this.raise(ae.ConstructorHasTypeParameters,R);const{declare:F=!1,kind:$}=o;F&&($==="get"||$==="set")&&this.raise(ae.DeclareAccessor,o,{kind:$}),R&&(o.typeParameters=R),super.pushClassMethod(s,o,h,S,P,C)}pushClassPrivateMethod(s,o,h,S){const P=this.tsTryParseTypeParameters(this.tsParseConstModifier);P&&(o.typeParameters=P),super.pushClassPrivateMethod(s,o,h,S)}declareClassPrivateMethodInScope(s,o){s.type!=="TSDeclareMethod"&&(s.type==="MethodDefinition"&&s.value.body==null||super.declareClassPrivateMethodInScope(s,o))}parseClassSuper(s){super.parseClassSuper(s),s.superClass&&(this.match(47)||this.match(51))&&(s.superTypeParameters=this.tsParseTypeArgumentsInExpression()),this.eatContextual(113)&&(s.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(s,o,h,S,P,C,R){const F=this.tsTryParseTypeParameters(this.tsParseConstModifier);return F&&(s.typeParameters=F),super.parseObjPropValue(s,o,h,S,P,C,R)}parseFunctionParams(s,o){const h=this.tsTryParseTypeParameters(this.tsParseConstModifier);h&&(s.typeParameters=h),super.parseFunctionParams(s,o)}parseVarId(s,o){super.parseVarId(s,o),s.id.type==="Identifier"&&!this.hasPrecedingLineBreak()&&this.eat(35)&&(s.definite=!0);const h=this.tsTryParseTypeAnnotation();h&&(s.id.typeAnnotation=h,this.resetEndLocation(s.id))}parseAsyncArrowFromCallExpression(s,o){return this.match(14)&&(s.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(s,o)}parseMaybeAssign(s,o){var h,S,P,C,R;let F,$,q;if(this.hasPlugin("jsx")&&(this.match(143)||this.match(47))){if(F=this.state.clone(),$=this.tryParse(()=>super.parseMaybeAssign(s,o),F),!$.error)return $.node;const{context:oe}=this.state,me=oe[oe.length-1];(me===I.j_oTag||me===I.j_expr)&&oe.pop()}if(!((h=$)!=null&&h.error)&&!this.match(47))return super.parseMaybeAssign(s,o);(!F||F===this.state)&&(F=this.state.clone());let J;const ee=this.tryParse(oe=>{var me,Me;J=this.tsParseTypeParameters(this.tsParseConstModifier);const ye=super.parseMaybeAssign(s,o);return(ye.type!=="ArrowFunctionExpression"||(me=ye.extra)!=null&&me.parenthesized)&&oe(),((Me=J)==null?void 0:Me.params.length)!==0&&this.resetStartLocationFromNode(ye,J),ye.typeParameters=J,ye},F);if(!ee.error&&!ee.aborted)return J&&this.reportReservedArrowTypeParam(J),ee.node;if(!$&&(xu(!this.hasPlugin("jsx")),q=this.tryParse(()=>super.parseMaybeAssign(s,o),F),!q.error))return q.node;if((S=$)!=null&&S.node)return this.state=$.failState,$.node;if(ee.node)return this.state=ee.failState,J&&this.reportReservedArrowTypeParam(J),ee.node;if((P=q)!=null&&P.node)return this.state=q.failState,q.node;throw((C=$)==null?void 0:C.error)||ee.error||((R=q)==null?void 0:R.error)}reportReservedArrowTypeParam(s){var o;s.params.length===1&&!s.params[0].constraint&&!((o=s.extra)!=null&&o.trailingComma)&&this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(ae.ReservedArrowTypeParam,s)}parseMaybeUnary(s,o){return!this.hasPlugin("jsx")&&this.match(47)?this.tsParseTypeAssertion():super.parseMaybeUnary(s,o)}parseArrow(s){if(this.match(14)){const o=this.tryParse(h=>{const S=this.tsParseTypeOrTypePredicateAnnotation(14);return(this.canInsertSemicolon()||!this.match(19))&&h(),S});if(o.aborted)return;o.thrown||(o.error&&(this.state=o.failState),s.returnType=o.node)}return super.parseArrow(s)}parseFunctionParamType(s){this.eat(17)&&(s.optional=!0);const o=this.tsTryParseTypeAnnotation();return o&&(s.typeAnnotation=o),this.resetEndLocation(s),s}isAssignable(s,o){switch(s.type){case"TSTypeCastExpression":return this.isAssignable(s.expression,o);case"TSParameterProperty":return!0;default:return super.isAssignable(s,o)}}toAssignable(s,o=!1){switch(s.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(s,o);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":o?this.expressionScope.recordArrowParameterBindingError(ae.UnexpectedTypeCastInParameter,s):this.raise(ae.UnexpectedTypeCastInParameter,s),this.toAssignable(s.expression,o);break;case"AssignmentExpression":!o&&s.left.type==="TSTypeCastExpression"&&(s.left=this.typeCastToParameter(s.left));default:super.toAssignable(s,o)}}toAssignableParenthesizedExpression(s,o){switch(s.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(s.expression,o);break;default:super.toAssignable(s,o)}}checkToRestConversion(s,o){switch(s.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(s.expression,!1);break;default:super.checkToRestConversion(s,o)}}isValidLVal(s,o,h){switch(s){case"TSTypeCastExpression":return!0;case"TSParameterProperty":return"parameter";case"TSNonNullExpression":return"expression";case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":return(h!==64||!o)&&["expression",!0];default:return super.isValidLVal(s,o,h)}}parseBindingAtom(){return this.state.type===78?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(s,o){if(this.match(47)||this.match(51)){const h=this.tsParseTypeArgumentsInExpression();if(this.match(10)){const S=super.parseMaybeDecoratorArguments(s,o);return S.typeParameters=h,S}this.unexpected(null,10)}return super.parseMaybeDecoratorArguments(s,o)}checkCommaAfterRest(s){return this.state.isAmbientContext&&this.match(12)&&this.lookaheadCharCode()===s?(this.next(),!1):super.checkCommaAfterRest(s)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(35)||this.match(14)||super.isClassProperty()}parseMaybeDefault(s,o){const h=super.parseMaybeDefault(s,o);return h.type==="AssignmentPattern"&&h.typeAnnotation&&h.right.start<h.typeAnnotation.start&&this.raise(ae.TypeAnnotationAfterAssign,h.typeAnnotation),h}getTokenFromCode(s){if(this.state.inType){if(s===62){this.finishOp(48,1);return}if(s===60){this.finishOp(47,1);return}}super.getTokenFromCode(s)}reScan_lt_gt(){const{type:s}=this.state;s===47?(this.state.pos-=1,this.readToken_lt()):s===48&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){const{type:s}=this.state;return s===51?(this.state.pos-=2,this.finishOp(47,1),47):s}toAssignableListItem(s,o,h){const S=s[o];S.type==="TSTypeCastExpression"&&(s[o]=this.typeCastToParameter(S)),super.toAssignableListItem(s,o,h)}typeCastToParameter(s){return s.expression.typeAnnotation=s.typeAnnotation,this.resetEndLocation(s.expression,s.typeAnnotation.loc.end),s.expression}shouldParseArrow(s){return this.match(14)?s.every(o=>this.isAssignable(o,!0)):super.shouldParseArrow(s)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(s){if(this.match(47)||this.match(51)){const o=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());o&&(s.typeParameters=o)}return super.jsxParseOpeningElementAfterName(s)}getGetterSetterExpectedParamCount(s){const o=super.getGetterSetterExpectedParamCount(s),S=this.getObjectOrClassMethodParams(s)[0];return S&&this.isThisParam(S)?o+1:o}parseCatchClauseParam(){const s=super.parseCatchClauseParam(),o=this.tsTryParseTypeAnnotation();return o&&(s.typeAnnotation=o,this.resetEndLocation(s)),s}tsInAmbientContext(s){const{isAmbientContext:o,strict:h}=this.state;this.state.isAmbientContext=!0,this.state.strict=!1;try{return s()}finally{this.state.isAmbientContext=o,this.state.strict=h}}parseClass(s,o,h){const S=this.state.inAbstractClass;this.state.inAbstractClass=!!s.abstract;try{return super.parseClass(s,o,h)}finally{this.state.inAbstractClass=S}}tsParseAbstractDeclaration(s,o){if(this.match(80))return s.abstract=!0,this.maybeTakeDecorators(o,this.parseClass(s,!0,!1));if(this.isContextual(129)){if(!this.hasFollowingLineBreak())return s.abstract=!0,this.raise(ae.NonClassMethodPropertyHasAbstractModifier,s),this.tsParseInterfaceDeclaration(s)}else this.unexpected(null,80)}parseMethod(s,o,h,S,P,C,R){const F=super.parseMethod(s,o,h,S,P,C,R);if((F.abstract||F.type==="TSAbstractMethodDefinition")&&(this.hasPlugin("estree")?F.value:F).body){const{key:J}=F;this.raise(ae.AbstractMethodHasImplementation,F,{methodName:J.type==="Identifier"&&!F.computed?J.name:`[${this.input.slice(this.offsetToSourcePos(J.start),this.offsetToSourcePos(J.end))}]`})}return F}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(s,o,h,S){return!o&&S?(this.parseTypeOnlyImportExportSpecifier(s,!1,h),this.finishNode(s,"ExportSpecifier")):(s.exportKind="value",super.parseExportSpecifier(s,o,h,S))}parseImportSpecifier(s,o,h,S,P){return!o&&S?(this.parseTypeOnlyImportExportSpecifier(s,!0,h),this.finishNode(s,"ImportSpecifier")):(s.importKind="value",super.parseImportSpecifier(s,o,h,S,h?4098:4096))}parseTypeOnlyImportExportSpecifier(s,o,h){const S=o?"imported":"local",P=o?"local":"exported";let C=s[S],R,F=!1,$=!0;const q=C.loc.start;if(this.isContextual(93)){const ee=this.parseIdentifier();if(this.isContextual(93)){const oe=this.parseIdentifier();ce(this.state.type)?(F=!0,C=ee,R=o?this.parseIdentifier():this.parseModuleExportName(),$=!1):(R=oe,$=!1)}else ce(this.state.type)?($=!1,R=o?this.parseIdentifier():this.parseModuleExportName()):(F=!0,C=ee)}else ce(this.state.type)&&(F=!0,o?(C=this.parseIdentifier(!0),this.isContextual(93)||this.checkReservedWord(C.name,C.loc.start,!0,!0)):C=this.parseModuleExportName());F&&h&&this.raise(o?ae.TypeModifierIsUsedInTypeImports:ae.TypeModifierIsUsedInTypeExports,q),s[S]=C,s[P]=R;const J=o?"importKind":"exportKind";s[J]=F?"type":"value",$&&this.eatContextual(93)&&(s[P]=o?this.parseIdentifier():this.parseModuleExportName()),s[P]||(s[P]=this.cloneIdentifier(s[S])),o&&this.checkIdentifier(s[P],F?4098:4096)}fillOptionalPropertiesForTSESLint(s){var o,h,S,P,C,R,F,$,q,J,ee,oe,me,Me,ye,_e,gr,rr,Ru,Du,Fu,Bu,$u,Uu,qu,ju,Vu,zu,Wu,Gu,Hu,Xu,Ju,Ku,Yu,Qu,Zu,eh,th,rh,sh,ih,nh,ah,oh,lh;switch(s.type){case"ExpressionStatement":(o=s.directive)!=null||(s.directive=void 0);return;case"RestElement":s.value=void 0;case"Identifier":case"ArrayPattern":case"AssignmentPattern":case"ObjectPattern":(h=s.decorators)!=null||(s.decorators=[]),(S=s.optional)!=null||(s.optional=!1),(P=s.typeAnnotation)!=null||(s.typeAnnotation=void 0);return;case"TSParameterProperty":(C=s.accessibility)!=null||(s.accessibility=void 0),(R=s.decorators)!=null||(s.decorators=[]),(F=s.override)!=null||(s.override=!1),($=s.readonly)!=null||(s.readonly=!1),(q=s.static)!=null||(s.static=!1);return;case"TSEmptyBodyFunctionExpression":s.body=null;case"TSDeclareFunction":case"FunctionDeclaration":case"FunctionExpression":case"ClassMethod":case"ClassPrivateMethod":(J=s.declare)!=null||(s.declare=!1),(ee=s.returnType)!=null||(s.returnType=void 0),(oe=s.typeParameters)!=null||(s.typeParameters=void 0);return;case"Property":(me=s.optional)!=null||(s.optional=!1);return;case"TSMethodSignature":case"TSPropertySignature":(Me=s.optional)!=null||(s.optional=!1);case"TSIndexSignature":(ye=s.accessibility)!=null||(s.accessibility=void 0),(_e=s.readonly)!=null||(s.readonly=!1),(gr=s.static)!=null||(s.static=!1);return;case"TSAbstractPropertyDefinition":case"PropertyDefinition":case"TSAbstractAccessorProperty":case"AccessorProperty":(rr=s.declare)!=null||(s.declare=!1),(Ru=s.definite)!=null||(s.definite=!1),(Du=s.readonly)!=null||(s.readonly=!1),(Fu=s.typeAnnotation)!=null||(s.typeAnnotation=void 0);case"TSAbstractMethodDefinition":case"MethodDefinition":(Bu=s.accessibility)!=null||(s.accessibility=void 0),($u=s.decorators)!=null||(s.decorators=[]),(Uu=s.override)!=null||(s.override=!1),(qu=s.optional)!=null||(s.optional=!1);return;case"ClassExpression":(ju=s.id)!=null||(s.id=null);case"ClassDeclaration":(Vu=s.abstract)!=null||(s.abstract=!1),(zu=s.declare)!=null||(s.declare=!1),(Wu=s.decorators)!=null||(s.decorators=[]),(Gu=s.implements)!=null||(s.implements=[]),(Hu=s.superTypeArguments)!=null||(s.superTypeArguments=void 0),(Xu=s.typeParameters)!=null||(s.typeParameters=void 0);return;case"TSTypeAliasDeclaration":case"VariableDeclaration":(Ju=s.declare)!=null||(s.declare=!1);return;case"VariableDeclarator":(Ku=s.definite)!=null||(s.definite=!1);return;case"TSEnumDeclaration":(Yu=s.const)!=null||(s.const=!1),(Qu=s.declare)!=null||(s.declare=!1);return;case"TSEnumMember":(Zu=s.computed)!=null||(s.computed=!1);return;case"TSImportType":(eh=s.qualifier)!=null||(s.qualifier=null),(th=s.options)!=null||(s.options=null);return;case"TSInterfaceDeclaration":(rh=s.declare)!=null||(s.declare=!1),(sh=s.extends)!=null||(s.extends=[]);return;case"TSModuleDeclaration":(ih=s.declare)!=null||(s.declare=!1),(nh=s.global)!=null||(s.global=s.kind==="global");return;case"TSTypeParameter":(ah=s.const)!=null||(s.const=!1),(oh=s.in)!=null||(s.in=!1),(lh=s.out)!=null||(s.out=!1);return}}};function Uv(b){if(b.type!=="MemberExpression")return!1;const{computed:a,property:s}=b;return a&&s.type!=="StringLiteral"&&(s.type!=="TemplateLiteral"||s.expressions.length>0)?!1:Cu(b.object)}function qv(b,a){var s;const{type:o}=b;if((s=b.extra)!=null&&s.parenthesized)return!1;if(a){if(o==="Literal"){const{value:h}=b;if(typeof h=="string"||typeof h=="boolean")return!0}}else if(o==="StringLiteral"||o==="BooleanLiteral")return!0;return!!(Au(b,a)||jv(b,a)||o==="TemplateLiteral"&&b.expressions.length===0||Uv(b))}function Au(b,a){return a?b.type==="Literal"&&(typeof b.value=="number"||"bigint"in b):b.type==="NumericLiteral"||b.type==="BigIntLiteral"}function jv(b,a){if(b.type==="UnaryExpression"){const{operator:s,argument:o}=b;if(s==="-"&&Au(o,a))return!0}return!1}function Cu(b){return b.type==="Identifier"?!0:b.type!=="MemberExpression"||b.computed?!1:Cu(b.object)}const Iu=T`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."});var Vv=b=>class extends b{parsePlaceholder(s){if(this.match(133)){const o=this.startNode();return this.next(),this.assertNoSpace(),o.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(133),this.finishPlaceholder(o,s)}}finishPlaceholder(s,o){let h=s;return(!h.expectedNode||!h.type)&&(h=this.finishNode(h,"Placeholder")),h.expectedNode=o,h}getTokenFromCode(s){s===37&&this.input.charCodeAt(this.state.pos+1)===37?this.finishOp(133,2):super.getTokenFromCode(s)}parseExprAtom(s){return this.parsePlaceholder("Expression")||super.parseExprAtom(s)}parseIdentifier(s){return this.parsePlaceholder("Identifier")||super.parseIdentifier(s)}checkReservedWord(s,o,h,S){s!==void 0&&super.checkReservedWord(s,o,h,S)}cloneIdentifier(s){const o=super.cloneIdentifier(s);return o.type==="Placeholder"&&(o.expectedNode=s.expectedNode),o}cloneStringLiteral(s){return s.type==="Placeholder"?this.cloneIdentifier(s):super.cloneStringLiteral(s)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(s,o,h){return s==="Placeholder"||super.isValidLVal(s,o,h)}toAssignable(s,o){s&&s.type==="Placeholder"&&s.expectedNode==="Expression"?s.expectedNode="Pattern":super.toAssignable(s,o)}chStartsBindingIdentifier(s,o){return!!(super.chStartsBindingIdentifier(s,o)||this.lookahead().type===133)}verifyBreakContinue(s,o){s.label&&s.label.type==="Placeholder"||super.verifyBreakContinue(s,o)}parseExpressionStatement(s,o){var h;if(o.type!=="Placeholder"||(h=o.extra)!=null&&h.parenthesized)return super.parseExpressionStatement(s,o);if(this.match(14)){const P=s;return P.label=this.finishPlaceholder(o,"Identifier"),this.next(),P.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(P,"LabeledStatement")}this.semicolon();const S=s;return S.name=o.name,this.finishPlaceholder(S,"Statement")}parseBlock(s,o,h){return this.parsePlaceholder("BlockStatement")||super.parseBlock(s,o,h)}parseFunctionId(s){return this.parsePlaceholder("Identifier")||super.parseFunctionId(s)}parseClass(s,o,h){const S=o?"ClassDeclaration":"ClassExpression";this.next();const P=this.state.strict,C=this.parsePlaceholder("Identifier");if(C)if(this.match(81)||this.match(133)||this.match(5))s.id=C;else{if(h||!o)return s.id=null,s.body=this.finishPlaceholder(C,"ClassBody"),this.finishNode(s,S);throw this.raise(Iu.ClassNameIsRequired,this.state.startLoc)}else this.parseClassId(s,o,h);return super.parseClassSuper(s),s.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!s.superClass,P),this.finishNode(s,S)}parseExport(s,o){const h=this.parsePlaceholder("Identifier");if(!h)return super.parseExport(s,o);const S=s;if(!this.isContextual(98)&&!this.match(12))return S.specifiers=[],S.source=null,S.declaration=this.finishPlaceholder(h,"Declaration"),this.finishNode(S,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");const P=this.startNode();return P.exported=h,S.specifiers=[this.finishNode(P,"ExportDefaultSpecifier")],super.parseExport(S,o)}isExportDefaultSpecifier(){if(this.match(65)){const s=this.nextTokenStart();if(this.isUnparsedContextual(s,"from")&&this.input.startsWith(nt(133),this.nextTokenStartSince(s+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(s,o){var h;return(h=s.specifiers)!=null&&h.length?!0:super.maybeParseExportDefaultSpecifier(s,o)}checkExport(s){const{specifiers:o}=s;o!=null&&o.length&&(s.specifiers=o.filter(h=>h.exported.type==="Placeholder")),super.checkExport(s),s.specifiers=o}parseImport(s){const o=this.parsePlaceholder("Identifier");if(!o)return super.parseImport(s);if(s.specifiers=[],!this.isContextual(98)&&!this.match(12))return s.source=this.finishPlaceholder(o,"StringLiteral"),this.semicolon(),this.finishNode(s,"ImportDeclaration");const h=this.startNodeAtNode(o);return h.local=o,s.specifiers.push(this.finishNode(h,"ImportDefaultSpecifier")),this.eat(12)&&(this.maybeParseStarImportSpecifier(s)||this.parseNamedImportSpecifiers(s)),this.expectContextual(98),s.source=this.parseImportSource(),this.semicolon(),this.finishNode(s,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource()}assertNoSpace(){this.state.start>this.offsetToSourcePos(this.state.lastTokEndLoc.index)&&this.raise(Iu.UnexpectedSpace,this.state.lastTokEndLoc)}},zv=b=>class extends b{parseV8Intrinsic(){if(this.match(54)){const s=this.state.startLoc,o=this.startNode();if(this.next(),Y(this.state.type)){const h=this.parseIdentifierName(),S=this.createIdentifier(o,h);if(this.castNodeTo(S,"V8IntrinsicIdentifier"),this.match(10))return S}this.unexpected(s)}}parseExprAtom(s){return this.parseV8Intrinsic()||super.parseExprAtom(s)}};const Nu=["minimal","fsharp","hack","smart"],Ou=["^^","@@","^","%","#"];function Wv(b){if(b.has("decorators")){if(b.has("decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");const o=b.get("decorators").decoratorsBeforeExport;if(o!=null&&typeof o!="boolean")throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");const h=b.get("decorators").allowCallParenthesized;if(h!=null&&typeof h!="boolean")throw new Error("'allowCallParenthesized' must be a boolean.")}if(b.has("flow")&&b.has("typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(b.has("placeholders")&&b.has("v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(b.has("pipelineOperator")){var a;const o=b.get("pipelineOperator").proposal;if(!Nu.includes(o)){const h=Nu.map(S=>`"${S}"`).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${h}.`)}if(o==="hack"){if(b.has("placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(b.has("v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");const h=b.get("pipelineOperator").topicToken;if(!Ou.includes(h)){const S=Ou.map(P=>`"${P}"`).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${S}.`)}{var s;if(h==="#"&&((s=b.get("recordAndTuple"))==null?void 0:s.syntaxType)==="hash")throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "hack", topicToken: "#" }]\` and \`${JSON.stringify(["recordAndTuple",b.get("recordAndTuple")])}\`.`)}}else if(o==="smart"&&((a=b.get("recordAndTuple"))==null?void 0:a.syntaxType)==="hash")throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "smart" }]\` and \`${JSON.stringify(["recordAndTuple",b.get("recordAndTuple")])}\`.`)}if(b.has("moduleAttributes")){if(b.has("deprecatedImportAssert")||b.has("importAssertions"))throw new Error("Cannot combine importAssertions, deprecatedImportAssert and moduleAttributes plugins.");if(b.get("moduleAttributes").version!=="may-2020")throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.")}if(b.has("importAssertions")&&b.has("deprecatedImportAssert"))throw new Error("Cannot combine importAssertions and deprecatedImportAssert plugins.");if(!b.has("deprecatedImportAssert")&&b.has("importAttributes")&&b.get("importAttributes").deprecatedAssertSyntax&&b.set("deprecatedImportAssert",{}),b.has("recordAndTuple")){const o=b.get("recordAndTuple").syntaxType;if(o!=null){const h=["hash","bar"];if(!h.includes(o))throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: "+h.map(S=>`'${S}'`).join(", "))}}if(b.has("asyncDoExpressions")&&!b.has("doExpressions")){const o=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw o.missingPlugins="doExpressions",o}if(b.has("optionalChainingAssign")&&b.get("optionalChainingAssign").version!=="2023-07")throw new Error("The 'optionalChainingAssign' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is '2023-07'.")}const ku={estree:D,jsx:mv,flow:hv,typescript:$v,v8intrinsic:zv,placeholders:Vv},Gv=Object.keys(ku);class Hv extends Rv{checkProto(a,s,o,h){if(a.type==="SpreadElement"||this.isObjectMethod(a)||a.computed||a.shorthand)return o;const S=a.key;return(S.type==="Identifier"?S.name:S.value)==="__proto__"?s?(this.raise(E.RecordNoProto,S),!0):(o&&(h?h.doubleProtoLoc===null&&(h.doubleProtoLoc=S.loc.start):this.raise(E.DuplicateProto,S)),!0):o}shouldExitDescending(a,s){return a.type==="ArrowFunctionExpression"&&this.offsetToSourcePos(a.start)===s}getExpression(){if(this.enterInitialScopes(),this.nextToken(),this.match(140))throw this.raise(E.ParseExpressionEmptyInput,this.state.startLoc);const a=this.parseExpression();if(!this.match(140))throw this.raise(E.ParseExpressionExpectsEOF,this.state.startLoc,{unexpected:this.input.codePointAt(this.state.start)});return this.finalizeRemainingComments(),a.comments=this.comments,a.errors=this.state.errors,this.optionFlags&256&&(a.tokens=this.tokens),a}parseExpression(a,s){return a?this.disallowInAnd(()=>this.parseExpressionBase(s)):this.allowInAnd(()=>this.parseExpressionBase(s))}parseExpressionBase(a){const s=this.state.startLoc,o=this.parseMaybeAssign(a);if(this.match(12)){const h=this.startNodeAt(s);for(h.expressions=[o];this.eat(12);)h.expressions.push(this.parseMaybeAssign(a));return this.toReferencedList(h.expressions),this.finishNode(h,"SequenceExpression")}return o}parseMaybeAssignDisallowIn(a,s){return this.disallowInAnd(()=>this.parseMaybeAssign(a,s))}parseMaybeAssignAllowIn(a,s){return this.allowInAnd(()=>this.parseMaybeAssign(a,s))}setOptionalParametersError(a){a.optionalParametersLoc=this.state.startLoc}parseMaybeAssign(a,s){const o=this.state.startLoc,h=this.isContextual(108);if(h&&this.prodParam.hasYield){this.next();let R=this.parseYield(o);return s&&(R=s.call(this,R,o)),R}let S;a?S=!1:(a=new di,S=!0);const{type:P}=this.state;(P===10||Y(P))&&(this.state.potentialArrowAt=this.state.start);let C=this.parseMaybeConditional(a);if(s&&(C=s.call(this,C,o)),it(this.state.type)){const R=this.startNodeAt(o),F=this.state.value;if(R.operator=F,this.match(29)){this.toAssignable(C,!0),R.left=C;const $=o.index;a.doubleProtoLoc!=null&&a.doubleProtoLoc.index>=$&&(a.doubleProtoLoc=null),a.shorthandAssignLoc!=null&&a.shorthandAssignLoc.index>=$&&(a.shorthandAssignLoc=null),a.privateKeyLoc!=null&&a.privateKeyLoc.index>=$&&(this.checkDestructuringPrivate(a),a.privateKeyLoc=null)}else R.left=C;return this.next(),R.right=this.parseMaybeAssign(),this.checkLVal(C,this.finishNode(R,"AssignmentExpression")),R}else S&&this.checkExpressionErrors(a,!0);if(h){const{type:R}=this.state;if((this.hasPlugin("v8intrinsic")?be(R):be(R)&&!this.match(54))&&!this.isAmbiguousPrefixOrIdentifier())return this.raiseOverwrite(E.YieldNotInGeneratorFunction,o),this.parseYield(o)}return C}parseMaybeConditional(a){const s=this.state.startLoc,o=this.state.potentialArrowAt,h=this.parseExprOps(a);return this.shouldExitDescending(h,o)?h:this.parseConditional(h,s,a)}parseConditional(a,s,o){if(this.eat(17)){const h=this.startNodeAt(s);return h.test=a,h.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),h.alternate=this.parseMaybeAssign(),this.finishNode(h,"ConditionalExpression")}return a}parseMaybeUnaryOrPrivate(a){return this.match(139)?this.parsePrivateName():this.parseMaybeUnary(a)}parseExprOps(a){const s=this.state.startLoc,o=this.state.potentialArrowAt,h=this.parseMaybeUnaryOrPrivate(a);return this.shouldExitDescending(h,o)?h:this.parseExprOp(h,s,-1)}parseExprOp(a,s,o){if(this.isPrivateName(a)){const S=this.getPrivateNameSV(a);(o>=qr(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise(E.PrivateInExpectedIn,a,{identifierName:S}),this.classScope.usePrivateName(S,a.loc.start)}const h=this.state.type;if(mt(h)&&(this.prodParam.hasIn||!this.match(58))){let S=qr(h);if(S>o){if(h===39){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return a;this.checkPipelineAtInfixOperator(a,s)}const P=this.startNodeAt(s);P.left=a,P.operator=this.state.value;const C=h===41||h===42,R=h===40;if(R&&(S=qr(42)),this.next(),h===39&&this.hasPlugin(["pipelineOperator",{proposal:"minimal"}])&&this.state.type===96&&this.prodParam.hasAwait)throw this.raise(E.UnexpectedAwaitAfterPipelineBody,this.state.startLoc);P.right=this.parseExprOpRightExpr(h,S);const F=this.finishNode(P,C||R?"LogicalExpression":"BinaryExpression"),$=this.state.type;if(R&&($===41||$===42)||C&&$===40)throw this.raise(E.MixingCoalesceWithLogical,this.state.startLoc);return this.parseExprOp(F,s,o)}}return a}parseExprOpRightExpr(a,s){const o=this.state.startLoc;switch(a){case 39:switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext(()=>this.parseHackPipeBody());case"fsharp":return this.withSoloAwaitPermittingContext(()=>this.parseFSharpPipelineBody(s))}if(this.getPluginOption("pipelineOperator","proposal")==="smart")return this.withTopicBindingContext(()=>{if(this.prodParam.hasYield&&this.isContextual(108))throw this.raise(E.PipeBodyIsTighter,this.state.startLoc);return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(a,s),o)});default:return this.parseExprOpBaseRightExpr(a,s)}}parseExprOpBaseRightExpr(a,s){const o=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),o,Ca(a)?s-1:s)}parseHackPipeBody(){var a;const{startLoc:s}=this.state,o=this.parseMaybeAssign();return m.has(o.type)&&!((a=o.extra)!=null&&a.parenthesized)&&this.raise(E.PipeUnparenthesizedBody,s,{type:o.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(E.PipeTopicUnused,s),o}checkExponentialAfterUnary(a){this.match(57)&&this.raise(E.UnexpectedTokenUnaryExponentiation,a.argument)}parseMaybeUnary(a,s){const o=this.state.startLoc,h=this.isContextual(96);if(h&&this.recordAwaitIfAllowed()){this.next();const R=this.parseAwait(o);return s||this.checkExponentialAfterUnary(R),R}const S=this.match(34),P=this.startNode();if(Nt(this.state.type)){P.operator=this.state.value,P.prefix=!0,this.match(72)&&this.expectPlugin("throwExpressions");const R=this.match(89);if(this.next(),P.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(a,!0),this.state.strict&&R){const F=P.argument;F.type==="Identifier"?this.raise(E.StrictDelete,P):this.hasPropertyAsPrivateName(F)&&this.raise(E.DeletePrivateField,P)}if(!S)return s||this.checkExponentialAfterUnary(P),this.finishNode(P,"UnaryExpression")}const C=this.parseUpdate(P,S,a);if(h){const{type:R}=this.state;if((this.hasPlugin("v8intrinsic")?be(R):be(R)&&!this.match(54))&&!this.isAmbiguousPrefixOrIdentifier())return this.raiseOverwrite(E.AwaitNotInAsyncContext,o),this.parseAwait(o)}return C}parseUpdate(a,s,o){if(s){const P=a;return this.checkLVal(P.argument,this.finishNode(P,"UpdateExpression")),a}const h=this.state.startLoc;let S=this.parseExprSubscripts(o);if(this.checkExpressionErrors(o,!1))return S;for(;yt(this.state.type)&&!this.canInsertSemicolon();){const P=this.startNodeAt(h);P.operator=this.state.value,P.prefix=!1,P.argument=S,this.next(),this.checkLVal(S,S=this.finishNode(P,"UpdateExpression"))}return S}parseExprSubscripts(a){const s=this.state.startLoc,o=this.state.potentialArrowAt,h=this.parseExprAtom(a);return this.shouldExitDescending(h,o)?h:this.parseSubscripts(h,s)}parseSubscripts(a,s,o){const h={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(a),stop:!1};do a=this.parseSubscript(a,s,o,h),h.maybeAsyncArrow=!1;while(!h.stop);return a}parseSubscript(a,s,o,h){const{type:S}=this.state;if(!o&&S===15)return this.parseBind(a,s,o,h);if(jr(S))return this.parseTaggedTemplateExpression(a,s,h);let P=!1;if(S===18){if(o&&(this.raise(E.OptionalChainingNoNew,this.state.startLoc),this.lookaheadCharCode()===40))return this.stopParseSubscript(a,h);h.optionalChainMember=P=!0,this.next()}if(!o&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(a,s,h,P);{const C=this.eat(0);return C||P||this.eat(16)?this.parseMember(a,s,h,C,P):this.stopParseSubscript(a,h)}}stopParseSubscript(a,s){return s.stop=!0,a}parseMember(a,s,o,h,S){const P=this.startNodeAt(s);return P.object=a,P.computed=h,h?(P.property=this.parseExpression(),this.expect(3)):this.match(139)?(a.type==="Super"&&this.raise(E.SuperPrivateField,s),this.classScope.usePrivateName(this.state.value,this.state.startLoc),P.property=this.parsePrivateName()):P.property=this.parseIdentifier(!0),o.optionalChainMember?(P.optional=S,this.finishNode(P,"OptionalMemberExpression")):this.finishNode(P,"MemberExpression")}parseBind(a,s,o,h){const S=this.startNodeAt(s);return S.object=a,this.next(),S.callee=this.parseNoCallExpr(),h.stop=!0,this.parseSubscripts(this.finishNode(S,"BindExpression"),s,o)}parseCoverCallAndAsyncArrowHead(a,s,o,h){const S=this.state.maybeInArrowParameters;let P=null;this.state.maybeInArrowParameters=!0,this.next();const C=this.startNodeAt(s);C.callee=a;const{maybeAsyncArrow:R,optionalChainMember:F}=o;R&&(this.expressionScope.enter(kv()),P=new di),F&&(C.optional=h),h?C.arguments=this.parseCallExpressionArguments(11):C.arguments=this.parseCallExpressionArguments(11,a.type!=="Super",C,P);let $=this.finishCallExpression(C,F);return R&&this.shouldParseAsyncArrow()&&!h?(o.stop=!0,this.checkDestructuringPrivate(P),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),$=this.parseAsyncArrowFromCallExpression(this.startNodeAt(s),$)):(R&&(this.checkExpressionErrors(P,!0),this.expressionScope.exit()),this.toReferencedArguments($)),this.state.maybeInArrowParameters=S,$}toReferencedArguments(a,s){this.toReferencedListDeep(a.arguments,s)}parseTaggedTemplateExpression(a,s,o){const h=this.startNodeAt(s);return h.tag=a,h.quasi=this.parseTemplate(!0),o.optionalChainMember&&this.raise(E.OptionalChainingNoTemplate,s),this.finishNode(h,"TaggedTemplateExpression")}atPossibleAsyncArrow(a){return a.type==="Identifier"&&a.name==="async"&&this.state.lastTokEndLoc.index===a.end&&!this.canInsertSemicolon()&&a.end-a.start===5&&this.offsetToSourcePos(a.start)===this.state.potentialArrowAt}finishCallExpression(a,s){if(a.callee.type==="Import")if(a.arguments.length===0||a.arguments.length>2)this.raise(E.ImportCallArity,a);else for(const o of a.arguments)o.type==="SpreadElement"&&this.raise(E.ImportCallSpreadArgument,o);return this.finishNode(a,s?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(a,s,o,h){const S=[];let P=!0;const C=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(a);){if(P)P=!1;else if(this.expect(12),this.match(a)){o&&this.addTrailingCommaExtraToNode(o),this.next();break}S.push(this.parseExprListItem(!1,h,s))}return this.state.inFSharpPipelineDirectBody=C,S}shouldParseAsyncArrow(){return this.match(19)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(a,s){var o;return this.resetPreviousNodeTrailingComments(s),this.expect(19),this.parseArrowExpression(a,s.arguments,!0,(o=s.extra)==null?void 0:o.trailingCommaLoc),s.innerComments&&Es(a,s.innerComments),s.callee.trailingComments&&Es(a,s.callee.trailingComments),a}parseNoCallExpr(){const a=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),a,!0)}parseExprAtom(a){let s,o=null;const{type:h}=this.state;switch(h){case 79:return this.parseSuper();case 83:return s=this.startNode(),this.next(),this.match(16)?this.parseImportMetaPropertyOrPhaseCall(s):this.match(10)?this.optionFlags&512?this.parseImportCall(s):this.finishNode(s,"Import"):(this.raise(E.UnsupportedImport,this.state.lastTokStartLoc),this.finishNode(s,"Import"));case 78:return s=this.startNode(),this.next(),this.finishNode(s,"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:{const S=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(S)}case 0:return this.parseArrayLike(3,!0,!1,a);case 5:return this.parseObjectLike(8,!1,!1,a);case 68:return this.parseFunctionOrFunctionSent();case 26:o=this.parseDecorators();case 80:return this.parseClass(this.maybeTakeDecorators(o,this.startNode()),!1);case 77:return this.parseNewOrNewTarget();case 25:case 24:return this.parseTemplate(!1);case 15:{s=this.startNode(),this.next(),s.object=null;const S=s.callee=this.parseNoCallExpr();if(S.type==="MemberExpression")return this.finishNode(s,"BindExpression");throw this.raise(E.UnsupportedBind,S)}case 139:return this.raise(E.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:{const S=this.getPluginOption("pipelineOperator","proposal");if(S)return this.parseTopicReference(S);this.unexpected();break}case 47:{const S=this.input.codePointAt(this.nextTokenStart());jt(S)||S===62?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected();break}default:{if(h===137)return this.parseDecimalLiteral(this.state.value);if(h===2||h===1)return this.parseArrayLike(this.state.type===2?4:3,!1,!0);if(h===6||h===7)return this.parseObjectLike(this.state.type===6?9:8,!1,!0)}if(Y(h)){if(this.isContextual(127)&&this.lookaheadInLineCharCode()===123)return this.parseModuleExpression();const S=this.state.potentialArrowAt===this.state.start,P=this.state.containsEsc,C=this.parseIdentifier();if(!P&&C.name==="async"&&!this.canInsertSemicolon()){const{type:R}=this.state;if(R===68)return this.resetPreviousNodeTrailingComments(C),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(C));if(Y(R))return this.lookaheadCharCode()===61?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(C)):C;if(R===90)return this.resetPreviousNodeTrailingComments(C),this.parseDo(this.startNodeAtNode(C),!0)}return S&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(C),[C],!1)):C}else this.unexpected()}}parseTopicReferenceThenEqualsSign(a,s){const o=this.getPluginOption("pipelineOperator","proposal");if(o)return this.state.type=a,this.state.value=s,this.state.pos--,this.state.end--,this.state.endLoc=i(this.state.endLoc,-1),this.parseTopicReference(o);this.unexpected()}parseTopicReference(a){const s=this.startNode(),o=this.state.startLoc,h=this.state.type;return this.next(),this.finishTopicReference(s,o,a,h)}finishTopicReference(a,s,o,h){if(this.testTopicReferenceConfiguration(o,s,h))return o==="hack"?(this.topicReferenceIsAllowedInCurrentContext()||this.raise(E.PipeTopicUnbound,s),this.registerTopicReference(),this.finishNode(a,"TopicReference")):(this.topicReferenceIsAllowedInCurrentContext()||this.raise(E.PrimaryTopicNotAllowed,s),this.registerTopicReference(),this.finishNode(a,"PipelinePrimaryTopicReference"));throw this.raise(E.PipeTopicUnconfiguredToken,s,{token:nt(h)})}testTopicReferenceConfiguration(a,s,o){switch(a){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:nt(o)}]);case"smart":return o===27;default:throw this.raise(E.PipeTopicRequiresHackPipes,s)}}parseAsyncArrowUnaryFunction(a){this.prodParam.enter(hi(!0,this.prodParam.hasYield));const s=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(E.LineTerminatorBeforeArrow,this.state.curPosition()),this.expect(19),this.parseArrowExpression(a,s,!0)}parseDo(a,s){this.expectPlugin("doExpressions"),s&&this.expectPlugin("asyncDoExpressions"),a.async=s,this.next();const o=this.state.labels;return this.state.labels=[],s?(this.prodParam.enter(2),a.body=this.parseBlock(),this.prodParam.exit()):a.body=this.parseBlock(),this.state.labels=o,this.finishNode(a,"DoExpression")}parseSuper(){const a=this.startNode();return this.next(),this.match(10)&&!this.scope.allowDirectSuper&&!(this.optionFlags&16)?this.raise(E.SuperNotAllowed,a):!this.scope.allowSuper&&!(this.optionFlags&16)&&this.raise(E.UnexpectedSuper,a),!this.match(10)&&!this.match(0)&&!this.match(16)&&this.raise(E.UnsupportedSuper,a),this.finishNode(a,"Super")}parsePrivateName(){const a=this.startNode(),s=this.startNodeAt(i(this.state.startLoc,1)),o=this.state.value;return this.next(),a.id=this.createIdentifier(s,o),this.finishNode(a,"PrivateName")}parseFunctionOrFunctionSent(){const a=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(16)){const s=this.createIdentifier(this.startNodeAtNode(a),"function");return this.next(),this.match(103)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected(),this.parseMetaProperty(a,s,"sent")}return this.parseFunction(a)}parseMetaProperty(a,s,o){a.meta=s;const h=this.state.containsEsc;return a.property=this.parseIdentifier(!0),(a.property.name!==o||h)&&this.raise(E.UnsupportedMetaProperty,a.property,{target:s.name,onlyValidPropertyName:o}),this.finishNode(a,"MetaProperty")}parseImportMetaPropertyOrPhaseCall(a){if(this.next(),this.isContextual(105)||this.isContextual(97)){const s=this.isContextual(105);return this.expectPlugin(s?"sourcePhaseImports":"deferredImportEvaluation"),this.next(),a.phase=s?"source":"defer",this.parseImportCall(a)}else{const s=this.createIdentifierAt(this.startNodeAtNode(a),"import",this.state.lastTokStartLoc);return this.isContextual(101)&&(this.inModule||this.raise(E.ImportMetaOutsideModule,s),this.sawUnambiguousESM=!0),this.parseMetaProperty(a,s,"meta")}}parseLiteralAtNode(a,s,o){return this.addExtra(o,"rawValue",a),this.addExtra(o,"raw",this.input.slice(this.offsetToSourcePos(o.start),this.state.end)),o.value=a,this.next(),this.finishNode(o,s)}parseLiteral(a,s){const o=this.startNode();return this.parseLiteralAtNode(a,s,o)}parseStringLiteral(a){return this.parseLiteral(a,"StringLiteral")}parseNumericLiteral(a){return this.parseLiteral(a,"NumericLiteral")}parseBigIntLiteral(a){return this.parseLiteral(a,"BigIntLiteral")}parseDecimalLiteral(a){return this.parseLiteral(a,"DecimalLiteral")}parseRegExpLiteral(a){const s=this.startNode();return this.addExtra(s,"raw",this.input.slice(this.offsetToSourcePos(s.start),this.state.end)),s.pattern=a.pattern,s.flags=a.flags,this.next(),this.finishNode(s,"RegExpLiteral")}parseBooleanLiteral(a){const s=this.startNode();return s.value=a,this.next(),this.finishNode(s,"BooleanLiteral")}parseNullLiteral(){const a=this.startNode();return this.next(),this.finishNode(a,"NullLiteral")}parseParenAndDistinguishExpression(a){const s=this.state.startLoc;let o;this.next(),this.expressionScope.enter(Ov());const h=this.state.maybeInArrowParameters,S=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;const P=this.state.startLoc,C=[],R=new di;let F=!0,$,q;for(;!this.match(11);){if(F)F=!1;else if(this.expect(12,R.optionalParametersLoc===null?null:R.optionalParametersLoc),this.match(11)){q=this.state.startLoc;break}if(this.match(21)){const oe=this.state.startLoc;if($=this.state.startLoc,C.push(this.parseParenItem(this.parseRestBinding(),oe)),!this.checkCommaAfterRest(41))break}else C.push(this.parseMaybeAssignAllowIn(R,this.parseParenItem))}const J=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=h,this.state.inFSharpPipelineDirectBody=S;let ee=this.startNodeAt(s);return a&&this.shouldParseArrow(C)&&(ee=this.parseArrow(ee))?(this.checkDestructuringPrivate(R),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(ee,C,!1),ee):(this.expressionScope.exit(),C.length||this.unexpected(this.state.lastTokStartLoc),q&&this.unexpected(q),$&&this.unexpected($),this.checkExpressionErrors(R,!0),this.toReferencedListDeep(C,!0),C.length>1?(o=this.startNodeAt(P),o.expressions=C,this.finishNode(o,"SequenceExpression"),this.resetEndLocation(o,J)):o=C[0],this.wrapParenthesis(s,o))}wrapParenthesis(a,s){if(!(this.optionFlags&1024))return this.addExtra(s,"parenthesized",!0),this.addExtra(s,"parenStart",a.index),this.takeSurroundingComments(s,a.index,this.state.lastTokEndLoc.index),s;const o=this.startNodeAt(a);return o.expression=s,this.finishNode(o,"ParenthesizedExpression")}shouldParseArrow(a){return!this.canInsertSemicolon()}parseArrow(a){if(this.eat(19))return a}parseParenItem(a,s){return a}parseNewOrNewTarget(){const a=this.startNode();if(this.next(),this.match(16)){const s=this.createIdentifier(this.startNodeAtNode(a),"new");this.next();const o=this.parseMetaProperty(a,s,"target");return!this.scope.inNonArrowFunction&&!this.scope.inClass&&!(this.optionFlags&4)&&this.raise(E.UnexpectedNewTarget,o),o}return this.parseNew(a)}parseNew(a){if(this.parseNewCallee(a),this.eat(10)){const s=this.parseExprList(11);this.toReferencedList(s),a.arguments=s}else a.arguments=[];return this.finishNode(a,"NewExpression")}parseNewCallee(a){const s=this.match(83),o=this.parseNoCallExpr();a.callee=o,s&&(o.type==="Import"||o.type==="ImportExpression")&&this.raise(E.ImportCallNotNewExpression,o)}parseTemplateElement(a){const{start:s,startLoc:o,end:h,value:S}=this.state,P=s+1,C=this.startNodeAt(i(o,1));S===null&&(a||this.raise(E.InvalidEscapeSequenceTemplate,i(this.state.firstInvalidTemplateEscapePos,1)));const R=this.match(24),F=R?-1:-2,$=h+F;C.value={raw:this.input.slice(P,$).replace(/\r\n?/g,`
|
|
15
|
-
`),cooked:S===null?null:S.slice(1,F)},C.tail=R,this.next();const q=this.finishNode(C,"TemplateElement");return this.resetEndLocation(q,i(this.state.lastTokEndLoc,F)),q}parseTemplate(a){const s=this.startNode();let o=this.parseTemplateElement(a);const h=[o],S=[];for(;!o.tail;)S.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),h.push(o=this.parseTemplateElement(a));return s.expressions=S,s.quasis=h,this.finishNode(s,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(a,s,o,h){o&&this.expectPlugin("recordAndTuple");const S=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let P=!1,C=!0;const R=this.startNode();for(R.properties=[],this.next();!this.match(a);){if(C)C=!1;else if(this.expect(12),this.match(a)){this.addTrailingCommaExtraToNode(R);break}let $;s?$=this.parseBindingProperty():($=this.parsePropertyDefinition(h),P=this.checkProto($,o,P,h)),o&&!this.isObjectProperty($)&&$.type!=="SpreadElement"&&this.raise(E.InvalidRecordProperty,$),$.shorthand&&this.addExtra($,"shorthand",!0),R.properties.push($)}this.next(),this.state.inFSharpPipelineDirectBody=S;let F="ObjectExpression";return s?F="ObjectPattern":o&&(F="RecordExpression"),this.finishNode(R,F)}addTrailingCommaExtraToNode(a){this.addExtra(a,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(a,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(a){return!a.computed&&a.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(a){let s=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(E.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)s.push(this.parseDecorator());const o=this.startNode();let h=!1,S=!1,P;if(this.match(21))return s.length&&this.unexpected(),this.parseSpread();s.length&&(o.decorators=s,s=[]),o.method=!1,a&&(P=this.state.startLoc);let C=this.eat(55);this.parsePropertyNamePrefixOperator(o);const R=this.state.containsEsc;if(this.parsePropertyName(o,a),!C&&!R&&this.maybeAsyncOrAccessorProp(o)){const{key:F}=o,$=F.name;$==="async"&&!this.hasPrecedingLineBreak()&&(h=!0,this.resetPreviousNodeTrailingComments(F),C=this.eat(55),this.parsePropertyName(o)),($==="get"||$==="set")&&(S=!0,this.resetPreviousNodeTrailingComments(F),o.kind=$,this.match(55)&&(C=!0,this.raise(E.AccessorIsGenerator,this.state.curPosition(),{kind:$}),this.next()),this.parsePropertyName(o))}return this.parseObjPropValue(o,P,C,h,!1,S,a)}getGetterSetterExpectedParamCount(a){return a.kind==="get"?0:1}getObjectOrClassMethodParams(a){return a.params}checkGetterSetterParams(a){var s;const o=this.getGetterSetterExpectedParamCount(a),h=this.getObjectOrClassMethodParams(a);h.length!==o&&this.raise(a.kind==="get"?E.BadGetterArity:E.BadSetterArity,a),a.kind==="set"&&((s=h[h.length-1])==null?void 0:s.type)==="RestElement"&&this.raise(E.BadSetterRestParameter,a)}parseObjectMethod(a,s,o,h,S){if(S){const P=this.parseMethod(a,s,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(P),P}if(o||s||this.match(10))return h&&this.unexpected(),a.kind="method",a.method=!0,this.parseMethod(a,s,o,!1,!1,"ObjectMethod")}parseObjectProperty(a,s,o,h){if(a.shorthand=!1,this.eat(14))return a.value=o?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowIn(h),this.finishObjectProperty(a);if(!a.computed&&a.key.type==="Identifier"){if(this.checkReservedWord(a.key.name,a.key.loc.start,!0,!1),o)a.value=this.parseMaybeDefault(s,this.cloneIdentifier(a.key));else if(this.match(29)){const S=this.state.startLoc;h!=null?h.shorthandAssignLoc===null&&(h.shorthandAssignLoc=S):this.raise(E.InvalidCoverInitializedName,S),a.value=this.parseMaybeDefault(s,this.cloneIdentifier(a.key))}else a.value=this.cloneIdentifier(a.key);return a.shorthand=!0,this.finishObjectProperty(a)}}finishObjectProperty(a){return this.finishNode(a,"ObjectProperty")}parseObjPropValue(a,s,o,h,S,P,C){const R=this.parseObjectMethod(a,o,h,S,P)||this.parseObjectProperty(a,s,S,C);return R||this.unexpected(),R}parsePropertyName(a,s){if(this.eat(0))a.computed=!0,a.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{const{type:o,value:h}=this.state;let S;if(ce(o))S=this.parseIdentifier(!0);else switch(o){case 135:S=this.parseNumericLiteral(h);break;case 134:S=this.parseStringLiteral(h);break;case 136:S=this.parseBigIntLiteral(h);break;case 139:{const P=this.state.startLoc;s!=null?s.privateKeyLoc===null&&(s.privateKeyLoc=P):this.raise(E.UnexpectedPrivateField,P),S=this.parsePrivateName();break}default:if(o===137){S=this.parseDecimalLiteral(h);break}this.unexpected()}a.key=S,o!==139&&(a.computed=!1)}}initFunction(a,s){a.id=null,a.generator=!1,a.async=s}parseMethod(a,s,o,h,S,P,C=!1){this.initFunction(a,o),a.generator=s,this.scope.enter(18|(C?64:0)|(S?32:0)),this.prodParam.enter(hi(o,a.generator)),this.parseFunctionParams(a,h);const R=this.parseFunctionBodyAndFinish(a,P,!0);return this.prodParam.exit(),this.scope.exit(),R}parseArrayLike(a,s,o,h){o&&this.expectPlugin("recordAndTuple");const S=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;const P=this.startNode();return this.next(),P.elements=this.parseExprList(a,!o,h,P),this.state.inFSharpPipelineDirectBody=S,this.finishNode(P,o?"TupleExpression":"ArrayExpression")}parseArrowExpression(a,s,o,h){this.scope.enter(6);let S=hi(o,!1);!this.match(5)&&this.prodParam.hasIn&&(S|=8),this.prodParam.enter(S),this.initFunction(a,o);const P=this.state.maybeInArrowParameters;return s&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(a,s,h)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(a,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=P,this.finishNode(a,"ArrowFunctionExpression")}setArrowFunctionParameters(a,s,o){this.toAssignableList(s,o,!1),a.params=s}parseFunctionBodyAndFinish(a,s,o=!1){return this.parseFunctionBody(a,!1,o),this.finishNode(a,s)}parseFunctionBody(a,s,o=!1){const h=s&&!this.match(5);if(this.expressionScope.enter(bu()),h)a.body=this.parseMaybeAssign(),this.checkParams(a,!1,s,!1);else{const S=this.state.strict,P=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|4),a.body=this.parseBlock(!0,!1,C=>{const R=!this.isSimpleParamList(a.params);C&&R&&this.raise(E.IllegalLanguageModeDirective,(a.kind==="method"||a.kind==="constructor")&&a.key?a.key.loc.end:a);const F=!S&&this.state.strict;this.checkParams(a,!this.state.strict&&!s&&!o&&!R,s,F),this.state.strict&&a.id&&this.checkIdentifier(a.id,65,F)}),this.prodParam.exit(),this.state.labels=P}this.expressionScope.exit()}isSimpleParameter(a){return a.type==="Identifier"}isSimpleParamList(a){for(let s=0,o=a.length;s<o;s++)if(!this.isSimpleParameter(a[s]))return!1;return!0}checkParams(a,s,o,h=!0){const S=!s&&new Set,P={type:"FormalParameters"};for(const C of a.params)this.checkLVal(C,P,5,S,h)}parseExprList(a,s,o,h){const S=[];let P=!0;for(;!this.eat(a);){if(P)P=!1;else if(this.expect(12),this.match(a)){h&&this.addTrailingCommaExtraToNode(h),this.next();break}S.push(this.parseExprListItem(s,o))}return S}parseExprListItem(a,s,o){let h;if(this.match(12))a||this.raise(E.UnexpectedToken,this.state.curPosition(),{unexpected:","}),h=null;else if(this.match(21)){const S=this.state.startLoc;h=this.parseParenItem(this.parseSpread(s),S)}else if(this.match(17)){this.expectPlugin("partialApplication"),o||this.raise(E.UnexpectedArgumentPlaceholder,this.state.startLoc);const S=this.startNode();this.next(),h=this.finishNode(S,"ArgumentPlaceholder")}else h=this.parseMaybeAssignAllowIn(s,this.parseParenItem);return h}parseIdentifier(a){const s=this.startNode(),o=this.parseIdentifierName(a);return this.createIdentifier(s,o)}createIdentifier(a,s){return a.name=s,a.loc.identifierName=s,this.finishNode(a,"Identifier")}createIdentifierAt(a,s,o){return a.name=s,a.loc.identifierName=s,this.finishNodeAt(a,"Identifier",o)}parseIdentifierName(a){let s;const{startLoc:o,type:h}=this.state;ce(h)?s=this.state.value:this.unexpected();const S=Z(h);return a?S&&this.replaceToken(132):this.checkReservedWord(s,o,S,!1),this.next(),s}checkReservedWord(a,s,o,h){if(a.length>10||!sv(a))return;if(o&&ev(a)){this.raise(E.UnexpectedKeyword,s,{keyword:a});return}if((this.state.strict?h?du:pu:hu)(a,this.inModule)){this.raise(E.UnexpectedReservedWord,s,{reservedWord:a});return}else if(a==="yield"){if(this.prodParam.hasYield){this.raise(E.YieldBindingIdentifier,s);return}}else if(a==="await"){if(this.prodParam.hasAwait){this.raise(E.AwaitBindingIdentifier,s);return}if(this.scope.inStaticBlock){this.raise(E.AwaitBindingIdentifierInStaticBlock,s);return}this.expressionScope.recordAsyncArrowParametersError(s)}else if(a==="arguments"&&this.scope.inClassAndNotInNonArrowFunction){this.raise(E.ArgumentsInClass,s);return}}recordAwaitIfAllowed(){const a=this.prodParam.hasAwait||this.optionFlags&1&&!this.scope.inFunction;return a&&!this.scope.inFunction&&(this.state.hasTopLevelAwait=!0),a}parseAwait(a){const s=this.startNodeAt(a);return this.expressionScope.recordParameterInitializerError(E.AwaitExpressionFormalParameter,s),this.eat(55)&&this.raise(E.ObsoleteAwaitStar,s),!this.scope.inFunction&&!(this.optionFlags&1)&&(this.isAmbiguousPrefixOrIdentifier()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(s.argument=this.parseMaybeUnary(null,!0)),this.finishNode(s,"AwaitExpression")}isAmbiguousPrefixOrIdentifier(){if(this.hasPrecedingLineBreak())return!0;const{type:a}=this.state;return a===53||a===10||a===0||jr(a)||a===102&&!this.state.containsEsc||a===138||a===56||this.hasPlugin("v8intrinsic")&&a===54}parseYield(a){const s=this.startNodeAt(a);this.expressionScope.recordParameterInitializerError(E.YieldInParameter,s);let o=!1,h=null;if(!this.hasPrecedingLineBreak())switch(o=this.eat(55),this.state.type){case 13:case 140:case 8:case 11:case 3:case 9:case 14:case 12:if(!o)break;default:h=this.parseMaybeAssign()}return s.delegate=o,s.argument=h,this.finishNode(s,"YieldExpression")}parseImportCall(a){if(this.next(),a.source=this.parseMaybeAssignAllowIn(),a.options=null,this.eat(12)){if(this.match(11))this.addTrailingCommaExtraToNode(a.source);else if(a.options=this.parseMaybeAssignAllowIn(),this.eat(12)&&(this.addTrailingCommaExtraToNode(a.options),!this.match(11))){do this.parseMaybeAssignAllowIn();while(this.eat(12)&&!this.match(11));this.raise(E.ImportCallArity,a)}}return this.expect(11),this.finishNode(a,"ImportExpression")}checkPipelineAtInfixOperator(a,s){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&a.type==="SequenceExpression"&&this.raise(E.PipelineHeadSequenceExpression,s)}parseSmartPipelineBodyInStyle(a,s){if(this.isSimpleReference(a)){const o=this.startNodeAt(s);return o.callee=a,this.finishNode(o,"PipelineBareFunction")}else{const o=this.startNodeAt(s);return this.checkSmartPipeTopicBodyEarlyErrors(s),o.expression=a,this.finishNode(o,"PipelineTopicExpression")}}isSimpleReference(a){switch(a.type){case"MemberExpression":return!a.computed&&this.isSimpleReference(a.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(a){if(this.match(19))throw this.raise(E.PipelineBodyNoArrow,this.state.startLoc);this.topicReferenceWasUsedInCurrentContext()||this.raise(E.PipelineTopicUnused,a)}withTopicBindingContext(a){const s=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return a()}finally{this.state.topicContext=s}}withSmartMixTopicForbiddingContext(a){if(this.hasPlugin(["pipelineOperator",{proposal:"smart"}])){const s=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return a()}finally{this.state.topicContext=s}}else return a()}withSoloAwaitPermittingContext(a){const s=this.state.soloAwait;this.state.soloAwait=!0;try{return a()}finally{this.state.soloAwait=s}}allowInAnd(a){const s=this.prodParam.currentFlags();if(8&~s){this.prodParam.enter(s|8);try{return a()}finally{this.prodParam.exit()}}return a()}disallowInAnd(a){const s=this.prodParam.currentFlags();if(8&s){this.prodParam.enter(s&-9);try{return a()}finally{this.prodParam.exit()}}return a()}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(a){const s=this.state.startLoc;this.state.potentialArrowAt=this.state.start;const o=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;const h=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),s,a);return this.state.inFSharpPipelineDirectBody=o,h}parseModuleExpression(){this.expectPlugin("moduleBlocks");const a=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);const s=this.startNodeAt(this.state.endLoc);this.next();const o=this.initializeScopes(!0);this.enterInitialScopes();try{a.body=this.parseProgram(s,8,"module")}finally{o()}return this.finishNode(a,"ModuleExpression")}parsePropertyNamePrefixOperator(a){}}const Ba={kind:1},Xv={kind:2},Jv=/[\uD800-\uDFFF]/u,$a=/in(?:stanceof)?/y;function Kv(b,a,s){for(let o=0;o<b.length;o++){const h=b[o],{type:S}=h;if(typeof S=="number"){{if(S===139){const{loc:P,start:C,value:R,end:F}=h,$=C+1,q=i(P.start,1);b.splice(o,1,new tr({type:bt(27),value:"#",start:C,end:$,startLoc:P.start,endLoc:q}),new tr({type:bt(132),value:R,start:$,end:F,startLoc:q,endLoc:P.end})),o++;continue}if(jr(S)){const{loc:P,start:C,value:R,end:F}=h,$=C+1,q=i(P.start,1);let J;a.charCodeAt(C-s)===96?J=new tr({type:bt(22),value:"`",start:C,end:$,startLoc:P.start,endLoc:q}):J=new tr({type:bt(8),value:"}",start:C,end:$,startLoc:P.start,endLoc:q});let ee,oe,me,Me;S===24?(oe=F-1,me=i(P.end,-1),ee=R===null?null:R.slice(1,-1),Me=new tr({type:bt(22),value:"`",start:oe,end:F,startLoc:me,endLoc:P.end})):(oe=F-2,me=i(P.end,-2),ee=R===null?null:R.slice(1,-2),Me=new tr({type:bt(23),value:"${",start:oe,end:F,startLoc:me,endLoc:P.end})),b.splice(o,1,J,new tr({type:bt(20),value:ee,start:$,end:oe,startLoc:q,endLoc:me}),Me),o+=2;continue}}h.type=bt(S)}}return b}class Yv extends Hv{parseTopLevel(a,s){return a.program=this.parseProgram(s),a.comments=this.comments,this.optionFlags&256&&(a.tokens=Kv(this.tokens,this.input,this.startIndex)),this.finishNode(a,"File")}parseProgram(a,s=140,o=this.options.sourceType){if(a.sourceType=o,a.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(a,!0,!0,s),this.inModule){if(!(this.optionFlags&64)&&this.scope.undefinedExports.size>0)for(const[S,P]of Array.from(this.scope.undefinedExports))this.raise(E.ModuleExportUndefined,P,{localName:S});this.addExtra(a,"topLevelAwait",this.state.hasTopLevelAwait)}let h;return s===140?h=this.finishNode(a,"Program"):h=this.finishNodeAt(a,"Program",i(this.state.startLoc,-1)),h}stmtToDirective(a){const s=this.castNodeTo(a,"Directive"),o=this.castNodeTo(a.expression,"DirectiveLiteral"),h=o.value,S=this.input.slice(this.offsetToSourcePos(o.start),this.offsetToSourcePos(o.end)),P=o.value=S.slice(1,-1);return this.addExtra(o,"raw",S),this.addExtra(o,"rawValue",P),this.addExtra(o,"expressionValue",h),s.value=o,delete a.expression,s}parseInterpreterDirective(){if(!this.match(28))return null;const a=this.startNode();return a.value=this.state.value,this.next(),this.finishNode(a,"InterpreterDirective")}isLet(){return this.isContextual(100)?this.hasFollowingBindingAtom():!1}isUsing(){if(!this.isContextual(107))return!1;const a=this.nextTokenInLineStart(),s=this.codePointAtPos(a);return this.chStartsBindingIdentifier(s,a)}isAwaitUsing(){if(!this.isContextual(96))return!1;let a=this.nextTokenInLineStart();if(this.isUnparsedContextual(a,"using")){a=this.nextTokenInLineStartSince(a+5);const s=this.codePointAtPos(a);if(this.chStartsBindingIdentifier(s,a))return this.expectPlugin("explicitResourceManagement"),!0}return!1}chStartsBindingIdentifier(a,s){if(jt(a)){if($a.lastIndex=s,$a.test(this.input)){const o=this.codePointAtPos($a.lastIndex);if(!Vr(o)&&o!==92)return!1}return!0}else return a===92}chStartsBindingPattern(a){return a===91||a===123}hasFollowingBindingAtom(){const a=this.nextTokenStart(),s=this.codePointAtPos(a);return this.chStartsBindingPattern(s)||this.chStartsBindingIdentifier(s,a)}hasInLineFollowingBindingIdentifierOrBrace(){const a=this.nextTokenInLineStart(),s=this.codePointAtPos(a);return s===123||this.chStartsBindingIdentifier(s,a)}allowsForUsing(){const{type:a,containsEsc:s,end:o}=this.lookahead();if(a===102&&!s){const h=this.lookaheadCharCodeSince(o);if(h!==61&&h!==58&&h!==59)return!1}return Y(a)&&!this.hasFollowingLineBreak()?(this.expectPlugin("explicitResourceManagement"),!0):!1}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(a=!1){let s=0;return this.options.annexB&&!this.state.strict&&(s|=4,a&&(s|=8)),this.parseStatementLike(s)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(a){let s=null;return this.match(26)&&(s=this.parseDecorators(!0)),this.parseStatementContent(a,s)}parseStatementContent(a,s){const o=this.state.type,h=this.startNode(),S=!!(a&2),P=!!(a&4),C=a&1;switch(o){case 60:return this.parseBreakContinueStatement(h,!0);case 63:return this.parseBreakContinueStatement(h,!1);case 64:return this.parseDebuggerStatement(h);case 90:return this.parseDoWhileStatement(h);case 91:return this.parseForStatement(h);case 68:if(this.lookaheadCharCode()===46)break;return P||this.raise(this.state.strict?E.StrictFunction:this.options.annexB?E.SloppyFunctionAnnexB:E.SloppyFunction,this.state.startLoc),this.parseFunctionStatement(h,!1,!S&&P);case 80:return S||this.unexpected(),this.parseClass(this.maybeTakeDecorators(s,h),!0);case 69:return this.parseIfStatement(h);case 70:return this.parseReturnStatement(h);case 71:return this.parseSwitchStatement(h);case 72:return this.parseThrowStatement(h);case 73:return this.parseTryStatement(h);case 96:if(this.isAwaitUsing())return this.allowsUsing()?S?this.recordAwaitIfAllowed()||this.raise(E.AwaitUsingNotInAsyncContext,h):this.raise(E.UnexpectedLexicalDeclaration,h):this.raise(E.UnexpectedUsingDeclaration,h),this.next(),this.parseVarStatement(h,"await using");break;case 107:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifierOrBrace())break;return this.expectPlugin("explicitResourceManagement"),this.allowsUsing()?S||this.raise(E.UnexpectedLexicalDeclaration,this.state.startLoc):this.raise(E.UnexpectedUsingDeclaration,this.state.startLoc),this.parseVarStatement(h,"using");case 100:{if(this.state.containsEsc)break;const $=this.nextTokenStart(),q=this.codePointAtPos($);if(q!==91&&(!S&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(q,$)&&q!==123))break}case 75:S||this.raise(E.UnexpectedLexicalDeclaration,this.state.startLoc);case 74:{const $=this.state.value;return this.parseVarStatement(h,$)}case 92:return this.parseWhileStatement(h);case 76:return this.parseWithStatement(h);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(h);case 83:{const $=this.lookaheadCharCode();if($===40||$===46)break}case 82:{!(this.optionFlags&8)&&!C&&this.raise(E.UnexpectedImportExport,this.state.startLoc),this.next();let $;return o===83?$=this.parseImport(h):$=this.parseExport(h,s),this.assertModuleNodeAllowed($),$}default:if(this.isAsyncFunction())return S||this.raise(E.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(h,!0,!S&&P)}const R=this.state.value,F=this.parseExpression();return Y(o)&&F.type==="Identifier"&&this.eat(14)?this.parseLabeledStatement(h,R,F,a):this.parseExpressionStatement(h,F,s)}assertModuleNodeAllowed(a){!(this.optionFlags&8)&&!this.inModule&&this.raise(E.ImportOutsideModule,a)}decoratorsEnabledBeforeExport(){return this.hasPlugin("decorators-legacy")?!0:this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")!==!1}maybeTakeDecorators(a,s,o){if(a){var h;(h=s.decorators)!=null&&h.length?(typeof this.getPluginOption("decorators","decoratorsBeforeExport")!="boolean"&&this.raise(E.DecoratorsBeforeAfterExport,s.decorators[0]),s.decorators.unshift(...a)):s.decorators=a,this.resetStartLocationFromNode(s,a[0]),o&&this.resetStartLocationFromNode(o,s)}return s}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(a){const s=[];do s.push(this.parseDecorator());while(this.match(26));if(this.match(82))a||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(E.DecoratorExportClass,this.state.startLoc);else if(!this.canHaveLeadingDecorator())throw this.raise(E.UnexpectedLeadingDecorator,this.state.startLoc);return s}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);const a=this.startNode();if(this.next(),this.hasPlugin("decorators")){const s=this.state.startLoc;let o;if(this.match(10)){const h=this.state.startLoc;this.next(),o=this.parseExpression(),this.expect(11),o=this.wrapParenthesis(h,o);const S=this.state.startLoc;a.expression=this.parseMaybeDecoratorArguments(o,h),this.getPluginOption("decorators","allowCallParenthesized")===!1&&a.expression!==o&&this.raise(E.DecoratorArgumentsOutsideParentheses,S)}else{for(o=this.parseIdentifier(!1);this.eat(16);){const h=this.startNodeAt(s);h.object=o,this.match(139)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),h.property=this.parsePrivateName()):h.property=this.parseIdentifier(!0),h.computed=!1,o=this.finishNode(h,"MemberExpression")}a.expression=this.parseMaybeDecoratorArguments(o,s)}}else a.expression=this.parseExprSubscripts();return this.finishNode(a,"Decorator")}parseMaybeDecoratorArguments(a,s){if(this.eat(10)){const o=this.startNodeAt(s);return o.callee=a,o.arguments=this.parseCallExpressionArguments(11),this.toReferencedList(o.arguments),this.finishNode(o,"CallExpression")}return a}parseBreakContinueStatement(a,s){return this.next(),this.isLineTerminator()?a.label=null:(a.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(a,s),this.finishNode(a,s?"BreakStatement":"ContinueStatement")}verifyBreakContinue(a,s){let o;for(o=0;o<this.state.labels.length;++o){const h=this.state.labels[o];if((a.label==null||h.name===a.label.name)&&(h.kind!=null&&(s||h.kind===1)||a.label&&s))break}if(o===this.state.labels.length){const h=s?"BreakStatement":"ContinueStatement";this.raise(E.IllegalBreakContinue,a,{type:h})}}parseDebuggerStatement(a){return this.next(),this.semicolon(),this.finishNode(a,"DebuggerStatement")}parseHeaderExpression(){this.expect(10);const a=this.parseExpression();return this.expect(11),a}parseDoWhileStatement(a){return this.next(),this.state.labels.push(Ba),a.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.expect(92),a.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(a,"DoWhileStatement")}parseForStatement(a){this.next(),this.state.labels.push(Ba);let s=null;if(this.isContextual(96)&&this.recordAwaitIfAllowed()&&(s=this.state.startLoc,this.next()),this.scope.enter(0),this.expect(10),this.match(13))return s!==null&&this.unexpected(s),this.parseFor(a,null);const o=this.isContextual(100);{const R=this.isAwaitUsing(),F=R||this.isContextual(107)&&this.allowsForUsing(),$=o&&this.hasFollowingBindingAtom()||F;if(this.match(74)||this.match(75)||$){const q=this.startNode();let J;R?(J="await using",this.recordAwaitIfAllowed()||this.raise(E.AwaitUsingNotInAsyncContext,this.state.startLoc),this.next()):J=this.state.value,this.next(),this.parseVar(q,!0,J);const ee=this.finishNode(q,"VariableDeclaration"),oe=this.match(58);return oe&&F&&this.raise(E.ForInUsing,ee),(oe||this.isContextual(102))&&ee.declarations.length===1?this.parseForIn(a,ee,s):(s!==null&&this.unexpected(s),this.parseFor(a,ee))}}const h=this.isContextual(95),S=new di,P=this.parseExpression(!0,S),C=this.isContextual(102);if(C&&(o&&this.raise(E.ForOfLet,P),s===null&&h&&P.type==="Identifier"&&this.raise(E.ForOfAsync,P)),C||this.match(58)){this.checkDestructuringPrivate(S),this.toAssignable(P,!0);const R=C?"ForOfStatement":"ForInStatement";return this.checkLVal(P,{type:R}),this.parseForIn(a,P,s)}else this.checkExpressionErrors(S,!0);return s!==null&&this.unexpected(s),this.parseFor(a,P)}parseFunctionStatement(a,s,o){return this.next(),this.parseFunction(a,1|(o?2:0)|(s?8:0))}parseIfStatement(a){return this.next(),a.test=this.parseHeaderExpression(),a.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),a.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(a,"IfStatement")}parseReturnStatement(a){return!this.prodParam.hasReturn&&!(this.optionFlags&2)&&this.raise(E.IllegalReturn,this.state.startLoc),this.next(),this.isLineTerminator()?a.argument=null:(a.argument=this.parseExpression(),this.semicolon()),this.finishNode(a,"ReturnStatement")}parseSwitchStatement(a){this.next(),a.discriminant=this.parseHeaderExpression();const s=a.cases=[];this.expect(5),this.state.labels.push(Xv),this.scope.enter(256);let o;for(let h;!this.match(8);)if(this.match(61)||this.match(65)){const S=this.match(61);o&&this.finishNode(o,"SwitchCase"),s.push(o=this.startNode()),o.consequent=[],this.next(),S?o.test=this.parseExpression():(h&&this.raise(E.MultipleDefaultsInSwitch,this.state.lastTokStartLoc),h=!0,o.test=null),this.expect(14)}else o?o.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),o&&this.finishNode(o,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(a,"SwitchStatement")}parseThrowStatement(a){return this.next(),this.hasPrecedingLineBreak()&&this.raise(E.NewlineAfterThrow,this.state.lastTokEndLoc),a.argument=this.parseExpression(),this.semicolon(),this.finishNode(a,"ThrowStatement")}parseCatchClauseParam(){const a=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&a.type==="Identifier"?8:0),this.checkLVal(a,{type:"CatchClause"},9),a}parseTryStatement(a){if(this.next(),a.block=this.parseBlock(),a.handler=null,this.match(62)){const s=this.startNode();this.next(),this.match(10)?(this.expect(10),s.param=this.parseCatchClauseParam(),this.expect(11)):(s.param=null,this.scope.enter(0)),s.body=this.withSmartMixTopicForbiddingContext(()=>this.parseBlock(!1,!1)),this.scope.exit(),a.handler=this.finishNode(s,"CatchClause")}return a.finalizer=this.eat(67)?this.parseBlock():null,!a.handler&&!a.finalizer&&this.raise(E.NoCatchOrFinally,a),this.finishNode(a,"TryStatement")}parseVarStatement(a,s,o=!1){return this.next(),this.parseVar(a,!1,s,o),this.semicolon(),this.finishNode(a,"VariableDeclaration")}parseWhileStatement(a){return this.next(),a.test=this.parseHeaderExpression(),this.state.labels.push(Ba),a.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.finishNode(a,"WhileStatement")}parseWithStatement(a){return this.state.strict&&this.raise(E.StrictWith,this.state.startLoc),this.next(),a.object=this.parseHeaderExpression(),a.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.finishNode(a,"WithStatement")}parseEmptyStatement(a){return this.next(),this.finishNode(a,"EmptyStatement")}parseLabeledStatement(a,s,o,h){for(const P of this.state.labels)P.name===s&&this.raise(E.LabelRedeclaration,o,{labelName:s});const S=tt(this.state.type)?1:this.match(71)?2:null;for(let P=this.state.labels.length-1;P>=0;P--){const C=this.state.labels[P];if(C.statementStart===a.start)C.statementStart=this.sourceToOffsetPos(this.state.start),C.kind=S;else break}return this.state.labels.push({name:s,kind:S,statementStart:this.sourceToOffsetPos(this.state.start)}),a.body=h&8?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),a.label=o,this.finishNode(a,"LabeledStatement")}parseExpressionStatement(a,s,o){return a.expression=s,this.semicolon(),this.finishNode(a,"ExpressionStatement")}parseBlock(a=!1,s=!0,o){const h=this.startNode();return a&&this.state.strictErrors.clear(),this.expect(5),s&&this.scope.enter(0),this.parseBlockBody(h,a,!1,8,o),s&&this.scope.exit(),this.finishNode(h,"BlockStatement")}isValidDirective(a){return a.type==="ExpressionStatement"&&a.expression.type==="StringLiteral"&&!a.expression.extra.parenthesized}parseBlockBody(a,s,o,h,S){const P=a.body=[],C=a.directives=[];this.parseBlockOrModuleBlockBody(P,s?C:void 0,o,h,S)}parseBlockOrModuleBlockBody(a,s,o,h,S){const P=this.state.strict;let C=!1,R=!1;for(;!this.match(h);){const F=o?this.parseModuleItem():this.parseStatementListItem();if(s&&!R){if(this.isValidDirective(F)){const $=this.stmtToDirective(F);s.push($),!C&&$.value.value==="use strict"&&(C=!0,this.setStrict(!0));continue}R=!0,this.state.strictErrors.clear()}a.push(F)}S==null||S.call(this,C),P||this.setStrict(!1),this.next()}parseFor(a,s){return a.init=s,this.semicolon(!1),a.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),a.update=this.match(11)?null:this.parseExpression(),this.expect(11),a.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(a,"ForStatement")}parseForIn(a,s,o){const h=this.match(58);return this.next(),h?o!==null&&this.unexpected(o):a.await=o!==null,s.type==="VariableDeclaration"&&s.declarations[0].init!=null&&(!h||!this.options.annexB||this.state.strict||s.kind!=="var"||s.declarations[0].id.type!=="Identifier")&&this.raise(E.ForInOfLoopInitializer,s,{type:h?"ForInStatement":"ForOfStatement"}),s.type==="AssignmentPattern"&&this.raise(E.InvalidLhs,s,{ancestor:{type:"ForStatement"}}),a.left=s,a.right=h?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),a.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(a,h?"ForInStatement":"ForOfStatement")}parseVar(a,s,o,h=!1){const S=a.declarations=[];for(a.kind=o;;){const P=this.startNode();if(this.parseVarId(P,o),P.init=this.eat(29)?s?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,P.init===null&&!h&&(P.id.type!=="Identifier"&&!(s&&(this.match(58)||this.isContextual(102)))?this.raise(E.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"destructuring"}):(o==="const"||o==="using"||o==="await using")&&!(this.match(58)||this.isContextual(102))&&this.raise(E.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:o})),S.push(this.finishNode(P,"VariableDeclarator")),!this.eat(12))break}return a}parseVarId(a,s){const o=this.parseBindingAtom();(s==="using"||s==="await using")&&(o.type==="ArrayPattern"||o.type==="ObjectPattern")&&this.raise(E.UsingDeclarationHasBindingPattern,o.loc.start),this.checkLVal(o,{type:"VariableDeclarator"},s==="var"?5:8201),a.id=o}parseAsyncFunctionExpression(a){return this.parseFunction(a,8)}parseFunction(a,s=0){const o=s&2,h=!!(s&1),S=h&&!(s&4),P=!!(s&8);this.initFunction(a,P),this.match(55)&&(o&&this.raise(E.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),a.generator=!0),h&&(a.id=this.parseFunctionId(S));const C=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(2),this.prodParam.enter(hi(P,a.generator)),h||(a.id=this.parseFunctionId()),this.parseFunctionParams(a,!1),this.withSmartMixTopicForbiddingContext(()=>{this.parseFunctionBodyAndFinish(a,h?"FunctionDeclaration":"FunctionExpression")}),this.prodParam.exit(),this.scope.exit(),h&&!o&&this.registerFunctionStatementId(a),this.state.maybeInArrowParameters=C,a}parseFunctionId(a){return a||Y(this.state.type)?this.parseIdentifier():null}parseFunctionParams(a,s){this.expect(10),this.expressionScope.enter(Nv()),a.params=this.parseBindingList(11,41,2|(s?4:0)),this.expressionScope.exit()}registerFunctionStatementId(a){a.id&&this.scope.declareName(a.id.name,!this.options.annexB||this.state.strict||a.generator||a.async?this.scope.treatFunctionsAsVar?5:8201:17,a.id.loc.start)}parseClass(a,s,o){this.next();const h=this.state.strict;return this.state.strict=!0,this.parseClassId(a,s,o),this.parseClassSuper(a),a.body=this.parseClassBody(!!a.superClass,h),this.finishNode(a,s?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}nameIsConstructor(a){return a.type==="Identifier"&&a.name==="constructor"||a.type==="StringLiteral"&&a.value==="constructor"}isNonstaticConstructor(a){return!a.computed&&!a.static&&this.nameIsConstructor(a.key)}parseClassBody(a,s){this.classScope.enter();const o={hadConstructor:!1,hadSuperClass:a};let h=[];const S=this.startNode();if(S.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext(()=>{for(;!this.match(8);){if(this.eat(13)){if(h.length>0)throw this.raise(E.DecoratorSemicolon,this.state.lastTokEndLoc);continue}if(this.match(26)){h.push(this.parseDecorator());continue}const P=this.startNode();h.length&&(P.decorators=h,this.resetStartLocationFromNode(P,h[0]),h=[]),this.parseClassMember(S,P,o),P.kind==="constructor"&&P.decorators&&P.decorators.length>0&&this.raise(E.DecoratorConstructor,P)}}),this.state.strict=s,this.next(),h.length)throw this.raise(E.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(S,"ClassBody")}parseClassMemberFromModifier(a,s){const o=this.parseIdentifier(!0);if(this.isClassMethod()){const h=s;return h.kind="method",h.computed=!1,h.key=o,h.static=!1,this.pushClassMethod(a,h,!1,!1,!1,!1),!0}else if(this.isClassProperty()){const h=s;return h.computed=!1,h.key=o,h.static=!1,a.body.push(this.parseClassProperty(h)),!0}return this.resetPreviousNodeTrailingComments(o),!1}parseClassMember(a,s,o){const h=this.isContextual(106);if(h){if(this.parseClassMemberFromModifier(a,s))return;if(this.eat(5)){this.parseClassStaticBlock(a,s);return}}this.parseClassMemberWithIsStatic(a,s,o,h)}parseClassMemberWithIsStatic(a,s,o,h){const S=s,P=s,C=s,R=s,F=s,$=S,q=S;if(s.static=h,this.parsePropertyNamePrefixOperator(s),this.eat(55)){$.kind="method";const ye=this.match(139);if(this.parseClassElementName($),this.parsePostMemberNameModifiers($),ye){this.pushClassPrivateMethod(a,P,!0,!1);return}this.isNonstaticConstructor(S)&&this.raise(E.ConstructorIsGenerator,S.key),this.pushClassMethod(a,S,!0,!1,!1,!1);return}const J=!this.state.containsEsc&&Y(this.state.type),ee=this.parseClassElementName(s),oe=J?ee.name:null,me=this.isPrivateName(ee),Me=this.state.startLoc;if(this.parsePostMemberNameModifiers(q),this.isClassMethod()){if($.kind="method",me){this.pushClassPrivateMethod(a,P,!1,!1);return}const ye=this.isNonstaticConstructor(S);let _e=!1;ye&&(S.kind="constructor",o.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(E.DuplicateConstructor,ee),ye&&this.hasPlugin("typescript")&&s.override&&this.raise(E.OverrideOnConstructor,ee),o.hadConstructor=!0,_e=o.hadSuperClass),this.pushClassMethod(a,S,!1,!1,ye,_e)}else if(this.isClassProperty())me?this.pushClassPrivateProperty(a,R):this.pushClassProperty(a,C);else if(oe==="async"&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(ee);const ye=this.eat(55);q.optional&&this.unexpected(Me),$.kind="method";const _e=this.match(139);this.parseClassElementName($),this.parsePostMemberNameModifiers(q),_e?this.pushClassPrivateMethod(a,P,ye,!0):(this.isNonstaticConstructor(S)&&this.raise(E.ConstructorIsAsync,S.key),this.pushClassMethod(a,S,ye,!0,!1,!1))}else if((oe==="get"||oe==="set")&&!(this.match(55)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(ee),$.kind=oe;const ye=this.match(139);this.parseClassElementName(S),ye?this.pushClassPrivateMethod(a,P,!1,!1):(this.isNonstaticConstructor(S)&&this.raise(E.ConstructorIsAccessor,S.key),this.pushClassMethod(a,S,!1,!1,!1,!1)),this.checkGetterSetterParams(S)}else if(oe==="accessor"&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(ee);const ye=this.match(139);this.parseClassElementName(C),this.pushClassAccessorProperty(a,F,ye)}else this.isLineTerminator()?me?this.pushClassPrivateProperty(a,R):this.pushClassProperty(a,C):this.unexpected()}parseClassElementName(a){const{type:s,value:o}=this.state;if((s===132||s===134)&&a.static&&o==="prototype"&&this.raise(E.StaticPrototype,this.state.startLoc),s===139){o==="constructor"&&this.raise(E.ConstructorClassPrivateField,this.state.startLoc);const h=this.parsePrivateName();return a.key=h,h}return this.parsePropertyName(a),a.key}parseClassStaticBlock(a,s){var o;this.scope.enter(208);const h=this.state.labels;this.state.labels=[],this.prodParam.enter(0);const S=s.body=[];this.parseBlockOrModuleBlockBody(S,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=h,a.body.push(this.finishNode(s,"StaticBlock")),(o=s.decorators)!=null&&o.length&&this.raise(E.DecoratorStaticBlock,s)}pushClassProperty(a,s){!s.computed&&this.nameIsConstructor(s.key)&&this.raise(E.ConstructorClassField,s.key),a.body.push(this.parseClassProperty(s))}pushClassPrivateProperty(a,s){const o=this.parseClassPrivateProperty(s);a.body.push(o),this.classScope.declarePrivateName(this.getPrivateNameSV(o.key),0,o.key.loc.start)}pushClassAccessorProperty(a,s,o){!o&&!s.computed&&this.nameIsConstructor(s.key)&&this.raise(E.ConstructorClassField,s.key);const h=this.parseClassAccessorProperty(s);a.body.push(h),o&&this.classScope.declarePrivateName(this.getPrivateNameSV(h.key),0,h.key.loc.start)}pushClassMethod(a,s,o,h,S,P){a.body.push(this.parseMethod(s,o,h,S,P,"ClassMethod",!0))}pushClassPrivateMethod(a,s,o,h){const S=this.parseMethod(s,o,h,!1,!1,"ClassPrivateMethod",!0);a.body.push(S);const P=S.kind==="get"?S.static?6:2:S.kind==="set"?S.static?5:1:0;this.declareClassPrivateMethodInScope(S,P)}declareClassPrivateMethodInScope(a,s){this.classScope.declarePrivateName(this.getPrivateNameSV(a.key),s,a.key.loc.start)}parsePostMemberNameModifiers(a){}parseClassPrivateProperty(a){return this.parseInitializer(a),this.semicolon(),this.finishNode(a,"ClassPrivateProperty")}parseClassProperty(a){return this.parseInitializer(a),this.semicolon(),this.finishNode(a,"ClassProperty")}parseClassAccessorProperty(a){return this.parseInitializer(a),this.semicolon(),this.finishNode(a,"ClassAccessorProperty")}parseInitializer(a){this.scope.enter(80),this.expressionScope.enter(bu()),this.prodParam.enter(0),a.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(a,s,o,h=8331){if(Y(this.state.type))a.id=this.parseIdentifier(),s&&this.declareNameFromIdentifier(a.id,h);else if(o||!s)a.id=null;else throw this.raise(E.MissingClassName,this.state.startLoc)}parseClassSuper(a){a.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(a,s){const o=this.parseMaybeImportPhase(a,!0),h=this.maybeParseExportDefaultSpecifier(a,o),S=!h||this.eat(12),P=S&&this.eatExportStar(a),C=P&&this.maybeParseExportNamespaceSpecifier(a),R=S&&(!C||this.eat(12)),F=h||P;if(P&&!C){if(h&&this.unexpected(),s)throw this.raise(E.UnsupportedDecoratorExport,a);return this.parseExportFrom(a,!0),this.sawUnambiguousESM=!0,this.finishNode(a,"ExportAllDeclaration")}const $=this.maybeParseExportNamedSpecifiers(a);h&&S&&!P&&!$&&this.unexpected(null,5),C&&R&&this.unexpected(null,98);let q;if(F||$){if(q=!1,s)throw this.raise(E.UnsupportedDecoratorExport,a);this.parseExportFrom(a,F)}else q=this.maybeParseExportDeclaration(a);if(F||$||q){var J;const ee=a;if(this.checkExport(ee,!0,!1,!!ee.source),((J=ee.declaration)==null?void 0:J.type)==="ClassDeclaration")this.maybeTakeDecorators(s,ee.declaration,ee);else if(s)throw this.raise(E.UnsupportedDecoratorExport,a);return this.sawUnambiguousESM=!0,this.finishNode(ee,"ExportNamedDeclaration")}if(this.eat(65)){const ee=a,oe=this.parseExportDefaultExpression();if(ee.declaration=oe,oe.type==="ClassDeclaration")this.maybeTakeDecorators(s,oe,ee);else if(s)throw this.raise(E.UnsupportedDecoratorExport,a);return this.checkExport(ee,!0,!0),this.sawUnambiguousESM=!0,this.finishNode(ee,"ExportDefaultDeclaration")}this.unexpected(null,5)}eatExportStar(a){return this.eat(55)}maybeParseExportDefaultSpecifier(a,s){if(s||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",s==null?void 0:s.loc.start);const o=s||this.parseIdentifier(!0),h=this.startNodeAtNode(o);return h.exported=o,a.specifiers=[this.finishNode(h,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(a){if(this.isContextual(93)){var s,o;(o=(s=a).specifiers)!=null||(s.specifiers=[]);const h=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),h.exported=this.parseModuleExportName(),a.specifiers.push(this.finishNode(h,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(a){if(this.match(5)){const s=a;s.specifiers||(s.specifiers=[]);const o=s.exportKind==="type";return s.specifiers.push(...this.parseExportSpecifiers(o)),s.source=null,this.hasPlugin("importAssertions")?s.assertions=[]:s.attributes=[],s.declaration=null,!0}return!1}maybeParseExportDeclaration(a){return this.shouldParseExportDeclaration()?(a.specifiers=[],a.source=null,this.hasPlugin("importAssertions")?a.assertions=[]:a.attributes=[],a.declaration=this.parseExportDeclaration(a),!0):!1}isAsyncFunction(){if(!this.isContextual(95))return!1;const a=this.nextTokenInLineStart();return this.isUnparsedContextual(a,"function")}parseExportDefaultExpression(){const a=this.startNode();if(this.match(68))return this.next(),this.parseFunction(a,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(a,13);if(this.match(80))return this.parseClass(a,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(E.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.hasPlugin("explicitResourceManagement")&&(this.isUsing()||this.isAwaitUsing()))throw this.raise(E.UnsupportedDefaultExport,this.state.startLoc);const s=this.parseMaybeAssignAllowIn();return this.semicolon(),s}parseExportDeclaration(a){return this.match(80)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){const{type:a}=this.state;if(Y(a)){if(a===95&&!this.state.containsEsc||a===100)return!1;if((a===130||a===129)&&!this.state.containsEsc){const{type:h}=this.lookahead();if(Y(h)&&h!==98||h===5)return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;const s=this.nextTokenStart(),o=this.isUnparsedContextual(s,"from");if(this.input.charCodeAt(s)===44||Y(this.state.type)&&o)return!0;if(this.match(65)&&o){const h=this.input.charCodeAt(this.nextTokenStartSince(s+4));return h===34||h===39}return!1}parseExportFrom(a,s){this.eatContextual(98)?(a.source=this.parseImportSource(),this.checkExport(a),this.maybeParseImportAttributes(a),this.checkJSONModuleImport(a)):s&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){const{type:a}=this.state;if(a===26&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators")))return this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(E.DecoratorBeforeExport,this.state.startLoc),!0;if(this.hasPlugin("explicitResourceManagement")){if(this.isUsing())return this.raise(E.UsingDeclarationExport,this.state.startLoc),!0;if(this.isAwaitUsing())return this.raise(E.UsingDeclarationExport,this.state.startLoc),!0}return a===74||a===75||a===68||a===80||this.isLet()||this.isAsyncFunction()}checkExport(a,s,o,h){if(s){var S;if(o){if(this.checkDuplicateExports(a,"default"),this.hasPlugin("exportDefaultFrom")){var P;const C=a.declaration;C.type==="Identifier"&&C.name==="from"&&C.end-C.start===4&&!((P=C.extra)!=null&&P.parenthesized)&&this.raise(E.ExportDefaultFromAsIdentifier,C)}}else if((S=a.specifiers)!=null&&S.length)for(const C of a.specifiers){const{exported:R}=C,F=R.type==="Identifier"?R.name:R.value;if(this.checkDuplicateExports(C,F),!h&&C.local){const{local:$}=C;$.type!=="Identifier"?this.raise(E.ExportBindingIsString,C,{localName:$.value,exportName:F}):(this.checkReservedWord($.name,$.loc.start,!0,!1),this.scope.checkLocalExport($))}}else if(a.declaration){const C=a.declaration;if(C.type==="FunctionDeclaration"||C.type==="ClassDeclaration"){const{id:R}=C;if(!R)throw new Error("Assertion failure");this.checkDuplicateExports(a,R.name)}else if(C.type==="VariableDeclaration")for(const R of C.declarations)this.checkDeclaration(R.id)}}}checkDeclaration(a){if(a.type==="Identifier")this.checkDuplicateExports(a,a.name);else if(a.type==="ObjectPattern")for(const s of a.properties)this.checkDeclaration(s);else if(a.type==="ArrayPattern")for(const s of a.elements)s&&this.checkDeclaration(s);else a.type==="ObjectProperty"?this.checkDeclaration(a.value):a.type==="RestElement"?this.checkDeclaration(a.argument):a.type==="AssignmentPattern"&&this.checkDeclaration(a.left)}checkDuplicateExports(a,s){this.exportedIdentifiers.has(s)&&(s==="default"?this.raise(E.DuplicateDefaultExport,a):this.raise(E.DuplicateExport,a,{exportName:s})),this.exportedIdentifiers.add(s)}parseExportSpecifiers(a){const s=[];let o=!0;for(this.expect(5);!this.eat(8);){if(o)o=!1;else if(this.expect(12),this.eat(8))break;const h=this.isContextual(130),S=this.match(134),P=this.startNode();P.local=this.parseModuleExportName(),s.push(this.parseExportSpecifier(P,S,a,h))}return s}parseExportSpecifier(a,s,o,h){return this.eatContextual(93)?a.exported=this.parseModuleExportName():s?a.exported=this.cloneStringLiteral(a.local):a.exported||(a.exported=this.cloneIdentifier(a.local)),this.finishNode(a,"ExportSpecifier")}parseModuleExportName(){if(this.match(134)){const a=this.parseStringLiteral(this.state.value),s=Jv.exec(a.value);return s&&this.raise(E.ModuleExportNameHasLoneSurrogate,a,{surrogateCharCode:s[0].charCodeAt(0)}),a}return this.parseIdentifier(!0)}isJSONModuleImport(a){return a.assertions!=null?a.assertions.some(({key:s,value:o})=>o.value==="json"&&(s.type==="Identifier"?s.name==="type":s.value==="type")):!1}checkImportReflection(a){const{specifiers:s}=a,o=s.length===1?s[0].type:null;if(a.phase==="source")o!=="ImportDefaultSpecifier"&&this.raise(E.SourcePhaseImportRequiresDefault,s[0].loc.start);else if(a.phase==="defer")o!=="ImportNamespaceSpecifier"&&this.raise(E.DeferImportRequiresNamespace,s[0].loc.start);else if(a.module){var h;o!=="ImportDefaultSpecifier"&&this.raise(E.ImportReflectionNotBinding,s[0].loc.start),((h=a.assertions)==null?void 0:h.length)>0&&this.raise(E.ImportReflectionHasAssertion,s[0].loc.start)}}checkJSONModuleImport(a){if(this.isJSONModuleImport(a)&&a.type!=="ExportAllDeclaration"){const{specifiers:s}=a;if(s!=null){const o=s.find(h=>{let S;if(h.type==="ExportSpecifier"?S=h.local:h.type==="ImportSpecifier"&&(S=h.imported),S!==void 0)return S.type==="Identifier"?S.name!=="default":S.value!=="default"});o!==void 0&&this.raise(E.ImportJSONBindingNotDefault,o.loc.start)}}}isPotentialImportPhase(a){return a?!1:this.isContextual(105)||this.isContextual(97)||this.isContextual(127)}applyImportPhase(a,s,o,h){s||(o==="module"?(this.expectPlugin("importReflection",h),a.module=!0):this.hasPlugin("importReflection")&&(a.module=!1),o==="source"?(this.expectPlugin("sourcePhaseImports",h),a.phase="source"):o==="defer"?(this.expectPlugin("deferredImportEvaluation",h),a.phase="defer"):this.hasPlugin("sourcePhaseImports")&&(a.phase=null))}parseMaybeImportPhase(a,s){if(!this.isPotentialImportPhase(s))return this.applyImportPhase(a,s,null),null;const o=this.startNode(),h=this.parseIdentifierName(!0),{type:S}=this.state;return(ce(S)?S!==98||this.lookaheadCharCode()===102:S!==12)?(this.applyImportPhase(a,s,h,o.loc.start),null):(this.applyImportPhase(a,s,null),this.createIdentifier(o,h))}isPrecedingIdImportPhase(a){const{type:s}=this.state;return Y(s)?s!==98||this.lookaheadCharCode()===102:s!==12}parseImport(a){return this.match(134)?this.parseImportSourceAndAttributes(a):this.parseImportSpecifiersAndAfter(a,this.parseMaybeImportPhase(a,!1))}parseImportSpecifiersAndAfter(a,s){a.specifiers=[];const h=!this.maybeParseDefaultImportSpecifier(a,s)||this.eat(12),S=h&&this.maybeParseStarImportSpecifier(a);return h&&!S&&this.parseNamedImportSpecifiers(a),this.expectContextual(98),this.parseImportSourceAndAttributes(a)}parseImportSourceAndAttributes(a){var s;return(s=a.specifiers)!=null||(a.specifiers=[]),a.source=this.parseImportSource(),this.maybeParseImportAttributes(a),this.checkImportReflection(a),this.checkJSONModuleImport(a),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(a,"ImportDeclaration")}parseImportSource(){return this.match(134)||this.unexpected(),this.parseExprAtom()}parseImportSpecifierLocal(a,s,o){s.local=this.parseIdentifier(),a.specifiers.push(this.finishImportSpecifier(s,o))}finishImportSpecifier(a,s,o=8201){return this.checkLVal(a.local,{type:s},o),this.finishNode(a,s)}parseImportAttributes(){this.expect(5);const a=[],s=new Set;do{if(this.match(8))break;const o=this.startNode(),h=this.state.value;if(s.has(h)&&this.raise(E.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:h}),s.add(h),this.match(134)?o.key=this.parseStringLiteral(h):o.key=this.parseIdentifier(!0),this.expect(14),!this.match(134))throw this.raise(E.ModuleAttributeInvalidValue,this.state.startLoc);o.value=this.parseStringLiteral(this.state.value),a.push(this.finishNode(o,"ImportAttribute"))}while(this.eat(12));return this.expect(8),a}parseModuleAttributes(){const a=[],s=new Set;do{const o=this.startNode();if(o.key=this.parseIdentifier(!0),o.key.name!=="type"&&this.raise(E.ModuleAttributeDifferentFromType,o.key),s.has(o.key.name)&&this.raise(E.ModuleAttributesWithDuplicateKeys,o.key,{key:o.key.name}),s.add(o.key.name),this.expect(14),!this.match(134))throw this.raise(E.ModuleAttributeInvalidValue,this.state.startLoc);o.value=this.parseStringLiteral(this.state.value),a.push(this.finishNode(o,"ImportAttribute"))}while(this.eat(12));return a}maybeParseImportAttributes(a){let s;var o=!1;if(this.match(76)){if(this.hasPrecedingLineBreak()&&this.lookaheadCharCode()===40)return;this.next(),this.hasPlugin("moduleAttributes")?(s=this.parseModuleAttributes(),this.addExtra(a,"deprecatedWithLegacySyntax",!0)):s=this.parseImportAttributes(),o=!0}else this.isContextual(94)&&!this.hasPrecedingLineBreak()?(!this.hasPlugin("deprecatedImportAssert")&&!this.hasPlugin("importAssertions")&&this.raise(E.ImportAttributesUseAssert,this.state.startLoc),this.hasPlugin("importAssertions")||this.addExtra(a,"deprecatedAssertSyntax",!0),this.next(),s=this.parseImportAttributes()):s=[];!o&&this.hasPlugin("importAssertions")?a.assertions=s:a.attributes=s}maybeParseDefaultImportSpecifier(a,s){if(s){const o=this.startNodeAtNode(s);return o.local=s,a.specifiers.push(this.finishImportSpecifier(o,"ImportDefaultSpecifier")),!0}else if(ce(this.state.type))return this.parseImportSpecifierLocal(a,this.startNode(),"ImportDefaultSpecifier"),!0;return!1}maybeParseStarImportSpecifier(a){if(this.match(55)){const s=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(a,s,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(a){let s=!0;for(this.expect(5);!this.eat(8);){if(s)s=!1;else{if(this.eat(14))throw this.raise(E.DestructureNamedImport,this.state.startLoc);if(this.expect(12),this.eat(8))break}const o=this.startNode(),h=this.match(134),S=this.isContextual(130);o.imported=this.parseModuleExportName();const P=this.parseImportSpecifier(o,h,a.importKind==="type"||a.importKind==="typeof",S,void 0);a.specifiers.push(P)}}parseImportSpecifier(a,s,o,h,S){if(this.eatContextual(93))a.local=this.parseIdentifier();else{const{imported:P}=a;if(s)throw this.raise(E.ImportBindingIsString,a,{importName:P.value});this.checkReservedWord(P.name,a.loc.start,!0,!0),a.local||(a.local=this.cloneIdentifier(P))}return this.finishImportSpecifier(a,"ImportSpecifier",S)}isThisParam(a){return a.type==="Identifier"&&a.name==="this"}}class Lu extends Yv{constructor(a,s,o){a=A(a),super(a,s),this.options=a,this.initializeScopes(),this.plugins=o,this.filename=a.sourceFilename,this.startIndex=a.startIndex;let h=0;a.allowAwaitOutsideFunction&&(h|=1),a.allowReturnOutsideFunction&&(h|=2),a.allowImportExportEverywhere&&(h|=8),a.allowSuperOutsideMethod&&(h|=16),a.allowUndeclaredExports&&(h|=64),a.allowNewTargetOutsideFunction&&(h|=4),a.allowYieldOutsideFunction&&(h|=32),a.ranges&&(h|=128),a.tokens&&(h|=256),a.createImportExpressions&&(h|=512),a.createParenthesizedExpressions&&(h|=1024),a.errorRecovery&&(h|=2048),a.attachComment&&(h|=4096),a.annexB&&(h|=8192),this.optionFlags=h}getScopeHandler(){return ka}parse(){this.enterInitialScopes();const a=this.startNode(),s=this.startNode();return this.nextToken(),a.errors=null,this.parseTopLevel(a,s),a.errors=this.state.errors,a.comments.length=this.state.commentsLen,a}}function Qv(b,a){var s;if(((s=a)==null?void 0:s.sourceType)==="unambiguous"){a=Object.assign({},a);try{a.sourceType="module";const o=ws(a,b),h=o.parse();if(o.sawUnambiguousESM)return h;if(o.ambiguousScriptDifferentAst)try{return a.sourceType="script",ws(a,b).parse()}catch{}else h.program.sourceType="script";return h}catch(o){try{return a.sourceType="script",ws(a,b).parse()}catch{}throw o}}else return ws(a,b).parse()}function Zv(b,a){const s=ws(a,b);return s.options.strictMode&&(s.state.strict=!0),s.getExpression()}function eS(b){const a={};for(const s of Object.keys(b))a[s]=bt(b[s]);return a}const tS=eS(ue);function ws(b,a){let s=Lu;const o=new Map;if(b!=null&&b.plugins){for(const h of b.plugins){let S,P;typeof h=="string"?S=h:[S,P]=h,o.has(S)||o.set(S,P||{})}Wv(o),s=rS(o)}return new s(b,a,o)}const Mu=new Map;function rS(b){const a=[];for(const h of Gv)b.has(h)&&a.push(h);const s=a.join("|");let o=Mu.get(s);if(!o){o=Lu;for(const h of a)o=ku[h](o);Mu.set(s,o)}return o}return Gr.parse=Qv,Gr.parseExpression=Zv,Gr.tokTypes=tS,Gr}var It=rE();class sE{constructor(){this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.context={skip:()=>this.should_skip=!0,remove:()=>this.should_remove=!0,replace:e=>this.replacement=e}}replace(e,r,i,n){e&&(i!==null?e[r][i]=n:e[r]=n)}remove(e,r,i){e&&(i!==null?e[r].splice(i,1):delete e[r])}}class iE extends sE{constructor(e,r){super(),this.enter=e,this.leave=r}visit(e,r,i,n){if(e){if(this.enter){const l=this.should_skip,c=this.should_remove,p=this.replacement;this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.enter.call(this.context,e,r,i,n),this.replacement&&(e=this.replacement,this.replace(r,i,n,e)),this.should_remove&&this.remove(r,i,n);const u=this.should_skip,f=this.should_remove;if(this.should_skip=l,this.should_remove=c,this.replacement=p,u)return e;if(f)return null}for(const l in e){const c=e[l];if(typeof c=="object")if(Array.isArray(c))for(let p=0;p<c.length;p+=1)c[p]!==null&&typeof c[p].type=="string"&&(this.visit(c[p],e,l,p)||p--);else c!==null&&typeof c.type=="string"&&this.visit(c,e,l,null)}if(this.leave){const l=this.replacement,c=this.should_remove;this.replacement=null,this.should_remove=!1,this.leave.call(this.context,e,r,i,n),this.replacement&&(e=this.replacement,this.replace(r,i,n,e)),this.should_remove&&this.remove(r,i,n);const p=this.should_remove;if(this.replacement=l,this.should_remove=c,p)return null}}return e}}function zl(t,{enter:e,leave:r}){return new iE(e,r).visit(t,null)}function Qn(t,e,r=!1,i=[],n=Object.create(null)){const l=t.type==="Program"?t.body[0].type==="ExpressionStatement"&&t.body[0].expression:t;zl(t,{enter(c,p){if(p&&i.push(p),p&&p.type.startsWith("TS")&&!ta.includes(p.type))return this.skip();if(c.type==="Identifier"){const u=!!n[c.name],f=Wl(c,p,i);(r||f&&!u)&&e(c,p,i,f,u)}else if(c.type==="ObjectProperty"&&(p==null?void 0:p.type)==="ObjectPattern")c.inPattern=!0;else if(lr(c))c.scopeIds?c.scopeIds.forEach(u=>sl(u,n)):Gl(c,u=>yi(c,u,n));else if(c.type==="BlockStatement")c.scopeIds?c.scopeIds.forEach(u=>sl(u,n)):Qd(c,u=>yi(c,u,n));else if(c.type==="CatchClause"&&c.param)for(const u of _t(c.param))yi(c,u,n);else Zd(c)&&em(c,!1,u=>yi(c,u,n))},leave(c,p){if(p&&i.pop(),c!==l&&c.scopeIds)for(const u of c.scopeIds)n[u]--,n[u]===0&&delete n[u]}})}function Wl(t,e,r){if(!e)return!0;if(t.name==="arguments")return!1;if(nE(t,e))return!0;switch(e.type){case"AssignmentExpression":case"AssignmentPattern":return!0;case"ObjectPattern":case"ArrayPattern":return Zn(e,r)}return!1}function Zn(t,e){if(t&&(t.type==="ObjectProperty"||t.type==="ArrayPattern")){let r=e.length;for(;r--;){const i=e[r];if(i.type==="AssignmentExpression")return!0;if(i.type!=="ObjectProperty"&&!i.type.endsWith("Pattern"))break}}return!1}function Yd(t){let e=t.length;for(;e--;){const r=t[e];if(r.type==="NewExpression")return!0;if(r.type!=="MemberExpression")break}return!1}function Gl(t,e){for(const r of t.params)for(const i of _t(r))e(i)}function Qd(t,e){for(const r of t.body)if(r.type==="VariableDeclaration"){if(r.declare)continue;for(const i of r.declarations)for(const n of _t(i.id))e(n)}else if(r.type==="FunctionDeclaration"||r.type==="ClassDeclaration"){if(r.declare||!r.id)continue;e(r.id)}else Zd(r)&&em(r,!0,e)}function Zd(t){return t.type==="ForOfStatement"||t.type==="ForInStatement"||t.type==="ForStatement"}function em(t,e,r){const i=t.type==="ForStatement"?t.init:t.left;if(i&&i.type==="VariableDeclaration"&&(i.kind==="var"?e:!e))for(const n of i.declarations)for(const l of _t(n.id))r(l)}function _t(t,e=[]){switch(t.type){case"Identifier":e.push(t);break;case"MemberExpression":let r=t;for(;r.type==="MemberExpression";)r=r.object;e.push(r);break;case"ObjectPattern":for(const i of t.properties)i.type==="RestElement"?_t(i.argument,e):_t(i.value,e);break;case"ArrayPattern":t.elements.forEach(i=>{i&&_t(i,e)});break;case"RestElement":_t(t.argument,e);break;case"AssignmentPattern":_t(t.left,e);break}return e}function sl(t,e){t in e?e[t]++:e[t]=1}function yi(t,e,r){const{name:i}=e;t.scopeIds&&t.scopeIds.has(i)||(sl(i,r),(t.scopeIds||(t.scopeIds=new Set)).add(i))}const lr=t=>/Function(?:Expression|Declaration)$|Method$/.test(t.type),ea=t=>t&&(t.type==="ObjectProperty"||t.type==="ObjectMethod")&&!t.computed,tm=(t,e)=>ea(e)&&e.key===t;function nE(t,e,r){switch(e.type){case"MemberExpression":case"OptionalMemberExpression":return e.property===t?!!e.computed:e.object===t;case"JSXMemberExpression":return e.object===t;case"VariableDeclarator":return e.init===t;case"ArrowFunctionExpression":return e.body===t;case"PrivateName":return!1;case"ClassMethod":case"ClassPrivateMethod":case"ObjectMethod":return e.key===t?!!e.computed:!1;case"ObjectProperty":return e.key===t?!!e.computed:!0;case"ClassProperty":return e.key===t?!!e.computed:!0;case"ClassPrivateProperty":return e.key!==t;case"ClassDeclaration":case"ClassExpression":return e.superClass===t;case"AssignmentExpression":return e.right===t;case"AssignmentPattern":return e.right===t;case"LabeledStatement":return!1;case"CatchClause":return!1;case"RestElement":return!1;case"BreakStatement":case"ContinueStatement":return!1;case"FunctionDeclaration":case"FunctionExpression":return!1;case"ExportNamespaceSpecifier":case"ExportDefaultSpecifier":return!1;case"ExportSpecifier":return e.local===t;case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ImportSpecifier":return!1;case"ImportAttribute":return!1;case"JSXAttribute":return!1;case"ObjectPattern":case"ArrayPattern":return!1;case"MetaProperty":return!1;case"ObjectTypeProperty":return e.key!==t;case"TSEnumMember":return e.id!==t;case"TSPropertySignature":return e.key===t?!!e.computed:!0}return!0}const ta=["TSAsExpression","TSTypeAssertion","TSNonNullExpression","TSInstantiationExpression","TSSatisfiesExpression"];function Et(t){return ta.includes(t.type)?Et(t.expression):t}const Ge=t=>t.type===4&&t.isStatic;function Hl(t){switch(t){case"Teleport":case"teleport":return _r;case"Suspense":case"suspense":return us;case"KeepAlive":case"keep-alive":return js;case"BaseTransition":case"base-transition":return Ml}}const aE=/^\d|[^\$\w\xA0-\uFFFF]/,Kt=t=>!aE.test(t),oE=/[A-Za-z_$\xA0-\uFFFF]/,lE=/[\.\?\w$\xA0-\uFFFF]/,cE=/\s+[.[]\s*|\s*[.[]\s+/g,ra=t=>t.type===4?t.content:t.loc.source,uE=t=>{const e=ra(t).trim().replace(cE,p=>p.trim());let r=0,i=[],n=0,l=0,c=null;for(let p=0;p<e.length;p++){const u=e.charAt(p);switch(r){case 0:if(u==="[")i.push(r),r=1,n++;else if(u==="(")i.push(r),r=2,l++;else if(!(p===0?oE:lE).test(u))return!1;break;case 1:u==="'"||u==='"'||u==="`"?(i.push(r),r=3,c=u):u==="["?n++:u==="]"&&(--n||(r=i.pop()));break;case 2:if(u==="'"||u==='"'||u==="`")i.push(r),r=3,c=u;else if(u==="(")l++;else if(u===")"){if(p===e.length-1)return!1;--l||(r=i.pop())}break;case 3:u===c&&(r=i.pop(),c=null);break}}return!n&&!l},rm=(t,e)=>{try{let r=t.ast||It.parseExpression(ra(t),{plugins:e.expressionPlugins?[...e.expressionPlugins,"typescript"]:["typescript"]});return r=Et(r),r.type==="MemberExpression"||r.type==="OptionalMemberExpression"||r.type==="Identifier"&&r.name!=="undefined"}catch{return!1}},Xl=rm,hE=/^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/,pE=t=>hE.test(ra(t)),sm=(t,e)=>{try{let r=t.ast||It.parseExpression(ra(t),{plugins:e.expressionPlugins?[...e.expressionPlugins,"typescript"]:["typescript"]});return r.type==="Program"&&(r=r.body[0],r.type==="ExpressionStatement"&&(r=r.expression)),r=Et(r),r.type==="FunctionExpression"||r.type==="ArrowFunctionExpression"}catch{return!1}},im=sm;function il(t,e,r=e.length){return Jl({offset:t.offset,line:t.line,column:t.column},e,r)}function Jl(t,e,r=e.length){let i=0,n=-1;for(let l=0;l<r;l++)e.charCodeAt(l)===10&&(i++,n=l);return t.offset+=r,t.line+=i,t.column=n===-1?t.column+r:r-n,t}function nl(t,e){if(!t)throw new Error(e||"unexpected compiler condition")}function Fe(t,e,r=!1){for(let i=0;i<t.props.length;i++){const n=t.props[i];if(n.type===7&&(r||n.exp)&&(Se(e)?n.name===e:e.test(n.name)))return n}}function ht(t,e,r=!1,i=!1){for(let n=0;n<t.props.length;n++){const l=t.props[n];if(l.type===6){if(r)continue;if(l.name===e&&(l.value||i))return l}else if(l.name==="bind"&&(l.exp||i)&&Dt(l.arg,e))return l}}function Dt(t,e){return!!(t&&Ge(t)&&t.content===e)}function sa(t){return t.props.some(e=>e.type===7&&e.name==="bind"&&(!e.arg||e.arg.type!==4||!e.arg.isStatic))}function Ls(t){return t.type===5||t.type===2}function Kl(t){return t.type===7&&t.name==="slot"}function os(t){return t.type===1&&t.tagType===3}function ls(t){return t.type===1&&t.tagType===2}const fE=new Set([is,ps]);function nm(t,e=[]){if(t&&!Se(t)&&t.type===14){const r=t.callee;if(!Se(r)&&fE.has(r))return nm(t.arguments[0],e.concat(t))}return[t,e]}function Gs(t,e,r){let i,n=t.type===13?t.props:t.arguments[2],l=[],c;if(n&&!Se(n)&&n.type===14){const p=nm(n);n=p[0],l=p[1],c=l[l.length-1]}if(n==null||Se(n))i=ct([e]);else if(n.type===14){const p=n.arguments[0];!Se(p)&&p.type===15?mh(e,p)||p.properties.unshift(e):n.callee===Gn?i=fe(r.helper(Or),[ct([e]),n]):n.arguments.unshift(ct([e])),!i&&(i=n)}else n.type===15?(mh(e,n)||n.properties.unshift(e),i=n):(i=fe(r.helper(Or),[ct([e]),n]),c&&c.callee===ps&&(c=l[l.length-2]));t.type===13?c?c.arguments[0]=i:t.props=i:c?c.arguments[0]=i:t.arguments[2]=i}function mh(t,e){let r=!1;if(t.key.type===4){const i=t.key.content;r=e.properties.some(n=>n.key.type===4&&n.key.content===i)}return r}function Hs(t,e){return`_${e}_${t.replace(/[^\w]/g,(r,i)=>r==="-"?"_":t.charCodeAt(i).toString())}`}function at(t,e){if(!t||Object.keys(e).length===0)return!1;switch(t.type){case 1:for(let r=0;r<t.props.length;r++){const i=t.props[r];if(i.type===7&&(at(i.arg,e)||at(i.exp,e)))return!0}return t.children.some(r=>at(r,e));case 11:return at(t.source,e)?!0:t.children.some(r=>at(r,e));case 9:return t.branches.some(r=>at(r,e));case 10:return at(t.condition,e)?!0:t.children.some(r=>at(r,e));case 4:return!t.isStatic&&Kt(t.content)&&!!e[t.content];case 8:return t.children.some(r=>fr(r)&&at(r,e));case 5:case 12:return at(t.content,e);case 2:case 3:case 20:return!1;default:return!1}}function am(t){return t.type===14&&t.callee===Xn?t.arguments[1].returns:t}const om=/([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/,lm={parseMode:"base",ns:0,delimiters:["{{","}}"],getNamespace:()=>0,isVoidTag:Os,isPreTag:Os,isIgnoreNewlineTag:Os,isCustomElement:Os,onError:jl,onWarn:Kd,comments:!0,prefixIdentifiers:!1};let Ie=lm,yn=null,Xt="",Qe=null,Pe=null,Tt="",Vt=-1,Sr=-1,Yl=0,ar=!1,al=null;const Re=[],Ne=new KS(Re,{onerr:rt,ontext(t,e){gi(Je(t,e),t,e)},ontextentity(t,e,r){gi(t,e,r)},oninterpolation(t,e){if(ar)return gi(Je(t,e),t,e);let r=t+Ne.delimiterOpen.length,i=e-Ne.delimiterClose.length;for(;gt(Xt.charCodeAt(r));)r++;for(;gt(Xt.charCodeAt(i-1));)i--;let n=Je(r,i);n.includes("&")&&(n=JS(n)),ol({type:5,content:en(n,!1,De(r,i)),loc:De(t,e)})},onopentagname(t,e){const r=Je(t,e);Qe={type:1,tag:r,ns:Ie.getNamespace(r,Re[0],Ie.ns),tagType:0,props:[],children:[],loc:De(t-1,e),codegenNode:void 0}},onopentagend(t){gh(t)},onclosetag(t,e){const r=Je(t,e);if(!Ie.isVoidTag(r)){let i=!1;for(let n=0;n<Re.length;n++)if(Re[n].tag.toLowerCase()===r.toLowerCase()){i=!0,n>0&&rt(24,Re[0].loc.start.offset);for(let c=0;c<=n;c++){const p=Re.shift();Zi(p,e,c<n)}break}i||rt(23,cm(t,60))}},onselfclosingtag(t){const e=Qe.tag;Qe.isSelfClosing=!0,gh(t),Re[0]&&Re[0].tag===e&&Zi(Re.shift(),t)},onattribname(t,e){Pe={type:6,name:Je(t,e),nameLoc:De(t,e),value:void 0,loc:De(t)}},ondirname(t,e){const r=Je(t,e),i=r==="."||r===":"?"bind":r==="@"?"on":r==="#"?"slot":r.slice(2);if(!ar&&i===""&&rt(26,t),ar||i==="")Pe={type:6,name:r,nameLoc:De(t,e),value:void 0,loc:De(t)};else if(Pe={type:7,name:i,rawName:r,exp:void 0,arg:void 0,modifiers:r==="."?[te("prop")]:[],loc:De(t)},i==="pre"){ar=Ne.inVPre=!0,al=Qe;const n=Qe.props;for(let l=0;l<n.length;l++)n[l].type===7&&(n[l]=xE(n[l]))}},ondirarg(t,e){if(t===e)return;const r=Je(t,e);if(ar)Pe.name+=r,br(Pe.nameLoc,e);else{const i=r[0]!=="[";Pe.arg=en(i?r:r.slice(1,-1),i,De(t,e),i?3:0)}},ondirmodifier(t,e){const r=Je(t,e);if(ar)Pe.name+="."+r,br(Pe.nameLoc,e);else if(Pe.name==="slot"){const i=Pe.arg;i&&(i.content+="."+r,br(i.loc,e))}else{const i=te(r,!0,De(t,e));Pe.modifiers.push(i)}},onattribdata(t,e){Tt+=Je(t,e),Vt<0&&(Vt=t),Sr=e},onattribentity(t,e,r){Tt+=t,Vt<0&&(Vt=e),Sr=r},onattribnameend(t){const e=Pe.loc.start.offset,r=Je(e,t);Pe.type===7&&(Pe.rawName=r),Qe.props.some(i=>(i.type===7?i.rawName:i.name)===r)&&rt(2,e)},onattribend(t,e){if(Qe&&Pe){if(br(Pe.loc,e),t!==0)if(Pe.type===6)Pe.name==="class"&&(Tt=hm(Tt).trim()),t===1&&!Tt&&rt(13,e),Pe.value={type:2,content:Tt,loc:t===1?De(Vt,Sr):De(Vt-1,Sr+1)},Ne.inSFCRoot&&Qe.tag==="template"&&Pe.name==="lang"&&Tt&&Tt!=="html"&&Ne.enterRCDATA(mn("</template"),0);else{let r=0;Pe.name==="for"?r=3:Pe.name==="slot"?r=1:Pe.name==="on"&&Tt.includes(";")&&(r=2),Pe.exp=en(Tt,!1,De(Vt,Sr),0,r),Pe.name==="for"&&(Pe.forParseResult=mE(Pe.exp))}(Pe.type!==7||Pe.name!=="pre")&&Qe.props.push(Pe)}Tt="",Vt=Sr=-1},oncomment(t,e){Ie.comments&&ol({type:3,content:Je(t,e),loc:De(t-4,e+3)})},onend(){const t=Xt.length;if(Ne.state!==1)switch(Ne.state){case 5:case 8:rt(5,t);break;case 3:case 4:rt(25,Ne.sectionStart);break;case 28:Ne.currentSequence===We.CdataEnd?rt(6,t):rt(7,t);break;case 6:case 7:case 9:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:case 21:rt(9,t);break}for(let e=0;e<Re.length;e++)Zi(Re[e],t-1),rt(24,Re[e].loc.start.offset)},oncdata(t,e){Re[0].ns!==0?gi(Je(t,e),t,e):rt(1,t-9)},onprocessinginstruction(t){(Re[0]?Re[0].ns:Ie.ns)===0&&rt(21,t-1)}}),yh=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,dE=/^\(|\)$/g;function mE(t){const e=t.loc,r=t.content,i=r.match(om);if(!i)return;const[,n,l]=i,c=(m,y,g=!1)=>{const w=e.start.offset+y,v=w+m.length;return en(m,!1,De(w,v),0,g?1:0)},p={source:c(l.trim(),r.indexOf(l,n.length)),value:void 0,key:void 0,index:void 0,finalized:!1};let u=n.trim().replace(dE,"").trim();const f=n.indexOf(u),d=u.match(yh);if(d){u=u.replace(yh,"").trim();const m=d[1].trim();let y;if(m&&(y=r.indexOf(m,f+u.length),p.key=c(m,y,!0)),d[2]){const g=d[2].trim();g&&(p.index=c(g,r.indexOf(g,p.key?y+m.length:f+u.length),!0))}}return u&&(p.value=c(u,f,!0)),p}function Je(t,e){return Xt.slice(t,e)}function gh(t){Ne.inSFCRoot&&(Qe.innerLoc=De(t+1,t+1)),ol(Qe);const{tag:e,ns:r}=Qe;r===0&&Ie.isPreTag(e)&&Yl++,Ie.isVoidTag(e)?Zi(Qe,t):(Re.unshift(Qe),(r===1||r===2)&&(Ne.inXML=!0)),Qe=null}function gi(t,e,r){const i=Re[0]||yn,n=i.children[i.children.length-1];n&&n.type===2?(n.content+=t,br(n.loc,r)):i.children.push({type:2,content:t,loc:De(e,r)})}function Zi(t,e,r=!1){r?br(t.loc,cm(e,60)):br(t.loc,yE(e,62)+1),Ne.inSFCRoot&&(t.children.length?t.innerLoc.end=Bt({},t.children[t.children.length-1].loc.end):t.innerLoc.end=Bt({},t.innerLoc.start),t.innerLoc.source=Je(t.innerLoc.start.offset,t.innerLoc.end.offset));const{tag:i,ns:n,children:l}=t;if(ar||(i==="slot"?t.tagType=2:vE(t)?t.tagType=3:SE(t)&&(t.tagType=1)),Ne.inRCDATA||(t.children=um(l)),n===0&&Ie.isIgnoreNewlineTag(i)){const c=l[0];c&&c.type===2&&(c.content=c.content.replace(/^\r?\n/,""))}n===0&&Ie.isPreTag(i)&&Yl--,al===t&&(ar=Ne.inVPre=!1,al=null),Ne.inXML&&(Re[0]?Re[0].ns:Ie.ns)===0&&(Ne.inXML=!1)}function yE(t,e){let r=t;for(;Xt.charCodeAt(r)!==e&&r<Xt.length-1;)r++;return r}function cm(t,e){let r=t;for(;Xt.charCodeAt(r)!==e&&r>=0;)r--;return r}const gE=new Set(["if","else","else-if","for","slot"]);function vE({tag:t,props:e}){if(t==="template"){for(let r=0;r<e.length;r++)if(e[r].type===7&&gE.has(e[r].name))return!0}return!1}function SE({tag:t,props:e}){if(Ie.isCustomElement(t))return!1;if(t==="component"||EE(t.charCodeAt(0))||Hl(t)||Ie.isBuiltInComponent&&Ie.isBuiltInComponent(t)||Ie.isNativeTag&&!Ie.isNativeTag(t))return!0;for(let r=0;r<e.length;r++){const i=e[r];if(i.type===6&&i.name==="is"&&i.value&&i.value.content.startsWith("vue:"))return!0}return!1}function EE(t){return t>64&&t<91}const TE=/\r\n/g;function um(t){const e=Ie.whitespace!=="preserve";let r=!1;for(let i=0;i<t.length;i++){const n=t[i];if(n.type===2)if(Yl)n.content=n.content.replace(TE,`
|
|
14
|
+
`);case 114:return C("\r");case 120:{let F;return{code:F,pos:a}=Da(b,a,s,o,2,!1,P,S),C(F===null?null:String.fromCharCode(F))}case 117:{let F;return{code:F,pos:a}=Tu(b,a,s,o,P,S),C(F===null?null:String.fromCodePoint(F))}case 116:return C(" ");case 98:return C("\b");case 118:return C("\v");case 102:return C("\f");case 13:b.charCodeAt(a)===10&&++a;case 10:s=a,++o;case 8232:case 8233:return C("");case 56:case 57:if(h)return C(null);S.strictNumericEscape(a-1,s,o);default:if(R>=48&&R<=55){const F=a-1;let q=/^[0-7]+/.exec(b.slice(F,a+2))[0],J=parseInt(q,8);J>255&&(q=q.slice(0,-1),J=parseInt(q,8)),a+=q.length-1;const ee=b.charCodeAt(a);if(q!=="0"||ee===56||ee===57){if(h)return C(null);S.strictNumericEscape(F,s,o)}return C(String.fromCharCode(J))}return C(String.fromCharCode(R))}}function Da(b,a,s,o,h,S,P,C){const R=a;let F;return{n:F,pos:a}=Eu(b,a,s,o,16,h,S,!1,C,!P),F===null&&(P?C.invalidEscapeSequence(R,s,o):a=R-1),{code:F,pos:a}}function Eu(b,a,s,o,h,S,P,C,R,F){const $=a,q=h===16?vu.hex:vu.decBinOct,J=h===16?pi.hex:h===10?pi.dec:h===8?pi.oct:pi.bin;let ee=!1,oe=0;for(let me=0,Me=S??1/0;me<Me;++me){const ye=b.charCodeAt(a);let _e;if(ye===95&&C!=="bail"){const gr=b.charCodeAt(a-1),rr=b.charCodeAt(a+1);if(C){if(Number.isNaN(rr)||!J(rr)||q.has(gr)||q.has(rr)){if(F)return{n:null,pos:a};R.unexpectedNumericSeparator(a,s,o)}}else{if(F)return{n:null,pos:a};R.numericSeparatorInEscapeSequence(a,s,o)}++a;continue}if(ye>=97?_e=ye-97+10:ye>=65?_e=ye-65+10:wv(ye)?_e=ye-48:_e=1/0,_e>=h){if(_e<=9&&F)return{n:null,pos:a};if(_e<=9&&R.invalidDigit(a,s,o,h))_e=0;else if(P)_e=0,ee=!0;else break}++a,oe=oe*h+_e}return a===$||S!=null&&a-$!==S||ee?{n:null,pos:a}:{n:oe,pos:a}}function Tu(b,a,s,o,h,S){const P=b.charCodeAt(a);let C;if(P===123){if(++a,{code:C,pos:a}=Da(b,a,s,o,b.indexOf("}",a)-a,!0,h,S),++a,C!==null&&C>1114111)if(h)S.invalidCodePoint(a,s,o);else return{code:null,pos:a}}else({code:C,pos:a}=Da(b,a,s,o,4,!1,h,S));return{code:C,pos:a}}function Ts(b,a,s){return new e(s,b-a,b)}const xv=new Set([103,109,115,105,121,117,100,118]);class tr{constructor(a){const s=a.startIndex||0;this.type=a.type,this.value=a.value,this.start=s+a.start,this.end=s+a.end,this.loc=new r(a.startLoc,a.endLoc)}}class _v extends Tv{constructor(a,s){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(o,h,S,P)=>this.optionFlags&2048?(this.raise(E.InvalidDigit,Ts(o,h,S),{radix:P}),!0):!1,numericSeparatorInEscapeSequence:this.errorBuilder(E.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(E.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(E.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(E.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(o,h,S)=>{this.recordStrictModeErrors(E.StrictNumericEscape,Ts(o,h,S))},unterminated:(o,h,S)=>{throw this.raise(E.UnterminatedString,Ts(o-1,h,S))}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(E.StrictNumericEscape),unterminated:(o,h,S)=>{throw this.raise(E.UnterminatedTemplate,Ts(o,h,S))}}),this.state=new Ra,this.state.init(a),this.input=s,this.length=s.length,this.comments=[],this.isLookahead=!1}pushToken(a){this.tokens.length=this.state.tokensLength,this.tokens.push(a),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.optionFlags&256&&this.pushToken(new tr(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(a){return this.match(a)?(this.next(),!0):!1}match(a){return this.state.type===a}createLookaheadState(a){return{pos:a.pos,value:null,type:a.type,start:a.start,end:a.end,context:[this.curContext()],inType:a.inType,startLoc:a.startLoc,lastTokEndLoc:a.lastTokEndLoc,curLine:a.curLine,lineStart:a.lineStart,curPosition:a.curPosition}}lookahead(){const a=this.state;this.state=this.createLookaheadState(a),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;const s=this.state;return this.state=a,s}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(a){return La.lastIndex=a,La.test(this.input)?La.lastIndex:a}lookaheadCharCode(){return this.lookaheadCharCodeSince(this.state.pos)}lookaheadCharCodeSince(a){return this.input.charCodeAt(this.nextTokenStartSince(a))}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(a){return Ma.lastIndex=a,Ma.test(this.input)?Ma.lastIndex:a}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(a){let s=this.input.charCodeAt(a);if((s&64512)===55296&&++a<this.input.length){const o=this.input.charCodeAt(a);(o&64512)===56320&&(s=65536+((s&1023)<<10)+(o&1023))}return s}setStrict(a){this.state.strict=a,a&&(this.state.strictErrors.forEach(([s,o])=>this.raise(s,o)),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(a){let s;this.isLookahead||(s=this.state.curPosition());const o=this.state.pos,h=this.input.indexOf(a,o+2);if(h===-1)throw this.raise(E.UnterminatedComment,this.state.curPosition());for(this.state.pos=h+a.length,ui.lastIndex=o+2;ui.test(this.input)&&ui.lastIndex<=h;)++this.state.curLine,this.state.lineStart=ui.lastIndex;if(this.isLookahead)return;const S={type:"CommentBlock",value:this.input.slice(o+2,h),start:this.sourceToOffsetPos(o),end:this.sourceToOffsetPos(h+a.length),loc:new r(s,this.state.curPosition())};return this.optionFlags&256&&this.pushToken(S),S}skipLineComment(a){const s=this.state.pos;let o;this.isLookahead||(o=this.state.curPosition());let h=this.input.charCodeAt(this.state.pos+=a);if(this.state.pos<this.length)for(;!zr(h)&&++this.state.pos<this.length;)h=this.input.charCodeAt(this.state.pos);if(this.isLookahead)return;const S=this.state.pos,C={type:"CommentLine",value:this.input.slice(s+a,S),start:this.sourceToOffsetPos(s),end:this.sourceToOffsetPos(S),loc:new r(o,this.state.curPosition())};return this.optionFlags&256&&this.pushToken(C),C}skipSpace(){const a=this.state.pos,s=this.optionFlags&4096?[]:null;e:for(;this.state.pos<this.length;){const o=this.input.charCodeAt(this.state.pos);switch(o){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:{const h=this.skipBlockComment("*/");h!==void 0&&(this.addComment(h),s?.push(h));break}case 47:{const h=this.skipLineComment(2);h!==void 0&&(this.addComment(h),s?.push(h));break}default:break e}break;default:if(dv(o))++this.state.pos;else if(o===45&&!this.inModule&&this.optionFlags&8192){const h=this.state.pos;if(this.input.charCodeAt(h+1)===45&&this.input.charCodeAt(h+2)===62&&(a===0||this.state.lineStart>a)){const S=this.skipLineComment(3);S!==void 0&&(this.addComment(S),s?.push(S))}else break e}else if(o===60&&!this.inModule&&this.optionFlags&8192){const h=this.state.pos;if(this.input.charCodeAt(h+1)===33&&this.input.charCodeAt(h+2)===45&&this.input.charCodeAt(h+3)===45){const S=this.skipLineComment(4);S!==void 0&&(this.addComment(S),s?.push(S))}else break e}else break e}}if(s?.length>0){const o=this.state.pos,h={start:this.sourceToOffsetPos(a),end:this.sourceToOffsetPos(o),comments:s,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(h)}}finishToken(a,s){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();const o=this.state.type;this.state.type=a,this.state.value=s,this.isLookahead||this.updateContext(o)}replaceToken(a){this.state.type=a,this.updateContext()}readToken_numberSign(){if(this.state.pos===0&&this.readToken_interpreter())return;const a=this.state.pos+1,s=this.codePointAtPos(a);if(s>=48&&s<=57)throw this.raise(E.UnexpectedDigitAfterHash,this.state.curPosition());if(s===123||s===91&&this.hasPlugin("recordAndTuple")){if(this.expectPlugin("recordAndTuple"),this.getPluginOption("recordAndTuple","syntaxType")==="bar")throw this.raise(s===123?E.RecordExpressionHashIncorrectStartSyntaxType:E.TupleExpressionHashIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,s===123?this.finishToken(7):this.finishToken(1)}else jt(s)?(++this.state.pos,this.finishToken(139,this.readWord1(s))):s===92?(++this.state.pos,this.finishToken(139,this.readWord1())):this.finishOp(27,1)}readToken_dot(){const a=this.input.charCodeAt(this.state.pos+1);if(a>=48&&a<=57){this.readNumber(!0);return}a===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 a=this.input.charCodeAt(this.state.pos+1);if(a!==33)return!1;const s=this.state.pos;for(this.state.pos+=1;!zr(a)&&++this.state.pos<this.length;)a=this.input.charCodeAt(this.state.pos);const o=this.input.slice(s+2,this.state.pos);return this.finishToken(28,o),!0}readToken_mult_modulo(a){let s=a===42?55:54,o=1,h=this.input.charCodeAt(this.state.pos+1);a===42&&h===42&&(o++,h=this.input.charCodeAt(this.state.pos+2),s=57),h===61&&!this.state.inType&&(o++,s=a===37?33:30),this.finishOp(s,o)}readToken_pipe_amp(a){const s=this.input.charCodeAt(this.state.pos+1);if(s===a){this.input.charCodeAt(this.state.pos+2)===61?this.finishOp(30,3):this.finishOp(a===124?41:42,2);return}if(a===124){if(s===62){this.finishOp(39,2);return}if(this.hasPlugin("recordAndTuple")&&s===125){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(E.RecordExpressionBarIncorrectEndSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(9);return}if(this.hasPlugin("recordAndTuple")&&s===93){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(E.TupleExpressionBarIncorrectEndSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(4);return}}if(s===61){this.finishOp(30,2);return}this.finishOp(a===124?43:45,1)}readToken_caret(){const a=this.input.charCodeAt(this.state.pos+1);a===61&&!this.state.inType?this.finishOp(32,2):a===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(a){const s=this.input.charCodeAt(this.state.pos+1);if(s===a){this.finishOp(34,2);return}s===61?this.finishOp(30,2):this.finishOp(53,1)}readToken_lt(){const{pos:a}=this.state,s=this.input.charCodeAt(a+1);if(s===60){if(this.input.charCodeAt(a+2)===61){this.finishOp(30,3);return}this.finishOp(51,2);return}if(s===61){this.finishOp(49,2);return}this.finishOp(47,1)}readToken_gt(){const{pos:a}=this.state,s=this.input.charCodeAt(a+1);if(s===62){const o=this.input.charCodeAt(a+2)===62?3:2;if(this.input.charCodeAt(a+o)===61){this.finishOp(30,o+1);return}this.finishOp(52,o);return}if(s===61){this.finishOp(49,2);return}this.finishOp(48,1)}readToken_eq_excl(a){const s=this.input.charCodeAt(this.state.pos+1);if(s===61){this.finishOp(46,this.input.charCodeAt(this.state.pos+2)===61?3:2);return}if(a===61&&s===62){this.state.pos+=2,this.finishToken(19);return}this.finishOp(a===61?29:35,1)}readToken_question(){const a=this.input.charCodeAt(this.state.pos+1),s=this.input.charCodeAt(this.state.pos+2);a===63?s===61?this.finishOp(30,3):this.finishOp(40,2):a===46&&!(s>=48&&s<=57)?(this.state.pos+=2,this.finishToken(18)):(++this.state.pos,this.finishToken(17))}getTokenFromCode(a){switch(a){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(E.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(E.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:{const s=this.input.charCodeAt(this.state.pos+1);if(s===120||s===88){this.readRadixNumber(16);return}if(s===111||s===79){this.readRadixNumber(8);return}if(s===98||s===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(a);return;case 47:this.readToken_slash();return;case 37:case 42:this.readToken_mult_modulo(a);return;case 124:case 38:this.readToken_pipe_amp(a);return;case 94:this.readToken_caret();return;case 43:case 45:this.readToken_plus_min(a);return;case 60:this.readToken_lt();return;case 62:this.readToken_gt();return;case 61:case 33:this.readToken_eq_excl(a);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(jt(a)){this.readWord(a);return}}throw this.raise(E.InvalidOrUnexpectedToken,this.state.curPosition(),{unexpected:String.fromCodePoint(a)})}finishOp(a,s){const o=this.input.slice(this.state.pos,this.state.pos+s);this.state.pos+=s,this.finishToken(a,o)}readRegexp(){const a=this.state.startLoc,s=this.state.start+1;let o,h,{pos:S}=this.state;for(;;++S){if(S>=this.length)throw this.raise(E.UnterminatedRegExp,i(a,1));const F=this.input.charCodeAt(S);if(zr(F))throw this.raise(E.UnterminatedRegExp,i(a,1));if(o)o=!1;else{if(F===91)h=!0;else if(F===93&&h)h=!1;else if(F===47&&!h)break;o=F===92}}const P=this.input.slice(s,S);++S;let C="";const R=()=>i(a,S+2-s);for(;S<this.length;){const F=this.codePointAtPos(S),$=String.fromCharCode(F);if(xv.has(F))F===118?C.includes("u")&&this.raise(E.IncompatibleRegExpUVFlags,R()):F===117&&C.includes("v")&&this.raise(E.IncompatibleRegExpUVFlags,R()),C.includes($)&&this.raise(E.DuplicateRegExpFlags,R());else if(Vr(F)||F===92)this.raise(E.MalformedRegExpFlags,R());else break;++S,C+=$}this.state.pos=S,this.finishToken(138,{pattern:P,flags:C})}readInt(a,s,o=!1,h=!0){const{n:S,pos:P}=Eu(this.input,this.state.pos,this.state.lineStart,this.state.curLine,a,s,o,h,this.errorHandlers_readInt,!1);return this.state.pos=P,S}readRadixNumber(a){const s=this.state.pos,o=this.state.curPosition();let h=!1;this.state.pos+=2;const S=this.readInt(a);S==null&&this.raise(E.InvalidDigit,i(o,2),{radix:a});const P=this.input.charCodeAt(this.state.pos);if(P===110)++this.state.pos,h=!0;else if(P===109)throw this.raise(E.InvalidDecimal,o);if(jt(this.codePointAtPos(this.state.pos)))throw this.raise(E.NumberIdentifier,this.state.curPosition());if(h){const C=this.input.slice(s,this.state.pos).replace(/[_n]/g,"");this.finishToken(136,C);return}this.finishToken(135,S)}readNumber(a){const s=this.state.pos,o=this.state.curPosition();let h=!1,S=!1,P=!1,C=!1;!a&&this.readInt(10)===null&&this.raise(E.InvalidNumber,this.state.curPosition());const R=this.state.pos-s>=2&&this.input.charCodeAt(s)===48;if(R){const ee=this.input.slice(s,this.state.pos);if(this.recordStrictModeErrors(E.StrictOctalLiteral,o),!this.state.strict){const oe=ee.indexOf("_");oe>0&&this.raise(E.ZeroDigitNumericSeparator,i(o,oe))}C=R&&!/[89]/.test(ee)}let F=this.input.charCodeAt(this.state.pos);if(F===46&&!C&&(++this.state.pos,this.readInt(10),h=!0,F=this.input.charCodeAt(this.state.pos)),(F===69||F===101)&&!C&&(F=this.input.charCodeAt(++this.state.pos),(F===43||F===45)&&++this.state.pos,this.readInt(10)===null&&this.raise(E.InvalidOrMissingExponent,o),h=!0,P=!0,F=this.input.charCodeAt(this.state.pos)),F===110&&((h||R)&&this.raise(E.InvalidBigIntLiteral,o),++this.state.pos,S=!0),F===109){this.expectPlugin("decimal",this.state.curPosition()),(P||R)&&this.raise(E.InvalidDecimal,o),++this.state.pos;var $=!0}if(jt(this.codePointAtPos(this.state.pos)))throw this.raise(E.NumberIdentifier,this.state.curPosition());const q=this.input.slice(s,this.state.pos).replace(/[_mn]/g,"");if(S){this.finishToken(136,q);return}if($){this.finishToken(137,q);return}const J=C?parseInt(q,8):parseFloat(q);this.finishToken(135,J)}readCodePoint(a){const{code:s,pos:o}=Tu(this.input,this.state.pos,this.state.lineStart,this.state.curLine,a,this.errorHandlers_readCodePoint);return this.state.pos=o,s}readString(a){const{str:s,pos:o,curLine:h,lineStart:S}=Su(a===34?"double":"single",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string);this.state.pos=o+1,this.state.lineStart=S,this.state.curLine=h,this.finishToken(134,s)}readTemplateContinuation(){this.match(8)||this.unexpected(null,8),this.state.pos--,this.readTemplateToken()}readTemplateToken(){const a=this.input[this.state.pos],{str:s,firstInvalidLoc:o,pos:h,curLine:S,lineStart:P}=Su("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=h+1,this.state.lineStart=P,this.state.curLine=S,o&&(this.state.firstInvalidTemplateEscapePos=new e(o.curLine,o.pos-o.lineStart,this.sourceToOffsetPos(o.pos))),this.input.codePointAt(h)===96?this.finishToken(24,o?null:a+s+"`"):(this.state.pos++,this.finishToken(25,o?null:a+s+"${"))}recordStrictModeErrors(a,s){const o=s.index;this.state.strict&&!this.state.strictErrors.has(o)?this.raise(a,s):this.state.strictErrors.set(o,[a,s])}readWord1(a){this.state.containsEsc=!1;let s="";const o=this.state.pos;let h=this.state.pos;for(a!==void 0&&(this.state.pos+=a<=65535?1:2);this.state.pos<this.length;){const S=this.codePointAtPos(this.state.pos);if(Vr(S))this.state.pos+=S<=65535?1:2;else if(S===92){this.state.containsEsc=!0,s+=this.input.slice(h,this.state.pos);const P=this.state.curPosition(),C=this.state.pos===o?jt:Vr;if(this.input.charCodeAt(++this.state.pos)!==117){this.raise(E.MissingUnicodeEscape,this.state.curPosition()),h=this.state.pos-1;continue}++this.state.pos;const R=this.readCodePoint(!0);R!==null&&(C(R)||this.raise(E.EscapedCharNotAnIdentifier,P),s+=String.fromCodePoint(R)),h=this.state.pos}else break}return s+this.input.slice(h,this.state.pos)}readWord(a){const s=this.readWord1(a),o=he.get(s);o!==void 0?this.finishToken(o,nt(o)):this.finishToken(132,s)}checkKeywordEscapes(){const{type:a}=this.state;Be(a)&&this.state.containsEsc&&this.raise(E.InvalidEscapedReservedWord,this.state.startLoc,{reservedWord:nt(a)})}raise(a,s,o={}){const h=s instanceof e?s:s.loc.start,S=a(h,o);if(!(this.optionFlags&2048))throw S;return this.isLookahead||this.state.errors.push(S),S}raiseOverwrite(a,s,o={}){const h=s instanceof e?s:s.loc.start,S=h.index,P=this.state.errors;for(let C=P.length-1;C>=0;C--){const R=P[C];if(R.loc.index===S)return P[C]=a(h,o);if(R.loc.index<S)break}return this.raise(a,s,o)}updateContext(a){}unexpected(a,s){throw this.raise(E.UnexpectedToken,a??this.state.startLoc,{expected:s?nt(s):null})}expectPlugin(a,s){if(this.hasPlugin(a))return!0;throw this.raise(E.MissingPlugin,s??this.state.startLoc,{missingPlugin:[a]})}expectOnePlugin(a){if(!a.some(s=>this.hasPlugin(s)))throw this.raise(E.MissingOneOfPlugins,this.state.startLoc,{missingPlugin:a})}errorBuilder(a){return(s,o,h)=>{this.raise(a,Ts(s,o,h))}}}class Av{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}}class Cv{constructor(a){this.parser=void 0,this.stack=[],this.undefinedPrivateNames=new Map,this.parser=a}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new Av)}exit(){const a=this.stack.pop(),s=this.current();for(const[o,h]of Array.from(a.undefinedPrivateNames))s?s.undefinedPrivateNames.has(o)||s.undefinedPrivateNames.set(o,h):this.parser.raise(E.InvalidPrivateFieldResolution,h,{identifierName:o})}declarePrivateName(a,s,o){const{privateNames:h,loneAccessors:S,undefinedPrivateNames:P}=this.current();let C=h.has(a);if(s&3){const R=C&&S.get(a);if(R){const F=R&4,$=s&4,q=R&3,J=s&3;C=q===J||F!==$,C||S.delete(a)}else C||S.set(a,s)}C&&this.parser.raise(E.PrivateNameRedeclaration,o,{identifierName:a}),h.add(a),P.delete(a)}usePrivateName(a,s){let o;for(o of this.stack)if(o.privateNames.has(a))return;o?o.undefinedPrivateNames.set(a,s):this.parser.raise(E.InvalidPrivateFieldResolution,s,{identifierName:a})}}class fi{constructor(a=0){this.type=a}canBeArrowParameterDeclaration(){return this.type===2||this.type===1}isCertainlyParameterDeclaration(){return this.type===3}}class wu extends fi{constructor(a){super(a),this.declarationErrors=new Map}recordDeclarationError(a,s){const o=s.index;this.declarationErrors.set(o,[a,s])}clearDeclarationError(a){this.declarationErrors.delete(a)}iterateErrors(a){this.declarationErrors.forEach(a)}}class Iv{constructor(a){this.parser=void 0,this.stack=[new fi],this.parser=a}enter(a){this.stack.push(a)}exit(){this.stack.pop()}recordParameterInitializerError(a,s){const o=s.loc.start,{stack:h}=this;let S=h.length-1,P=h[S];for(;!P.isCertainlyParameterDeclaration();){if(P.canBeArrowParameterDeclaration())P.recordDeclarationError(a,o);else return;P=h[--S]}this.parser.raise(a,o)}recordArrowParameterBindingError(a,s){const{stack:o}=this,h=o[o.length-1],S=s.loc.start;if(h.isCertainlyParameterDeclaration())this.parser.raise(a,S);else if(h.canBeArrowParameterDeclaration())h.recordDeclarationError(a,S);else return}recordAsyncArrowParametersError(a){const{stack:s}=this;let o=s.length-1,h=s[o];for(;h.canBeArrowParameterDeclaration();)h.type===2&&h.recordDeclarationError(E.AwaitBindingIdentifier,a),h=s[--o]}validateAsPattern(){const{stack:a}=this,s=a[a.length-1];s.canBeArrowParameterDeclaration()&&s.iterateErrors(([o,h])=>{this.parser.raise(o,h);let S=a.length-2,P=a[S];for(;P.canBeArrowParameterDeclaration();)P.clearDeclarationError(h.index),P=a[--S]})}}function Nv(){return new fi(3)}function Ov(){return new wu(1)}function kv(){return new wu(2)}function bu(){return new fi}class Lv extends _v{addExtra(a,s,o,h=!0){if(!a)return;let{extra:S}=a;S==null&&(S={},a.extra=S),h?S[s]=o:Object.defineProperty(S,s,{enumerable:h,value:o})}isContextual(a){return this.state.type===a&&!this.state.containsEsc}isUnparsedContextual(a,s){const o=a+s.length;if(this.input.slice(a,o)===s){const h=this.input.charCodeAt(o);return!(Vr(h)||(h&64512)===55296)}return!1}isLookaheadContextual(a){const s=this.nextTokenStart();return this.isUnparsedContextual(s,a)}eatContextual(a){return this.isContextual(a)?(this.next(),!0):!1}expectContextual(a,s){if(!this.eatContextual(a)){if(s!=null)throw this.raise(s,this.state.startLoc);this.unexpected(null,a)}}canInsertSemicolon(){return this.match(140)||this.match(8)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return yu(this.input,this.offsetToSourcePos(this.state.lastTokEndLoc.index),this.state.start)}hasFollowingLineBreak(){return yu(this.input,this.state.end,this.nextTokenStart())}isLineTerminator(){return this.eat(13)||this.canInsertSemicolon()}semicolon(a=!0){(a?this.isLineTerminator():this.eat(13))||this.raise(E.MissingSemicolon,this.state.lastTokEndLoc)}expect(a,s){this.eat(a)||this.unexpected(s,a)}tryParse(a,s=this.state.clone()){const o={node:null};try{const h=a((S=null)=>{throw o.node=S,o});if(this.state.errors.length>s.errors.length){const S=this.state;return this.state=s,this.state.tokensLength=S.tokensLength,{node:h,error:S.errors[s.errors.length],thrown:!1,aborted:!1,failState:S}}return{node:h,error:null,thrown:!1,aborted:!1,failState:null}}catch(h){const S=this.state;if(this.state=s,h instanceof SyntaxError)return{node:null,error:h,thrown:!0,aborted:!1,failState:S};if(h===o)return{node:o.node,error:null,thrown:!1,aborted:!0,failState:S};throw h}}checkExpressionErrors(a,s){if(!a)return!1;const{shorthandAssignLoc:o,doubleProtoLoc:h,privateKeyLoc:S,optionalParametersLoc:P}=a,C=!!o||!!h||!!P||!!S;if(!s)return C;o!=null&&this.raise(E.InvalidCoverInitializedName,o),h!=null&&this.raise(E.DuplicateProto,h),S!=null&&this.raise(E.UnexpectedPrivateField,S),P!=null&&this.unexpected(P)}isLiteralPropertyName(){return Ee(this.state.type)}isPrivateName(a){return a.type==="PrivateName"}getPrivateNameSV(a){return a.id.name}hasPropertyAsPrivateName(a){return(a.type==="MemberExpression"||a.type==="OptionalMemberExpression")&&this.isPrivateName(a.property)}isObjectProperty(a){return a.type==="ObjectProperty"}isObjectMethod(a){return a.type==="ObjectMethod"}initializeScopes(a=this.options.sourceType==="module"){const s=this.state.labels;this.state.labels=[];const o=this.exportedIdentifiers;this.exportedIdentifiers=new Set;const h=this.inModule;this.inModule=a;const S=this.scope,P=this.getScopeHandler();this.scope=new P(this,a);const C=this.prodParam;this.prodParam=new vv;const R=this.classScope;this.classScope=new Cv(this);const F=this.expressionScope;return this.expressionScope=new Iv(this),()=>{this.state.labels=s,this.exportedIdentifiers=o,this.inModule=h,this.scope=S,this.prodParam=C,this.classScope=R,this.expressionScope=F}}enterInitialScopes(){let a=0;this.inModule&&(a|=2),this.optionFlags&32&&(a|=1),this.scope.enter(1),this.prodParam.enter(a)}checkDestructuringPrivate(a){const{privateKeyLoc:s}=a;s!==null&&this.expectPlugin("destructuringPrivate",s)}}class di{constructor(){this.shorthandAssignLoc=null,this.doubleProtoLoc=null,this.privateKeyLoc=null,this.optionalParametersLoc=null}}class mi{constructor(a,s,o){this.type="",this.start=s,this.end=0,this.loc=new r(o),a?.optionFlags&128&&(this.range=[s,0]),a!=null&&a.filename&&(this.loc.filename=a.filename)}}const Fa=mi.prototype;Fa.__clone=function(){const b=new mi(void 0,this.start,this.loc.start),a=Object.keys(this);for(let s=0,o=a.length;s<o;s++){const h=a[s];h!=="leadingComments"&&h!=="trailingComments"&&h!=="innerComments"&&(b[h]=this[h])}return b};class Mv extends Lv{startNode(){const a=this.state.startLoc;return new mi(this,a.index,a)}startNodeAt(a){return new mi(this,a.index,a)}startNodeAtNode(a){return this.startNodeAt(a.loc.start)}finishNode(a,s){return this.finishNodeAt(a,s,this.state.lastTokEndLoc)}finishNodeAt(a,s,o){return a.type=s,a.end=o.index,a.loc.end=o,this.optionFlags&128&&(a.range[1]=o.index),this.optionFlags&4096&&this.processComment(a),a}resetStartLocation(a,s){a.start=s.index,a.loc.start=s,this.optionFlags&128&&(a.range[0]=s.index)}resetEndLocation(a,s=this.state.lastTokEndLoc){a.end=s.index,a.loc.end=s,this.optionFlags&128&&(a.range[1]=s.index)}resetStartLocationFromNode(a,s){this.resetStartLocation(a,s.loc.start)}castNodeTo(a,s){return a.type=s,a}cloneIdentifier(a){const{type:s,start:o,end:h,loc:S,range:P,name:C}=a,R=Object.create(Fa);return R.type=s,R.start=o,R.end=h,R.loc=S,R.range=P,R.name=C,a.extra&&(R.extra=a.extra),R}cloneStringLiteral(a){const{type:s,start:o,end:h,loc:S,range:P,extra:C}=a,R=Object.create(Fa);return R.type=s,R.start=o,R.end=h,R.loc=S,R.range=P,R.extra=C,R.value=a.value,R}}const Pu=b=>b.type==="ParenthesizedExpression"?Pu(b.expression):b;class Rv extends Mv{toAssignable(a,s=!1){var o,h;let S;switch((a.type==="ParenthesizedExpression"||(o=a.extra)!=null&&o.parenthesized)&&(S=Pu(a),s?S.type==="Identifier"?this.expressionScope.recordArrowParameterBindingError(E.InvalidParenthesizedAssignment,a):S.type!=="MemberExpression"&&!this.isOptionalMemberExpression(S)&&this.raise(E.InvalidParenthesizedAssignment,a):this.raise(E.InvalidParenthesizedAssignment,a)),a.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":this.castNodeTo(a,"ObjectPattern");for(let C=0,R=a.properties.length,F=R-1;C<R;C++){var P;const $=a.properties[C],q=C===F;this.toAssignableObjectExpressionProp($,q,s),q&&$.type==="RestElement"&&(P=a.extra)!=null&&P.trailingCommaLoc&&this.raise(E.RestTrailingComma,a.extra.trailingCommaLoc)}break;case"ObjectProperty":{const{key:C,value:R}=a;this.isPrivateName(C)&&this.classScope.usePrivateName(this.getPrivateNameSV(C),C.loc.start),this.toAssignable(R,s);break}case"SpreadElement":throw new Error("Internal @babel/parser error (this is a bug, please report it). SpreadElement should be converted by .toAssignable's caller.");case"ArrayExpression":this.castNodeTo(a,"ArrayPattern"),this.toAssignableList(a.elements,(h=a.extra)==null?void 0:h.trailingCommaLoc,s);break;case"AssignmentExpression":a.operator!=="="&&this.raise(E.MissingEqInAssignment,a.left.loc.end),this.castNodeTo(a,"AssignmentPattern"),delete a.operator,this.toAssignable(a.left,s);break;case"ParenthesizedExpression":this.toAssignable(S,s);break}}toAssignableObjectExpressionProp(a,s,o){if(a.type==="ObjectMethod")this.raise(a.kind==="get"||a.kind==="set"?E.PatternHasAccessor:E.PatternHasMethod,a.key);else if(a.type==="SpreadElement"){this.castNodeTo(a,"RestElement");const h=a.argument;this.checkToRestConversion(h,!1),this.toAssignable(h,o),s||this.raise(E.RestTrailingComma,a)}else this.toAssignable(a,o)}toAssignableList(a,s,o){const h=a.length-1;for(let S=0;S<=h;S++){const P=a[S];P&&(this.toAssignableListItem(a,S,o),P.type==="RestElement"&&(S<h?this.raise(E.RestTrailingComma,P):s&&this.raise(E.RestTrailingComma,s)))}}toAssignableListItem(a,s,o){const h=a[s];if(h.type==="SpreadElement"){this.castNodeTo(h,"RestElement");const S=h.argument;this.checkToRestConversion(S,!0),this.toAssignable(S,o)}else this.toAssignable(h,o)}isAssignable(a,s){switch(a.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":return!0;case"ObjectExpression":{const o=a.properties.length-1;return a.properties.every((h,S)=>h.type!=="ObjectMethod"&&(S===o||h.type!=="SpreadElement")&&this.isAssignable(h))}case"ObjectProperty":return this.isAssignable(a.value);case"SpreadElement":return this.isAssignable(a.argument);case"ArrayExpression":return a.elements.every(o=>o===null||this.isAssignable(o));case"AssignmentExpression":return a.operator==="=";case"ParenthesizedExpression":return this.isAssignable(a.expression);case"MemberExpression":case"OptionalMemberExpression":return!s;default:return!1}}toReferencedList(a,s){return a}toReferencedListDeep(a,s){this.toReferencedList(a,s);for(const o of a)o?.type==="ArrayExpression"&&this.toReferencedListDeep(o.elements)}parseSpread(a){const s=this.startNode();return this.next(),s.argument=this.parseMaybeAssignAllowIn(a,void 0),this.finishNode(s,"SpreadElement")}parseRestBinding(){const a=this.startNode();return this.next(),a.argument=this.parseBindingAtom(),this.finishNode(a,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{const a=this.startNode();return this.next(),a.elements=this.parseBindingList(3,93,1),this.finishNode(a,"ArrayPattern")}case 5:return this.parseObjectLike(8,!0)}return this.parseIdentifier()}parseBindingList(a,s,o){const h=o&1,S=[];let P=!0;for(;!this.eat(a);)if(P?P=!1:this.expect(12),h&&this.match(12))S.push(null);else{if(this.eat(a))break;if(this.match(21)){let C=this.parseRestBinding();if((this.hasPlugin("flow")||o&2)&&(C=this.parseFunctionParamType(C)),S.push(C),!this.checkCommaAfterRest(s)){this.expect(a);break}}else{const C=[];if(o&2)for(this.match(26)&&this.hasPlugin("decorators")&&this.raise(E.UnsupportedParameterDecorator,this.state.startLoc);this.match(26);)C.push(this.parseDecorator());S.push(this.parseBindingElement(o,C))}}return S}parseBindingRestProperty(a){return this.next(),a.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(a,"RestElement")}parseBindingProperty(){const{type:a,startLoc:s}=this.state;if(a===21)return this.parseBindingRestProperty(this.startNode());const o=this.startNode();return a===139?(this.expectPlugin("destructuringPrivate",s),this.classScope.usePrivateName(this.state.value,s),o.key=this.parsePrivateName()):this.parsePropertyName(o),o.method=!1,this.parseObjPropValue(o,s,!1,!1,!0,!1)}parseBindingElement(a,s){const o=this.parseMaybeDefault();return(this.hasPlugin("flow")||a&2)&&this.parseFunctionParamType(o),s.length&&(o.decorators=s,this.resetStartLocationFromNode(o,s[0])),this.parseMaybeDefault(o.loc.start,o)}parseFunctionParamType(a){return a}parseMaybeDefault(a,s){if(a??(a=this.state.startLoc),s=s??this.parseBindingAtom(),!this.eat(29))return s;const o=this.startNodeAt(a);return o.left=s,o.right=this.parseMaybeAssignAllowIn(),this.finishNode(o,"AssignmentPattern")}isValidLVal(a,s,o){switch(a){case"AssignmentPattern":return"left";case"RestElement":return"argument";case"ObjectProperty":return"value";case"ParenthesizedExpression":return"expression";case"ArrayPattern":return"elements";case"ObjectPattern":return"properties"}return!1}isOptionalMemberExpression(a){return a.type==="OptionalMemberExpression"}checkLVal(a,s,o=64,h=!1,S=!1,P=!1){var C;const R=a.type;if(this.isObjectMethod(a))return;const F=this.isOptionalMemberExpression(a);if(F||R==="MemberExpression"){F&&(this.expectPlugin("optionalChainingAssign",a.loc.start),s.type!=="AssignmentExpression"&&this.raise(E.InvalidLhsOptionalChaining,a,{ancestor:s})),o!==64&&this.raise(E.InvalidPropertyBindingPattern,a);return}if(R==="Identifier"){this.checkIdentifier(a,o,S);const{name:me}=a;h&&(h.has(me)?this.raise(E.ParamDupe,a):h.add(me));return}const $=this.isValidLVal(R,!(P||(C=a.extra)!=null&&C.parenthesized)&&s.type==="AssignmentExpression",o);if($===!0)return;if($===!1){const me=o===64?E.InvalidLhs:E.InvalidLhsBinding;this.raise(me,a,{ancestor:s});return}let q,J;typeof $=="string"?(q=$,J=R==="ParenthesizedExpression"):[q,J]=$;const ee=R==="ArrayPattern"||R==="ObjectPattern"?{type:R}:s,oe=a[q];if(Array.isArray(oe))for(const me of oe)me&&this.checkLVal(me,ee,o,h,S,J);else oe&&this.checkLVal(oe,ee,o,h,S,J)}checkIdentifier(a,s,o=!1){this.state.strict&&(o?du(a.name,this.inModule):fu(a.name))&&(s===64?this.raise(E.StrictEvalArguments,a,{referenceName:a.name}):this.raise(E.StrictEvalArgumentsBinding,a,{bindingName:a.name})),s&8192&&a.name==="let"&&this.raise(E.LetInLexicalBinding,a),s&64||this.declareNameFromIdentifier(a,s)}declareNameFromIdentifier(a,s){this.scope.declareName(a.name,s,a.loc.start)}checkToRestConversion(a,s){switch(a.type){case"ParenthesizedExpression":this.checkToRestConversion(a.expression,s);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(s)break;default:this.raise(E.InvalidRestAssignmentPattern,a)}}checkCommaAfterRest(a){return this.match(12)?(this.raise(this.lookaheadCharCode()===a?E.RestTrailingComma:E.ElementAfterRest,this.state.startLoc),!0):!1}}function Dv(b){if(b==null)throw new Error(`Unexpected ${b} value.`);return b}function xu(b){if(!b)throw new Error("Assert fail")}const ae=T`typescript`({AbstractMethodHasImplementation:({methodName:b})=>`Method '${b}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:b})=>`Property '${b}' 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:b})=>`'declare' is not allowed in ${b}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:({modifier:b})=>`Accessibility modifier already seen: '${b}'.`,DuplicateModifier:({modifier:b})=>`Duplicate modifier: '${b}'.`,EmptyHeritageClauseType:({token:b})=>`'${b}' 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:b})=>`'${b[0]}' modifier cannot be used with '${b[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:b})=>`Index signatures cannot have an accessibility modifier ('${b}').`,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:b})=>`'${b}' list can only include identifiers or qualified-names with optional type arguments.`,InvalidModifierOnAwaitUsingDeclaration:b=>`'${b}' modifier cannot appear on an await using declaration.`,InvalidModifierOnTypeMember:({modifier:b})=>`'${b}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:b})=>`'${b}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:b})=>`'${b}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifierOnUsingDeclaration:b=>`'${b}' modifier cannot appear on a using declaration.`,InvalidModifiersOrder:({orderedModifiers:b})=>`'${b[0]}' modifier must precede '${b[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:b})=>`Private elements cannot have an accessibility modifier ('${b}').`,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:b})=>`Single type parameter ${b} should have a trailing comma. Example usage: <${b},>.`,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:b})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${b}.`});function Fv(b){switch(b){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 _u(b){return b==="private"||b==="public"||b==="protected"}function Bv(b){return b==="in"||b==="out"}var $v=b=>class extends b{constructor(...s){super(...s),this.tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out"],disallowedModifiers:["const","public","private","protected","readonly","declare","abstract","override"],errorTemplate:ae.InvalidModifierOnTypeParameter}),this.tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:ae.InvalidModifierOnTypeParameterPositions}),this.tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:ae.InvalidModifierOnTypeParameter})}getScopeHandler(){return gv}tsIsIdentifier(){return Y(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(s,o,h){if(!Y(this.state.type)&&this.state.type!==58&&this.state.type!==75)return;const S=this.state.value;if(s.includes(S)){if(h&&this.match(106)||o&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return S}}tsParseModifiers({allowedModifiers:s,disallowedModifiers:o,stopOnStartOfClassStaticBlock:h,errorTemplate:S=ae.InvalidModifierOnTypeMember},P){const C=(F,$,q,J)=>{$===q&&P[J]&&this.raise(ae.InvalidModifiersOrder,F,{orderedModifiers:[q,J]})},R=(F,$,q,J)=>{(P[q]&&$===J||P[J]&&$===q)&&this.raise(ae.IncompatibleModifiers,F,{modifiers:[q,J]})};for(;;){const{startLoc:F}=this.state,$=this.tsParseModifier(s.concat(o??[]),h,P.static);if(!$)break;_u($)?P.accessibility?this.raise(ae.DuplicateAccessibilityModifier,F,{modifier:$}):(C(F,$,$,"override"),C(F,$,$,"static"),C(F,$,$,"readonly"),P.accessibility=$):Bv($)?(P[$]&&this.raise(ae.DuplicateModifier,F,{modifier:$}),P[$]=!0,C(F,$,"in","out")):(hasOwnProperty.call(P,$)?this.raise(ae.DuplicateModifier,F,{modifier:$}):(C(F,$,"static","readonly"),C(F,$,"static","override"),C(F,$,"override","readonly"),C(F,$,"abstract","override"),R(F,$,"declare","override"),R(F,$,"static","abstract")),P[$]=!0),o!=null&&o.includes($)&&this.raise(S,F,{modifier:$})}}tsIsListTerminator(s){switch(s){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(s,o){const h=[];for(;!this.tsIsListTerminator(s);)h.push(o());return h}tsParseDelimitedList(s,o,h){return Dv(this.tsParseDelimitedListWorker(s,o,!0,h))}tsParseDelimitedListWorker(s,o,h,S){const P=[];let C=-1;for(;!this.tsIsListTerminator(s);){C=-1;const R=o();if(R==null)return;if(P.push(R),this.eat(12)){C=this.state.lastTokStartLoc.index;continue}if(this.tsIsListTerminator(s))break;h&&this.expect(12);return}return S&&(S.value=C),P}tsParseBracketedList(s,o,h,S,P){S||(h?this.expect(0):this.expect(47));const C=this.tsParseDelimitedList(s,o,P);return h?this.expect(3):this.expect(48),C}tsParseImportType(){const s=this.startNode();return this.expect(83),this.expect(10),this.match(134)?s.argument=this.parseStringLiteral(this.state.value):(this.raise(ae.UnsupportedImportTypeArgument,this.state.startLoc),s.argument=super.parseExprAtom()),this.eat(12)?s.options=this.tsParseImportTypeOptions():s.options=null,this.expect(11),this.eat(16)&&(s.qualifier=this.tsParseEntityName(3)),this.match(47)&&(s.typeParameters=this.tsParseTypeArguments()),this.finishNode(s,"TSImportType")}tsParseImportTypeOptions(){const s=this.startNode();this.expect(5);const o=this.startNode();return this.isContextual(76)?(o.method=!1,o.key=this.parseIdentifier(!0),o.computed=!1,o.shorthand=!1):this.unexpected(null,76),this.expect(14),o.value=this.tsParseImportTypeWithPropertyValue(),s.properties=[this.finishObjectProperty(o)],this.expect(8),this.finishNode(s,"ObjectExpression")}tsParseImportTypeWithPropertyValue(){const s=this.startNode(),o=[];for(this.expect(5);!this.match(8);){const h=this.state.type;Y(h)||h===134?o.push(super.parsePropertyDefinition(null)):this.unexpected(),this.eat(12)}return s.properties=o,this.next(),this.finishNode(s,"ObjectExpression")}tsParseEntityName(s){let o;if(s&1&&this.match(78))if(s&2)o=this.parseIdentifier(!0);else{const h=this.startNode();this.next(),o=this.finishNode(h,"ThisExpression")}else o=this.parseIdentifier(!!(s&1));for(;this.eat(16);){const h=this.startNodeAtNode(o);h.left=o,h.right=this.parseIdentifier(!!(s&1)),o=this.finishNode(h,"TSQualifiedName")}return o}tsParseTypeReference(){const s=this.startNode();return s.typeName=this.tsParseEntityName(1),!this.hasPrecedingLineBreak()&&this.match(47)&&(s.typeParameters=this.tsParseTypeArguments()),this.finishNode(s,"TSTypeReference")}tsParseThisTypePredicate(s){this.next();const o=this.startNodeAtNode(s);return o.parameterName=s,o.typeAnnotation=this.tsParseTypeAnnotation(!1),o.asserts=!1,this.finishNode(o,"TSTypePredicate")}tsParseThisTypeNode(){const s=this.startNode();return this.next(),this.finishNode(s,"TSThisType")}tsParseTypeQuery(){const s=this.startNode();return this.expect(87),this.match(83)?s.exprName=this.tsParseImportType():s.exprName=this.tsParseEntityName(3),!this.hasPrecedingLineBreak()&&this.match(47)&&(s.typeParameters=this.tsParseTypeArguments()),this.finishNode(s,"TSTypeQuery")}tsParseTypeParameter(s){const o=this.startNode();return s(o),o.name=this.tsParseTypeParameterName(),o.constraint=this.tsEatThenParseType(81),o.default=this.tsEatThenParseType(29),this.finishNode(o,"TSTypeParameter")}tsTryParseTypeParameters(s){if(this.match(47))return this.tsParseTypeParameters(s)}tsParseTypeParameters(s){const o=this.startNode();this.match(47)||this.match(143)?this.next():this.unexpected();const h={value:-1};return o.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,s),!1,!0,h),o.params.length===0&&this.raise(ae.EmptyTypeParameters,o),h.value!==-1&&this.addExtra(o,"trailingComma",h.value),this.finishNode(o,"TSTypeParameterDeclaration")}tsFillSignature(s,o){const h=s===19,S="parameters",P="typeAnnotation";o.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),o[S]=this.tsParseBindingListForSignature(),h?o[P]=this.tsParseTypeOrTypePredicateAnnotation(s):this.match(s)&&(o[P]=this.tsParseTypeOrTypePredicateAnnotation(s))}tsParseBindingListForSignature(){const s=super.parseBindingList(11,41,2);for(const o of s){const{type:h}=o;(h==="AssignmentPattern"||h==="TSParameterProperty")&&this.raise(ae.UnsupportedSignatureParameterKind,o,{type:h})}return s}tsParseTypeMemberSemicolon(){!this.eat(12)&&!this.isLineTerminator()&&this.expect(13)}tsParseSignatureMember(s,o){return this.tsFillSignature(14,o),this.tsParseTypeMemberSemicolon(),this.finishNode(o,s)}tsIsUnambiguouslyIndexSignature(){return this.next(),Y(this.state.type)?(this.next(),this.match(14)):!1}tsTryParseIndexSignature(s){if(!(this.match(0)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))))return;this.expect(0);const o=this.parseIdentifier();o.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(o),this.expect(3),s.parameters=[o];const h=this.tsTryParseTypeAnnotation();return h&&(s.typeAnnotation=h),this.tsParseTypeMemberSemicolon(),this.finishNode(s,"TSIndexSignature")}tsParsePropertyOrMethodSignature(s,o){if(this.eat(17)&&(s.optional=!0),this.match(10)||this.match(47)){o&&this.raise(ae.ReadonlyForMethodSignature,s);const h=s;h.kind&&this.match(47)&&this.raise(ae.AccessorCannotHaveTypeParameters,this.state.curPosition()),this.tsFillSignature(14,h),this.tsParseTypeMemberSemicolon();const S="parameters",P="typeAnnotation";if(h.kind==="get")h[S].length>0&&(this.raise(E.BadGetterArity,this.state.curPosition()),this.isThisParam(h[S][0])&&this.raise(ae.AccessorCannotDeclareThisParameter,this.state.curPosition()));else if(h.kind==="set"){if(h[S].length!==1)this.raise(E.BadSetterArity,this.state.curPosition());else{const C=h[S][0];this.isThisParam(C)&&this.raise(ae.AccessorCannotDeclareThisParameter,this.state.curPosition()),C.type==="Identifier"&&C.optional&&this.raise(ae.SetAccessorCannotHaveOptionalParameter,this.state.curPosition()),C.type==="RestElement"&&this.raise(ae.SetAccessorCannotHaveRestParameter,this.state.curPosition())}h[P]&&this.raise(ae.SetAccessorCannotHaveReturnType,h[P])}else h.kind="method";return this.finishNode(h,"TSMethodSignature")}else{const h=s;o&&(h.readonly=!0);const S=this.tsTryParseTypeAnnotation();return S&&(h.typeAnnotation=S),this.tsParseTypeMemberSemicolon(),this.finishNode(h,"TSPropertySignature")}}tsParseTypeMember(){const s=this.startNode();if(this.match(10)||this.match(47))return this.tsParseSignatureMember("TSCallSignatureDeclaration",s);if(this.match(77)){const h=this.startNode();return this.next(),this.match(10)||this.match(47)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",s):(s.key=this.createIdentifier(h,"new"),this.tsParsePropertyOrMethodSignature(s,!1))}this.tsParseModifiers({allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]},s);const o=this.tsTryParseIndexSignature(s);return o||(super.parsePropertyName(s),!s.computed&&s.key.type==="Identifier"&&(s.key.name==="get"||s.key.name==="set")&&this.tsTokenCanFollowModifier()&&(s.kind=s.key.name,super.parsePropertyName(s),!this.match(10)&&!this.match(47)&&this.unexpected(null,10)),this.tsParsePropertyOrMethodSignature(s,!!s.readonly))}tsParseTypeLiteral(){const s=this.startNode();return s.members=this.tsParseObjectTypeMembers(),this.finishNode(s,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(5);const s=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(8),s}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(){const s=this.startNode();this.expect(5),this.match(53)?(s.readonly=this.state.value,this.next(),this.expectContextual(122)):this.eatContextual(122)&&(s.readonly=!0),this.expect(0);{const o=this.startNode();o.name=this.tsParseTypeParameterName(),o.constraint=this.tsExpectThenParseType(58),s.typeParameter=this.finishNode(o,"TSTypeParameter")}return s.nameType=this.eatContextual(93)?this.tsParseType():null,this.expect(3),this.match(53)?(s.optional=this.state.value,this.next(),this.expect(17)):this.eat(17)&&(s.optional=!0),s.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(8),this.finishNode(s,"TSMappedType")}tsParseTupleType(){const s=this.startNode();s.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let o=!1;return s.elementTypes.forEach(h=>{const{type:S}=h;o&&S!=="TSRestType"&&S!=="TSOptionalType"&&!(S==="TSNamedTupleMember"&&h.optional)&&this.raise(ae.OptionalTypeBeforeRequired,h),o||(o=S==="TSNamedTupleMember"&&h.optional||S==="TSOptionalType")}),this.finishNode(s,"TSTupleType")}tsParseTupleElementType(){const s=this.state.startLoc,o=this.eat(21),{startLoc:h}=this.state;let S,P,C,R;const $=ce(this.state.type)?this.lookaheadCharCode():null;if($===58)S=!0,C=!1,P=this.parseIdentifier(!0),this.expect(14),R=this.tsParseType();else if($===63){C=!0;const q=this.state.value,J=this.tsParseNonArrayType();this.lookaheadCharCode()===58?(S=!0,P=this.createIdentifier(this.startNodeAt(h),q),this.expect(17),this.expect(14),R=this.tsParseType()):(S=!1,R=J,this.expect(17))}else R=this.tsParseType(),C=this.eat(17),S=this.eat(14);if(S){let q;P?(q=this.startNodeAt(h),q.optional=C,q.label=P,q.elementType=R,this.eat(17)&&(q.optional=!0,this.raise(ae.TupleOptionalAfterType,this.state.lastTokStartLoc))):(q=this.startNodeAt(h),q.optional=C,this.raise(ae.InvalidTupleMemberLabel,R),q.label=R,q.elementType=this.tsParseType()),R=this.finishNode(q,"TSNamedTupleMember")}else if(C){const q=this.startNodeAt(h);q.typeAnnotation=R,R=this.finishNode(q,"TSOptionalType")}if(o){const q=this.startNodeAt(s);q.typeAnnotation=R,R=this.finishNode(q,"TSRestType")}return R}tsParseParenthesizedType(){const s=this.startNode();return this.expect(10),s.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(s,"TSParenthesizedType")}tsParseFunctionOrConstructorType(s,o){const h=this.startNode();return s==="TSConstructorType"&&(h.abstract=!!o,o&&this.next(),this.next()),this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(19,h)),this.finishNode(h,s)}tsParseLiteralTypeNode(){const s=this.startNode();switch(this.state.type){case 135:case 136:case 134:case 85:case 86:s.literal=super.parseExprAtom();break;default:this.unexpected()}return this.finishNode(s,"TSLiteralType")}tsParseTemplateLiteralType(){{const s=this.startNode();return s.literal=super.parseTemplate(!1),this.finishNode(s,"TSLiteralType")}}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){const s=this.tsParseThisTypeNode();return this.isContextual(116)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(s):s}tsParseNonArrayType(){switch(this.state.type){case 134:case 135:case 136:case 85:case 86:return this.tsParseLiteralTypeNode();case 53:if(this.state.value==="-"){const s=this.startNode(),o=this.lookahead();return o.type!==135&&o.type!==136&&this.unexpected(),s.literal=this.parseMaybeUnary(),this.finishNode(s,"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:{const{type:s}=this.state;if(Y(s)||s===88||s===84){const o=s===88?"TSVoidKeyword":s===84?"TSNullKeyword":Fv(this.state.value);if(o!==void 0&&this.lookaheadCharCode()!==46){const h=this.startNode();return this.next(),this.finishNode(h,o)}return this.tsParseTypeReference()}}}this.unexpected()}tsParseArrayTypeOrHigher(){const{startLoc:s}=this.state;let o=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(3)){const h=this.startNodeAt(s);h.elementType=o,this.expect(3),o=this.finishNode(h,"TSArrayType")}else{const h=this.startNodeAt(s);h.objectType=o,h.indexType=this.tsParseType(),this.expect(3),o=this.finishNode(h,"TSIndexedAccessType")}return o}tsParseTypeOperator(){const s=this.startNode(),o=this.state.value;return this.next(),s.operator=o,s.typeAnnotation=this.tsParseTypeOperatorOrHigher(),o==="readonly"&&this.tsCheckTypeAnnotationForReadOnly(s),this.finishNode(s,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(s){switch(s.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(ae.UnexpectedReadonly,s)}}tsParseInferType(){const s=this.startNode();this.expectContextual(115);const o=this.startNode();return o.name=this.tsParseTypeParameterName(),o.constraint=this.tsTryParse(()=>this.tsParseConstraintForInferType()),s.typeParameter=this.finishNode(o,"TSTypeParameter"),this.finishNode(s,"TSInferType")}tsParseConstraintForInferType(){if(this.eat(81)){const s=this.tsInDisallowConditionalTypesContext(()=>this.tsParseType());if(this.state.inDisallowConditionalTypesContext||!this.match(17))return s}}tsParseTypeOperatorOrHigher(){return $r(this.state.type)&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(115)?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseUnionOrIntersectionType(s,o,h){const S=this.startNode(),P=this.eat(h),C=[];do C.push(o());while(this.eat(h));return C.length===1&&!P?C[0]:(S.types=C,this.finishNode(S,s))}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(Y(this.state.type)||this.match(78))return this.next(),!0;if(this.match(5)){const{errors:s}=this.state,o=s.length;try{return this.parseObjectLike(8,!0),s.length===o}catch{return!1}}if(this.match(0)){this.next();const{errors:s}=this.state,o=s.length;try{return super.parseBindingList(3,93,1),s.length===o}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(s){return this.tsInType(()=>{const o=this.startNode();this.expect(s);const h=this.startNode(),S=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(S&&this.match(78)){let R=this.tsParseThisTypeOrThisTypePredicate();return R.type==="TSThisType"?(h.parameterName=R,h.asserts=!0,h.typeAnnotation=null,R=this.finishNode(h,"TSTypePredicate")):(this.resetStartLocationFromNode(R,h),R.asserts=!0),o.typeAnnotation=R,this.finishNode(o,"TSTypeAnnotation")}const P=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!P)return S?(h.parameterName=this.parseIdentifier(),h.asserts=S,h.typeAnnotation=null,o.typeAnnotation=this.finishNode(h,"TSTypePredicate"),this.finishNode(o,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,o);const C=this.tsParseTypeAnnotation(!1);return h.parameterName=P,h.typeAnnotation=C,h.asserts=S,o.typeAnnotation=this.finishNode(h,"TSTypePredicate"),this.finishNode(o,"TSTypeAnnotation")})}tsTryParseTypeOrTypePredicateAnnotation(){if(this.match(14))return this.tsParseTypeOrTypePredicateAnnotation(14)}tsTryParseTypeAnnotation(){if(this.match(14))return this.tsParseTypeAnnotation()}tsTryParseType(){return this.tsEatThenParseType(14)}tsParseTypePredicatePrefix(){const s=this.parseIdentifier();if(this.isContextual(116)&&!this.hasPrecedingLineBreak())return this.next(),s}tsParseTypePredicateAsserts(){if(this.state.type!==109)return!1;const s=this.state.containsEsc;return this.next(),!Y(this.state.type)&&!this.match(78)?!1:(s&&this.raise(E.InvalidEscapedReservedWord,this.state.lastTokStartLoc,{reservedWord:"asserts"}),!0)}tsParseTypeAnnotation(s=!0,o=this.startNode()){return this.tsInType(()=>{s&&this.expect(14),o.typeAnnotation=this.tsParseType()}),this.finishNode(o,"TSTypeAnnotation")}tsParseType(){xu(this.state.inType);const s=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(81))return s;const o=this.startNodeAtNode(s);return o.checkType=s,o.extendsType=this.tsInDisallowConditionalTypesContext(()=>this.tsParseNonConditionalType()),this.expect(17),o.trueType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.expect(14),o.falseType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.finishNode(o,"TSConditionalType")}isAbstractConstructorSignature(){return this.isContextual(124)&&this.lookahead().type===77}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(ae.ReservedTypeAssertion,this.state.startLoc);const s=this.startNode();return s.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?this.tsParseTypeReference():this.tsParseType())),this.expect(48),s.expression=this.parseMaybeUnary(),this.finishNode(s,"TSTypeAssertion")}tsParseHeritageClause(s){const o=this.state.startLoc,h=this.tsParseDelimitedList("HeritageClauseElement",()=>{{const S=this.startNode();return S.expression=this.tsParseEntityName(3),this.match(47)&&(S.typeParameters=this.tsParseTypeArguments()),this.finishNode(S,"TSExpressionWithTypeArguments")}});return h.length||this.raise(ae.EmptyHeritageClauseType,o,{token:s}),h}tsParseInterfaceDeclaration(s,o={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(129),o.declare&&(s.declare=!0),Y(this.state.type)?(s.id=this.parseIdentifier(),this.checkIdentifier(s.id,130)):(s.id=null,this.raise(ae.MissingInterfaceName,this.state.startLoc)),s.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(81)&&(s.extends=this.tsParseHeritageClause("extends"));const h=this.startNode();return h.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),s.body=this.finishNode(h,"TSInterfaceBody"),this.finishNode(s,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(s){return s.id=this.parseIdentifier(),this.checkIdentifier(s.id,2),s.typeAnnotation=this.tsInType(()=>{if(s.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers),this.expect(29),this.isContextual(114)&&this.lookahead().type!==16){const o=this.startNode();return this.next(),this.finishNode(o,"TSIntrinsicKeyword")}return this.tsParseType()}),this.semicolon(),this.finishNode(s,"TSTypeAliasDeclaration")}tsInTopLevelContext(s){if(this.curContext()!==I.brace){const o=this.state.context;this.state.context=[o[0]];try{return s()}finally{this.state.context=o}}else return s()}tsInType(s){const o=this.state.inType;this.state.inType=!0;try{return s()}finally{this.state.inType=o}}tsInDisallowConditionalTypesContext(s){const o=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return s()}finally{this.state.inDisallowConditionalTypesContext=o}}tsInAllowConditionalTypesContext(s){const o=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return s()}finally{this.state.inDisallowConditionalTypesContext=o}}tsEatThenParseType(s){if(this.match(s))return this.tsNextThenParseType()}tsExpectThenParseType(s){return this.tsInType(()=>(this.expect(s),this.tsParseType()))}tsNextThenParseType(){return this.tsInType(()=>(this.next(),this.tsParseType()))}tsParseEnumMember(){const s=this.startNode();return s.id=this.match(134)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(29)&&(s.initializer=super.parseMaybeAssignAllowIn()),this.finishNode(s,"TSEnumMember")}tsParseEnumDeclaration(s,o={}){return o.const&&(s.const=!0),o.declare&&(s.declare=!0),this.expectContextual(126),s.id=this.parseIdentifier(),this.checkIdentifier(s.id,s.const?8971:8459),this.expect(5),s.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(s,"TSEnumDeclaration")}tsParseEnumBody(){const s=this.startNode();return this.expect(5),s.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(s,"TSEnumBody")}tsParseModuleBlock(){const s=this.startNode();return this.scope.enter(0),this.expect(5),super.parseBlockOrModuleBlockBody(s.body=[],void 0,!0,8),this.scope.exit(),this.finishNode(s,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(s,o=!1){if(s.id=this.parseIdentifier(),o||this.checkIdentifier(s.id,1024),this.eat(16)){const h=this.startNode();this.tsParseModuleOrNamespaceDeclaration(h,!0),s.body=h}else this.scope.enter(512),this.prodParam.enter(0),s.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(s,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(s){return this.isContextual(112)?(s.kind="global",s.global=!0,s.id=this.parseIdentifier()):this.match(134)?(s.kind="module",s.id=super.parseStringLiteral(this.state.value)):this.unexpected(),this.match(5)?(this.scope.enter(512),this.prodParam.enter(0),s.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(s,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(s,o,h){s.isExport=h||!1,s.id=o||this.parseIdentifier(),this.checkIdentifier(s.id,4096),this.expect(29);const S=this.tsParseModuleReference();return s.importKind==="type"&&S.type!=="TSExternalModuleReference"&&this.raise(ae.ImportAliasHasImportType,S),s.moduleReference=S,this.semicolon(),this.finishNode(s,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual(119)&&this.lookaheadCharCode()===40}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(0)}tsParseExternalModuleReference(){const s=this.startNode();return this.expectContextual(119),this.expect(10),this.match(134)||this.unexpected(),s.expression=super.parseExprAtom(),this.expect(11),this.sawUnambiguousESM=!0,this.finishNode(s,"TSExternalModuleReference")}tsLookAhead(s){const o=this.state.clone(),h=s();return this.state=o,h}tsTryParseAndCatch(s){const o=this.tryParse(h=>s()||h());if(!(o.aborted||!o.node))return o.error&&(this.state=o.failState),o.node}tsTryParse(s){const o=this.state.clone(),h=s();if(h!==void 0&&h!==!1)return h;this.state=o}tsTryParseDeclare(s){if(this.isLineTerminator())return;const o=this.state.type;return this.tsInAmbientContext(()=>{switch(o){case 68:return s.declare=!0,super.parseFunctionStatement(s,!1,!1);case 80:return s.declare=!0,this.parseClass(s,!0,!1);case 126:return this.tsParseEnumDeclaration(s,{declare:!0});case 112:return this.tsParseAmbientExternalModuleDeclaration(s);case 100:if(this.state.containsEsc)return;case 75:case 74:return!this.match(75)||!this.isLookaheadContextual("enum")?(s.declare=!0,this.parseVarStatement(s,this.state.value,!0)):(this.expect(75),this.tsParseEnumDeclaration(s,{const:!0,declare:!0}));case 107:if(this.hasPlugin("explicitResourceManagement")&&this.isUsing())return this.raise(ae.InvalidModifierOnUsingDeclaration,this.state.startLoc,"declare"),s.declare=!0,this.parseVarStatement(s,"using",!0);break;case 96:if(this.hasPlugin("explicitResourceManagement")&&this.isAwaitUsing())return this.raise(ae.InvalidModifierOnAwaitUsingDeclaration,this.state.startLoc,"declare"),s.declare=!0,this.next(),this.parseVarStatement(s,"await using",!0);break;case 129:{const h=this.tsParseInterfaceDeclaration(s,{declare:!0});if(h)return h}default:if(Y(o))return this.tsParseDeclaration(s,this.state.value,!0,null)}})}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0,null)}tsParseExpressionStatement(s,o,h){switch(o.name){case"declare":{const S=this.tsTryParseDeclare(s);return S&&(S.declare=!0),S}case"global":if(this.match(5)){this.scope.enter(512),this.prodParam.enter(0);const S=s;return S.kind="global",s.global=!0,S.id=o,S.body=this.tsParseModuleBlock(),this.scope.exit(),this.prodParam.exit(),this.finishNode(S,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(s,o.name,!1,h)}}tsParseDeclaration(s,o,h,S){switch(o){case"abstract":if(this.tsCheckLineTerminator(h)&&(this.match(80)||Y(this.state.type)))return this.tsParseAbstractDeclaration(s,S);break;case"module":if(this.tsCheckLineTerminator(h)){if(this.match(134))return this.tsParseAmbientExternalModuleDeclaration(s);if(Y(this.state.type))return s.kind="module",this.tsParseModuleOrNamespaceDeclaration(s)}break;case"namespace":if(this.tsCheckLineTerminator(h)&&Y(this.state.type))return s.kind="namespace",this.tsParseModuleOrNamespaceDeclaration(s);break;case"type":if(this.tsCheckLineTerminator(h)&&Y(this.state.type))return this.tsParseTypeAliasDeclaration(s);break}}tsCheckLineTerminator(s){return s?this.hasFollowingLineBreak()?!1:(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(s){if(!this.match(47))return;const o=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;const h=this.tsTryParseAndCatch(()=>{const S=this.startNodeAt(s);return S.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(S),S.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(19),S});if(this.state.maybeInArrowParameters=o,!!h)return super.parseArrowExpression(h,null,!0)}tsParseTypeArgumentsInExpression(){if(this.reScan_lt()===47)return this.tsParseTypeArguments()}tsParseTypeArguments(){const s=this.startNode();return s.params=this.tsInType(()=>this.tsInTopLevelContext(()=>(this.expect(47),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))),s.params.length===0?this.raise(ae.EmptyTypeArguments,s):!this.state.inType&&this.curContext()===I.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(s,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return Ur(this.state.type)}isExportDefaultSpecifier(){return this.tsIsDeclarationStart()?!1:super.isExportDefaultSpecifier()}parseBindingElement(s,o){const h=o.length?o[0].loc.start:this.state.startLoc,S={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},S);const P=S.accessibility,C=S.override,R=S.readonly;!(s&4)&&(P||R||C)&&this.raise(ae.UnexpectedParameterModifier,h);const F=this.parseMaybeDefault();s&2&&this.parseFunctionParamType(F);const $=this.parseMaybeDefault(F.loc.start,F);if(P||R||C){const q=this.startNodeAt(h);return o.length&&(q.decorators=o),P&&(q.accessibility=P),R&&(q.readonly=R),C&&(q.override=C),$.type!=="Identifier"&&$.type!=="AssignmentPattern"&&this.raise(ae.UnsupportedParameterPropertyKind,q),q.parameter=$,this.finishNode(q,"TSParameterProperty")}return o.length&&(F.decorators=o),$}isSimpleParameter(s){return s.type==="TSParameterProperty"&&super.isSimpleParameter(s.parameter)||super.isSimpleParameter(s)}tsDisallowOptionalPattern(s){for(const o of s.params)o.type!=="Identifier"&&o.optional&&!this.state.isAmbientContext&&this.raise(ae.PatternIsOptional,o)}setArrowFunctionParameters(s,o,h){super.setArrowFunctionParameters(s,o,h),this.tsDisallowOptionalPattern(s)}parseFunctionBodyAndFinish(s,o,h=!1){this.match(14)&&(s.returnType=this.tsParseTypeOrTypePredicateAnnotation(14));const S=o==="FunctionDeclaration"?"TSDeclareFunction":o==="ClassMethod"||o==="ClassPrivateMethod"?"TSDeclareMethod":void 0;return S&&!this.match(5)&&this.isLineTerminator()?this.finishNode(s,S):S==="TSDeclareFunction"&&this.state.isAmbientContext&&(this.raise(ae.DeclareFunctionHasImplementation,s),s.declare)?super.parseFunctionBodyAndFinish(s,S,h):(this.tsDisallowOptionalPattern(s),super.parseFunctionBodyAndFinish(s,o,h))}registerFunctionStatementId(s){!s.body&&s.id?this.checkIdentifier(s.id,1024):super.registerFunctionStatementId(s)}tsCheckForInvalidTypeCasts(s){s.forEach(o=>{o?.type==="TSTypeCastExpression"&&this.raise(ae.UnexpectedTypeAnnotation,o.typeAnnotation)})}toReferencedList(s,o){return this.tsCheckForInvalidTypeCasts(s),s}parseArrayLike(s,o,h,S){const P=super.parseArrayLike(s,o,h,S);return P.type==="ArrayExpression"&&this.tsCheckForInvalidTypeCasts(P.elements),P}parseSubscript(s,o,h,S){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();const C=this.startNodeAt(o);return C.expression=s,this.finishNode(C,"TSNonNullExpression")}let P=!1;if(this.match(18)&&this.lookaheadCharCode()===60){if(h)return S.stop=!0,s;S.optionalChainMember=P=!0,this.next()}if(this.match(47)||this.match(51)){let C;const R=this.tsTryParseAndCatch(()=>{if(!h&&this.atPossibleAsyncArrow(s)){const J=this.tsTryParseGenericAsyncArrowFunction(o);if(J)return J}const F=this.tsParseTypeArgumentsInExpression();if(!F)return;if(P&&!this.match(10)){C=this.state.curPosition();return}if(jr(this.state.type)){const J=super.parseTaggedTemplateExpression(s,o,S);return J.typeParameters=F,J}if(!h&&this.eat(10)){const J=this.startNodeAt(o);return J.callee=s,J.arguments=this.parseCallExpressionArguments(11),this.tsCheckForInvalidTypeCasts(J.arguments),J.typeParameters=F,S.optionalChainMember&&(J.optional=P),this.finishCallExpression(J,S.optionalChainMember)}const $=this.state.type;if($===48||$===52||$!==10&&be($)&&!this.hasPrecedingLineBreak())return;const q=this.startNodeAt(o);return q.expression=s,q.typeParameters=F,this.finishNode(q,"TSInstantiationExpression")});if(C&&this.unexpected(C,10),R)return R.type==="TSInstantiationExpression"&&((this.match(16)||this.match(18)&&this.lookaheadCharCode()!==40)&&this.raise(ae.InvalidPropertyAccessAfterInstantiationExpression,this.state.startLoc),!this.match(16)&&!this.match(18)&&(R.expression=super.stopParseSubscript(s,S))),R}return super.parseSubscript(s,o,h,S)}parseNewCallee(s){var o;super.parseNewCallee(s);const{callee:h}=s;h.type==="TSInstantiationExpression"&&!((o=h.extra)!=null&&o.parenthesized)&&(s.typeParameters=h.typeParameters,s.callee=h.expression)}parseExprOp(s,o,h){let S;if(qr(58)>h&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(S=this.isContextual(120)))){const P=this.startNodeAt(o);return P.expression=s,P.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?(S&&this.raise(E.UnexpectedKeyword,this.state.startLoc,{keyword:"const"}),this.tsParseTypeReference()):this.tsParseType())),this.finishNode(P,S?"TSSatisfiesExpression":"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(P,o,h)}return super.parseExprOp(s,o,h)}checkReservedWord(s,o,h,S){this.state.isAmbientContext||super.checkReservedWord(s,o,h,S)}checkImportReflection(s){super.checkImportReflection(s),s.module&&s.importKind!=="value"&&this.raise(ae.ImportReflectionHasImportType,s.specifiers[0].loc.start)}checkDuplicateExports(){}isPotentialImportPhase(s){if(super.isPotentialImportPhase(s))return!0;if(this.isContextual(130)){const o=this.lookaheadCharCode();return s?o===123||o===42:o!==61}return!s&&this.isContextual(87)}applyImportPhase(s,o,h,S){super.applyImportPhase(s,o,h,S),o?s.exportKind=h==="type"?"type":"value":s.importKind=h==="type"||h==="typeof"?h:"value"}parseImport(s){if(this.match(134))return s.importKind="value",super.parseImport(s);let o;if(Y(this.state.type)&&this.lookaheadCharCode()===61)return s.importKind="value",this.tsParseImportEqualsDeclaration(s);if(this.isContextual(130)){const h=this.parseMaybeImportPhase(s,!1);if(this.lookaheadCharCode()===61)return this.tsParseImportEqualsDeclaration(s,h);o=super.parseImportSpecifiersAndAfter(s,h)}else o=super.parseImport(s);return o.importKind==="type"&&o.specifiers.length>1&&o.specifiers[0].type==="ImportDefaultSpecifier"&&this.raise(ae.TypeImportCannotSpecifyDefaultAndNamed,o),o}parseExport(s,o){if(this.match(83)){const h=s;this.next();let S=null;return this.isContextual(130)&&this.isPotentialImportPhase(!1)?S=this.parseMaybeImportPhase(h,!1):h.importKind="value",this.tsParseImportEqualsDeclaration(h,S,!0)}else if(this.eat(29)){const h=s;return h.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(h,"TSExportAssignment")}else if(this.eatContextual(93)){const h=s;return this.expectContextual(128),h.id=this.parseIdentifier(),this.semicolon(),this.finishNode(h,"TSNamespaceExportDeclaration")}else return super.parseExport(s,o)}isAbstractClass(){return this.isContextual(124)&&this.lookahead().type===80}parseExportDefaultExpression(){if(this.isAbstractClass()){const s=this.startNode();return this.next(),s.abstract=!0,this.parseClass(s,!0,!0)}if(this.match(129)){const s=this.tsParseInterfaceDeclaration(this.startNode());if(s)return s}return super.parseExportDefaultExpression()}parseVarStatement(s,o,h=!1){const{isAmbientContext:S}=this.state,P=super.parseVarStatement(s,o,h||S);if(!S)return P;for(const{id:C,init:R}of P.declarations)R&&(o==="var"||o==="let"||C.typeAnnotation?this.raise(ae.InitializerNotAllowedInAmbientContext,R):qv(R,this.hasPlugin("estree"))||this.raise(ae.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference,R));return P}parseStatementContent(s,o){if(this.match(75)&&this.isLookaheadContextual("enum")){const h=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(h,{const:!0})}if(this.isContextual(126))return this.tsParseEnumDeclaration(this.startNode());if(this.isContextual(129)){const h=this.tsParseInterfaceDeclaration(this.startNode());if(h)return h}return super.parseStatementContent(s,o)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(s,o){return o.some(h=>_u(h)?s.accessibility===h:!!s[h])}tsIsStartOfStaticBlocks(){return this.isContextual(106)&&this.lookaheadCharCode()===123}parseClassMember(s,o,h){const S=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:S,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:ae.InvalidModifierOnTypeParameterPositions},o);const P=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(o,S)&&this.raise(ae.StaticBlockCannotHaveModifier,this.state.curPosition()),super.parseClassStaticBlock(s,o)):this.parseClassMemberWithIsStatic(s,o,h,!!o.static)};o.declare?this.tsInAmbientContext(P):P()}parseClassMemberWithIsStatic(s,o,h,S){const P=this.tsTryParseIndexSignature(o);if(P){s.body.push(P),o.abstract&&this.raise(ae.IndexSignatureHasAbstract,o),o.accessibility&&this.raise(ae.IndexSignatureHasAccessibility,o,{modifier:o.accessibility}),o.declare&&this.raise(ae.IndexSignatureHasDeclare,o),o.override&&this.raise(ae.IndexSignatureHasOverride,o);return}!this.state.inAbstractClass&&o.abstract&&this.raise(ae.NonAbstractClassHasAbstractMethod,o),o.override&&(h.hadSuperClass||this.raise(ae.OverrideNotInSubClass,o)),super.parseClassMemberWithIsStatic(s,o,h,S)}parsePostMemberNameModifiers(s){this.eat(17)&&(s.optional=!0),s.readonly&&this.match(10)&&this.raise(ae.ClassMethodHasReadonly,s),s.declare&&this.match(10)&&this.raise(ae.ClassMethodHasDeclare,s)}parseExpressionStatement(s,o,h){return(o.type==="Identifier"?this.tsParseExpressionStatement(s,o,h):void 0)||super.parseExpressionStatement(s,o,h)}shouldParseExportDeclaration(){return this.tsIsDeclarationStart()?!0:super.shouldParseExportDeclaration()}parseConditional(s,o,h){if(!this.match(17))return s;if(this.state.maybeInArrowParameters){const S=this.lookaheadCharCode();if(S===44||S===61||S===58||S===41)return this.setOptionalParametersError(h),s}return super.parseConditional(s,o,h)}parseParenItem(s,o){const h=super.parseParenItem(s,o);if(this.eat(17)&&(h.optional=!0,this.resetEndLocation(s)),this.match(14)){const S=this.startNodeAt(o);return S.expression=s,S.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(S,"TSTypeCastExpression")}return s}parseExportDeclaration(s){if(!this.state.isAmbientContext&&this.isContextual(125))return this.tsInAmbientContext(()=>this.parseExportDeclaration(s));const o=this.state.startLoc,h=this.eatContextual(125);if(h&&(this.isContextual(125)||!this.shouldParseExportDeclaration()))throw this.raise(ae.ExpectedAmbientAfterExportDeclare,this.state.startLoc);const P=Y(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(s);return P?((P.type==="TSInterfaceDeclaration"||P.type==="TSTypeAliasDeclaration"||h)&&(s.exportKind="type"),h&&P.type!=="TSImportEqualsDeclaration"&&(this.resetStartLocation(P,o),P.declare=!0),P):null}parseClassId(s,o,h,S){if((!o||h)&&this.isContextual(113))return;super.parseClassId(s,o,h,s.declare?1024:8331);const P=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);P&&(s.typeParameters=P)}parseClassPropertyAnnotation(s){s.optional||(this.eat(35)?s.definite=!0:this.eat(17)&&(s.optional=!0));const o=this.tsTryParseTypeAnnotation();o&&(s.typeAnnotation=o)}parseClassProperty(s){if(this.parseClassPropertyAnnotation(s),this.state.isAmbientContext&&!(s.readonly&&!s.typeAnnotation)&&this.match(29)&&this.raise(ae.DeclareClassFieldHasInitializer,this.state.startLoc),s.abstract&&this.match(29)){const{key:o}=s;this.raise(ae.AbstractPropertyHasInitializer,this.state.startLoc,{propertyName:o.type==="Identifier"&&!s.computed?o.name:`[${this.input.slice(this.offsetToSourcePos(o.start),this.offsetToSourcePos(o.end))}]`})}return super.parseClassProperty(s)}parseClassPrivateProperty(s){return s.abstract&&this.raise(ae.PrivateElementHasAbstract,s),s.accessibility&&this.raise(ae.PrivateElementHasAccessibility,s,{modifier:s.accessibility}),this.parseClassPropertyAnnotation(s),super.parseClassPrivateProperty(s)}parseClassAccessorProperty(s){return this.parseClassPropertyAnnotation(s),s.optional&&this.raise(ae.AccessorCannotBeOptional,s),super.parseClassAccessorProperty(s)}pushClassMethod(s,o,h,S,P,C){const R=this.tsTryParseTypeParameters(this.tsParseConstModifier);R&&P&&this.raise(ae.ConstructorHasTypeParameters,R);const{declare:F=!1,kind:$}=o;F&&($==="get"||$==="set")&&this.raise(ae.DeclareAccessor,o,{kind:$}),R&&(o.typeParameters=R),super.pushClassMethod(s,o,h,S,P,C)}pushClassPrivateMethod(s,o,h,S){const P=this.tsTryParseTypeParameters(this.tsParseConstModifier);P&&(o.typeParameters=P),super.pushClassPrivateMethod(s,o,h,S)}declareClassPrivateMethodInScope(s,o){s.type!=="TSDeclareMethod"&&(s.type==="MethodDefinition"&&s.value.body==null||super.declareClassPrivateMethodInScope(s,o))}parseClassSuper(s){super.parseClassSuper(s),s.superClass&&(this.match(47)||this.match(51))&&(s.superTypeParameters=this.tsParseTypeArgumentsInExpression()),this.eatContextual(113)&&(s.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(s,o,h,S,P,C,R){const F=this.tsTryParseTypeParameters(this.tsParseConstModifier);return F&&(s.typeParameters=F),super.parseObjPropValue(s,o,h,S,P,C,R)}parseFunctionParams(s,o){const h=this.tsTryParseTypeParameters(this.tsParseConstModifier);h&&(s.typeParameters=h),super.parseFunctionParams(s,o)}parseVarId(s,o){super.parseVarId(s,o),s.id.type==="Identifier"&&!this.hasPrecedingLineBreak()&&this.eat(35)&&(s.definite=!0);const h=this.tsTryParseTypeAnnotation();h&&(s.id.typeAnnotation=h,this.resetEndLocation(s.id))}parseAsyncArrowFromCallExpression(s,o){return this.match(14)&&(s.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(s,o)}parseMaybeAssign(s,o){var h,S,P,C,R;let F,$,q;if(this.hasPlugin("jsx")&&(this.match(143)||this.match(47))){if(F=this.state.clone(),$=this.tryParse(()=>super.parseMaybeAssign(s,o),F),!$.error)return $.node;const{context:oe}=this.state,me=oe[oe.length-1];(me===I.j_oTag||me===I.j_expr)&&oe.pop()}if(!((h=$)!=null&&h.error)&&!this.match(47))return super.parseMaybeAssign(s,o);(!F||F===this.state)&&(F=this.state.clone());let J;const ee=this.tryParse(oe=>{var me,Me;J=this.tsParseTypeParameters(this.tsParseConstModifier);const ye=super.parseMaybeAssign(s,o);return(ye.type!=="ArrowFunctionExpression"||(me=ye.extra)!=null&&me.parenthesized)&&oe(),((Me=J)==null?void 0:Me.params.length)!==0&&this.resetStartLocationFromNode(ye,J),ye.typeParameters=J,ye},F);if(!ee.error&&!ee.aborted)return J&&this.reportReservedArrowTypeParam(J),ee.node;if(!$&&(xu(!this.hasPlugin("jsx")),q=this.tryParse(()=>super.parseMaybeAssign(s,o),F),!q.error))return q.node;if((S=$)!=null&&S.node)return this.state=$.failState,$.node;if(ee.node)return this.state=ee.failState,J&&this.reportReservedArrowTypeParam(J),ee.node;if((P=q)!=null&&P.node)return this.state=q.failState,q.node;throw((C=$)==null?void 0:C.error)||ee.error||((R=q)==null?void 0:R.error)}reportReservedArrowTypeParam(s){var o;s.params.length===1&&!s.params[0].constraint&&!((o=s.extra)!=null&&o.trailingComma)&&this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(ae.ReservedArrowTypeParam,s)}parseMaybeUnary(s,o){return!this.hasPlugin("jsx")&&this.match(47)?this.tsParseTypeAssertion():super.parseMaybeUnary(s,o)}parseArrow(s){if(this.match(14)){const o=this.tryParse(h=>{const S=this.tsParseTypeOrTypePredicateAnnotation(14);return(this.canInsertSemicolon()||!this.match(19))&&h(),S});if(o.aborted)return;o.thrown||(o.error&&(this.state=o.failState),s.returnType=o.node)}return super.parseArrow(s)}parseFunctionParamType(s){this.eat(17)&&(s.optional=!0);const o=this.tsTryParseTypeAnnotation();return o&&(s.typeAnnotation=o),this.resetEndLocation(s),s}isAssignable(s,o){switch(s.type){case"TSTypeCastExpression":return this.isAssignable(s.expression,o);case"TSParameterProperty":return!0;default:return super.isAssignable(s,o)}}toAssignable(s,o=!1){switch(s.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(s,o);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":o?this.expressionScope.recordArrowParameterBindingError(ae.UnexpectedTypeCastInParameter,s):this.raise(ae.UnexpectedTypeCastInParameter,s),this.toAssignable(s.expression,o);break;case"AssignmentExpression":!o&&s.left.type==="TSTypeCastExpression"&&(s.left=this.typeCastToParameter(s.left));default:super.toAssignable(s,o)}}toAssignableParenthesizedExpression(s,o){switch(s.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(s.expression,o);break;default:super.toAssignable(s,o)}}checkToRestConversion(s,o){switch(s.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(s.expression,!1);break;default:super.checkToRestConversion(s,o)}}isValidLVal(s,o,h){switch(s){case"TSTypeCastExpression":return!0;case"TSParameterProperty":return"parameter";case"TSNonNullExpression":return"expression";case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":return(h!==64||!o)&&["expression",!0];default:return super.isValidLVal(s,o,h)}}parseBindingAtom(){return this.state.type===78?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(s,o){if(this.match(47)||this.match(51)){const h=this.tsParseTypeArgumentsInExpression();if(this.match(10)){const S=super.parseMaybeDecoratorArguments(s,o);return S.typeParameters=h,S}this.unexpected(null,10)}return super.parseMaybeDecoratorArguments(s,o)}checkCommaAfterRest(s){return this.state.isAmbientContext&&this.match(12)&&this.lookaheadCharCode()===s?(this.next(),!1):super.checkCommaAfterRest(s)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(35)||this.match(14)||super.isClassProperty()}parseMaybeDefault(s,o){const h=super.parseMaybeDefault(s,o);return h.type==="AssignmentPattern"&&h.typeAnnotation&&h.right.start<h.typeAnnotation.start&&this.raise(ae.TypeAnnotationAfterAssign,h.typeAnnotation),h}getTokenFromCode(s){if(this.state.inType){if(s===62){this.finishOp(48,1);return}if(s===60){this.finishOp(47,1);return}}super.getTokenFromCode(s)}reScan_lt_gt(){const{type:s}=this.state;s===47?(this.state.pos-=1,this.readToken_lt()):s===48&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){const{type:s}=this.state;return s===51?(this.state.pos-=2,this.finishOp(47,1),47):s}toAssignableListItem(s,o,h){const S=s[o];S.type==="TSTypeCastExpression"&&(s[o]=this.typeCastToParameter(S)),super.toAssignableListItem(s,o,h)}typeCastToParameter(s){return s.expression.typeAnnotation=s.typeAnnotation,this.resetEndLocation(s.expression,s.typeAnnotation.loc.end),s.expression}shouldParseArrow(s){return this.match(14)?s.every(o=>this.isAssignable(o,!0)):super.shouldParseArrow(s)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(s){if(this.match(47)||this.match(51)){const o=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());o&&(s.typeParameters=o)}return super.jsxParseOpeningElementAfterName(s)}getGetterSetterExpectedParamCount(s){const o=super.getGetterSetterExpectedParamCount(s),S=this.getObjectOrClassMethodParams(s)[0];return S&&this.isThisParam(S)?o+1:o}parseCatchClauseParam(){const s=super.parseCatchClauseParam(),o=this.tsTryParseTypeAnnotation();return o&&(s.typeAnnotation=o,this.resetEndLocation(s)),s}tsInAmbientContext(s){const{isAmbientContext:o,strict:h}=this.state;this.state.isAmbientContext=!0,this.state.strict=!1;try{return s()}finally{this.state.isAmbientContext=o,this.state.strict=h}}parseClass(s,o,h){const S=this.state.inAbstractClass;this.state.inAbstractClass=!!s.abstract;try{return super.parseClass(s,o,h)}finally{this.state.inAbstractClass=S}}tsParseAbstractDeclaration(s,o){if(this.match(80))return s.abstract=!0,this.maybeTakeDecorators(o,this.parseClass(s,!0,!1));if(this.isContextual(129)){if(!this.hasFollowingLineBreak())return s.abstract=!0,this.raise(ae.NonClassMethodPropertyHasAbstractModifier,s),this.tsParseInterfaceDeclaration(s)}else this.unexpected(null,80)}parseMethod(s,o,h,S,P,C,R){const F=super.parseMethod(s,o,h,S,P,C,R);if((F.abstract||F.type==="TSAbstractMethodDefinition")&&(this.hasPlugin("estree")?F.value:F).body){const{key:J}=F;this.raise(ae.AbstractMethodHasImplementation,F,{methodName:J.type==="Identifier"&&!F.computed?J.name:`[${this.input.slice(this.offsetToSourcePos(J.start),this.offsetToSourcePos(J.end))}]`})}return F}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(s,o,h,S){return!o&&S?(this.parseTypeOnlyImportExportSpecifier(s,!1,h),this.finishNode(s,"ExportSpecifier")):(s.exportKind="value",super.parseExportSpecifier(s,o,h,S))}parseImportSpecifier(s,o,h,S,P){return!o&&S?(this.parseTypeOnlyImportExportSpecifier(s,!0,h),this.finishNode(s,"ImportSpecifier")):(s.importKind="value",super.parseImportSpecifier(s,o,h,S,h?4098:4096))}parseTypeOnlyImportExportSpecifier(s,o,h){const S=o?"imported":"local",P=o?"local":"exported";let C=s[S],R,F=!1,$=!0;const q=C.loc.start;if(this.isContextual(93)){const ee=this.parseIdentifier();if(this.isContextual(93)){const oe=this.parseIdentifier();ce(this.state.type)?(F=!0,C=ee,R=o?this.parseIdentifier():this.parseModuleExportName(),$=!1):(R=oe,$=!1)}else ce(this.state.type)?($=!1,R=o?this.parseIdentifier():this.parseModuleExportName()):(F=!0,C=ee)}else ce(this.state.type)&&(F=!0,o?(C=this.parseIdentifier(!0),this.isContextual(93)||this.checkReservedWord(C.name,C.loc.start,!0,!0)):C=this.parseModuleExportName());F&&h&&this.raise(o?ae.TypeModifierIsUsedInTypeImports:ae.TypeModifierIsUsedInTypeExports,q),s[S]=C,s[P]=R;const J=o?"importKind":"exportKind";s[J]=F?"type":"value",$&&this.eatContextual(93)&&(s[P]=o?this.parseIdentifier():this.parseModuleExportName()),s[P]||(s[P]=this.cloneIdentifier(s[S])),o&&this.checkIdentifier(s[P],F?4098:4096)}fillOptionalPropertiesForTSESLint(s){var o,h,S,P,C,R,F,$,q,J,ee,oe,me,Me,ye,_e,gr,rr,Ru,Du,Fu,Bu,$u,Uu,qu,ju,Vu,zu,Wu,Gu,Hu,Xu,Ju,Ku,Yu,Qu,Zu,eh,th,rh,sh,ih,nh,ah,oh,lh;switch(s.type){case"ExpressionStatement":(o=s.directive)!=null||(s.directive=void 0);return;case"RestElement":s.value=void 0;case"Identifier":case"ArrayPattern":case"AssignmentPattern":case"ObjectPattern":(h=s.decorators)!=null||(s.decorators=[]),(S=s.optional)!=null||(s.optional=!1),(P=s.typeAnnotation)!=null||(s.typeAnnotation=void 0);return;case"TSParameterProperty":(C=s.accessibility)!=null||(s.accessibility=void 0),(R=s.decorators)!=null||(s.decorators=[]),(F=s.override)!=null||(s.override=!1),($=s.readonly)!=null||(s.readonly=!1),(q=s.static)!=null||(s.static=!1);return;case"TSEmptyBodyFunctionExpression":s.body=null;case"TSDeclareFunction":case"FunctionDeclaration":case"FunctionExpression":case"ClassMethod":case"ClassPrivateMethod":(J=s.declare)!=null||(s.declare=!1),(ee=s.returnType)!=null||(s.returnType=void 0),(oe=s.typeParameters)!=null||(s.typeParameters=void 0);return;case"Property":(me=s.optional)!=null||(s.optional=!1);return;case"TSMethodSignature":case"TSPropertySignature":(Me=s.optional)!=null||(s.optional=!1);case"TSIndexSignature":(ye=s.accessibility)!=null||(s.accessibility=void 0),(_e=s.readonly)!=null||(s.readonly=!1),(gr=s.static)!=null||(s.static=!1);return;case"TSAbstractPropertyDefinition":case"PropertyDefinition":case"TSAbstractAccessorProperty":case"AccessorProperty":(rr=s.declare)!=null||(s.declare=!1),(Ru=s.definite)!=null||(s.definite=!1),(Du=s.readonly)!=null||(s.readonly=!1),(Fu=s.typeAnnotation)!=null||(s.typeAnnotation=void 0);case"TSAbstractMethodDefinition":case"MethodDefinition":(Bu=s.accessibility)!=null||(s.accessibility=void 0),($u=s.decorators)!=null||(s.decorators=[]),(Uu=s.override)!=null||(s.override=!1),(qu=s.optional)!=null||(s.optional=!1);return;case"ClassExpression":(ju=s.id)!=null||(s.id=null);case"ClassDeclaration":(Vu=s.abstract)!=null||(s.abstract=!1),(zu=s.declare)!=null||(s.declare=!1),(Wu=s.decorators)!=null||(s.decorators=[]),(Gu=s.implements)!=null||(s.implements=[]),(Hu=s.superTypeArguments)!=null||(s.superTypeArguments=void 0),(Xu=s.typeParameters)!=null||(s.typeParameters=void 0);return;case"TSTypeAliasDeclaration":case"VariableDeclaration":(Ju=s.declare)!=null||(s.declare=!1);return;case"VariableDeclarator":(Ku=s.definite)!=null||(s.definite=!1);return;case"TSEnumDeclaration":(Yu=s.const)!=null||(s.const=!1),(Qu=s.declare)!=null||(s.declare=!1);return;case"TSEnumMember":(Zu=s.computed)!=null||(s.computed=!1);return;case"TSImportType":(eh=s.qualifier)!=null||(s.qualifier=null),(th=s.options)!=null||(s.options=null);return;case"TSInterfaceDeclaration":(rh=s.declare)!=null||(s.declare=!1),(sh=s.extends)!=null||(s.extends=[]);return;case"TSModuleDeclaration":(ih=s.declare)!=null||(s.declare=!1),(nh=s.global)!=null||(s.global=s.kind==="global");return;case"TSTypeParameter":(ah=s.const)!=null||(s.const=!1),(oh=s.in)!=null||(s.in=!1),(lh=s.out)!=null||(s.out=!1);return}}};function Uv(b){if(b.type!=="MemberExpression")return!1;const{computed:a,property:s}=b;return a&&s.type!=="StringLiteral"&&(s.type!=="TemplateLiteral"||s.expressions.length>0)?!1:Cu(b.object)}function qv(b,a){var s;const{type:o}=b;if((s=b.extra)!=null&&s.parenthesized)return!1;if(a){if(o==="Literal"){const{value:h}=b;if(typeof h=="string"||typeof h=="boolean")return!0}}else if(o==="StringLiteral"||o==="BooleanLiteral")return!0;return!!(Au(b,a)||jv(b,a)||o==="TemplateLiteral"&&b.expressions.length===0||Uv(b))}function Au(b,a){return a?b.type==="Literal"&&(typeof b.value=="number"||"bigint"in b):b.type==="NumericLiteral"||b.type==="BigIntLiteral"}function jv(b,a){if(b.type==="UnaryExpression"){const{operator:s,argument:o}=b;if(s==="-"&&Au(o,a))return!0}return!1}function Cu(b){return b.type==="Identifier"?!0:b.type!=="MemberExpression"||b.computed?!1:Cu(b.object)}const Iu=T`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."});var Vv=b=>class extends b{parsePlaceholder(s){if(this.match(133)){const o=this.startNode();return this.next(),this.assertNoSpace(),o.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(133),this.finishPlaceholder(o,s)}}finishPlaceholder(s,o){let h=s;return(!h.expectedNode||!h.type)&&(h=this.finishNode(h,"Placeholder")),h.expectedNode=o,h}getTokenFromCode(s){s===37&&this.input.charCodeAt(this.state.pos+1)===37?this.finishOp(133,2):super.getTokenFromCode(s)}parseExprAtom(s){return this.parsePlaceholder("Expression")||super.parseExprAtom(s)}parseIdentifier(s){return this.parsePlaceholder("Identifier")||super.parseIdentifier(s)}checkReservedWord(s,o,h,S){s!==void 0&&super.checkReservedWord(s,o,h,S)}cloneIdentifier(s){const o=super.cloneIdentifier(s);return o.type==="Placeholder"&&(o.expectedNode=s.expectedNode),o}cloneStringLiteral(s){return s.type==="Placeholder"?this.cloneIdentifier(s):super.cloneStringLiteral(s)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(s,o,h){return s==="Placeholder"||super.isValidLVal(s,o,h)}toAssignable(s,o){s&&s.type==="Placeholder"&&s.expectedNode==="Expression"?s.expectedNode="Pattern":super.toAssignable(s,o)}chStartsBindingIdentifier(s,o){return!!(super.chStartsBindingIdentifier(s,o)||this.lookahead().type===133)}verifyBreakContinue(s,o){s.label&&s.label.type==="Placeholder"||super.verifyBreakContinue(s,o)}parseExpressionStatement(s,o){var h;if(o.type!=="Placeholder"||(h=o.extra)!=null&&h.parenthesized)return super.parseExpressionStatement(s,o);if(this.match(14)){const P=s;return P.label=this.finishPlaceholder(o,"Identifier"),this.next(),P.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(P,"LabeledStatement")}this.semicolon();const S=s;return S.name=o.name,this.finishPlaceholder(S,"Statement")}parseBlock(s,o,h){return this.parsePlaceholder("BlockStatement")||super.parseBlock(s,o,h)}parseFunctionId(s){return this.parsePlaceholder("Identifier")||super.parseFunctionId(s)}parseClass(s,o,h){const S=o?"ClassDeclaration":"ClassExpression";this.next();const P=this.state.strict,C=this.parsePlaceholder("Identifier");if(C)if(this.match(81)||this.match(133)||this.match(5))s.id=C;else{if(h||!o)return s.id=null,s.body=this.finishPlaceholder(C,"ClassBody"),this.finishNode(s,S);throw this.raise(Iu.ClassNameIsRequired,this.state.startLoc)}else this.parseClassId(s,o,h);return super.parseClassSuper(s),s.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!s.superClass,P),this.finishNode(s,S)}parseExport(s,o){const h=this.parsePlaceholder("Identifier");if(!h)return super.parseExport(s,o);const S=s;if(!this.isContextual(98)&&!this.match(12))return S.specifiers=[],S.source=null,S.declaration=this.finishPlaceholder(h,"Declaration"),this.finishNode(S,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");const P=this.startNode();return P.exported=h,S.specifiers=[this.finishNode(P,"ExportDefaultSpecifier")],super.parseExport(S,o)}isExportDefaultSpecifier(){if(this.match(65)){const s=this.nextTokenStart();if(this.isUnparsedContextual(s,"from")&&this.input.startsWith(nt(133),this.nextTokenStartSince(s+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(s,o){var h;return(h=s.specifiers)!=null&&h.length?!0:super.maybeParseExportDefaultSpecifier(s,o)}checkExport(s){const{specifiers:o}=s;o!=null&&o.length&&(s.specifiers=o.filter(h=>h.exported.type==="Placeholder")),super.checkExport(s),s.specifiers=o}parseImport(s){const o=this.parsePlaceholder("Identifier");if(!o)return super.parseImport(s);if(s.specifiers=[],!this.isContextual(98)&&!this.match(12))return s.source=this.finishPlaceholder(o,"StringLiteral"),this.semicolon(),this.finishNode(s,"ImportDeclaration");const h=this.startNodeAtNode(o);return h.local=o,s.specifiers.push(this.finishNode(h,"ImportDefaultSpecifier")),this.eat(12)&&(this.maybeParseStarImportSpecifier(s)||this.parseNamedImportSpecifiers(s)),this.expectContextual(98),s.source=this.parseImportSource(),this.semicolon(),this.finishNode(s,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource()}assertNoSpace(){this.state.start>this.offsetToSourcePos(this.state.lastTokEndLoc.index)&&this.raise(Iu.UnexpectedSpace,this.state.lastTokEndLoc)}},zv=b=>class extends b{parseV8Intrinsic(){if(this.match(54)){const s=this.state.startLoc,o=this.startNode();if(this.next(),Y(this.state.type)){const h=this.parseIdentifierName(),S=this.createIdentifier(o,h);if(this.castNodeTo(S,"V8IntrinsicIdentifier"),this.match(10))return S}this.unexpected(s)}}parseExprAtom(s){return this.parseV8Intrinsic()||super.parseExprAtom(s)}};const Nu=["minimal","fsharp","hack","smart"],Ou=["^^","@@","^","%","#"];function Wv(b){if(b.has("decorators")){if(b.has("decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");const o=b.get("decorators").decoratorsBeforeExport;if(o!=null&&typeof o!="boolean")throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");const h=b.get("decorators").allowCallParenthesized;if(h!=null&&typeof h!="boolean")throw new Error("'allowCallParenthesized' must be a boolean.")}if(b.has("flow")&&b.has("typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(b.has("placeholders")&&b.has("v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(b.has("pipelineOperator")){var a;const o=b.get("pipelineOperator").proposal;if(!Nu.includes(o)){const h=Nu.map(S=>`"${S}"`).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${h}.`)}if(o==="hack"){if(b.has("placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(b.has("v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");const h=b.get("pipelineOperator").topicToken;if(!Ou.includes(h)){const S=Ou.map(P=>`"${P}"`).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${S}.`)}{var s;if(h==="#"&&((s=b.get("recordAndTuple"))==null?void 0:s.syntaxType)==="hash")throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "hack", topicToken: "#" }]\` and \`${JSON.stringify(["recordAndTuple",b.get("recordAndTuple")])}\`.`)}}else if(o==="smart"&&((a=b.get("recordAndTuple"))==null?void 0:a.syntaxType)==="hash")throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "smart" }]\` and \`${JSON.stringify(["recordAndTuple",b.get("recordAndTuple")])}\`.`)}if(b.has("moduleAttributes")){if(b.has("deprecatedImportAssert")||b.has("importAssertions"))throw new Error("Cannot combine importAssertions, deprecatedImportAssert and moduleAttributes plugins.");if(b.get("moduleAttributes").version!=="may-2020")throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.")}if(b.has("importAssertions")&&b.has("deprecatedImportAssert"))throw new Error("Cannot combine importAssertions and deprecatedImportAssert plugins.");if(!b.has("deprecatedImportAssert")&&b.has("importAttributes")&&b.get("importAttributes").deprecatedAssertSyntax&&b.set("deprecatedImportAssert",{}),b.has("recordAndTuple")){const o=b.get("recordAndTuple").syntaxType;if(o!=null){const h=["hash","bar"];if(!h.includes(o))throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: "+h.map(S=>`'${S}'`).join(", "))}}if(b.has("asyncDoExpressions")&&!b.has("doExpressions")){const o=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw o.missingPlugins="doExpressions",o}if(b.has("optionalChainingAssign")&&b.get("optionalChainingAssign").version!=="2023-07")throw new Error("The 'optionalChainingAssign' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is '2023-07'.")}const ku={estree:D,jsx:mv,flow:hv,typescript:$v,v8intrinsic:zv,placeholders:Vv},Gv=Object.keys(ku);class Hv extends Rv{checkProto(a,s,o,h){if(a.type==="SpreadElement"||this.isObjectMethod(a)||a.computed||a.shorthand)return o;const S=a.key;return(S.type==="Identifier"?S.name:S.value)==="__proto__"?s?(this.raise(E.RecordNoProto,S),!0):(o&&(h?h.doubleProtoLoc===null&&(h.doubleProtoLoc=S.loc.start):this.raise(E.DuplicateProto,S)),!0):o}shouldExitDescending(a,s){return a.type==="ArrowFunctionExpression"&&this.offsetToSourcePos(a.start)===s}getExpression(){if(this.enterInitialScopes(),this.nextToken(),this.match(140))throw this.raise(E.ParseExpressionEmptyInput,this.state.startLoc);const a=this.parseExpression();if(!this.match(140))throw this.raise(E.ParseExpressionExpectsEOF,this.state.startLoc,{unexpected:this.input.codePointAt(this.state.start)});return this.finalizeRemainingComments(),a.comments=this.comments,a.errors=this.state.errors,this.optionFlags&256&&(a.tokens=this.tokens),a}parseExpression(a,s){return a?this.disallowInAnd(()=>this.parseExpressionBase(s)):this.allowInAnd(()=>this.parseExpressionBase(s))}parseExpressionBase(a){const s=this.state.startLoc,o=this.parseMaybeAssign(a);if(this.match(12)){const h=this.startNodeAt(s);for(h.expressions=[o];this.eat(12);)h.expressions.push(this.parseMaybeAssign(a));return this.toReferencedList(h.expressions),this.finishNode(h,"SequenceExpression")}return o}parseMaybeAssignDisallowIn(a,s){return this.disallowInAnd(()=>this.parseMaybeAssign(a,s))}parseMaybeAssignAllowIn(a,s){return this.allowInAnd(()=>this.parseMaybeAssign(a,s))}setOptionalParametersError(a){a.optionalParametersLoc=this.state.startLoc}parseMaybeAssign(a,s){const o=this.state.startLoc,h=this.isContextual(108);if(h&&this.prodParam.hasYield){this.next();let R=this.parseYield(o);return s&&(R=s.call(this,R,o)),R}let S;a?S=!1:(a=new di,S=!0);const{type:P}=this.state;(P===10||Y(P))&&(this.state.potentialArrowAt=this.state.start);let C=this.parseMaybeConditional(a);if(s&&(C=s.call(this,C,o)),it(this.state.type)){const R=this.startNodeAt(o),F=this.state.value;if(R.operator=F,this.match(29)){this.toAssignable(C,!0),R.left=C;const $=o.index;a.doubleProtoLoc!=null&&a.doubleProtoLoc.index>=$&&(a.doubleProtoLoc=null),a.shorthandAssignLoc!=null&&a.shorthandAssignLoc.index>=$&&(a.shorthandAssignLoc=null),a.privateKeyLoc!=null&&a.privateKeyLoc.index>=$&&(this.checkDestructuringPrivate(a),a.privateKeyLoc=null)}else R.left=C;return this.next(),R.right=this.parseMaybeAssign(),this.checkLVal(C,this.finishNode(R,"AssignmentExpression")),R}else S&&this.checkExpressionErrors(a,!0);if(h){const{type:R}=this.state;if((this.hasPlugin("v8intrinsic")?be(R):be(R)&&!this.match(54))&&!this.isAmbiguousPrefixOrIdentifier())return this.raiseOverwrite(E.YieldNotInGeneratorFunction,o),this.parseYield(o)}return C}parseMaybeConditional(a){const s=this.state.startLoc,o=this.state.potentialArrowAt,h=this.parseExprOps(a);return this.shouldExitDescending(h,o)?h:this.parseConditional(h,s,a)}parseConditional(a,s,o){if(this.eat(17)){const h=this.startNodeAt(s);return h.test=a,h.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),h.alternate=this.parseMaybeAssign(),this.finishNode(h,"ConditionalExpression")}return a}parseMaybeUnaryOrPrivate(a){return this.match(139)?this.parsePrivateName():this.parseMaybeUnary(a)}parseExprOps(a){const s=this.state.startLoc,o=this.state.potentialArrowAt,h=this.parseMaybeUnaryOrPrivate(a);return this.shouldExitDescending(h,o)?h:this.parseExprOp(h,s,-1)}parseExprOp(a,s,o){if(this.isPrivateName(a)){const S=this.getPrivateNameSV(a);(o>=qr(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise(E.PrivateInExpectedIn,a,{identifierName:S}),this.classScope.usePrivateName(S,a.loc.start)}const h=this.state.type;if(mt(h)&&(this.prodParam.hasIn||!this.match(58))){let S=qr(h);if(S>o){if(h===39){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return a;this.checkPipelineAtInfixOperator(a,s)}const P=this.startNodeAt(s);P.left=a,P.operator=this.state.value;const C=h===41||h===42,R=h===40;if(R&&(S=qr(42)),this.next(),h===39&&this.hasPlugin(["pipelineOperator",{proposal:"minimal"}])&&this.state.type===96&&this.prodParam.hasAwait)throw this.raise(E.UnexpectedAwaitAfterPipelineBody,this.state.startLoc);P.right=this.parseExprOpRightExpr(h,S);const F=this.finishNode(P,C||R?"LogicalExpression":"BinaryExpression"),$=this.state.type;if(R&&($===41||$===42)||C&&$===40)throw this.raise(E.MixingCoalesceWithLogical,this.state.startLoc);return this.parseExprOp(F,s,o)}}return a}parseExprOpRightExpr(a,s){const o=this.state.startLoc;switch(a){case 39:switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext(()=>this.parseHackPipeBody());case"fsharp":return this.withSoloAwaitPermittingContext(()=>this.parseFSharpPipelineBody(s))}if(this.getPluginOption("pipelineOperator","proposal")==="smart")return this.withTopicBindingContext(()=>{if(this.prodParam.hasYield&&this.isContextual(108))throw this.raise(E.PipeBodyIsTighter,this.state.startLoc);return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(a,s),o)});default:return this.parseExprOpBaseRightExpr(a,s)}}parseExprOpBaseRightExpr(a,s){const o=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),o,Ca(a)?s-1:s)}parseHackPipeBody(){var a;const{startLoc:s}=this.state,o=this.parseMaybeAssign();return m.has(o.type)&&!((a=o.extra)!=null&&a.parenthesized)&&this.raise(E.PipeUnparenthesizedBody,s,{type:o.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(E.PipeTopicUnused,s),o}checkExponentialAfterUnary(a){this.match(57)&&this.raise(E.UnexpectedTokenUnaryExponentiation,a.argument)}parseMaybeUnary(a,s){const o=this.state.startLoc,h=this.isContextual(96);if(h&&this.recordAwaitIfAllowed()){this.next();const R=this.parseAwait(o);return s||this.checkExponentialAfterUnary(R),R}const S=this.match(34),P=this.startNode();if(Nt(this.state.type)){P.operator=this.state.value,P.prefix=!0,this.match(72)&&this.expectPlugin("throwExpressions");const R=this.match(89);if(this.next(),P.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(a,!0),this.state.strict&&R){const F=P.argument;F.type==="Identifier"?this.raise(E.StrictDelete,P):this.hasPropertyAsPrivateName(F)&&this.raise(E.DeletePrivateField,P)}if(!S)return s||this.checkExponentialAfterUnary(P),this.finishNode(P,"UnaryExpression")}const C=this.parseUpdate(P,S,a);if(h){const{type:R}=this.state;if((this.hasPlugin("v8intrinsic")?be(R):be(R)&&!this.match(54))&&!this.isAmbiguousPrefixOrIdentifier())return this.raiseOverwrite(E.AwaitNotInAsyncContext,o),this.parseAwait(o)}return C}parseUpdate(a,s,o){if(s){const P=a;return this.checkLVal(P.argument,this.finishNode(P,"UpdateExpression")),a}const h=this.state.startLoc;let S=this.parseExprSubscripts(o);if(this.checkExpressionErrors(o,!1))return S;for(;yt(this.state.type)&&!this.canInsertSemicolon();){const P=this.startNodeAt(h);P.operator=this.state.value,P.prefix=!1,P.argument=S,this.next(),this.checkLVal(S,S=this.finishNode(P,"UpdateExpression"))}return S}parseExprSubscripts(a){const s=this.state.startLoc,o=this.state.potentialArrowAt,h=this.parseExprAtom(a);return this.shouldExitDescending(h,o)?h:this.parseSubscripts(h,s)}parseSubscripts(a,s,o){const h={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(a),stop:!1};do a=this.parseSubscript(a,s,o,h),h.maybeAsyncArrow=!1;while(!h.stop);return a}parseSubscript(a,s,o,h){const{type:S}=this.state;if(!o&&S===15)return this.parseBind(a,s,o,h);if(jr(S))return this.parseTaggedTemplateExpression(a,s,h);let P=!1;if(S===18){if(o&&(this.raise(E.OptionalChainingNoNew,this.state.startLoc),this.lookaheadCharCode()===40))return this.stopParseSubscript(a,h);h.optionalChainMember=P=!0,this.next()}if(!o&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(a,s,h,P);{const C=this.eat(0);return C||P||this.eat(16)?this.parseMember(a,s,h,C,P):this.stopParseSubscript(a,h)}}stopParseSubscript(a,s){return s.stop=!0,a}parseMember(a,s,o,h,S){const P=this.startNodeAt(s);return P.object=a,P.computed=h,h?(P.property=this.parseExpression(),this.expect(3)):this.match(139)?(a.type==="Super"&&this.raise(E.SuperPrivateField,s),this.classScope.usePrivateName(this.state.value,this.state.startLoc),P.property=this.parsePrivateName()):P.property=this.parseIdentifier(!0),o.optionalChainMember?(P.optional=S,this.finishNode(P,"OptionalMemberExpression")):this.finishNode(P,"MemberExpression")}parseBind(a,s,o,h){const S=this.startNodeAt(s);return S.object=a,this.next(),S.callee=this.parseNoCallExpr(),h.stop=!0,this.parseSubscripts(this.finishNode(S,"BindExpression"),s,o)}parseCoverCallAndAsyncArrowHead(a,s,o,h){const S=this.state.maybeInArrowParameters;let P=null;this.state.maybeInArrowParameters=!0,this.next();const C=this.startNodeAt(s);C.callee=a;const{maybeAsyncArrow:R,optionalChainMember:F}=o;R&&(this.expressionScope.enter(kv()),P=new di),F&&(C.optional=h),h?C.arguments=this.parseCallExpressionArguments(11):C.arguments=this.parseCallExpressionArguments(11,a.type!=="Super",C,P);let $=this.finishCallExpression(C,F);return R&&this.shouldParseAsyncArrow()&&!h?(o.stop=!0,this.checkDestructuringPrivate(P),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),$=this.parseAsyncArrowFromCallExpression(this.startNodeAt(s),$)):(R&&(this.checkExpressionErrors(P,!0),this.expressionScope.exit()),this.toReferencedArguments($)),this.state.maybeInArrowParameters=S,$}toReferencedArguments(a,s){this.toReferencedListDeep(a.arguments,s)}parseTaggedTemplateExpression(a,s,o){const h=this.startNodeAt(s);return h.tag=a,h.quasi=this.parseTemplate(!0),o.optionalChainMember&&this.raise(E.OptionalChainingNoTemplate,s),this.finishNode(h,"TaggedTemplateExpression")}atPossibleAsyncArrow(a){return a.type==="Identifier"&&a.name==="async"&&this.state.lastTokEndLoc.index===a.end&&!this.canInsertSemicolon()&&a.end-a.start===5&&this.offsetToSourcePos(a.start)===this.state.potentialArrowAt}finishCallExpression(a,s){if(a.callee.type==="Import")if(a.arguments.length===0||a.arguments.length>2)this.raise(E.ImportCallArity,a);else for(const o of a.arguments)o.type==="SpreadElement"&&this.raise(E.ImportCallSpreadArgument,o);return this.finishNode(a,s?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(a,s,o,h){const S=[];let P=!0;const C=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(a);){if(P)P=!1;else if(this.expect(12),this.match(a)){o&&this.addTrailingCommaExtraToNode(o),this.next();break}S.push(this.parseExprListItem(!1,h,s))}return this.state.inFSharpPipelineDirectBody=C,S}shouldParseAsyncArrow(){return this.match(19)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(a,s){var o;return this.resetPreviousNodeTrailingComments(s),this.expect(19),this.parseArrowExpression(a,s.arguments,!0,(o=s.extra)==null?void 0:o.trailingCommaLoc),s.innerComments&&Es(a,s.innerComments),s.callee.trailingComments&&Es(a,s.callee.trailingComments),a}parseNoCallExpr(){const a=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),a,!0)}parseExprAtom(a){let s,o=null;const{type:h}=this.state;switch(h){case 79:return this.parseSuper();case 83:return s=this.startNode(),this.next(),this.match(16)?this.parseImportMetaPropertyOrPhaseCall(s):this.match(10)?this.optionFlags&512?this.parseImportCall(s):this.finishNode(s,"Import"):(this.raise(E.UnsupportedImport,this.state.lastTokStartLoc),this.finishNode(s,"Import"));case 78:return s=this.startNode(),this.next(),this.finishNode(s,"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:{const S=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(S)}case 0:return this.parseArrayLike(3,!0,!1,a);case 5:return this.parseObjectLike(8,!1,!1,a);case 68:return this.parseFunctionOrFunctionSent();case 26:o=this.parseDecorators();case 80:return this.parseClass(this.maybeTakeDecorators(o,this.startNode()),!1);case 77:return this.parseNewOrNewTarget();case 25:case 24:return this.parseTemplate(!1);case 15:{s=this.startNode(),this.next(),s.object=null;const S=s.callee=this.parseNoCallExpr();if(S.type==="MemberExpression")return this.finishNode(s,"BindExpression");throw this.raise(E.UnsupportedBind,S)}case 139:return this.raise(E.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:{const S=this.getPluginOption("pipelineOperator","proposal");if(S)return this.parseTopicReference(S);this.unexpected();break}case 47:{const S=this.input.codePointAt(this.nextTokenStart());jt(S)||S===62?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected();break}default:{if(h===137)return this.parseDecimalLiteral(this.state.value);if(h===2||h===1)return this.parseArrayLike(this.state.type===2?4:3,!1,!0);if(h===6||h===7)return this.parseObjectLike(this.state.type===6?9:8,!1,!0)}if(Y(h)){if(this.isContextual(127)&&this.lookaheadInLineCharCode()===123)return this.parseModuleExpression();const S=this.state.potentialArrowAt===this.state.start,P=this.state.containsEsc,C=this.parseIdentifier();if(!P&&C.name==="async"&&!this.canInsertSemicolon()){const{type:R}=this.state;if(R===68)return this.resetPreviousNodeTrailingComments(C),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(C));if(Y(R))return this.lookaheadCharCode()===61?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(C)):C;if(R===90)return this.resetPreviousNodeTrailingComments(C),this.parseDo(this.startNodeAtNode(C),!0)}return S&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(C),[C],!1)):C}else this.unexpected()}}parseTopicReferenceThenEqualsSign(a,s){const o=this.getPluginOption("pipelineOperator","proposal");if(o)return this.state.type=a,this.state.value=s,this.state.pos--,this.state.end--,this.state.endLoc=i(this.state.endLoc,-1),this.parseTopicReference(o);this.unexpected()}parseTopicReference(a){const s=this.startNode(),o=this.state.startLoc,h=this.state.type;return this.next(),this.finishTopicReference(s,o,a,h)}finishTopicReference(a,s,o,h){if(this.testTopicReferenceConfiguration(o,s,h))return o==="hack"?(this.topicReferenceIsAllowedInCurrentContext()||this.raise(E.PipeTopicUnbound,s),this.registerTopicReference(),this.finishNode(a,"TopicReference")):(this.topicReferenceIsAllowedInCurrentContext()||this.raise(E.PrimaryTopicNotAllowed,s),this.registerTopicReference(),this.finishNode(a,"PipelinePrimaryTopicReference"));throw this.raise(E.PipeTopicUnconfiguredToken,s,{token:nt(h)})}testTopicReferenceConfiguration(a,s,o){switch(a){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:nt(o)}]);case"smart":return o===27;default:throw this.raise(E.PipeTopicRequiresHackPipes,s)}}parseAsyncArrowUnaryFunction(a){this.prodParam.enter(hi(!0,this.prodParam.hasYield));const s=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(E.LineTerminatorBeforeArrow,this.state.curPosition()),this.expect(19),this.parseArrowExpression(a,s,!0)}parseDo(a,s){this.expectPlugin("doExpressions"),s&&this.expectPlugin("asyncDoExpressions"),a.async=s,this.next();const o=this.state.labels;return this.state.labels=[],s?(this.prodParam.enter(2),a.body=this.parseBlock(),this.prodParam.exit()):a.body=this.parseBlock(),this.state.labels=o,this.finishNode(a,"DoExpression")}parseSuper(){const a=this.startNode();return this.next(),this.match(10)&&!this.scope.allowDirectSuper&&!(this.optionFlags&16)?this.raise(E.SuperNotAllowed,a):!this.scope.allowSuper&&!(this.optionFlags&16)&&this.raise(E.UnexpectedSuper,a),!this.match(10)&&!this.match(0)&&!this.match(16)&&this.raise(E.UnsupportedSuper,a),this.finishNode(a,"Super")}parsePrivateName(){const a=this.startNode(),s=this.startNodeAt(i(this.state.startLoc,1)),o=this.state.value;return this.next(),a.id=this.createIdentifier(s,o),this.finishNode(a,"PrivateName")}parseFunctionOrFunctionSent(){const a=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(16)){const s=this.createIdentifier(this.startNodeAtNode(a),"function");return this.next(),this.match(103)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected(),this.parseMetaProperty(a,s,"sent")}return this.parseFunction(a)}parseMetaProperty(a,s,o){a.meta=s;const h=this.state.containsEsc;return a.property=this.parseIdentifier(!0),(a.property.name!==o||h)&&this.raise(E.UnsupportedMetaProperty,a.property,{target:s.name,onlyValidPropertyName:o}),this.finishNode(a,"MetaProperty")}parseImportMetaPropertyOrPhaseCall(a){if(this.next(),this.isContextual(105)||this.isContextual(97)){const s=this.isContextual(105);return this.expectPlugin(s?"sourcePhaseImports":"deferredImportEvaluation"),this.next(),a.phase=s?"source":"defer",this.parseImportCall(a)}else{const s=this.createIdentifierAt(this.startNodeAtNode(a),"import",this.state.lastTokStartLoc);return this.isContextual(101)&&(this.inModule||this.raise(E.ImportMetaOutsideModule,s),this.sawUnambiguousESM=!0),this.parseMetaProperty(a,s,"meta")}}parseLiteralAtNode(a,s,o){return this.addExtra(o,"rawValue",a),this.addExtra(o,"raw",this.input.slice(this.offsetToSourcePos(o.start),this.state.end)),o.value=a,this.next(),this.finishNode(o,s)}parseLiteral(a,s){const o=this.startNode();return this.parseLiteralAtNode(a,s,o)}parseStringLiteral(a){return this.parseLiteral(a,"StringLiteral")}parseNumericLiteral(a){return this.parseLiteral(a,"NumericLiteral")}parseBigIntLiteral(a){return this.parseLiteral(a,"BigIntLiteral")}parseDecimalLiteral(a){return this.parseLiteral(a,"DecimalLiteral")}parseRegExpLiteral(a){const s=this.startNode();return this.addExtra(s,"raw",this.input.slice(this.offsetToSourcePos(s.start),this.state.end)),s.pattern=a.pattern,s.flags=a.flags,this.next(),this.finishNode(s,"RegExpLiteral")}parseBooleanLiteral(a){const s=this.startNode();return s.value=a,this.next(),this.finishNode(s,"BooleanLiteral")}parseNullLiteral(){const a=this.startNode();return this.next(),this.finishNode(a,"NullLiteral")}parseParenAndDistinguishExpression(a){const s=this.state.startLoc;let o;this.next(),this.expressionScope.enter(Ov());const h=this.state.maybeInArrowParameters,S=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;const P=this.state.startLoc,C=[],R=new di;let F=!0,$,q;for(;!this.match(11);){if(F)F=!1;else if(this.expect(12,R.optionalParametersLoc===null?null:R.optionalParametersLoc),this.match(11)){q=this.state.startLoc;break}if(this.match(21)){const oe=this.state.startLoc;if($=this.state.startLoc,C.push(this.parseParenItem(this.parseRestBinding(),oe)),!this.checkCommaAfterRest(41))break}else C.push(this.parseMaybeAssignAllowIn(R,this.parseParenItem))}const J=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=h,this.state.inFSharpPipelineDirectBody=S;let ee=this.startNodeAt(s);return a&&this.shouldParseArrow(C)&&(ee=this.parseArrow(ee))?(this.checkDestructuringPrivate(R),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(ee,C,!1),ee):(this.expressionScope.exit(),C.length||this.unexpected(this.state.lastTokStartLoc),q&&this.unexpected(q),$&&this.unexpected($),this.checkExpressionErrors(R,!0),this.toReferencedListDeep(C,!0),C.length>1?(o=this.startNodeAt(P),o.expressions=C,this.finishNode(o,"SequenceExpression"),this.resetEndLocation(o,J)):o=C[0],this.wrapParenthesis(s,o))}wrapParenthesis(a,s){if(!(this.optionFlags&1024))return this.addExtra(s,"parenthesized",!0),this.addExtra(s,"parenStart",a.index),this.takeSurroundingComments(s,a.index,this.state.lastTokEndLoc.index),s;const o=this.startNodeAt(a);return o.expression=s,this.finishNode(o,"ParenthesizedExpression")}shouldParseArrow(a){return!this.canInsertSemicolon()}parseArrow(a){if(this.eat(19))return a}parseParenItem(a,s){return a}parseNewOrNewTarget(){const a=this.startNode();if(this.next(),this.match(16)){const s=this.createIdentifier(this.startNodeAtNode(a),"new");this.next();const o=this.parseMetaProperty(a,s,"target");return!this.scope.inNonArrowFunction&&!this.scope.inClass&&!(this.optionFlags&4)&&this.raise(E.UnexpectedNewTarget,o),o}return this.parseNew(a)}parseNew(a){if(this.parseNewCallee(a),this.eat(10)){const s=this.parseExprList(11);this.toReferencedList(s),a.arguments=s}else a.arguments=[];return this.finishNode(a,"NewExpression")}parseNewCallee(a){const s=this.match(83),o=this.parseNoCallExpr();a.callee=o,s&&(o.type==="Import"||o.type==="ImportExpression")&&this.raise(E.ImportCallNotNewExpression,o)}parseTemplateElement(a){const{start:s,startLoc:o,end:h,value:S}=this.state,P=s+1,C=this.startNodeAt(i(o,1));S===null&&(a||this.raise(E.InvalidEscapeSequenceTemplate,i(this.state.firstInvalidTemplateEscapePos,1)));const R=this.match(24),F=R?-1:-2,$=h+F;C.value={raw:this.input.slice(P,$).replace(/\r\n?/g,`
|
|
15
|
+
`),cooked:S===null?null:S.slice(1,F)},C.tail=R,this.next();const q=this.finishNode(C,"TemplateElement");return this.resetEndLocation(q,i(this.state.lastTokEndLoc,F)),q}parseTemplate(a){const s=this.startNode();let o=this.parseTemplateElement(a);const h=[o],S=[];for(;!o.tail;)S.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),h.push(o=this.parseTemplateElement(a));return s.expressions=S,s.quasis=h,this.finishNode(s,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(a,s,o,h){o&&this.expectPlugin("recordAndTuple");const S=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let P=!1,C=!0;const R=this.startNode();for(R.properties=[],this.next();!this.match(a);){if(C)C=!1;else if(this.expect(12),this.match(a)){this.addTrailingCommaExtraToNode(R);break}let $;s?$=this.parseBindingProperty():($=this.parsePropertyDefinition(h),P=this.checkProto($,o,P,h)),o&&!this.isObjectProperty($)&&$.type!=="SpreadElement"&&this.raise(E.InvalidRecordProperty,$),$.shorthand&&this.addExtra($,"shorthand",!0),R.properties.push($)}this.next(),this.state.inFSharpPipelineDirectBody=S;let F="ObjectExpression";return s?F="ObjectPattern":o&&(F="RecordExpression"),this.finishNode(R,F)}addTrailingCommaExtraToNode(a){this.addExtra(a,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(a,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(a){return!a.computed&&a.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(a){let s=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(E.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)s.push(this.parseDecorator());const o=this.startNode();let h=!1,S=!1,P;if(this.match(21))return s.length&&this.unexpected(),this.parseSpread();s.length&&(o.decorators=s,s=[]),o.method=!1,a&&(P=this.state.startLoc);let C=this.eat(55);this.parsePropertyNamePrefixOperator(o);const R=this.state.containsEsc;if(this.parsePropertyName(o,a),!C&&!R&&this.maybeAsyncOrAccessorProp(o)){const{key:F}=o,$=F.name;$==="async"&&!this.hasPrecedingLineBreak()&&(h=!0,this.resetPreviousNodeTrailingComments(F),C=this.eat(55),this.parsePropertyName(o)),($==="get"||$==="set")&&(S=!0,this.resetPreviousNodeTrailingComments(F),o.kind=$,this.match(55)&&(C=!0,this.raise(E.AccessorIsGenerator,this.state.curPosition(),{kind:$}),this.next()),this.parsePropertyName(o))}return this.parseObjPropValue(o,P,C,h,!1,S,a)}getGetterSetterExpectedParamCount(a){return a.kind==="get"?0:1}getObjectOrClassMethodParams(a){return a.params}checkGetterSetterParams(a){var s;const o=this.getGetterSetterExpectedParamCount(a),h=this.getObjectOrClassMethodParams(a);h.length!==o&&this.raise(a.kind==="get"?E.BadGetterArity:E.BadSetterArity,a),a.kind==="set"&&((s=h[h.length-1])==null?void 0:s.type)==="RestElement"&&this.raise(E.BadSetterRestParameter,a)}parseObjectMethod(a,s,o,h,S){if(S){const P=this.parseMethod(a,s,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(P),P}if(o||s||this.match(10))return h&&this.unexpected(),a.kind="method",a.method=!0,this.parseMethod(a,s,o,!1,!1,"ObjectMethod")}parseObjectProperty(a,s,o,h){if(a.shorthand=!1,this.eat(14))return a.value=o?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowIn(h),this.finishObjectProperty(a);if(!a.computed&&a.key.type==="Identifier"){if(this.checkReservedWord(a.key.name,a.key.loc.start,!0,!1),o)a.value=this.parseMaybeDefault(s,this.cloneIdentifier(a.key));else if(this.match(29)){const S=this.state.startLoc;h!=null?h.shorthandAssignLoc===null&&(h.shorthandAssignLoc=S):this.raise(E.InvalidCoverInitializedName,S),a.value=this.parseMaybeDefault(s,this.cloneIdentifier(a.key))}else a.value=this.cloneIdentifier(a.key);return a.shorthand=!0,this.finishObjectProperty(a)}}finishObjectProperty(a){return this.finishNode(a,"ObjectProperty")}parseObjPropValue(a,s,o,h,S,P,C){const R=this.parseObjectMethod(a,o,h,S,P)||this.parseObjectProperty(a,s,S,C);return R||this.unexpected(),R}parsePropertyName(a,s){if(this.eat(0))a.computed=!0,a.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{const{type:o,value:h}=this.state;let S;if(ce(o))S=this.parseIdentifier(!0);else switch(o){case 135:S=this.parseNumericLiteral(h);break;case 134:S=this.parseStringLiteral(h);break;case 136:S=this.parseBigIntLiteral(h);break;case 139:{const P=this.state.startLoc;s!=null?s.privateKeyLoc===null&&(s.privateKeyLoc=P):this.raise(E.UnexpectedPrivateField,P),S=this.parsePrivateName();break}default:if(o===137){S=this.parseDecimalLiteral(h);break}this.unexpected()}a.key=S,o!==139&&(a.computed=!1)}}initFunction(a,s){a.id=null,a.generator=!1,a.async=s}parseMethod(a,s,o,h,S,P,C=!1){this.initFunction(a,o),a.generator=s,this.scope.enter(18|(C?64:0)|(S?32:0)),this.prodParam.enter(hi(o,a.generator)),this.parseFunctionParams(a,h);const R=this.parseFunctionBodyAndFinish(a,P,!0);return this.prodParam.exit(),this.scope.exit(),R}parseArrayLike(a,s,o,h){o&&this.expectPlugin("recordAndTuple");const S=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;const P=this.startNode();return this.next(),P.elements=this.parseExprList(a,!o,h,P),this.state.inFSharpPipelineDirectBody=S,this.finishNode(P,o?"TupleExpression":"ArrayExpression")}parseArrowExpression(a,s,o,h){this.scope.enter(6);let S=hi(o,!1);!this.match(5)&&this.prodParam.hasIn&&(S|=8),this.prodParam.enter(S),this.initFunction(a,o);const P=this.state.maybeInArrowParameters;return s&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(a,s,h)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(a,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=P,this.finishNode(a,"ArrowFunctionExpression")}setArrowFunctionParameters(a,s,o){this.toAssignableList(s,o,!1),a.params=s}parseFunctionBodyAndFinish(a,s,o=!1){return this.parseFunctionBody(a,!1,o),this.finishNode(a,s)}parseFunctionBody(a,s,o=!1){const h=s&&!this.match(5);if(this.expressionScope.enter(bu()),h)a.body=this.parseMaybeAssign(),this.checkParams(a,!1,s,!1);else{const S=this.state.strict,P=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|4),a.body=this.parseBlock(!0,!1,C=>{const R=!this.isSimpleParamList(a.params);C&&R&&this.raise(E.IllegalLanguageModeDirective,(a.kind==="method"||a.kind==="constructor")&&a.key?a.key.loc.end:a);const F=!S&&this.state.strict;this.checkParams(a,!this.state.strict&&!s&&!o&&!R,s,F),this.state.strict&&a.id&&this.checkIdentifier(a.id,65,F)}),this.prodParam.exit(),this.state.labels=P}this.expressionScope.exit()}isSimpleParameter(a){return a.type==="Identifier"}isSimpleParamList(a){for(let s=0,o=a.length;s<o;s++)if(!this.isSimpleParameter(a[s]))return!1;return!0}checkParams(a,s,o,h=!0){const S=!s&&new Set,P={type:"FormalParameters"};for(const C of a.params)this.checkLVal(C,P,5,S,h)}parseExprList(a,s,o,h){const S=[];let P=!0;for(;!this.eat(a);){if(P)P=!1;else if(this.expect(12),this.match(a)){h&&this.addTrailingCommaExtraToNode(h),this.next();break}S.push(this.parseExprListItem(s,o))}return S}parseExprListItem(a,s,o){let h;if(this.match(12))a||this.raise(E.UnexpectedToken,this.state.curPosition(),{unexpected:","}),h=null;else if(this.match(21)){const S=this.state.startLoc;h=this.parseParenItem(this.parseSpread(s),S)}else if(this.match(17)){this.expectPlugin("partialApplication"),o||this.raise(E.UnexpectedArgumentPlaceholder,this.state.startLoc);const S=this.startNode();this.next(),h=this.finishNode(S,"ArgumentPlaceholder")}else h=this.parseMaybeAssignAllowIn(s,this.parseParenItem);return h}parseIdentifier(a){const s=this.startNode(),o=this.parseIdentifierName(a);return this.createIdentifier(s,o)}createIdentifier(a,s){return a.name=s,a.loc.identifierName=s,this.finishNode(a,"Identifier")}createIdentifierAt(a,s,o){return a.name=s,a.loc.identifierName=s,this.finishNodeAt(a,"Identifier",o)}parseIdentifierName(a){let s;const{startLoc:o,type:h}=this.state;ce(h)?s=this.state.value:this.unexpected();const S=Z(h);return a?S&&this.replaceToken(132):this.checkReservedWord(s,o,S,!1),this.next(),s}checkReservedWord(a,s,o,h){if(a.length>10||!sv(a))return;if(o&&ev(a)){this.raise(E.UnexpectedKeyword,s,{keyword:a});return}if((this.state.strict?h?du:pu:hu)(a,this.inModule)){this.raise(E.UnexpectedReservedWord,s,{reservedWord:a});return}else if(a==="yield"){if(this.prodParam.hasYield){this.raise(E.YieldBindingIdentifier,s);return}}else if(a==="await"){if(this.prodParam.hasAwait){this.raise(E.AwaitBindingIdentifier,s);return}if(this.scope.inStaticBlock){this.raise(E.AwaitBindingIdentifierInStaticBlock,s);return}this.expressionScope.recordAsyncArrowParametersError(s)}else if(a==="arguments"&&this.scope.inClassAndNotInNonArrowFunction){this.raise(E.ArgumentsInClass,s);return}}recordAwaitIfAllowed(){const a=this.prodParam.hasAwait||this.optionFlags&1&&!this.scope.inFunction;return a&&!this.scope.inFunction&&(this.state.hasTopLevelAwait=!0),a}parseAwait(a){const s=this.startNodeAt(a);return this.expressionScope.recordParameterInitializerError(E.AwaitExpressionFormalParameter,s),this.eat(55)&&this.raise(E.ObsoleteAwaitStar,s),!this.scope.inFunction&&!(this.optionFlags&1)&&(this.isAmbiguousPrefixOrIdentifier()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(s.argument=this.parseMaybeUnary(null,!0)),this.finishNode(s,"AwaitExpression")}isAmbiguousPrefixOrIdentifier(){if(this.hasPrecedingLineBreak())return!0;const{type:a}=this.state;return a===53||a===10||a===0||jr(a)||a===102&&!this.state.containsEsc||a===138||a===56||this.hasPlugin("v8intrinsic")&&a===54}parseYield(a){const s=this.startNodeAt(a);this.expressionScope.recordParameterInitializerError(E.YieldInParameter,s);let o=!1,h=null;if(!this.hasPrecedingLineBreak())switch(o=this.eat(55),this.state.type){case 13:case 140:case 8:case 11:case 3:case 9:case 14:case 12:if(!o)break;default:h=this.parseMaybeAssign()}return s.delegate=o,s.argument=h,this.finishNode(s,"YieldExpression")}parseImportCall(a){if(this.next(),a.source=this.parseMaybeAssignAllowIn(),a.options=null,this.eat(12)){if(this.match(11))this.addTrailingCommaExtraToNode(a.source);else if(a.options=this.parseMaybeAssignAllowIn(),this.eat(12)&&(this.addTrailingCommaExtraToNode(a.options),!this.match(11))){do this.parseMaybeAssignAllowIn();while(this.eat(12)&&!this.match(11));this.raise(E.ImportCallArity,a)}}return this.expect(11),this.finishNode(a,"ImportExpression")}checkPipelineAtInfixOperator(a,s){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&a.type==="SequenceExpression"&&this.raise(E.PipelineHeadSequenceExpression,s)}parseSmartPipelineBodyInStyle(a,s){if(this.isSimpleReference(a)){const o=this.startNodeAt(s);return o.callee=a,this.finishNode(o,"PipelineBareFunction")}else{const o=this.startNodeAt(s);return this.checkSmartPipeTopicBodyEarlyErrors(s),o.expression=a,this.finishNode(o,"PipelineTopicExpression")}}isSimpleReference(a){switch(a.type){case"MemberExpression":return!a.computed&&this.isSimpleReference(a.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(a){if(this.match(19))throw this.raise(E.PipelineBodyNoArrow,this.state.startLoc);this.topicReferenceWasUsedInCurrentContext()||this.raise(E.PipelineTopicUnused,a)}withTopicBindingContext(a){const s=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return a()}finally{this.state.topicContext=s}}withSmartMixTopicForbiddingContext(a){if(this.hasPlugin(["pipelineOperator",{proposal:"smart"}])){const s=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return a()}finally{this.state.topicContext=s}}else return a()}withSoloAwaitPermittingContext(a){const s=this.state.soloAwait;this.state.soloAwait=!0;try{return a()}finally{this.state.soloAwait=s}}allowInAnd(a){const s=this.prodParam.currentFlags();if(8&~s){this.prodParam.enter(s|8);try{return a()}finally{this.prodParam.exit()}}return a()}disallowInAnd(a){const s=this.prodParam.currentFlags();if(8&s){this.prodParam.enter(s&-9);try{return a()}finally{this.prodParam.exit()}}return a()}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(a){const s=this.state.startLoc;this.state.potentialArrowAt=this.state.start;const o=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;const h=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),s,a);return this.state.inFSharpPipelineDirectBody=o,h}parseModuleExpression(){this.expectPlugin("moduleBlocks");const a=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);const s=this.startNodeAt(this.state.endLoc);this.next();const o=this.initializeScopes(!0);this.enterInitialScopes();try{a.body=this.parseProgram(s,8,"module")}finally{o()}return this.finishNode(a,"ModuleExpression")}parsePropertyNamePrefixOperator(a){}}const Ba={kind:1},Xv={kind:2},Jv=/[\uD800-\uDFFF]/u,$a=/in(?:stanceof)?/y;function Kv(b,a,s){for(let o=0;o<b.length;o++){const h=b[o],{type:S}=h;if(typeof S=="number"){{if(S===139){const{loc:P,start:C,value:R,end:F}=h,$=C+1,q=i(P.start,1);b.splice(o,1,new tr({type:bt(27),value:"#",start:C,end:$,startLoc:P.start,endLoc:q}),new tr({type:bt(132),value:R,start:$,end:F,startLoc:q,endLoc:P.end})),o++;continue}if(jr(S)){const{loc:P,start:C,value:R,end:F}=h,$=C+1,q=i(P.start,1);let J;a.charCodeAt(C-s)===96?J=new tr({type:bt(22),value:"`",start:C,end:$,startLoc:P.start,endLoc:q}):J=new tr({type:bt(8),value:"}",start:C,end:$,startLoc:P.start,endLoc:q});let ee,oe,me,Me;S===24?(oe=F-1,me=i(P.end,-1),ee=R===null?null:R.slice(1,-1),Me=new tr({type:bt(22),value:"`",start:oe,end:F,startLoc:me,endLoc:P.end})):(oe=F-2,me=i(P.end,-2),ee=R===null?null:R.slice(1,-2),Me=new tr({type:bt(23),value:"${",start:oe,end:F,startLoc:me,endLoc:P.end})),b.splice(o,1,J,new tr({type:bt(20),value:ee,start:$,end:oe,startLoc:q,endLoc:me}),Me),o+=2;continue}}h.type=bt(S)}}return b}class Yv extends Hv{parseTopLevel(a,s){return a.program=this.parseProgram(s),a.comments=this.comments,this.optionFlags&256&&(a.tokens=Kv(this.tokens,this.input,this.startIndex)),this.finishNode(a,"File")}parseProgram(a,s=140,o=this.options.sourceType){if(a.sourceType=o,a.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(a,!0,!0,s),this.inModule){if(!(this.optionFlags&64)&&this.scope.undefinedExports.size>0)for(const[S,P]of Array.from(this.scope.undefinedExports))this.raise(E.ModuleExportUndefined,P,{localName:S});this.addExtra(a,"topLevelAwait",this.state.hasTopLevelAwait)}let h;return s===140?h=this.finishNode(a,"Program"):h=this.finishNodeAt(a,"Program",i(this.state.startLoc,-1)),h}stmtToDirective(a){const s=this.castNodeTo(a,"Directive"),o=this.castNodeTo(a.expression,"DirectiveLiteral"),h=o.value,S=this.input.slice(this.offsetToSourcePos(o.start),this.offsetToSourcePos(o.end)),P=o.value=S.slice(1,-1);return this.addExtra(o,"raw",S),this.addExtra(o,"rawValue",P),this.addExtra(o,"expressionValue",h),s.value=o,delete a.expression,s}parseInterpreterDirective(){if(!this.match(28))return null;const a=this.startNode();return a.value=this.state.value,this.next(),this.finishNode(a,"InterpreterDirective")}isLet(){return this.isContextual(100)?this.hasFollowingBindingAtom():!1}isUsing(){if(!this.isContextual(107))return!1;const a=this.nextTokenInLineStart(),s=this.codePointAtPos(a);return this.chStartsBindingIdentifier(s,a)}isAwaitUsing(){if(!this.isContextual(96))return!1;let a=this.nextTokenInLineStart();if(this.isUnparsedContextual(a,"using")){a=this.nextTokenInLineStartSince(a+5);const s=this.codePointAtPos(a);if(this.chStartsBindingIdentifier(s,a))return this.expectPlugin("explicitResourceManagement"),!0}return!1}chStartsBindingIdentifier(a,s){if(jt(a)){if($a.lastIndex=s,$a.test(this.input)){const o=this.codePointAtPos($a.lastIndex);if(!Vr(o)&&o!==92)return!1}return!0}else return a===92}chStartsBindingPattern(a){return a===91||a===123}hasFollowingBindingAtom(){const a=this.nextTokenStart(),s=this.codePointAtPos(a);return this.chStartsBindingPattern(s)||this.chStartsBindingIdentifier(s,a)}hasInLineFollowingBindingIdentifierOrBrace(){const a=this.nextTokenInLineStart(),s=this.codePointAtPos(a);return s===123||this.chStartsBindingIdentifier(s,a)}allowsForUsing(){const{type:a,containsEsc:s,end:o}=this.lookahead();if(a===102&&!s){const h=this.lookaheadCharCodeSince(o);if(h!==61&&h!==58&&h!==59)return!1}return Y(a)&&!this.hasFollowingLineBreak()?(this.expectPlugin("explicitResourceManagement"),!0):!1}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(a=!1){let s=0;return this.options.annexB&&!this.state.strict&&(s|=4,a&&(s|=8)),this.parseStatementLike(s)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(a){let s=null;return this.match(26)&&(s=this.parseDecorators(!0)),this.parseStatementContent(a,s)}parseStatementContent(a,s){const o=this.state.type,h=this.startNode(),S=!!(a&2),P=!!(a&4),C=a&1;switch(o){case 60:return this.parseBreakContinueStatement(h,!0);case 63:return this.parseBreakContinueStatement(h,!1);case 64:return this.parseDebuggerStatement(h);case 90:return this.parseDoWhileStatement(h);case 91:return this.parseForStatement(h);case 68:if(this.lookaheadCharCode()===46)break;return P||this.raise(this.state.strict?E.StrictFunction:this.options.annexB?E.SloppyFunctionAnnexB:E.SloppyFunction,this.state.startLoc),this.parseFunctionStatement(h,!1,!S&&P);case 80:return S||this.unexpected(),this.parseClass(this.maybeTakeDecorators(s,h),!0);case 69:return this.parseIfStatement(h);case 70:return this.parseReturnStatement(h);case 71:return this.parseSwitchStatement(h);case 72:return this.parseThrowStatement(h);case 73:return this.parseTryStatement(h);case 96:if(this.isAwaitUsing())return this.allowsUsing()?S?this.recordAwaitIfAllowed()||this.raise(E.AwaitUsingNotInAsyncContext,h):this.raise(E.UnexpectedLexicalDeclaration,h):this.raise(E.UnexpectedUsingDeclaration,h),this.next(),this.parseVarStatement(h,"await using");break;case 107:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifierOrBrace())break;return this.expectPlugin("explicitResourceManagement"),this.allowsUsing()?S||this.raise(E.UnexpectedLexicalDeclaration,this.state.startLoc):this.raise(E.UnexpectedUsingDeclaration,this.state.startLoc),this.parseVarStatement(h,"using");case 100:{if(this.state.containsEsc)break;const $=this.nextTokenStart(),q=this.codePointAtPos($);if(q!==91&&(!S&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(q,$)&&q!==123))break}case 75:S||this.raise(E.UnexpectedLexicalDeclaration,this.state.startLoc);case 74:{const $=this.state.value;return this.parseVarStatement(h,$)}case 92:return this.parseWhileStatement(h);case 76:return this.parseWithStatement(h);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(h);case 83:{const $=this.lookaheadCharCode();if($===40||$===46)break}case 82:{!(this.optionFlags&8)&&!C&&this.raise(E.UnexpectedImportExport,this.state.startLoc),this.next();let $;return o===83?$=this.parseImport(h):$=this.parseExport(h,s),this.assertModuleNodeAllowed($),$}default:if(this.isAsyncFunction())return S||this.raise(E.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(h,!0,!S&&P)}const R=this.state.value,F=this.parseExpression();return Y(o)&&F.type==="Identifier"&&this.eat(14)?this.parseLabeledStatement(h,R,F,a):this.parseExpressionStatement(h,F,s)}assertModuleNodeAllowed(a){!(this.optionFlags&8)&&!this.inModule&&this.raise(E.ImportOutsideModule,a)}decoratorsEnabledBeforeExport(){return this.hasPlugin("decorators-legacy")?!0:this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")!==!1}maybeTakeDecorators(a,s,o){if(a){var h;(h=s.decorators)!=null&&h.length?(typeof this.getPluginOption("decorators","decoratorsBeforeExport")!="boolean"&&this.raise(E.DecoratorsBeforeAfterExport,s.decorators[0]),s.decorators.unshift(...a)):s.decorators=a,this.resetStartLocationFromNode(s,a[0]),o&&this.resetStartLocationFromNode(o,s)}return s}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(a){const s=[];do s.push(this.parseDecorator());while(this.match(26));if(this.match(82))a||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(E.DecoratorExportClass,this.state.startLoc);else if(!this.canHaveLeadingDecorator())throw this.raise(E.UnexpectedLeadingDecorator,this.state.startLoc);return s}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);const a=this.startNode();if(this.next(),this.hasPlugin("decorators")){const s=this.state.startLoc;let o;if(this.match(10)){const h=this.state.startLoc;this.next(),o=this.parseExpression(),this.expect(11),o=this.wrapParenthesis(h,o);const S=this.state.startLoc;a.expression=this.parseMaybeDecoratorArguments(o,h),this.getPluginOption("decorators","allowCallParenthesized")===!1&&a.expression!==o&&this.raise(E.DecoratorArgumentsOutsideParentheses,S)}else{for(o=this.parseIdentifier(!1);this.eat(16);){const h=this.startNodeAt(s);h.object=o,this.match(139)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),h.property=this.parsePrivateName()):h.property=this.parseIdentifier(!0),h.computed=!1,o=this.finishNode(h,"MemberExpression")}a.expression=this.parseMaybeDecoratorArguments(o,s)}}else a.expression=this.parseExprSubscripts();return this.finishNode(a,"Decorator")}parseMaybeDecoratorArguments(a,s){if(this.eat(10)){const o=this.startNodeAt(s);return o.callee=a,o.arguments=this.parseCallExpressionArguments(11),this.toReferencedList(o.arguments),this.finishNode(o,"CallExpression")}return a}parseBreakContinueStatement(a,s){return this.next(),this.isLineTerminator()?a.label=null:(a.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(a,s),this.finishNode(a,s?"BreakStatement":"ContinueStatement")}verifyBreakContinue(a,s){let o;for(o=0;o<this.state.labels.length;++o){const h=this.state.labels[o];if((a.label==null||h.name===a.label.name)&&(h.kind!=null&&(s||h.kind===1)||a.label&&s))break}if(o===this.state.labels.length){const h=s?"BreakStatement":"ContinueStatement";this.raise(E.IllegalBreakContinue,a,{type:h})}}parseDebuggerStatement(a){return this.next(),this.semicolon(),this.finishNode(a,"DebuggerStatement")}parseHeaderExpression(){this.expect(10);const a=this.parseExpression();return this.expect(11),a}parseDoWhileStatement(a){return this.next(),this.state.labels.push(Ba),a.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.expect(92),a.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(a,"DoWhileStatement")}parseForStatement(a){this.next(),this.state.labels.push(Ba);let s=null;if(this.isContextual(96)&&this.recordAwaitIfAllowed()&&(s=this.state.startLoc,this.next()),this.scope.enter(0),this.expect(10),this.match(13))return s!==null&&this.unexpected(s),this.parseFor(a,null);const o=this.isContextual(100);{const R=this.isAwaitUsing(),F=R||this.isContextual(107)&&this.allowsForUsing(),$=o&&this.hasFollowingBindingAtom()||F;if(this.match(74)||this.match(75)||$){const q=this.startNode();let J;R?(J="await using",this.recordAwaitIfAllowed()||this.raise(E.AwaitUsingNotInAsyncContext,this.state.startLoc),this.next()):J=this.state.value,this.next(),this.parseVar(q,!0,J);const ee=this.finishNode(q,"VariableDeclaration"),oe=this.match(58);return oe&&F&&this.raise(E.ForInUsing,ee),(oe||this.isContextual(102))&&ee.declarations.length===1?this.parseForIn(a,ee,s):(s!==null&&this.unexpected(s),this.parseFor(a,ee))}}const h=this.isContextual(95),S=new di,P=this.parseExpression(!0,S),C=this.isContextual(102);if(C&&(o&&this.raise(E.ForOfLet,P),s===null&&h&&P.type==="Identifier"&&this.raise(E.ForOfAsync,P)),C||this.match(58)){this.checkDestructuringPrivate(S),this.toAssignable(P,!0);const R=C?"ForOfStatement":"ForInStatement";return this.checkLVal(P,{type:R}),this.parseForIn(a,P,s)}else this.checkExpressionErrors(S,!0);return s!==null&&this.unexpected(s),this.parseFor(a,P)}parseFunctionStatement(a,s,o){return this.next(),this.parseFunction(a,1|(o?2:0)|(s?8:0))}parseIfStatement(a){return this.next(),a.test=this.parseHeaderExpression(),a.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),a.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(a,"IfStatement")}parseReturnStatement(a){return!this.prodParam.hasReturn&&!(this.optionFlags&2)&&this.raise(E.IllegalReturn,this.state.startLoc),this.next(),this.isLineTerminator()?a.argument=null:(a.argument=this.parseExpression(),this.semicolon()),this.finishNode(a,"ReturnStatement")}parseSwitchStatement(a){this.next(),a.discriminant=this.parseHeaderExpression();const s=a.cases=[];this.expect(5),this.state.labels.push(Xv),this.scope.enter(256);let o;for(let h;!this.match(8);)if(this.match(61)||this.match(65)){const S=this.match(61);o&&this.finishNode(o,"SwitchCase"),s.push(o=this.startNode()),o.consequent=[],this.next(),S?o.test=this.parseExpression():(h&&this.raise(E.MultipleDefaultsInSwitch,this.state.lastTokStartLoc),h=!0,o.test=null),this.expect(14)}else o?o.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),o&&this.finishNode(o,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(a,"SwitchStatement")}parseThrowStatement(a){return this.next(),this.hasPrecedingLineBreak()&&this.raise(E.NewlineAfterThrow,this.state.lastTokEndLoc),a.argument=this.parseExpression(),this.semicolon(),this.finishNode(a,"ThrowStatement")}parseCatchClauseParam(){const a=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&a.type==="Identifier"?8:0),this.checkLVal(a,{type:"CatchClause"},9),a}parseTryStatement(a){if(this.next(),a.block=this.parseBlock(),a.handler=null,this.match(62)){const s=this.startNode();this.next(),this.match(10)?(this.expect(10),s.param=this.parseCatchClauseParam(),this.expect(11)):(s.param=null,this.scope.enter(0)),s.body=this.withSmartMixTopicForbiddingContext(()=>this.parseBlock(!1,!1)),this.scope.exit(),a.handler=this.finishNode(s,"CatchClause")}return a.finalizer=this.eat(67)?this.parseBlock():null,!a.handler&&!a.finalizer&&this.raise(E.NoCatchOrFinally,a),this.finishNode(a,"TryStatement")}parseVarStatement(a,s,o=!1){return this.next(),this.parseVar(a,!1,s,o),this.semicolon(),this.finishNode(a,"VariableDeclaration")}parseWhileStatement(a){return this.next(),a.test=this.parseHeaderExpression(),this.state.labels.push(Ba),a.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.finishNode(a,"WhileStatement")}parseWithStatement(a){return this.state.strict&&this.raise(E.StrictWith,this.state.startLoc),this.next(),a.object=this.parseHeaderExpression(),a.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.finishNode(a,"WithStatement")}parseEmptyStatement(a){return this.next(),this.finishNode(a,"EmptyStatement")}parseLabeledStatement(a,s,o,h){for(const P of this.state.labels)P.name===s&&this.raise(E.LabelRedeclaration,o,{labelName:s});const S=tt(this.state.type)?1:this.match(71)?2:null;for(let P=this.state.labels.length-1;P>=0;P--){const C=this.state.labels[P];if(C.statementStart===a.start)C.statementStart=this.sourceToOffsetPos(this.state.start),C.kind=S;else break}return this.state.labels.push({name:s,kind:S,statementStart:this.sourceToOffsetPos(this.state.start)}),a.body=h&8?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),a.label=o,this.finishNode(a,"LabeledStatement")}parseExpressionStatement(a,s,o){return a.expression=s,this.semicolon(),this.finishNode(a,"ExpressionStatement")}parseBlock(a=!1,s=!0,o){const h=this.startNode();return a&&this.state.strictErrors.clear(),this.expect(5),s&&this.scope.enter(0),this.parseBlockBody(h,a,!1,8,o),s&&this.scope.exit(),this.finishNode(h,"BlockStatement")}isValidDirective(a){return a.type==="ExpressionStatement"&&a.expression.type==="StringLiteral"&&!a.expression.extra.parenthesized}parseBlockBody(a,s,o,h,S){const P=a.body=[],C=a.directives=[];this.parseBlockOrModuleBlockBody(P,s?C:void 0,o,h,S)}parseBlockOrModuleBlockBody(a,s,o,h,S){const P=this.state.strict;let C=!1,R=!1;for(;!this.match(h);){const F=o?this.parseModuleItem():this.parseStatementListItem();if(s&&!R){if(this.isValidDirective(F)){const $=this.stmtToDirective(F);s.push($),!C&&$.value.value==="use strict"&&(C=!0,this.setStrict(!0));continue}R=!0,this.state.strictErrors.clear()}a.push(F)}S?.call(this,C),P||this.setStrict(!1),this.next()}parseFor(a,s){return a.init=s,this.semicolon(!1),a.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),a.update=this.match(11)?null:this.parseExpression(),this.expect(11),a.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(a,"ForStatement")}parseForIn(a,s,o){const h=this.match(58);return this.next(),h?o!==null&&this.unexpected(o):a.await=o!==null,s.type==="VariableDeclaration"&&s.declarations[0].init!=null&&(!h||!this.options.annexB||this.state.strict||s.kind!=="var"||s.declarations[0].id.type!=="Identifier")&&this.raise(E.ForInOfLoopInitializer,s,{type:h?"ForInStatement":"ForOfStatement"}),s.type==="AssignmentPattern"&&this.raise(E.InvalidLhs,s,{ancestor:{type:"ForStatement"}}),a.left=s,a.right=h?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),a.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(a,h?"ForInStatement":"ForOfStatement")}parseVar(a,s,o,h=!1){const S=a.declarations=[];for(a.kind=o;;){const P=this.startNode();if(this.parseVarId(P,o),P.init=this.eat(29)?s?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,P.init===null&&!h&&(P.id.type!=="Identifier"&&!(s&&(this.match(58)||this.isContextual(102)))?this.raise(E.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"destructuring"}):(o==="const"||o==="using"||o==="await using")&&!(this.match(58)||this.isContextual(102))&&this.raise(E.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:o})),S.push(this.finishNode(P,"VariableDeclarator")),!this.eat(12))break}return a}parseVarId(a,s){const o=this.parseBindingAtom();(s==="using"||s==="await using")&&(o.type==="ArrayPattern"||o.type==="ObjectPattern")&&this.raise(E.UsingDeclarationHasBindingPattern,o.loc.start),this.checkLVal(o,{type:"VariableDeclarator"},s==="var"?5:8201),a.id=o}parseAsyncFunctionExpression(a){return this.parseFunction(a,8)}parseFunction(a,s=0){const o=s&2,h=!!(s&1),S=h&&!(s&4),P=!!(s&8);this.initFunction(a,P),this.match(55)&&(o&&this.raise(E.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),a.generator=!0),h&&(a.id=this.parseFunctionId(S));const C=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(2),this.prodParam.enter(hi(P,a.generator)),h||(a.id=this.parseFunctionId()),this.parseFunctionParams(a,!1),this.withSmartMixTopicForbiddingContext(()=>{this.parseFunctionBodyAndFinish(a,h?"FunctionDeclaration":"FunctionExpression")}),this.prodParam.exit(),this.scope.exit(),h&&!o&&this.registerFunctionStatementId(a),this.state.maybeInArrowParameters=C,a}parseFunctionId(a){return a||Y(this.state.type)?this.parseIdentifier():null}parseFunctionParams(a,s){this.expect(10),this.expressionScope.enter(Nv()),a.params=this.parseBindingList(11,41,2|(s?4:0)),this.expressionScope.exit()}registerFunctionStatementId(a){a.id&&this.scope.declareName(a.id.name,!this.options.annexB||this.state.strict||a.generator||a.async?this.scope.treatFunctionsAsVar?5:8201:17,a.id.loc.start)}parseClass(a,s,o){this.next();const h=this.state.strict;return this.state.strict=!0,this.parseClassId(a,s,o),this.parseClassSuper(a),a.body=this.parseClassBody(!!a.superClass,h),this.finishNode(a,s?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}nameIsConstructor(a){return a.type==="Identifier"&&a.name==="constructor"||a.type==="StringLiteral"&&a.value==="constructor"}isNonstaticConstructor(a){return!a.computed&&!a.static&&this.nameIsConstructor(a.key)}parseClassBody(a,s){this.classScope.enter();const o={hadConstructor:!1,hadSuperClass:a};let h=[];const S=this.startNode();if(S.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext(()=>{for(;!this.match(8);){if(this.eat(13)){if(h.length>0)throw this.raise(E.DecoratorSemicolon,this.state.lastTokEndLoc);continue}if(this.match(26)){h.push(this.parseDecorator());continue}const P=this.startNode();h.length&&(P.decorators=h,this.resetStartLocationFromNode(P,h[0]),h=[]),this.parseClassMember(S,P,o),P.kind==="constructor"&&P.decorators&&P.decorators.length>0&&this.raise(E.DecoratorConstructor,P)}}),this.state.strict=s,this.next(),h.length)throw this.raise(E.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(S,"ClassBody")}parseClassMemberFromModifier(a,s){const o=this.parseIdentifier(!0);if(this.isClassMethod()){const h=s;return h.kind="method",h.computed=!1,h.key=o,h.static=!1,this.pushClassMethod(a,h,!1,!1,!1,!1),!0}else if(this.isClassProperty()){const h=s;return h.computed=!1,h.key=o,h.static=!1,a.body.push(this.parseClassProperty(h)),!0}return this.resetPreviousNodeTrailingComments(o),!1}parseClassMember(a,s,o){const h=this.isContextual(106);if(h){if(this.parseClassMemberFromModifier(a,s))return;if(this.eat(5)){this.parseClassStaticBlock(a,s);return}}this.parseClassMemberWithIsStatic(a,s,o,h)}parseClassMemberWithIsStatic(a,s,o,h){const S=s,P=s,C=s,R=s,F=s,$=S,q=S;if(s.static=h,this.parsePropertyNamePrefixOperator(s),this.eat(55)){$.kind="method";const ye=this.match(139);if(this.parseClassElementName($),this.parsePostMemberNameModifiers($),ye){this.pushClassPrivateMethod(a,P,!0,!1);return}this.isNonstaticConstructor(S)&&this.raise(E.ConstructorIsGenerator,S.key),this.pushClassMethod(a,S,!0,!1,!1,!1);return}const J=!this.state.containsEsc&&Y(this.state.type),ee=this.parseClassElementName(s),oe=J?ee.name:null,me=this.isPrivateName(ee),Me=this.state.startLoc;if(this.parsePostMemberNameModifiers(q),this.isClassMethod()){if($.kind="method",me){this.pushClassPrivateMethod(a,P,!1,!1);return}const ye=this.isNonstaticConstructor(S);let _e=!1;ye&&(S.kind="constructor",o.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(E.DuplicateConstructor,ee),ye&&this.hasPlugin("typescript")&&s.override&&this.raise(E.OverrideOnConstructor,ee),o.hadConstructor=!0,_e=o.hadSuperClass),this.pushClassMethod(a,S,!1,!1,ye,_e)}else if(this.isClassProperty())me?this.pushClassPrivateProperty(a,R):this.pushClassProperty(a,C);else if(oe==="async"&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(ee);const ye=this.eat(55);q.optional&&this.unexpected(Me),$.kind="method";const _e=this.match(139);this.parseClassElementName($),this.parsePostMemberNameModifiers(q),_e?this.pushClassPrivateMethod(a,P,ye,!0):(this.isNonstaticConstructor(S)&&this.raise(E.ConstructorIsAsync,S.key),this.pushClassMethod(a,S,ye,!0,!1,!1))}else if((oe==="get"||oe==="set")&&!(this.match(55)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(ee),$.kind=oe;const ye=this.match(139);this.parseClassElementName(S),ye?this.pushClassPrivateMethod(a,P,!1,!1):(this.isNonstaticConstructor(S)&&this.raise(E.ConstructorIsAccessor,S.key),this.pushClassMethod(a,S,!1,!1,!1,!1)),this.checkGetterSetterParams(S)}else if(oe==="accessor"&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(ee);const ye=this.match(139);this.parseClassElementName(C),this.pushClassAccessorProperty(a,F,ye)}else this.isLineTerminator()?me?this.pushClassPrivateProperty(a,R):this.pushClassProperty(a,C):this.unexpected()}parseClassElementName(a){const{type:s,value:o}=this.state;if((s===132||s===134)&&a.static&&o==="prototype"&&this.raise(E.StaticPrototype,this.state.startLoc),s===139){o==="constructor"&&this.raise(E.ConstructorClassPrivateField,this.state.startLoc);const h=this.parsePrivateName();return a.key=h,h}return this.parsePropertyName(a),a.key}parseClassStaticBlock(a,s){var o;this.scope.enter(208);const h=this.state.labels;this.state.labels=[],this.prodParam.enter(0);const S=s.body=[];this.parseBlockOrModuleBlockBody(S,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=h,a.body.push(this.finishNode(s,"StaticBlock")),(o=s.decorators)!=null&&o.length&&this.raise(E.DecoratorStaticBlock,s)}pushClassProperty(a,s){!s.computed&&this.nameIsConstructor(s.key)&&this.raise(E.ConstructorClassField,s.key),a.body.push(this.parseClassProperty(s))}pushClassPrivateProperty(a,s){const o=this.parseClassPrivateProperty(s);a.body.push(o),this.classScope.declarePrivateName(this.getPrivateNameSV(o.key),0,o.key.loc.start)}pushClassAccessorProperty(a,s,o){!o&&!s.computed&&this.nameIsConstructor(s.key)&&this.raise(E.ConstructorClassField,s.key);const h=this.parseClassAccessorProperty(s);a.body.push(h),o&&this.classScope.declarePrivateName(this.getPrivateNameSV(h.key),0,h.key.loc.start)}pushClassMethod(a,s,o,h,S,P){a.body.push(this.parseMethod(s,o,h,S,P,"ClassMethod",!0))}pushClassPrivateMethod(a,s,o,h){const S=this.parseMethod(s,o,h,!1,!1,"ClassPrivateMethod",!0);a.body.push(S);const P=S.kind==="get"?S.static?6:2:S.kind==="set"?S.static?5:1:0;this.declareClassPrivateMethodInScope(S,P)}declareClassPrivateMethodInScope(a,s){this.classScope.declarePrivateName(this.getPrivateNameSV(a.key),s,a.key.loc.start)}parsePostMemberNameModifiers(a){}parseClassPrivateProperty(a){return this.parseInitializer(a),this.semicolon(),this.finishNode(a,"ClassPrivateProperty")}parseClassProperty(a){return this.parseInitializer(a),this.semicolon(),this.finishNode(a,"ClassProperty")}parseClassAccessorProperty(a){return this.parseInitializer(a),this.semicolon(),this.finishNode(a,"ClassAccessorProperty")}parseInitializer(a){this.scope.enter(80),this.expressionScope.enter(bu()),this.prodParam.enter(0),a.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(a,s,o,h=8331){if(Y(this.state.type))a.id=this.parseIdentifier(),s&&this.declareNameFromIdentifier(a.id,h);else if(o||!s)a.id=null;else throw this.raise(E.MissingClassName,this.state.startLoc)}parseClassSuper(a){a.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(a,s){const o=this.parseMaybeImportPhase(a,!0),h=this.maybeParseExportDefaultSpecifier(a,o),S=!h||this.eat(12),P=S&&this.eatExportStar(a),C=P&&this.maybeParseExportNamespaceSpecifier(a),R=S&&(!C||this.eat(12)),F=h||P;if(P&&!C){if(h&&this.unexpected(),s)throw this.raise(E.UnsupportedDecoratorExport,a);return this.parseExportFrom(a,!0),this.sawUnambiguousESM=!0,this.finishNode(a,"ExportAllDeclaration")}const $=this.maybeParseExportNamedSpecifiers(a);h&&S&&!P&&!$&&this.unexpected(null,5),C&&R&&this.unexpected(null,98);let q;if(F||$){if(q=!1,s)throw this.raise(E.UnsupportedDecoratorExport,a);this.parseExportFrom(a,F)}else q=this.maybeParseExportDeclaration(a);if(F||$||q){var J;const ee=a;if(this.checkExport(ee,!0,!1,!!ee.source),((J=ee.declaration)==null?void 0:J.type)==="ClassDeclaration")this.maybeTakeDecorators(s,ee.declaration,ee);else if(s)throw this.raise(E.UnsupportedDecoratorExport,a);return this.sawUnambiguousESM=!0,this.finishNode(ee,"ExportNamedDeclaration")}if(this.eat(65)){const ee=a,oe=this.parseExportDefaultExpression();if(ee.declaration=oe,oe.type==="ClassDeclaration")this.maybeTakeDecorators(s,oe,ee);else if(s)throw this.raise(E.UnsupportedDecoratorExport,a);return this.checkExport(ee,!0,!0),this.sawUnambiguousESM=!0,this.finishNode(ee,"ExportDefaultDeclaration")}this.unexpected(null,5)}eatExportStar(a){return this.eat(55)}maybeParseExportDefaultSpecifier(a,s){if(s||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",s?.loc.start);const o=s||this.parseIdentifier(!0),h=this.startNodeAtNode(o);return h.exported=o,a.specifiers=[this.finishNode(h,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(a){if(this.isContextual(93)){var s,o;(o=(s=a).specifiers)!=null||(s.specifiers=[]);const h=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),h.exported=this.parseModuleExportName(),a.specifiers.push(this.finishNode(h,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(a){if(this.match(5)){const s=a;s.specifiers||(s.specifiers=[]);const o=s.exportKind==="type";return s.specifiers.push(...this.parseExportSpecifiers(o)),s.source=null,this.hasPlugin("importAssertions")?s.assertions=[]:s.attributes=[],s.declaration=null,!0}return!1}maybeParseExportDeclaration(a){return this.shouldParseExportDeclaration()?(a.specifiers=[],a.source=null,this.hasPlugin("importAssertions")?a.assertions=[]:a.attributes=[],a.declaration=this.parseExportDeclaration(a),!0):!1}isAsyncFunction(){if(!this.isContextual(95))return!1;const a=this.nextTokenInLineStart();return this.isUnparsedContextual(a,"function")}parseExportDefaultExpression(){const a=this.startNode();if(this.match(68))return this.next(),this.parseFunction(a,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(a,13);if(this.match(80))return this.parseClass(a,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(E.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.hasPlugin("explicitResourceManagement")&&(this.isUsing()||this.isAwaitUsing()))throw this.raise(E.UnsupportedDefaultExport,this.state.startLoc);const s=this.parseMaybeAssignAllowIn();return this.semicolon(),s}parseExportDeclaration(a){return this.match(80)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){const{type:a}=this.state;if(Y(a)){if(a===95&&!this.state.containsEsc||a===100)return!1;if((a===130||a===129)&&!this.state.containsEsc){const{type:h}=this.lookahead();if(Y(h)&&h!==98||h===5)return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;const s=this.nextTokenStart(),o=this.isUnparsedContextual(s,"from");if(this.input.charCodeAt(s)===44||Y(this.state.type)&&o)return!0;if(this.match(65)&&o){const h=this.input.charCodeAt(this.nextTokenStartSince(s+4));return h===34||h===39}return!1}parseExportFrom(a,s){this.eatContextual(98)?(a.source=this.parseImportSource(),this.checkExport(a),this.maybeParseImportAttributes(a),this.checkJSONModuleImport(a)):s&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){const{type:a}=this.state;if(a===26&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators")))return this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(E.DecoratorBeforeExport,this.state.startLoc),!0;if(this.hasPlugin("explicitResourceManagement")){if(this.isUsing())return this.raise(E.UsingDeclarationExport,this.state.startLoc),!0;if(this.isAwaitUsing())return this.raise(E.UsingDeclarationExport,this.state.startLoc),!0}return a===74||a===75||a===68||a===80||this.isLet()||this.isAsyncFunction()}checkExport(a,s,o,h){if(s){var S;if(o){if(this.checkDuplicateExports(a,"default"),this.hasPlugin("exportDefaultFrom")){var P;const C=a.declaration;C.type==="Identifier"&&C.name==="from"&&C.end-C.start===4&&!((P=C.extra)!=null&&P.parenthesized)&&this.raise(E.ExportDefaultFromAsIdentifier,C)}}else if((S=a.specifiers)!=null&&S.length)for(const C of a.specifiers){const{exported:R}=C,F=R.type==="Identifier"?R.name:R.value;if(this.checkDuplicateExports(C,F),!h&&C.local){const{local:$}=C;$.type!=="Identifier"?this.raise(E.ExportBindingIsString,C,{localName:$.value,exportName:F}):(this.checkReservedWord($.name,$.loc.start,!0,!1),this.scope.checkLocalExport($))}}else if(a.declaration){const C=a.declaration;if(C.type==="FunctionDeclaration"||C.type==="ClassDeclaration"){const{id:R}=C;if(!R)throw new Error("Assertion failure");this.checkDuplicateExports(a,R.name)}else if(C.type==="VariableDeclaration")for(const R of C.declarations)this.checkDeclaration(R.id)}}}checkDeclaration(a){if(a.type==="Identifier")this.checkDuplicateExports(a,a.name);else if(a.type==="ObjectPattern")for(const s of a.properties)this.checkDeclaration(s);else if(a.type==="ArrayPattern")for(const s of a.elements)s&&this.checkDeclaration(s);else a.type==="ObjectProperty"?this.checkDeclaration(a.value):a.type==="RestElement"?this.checkDeclaration(a.argument):a.type==="AssignmentPattern"&&this.checkDeclaration(a.left)}checkDuplicateExports(a,s){this.exportedIdentifiers.has(s)&&(s==="default"?this.raise(E.DuplicateDefaultExport,a):this.raise(E.DuplicateExport,a,{exportName:s})),this.exportedIdentifiers.add(s)}parseExportSpecifiers(a){const s=[];let o=!0;for(this.expect(5);!this.eat(8);){if(o)o=!1;else if(this.expect(12),this.eat(8))break;const h=this.isContextual(130),S=this.match(134),P=this.startNode();P.local=this.parseModuleExportName(),s.push(this.parseExportSpecifier(P,S,a,h))}return s}parseExportSpecifier(a,s,o,h){return this.eatContextual(93)?a.exported=this.parseModuleExportName():s?a.exported=this.cloneStringLiteral(a.local):a.exported||(a.exported=this.cloneIdentifier(a.local)),this.finishNode(a,"ExportSpecifier")}parseModuleExportName(){if(this.match(134)){const a=this.parseStringLiteral(this.state.value),s=Jv.exec(a.value);return s&&this.raise(E.ModuleExportNameHasLoneSurrogate,a,{surrogateCharCode:s[0].charCodeAt(0)}),a}return this.parseIdentifier(!0)}isJSONModuleImport(a){return a.assertions!=null?a.assertions.some(({key:s,value:o})=>o.value==="json"&&(s.type==="Identifier"?s.name==="type":s.value==="type")):!1}checkImportReflection(a){const{specifiers:s}=a,o=s.length===1?s[0].type:null;if(a.phase==="source")o!=="ImportDefaultSpecifier"&&this.raise(E.SourcePhaseImportRequiresDefault,s[0].loc.start);else if(a.phase==="defer")o!=="ImportNamespaceSpecifier"&&this.raise(E.DeferImportRequiresNamespace,s[0].loc.start);else if(a.module){var h;o!=="ImportDefaultSpecifier"&&this.raise(E.ImportReflectionNotBinding,s[0].loc.start),((h=a.assertions)==null?void 0:h.length)>0&&this.raise(E.ImportReflectionHasAssertion,s[0].loc.start)}}checkJSONModuleImport(a){if(this.isJSONModuleImport(a)&&a.type!=="ExportAllDeclaration"){const{specifiers:s}=a;if(s!=null){const o=s.find(h=>{let S;if(h.type==="ExportSpecifier"?S=h.local:h.type==="ImportSpecifier"&&(S=h.imported),S!==void 0)return S.type==="Identifier"?S.name!=="default":S.value!=="default"});o!==void 0&&this.raise(E.ImportJSONBindingNotDefault,o.loc.start)}}}isPotentialImportPhase(a){return a?!1:this.isContextual(105)||this.isContextual(97)||this.isContextual(127)}applyImportPhase(a,s,o,h){s||(o==="module"?(this.expectPlugin("importReflection",h),a.module=!0):this.hasPlugin("importReflection")&&(a.module=!1),o==="source"?(this.expectPlugin("sourcePhaseImports",h),a.phase="source"):o==="defer"?(this.expectPlugin("deferredImportEvaluation",h),a.phase="defer"):this.hasPlugin("sourcePhaseImports")&&(a.phase=null))}parseMaybeImportPhase(a,s){if(!this.isPotentialImportPhase(s))return this.applyImportPhase(a,s,null),null;const o=this.startNode(),h=this.parseIdentifierName(!0),{type:S}=this.state;return(ce(S)?S!==98||this.lookaheadCharCode()===102:S!==12)?(this.applyImportPhase(a,s,h,o.loc.start),null):(this.applyImportPhase(a,s,null),this.createIdentifier(o,h))}isPrecedingIdImportPhase(a){const{type:s}=this.state;return Y(s)?s!==98||this.lookaheadCharCode()===102:s!==12}parseImport(a){return this.match(134)?this.parseImportSourceAndAttributes(a):this.parseImportSpecifiersAndAfter(a,this.parseMaybeImportPhase(a,!1))}parseImportSpecifiersAndAfter(a,s){a.specifiers=[];const h=!this.maybeParseDefaultImportSpecifier(a,s)||this.eat(12),S=h&&this.maybeParseStarImportSpecifier(a);return h&&!S&&this.parseNamedImportSpecifiers(a),this.expectContextual(98),this.parseImportSourceAndAttributes(a)}parseImportSourceAndAttributes(a){var s;return(s=a.specifiers)!=null||(a.specifiers=[]),a.source=this.parseImportSource(),this.maybeParseImportAttributes(a),this.checkImportReflection(a),this.checkJSONModuleImport(a),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(a,"ImportDeclaration")}parseImportSource(){return this.match(134)||this.unexpected(),this.parseExprAtom()}parseImportSpecifierLocal(a,s,o){s.local=this.parseIdentifier(),a.specifiers.push(this.finishImportSpecifier(s,o))}finishImportSpecifier(a,s,o=8201){return this.checkLVal(a.local,{type:s},o),this.finishNode(a,s)}parseImportAttributes(){this.expect(5);const a=[],s=new Set;do{if(this.match(8))break;const o=this.startNode(),h=this.state.value;if(s.has(h)&&this.raise(E.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:h}),s.add(h),this.match(134)?o.key=this.parseStringLiteral(h):o.key=this.parseIdentifier(!0),this.expect(14),!this.match(134))throw this.raise(E.ModuleAttributeInvalidValue,this.state.startLoc);o.value=this.parseStringLiteral(this.state.value),a.push(this.finishNode(o,"ImportAttribute"))}while(this.eat(12));return this.expect(8),a}parseModuleAttributes(){const a=[],s=new Set;do{const o=this.startNode();if(o.key=this.parseIdentifier(!0),o.key.name!=="type"&&this.raise(E.ModuleAttributeDifferentFromType,o.key),s.has(o.key.name)&&this.raise(E.ModuleAttributesWithDuplicateKeys,o.key,{key:o.key.name}),s.add(o.key.name),this.expect(14),!this.match(134))throw this.raise(E.ModuleAttributeInvalidValue,this.state.startLoc);o.value=this.parseStringLiteral(this.state.value),a.push(this.finishNode(o,"ImportAttribute"))}while(this.eat(12));return a}maybeParseImportAttributes(a){let s;var o=!1;if(this.match(76)){if(this.hasPrecedingLineBreak()&&this.lookaheadCharCode()===40)return;this.next(),this.hasPlugin("moduleAttributes")?(s=this.parseModuleAttributes(),this.addExtra(a,"deprecatedWithLegacySyntax",!0)):s=this.parseImportAttributes(),o=!0}else this.isContextual(94)&&!this.hasPrecedingLineBreak()?(!this.hasPlugin("deprecatedImportAssert")&&!this.hasPlugin("importAssertions")&&this.raise(E.ImportAttributesUseAssert,this.state.startLoc),this.hasPlugin("importAssertions")||this.addExtra(a,"deprecatedAssertSyntax",!0),this.next(),s=this.parseImportAttributes()):s=[];!o&&this.hasPlugin("importAssertions")?a.assertions=s:a.attributes=s}maybeParseDefaultImportSpecifier(a,s){if(s){const o=this.startNodeAtNode(s);return o.local=s,a.specifiers.push(this.finishImportSpecifier(o,"ImportDefaultSpecifier")),!0}else if(ce(this.state.type))return this.parseImportSpecifierLocal(a,this.startNode(),"ImportDefaultSpecifier"),!0;return!1}maybeParseStarImportSpecifier(a){if(this.match(55)){const s=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(a,s,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(a){let s=!0;for(this.expect(5);!this.eat(8);){if(s)s=!1;else{if(this.eat(14))throw this.raise(E.DestructureNamedImport,this.state.startLoc);if(this.expect(12),this.eat(8))break}const o=this.startNode(),h=this.match(134),S=this.isContextual(130);o.imported=this.parseModuleExportName();const P=this.parseImportSpecifier(o,h,a.importKind==="type"||a.importKind==="typeof",S,void 0);a.specifiers.push(P)}}parseImportSpecifier(a,s,o,h,S){if(this.eatContextual(93))a.local=this.parseIdentifier();else{const{imported:P}=a;if(s)throw this.raise(E.ImportBindingIsString,a,{importName:P.value});this.checkReservedWord(P.name,a.loc.start,!0,!0),a.local||(a.local=this.cloneIdentifier(P))}return this.finishImportSpecifier(a,"ImportSpecifier",S)}isThisParam(a){return a.type==="Identifier"&&a.name==="this"}}class Lu extends Yv{constructor(a,s,o){a=A(a),super(a,s),this.options=a,this.initializeScopes(),this.plugins=o,this.filename=a.sourceFilename,this.startIndex=a.startIndex;let h=0;a.allowAwaitOutsideFunction&&(h|=1),a.allowReturnOutsideFunction&&(h|=2),a.allowImportExportEverywhere&&(h|=8),a.allowSuperOutsideMethod&&(h|=16),a.allowUndeclaredExports&&(h|=64),a.allowNewTargetOutsideFunction&&(h|=4),a.allowYieldOutsideFunction&&(h|=32),a.ranges&&(h|=128),a.tokens&&(h|=256),a.createImportExpressions&&(h|=512),a.createParenthesizedExpressions&&(h|=1024),a.errorRecovery&&(h|=2048),a.attachComment&&(h|=4096),a.annexB&&(h|=8192),this.optionFlags=h}getScopeHandler(){return ka}parse(){this.enterInitialScopes();const a=this.startNode(),s=this.startNode();return this.nextToken(),a.errors=null,this.parseTopLevel(a,s),a.errors=this.state.errors,a.comments.length=this.state.commentsLen,a}}function Qv(b,a){var s;if(((s=a)==null?void 0:s.sourceType)==="unambiguous"){a=Object.assign({},a);try{a.sourceType="module";const o=ws(a,b),h=o.parse();if(o.sawUnambiguousESM)return h;if(o.ambiguousScriptDifferentAst)try{return a.sourceType="script",ws(a,b).parse()}catch{}else h.program.sourceType="script";return h}catch(o){try{return a.sourceType="script",ws(a,b).parse()}catch{}throw o}}else return ws(a,b).parse()}function Zv(b,a){const s=ws(a,b);return s.options.strictMode&&(s.state.strict=!0),s.getExpression()}function eS(b){const a={};for(const s of Object.keys(b))a[s]=bt(b[s]);return a}const tS=eS(ue);function ws(b,a){let s=Lu;const o=new Map;if(b!=null&&b.plugins){for(const h of b.plugins){let S,P;typeof h=="string"?S=h:[S,P]=h,o.has(S)||o.set(S,P||{})}Wv(o),s=rS(o)}return new s(b,a,o)}const Mu=new Map;function rS(b){const a=[];for(const h of Gv)b.has(h)&&a.push(h);const s=a.join("|");let o=Mu.get(s);if(!o){o=Lu;for(const h of a)o=ku[h](o);Mu.set(s,o)}return o}return Gr.parse=Qv,Gr.parseExpression=Zv,Gr.tokTypes=tS,Gr}var It=rE();class sE{constructor(){this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.context={skip:()=>this.should_skip=!0,remove:()=>this.should_remove=!0,replace:e=>this.replacement=e}}replace(e,r,i,n){e&&(i!==null?e[r][i]=n:e[r]=n)}remove(e,r,i){e&&(i!==null?e[r].splice(i,1):delete e[r])}}class iE extends sE{constructor(e,r){super(),this.enter=e,this.leave=r}visit(e,r,i,n){if(e){if(this.enter){const l=this.should_skip,c=this.should_remove,p=this.replacement;this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.enter.call(this.context,e,r,i,n),this.replacement&&(e=this.replacement,this.replace(r,i,n,e)),this.should_remove&&this.remove(r,i,n);const u=this.should_skip,f=this.should_remove;if(this.should_skip=l,this.should_remove=c,this.replacement=p,u)return e;if(f)return null}for(const l in e){const c=e[l];if(typeof c=="object")if(Array.isArray(c))for(let p=0;p<c.length;p+=1)c[p]!==null&&typeof c[p].type=="string"&&(this.visit(c[p],e,l,p)||p--);else c!==null&&typeof c.type=="string"&&this.visit(c,e,l,null)}if(this.leave){const l=this.replacement,c=this.should_remove;this.replacement=null,this.should_remove=!1,this.leave.call(this.context,e,r,i,n),this.replacement&&(e=this.replacement,this.replace(r,i,n,e)),this.should_remove&&this.remove(r,i,n);const p=this.should_remove;if(this.replacement=l,this.should_remove=c,p)return null}}return e}}function zl(t,{enter:e,leave:r}){return new iE(e,r).visit(t,null)}function Qn(t,e,r=!1,i=[],n=Object.create(null)){const l=t.type==="Program"?t.body[0].type==="ExpressionStatement"&&t.body[0].expression:t;zl(t,{enter(c,p){if(p&&i.push(p),p&&p.type.startsWith("TS")&&!ta.includes(p.type))return this.skip();if(c.type==="Identifier"){const u=!!n[c.name],f=Wl(c,p,i);(r||f&&!u)&&e(c,p,i,f,u)}else if(c.type==="ObjectProperty"&&p?.type==="ObjectPattern")c.inPattern=!0;else if(lr(c))c.scopeIds?c.scopeIds.forEach(u=>sl(u,n)):Gl(c,u=>yi(c,u,n));else if(c.type==="BlockStatement")c.scopeIds?c.scopeIds.forEach(u=>sl(u,n)):Qd(c,u=>yi(c,u,n));else if(c.type==="CatchClause"&&c.param)for(const u of _t(c.param))yi(c,u,n);else Zd(c)&&em(c,!1,u=>yi(c,u,n))},leave(c,p){if(p&&i.pop(),c!==l&&c.scopeIds)for(const u of c.scopeIds)n[u]--,n[u]===0&&delete n[u]}})}function Wl(t,e,r){if(!e)return!0;if(t.name==="arguments")return!1;if(nE(t,e))return!0;switch(e.type){case"AssignmentExpression":case"AssignmentPattern":return!0;case"ObjectPattern":case"ArrayPattern":return Zn(e,r)}return!1}function Zn(t,e){if(t&&(t.type==="ObjectProperty"||t.type==="ArrayPattern")){let r=e.length;for(;r--;){const i=e[r];if(i.type==="AssignmentExpression")return!0;if(i.type!=="ObjectProperty"&&!i.type.endsWith("Pattern"))break}}return!1}function Yd(t){let e=t.length;for(;e--;){const r=t[e];if(r.type==="NewExpression")return!0;if(r.type!=="MemberExpression")break}return!1}function Gl(t,e){for(const r of t.params)for(const i of _t(r))e(i)}function Qd(t,e){for(const r of t.body)if(r.type==="VariableDeclaration"){if(r.declare)continue;for(const i of r.declarations)for(const n of _t(i.id))e(n)}else if(r.type==="FunctionDeclaration"||r.type==="ClassDeclaration"){if(r.declare||!r.id)continue;e(r.id)}else Zd(r)&&em(r,!0,e)}function Zd(t){return t.type==="ForOfStatement"||t.type==="ForInStatement"||t.type==="ForStatement"}function em(t,e,r){const i=t.type==="ForStatement"?t.init:t.left;if(i&&i.type==="VariableDeclaration"&&(i.kind==="var"?e:!e))for(const n of i.declarations)for(const l of _t(n.id))r(l)}function _t(t,e=[]){switch(t.type){case"Identifier":e.push(t);break;case"MemberExpression":let r=t;for(;r.type==="MemberExpression";)r=r.object;e.push(r);break;case"ObjectPattern":for(const i of t.properties)i.type==="RestElement"?_t(i.argument,e):_t(i.value,e);break;case"ArrayPattern":t.elements.forEach(i=>{i&&_t(i,e)});break;case"RestElement":_t(t.argument,e);break;case"AssignmentPattern":_t(t.left,e);break}return e}function sl(t,e){t in e?e[t]++:e[t]=1}function yi(t,e,r){const{name:i}=e;t.scopeIds&&t.scopeIds.has(i)||(sl(i,r),(t.scopeIds||(t.scopeIds=new Set)).add(i))}const lr=t=>/Function(?:Expression|Declaration)$|Method$/.test(t.type),ea=t=>t&&(t.type==="ObjectProperty"||t.type==="ObjectMethod")&&!t.computed,tm=(t,e)=>ea(e)&&e.key===t;function nE(t,e,r){switch(e.type){case"MemberExpression":case"OptionalMemberExpression":return e.property===t?!!e.computed:e.object===t;case"JSXMemberExpression":return e.object===t;case"VariableDeclarator":return e.init===t;case"ArrowFunctionExpression":return e.body===t;case"PrivateName":return!1;case"ClassMethod":case"ClassPrivateMethod":case"ObjectMethod":return e.key===t?!!e.computed:!1;case"ObjectProperty":return e.key===t?!!e.computed:!0;case"ClassProperty":return e.key===t?!!e.computed:!0;case"ClassPrivateProperty":return e.key!==t;case"ClassDeclaration":case"ClassExpression":return e.superClass===t;case"AssignmentExpression":return e.right===t;case"AssignmentPattern":return e.right===t;case"LabeledStatement":return!1;case"CatchClause":return!1;case"RestElement":return!1;case"BreakStatement":case"ContinueStatement":return!1;case"FunctionDeclaration":case"FunctionExpression":return!1;case"ExportNamespaceSpecifier":case"ExportDefaultSpecifier":return!1;case"ExportSpecifier":return e.local===t;case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ImportSpecifier":return!1;case"ImportAttribute":return!1;case"JSXAttribute":return!1;case"ObjectPattern":case"ArrayPattern":return!1;case"MetaProperty":return!1;case"ObjectTypeProperty":return e.key!==t;case"TSEnumMember":return e.id!==t;case"TSPropertySignature":return e.key===t?!!e.computed:!0}return!0}const ta=["TSAsExpression","TSTypeAssertion","TSNonNullExpression","TSInstantiationExpression","TSSatisfiesExpression"];function Et(t){return ta.includes(t.type)?Et(t.expression):t}const Ge=t=>t.type===4&&t.isStatic;function Hl(t){switch(t){case"Teleport":case"teleport":return _r;case"Suspense":case"suspense":return us;case"KeepAlive":case"keep-alive":return js;case"BaseTransition":case"base-transition":return Ml}}const aE=/^\d|[^\$\w\xA0-\uFFFF]/,Kt=t=>!aE.test(t),oE=/[A-Za-z_$\xA0-\uFFFF]/,lE=/[\.\?\w$\xA0-\uFFFF]/,cE=/\s+[.[]\s*|\s*[.[]\s+/g,ra=t=>t.type===4?t.content:t.loc.source,uE=t=>{const e=ra(t).trim().replace(cE,p=>p.trim());let r=0,i=[],n=0,l=0,c=null;for(let p=0;p<e.length;p++){const u=e.charAt(p);switch(r){case 0:if(u==="[")i.push(r),r=1,n++;else if(u==="(")i.push(r),r=2,l++;else if(!(p===0?oE:lE).test(u))return!1;break;case 1:u==="'"||u==='"'||u==="`"?(i.push(r),r=3,c=u):u==="["?n++:u==="]"&&(--n||(r=i.pop()));break;case 2:if(u==="'"||u==='"'||u==="`")i.push(r),r=3,c=u;else if(u==="(")l++;else if(u===")"){if(p===e.length-1)return!1;--l||(r=i.pop())}break;case 3:u===c&&(r=i.pop(),c=null);break}}return!n&&!l},rm=(t,e)=>{try{let r=t.ast||It.parseExpression(ra(t),{plugins:e.expressionPlugins?[...e.expressionPlugins,"typescript"]:["typescript"]});return r=Et(r),r.type==="MemberExpression"||r.type==="OptionalMemberExpression"||r.type==="Identifier"&&r.name!=="undefined"}catch{return!1}},Xl=rm,hE=/^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/,pE=t=>hE.test(ra(t)),sm=(t,e)=>{try{let r=t.ast||It.parseExpression(ra(t),{plugins:e.expressionPlugins?[...e.expressionPlugins,"typescript"]:["typescript"]});return r.type==="Program"&&(r=r.body[0],r.type==="ExpressionStatement"&&(r=r.expression)),r=Et(r),r.type==="FunctionExpression"||r.type==="ArrowFunctionExpression"}catch{return!1}},im=sm;function il(t,e,r=e.length){return Jl({offset:t.offset,line:t.line,column:t.column},e,r)}function Jl(t,e,r=e.length){let i=0,n=-1;for(let l=0;l<r;l++)e.charCodeAt(l)===10&&(i++,n=l);return t.offset+=r,t.line+=i,t.column=n===-1?t.column+r:r-n,t}function nl(t,e){if(!t)throw new Error(e||"unexpected compiler condition")}function Fe(t,e,r=!1){for(let i=0;i<t.props.length;i++){const n=t.props[i];if(n.type===7&&(r||n.exp)&&(Se(e)?n.name===e:e.test(n.name)))return n}}function ht(t,e,r=!1,i=!1){for(let n=0;n<t.props.length;n++){const l=t.props[n];if(l.type===6){if(r)continue;if(l.name===e&&(l.value||i))return l}else if(l.name==="bind"&&(l.exp||i)&&Dt(l.arg,e))return l}}function Dt(t,e){return!!(t&&Ge(t)&&t.content===e)}function sa(t){return t.props.some(e=>e.type===7&&e.name==="bind"&&(!e.arg||e.arg.type!==4||!e.arg.isStatic))}function Ls(t){return t.type===5||t.type===2}function Kl(t){return t.type===7&&t.name==="slot"}function os(t){return t.type===1&&t.tagType===3}function ls(t){return t.type===1&&t.tagType===2}const fE=new Set([is,ps]);function nm(t,e=[]){if(t&&!Se(t)&&t.type===14){const r=t.callee;if(!Se(r)&&fE.has(r))return nm(t.arguments[0],e.concat(t))}return[t,e]}function Gs(t,e,r){let i,n=t.type===13?t.props:t.arguments[2],l=[],c;if(n&&!Se(n)&&n.type===14){const p=nm(n);n=p[0],l=p[1],c=l[l.length-1]}if(n==null||Se(n))i=ct([e]);else if(n.type===14){const p=n.arguments[0];!Se(p)&&p.type===15?mh(e,p)||p.properties.unshift(e):n.callee===Gn?i=fe(r.helper(Or),[ct([e]),n]):n.arguments.unshift(ct([e])),!i&&(i=n)}else n.type===15?(mh(e,n)||n.properties.unshift(e),i=n):(i=fe(r.helper(Or),[ct([e]),n]),c&&c.callee===ps&&(c=l[l.length-2]));t.type===13?c?c.arguments[0]=i:t.props=i:c?c.arguments[0]=i:t.arguments[2]=i}function mh(t,e){let r=!1;if(t.key.type===4){const i=t.key.content;r=e.properties.some(n=>n.key.type===4&&n.key.content===i)}return r}function Hs(t,e){return`_${e}_${t.replace(/[^\w]/g,(r,i)=>r==="-"?"_":t.charCodeAt(i).toString())}`}function at(t,e){if(!t||Object.keys(e).length===0)return!1;switch(t.type){case 1:for(let r=0;r<t.props.length;r++){const i=t.props[r];if(i.type===7&&(at(i.arg,e)||at(i.exp,e)))return!0}return t.children.some(r=>at(r,e));case 11:return at(t.source,e)?!0:t.children.some(r=>at(r,e));case 9:return t.branches.some(r=>at(r,e));case 10:return at(t.condition,e)?!0:t.children.some(r=>at(r,e));case 4:return!t.isStatic&&Kt(t.content)&&!!e[t.content];case 8:return t.children.some(r=>fr(r)&&at(r,e));case 5:case 12:return at(t.content,e);case 2:case 3:case 20:return!1;default:return!1}}function am(t){return t.type===14&&t.callee===Xn?t.arguments[1].returns:t}const om=/([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/,lm={parseMode:"base",ns:0,delimiters:["{{","}}"],getNamespace:()=>0,isVoidTag:Os,isPreTag:Os,isIgnoreNewlineTag:Os,isCustomElement:Os,onError:jl,onWarn:Kd,comments:!0,prefixIdentifiers:!1};let Ie=lm,yn=null,Xt="",Qe=null,Pe=null,Tt="",Vt=-1,Sr=-1,Yl=0,ar=!1,al=null;const Re=[],Ne=new KS(Re,{onerr:rt,ontext(t,e){gi(Je(t,e),t,e)},ontextentity(t,e,r){gi(t,e,r)},oninterpolation(t,e){if(ar)return gi(Je(t,e),t,e);let r=t+Ne.delimiterOpen.length,i=e-Ne.delimiterClose.length;for(;gt(Xt.charCodeAt(r));)r++;for(;gt(Xt.charCodeAt(i-1));)i--;let n=Je(r,i);n.includes("&")&&(n=JS(n)),ol({type:5,content:en(n,!1,De(r,i)),loc:De(t,e)})},onopentagname(t,e){const r=Je(t,e);Qe={type:1,tag:r,ns:Ie.getNamespace(r,Re[0],Ie.ns),tagType:0,props:[],children:[],loc:De(t-1,e),codegenNode:void 0}},onopentagend(t){gh(t)},onclosetag(t,e){const r=Je(t,e);if(!Ie.isVoidTag(r)){let i=!1;for(let n=0;n<Re.length;n++)if(Re[n].tag.toLowerCase()===r.toLowerCase()){i=!0,n>0&&rt(24,Re[0].loc.start.offset);for(let c=0;c<=n;c++){const p=Re.shift();Zi(p,e,c<n)}break}i||rt(23,cm(t,60))}},onselfclosingtag(t){const e=Qe.tag;Qe.isSelfClosing=!0,gh(t),Re[0]&&Re[0].tag===e&&Zi(Re.shift(),t)},onattribname(t,e){Pe={type:6,name:Je(t,e),nameLoc:De(t,e),value:void 0,loc:De(t)}},ondirname(t,e){const r=Je(t,e),i=r==="."||r===":"?"bind":r==="@"?"on":r==="#"?"slot":r.slice(2);if(!ar&&i===""&&rt(26,t),ar||i==="")Pe={type:6,name:r,nameLoc:De(t,e),value:void 0,loc:De(t)};else if(Pe={type:7,name:i,rawName:r,exp:void 0,arg:void 0,modifiers:r==="."?[te("prop")]:[],loc:De(t)},i==="pre"){ar=Ne.inVPre=!0,al=Qe;const n=Qe.props;for(let l=0;l<n.length;l++)n[l].type===7&&(n[l]=xE(n[l]))}},ondirarg(t,e){if(t===e)return;const r=Je(t,e);if(ar)Pe.name+=r,br(Pe.nameLoc,e);else{const i=r[0]!=="[";Pe.arg=en(i?r:r.slice(1,-1),i,De(t,e),i?3:0)}},ondirmodifier(t,e){const r=Je(t,e);if(ar)Pe.name+="."+r,br(Pe.nameLoc,e);else if(Pe.name==="slot"){const i=Pe.arg;i&&(i.content+="."+r,br(i.loc,e))}else{const i=te(r,!0,De(t,e));Pe.modifiers.push(i)}},onattribdata(t,e){Tt+=Je(t,e),Vt<0&&(Vt=t),Sr=e},onattribentity(t,e,r){Tt+=t,Vt<0&&(Vt=e),Sr=r},onattribnameend(t){const e=Pe.loc.start.offset,r=Je(e,t);Pe.type===7&&(Pe.rawName=r),Qe.props.some(i=>(i.type===7?i.rawName:i.name)===r)&&rt(2,e)},onattribend(t,e){if(Qe&&Pe){if(br(Pe.loc,e),t!==0)if(Pe.type===6)Pe.name==="class"&&(Tt=hm(Tt).trim()),t===1&&!Tt&&rt(13,e),Pe.value={type:2,content:Tt,loc:t===1?De(Vt,Sr):De(Vt-1,Sr+1)},Ne.inSFCRoot&&Qe.tag==="template"&&Pe.name==="lang"&&Tt&&Tt!=="html"&&Ne.enterRCDATA(mn("</template"),0);else{let r=0;Pe.name==="for"?r=3:Pe.name==="slot"?r=1:Pe.name==="on"&&Tt.includes(";")&&(r=2),Pe.exp=en(Tt,!1,De(Vt,Sr),0,r),Pe.name==="for"&&(Pe.forParseResult=mE(Pe.exp))}(Pe.type!==7||Pe.name!=="pre")&&Qe.props.push(Pe)}Tt="",Vt=Sr=-1},oncomment(t,e){Ie.comments&&ol({type:3,content:Je(t,e),loc:De(t-4,e+3)})},onend(){const t=Xt.length;if(Ne.state!==1)switch(Ne.state){case 5:case 8:rt(5,t);break;case 3:case 4:rt(25,Ne.sectionStart);break;case 28:Ne.currentSequence===We.CdataEnd?rt(6,t):rt(7,t);break;case 6:case 7:case 9:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:case 21:rt(9,t);break}for(let e=0;e<Re.length;e++)Zi(Re[e],t-1),rt(24,Re[e].loc.start.offset)},oncdata(t,e){Re[0].ns!==0?gi(Je(t,e),t,e):rt(1,t-9)},onprocessinginstruction(t){(Re[0]?Re[0].ns:Ie.ns)===0&&rt(21,t-1)}}),yh=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,dE=/^\(|\)$/g;function mE(t){const e=t.loc,r=t.content,i=r.match(om);if(!i)return;const[,n,l]=i,c=(m,y,g=!1)=>{const w=e.start.offset+y,v=w+m.length;return en(m,!1,De(w,v),0,g?1:0)},p={source:c(l.trim(),r.indexOf(l,n.length)),value:void 0,key:void 0,index:void 0,finalized:!1};let u=n.trim().replace(dE,"").trim();const f=n.indexOf(u),d=u.match(yh);if(d){u=u.replace(yh,"").trim();const m=d[1].trim();let y;if(m&&(y=r.indexOf(m,f+u.length),p.key=c(m,y,!0)),d[2]){const g=d[2].trim();g&&(p.index=c(g,r.indexOf(g,p.key?y+m.length:f+u.length),!0))}}return u&&(p.value=c(u,f,!0)),p}function Je(t,e){return Xt.slice(t,e)}function gh(t){Ne.inSFCRoot&&(Qe.innerLoc=De(t+1,t+1)),ol(Qe);const{tag:e,ns:r}=Qe;r===0&&Ie.isPreTag(e)&&Yl++,Ie.isVoidTag(e)?Zi(Qe,t):(Re.unshift(Qe),(r===1||r===2)&&(Ne.inXML=!0)),Qe=null}function gi(t,e,r){const i=Re[0]||yn,n=i.children[i.children.length-1];n&&n.type===2?(n.content+=t,br(n.loc,r)):i.children.push({type:2,content:t,loc:De(e,r)})}function Zi(t,e,r=!1){r?br(t.loc,cm(e,60)):br(t.loc,yE(e,62)+1),Ne.inSFCRoot&&(t.children.length?t.innerLoc.end=Bt({},t.children[t.children.length-1].loc.end):t.innerLoc.end=Bt({},t.innerLoc.start),t.innerLoc.source=Je(t.innerLoc.start.offset,t.innerLoc.end.offset));const{tag:i,ns:n,children:l}=t;if(ar||(i==="slot"?t.tagType=2:vE(t)?t.tagType=3:SE(t)&&(t.tagType=1)),Ne.inRCDATA||(t.children=um(l)),n===0&&Ie.isIgnoreNewlineTag(i)){const c=l[0];c&&c.type===2&&(c.content=c.content.replace(/^\r?\n/,""))}n===0&&Ie.isPreTag(i)&&Yl--,al===t&&(ar=Ne.inVPre=!1,al=null),Ne.inXML&&(Re[0]?Re[0].ns:Ie.ns)===0&&(Ne.inXML=!1)}function yE(t,e){let r=t;for(;Xt.charCodeAt(r)!==e&&r<Xt.length-1;)r++;return r}function cm(t,e){let r=t;for(;Xt.charCodeAt(r)!==e&&r>=0;)r--;return r}const gE=new Set(["if","else","else-if","for","slot"]);function vE({tag:t,props:e}){if(t==="template"){for(let r=0;r<e.length;r++)if(e[r].type===7&&gE.has(e[r].name))return!0}return!1}function SE({tag:t,props:e}){if(Ie.isCustomElement(t))return!1;if(t==="component"||EE(t.charCodeAt(0))||Hl(t)||Ie.isBuiltInComponent&&Ie.isBuiltInComponent(t)||Ie.isNativeTag&&!Ie.isNativeTag(t))return!0;for(let r=0;r<e.length;r++){const i=e[r];if(i.type===6&&i.name==="is"&&i.value&&i.value.content.startsWith("vue:"))return!0}return!1}function EE(t){return t>64&&t<91}const TE=/\r\n/g;function um(t){const e=Ie.whitespace!=="preserve";let r=!1;for(let i=0;i<t.length;i++){const n=t[i];if(n.type===2)if(Yl)n.content=n.content.replace(TE,`
|
|
16
16
|
`);else if(wE(n.content)){const l=t[i-1]&&t[i-1].type,c=t[i+1]&&t[i+1].type;!l||!c||e&&(l===3&&(c===3||c===1)||l===1&&(c===3||c===1&&bE(n.content)))?(r=!0,t[i]=null):n.content=" "}else e&&(n.content=hm(n.content))}return r?t.filter(Boolean):t}function wE(t){for(let e=0;e<t.length;e++)if(!gt(t.charCodeAt(e)))return!1;return!0}function bE(t){for(let e=0;e<t.length;e++){const r=t.charCodeAt(e);if(r===10||r===13)return!0}return!1}function hm(t){let e="",r=!1;for(let i=0;i<t.length;i++)gt(t.charCodeAt(i))?r||(e+=" ",r=!0):(e+=t[i],r=!1);return e}function ol(t){(Re[0]||yn).children.push(t)}function De(t,e){return{start:Ne.getPos(t),end:e==null?e:Ne.getPos(e),source:e==null?e:Je(t,e)}}function PE(t){return De(t.start.offset,t.end.offset)}function br(t,e){t.end=Ne.getPos(e),t.source=Je(t.start.offset,e)}function xE(t){const e={type:6,name:t.rawName,nameLoc:De(t.loc.start.offset,t.loc.start.offset+t.rawName.length),value:void 0,loc:t.loc};if(t.exp){const r=t.exp.loc;r.end.offset<t.loc.end.offset&&(r.start.offset--,r.start.column--,r.end.offset++,r.end.column++),e.value={type:2,content:t.exp.content,loc:r}}return e}function en(t,e=!1,r,i=0,n=0){const l=te(t,e,r,i);if(!e&&Ie.prefixIdentifiers&&n!==3&&t.trim()){if(Kt(t))return l.ast=null,l;try{const c=Ie.expressionPlugins,p={plugins:c?[...c,"typescript"]:["typescript"]};n===2?l.ast=It.parse(` ${t} `,p).program:n===1?l.ast=It.parseExpression(`(${t})=>{}`,p):l.ast=It.parseExpression(`(${t})`,p)}catch(c){l.ast=!1,rt(45,r.start.offset,c.message)}}return l}function rt(t,e,r){Ie.onError(we(t,De(e,e),void 0,r))}function _E(){Ne.reset(),Qe=null,Pe=null,Tt="",Vt=-1,Sr=-1,Re.length=0}function ia(t,e){if(_E(),Xt=t,Ie=Bt({},lm),e){let n;for(n in e)e[n]!=null&&(Ie[n]=e[n])}Ie.decodeEntities&&console.warn("[@vue/compiler-core] decodeEntities option is passed but will be ignored in non-browser builds."),Ne.mode=Ie.parseMode==="html"?1:Ie.parseMode==="sfc"?2:0,Ne.inXML=Ie.ns===1||Ie.ns===2;const r=e&&e.delimiters;r&&(Ne.delimiterOpen=mn(r[0]),Ne.delimiterClose=mn(r[1]));const i=yn=Rr([],t);return Ne.parse(Xt),i.loc=De(0,t.length),i.children=um(i.children),yn=null,i}function AE(t,e){tn(t,void 0,e,!!pm(t))}function pm(t){const e=t.children.filter(r=>r.type!==3);return e.length===1&&e[0].type===1&&!ls(e[0])?e[0]:null}function tn(t,e,r,i=!1,n=!1){const{children:l}=t,c=[];for(let m=0;m<l.length;m++){const y=l[m];if(y.type===1&&y.tagType===0){const g=i?0:ut(y,r);if(g>0){if(g>=2){y.codegenNode.patchFlag=-1,c.push(y);continue}}else{const w=y.codegenNode;if(w.type===13){const v=w.patchFlag;if((v===void 0||v===512||v===1)&&dm(y,r)>=2){const T=mm(y);T&&(w.props=r.hoist(T))}w.dynamicProps&&(w.dynamicProps=r.hoist(w.dynamicProps))}}}else if(y.type===12&&(i?0:ut(y,r))>=2){c.push(y);continue}if(y.type===1){const g=y.tagType===1;g&&r.scopes.vSlot++,tn(y,t,r,!1,n),g&&r.scopes.vSlot--}else if(y.type===11)tn(y,t,r,y.children.length===1,!0);else if(y.type===9)for(let g=0;g<y.branches.length;g++)tn(y.branches[g],t,r,y.branches[g].children.length===1,n)}let p=!1;const u=[];if(c.length===l.length&&t.type===1){if(t.tagType===0&&t.codegenNode&&t.codegenNode.type===13&&$e(t.codegenNode.children))t.codegenNode.children=f(Ht(t.codegenNode.children)),p=!0;else if(t.tagType===1&&t.codegenNode&&t.codegenNode.type===13&&t.codegenNode.children&&!$e(t.codegenNode.children)&&t.codegenNode.children.type===15){const m=d(t.codegenNode,"default");m&&(u.push(r.cached.length),m.returns=f(Ht(m.returns)),p=!0)}else if(t.tagType===3&&e&&e.type===1&&e.tagType===1&&e.codegenNode&&e.codegenNode.type===13&&e.codegenNode.children&&!$e(e.codegenNode.children)&&e.codegenNode.children.type===15){const m=Fe(t,"slot",!0),y=m&&m.arg&&d(e.codegenNode,m.arg);y&&(u.push(r.cached.length),y.returns=f(Ht(y.returns)),p=!0)}}if(!p)for(const m of c)u.push(r.cached.length),m.codegenNode=r.cache(m.codegenNode);u.length&&t.type===1&&t.tagType===1&&t.codegenNode&&t.codegenNode.type===13&&t.codegenNode.children&&!$e(t.codegenNode.children)&&t.codegenNode.children.type===15&&t.codegenNode.children.properties.push(xe("__",te(JSON.stringify(u),!1)));function f(m){const y=r.cache(m);return n&&r.hmr&&(y.needArraySpread=!0),y}function d(m,y){if(m.children&&!$e(m.children)&&m.children.type===15){const g=m.children.properties.find(w=>w.key===y||w.key.content===y);return g&&g.value}}c.length&&r.transformHoist&&r.transformHoist(l,r,t)}function ut(t,e){const{constantCache:r}=e;switch(t.type){case 1:if(t.tagType!==0)return 0;const i=r.get(t);if(i!==void 0)return i;const n=t.codegenNode;if(n.type!==13||n.isBlock&&t.tag!=="svg"&&t.tag!=="foreignObject"&&t.tag!=="math")return 0;if(n.patchFlag===void 0){let c=3;const p=dm(t,e);if(p===0)return r.set(t,0),0;p<c&&(c=p);for(let u=0;u<t.children.length;u++){const f=ut(t.children[u],e);if(f===0)return r.set(t,0),0;f<c&&(c=f)}if(c>1)for(let u=0;u<t.props.length;u++){const f=t.props[u];if(f.type===7&&f.name==="bind"&&f.exp){const d=ut(f.exp,e);if(d===0)return r.set(t,0),0;d<c&&(c=d)}}if(n.isBlock){for(let u=0;u<t.props.length;u++)if(t.props[u].type===7)return r.set(t,0),0;e.removeHelper(ur),e.removeHelper(Lr(e.inSSR,n.isComponent)),n.isBlock=!1,e.helper(kr(e.inSSR,n.isComponent))}return r.set(t,c),c}else return r.set(t,0),0;case 2:case 3:return 3;case 9:case 11:case 10:return 0;case 5:case 12:return ut(t.content,e);case 4:return t.constType;case 8:let l=3;for(let c=0;c<t.children.length;c++){const p=t.children[c];if(Se(p)||pr(p))continue;const u=ut(p,e);if(u===0)return 0;u<l&&(l=u)}return l;case 20:return 2;default:return 0}}const CE=new Set([zn,Wn,is,ps]);function fm(t,e){if(t.type===14&&!Se(t.callee)&&CE.has(t.callee)){const r=t.arguments[0];if(r.type===4)return ut(r,e);if(r.type===14)return fm(r,e)}return 0}function dm(t,e){let r=3;const i=mm(t);if(i&&i.type===15){const{properties:n}=i;for(let l=0;l<n.length;l++){const{key:c,value:p}=n[l],u=ut(c,e);if(u===0)return u;u<r&&(r=u);let f;if(p.type===4?f=ut(p,e):p.type===14?f=fm(p,e):f=0,f===0)return f;f<r&&(r=f)}}return r}function mm(t){const e=t.codegenNode;if(e.type===13)return e.props}function ii(t,{filename:e="",prefixIdentifiers:r=!1,hoistStatic:i=!1,hmr:n=!1,cacheHandlers:l=!1,nodeTransforms:c=[],directiveTransforms:p={},transformHoist:u=null,isBuiltInComponent:f=Ua,isCustomElement:d=Ua,expressionPlugins:m=[],scopeId:y=null,slotted:g=!0,ssr:w=!1,inSSR:v=!1,ssrCssVars:T="",bindingMetadata:E=sS,inline:x=!1,isTS:A=!1,onError:N=jl,onWarn:_=Kd,compatConfig:M}){const D=e.replace(/\?.*$/,"").match(/([^/\\]+)\.\w+$/),O={filename:e,selfName:D&&cr(lt(D[1])),prefixIdentifiers:r,hoistStatic:i,hmr:n,cacheHandlers:l,nodeTransforms:c,directiveTransforms:p,transformHoist:u,isBuiltInComponent:f,isCustomElement:d,expressionPlugins:m,scopeId:y,slotted:g,ssr:w,inSSR:v,ssrCssVars:T,bindingMetadata:E,inline:x,isTS:A,onError:N,onWarn:_,compatConfig:M,root:t,helpers:new Map,components:new Set,directives:new Set,hoists:[],imports:[],cached:[],constantCache:new WeakMap,temps:0,identifiers:Object.create(null),scopes:{vFor:0,vSlot:0,vPre:0,vOnce:0},parent:null,grandParent:null,currentNode:t,childIndex:0,inVOnce:!1,helper(L){const V=O.helpers.get(L)||0;return O.helpers.set(L,V+1),L},removeHelper(L){const V=O.helpers.get(L);if(V){const K=V-1;K?O.helpers.set(L,K):O.helpers.delete(L)}},helperString(L){return`_${ot[O.helper(L)]}`},replaceNode(L){{if(!O.currentNode)throw new Error("Node being replaced is already removed.");if(!O.parent)throw new Error("Cannot replace root node.")}O.parent.children[O.childIndex]=O.currentNode=L},removeNode(L){if(!O.parent)throw new Error("Cannot remove root node.");const V=O.parent.children,K=L?V.indexOf(L):O.currentNode?O.childIndex:-1;if(K<0)throw new Error("node being removed is not a child of current parent");!L||L===O.currentNode?(O.currentNode=null,O.onNodeRemoved()):O.childIndex>K&&(O.childIndex--,O.onNodeRemoved()),O.parent.children.splice(K,1)},onNodeRemoved:Ua,addIdentifiers(L){Se(L)?I(L):L.identifiers?L.identifiers.forEach(I):L.type===4&&I(L.content)},removeIdentifiers(L){Se(L)?k(L):L.identifiers?L.identifiers.forEach(k):L.type===4&&k(L.content)},hoist(L){Se(L)&&(L=te(L)),O.hoists.push(L);const V=te(`_hoisted_${O.hoists.length}`,!1,L.loc,2);return V.hoisted=L,V},cache(L,V=!1,K=!1){const re=Vd(O.cached.length,L,V,K);return O.cached.push(re),re}};function I(L){const{identifiers:V}=O;V[L]===void 0&&(V[L]=0),V[L]++}function k(L){O.identifiers[L]--}return O}function Ql(t,e){const r=ii(t,e);fs(t,r),e.hoistStatic&&AE(t,r),e.ssr||IE(t,r),t.helpers=new Set([...r.helpers.keys()]),t.components=[...r.components],t.directives=[...r.directives],t.imports=r.imports,t.hoists=r.hoists,t.temps=r.temps,t.cached=r.cached,t.transformed=!0}function IE(t,e){const{helper:r}=e,{children:i}=t;if(i.length===1){const n=pm(t);if(n&&n.codegenNode){const l=n.codegenNode;l.type===13&&Jn(l,e),t.codegenNode=l}else t.codegenNode=i[0]}else if(i.length>1){let n=64;i.filter(l=>l.type!==3).length===1&&(n|=2048),t.codegenNode=as(e,r(ss),void 0,t.children,n,void 0,void 0,!0,void 0,!1)}}function NE(t,e){let r=0;const i=()=>{r--};for(;r<t.children.length;r++){const n=t.children[r];Se(n)||(e.grandParent=e.parent,e.parent=t,e.childIndex=r,e.onNodeRemoved=i,fs(n,e))}}function fs(t,e){e.currentNode=t;const{nodeTransforms:r}=e,i=[];for(let l=0;l<r.length;l++){const c=r[l](t,e);if(c&&($e(c)?i.push(...c):i.push(c)),e.currentNode)t=e.currentNode;else return}switch(t.type){case 3:e.ssr||e.helper(hs);break;case 5:e.ssr||e.helper(ri);break;case 9:for(let l=0;l<t.branches.length;l++)fs(t.branches[l],e);break;case 10:case 11:case 1:case 0:NE(t,e);break}e.currentNode=t;let n=i.length;for(;n--;)i[n]()}function ni(t,e){const r=Se(t)?i=>i===t:i=>t.test(i);return(i,n)=>{if(i.type===1){const{props:l}=i;if(i.tagType===3&&l.some(Kl))return;const c=[];for(let p=0;p<l.length;p++){const u=l[p];if(u.type===7&&r(u.name)){l.splice(p,1),p--;const f=e(i,u,n);f&&c.push(f)}}return c}}}var bs={},za={},vi={},Si={},vh;function OE(){if(vh)return Si;vh=1;var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");return Si.encode=function(e){if(0<=e&&e<t.length)return t[e];throw new TypeError("Must be between 0 and 63: "+e)},Si.decode=function(e){var r=65,i=90,n=97,l=122,c=48,p=57,u=43,f=47,d=26,m=52;return r<=e&&e<=i?e-r:n<=e&&e<=l?e-n+d:c<=e&&e<=p?e-c+m:e==u?62:e==f?63:-1},Si}var Sh;function ym(){if(Sh)return vi;Sh=1;var t=OE(),e=5,r=1<<e,i=r-1,n=r;function l(p){return p<0?(-p<<1)+1:(p<<1)+0}function c(p){var u=(p&1)===1,f=p>>1;return u?-f:f}return vi.encode=function(u){var f="",d,m=l(u);do d=m&i,m>>>=e,m>0&&(d|=n),f+=t.encode(d);while(m>0);return f},vi.decode=function(u,f,d){var m=u.length,y=0,g=0,w,v;do{if(f>=m)throw new Error("Expected more digits in base 64 VLQ value.");if(v=t.decode(u.charCodeAt(f++)),v===-1)throw new Error("Invalid base64 digit: "+u.charAt(f-1));w=!!(v&n),v&=i,y=y+(v<<g),g+=e}while(w);d.value=c(y),d.rest=f},vi}var Wa={},Eh;function ai(){return Eh||(Eh=1,function(t){function e(O,I,k){if(I in O)return O[I];if(arguments.length===3)return k;throw new Error('"'+I+'" is a required argument.')}t.getArg=e;var r=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,i=/^data:.+\,.+$/;function n(O){var I=O.match(r);return I?{scheme:I[1],auth:I[2],host:I[3],port:I[4],path:I[5]}:null}t.urlParse=n;function l(O){var I="";return O.scheme&&(I+=O.scheme+":"),I+="//",O.auth&&(I+=O.auth+"@"),O.host&&(I+=O.host),O.port&&(I+=":"+O.port),O.path&&(I+=O.path),I}t.urlGenerate=l;var c=32;function p(O){var I=[];return function(k){for(var L=0;L<I.length;L++)if(I[L].input===k){var V=I[0];return I[0]=I[L],I[L]=V,I[0].result}var K=O(k);return I.unshift({input:k,result:K}),I.length>c&&I.pop(),K}}var u=p(function(I){var k=I,L=n(I);if(L){if(!L.path)return I;k=L.path}for(var V=t.isAbsolute(k),K=[],re=0,z=0;;)if(re=z,z=k.indexOf("/",re),z===-1){K.push(k.slice(re));break}else for(K.push(k.slice(re,z));z<k.length&&k[z]==="/";)z++;for(var se,he=0,z=K.length-1;z>=0;z--)se=K[z],se==="."?K.splice(z,1):se===".."?he++:he>0&&(se===""?(K.splice(z+1,he),he=0):(K.splice(z,2),he--));return k=K.join("/"),k===""&&(k=V?"/":"."),L?(L.path=k,l(L)):k});t.normalize=u;function f(O,I){O===""&&(O="."),I===""&&(I=".");var k=n(I),L=n(O);if(L&&(O=L.path||"/"),k&&!k.scheme)return L&&(k.scheme=L.scheme),l(k);if(k||I.match(i))return I;if(L&&!L.host&&!L.path)return L.host=I,l(L);var V=I.charAt(0)==="/"?I:u(O.replace(/\/+$/,"")+"/"+I);return L?(L.path=V,l(L)):V}t.join=f,t.isAbsolute=function(O){return O.charAt(0)==="/"||r.test(O)};function d(O,I){O===""&&(O="."),O=O.replace(/\/$/,"");for(var k=0;I.indexOf(O+"/")!==0;){var L=O.lastIndexOf("/");if(L<0||(O=O.slice(0,L),O.match(/^([^\/]+:\/)?\/*$/)))return I;++k}return Array(k+1).join("../")+I.substr(O.length+1)}t.relative=d;var m=function(){var O=Object.create(null);return!("__proto__"in O)}();function y(O){return O}function g(O){return v(O)?"$"+O:O}t.toSetString=m?y:g;function w(O){return v(O)?O.slice(1):O}t.fromSetString=m?y:w;function v(O){if(!O)return!1;var I=O.length;if(I<9||O.charCodeAt(I-1)!==95||O.charCodeAt(I-2)!==95||O.charCodeAt(I-3)!==111||O.charCodeAt(I-4)!==116||O.charCodeAt(I-5)!==111||O.charCodeAt(I-6)!==114||O.charCodeAt(I-7)!==112||O.charCodeAt(I-8)!==95||O.charCodeAt(I-9)!==95)return!1;for(var k=I-10;k>=0;k--)if(O.charCodeAt(k)!==36)return!1;return!0}function T(O,I,k){var L=N(O.source,I.source);return L!==0||(L=O.originalLine-I.originalLine,L!==0)||(L=O.originalColumn-I.originalColumn,L!==0||k)||(L=O.generatedColumn-I.generatedColumn,L!==0)||(L=O.generatedLine-I.generatedLine,L!==0)?L:N(O.name,I.name)}t.compareByOriginalPositions=T;function E(O,I,k){var L;return L=O.originalLine-I.originalLine,L!==0||(L=O.originalColumn-I.originalColumn,L!==0||k)||(L=O.generatedColumn-I.generatedColumn,L!==0)||(L=O.generatedLine-I.generatedLine,L!==0)?L:N(O.name,I.name)}t.compareByOriginalPositionsNoSource=E;function x(O,I,k){var L=O.generatedLine-I.generatedLine;return L!==0||(L=O.generatedColumn-I.generatedColumn,L!==0||k)||(L=N(O.source,I.source),L!==0)||(L=O.originalLine-I.originalLine,L!==0)||(L=O.originalColumn-I.originalColumn,L!==0)?L:N(O.name,I.name)}t.compareByGeneratedPositionsDeflated=x;function A(O,I,k){var L=O.generatedColumn-I.generatedColumn;return L!==0||k||(L=N(O.source,I.source),L!==0)||(L=O.originalLine-I.originalLine,L!==0)||(L=O.originalColumn-I.originalColumn,L!==0)?L:N(O.name,I.name)}t.compareByGeneratedPositionsDeflatedNoLine=A;function N(O,I){return O===I?0:O===null?1:I===null?-1:O>I?1:-1}function _(O,I){var k=O.generatedLine-I.generatedLine;return k!==0||(k=O.generatedColumn-I.generatedColumn,k!==0)||(k=N(O.source,I.source),k!==0)||(k=O.originalLine-I.originalLine,k!==0)||(k=O.originalColumn-I.originalColumn,k!==0)?k:N(O.name,I.name)}t.compareByGeneratedPositionsInflated=_;function M(O){return JSON.parse(O.replace(/^\)]}'[^\n]*\n/,""))}t.parseSourceMapInput=M;function D(O,I,k){if(I=I||"",O&&(O[O.length-1]!=="/"&&I[0]!=="/"&&(O+="/"),I=O+I),k){var L=n(k);if(!L)throw new Error("sourceMapURL could not be parsed");if(L.path){var V=L.path.lastIndexOf("/");V>=0&&(L.path=L.path.substring(0,V+1))}I=f(l(L),I)}return u(I)}t.computeSourceURL=D}(Wa)),Wa}var Ga={},Th;function gm(){if(Th)return Ga;Th=1;var t=ai(),e=Object.prototype.hasOwnProperty,r=typeof Map<"u";function i(){this._array=[],this._set=r?new Map:Object.create(null)}return i.fromArray=function(l,c){for(var p=new i,u=0,f=l.length;u<f;u++)p.add(l[u],c);return p},i.prototype.size=function(){return r?this._set.size:Object.getOwnPropertyNames(this._set).length},i.prototype.add=function(l,c){var p=r?l:t.toSetString(l),u=r?this.has(l):e.call(this._set,p),f=this._array.length;(!u||c)&&this._array.push(l),u||(r?this._set.set(l,f):this._set[p]=f)},i.prototype.has=function(l){if(r)return this._set.has(l);var c=t.toSetString(l);return e.call(this._set,c)},i.prototype.indexOf=function(l){if(r){var c=this._set.get(l);if(c>=0)return c}else{var p=t.toSetString(l);if(e.call(this._set,p))return this._set[p]}throw new Error('"'+l+'" is not in the set.')},i.prototype.at=function(l){if(l>=0&&l<this._array.length)return this._array[l];throw new Error("No element indexed by "+l)},i.prototype.toArray=function(){return this._array.slice()},Ga.ArraySet=i,Ga}var Ha={},wh;function kE(){if(wh)return Ha;wh=1;var t=ai();function e(i,n){var l=i.generatedLine,c=n.generatedLine,p=i.generatedColumn,u=n.generatedColumn;return c>l||c==l&&u>=p||t.compareByGeneratedPositionsInflated(i,n)<=0}function r(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}return r.prototype.unsortedForEach=function(n,l){this._array.forEach(n,l)},r.prototype.add=function(n){e(this._last,n)?(this._last=n,this._array.push(n)):(this._sorted=!1,this._array.push(n))},r.prototype.toArray=function(){return this._sorted||(this._array.sort(t.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},Ha.MappingList=r,Ha}var bh;function vm(){if(bh)return za;bh=1;var t=ym(),e=ai(),r=gm().ArraySet,i=kE().MappingList;function n(l){l||(l={}),this._file=e.getArg(l,"file",null),this._sourceRoot=e.getArg(l,"sourceRoot",null),this._skipValidation=e.getArg(l,"skipValidation",!1),this._ignoreInvalidMapping=e.getArg(l,"ignoreInvalidMapping",!1),this._sources=new r,this._names=new r,this._mappings=new i,this._sourcesContents=null}return n.prototype._version=3,n.fromSourceMap=function(c,p){var u=c.sourceRoot,f=new n(Object.assign(p||{},{file:c.file,sourceRoot:u}));return c.eachMapping(function(d){var m={generated:{line:d.generatedLine,column:d.generatedColumn}};d.source!=null&&(m.source=d.source,u!=null&&(m.source=e.relative(u,m.source)),m.original={line:d.originalLine,column:d.originalColumn},d.name!=null&&(m.name=d.name)),f.addMapping(m)}),c.sources.forEach(function(d){var m=d;u!==null&&(m=e.relative(u,d)),f._sources.has(m)||f._sources.add(m);var y=c.sourceContentFor(d);y!=null&&f.setSourceContent(d,y)}),f},n.prototype.addMapping=function(c){var p=e.getArg(c,"generated"),u=e.getArg(c,"original",null),f=e.getArg(c,"source",null),d=e.getArg(c,"name",null);!this._skipValidation&&this._validateMapping(p,u,f,d)===!1||(f!=null&&(f=String(f),this._sources.has(f)||this._sources.add(f)),d!=null&&(d=String(d),this._names.has(d)||this._names.add(d)),this._mappings.add({generatedLine:p.line,generatedColumn:p.column,originalLine:u!=null&&u.line,originalColumn:u!=null&&u.column,source:f,name:d}))},n.prototype.setSourceContent=function(c,p){var u=c;this._sourceRoot!=null&&(u=e.relative(this._sourceRoot,u)),p!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[e.toSetString(u)]=p):this._sourcesContents&&(delete this._sourcesContents[e.toSetString(u)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))},n.prototype.applySourceMap=function(c,p,u){var f=p;if(p==null){if(c.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);f=c.file}var d=this._sourceRoot;d!=null&&(f=e.relative(d,f));var m=new r,y=new r;this._mappings.unsortedForEach(function(g){if(g.source===f&&g.originalLine!=null){var w=c.originalPositionFor({line:g.originalLine,column:g.originalColumn});w.source!=null&&(g.source=w.source,u!=null&&(g.source=e.join(u,g.source)),d!=null&&(g.source=e.relative(d,g.source)),g.originalLine=w.line,g.originalColumn=w.column,w.name!=null&&(g.name=w.name))}var v=g.source;v!=null&&!m.has(v)&&m.add(v);var T=g.name;T!=null&&!y.has(T)&&y.add(T)},this),this._sources=m,this._names=y,c.sources.forEach(function(g){var w=c.sourceContentFor(g);w!=null&&(u!=null&&(g=e.join(u,g)),d!=null&&(g=e.relative(d,g)),this.setSourceContent(g,w))},this)},n.prototype._validateMapping=function(c,p,u,f){if(p&&typeof p.line!="number"&&typeof p.column!="number"){var d="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(d),!1;throw new Error(d)}if(!(c&&"line"in c&&"column"in c&&c.line>0&&c.column>=0&&!p&&!u&&!f)){if(c&&"line"in c&&"column"in c&&p&&"line"in p&&"column"in p&&c.line>0&&c.column>=0&&p.line>0&&p.column>=0&&u)return;var d="Invalid mapping: "+JSON.stringify({generated:c,source:u,original:p,name:f});if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(d),!1;throw new Error(d)}},n.prototype._serializeMappings=function(){for(var c=0,p=1,u=0,f=0,d=0,m=0,y="",g,w,v,T,E=this._mappings.toArray(),x=0,A=E.length;x<A;x++){if(w=E[x],g="",w.generatedLine!==p)for(c=0;w.generatedLine!==p;)g+=";",p++;else if(x>0){if(!e.compareByGeneratedPositionsInflated(w,E[x-1]))continue;g+=","}g+=t.encode(w.generatedColumn-c),c=w.generatedColumn,w.source!=null&&(T=this._sources.indexOf(w.source),g+=t.encode(T-m),m=T,g+=t.encode(w.originalLine-1-f),f=w.originalLine-1,g+=t.encode(w.originalColumn-u),u=w.originalColumn,w.name!=null&&(v=this._names.indexOf(w.name),g+=t.encode(v-d),d=v)),y+=g}return y},n.prototype._generateSourcesContent=function(c,p){return c.map(function(u){if(!this._sourcesContents)return null;p!=null&&(u=e.relative(p,u));var f=e.toSetString(u);return Object.prototype.hasOwnProperty.call(this._sourcesContents,f)?this._sourcesContents[f]:null},this)},n.prototype.toJSON=function(){var c={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(c.file=this._file),this._sourceRoot!=null&&(c.sourceRoot=this._sourceRoot),this._sourcesContents&&(c.sourcesContent=this._generateSourcesContent(c.sources,c.sourceRoot)),c},n.prototype.toString=function(){return JSON.stringify(this.toJSON())},za.SourceMapGenerator=n,za}var Ps={},Xa={},Ph;function LE(){return Ph||(Ph=1,function(t){t.GREATEST_LOWER_BOUND=1,t.LEAST_UPPER_BOUND=2;function e(r,i,n,l,c,p){var u=Math.floor((i-r)/2)+r,f=c(n,l[u],!0);return f===0?u:f>0?i-u>1?e(u,i,n,l,c,p):p==t.LEAST_UPPER_BOUND?i<l.length?i:-1:u:u-r>1?e(r,u,n,l,c,p):p==t.LEAST_UPPER_BOUND?u:r<0?-1:r}t.search=function(i,n,l,c){if(n.length===0)return-1;var p=e(-1,n.length,i,n,l,c||t.GREATEST_LOWER_BOUND);if(p<0)return-1;for(;p-1>=0&&l(n[p],n[p-1],!0)===0;)--p;return p}}(Xa)),Xa}var Ja={},xh;function ME(){if(xh)return Ja;xh=1;function t(i){function n(p,u,f){var d=p[u];p[u]=p[f],p[f]=d}function l(p,u){return Math.round(p+Math.random()*(u-p))}function c(p,u,f,d){if(f<d){var m=l(f,d),y=f-1;n(p,m,d);for(var g=p[d],w=f;w<d;w++)u(p[w],g,!1)<=0&&(y+=1,n(p,y,w));n(p,y+1,w);var v=y+1;c(p,u,f,v-1),c(p,u,v+1,d)}}return c}function e(i){let n=t.toString();return new Function(`return ${n}`)()(i)}let r=new WeakMap;return Ja.quickSort=function(i,n,l=0){let c=r.get(n);c===void 0&&(c=e(n),r.set(n,c)),c(i,n,l,i.length-1)},Ja}var _h;function RE(){if(_h)return Ps;_h=1;var t=ai(),e=LE(),r=gm().ArraySet,i=ym(),n=ME().quickSort;function l(m,y){var g=m;return typeof m=="string"&&(g=t.parseSourceMapInput(m)),g.sections!=null?new d(g,y):new c(g,y)}l.fromSourceMap=function(m,y){return c.fromSourceMap(m,y)},l.prototype._version=3,l.prototype.__generatedMappings=null,Object.defineProperty(l.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),l.prototype.__originalMappings=null,Object.defineProperty(l.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),l.prototype._charIsMappingSeparator=function(y,g){var w=y.charAt(g);return w===";"||w===","},l.prototype._parseMappings=function(y,g){throw new Error("Subclasses must implement _parseMappings")},l.GENERATED_ORDER=1,l.ORIGINAL_ORDER=2,l.GREATEST_LOWER_BOUND=1,l.LEAST_UPPER_BOUND=2,l.prototype.eachMapping=function(y,g,w){var v=g||null,T=w||l.GENERATED_ORDER,E;switch(T){case l.GENERATED_ORDER:E=this._generatedMappings;break;case l.ORIGINAL_ORDER:E=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}for(var x=this.sourceRoot,A=y.bind(v),N=this._names,_=this._sources,M=this._sourceMapURL,D=0,O=E.length;D<O;D++){var I=E[D],k=I.source===null?null:_.at(I.source);k!==null&&(k=t.computeSourceURL(x,k,M)),A({source:k,generatedLine:I.generatedLine,generatedColumn:I.generatedColumn,originalLine:I.originalLine,originalColumn:I.originalColumn,name:I.name===null?null:N.at(I.name)})}},l.prototype.allGeneratedPositionsFor=function(y){var g=t.getArg(y,"line"),w={source:t.getArg(y,"source"),originalLine:g,originalColumn:t.getArg(y,"column",0)};if(w.source=this._findSourceIndex(w.source),w.source<0)return[];var v=[],T=this._findMapping(w,this._originalMappings,"originalLine","originalColumn",t.compareByOriginalPositions,e.LEAST_UPPER_BOUND);if(T>=0){var E=this._originalMappings[T];if(y.column===void 0)for(var x=E.originalLine;E&&E.originalLine===x;)v.push({line:t.getArg(E,"generatedLine",null),column:t.getArg(E,"generatedColumn",null),lastColumn:t.getArg(E,"lastGeneratedColumn",null)}),E=this._originalMappings[++T];else for(var A=E.originalColumn;E&&E.originalLine===g&&E.originalColumn==A;)v.push({line:t.getArg(E,"generatedLine",null),column:t.getArg(E,"generatedColumn",null),lastColumn:t.getArg(E,"lastGeneratedColumn",null)}),E=this._originalMappings[++T]}return v},Ps.SourceMapConsumer=l;function c(m,y){var g=m;typeof m=="string"&&(g=t.parseSourceMapInput(m));var w=t.getArg(g,"version"),v=t.getArg(g,"sources"),T=t.getArg(g,"names",[]),E=t.getArg(g,"sourceRoot",null),x=t.getArg(g,"sourcesContent",null),A=t.getArg(g,"mappings"),N=t.getArg(g,"file",null);if(w!=this._version)throw new Error("Unsupported version: "+w);E&&(E=t.normalize(E)),v=v.map(String).map(t.normalize).map(function(_){return E&&t.isAbsolute(E)&&t.isAbsolute(_)?t.relative(E,_):_}),this._names=r.fromArray(T.map(String),!0),this._sources=r.fromArray(v,!0),this._absoluteSources=this._sources.toArray().map(function(_){return t.computeSourceURL(E,_,y)}),this.sourceRoot=E,this.sourcesContent=x,this._mappings=A,this._sourceMapURL=y,this.file=N}c.prototype=Object.create(l.prototype),c.prototype.consumer=l,c.prototype._findSourceIndex=function(m){var y=m;if(this.sourceRoot!=null&&(y=t.relative(this.sourceRoot,y)),this._sources.has(y))return this._sources.indexOf(y);var g;for(g=0;g<this._absoluteSources.length;++g)if(this._absoluteSources[g]==m)return g;return-1},c.fromSourceMap=function(y,g){var w=Object.create(c.prototype),v=w._names=r.fromArray(y._names.toArray(),!0),T=w._sources=r.fromArray(y._sources.toArray(),!0);w.sourceRoot=y._sourceRoot,w.sourcesContent=y._generateSourcesContent(w._sources.toArray(),w.sourceRoot),w.file=y._file,w._sourceMapURL=g,w._absoluteSources=w._sources.toArray().map(function(O){return t.computeSourceURL(w.sourceRoot,O,g)});for(var E=y._mappings.toArray().slice(),x=w.__generatedMappings=[],A=w.__originalMappings=[],N=0,_=E.length;N<_;N++){var M=E[N],D=new p;D.generatedLine=M.generatedLine,D.generatedColumn=M.generatedColumn,M.source&&(D.source=T.indexOf(M.source),D.originalLine=M.originalLine,D.originalColumn=M.originalColumn,M.name&&(D.name=v.indexOf(M.name)),A.push(D)),x.push(D)}return n(w.__originalMappings,t.compareByOriginalPositions),w},c.prototype._version=3,Object.defineProperty(c.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function p(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}const u=t.compareByGeneratedPositionsDeflatedNoLine;function f(m,y){let g=m.length,w=m.length-y;if(!(w<=1))if(w==2){let v=m[y],T=m[y+1];u(v,T)>0&&(m[y]=T,m[y+1]=v)}else if(w<20)for(let v=y;v<g;v++)for(let T=v;T>y;T--){let E=m[T-1],x=m[T];if(u(E,x)<=0)break;m[T-1]=x,m[T]=E}else n(m,u,y)}c.prototype._parseMappings=function(y,g){var w=1,v=0,T=0,E=0,x=0,A=0,N=y.length,_=0,M={},D=[],O=[],I,k,L,V;let K=0;for(;_<N;)if(y.charAt(_)===";")w++,_++,v=0,f(O,K),K=O.length;else if(y.charAt(_)===",")_++;else{for(I=new p,I.generatedLine=w,L=_;L<N&&!this._charIsMappingSeparator(y,L);L++);for(y.slice(_,L),k=[];_<L;)i.decode(y,_,M),V=M.value,_=M.rest,k.push(V);if(k.length===2)throw new Error("Found a source, but no line and column");if(k.length===3)throw new Error("Found a source and line, but no column");if(I.generatedColumn=v+k[0],v=I.generatedColumn,k.length>1&&(I.source=x+k[1],x+=k[1],I.originalLine=T+k[2],T=I.originalLine,I.originalLine+=1,I.originalColumn=E+k[3],E=I.originalColumn,k.length>4&&(I.name=A+k[4],A+=k[4])),O.push(I),typeof I.originalLine=="number"){let z=I.source;for(;D.length<=z;)D.push(null);D[z]===null&&(D[z]=[]),D[z].push(I)}}f(O,K),this.__generatedMappings=O;for(var re=0;re<D.length;re++)D[re]!=null&&n(D[re],t.compareByOriginalPositionsNoSource);this.__originalMappings=[].concat(...D)},c.prototype._findMapping=function(y,g,w,v,T,E){if(y[w]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+y[w]);if(y[v]<0)throw new TypeError("Column must be greater than or equal to 0, got "+y[v]);return e.search(y,g,T,E)},c.prototype.computeColumnSpans=function(){for(var y=0;y<this._generatedMappings.length;++y){var g=this._generatedMappings[y];if(y+1<this._generatedMappings.length){var w=this._generatedMappings[y+1];if(g.generatedLine===w.generatedLine){g.lastGeneratedColumn=w.generatedColumn-1;continue}}g.lastGeneratedColumn=1/0}},c.prototype.originalPositionFor=function(y){var g={generatedLine:t.getArg(y,"line"),generatedColumn:t.getArg(y,"column")},w=this._findMapping(g,this._generatedMappings,"generatedLine","generatedColumn",t.compareByGeneratedPositionsDeflated,t.getArg(y,"bias",l.GREATEST_LOWER_BOUND));if(w>=0){var v=this._generatedMappings[w];if(v.generatedLine===g.generatedLine){var T=t.getArg(v,"source",null);T!==null&&(T=this._sources.at(T),T=t.computeSourceURL(this.sourceRoot,T,this._sourceMapURL));var E=t.getArg(v,"name",null);return E!==null&&(E=this._names.at(E)),{source:T,line:t.getArg(v,"originalLine",null),column:t.getArg(v,"originalColumn",null),name:E}}}return{source:null,line:null,column:null,name:null}},c.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(y){return y==null}):!1},c.prototype.sourceContentFor=function(y,g){if(!this.sourcesContent)return null;var w=this._findSourceIndex(y);if(w>=0)return this.sourcesContent[w];var v=y;this.sourceRoot!=null&&(v=t.relative(this.sourceRoot,v));var T;if(this.sourceRoot!=null&&(T=t.urlParse(this.sourceRoot))){var E=v.replace(/^file:\/\//,"");if(T.scheme=="file"&&this._sources.has(E))return this.sourcesContent[this._sources.indexOf(E)];if((!T.path||T.path=="/")&&this._sources.has("/"+v))return this.sourcesContent[this._sources.indexOf("/"+v)]}if(g)return null;throw new Error('"'+v+'" is not in the SourceMap.')},c.prototype.generatedPositionFor=function(y){var g=t.getArg(y,"source");if(g=this._findSourceIndex(g),g<0)return{line:null,column:null,lastColumn:null};var w={source:g,originalLine:t.getArg(y,"line"),originalColumn:t.getArg(y,"column")},v=this._findMapping(w,this._originalMappings,"originalLine","originalColumn",t.compareByOriginalPositions,t.getArg(y,"bias",l.GREATEST_LOWER_BOUND));if(v>=0){var T=this._originalMappings[v];if(T.source===w.source)return{line:t.getArg(T,"generatedLine",null),column:t.getArg(T,"generatedColumn",null),lastColumn:t.getArg(T,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},Ps.BasicSourceMapConsumer=c;function d(m,y){var g=m;typeof m=="string"&&(g=t.parseSourceMapInput(m));var w=t.getArg(g,"version"),v=t.getArg(g,"sections");if(w!=this._version)throw new Error("Unsupported version: "+w);this._sources=new r,this._names=new r;var T={line:-1,column:0};this._sections=v.map(function(E){if(E.url)throw new Error("Support for url field in sections not implemented.");var x=t.getArg(E,"offset"),A=t.getArg(x,"line"),N=t.getArg(x,"column");if(A<T.line||A===T.line&&N<T.column)throw new Error("Section offsets must be ordered and non-overlapping.");return T=x,{generatedOffset:{generatedLine:A+1,generatedColumn:N+1},consumer:new l(t.getArg(E,"map"),y)}})}return d.prototype=Object.create(l.prototype),d.prototype.constructor=l,d.prototype._version=3,Object.defineProperty(d.prototype,"sources",{get:function(){for(var m=[],y=0;y<this._sections.length;y++)for(var g=0;g<this._sections[y].consumer.sources.length;g++)m.push(this._sections[y].consumer.sources[g]);return m}}),d.prototype.originalPositionFor=function(y){var g={generatedLine:t.getArg(y,"line"),generatedColumn:t.getArg(y,"column")},w=e.search(g,this._sections,function(T,E){var x=T.generatedLine-E.generatedOffset.generatedLine;return x||T.generatedColumn-E.generatedOffset.generatedColumn}),v=this._sections[w];return v?v.consumer.originalPositionFor({line:g.generatedLine-(v.generatedOffset.generatedLine-1),column:g.generatedColumn-(v.generatedOffset.generatedLine===g.generatedLine?v.generatedOffset.generatedColumn-1:0),bias:y.bias}):{source:null,line:null,column:null,name:null}},d.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(y){return y.consumer.hasContentsOfAllSources()})},d.prototype.sourceContentFor=function(y,g){for(var w=0;w<this._sections.length;w++){var v=this._sections[w],T=v.consumer.sourceContentFor(y,!0);if(T||T==="")return T}if(g)return null;throw new Error('"'+y+'" is not in the SourceMap.')},d.prototype.generatedPositionFor=function(y){for(var g=0;g<this._sections.length;g++){var w=this._sections[g];if(w.consumer._findSourceIndex(t.getArg(y,"source"))!==-1){var v=w.consumer.generatedPositionFor(y);if(v){var T={line:v.line+(w.generatedOffset.generatedLine-1),column:v.column+(w.generatedOffset.generatedLine===v.line?w.generatedOffset.generatedColumn-1:0)};return T}}}return{line:null,column:null}},d.prototype._parseMappings=function(y,g){this.__generatedMappings=[],this.__originalMappings=[];for(var w=0;w<this._sections.length;w++)for(var v=this._sections[w],T=v.consumer._generatedMappings,E=0;E<T.length;E++){var x=T[E],A=v.consumer._sources.at(x.source);A!==null&&(A=t.computeSourceURL(v.consumer.sourceRoot,A,this._sourceMapURL)),this._sources.add(A),A=this._sources.indexOf(A);var N=null;x.name&&(N=v.consumer._names.at(x.name),this._names.add(N),N=this._names.indexOf(N));var _={source:A,generatedLine:x.generatedLine+(v.generatedOffset.generatedLine-1),generatedColumn:x.generatedColumn+(v.generatedOffset.generatedLine===x.generatedLine?v.generatedOffset.generatedColumn-1:0),originalLine:x.originalLine,originalColumn:x.originalColumn,name:N};this.__generatedMappings.push(_),typeof _.originalLine=="number"&&this.__originalMappings.push(_)}n(this.__generatedMappings,t.compareByGeneratedPositionsDeflated),n(this.__originalMappings,t.compareByOriginalPositions)},Ps.IndexedSourceMapConsumer=d,Ps}var Ka={},Ah;function DE(){if(Ah)return Ka;Ah=1;var t=vm().SourceMapGenerator,e=ai(),r=/(\r?\n)/,i=10,n="$$$isSourceNode$$$";function l(c,p,u,f,d){this.children=[],this.sourceContents={},this.line=c??null,this.column=p??null,this.source=u??null,this.name=d??null,this[n]=!0,f!=null&&this.add(f)}return l.fromStringWithSourceMap=function(p,u,f){var d=new l,m=p.split(r),y=0,g=function(){var x=N(),A=N()||"";return x+A;function N(){return y<m.length?m[y++]:void 0}},w=1,v=0,T=null;return u.eachMapping(function(x){if(T!==null)if(w<x.generatedLine)E(T,g()),w++,v=0;else{var A=m[y]||"",N=A.substr(0,x.generatedColumn-v);m[y]=A.substr(x.generatedColumn-v),v=x.generatedColumn,E(T,N),T=x;return}for(;w<x.generatedLine;)d.add(g()),w++;if(v<x.generatedColumn){var A=m[y]||"";d.add(A.substr(0,x.generatedColumn)),m[y]=A.substr(x.generatedColumn),v=x.generatedColumn}T=x},this),y<m.length&&(T&&E(T,g()),d.add(m.splice(y).join(""))),u.sources.forEach(function(x){var A=u.sourceContentFor(x);A!=null&&(f!=null&&(x=e.join(f,x)),d.setSourceContent(x,A))}),d;function E(x,A){if(x===null||x.source===void 0)d.add(A);else{var N=f?e.join(f,x.source):x.source;d.add(new l(x.originalLine,x.originalColumn,N,A,x.name))}}},l.prototype.add=function(p){if(Array.isArray(p))p.forEach(function(u){this.add(u)},this);else if(p[n]||typeof p=="string")p&&this.children.push(p);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+p);return this},l.prototype.prepend=function(p){if(Array.isArray(p))for(var u=p.length-1;u>=0;u--)this.prepend(p[u]);else if(p[n]||typeof p=="string")this.children.unshift(p);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+p);return this},l.prototype.walk=function(p){for(var u,f=0,d=this.children.length;f<d;f++)u=this.children[f],u[n]?u.walk(p):u!==""&&p(u,{source:this.source,line:this.line,column:this.column,name:this.name})},l.prototype.join=function(p){var u,f,d=this.children.length;if(d>0){for(u=[],f=0;f<d-1;f++)u.push(this.children[f]),u.push(p);u.push(this.children[f]),this.children=u}return this},l.prototype.replaceRight=function(p,u){var f=this.children[this.children.length-1];return f[n]?f.replaceRight(p,u):typeof f=="string"?this.children[this.children.length-1]=f.replace(p,u):this.children.push("".replace(p,u)),this},l.prototype.setSourceContent=function(p,u){this.sourceContents[e.toSetString(p)]=u},l.prototype.walkSourceContents=function(p){for(var u=0,f=this.children.length;u<f;u++)this.children[u][n]&&this.children[u].walkSourceContents(p);for(var d=Object.keys(this.sourceContents),u=0,f=d.length;u<f;u++)p(e.fromSetString(d[u]),this.sourceContents[d[u]])},l.prototype.toString=function(){var p="";return this.walk(function(u){p+=u}),p},l.prototype.toStringWithSourceMap=function(p){var u={code:"",line:1,column:0},f=new t(p),d=!1,m=null,y=null,g=null,w=null;return this.walk(function(v,T){u.code+=v,T.source!==null&&T.line!==null&&T.column!==null?((m!==T.source||y!==T.line||g!==T.column||w!==T.name)&&f.addMapping({source:T.source,original:{line:T.line,column:T.column},generated:{line:u.line,column:u.column},name:T.name}),m=T.source,y=T.line,g=T.column,w=T.name,d=!0):d&&(f.addMapping({generated:{line:u.line,column:u.column}}),m=null,d=!1);for(var E=0,x=v.length;E<x;E++)v.charCodeAt(E)===i?(u.line++,u.column=0,E+1===x?(m=null,d=!1):d&&f.addMapping({source:T.source,original:{line:T.line,column:T.column},generated:{line:u.line,column:u.column},name:T.name})):u.column++}),this.walkSourceContents(function(v,T){f.setSourceContent(v,T)}),{code:u.code,map:f}},Ka.SourceNode=l,Ka}var Ch;function na(){return Ch||(Ch=1,bs.SourceMapGenerator=vm().SourceMapGenerator,bs.SourceMapConsumer=RE().SourceMapConsumer,bs.SourceNode=DE().SourceNode),bs}var Ar=na();const aa="/*@__PURE__*/",rn=t=>`${ot[t]}: _${ot[t]}`;function Ih(t,{mode:e="function",prefixIdentifiers:r=e==="module",sourceMap:i=!1,filename:n="template.vue.html",scopeId:l=null,optimizeImports:c=!1,runtimeGlobalName:p="Vue",runtimeModuleName:u="vue",ssrRuntimeModuleName:f="vue/server-renderer",ssr:d=!1,isTS:m=!1,inSSR:y=!1}){const g={mode:e,prefixIdentifiers:r,sourceMap:i,filename:n,scopeId:l,optimizeImports:c,runtimeGlobalName:p,runtimeModuleName:u,ssrRuntimeModuleName:f,ssr:d,isTS:m,inSSR:y,source:t.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper(T){return`_${ot[T]}`},push(T,E=-2,x){if(g.code+=T,g.map){if(x){let A;if(x.type===4&&!x.isStatic){const N=x.content.replace(/^_ctx\./,"");N!==x.content&&Kt(N)&&(A=N)}x.loc.source&&v(x.loc.start,A)}E===-3?Jl(g,T):(g.offset+=T.length,E===-2?g.column+=T.length:(E===-1&&(E=T.length-1),g.line++,g.column=T.length-E)),x&&x.loc!==Le&&x.loc.source&&v(x.loc.end)}},indent(){w(++g.indentLevel)},deindent(T=!1){T?--g.indentLevel:w(--g.indentLevel)},newline(){w(g.indentLevel)}};function w(T){g.push(`
|
|
17
17
|
`+" ".repeat(T),0)}function v(T,E=null){const{_names:x,_mappings:A}=g.map;E!==null&&!x.has(E)&&x.add(E),A.add({originalLine:T.line,originalColumn:T.column-1,generatedLine:g.line,generatedColumn:g.column-1,source:n,name:E})}return i&&(g.map=new Ar.SourceMapGenerator,g.map.setSourceContent(n,g.source),g.map._sources.add(n)),g}function Zl(t,e={}){const r=Ih(t,e);e.onContextCreated&&e.onContextCreated(r);const{mode:i,push:n,prefixIdentifiers:l,indent:c,deindent:p,newline:u,scopeId:f,ssr:d}=r,m=Array.from(t.helpers),y=m.length>0,g=!l&&i!=="module",w=f!=null&&i==="module",v=!!e.inline,T=v?Ih(t,e):r;i==="module"?BE(t,T,w,v):FE(t,T);const E=d?"ssrRender":"render",x=d?["_ctx","_push","_parent","_attrs"]:["_ctx","_cache"];e.bindingMetadata&&!e.inline&&x.push("$props","$setup","$data","$options");const A=e.isTS?x.map(N=>`${N}: any`).join(","):x.join(", ");if(n(v?`(${A}) => {`:`function ${E}(${A}) {`),c(),g&&(n("with (_ctx) {"),c(),y&&(n(`const { ${m.map(rn).join(", ")} } = _Vue
|
|
18
18
|
`,-1),u())),t.components.length&&(Nh(t.components,"component",r),(t.directives.length||t.temps>0)&&u()),t.directives.length&&(Nh(t.directives,"directive",r),t.temps>0&&u()),t.temps>0){n("let ");for(let N=0;N<t.temps;N++)n(`${N>0?", ":""}_temp${N}`)}return(t.components.length||t.directives.length||t.temps)&&(n(`
|
|
@@ -61,8 +61,8 @@ ${n}.setup = __setup__
|
|
|
61
61
|
`)+" "+t.join(`,
|
|
62
62
|
`)+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}function kc(t){return Array.isArray(t)}function ga(t){return typeof t=="boolean"}function Gt(t){return t===null}function Lc(t){return t==null}function Mc(t){return typeof t=="number"}function dr(t){return typeof t=="string"}function py(t){return typeof t=="symbol"}function Ft(t){return t===void 0}function Ds(t){return Qt(t)&&Rc(t)==="[object RegExp]"}function Qt(t){return typeof t=="object"&&t!==null}function xn(t){return Qt(t)&&Rc(t)==="[object Date]"}function Fs(t){return Qt(t)&&(Rc(t)==="[object Error]"||t instanceof Error)}function Bs(t){return typeof t=="function"}function fy(t){return t===null||typeof t=="boolean"||typeof t=="number"||typeof t=="string"||typeof t=="symbol"||typeof t>"u"}function dy(t){return X.isBuffer(t)}function Rc(t){return Object.prototype.toString.call(t)}function so(t){return t<10?"0"+t.toString(10):t.toString(10)}var Dw=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Fw(){var t=new Date,e=[so(t.getHours()),so(t.getMinutes()),so(t.getSeconds())].join(":");return[t.getDate(),Dw[t.getMonth()],e].join(" ")}function my(){console.log("%s - %s",Fw(),ya.apply(null,arguments))}function Dc(t,e){if(!e||!Qt(e))return t;for(var r=Object.keys(e),i=r.length;i--;)t[r[i]]=e[r[i]];return t}function yy(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var Tr=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;function Fc(t){if(typeof t!="function")throw new TypeError('The "original" argument must be of type Function');if(Tr&&t[Tr]){var e=t[Tr];if(typeof e!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,Tr,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var r,i,n=new Promise(function(p,u){r=p,i=u}),l=[],c=0;c<arguments.length;c++)l.push(arguments[c]);l.push(function(p,u){p?i(p):r(u)});try{t.apply(this,l)}catch(p){i(p)}return n}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),Tr&&Object.defineProperty(e,Tr,{value:e,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(e,uy(t))}Fc.custom=Tr;function Bw(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t,t=r}return e(t)}function gy(t){if(typeof t!="function")throw new TypeError('The "original" argument must be of type Function');function e(){for(var r=[],i=0;i<arguments.length;i++)r.push(arguments[i]);var n=r.pop();if(typeof n!="function")throw new TypeError("The last argument must be of type Function");var l=this,c=function(){return n.apply(l,arguments)};t.apply(this,r).then(function(p){pt.nextTick(c.bind(null,null,p))},function(p){pt.nextTick(Bw.bind(null,p,c))})}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),Object.defineProperties(e,uy(t)),e}var $w={inherits:bn,_extend:Dc,log:my,isBuffer:dy,isPrimitive:fy,isFunction:Bs,isError:Fs,isDate:xn,isObject:Qt,isRegExp:Ds,isUndefined:Ft,isSymbol:py,isString:dr,isNumber:Mc,isNullOrUndefined:Lc,isNull:Gt,isBoolean:ga,isArray:kc,inspect:$t,deprecate:Oc,format:ya,debuglog:hy,promisify:Fc,callbackify:gy},Uw=Object.freeze({__proto__:null,_extend:Dc,callbackify:gy,debuglog:hy,default:$w,deprecate:Oc,format:ya,inherits:bn,inspect:$t,isArray:kc,isBoolean:ga,isBuffer:dy,isDate:xn,isError:Fs,isFunction:Bs,isNull:Gt,isNullOrUndefined:Lc,isNumber:Mc,isObject:Qt,isPrimitive:fy,isRegExp:Ds,isString:dr,isSymbol:py,isUndefined:Ft,log:my,promisify:Fc});function qw(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var vy=Array.isArray||function(t){return Object.prototype.toString.call(t)==="[object Array]"};function io(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}}function jw(t,e,r,i){return e=e||"&",r=r||"=",t===null&&(t=void 0),typeof t=="object"?np(Vw(t),function(n){var l=encodeURIComponent(io(n))+r;return vy(t[n])?np(t[n],function(c){return l+encodeURIComponent(io(c))}).join(e):l+encodeURIComponent(io(t[n]))}).join(e):""}function np(t,e){if(t.map)return t.map(e);for(var r=[],i=0;i<t.length;i++)r.push(e(t[i],i));return r}var Vw=Object.keys||function(t){var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.push(r);return e};function ap(t,e,r,i){e=e||"&",r=r||"=";var n={};if(typeof t!="string"||t.length===0)return n;var l=/\+/g;t=t.split(e);var c=1e3,p=t.length;p>c&&(p=c);for(var u=0;u<p;++u){var f=t[u].replace(l,"%20"),d=f.indexOf(r),m,y,g,w;d>=0?(m=f.substr(0,d),y=f.substr(d+1)):(m=f,y=""),g=decodeURIComponent(m),w=decodeURIComponent(y),qw(n,g)?vy(n[g])?n[g].push(w):n[g]=[n[g],w]:n[g]=w}return n}const Sy=hr.URL,Ey=hr.URLSearchParams;var zw={parse:gs,resolve:Py,resolveObject:xy,fileURLToPath:wy,format:by,Url:vt,URL:Sy,URLSearchParams:Ey};function vt(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var Ww=/^([a-z0-9.+-]+:)/i,Gw=/:[0-9]*$/,Hw=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Xw=["<",">",'"',"`"," ","\r",`
|
|
63
63
|
`," "],Jw=["{","}","|","\\","^","`"].concat(Xw),ml=["'"].concat(Jw),op=["%","/","?",";","#"].concat(ml),lp=["/","?","#"],Kw=255,cp=/^[+a-z0-9A-Z_-]{0,63}$/,Yw=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Qw={javascript:!0,"javascript:":!0},yl={javascript:!0,"javascript:":!0},es={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function gs(t,e,r){if(t&&Qt(t)&&t instanceof vt)return t;var i=new vt;return i.parse(t,e,r),i}vt.prototype.parse=function(t,e,r){return Ty(this,t,e,r)};function Ty(t,e,r,i){if(!dr(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var n=e.indexOf("?"),l=n!==-1&&n<e.indexOf("#")?"?":"#",c=e.split(l),p=/\\/g;c[0]=c[0].replace(p,"/"),e=c.join(l);var u=e;if(u=u.trim(),!i&&e.split("#").length===1){var f=Hw.exec(u);if(f)return t.path=u,t.href=u,t.pathname=f[1],f[2]?(t.search=f[2],r?t.query=ap(t.search.substr(1)):t.query=t.search.substr(1)):r&&(t.search="",t.query={}),t}var d=Ww.exec(u);if(d){d=d[0];var m=d.toLowerCase();t.protocol=m,u=u.substr(d.length)}if(i||d||u.match(/^\/\/[^@\/]+@[^@\/]+/)){var y=u.substr(0,2)==="//";y&&!(d&&yl[d])&&(u=u.substr(2),t.slashes=!0)}var g,w,v,T;if(!yl[d]&&(y||d&&!es[d])){var E=-1;for(g=0;g<lp.length;g++)w=u.indexOf(lp[g]),w!==-1&&(E===-1||w<E)&&(E=w);var x,A;for(E===-1?A=u.lastIndexOf("@"):A=u.lastIndexOf("@",E),A!==-1&&(x=u.slice(0,A),u=u.slice(A+1),t.auth=decodeURIComponent(x)),E=-1,g=0;g<op.length;g++)w=u.indexOf(op[g]),w!==-1&&(E===-1||w<E)&&(E=w);E===-1&&(E=u.length),t.host=u.slice(0,E),u=u.slice(E),_y(t),t.hostname=t.hostname||"";var N=t.hostname[0]==="["&&t.hostname[t.hostname.length-1]==="]";if(!N){var _=t.hostname.split(/\./);for(g=0,v=_.length;g<v;g++){var M=_[g];if(M&&!M.match(cp)){for(var D="",O=0,I=M.length;O<I;O++)M.charCodeAt(O)>127?D+="x":D+=M[O];if(!D.match(cp)){var k=_.slice(0,g),L=_.slice(g+1),V=M.match(Yw);V&&(k.push(V[1]),L.unshift(V[2])),L.length&&(u="/"+L.join(".")+u),t.hostname=k.join(".");break}}}}t.hostname.length>Kw?t.hostname="":t.hostname=t.hostname.toLowerCase(),N||(t.hostname=Y1(t.hostname)),T=t.port?":"+t.port:"";var K=t.hostname||"";t.host=K+T,t.href+=t.host,N&&(t.hostname=t.hostname.substr(1,t.hostname.length-2),u[0]!=="/"&&(u="/"+u))}if(!Qw[m])for(g=0,v=ml.length;g<v;g++){var re=ml[g];if(u.indexOf(re)!==-1){var z=encodeURIComponent(re);z===re&&(z=escape(re)),u=u.split(re).join(z)}}var se=u.indexOf("#");se!==-1&&(t.hash=u.substr(se),u=u.slice(0,se));var he=u.indexOf("?");if(he!==-1?(t.search=u.substr(he),t.query=u.substr(he+1),r&&(t.query=ap(t.query)),u=u.slice(0,he)):r&&(t.search="",t.query={}),u&&(t.pathname=u),es[m]&&t.hostname&&!t.pathname&&(t.pathname="/"),t.pathname||t.search){T=t.pathname||"";var ne=t.search||"";t.path=T+ne}return t.href=Bc(t),t}function wy(t){if(typeof t=="string")t=new vt().parse(t);else if(!(t instanceof vt))throw new TypeError('The "path" argument must be of type string or an instance of URL. Received type '+typeof t+String(t));if(t.protocol!=="file:")throw new TypeError("The URL must be of scheme file");return Zw(t)}function Zw(t){const e=t.pathname;for(let r=0;r<e.length;r++)if(e[r]==="%"){const i=e.codePointAt(r+2)|32;if(e[r+1]==="2"&&i===102)throw new TypeError("must not include encoded / characters")}return decodeURIComponent(e)}function by(t){return dr(t)&&(t=Ty({},t)),Bc(t)}function Bc(t){var e=t.auth||"";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var r=t.protocol||"",i=t.pathname||"",n=t.hash||"",l=!1,c="";t.host?l=e+t.host:t.hostname&&(l=e+(t.hostname.indexOf(":")===-1?t.hostname:"["+this.hostname+"]"),t.port&&(l+=":"+t.port)),t.query&&Qt(t.query)&&Object.keys(t.query).length&&(c=jw(t.query));var p=t.search||c&&"?"+c||"";return r&&r.substr(-1)!==":"&&(r+=":"),t.slashes||(!r||es[r])&&l!==!1?(l="//"+(l||""),i&&i.charAt(0)!=="/"&&(i="/"+i)):l||(l=""),n&&n.charAt(0)!=="#"&&(n="#"+n),p&&p.charAt(0)!=="?"&&(p="?"+p),i=i.replace(/[?#]/g,function(u){return encodeURIComponent(u)}),p=p.replace("#","%23"),r+l+i+p+n}vt.prototype.format=function(){return Bc(this)};function Py(t,e){return gs(t,!1,!0).resolve(e)}vt.prototype.resolve=function(t){return this.resolveObject(gs(t,!1,!0)).format()};function xy(t,e){return t?gs(t,!1,!0).resolveObject(e):e}vt.prototype.resolveObject=function(t){if(dr(t)){var e=new vt;e.parse(t,!1,!0),t=e}for(var r=new vt,i=Object.keys(this),n=0;n<i.length;n++){var l=i[n];r[l]=this[l]}if(r.hash=t.hash,t.href==="")return r.href=r.format(),r;if(t.slashes&&!t.protocol){for(var c=Object.keys(t),p=0;p<c.length;p++){var u=c[p];u!=="protocol"&&(r[u]=t[u])}return es[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}var f;if(t.protocol&&t.protocol!==r.protocol){if(!es[t.protocol]){for(var d=Object.keys(t),m=0;m<d.length;m++){var y=d[m];r[y]=t[y]}return r.href=r.format(),r}if(r.protocol=t.protocol,!t.host&&!yl[t.protocol]){for(f=(t.pathname||"").split("/");f.length&&!(t.host=f.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),f[0]!==""&&f.unshift(""),f.length<2&&f.unshift(""),r.pathname=f.join("/")}else r.pathname=t.pathname;if(r.search=t.search,r.query=t.query,r.host=t.host||"",r.auth=t.auth,r.hostname=t.hostname||t.host,r.port=t.port,r.pathname||r.search){var g=r.pathname||"",w=r.search||"";r.path=g+w}return r.slashes=r.slashes||t.slashes,r.href=r.format(),r}var v=r.pathname&&r.pathname.charAt(0)==="/",T=t.host||t.pathname&&t.pathname.charAt(0)==="/",E=T||v||r.host&&t.pathname,x=E,A=r.pathname&&r.pathname.split("/")||[],N=r.protocol&&!es[r.protocol];f=t.pathname&&t.pathname.split("/")||[],N&&(r.hostname="",r.port=null,r.host&&(A[0]===""?A[0]=r.host:A.unshift(r.host)),r.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(f[0]===""?f[0]=t.host:f.unshift(t.host)),t.host=null),E=E&&(f[0]===""||A[0]===""));var _;if(T)r.host=t.host||t.host===""?t.host:r.host,r.hostname=t.hostname||t.hostname===""?t.hostname:r.hostname,r.search=t.search,r.query=t.query,A=f;else if(f.length)A||(A=[]),A.pop(),A=A.concat(f),r.search=t.search,r.query=t.query;else if(!Lc(t.search))return N&&(r.hostname=r.host=A.shift(),_=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1,_&&(r.auth=_.shift(),r.host=r.hostname=_.shift())),r.search=t.search,r.query=t.query,(!Gt(r.pathname)||!Gt(r.search))&&(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r;if(!A.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var M=A.slice(-1)[0],D=(r.host||t.host||A.length>1)&&(M==="."||M==="..")||M==="",O=0,I=A.length;I>=0;I--)M=A[I],M==="."?A.splice(I,1):M===".."?(A.splice(I,1),O++):O&&(A.splice(I,1),O--);if(!E&&!x)for(;O--;O)A.unshift("..");E&&A[0]!==""&&(!A[0]||A[0].charAt(0)!=="/")&&A.unshift(""),D&&A.join("/").substr(-1)!=="/"&&A.push("");var k=A[0]===""||A[0]&&A[0].charAt(0)==="/";return N&&(r.hostname=r.host=k?"":A.length?A.shift():"",_=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1,_&&(r.auth=_.shift(),r.host=r.hostname=_.shift())),E=E||r.host&&A.length,E&&!k&&A.unshift(""),A.length?r.pathname=A.join("/"):(r.pathname=null,r.path=null),(!Gt(r.pathname)||!Gt(r.search))&&(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r};vt.prototype.parseHost=function(){return _y(this)};function _y(t){var e=t.host,r=Gw.exec(e);r&&(r=r[0],r!==":"&&(t.port=r.substr(1)),e=e.substr(0,e.length-r.length)),e&&(t.hostname=e)}var eb=Object.freeze({__proto__:null,URL:Sy,URLSearchParams:Ey,Url:vt,default:zw,fileURLToPath:wy,format:by,parse:gs,resolve:Py,resolveObject:xy});function Ay(t){const e=t.charAt(0);return e==="."||e==="~"||e==="@"}const tb=/^(https?:)?\/\//;function Cy(t){return tb.test(t)}const rb=/^\s*data:/i;function gl(t){return rb.test(t)}function vl(t){if(t.charAt(0)==="~"){const r=t.charAt(1);t=t.slice(r==="/"?2:1)}return sb(t)}function sb(t){return gs(Se(t)?t:"",!1,!0)}var ib=Object.defineProperty,nb=Object.defineProperties,ab=Object.getOwnPropertyDescriptors,up=Object.getOwnPropertySymbols,ob=Object.prototype.hasOwnProperty,lb=Object.prototype.propertyIsEnumerable,hp=(t,e,r)=>e in t?ib(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,no=(t,e)=>{for(var r in e||(e={}))ob.call(e,r)&&hp(t,r,e[r]);if(up)for(var r of up(e))lb.call(e,r)&&hp(t,r,e[r]);return t},cb=(t,e)=>nb(t,ab(e));const Ks={base:null,includeAbsolute:!1,tags:{video:["src","poster"],source:["src"],img:["src"],image:["xlink:href","href"],use:["xlink:href","href"]}},ub=t=>Object.keys(t).some(e=>$e(t[e]))?cb(no({},Ks),{tags:t}):no(no({},Ks),t),hb=t=>(e,r)=>Iy(e,r,t),Iy=(t,e,r=Ks)=>{if(t.type===1){if(!t.props.length)return;const i=r.tags||Ks.tags,n=i[t.tag],l=i["*"];if(!n&&!l)return;const c=(n||[]).concat(l||[]);t.props.forEach((p,u)=>{if(p.type!==6||!c.includes(p.name)||!p.value||Cy(p.value.content)||gl(p.value.content)||p.value.content[0]==="#"||!r.includeAbsolute&&!Ay(p.value.content))return;const f=vl(p.value.content);if(r.base&&p.value.content[0]==="."){const m=vl(r.base),y=m.protocol||"",g=m.host?y+"//"+m.host:"",w=m.path||"/";p.value.content=g+(Yt.posix||Yt).join(w,f.path+(f.hash||""));return}const d=pb(f.path,f.hash,p.loc,e);t.props[u]={type:7,name:"bind",arg:te(p.name,!0,p.loc),exp:d,modifiers:[],loc:p.loc}})}};function pb(t,e,r,i){if(t){let n,l;const c=i.imports.findIndex(d=>d.path===t);if(c>-1?(n=`_imports_${c}`,l=i.imports[c].exp):(n=`_imports_${i.imports.length}`,l=te(n,!1,r,3),i.imports.push({exp:l,path:decodeURIComponent(t)})),!e)return l;const p=`${n} + '${e}'`,u=te(p,!1,r,3);if(!i.hoistStatic)return u;const f=i.hoists.findIndex(d=>d&&d.type===4&&!d.isStatic&&d.content===p);return f>-1?te(`_hoisted_${f+1}`,!1,r,3):i.hoist(u)}else return te("''",!1,r,3)}const fb=["img","source"],db=/( |\\t|\\n|\\f|\\r)+/g,mb=t=>(e,r)=>Ny(e,r,t),Ny=(t,e,r=Ks)=>{t.type===1&&fb.includes(t.tag)&&t.props.length&&t.props.forEach((i,n)=>{if(i.name==="srcset"&&i.type===6){if(!i.value)return;const l=i.value.content;if(!l)return;const c=l.split(",").map(d=>{const[m,y]=d.replace(db," ").trim().split(" ",2);return{url:m,descriptor:y}});for(let d=0;d<c.length;d++){const{url:m}=c[d];gl(m)&&(c[d+1].url=m+","+c[d+1].url,c.splice(d,1))}const p=d=>!Cy(d)&&!gl(d)&&(r.includeAbsolute||Ay(d));if(!c.some(({url:d})=>p(d)))return;if(r.base){const d=r.base,m=[];let y=!1;if(c.forEach(g=>{let{url:w,descriptor:v}=g;v=v?` ${v}`:"",w[0]==="."?(g.url=(Yt.posix||Yt).join(d,w),m.push(g.url+v)):p(w)?y=!0:m.push(w+v)}),!y){i.value.content=m.join(", ");return}}const u=je([],i.loc);c.forEach(({url:d,descriptor:m},y)=>{if(p(d)){const{path:w}=vl(d);let v;if(w){const T=e.imports.findIndex(E=>E.path===w);T>-1?v=te(`_imports_${T}`,!1,i.loc,3):(v=te(`_imports_${e.imports.length}`,!1,i.loc,3),e.imports.push({exp:v,path:w})),u.children.push(v)}}else{const w=te(`"${d}"`,!1,i.loc,3);u.children.push(w)}const g=c.length-1>y;m&&g?u.children.push(` + ' ${m}, ' + `):m?u.children.push(` + ' ${m}'`):g&&u.children.push(" + ', ' + ")});let f=u;e.hoistStatic&&(f=e.hoist(u),f.constType=3),t.props[n]={type:7,name:"bind",arg:te("srcset",!0,i.loc),exp:f,modifiers:[],loc:i.loc}}})},_n=Symbol("ssrInterpolate"),Oy=Symbol("ssrRenderVNode"),ky=Symbol("ssrRenderComponent"),Ly=Symbol("ssrRenderSlot"),My=Symbol("ssrRenderSlotInner"),Ry=Symbol("ssrRenderClass"),Dy=Symbol("ssrRenderStyle"),$c=Symbol("ssrRenderAttrs"),Fy=Symbol("ssrRenderAttr"),By=Symbol("ssrRenderDynamicAttr"),$y=Symbol("ssrRenderList"),Uc=Symbol("ssrIncludeBooleanAttr"),on=Symbol("ssrLooseEqual"),Sl=Symbol("ssrLooseContain"),Uy=Symbol("ssrRenderDynamicModel"),qy=Symbol("ssrGetDynamicModelProps"),jy=Symbol("ssrRenderTeleport"),Vy=Symbol("ssrRenderSuspense"),zy=Symbol("ssrGetDirectiveProps"),El={[_n]:"ssrInterpolate",[Oy]:"ssrRenderVNode",[ky]:"ssrRenderComponent",[Ly]:"ssrRenderSlot",[My]:"ssrRenderSlotInner",[Ry]:"ssrRenderClass",[Dy]:"ssrRenderStyle",[$c]:"ssrRenderAttrs",[Fy]:"ssrRenderAttr",[By]:"ssrRenderDynamicAttr",[$y]:"ssrRenderList",[Uc]:"ssrIncludeBooleanAttr",[on]:"ssrLooseEqual",[Sl]:"ssrLooseContain",[Uy]:"ssrRenderDynamicModel",[qy]:"ssrGetDynamicModelProps",[jy]:"ssrRenderTeleport",[Vy]:"ssrRenderSuspense",[zy]:"ssrGetDirectiveProps"};Ul(El);const yb=ni(/^(if|else|else-if)$/,tc);function gb(t,e,r=!1,i=!1){const[n]=t.branches,l=dn(n.condition,pp(n,e,r));e.pushStatement(l);let c=l;for(let p=1;p<t.branches.length;p++){const u=t.branches[p],f=pp(u,e,r);u.condition?c=c.alternate=dn(u.condition,f):c.alternate=f}!c.alternate&&!i&&(c.alternate=si([fe("_push",["`<!---->`"])]))}function pp(t,e,r=!1){const{children:i}=t,n=!r&&(i.length!==1||i[0].type!==1)&&!(i.length===1&&i[0].type===11);return vs(t,e,n)}const vb=ni("for",sc);function Sb(t,e,r=!1){const i=!r&&(t.children.length!==1||t.children[0].type!==1),n=St(Xs(t.parseResult));n.body=vs(t,e,i),r||e.pushStringPart("<!--[-->"),e.pushStatement(fe(e.helper($y),[t.source,n])),r||e.pushStringPart("<!--]-->")}const Eb=(t,e)=>{if(ls(t)){const{slotName:r,slotProps:i}=lc(t,e),n=["_ctx.$slots",r,i||"{}","null","_push","_parent"];e.scopeId&&e.slotted!==!1&&n.push(`"${e.scopeId}-s"`);let l=Ly,c=e.parent;if(c){const p=c.children;c.type===10&&(c=e.grandParent);let u;c.type===1&&c.tagType===1&&((u=ca(c,e,!0))===Dr||u===ys)&&p.filter(f=>f.type===1).length===1&&(l=My,e.scopeId&&e.slotted!==!1||n.push("null"),n.push("true"))}t.ssrCodegenNode=fe(e.helper(l),n)}};function Tb(t,e){const r=t.ssrCodegenNode;if(t.children.length){const i=St([]);i.body=vs(t,e),r.arguments[3]=i}if(e.withSlotScopeId){const i=r.arguments[6];r.arguments[6]=i?`${i} + _scopeId`:"_scopeId"}e.pushStatement(t.ssrCodegenNode)}function Ys(t,e){return we(t,e,wb)}const wb={65:"Unsafe attribute name for SSR.",66:"Missing the 'to' prop on teleport element.",67:"Invalid AST node during SSR transform."};function bb(t,e){const r=ht(t,"to");if(!r){e.onError(Ys(66,t.loc));return}let i;if(r.type===6?i=r.value&&te(r.value.content,!0):i=r.exp,!i){e.onError(Ys(66,r.loc));return}const n=ht(t,"disabled",!1,!0),l=n?n.type===6?"true":n.exp||"false":"false",c=St(["_push"],void 0,!0,!1,t.loc);c.body=vs(t,e),e.pushStatement(fe(e.helper(jy),["_push",c,i,l,"_parent"]))}const Wy=new WeakMap;function Pb(t,e){return()=>{if(t.children.length){const r={slotsExp:null,wipSlots:[]};Wy.set(t,r),r.slotsExp=Js(t,e,(i,n,l,c)=>{const p=St([],void 0,!0,!1,c);return r.wipSlots.push({fn:p,children:l}),p}).slots}}}function xb(t,e){const r=Wy.get(t);if(!r)return;const{slotsExp:i,wipSlots:n}=r;for(let l=0;l<n.length;l++){const c=n[l];c.fn.body=vs(c,e)}e.pushStatement(fe(e.helper(Vy),["_push",i]))}const ks=new WeakMap,_b=(t,e)=>{if(!(t.type!==1||t.tagType!==0))return function(){const i=[`<${t.tag}`],n=t.tag==="textarea"||t.tag.indexOf("-")>0,l=sa(t),c=t.props.some(m=>m.type===7&&!Ll(m.name)),p=l||c;if(p){const{props:m,directives:y}=ms(t,e,t.props,!1,!1,!0);if(m||y.length){const g=qc(m,y,e),w=fe(e.helper($c),[g]);if(t.tag==="textarea"){const v=t.children[0];if(!v||v.type!==5){const T=`_temp${e.temps++}`;w.arguments=[Qi(te(T,!1),g)],ks.set(t,fe(e.helper(_n),[Ct(te(`"value" in ${T}`,!1),te(`${T}.value`,!1),te(v?v.content:"",!0),!1)]))}}else if(t.tag==="input"){const v=Nb(t);if(v){const T=`_temp${e.temps++}`,E=te(T,!1);w.arguments=[zd([Qi(E,g),fe(e.helper(Or),[E,fe(e.helper(qy),[E,v.exp])])])]}}else if(y.length&&!t.children.length&&!Fe(t,"text")){const T=`_temp${e.temps++}`;w.arguments=[Qi(te(T,!1),g)],ks.set(t,Ct(te(`"textContent" in ${T}`,!1),fe(e.helper(_n),[te(`${T}.textContent`,!1)]),te(`${T}.innerHTML ?? ''`,!1),!1))}n&&w.arguments.push(`"${t.tag}"`),i.push(w)}}let u,f,d;for(let m=0;m<t.props.length;m++){const y=t.props[m];if(!(t.tag==="input"&&Ab(y)))if(y.type===7){if(y.name==="html"&&y.exp)ks.set(t,je(["(",y.exp,") ?? ''"]));else if(y.name==="text"&&y.exp)t.children=[fn(y.exp,y.loc)];else if(y.name==="slot")e.onError(we(40,y.loc));else if(Cb(t,y)&&y.exp)p||(t.children=[fn(y.exp,y.loc)]);else if(!p&&y.name!=="on"){const g=e.directiveTransforms[y.name];if(g){const{props:w,ssrTagParts:v}=g(y,t,e);v&&i.push(...v);for(let T=0;T<w.length;T++){const{key:E,value:x}=w[T];if(Ge(E)){let A=E.content;if(A==="key"||A==="ref")continue;A==="class"?i.push(' class="',u=fe(e.helper(Ry),[x]),'"'):A==="style"?d?fp(d,x):i.push(' style="',d=fe(e.helper(Dy),[x]),'"'):(A=t.tag.indexOf("-")>0?A:IS[A]||A.toLowerCase(),Dd(A)?i.push(Ct(fe(e.helper(Uc),[x]),te(" "+A,!0),te("",!0),!1)):CS(A)?i.push(fe(e.helper(Fy),[E,x])):e.onError(Ys(65,E.loc)))}else{const A=[E,x];n&&A.push(`"${t.tag}"`),i.push(fe(e.helper(By),A))}}}}}else{const g=y.name;if(t.tag==="textarea"&&g==="value"&&y.value)ks.set(t,Rt(y.value.content));else if(!p){if(g==="key"||g==="ref")continue;g==="class"&&y.value&&(f=JSON.stringify(y.value.content)),i.push(` ${y.name}`+(y.value?`="${Rt(y.value.content)}"`:""))}}}u&&f&&(fp(u,f),Ib(i,"class")),e.scopeId&&i.push(` ${e.scopeId}`),t.ssrCodegenNode=ql(i)}};function qc(t,e,r){let i=[];if(t&&(t.type===14?i=t.arguments:i.push(t)),e.length)for(const n of e)i.push(fe(r.helper(zy),["_ctx",...oc(n,r).elements]));return i.length>1?fe(r.helper(Or),i):i[0]}function Ab(t){return t.type===7?t.name==="bind"&&t.arg&&Ge(t.arg)&&(t.arg.content==="true-value"||t.arg.content==="false-value"):t.name==="true-value"||t.name==="false-value"}function Cb(t,e){return!!(t.tag==="textarea"&&e.name==="bind"&&Dt(e.arg,"value"))}function fp(t,e){const r=t.arguments[0];r.type===17?r.elements.push(e):t.arguments[0]=Ht([r,e])}function Ib(t,e){const r=new RegExp(`^ ${e}=".+"$`),i=t.findIndex(n=>typeof n=="string"&&r.test(n));i>-1&&t.splice(i,1)}function Nb(t){return t.props.find(e=>e.type===7&&e.name==="model"&&e.exp)}function Ob(t,e){const r=e.options.isVoidTag||Os,i=t.ssrCodegenNode.elements;for(let l=0;l<i.length;l++)e.pushStringPart(i[l]);e.withSlotScopeId&&e.pushStringPart(te("_scopeId",!1)),e.pushStringPart(">");const n=ks.get(t);n?e.pushStringPart(n):t.children.length&&Jt(t,e),r(t.tag)||e.pushStringPart(`</${t.tag}>`)}const Gy=new WeakMap;function kb(t,e){return()=>{const r=ht(t,"tag");if(r){const i=t.props.filter(p=>p!==r),{props:n,directives:l}=ms(t,e,i,!0,!1,!0);let c=null;(n||l.length)&&(c=fe(e.helper($c),[qc(n,l,e)])),Gy.set(t,{tag:r,propsExp:c,scopeId:e.scopeId||null})}}}function Lb(t,e){const r=Gy.get(t);if(r){const{tag:i,propsExp:n,scopeId:l}=r;i.type===7?(e.pushStringPart("<"),e.pushStringPart(i.exp),n&&e.pushStringPart(n),l&&e.pushStringPart(` ${l}`),e.pushStringPart(">"),Jt(t,e,!1,!0,!0),e.pushStringPart("</"),e.pushStringPart(i.exp),e.pushStringPart(">")):(e.pushStringPart(`<${i.value.content}`),n&&e.pushStringPart(n),l&&e.pushStringPart(` ${l}`),e.pushStringPart(">"),Jt(t,e,!1,!0,!0),e.pushStringPart(`</${i.value.content}>`))}else Jt(t,e,!0,!0,!0)}const Hy=new WeakMap;function Mb(t,e){return()=>{const r=ht(t,"appear",!1,!0);Hy.set(t,!!r)}}function Rb(t,e){t.children=t.children.filter(i=>i.type!==3),Hy.get(t)?(e.pushStringPart("<template>"),Jt(t,e,!1,!0),e.pushStringPart("</template>")):Jt(t,e,!1,!0)}var Db=Object.defineProperty,Fb=Object.defineProperties,Bb=Object.getOwnPropertyDescriptors,dp=Object.getOwnPropertySymbols,$b=Object.prototype.hasOwnProperty,Ub=Object.prototype.propertyIsEnumerable,mp=(t,e,r)=>e in t?Db(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Ir=(t,e)=>{for(var r in e||(e={}))$b.call(e,r)&&mp(t,r,e[r]);if(dp)for(var r of dp(e))Ub.call(e,r)&&mp(t,r,e[r]);return t},qb=(t,e)=>Fb(t,Bb(e));const Xy=new WeakMap,Jy=Symbol(),Ky=new WeakMap,jb=(t,e)=>{if(t.type!==1||t.tagType!==1)return;const r=ca(t,e,!0),i=fr(r)&&r.callee===ti;if(Ky.set(t,r),pr(r))return r===us?Pb(t,e):r===ys?kb(t,e):r===Dr?Mb(t):void 0;const n=[],l=Tl(t);return function(){l.children.length&&Js(l,e,(m,y,g)=>(n.push(Xb(m,y,g,e)),St(void 0)));let p="null";if(t.props.length){const{props:m,directives:y}=ms(t,e,void 0,!0,i);(m||y.length)&&(p=qc(m,y,e))}const u=[];Xy.set(t,u);const f=(m,y,g,w)=>{const v=m&&la(m)||"_",T=St([v,"_push","_parent","_scopeId"],void 0,!0,!0,w);return u.push({type:Jy,fn:T,children:g,vnodeBranch:n[u.length]}),T},d=t.children.length?Js(t,e,f).slots:"null";typeof r!="string"?t.ssrCodegenNode=fe(e.helper(Oy),["_push",fe(e.helper(ei),[r,p,d]),"_parent"]):t.ssrCodegenNode=fe(e.helper(ky),[r,p,d,"_parent"])}};function Vb(t,e,r){const i=Ky.get(t);if(t.ssrCodegenNode){const n=Xy.get(t)||[];for(let l=0;l<n.length;l++){const{fn:c,vnodeBranch:p}=n[l];c.body=dn(te("_push",!1),vs(n[l],e,!1,!0),p)}e.withSlotScopeId&&t.ssrCodegenNode.arguments.push("_scopeId"),typeof i=="string"?e.pushStatement(fe("_push",[t.ssrCodegenNode])):e.pushStatement(t.ssrCodegenNode)}else{if(i===_r)return bb(t,e);if(i===us)return xb(t,e);if(i===ys)return Lb(t,e);if(r.type===Jy&&e.pushStringPart(""),i===Dr)return Rb(t,e);Jt(t,e)}}const Yy=new WeakMap,[zb,Wb]=cc(!0),Gb=[...zb,...Ec],Hb=Ir(Ir({},Wb),Tc);function Xb(t,e,r,i){const n=Yy.get(i.root),l=qb(Ir({},n),{nodeTransforms:[...Gb,...n.nodeTransforms||[]],directiveTransforms:Ir(Ir({},Hb),n.directiveTransforms||{})}),c=[];return t&&c.push({type:7,name:"slot",exp:t,arg:void 0,modifiers:[],loc:Le}),e&&c.push(Bt({},e)),Jb({type:1,ns:0,tag:"template",tagType:3,props:c,children:r,loc:Le,codegenNode:void 0},l,i),Wd(r)}function Jb(t,e,r){const i=Rr([t]),n=ii(i,e);n.ssr=!1,n.scopes=Ir({},r.scopes),n.identifiers=Ir({},r.identifiers),n.imports=r.imports,fs(i,n),["helpers","components","directives"].forEach(l=>{n[l].forEach((c,p)=>{if(l==="helpers"){const u=r.helpers.get(p);u===void 0?r.helpers.set(p,c):r.helpers.set(p,c+u)}else r[l].add(c)})})}function Tl(t){if($e(t))return t.map(Tl);if(Nd(t)){const e={};for(const r in t)e[r]=Tl(t[r]);return e}else return t}function Kb(t,e){const r=Qy(t,e);if(e.ssrCssVars){const n=ii(Rr([]),e),l=Ue(te(e.ssrCssVars,!1),n);r.body.push(je(["const _cssVars = { style: ",l,"}"])),Array.from(n.helpers.keys()).forEach(c=>{t.helpers.add(c)})}const i=t.children.length>1&&t.children.some(n=>!Ls(n));Jt(t,r,i),t.codegenNode=si(r.body),t.ssrHelpers=Array.from(new Set([...Array.from(t.helpers).filter(n=>n in El),...r.helpers])),t.helpers=new Set(Array.from(t.helpers).filter(n=>!(n in El)))}function Qy(t,e,r=new Set,i=!1){const n=[];let l=null;return{root:t,options:e,body:n,helpers:r,withSlotScopeId:i,onError:e.onError||(c=>{throw c}),helper(c){return r.add(c),c},pushStringPart(c){if(!l){const f=fe("_push");n.push(f),l=ql([]),f.arguments.push(l)}const p=l.elements,u=p[p.length-1];Se(c)&&Se(u)?p[p.length-1]+=c:p.push(c)},pushStatement(c){l=null,n.push(c)}}}function Yb(t,e=t.withSlotScopeId){return Qy(t.root,t.options,t.helpers,e)}function Jt(t,e,r=!1,i=!1,n=!1){r&&e.pushStringPart("<!--[-->");const{children:l}=t;for(let c=0;c<l.length;c++){const p=l[c];switch(p.type){case 1:switch(p.tagType){case 0:Ob(p,e);break;case 1:Vb(p,e,t);break;case 2:Tb(p,e);break;case 3:break;default:return e.onError(Ys(67,p.loc)),p}break;case 2:e.pushStringPart(Rt(p.content));break;case 3:n||e.pushStringPart(`<!--${p.content}-->`);break;case 5:e.pushStringPart(fe(e.helper(_n),[p.content]));break;case 9:gb(p,e,i,n);break;case 11:Sb(p,e,i);break;case 10:break;case 12:case 8:break;default:return e.onError(Ys(67,p.loc)),p}}r&&e.pushStringPart("<!--]-->")}function vs(t,e,r=!1,i=e.withSlotScopeId){const n=Yb(e,i);return Jt(t,n,r),si(n.body)}const Qb=(t,e,r)=>{const i=t.exp;function n(){const p=ht(e,"value");p&&r.onError(Ze(60,p.loc))}const l=p=>{p.forEach(u=>{u.type===1?c(u):u.type===11?l(u.children):u.type===9&&u.branches.forEach(f=>l(f.children))})};function c(p){if(p.tag==="option"){if(p.props.findIndex(u=>u.name==="selected")===-1){const u=yp(p);p.ssrCodegenNode.elements.push(Ct(fe(r.helper(Uc),[Ct(fe("Array.isArray",[i]),fe(r.helper(Sl),[i,u]),fe(r.helper(on),[i,u]))]),te(" selected",!0),te("",!0),!1))}}else p.tag==="optgroup"&&l(p.children)}if(e.tagType===0){const p={props:[]},u=[xe("value",i)];if(e.tag==="input"){const f=ht(e,"type");if(f){const d=yp(e);if(f.type===7)p.ssrTagParts=[fe(r.helper(Uy),[f.exp,i,d])];else if(f.value)switch(f.value.content){case"radio":p.props=[xe("checked",fe(r.helper(on),[i,d]))];break;case"checkbox":const m=ht(e,"true-value");if(m){const y=m.type===6?JSON.stringify(m.value.content):m.exp;p.props=[xe("checked",fe(r.helper(on),[i,y]))]}else p.props=[xe("checked",Ct(fe("Array.isArray",[i]),fe(r.helper(Sl),[i,d]),i))];break;case"file":r.onError(Ze(59,t.loc));break;default:n(),p.props=u;break}}else sa(e)||(n(),p.props=u)}else e.tag==="textarea"?(n(),e.children=[fn(i,i.loc)]):e.tag==="select"?l(e.children):r.onError(Ze(57,t.loc));return p}else return ha(t,e,r)};function yp(t){const e=ht(t,"value");return e?e.type===7?e.exp:te(e.value.content,!0):te("null",!1)}const Zb=(t,e,r)=>(t.exp||r.onError(Ze(61)),{props:[xe("style",Ct(t.exp,te("null",!1),ct([xe("display",te("none",!0))]),!1))]}),wl=t=>t.children.filter(e=>e.type!==3),ao=t=>wl(t).length===1,eP=(t,e)=>{if(t.type===0&&(e.identifiers._attrs=1),t.type===1&&t.tagType===1&&(t.tag==="transition"||t.tag==="Transition"||t.tag==="KeepAlive"||t.tag==="keep-alive")){const i=wl(e.root);if(i.length===1&&i[0]===t){ao(t)&&oo(t.children[0]);return}}const r=e.parent;if(!(!r||r.type!==0))if(t.type===10&&ao(t)){let i=!1;for(const n of wl(r))if(n.type===9||n.type===1&&Fe(n,"if")){if(i)return;i=!0}else if(!i||!(n.type===1&&Fe(n,/else/,!0)))return;oo(t.children[0])}else ao(r)&&oo(t)};function oo(t){t.type===1&&(t.tagType===0||t.tagType===1)&&!Fe(t,"for")&&t.props.push({type:7,name:"bind",arg:void 0,exp:te("_attrs",!1),modifiers:[],loc:Le})}const tP=(t,e)=>{if(!e.ssrCssVars)return;t.type===0&&(e.identifiers._cssVars=1);const r=e.parent;if(!(!r||r.type!==0))if(t.type===10)for(const i of t.children)An(i);else An(t)};function An(t){if(t.type===1&&(t.tagType===0||t.tagType===1)&&!Fe(t,"for"))if(t.tag==="suspense"||t.tag==="Suspense")for(const e of t.children)e.type===1&&e.tagType===3?e.children.forEach(An):An(e);else t.props.push({type:7,name:"bind",arg:void 0,exp:te("_cssVars",!1),modifiers:[],loc:Le})}var rP=Object.defineProperty,sP=Object.defineProperties,iP=Object.getOwnPropertyDescriptors,gp=Object.getOwnPropertySymbols,nP=Object.prototype.hasOwnProperty,aP=Object.prototype.propertyIsEnumerable,vp=(t,e,r)=>e in t?rP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Pi=(t,e)=>{for(var r in e||(e={}))nP.call(e,r)&&vp(t,r,e[r]);if(gp)for(var r of gp(e))aP.call(e,r)&&vp(t,r,e[r]);return t},Sp=(t,e)=>sP(t,iP(e));function oP(t,e={}){e=Sp(Pi(Pi({},e),cs),{ssr:!0,inSSR:!0,scopeId:e.mode==="function"?null:e.scopeId,prefixIdentifiers:!0,cacheHandlers:!1,hoistStatic:!1});const r=typeof t=="string"?ia(t,e):t;return Yy.set(r,e),Ql(r,Sp(Pi({},e),{hoistStatic:!1,nodeTransforms:[yb,vb,ac,ec,Eb,eP,tP,_b,jb,nc,gc,...e.nodeTransforms||[]],directiveTransforms:Pi({bind:rc,on:ua,model:Qb,show:Zb,cloak:Ms,once:Ms,memo:Ms},e.directiveTransforms||{})})),Kb(r,e),Zl(r,e)}var lP=Object.freeze({__proto__:null,compile:oP}),cP={},uP=Object.freeze({__proto__:null,default:cP}),hP=Yn(uP),jc=Yn(F1),pP=Yn(Uw);const Ep={};function $s(t){!(typeof process<"u"&&!0)&&!Ep[t]&&(Ep[t]=!0,Cn(t))}function Cn(t){console.warn(`\x1B[1m\x1B[33m[@vue/compiler-sfc]\x1B[0m\x1B[33m ${t}\x1B[0m
|
|
64
|
-
`)}var fP=Object.defineProperty,dP=Object.defineProperties,mP=Object.getOwnPropertyDescriptors,Tp=Object.getOwnPropertySymbols,yP=Object.prototype.hasOwnProperty,gP=Object.prototype.propertyIsEnumerable,wp=(t,e,r)=>e in t?fP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,In=(t,e)=>{for(var r in e||(e={}))yP.call(e,r)&&wp(t,r,e[r]);if(Tp)for(var r of Tp(e))gP.call(e,r)&&wp(t,r,e[r]);return t},bl=(t,e)=>dP(t,mP(e));function vP({source:t,filename:e,preprocessOptions:r},i){let n="",l=null;if(i.render(t,In({filename:e},r),(c,p)=>{c&&(l=c),n=p}),l)throw l;return n}function SP(t){const{preprocessLang:e,preprocessCustomRequire:r}=t;if(e&&!r)throw new Error("[@vue/compiler-sfc] Template preprocessing in the browser build must provide the `preprocessCustomRequire` option to return the in-browser version of the preprocessor in the shape of { render(): string }.");const i=e?r?r(e):void 0:!1;if(i)try{return bp(bl(In({},t),{source:vP(t,i),ast:void 0}))}catch(n){return{code:"export default function render() {}",source:t.source,tips:[],errors:[n]}}else return e?{code:"export default function render() {}",source:t.source,tips:[`Component ${t.filename} uses lang ${e} for template. Please install the language preprocessor.`],errors:[`Component ${t.filename} uses lang ${e} for template, however it is not installed.`]}:bp(t)}function bp({filename:t,id:e,scoped:r,slotted:i,inMap:n,source:l,ast:c,ssr:p=!1,ssrCssVars:u,isProd:f=!1,compiler:d,compilerOptions:m={},transformAssetUrls:y}){const g=[],w=[];let v=[];if(fr(y)){const O=ub(y);v=[hb(O),mb(O)]}else y!==!1&&(v=[Iy,Ny]);p&&!u&&$s("compileTemplate is called with `ssr: true` but no corresponding `cssVars` option."),e||($s("compileTemplate now requires the `id` option."),e="");const T=e.replace(/^data-v-/,""),E=`data-v-${T}`,x=p?lP:hl;if(d=d||x,d!==x&&(c=void 0),c
|
|
65
|
-
${Zs(
|
|
64
|
+
`)}var fP=Object.defineProperty,dP=Object.defineProperties,mP=Object.getOwnPropertyDescriptors,Tp=Object.getOwnPropertySymbols,yP=Object.prototype.hasOwnProperty,gP=Object.prototype.propertyIsEnumerable,wp=(t,e,r)=>e in t?fP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,In=(t,e)=>{for(var r in e||(e={}))yP.call(e,r)&&wp(t,r,e[r]);if(Tp)for(var r of Tp(e))gP.call(e,r)&&wp(t,r,e[r]);return t},bl=(t,e)=>dP(t,mP(e));function vP({source:t,filename:e,preprocessOptions:r},i){let n="",l=null;if(i.render(t,In({filename:e},r),(c,p)=>{c&&(l=c),n=p}),l)throw l;return n}function SP(t){const{preprocessLang:e,preprocessCustomRequire:r}=t;if(e&&!r)throw new Error("[@vue/compiler-sfc] Template preprocessing in the browser build must provide the `preprocessCustomRequire` option to return the in-browser version of the preprocessor in the shape of { render(): string }.");const i=e?r?r(e):void 0:!1;if(i)try{return bp(bl(In({},t),{source:vP(t,i),ast:void 0}))}catch(n){return{code:"export default function render() {}",source:t.source,tips:[],errors:[n]}}else return e?{code:"export default function render() {}",source:t.source,tips:[`Component ${t.filename} uses lang ${e} for template. Please install the language preprocessor.`],errors:[`Component ${t.filename} uses lang ${e} for template, however it is not installed.`]}:bp(t)}function bp({filename:t,id:e,scoped:r,slotted:i,inMap:n,source:l,ast:c,ssr:p=!1,ssrCssVars:u,isProd:f=!1,compiler:d,compilerOptions:m={},transformAssetUrls:y}){const g=[],w=[];let v=[];if(fr(y)){const O=ub(y);v=[hb(O),mb(O)]}else y!==!1&&(v=[Iy,Ny]);p&&!u&&$s("compileTemplate is called with `ssr: true` but no corresponding `cssVars` option."),e||($s("compileTemplate now requires the `id` option."),e="");const T=e.replace(/^data-v-/,""),E=`data-v-${T}`,x=p?lP:hl;if(d=d||x,d!==x&&(c=void 0),c?.transformed){const I=(p?hl:d).parse(c.source,bl(In({prefixIdentifiers:!0},m),{parseMode:"sfc",onError:k=>g.push(k)})).children.find(k=>k.type===1&&k.tag==="template");c=Rr(I.children,c.source)}let{code:A,ast:N,preamble:_,map:M}=d.compile(c||l,bl(In({mode:"module",prefixIdentifiers:!0,hoistStatic:!0,cacheHandlers:!0,ssrCssVars:p&&u&&u.length?Im(u,T,f,!0):"",scopeId:r?E:void 0,slotted:i,sourceMap:!0},m),{hmr:!f,nodeTransforms:v.concat(m.nodeTransforms||[]),filename:t,onError:O=>g.push(O),onWarn:O=>w.push(O)}));n&&!c&&(M&&(M=EP(n,M)),g.length&&TP(g,l,n));const D=w.map(O=>{let I=O.message;return O.loc&&(I+=`
|
|
65
|
+
${Zs(c?.source||l,O.loc.start.offset,O.loc.end.offset)}`),I});return{code:A,ast:N,preamble:_,source:l,errors:g,tips:D,map:M}}function EP(t,e){if(!t)return e;if(!e)return t;const r=new Ar.SourceMapConsumer(t),i=new Ar.SourceMapConsumer(e),n=new Ar.SourceMapGenerator;i.eachMapping(c=>{if(c.originalLine==null)return;const p=r.originalPositionFor({line:c.originalLine,column:c.originalColumn});p.source!=null&&n.addMapping({generated:{line:c.generatedLine,column:c.generatedColumn},original:{line:p.line,column:c.originalColumn},source:p.source,name:p.name})});const l=n;return r.sources.forEach(c=>{l._sources.add(c);const p=r.sourceContentFor(c);p!=null&&n.setSourceContent(c,p)}),l._sourceRoot=t.sourceRoot,l._file=t.file,l.toJSON()}function TP(t,e,r){const i=r.sourcesContent[0],n=i.indexOf(e),l=i.slice(0,n).split(/\r?\n/).length-1;t.forEach(c=>{c.loc&&(c.loc.start.line+=l,c.loc.start.offset+=n,c.loc.end!==c.loc.start&&(c.loc.end.line+=l,c.loc.end.offset+=n))})}var xi={exports:{}},Pp;function Zy(){if(Pp)return xi.exports;Pp=1;let t=pt||{},e=t.argv||[],r=t.env||{},i=!(r.NO_COLOR||e.includes("--no-color"))&&(!!r.FORCE_COLOR||e.includes("--color")||t.platform==="win32"||(t.stdout||{}).isTTY&&r.TERM!=="dumb"||!!r.CI),n=(p,u,f=p)=>d=>{let m=""+d,y=m.indexOf(u,p.length);return~y?p+l(m,u,f,y)+u:p+m+u},l=(p,u,f,d)=>{let m="",y=0;do m+=p.substring(y,d)+f,y=d+u.length,d=p.indexOf(u,y);while(~d);return m+p.substring(y)},c=(p=i)=>{let u=p?n:()=>String;return{isColorSupported:p,reset:u("\x1B[0m","\x1B[0m"),bold:u("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:u("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:u("\x1B[3m","\x1B[23m"),underline:u("\x1B[4m","\x1B[24m"),inverse:u("\x1B[7m","\x1B[27m"),hidden:u("\x1B[8m","\x1B[28m"),strikethrough:u("\x1B[9m","\x1B[29m"),black:u("\x1B[30m","\x1B[39m"),red:u("\x1B[31m","\x1B[39m"),green:u("\x1B[32m","\x1B[39m"),yellow:u("\x1B[33m","\x1B[39m"),blue:u("\x1B[34m","\x1B[39m"),magenta:u("\x1B[35m","\x1B[39m"),cyan:u("\x1B[36m","\x1B[39m"),white:u("\x1B[37m","\x1B[39m"),gray:u("\x1B[90m","\x1B[39m"),bgBlack:u("\x1B[40m","\x1B[49m"),bgRed:u("\x1B[41m","\x1B[49m"),bgGreen:u("\x1B[42m","\x1B[49m"),bgYellow:u("\x1B[43m","\x1B[49m"),bgBlue:u("\x1B[44m","\x1B[49m"),bgMagenta:u("\x1B[45m","\x1B[49m"),bgCyan:u("\x1B[46m","\x1B[49m"),bgWhite:u("\x1B[47m","\x1B[49m"),blackBright:u("\x1B[90m","\x1B[39m"),redBright:u("\x1B[91m","\x1B[39m"),greenBright:u("\x1B[92m","\x1B[39m"),yellowBright:u("\x1B[93m","\x1B[39m"),blueBright:u("\x1B[94m","\x1B[39m"),magentaBright:u("\x1B[95m","\x1B[39m"),cyanBright:u("\x1B[96m","\x1B[39m"),whiteBright:u("\x1B[97m","\x1B[39m"),bgBlackBright:u("\x1B[100m","\x1B[49m"),bgRedBright:u("\x1B[101m","\x1B[49m"),bgGreenBright:u("\x1B[102m","\x1B[49m"),bgYellowBright:u("\x1B[103m","\x1B[49m"),bgBlueBright:u("\x1B[104m","\x1B[49m"),bgMagentaBright:u("\x1B[105m","\x1B[49m"),bgCyanBright:u("\x1B[106m","\x1B[49m"),bgWhiteBright:u("\x1B[107m","\x1B[49m")}};return xi.exports=c(),xi.exports.createColors=c,xi.exports}var lo,xp;function eg(){if(xp)return lo;xp=1;const t=39,e=34,r=92,i=47,n=10,l=32,c=12,p=9,u=13,f=91,d=93,m=40,y=41,g=123,w=125,v=59,T=42,E=58,x=64,A=/[\t\n\f\r "#'()/;[\\\]{}]/g,N=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,_=/.[\r\n"'(/\\]/,M=/[\da-f]/i;return lo=function(O,I={}){let k=O.css.valueOf(),L=I.ignoreErrors,V,K,re,z,se,he,ne,ge,ve,Q,ie=k.length,G=0,j=[],U=[];function H(){return G}function B(Z){throw O.error("Unclosed "+Z,G)}function W(){return U.length===0&&G>=ie}function ue(Z){if(U.length)return U.pop();if(G>=ie)return;let ce=Z?Z.ignoreUnclosed:!1;switch(V=k.charCodeAt(G),V){case n:case l:case p:case u:case c:{z=G;do z+=1,V=k.charCodeAt(z);while(V===l||V===n||V===p||V===u||V===c);he=["space",k.slice(G,z)],G=z-1;break}case f:case d:case g:case w:case E:case v:case y:{let Ee=String.fromCharCode(V);he=[Ee,Ee,G];break}case m:{if(Q=j.length?j.pop()[1]:"",ve=k.charCodeAt(G+1),Q==="url"&&ve!==t&&ve!==e&&ve!==l&&ve!==n&&ve!==p&&ve!==c&&ve!==u){z=G;do{if(ne=!1,z=k.indexOf(")",z+1),z===-1)if(L||ce){z=G;break}else B("bracket");for(ge=z;k.charCodeAt(ge-1)===r;)ge-=1,ne=!ne}while(ne);he=["brackets",k.slice(G,z+1),G,z],G=z}else z=k.indexOf(")",G+1),K=k.slice(G,z+1),z===-1||_.test(K)?he=["(","(",G]:(he=["brackets",K,G,z],G=z);break}case t:case e:{se=V===t?"'":'"',z=G;do{if(ne=!1,z=k.indexOf(se,z+1),z===-1)if(L||ce){z=G+1;break}else B("string");for(ge=z;k.charCodeAt(ge-1)===r;)ge-=1,ne=!ne}while(ne);he=["string",k.slice(G,z+1),G,z],G=z;break}case x:{A.lastIndex=G+1,A.test(k),A.lastIndex===0?z=k.length-1:z=A.lastIndex-2,he=["at-word",k.slice(G,z+1),G,z],G=z;break}case r:{for(z=G,re=!0;k.charCodeAt(z+1)===r;)z+=1,re=!re;if(V=k.charCodeAt(z+1),re&&V!==i&&V!==l&&V!==n&&V!==p&&V!==u&&V!==c&&(z+=1,M.test(k.charAt(z)))){for(;M.test(k.charAt(z+1));)z+=1;k.charCodeAt(z+1)===l&&(z+=1)}he=["word",k.slice(G,z+1),G,z],G=z;break}default:{V===i&&k.charCodeAt(G+1)===T?(z=k.indexOf("*/",G+2)+1,z===0&&(L||ce?z=k.length:B("comment")),he=["comment",k.slice(G,z+1),G,z],G=z):(N.lastIndex=G+1,N.test(k),N.lastIndex===0?z=k.length-1:z=N.lastIndex-2,he=["word",k.slice(G,z+1),G,z],j.push(he),G=z);break}}return G++,he}function Y(Z){U.push(Z)}return{back:Y,endOfFile:W,nextToken:ue,position:H}},lo}var co,_p;function tg(){if(_p)return co;_p=1;let t=Zy(),e=eg(),r;function i(p){r=p}const n={";":t.yellow,":":t.yellow,"(":t.cyan,")":t.cyan,"[":t.yellow,"]":t.yellow,"{":t.yellow,"}":t.yellow,"at-word":t.cyan,brackets:t.cyan,call:t.cyan,class:t.yellow,comment:t.gray,hash:t.magenta,string:t.green};function l([p,u],f){if(p==="word"){if(u[0]===".")return"class";if(u[0]==="#")return"hash"}if(!f.endOfFile()){let d=f.nextToken();if(f.back(d),d[0]==="brackets"||d[0]==="(")return"call"}return p}function c(p){let u=e(new r(p),{ignoreErrors:!0}),f="";for(;!u.endOfFile();){let d=u.nextToken(),m=n[l(d,u)];m?f+=d[1].split(/\r?\n/).map(y=>m(y)).join(`
|
|
66
66
|
`):f+=d[1]}return f}return c.registerInput=i,co=c,co}var uo,Ap;function Vc(){if(Ap)return uo;Ap=1;let t=Zy(),e=tg();class r extends Error{constructor(n,l,c,p,u,f){super(n),this.name="CssSyntaxError",this.reason=n,u&&(this.file=u),p&&(this.source=p),f&&(this.plugin=f),typeof l<"u"&&typeof c<"u"&&(typeof l=="number"?(this.line=l,this.column=c):(this.line=l.line,this.column=l.column,this.endLine=c.line,this.endColumn=c.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(n){if(!this.source)return"";let l=this.source;n==null&&(n=t.isColorSupported);let c=g=>g,p=g=>g,u=g=>g;if(n){let{bold:g,gray:w,red:v}=t.createColors(!0);p=T=>g(v(T)),c=T=>w(T),e&&(u=T=>e(T))}let f=l.split(/\r?\n/),d=Math.max(this.line-3,0),m=Math.min(this.line+2,f.length),y=String(m).length;return f.slice(d,m).map((g,w)=>{let v=d+1+w,T=" "+(" "+v).slice(-y)+" | ";if(v===this.line){if(g.length>160){let x=20,A=Math.max(0,this.column-x),N=Math.max(this.column+x,this.endColumn+x),_=g.slice(A,N),M=c(T.replace(/\d/g," "))+g.slice(0,Math.min(this.column-1,x-1)).replace(/[^\t]/g," ");return p(">")+c(T)+u(_)+`
|
|
67
67
|
`+M+p("^")}let E=c(T.replace(/\d/g," "))+g.slice(0,this.column-1).replace(/[^\t]/g," ");return p(">")+c(T)+u(g)+`
|
|
68
68
|
`+E+p("^")}return" "+c(T)+u(g)}).join(`
|
|
@@ -125,7 +125,7 @@ If this previously worked in 3.2, you can instruct the compiler to ignore this e
|
|
|
125
125
|
|
|
126
126
|
interface Props extends /* @vue-ignore */ Base {}
|
|
127
127
|
|
|
128
|
-
Note: both in 3.2 or with the ignore, the properties in the base type are treated as fallthrough attrs at runtime.`,l,r)}return n}function Zx(t,e,r,i){const n={props:{}};let l;if(e.nameType){const{name:c,constraint:p}=e.typeParameter;r=au(r),Object.assign(r.types,Mn(Ln({},i),{[c]:p})),l=At(t,e.nameType,r)}else l=At(t,e.typeParameter.constraint,r);for(const c of l)n.props[c]=qs({type:"Identifier",name:c},e.typeAnnotation,r,!!e.optional);return n}function Bg(t,e,r){var i,n;if(e.indexType.type==="TSNumberKeyword")return $g(t,e.objectType,r);const{indexType:l,objectType:c}=e,p=[];let u,f;l.type==="TSStringKeyword"?(f=Ye(t,c,r),u=Object.keys(f.props)):(u=At(t,l,r),f=Ye(t,c,r));for(const d of u){const m=(n=(i=f.props[d])==null?void 0:i.typeAnnotation)==null?void 0:n.typeAnnotation;m&&(m._ownerScope=f.props[d]._ownerScope,p.push(m))}return p}function $g(t,e,r){if(e.type==="TSArrayType")return[e.elementType];if(e.type==="TSTupleType")return e.elementTypes.map(i=>i.type==="TSNamedTupleMember"?i.elementType:i);if(e.type==="TSTypeReference"){if(iu(e)==="Array"&&e.typeParameters)return e.typeParameters.params;{const i=Ut(t,e,r);if(i)return $g(t,i,r)}}return t.error("Failed to resolve element type from target type",e,r)}function At(t,e,r,i){switch(e.type){case"StringLiteral":return[e.value];case"TSLiteralType":return At(t,e.literal,r,i);case"TSUnionType":return e.types.map(n=>At(t,n,r,i)).flat();case"TemplateLiteral":return su(t,e,r);case"TSTypeReference":{const n=Ut(t,e,r);if(n)return At(t,n,r,i);if(e.typeName.type==="Identifier"){const l=e.typeName.name;if(i&&i[l])return At(t,i[l],r,i);const c=(p=0)=>At(t,e.typeParameters.params[p],r,i);switch(l){case"Extract":return c(1);case"Exclude":{const p=c(1);return c().filter(u=>!p.includes(u))}case"Uppercase":return c().map(p=>p.toUpperCase());case"Lowercase":return c().map(p=>p.toLowerCase());case"Capitalize":return c().map(cr);case"Uncapitalize":return c().map(p=>p[0].toLowerCase()+p.slice(1));default:t.error("Unsupported type when resolving index type",e.typeName,r)}}}}return t.error("Failed to resolve index type into finite keys",e,r)}function su(t,e,r){if(!e.expressions.length)return[e.quasis[0].value.raw];const i=[],n=e.expressions[0],l=e.quasis[0],c=l?l.value.raw:"",p=At(t,n,r),u=su(t,Mn(Ln({},e),{expressions:e.expressions.slice(1),quasis:l?e.quasis.slice(1):e.quasis}),r);for(const f of p)for(const d of u)i.push(c+f+d);return i}const e_=new Set(["Partial","Required","Readonly","Pick","Omit"]);function t_(t,e,r,i,n){const l=Ye(t,e.typeParameters.params[0],i,n);switch(r){case"Partial":{const u={props:{},calls:l.calls};return Object.keys(l.props).forEach(f=>{u.props[f]=Mn(Ln({},l.props[f]),{optional:!0})}),u}case"Required":{const u={props:{},calls:l.calls};return Object.keys(l.props).forEach(f=>{u.props[f]=Mn(Ln({},l.props[f]),{optional:!1})}),u}case"Readonly":return l;case"Pick":{const u=At(t,e.typeParameters.params[1],i,n),f={props:{},calls:l.calls};for(const d of u)f.props[d]=l.props[d];return f}case"Omit":const c=At(t,e.typeParameters.params[1],i,n),p={props:{},calls:l.calls};for(const u in l.props)c.includes(u)||(p.props[u]=l.props[u]);return p}}function Ut(t,e,r,i,n=!1){const l=!(r!=null&&r.isGenericScope);if(l&&e._resolvedReference)return e._resolvedReference;const c=Cl(t,r||_a(t),i||iu(e),e,n);return l?e._resolvedReference=c:c}function Cl(t,e,r,i,n){if(typeof r=="string"){if(e.imports[r])return s_(t,i,r,e);{const l=i.type==="TSTypeQuery"?n?e.exportedDeclares:e.declares:n?e.exportedTypes:e.types;if(l[r])return l[r];{const c=r_(t);if(c)for(const p of c){const u=i.type==="TSTypeQuery"?p.declares:p.types;if(u[r])return(t.deps||(t.deps=new Set)).add(p.filename),u[r]}}}}else{let l=Cl(t,e,r[0],i,n);if(l&&(l.type!=="TSModuleDeclaration"&&(l=l._ns),l)){const c=n_(t,l,l._ownerScope||e);return Cl(t,c,r.length>2?r.slice(1):r[r.length-1],i,!l.declare)}}}function iu(t){const e=t.type==="TSTypeReference"?t.typeName:t.type==="TSExpressionWithTypeArguments"?t.expression:t.type==="TSImportType"?t.qualifier:t.exprName;return(e==null?void 0:e.type)==="Identifier"?e.name:(e==null?void 0:e.type)==="TSQualifiedName"?Ug(e):"default"}function Ug(t){return t.type==="Identifier"?[t.name]:[...Ug(t.left),t.right.name]}function r_(t){if(t.options.globalTypeFiles){if(!nu(t))throw new Error("[vue/compiler-sfc] globalTypeFiles requires fs access.");return t.options.globalTypeFiles.map(r=>qg(t,Lg(r),!0))}}function nu(t){if(t.fs)return t.fs;const e=t.options.fs||void 0;if(e)return t.fs={fileExists(r){return r.endsWith(".vue.ts")&&!r.endsWith(".d.vue.ts")&&(r=r.replace(/\.ts$/,"")),e.fileExists(r)},readFile(r){return r.endsWith(".vue.ts")&&!r.endsWith(".d.vue.ts")&&(r=r.replace(/\.ts$/,"")),e.readFile(r)},realpath:e.realpath}}function s_(t,e,r,i){const{source:n,imported:l}=i.imports[r],c=xa(t,e,i,n);return Ut(t,e,c,l,!0)}function xa(t,e,r,i){let n;try{n=nu(t)}catch(c){return t.error(c.message,e,r)}if(!n)return t.error("No fs option provided to `compileScript` in non-Node environment. File system access is required for resolving imported types.",e,r);let l=r.resolvedImportSources[i];if(!l){if(i.startsWith("..")){const p=Us(En(r.filename),i);l=pd(p,n)}else if(i[0]==="."){const c=Us(En(r.filename),i);l=pd(c,n)}else return t.error("Type import from non-relative sources is not supported in the browser build.",e,r);l&&(l=r.resolvedImportSources[i]=Lg(l))}return l?((t.deps||(t.deps=new Set)).add(l),qg(t,l)):t.error(`Failed to resolve import source ${JSON.stringify(i)}.`,e,r)}function pd(t,e){t=t.replace(/\.js$/,"");const r=i=>{if(e.fileExists(i))return i};return r(t)||r(t+".ts")||r(t+".tsx")||r(t+".d.ts")||r(Us(t,"index.ts"))||r(Us(t,"index.tsx"))||r(Us(t,"index.d.ts"))}const fd=wc();function qg(t,e,r=!1){const i=fd.get(e);if(i)return i;const n=nu(t),l=n.readFile(e)||"",c=i_(e,l,n,t.options.babelParserPlugins),p=new ru(e,l,0,jg(c));return ou(t,c,p,r),fd.set(e,p),p}function i_(t,e,r,i){const n=_c(t);if(n===".ts"||n===".mts"||n===".tsx"||n===".mtsx")return It.parse(e,{plugins:cn(n.slice(1),i,/\.d\.m?ts$/.test(t)),sourceType:"module"}).program.body;const l=!/\.[cm]?[tj]sx?$/.test(t),c=`${t.slice(0,-n.length)}.d${n}.ts`;if(l&&r.fileExists(c))return It.parse(r.readFile(c),{plugins:cn("ts",i,!0),sourceType:"module"}).program.body;if(n===".vue"){const{descriptor:{script:u,scriptSetup:f}}=_1(e);if(!u&&!f)return[];const d=u?u.loc.start.offset:1/0,m=f?f.loc.start.offset:1/0,y=d<m?u:f,g=d<m?f:u;let w=" ".repeat(Math.min(d,m))+y.content;g&&(w+=" ".repeat(g.loc.start.offset-u.loc.end.offset)+g.content);const v=(u==null?void 0:u.lang)||(f==null?void 0:f.lang);return It.parse(w,{plugins:cn(v,i),sourceType:"module"}).program.body}return[]}function _a(t){if(t.scope)return t.scope;const e="ast"in t?t.ast:t.scriptAst?[...t.scriptAst.body,...t.scriptSetupAst.body]:t.scriptSetupAst.body,r=new ru(t.filename,t.source,"startOffset"in t?t.startOffset:0,"userImports"in t?Object.create(t.userImports):jg(e));return ou(t,e,r),t.scope=r}function n_(t,e,r){if(e._resolvedChildScope)return e._resolvedChildScope;const i=au(r);if(e.body.type==="TSModuleDeclaration"){const n=e.body;n._ownerScope=i;const l=Mr(n.id);i.types[l]=i.exportedTypes[l]=n}else ou(t,e.body.body,i);return e._resolvedChildScope=i}function au(t){return new ru(t.filename,t.source,t.offset,Object.create(t.imports),Object.create(t.types),Object.create(t.declares))}const a_=/^Import|^Export/;function ou(t,e,r,i=!1){const{types:n,declares:l,exportedTypes:c,exportedDeclares:p,imports:u}=r,f=i?!e.some(d=>a_.test(d.type)):!1;for(const d of e)if(i){if(f)d.declare&&vr(d,n,l);else if(d.type==="TSModuleDeclaration"&&d.global)for(const m of d.body.body)vr(m,n,l)}else vr(d,n,l);if(!i)for(const d of e)if(d.type==="ExportNamedDeclaration"){if(d.declaration)vr(d.declaration,n,l),vr(d.declaration,c,p);else for(const m of d.specifiers)if(m.type==="ExportSpecifier"){const y=m.local.name,g=Mr(m.exported);d.source?(u[g]={source:d.source.value,imported:y},c[g]={type:"TSTypeReference",typeName:{type:"Identifier",name:y},_ownerScope:r}):n[y]&&(c[g]=n[y])}}else if(d.type==="ExportAllDeclaration"){const m=xa(t,d.source,r,d.source.value);Object.assign(r.exportedTypes,m.exportedTypes)}else d.type==="ExportDefaultDeclaration"&&d.declaration&&(d.declaration.type!=="Identifier"?(vr(d.declaration,n,l,"default"),vr(d.declaration,c,p,"default")):n[d.declaration.name]&&(c.default=n[d.declaration.name]));for(const d of Object.keys(n)){const m=n[d];m._ownerScope=r,m._ns&&(m._ns._ownerScope=r)}for(const d of Object.keys(l))l[d]._ownerScope=r}function vr(t,e,r,i){switch(t.type){case"TSInterfaceDeclaration":case"TSEnumDeclaration":case"TSModuleDeclaration":{const n=i||Mr(t.id);let l=e[n];if(l){if(t.type==="TSModuleDeclaration"){l.type==="TSModuleDeclaration"?lu(l,t):dd(l,t);break}if(l.type==="TSModuleDeclaration"){e[n]=t,dd(t,l);break}if(l.type!==t.type)break;t.type==="TSInterfaceDeclaration"?l.body.body.push(...t.body.body):l.members.push(...t.members)}else e[n]=t;break}case"ClassDeclaration":(i||t.id)&&(e[i||Mr(t.id)]=t);break;case"TSTypeAliasDeclaration":e[t.id.name]=t.typeParameters?t:t.typeAnnotation;break;case"TSDeclareFunction":t.id&&(r[t.id.name]=t);break;case"VariableDeclaration":{if(t.declare)for(const n of t.declarations)n.id.type==="Identifier"&&n.id.typeAnnotation&&(r[n.id.name]=n.id.typeAnnotation.typeAnnotation);break}}}function lu(t,e){const r=t.body,i=e.body;r.type==="TSModuleDeclaration"?i.type==="TSModuleDeclaration"?lu(r,i):i.body.push({type:"ExportNamedDeclaration",declaration:r,exportKind:"type",specifiers:[]}):i.type==="TSModuleDeclaration"?r.body.push({type:"ExportNamedDeclaration",declaration:i,exportKind:"type",specifiers:[]}):r.body.push(...i.body)}function dd(t,e){t._ns?lu(t._ns,e):t._ns=e}function jg(t){const e=Object.create(null);for(const r of t)o_(r,e);return e}function o_(t,e){if(t.type==="ImportDeclaration")for(const r of t.specifiers)e[r.local.name]={imported:xl(r),source:t.source.value}}function Ke(t,e,r=e._ownerScope||_a(t),i=!1){try{switch(e.type){case"TSStringKeyword":return["String"];case"TSNumberKeyword":return["Number"];case"TSBooleanKeyword":return["Boolean"];case"TSObjectKeyword":return["Object"];case"TSNullKeyword":return["null"];case"TSTypeLiteral":case"TSInterfaceDeclaration":{const n=new Set,l=e.type==="TSTypeLiteral"?e.members:e.body.body;for(const c of l)if(i)if(c.type==="TSPropertySignature"&&c.key.type==="NumericLiteral")n.add("Number");else if(c.type==="TSIndexSignature"){const p=c.parameters[0].typeAnnotation;if(p&&p.type!=="Noop"){const u=Ke(t,p.typeAnnotation,r)[0];if(u===kt)return[kt];n.add(u)}}else n.add("String");else c.type==="TSCallSignatureDeclaration"||c.type==="TSConstructSignatureDeclaration"?n.add("Function"):n.add("Object");return n.size?Array.from(n):[i?kt:"Object"]}case"TSPropertySignature":if(e.typeAnnotation)return Ke(t,e.typeAnnotation.typeAnnotation,r);break;case"TSMethodSignature":case"TSFunctionType":return["Function"];case"TSArrayType":case"TSTupleType":return["Array"];case"TSLiteralType":switch(e.literal.type){case"StringLiteral":return["String"];case"BooleanLiteral":return["Boolean"];case"NumericLiteral":case"BigIntLiteral":return["Number"];default:return[kt]}case"TSTypeReference":{const n=Ut(t,e,r);if(n)return n.type==="TSTypeAliasDeclaration"&&n.typeAnnotation.type==="TSFunctionType"?["Function"]:Ke(t,n,n._ownerScope,i);if(e.typeName.type==="Identifier")if(i)switch(e.typeName.name){case"String":case"Array":case"ArrayLike":case"Parameters":case"ConstructorParameters":case"ReadonlyArray":return["String","Number"];case"Record":case"Partial":case"Required":case"Readonly":if(e.typeParameters&&e.typeParameters.params[0])return Ke(t,e.typeParameters.params[0],r,!0);break;case"Pick":case"Extract":if(e.typeParameters&&e.typeParameters.params[1])return Ke(t,e.typeParameters.params[1],r);break;case"Function":case"Object":case"Set":case"Map":case"WeakSet":case"WeakMap":case"Date":case"Promise":case"Error":case"Uppercase":case"Lowercase":case"Capitalize":case"Uncapitalize":case"ReadonlyMap":case"ReadonlySet":return["String"]}else switch(e.typeName.name){case"Array":case"Function":case"Object":case"Set":case"Map":case"WeakSet":case"WeakMap":case"Date":case"Promise":case"Error":return[e.typeName.name];case"Partial":case"Required":case"Readonly":case"Record":case"Pick":case"Omit":case"InstanceType":return["Object"];case"Uppercase":case"Lowercase":case"Capitalize":case"Uncapitalize":return["String"];case"Parameters":case"ConstructorParameters":case"ReadonlyArray":return["Array"];case"ReadonlyMap":return["Map"];case"ReadonlySet":return["Set"];case"NonNullable":if(e.typeParameters&&e.typeParameters.params[0])return Ke(t,e.typeParameters.params[0],r).filter(l=>l!=="null");break;case"Extract":if(e.typeParameters&&e.typeParameters.params[1])return Ke(t,e.typeParameters.params[1],r);break;case"Exclude":case"OmitThisParameter":if(e.typeParameters&&e.typeParameters.params[0])return Ke(t,e.typeParameters.params[0],r);break}break}case"TSParenthesizedType":return Ke(t,e.typeAnnotation,r);case"TSUnionType":return Yo(t,e.types,r,i);case"TSIntersectionType":return Yo(t,e.types,r,i).filter(n=>n!==kt);case"TSEnumDeclaration":return l_(e);case"TSSymbolKeyword":return["Symbol"];case"TSIndexedAccessType":{const n=Bg(t,e,r);return Yo(t,n,r,i)}case"ClassDeclaration":return["Object"];case"TSImportType":{const n=xa(t,e.argument,r,e.argument.value),l=Ut(t,e,n);if(l)return Ke(t,l,l._ownerScope);break}case"TSTypeQuery":{const n=e.exprName;if(n.type==="Identifier"){const l=r.declares[n.name];if(l)return Ke(t,l,l._ownerScope,i)}break}case"TSTypeOperator":return Ke(t,e.typeAnnotation,r,e.operator==="keyof");case"TSAnyKeyword":{if(i)return["String","Number","Symbol"];break}}}catch{}return[kt]}function Yo(t,e,r,i=!1){return e.length===1?Ke(t,e[0],r,i):[...new Set([].concat(...e.map(n=>Ke(t,n,r,i))))]}function l_(t){const e=new Set;for(const r of t.members)if(r.initializer)switch(r.initializer.type){case"StringLiteral":e.add("String");break;case"NumericLiteral":e.add("Number");break}return e.size?[...e]:["Number"]}function md({props:t},e){const r={props:{}};for(const i in t){const n=t[i];r.props[i]=Il(n.key,n.typeAnnotation.typeAnnotation,e)}return r}function Il(t,e,r,i=!0,n=!0){if(n&&e.type==="TSTypeLiteral"){const l=yd(e,"type");if(l){const c=yd(e,"required"),p=c&&c.type==="TSLiteralType"&&c.literal.type==="BooleanLiteral"?!c.literal.value:!0;return Il(t,l,r,p,!1)}}else if(e.type==="TSTypeReference"&&e.typeName.type==="Identifier"){if(e.typeName.name.endsWith("Constructor"))return qs(t,c_(e.typeName.name),r,i);if(e.typeName.name==="PropType"&&e.typeParameters)return qs(t,e.typeParameters.params[0],r,i)}if((e.type==="TSTypeReference"||e.type==="TSImportType")&&e.typeParameters)for(const l of e.typeParameters.params){const c=Il(t,l,r,i);if(c)return c}return qs(t,{type:"TSNullKeyword"},r,i)}function c_(t){const e=t.slice(0,-11);switch(e){case"String":case"Number":case"Boolean":return{type:`TS${e}Keyword`};case"Array":case"Function":case"Object":case"Set":case"Map":case"WeakSet":case"WeakMap":case"Date":case"Promise":return{type:"TSTypeReference",typeName:{type:"Identifier",name:e}}}return{type:"TSNullKeyword"}}function yd(t,e){const r=t.members.find(i=>i.type==="TSPropertySignature"&&!i.computed&&Mr(i.key)===e&&i.typeAnnotation);return r&&r.typeAnnotation.typeAnnotation}function u_(t,e,r){var i;let n=e;if((e.type==="TSTypeReference"||e.type==="TSTypeQuery"||e.type==="TSImportType")&&(n=Ut(t,e,r)),!!n){if(n.type==="TSFunctionType")return(i=n.typeAnnotation)==null?void 0:i.typeAnnotation;if(n.type==="TSDeclareFunction")return n.returnType}}function Vg(t,e,r){if(e.type==="TSTypeReference"){const n=Ut(t,e,r);n&&(e=n)}let i;return e.type==="TSUnionType"?i=e.types.flatMap(n=>Vg(t,n,r)):i=[e],i}const Aa="defineModel";function gd(t,e,r){if(!st(e,Aa))return!1;t.hasDefineModelCall=!0;const i=e.typeParameters&&e.typeParameters.params[0]||void 0;let n,l;const c=e.arguments[0]&&Et(e.arguments[0]),p=c&&c.type==="StringLiteral";p?(n=c.value,l=e.arguments[1]):(n="modelValue",l=c),t.modelDecls[n]&&t.error(`duplicate model name ${JSON.stringify(n)}`,e);let u=l&&t.getString(l),f=!l;const d=[];if(l&&l.type==="ObjectExpression"&&!l.properties.some(m=>m.type==="SpreadElement"||m.computed)){let m=0;for(let y=l.properties.length-1;y>=0;y--){const g=l.properties[y],w=l.properties[y+1],v=g.start,T=w?w.start:l.end-1;(g.type==="ObjectProperty"||g.type==="ObjectMethod")&&(g.key.type==="Identifier"&&(g.key.name==="get"||g.key.name==="set")||g.key.type==="StringLiteral"&&(g.key.value==="get"||g.key.value==="set"))?u=u.slice(0,v-l.start)+u.slice(T-l.start):(m++,t.s.remove(t.startOffset+v,t.startOffset+T),d.push(g))}m===l.properties.length&&(f=!0,t.s.remove(t.startOffset+(p?c.end:l.start),t.startOffset+l.end))}return t.modelDecls[n]={type:i,options:u,runtimeOptionNodes:d,identifier:r&&r.type==="Identifier"?r.name:void 0},t.bindingMetadata[n]="props",t.s.overwrite(t.startOffset+e.callee.start,t.startOffset+e.callee.end,t.helper("useModel")),t.s.appendLeft(t.startOffset+(e.arguments.length?e.arguments[0].start:e.end-1),"__props, "+(p?"":`${JSON.stringify(n)}${f?"":", "}`)),!0}function h_(t){if(!t.hasDefineModelCall)return;const e=!!t.options.isProd;let r="";for(const[i,{type:n,options:l}]of Object.entries(t.modelDecls)){let c=!1,p="",u=n&&Ke(t,n);if(u){const m=u.includes("Boolean"),y=u.includes("Function");u.includes(kt)&&(m||y?(u=u.filter(w=>w!==kt),c=!0):u=["null"]),e?(m||l&&y)&&(p=`type: ${Qr(u)}`):p=`type: ${Qr(u)}`+(c?", skipCheck: true":"")}let f;p&&l?f=t.isTS?`{ ${p}, ...${l} }`:`Object.assign({ ${p} }, ${l})`:p?f=`{ ${p} }`:l?f=l:f="{}",r+=`
|
|
128
|
+
Note: both in 3.2 or with the ignore, the properties in the base type are treated as fallthrough attrs at runtime.`,l,r)}return n}function Zx(t,e,r,i){const n={props:{}};let l;if(e.nameType){const{name:c,constraint:p}=e.typeParameter;r=au(r),Object.assign(r.types,Mn(Ln({},i),{[c]:p})),l=At(t,e.nameType,r)}else l=At(t,e.typeParameter.constraint,r);for(const c of l)n.props[c]=qs({type:"Identifier",name:c},e.typeAnnotation,r,!!e.optional);return n}function Bg(t,e,r){var i,n;if(e.indexType.type==="TSNumberKeyword")return $g(t,e.objectType,r);const{indexType:l,objectType:c}=e,p=[];let u,f;l.type==="TSStringKeyword"?(f=Ye(t,c,r),u=Object.keys(f.props)):(u=At(t,l,r),f=Ye(t,c,r));for(const d of u){const m=(n=(i=f.props[d])==null?void 0:i.typeAnnotation)==null?void 0:n.typeAnnotation;m&&(m._ownerScope=f.props[d]._ownerScope,p.push(m))}return p}function $g(t,e,r){if(e.type==="TSArrayType")return[e.elementType];if(e.type==="TSTupleType")return e.elementTypes.map(i=>i.type==="TSNamedTupleMember"?i.elementType:i);if(e.type==="TSTypeReference"){if(iu(e)==="Array"&&e.typeParameters)return e.typeParameters.params;{const i=Ut(t,e,r);if(i)return $g(t,i,r)}}return t.error("Failed to resolve element type from target type",e,r)}function At(t,e,r,i){switch(e.type){case"StringLiteral":return[e.value];case"TSLiteralType":return At(t,e.literal,r,i);case"TSUnionType":return e.types.map(n=>At(t,n,r,i)).flat();case"TemplateLiteral":return su(t,e,r);case"TSTypeReference":{const n=Ut(t,e,r);if(n)return At(t,n,r,i);if(e.typeName.type==="Identifier"){const l=e.typeName.name;if(i&&i[l])return At(t,i[l],r,i);const c=(p=0)=>At(t,e.typeParameters.params[p],r,i);switch(l){case"Extract":return c(1);case"Exclude":{const p=c(1);return c().filter(u=>!p.includes(u))}case"Uppercase":return c().map(p=>p.toUpperCase());case"Lowercase":return c().map(p=>p.toLowerCase());case"Capitalize":return c().map(cr);case"Uncapitalize":return c().map(p=>p[0].toLowerCase()+p.slice(1));default:t.error("Unsupported type when resolving index type",e.typeName,r)}}}}return t.error("Failed to resolve index type into finite keys",e,r)}function su(t,e,r){if(!e.expressions.length)return[e.quasis[0].value.raw];const i=[],n=e.expressions[0],l=e.quasis[0],c=l?l.value.raw:"",p=At(t,n,r),u=su(t,Mn(Ln({},e),{expressions:e.expressions.slice(1),quasis:l?e.quasis.slice(1):e.quasis}),r);for(const f of p)for(const d of u)i.push(c+f+d);return i}const e_=new Set(["Partial","Required","Readonly","Pick","Omit"]);function t_(t,e,r,i,n){const l=Ye(t,e.typeParameters.params[0],i,n);switch(r){case"Partial":{const u={props:{},calls:l.calls};return Object.keys(l.props).forEach(f=>{u.props[f]=Mn(Ln({},l.props[f]),{optional:!0})}),u}case"Required":{const u={props:{},calls:l.calls};return Object.keys(l.props).forEach(f=>{u.props[f]=Mn(Ln({},l.props[f]),{optional:!1})}),u}case"Readonly":return l;case"Pick":{const u=At(t,e.typeParameters.params[1],i,n),f={props:{},calls:l.calls};for(const d of u)f.props[d]=l.props[d];return f}case"Omit":const c=At(t,e.typeParameters.params[1],i,n),p={props:{},calls:l.calls};for(const u in l.props)c.includes(u)||(p.props[u]=l.props[u]);return p}}function Ut(t,e,r,i,n=!1){const l=!r?.isGenericScope;if(l&&e._resolvedReference)return e._resolvedReference;const c=Cl(t,r||_a(t),i||iu(e),e,n);return l?e._resolvedReference=c:c}function Cl(t,e,r,i,n){if(typeof r=="string"){if(e.imports[r])return s_(t,i,r,e);{const l=i.type==="TSTypeQuery"?n?e.exportedDeclares:e.declares:n?e.exportedTypes:e.types;if(l[r])return l[r];{const c=r_(t);if(c)for(const p of c){const u=i.type==="TSTypeQuery"?p.declares:p.types;if(u[r])return(t.deps||(t.deps=new Set)).add(p.filename),u[r]}}}}else{let l=Cl(t,e,r[0],i,n);if(l&&(l.type!=="TSModuleDeclaration"&&(l=l._ns),l)){const c=n_(t,l,l._ownerScope||e);return Cl(t,c,r.length>2?r.slice(1):r[r.length-1],i,!l.declare)}}}function iu(t){const e=t.type==="TSTypeReference"?t.typeName:t.type==="TSExpressionWithTypeArguments"?t.expression:t.type==="TSImportType"?t.qualifier:t.exprName;return e?.type==="Identifier"?e.name:e?.type==="TSQualifiedName"?Ug(e):"default"}function Ug(t){return t.type==="Identifier"?[t.name]:[...Ug(t.left),t.right.name]}function r_(t){if(t.options.globalTypeFiles){if(!nu(t))throw new Error("[vue/compiler-sfc] globalTypeFiles requires fs access.");return t.options.globalTypeFiles.map(r=>qg(t,Lg(r),!0))}}function nu(t){if(t.fs)return t.fs;const e=t.options.fs||void 0;if(e)return t.fs={fileExists(r){return r.endsWith(".vue.ts")&&!r.endsWith(".d.vue.ts")&&(r=r.replace(/\.ts$/,"")),e.fileExists(r)},readFile(r){return r.endsWith(".vue.ts")&&!r.endsWith(".d.vue.ts")&&(r=r.replace(/\.ts$/,"")),e.readFile(r)},realpath:e.realpath}}function s_(t,e,r,i){const{source:n,imported:l}=i.imports[r],c=xa(t,e,i,n);return Ut(t,e,c,l,!0)}function xa(t,e,r,i){let n;try{n=nu(t)}catch(c){return t.error(c.message,e,r)}if(!n)return t.error("No fs option provided to `compileScript` in non-Node environment. File system access is required for resolving imported types.",e,r);let l=r.resolvedImportSources[i];if(!l){if(i.startsWith("..")){const p=Us(En(r.filename),i);l=pd(p,n)}else if(i[0]==="."){const c=Us(En(r.filename),i);l=pd(c,n)}else return t.error("Type import from non-relative sources is not supported in the browser build.",e,r);l&&(l=r.resolvedImportSources[i]=Lg(l))}return l?((t.deps||(t.deps=new Set)).add(l),qg(t,l)):t.error(`Failed to resolve import source ${JSON.stringify(i)}.`,e,r)}function pd(t,e){t=t.replace(/\.js$/,"");const r=i=>{if(e.fileExists(i))return i};return r(t)||r(t+".ts")||r(t+".tsx")||r(t+".d.ts")||r(Us(t,"index.ts"))||r(Us(t,"index.tsx"))||r(Us(t,"index.d.ts"))}const fd=wc();function qg(t,e,r=!1){const i=fd.get(e);if(i)return i;const n=nu(t),l=n.readFile(e)||"",c=i_(e,l,n,t.options.babelParserPlugins),p=new ru(e,l,0,jg(c));return ou(t,c,p,r),fd.set(e,p),p}function i_(t,e,r,i){const n=_c(t);if(n===".ts"||n===".mts"||n===".tsx"||n===".mtsx")return It.parse(e,{plugins:cn(n.slice(1),i,/\.d\.m?ts$/.test(t)),sourceType:"module"}).program.body;const l=!/\.[cm]?[tj]sx?$/.test(t),c=`${t.slice(0,-n.length)}.d${n}.ts`;if(l&&r.fileExists(c))return It.parse(r.readFile(c),{plugins:cn("ts",i,!0),sourceType:"module"}).program.body;if(n===".vue"){const{descriptor:{script:u,scriptSetup:f}}=_1(e);if(!u&&!f)return[];const d=u?u.loc.start.offset:1/0,m=f?f.loc.start.offset:1/0,y=d<m?u:f,g=d<m?f:u;let w=" ".repeat(Math.min(d,m))+y.content;g&&(w+=" ".repeat(g.loc.start.offset-u.loc.end.offset)+g.content);const v=u?.lang||f?.lang;return It.parse(w,{plugins:cn(v,i),sourceType:"module"}).program.body}return[]}function _a(t){if(t.scope)return t.scope;const e="ast"in t?t.ast:t.scriptAst?[...t.scriptAst.body,...t.scriptSetupAst.body]:t.scriptSetupAst.body,r=new ru(t.filename,t.source,"startOffset"in t?t.startOffset:0,"userImports"in t?Object.create(t.userImports):jg(e));return ou(t,e,r),t.scope=r}function n_(t,e,r){if(e._resolvedChildScope)return e._resolvedChildScope;const i=au(r);if(e.body.type==="TSModuleDeclaration"){const n=e.body;n._ownerScope=i;const l=Mr(n.id);i.types[l]=i.exportedTypes[l]=n}else ou(t,e.body.body,i);return e._resolvedChildScope=i}function au(t){return new ru(t.filename,t.source,t.offset,Object.create(t.imports),Object.create(t.types),Object.create(t.declares))}const a_=/^Import|^Export/;function ou(t,e,r,i=!1){const{types:n,declares:l,exportedTypes:c,exportedDeclares:p,imports:u}=r,f=i?!e.some(d=>a_.test(d.type)):!1;for(const d of e)if(i){if(f)d.declare&&vr(d,n,l);else if(d.type==="TSModuleDeclaration"&&d.global)for(const m of d.body.body)vr(m,n,l)}else vr(d,n,l);if(!i)for(const d of e)if(d.type==="ExportNamedDeclaration"){if(d.declaration)vr(d.declaration,n,l),vr(d.declaration,c,p);else for(const m of d.specifiers)if(m.type==="ExportSpecifier"){const y=m.local.name,g=Mr(m.exported);d.source?(u[g]={source:d.source.value,imported:y},c[g]={type:"TSTypeReference",typeName:{type:"Identifier",name:y},_ownerScope:r}):n[y]&&(c[g]=n[y])}}else if(d.type==="ExportAllDeclaration"){const m=xa(t,d.source,r,d.source.value);Object.assign(r.exportedTypes,m.exportedTypes)}else d.type==="ExportDefaultDeclaration"&&d.declaration&&(d.declaration.type!=="Identifier"?(vr(d.declaration,n,l,"default"),vr(d.declaration,c,p,"default")):n[d.declaration.name]&&(c.default=n[d.declaration.name]));for(const d of Object.keys(n)){const m=n[d];m._ownerScope=r,m._ns&&(m._ns._ownerScope=r)}for(const d of Object.keys(l))l[d]._ownerScope=r}function vr(t,e,r,i){switch(t.type){case"TSInterfaceDeclaration":case"TSEnumDeclaration":case"TSModuleDeclaration":{const n=i||Mr(t.id);let l=e[n];if(l){if(t.type==="TSModuleDeclaration"){l.type==="TSModuleDeclaration"?lu(l,t):dd(l,t);break}if(l.type==="TSModuleDeclaration"){e[n]=t,dd(t,l);break}if(l.type!==t.type)break;t.type==="TSInterfaceDeclaration"?l.body.body.push(...t.body.body):l.members.push(...t.members)}else e[n]=t;break}case"ClassDeclaration":(i||t.id)&&(e[i||Mr(t.id)]=t);break;case"TSTypeAliasDeclaration":e[t.id.name]=t.typeParameters?t:t.typeAnnotation;break;case"TSDeclareFunction":t.id&&(r[t.id.name]=t);break;case"VariableDeclaration":{if(t.declare)for(const n of t.declarations)n.id.type==="Identifier"&&n.id.typeAnnotation&&(r[n.id.name]=n.id.typeAnnotation.typeAnnotation);break}}}function lu(t,e){const r=t.body,i=e.body;r.type==="TSModuleDeclaration"?i.type==="TSModuleDeclaration"?lu(r,i):i.body.push({type:"ExportNamedDeclaration",declaration:r,exportKind:"type",specifiers:[]}):i.type==="TSModuleDeclaration"?r.body.push({type:"ExportNamedDeclaration",declaration:i,exportKind:"type",specifiers:[]}):r.body.push(...i.body)}function dd(t,e){t._ns?lu(t._ns,e):t._ns=e}function jg(t){const e=Object.create(null);for(const r of t)o_(r,e);return e}function o_(t,e){if(t.type==="ImportDeclaration")for(const r of t.specifiers)e[r.local.name]={imported:xl(r),source:t.source.value}}function Ke(t,e,r=e._ownerScope||_a(t),i=!1){try{switch(e.type){case"TSStringKeyword":return["String"];case"TSNumberKeyword":return["Number"];case"TSBooleanKeyword":return["Boolean"];case"TSObjectKeyword":return["Object"];case"TSNullKeyword":return["null"];case"TSTypeLiteral":case"TSInterfaceDeclaration":{const n=new Set,l=e.type==="TSTypeLiteral"?e.members:e.body.body;for(const c of l)if(i)if(c.type==="TSPropertySignature"&&c.key.type==="NumericLiteral")n.add("Number");else if(c.type==="TSIndexSignature"){const p=c.parameters[0].typeAnnotation;if(p&&p.type!=="Noop"){const u=Ke(t,p.typeAnnotation,r)[0];if(u===kt)return[kt];n.add(u)}}else n.add("String");else c.type==="TSCallSignatureDeclaration"||c.type==="TSConstructSignatureDeclaration"?n.add("Function"):n.add("Object");return n.size?Array.from(n):[i?kt:"Object"]}case"TSPropertySignature":if(e.typeAnnotation)return Ke(t,e.typeAnnotation.typeAnnotation,r);break;case"TSMethodSignature":case"TSFunctionType":return["Function"];case"TSArrayType":case"TSTupleType":return["Array"];case"TSLiteralType":switch(e.literal.type){case"StringLiteral":return["String"];case"BooleanLiteral":return["Boolean"];case"NumericLiteral":case"BigIntLiteral":return["Number"];default:return[kt]}case"TSTypeReference":{const n=Ut(t,e,r);if(n)return n.type==="TSTypeAliasDeclaration"&&n.typeAnnotation.type==="TSFunctionType"?["Function"]:Ke(t,n,n._ownerScope,i);if(e.typeName.type==="Identifier")if(i)switch(e.typeName.name){case"String":case"Array":case"ArrayLike":case"Parameters":case"ConstructorParameters":case"ReadonlyArray":return["String","Number"];case"Record":case"Partial":case"Required":case"Readonly":if(e.typeParameters&&e.typeParameters.params[0])return Ke(t,e.typeParameters.params[0],r,!0);break;case"Pick":case"Extract":if(e.typeParameters&&e.typeParameters.params[1])return Ke(t,e.typeParameters.params[1],r);break;case"Function":case"Object":case"Set":case"Map":case"WeakSet":case"WeakMap":case"Date":case"Promise":case"Error":case"Uppercase":case"Lowercase":case"Capitalize":case"Uncapitalize":case"ReadonlyMap":case"ReadonlySet":return["String"]}else switch(e.typeName.name){case"Array":case"Function":case"Object":case"Set":case"Map":case"WeakSet":case"WeakMap":case"Date":case"Promise":case"Error":return[e.typeName.name];case"Partial":case"Required":case"Readonly":case"Record":case"Pick":case"Omit":case"InstanceType":return["Object"];case"Uppercase":case"Lowercase":case"Capitalize":case"Uncapitalize":return["String"];case"Parameters":case"ConstructorParameters":case"ReadonlyArray":return["Array"];case"ReadonlyMap":return["Map"];case"ReadonlySet":return["Set"];case"NonNullable":if(e.typeParameters&&e.typeParameters.params[0])return Ke(t,e.typeParameters.params[0],r).filter(l=>l!=="null");break;case"Extract":if(e.typeParameters&&e.typeParameters.params[1])return Ke(t,e.typeParameters.params[1],r);break;case"Exclude":case"OmitThisParameter":if(e.typeParameters&&e.typeParameters.params[0])return Ke(t,e.typeParameters.params[0],r);break}break}case"TSParenthesizedType":return Ke(t,e.typeAnnotation,r);case"TSUnionType":return Yo(t,e.types,r,i);case"TSIntersectionType":return Yo(t,e.types,r,i).filter(n=>n!==kt);case"TSEnumDeclaration":return l_(e);case"TSSymbolKeyword":return["Symbol"];case"TSIndexedAccessType":{const n=Bg(t,e,r);return Yo(t,n,r,i)}case"ClassDeclaration":return["Object"];case"TSImportType":{const n=xa(t,e.argument,r,e.argument.value),l=Ut(t,e,n);if(l)return Ke(t,l,l._ownerScope);break}case"TSTypeQuery":{const n=e.exprName;if(n.type==="Identifier"){const l=r.declares[n.name];if(l)return Ke(t,l,l._ownerScope,i)}break}case"TSTypeOperator":return Ke(t,e.typeAnnotation,r,e.operator==="keyof");case"TSAnyKeyword":{if(i)return["String","Number","Symbol"];break}}}catch{}return[kt]}function Yo(t,e,r,i=!1){return e.length===1?Ke(t,e[0],r,i):[...new Set([].concat(...e.map(n=>Ke(t,n,r,i))))]}function l_(t){const e=new Set;for(const r of t.members)if(r.initializer)switch(r.initializer.type){case"StringLiteral":e.add("String");break;case"NumericLiteral":e.add("Number");break}return e.size?[...e]:["Number"]}function md({props:t},e){const r={props:{}};for(const i in t){const n=t[i];r.props[i]=Il(n.key,n.typeAnnotation.typeAnnotation,e)}return r}function Il(t,e,r,i=!0,n=!0){if(n&&e.type==="TSTypeLiteral"){const l=yd(e,"type");if(l){const c=yd(e,"required"),p=c&&c.type==="TSLiteralType"&&c.literal.type==="BooleanLiteral"?!c.literal.value:!0;return Il(t,l,r,p,!1)}}else if(e.type==="TSTypeReference"&&e.typeName.type==="Identifier"){if(e.typeName.name.endsWith("Constructor"))return qs(t,c_(e.typeName.name),r,i);if(e.typeName.name==="PropType"&&e.typeParameters)return qs(t,e.typeParameters.params[0],r,i)}if((e.type==="TSTypeReference"||e.type==="TSImportType")&&e.typeParameters)for(const l of e.typeParameters.params){const c=Il(t,l,r,i);if(c)return c}return qs(t,{type:"TSNullKeyword"},r,i)}function c_(t){const e=t.slice(0,-11);switch(e){case"String":case"Number":case"Boolean":return{type:`TS${e}Keyword`};case"Array":case"Function":case"Object":case"Set":case"Map":case"WeakSet":case"WeakMap":case"Date":case"Promise":return{type:"TSTypeReference",typeName:{type:"Identifier",name:e}}}return{type:"TSNullKeyword"}}function yd(t,e){const r=t.members.find(i=>i.type==="TSPropertySignature"&&!i.computed&&Mr(i.key)===e&&i.typeAnnotation);return r&&r.typeAnnotation.typeAnnotation}function u_(t,e,r){var i;let n=e;if((e.type==="TSTypeReference"||e.type==="TSTypeQuery"||e.type==="TSImportType")&&(n=Ut(t,e,r)),!!n){if(n.type==="TSFunctionType")return(i=n.typeAnnotation)==null?void 0:i.typeAnnotation;if(n.type==="TSDeclareFunction")return n.returnType}}function Vg(t,e,r){if(e.type==="TSTypeReference"){const n=Ut(t,e,r);n&&(e=n)}let i;return e.type==="TSUnionType"?i=e.types.flatMap(n=>Vg(t,n,r)):i=[e],i}const Aa="defineModel";function gd(t,e,r){if(!st(e,Aa))return!1;t.hasDefineModelCall=!0;const i=e.typeParameters&&e.typeParameters.params[0]||void 0;let n,l;const c=e.arguments[0]&&Et(e.arguments[0]),p=c&&c.type==="StringLiteral";p?(n=c.value,l=e.arguments[1]):(n="modelValue",l=c),t.modelDecls[n]&&t.error(`duplicate model name ${JSON.stringify(n)}`,e);let u=l&&t.getString(l),f=!l;const d=[];if(l&&l.type==="ObjectExpression"&&!l.properties.some(m=>m.type==="SpreadElement"||m.computed)){let m=0;for(let y=l.properties.length-1;y>=0;y--){const g=l.properties[y],w=l.properties[y+1],v=g.start,T=w?w.start:l.end-1;(g.type==="ObjectProperty"||g.type==="ObjectMethod")&&(g.key.type==="Identifier"&&(g.key.name==="get"||g.key.name==="set")||g.key.type==="StringLiteral"&&(g.key.value==="get"||g.key.value==="set"))?u=u.slice(0,v-l.start)+u.slice(T-l.start):(m++,t.s.remove(t.startOffset+v,t.startOffset+T),d.push(g))}m===l.properties.length&&(f=!0,t.s.remove(t.startOffset+(p?c.end:l.start),t.startOffset+l.end))}return t.modelDecls[n]={type:i,options:u,runtimeOptionNodes:d,identifier:r&&r.type==="Identifier"?r.name:void 0},t.bindingMetadata[n]="props",t.s.overwrite(t.startOffset+e.callee.start,t.startOffset+e.callee.end,t.helper("useModel")),t.s.appendLeft(t.startOffset+(e.arguments.length?e.arguments[0].start:e.end-1),"__props, "+(p?"":`${JSON.stringify(n)}${f?"":", "}`)),!0}function h_(t){if(!t.hasDefineModelCall)return;const e=!!t.options.isProd;let r="";for(const[i,{type:n,options:l}]of Object.entries(t.modelDecls)){let c=!1,p="",u=n&&Ke(t,n);if(u){const m=u.includes("Boolean"),y=u.includes("Function");u.includes(kt)&&(m||y?(u=u.filter(w=>w!==kt),c=!0):u=["null"]),e?(m||l&&y)&&(p=`type: ${Qr(u)}`):p=`type: ${Qr(u)}`+(c?", skipCheck: true":"")}let f;p&&l?f=t.isTS?`{ ${p}, ...${l} }`:`Object.assign({ ${p} }, ${l})`:p?f=`{ ${p} }`:l?f=l:f="{}",r+=`
|
|
129
129
|
${JSON.stringify(i)}: ${f},`;const d=JSON.stringify(i==="modelValue"?"modelModifiers":`${i}Modifiers`);r+=`
|
|
130
130
|
${d}: {},`}return`{${r}
|
|
131
131
|
}`}const He="defineProps",wr="withDefaults";function Nl(t,e,r,i=!1){if(!st(e,He))return p_(t,e,r);if(t.hasDefinePropsCall&&t.error(`duplicate ${He}() call`,e),t.hasDefinePropsCall=!0,t.propsRuntimeDecl=e.arguments[0],t.propsRuntimeDecl)for(const n of Al(t.propsRuntimeDecl))n in t.bindingMetadata||(t.bindingMetadata[n]="props");return e.typeParameters&&(t.propsRuntimeDecl&&t.error(`${He}() cannot accept both type and non-type arguments at the same time. Use one or the other.`,e),t.propsTypeDecl=e.typeParameters.params[0]),!i&&r&&r.type==="ObjectPattern"&&S_(t,r),t.propsCall=e,t.propsDecl=r,!0}function p_(t,e,r){return st(e,wr)?(Nl(t,e.arguments[0],r,!0)||t.error(`${wr}' first argument must be a ${He} call.`,e.arguments[0]||e),t.propsRuntimeDecl&&t.error(`${wr} can only be used with type-based ${He} declaration.`,e),r&&r.type==="ObjectPattern"&&t.warn(`${wr}() is unnecessary when using destructure with ${He}().
|
|
@@ -136,7 +136,7 @@ Prefer using destructure default values, e.g. const { foo = 1 } = defineProps(..
|
|
|
136
136
|
})`)}}else t.propsTypeDecl&&(e=d_(t));const r=h_(t);return e&&r?`/*@__PURE__*/${t.helper("mergeModels")}(${e}, ${r})`:r||e}function d_(t){const e=m_(t,t.propsTypeDecl);if(!e.length)return;const r=[],i=g_(t);for(const l of e)r.push(y_(t,l,i)),"bindingMetadata"in t&&!(l.key in t.bindingMetadata)&&(t.bindingMetadata[l.key]="props");let n=`{
|
|
137
137
|
${r.join(`,
|
|
138
138
|
`)}
|
|
139
|
-
}`;return t.propsRuntimeDefaults&&!i&&(n=`/*@__PURE__*/${t.helper("mergeDefaults")}(${n}, ${t.getString(t.propsRuntimeDefaults)})`),n}function m_(t,e){const r=[],i=Ye(t,e);for(const n in i.props){const l=i.props[n];let c=Ke(t,l),p=!1;c.includes(kt)&&(c.includes("Boolean")||c.includes("Function")?(c=c.filter(u=>u!==kt),p=!0):c=["null"]),r.push({key:n,required:!l.optional,type:c||["null"],skipCheck:p})}return r}function y_(t,{key:e,required:r,type:i,skipCheck:n},l){let c;const p=zg(t,e,i);if(p)c=`default: ${p.valueString}${p.needSkipFactory?", skipFactory: true":""}`;else if(l){const f=t.propsRuntimeDefaults.properties.find(d=>d.type==="SpreadElement"?!1:tu(d.key,d.computed)===e);f&&(f.type==="ObjectProperty"?c=`default: ${t.getString(f.value)}`:c=`${f.async?"async ":""}${f.kind!=="method"?`${f.kind} `:""}default() ${t.getString(f.body)}`)}const u=Mg(e);return t.options.isProd?i.some(f=>f==="Boolean"||(!l||c)&&f==="Function")?`${u}: { ${Zf([`type: ${Qr(i)}`,c])} }`:t.isCE?c?`${u}: ${`{ ${c}, type: ${Qr(i)} }`}`:`${u}: {type: ${Qr(i)}}`:`${u}: ${c?`{ ${c} }`:"{}"}`:`${u}: { ${Zf([`type: ${Qr(i)}`,`required: ${r}`,n&&"skipCheck: true",c])} }`}function g_(t){return!!(t.propsRuntimeDefaults&&t.propsRuntimeDefaults.type==="ObjectExpression"&&t.propsRuntimeDefaults.properties.every(e=>e.type!=="SpreadElement"&&(!e.computed||e.key.type.endsWith("Literal"))))}function zg(t,e,r){const i=t.propsDestructuredBindings[e],n=i&&i.default;if(n){const l=t.getString(n),c=Et(n);if(r&&r.length&&!r.includes("null")){const f=v_(c);f&&!r.includes(f)&&t.error(`Default value of prop "${e}" does not match declared type.`,c)}const p=!r&&(lr(c)||c.type==="Identifier");return{valueString:!p&&!kg(c)&&!
|
|
139
|
+
}`;return t.propsRuntimeDefaults&&!i&&(n=`/*@__PURE__*/${t.helper("mergeDefaults")}(${n}, ${t.getString(t.propsRuntimeDefaults)})`),n}function m_(t,e){const r=[],i=Ye(t,e);for(const n in i.props){const l=i.props[n];let c=Ke(t,l),p=!1;c.includes(kt)&&(c.includes("Boolean")||c.includes("Function")?(c=c.filter(u=>u!==kt),p=!0):c=["null"]),r.push({key:n,required:!l.optional,type:c||["null"],skipCheck:p})}return r}function y_(t,{key:e,required:r,type:i,skipCheck:n},l){let c;const p=zg(t,e,i);if(p)c=`default: ${p.valueString}${p.needSkipFactory?", skipFactory: true":""}`;else if(l){const f=t.propsRuntimeDefaults.properties.find(d=>d.type==="SpreadElement"?!1:tu(d.key,d.computed)===e);f&&(f.type==="ObjectProperty"?c=`default: ${t.getString(f.value)}`:c=`${f.async?"async ":""}${f.kind!=="method"?`${f.kind} `:""}default() ${t.getString(f.body)}`)}const u=Mg(e);return t.options.isProd?i.some(f=>f==="Boolean"||(!l||c)&&f==="Function")?`${u}: { ${Zf([`type: ${Qr(i)}`,c])} }`:t.isCE?c?`${u}: ${`{ ${c}, type: ${Qr(i)} }`}`:`${u}: {type: ${Qr(i)}}`:`${u}: ${c?`{ ${c} }`:"{}"}`:`${u}: { ${Zf([`type: ${Qr(i)}`,`required: ${r}`,n&&"skipCheck: true",c])} }`}function g_(t){return!!(t.propsRuntimeDefaults&&t.propsRuntimeDefaults.type==="ObjectExpression"&&t.propsRuntimeDefaults.properties.every(e=>e.type!=="SpreadElement"&&(!e.computed||e.key.type.endsWith("Literal"))))}function zg(t,e,r){const i=t.propsDestructuredBindings[e],n=i&&i.default;if(n){const l=t.getString(n),c=Et(n);if(r&&r.length&&!r.includes("null")){const f=v_(c);f&&!r.includes(f)&&t.error(`Default value of prop "${e}" does not match declared type.`,c)}const p=!r&&(lr(c)||c.type==="Identifier");return{valueString:!p&&!kg(c)&&!r?.includes("Function")?`() => (${l})`:l,needSkipFactory:p}}}function v_(t){switch(t.type){case"StringLiteral":return"String";case"NumericLiteral":return"Number";case"BooleanLiteral":return"Boolean";case"ObjectExpression":return"Object";case"ArrayExpression":return"Array";case"FunctionExpression":case"ArrowFunctionExpression":return"Function"}}function S_(t,e){if(t.options.propsDestructure==="error")t.error("Props destructure is explicitly prohibited via config.",e);else if(t.options.propsDestructure===!1)return;t.propsDestructureDecl=e;const r=(i,n,l)=>{t.propsDestructuredBindings[i]={local:n,default:l},n!==i&&(t.bindingMetadata[n]="props-aliased",(t.bindingMetadata.__propsAliases||(t.bindingMetadata.__propsAliases={}))[n]=i)};for(const i of e.properties)if(i.type==="ObjectProperty"){const n=tu(i.key,i.computed);if(n||t.error(`${He}() destructure cannot use computed key.`,i.key),i.value.type==="AssignmentPattern"){const{left:l,right:c}=i.value;l.type!=="Identifier"&&t.error(`${He}() destructure does not support nested patterns.`,l),r(n,l.name,c)}else i.value.type==="Identifier"?r(n,i.value.name):t.error(`${He}() destructure does not support nested patterns.`,i.value)}else t.propsDestructureRestId=i.argument.name,t.bindingMetadata[t.propsDestructureRestId]="setup-reactive-const"}function E_(t,e){if(t.options.propsDestructure===!1)return;const r=Object.create(null),i=[r];let n=r;const l=new WeakSet,c=[],p=Object.create(null);for(const T in t.propsDestructuredBindings){const{local:E}=t.propsDestructuredBindings[T];r[E]=!0,p[E]=T}function u(){i.push(n=Object.create(n))}function f(){i.pop(),n=i[i.length-1]||null}function d(T){l.add(T),n?n[T.name]=!1:t.error("registerBinding called without active scope, something is wrong.",T)}function m(T,E=!1){for(const x of T.body)if(x.type==="VariableDeclaration")y(x,E);else if(x.type==="FunctionDeclaration"||x.type==="ClassDeclaration"){if(x.declare||!x.id)continue;d(x.id)}else(x.type==="ForOfStatement"||x.type==="ForInStatement")&&x.left.type==="VariableDeclaration"?y(x.left):x.type==="ExportNamedDeclaration"&&x.declaration&&x.declaration.type==="VariableDeclaration"?y(x.declaration,E):x.type==="LabeledStatement"&&x.body.type==="VariableDeclaration"&&y(x.body,E)}function y(T,E=!1){if(!T.declare)for(const x of T.declarations){const A=E&&x.init&&st(Et(x.init),"defineProps");for(const N of _t(x.id))A?l.add(N):d(N)}}function g(T,E,x){(E.type==="AssignmentExpression"&&T===E.left||E.type==="UpdateExpression")&&t.error("Cannot assign to destructured props as they are readonly.",T),ea(E)&&E.shorthand?(!E.inPattern||Zn(E,x))&&t.s.appendLeft(T.end+t.startOffset,`: ${un(p[T.name])}`):t.s.overwrite(T.start+t.startOffset,T.end+t.startOffset,un(p[T.name]))}function w(T,E,x=E){if(st(T,x)){const A=Et(T.arguments[0]);A.type==="Identifier"&&n[A.name]&&t.error(`"${A.name}" is a destructured prop and should not be passed directly to ${E}(). Pass a getter () => ${A.name} instead.`,A)}}const v=t.scriptSetupAst;m(v,!0),zl(v,{enter(T,E){if(E&&c.push(E),E&&E.type.startsWith("TS")&&!ta.includes(E.type))return this.skip();if(w(T,"watch",e.watch),w(T,"toRef",e.toRef),lr(T)){u(),Gl(T,d),T.body.type==="BlockStatement"&&m(T.body);return}if(T.type==="CatchClause"){u(),T.param&&T.param.type==="Identifier"&&d(T.param),m(T.body);return}if(T.type==="BlockStatement"&&!lr(E)){u(),m(T);return}T.type==="Identifier"&&Wl(T,E,c)&&!l.has(T)&&n[T.name]&&g(T,E,c)},leave(T,E){E&&c.pop(),(T.type==="BlockStatement"&&!lr(E)||lr(T)||T.type==="CatchClause")&&f()}})}const Nr="defineEmits";function vd(t,e,r){return st(e,Nr)?(t.hasDefineEmitCall&&t.error(`duplicate ${Nr}() call`,e),t.hasDefineEmitCall=!0,t.emitsRuntimeDecl=e.arguments[0],e.typeParameters&&(t.emitsRuntimeDecl&&t.error(`${Nr}() cannot accept both type and non-type arguments at the same time. Use one or the other.`,e),t.emitsTypeDecl=e.typeParameters.params[0]),t.emitDecl=r,!0):!1}function T_(t){let e="";if(t.emitsRuntimeDecl)e=t.getString(t.emitsRuntimeDecl).trim();else if(t.emitsTypeDecl){const r=w_(t);e=r.size?`[${Array.from(r).map(i=>JSON.stringify(i)).join(", ")}]`:""}if(t.hasDefineModelCall){let r=`[${Object.keys(t.modelDecls).map(i=>JSON.stringify(`update:${i}`)).join(", ")}]`;e=e?`/*@__PURE__*/${t.helper("mergeModels")}(${e}, ${r})`:r}return e}function w_(t){const e=new Set,r=t.emitsTypeDecl;if(r.type==="TSFunctionType")return Sd(t,r.parameters[0],e),e;const{props:i,calls:n}=Ye(t,r);let l=!1;for(const c in i)e.add(c),l=!0;if(n){l&&t.error("defineEmits() type cannot mixed call signature and property syntax.",r);for(const c of n)Sd(t,c.parameters[0],e)}return e}function Sd(t,e,r){if(e.type==="Identifier"&&e.typeAnnotation&&e.typeAnnotation.type==="TSTypeAnnotation"){const i=Vg(t,e.typeAnnotation.typeAnnotation);for(const n of i)n.type==="TSLiteralType"&&n.literal.type!=="UnaryExpression"&&n.literal.type!=="TemplateLiteral"&&r.add(String(n.literal.value))}}const Rn="defineExpose";function b_(t,e){return st(e,Rn)?(t.hasDefineExposeCall&&t.error(`duplicate ${Rn}() call`,e),t.hasDefineExposeCall=!0,!0):!1}const ts="defineSlots";function Ed(t,e,r){return st(e,ts)?(t.hasDefineSlotsCall&&t.error(`duplicate ${ts}() call`,e),t.hasDefineSlotsCall=!0,e.arguments.length>0&&t.error(`${ts}() cannot accept arguments`,e),r&&t.s.overwrite(t.startOffset+e.start,t.startOffset+e.end,`${t.helper("useSlots")}()`),!0):!1}const Ot="defineOptions";function Td(t,e){if(!st(e,Ot))return!1;if(t.hasDefineOptionsCall&&t.error(`duplicate ${Ot}() call`,e),e.typeParameters&&t.error(`${Ot}() cannot accept type arguments`,e),!e.arguments[0])return!0;t.hasDefineOptionsCall=!0,t.optionsRuntimeDecl=Et(e.arguments[0]);let r,i,n,l;if(t.optionsRuntimeDecl.type==="ObjectExpression"){for(const c of t.optionsRuntimeDecl.properties)if((c.type==="ObjectProperty"||c.type==="ObjectMethod")&&c.key.type==="Identifier")switch(c.key.name){case"props":r=c;break;case"emits":i=c;break;case"expose":n=c;break;case"slots":l=c;break}}return r&&t.error(`${Ot}() cannot be used to declare props. Use ${He}() instead.`,r),i&&t.error(`${Ot}() cannot be used to declare emits. Use ${Nr}() instead.`,i),n&&t.error(`${Ot}() cannot be used to declare expose. Use ${Rn}() instead.`,n),l&&t.error(`${Ot}() cannot be used to declare slots. Use ${ts}() instead.`,l),!0}function P_(t,e,r,i){const n=e.argument.extra&&e.argument.extra.parenthesized?e.argument.extra.parenStart:e.argument.start,l=t.startOffset,c=t.descriptor.source.slice(n+l,e.argument.end+l),p=/\bawait\b/.test(c);t.s.overwrite(e.start+l,n+l,`${r?";":""}(
|
|
140
140
|
([__temp,__restore] = ${t.helper("withAsyncContext")}(${p?"async ":""}() => `),t.s.appendLeft(e.end+l,`)),
|
|
141
141
|
${i?"":"__temp = "}await __temp,
|
|
142
142
|
__restore()${i?"":`,
|
|
@@ -180,4 +180,4 @@ ${ie}`),l.s.appendRight(N,"})")):(l.s.prependLeft(A,`
|
|
|
180
180
|
${he} {${ne}
|
|
181
181
|
${E?"async ":""}setup(${K}) {
|
|
182
182
|
${ie}`),l.s.appendRight(N,"}"));if(l.helperImports.size>0){const U=(n=(i=e.templateOptions)==null?void 0:i.compilerOptions)==null?void 0:n.runtimeModuleName,H=U?JSON.stringify(U):"'vue'";l.s.prepend(`import { ${[...l.helperImports].map(B=>`${B} as _${B}`).join(", ")} } from ${H}
|
|
183
|
-
`)}const G=l.s.toString();let j=e.sourceMap!==!1?l.s.generateMap({source:f,hires:!0,includeContent:!0}):void 0;if(z&&j){const U=G.indexOf(se),H=G.slice(0,U).split(/\r?\n/).length-1;j=O_(j,z,H)}return Qo(Ns({},p),{bindings:l.bindingMetadata,imports:l.userImports,content:G,map:j,scriptAst:k
|
|
183
|
+
`)}const G=l.s.toString();let j=e.sourceMap!==!1?l.s.generateMap({source:f,hires:!0,includeContent:!0}):void 0;if(z&&j){const U=G.indexOf(se),H=G.slice(0,U).split(/\r?\n/).length-1;j=O_(j,z,H)}return Qo(Ns({},p),{bindings:l.bindingMetadata,imports:l.userImports,content:G,map:j,scriptAst:k?.body,scriptSetupAst:L?.body,deps:l.deps?[...l.deps]:void 0})}function rs(t,e,r){t[e.name]=r}function Zo(t,e,r,i,n,l=!1){let c=!1;if(e.type==="VariableDeclaration"){const p=e.kind==="const";c=p&&e.declarations.every(u=>u.id.type==="Identifier"&&xt(u.init));for(const{id:u,init:f}of e.declarations){const d=f&&Et(f),m=p&&st(d,y=>y===He||y===Nr||y===wr||y===ts);if(u.type==="Identifier"){let y;const g=i.reactive;(n||t==="script")&&(c||p&&xt(d))?y="literal-const":st(d,g)?y=p?"setup-reactive-const":"setup-let":m||p&&Hg(d,g)?y=st(d,He)?"setup-reactive-const":"setup-const":p?st(d,w=>w===i.ref||w===i.computed||w===i.shallowRef||w===i.customRef||w===i.toRef||w===i.useTemplateRef||w===Aa)?y="setup-ref":y="setup-maybe-ref":y="setup-let",rs(r,u,y)}else{if(st(d,He)&&l)continue;u.type==="ObjectPattern"?Wg(u,r,p,m):u.type==="ArrayPattern"&&Gg(u,r,p,m)}}}else e.type==="TSEnumDeclaration"?(c=e.members.every(p=>!p.initializer||xt(p.initializer)),r[e.id.name]=c?"literal-const":"setup-const"):(e.type==="FunctionDeclaration"||e.type==="ClassDeclaration")&&(r[e.id.name]="setup-const");return c}function Wg(t,e,r,i=!1){for(const n of t.properties)if(n.type==="ObjectProperty")if(n.key.type==="Identifier"&&n.key===n.value){const l=i?"setup-const":r?"setup-maybe-ref":"setup-let";rs(e,n.key,l)}else cu(n.value,e,r,i);else{const l=r?"setup-const":"setup-let";rs(e,n.argument,l)}}function Gg(t,e,r,i=!1){for(const n of t.elements)n&&cu(n,e,r,i)}function cu(t,e,r,i=!1){if(t.type==="Identifier")rs(e,t,i?"setup-const":r?"setup-maybe-ref":"setup-let");else if(t.type==="RestElement"){const n=r?"setup-const":"setup-let";rs(e,t.argument,n)}else if(t.type==="ObjectPattern")Wg(t,e,r);else if(t.type==="ArrayPattern")Gg(t,e,r);else if(t.type==="AssignmentPattern")if(t.left.type==="Identifier"){const n=i?"setup-const":r?"setup-maybe-ref":"setup-let";rs(e,t.left,n)}else cu(t.left,e,r)}function Hg(t,e){if(st(t,e))return!0;switch(t.type){case"UnaryExpression":case"BinaryExpression":case"ArrayExpression":case"ObjectExpression":case"FunctionExpression":case"ArrowFunctionExpression":case"UpdateExpression":case"ClassExpression":case"TaggedTemplateExpression":return!0;case"SequenceExpression":return Hg(t.expressions[t.expressions.length-1],e);default:return!!kg(t)}}function xt(t){switch(t=Et(t),t.type){case"UnaryExpression":return xt(t.argument);case"LogicalExpression":case"BinaryExpression":return xt(t.left)&&xt(t.right);case"ConditionalExpression":return xt(t.test)&&xt(t.consequent)&&xt(t.alternate);case"SequenceExpression":case"TemplateLiteral":return t.expressions.every(e=>xt(e));case"ParenthesizedExpression":return xt(t.expression);case"StringLiteral":case"NumericLiteral":case"BooleanLiteral":case"NullLiteral":case"BigIntLiteral":return!0}return!1}function O_(t,e,r){const i=new Ar.SourceMapGenerator,n=(l,c=0)=>{const p=new Ar.SourceMapConsumer(l);p.sources.forEach(u=>{i._sources.add(u);const f=p.sourceContentFor(u);f!=null&&i.setSourceContent(u,f)}),p.eachMapping(u=>{u.originalLine!=null&&i.addMapping({generated:{line:u.generatedLine+c,column:u.generatedColumn},original:{line:u.originalLine,column:u.originalColumn},source:u.source,name:u.name})})};return n(t),n(e,r),i._sourceRoot=t.sourceRoot,i._file=t.file,i.toJSON()}var k_=Object.defineProperty,Pd=Object.getOwnPropertySymbols,L_=Object.prototype.hasOwnProperty,M_=Object.prototype.propertyIsEnumerable,xd=(t,e,r)=>e in t?k_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,_d=(t,e)=>{for(var r in e||(e={}))L_.call(e,r)&&xd(t,r,e[r]);if(Pd)for(var r of Pd(e))M_.call(e,r)&&xd(t,r,e[r]);return t};_d(_d({},Vl),vc);It.parse;export{SP as a,q_ as b,j_ as c,_1 as p};
|