1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[797],{73834:function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const s=/\r\n?|[\n\u2028\u2029]/,i=new RegExp(s.source,"g");function r(t){switch(t){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}const a=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,n=new RegExp("(?=("+/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/y.source+"))\\1"+/(?=[\n\r\u2028\u2029]|\/\*(?!.*?\*\/)|$)/.source,"y");function o(t){switch(t){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}}class h{constructor(t,e){this.line=void 0,this.column=void 0,this.line=t,this.column=e}}class p{constructor(t,e){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=t,this.end=e}}function c(t,e){const{line:s,column:i}=t;return new h(s,i+e)}function l(t,e){void 0===t.trailingComments?t.trailingComments=e:t.trailingComments.unshift(...e)}function u(t,e){void 0===t.innerComments?t.innerComments=e:t.innerComments.unshift(...e)}function d(t,e,s){let i=null,r=e.length;for(;null===i&&r>0;)i=e[--r];null===i||i.start>s.start?u(t,s.comments):l(i,s.comments)}const m=Object.freeze({SyntaxError:"BABEL_PARSER_SYNTAX_ERROR",SourceTypeModuleError:"BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED"}),f=P({AccessorIsGenerator:"A %0ter 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.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncFunction:"'await' is only allowed within async functions.",BadGetterArity:"A 'get' accesor must not have any formal parameters.",BadSetterArity:"A 'set' accesor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accesor 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:"'%0' require an initialization value.",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. You can set the 'decoratorsBeforeExport' option to false to use the 'export @decorator class {}' syntax.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Using the export keyword between a decorator and a class is not allowed. Please use `export @dec class` instead.",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",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:"`%0` 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:"A string literal cannot be used as an exported binding without `from`.\n- Did you mean `export { '%0' as '%1' } from 'some-module'`?",ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:"'%0' loop variable declaration may not have an initializer.",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:"Unsyntactic %0.",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportBindingIsString:'A string literal cannot be used as an imported binding.\n- Did you mean `import { "%0" as foo }`?',ImportCallArgumentTrailingComma:"Trailing comma is disallowed inside import(...) arguments.",ImportCallArity:"`import()` requires exactly %0.",ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",InvalidBigIntLiteral
1:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:"Expected number in radix %0.",InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:"Escape sequence in keyword %0.",InvalidIdentifier:"Invalid identifier %0.",InvalidLhs:"Invalid left-hand side in %0.",InvalidLhsBinding:"Binding invalid left-hand side in %0.",InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:"Unexpected character '%0'.",InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:"Private name #%0 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:"Label '%0' is already declared.",LetInLexicalBinding:"'let' is not allowed to be used as a name in 'let' or 'const' declarations.",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.",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:'Duplicate key "%0" is not allowed in module attributes.',ModuleExportNameHasLoneSurrogate:"An export name cannot include a lone surrogate, found '\\u%0'.",ModuleExportUndefined:"Export '%0' 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.",PipeBodyIsTighter:"Unexpected %0 after pipeline body; any %0 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:'Invalid topic token %0. In order to use %0 as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "%0" }.',PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:"Hack-style pipe body cannot be an unparenthesized %0 expression; 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.',PrivateInExpectedIn:"Private names are only allowed in property accesses (`obj.#%0`) or in `in` expressions (`#%0 in obj`).",PrivateNameRedeclaration:"Duplicate private name #%0.",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'.",RecordExpressionH
1ashIncorrectStartSyntaxType:"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, inside a block, or as the body of an if statement.",StaticPrototype:"Classes may not have static property named prototype.",StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:"Assigning to '%0' in strict mode.",StrictEvalArgumentsBinding:"Binding '%0' 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.",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:"Unexpected keyword '%0'.",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:"Unexpected reserved word '%0'.",UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:"Unexpected token '%0'.",UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",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:"The only valid meta property for %0 is %0.%1.",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.",VarRedeclaration:"Identifier '%0' has already been declared.",YieldBindingIdentifier:"Can not use 'yield' as identifier inside a generator.",YieldInParameter:"Yield expression is not allowed in formal parameters.",ZeroDigitNumericSeparator:"Numeric separator can not be used after leading 0."},m.SyntaxError),y=P({ImportMetaOutsideModule:"import.meta may appear only with 'sourceType: \"module\"'",ImportOutsideModule:"'import' and 'export' may appear only with 'sourceType: \"module\"'"}
1,m.SourceTypeModuleError);function x(t,e){return"flow"===e&&"PatternIsOptional"===t?"OptionalBindingPattern":t}function P(t,e,s){const i={};return Object.keys(t).forEach((r=>{i[r]=Object.freeze({code:e,reasonCode:x(r,s),template:t[r]})})),Object.freeze(i)}class g{constructor(t,e){this.token=void 0,this.preserveSpace=void 0,this.token=t,this.preserveSpace=!!e}}const T={brace:new g("{"),j_oTag:new g("<tag"),j_cTag:new g("</tag"),j_expr:new g("<tag>...</tag>",!0)};T.template=new g("`",!0);const b=!0,A=!0,E=!0,w=!0,S=!0;class C{constructor(t,e={}){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=t,this.keyword=e.keyword,this.beforeExpr=!!e.beforeExpr,this.startsExpr=!!e.startsExpr,this.rightAssociative=!!e.rightAssociative,this.isLoop=!!e.isLoop,this.isAssign=!!e.isAssign,this.prefix=!!e.prefix,this.postfix=!!e.postfix,this.binop=null!=e.binop?e.binop:null,this.updateContext=null}}const N=new Map;function I(t,e={}){e.keyword=t;const s=R(t,e);return N.set(t,s),s}function k(t,e){return R(t,{beforeExpr:b,binop:e})}let v=-1;const M=[],D=[],L=[],O=[],F=[],B=[];function R(t,e={}){var s,i,r,a;return++v,D.push(t),L.push(null!=(s=e.binop)?s:-1),O.push(null!=(i=e.beforeExpr)&&i),F.push(null!=(r=e.startsExpr)&&r),B.push(null!=(a=e.prefix)&&a),M.push(new C(t,e)),v}function U(t,e={}){var s,i,r,a;return++v,N.set(t,v),D.push(t),L.push(null!=(s=e.binop)?s:-1),O.push(null!=(i=e.beforeExpr)&&i),F.push(null!=(r=e.startsExpr)&&r),B.push(null!=(a=e.prefix)&&a),M.push(new C("name",e)),v}const j={bracketL:R("[",{beforeExpr:b,startsExpr:A}),bracketHashL:R("#[",{beforeExpr:b,startsExpr:A}),bracketBarL:R("[|",{beforeExpr:b,startsExpr:A}),bracketR:R("]"),bracketBarR:R("|]"),braceL:R("{",{beforeExpr:b,startsExpr:A}),braceBarL:R("{|",{beforeExpr:b,startsExpr:A}),braceHashL:R("#{",{beforeExpr:b,startsExpr:A}),braceR:R("}",{beforeExpr:b}),braceBarR:R("|}"),parenL:R("(",{beforeExpr:b,startsExpr:A}),parenR:R(")"),comma:R(",",{beforeExpr:b}),semi:R(";",{beforeExpr:b}),colon:R(":",{beforeExpr:b}),doubleColon:R("::",{beforeExpr:b}),dot:R("."),question:R("?",{beforeExpr:b}),questionDot:R("?."),arrow:R("=>",{beforeExpr:b}),template:R("template"),ellipsis:R("...",{beforeExpr:b}),backQuote:R("`",{startsExpr:A}),dollarBraceL:R("${",{beforeExpr:b,startsExpr:A}),templateTail:R("...`",{startsExpr:A}),templateNonTail:R("...${",{beforeExpr:b,startsExpr:A}),at:R("@"),hash:R("#",{startsExpr:A}),interpreterDirective:R("#!..."),eq:R("=",{beforeExpr:b,isAssign:w}),assign:R("_=",{beforeExpr:b,isAssign:w}),slashAssign:R("_=",{beforeExpr:b,isAssign:w}),xorAssign:R("_=",{beforeExpr:b,isAssign:w}),moduloAssign:R("_=",{beforeExpr:b,isAssign:w}),incDec:R("++/--",{prefix:S,postfix:!0,startsExpr:A}),bang:R("!",{beforeExpr:b,prefix:S,startsExpr:A}),tilde:R("~",{beforeExpr:b,prefix:S,startsExpr:A}),pipeline:k("|>",0),nullishCoalescing:k("??",1),logicalOR:k("||",1),logicalAND:k("&&",2),bitwiseOR:k("|",3),bitwiseXOR:k("^",4),bitwiseAND:k("&",5),equality:k("==/!=/===/!==",6),lt:k("</>/<=/>=",7),gt:k("</>/<=/>=",7),relational:k("</>/<=/>=",7),bitShift:k("<</>>/>>>",8),plusMin:R("+/-",{beforeExpr:b,binop:9,prefix:S,startsExpr:A}),modulo:R("%",{binop:10,startsExpr:A}),star:R("*",{binop:10}),slash:k("/",10),exponent:R("**",{beforeExpr:b,binop:11,rightAssociative:!0}),_in:I("in",{beforeExpr:b,binop:7}),_instanceof:I("instanceof",{beforeExpr:b,binop:7}),_break:I("break"),_case:I("case",{beforeExpr:b}),_catch:I("catch"),_continue:I("continue"),_debugger:I("debugger"),_default:I("default",{beforeExpr:b}),_else:I("else",{beforeExpr:b}),_finally:I("finally"),_function:I("function",{startsExpr:A}),_if:I("if"),_return:I("return",{beforeExpr:b}),_switch:I("switch"),_throw:I("throw",{beforeExpr:b,prefix:S,startsExpr:A}),_try:I("try"),_var:I("var"),_const:I("const"),_with:I("with"),_new:I("new",{beforeExpr:b,startsExpr:A}),_this:I("this",{startsExpr:A}),_super:I("super",{startsExpr:A}),_class:I("class",{startsExpr:A}
vendor: 4,923 bytes, line 1
1),_extends:I("extends",{beforeExpr:b}),_export:I("export"),_import:I("import",{startsExpr:A}),_null:I("null",{startsExpr:A}),_true:I("true",{startsExpr:A}),_false:I("false",{startsExpr:A}),_typeof:I("typeof",{beforeExpr:b,prefix:S,startsExpr:A}),_void:I("void",{beforeExpr:b,prefix:S,startsExpr:A}),_delete:I("delete",{beforeExpr:b,prefix:S,startsExpr:A}),_do:I("do",{isLoop:E,beforeExpr:b}),_for:I("for",{isLoop:E}),_while:I("while",{isLoop:E}),_as:U("as",{startsExpr:A}),_assert:U("assert",{startsExpr:A}),_async:U("async",{startsExpr:A}),_await:U("await",{startsExpr:A}),_from:U("from",{startsExpr:A}),_get:U("get",{startsExpr:A}),_let:U("let",{startsExpr:A}),_meta:U("meta",{startsExpr:A}),_of:U("of",{startsExpr:A}),_sent:U("sent",{startsExpr:A}),_set:U("set",{startsExpr:A}),_static:U("static",{startsExpr:A}),_yield:U("yield",{startsExpr:A}),_asserts:U("asserts",{startsExpr:A}),_checks:U("checks",{startsExpr:A}),_exports:U("exports",{startsExpr:A}),_global:U("global",{startsExpr:A}),_implements:U("implements",{startsExpr:A}),_intrinsic:U("intrinsic",{startsExpr:A}),_infer:U("infer",{startsExpr:A}),_is:U("is",{startsExpr:A}),_mixins:U("mixins",{startsExpr:A}),_proto:U("proto",{startsExpr:A}),_require:U("require",{startsExpr:A}),_keyof:U("keyof",{startsExpr:A}),_readonly:U("readonly",{startsExpr:A}),_unique:U("unique",{startsExpr:A}),_abstract:U("abstract",{startsExpr:A}),_declare:U("declare",{startsExpr:A}),_enum:U("enum",{startsExpr:A}),_module:U("module",{startsExpr:A}),_namespace:U("namespace",{startsExpr:A}),_interface:U("interface",{startsExpr:A}),_type:U("type",{startsExpr:A}),_opaque:U("opaque",{startsExpr:A}),name:R("name",{startsExpr:A}),string:R("string",{startsExpr:A}),num:R("num",{startsExpr:A}),bigint:R("bigint",{startsExpr:A}),decimal:R("decimal",{startsExpr:A}),regexp:R("regexp",{startsExpr:A}),privateName:R("#name",{startsExpr:A}),eof:R("eof"),jsxName:R("jsxName"),jsxText:R("jsxText",{beforeExpr:!0}),jsxTagStart:R("jsxTagStart",{startsExpr:!0}),jsxTagEnd:R("jsxTagEnd"),placeholder:R("%%",{startsExpr:!0})};function _(t){return t>=89&&t<=124}function z(t){return t>=54&&t<=124}function H(t){return t>=54&&t<=128}function q(t){return F[t]}function V(t){return t>=121&&t<=123}function K(t){return t>=54&&t<=88}function W(t){return D[t]}function J(t){return L[t]}function X(t){return t>=24&&t<=25}function G(t){return M[t]}M[8].updateContext=t=>{t.pop()},M[5].updateContext=M[7].updateContext=M[23].updateContext=t=>{t.push(T.brace)},M[22].updateContext=t=>{t[t.length-1]===T.template?t.pop():t.push(T.template)},M[134].updateContext=t=>{t.push(T.j_expr,T.j_oTag)};let $="\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u0870-\u0887\u0889-\u088e\u08a0-\u08c9\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c5d\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cdd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d04-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u1711\u171f-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u
119b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4c\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31bf\u31f0-\u31ff\u3400-\u4dbf\u4e00-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7ca\ua7d0\ua7d1\ua7d3\ua7d5-\ua7d9\ua7f2-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab69\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc",Y="\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u0898-\u089f\u08ca-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b55-\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3c\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d81-\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u180f-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1abf-\u1ace\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua82c\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f";const Q=new RegExp("["+$+"]"),Z=new RegExp("["+$+Y+"]");$=Y=null;const tt=[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,68,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,349,41,7,1,79,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,85,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,159,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,264,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,190,0,80,921,103,110,18,195,2637,96,16,1070,4050,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,46,2,18,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,482,44,11,6,17,0,322,29,19,43,1269,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,4152,8,221,3,5761,
115,7472,3104,541,1507,4938],et=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,154,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,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,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,406,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,19306,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,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,262,6,10,9,357,0,62,13,1495,6,110,6,6,9,4759,9,787719,239];function st(t,e){let s=65536;for(let i=0,r=e.length;i<r;i+=2){if(s+=e[i],s>t)return!1;if(s+=e[i+1],s>=t)return!0}return!1}function it(t){return t<65?36===t:t<=90||(t<97?95===t:t<=122||(t<=65535?t>=170&&Q.test(String.fromCharCode(t)):st(t,tt)))}function rt(t){return t<48?36===t:t<58||!(t<65)&&(t<=90||(t<97?95===t:t<=122||(t<=65535?t>=170&&Z.test(String.fromCharCode(t)):st(t,tt)||st(t,et))))}const at=["implements","interface","let","package","private","protected","public","static","yield"],nt=["eval","arguments"],ot=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"]),ht=new Set(at),pt=new Set(nt);function ct(t,e){return e&&"await"===t||"enum"===t}function lt(t,e){return ct(t,e)||ht.has(t)}function ut(t){return pt.has(t)}function dt(t,e){return lt(t,e)||ut(t)}const mt=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"]);const ft=64,yt=256,xt=259,Pt=128,gt=1024,Tt=2048;class bt{constructor(t){this.var=new Set,this.lexical=new Set,this.functions=new Set,this.flags=t}}class At{constructor(t,e){this.scopeStack=[],this.undefinedExports=new Map,this.undefinedPrivateNames=new Map,this.raise=t,this.inModule=e}get inFunction(){return(2&this.currentVarScopeFlags())>0}get allowSuper(){return(16&this.currentThisScopeFlags())>0}get allowDirectSuper(){return(32&this.currentThisScopeFlags())>0}get inClass(){return(this.currentThisScopeFlags()&ft)>0}get inClassAndNotInNonArrowFunction(){const t=this.currentThisScopeFlags();return(t&ft)>0&&0===(2&t)}get inStaticBlock(){for(let t=this.scopeStack.length-1;;t--){const{flags:e}=this.scopeStack[t];if(128&e)return!0;if(323&e)return!1}}get inNonArrowFunction(){return(2&this.currentThisScopeFlags())>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(t){return new bt(t)}enter(t){this.scopeStack.push(this.createScope(t))}exit(){this.scopeStack.pop()}treatFunctionsAsVarInScope(t){return!!(2&t.flags||!this.inModule&&1&t.flags)}declareName(t,e,s){let i=this.currentScope();if(8&e||16&e)this.checkRedeclarationInScope(i,t,e,s),16&e?i.functions.add(t):i.lexical.add(t),8&e&&this.maybeExportDefined(i,t);else if(4&e)for(let r=this.scopeStack.length-1;r>=0&&(i=this.scopeStack[r],this.checkRedeclarationInScope(i,t,e,s),i.var.add(t),this.maybeExportDefined(i,t),!(i.flags&xt));--r);this.inModule&&1&i.flags&&this.undefinedExports.delete(t)}maybeExportDefined(t,e){this.inModule&&1&t.flags&&this.undefinedExports.delete(e)}checkRedeclarationInScope(t,e,s,i){this.isRedeclaredInScope(t,e,s)&&this.raise(i,f.VarRedeclaration,e)}isRedeclaredInScope(t,e,s){return!!(1&s)&&(8&s?t.lexical.has(e)||t.functions.has(e)||t.var.has(e):16&s?t.lexical.has(e)||!this.treatFunctionsAsVarInScope(t)&&t.var.has(e):t.lexical.has(e)&&!(8&t.flags&&t.lexical.values().next().value===e)||!this.treatFunctionsAsVarInScope(t)&&t.functions.has(e))}checkLocalExport(t){const{name:e}=t,s=this.scopeStack[0];s.lexical.has(e)||s.var.has(e)||s.functions.has(e)||this.undefinedExports.set(e,t.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let t=this.scopeStack.length-1;;t--){const{flags:e}=this.scopeStack[t];if(e&xt)return e}}currentThisScopeFlags(){for(let t=this.scopeStack.length-1;;t--){const{flags:e}=this.scopeStack[t];if(323&e&&!(4&e))return e}}}class Et extends bt{constructor(...t){super(...t),this.declareFunctions=new Set}}class wt extends At{createScope(t){return new Et(t)}declareName(t,e,s){const i=this.currentScope();if(e&Tt)return this.checkRedeclarationInScope(i,t,e,s),this.maybeExportDefined(i,t),void i.declareFunctions.add(t);super.declareName(...arguments)}isRedeclaredInScope(t,e,s){return!!super.isRedeclaredInScope(...arguments)||!!(s&Tt)&&(!t.declareFunctions.has(e)&&(t.lexical.has(e)||t.functions.has(e)))}checkLocalExport(t){this.scopeStack[0].declareFunctions.has(t.name)||super.checkLocalExport(t)}}class St{constructor(){this.strict=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.maybeInArrowParameters=!1,this.inType=!1,this.noAnonFunctionType=!1,this.hasFlowComment=!1,this.isAmbientContext=!1,this.inAbstractClass=!1,this.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null}
1,this.soloAwait=!1,this.inFSharpPipelineDirectBody=!1,this.labels=[],this.decoratorStack=[[]],this.comments=[],this.commentStack=[],this.pos=0,this.type=131,this.value=null,this.start=0,this.end=0,this.lastTokEndLoc=null,this.lastTokStartLoc=null,this.lastTokStart=0,this.lastTokEnd=0,this.context=[T.brace],this.canStartJSXElement=!0,this.containsEsc=!1,this.strictErrors=new Map,this.tokensLength=0}init({strictMode:t,sourceType:e,startLine:s,startColumn:i}){this.strict=!1!==t&&(!0===t||"module"===e),this.curLine=s,this.lineStart=-i,this.startLoc=this.endLoc=new h(s,i)}curPosition(){return new h(this.curLine,this.pos-this.lineStart)}clone(t){const e=new St,s=Object.keys(this);for(let i=0,r=s.length;i<r;i++){const r=s[i];let a=this[r];!t&&Array.isArray(a)&&(a=a.slice()),e[r]=a}return e}}var Ct=function(t){return t>=48&&t<=57};const Nt=new Set([103,109,115,105,121,117,100]),It={decBinOct:[46,66,69,79,95,98,101,111],hex:[46,88,95,120]},kt={bin:[48,49]};kt.oct=[...kt.bin,50,51,52,53,54,55],kt.dec=[...kt.oct,56,57],kt.hex=[...kt.dec,65,66,67,68,69,70,97,98,99,100,101,102];class vt{constructor(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,this.loc=new p(t.startLoc,t.endLoc)}}class Mt{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}}class Dt{constructor(t){this.stack=[],this.undefinedPrivateNames=new Map,this.raise=t}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new Mt)}exit(){const t=this.stack.pop(),e=this.current();for(const[s,i]of Array.from(t.undefinedPrivateNames))e?e.undefinedPrivateNames.has(s)||e.undefinedPrivateNames.set(s,i):this.raise(i,f.InvalidPrivateFieldResolution,s)}declarePrivateName(t,e,s){const{privateNames:i,loneAccessors:r,undefinedPrivateNames:a}=this.current();let n=i.has(t);if(3&e){const s=n&&r.get(t);if(s){const i=4&s,a=4&e;n=(3&s)===(3&e)||i!==a,n||r.delete(t)}else n||r.set(t,e)}n&&this.raise(s,f.PrivateNameRedeclaration,t),i.add(t),a.delete(t)}usePrivateName(t,e){let s;for(s of this.stack)if(s.privateNames.has(t))return;s?s.undefinedPrivateNames.set(t,e):this.raise(e,f.InvalidPrivateFieldResolution,t)}}class Lt{constructor(t=0){this.type=void 0,this.type=t}canBeArrowParameterDeclaration(){return 2===this.type||1===this.type}isCertainlyParameterDeclaration(){return 3===this.type}}class Ot extends Lt{constructor(t){super(t),this.errors=new Map}recordDeclarationError(t,e){this.errors.set(t,e)}clearDeclarationError(t){this.errors.delete(t)}iterateErrors(t){this.errors.forEach(t)}}class Ft{constructor(t){this.stack=[new Lt],this.raise=t}enter(t){this.stack.push(t)}exit(){this.stack.pop()}recordParameterInitializerError(t,e){const{stack:s}=this;let i=s.length-1,r=s[i];for(;!r.isCertainlyParameterDeclaration();){if(!r.canBeArrowParameterDeclaration())return;r.recordDeclarationError(t,e),r=s[--i]}this.raise(t,e)}recordParenthesizedIdentifierError(t,e){const{stack:s}=this,i=s[s.length-1];if(i.isCertainlyParameterDeclaration())this.raise(t,e);else{if(!i.canBeArrowParameterDeclaration())return;i.recordDeclarationError(t,e)}}recordAsyncArrowParametersError(t,e){const{stack:s}=this;let i=s.length-1,r=s[i];for(;r.canBeArrowParameterDeclaration();)2===r.type&&r.recordDeclarationError(t,e),r=s[--i]}validateAsPattern(){const{stack:t}=this,e=t[t.length-1];e.canBeArrowParameterDeclaration()&&e.iterateErrors(((e,s)=>{this.raise(s,e);let i=t.length-2,r=t[i];for(;r.canBeArrowParameterDeclaration();)r.clearDeclarationError(s),r=t[--i]}))}}function Bt(){return new Lt}class Rt{constructor(){this.stacks=[]}enter(t){this.stacks.push(t)}exit(){this.stacks.pop()}currentFlags(){return this.stacks[this.stacks.length-1]}get hasAwait(){return(2&this.currentFlags())>0}get hasYield(){return(1&this.currentFlags())>0}get hasReturn(){return(4&this.currentFlags())>0}get hasIn(){return(8&this.currentFlags())>0}}function Ut(t,e){return(t?2:0)|(e?1:0)}class jt{constructor(){this.shorthandAssign=-1,this.doubleProto=-1,this.optionalParameters=-1}}class _t{constructor(t,e,s){this.type="",this.start=e,this.end=0,this.loc=new p(s),null!=t&&t.options.ranges&&(this.range=[e,0]),null!=t&&t.filename&&(this.loc.filename=t.filename)}}const zt=_t.prototype;function Ht(t){const{type:e,start:s,end:i,loc:r,range:a,extra:n,name:o}=t,h=Object.create(zt);return h.type=e,h.start=s,h.end=i,h.loc=r,h.range=a,h.extra=n,h.name=o,"Placeholder"===e&&(h.expectedNode=t.expectedNode),h}function qt(t){const{type:e,start:s,end:i,loc:r,range:a,extra:n}=t;if("Placeholder"===e)return function(t){return Ht(t)}(t);const o=Object.create(zt);return o.type=e,o.start=s,o.end=i,o.loc=r,o.range=a,void 0!==t.raw?o.raw=t.raw:o.extra=n,o.value=t.value,o}zt.__clone=function(){const t=new _t,e=Object.keys(this);for(let s=0,i=e.length;s<i;s++){const i=e[s];"leadingComments"!==i&&"trailingComments"!==i&&"innerComments"!==i&&(t[i]=this[i])}return t};const Vt=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),Kt=P({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:"Cannot over
1write reserved type %0.",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:"Boolean enum members need to be initialized. Use either `%0 = true,` or `%0 = false,` in enum `%1`.",EnumDuplicateMemberName:"Enum member names need to be unique, but the name `%0` has already been used before in enum `%1`.",EnumInconsistentMemberValues:"Enum `%0` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.",EnumInvalidExplicitType:"Enum type `%1` is not valid. Use one of `boolean`, `number`, `string`, or `symbol` in enum `%0`.",EnumInvalidExplicitTypeUnknownSupplied:"Supplied enum type is not valid. Use one of `boolean`, `number`, `string`, or `symbol` in enum `%0`.",EnumInvalidMemberInitializerPrimaryType:"Enum `%0` has type `%2`, so the initializer of `%1` needs to be a %2 literal.",EnumInvalidMemberInitializerSymbolType:"Symbol enum members cannot be initialized. Use `%1,` in enum `%0`.",EnumInvalidMemberInitializerUnknownType:"The enum member initializer for `%1` needs to be a literal (either a boolean, number, or string) in enum `%0`.",EnumInvalidMemberName:"Enum member names cannot start with lowercase 'a' through 'z'. Instead of using `%0`, consider using `%1`, in enum `%2`.",EnumNumberMemberNotInitialized:"Number enum members need to be initialized, e.g. `%1 = 1` in enum `%0`.",EnumStringMemberInconsistentlyInitailized:"String enum members need to consistently either all use initializers, or use no initializers, in enum `%0`.",GetterMayNotHaveThisParam:"A getter cannot have a `this` parameter.",ImportTypeShorthandOnlyInPureImport:"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",InexactInsideExact:"Explicit inexact syntax cannot appear inside an explicit exact object type.",InexactInsideNonObject:"Explicit inexact syntax cannot appear in class or interface definitions.",InexactVariance:"Explicit inexact syntax cannot have variance.",InvalidNonTypeImportInDeclareModule:"Imports within a `declare module` body must always be `import type` or `import typeof`.",MissingTypeParamDefault:"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",NestedDeclareModule:"`declare module` cannot be used inside another `declare module`.",NestedFlowComment:"Cannot have a flow comment inside another flow comment.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",SetterMayNotHaveThisParam:"A setter cannot have a `this` parameter.",SpreadVariance:"Spread properties cannot have variance.",ThisParamAnnotationRequired:"A type annotation is required for the `this` parameter.",ThisParamBannedInConstructor:"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",ThisParamMayNotBeOptional:"The `this` parameter cannot be optional.",ThisParamMustBeFirst:"The `this` parameter must be the first function parameter.",ThisParamNoDefault:"The `this` parameter may not have a default value.",TypeBeforeInitializer:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeCastInPattern:"The type cast expression is expected to be wrapped with parenthesis.",UnexpectedExplicitInexactInObject:"Explicit inexact syntax must appear at the end of an inexact object.",UnexpectedReservedType:"Unexpected reserved type %0.",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:"`declare export %0` is not supported. Use `%1` instead.",UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."},m.SyntaxError,"flow");function Wt(t){return"type"===t.importKind||"typeof"===t.importKind}function Jt(t){return z(t)&&93!==t}const Xt={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};const Gt=/\*?\s*@((?:no)?flow)\b/;const $t={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:"\xa0",iexcl:"\xa1",cent:"\xa2",pound:"\xa3",curren:"\xa4",yen:"\xa5",brvbar:"\xa6",sect:"\xa7",uml:"\xa8",copy:"\xa9",ordf:"\xaa",laquo:"\xab",not:"\xac",shy:"\xad",reg:"\xae",macr:"\xaf",deg:"\xb0",plusmn:"\xb1",sup2:"\xb2",sup3:"\xb3",acute:"\xb4",micro:"\xb5",para:"\xb6",middot:"\xb7",cedil:"\xb8",sup1:"\xb9",ordm:"\xba",raquo:"\xbb",frac14:"\xbc",frac12:"\xbd",frac34:"\xbe",iquest:"\xbf",Agrave:"\xc0",Aacute:"\xc1",A
1circ:"\xc2",Atilde:"\xc3",Auml:"\xc4",Aring:"\xc5",AElig:"\xc6",Ccedil:"\xc7",Egrave:"\xc8",Eacute:"\xc9",Ecirc:"\xca",Euml:"\xcb",Igrave:"\xcc",Iacute:"\xcd",Icirc:"\xce",Iuml:"\xcf",ETH:"\xd0",Ntilde:"\xd1",Ograve:"\xd2",Oacute:"\xd3",Ocirc:"\xd4",Otilde:"\xd5",Ouml:"\xd6",times:"\xd7",Oslash:"\xd8",Ugrave:"\xd9",Uacute:"\xda",Ucirc:"\xdb",Uuml:"\xdc",Yacute:"\xdd",THORN:"\xde",szlig:"\xdf",agrave:"\xe0",aacute:"\xe1",acirc:"\xe2",atilde:"\xe3",auml:"\xe4",aring:"\xe5",aelig:"\xe6",ccedil:"\xe7",egrave:"\xe8",eacute:"\xe9",ecirc:"\xea",euml:"\xeb",igrave:"\xec",iacute:"\xed",icirc:"\xee",iuml:"\xef",eth:"\xf0",ntilde:"\xf1",ograve:"\xf2",oacute:"\xf3",ocirc:"\xf4",otilde:"\xf5",ouml:"\xf6",divide:"\xf7",oslash:"\xf8",ugrave:"\xf9",uacute:"\xfa",ucirc:"\xfb",uuml:"\xfc",yacute:"\xfd",thorn:"\xfe",yuml:"\xff",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02c6",tilde:"\u02dc",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039a",Lambda:"\u039b",Mu:"\u039c",Nu:"\u039d",Xi:"\u039e",Omicron:"\u039f",Pi:"\u03a0",Rho:"\u03a1",Sigma:"\u03a3",Tau:"\u03a4",Upsilon:"\u03a5",Phi:"\u03a6",Chi:"\u03a7",Psi:"\u03a8",Omega:"\u03a9",alpha:"\u03b1",beta:"\u03b2",gamma:"\u03b3",delta:"\u03b4",epsilon:"\u03b5",zeta:"\u03b6",eta:"\u03b7",theta:"\u03b8",iota:"\u03b9",kappa:"\u03ba",lambda:"\u03bb",mu:"\u03bc",nu:"\u03bd",xi:"\u03be",omicron:"\u03bf",pi:"\u03c0",rho:"\u03c1",sigmaf:"\u03c2",sigma:"\u03c3",tau:"\u03c4",upsilon:"\u03c5",phi:"\u03c6",chi:"\u03c7",psi:"\u03c8",omega:"\u03c9",thetasym:"\u03d1",upsih:"\u03d2",piv:"\u03d6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200c",zwj:"\u200d",lrm:"\u200e",rlm:"\u200f",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201a",ldquo:"\u201c",rdquo:"\u201d",bdquo:"\u201e",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203a",oline:"\u203e",frasl:"\u2044",euro:"\u20ac",image:"\u2111",weierp:"\u2118",real:"\u211c",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21b5",lArr:"\u21d0",uArr:"\u21d1",rArr:"\u21d2",dArr:"\u21d3",hArr:"\u21d4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220b",prod:"\u220f",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221a",prop:"\u221d",infin:"\u221e",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222a",int:"\u222b",there4:"\u2234",sim:"\u223c",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22a5",sdot:"\u22c5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230a",rfloor:"\u230b",lang:"\u2329",rang:"\u232a",loz:"\u25ca",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666"},Yt=/^[\da-fA-F]+$/,Qt=/^\d+$/,Zt=P({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:"Expected corresponding JSX closing tag for <%0>.",MissingClosingTagFragment:"Expected corresponding JSX closing tag for <>.",UnexpectedSequenceExpression:"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",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 <>...</>?"},m.SyntaxError,"jsx");function te(t){return!!t&&("JSXOpeningFragment"===t.type||"JSXClosingFragment"===t.type)}function ee(t){if("JSXIdentifier"===t.type)return t.name;if("JSXNamespacedName"===t.type)return t.namespace.name+":"+t.name.name;if("JSXMemberExpression"===t.type)return ee(t.object)+"."+ee(t.property);throw new Error("Node had unexpected type: "+t.type)}class se extends bt{constructor(...t){super(...t),this.types=new Set,this.enums=new Set,this.constEnums=new Set,this.classes=new Set,this.exportOnlyBindings=new Set}}class ie extends At{createScope(t){return new se(t)}declareName(t,e,s){const i=this.currentScope();if(e>)return this.maybeExportDefined(i,t),void i.exportOnlyBindings.add(t);super.declareName(...arguments),2&e&&(1&e||(this.checkRedeclarationInScope(i,t,e,s),this.maybeExportDefined(i,t)),i.types.add(t)),256&e&&i.enums.add(t),512&e&&i.constEnums.add(t),e&Pt&&i.classes.add(t)}
1isRedeclaredInScope(t,e,s){if(t.enums.has(e)){if(256&s){return!!(512&s)!==t.constEnums.has(e)}return!0}return s&Pt&&t.classes.has(e)?!!t.lexical.has(e)&&!!(1&s):!!(2&s&&t.types.has(e))||super.isRedeclaredInScope(...arguments)}checkLocalExport(t){const e=this.scopeStack[0],{name:s}=t;e.types.has(s)||e.exportOnlyBindings.has(s)||super.checkLocalExport(t)}}function re(t){if(!t)throw new Error("Assert fail")}const ae=P({AbstractMethodHasImplementation:"Method '%0' cannot have an implementation because it is marked abstract.",AbstractPropertyHasInitializer:"Property '%0' cannot have an initializer because it is marked abstract.",AccesorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccesorCannotHaveTypeParameters:"An accessor cannot have type parameters.",ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:"'declare' is not allowed in %0ters.",DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:"Accessibility modifier already seen.",DuplicateModifier:"Duplicate modifier: '%0'.",EmptyHeritageClauseType:"'%0' list cannot be empty.",EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ImportAliasHasImportType:"An import alias can not use 'import type'.",IncompatibleModifiers:"'%0' modifier cannot be used with '%1' modifier.",IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:"Index signatures cannot have an accessibility modifier ('%0').",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.",InvalidModifierOnTypeMember:"'%0' modifier cannot appear on a type member.",InvalidModifiersOrder:"'%0' modifier must precede '%1' modifier.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MissingInterfaceName:"'interface' declarations must be followed by an identifier.",MixedLabeledAndUnlabeledElements:"Tuple members must all have names or all not have names.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifer:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:"Private elements cannot have an accessibility modifier ('%0').",ReadonlyForMethodSignature:"'readonly' modifier can only appear on a property declaration or index signature.",ReservedArrowTypeParam:"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `<T,>() => ...`.",ReservedTypeAssertion:"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",SetAccesorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccesorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccesorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:"A type-only import can specify a default import or named bindings, but not both.",TypeModifierIsUsedInTypeExports:"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.",TypeModifierIsUsedInTypeImports:"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.",UnexpectedParameterModifier:"A parameter property is only allowed in a constructor implementation.",UnexpectedReadonly:"'readonly' type modifier is only permitted on array and tuple literal types.",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:"Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got %0."},m.SyntaxError,"typescript");function ne(t){return"private"===t||"public"===t||"protected"===t}const oe=P({ClassNameIsRequired:"A class name is required."},m.SyntaxError);function he(t,e){const[s,i]="string"===typeof e?[e,{}]:e,r=Object.keys(i),a=0===r.length;return t.some((t=>{if("string"===typeof t)return a&&t===s;{const[e,a]=t;if(e!==s)return!1;for(const t of r)if(a[t]!==i[t])return!1;return!0}}))}function pe(t,e,s){const i=t.find((t=>Array.isArray(t)?t[0]===e:t===e));return i&&Array.isArray(i)?i[1][s]:null}const ce=["minimal","fsharp","hack","smart"],le=["^","%","#"],ue=["hash","bar"];const de={estree:t=>class extends t{parseRegExpLiteral({pattern:t,flags:e}){let s=null;try{s=new RegExp(t,e)}catch(r){}const i=this.estreeParseLiteral(s);return i.regex={pattern:t,flags:e},i}parseBigIntLiteral(t){let e;try{e=BigInt(t)}catch(i){e=null}const s=this.estreeParseLiteral(e);return s.bigint=String(s.value||t),s}parseDecimalLiteral(t){const e=this.estreeParseLiteral(null);return e.decimal=String(e.value||t),e}estreeParseLiteral(t){return this.parseLiteral(t,"Literal")}parseStringLiteral(t){return this.estreeParseLiteral(t)}parseNumericLiteral(t){return this.estreeParseLiteral(t)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(t){return this.estreeParseLiteral(t)}
1directiveToStmt(t){const e=t.value,s=this.startNodeAt(t.start,t.loc.start),i=this.startNodeAt(e.start,e.loc.start);return i.value=e.extra.expressionValue,i.raw=e.extra.raw,s.expression=this.finishNodeAt(i,"Literal",e.end,e.loc.end),s.directive=e.extra.raw.slice(1,-1),this.finishNodeAt(s,"ExpressionStatement",t.end,t.loc.end)}initFunction(t,e){super.initFunction(t,e),t.expression=!1}checkDeclaration(t){null!=t&&this.isObjectProperty(t)?this.checkDeclaration(t.value):super.checkDeclaration(t)}getObjectOrClassMethodParams(t){return t.value.params}isValidDirective(t){var e;return"ExpressionStatement"===t.type&&"Literal"===t.expression.type&&"string"===typeof t.expression.value&&!(null!=(e=t.expression.extra)&&e.parenthesized)}parseBlockBody(t,...e){super.parseBlockBody(t,...e);const s=t.directives.map((t=>this.directiveToStmt(t)));t.body=s.concat(t.body),delete t.directives}pushClassMethod(t,e,s,i,r,a){this.parseMethod(e,s,i,r,a,"ClassMethod",!0),e.typeParameters&&(e.value.typeParameters=e.typeParameters,delete e.typeParameters),t.body.push(e)}parsePrivateName(){const t=super.parsePrivateName();return this.getPluginOption("estree","classFeatures")?this.convertPrivateNameToPrivateIdentifier(t):t}convertPrivateNameToPrivateIdentifier(t){const e=super.getPrivateNameSV(t);return delete(t=t).id,t.name=e,t.type="PrivateIdentifier",t}isPrivateName(t){return this.getPluginOption("estree","classFeatures")?"PrivateIdentifier"===t.type:super.isPrivateName(t)}getPrivateNameSV(t){return this.getPluginOption("estree","classFeatures")?t.name:super.getPrivateNameSV(t)}parseLiteral(t,e){const s=super.parseLiteral(t,e);return s.raw=s.extra.raw,delete s.extra,s}parseFunctionBody(t,e,s=!1){super.parseFunctionBody(t,e,s),t.expression="BlockStatement"!==t.body.type}parseMethod(t,e,s,i,r,a,n=!1){let o=this.startNode();return o.kind=t.kind,o=super.parseMethod(o,e,s,i,r,a,n),o.type="FunctionExpression",delete o.kind,t.value=o,"ClassPrivateMethod"===a&&(t.computed=!1),a="MethodDefinition",this.finishNode(t,a)}parseClassProperty(...t){const e=super.parseClassProperty(...t);return this.getPluginOption("estree","classFeatures")?(e.type="PropertyDefinition",e):e}parseClassPrivateProperty(...t){const e=super.parseClassPrivateProperty(...t);return this.getPluginOption("estree","classFeatures")?(e.type="PropertyDefinition",e.computed=!1,e):e}parseObjectMethod(t,e,s,i,r){const a=super.parseObjectMethod(t,e,s,i,r);return a&&(a.type="Property","method"===a.kind&&(a.kind="init"),a.shorthand=!1),a}parseObjectProperty(t,e,s,i,r){const a=super.parseObjectProperty(t,e,s,i,r);return a&&(a.kind="init",a.type="Property"),a}isAssignable(t,e){return null!=t&&this.isObjectProperty(t)?this.isAssignable(t.value,e):super.isAssignable(t,e)}toAssignable(t,e=!1){return null!=t&&this.isObjectProperty(t)?(this.toAssignable(t.value,e),t):super.toAssignable(t,e)}toAssignableObjectExpressionProp(t,...e){"get"===t.kind||"set"===t.kind?this.raise(t.key.start,f.PatternHasAccessor):t.method?this.raise(t.key.start,f.PatternHasMethod):super.toAssignableObjectExpressionProp(t,...e)}finishCallExpression(t,e){if(super.finishCallExpression(t,e),"Import"===t.callee.type){var s;if(t.type="ImportExpression",t.source=t.arguments[0],this.hasPlugin("importAssertions"))t.attributes=null!=(s=t.arguments[1])?s:null;delete t.arguments,delete t.callee}return t}toReferencedArguments(t){"ImportExpression"!==t.type&&super.toReferencedArguments(t)}parseExport(t){switch(super.parseExport(t),t.type){case"ExportAllDeclaration":t.exported=null;break;case"ExportNamedDeclaration":1===t.specifiers.length&&"ExportNamespaceSpecifier"===t.specifiers[0].type&&(t.type="ExportAllDeclaration",t.exported=t.specifiers[0].exported,delete t.specifiers)}return t}parseSubscript(t,e,s,i,r){const a=super.parseSubscript(t,e,s,i,r);if(r.optionalChainMember){if("OptionalMemberExpression"!==a.type&&"OptionalCallExpression"!==a.type||(a.type=a.type.substring(8)),r.stop){const t=this.startNodeAtNode(a);return t.expression=a,this.finishNode(t,"ChainExpression")}}else"MemberExpression"!==a.type&&"CallExpression"!==a.type||(a.optional=!1);return a}hasPropertyAsPrivateName(t){return"ChainExpression"===t.type&&(t=t.expression),super.hasPropertyAsPrivateName(t)}isOptionalChain(t){return"ChainExpression"===t.type}isObjectProperty(t){return"Property"===t.type&&"init"===t.kind&&!t.method}isObjectMethod(t){return t.method||"get"===t.kind||"set"===t.kind}},jsx:t=>class extends t{jsxReadToken(){let t="",e=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(this.state.start,Zt.UnterminatedJsxContent);const s=this.input.charCodeAt(this.state.pos);switch(s){case 60:case 123:return this.state.pos===this.state.start?60===s&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(134)):super.getTokenFromCode(s):(t+=this.input.slice(e,this.state.pos),this.finishToken(133,t));case 38:t+=this.input.slice(e,this.state.pos),t+=this.jsxReadEntity(),e=this.state.pos;break;case 62:case 125:default:r(s)?(t+=this.input.slice(e,this.state.pos),t+=this.jsxReadNewLine(!0),e=this.state.pos):++this.state.pos}}}jsxReadNewLine(t){const e=this.input.charCodeAt(this.state.pos);let s;return++this.state.pos,13===e&&10===this.input.charCodeAt(this.state.pos)?(++this.state.pos,s=t?"\n":"\r\n"):s=String.fromCharCode(e),++this.state.curLine,this.state.lineStart=this.state.pos,s}jsxReadString(t){let e="",s=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(this.state.start,f.UnterminatedString);const i=this.input.charCodeAt(this.state.pos);if(i===t)break;38===i?(e+=this.input.slice(s,this.state.pos),e+=this.jsxReadEntity(),s=this.state.pos):r(i)?(e+=this.input.slice(s,this.state.pos),e+=this.jsxReadNewLine(!1),s=this.state.pos):++this.state.pos}return e+=this.input.slice(s,this.state.pos++),this.finishToken(125,e)}jsxReadEntity(){let t,e="",s=0,i=this.input[this.state.pos];const r=++this.state.pos;for(;this.state.pos<this.length&&s++<10;){if(i=this.input[this.state.pos++],";"===i){"#"===e[0]?"x"===e[1]?(e=e.substr(2),Yt.test(e)&&(t=String.fromCodePoint(parseInt(e,16)))):(e=e.substr(1),Qt.test(e)&&(t=String.fromCodePoint(parseInt(e,10)))):t=$t[e];break}e+=i}return t||(this.state.pos=r,"&")}jsxReadWord(){let t;const e=this.state.pos;do{t=this.input.charCodeAt(++this.state.pos)}while(rt(t)||45===t);return this.finishToken(132,this.input.slice(e,this.state.pos))}jsxParseIdentifier(){const t=this.startNode();return this.match(132)?t.name=this.state.value:K(this.state.type)?t.name=W(this.state.type):this.unexpected(),this.next(),this.finishNode(t,"JSXIdentifier")}jsxParseNamespacedName(){const t=this.state.start,e=this.state.startLoc,s=this.jsxParseIdentifier();if(!this.eat(14))return s;const i=this.startNodeAt(t,e);return i.namespace=s,i.name=this.jsxParseIdentifier(),this.finishNode(i,"JSXNamespacedName")}jsxParseElementName(){const t=this.state.start,e=this.state.startLoc;let s=this.jsxParseNamespacedName();if("JSXNamespacedName"===s.type)return s;for(;this.eat(16);){const i=this.startNodeAt(t,e);i.object=s,i.property=this.jsxParseIdentifier(),s=this.finishNode(i,"JSXMemberExpression")}return s}jsxParseAttributeValue(){let t;switch(this.state.type){case 5:return t=this.startNode(),this.setContext(T.brace),this.next(),t=this.jsxParseExpressionContainer(t,T.j_oTag),"JSXEmptyExpression"===t.expression.type&&this.raise(t.start,Zt.AttributeIsEmpty),t;case 134:case 125:return this.parseExprAtom();default:throw this.raise(this.state.start,Zt.UnsupportedJsxValue)}}jsxParseEmptyExpression(){const t=this.startNodeAt(this.state.lastTokEnd,this.state.lastTokEndLoc);return this.finishNodeAt(t,"JSXEmptyExpression",this.state.start,this.state.startLoc)}jsxParseSpreadChild(t){return this.next(),t.expression=this.parseExpression(),this.setContext(T.j_oTag),this.expect(8),this.finishNode(t,"JSXSpreadChild")}jsxParseExpressionContainer(t,e){if(this.match(8))t.expression=this.jsxParseEmptyExpression();else{const e=this.parseExpression();t.expression=e}return this.setContext(e),this.expect(8),this.finishNode(t,"JSXExpressionContainer")}jsxParseAttribute(){const t=this.startNode();return this.match(5)?(this.setContext(T.brace),this.next(),this.expect(21),t.argument=this.parseMaybeAssignAllowIn(),this.setContext(T.j_oTag),this.expect(8),this.finishNode(t,"JSXSpreadAttribute")):(t.name=this.jsxParseNamespacedName(),t.value=this.eat(29)?this.jsxParseAttributeValue():null,this.finishNode(t,"JSXAttribute"))}jsxParseOpeningElementAt(t,e){const s=this.startNodeAt(t,e);return this.match(135)?(this.expect(135),this.finishNode(s,"JSXOpeningFragment")):(s.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(s))}jsxParseOpeningElementAfterName(t){const e=[];for(;!this.match(52)&&!this.match(135);)e.push(this.jsxParseAttribute());return t.attributes=e,t.selfClosing=this.eat(52),this.expect(135),this.finishNode(t,"JSXOpeningElement")}jsxParseClosingElementAt(t,e){const s=this.startNodeAt(t,e);return this.match(135)?(this.expect(135),this.finishNode(s,"JSXClosingFragment")):(s.name=this.jsxParseElementName(),this.expect(135),this.finishNode(s,"JSXClosingElement"))}jsxParseElementAt(t,e){const s=this.startNodeAt(t,e),i=[],r=this.jsxParseOpeningElementAt(t,e);let a=null;if(!r.selfClosing){t:for(;;)switch(this.state.type){case 134:if(t=this.state.start,e=this.state.startLoc,this.next(),this.eat(52)){a=this.jsxParseClosingElementAt(t,e);break t}i.push(this.jsxParseElementAt(t,e));break;case 133:i.push(this.parseExprAtom());break;case 5:{const t=this.startNode();this.setContext(T.brace),this.next(),this.match(21)?i.push(this.jsxParseSpreadChild(t)):i.push(this.jsxParseExpressionContainer(t,T.j_expr));break}default:throw this.unexpected()}te(r)&&!te(a)?this.raise(a.start,Zt.MissingClosingTagFragment):!te(r)&&te(a)?this.raise(a.start,Zt.MissingClosingTagElement,ee(r.name)):te(r)||te(a)||ee(a.name)!==ee(r.name)&&this.raise(a.start,Zt.MissingClosingTagElement,ee(r.name))}if(te(r)?(s.openingFragment=r,s.closingFragment=a):(s.openingElement=r,s.closingElement=a),s.children=i,this.match(45))throw this.raise(this.state.start,Zt.UnwrappedAdjacentJSXElements);return te(r)?this.finishNode(s,"JSXFragment"):this.finishNode(s,"JSXElement")}jsxParseElement(){const t=this.state.start,e=this.state.startLoc;return this.next(),this.jsxParseElementAt(t,e)}setContext(t){const{context:e}=this.state;e[e.length-1]=t}parseExprAtom(t){return this.match(133)?this.parseLiteral(this.state.value,"JSXText"):this.match(134)?this.jsxParseElement():this.match(45)&&33!==this.input.charCodeAt(this.state.pos)?(this.replaceToken(134),this.jsxParseElement()):super.parseExprAtom(t)}skipSpace(){this.curContext().preserveSpace||super.skipSpace()}getTokenFromCode(t){const e=this.curContext();if(e===T.j_expr)return this.jsxReadToken();if(e===T.j_oTag||e===T.j_cTag){if(it(t))return this.jsxReadWord();if(62===t)return++this.state.pos,this.finishToken(135);if((34===t||39===t)&&e===T.j_oTag)return this.jsxReadString(t)}return 60===t&&this.state.canStartJSXElement&&33!==this.input.charCodeAt(this.state.pos+1)?(++this.state.pos,this.finishToken(134)):super.getTokenFromCode(t)}updateContext(t){const{context:e,type:s}=this.state;if(52===s&&134===t)e.splice(-2,2,T.j_cTag),this.state.canStartJSXElement=!1;else if(134===s)e.push(T.j_oTag);else if(135===s){const s=e[e.length-1];s===T.j_oTag&&52===t||s===T.j_cTag?(e.pop(),this.state.canStartJSXElement=e[e.length-1]===T.j_expr):(this.setContext(T.j_expr),this.state.canStartJSXElement=!0)}else this.state.canStartJSXElement=O[s]}},flow:t=>class extends t{constructor(...t){super(...t),this.flowPragma=void 0}getScopeHandler(){return wt}shouldParseTypes(){return this.getPluginOption("flow","all")||"flow"===this.flowPragma}shouldParseEnums(){return!!this.getPluginOption("flow","enums")}finishToken(t,e){return 125!==t&&13!==t&&28!==t&&void 0===this.flowPragma&&(this.flowPragma=null),super.finishToken(t,e)}addComment(t){if(void 0===this.flowPragma){const e=Gt.exec(t.value);if(e)if("flow"===e[1])this.flowPragma="flow";else{if("noflow"!==e[1])throw new Error("Unexpected flow pragma");this.flowPragma="noflow"}else;}return super.addComment(t)}flowParseTypeInitialiser(t){const e=this.state.inType;this.state.inType=!0,this.expect(t||14);const s=this.flowParseType();return this.state.inType=e,s}flowParsePredicate(){const t=this.startNode(),e=this.state.start;return this.next(),this.expectContextual(103),this.state.lastTokStart>e+1&&this.raise(e,Kt.UnexpectedSpaceBetweenModuloChecks),this.eat(10)?(t.value=this.parseExpression(),this.expect(11),this.finishNode(t,"DeclaredPredicate")):this.finishNode(t,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){const t=this.state.inType;this.state.inType=!0,this.expect(14);let e=null,s=null;return this.match(50)?(this.state.inType=t,s=this.flowParsePredicate()):(e=this.flowParseType(),this.state.inType=t,this.match(50)&&(s=this.flowParsePredicate())),[e,s]}flowParseDeclareClass(t){return this.next(),this.flowParseInterfaceish(t,!0),this.finishNode(t,"DeclareClass")}flowParseDeclareFunction(t){this.next();const e=t.id=this.parseIdentifier(),s=this.startNode(),i=this.startNode();this.match(45)?s.typeParameters=this.flowParseTypeParameterDeclaration():s.typeParameters=null,this.expect(10);const r=this.flowParseFunctionTypeParams();return s.params=r.params,s.rest=r.rest,s.this=r._this,this.expect(11),[s.returnType,t.predicate]=this.flowParseTypeAndPredicateInitialiser(),i.typeAnnotation=this.finishNode(s,"FunctionTypeAnnotation"),e.typeAnnotation=this.finishNode(i,"TypeAnnotation"),this.resetEndLocation(e),this.semicolon(),this.scope.declareName(t.id.name,2048,t.id.start),this.finishNode(t,"DeclareFunction")}flowParseDeclare(t,e){if(this.match(76))return this.flowParseDeclareClass(t);if(this.match(64))return this.flowParseDeclareFunction(t);
1if(this.match(70))return this.flowParseDeclareVariable(t);if(this.eatContextual(119))return this.match(16)?this.flowParseDeclareModuleExports(t):(e&&this.raise(this.state.lastTokStart,Kt.NestedDeclareModule),this.flowParseDeclareModule(t));if(this.isContextual(122))return this.flowParseDeclareTypeAlias(t);if(this.isContextual(123))return this.flowParseDeclareOpaqueType(t);if(this.isContextual(121))return this.flowParseDeclareInterface(t);if(this.match(78))return this.flowParseDeclareExportDeclaration(t,e);throw this.unexpected()}flowParseDeclareVariable(t){return this.next(),t.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(t.id.name,5,t.id.start),this.semicolon(),this.finishNode(t,"DeclareVariable")}flowParseDeclareModule(t){this.scope.enter(0),this.match(125)?t.id=this.parseExprAtom():t.id=this.parseIdentifier();const e=t.body=this.startNode(),s=e.body=[];for(this.expect(5);!this.match(8);){let t=this.startNode();this.match(79)?(this.next(),this.isContextual(122)||this.match(83)||this.raise(this.state.lastTokStart,Kt.InvalidNonTypeImportInDeclareModule),this.parseImport(t)):(this.expectContextual(117,Kt.UnsupportedStatementInDeclareModule),t=this.flowParseDeclare(t,!0)),s.push(t)}this.scope.exit(),this.expect(8),this.finishNode(e,"BlockStatement");let i=null,r=!1;return s.forEach((t=>{!function(t){return"DeclareExportAllDeclaration"===t.type||"DeclareExportDeclaration"===t.type&&(!t.declaration||"TypeAlias"!==t.declaration.type&&"InterfaceDeclaration"!==t.declaration.type)}(t)?"DeclareModuleExports"===t.type&&(r&&this.raise(t.start,Kt.DuplicateDeclareModuleExports),"ES"===i&&this.raise(t.start,Kt.AmbiguousDeclareModuleKind),i="CommonJS",r=!0):("CommonJS"===i&&this.raise(t.start,Kt.AmbiguousDeclareModuleKind),i="ES")})),t.kind=i||"CommonJS",this.finishNode(t,"DeclareModule")}flowParseDeclareExportDeclaration(t,e){if(this.expect(78),this.eat(61))return this.match(64)||this.match(76)?t.declaration=this.flowParseDeclare(this.startNode()):(t.declaration=this.flowParseType(),this.semicolon()),t.default=!0,this.finishNode(t,"DeclareExportDeclaration");if(this.match(71)||this.isLet()||(this.isContextual(122)||this.isContextual(121))&&!e){const t=this.state.value,e=Xt[t];throw this.raise(this.state.start,Kt.UnsupportedDeclareExportKind,t,e)}if(this.match(70)||this.match(64)||this.match(76)||this.isContextual(123))return t.declaration=this.flowParseDeclare(this.startNode()),t.default=!1,this.finishNode(t,"DeclareExportDeclaration");if(this.match(51)||this.match(5)||this.isContextual(121)||this.isContextual(122)||this.isContextual(123))return"ExportNamedDeclaration"===(t=this.parseExport(t)).type&&(t.type="ExportDeclaration",t.default=!1,delete t.exportKind),t.type="Declare"+t.type,t;throw this.unexpected()}flowParseDeclareModuleExports(t){return this.next(),this.expectContextual(104),t.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(t,"DeclareModuleExports")}flowParseDeclareTypeAlias(t){return this.next(),this.flowParseTypeAlias(t),t.type="DeclareTypeAlias",t}flowParseDeclareOpaqueType(t){return this.next(),this.flowParseOpaqueType(t,!0),t.type="DeclareOpaqueType",t}flowParseDeclareInterface(t){return this.next(),this.flowParseInterfaceish(t),this.finishNode(t,"DeclareInterface")}flowParseInterfaceish(t,e=!1){if(t.id=this.flowParseRestrictedIdentifier(!e,!0),this.scope.declareName(t.id.name,e?17:9,t.id.start),this.match(45)?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.extends=[],t.implements=[],t.mixins=[],this.eat(77))do{t.extends.push(this.flowParseInterfaceExtends())}while(!e&&this.eat(12));if(this.isContextual(110)){this.next();do{t.mixins.push(this.flowParseInterfaceExtends())}while(this.eat(12))}if(this.isContextual(106)){this.next();do{t.implements.push(this.flowParseInterfaceExtends())}while(this.eat(12))}t.body=this.flowParseObjectType({allowStatic:e,allowExact:!1,allowSpread:!1,allowProto:e,allowInexact:!1})}flowParseInterfaceExtends(){const t=this.startNode();return t.id=this.flowParseQualifiedTypeIdentifier(),this.match(45)?t.typeParameters=this.flowParseTypeParameterInstantiation():t.typeParameters=null,this.finishNode(t,"InterfaceExtends")}flowParseInterface(t){return this.flowParseInterfaceish(t),this.finishNode(t,"InterfaceDeclaration")}checkNotUnderscore(t){"_"===t&&this.raise(this.state.start,Kt.UnexpectedReservedUnderscore)}
1checkReservedType(t,e,s){Vt.has(t)&&this.raise(e,s?Kt.AssignReservedType:Kt.UnexpectedReservedType,t)}flowParseRestrictedIdentifier(t,e){return this.checkReservedType(this.state.value,this.state.start,e),this.parseIdentifier(t)}flowParseTypeAlias(t){return t.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(t.id.name,9,t.id.start),this.match(45)?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(t,"TypeAlias")}flowParseOpaqueType(t,e){return this.expectContextual(122),t.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(t.id.name,9,t.id.start),this.match(45)?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.supertype=null,this.match(14)&&(t.supertype=this.flowParseTypeInitialiser(14)),t.impltype=null,e||(t.impltype=this.flowParseTypeInitialiser(29)),this.semicolon(),this.finishNode(t,"OpaqueType")}flowParseTypeParameter(t=!1){const e=this.state.start,s=this.startNode(),i=this.flowParseVariance(),r=this.flowParseTypeAnnotatableIdentifier();return s.name=r.name,s.variance=i,s.bound=r.typeAnnotation,this.match(29)?(this.eat(29),s.default=this.flowParseType()):t&&this.raise(e,Kt.MissingTypeParamDefault),this.finishNode(s,"TypeParameter")}flowParseTypeParameterDeclaration(){const t=this.state.inType,e=this.startNode();e.params=[],this.state.inType=!0,this.match(45)||this.match(134)?this.next():this.unexpected();let s=!1;do{const t=this.flowParseTypeParameter(s);e.params.push(t),t.default&&(s=!0),this.match(46)||this.expect(12)}while(!this.match(46));return this.expect(46),this.state.inType=t,this.finishNode(e,"TypeParameterDeclaration")}flowParseTypeParameterInstantiation(){const t=this.startNode(),e=this.state.inType;t.params=[],this.state.inType=!0,this.expect(45);const s=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(46);)t.params.push(this.flowParseType()),this.match(46)||this.expect(12);return this.state.noAnonFunctionType=s,this.expect(46),this.state.inType=e,this.finishNode(t,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){const t=this.startNode(),e=this.state.inType;for(t.params=[],this.state.inType=!0,this.expect(45);!this.match(46);)t.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(46)||this.expect(12);return this.expect(46),this.state.inType=e,this.finishNode(t,"TypeParameterInstantiation")}flowParseInterfaceType(){const t=this.startNode();if(this.expectContextual(121),t.extends=[],this.eat(77))do{t.extends.push(this.flowParseInterfaceExtends())}while(this.eat(12));return t.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(t,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(126)||this.match(125)?this.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(t,e,s){return t.static=e,14===this.lookahead().type?(t.id=this.flowParseObjectPropertyKey(),t.key=this.flowParseTypeInitialiser()):(t.id=null,t.key=this.flowParseType()),this.expect(3),t.value=this.flowParseTypeInitialiser(),t.variance=s,this.finishNode(t,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(t,e){return t.static=e,t.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(45)||this.match(10)?(t.method=!0,t.optional=!1,t.value=this.flowParseObjectTypeMethodish(this.startNodeAt(t.start,t.loc.start))):(t.method=!1,this.eat(17)&&(t.optional=!0),t.value=this.flowParseTypeInitialiser()),this.finishNode(t,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(t){for(t.params=[],t.rest=null,t.typeParameters=null,t.this=null,this.match(45)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(10),this.match(74)&&(t.this=this.flowParseFunctionTypeParam(!0),t.this.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)t.params.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(t.rest=this.flowParseFunctionTypeParam(!1)),this.expect(11),t.returnType=this.flowParseTypeInitialiser(),this.finishNode(t,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(t,e){const s=this.startNode();return t.static=e,t.value=this.flowParseObjectTypeMethodish(s),this.finishNode(t,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:t,allowExact:e,allowSpread:s,allowProto:i,allowInexact:r}){const a=this.state.inType;this.state.inType=!0;const n=this.startNode();let o,h;n.callProperties=[],n.properties=[],n.indexers=[],n.internalSlots=[];let p=!1;for(e&&this.match(6)?(this.expect(6),o=9,h=!0):(this.expect(5),o=8,h=!1),n.exact=h;!this.match(o);){let e=!1,a=null,o=null;const c=this.startNode();if(i&&this.isContextual(111)){const e=this.lookahead();14!==e.type&&17!==e.type&&(this.next(),a=this.state.start,t=!1)}if(t&&this.isContextual(100)){const t=this.lookahead();14!==t.type&&17!==t.type&&(this.next(),e=!0)}const l=this.flowParseVariance();if(this.eat(0))null!=a&&this.unexpected(a),this.eat(0)?(l&&this.unexpected(l.start),n.internalSlots.push(this.flowParseObjectTypeInternalSlot(c,e))):n.indexers.push(this.flowParseObjectTypeIndexer(c,e,l));else if(this.match(10)||this.match(45))null!=a&&this.unexpected(a),l&&this.unexpected(l.start),n.callProperties.push(this.flowParseObjectTypeCallProperty(c,e));else{let t="init";if(this.isContextual(94)||this.isContextual(99)){H(this.lookahead().type)&&(t=this.state.value,this.next())}const i=this.flowParseObjectTypeProperty(c,e,a,l,t,s,null!=r?r:!h);null===i?(p=!0,o=this.state.lastTokStart):n.properties.push(i)}this.flowObjectTypeSemicolon(),!o||this.match(8)||this.match(9)||this.raise(o,Kt.UnexpectedExplicitInexactInObject)}this.expect(o),s&&(n.inexact=p);const c=this.finishNode(n,"ObjectTypeAnnotation");return this.state.inType=a,c}flowParseObjectTypeProperty(t,e,s,i,r,a,n){if(this.eat(21)){return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(a?n||this.raise(this.state.lastTokStart,Kt.InexactInsideExact):this.raise(this.state.lastTokStart,Kt.InexactInsideNonObject),i&&this.raise(i.start,Kt.InexactVariance),null):(a||this.raise(this.state.lastTokStart,Kt.UnexpectedSpreadType),null!=s&&this.unexpected(s),i&&this.raise(i.start,Kt.SpreadVariance),t.argument=this.flowParseType(),this.finishNode(t,"ObjectTypeSpreadProperty"))}{t.key=this.flowParseObjectPropertyKey(),t.static=e,t.proto=null!=s,t.kind=r;let n=!1;return this.match(45)||this.match(10)?(t.method=!0,null!=s&&this.unexpected(s),i&&this.unexpected(i.start),t.value=this.flowParseObjectTypeMethodish(this.startNodeAt(t.
1start,t.loc.start)),"get"!==r&&"set"!==r||this.flowCheckGetterSetterParams(t),!a&&"constructor"===t.key.name&&t.value.this&&this.raise(t.value.this.start,Kt.ThisParamBannedInConstructor)):("init"!==r&&this.unexpected(),t.method=!1,this.eat(17)&&(n=!0),t.value=this.flowParseTypeInitialiser(),t.variance=i),t.optional=n,this.finishNode(t,"ObjectTypeProperty")}}flowCheckGetterSetterParams(t){const e="get"===t.kind?0:1,s=t.start,i=t.value.params.length+(t.value.rest?1:0);t.value.this&&this.raise(t.value.this.start,"get"===t.kind?Kt.GetterMayNotHaveThisParam:Kt.SetterMayNotHaveThisParam),i!==e&&("get"===t.kind?this.raise(s,f.BadGetterArity):this.raise(s,f.BadSetterArity)),"set"===t.kind&&t.value.rest&&this.raise(s,f.BadSetterRestParameter)}flowObjectTypeSemicolon(){this.eat(13)||this.eat(12)||this.match(8)||this.match(9)||this.unexpected()}flowParseQualifiedTypeIdentifier(t,e,s){t=t||this.state.start,e=e||this.state.startLoc;let i=s||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){const s=this.startNodeAt(t,e);s.qualification=i,s.id=this.flowParseRestrictedIdentifier(!0),i=this.finishNode(s,"QualifiedTypeIdentifier")}return i}flowParseGenericType(t,e,s){const i=this.startNodeAt(t,e);return i.typeParameters=null,i.id=this.flowParseQualifiedTypeIdentifier(t,e,s),this.match(45)&&(i.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(i,"GenericTypeAnnotation")}flowParseTypeofType(){const t=this.startNode();return this.expect(83),t.argument=this.flowParsePrimaryType(),this.finishNode(t,"TypeofTypeAnnotation")}flowParseTupleType(){const t=this.startNode();for(t.types=[],this.expect(0);this.state.pos<this.length&&!this.match(3)&&(t.types.push(this.flowParseType()),!this.match(3));)this.expect(12);return this.expect(3),this.finishNode(t,"TupleTypeAnnotation")}flowParseFunctionTypeParam(t){let e=null,s=!1,i=null;const r=this.startNode(),a=this.lookahead(),n=74===this.state.type;return 14===a.type||17===a.type?(n&&!t&&this.raise(r.start,Kt.ThisParamMustBeFirst),e=this.parseIdentifier(n),this.eat(17)&&(s=!0,n&&this.raise(r.start,Kt.ThisParamMayNotBeOptional)),i=this.flowParseTypeInitialiser()):i=this.flowParseType(),r.name=e,r.optional=s,r.typeAnnotation=i,this.finishNode(r,"FunctionTypeParam")}reinterpretTypeAsFunctionTypeParam(t){const e=this.startNodeAt(t.start,t.loc.start);return e.name=null,e.optional=!1,e.typeAnnotation=t,this.finishNode(e,"FunctionTypeParam")}flowParseFunctionTypeParams(t=[]){let e=null,s=null;for(this.match(74)&&(s=this.flowParseFunctionTypeParam(!0),s.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)t.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(e=this.flowParseFunctionTypeParam(!1)),{params:t,rest:e,_this:s}}flowIdentToTypeAnnotation(t,e,s,i){switch(i.name){case"any":return this.finishNode(s,"AnyTypeAnnotation");case"bool":case"boolean":return this.finishNode(s,"BooleanTypeAnnotation");case"mixed":return this.finishNode(s,"MixedTypeAnnotation");case"empty":return this.finishNode(s,"EmptyTypeAnnotation");
vendor: 2,500 bytes, line 1
1case"number":return this.finishNode(s,"NumberTypeAnnotation");case"string":return this.finishNode(s,"StringTypeAnnotation");case"symbol":return this.finishNode(s,"SymbolTypeAnnotation");default:return this.checkNotUnderscore(i.name),this.flowParseGenericType(t,e,i)}}flowParsePrimaryType(){const t=this.state.start,e=this.state.startLoc,s=this.startNode();let i,r,a=!1;const n=this.state.noAnonFunctionType;switch(this.state.type){case 5:return this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!0,allowProto:!1,allowInexact:!0});case 6:return this.flowParseObjectType({allowStatic:!1,allowExact:!0,allowSpread:!0,allowProto:!1,allowInexact:!1});case 0:return this.state.noAnonFunctionType=!1,r=this.flowParseTupleType(),this.state.noAnonFunctionType=n,r;case 45:return s.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(10),i=this.flowParseFunctionTypeParams(),s.params=i.params,s.rest=i.rest,s.this=i._this,this.expect(11),this.expect(19),s.returnType=this.flowParseType(),this.finishNode(s,"FunctionTypeAnnotation");case 10:if(this.next(),!this.match(11)&&!this.match(21))if(_(this.state.type)||this.match(74)){const t=this.lookahead().type;a=17!==t&&14!==t}else a=!0;if(a){if(this.state.noAnonFunctionType=!1,r=this.flowParseType(),this.state.noAnonFunctionType=n,this.state.noAnonFunctionType||!(this.match(12)||this.match(11)&&19===this.lookahead().type))return this.expect(11),r;this.eat(12)}return i=r?this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(r)]):this.flowParseFunctionTypeParams(),s.params=i.params,s.rest=i.rest,s.this=i._this,this.expect(11),this.expect(19),s.returnType=this.flowParseType(),s.typeParameters=null,this.finishNode(s,"FunctionTypeAnnotation");case 125:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case 81:case 82:return s.value=this.match(81),this.next(),this.finishNode(s,"BooleanLiteralTypeAnnotation");case 49:if("-"===this.state.value){if(this.next(),this.match(126))return this.parseLiteralAtNode(-this.state.value,"NumberLiteralTypeAnnotation",s);if(this.match(127))return this.parseLiteralAtNode(-this.state.value,"BigIntLiteralTypeAnnotation",s);throw this.raise(this.state.start,Kt.UnexpectedSubtractionOperand)}throw this.unexpected();case 126:return this.parseLiteral(this.state.value,"NumberLiteralTypeAnnotation");case 127:return this.parseLiteral(this.state.value,"BigIntLiteralTypeAnnotation");case 84:return this.next(),this.finishNode(s,"VoidTypeAnnotation");
1case 80:return this.next(),this.finishNode(s,"NullLiteralTypeAnnotation");case 74:return this.next(),this.finishNode(s,"ThisTypeAnnotation");case 51:return this.next(),this.finishNode(s,"ExistsTypeAnnotation");case 83:return this.flowParseTypeofType();default:if(K(this.state.type)){const t=W(this.state.type);return this.next(),super.createIdentifier(s,t)}if(_(this.state.type))return this.isContextual(121)?this.flowParseInterfaceType():this.flowIdentToTypeAnnotation(t,e,s,this.parseIdentifier())}throw this.unexpected()}flowParsePostfixType(){const t=this.state.start,e=this.state.startLoc;let s=this.flowParsePrimaryType(),i=!1;for(;(this.match(0)||this.match(18))&&!this.canInsertSemicolon();){const r=this.startNodeAt(t,e),a=this.eat(18);i=i||a,this.expect(0),!a&&this.match(3)?(r.elementType=s,this.next(),s=this.finishNode(r,"ArrayTypeAnnotation")):(r.objectType=s,r.indexType=this.flowParseType(),this.expect(3),i?(r.optional=a,s=this.finishNode(r,"OptionalIndexedAccessType")):s=this.finishNode(r,"IndexedAccessType"))}return s}flowParsePrefixType(){const t=this.startNode();return this.eat(17)?(t.typeAnnotation=this.flowParsePrefixType(),this.finishNode(t,"NullableTypeAnnotation")):this.flowParsePostfixType()}flowParseAnonFunctionWithoutParens(){const t=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(19)){const e=this.startNodeAt(t.start,t.loc.start);return e.params=[this.reinterpretTypeAsFunctionTypeParam(t)],e.rest=null,e.this=null,e.returnType=this.flowParseType(),e.typeParameters=null,this.finishNode(e,"FunctionTypeAnnotation")}return t}flowParseIntersectionType(){const t=this.startNode();this.eat(43);const e=this.flowParseAnonFunctionWithoutParens();for(t.types=[e];this.eat(43);)t.types.push(this.flowParseAnonFunctionWithoutParens());return 1===t.types.length?e:this.finishNode(t,"IntersectionTypeAnnotation")}flowParseUnionType(){const t=this.startNode();this.eat(41);const e=this.flowParseIntersectionType();for(t.types=[e];this.eat(41);)t.types.push(this.flowParseIntersectionType());return 1===t.types.length?e:this.finishNode(t,"UnionTypeAnnotation")}flowParseType(){const t=this.state.inType;this.state.inType=!0;const e=this.flowParseUnionType();return this.state.inType=t,e}flowParseTypeOrImplicitInstantiation(){if(124===this.state.type&&"_"===this.state.value){const t=this.state.start,e=this.state.startLoc,s=this.parseIdentifier();return this.flowParseGenericType(t,e,s)}return this.flowParseType()}flowParseTypeAnnotation(){const t=this.startNode();return t.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(t,"TypeAnnotation")}flowParseTypeAnnotatableIdentifier(t){const e=t?this.parseIdentifier():this.flowParseRestrictedIdentifier();return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(e)),e}typeCastToParameter(t){return t.expression.typeAnnotation=t.typeAnnotation,this.resetEndLocation(t.expression,t.typeAnnotation.end,t.typeAnnotation.loc.end),t.expression}flowParseVariance(){let t=null;return this.match(49)&&(t=this.startNode(),"+"===this.state.value?t.kind="plus":t.kind="minus",this.next(),this.finishNode(t,"Variance")),t}parseFunctionBody(t,e,s=!1){return e?this.forwardNoArrowParamsConversionAt(t,(()=>super.parseFunctionBody(t,!0,s))):super.parseFunctionBody(t,!1,s)}parseFunctionBodyAndFinish(t,e,s=!1){if(this.match(14)){const e=this.startNode();[e.typeAnnotation,t.predicate]=this.flowParseTypeAndPredicateInitialiser(),t.returnType=e.typeAnnotation?this.finishNode(e,"TypeAnnotation"):null}super.parseFunctionBodyAndFinish(t,e,s)}parseStatement(t,e){if(this.state.strict&&this.isContextual(121)){if(z(this.lookahead().type)){const t=this.startNode();return this.next(),this.flowParseInterface(t)}}else if(this.shouldParseEnums()&&this.isContextual(118)){const t=this.startNode();return this.next(),this.flowParseEnumDeclaration(t)}const s=super.parseStatement(t,e);return void 0!==this.flowPragma||this.isValidDirective(s)||(this.flowPragma=null),s}parseExpressionStatement(t,e){if("Identifier"===e.type)if("declare"===e.name){if(this.match(76)||_(this.state.type)||this.match(64)||this.match(70)||this.match(78))return this.flowParseDeclare(t)}else if(_(this.state.type)){if("interface"===e.name)return this.flowParseInterface(t);if("type"===e.name)return this.flowParseTypeAlias(t);
vendor: 5,757 bytes, line 1
1if("opaque"===e.name)return this.flowParseOpaqueType(t,!1)}return super.parseExpressionStatement(t,e)}shouldParseExportDeclaration(){const{type:t}=this.state;return V(t)||this.shouldParseEnums()&&118===t?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){const{type:t}=this.state;return V(t)||this.shouldParseEnums()&&118===t?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.shouldParseEnums()&&this.isContextual(118)){const t=this.startNode();return this.next(),this.flowParseEnumDeclaration(t)}return super.parseExportDefaultExpression()}parseConditional(t,e,s,i){if(!this.match(17))return t;if(this.state.maybeInArrowParameters){const e=this.lookaheadCharCode();if(44===e||61===e||58===e||41===e)return this.setOptionalParametersError(i),t}this.expect(17);const r=this.state.clone(),a=this.state.noArrowAt,n=this.startNodeAt(e,s);let{consequent:o,failed:h}=this.tryParseConditionalConsequent(),[p,c]=this.getArrowLikeExpressions(o);if(h||c.length>0){const t=[...a];if(c.length>0){this.state=r,this.state.noArrowAt=t;for(let e=0;e<c.length;e++)t.push(c[e].start);({consequent:o,failed:h}=this.tryParseConditionalConsequent()),[p,c]=this.getArrowLikeExpressions(o)}h&&p.length>1&&this.raise(r.start,Kt.AmbiguousConditionalArrow),h&&1===p.length&&(this.state=r,t.push(p[0].start),this.state.noArrowAt=t,({consequent:o,failed:h}=this.tryParseConditionalConsequent()))}return this.getArrowLikeExpressions(o,!0),this.state.noArrowAt=a,this.expect(14),n.test=t,n.consequent=o,n.alternate=this.forwardNoArrowParamsConversionAt(n,(()=>this.parseMaybeAssign(void 0,void 0))),this.finishNode(n,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);const t=this.parseMaybeAssignAllowIn(),e=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:t,failed:e}}getArrowLikeExpressions(t,e){const s=[t],i=[];for(;0!==s.length;){const t=s.pop();"ArrowFunctionExpression"===t.type?(t.typeParameters||!t.returnType?this.finishArrowValidation(t):i.push(t),s.push(t.body)):"ConditionalExpression"===t.type&&(s.push(t.consequent),s.push(t.alternate))}return e?(i.forEach((t=>this.finishArrowValidation(t))),[i,[]]):function(t,e){const s=[],i=[];for(let r=0;r<t.length;r++)(e(t[r],r,t)?s:i).push(t[r]);return[s,i]}(i,(t=>t.params.every((t=>this.isAssignable(t,!0)))))}finishArrowValidation(t){var e;this.toAssignableList(t.params,null==(e=t.extra)?void 0:e.trailingComma,!1),this.scope.enter(6),super.checkParams(t,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(t,e){let s;return-1!==this.state.noArrowParamsConversionAt.indexOf(t.start)?(this.state.noArrowParamsConversionAt.push(this.state.start),s=e(),this.state.noArrowParamsConversionAt.pop()):s=e(),s}parseParenItem(t,e,s){if(t=super.parseParenItem(t,e,s),this.eat(17)&&(t.optional=!0,this.resetEndLocation(t)),this.match(14)){const i=this.startNodeAt(e,s);return i.expression=t,i.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(i,"TypeCastExpression")}return t}assertModuleNodeAllowed(t){"ImportDeclaration"===t.type&&("type"===t.importKind||"typeof"===t.importKind)||"ExportNamedDeclaration"===t.type&&"type"===t.exportKind||"ExportAllDeclaration"===t.type&&"type"===t.exportKind||super.assertModuleNodeAllowed(t)}parseExport(t){const e=super.parseExport(t);return"ExportNamedDeclaration"!==e.type&&"ExportAllDeclaration"!==e.type||(e.exportKind=e.exportKind||"value"),e}parseExportDeclaration(t){if(this.isContextual(122)){t.exportKind="type";const e=this.startNode();return this.next(),this.match(5)?(t.specifiers=this.parseExportSpecifiers(!0),this.parseExportFrom(t),null):this.flowParseTypeAlias(e)}if(this.isContextual(123)){t.exportKind="type";const e=this.startNode();return this.next(),this.flowParseOpaqueType(e,!1)}if(this.isContextual(121)){t.exportKind="type";const e=this.startNode();return this.next(),this.flowParseInterface(e)}if(this.shouldParseEnums()&&this.isContextual(118)){t.exportKind="value";const e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}return super.parseExportDeclaration(t)}eatExportStar(t){return!!super.eatExportStar(...arguments)||!(!this.isContextual(122)||51!==this.lookahead().type)&&(t.exportKind="type",this.next(),this.next(),!0)}maybeParseExportNamespaceSpecifier(t){const e=this.state.start,s=super.maybeParseExportNamespaceSpecifier(t);return s&&"type"===t.exportKind&&this.unexpected(e),s}parseClassId(t,e,s){super.parseClassId(t,e,s),this.match(45)&&(t.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(t,e,s){const i=this.state.start;if(this.isContextual(117)){if(this.parseClassMemberFromModifier(t,e))return;e.declare=!0}super.parseClassMember(t,e,s),e.declare&&("ClassProperty"!==e.type&&"ClassPrivateProperty"!==e.type&&"PropertyDefinition"!==e.type?this.raise(i,Kt.DeclareClassElement):e.value&&this.raise(e.value.start,Kt.DeclareClassFieldInitializer))}isIterator(t){return"iterator"===t||"asyncIterator"===t}readIterator(){const t=super.readWord1(),e="@@"+t;this.isIterator(t)&&this.state.inType||this.raise(this.state.pos,f.InvalidIdentifier,e),this.finishToken(124,e)}getTokenFromCode(t){const e=this.input.charCodeAt(this.state.pos+1);return 123===t&&124===e?this.finishOp(6,2):!this.state.inType||62!==t&&60!==t?this.state.inType&&63===t?46===e?this.finishOp(18,2):this.finishOp(17,1):function(t,e){return 64===t&&64===e}(t,e)?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(t):this.finishOp(62===t?46:45,1)}isAssignable(t,e){return"TypeCastExpression"===t.type?this.isAssignable(t.expression,e):super.isAssignable(t,e)}toAssignable(t,e=!1){return"TypeCastExpression"===t.type?super.toAssignable(this.t
1ypeCastToParameter(t),e):super.toAssignable(t,e)}toAssignableList(t,e,s){for(let i=0;i<t.length;i++){const e=t[i];"TypeCastExpression"===(null==e?void 0:e.type)&&(t[i]=this.typeCastToParameter(e))}return super.toAssignableList(t,e,s)}toReferencedList(t,e){for(let i=0;i<t.length;i++){var s;const r=t[i];!r||"TypeCastExpression"!==r.type||null!=(s=r.extra)&&s.parenthesized||!(t.length>1)&&e||this.raise(r.typeAnnotation.start,Kt.TypeCastInPattern)}return t}parseArrayLike(t,e,s,i){const r=super.parseArrayLike(t,e,s,i);return e&&!this.state.maybeInArrowParameters&&this.toReferencedList(r.elements),r}checkLVal(t,...e){if("TypeCastExpression"!==t.type)return super.checkLVal(t,...e)}parseClassProperty(t){return this.match(14)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(t)}parseClassPrivateProperty(t){return this.match(14)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(t)}isClassMethod(){return this.match(45)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(t){return!this.match(14)&&super.isNonstaticConstructor(t)}pushClassMethod(t,e,s,i,r,a){if(e.variance&&this.unexpected(e.variance.start),delete e.variance,this.match(45)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(t,e,s,i,r,a),e.params&&r){const t=e.params;t.length>0&&this.isThisParam(t[0])&&this.raise(e.start,Kt.ThisParamBannedInConstructor)}else if("MethodDefinition"===e.type&&r&&e.value.params){const t=e.value.params;t.length>0&&this.isThisParam(t[0])&&this.raise(e.start,Kt.ThisParamBannedInConstructor)}}pushClassPrivateMethod(t,e,s,i){e.variance&&this.unexpected(e.variance.start),delete e.variance,this.match(45)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(t,e,s,i)}parseClassSuper(t){if(super.parseClassSuper(t),t.superClass&&this.match(45)&&(t.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual(106)){this.next();const e=t.implements=[];do{const t=this.startNode();t.id=this.flowParseRestrictedIdentifier(!0),this.match(45)?t.typeParameters=this.flowParseTypeParameterInstantiation():t.typeParameters=null,e.push(this.finishNode(t,"ClassImplements"))}while(this.eat(12))}}checkGetterSetterParams(t){super.checkGetterSetterParams(t);const e=this.getObjectOrClassMethodParams(t);if(e.length>0){const s=e[0];this.isThisParam(s)&&"get"===t.kind?this.raise(s.start,Kt.GetterMayNotHaveThisParam):this.isThisParam(s)&&this.raise(s.start,Kt.SetterMayNotHaveThisParam)}}parsePropertyNamePrefixOperator(t){t.variance=this.flowParseVariance()}parseObjPropValue(t,e,s,i,r,a,n,o){let h;t.variance&&this.unexpected(t.variance.start),delete t.variance,this.match(45)&&!n&&(h=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected()),super.parseObjPropValue(t,e,s,i,r,a,n,o),h&&((t.value||t).typeParameters=h)}parseAssignableListItemTypes(t){return this.eat(17)&&("Identifier"!==t.type&&this.raise(t.start,Kt.PatternIsOptional),this.isThisParam(t)&&this.raise(t.start,Kt.ThisParamMayNotBeOptional),t.optional=!0),this.match(14)?t.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(t)&&this.raise(t.start,Kt.ThisParamAnnotationRequired),this.match(29)&&this.isThisParam(t)&&this.raise(t.start,Kt.ThisParamNoDefault),this.resetEndLocation(t),t}parseMaybeDefault(t,e,s){const i=super.parseMaybeDefault(t,e,s);return"AssignmentPattern"===i.type&&i.typeAnnotation&&i.right.start<i.typeAnnotation.start&&this.raise(i.typeAnnotation.start,Kt.TypeBeforeInitializer),i}shouldParseDefaultImport(t){return Wt(t)?Jt(this.state.type):super.shouldParseDefaultImport(t)}parseImportSpecifierLocal(t,e,s,i){e.local=Wt(t)?this.flowParseRestrictedIdentifier(!0,!0):this.parseIdentifier(),this.checkLVal(e.local,i,9),t.specifiers.push(this.finishNode(e,s))}maybeParseDefaultImportSpecifier(t){t.importKind="value";let e=null;if(this.match(83)?e="typeof":this.isContextual(122)&&(e="type"),e){const s=this.lookahead(),{type:i}=s;"type"===e&&51===i&&this.unexpected(s.start),(Jt(i)||5===i||51===i)&&(this.next(),t.importKind=e)}return super.maybeParseDefaultImportSpecifier(t)}parseImportSpecifier(t,e,s,i){const r=t.imported;let a=null;"Identifier"===r.type&&("type"===r.name?a="type":"typeof"===r.name&&(a="typeof"));let n=!1;if(this.isContextual(89)&&!this.isLookaheadContextual("as")){const e=this.parseIdentifier(!0);null===a||z(this.state.type)?(t.imported=r,t.importKind=null,t.local=this.parseIdentifier()):(t.imported=e,t.importKind=a,t.local=Ht(e))}else{if(null!==a&&z(this.state.type))t.imported=this.parseIdentifier(!0),t.importKind=a;else{if(e)throw this.raise(t.start,f.ImportBindingIsString,r.value);t.imported=r,t.importKind=null}this.eatContextual(89)?t.local=this.parseIdentifier():(n=!0,t.local=Ht(t.imported))}const o=Wt(t);return s&&o&&this.raise(t.start,Kt.ImportTypeShorthandOnlyInPureImport),(s||o)&&this.checkReservedType(t.local.name,t.local.start,!0),!n||s||o||this.checkReservedWord(t.local.name,t.start,!0,!0),this.checkLVal(t.local,"import specifier",9),this.finishNode(t,"ImportSpecifier")}parseBindingAtom(){switch(this.state.type){case 74:return this.parseIdentifier(!0);default:return super.parseBindingAtom()}}parseFunctionParams(t,e){const s=t.kind;"get"!==s&&"set"!==s&&this.match(45)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.parseFunctionParams(t,e)}parseVarId(t,e){super.parseVarId(t,e),this.match(14)&&(t.id.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(t.id))}parseAsyncArrowFromCallExpression(t,e){if(this.match(14)){const e=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,t.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=e}return super.parseAsyncArrowFromCallExpression(t,e)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}parseMaybeAssign(t,e){var s;let i,r=null;if(this.hasPlugin("jsx")&&(this.match(134)||this.match(45))){if(r=this.state.clone(),i=this.tryParse((()=>super.parseMaybeAssign(t,e)),r),!i.error)return i.node;const{context:s}=this.state,a=s[s.length-1];a!==T.j_oTag&&a!==T.j_expr||s.pop()}if(null!=(s=i)&&s.error||this.match(45)){var a,n;let s;r=r||this.state.clone();const o=this.tryParse((i=>{var r;s=this.flowParseTypeParameterDeclaration();const a=this.forwardNoArrowParamsConversionAt(s,(()=>{const i=super.parseMaybeAssign(t,e);return this.resetStartLocationFromNode(i,s),i}));null!=(r=a.extra)&&r.parenthesized&&i();const n=this.maybeUnwrapTypeCastExpression(a);return"ArrowFunctionExpression"!==n.type&&i(),n.typeParameters=s,this.resetStartLocationFromNode(n,s),a}),r);let h=null;if(o.node&&"ArrowFunctionExpression"===this.maybeUnwrapTypeCastExpression(o.node).type){if(!o.error&&!o.aborted)return o.node.async&&this.raise(s.start,Kt.UnexpectedTypeParameterBeforeAsyncArrowFunction),o.node;h=o.node}if(null!=(a=i)&&a.node)return this.state=i.failState,i.node;if(h)return this.state=o.failState,h;if(null!=(n=i)&&n.thrown)throw i.error;if(o.thrown)throw o.error;throw this.raise(s.start,Kt.UnexpectedTokenAfterTypeParameter)}return super.parseMaybeAssign(t,e)}parseArrow(t){if(this.match(14)){const e=this.tryParse((()=>{const e=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;const s=this.startNode();return[s.typeAnnotation,t.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=e,this.canInsertSemicolon()&&this.unexpected(),this.match(19)||this.unexpected(),s}));if(e.thrown)return null;e.error&&(this.state=e.failState),t.returnType=e.node.typeAnnotation?this.finishNode(e.node,"TypeAnnotation"):null}return super.parseArrow(t)}shouldParseArrow(t){return this.match(14)||super.shouldParseArrow(t)}setArrowFunctionParameters(t,e){-1!==this.state.noArrowParamsConversionAt.indexOf(t.start)?t.params=e:super.setArrowFunctionParameters(t,e)}checkParams(t,e,s){if(!s||-1===this.state.noArrowParamsConversionAt.indexOf(t.start)){for(let e=0;e<t.params.length;e++)this.isThisParam(t.params[e])&&e>0&&this.raise(t.params[e].start,Kt.ThisParamMustBeFirst);return super.checkParams(...arguments)}}parseParenAndDistinguishExpression(t){return super.parseParenAndDistinguishExpression(t&&-1===this.state.noArrowAt.indexOf(this.state.start))}parseSubscripts(t,e,s,i){if("Identifier"===t.type&&"async"===t.name&&-1!==this.state.noArrowAt.indexOf(e)){this.next();const i=this.startNodeAt(e,s);i.callee=t,i.arguments=this.parseCallExpressionArguments(11,!1),t=this.finishNode(i,"CallExpression")}else if("Identifier"===t.type&&"async"===t.name&&this.match(45)){const r=this.state.clone(),a=this.tryParse((t=>
1this.parseAsyncArrowWithTypeParameters(e,s)||t()),r);if(!a.error&&!a.aborted)return a.node;const n=this.tryParse((()=>super.parseSubscripts(t,e,s,i)),r);if(n.node&&!n.error)return n.node;if(a.node)return this.state=a.failState,a.node;if(n.node)return this.state=n.failState,n.node;throw a.error||n.error}return super.parseSubscripts(t,e,s,i)}parseSubscript(t,e,s,i,r){if(this.match(18)&&this.isLookaheadToken_lt()){if(r.optionalChainMember=!0,i)return r.stop=!0,t;this.next();const a=this.startNodeAt(e,s);return a.callee=t,a.typeArguments=this.flowParseTypeParameterInstantiation(),this.expect(10),a.arguments=this.parseCallExpressionArguments(11,!1),a.optional=!0,this.finishCallExpression(a,!0)}if(!i&&this.shouldParseTypes()&&this.match(45)){const i=this.startNodeAt(e,s);i.callee=t;const a=this.tryParse((()=>(i.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),i.arguments=this.parseCallExpressionArguments(11,!1),r.optionalChainMember&&(i.optional=!1),this.finishCallExpression(i,r.optionalChainMember))));if(a.node)return a.error&&(this.state=a.failState),a.node}return super.parseSubscript(t,e,s,i,r)}parseNewArguments(t){let e=null;this.shouldParseTypes()&&this.match(45)&&(e=this.tryParse((()=>this.flowParseTypeParameterInstantiationCallOrNew())).node),t.typeArguments=e,super.parseNewArguments(t)}parseAsyncArrowWithTypeParameters(t,e){const s=this.startNodeAt(t,e);if(this.parseFunctionParams(s),this.parseArrow(s))return this.parseArrowExpression(s,void 0,!0)}readToken_mult_modulo(t){const e=this.input.charCodeAt(this.state.pos+1);if(42===t&&47===e&&this.state.hasFlowComment)return this.state.hasFlowComment=!1,this.state.pos+=2,void this.nextToken();super.readToken_mult_modulo(t)}readToken_pipe_amp(t){const e=this.input.charCodeAt(this.state.pos+1);124!==t||125!==e?super.readToken_pipe_amp(t):this.finishOp(9,2)}parseTopLevel(t,e){const s=super.parseTopLevel(t,e);return this.state.hasFlowComment&&this.raise(this.state.pos,Kt.UnterminatedFlowComment),s}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment())return this.state.hasFlowComment&&this.unexpected(null,Kt.NestedFlowComment),this.hasFlowCommentCompletion(),this.state.pos+=this.skipFlowComment(),void(this.state.hasFlowComment=!0);if(!this.state.hasFlowComment)return super.skipBlockComment();{const t=this.input.indexOf("*-/",this.state.pos+=2);if(-1===t)throw this.raise(this.state.pos-2,f.UnterminatedComment);this.state.pos=t+3}}skipFlowComment(){const{pos:t}=this.state;let e=2;for(;[32,9].includes(this.input.charCodeAt(t+e));)e++;const s=this.input.charCodeAt(e+t),i=this.input.charCodeAt(e+t+1);return 58===s&&58===i?e+2:"flow-include"===this.input.slice(e+t,e+t+12)?e+12:58===s&&58!==i&&e}hasFlowCommentCompletion(){if(-1===this.input.indexOf("*/",this.state.pos))throw this.raise(this.state.pos,f.UnterminatedComment)}flowEnumErrorBooleanMemberNotInitialized(t,{enumName:e,memberName:s}){this.raise(t,Kt.EnumBooleanMemberNotInitialized,s,e)}flowEnumErrorInvalidMemberName(t,{enumName:e,memberName:s}){const i=s[0].toUpperCase()+s.slice(1);this.raise(t,Kt.EnumInvalidMemberName,s,i,e)}flowEnumErrorDuplicateMemberName(t,{enumName:e,memberName:s}){this.raise(t,Kt.EnumDuplicateMemberName,s,e)}flowEnumErrorInconsistentMemberValues(t,{enumName:e}){this.raise(t,Kt.EnumInconsistentMemberValues,e)}flowEnumErrorInvalidExplicitType(t,{enumName:e,suppliedType:s}){return this.raise(t,null===s?Kt.EnumInvalidExplicitTypeUnknownSupplied:Kt.EnumInvalidExplicitType,e,s)}flowEnumErrorInvalidMemberInitializer(t,{enumName:e,explicitType:s,memberName:i}){let r=null;switch(s){case"boolean":case"number":case"string":r=Kt.EnumInvalidMemberInitializerPrimaryType;break;case"symbol":r=Kt.EnumInvalidMemberInitializerSymbolType;break;default:r=Kt.EnumInvalidMemberInitializerUnknownType}return this.raise(t,r,e,i,s)}flowEnumErrorNumberMemberNotInitialized(t,{enumName:e,memberName:s}){this.raise(t,Kt.EnumNumberMemberNotInitialized,e,s)}flowEnumErrorStringMemberInconsistentlyInitailized(t,{enumName:e}){this.raise(t,Kt.EnumStringMemberInconsistentlyInitailized,e)}flowEnumMemberInit(){const t=this.state.start,e=()=>this.match(12)||this.match(8);switch(this.state.type){case 126:{const s=this.parseNumericLiteral(this.state.value);return e()?{type:"number",pos:s.start,value:s}:{type:"invalid",pos:t}}case 125:{const s=this.parseStringLiteral(this.state.value);return e()?{type:"string",pos:s.start,value:s}:{type:"invalid",pos:t}}case 81:case 82:{const s=this.parseBooleanLiteral(this.match(81));return e()?{type:"boolean",pos:s.start,value:s}:{type:"invalid",pos:t}}default:return{type:"invalid",pos:t}}}flowEnumMemberRaw(){const t=this.state.start;return{id:this.parseIdentifier(!0),init:this.eat(29)?this.flowEnumMemberInit():{type:"none",pos:t}}}flowEnumCheckExplicitTypeMismatch(t,e,s){const{explicitType:i}=e;null!==i&&i!==s&&this.flowEnumErrorInvalidMemberInitializer(t,e)}flowEnumMembers({enumName:t,explicitType:e}){const s=new Set,i={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]};let r=!1;for(;!this.match(8);){if(this.eat(21)){r=!0;break}const a=this.startNode(),{id:n,init:o}=this.flowEnumMemberRaw(),h=n.name;if(""===h)continue;/^[a-z]/.test(h)&&this.flowEnumErrorInvalidMemberName(n.start,{enumName:t,memberName:h}),s.has(h)&&this.flowEnumErrorDuplicateMemberName(n.start,{enumName:t,memberName:h}),s.add(h);const p={enumName:t,explicitType:e,memberName:h};switch(a.id=n,o.type){case"boolean":this.flowEnumCheckExplicitTypeMismatch(o.pos,p,"boolean"),a.init=o.value,i.booleanMembers.push(this.finishNode(a,"EnumBooleanMember"));break;case"number":this.flowEnumCheckExplicitTypeMismatch(o.pos,p,"number"),a.init=o.value,i.numberMembers.push(this.finishNode(a,"EnumNumberMember"));break;case"string":this.flowEnumCheckExplicitTypeMismatch(o.pos,p,"string"),a.init=o.value,i.stringMembers.push(this.finishNode(a,"EnumStr
1ingMember"));break;case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(o.pos,p);case"none":switch(e){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(o.pos,p);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(o.pos,p);break;default:i.defaultedMembers.push(this.finishNode(a,"EnumDefaultedMember"))}}this.match(8)||this.expect(12)}return{members:i,hasUnknownMembers:r}}flowEnumStringMembers(t,e,{enumName:s}){if(0===t.length)return e;if(0===e.length)return t;if(e.length>t.length){for(const e of t)this.flowEnumErrorStringMemberInconsistentlyInitailized(e.start,{enumName:s});return e}for(const i of e)this.flowEnumErrorStringMemberInconsistentlyInitailized(i.start,{enumName:s});return t}flowEnumParseExplicitType({enumName:t}){if(this.eatContextual(97)){if(!_(this.state.type))throw this.flowEnumErrorInvalidExplicitType(this.state.start,{enumName:t,suppliedType:null});const{value:e}=this.state;return this.next(),"boolean"!==e&&"number"!==e&&"string"!==e&&"symbol"!==e&&this.flowEnumErrorInvalidExplicitType(this.state.start,{enumName:t,suppliedType:e}),e}return null}flowEnumBody(t,{enumName:e,nameLoc:s}){const i=this.flowEnumParseExplicitType({enumName:e});this.expect(5);const{members:r,hasUnknownMembers:a}=this.flowEnumMembers({enumName:e,explicitType:i});switch(t.hasUnknownMembers=a,i){case"boolean":return t.explicitType=!0,t.members=r.booleanMembers,this.expect(8),this.finishNode(t,"EnumBooleanBody");case"number":return t.explicitType=!0,t.members=r.numberMembers,this.expect(8),this.finishNode(t,"EnumNumberBody");case"string":return t.explicitType=!0,t.members=this.flowEnumStringMembers(r.stringMembers,r.defaultedMembers,{enumName:e}),this.expect(8),this.finishNode(t,"EnumStringBody");case"symbol":return t.members=r.defaultedMembers,this.expect(8),this.finishNode(t,"EnumSymbolBody");default:{const i=()=>(t.members=[],this.expect(8),this.finishNode(t,"EnumStringBody"));t.explicitType=!1;const a=r.booleanMembers.length,n=r.numberMembers.length,o=r.stringMembers.length,h=r.defaultedMembers.length;if(a||n||o||h){if(a||n){if(!n&&!o&&a>=h){for(const t of r.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(t.start,{enumName:e,memberName:t.id.name});return t.members=r.booleanMembers,this.expect(8),this.finishNode(t,"EnumBooleanBody")}if(!a&&!o&&n>=h){for(const t of r.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(t.start,{enumName:e,memberName:t.id.name});return t.members=r.numberMembers,this.expect(8),this.finishNode(t,"EnumNumberBody")}return this.flowEnumErrorInconsistentMemberValues(s,{enumName:e}),i()}return t.members=this.flowEnumStringMembers(r.stringMembers,r.defaultedMembers,{enumName:e}),this.expect(8),this.finishNode(t,"EnumStringBody")}return i()}}}flowParseEnumDeclaration(t){const e=this.parseIdentifier();return t.id=e,t.body=this.flowEnumBody(this.startNode(),{enumName:e.name,nameLoc:e.start}),this.finishNode(t,"EnumDeclaration")}isLookaheadToken_lt(){const t=this.nextTokenStart();if(60===this.input.charCodeAt(t)){const e=this.input.charCodeAt(t+1);return 60!==e&&61!==e}return!1}maybeUnwrapTypeCastExpression(t){return"TypeCastExpression"===t.type?t.expression:t}},typescript:t=>class extends t{getScopeHandler(){return ie}tsIsIdentifier(){return _(this.state.type)}tsTokenCanFollowModifier(){return(this.match(0)||this.match(5)||this.match(51)||this.match(21)||this.match(130)||this.isLiteralPropertyName())&&!this.hasPrecedingLineBreak()}tsNextTokenCanFollowModifier(){return this.next(),this.tsTokenCanFollowModifier()}tsParseModifier(t,e){if(!_(this.state.type))return;const s=this.state.value;if(-1!==t.indexOf(s)){if(e&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return s}}tsParseModifiers(t,e,s,i,r){const a=(e,s,i,r)=>{s===i&&t[r]&&this.raise(e,ae.InvalidModifiersOrder,i,r)},n=(e,s,i,r)=>{(t[i]&&s===r||t[r]&&s===i)&&this.raise(e,ae.IncompatibleModifiers,i,r)};for(;;){const o=this.state.start,h=this.tsParseModifier(e.concat(null!=s?s:[]),r);if(!h)break;ne(h)?t.accessibility?this.raise(o,ae.DuplicateAccessibilityModifier):(a(o,h,h,"override"),a(o,h,h,"static"),a(o,h,h,"readonly"),t.accessibility=h):(Object.hasOwnProperty.call(t,h)?this.raise(o,ae.DuplicateModifier,h):(a(o,h,"static","readonly"),a(o,h,"static","override"),a(o,h,"override","readonly"),a(o,h,"abstract","override"),n(o,h,"declare","override"),n(o,h,"static","abstract")),t[h]=!0),null!=s&&s.includes(h)&&this.raise(o,i,h)}}tsIsListTerminator(t){switch(t){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(46)}throw new Error("Unreachable")}tsParseList(t,e){const s=[];for(;!this.tsIsListTerminator(t);)s.push(e());return s}tsParseDelimitedList(t,e,s){return function(t){if(null==t)throw new Error(`Unexpected ${t} value.`);return t}(this.tsParseDelimitedListWorker(t,e,!0,s))}tsParseDelimitedListWorker(t,e,s,i){const r=[];let a=-1;for(;!this.tsIsListTerminator(t);){a=-1;const i=e();if(null==i)return;if(r.push(i),!this.eat(12)){if(this.tsIsListTerminator(t))break;return void(s&&this.expect(12))}a=this.state.lastTokStart}return i&&(i.value=a),r}tsParseBracketedList(t,e,s,i,r){i||(s?this.expect(0):this.expect(45));const a=this.tsParseDelimitedList(t,e,r);return s?this.expect(3):this.expect(46),a}tsParseImportType(){const t=this.startNode();return this.expect(79),this.expect(10),this.match(125)||this.raise(this.state.start,ae.UnsupportedImportTypeArgument),t.argument=this.parseExprAtom(),this.expect(11),this.eat(16)&&(t.qualifier=this.tsParseEntityName(!0)),this.match(45)&&(t.typeParameters=this.tsParseTypeArguments()),this.finishNode(t,"TSImportType")}tsParseEntityName(t){let e=this.parseIdentifier();for(;this.eat(16);){const s=this.startNodeAtNode(e);s.left=e,s.right=this.parseIdentifier(t),e=this.finishNode(s,"TSQualifiedName")}return e}tsParseTypeReference(){const t=this.startNode();return t.typeName=this.tsParseEntityName(!1),!this.hasPrecedingLineBreak()&&this.match(45)&&(t.typeParameters=this.tsParseTypeArguments()),this.finishNode(t,"TSTypeReference")}tsParseThisTypePredicate(t){this.next();const e=this.startNodeAtNode(t);return e.parameterName=t,e.typeAnnotation=this.tsParseTypeAnnotation(!1),e.asserts=!1,this.finishNode(e,"TSTypePredicate")}tsParseThisTypeNode(){const t=this.startNode();return this.next(),this.finishNode(t,"TSThisType")}tsParseTypeQuery(){const t=this.startNode();return this.expect(83),this.match(79)?t.exprName=this.tsParseImportType():t.exprName=this.tsParseEntityName(!0),this.finishNode(t,"TSTypeQuery")}tsParseTypeParameter(){const t=this.startNode();return t.name=this.tsParseTypeParameterName(),t.constraint=this.tsEatThenParseType(77),t.default=this.tsEatThenParseType(29),this.finishNode(t,"TSTypeParameter")}tsTryParseTypeParameters(){if(this.match(45))return this.tsParseTypeParameters()}tsParseTypeParameters(){const t=this.startNode();this.match(45)||this.match(134)?this.next():this.unexpected();const e={value:-1};return t.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this),!1,!0,e),0===t.params.length&&this.raise(t.start,ae.EmptyTypeParameters),-1!==e.value&&this.addExtra(t,"trailingComma",e.value),this.finishNode(t,"TSTypeParameterDeclaration")}tsTryNextParseConstantContext(){return 71===this.lookahead().type?(this.next(),this.tsParseTypeReference()):null}tsFillSignature(t,e){const s=19===t;e.typeParameters=this.tsTryParseTypeParameters(),this.expect(10),e.parameters=this.tsParseBindingListForSignature(),(s||this.match(t))&&(e.typeAnnotation=this.tsParseTypeOrTypePredicateAnnotation(t))}tsParseBindingListForSignature(){return this.parseBindingList(11,41).map((t=>("Identifier"!==t.type&&"RestElement"!==t.type&&"ObjectPattern"!==t.type&&"ArrayPattern"!==t.type&&this.raise(t.start,ae.UnsupportedSignatureParameterKind,t.type),t)))}tsParseTypeMemberSemicolon(){this.eat(12)||this.isLineTerminator()||this.expect(13)}tsParseSignatureMember(t,e){return this.tsFillSignature(14,e),this.tsParseTypeMemberSemicolon(),this.finishNode(e,t)}
1tsIsUnambiguouslyIndexSignature(){return this.next(),!!_(this.state.type)&&(this.next(),this.match(14))}tsTryParseIndexSignature(t){if(!this.match(0)||!this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))return;this.expect(0);const e=this.parseIdentifier();e.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(e),this.expect(3),t.parameters=[e];const s=this.tsTryParseTypeAnnotation();return s&&(t.typeAnnotation=s),this.tsParseTypeMemberSemicolon(),this.finishNode(t,"TSIndexSignature")}tsParsePropertyOrMethodSignature(t,e){this.eat(17)&&(t.optional=!0);const s=t;if(this.match(10)||this.match(45)){e&&this.raise(t.start,ae.ReadonlyForMethodSignature);const i=s;if(i.kind&&this.match(45)&&this.raise(this.state.pos,ae.AccesorCannotHaveTypeParameters),this.tsFillSignature(14,i),this.tsParseTypeMemberSemicolon(),"get"===i.kind)i.parameters.length>0&&(this.raise(this.state.pos,f.BadGetterArity),this.isThisParam(i.parameters[0])&&this.raise(this.state.pos,ae.AccesorCannotDeclareThisParameter));else if("set"===i.kind){if(1!==i.parameters.length)this.raise(this.state.pos,f.BadSetterArity);else{const t=i.parameters[0];this.isThisParam(t)&&this.raise(this.state.pos,ae.AccesorCannotDeclareThisParameter),"Identifier"===t.type&&t.optional&&this.raise(this.state.pos,ae.SetAccesorCannotHaveOptionalParameter),"RestElement"===t.type&&this.raise(this.state.pos,ae.SetAccesorCannotHaveRestParameter)}i.typeAnnotation&&this.raise(i.typeAnnotation.start,ae.SetAccesorCannotHaveReturnType)}else i.kind="method";return this.finishNode(i,"TSMethodSignature")}{const t=s;e&&(t.readonly=!0);const i=this.tsTryParseTypeAnnotation();return i&&(t.typeAnnotation=i),this.tsParseTypeMemberSemicolon(),this.finishNode(t,"TSPropertySignature")}}tsParseTypeMember(){const t=this.startNode();if(this.match(10)||this.match(45))return this.tsParseSignatureMember("TSCallSignatureDeclaration",t);if(this.match(73)){const e=this.startNode();return this.next(),this.match(10)||this.match(45)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",t):(t.key=this.createIdentifier(e,"new"),this.tsParsePropertyOrMethodSignature(t,!1))}this.tsParseModifiers(t,["readonly"],["declare","abstract","private","protected","public","static","override"],ae.InvalidModifierOnTypeMember);const e=this.tsTryParseIndexSignature(t);return e||(this.parsePropertyName(t),t.computed||"Identifier"!==t.key.type||"get"!==t.key.name&&"set"!==t.key.name||!this.tsTokenCanFollowModifier()||(t.kind=t.key.name,this.parsePropertyName(t)),this.tsParsePropertyOrMethodSignature(t,!!t.readonly))}tsParseTypeLiteral(){const t=this.startNode();return t.members=this.tsParseObjectTypeMembers(),this.finishNode(t,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(5);const t=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(8),t}tsIsStartOfMappedType(){return this.next(),this.eat(49)?this.isContextual(114):(this.isContextual(114)&&this.next(),!!this.match(0)&&(this.next(),!!this.tsIsIdentifier()&&(this.next(),this.match(54))))}tsParseMappedTypeParameter(){const t=this.startNode();return t.name=this.tsParseTypeParameterName(),t.constraint=this.tsExpectThenParseType(54),this.finishNode(t,"TSTypeParameter")}tsParseMappedType(){const t=this.startNode();return this.expect(5),this.match(49)?(t.readonly=this.state.value,this.next(),this.expectContextual(114)):this.eatContextual(114)&&(t.readonly=!0),this.expect(0),t.typeParameter=this.tsParseMappedTypeParameter(),t.nameType=this.eatContextual(89)?this.tsParseType():null,this.expect(3),this.match(49)?(t.optional=this.state.value,this.next(),this.expect(17)):this.eat(17)&&(t.optional=!0),t.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(8),this.finishNode(t,"TSMappedType")}tsParseTupleType(){const t=this.startNode();t.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let e=!1,s=null;return t.elementTypes.forEach((t=>{var i;let{type:r}=t;!e||"TSRestType"===r||"TSOptionalType"===r||"TSNamedTupleMember"===r&&t.optional||this.raise(t.start,ae.OptionalTypeBeforeRequired),e=e||"TSNamedTupleMember"===r&&t.optional||"TSOptionalType"===r,"TSRestType"===r&&(r=(t=t.typeAnnotation).type);const a="TSNamedTupleMember"===r;s=null!=(i=s)?i:a,s!==a&&this.raise(t.start,ae.MixedLabeledAndUnlabeledElements)})),this.finishNode(t,"TSTupleType")}tsParseTupleElementType(){const{start:t,startLoc:e}=this.state,s=this.eat(21);let i=this.tsParseType();const r=this.eat(17);if(this.eat(14)){const t=this.startNodeAtNode(i);
1t.optional=r,"TSTypeReference"!==i.type||i.typeParameters||"Identifier"!==i.typeName.type?(this.raise(i.start,ae.InvalidTupleMemberLabel),t.label=i):t.label=i.typeName,t.elementType=this.tsParseType(),i=this.finishNode(t,"TSNamedTupleMember")}else if(r){const t=this.startNodeAtNode(i);t.typeAnnotation=i,i=this.finishNode(t,"TSOptionalType")}if(s){const s=this.startNodeAt(t,e);s.typeAnnotation=i,i=this.finishNode(s,"TSRestType")}return i}tsParseParenthesizedType(){const t=this.startNode();return this.expect(10),t.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(t,"TSParenthesizedType")}tsParseFunctionOrConstructorType(t,e){const s=this.startNode();return"TSConstructorType"===t&&(s.abstract=!!e,e&&this.next(),this.next()),this.tsFillSignature(19,s),this.finishNode(s,t)}tsParseLiteralTypeNode(){const t=this.startNode();return t.literal=(()=>{switch(this.state.type){case 126:case 127:case 125:case 81:case 82:return this.parseExprAtom();default:throw this.unexpected()}})(),this.finishNode(t,"TSLiteralType")}tsParseTemplateLiteralType(){const t=this.startNode();return t.literal=this.parseTemplate(!1),this.finishNode(t,"TSLiteralType")}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){const t=this.tsParseThisTypeNode();return this.isContextual(109)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(t):t}tsParseNonArrayType(){switch(this.state.type){case 125:case 126:case 127:case 81:case 82:return this.tsParseLiteralTypeNode();case 49:if("-"===this.state.value){const t=this.startNode(),e=this.lookahead();if(126!==e.type&&127!==e.type)throw this.unexpected();return t.literal=this.parseMaybeUnary(),this.finishNode(t,"TSLiteralType")}break;case 74:return this.tsParseThisTypeOrThisTypePredicate();case 83:return this.tsParseTypeQuery();case 79:return this.tsParseImportType();case 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:t}=this.state;if(_(t)||84===t||80===t){const e=84===t?"TSVoidKeyword":80===t?"TSNullKeyword":function(t){switch(t){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}}(this.state.value);if(void 0!==e&&46!==this.lookaheadCharCode()){const t=this.startNode();return this.next(),this.finishNode(t,e)}return this.tsParseTypeReference()}}}throw this.unexpected()}tsParseArrayTypeOrHigher(){let t=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(3)){const e=this.startNodeAtNode(t);e.elementType=t,this.expect(3),t=this.finishNode(e,"TSArrayType")}else{const e=this.startNodeAtNode(t);e.objectType=t,e.indexType=this.tsParseType(),this.expect(3),t=this.finishNode(e,"TSIndexedAccessType")}return t}tsParseTypeOperator(){const t=this.startNode(),e=this.state.value;return this.next(),t.operator=e,t.typeAnnotation=this.tsParseTypeOperatorOrHigher(),"readonly"===e&&this.tsCheckTypeAnnotationForReadOnly(t),this.finishNode(t,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(t){switch(t.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(t.start,ae.UnexpectedReadonly)}}tsParseInferType(){const t=this.startNode();this.expectContextual(108);const e=this.startNode();return e.name=this.tsParseTypeParameterName(),t.typeParameter=this.finishNode(e,"TSTypeParameter"),this.finishNode(t,"TSInferType")}tsParseTypeOperatorOrHigher(){var t;return(t=this.state.type)>=113&&t<=115&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(108)?this.tsParseInferType():this.tsParseArrayTypeOrHigher()}tsParseUnionOrIntersectionType(t,e,s){const i=this.startNode(),r=this.eat(s),a=[];do{a.push(e())}while(this.eat(s));return 1!==a.length||r?(i.types=a,this.finishNode(i,t)):a[0]}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),43)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),41)}tsIsStartOfFunctionType(){return!!this.match(45)||this.match(10)&&this.tsLookAhead(this.tsIsUnambiguou
1slyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(_(this.state.type)||this.match(74))return this.next(),!0;if(this.match(5)){let t=1;for(this.next();t>0;)this.match(5)?++t:this.match(8)&&--t,this.next();return!0}if(this.match(0)){let t=1;for(this.next();t>0;)this.match(0)?++t:this.match(3)&&--t,this.next();return!0}return!1}tsIsUnambiguouslyStartOfFunctionType(){if(this.next(),this.match(11)||this.match(21))return!0;if(this.tsSkipParameterStart()){if(this.match(14)||this.match(12)||this.match(17)||this.match(29))return!0;if(this.match(11)&&(this.next(),this.match(19)))return!0}return!1}tsParseTypeOrTypePredicateAnnotation(t){return this.tsInType((()=>{const e=this.startNode();this.expect(t);const s=this.startNode(),i=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(i&&this.match(74)){let t=this.tsParseThisTypeOrThisTypePredicate();return"TSThisType"===t.type?(s.parameterName=t,s.asserts=!0,s.typeAnnotation=null,t=this.finishNode(s,"TSTypePredicate")):(this.resetStartLocationFromNode(t,s),t.asserts=!0),e.typeAnnotation=t,this.finishNode(e,"TSTypeAnnotation")}const r=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!r)return i?(s.parameterName=this.parseIdentifier(),s.asserts=i,s.typeAnnotation=null,e.typeAnnotation=this.finishNode(s,"TSTypePredicate"),this.finishNode(e,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,e);const a=this.tsParseTypeAnnotation(!1);return s.parameterName=r,s.typeAnnotation=a,s.asserts=i,e.typeAnnotation=this.finishNode(s,"TSTypePredicate"),this.finishNode(e,"TSTypeAnnotation")}))}tsTryParseTypeOrTypePredicateAnnotation(){return this.match(14)?this.tsParseTypeOrTypePredicateAnnotation(14):void 0}tsTryParseTypeAnnotation(){return this.match(14)?this.tsParseTypeAnnotation():void 0}tsTryParseType(){return this.tsEatThenParseType(14)}tsParseTypePredicatePrefix(){const t=this.parseIdentifier();if(this.isContextual(109)&&!this.hasPrecedingLineBreak())return this.next(),t}tsParseTypePredicateAsserts(){if(102!==this.state.type)return!1;const t=this.state.containsEsc;return this.next(),!(!_(this.state.type)&&!this.match(74))&&(t&&this.raise(this.state.lastTokStart,f.InvalidEscapedReservedWord,"asserts"),!0)}tsParseTypeAnnotation(t=!0,e=this.startNode()){return this.tsInType((()=>{t&&this.expect(14),e.typeAnnotation=this.tsParseType()})),this.finishNode(e,"TSTypeAnnotation")}tsParseType(){re(this.state.inType);const t=this.tsParseNonConditionalType();if(this.hasPrecedingLineBreak()||!this.eat(77))return t;const e=this.startNodeAtNode(t);return e.checkType=t,e.extendsType=this.tsParseNonConditionalType(),this.expect(17),e.trueType=this.tsParseType(),this.expect(14),e.falseType=this.tsParseType(),this.finishNode(e,"TSConditionalType")}isAbstractConstructorSignature(){return this.isContextual(116)&&73===this.lookahead().type}tsParseNonConditionalType(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(73)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.isAbstractConstructorSignature()?this.tsParseFunctionOrConstructorType("TSConstructorType",!0):this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(this.state.start,ae.ReservedTypeAssertion);const t=this.startNode(),e=this.tsTryNextParseConstantContext();return t.typeAnnotation=e||this.tsNextThenParseType(),this.expect(46),t.expression=this.parseMaybeUnary(),this.finishNode(t,"TSTypeAssertion")}tsParseHeritageClause(t){const e=this.state.start,s=this.tsParseDelimitedList("HeritageClauseElement",this.tsParseExpressionWithTypeArguments.bind(this));return s.length||this.raise(e,ae.EmptyHeritageClauseType,t),s}tsParseExpressionWithTypeArguments(){const t=this.startNode();return t.expression=this.tsParseEntityName(!1),this.match(45)&&(t.typeParameters=this.tsParseTypeArguments()),this.finishNode(t,"TSExpressionWithTypeArguments")}tsParseInterfaceDeclaration(t){_(this.state.type)?(t.id=this.parseIdentifier(),this.checkLVal(t.id,"typescript interface declaration",130)):(t.id=null,this.raise(this.state.start,ae.MissingInterfaceName)),t.typeParameters=this.tsTryParseTypeParameters(),this.eat(77)&&(t.extends=this.tsParseHeritageClause("extends"));const e=this.startNode();return e.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),t.body=this.finishNode(e,"TSInterfaceBody"),this.finishNode(t,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(t){return t.id=this.parseIdentifier(),this.checkLVal(t.id,"typescript type alias",2),t.typeParameters=this.tsTryParseTypeParameters(),t.typeAnnotation=this.tsInType((()=>
1{if(this.expect(29),this.isContextual(107)&&16!==this.lookahead().type){const t=this.startNode();return this.next(),this.finishNode(t,"TSIntrinsicKeyword")}return this.tsParseType()})),this.semicolon(),this.finishNode(t,"TSTypeAliasDeclaration")}tsInNoContext(t){const e=this.state.context;this.state.context=[e[0]];try{return t()}finally{this.state.context=e}}tsInType(t){const e=this.state.inType;this.state.inType=!0;try{return t()}finally{this.state.inType=e}}tsEatThenParseType(t){return this.match(t)?this.tsNextThenParseType():void 0}tsExpectThenParseType(t){return this.tsDoThenParseType((()=>this.expect(t)))}tsNextThenParseType(){return this.tsDoThenParseType((()=>this.next()))}tsDoThenParseType(t){return this.tsInType((()=>(t(),this.tsParseType())))}tsParseEnumMember(){const t=this.startNode();return t.id=this.match(125)?this.parseExprAtom():this.parseIdentifier(!0),this.eat(29)&&(t.initializer=this.parseMaybeAssignAllowIn()),this.finishNode(t,"TSEnumMember")}tsParseEnumDeclaration(t,e){return e&&(t.const=!0),t.id=this.parseIdentifier(),this.checkLVal(t.id,"typescript enum declaration",e?779:267),this.expect(5),t.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(t,"TSEnumDeclaration")}tsParseModuleBlock(){const t=this.startNode();return this.scope.enter(0),this.expect(5),this.parseBlockOrModuleBlockBody(t.body=[],void 0,!0,8),this.scope.exit(),this.finishNode(t,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(t,e=!1){if(t.id=this.parseIdentifier(),e||this.checkLVal(t.id,"module or namespace declaration",1024),this.eat(16)){const e=this.startNode();this.tsParseModuleOrNamespaceDeclaration(e,!0),t.body=e}else this.scope.enter(yt),this.prodParam.enter(0),t.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(t,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(t){return this.isContextual(105)?(t.global=!0,t.id=this.parseIdentifier()):this.match(125)?t.id=this.parseExprAtom():this.unexpected(),this.match(5)?(this.scope.enter(yt),this.prodParam.enter(0),t.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(t,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(t,e){t.isExport=e||!1,t.id=this.parseIdentifier(),this.checkLVal(t.id,"import equals declaration",9),this.expect(29);const s=this.tsParseModuleReference();return"type"===t.importKind&&"TSExternalModuleReference"!==s.type&&this.raise(s.start,ae.ImportAliasHasImportType),t.moduleReference=s,this.semicolon(),this.finishNode(t,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual(112)&&40===this.lookaheadCharCode()}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)}tsParseExternalModuleReference(){const t=this.startNode();if(this.expectContextual(112),this.expect(10),!this.match(125))throw this.unexpected();return t.expression=this.parseExprAtom(),this.expect(11),this.finishNode(t,"TSExternalModuleReference")}tsLookAhead(t){const e=this.state.clone(),s=t();return this.state=e,s}tsTryParseAndCatch(t){const e=this.tryParse((e=>t()||e()));if(!e.aborted&&e.node)return e.error&&(this.state=e.failState),e.node}tsTryParse(t){const e=this.state.clone(),s=t();return void 0!==s&&!1!==s?s:void(this.state=e)}tsTryParseDeclare(t){if(this.isLineTerminator())return;let e,s=this.state.type;return this.isContextual(95)&&(s=70,e="let"),this.tsInAmbientContext((()=>{switch(s){case 64:return t.declare=!0,this.parseFunctionStatement(t,!1,!0);case 76:return t.declare=!0,this.parseClass(t,!0,!1);case 71:if(this.match(71)&&this.isLookaheadContextual("enum"))return this.expect(71),this.expectContextual(118),this.tsParseEnumDeclaration(t,!0);case 70:return e=e||this.state.value,this.parseVarStatement(t,e);case 105:return this.tsParseAmbientExternalModuleDeclaration(t);default:if(_(s))return this.tsParseDeclaration(t,this.state.value,!0)}}))}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0)}
1tsParseExpressionStatement(t,e){switch(e.name){case"declare":{const e=this.tsTryParseDeclare(t);if(e)return e.declare=!0,e;break}case"global":if(this.match(5)){this.scope.enter(yt),this.prodParam.enter(0);const s=t;return s.global=!0,s.id=e,s.body=this.tsParseModuleBlock(),this.scope.exit(),this.prodParam.exit(),this.finishNode(s,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(t,e.name,!1)}}tsParseDeclaration(t,e,s){switch(e){case"abstract":if(this.tsCheckLineTerminator(s)&&(this.match(76)||_(this.state.type)))return this.tsParseAbstractDeclaration(t);break;case"enum":if(s||_(this.state.type))return s&&this.next(),this.tsParseEnumDeclaration(t,!1);break;case"interface":if(this.tsCheckLineTerminator(s)&&_(this.state.type))return this.tsParseInterfaceDeclaration(t);break;case"module":if(this.tsCheckLineTerminator(s)){if(this.match(125))return this.tsParseAmbientExternalModuleDeclaration(t);if(_(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(t)}break;case"namespace":if(this.tsCheckLineTerminator(s)&&_(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(t);break;case"type":if(this.tsCheckLineTerminator(s)&&_(this.state.type))return this.tsParseTypeAliasDeclaration(t)}}tsCheckLineTerminator(t){return t?!this.hasFollowingLineBreak()&&(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(t,e){if(!this.match(45))return;const s=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;const i=this.tsTryParseAndCatch((()=>{const s=this.startNodeAt(t,e);return s.typeParameters=this.tsParseTypeParameters(),super.parseFunctionParams(s),s.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(19),s}));return this.state.maybeInArrowParameters=s,i?this.parseArrowExpression(i,null,!0):void 0}tsParseTypeArguments(){const t=this.startNode();return t.params=this.tsInType((()=>this.tsInNoContext((()=>(this.expect(45),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))))),0===t.params.length&&this.raise(t.start,ae.EmptyTypeArguments),this.expect(46),this.finishNode(t,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return(t=this.state.type)>=116&&t<=122;var t}isExportDefaultSpecifier(){return!this.tsIsDeclarationStart()&&super.isExportDefaultSpecifier()}parseAssignableListItem(t,e){const s=this.state.start,i=this.state.startLoc;let r,a=!1,n=!1;if(void 0!==t){const e={};this.tsParseModifiers(e,["public","private","protected","override","readonly"]),r=e.accessibility,n=e.override,a=e.readonly,!1===t&&(r||a||n)&&this.raise(s,ae.UnexpectedParameterModifier)}const o=this.parseMaybeDefault();this.parseAssignableListItemTypes(o);const h=this.parseMaybeDefault(o.start,o.loc.start,o);if(r||a||n){const t=this.startNodeAt(s,i);return e.length&&(t.decorators=e),r&&(t.accessibility=r),a&&(t.readonly=a),n&&(t.override=n),"Identifier"!==h.type&&"AssignmentPattern"!==h.type&&this.raise(t.start,ae.UnsupportedParameterPropertyKind),t.parameter=h,this.finishNode(t,"TSParameterProperty")}return e.length&&(o.decorators=e),h}parseFunctionBodyAndFinish(t,e,s=!1){this.match(14)&&(t.returnType=this.tsParseTypeOrTypePredicateAnnotation(14));const i="FunctionDeclaration"===e?"TSDeclareFunction":"ClassMethod"===e||"ClassPrivateMethod"===e?"TSDeclareMethod":void 0;i&&!this.match(5)&&this.isLineTerminator()?this.finishNode(t,i):"TSDeclareFunction"===i&&this.state.isAmbientContext&&(this.raise(t.start,ae.DeclareFunctionHasImplementation),t.declare)?super.parseFunctionBodyAndFinish(t,i,s):super.parseFunctionBodyAndFinish(t,e,s)}registerFunctionStatementId(t){!t.body&&t.id?this.checkLVal(t.id,"function name",1024):super.registerFunctionStatementId(...arguments)}tsCheckForInvalidTypeCasts(t){t.forEach((t=>{"TSTypeCastExpression"===(null==t?void 0:t.type)&&this.raise(t.typeAnnotation.start,ae.UnexpectedTypeAnnotation)}))}toReferencedList(t,e){return this.tsCheckForInvalidTypeCasts(t),t}parseArrayLike(...t){const e=super.parseArrayLike(...t);return"ArrayExpression"===e.type&&this.tsCheckForInvalidTypeCasts(e.elements),e}parseSubscript(t,e,s,i,r){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();const i=this.startNodeAt(e,s);return i.expression=t,this.finishNode(i,"TSNonNullExpression")}let a=!1;if(this.match(18)&&60===this.lookaheadCharCode()){if(i)return r.stop=!0,t;r.optionalChainMember=a=!0,this.next()}if(this.match(45)){let n;const o=this.tsTryParseAndCatch((()=>
1{if(!i&&this.atPossibleAsyncArrow(t)){const t=this.tsTryParseGenericAsyncArrowFunction(e,s);if(t)return t}const o=this.startNodeAt(e,s);o.callee=t;const h=this.tsParseTypeArguments();if(h){if(a&&!this.match(10)&&(n=this.state.pos,this.unexpected()),!i&&this.eat(10))return o.arguments=this.parseCallExpressionArguments(11,!1),this.tsCheckForInvalidTypeCasts(o.arguments),o.typeParameters=h,r.optionalChainMember&&(o.optional=a),this.finishCallExpression(o,r.optionalChainMember);if(X(this.state.type)){const i=this.parseTaggedTemplateExpression(t,e,s,r);return i.typeParameters=h,i}}this.unexpected()}));if(n&&this.unexpected(n,10),o)return o}return super.parseSubscript(t,e,s,i,r)}parseNewArguments(t){if(this.match(45)){const e=this.tsTryParseAndCatch((()=>{const t=this.tsParseTypeArguments();return this.match(10)||this.unexpected(),t}));e&&(t.typeParameters=e)}super.parseNewArguments(t)}parseExprOp(t,e,s,i){if(J(54)>i&&!this.hasPrecedingLineBreak()&&this.isContextual(89)){const r=this.startNodeAt(e,s);r.expression=t;const a=this.tsTryNextParseConstantContext();return r.typeAnnotation=a||this.tsNextThenParseType(),this.finishNode(r,"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(r,e,s,i)}return super.parseExprOp(t,e,s,i)}checkReservedWord(t,e,s,i){}checkDuplicateExports(){}parseImport(t){if(t.importKind="value",_(this.state.type)||this.match(51)||this.match(5)){let e=this.lookahead();if(this.isContextual(122)&&12!==e.type&&93!==e.type&&29!==e.type&&(t.importKind="type",this.next(),e=this.lookahead()),_(this.state.type)&&29===e.type)return this.tsParseImportEqualsDeclaration(t)}const e=super.parseImport(t);return"type"===e.importKind&&e.specifiers.length>1&&"ImportDefaultSpecifier"===e.specifiers[0].type&&this.raise(e.start,ae.TypeImportCannotSpecifyDefaultAndNamed),e}parseExport(t){if(this.match(79))return this.next(),this.isContextual(122)&&61!==this.lookaheadCharCode()?(t.importKind="type",this.next()):t.importKind="value",this.tsParseImportEqualsDeclaration(t,!0);if(this.eat(29)){const e=t;return e.expression=this.parseExpression(),this.semicolon(),this.finishNode(e,"TSExportAssignment")}if(this.eatContextual(89)){const e=t;return this.expectContextual(120),e.id=this.parseIdentifier(),this.semicolon(),this.finishNode(e,"TSNamespaceExportDeclaration")}return this.isContextual(122)&&5===this.lookahead().type?(this.next(),t.exportKind="type"):t.exportKind="value",super.parseExport(t)}isAbstractClass(){return this.isContextual(116)&&76===this.lookahead().type}parseExportDefaultExpression(){if(this.isAbstractClass()){const t=this.startNode();return this.next(),t.abstract=!0,this.parseClass(t,!0,!0),t}if(this.match(121)){const t=this.startNode();this.next();const e=this.tsParseInterfaceDeclaration(t);if(e)return e}return super.parseExportDefaultExpression()}parseStatementContent(t,e){if(71===this.state.type){if(118===this.lookahead().type){const t=this.startNode();return this.next(),this.expectContextual(118),this.tsParseEnumDeclaration(t,!0)}}return super.parseStatementContent(t,e)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(t,e){return e.some((e=>ne(e)?t.accessibility===e:!!t[e]))}tsIsStartOfStaticBlocks(){return this.isContextual(100)&&123===this.lookaheadCharCode()}parseClassMember(t,e,s){const i=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers(e,i,void 0,void 0,!0);const r=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(e,i)&&this.raise(this.state.pos,ae.StaticBlockCannotHaveModifier),this.parseClassStaticBlock(t,e)):this.parseClassMemberWithIsStatic(t,e,s,!!e.static)};e.declare?this.tsInAmbientContext(r):r()}parseClassMemberWithIsStatic(t,e,s,i){const r=this.tsTryParseIndexSignature(e);if(r)return t.body.push(r),e.abstract&&this.raise(e.start,ae.IndexSignatureHasAbstract),e.accessibility&&this.raise(e.start,ae.IndexSignatureHasAccessibility,e.accessibility),e.declare&&this.raise(e.start,ae.IndexSignatureHasDeclare),void(e.override&&this.raise(e.start,ae.IndexSignatureHasOverride));!this.state.inAbstractClass&&e.abstract&&this.raise(e.start,ae.NonAb
1stractClassHasAbstractMethod),e.override&&(s.hadSuperClass||this.raise(e.start,ae.OverrideNotInSubClass)),super.parseClassMemberWithIsStatic(t,e,s,i)}parsePostMemberNameModifiers(t){this.eat(17)&&(t.optional=!0),t.readonly&&this.match(10)&&this.raise(t.start,ae.ClassMethodHasReadonly),t.declare&&this.match(10)&&this.raise(t.start,ae.ClassMethodHasDeclare)}parseExpressionStatement(t,e){return("Identifier"===e.type?this.tsParseExpressionStatement(t,e):void 0)||super.parseExpressionStatement(t,e)}shouldParseExportDeclaration(){return!!this.tsIsDeclarationStart()||super.shouldParseExportDeclaration()}parseConditional(t,e,s,i){if(!this.state.maybeInArrowParameters||!this.match(17))return super.parseConditional(t,e,s,i);const r=this.tryParse((()=>super.parseConditional(t,e,s)));return r.node?(r.error&&(this.state=r.failState),r.node):(r.error&&super.setOptionalParametersError(i,r.error),t)}parseParenItem(t,e,s){if(t=super.parseParenItem(t,e,s),this.eat(17)&&(t.optional=!0,this.resetEndLocation(t)),this.match(14)){const i=this.startNodeAt(e,s);return i.expression=t,i.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(i,"TSTypeCastExpression")}return t}parseExportDeclaration(t){const e=this.state.start,s=this.state.startLoc,i=this.eatContextual(117);if(i&&(this.isContextual(117)||!this.shouldParseExportDeclaration()))throw this.raise(this.state.start,ae.ExpectedAmbientAfterExportDeclare);let r;return _(this.state.type)&&(r=this.tsTryParseExportDeclaration()),r||(r=super.parseExportDeclaration(t)),r&&("TSInterfaceDeclaration"===r.type||"TSTypeAliasDeclaration"===r.type||i)&&(t.exportKind="type"),r&&i&&(this.resetStartLocation(r,e,s),r.declare=!0),r}parseClassId(t,e,s){if((!e||s)&&this.isContextual(106))return;super.parseClassId(t,e,s,t.declare?1024:139);const i=this.tsTryParseTypeParameters();i&&(t.typeParameters=i)}parseClassPropertyAnnotation(t){!t.optional&&this.eat(35)&&(t.definite=!0);const e=this.tsTryParseTypeAnnotation();e&&(t.typeAnnotation=e)}parseClassProperty(t){if(this.parseClassPropertyAnnotation(t),this.state.isAmbientContext&&this.match(29)&&this.raise(this.state.start,ae.DeclareClassFieldHasInitializer),t.abstract&&this.match(29)){const{key:e}=t;this.raise(this.state.start,ae.AbstractPropertyHasInitializer,"Identifier"!==e.type||t.computed?`[${this.input.slice(e.start,e.end)}]`:e.name)}return super.parseClassProperty(t)}parseClassPrivateProperty(t){return t.abstract&&this.raise(t.start,ae.PrivateElementHasAbstract),t.accessibility&&this.raise(t.start,ae.PrivateElementHasAccessibility,t.accessibility),this.parseClassPropertyAnnotation(t),super.parseClassPrivateProperty(t)}pushClassMethod(t,e,s,i,r,a){const n=this.tsTryParseTypeParameters();n&&r&&this.raise(n.start,ae.ConstructorHasTypeParameters),!e.declare||"get"!==e.kind&&"set"!==e.kind||this.raise(e.start,ae.DeclareAccessor,e.kind),n&&(e.typeParameters=n),super.pushClassMethod(t,e,s,i,r,a)}pushClassPrivateMethod(t,e,s,i){const r=this.tsTryParseTypeParameters();r&&(e.typeParameters=r),super.pushClassPrivateMethod(t,e,s,i)}declareClassPrivateMethodInScope(t,e){"TSDeclareMethod"!==t.type&&("MethodDefinition"!==t.type||t.value.body)&&super.declareClassPrivateMethodInScope(t,e)}parseClassSuper(t){super.parseClassSuper(t),t.superClass&&this.match(45)&&(t.superTypeParameters=this.tsParseTypeArguments()),this.eatContextual(106)&&(t.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(t,...e){const s=this.tsTryParseTypeParameters();s&&(t.typeParameters=s),super.parseObjPropValue(t,...e)}parseFunctionParams(t,e){const s=this.tsTryParseTypeParameters();s&&(t.typeParameters=s),super.parseFunctionParams(t,e)}parseVarId(t,e){super.parseVarId(t,e),"Identifier"===t.id.type&&this.eat(35)&&(t.definite=!0);const s=this.tsTryParseTypeAnnotation();s&&(t.id.typeAnnotation=s,this.resetEndLocation(t.id))}parseAsyncArrowFromCallExpression(t,e){return this.match(14)&&(t.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(t,e)}parseMaybeAssign(...t){var e,s,i,r,a,n,o;let h,p,c,l;if(this.hasPlugin("jsx")&&(this.match(134)||this.match(45))){if(h=this.state.clone(),p=this.tryParse((()=>super.parseMaybeAssign(...t)),h),!p.error)return p.node;const{context:e}=this.state,s=e[e.length-1];s!==T.j_oTag&&s!==T.j_expr||e.pop()}if((null==(e=p)||!e.error)&&!this.match(45))return super.parseMaybeAssign(...t);h=h||this.state.clone();const u=this.tryParse((e=>{var s,i;l=this.tsParseTypeParameters();const r=super.parseMaybeAssign(...t);return("ArrowFunctionExpression"!==r.type||null!=(s=r.extra)&&s.parenthesized)&&e(),0!==(null==(i=l)?void 0:i.params.length)&&this.resetStartLocationFromNode(r,l),r.typeParameters=l,r}),h);if(!u.error&&!u.aborted)return l&&this.reportReservedArrowTypeParam(l),u.node;if(!p&&(re(!this.hasPlugin("jsx")),c=this.tryParse((()=>super.parseMaybeAssign(...t)),h),!c.error))return c.node;if(null!=(s=p)&&s.node)return this.state=p.failState,p.node;if(u.node)return this.state=u.failState,l&&this.reportReservedArrowTypeParam(l),u.node;if(null!=(i=c)&&i.node)return this.state=c.failState,c.node;if(null!=(r=p)&&r.thrown)throw p.error;if(u.thrown)throw u.error;if(null!=(a=c)&&a.thrown)throw c.error;throw(null==(n=p)?void 0:n.error)||u.error||(null==(o=c)?void 0:o.error)}reportReservedArrowTypeParam(t){var e;1!==t.params.length||null!=(e=t.extra)&&e.trailingComma||!this.getPluginOption("typescript","disallowAmbiguousJSXLike")||this.raise(t.start,ae.ReservedArrowTypeParam)}parseMaybeUnary(t){return!this.hasPlugin("jsx")&&this.match(45)?this.tsParseTypeAssertion():super.parseMaybeUnary(t)}parseArrow(t){if(this.match(14)){const e=this.tryParse((t=>{const e=this.tsParseTypeOrTypePredicateAnnotation(14);return!this.canInsertSemicolon()&&this.match(19)||t(),e}));if(e.aborted)return;e.thrown||(e.error&&(this.state=e.failState),t.returnType=e.node)}return super.parseArrow(t)}
1parseAssignableListItemTypes(t){this.eat(17)&&("Identifier"===t.type||this.state.isAmbientContext||this.state.inType||this.raise(t.start,ae.PatternIsOptional),t.optional=!0);const e=this.tsTryParseTypeAnnotation();return e&&(t.typeAnnotation=e),this.resetEndLocation(t),t}isAssignable(t,e){switch(t.type){case"TSTypeCastExpression":return this.isAssignable(t.expression,e);case"TSParameterProperty":return!0;default:return super.isAssignable(t,e)}}toAssignable(t,e=!1){switch(t.type){case"TSTypeCastExpression":return super.toAssignable(this.typeCastToParameter(t),e);case"TSParameterProperty":return super.toAssignable(t,e);case"ParenthesizedExpression":return this.toAssignableParenthesizedExpression(t,e);case"TSAsExpression":case"TSNonNullExpression":case"TSTypeAssertion":return t.expression=this.toAssignable(t.expression,e),t;default:return super.toAssignable(t,e)}}toAssignableParenthesizedExpression(t,e){switch(t.expression.type){case"TSAsExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":return t.expression=this.toAssignable(t.expression,e),t;default:return super.toAssignable(t,e)}}checkLVal(t,e,...s){var i;switch(t.type){case"TSTypeCastExpression":return;case"TSParameterProperty":return void this.checkLVal(t.parameter,"parameter property",...s);case"TSAsExpression":case"TSTypeAssertion":if(!s[0]&&"parenthesized expression"!==e&&(null==(i=t.extra)||!i.parenthesized)){this.raise(t.start,f.InvalidLhs,e);break}return void this.checkLVal(t.expression,"parenthesized expression",...s);case"TSNonNullExpression":return void this.checkLVal(t.expression,e,...s);default:return void super.checkLVal(t,e,...s)}}parseBindingAtom(){switch(this.state.type){case 74:return this.parseIdentifier(!0);default:return super.parseBindingAtom()}}parseMaybeDecoratorArguments(t){if(this.match(45)){const e=this.tsParseTypeArguments();if(this.match(10)){const s=super.parseMaybeDecoratorArguments(t);return s.typeParameters=e,s}this.unexpected(this.state.start,10)}return super.parseMaybeDecoratorArguments(t)}checkCommaAfterRest(t){this.state.isAmbientContext&&this.match(12)&&this.lookaheadCharCode()===t?this.next():super.checkCommaAfterRest(t)}isClassMethod(){return this.match(45)||super.isClassMethod()}isClassProperty(){return this.match(35)||this.match(14)||super.isClassProperty()}parseMaybeDefault(...t){const e=super.parseMaybeDefault(...t);return"AssignmentPattern"===e.type&&e.typeAnnotation&&e.right.start<e.typeAnnotation.start&&this.raise(e.typeAnnotation.start,ae.TypeAnnotationAfterAssign),e}getTokenFromCode(t){if(this.state.inType){if(62===t)return this.finishOp(46,1);if(60===t)return this.finishOp(45,1)}return super.getTokenFromCode(t)}reScan_lt_gt(){const{type:t}=this.state;45===t?(this.state.pos-=1,this.readToken_lt()):46===t&&(this.state.pos-=1,this.readToken_gt())}toAssignableList(t){for(let e=0;e<t.length;e++){const s=t[e];if(s)switch(s.type){case"TSTypeCastExpression":t[e]=this.typeCastToParameter(s);break;case"TSAsExpression":case"TSTypeAssertion":this.state.maybeInArrowParameters?this.raise(s.start,ae.UnexpectedTypeCastInParameter):t[e]=this.typeCastToParameter(s)}}return super.toAssignableList(...arguments)}typeCastToParameter(t){return t.expression.typeAnnotation=t.typeAnnotation,this.resetEndLocation(t.expression,t.typeAnnotation.end,t.typeAnnotation.loc.end),t.expression}shouldParseArrow(t){return this.match(14)?t.every((t=>this.isAssignable(t,!0))):super.shouldParseArrow(t)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(t){if(this.match(45)){const e=this.tsTryParseAndCatch((()=>this.tsParseTypeArguments()));e&&(t.typeParameters=e)}return super.jsxParseOpeningElementAfterName(t)}getGetterSetterExpectedParamCount(t){const e=super.getGetterSetterExpectedParamCount(t),s=this.getObjectOrClassMethodParams(t)[0];return s&&this.isThisParam(s)?e+1:e}parseCatchClauseParam(){const t=super.parseCatchClauseParam(),e=this.tsTryParseTypeAnnotation();return e&&(t.typeAnnotation=e,this.resetEndLocation(t)),t}tsInAmbientContext(t){const e=this.state.isAmbientContext;this.state.isAmbientContext=!0;try{return t()}finally{this.state.isAmbientContext=e}}parseClass(t,...e){const s=this.state.inAbstractClass;this.state.inAbstractClass=!!t.abstract;try{return super.parseClass(t,...e)}finally{this.state.inAbstractClass=s}}tsParseAbstractDeclaration(t){if(this.match(76))return t.abstract=!0,this.parseClass(t,!0,!1);if(this.isContextual(121)){if(!this.hasFollowingLineBreak())return t.abstract=!0,this.raise(t.start,ae.NonClassMethodPropertyHasAbstractModifer),this.next(),this.tsParseInterfaceDeclaration(t)}else this.unexpected(null,76)}parseMethod(...t){const e=super.parseMethod(...t);if(e.abstract){if(this.hasPlugin("estree")?!!e.value.body:!!e.body){const{key:t}=e;this.raise(e.start,ae.AbstractMethodHasImplementation,"Identifier"!==t.type||e.computed?`[${this.input.slice(t.start,t.end)}]`:t.name)}}return e}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(t,e,s,i){return!e&&i?(this.parseTypeOnlyImportExportSpecifier(t,!1,s),this.finishNode(t,"ExportSpecifier")):(t.exportKind="value",super.parseExportSpecifier(t,e,s,i))}parseImportSpecifier(t,e,s,i){return!e&&i?(this.parseTypeOnlyImportExportSpecifier(t,!0,s),this.finishNode(t,"ImportSpecifier")):(t.importKind="value",super.parseImportSpecifier(t,e,s,i))}parseTypeOnlyImportExportSpecifier(t,e,s){const i=e?"imported":"local",r=e?"local":"exported";let a,n=t[i],o=!1,h=!0;const p=n.start;if(this.isContextual(89)){const t=this.parseIdentifier();if(this.isContextual(89)){const e=this.parseIdentifier();z(this.state.type)?(o=!0,n=t,a=this.parseIdentifier(),h=!1):(a=e,h=!1)}else z(this.state.type)?(h=!1,a=this.parseIdentifier()):(o=!0,n=t)}else z(this.state.type)&&(o=!0,n=this.parseIdentifier());o&&s&&this.raise(p,e?ae.TypeModifierIsUsedInTypeImports:ae.TypeModifierIsUsedInTypeExports),t[i]=n,t[r]=a;t[e?"importKind":"exportKind"]=o?"type":"value",h&&this.eatContextual(89)&&(t[r]=e?this.parseIdentifier():this.parseModuleExportName()),t[r]||(t[r]=Ht(t[i])),e&&this.checkLVal(t[r],"import specifier",9)}},v8intrinsic:t=>class extends t{parseV8Intrinsic(){if(this.match(50)){const t=this.state.start,e=this.startNode();if(this.next(),_(this.state.type)){const t=this.parseIdentifierName(this.state.start),s=this.createIdentifier(e,t);if(s.type="V8IntrinsicIdentifier",this.match(10))return s}this.unexpected(t)}}parseExprAtom(){return this.parseV8Intrinsic()||super.parseExprAtom(...arguments)}},placeholders:t=>class extends t{parsePlaceholder(t){if(this.match(136)){const e=this.startNode();return this.next(),this.assertNoSpace("Unexpected space in placeholder."),e.name=super.parseIdentifier(!0),this.assertNoSpace("Unexpected space in placeholder."),this.expect(136),this.finishPlaceholder(e,t)}}finishPlaceholder(t,e){const s=!(!t.expectedNode||"Placeholder"!==t.type);return t.expectedNode=e,s?t:this.finishNode(t,"Placeholder")}getTokenFromCode(t){return 37===t&&37===this.input.charCodeAt(this.state.pos+1)?this.finishOp(136,2):super.getTokenFromCode(...arguments)}parseExprAtom(){return this.parsePlaceholder("Expression")||super.parseExprAtom(...arguments)}parseIdentifier(){return this.parsePlaceholder("Identifier")||super.parseIdentifier(...arguments)}checkReservedWord(t){void 0!==t&&super.checkReservedWord(...arguments)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom(...arguments)}checkLVal(t){"Placeholder"!==t.type&&super.checkLVal(...arguments)}toAssignable(t){return t&&"Placeholder"===t.type&&"Expression"===t.expectedNode?(t.expectedNode="Pattern",t):super.toAssignable(...arguments)}isLet(t){if(super.isLet(t))return!0;
1if(!this.isContextual(95))return!1;if(t)return!1;return 136===this.lookahead().type}verifyBreakContinue(t){t.label&&"Placeholder"===t.label.type||super.verifyBreakContinue(...arguments)}parseExpressionStatement(t,e){if("Placeholder"!==e.type||e.extra&&e.extra.parenthesized)return super.parseExpressionStatement(...arguments);if(this.match(14)){const s=t;return s.label=this.finishPlaceholder(e,"Identifier"),this.next(),s.body=this.parseStatement("label"),this.finishNode(s,"LabeledStatement")}return this.semicolon(),t.name=e.name,this.finishPlaceholder(t,"Statement")}parseBlock(){return this.parsePlaceholder("BlockStatement")||super.parseBlock(...arguments)}parseFunctionId(){return this.parsePlaceholder("Identifier")||super.parseFunctionId(...arguments)}parseClass(t,e,s){const i=e?"ClassDeclaration":"ClassExpression";this.next(),this.takeDecorators(t);const r=this.state.strict,a=this.parsePlaceholder("Identifier");if(a)if(this.match(77)||this.match(136)||this.match(5))t.id=a;else{if(s||!e)return t.id=null,t.body=this.finishPlaceholder(a,"ClassBody"),this.finishNode(t,i);this.unexpected(null,oe.ClassNameIsRequired)}else this.parseClassId(t,e,s);return this.parseClassSuper(t),t.body=this.parsePlaceholder("ClassBody")||this.parseClassBody(!!t.superClass,r),this.finishNode(t,i)}parseExport(t){const e=this.parsePlaceholder("Identifier");if(!e)return super.parseExport(...arguments);if(!this.isContextual(93)&&!this.match(12))return t.specifiers=[],t.source=null,t.declaration=this.finishPlaceholder(e,"Declaration"),this.finishNode(t,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");const s=this.startNode();return s.exported=e,t.specifiers=[this.finishNode(s,"ExportDefaultSpecifier")],super.parseExport(t)}isExportDefaultSpecifier(){if(this.match(61)){const t=this.nextTokenStart();if(this.isUnparsedContextual(t,"from")&&this.input.startsWith(W(136),this.nextTokenStartSince(t+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(t){return!!(t.specifiers&&t.specifiers.length>0)||super.maybeParseExportDefaultSpecifier(...arguments)}checkExport(t){const{specifiers:e}=t;null!=e&&e.length&&(t.specifiers=e.filter((t=>"Placeholder"===t.exported.type))),super.checkExport(t),t.specifiers=e}parseImport(t){const e=this.parsePlaceholder("Identifier");if(!e)return super.parseImport(...arguments);if(t.specifiers=[],!this.isContextual(93)&&!this.match(12))return t.source=this.finishPlaceholder(e,"StringLiteral"),this.semicolon(),this.finishNode(t,"ImportDeclaration");const s=this.startNodeAtNode(e);if(s.local=e,this.finishNode(s,"ImportDefaultSpecifier"),t.specifiers.push(s),this.eat(12)){this.maybeParseStarImportSpecifier(t)||this.parseNamedImportSpecifiers(t)}return this.expectContextual(93),t.source=this.parseImportSource(),this.semicolon(),this.finishNode(t,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource(...arguments)}}},me=Object.keys(de),fe={sourceType:"script",sourceFilename:void 0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,plugins:[],strictMode:null,ranges:!1,tokens:!1,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0};const ye=t=>"ParenthesizedExpression"===t.type?ye(t.expression):t;const xe=new Map([["ArrowFunctionExpression","arrow function"],["AssignmentExpression","assignment"],["ConditionalExpression","conditional"],["YieldExpression","yield"]]);const Pe={kind:"loop"},ge={kind:"switch"},Te=/[\uD800-\uDFFF]/u,be=/in(?:stanceof)?/y;class Ae extends class extends class extends class extends class extends class extends class extends class extends class extends class{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}hasPlugin(t){if("string"===typeof t)return this.plugins.has(t);{const[e,s]=t;if(!this.hasPlugin(e))return!1;const i=this.plugins.get(e);for(const t of Object.keys(s))if((null==i?void 0:i[t])!==s[t])return!1;return!0}}getPluginOption(t,e){var s;return null==(s=this.plugins.get(t))?void 0:s[e]}}{addComment(t){this.filename&&(t.loc.filename=this.filename),this.state.comments.push(t)}processComment(t){const{commentStack:e}=this.state,s=e.length;if(0===s)return;let i=s-1;const r=e[i];r.start===t.end&&(r.leadingNode=t,i--);const{start:a}=t;for(;i>=0;i--){const s=e[i],r=s.end;if(!(r>
1a)){r===a&&(s.trailingNode=t);break}s.containingNode=t,this.finalizeComment(s),e.splice(i,1)}}finalizeComment(t){const{comments:e}=t;if(null!==t.leadingNode||null!==t.trailingNode)null!==t.leadingNode&&l(t.leadingNode,e),null!==t.trailingNode&&function(t,e){void 0===t.leadingComments?t.leadingComments=e:t.leadingComments.unshift(...e)}(t.trailingNode,e);else{const{containingNode:s,start:i}=t;if(44===this.input.charCodeAt(i-1))switch(s.type){case"ObjectExpression":case"ObjectPattern":case"RecordExpression":d(s,s.properties,t);break;case"CallExpression":case"OptionalCallExpression":d(s,s.arguments,t);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":d(s,s.params,t);break;case"ArrayExpression":case"ArrayPattern":case"TupleExpression":d(s,s.elements,t);break;case"ExportNamedDeclaration":case"ImportDeclaration":d(s,s.specifiers,t);break;default:u(s,e)}else u(s,e)}}finalizeRemainingComments(){const{commentStack:t}=this.state;for(let e=t.length-1;e>=0;e--)this.finalizeComment(t[e]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(t){const{commentStack:e}=this.state,{length:s}=e;if(0===s)return;const i=e[s-1];i.leadingNode===t&&(i.leadingNode=null)}takeSurroundingComments(t,e,s){const{commentStack:i}=this.state,r=i.length;if(0===r)return;let a=r-1;for(;a>=0;a--){const r=i[a],n=r.end;if(r.start===s)r.leadingNode=t;else if(n===e)r.trailingNode=t;else if(n<e)break}}}{getLocationForPosition(t){let e;return e=t===this.state.start?this.state.startLoc:t===this.state.lastTokStart?this.state.lastTokStartLoc:t===this.state.end?this.state.endLoc:t===this.state.lastTokEnd?this.state.lastTokEndLoc:function(t,e){let s,r=1,a=0;for(i.lastIndex=0;(s=i.exec(t))&&s.index<e;)r++,a=i.lastIndex;return new h(r,e-a)}(this.input,t),e}raise(t,{code:e,reasonCode:s,template:i},...r){return this.raiseWithData(t,{code:e,reasonCode:s},i,...r)}raiseOverwrite(t,{code:e,template:s},...i){const r=this.getLocationForPosition(t),a=s.replace(/%(\d+)/g,((t,e)=>i[e]))+` (${r.line}:${r.column})`;if(this.options.errorRecovery){const e=this.state.errors;for(let s=e.length-1;s>=0;s--){const i=e[s];if(i.pos===t)return Object.assign(i,{message:a});if(i.pos<t)break}}return this._raise({code:e,loc:r,pos:t},a)}raiseWithData(t,e,s,...i){const r=this.getLocationForPosition(t),a=s.replace(/%(\d+)/g,((t,e)=>i[e]))+` (${r.line}:${r.column})`;return this._raise(Object.assign({loc:r,pos:t},e),a)}_raise(t,e){const s=new SyntaxError(e);if(Object.assign(s,t),this.options.errorRecovery)return this.isLookahead||this.state.errors.push(s),s;throw s}}{constructor(t,e){super(),this.isLookahead=void 0,this.tokens=[],this.state=new St,this.state.init(t),this.input=e,this.length=e.length,this.isLookahead=!1}pushToken(t){this.tokens.length=this.state.tokensLength,this.tokens.push(t),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.options.tokens&&this.pushToken(new vt(this.state)),this.state.lastTokEnd=this.state.end,this.state.lastTokStart=this.state.start,this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(t){return!!this.match(t)&&(this.next(),!0)}match(t){return this.state.type===t}createLookaheadState(t){return{pos:t.pos,value:null,type:t.type,start:t.start,end:t.end,lastTokEnd:t.end,context:[this.curContext()],inType:t.inType}}lookahead(){const t=this.state;this.state=this.createLookaheadState(t),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;const e=this.state;return this.state=t,e}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(t){return a.lastIndex=t,a.test(this.input)?a.lastIndex:t}lookaheadCharCode(){return this.input.charCodeAt(this.nextTokenStart())}codePointAtPos(t){let e=this.input.charCodeAt(t);if(55296===(64512&e)&&++t<this.input.length){const s=this.input.charCodeAt(t);56320===(64512&s)&&(e=65536+((1023&e)<<10)+(1023&s))}return e}setStrict(t){this.state.strict=t,t&&(this.state.strictErrors.forEach(((t,e)=>this.raise(e,t))),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length?this.finishToken(131):this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(){let t;this.isLookahead||(t=this.state.curPosition());const e=this.state.pos,s=this.input.indexOf("*/",e+2);if(-1===s)throw this.raise(e,f.UnterminatedComment);for(this.state.pos=s+2,i.lastIndex=e+2;i.test(this.input)&&i.lastIndex<=s;)++this.state.curLine,this.state.lineStart=i.lastIndex;if(this.isLookahead)return;const r={type:"CommentBlock",value:this.input.slice(e+2,s),start:e,end:s+2,loc:new p(t,this.state.curPosition())};return this.options.tokens&&this.pushToken(r),r}skipLineComment(t){const e=this.state.pos;let s;this.isLookahead||(s=this.state.curPosition());let i=this.input.charCodeAt(this.state.pos+=t);if(this.state.pos<this.length)for(;!r(i)&&++this.state.pos<this.length;)i=this.input.charCodeAt(this.state.pos);if(this.isLookahead)return;const a=this.state.pos,n={type:"CommentLine",value:this.input.slice(e+t,a),start:e,end:a,loc:new p(s,this.state.curPosition())};return this.options.tokens&&this.pushToken(n),n}skipSpace(){const t=this.state.pos,e=[];t:for(;this.state.pos<this.length;){const s=this.input.charCodeAt(this.state.pos);switch(s){case 32:case 160:case 9:++this.state.pos;break;case 13:10===this.input.charCodeAt(this.state.pos+1)&&++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 t=this.skipBlockComment();void 0!==t&&(this.addComment(t),this.options.attachComment&&e.push(t));break}case 47:{const t=this.skipLineComment(2);void 0!==t&&(this.addComment(t),this.options.attachComment&&e.push(t));break}default:break t}break;default:if(o(s))++this.state.pos;else if(45!==s||this.inModule){if(60!==s||this.inModule)break t;{const t=this.state.pos;if(33!==this.input.charCodeAt(t+1)||45!==this.input.charCodeAt(t+2)||45!==this.input.charCodeAt(t+3))break t;{const t=this.skipLineComment(4);void 0!==t&&(this.addComment(t),this.options.attachComment&&e.push(t))}}}else{const s=this.state.pos;if(45!==this.input.charCodeAt(s+1)||62!==this.input.charCodeAt(s+2)||!(0===t||this.state.lineStart>t))break t;{const t=this.skipLineComment(3);void 0!==t&&(this.addComment(t),this.options.attachComment&&e.push(t))}}}}if(e.length>0){const s={start:t,end:this.state.pos,comments:e,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(s)}}finishToken(t,e){this.state.end=this.state.pos;const s=this.state.type;this.state.type=t,this.state.value=e,this.isLookahead||(this.state.endLoc=this.state.curPosition(),this.updateContext(s))}replaceToken(t){this.state.type=t,this.updateContext()}readToken_numberSign(){if(0===this.state.pos&&this.readToken_interpreter())return;const t=this.state.pos+1,e=this.codePointAtPos(t);if(e>=48&&e<=57)throw this.raise(this.state.pos,f.UnexpectedDigitAfterHash);if(123===e||91===e&&this.hasPlugin("recordAndTuple")){if(this.expectPlugin("recordAndTuple"),"hash"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(this.state.pos,123===e?f.RecordExpressionH
vendor: 5,658 bytes, line 1
1ashIncorrectStartSyntaxType:f.TupleExpressionHashIncorrectStartSyntaxType);this.state.pos+=2,123===e?this.finishToken(7):this.finishToken(1)}else it(e)?(++this.state.pos,this.finishToken(130,this.readWord1(e))):92===e?(++this.state.pos,this.finishToken(130,this.readWord1())):this.finishOp(27,1)}readToken_dot(){const t=this.input.charCodeAt(this.state.pos+1);t>=48&&t<=57?this.readNumber(!0):46===t&&46===this.input.charCodeAt(this.state.pos+2)?(this.state.pos+=3,this.finishToken(21)):(++this.state.pos,this.finishToken(16))}readToken_slash(){61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(31,2):this.finishOp(52,1)}readToken_interpreter(){if(0!==this.state.pos||this.length<2)return!1;let t=this.input.charCodeAt(this.state.pos+1);if(33!==t)return!1;const e=this.state.pos;for(this.state.pos+=1;!r(t)&&++this.state.pos<this.length;)t=this.input.charCodeAt(this.state.pos);const s=this.input.slice(e+2,this.state.pos);return this.finishToken(28,s),!0}readToken_mult_modulo(t){let e=42===t?51:50,s=1,i=this.input.charCodeAt(this.state.pos+1);42===t&&42===i&&(s++,i=this.input.charCodeAt(this.state.pos+2),e=53),61!==i||this.state.inType||(s++,e=37===t?33:30),this.finishOp(e,s)}readToken_pipe_amp(t){const e=this.input.charCodeAt(this.state.pos+1);if(e!==t){if(124===t){if(62===e)return void this.finishOp(37,2);if(this.hasPlugin("recordAndTuple")&&125===e){if("bar"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(this.state.pos,f.RecordExpressionBarIncorrectEndSyntaxType);return this.state.pos+=2,void this.finishToken(9)}if(this.hasPlugin("recordAndTuple")&&93===e){if("bar"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(this.state.pos,f.TupleExpressionBarIncorrectEndSyntaxType);return this.state.pos+=2,void this.finishToken(4)}}61!==e?this.finishOp(124===t?41:43,1):this.finishOp(30,2)}else 61===this.input.charCodeAt(this.state.pos+2)?this.finishOp(30,3):this.finishOp(124===t?39:40,2)}readToken_caret(){61!==this.input.charCodeAt(this.state.pos+1)||this.state.inType?this.finishOp(42,1):this.finishOp(32,2)}readToken_plus_min(t){const e=this.input.charCodeAt(this.state.pos+1);e!==t?61===e?this.finishOp(30,2):this.finishOp(49,1):this.finishOp(34,2)}readToken_lt(){const{pos:t}=this.state,e=this.input.charCodeAt(t+1);if(60===e)return 61===this.input.charCodeAt(t+2)?void this.finishOp(30,3):void this.finishOp(48,2);61!==e?this.finishOp(45,1):this.finishOp(47,2)}readToken_gt(){const{pos:t}=this.state,e=this.input.charCodeAt(t+1);if(62===e){const e=62===this.input.charCodeAt(t+2)?3:2;return 61===this.input.charCodeAt(t+e)?void this.finishOp(30,e+1):void this.finishOp(48,e)}61!==e?this.finishOp(46,1):this.finishOp(47,2)}readToken_eq_excl(t){const e=this.input.charCodeAt(this.state.pos+1);if(61!==e)return 61===t&&62===e?(this.state.pos+=2,void this.finishToken(19)):void this.finishOp(61===t?29:35,1);this.finishOp(44,61===this.input.charCodeAt(this.state.pos+2)?3:2)}readToken_question(){const t=this.input.charCodeAt(this.state.pos+1),e=this.input.charCodeAt(this.state.pos+2);63===t?61===e?this.finishOp(30,3):this.finishOp(38,2):46!==t||e>=48&&e<=57?(++this.state.pos,this.finishToken(17)):(this.state.pos+=2,this.finishToken(18))}getTokenFromCode(t){switch(t){case 46:return void this.readToken_dot();case 40:return++this.state.pos,void this.finishToken(10);case 41:return++this.state.pos,void this.finishToken(11);case 59:return++this.state.pos,void this.finishToken(13);case 44:return++this.state.pos,void this.finishToken(12);case 91:if(this.hasPlugin("recordAndTuple")&&124===this.input.charCodeAt(this.state.pos+1)){if("bar"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(this.state.pos,f.TupleExpressionBarIncorrectStartSyntaxType);this.state.pos+=2,this.finishToken(2)}else++this.state.pos,this.finishToken(0);return;case 93:return++this.state.pos,void this.finishToken(3);case 123:if(this.hasPlugin("recordAndTuple")&&124===this.input.charCodeAt(this.state.pos+1)){if("bar"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(this.state.pos,f.RecordExpressionBarIncorrectStartSyntaxType);this.state.pos+=2,this.finishToken(6)}else++this.state.pos,this.finishToken(5);return;case 125:return++this.state.pos,void this.finishToken(8);case 58:return void(this.hasPlugin("functionBind")&&58===this.input.charCodeAt(this.state.pos+1)?this.finishOp(15,2):(++this.state.pos,this.finishToken(14)));case 63:return void this.readToken_question();case 96:return void this.readTemplateToken();case 48:{const t=this.input.charCodeAt(this.state.pos+1);if(120===t||88===t)return void this.readRadixNumber(16);if(111===t||79===t)return void this.readRadixNumber(8);if(98===t||66===t)return void this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return void this.readNumber(!1);case 34:case 39:return void this.readString(t);case 47:return void this.readToken_slash();case 37:case 42:return void this.readToken_mult_modulo(t);case 124:case 38:return void this.readToken_pipe_amp(t);case 94:return void this.readToken_caret();case 43:case 45:return void this.readToken_plus_min(t);case 60:return void this.readToken_lt();case 62:return void this.readToken_gt();case 61:case 33:return void this.readToken_eq_excl(t);case 126:return void this.finishOp(36,1);case 64:return++this.state.pos,void this.finishToken(26);case 35:return void this.readToken_numberSign();case 92:return void this.readWord();default:if(it(t))return void this.readWord(t)}throw this.raise(this.state.pos,f.InvalidOrUnexpectedToken,String.fromCodePoint(t))}finishOp(t,e){const s=this.input.slice(this.state.pos,this.state.pos+e);
1this.state.pos+=e,this.finishToken(t,s)}readRegexp(){const t=this.state.start+1;let e,s,{pos:i}=this.state;for(;;++i){if(i>=this.length)throw this.raise(t,f.UnterminatedRegExp);const a=this.input.charCodeAt(i);if(r(a))throw this.raise(t,f.UnterminatedRegExp);if(e)e=!1;else{if(91===a)s=!0;else if(93===a&&s)s=!1;else if(47===a&&!s)break;e=92===a}}const a=this.input.slice(t,i);++i;let n="";for(;i<this.length;){const t=this.codePointAtPos(i),e=String.fromCharCode(t);if(Nt.has(t))n.includes(e)&&this.raise(i+1,f.DuplicateRegExpFlags);else{if(!rt(t)&&92!==t)break;this.raise(i+1,f.MalformedRegExpFlags)}++i,n+=e}this.state.pos=i,this.finishToken(129,{pattern:a,flags:n})}readInt(t,e,s,i=!0){const r=this.state.pos,a=16===t?It.hex:It.decBinOct,n=16===t?kt.hex:10===t?kt.dec:8===t?kt.oct:kt.bin;let o=!1,h=0;for(let p=0,c=null==e?1/0:e;p<c;++p){const e=this.input.charCodeAt(this.state.pos);let r;if(95!==e){if(r=e>=97?e-97+10:e>=65?e-65+10:Ct(e)?e-48:1/0,r>=t)if(this.options.errorRecovery&&r<=9)r=0,this.raise(this.state.start+p+2,f.InvalidDigit,t);else{if(!s)break;r=0,o=!0}++this.state.pos,h=h*t+r}else{const t=this.input.charCodeAt(this.state.pos-1),e=this.input.charCodeAt(this.state.pos+1);(-1===n.indexOf(e)||a.indexOf(t)>-1||a.indexOf(e)>-1||Number.isNaN(e))&&this.raise(this.state.pos,f.UnexpectedNumericSeparator),i||this.raise(this.state.pos,f.NumericSeparatorInEscapeSequence),++this.state.pos}}return this.state.pos===r||null!=e&&this.state.pos-r!==e||o?null:h}readRadixNumber(t){const e=this.state.pos;let s=!1;this.state.pos+=2;const i=this.readInt(t);null==i&&this.raise(this.state.start+2,f.InvalidDigit,t);const r=this.input.charCodeAt(this.state.pos);if(110===r)++this.state.pos,s=!0;else if(109===r)throw this.raise(e,f.InvalidDecimal);if(it(this.codePointAtPos(this.state.pos)))throw this.raise(this.state.pos,f.NumberIdentifier);if(s){const t=this.input.slice(e,this.state.pos).replace(/[_n]/g,"");this.finishToken(127,t)}else this.finishToken(126,i)}readNumber(t){const e=this.state.pos;let s=!1,i=!1,r=!1,a=!1,n=!1;t||null!==this.readInt(10)||this.raise(e,f.InvalidNumber);const o=this.state.pos-e>=2&&48===this.input.charCodeAt(e);if(o){const t=this.input.slice(e,this.state.pos);if(this.recordStrictModeErrors(e,f.StrictOctalLiteral),!this.state.strict){const s=t.indexOf("_");s>0&&this.raise(s+e,f.ZeroDigitNumericSeparator)}n=o&&!/[89]/.test(t)}let h=this.input.charCodeAt(this.state.pos);if(46!==h||n||(++this.state.pos,this.readInt(10),s=!0,h=this.input.charCodeAt(this.state.pos)),69!==h&&101!==h||n||(h=this.input.charCodeAt(++this.state.pos),43!==h&&45!==h||++this.state.pos,null===this.readInt(10)&&this.raise(e,f.InvalidOrMissingExponent),s=!0,a=!0,h=this.input.charCodeAt(this.state.pos)),110===h&&((s||o)&&this.raise(e,f.InvalidBigIntLiteral),++this.state.pos,i=!0),109===h&&(this.expectPlugin("decimal",this.state.pos),(a||o)&&this.raise(e,f.InvalidDecimal),++this.state.pos,r=!0),it(this.codePointAtPos(this.state.pos)))throw this.raise(this.state.pos,f.NumberIdentifier);const p=this.input.slice(e,this.state.pos).replace(/[_mn]/g,"");if(i)return void this.finishToken(127,p);if(r)return void this.finishToken(128,p);const c=n?parseInt(p,8):parseFloat(p);this.finishToken(126,c)}readCodePoint(t){let e;if(123===this.input.charCodeAt(this.state.pos)){const s=++this.state.pos;if(e=this.readHexChar(this.input.indexOf("}",this.state.pos)-this.state.pos,!0,t),++this.state.pos,null!==e&&e>1114111){if(!t)return null;this.raise(s,f.InvalidCodePoint)}}else e=this.readHexChar(4,!1,t);return e}readString(t){let e="",s=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(this.state.start,f.UnterminatedString);const i=this.input.charCodeAt(this.state.pos);if(i===t)break;if(92===i)e+=this.input.slice(s,this.state.pos),e+=this.readEscapedChar(!1),s=this.state.pos;else if(8232===i||8233===i)++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;else{if(r(i))throw this.raise(this.state.start,f.UnterminatedString);++this.state.pos}}e+=this.input.slice(s,this.state.pos++),this.finishToken(125,e)}readTemplateContinuation(){this.match(8)||this.unexpected(this.state.start,8),this.state.pos--,this.readTemplateToken()}readTemplateToken(){let t="",e=this.state.pos,s=!1;for(++this.state.pos;;){if(this.state.pos>=this.length)throw this.raise(this.state.start+1,f.UnterminatedTemplate);const i=this.input.charCodeAt(this.state.pos);if(96===i)return++this.state.pos,t+=this.input.slice(e,this.state.pos),void this.finishToken(24,s?null:t);if(36===i&&123===this.input.charCodeAt(this.state.pos+1))return this.state.pos+=2,t+=this.input.slice(e,this.state.pos),void this.finishToken(25,s?null:t);if(92===i){t+=this.input.slice(e,this.state.pos);const i=this.readEscapedChar(!0);null===i?s=!0:t+=i,e=this.state.pos}else if(r(i)){switch(t+=this.input.slice(e,this.state.pos),++this.state.pos,i){case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:t+="\n";break;default:t+=String.fromCharCode(i)}++this.state.curLine,this.state.lineStart=this.state.pos,e=this.state.pos}else++this.state.pos}}recordStrictModeErrors(t,e){this.state.strict&&!this.state.strictErrors.has(t)?this.raise(t,e):this.state.strictErrors.set(t,e)}readEscapedChar(t){const e=!t,s=this.input.charCodeAt(++this.state.pos);switch(++this.state.pos,s){case 110:return"\n";case 114:return"\r";case 120:{const t=this.readHexChar(2,!1,e);return null===t?null:String.fromCharCode(t)}case 117:{const t=this.readCodePoint(e);return null===t?null:String.fromCodePoint(t)}case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:this.state.lineStart=this.state.pos,++this.state.curLine;case 8232:case 8233:return"";case 56:case 57:if(t)return null;this.recordStrictModeErrors(this.state.pos-1,f.StrictNumericEscape);default:if(s>=48&&s<=55){const e=this.state.pos-1;let s=this.input.substr(this.state.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(s,8);i>255&&(s=s.slice(0,-1),i=parseInt(s,8)),this.state.pos+=s.length-1;const r=this.input.charCodeAt(this.state.pos);if("0"!==s||56===r||57===r){if(t)return null;this.recordStrictModeErrors(e,f.StrictNumericEscape)}return String.fromCharCode(i)}return String.fromCharCode(s)}}readHexChar(t,e,s){const i=this.state.pos,r=this.readInt(16,t,e,!1);return null===r&&(s?this.raise(i,f.InvalidEscapeSequence):this.state.pos=i-1),r}readWord1(t){this.state.containsEsc=!1;let e="";const s=this.state.pos;let i=this.state.pos;for(void 0!==t&&(this.state.pos+=t<=65535?1:2);this.state.pos<this.length;){const t=this.codePointAtPos(this.state.pos);if(rt(t))this.state.pos+=t<=65535?1:2;else{if(92!==t)break;{this.state.containsEsc=!0,e+=this.input.slice(i,this.state.pos);const t=this.state.pos,r=this.state.pos===s?it:rt;if(117!==this.input.charCodeAt(++this.state.pos)){this.raise(this.state.pos,f.MissingUnicodeEscape),i=this.state.pos-1;continue}++this.state.pos;const a=this.readCodePoint(!0);null!==a&&(r(a)||this.raise(t,f.EscapedCharNotAnIdentifier),e+=String.fromCodePoint(a)),i=this.state.pos}}}return e+this.input.slice(i,this.state.pos)}readWord(t){const e=this.readWord1(t),s=N.get(e);void 0!==s?this.finishToken(s,W(s)):this.finishToken(124,e)}checkKeywordEscapes(){const{type:t}=this.state;K(t)&&this.state.containsEsc&&this.raise(this.state.start,f.InvalidEscapedReservedWord,W(t))}updateContext(t){}}{addExtra(t,e,s){if(!t)return;(t.extra=t.extra||{})[e]=s}isContextual(t){return this.state.type===t&&!this.state.containsEsc}isUnparsedContextual(t,e){const s=t+e.length;if(this.input.slice(t,s)===e){const t=this.input.charCodeAt(s);return!(rt(t)||55296===(64512&t))}return!1}isLookaheadContextual(t){const e=this.nextTokenStart();return this.isUnparsedContextual(e,t)}eatContextual(t){return!!this.isContextual(t)&&(this.next(),!0)}expectContextual(t,e){this.eatContextual(t)||this.unexpected(null,e)}canInsertSemicolon(){return this.match(131)||this.match(8)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return s.test(this.input.slice(this.state.lastTokEnd,this.state.start))}hasFollowingLineBreak(){return n.lastIndex=this.state.end,n.test(this.input)}isLineTerminator(){return this.eat(13)||this.canInsertSemicolon()}semicolon(t=!0){(t?this.isLineTerminator():this.eat(13))||this.raise(this.state.lastTokEnd,f.MissingSemicolon)}expect(t,e){this.eat(t)||this.unexpected(e,t)}
1assertNoSpace(t="Unexpected space."){this.state.start>this.state.lastTokEnd&&this.raise(this.state.lastTokEnd,{code:m.SyntaxError,reasonCode:"UnexpectedSpace",template:t})}unexpected(t,e={code:m.SyntaxError,reasonCode:"UnexpectedToken",template:"Unexpected token"}){throw"number"===typeof e&&(e={code:m.SyntaxError,reasonCode:"UnexpectedToken",template:`Unexpected token, expected "${W(e)}"`}),this.raise(null!=t?t:this.state.start,e)}getPluginNamesFromConfigs(t){return t.map((t=>"string"===typeof t?t:t[0]))}expectPlugin(t,e){if(!this.hasPlugin(t))throw this.raiseWithData(null!=e?e:this.state.start,{missingPlugin:this.getPluginNamesFromConfigs([t])},`This experimental syntax requires enabling the parser plugin: ${JSON.stringify(t)}.`);return!0}expectOnePlugin(t,e){if(!t.some((t=>this.hasPlugin(t))))throw this.raiseWithData(null!=e?e:this.state.start,{missingPlugin:this.getPluginNamesFromConfigs(t)},`This experimental syntax requires enabling one of the following parser plugin(s): ${t.map((t=>JSON.stringify(t))).join(", ")}.`)}tryParse(t,e=this.state.clone()){const s={node:null};try{const i=t(((t=null)=>{throw s.node=t,s}));if(this.state.errors.length>e.errors.length){const t=this.state;return this.state=e,this.state.tokensLength=t.tokensLength,{node:i,error:t.errors[e.errors.length],thrown:!1,aborted:!1,failState:t}}return{node:i,error:null,thrown:!1,aborted:!1,failState:null}}catch(i){const t=this.state;if(this.state=e,i instanceof SyntaxError)return{node:null,error:i,thrown:!0,aborted:!1,failState:t};if(i===s)return{node:s.node,error:null,thrown:!1,aborted:!0,failState:t};throw i}}checkExpressionErrors(t,e){if(!t)return!1;const{shorthandAssign:s,doubleProto:i,optionalParameters:r}=t,a=s+i+r>-3;if(!e)return a;a&&(s>=0&&this.raise(s,f.InvalidCoverInitializedName),i>=0&&this.raise(i,f.DuplicateProto),r>=0&&this.unexpected(r))}isLiteralPropertyName(){return H(this.state.type)}isPrivateName(t){return"PrivateName"===t.type}getPrivateNameSV(t){return t.id.name}hasPropertyAsPrivateName(t){return("MemberExpression"===t.type||"OptionalMemberExpression"===t.type)&&this.isPrivateName(t.property)}isOptionalChain(t){return"OptionalMemberExpression"===t.type||"OptionalCallExpression"===t.type}isObjectProperty(t){return"ObjectProperty"===t.type}isObjectMethod(t){return"ObjectMethod"===t.type}initializeScopes(t="module"===this.options.sourceType){const e=this.state.labels;this.state.labels=[];const s=this.exportedIdentifiers;this.exportedIdentifiers=new Set;const i=this.inModule;this.inModule=t;const r=this.scope,a=this.getScopeHandler();this.scope=new a(this.raise.bind(this),this.inModule);const n=this.prodParam;this.prodParam=new Rt;const o=this.classScope;this.classScope=new Dt(this.raise.bind(this));const h=this.expressionScope;return this.expressionScope=new Ft(this.raise.bind(this)),()=>{this.state.labels=e,this.exportedIdentifiers=s,this.inModule=i,this.scope=r,this.prodParam=n,this.classScope=o,this.expressionScope=h}}enterInitialScopes(){let t=0;this.inModule&&(t|=2),this.scope.enter(1),this.prodParam.enter(t)}}{startNode(){return new _t(this,this.state.start,this.state.startLoc)}startNodeAt(t,e){return new _t(this,t,e)}startNodeAtNode(t){return this.startNodeAt(t.start,t.loc.start)}finishNode(t,e){return this.finishNodeAt(t,e,this.state.lastTokEnd,this.state.lastTokEndLoc)}finishNodeAt(t,e,s,i){return t.type=e,t.end=s,t.loc.end=i,this.options.ranges&&(t.range[1]=s),this.options.attachComment&&this.processComment(t),t}resetStartLocation(t,e,s){t.start=e,t.loc.start=s,this.options.ranges&&(t.range[0]=e)}resetEndLocation(t,e=this.state.lastTokEnd,s=this.state.lastTokEndLoc){t.end=e,t.loc.end=s,this.options.ranges&&(t.range[1]=e)}resetStartLocationFromNode(t,e){this.resetStartLocation(t,e.start,e.loc.start)}}{toAssignable(t,e=!1){var s,i;let r;switch(("ParenthesizedExpression"===t.type||null!=(s=t.extra)&&s.parenthesized)&&(r=ye(t),e?"Identifier"===r.type?this.expressionScope.recordParenthesizedIdentifierError(t.start,f.InvalidParenthesizedAssignment):"MemberExpression"!==r.type&&this.raise(t.start,f.InvalidParenthesizedAssignment):this.raise(t.start,f.InvalidParenthesizedAssignment)),t.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":t.type="ObjectPattern";for(let s=0,i=t.properties.length,r=i-1;s<i;s++){var a;const i=t.properties[s],n=s===r;this.toAssignableObjectExpressionProp(i,n,e),n&&"RestElement"===i.type&&null!=(a=t.extra)&&a.trailingComma&&this.raiseRestNotLast(t.extra.trailingComma)}break;case"ObjectProperty":this.toAssignable(t.value,e);break;case"SpreadElement":{this.checkToRestConversion(t),t.type="RestElement";const s=t.argument;this.toAssignable(s,e);break}case"ArrayExpression":t.type="ArrayPattern",this.toAssignableList(t.elements,null==(i=t.extra)?void 0:i.trailingComma,e);break;case"AssignmentExpression":"="!==t.operator&&this.raise(t.left.end,f.MissingEqInAssignment),t.type="AssignmentPattern",delete t.operator,this.toAssignable(t.left,e);break;case"ParenthesizedExpression":this.toAssignable(r,e)}return t}toAssignableObjectExpressionProp(t,e,s){if("ObjectMethod"===t.type){const e="get"===t.kind||"set"===t.kind?f.PatternHasAccessor:f.PatternHasMethod;this.raise(t.key.start,e)}else"SpreadElement"!==t.type||e?this.toAssignable(t,s):this.raiseRestNotLast(t.start)}toAssignableList(t,e,s){let i=t.length;if(i){const r=t[i-1];if("RestElement"===(null==r?void 0:r.type))--i;else if("SpreadElement"===(null==r?void 0:r.type)){r.type="RestElement";let t=r.argument;
1this.toAssignable(t,s),t=ye(t),"Identifier"!==t.type&&"MemberExpression"!==t.type&&"ArrayPattern"!==t.type&&"ObjectPattern"!==t.type&&this.unexpected(t.start),e&&this.raiseTrailingCommaAfterRest(e),--i}}for(let r=0;r<i;r++){const e=t[r];e&&(this.toAssignable(e,s),"RestElement"===e.type&&this.raiseRestNotLast(e.start))}return t}isAssignable(t,e){switch(t.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":return!0;case"ObjectExpression":{const e=t.properties.length-1;return t.properties.every(((t,s)=>"ObjectMethod"!==t.type&&(s===e||"SpreadElement"!==t.type)&&this.isAssignable(t)))}case"ObjectProperty":return this.isAssignable(t.value);case"SpreadElement":return this.isAssignable(t.argument);case"ArrayExpression":return t.elements.every((t=>null===t||this.isAssignable(t)));case"AssignmentExpression":return"="===t.operator;case"ParenthesizedExpression":return this.isAssignable(t.expression);case"MemberExpression":case"OptionalMemberExpression":return!e;default:return!1}}toReferencedList(t,e){return t}toReferencedListDeep(t,e){this.toReferencedList(t,e);for(const s of t)"ArrayExpression"===(null==s?void 0:s.type)&&this.toReferencedListDeep(s.elements)}parseSpread(t,e){const s=this.startNode();return this.next(),s.argument=this.parseMaybeAssignAllowIn(t,void 0,e),this.finishNode(s,"SpreadElement")}parseRestBinding(){const t=this.startNode();return this.next(),t.argument=this.parseBindingAtom(),this.finishNode(t,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{const t=this.startNode();return this.next(),t.elements=this.parseBindingList(3,93,!0),this.finishNode(t,"ArrayPattern")}case 5:return this.parseObjectLike(8,!0)}return this.parseIdentifier()}parseBindingList(t,e,s,i){const r=[];let a=!0;for(;!this.eat(t);)if(a?a=!1:this.expect(12),s&&this.match(12))r.push(null);else{if(this.eat(t))break;if(this.match(21)){r.push(this.parseAssignableListItemTypes(this.parseRestBinding())),this.checkCommaAfterRest(e),this.expect(t);break}{const t=[];for(this.match(26)&&this.hasPlugin("decorators")&&this.raise(this.state.start,f.UnsupportedParameterDecorator);this.match(26);)t.push(this.parseDecorator());r.push(this.parseAssignableListItem(i,t))}}return r}parseBindingRestProperty(t){return this.next(),t.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(t,"RestElement")}parseBindingProperty(){const t=this.startNode(),{type:e,start:s,startLoc:i}=this.state;return 21===e?this.parseBindingRestProperty(t):(this.parsePropertyName(t),t.method=!1,this.parseObjPropValue(t,s,i,!1,!1,!0,!1),t)}parseAssignableListItem(t,e){const s=this.parseMaybeDefault();this.parseAssignableListItemTypes(s);const i=this.parseMaybeDefault(s.start,s.loc.start,s);return e.length&&(s.decorators=e),i}parseAssignableListItemTypes(t){return t}parseMaybeDefault(t,e,s){var i,r,a;if(e=null!=(i=e)?i:this.state.startLoc,t=null!=(r=t)?r:this.state.start,s=null!=(a=s)?a:this.parseBindingAtom(),!this.eat(29))return s;const n=this.startNodeAt(t,e);return n.left=s,n.right=this.parseMaybeAssignAllowIn(),this.finishNode(n,"AssignmentPattern")}checkLVal(t,e,s=64,i,r,a=!1){switch(t.type){case"Identifier":{const{name:e}=t;this.state.strict&&(a?dt(e,this.inModule):ut(e))&&this.raise(t.start,64===s?f.StrictEvalArguments:f.StrictEvalArgumentsBinding,e),i&&(i.has(e)?this.raise(t.start,f.ParamDupe):i.add(e)),r&&"let"===e&&this.raise(t.start,f.LetInLexicalBinding),64&s||this.scope.declareName(e,s,t.start);break}case"MemberExpression":64!==s&&this.raise(t.start,f.InvalidPropertyBindingPattern);break;case"ObjectPattern":for(let e of t.properties){if(this.isObjectProperty(e))e=e.value;else if(this.isObjectMethod(e))continue;this.checkLVal(e,"object destructuring pattern",s,i,r)}break;case"ArrayPattern":for(const e of t.elements)e&&this.checkLVal(e,"array destructuring pattern",s,i,r);break;case"AssignmentPattern":this.checkLVal(t.left,"assignment pattern",s,i);break;case"RestElement":this.checkLVal(t.argument,"rest element",s,i);break;case"ParenthesizedExpression":this.checkLVal(t.expression,"parenthesized expression",s,i);break;default:this.raise(t.start,64===s?f.InvalidLhs:f.InvalidLhsBinding,e)}}checkToRestConversion(t){"Identifier"!==t.argument.type&&"Member
1Expression"!==t.argument.type&&this.raise(t.argument.start,f.InvalidRestAssignmentPattern)}checkCommaAfterRest(t){this.match(12)&&(this.lookaheadCharCode()===t?this.raiseTrailingCommaAfterRest(this.state.start):this.raiseRestNotLast(this.state.start))}raiseRestNotLast(t){throw this.raise(t,f.ElementAfterRest)}raiseTrailingCommaAfterRest(t){this.raise(t,f.RestTrailingComma)}}{checkProto(t,e,s,i){if("SpreadElement"===t.type||this.isObjectMethod(t)||t.computed||t.shorthand)return;const r=t.key;if("__proto__"===("Identifier"===r.type?r.name:r.value)){if(e)return void this.raise(r.start,f.RecordNoProto);s.used&&(i?-1===i.doubleProto&&(i.doubleProto=r.start):this.raise(r.start,f.DuplicateProto)),s.used=!0}}shouldExitDescending(t,e){return"ArrowFunctionExpression"===t.type&&t.start===e}getExpression(){this.enterInitialScopes(),this.nextToken();const t=this.parseExpression();return this.match(131)||this.unexpected(),this.finalizeRemainingComments(),t.comments=this.state.comments,t.errors=this.state.errors,this.options.tokens&&(t.tokens=this.tokens),t}parseExpression(t,e){return t?this.disallowInAnd((()=>this.parseExpressionBase(e))):this.allowInAnd((()=>this.parseExpressionBase(e)))}parseExpressionBase(t){const e=this.state.start,s=this.state.startLoc,i=this.parseMaybeAssign(t);if(this.match(12)){const r=this.startNodeAt(e,s);for(r.expressions=[i];this.eat(12);)r.expressions.push(this.parseMaybeAssign(t));return this.toReferencedList(r.expressions),this.finishNode(r,"SequenceExpression")}return i}parseMaybeAssignDisallowIn(t,e){return this.disallowInAnd((()=>this.parseMaybeAssign(t,e)))}parseMaybeAssignAllowIn(t,e){return this.allowInAnd((()=>this.parseMaybeAssign(t,e)))}setOptionalParametersError(t,e){var s;t.optionalParameters=null!=(s=null==e?void 0:e.pos)?s:this.state.start}parseMaybeAssign(t,e){const s=this.state.start,i=this.state.startLoc;if(this.isContextual(101)&&this.prodParam.hasYield){let t=this.parseYield();return e&&(t=e.call(this,t,s,i)),t}let r;t?r=!1:(t=new jt,r=!0);const{type:a}=this.state;(10===a||_(a))&&(this.state.potentialArrowAt=this.state.start);let n=this.parseMaybeConditional(t);if(e&&(n=e.call(this,n,s,i)),(o=this.state.type)>=29&&o<=33){const e=this.startNodeAt(s,i),r=this.state.value;return e.operator=r,this.match(29)?(e.left=this.toAssignable(n,!0),t.doubleProto>=s&&(t.doubleProto=-1),t.shorthandAssign>=s&&(t.shorthandAssign=-1)):e.left=n,this.checkLVal(n,"assignment expression"),this.next(),e.right=this.parseMaybeAssign(),this.finishNode(e,"AssignmentExpression")}var o;return r&&this.checkExpressionErrors(t,!0),n}parseMaybeConditional(t){const e=this.state.start,s=this.state.startLoc,i=this.state.potentialArrowAt,r=this.parseExprOps(t);return this.shouldExitDescending(r,i)?r:this.parseConditional(r,e,s,t)}parseConditional(t,e,s,i){if(this.eat(17)){const i=this.startNodeAt(e,s);return i.test=t,i.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),i.alternate=this.parseMaybeAssign(),this.finishNode(i,"ConditionalExpression")}return t}parseMaybeUnaryOrPrivate(t){return this.match(130)?this.parsePrivateName():this.parseMaybeUnary(t)}parseExprOps(t){const e=this.state.start,s=this.state.startLoc,i=this.state.potentialArrowAt,r=this.parseMaybeUnaryOrPrivate(t);return this.shouldExitDescending(r,i)?r:this.parseExprOp(r,e,s,-1)}parseExprOp(t,e,s,i){if(this.isPrivateName(t)){const e=this.getPrivateNameSV(t),{start:s}=t;(i>=J(54)||!this.prodParam.hasIn||!this.match(54))&&this.raise(s,f.PrivateInExpectedIn,e),this.classScope.usePrivateName(e,s)}const r=this.state.type;if((a=r)>=37&&a<=55&&(this.prodParam.hasIn||!this.match(54))){let a=J(r);if(a>i){if(37===r){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return t;this.checkPipelineAtInfixOperator(t,e)}const n=this.startNodeAt(e,s);n.left=t,n.operator=this.state.value;const o=39===r||40===r,h=38===r;if(h&&(a=J(40)),this.next(),37===r&&this.hasPlugin(["pipelineOperator",{proposal:"minimal"}])&&92===this.state.type&&this.prodParam.hasAwait)throw this.raise(this.state.start,f.UnexpectedAwaitAfterPipelineBody);n.right=this.parseExprOpRightExpr(r,a),this.finishNode(n,o||h?"LogicalExpression":"BinaryExpression");const p=this.state.type;if(h&&(39===p||40===p)||o&&38===p)throw this.raise(this.state.start,f.MixingCoalesceWithLogical);return this.parseExprOp(n,e,s,i)}}var a;return t}parseExprOpRightExpr(t,e){const s=this.state.start,i=this.state.startLoc;switch(t){case 37:switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext((()=>this.parseHackPipeBody()));case"smart":return this.withTopicBindingContext((()=>
1{if(this.prodParam.hasYield&&this.isContextual(101))throw this.raise(this.state.start,f.PipeBodyIsTighter,this.state.value);return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(t,e),s,i)}));case"fsharp":return this.withSoloAwaitPermittingContext((()=>this.parseFSharpPipelineBody(e)))}default:return this.parseExprOpBaseRightExpr(t,e)}}parseExprOpBaseRightExpr(t,e){const s=this.state.start,i=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),s,i,53===t?e-1:e)}parseHackPipeBody(){var t;const{start:e}=this.state,s=this.parseMaybeAssign();return!xe.has(s.type)||null!=(t=s.extra)&&t.parenthesized||this.raise(e,f.PipeUnparenthesizedBody,xe.get(s.type)),this.topicReferenceWasUsedInCurrentContext()||this.raise(e,f.PipeTopicUnused),s}checkExponentialAfterUnary(t){this.match(53)&&this.raise(t.argument.start,f.UnexpectedTokenUnaryExponentiation)}parseMaybeUnary(t,e){const s=this.state.start,i=this.state.startLoc,r=this.isContextual(92);if(r&&this.isAwaitAllowed()){this.next();const t=this.parseAwait(s,i);return e||this.checkExponentialAfterUnary(t),t}const a=this.match(34),n=this.startNode();if(o=this.state.type,B[o]){n.operator=this.state.value,n.prefix=!0,this.match(68)&&this.expectPlugin("throwExpressions");const s=this.match(85);if(this.next(),n.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(t,!0),this.state.strict&&s){const t=n.argument;"Identifier"===t.type?this.raise(n.start,f.StrictDelete):this.hasPropertyAsPrivateName(t)&&this.raise(n.start,f.DeletePrivateField)}if(!a)return e||this.checkExponentialAfterUnary(n),this.finishNode(n,"UnaryExpression")}var o;const h=this.parseUpdate(n,a,t);if(r){const{type:t}=this.state;if((this.hasPlugin("v8intrinsic")?q(t):q(t)&&!this.match(50))&&!this.isAmbiguousAwait())return this.raiseOverwrite(s,f.AwaitNotInAsyncContext),this.parseAwait(s,i)}return h}parseUpdate(t,e,s){if(e)return this.checkLVal(t.argument,"prefix operation"),this.finishNode(t,"UpdateExpression");const i=this.state.start,r=this.state.startLoc;let a=this.parseExprSubscripts(s);if(this.checkExpressionErrors(s,!1))return a;for(;34===this.state.type&&!this.canInsertSemicolon();){const t=this.startNodeAt(i,r);t.operator=this.state.value,t.prefix=!1,t.argument=a,this.checkLVal(a,"postfix operation"),this.next(),a=this.finishNode(t,"UpdateExpression")}return a}parseExprSubscripts(t){const e=this.state.start,s=this.state.startLoc,i=this.state.potentialArrowAt,r=this.parseExprAtom(t);return this.shouldExitDescending(r,i)?r:this.parseSubscripts(r,e,s)}parseSubscripts(t,e,s,i){const r={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(t),stop:!1};do{t=this.parseSubscript(t,e,s,i,r),r.maybeAsyncArrow=!1}while(!r.stop);return t}parseSubscript(t,e,s,i,r){const{type:a}=this.state;if(!i&&15===a)return this.parseBind(t,e,s,i,r);if(X(a))return this.parseTaggedTemplateExpression(t,e,s,r);let n=!1;if(18===a){if(i&&40===this.lookaheadCharCode())return r.stop=!0,t;r.optionalChainMember=n=!0,this.next()}if(!i&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(t,e,s,r,n);{const i=this.eat(0);return i||n||this.eat(16)?this.parseMember(t,e,s,r,i,n):(r.stop=!0,t)}}parseMember(t,e,s,i,r,a){const n=this.startNodeAt(e,s);return n.object=t,n.computed=r,r?(n.property=this.parseExpression(),this.expect(3)):this.match(130)?("Super"===t.type&&this.raise(e,f.SuperPrivateField),this.classScope.usePrivateName(this.state.value,this.state.start),n.property=this.parsePrivateName()):n.property=this.parseIdentifier(!0),i.optionalChainMember?(n.optional=a,this.finishNode(n,"OptionalMemberExpression")):this.finishNode(n,"MemberExpression")}parseBind(t,e,s,i,r){const a=this.startNodeAt(e,s);return a.object=t,this.next(),a.callee=this.parseNoCallExpr(),r.stop=!0,this.parseSubscripts(this.finishNode(a,"BindExpression"),e,s,i)}parseCoverCallAndAsyncArrowHead(t,e,s,i,r){const a=this.state.maybeInArrowParameters;let n=null;this.state.maybeInArrowParameters=!0,this.next();let o=this.startNodeAt(e,s);return o.callee=t,i.maybeAsyncArrow&&(this.expressionScope.enter(new Ot(2)),n=new jt),i.optionalChainMember&&(o.optional=r),o.arguments=r?this.parseCallExpressionArguments(11):this.parseCallExpressionArguments(11,"Import"===t.type,"Super"!==t.type,o,n),this.finishCallExpression(o,i.optionalChainMember),i.maybeAsyncArrow&&this.shouldParseAsyncArrow()&&!r?(i.stop=!0,this.expressionScope.validateAsPattern(),this.expressionScope.exit(),o=this.parseAsyncArrowFromCallExpression(this.startNodeAt(e,s),o)):(i.maybeAsyncArrow&&(this.checkExpressionErrors(n,!0),this.expressionScope.exit()),this.toReferencedArguments(o)),this.state.maybeInArrowParameters=a,o}toReferencedArguments(t,e){this.toReferencedListDeep(t.arguments,e)}parseTaggedTemplateExpression(t,e,s,i){const r=this.startNodeAt(e,s);return r.tag=t,r.quasi=this.parseTemplate(!0),i.optionalChainMember&&this.raise(e,f.OptionalChainingNoTemplate),this.finishNode(r,"TaggedTemplateExpression")}atPossibleAsyncArrow(t){return"Identifier"===t.type&&"async"===t.name&&this.state.lastTokEnd===t.end&&!this.canInsertSemicolon()&&t.end-t.start===5&&t.start===this.state.potentialArrowAt}finishCallExpression(t,e){if("Import"===t.callee.type)if(2===t.arguments.length&&(this.hasPlugin("moduleAttributes")||this.expectPlugin("importAssertions")),0===t.arguments.length||t.arguments.length>2)this.raise(t.start,f.ImportCallArity,this.hasPlugin("importAssertions")||this.hasPlugin("moduleAttributes")?"one or tw
1o arguments":"one argument");else for(const s of t.arguments)"SpreadElement"===s.type&&this.raise(s.start,f.ImportCallSpreadArgument);return this.finishNode(t,e?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(t,e,s,i,r){const a=[];let n=!0;const o=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(t);){if(n)n=!1;else if(this.expect(12),this.match(t)){!e||this.hasPlugin("importAssertions")||this.hasPlugin("moduleAttributes")||this.raise(this.state.lastTokStart,f.ImportCallArgumentTrailingComma),i&&this.addExtra(i,"trailingComma",this.state.lastTokStart),this.next();break}a.push(this.parseExprListItem(!1,r,s))}return this.state.inFSharpPipelineDirectBody=o,a}shouldParseAsyncArrow(){return this.match(19)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(t,e){var s;return this.resetPreviousNodeTrailingComments(e),this.expect(19),this.parseArrowExpression(t,e.arguments,!0,null==(s=e.extra)?void 0:s.trailingComma),e.innerComments&&u(t,e.innerComments),e.callee.trailingComments&&u(t,e.callee.trailingComments),t}parseNoCallExpr(){const t=this.state.start,e=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),t,e,!0)}parseExprAtom(t){let e;const{type:s}=this.state;switch(s){case 75:return this.parseSuper();case 79:return e=this.startNode(),this.next(),this.match(16)?this.parseImportMetaProperty(e):(this.match(10)||this.raise(this.state.lastTokStart,f.UnsupportedImport),this.finishNode(e,"Import"));case 74:return e=this.startNode(),this.next(),this.finishNode(e,"ThisExpression");case 86:return this.parseDo(this.startNode(),!1);case 52:case 31:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 126:return this.parseNumericLiteral(this.state.value);case 127:return this.parseBigIntLiteral(this.state.value);case 128:return this.parseDecimalLiteral(this.state.value);case 125:return this.parseStringLiteral(this.state.value);case 80:return this.parseNullLiteral();case 81:return this.parseBooleanLiteral(!0);case 82:return this.parseBooleanLiteral(!1);case 10:{const t=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(t)}case 2:case 1:return this.parseArrayLike(2===this.state.type?4:3,!1,!0);case 0:return this.parseArrayLike(3,!0,!1,t);case 6:case 7:return this.parseObjectLike(6===this.state.type?9:8,!1,!0);case 5:return this.parseObjectLike(8,!1,!1,t);case 64:return this.parseFunctionOrFunctionSent();case 26:this.parseDecorators();case 76:return e=this.startNode(),this.takeDecorators(e),this.parseClass(e,!1);case 73:return this.parseNewOrNewTarget();case 25:case 24:return this.parseTemplate(!1);case 15:{e=this.startNode(),this.next(),e.object=null;const t=e.callee=this.parseNoCallExpr();if("MemberExpression"===t.type)return this.finishNode(e,"BindExpression");throw this.raise(t.start,f.UnsupportedBind)}case 130:return this.raise(this.state.start,f.PrivateInExpectedIn,this.state.value),this.parsePrivateName();case 33:return this.parseTopicReferenceThenEqualsSign(50,"%");case 32:return this.parseTopicReferenceThenEqualsSign(42,"^");case 42:case 50:case 27:{const t=this.getPluginOption("pipelineOperator","proposal");if(t)return this.parseTopicReference(t);throw this.unexpected()}case 45:{const t=this.input.codePointAt(this.nextTokenStart());if(it(t)||62===t){this.expectOnePlugin(["jsx","flow","typescript"]);break}throw this.unexpected()}default:if(_(s)){if(this.isContextual(119)&&123===this.lookaheadCharCode()&&!this.hasFollowingLineBreak())return this.parseModuleExpression();const t=this.state.potentialArrowAt===this.state.start,e=this.state.containsEsc,s=this.parseIdentifier();if(!e&&"async"===s.name&&!this.canInsertSemicolon()){const{type:t}=this.state;if(64===t)return this.resetPreviousNodeTrailingComments(s),this.next(),this.parseFunction(this.startNodeAtNode(s),void 0,!0);if(_(t))return 61===this.lookaheadCharCode()?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(s)):s;if(86===t)return this.resetPreviousNodeTrailingComments(s),this.parseDo(this.startNodeAtNode(s),!0)}return t&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(s),[s],!1)):s}throw this.unexpected()}}parseTopicReferenceThenEqualsSign(t,e){const s=this.getPluginOption("pipelineOperator","proposal");if(s)return this.state.type=t,this.state.value=e,this.state.pos--,this.state.end--,this.state.endLoc.column--,this.parseTopicReference(s);throw this.unexpected()}parseTopicReference(t){const e=this.startNode(),s=this.state.start,i=this.state.type;return this.next(),this.finishTopicReference(e,s,t,i)}finishTopicReference(t,e,s,i){if(this.testTopicReferenceConfiguration(s,e,i)){let i;return i="smart"===s?"PipelinePrimaryTopicReference":"TopicReference",this.topicReferenceIsAllowedInCurrentContext()||("smart"===s?this.raise(e,f.PrimaryTopicNotAllowed):this.raise(e,f.PipeTopicUnbound)),this.registerTopicReference(),this.finishNode(t,i)}throw this.raise(e,f.PipeTopicUnconfiguredToken,W(i))}testTopicReferenceConfiguration(t,e,s){switch(t){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:W(s)}]);case"smart":return 27===s;default:throw this.raise(e,f.PipeTopicRequiresHackPipes)}}parseAsyncArrowUnaryFunction(t){this.prodParam.enter(Ut(!0,this.prodParam.hasYield));const e=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(this.state.pos,f.LineTerminatorBeforeArrow),this.expect(19),this.parseArrowExpression(t,e,!0),t}parseDo(t,e){this.expectPlugin("doExpressions"),e&&this.expectPlugin("asyncDoExpressions"),t.async=e,this.next();const s=this.state.labels;return this.state.labels=[],e?(this.prodParam.enter(2),t.body=this.parseBlock(),this.prodParam.exit()):t.body=this.parseBlock(),this.state.labels=s,this.finishNode(t,"DoExpression")}parseSuper(){const t=this.startNode();return this.next(),!this.match(10)||this.scope.allowDirectSuper||this.options.allowSuperOutsideMethod?this.scope.allowSuper||this.options.allowSuperOutsideMethod||this.raise(t.start,f.UnexpectedSuper):this.raise(t.start,f.SuperNotAllowed),this.match(10)||this.match(0)||this.match(16)||this.raise(t.start,f.UnsupportedSuper),this.finishNode(t,"Super")}parsePrivateName(){const t=this.startNode(),e=this.startNodeAt(this.state.start+1,new h(this.state.curLine,this.state.start+1-this.state.lineStart)),s=this.state.value;return this.next(),t.id=this.createIdentifier(e,s),this.finishNode(t,"PrivateName")}parseFunctionOrFunctionSent(){const t=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(16)){const e=this.createIdentifier(this.startNodeAtNode(t),"function");return this.next(),this.match(98)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected(),this.parseMetaProperty(t,e,"sent")}return this.parseFunction(t)}parseMetaProperty(t,e,s){t.meta=e;const i=this.state.containsEsc;return t.property=this.parseIdentifier(!0),(t.property.name!==s||i)&&this.raise(t.property.start,f.UnsupportedMetaProperty,e.name,s),this.finishNode(t,"MetaProperty")}parseImportMetaProperty(t){const e=this.createIdentifier(this.startNodeAtNode(t),"import");return this.next(),this.isContextual(96)&&(this.inModule||this.raise(e.start,y.ImportMetaOutsideModule),this.sawUnambiguou
1sESM=!0),this.parseMetaProperty(t,e,"meta")}parseLiteralAtNode(t,e,s){return this.addExtra(s,"rawValue",t),this.addExtra(s,"raw",this.input.slice(s.start,this.state.end)),s.value=t,this.next(),this.finishNode(s,e)}parseLiteral(t,e){const s=this.startNode();return this.parseLiteralAtNode(t,e,s)}parseStringLiteral(t){return this.parseLiteral(t,"StringLiteral")}parseNumericLiteral(t){return this.parseLiteral(t,"NumericLiteral")}parseBigIntLiteral(t){return this.parseLiteral(t,"BigIntLiteral")}parseDecimalLiteral(t){return this.parseLiteral(t,"DecimalLiteral")}parseRegExpLiteral(t){const e=this.parseLiteral(t.value,"RegExpLiteral");return e.pattern=t.pattern,e.flags=t.flags,e}parseBooleanLiteral(t){const e=this.startNode();return e.value=t,this.next(),this.finishNode(e,"BooleanLiteral")}parseNullLiteral(){const t=this.startNode();return this.next(),this.finishNode(t,"NullLiteral")}parseParenAndDistinguishExpression(t){const e=this.state.start,s=this.state.startLoc;let i;this.next(),this.expressionScope.enter(new Ot(1));const r=this.state.maybeInArrowParameters,a=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;const n=this.state.start,o=this.state.startLoc,h=[],p=new jt;let c,l,u=!0;for(;!this.match(11);){if(u)u=!1;else if(this.expect(12,-1===p.optionalParameters?null:p.optionalParameters),this.match(11)){l=this.state.start;break}if(this.match(21)){const t=this.state.start,e=this.state.startLoc;c=this.state.start,h.push(this.parseParenItem(this.parseRestBinding(),t,e)),this.checkCommaAfterRest(41);break}h.push(this.parseMaybeAssignAllowIn(p,this.parseParenItem))}const d=this.state.lastTokEnd,m=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=r,this.state.inFSharpPipelineDirectBody=a;let f=this.startNodeAt(e,s);if(t&&this.shouldParseArrow(h)&&(f=this.parseArrow(f)))return this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(f,h,!1),f;if(this.expressionScope.exit(),h.length||this.unexpected(this.state.lastTokStart),l&&this.unexpected(l),c&&this.unexpected(c),this.checkExpressionErrors(p,!0),this.toReferencedListDeep(h,!0),h.length>1?(i=this.startNodeAt(n,o),i.expressions=h,this.finishNode(i,"SequenceExpression"),this.resetEndLocation(i,d,m)):i=h[0],!this.options.createParenthesizedExpressions)return this.addExtra(i,"parenthesized",!0),this.addExtra(i,"parenStart",e),this.takeSurroundingComments(i,e,this.state.lastTokEnd),i;const y=this.startNodeAt(e,s);return y.expression=i,this.finishNode(y,"ParenthesizedExpression"),y}shouldParseArrow(t){return!this.canInsertSemicolon()}parseArrow(t){if(this.eat(19))return t}parseParenItem(t,e,s){return t}parseNewOrNewTarget(){const t=this.startNode();if(this.next(),this.match(16)){const e=this.createIdentifier(this.startNodeAtNode(t),"new");this.next();const s=this.parseMetaProperty(t,e,"target");return this.scope.inNonArrowFunction||this.scope.inClass||this.raise(s.start,f.UnexpectedNewTarget),s}return this.parseNew(t)}parseNew(t){return t.callee=this.parseNoCallExpr(),"Import"===t.callee.type?this.raise(t.callee.start,f.ImportCallNotNewExpression):this.isOptionalChain(t.callee)?this.raise(this.state.lastTokEnd,f.OptionalChainingNoNew):this.eat(18)&&this.raise(this.state.start,f.OptionalChainingNoNew),this.parseNewArguments(t),this.finishNode(t,"NewExpression")}parseNewArguments(t){if(this.eat(10)){const e=this.parseExprList(11);this.toReferencedList(e),t.arguments=e}else t.arguments=[]}parseTemplateElement(t){const{start:e,end:s,value:i}=this.state,r=e+1,a=this.startNodeAt(r,c(this.state.startLoc,1));null===i&&(t||this.raise(e+2,f.InvalidEscapeSequenceTemplate));const n=this.match(24),o=n?-1:-2,h=s+o;return a.value={raw:this.input.slice(r,h).replace(/\r\n?/g,"\n"),cooked:null===i?null:i.slice(1,o)},a.tail=n,this.next(),this.finishNode(a,"TemplateElement"),this.resetEndLocation(a,h,c(this.state.lastTokEndLoc,o)),a}parseTemplate(t){const e=this.startNode();e.expressions=[];let s=this.parseTemplateElement(t);for(e.quasis=[s];!s.tail;)e.expressions.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),e.quasis.push(s=this.parseTemplateElement(t));return this.finishNode(e,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(t,e,s,i){s&&this.expectPlugin("recordAndTuple");const r=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;const a=Object.create(null);let n=!0;const o=this.startNode();for(o.properties=[],this.next();!this.match(t);){if(n)n=!1;else if(this.expect(12),this.match(t)){this.addExtra(o,"trailingComma",this.state.lastTokStart);break}let r;e?r=this.parseBindingProperty():(r=this.parsePropertyDefinition(i),this.checkProto(r,s,a,i)),s&&!this.isObjectProperty(r)&&"SpreadElement"!==r.type&&this.raise(r.start,f.InvalidRecordProperty),r.shorthand&&this.addExtra(r,"shorthand",!0),o.properties.push(r)}this.next(),this.state.inFSharpPipelineDirectBody=r;let h="ObjectExpression";return e?h="ObjectPattern":s&&(h="RecordExpression"),this.finishNode(o,h)}maybeAsyncOrAccessorProp(t){return!t.computed&&"Identifier"===t.key.type&&(this.isLiteralPropertyName()||this.match(0)||this.match(51))}parsePropertyDefinition(t){let e=[];
1if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(this.state.start,f.UnsupportedPropertyDecorator);this.match(26);)e.push(this.parseDecorator());const s=this.startNode();let i,r,a=!1,n=!1;if(this.match(21))return e.length&&this.unexpected(),this.parseSpread();e.length&&(s.decorators=e,e=[]),s.method=!1,t&&(i=this.state.start,r=this.state.startLoc);let o=this.eat(51);this.parsePropertyNamePrefixOperator(s);const h=this.state.containsEsc,p=this.parsePropertyName(s);if(!o&&!h&&this.maybeAsyncOrAccessorProp(s)){const t=p.name;"async"!==t||this.hasPrecedingLineBreak()||(a=!0,this.resetPreviousNodeTrailingComments(p),o=this.eat(51),this.parsePropertyName(s)),"get"!==t&&"set"!==t||(n=!0,this.resetPreviousNodeTrailingComments(p),s.kind=t,this.match(51)&&(o=!0,this.raise(this.state.pos,f.AccessorIsGenerator,t),this.next()),this.parsePropertyName(s))}return this.parseObjPropValue(s,i,r,o,a,!1,n,t),s}getGetterSetterExpectedParamCount(t){return"get"===t.kind?0:1}getObjectOrClassMethodParams(t){return t.params}checkGetterSetterParams(t){var e;const s=this.getGetterSetterExpectedParamCount(t),i=this.getObjectOrClassMethodParams(t),r=t.start;i.length!==s&&("get"===t.kind?this.raise(r,f.BadGetterArity):this.raise(r,f.BadSetterArity)),"set"===t.kind&&"RestElement"===(null==(e=i[i.length-1])?void 0:e.type)&&this.raise(r,f.BadSetterRestParameter)}parseObjectMethod(t,e,s,i,r){return r?(this.parseMethod(t,e,!1,!1,!1,"ObjectMethod"),this.checkGetterSetterParams(t),t):s||e||this.match(10)?(i&&this.unexpected(),t.kind="method",t.method=!0,this.parseMethod(t,e,s,!1,!1,"ObjectMethod")):void 0}parseObjectProperty(t,e,s,i,r){if(t.shorthand=!1,this.eat(14))return t.value=i?this.parseMaybeDefault(this.state.start,this.state.startLoc):this.parseMaybeAssignAllowIn(r),this.finishNode(t,"ObjectProperty");if(!t.computed&&"Identifier"===t.key.type){if(this.checkReservedWord(t.key.name,t.key.start,!0,!1),i)t.value=this.parseMaybeDefault(e,s,Ht(t.key));else if(this.match(29)){const i=this.state.start;null!=r?-1===r.shorthandAssign&&(r.shorthandAssign=i):this.raise(i,f.InvalidCoverInitializedName),t.value=this.parseMaybeDefault(e,s,Ht(t.key))}else t.value=Ht(t.key);return t.shorthand=!0,this.finishNode(t,"ObjectProperty")}}parseObjPropValue(t,e,s,i,r,a,n,o){const h=this.parseObjectMethod(t,i,r,a,n)||this.parseObjectProperty(t,e,s,a,o);return h||this.unexpected(),h}parsePropertyName(t){if(this.eat(0))t.computed=!0,t.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{const{type:e,value:s}=this.state;let i;if(z(e))i=this.parseIdentifier(!0);else switch(e){case 126:i=this.parseNumericLiteral(s);break;case 125:i=this.parseStringLiteral(s);break;case 127:i=this.parseBigIntLiteral(s);break;case 128:i=this.parseDecimalLiteral(s);break;case 130:{const t=this.state.start+1;this.raise(t,f.UnexpectedPrivateField),i=this.parsePrivateName();break}default:throw this.unexpected()}t.key=i,130!==e&&(t.computed=!1)}return t.key}initFunction(t,e){t.id=null,t.generator=!1,t.async=!!e}parseMethod(t,e,s,i,r,a,n=!1){this.initFunction(t,s),t.generator=!!e;const o=i;return this.scope.enter(18|(n?ft:0)|(r?32:0)),this.prodParam.enter(Ut(s,t.generator)),this.parseFunctionParams(t,o),this.parseFunctionBodyAndFinish(t,a,!0),this.prodParam.exit(),this.scope.exit(),t}parseArrayLike(t,e,s,i){s&&this.expectPlugin("recordAndTuple");const r=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;const a=this.startNode();return this.next(),a.elements=this.parseExprList(t,!s,i,a),this.state.inFSharpPipelineDirectBody=r,this.finishNode(a,s?"TupleExpression":"ArrayExpression")}parseArrowExpression(t,e,s,i){this.scope.enter(6);let r=Ut(s,!1);!this.match(0)&&this.prodParam.hasIn&&(r|=8),this.prodParam.enter(r),this.initFunction(t,s);const a=this.state.maybeInArrowParameters;return e&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(t,e,i)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(t,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=a,this.finishNode(t,"ArrowFunctionExpression")}setArrowFunctionParameters(t,e,s){t.params=this.toAssignableList(e,s,!1)}parseFunctionBodyAndFinish(t,e,s=!1){this.parseFunctionBody(t,!1,s),this.finishNode(t,e)}parseFunctionBody(t,e,s=!1){const i=e&&!this.match(5);if(this.expressionScope.enter(Bt()),i)t.body=this.parseMaybeAssign(),this.checkParams(t,!1,e,!1);else{const i=this.state.strict,r=this.state.labels;this.state.labels=[],this.prodParam.enter(4|this.prodParam.currentFlags()),t.body=this.parseBlock(!0,!1,(r=>{const a=!this.isSimpleParamList(t.params);if(r&&a){const e="method"!==t.kind&&"constructor"!==t.kind||!t.key?t.start:t.key.end;this.raise(e,f.IllegalLanguageModeDirective)}const n=!i&&this.state.strict;this.checkParams(t,!this.state.strict&&!e&&!s&&!a,e,n),this.state.strict&&t.id&&this.checkLVal(t.id,"function name",65,void 0,void 0,n)})),this.prodParam.exit(),this.state.labels=r}this.expressionScope.exit()}isSimpleParamList(t){for(let e=0,s=t.length;e<s;e++)if("Identifier"!==t[e].type)return!1;return!0}checkParams(t,e,s,i=!0){const r=new Set;for(const a of t.params)this.checkLVal(a,"function parameter list",5,e?null:r,void 0,i)}parseExprList(t,e,s,i){const r=[];let a=!0;for(;!this.eat(t);){if(a)a=!1;else if(this.expect(12),this.match(t)){i&&this.addExtra(i,"trailingComma",this.state.lastTokStart),this.next();break}r.push(this.parseExprListItem(e,s))}return r}parseExprListItem(t,e,s){let i;if(this.match(12))t||this.raise(this.state.pos,f.UnexpectedToken,","),i=null;else if(this.match(21)){const t=this.state.start,s=this.state.startLoc;i=this.parseParenItem(this.parseSpread(e),t,s)}else if(this.match(17)){this.expectPlugin("partialApplication"),s||this.raise(this.state.start,f.UnexpectedArgumentPlaceholder);const t=this.startNode();this.next(),i=this.finishNode(t,"ArgumentPlaceholder")}else i=this.parseMaybeAssignAllowIn(e,this.parseParenItem);return i}parseIdentifier(t){const e=this.startNode(),s=this.parseIdentifierName(e.start,t);return this.createIdentifier(e,s)}createIdentifier(t,e){return t.name=e,t.loc.identifierName=e,this.finishNode(t,"Identifier")}parseIdentifierName(t,e){let s;const{start:i,type:r}=this.state;if(!z(r))throw this.unexpected();s=this.state.value;const a=r<=88;return e?a&&this.replaceToken(124):this.checkReservedWord(s,i,a,!1),this.next(),s}checkReservedWord(t,e,s,i){if(t.length>10)return;if(!function(t){return mt.has(t)}(t))return;if("yield"===t){if(this.prodParam.hasYield)return void this.raise(e,f.YieldBindingIdentifier)}else if("await"===t){if(this.prodParam.hasAwait)return void this.raise(e,f.AwaitBindingIdentifier);if(this.scope.inStaticBlock)return void this.raise(e,f.AwaitBindingIdentifierInStaticBlock);this.expressionScope.recordAsyncArrowParametersError(e,f.AwaitBindingIdentifier)}else if("arguments"===t&&this.scope.inClassAndNotInNonArrowFunction)return void this.raise(e,f.ArgumentsInClass);if(s&&function(t){return ot.has(t)}(t))return void this.raise(e,f.UnexpectedKeyword,t);(this.state.strict?i?dt:lt:ct)(t,this.inModule)&&this.raise(e,f.UnexpectedReservedWord,t)}isAwaitAllowed(){return!!this.prodParam.hasAwait||!(!this.options.allowA
1waitOutsideFunction||this.scope.inFunction)}parseAwait(t,e){const s=this.startNodeAt(t,e);return this.expressionScope.recordParameterInitializerError(s.start,f.AwaitExpressionFormalParameter),this.eat(51)&&this.raise(s.start,f.ObsoleteAwaitStar),this.scope.inFunction||this.options.allowAwaitOutsideFunction||(this.isAmbiguousAwait()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(s.argument=this.parseMaybeUnary(null,!0)),this.finishNode(s,"AwaitExpression")}isAmbiguousAwait(){if(this.hasPrecedingLineBreak())return!0;const{type:t}=this.state;return 49===t||10===t||0===t||X(t)||129===t||52===t||this.hasPlugin("v8intrinsic")&&50===t}parseYield(){const t=this.startNode();this.expressionScope.recordParameterInitializerError(t.start,f.YieldInParameter),this.next();let e=!1,s=null;if(!this.hasPrecedingLineBreak())switch(e=this.eat(51),this.state.type){case 13:case 131:case 8:case 11:case 3:case 9:case 14:case 12:if(!e)break;default:s=this.parseMaybeAssign()}return t.delegate=e,t.argument=s,this.finishNode(t,"YieldExpression")}checkPipelineAtInfixOperator(t,e){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&"SequenceExpression"===t.type&&this.raise(e,f.PipelineHeadSequenceExpression)}checkHackPipeBodyEarlyErrors(t){this.topicReferenceWasUsedInCurrentContext()||this.raise(t,f.PipeTopicUnused)}parseSmartPipelineBodyInStyle(t,e,s){const i=this.startNodeAt(e,s);return this.isSimpleReference(t)?(i.callee=t,this.finishNode(i,"PipelineBareFunction")):(this.checkSmartPipeTopicBodyEarlyErrors(e),i.expression=t,this.finishNode(i,"PipelineTopicExpression"))}isSimpleReference(t){switch(t.type){case"MemberExpression":return!t.computed&&this.isSimpleReference(t.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(t){if(this.match(19))throw this.raise(this.state.start,f.PipelineBodyNoArrow);this.topicReferenceWasUsedInCurrentContext()||this.raise(t,f.PipelineTopicUnused)}withTopicBindingContext(t){const e=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return t()}finally{this.state.topicContext=e}}withSmartMixTopicForbiddingContext(t){if(!this.hasPlugin(["pipelineOperator",{proposal:"smart"}]))return t();{const e=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return t()}finally{this.state.topicContext=e}}}withSoloAwaitPermittingContext(t){const e=this.state.soloAwait;this.state.soloAwait=!0;try{return t()}finally{this.state.soloAwait=e}}allowInAnd(t){const e=this.prodParam.currentFlags();if(8&~e){this.prodParam.enter(8|e);try{return t()}finally{this.prodParam.exit()}}return t()}disallowInAnd(t){const e=this.prodParam.currentFlags();if(8&e){this.prodParam.enter(-9&e);try{return t()}finally{this.prodParam.exit()}}return t()}registerTopicReference(){this.state.topicContext.maxTopicIndex=0}topicReferenceIsAllowedInCurrentContext(){return this.state.topicContext.maxNumOfResolvableTopics>=1}topicReferenceWasUsedInCurrentContext(){return null!=this.state.topicContext.maxTopicIndex&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(t){const e=this.state.start,s=this.state.startLoc;this.state.potentialArrowAt=this.state.start;const i=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;const r=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),e,s,t);return this.state.inFSharpPipelineDirectBody=i,r}parseModuleExpression(){this.expectPlugin("moduleBlocks");const t=this.startNode();this.next(),this.eat(5);const e=this.initializeScopes(!0);this.enterInitialScopes();const s=this.startNode();try{t.body=this.parseProgram(s,8,"module")}finally{e()}return this.eat(8),this.finishNode(t,"ModuleExpression")}parsePropertyNamePrefixOperator(t){}}{parseTopLevel(t,e){return t.program=this.parseProgram(e),t.comments=this.state.comments,this.options.tokens&&(t.tokens=function(t,e){for(let s=0;s<t.length;s++){const i=t[s],{type:r}=i;if("number"===typeof r){if(130===r){const{loc:e,start:r,value:a,end:n}=i,o=r+1,h=c(e.start,1);t.splice(s,1,new vt({type:G(27),value:"#",start:r,end:o,startLoc:e.start,endLoc:h}),new vt({type:G(124),value:a,start:o,end:n,startLoc:h,endLoc:e.end})),s++;continue}if(X(r)){const{loc:a,start:n,value:o,end:h}=i,p=n+1,l=c(a.start,1);let u,d,m,f,y;u=96===e.charCodeAt(n)?new vt({type:G(22),value:"`",start:n,end:p,startLoc:a.start,endLoc:l}):new vt({type:G(8),value:"}",start:n,end:p,startLoc:a.start,endLoc:l}),24===r?(m=h-1,f=c(a.end,-1),d=null===o?null:o.slice(1,-1),y=new vt({type:G(22),value:"`",start:m,end:h,startLoc:f,endLoc:a.end})):(m=h-2,f=c(a.end,-2),d=null===o?null:o.slice(1,-2),y=new vt({type:G(23),value:"${",start:m,end:h,startLoc:f,endLoc:a.end})),t.splice(s,1,u,new vt({type:G(20),value:d,start:p,end:m,startLoc:l,endLoc:f}),y),s+=2;continue}i.type=G(r)}}return t}(this.tokens,this.input)),this.finishNode(t,"File")}parseProgram(t,e=131,s=this.options.sourceType){if(t.sourceType=s,t.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(t,!0,!0,e),this.inModule&&!this.options.allowUndeclaredExports&&this.scope.undefinedExports.size>0)for(const[i]of Array.from(this.scope.undefinedExports)){const t=this.scope.undefinedExports.get(i);this.raise(t,f.ModuleExportUndefined,i)}return this.finishNode(t,"Program")}stmtToDirective(t){const e=t;e.type="Directive",e.value=e.expression,delete e.expression;const s=e.value,i=s.value,r=this.input.slice(s.start,s.end),a=s.value=r.slice(1,-1);return this.addExtra(s,"raw",r),this.addExtra(s,"rawValue",a),this.addExtra(s,"expressionValue",i),s.type="DirectiveLiteral",e}parseInterpreterDirective(){if(!this.match(28))return null;const t=this.startNode();return t.value=this.state.value,this.next(),this.finishNode(t,"InterpreterDirective")}isLet(t){return!!this.isContextual(95)&&this.isLetKeyword(t)}isLetKeyword(t){const e=this.nextTokenStart(),s=this.codePointAtPos(e);if(92===s||91===s)return!0;
1if(t)return!1;if(123===s)return!0;if(it(s)){if(be.lastIndex=e,be.test(this.input)){const t=this.codePointAtPos(be.lastIndex);if(!rt(t)&&92!==t)return!1}return!0}return!1}parseStatement(t,e){return this.match(26)&&this.parseDecorators(!0),this.parseStatementContent(t,e)}parseStatementContent(t,e){let s=this.state.type;const i=this.startNode();let r;switch(this.isLet(t)&&(s=70,r="let"),s){case 56:return this.parseBreakContinueStatement(i,!0);case 59:return this.parseBreakContinueStatement(i,!1);case 60:return this.parseDebuggerStatement(i);case 86:return this.parseDoStatement(i);case 87:return this.parseForStatement(i);case 64:if(46===this.lookaheadCharCode())break;return t&&(this.state.strict?this.raise(this.state.start,f.StrictFunction):"if"!==t&&"label"!==t&&this.raise(this.state.start,f.SloppyFunction)),this.parseFunctionStatement(i,!1,!t);case 76:return t&&this.unexpected(),this.parseClass(i,!0);case 65:return this.parseIfStatement(i);case 66:return this.parseReturnStatement(i);case 67:return this.parseSwitchStatement(i);case 68:return this.parseThrowStatement(i);case 69:return this.parseTryStatement(i);case 71:case 70:return r=r||this.state.value,t&&"var"!==r&&this.raise(this.state.start,f.UnexpectedLexicalDeclaration),this.parseVarStatement(i,r);case 88:return this.parseWhileStatement(i);case 72:return this.parseWithStatement(i);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(i);case 79:{const t=this.lookaheadCharCode();if(40===t||46===t)break}case 78:{let t;return this.options.allowImportExportEverywhere||e||this.raise(this.state.start,f.UnexpectedImportExport),this.next(),79===s?(t=this.parseImport(i),"ImportDeclaration"!==t.type||t.importKind&&"value"!==t.importKind||(this.sawUnambiguousESM=!0)):(t=this.parseExport(i),("ExportNamedDeclaration"!==t.type||t.exportKind&&"value"!==t.exportKind)&&("ExportAllDeclaration"!==t.type||t.exportKind&&"value"!==t.exportKind)&&"ExportDefaultDeclaration"!==t.type||(this.sawUnambiguousESM=!0)),this.assertModuleNodeAllowed(i),t}default:if(this.isAsyncFunction())return t&&this.raise(this.state.start,f.AsyncFunctionInSingleStatementContext),this.next(),this.parseFunctionStatement(i,!0,!t)}const a=this.state.value,n=this.parseExpression();return _(s)&&"Identifier"===n.type&&this.eat(14)?this.parseLabeledStatement(i,a,n,t):this.parseExpressionStatement(i,n)}assertModuleNodeAllowed(t){this.options.allowImportExportEverywhere||this.inModule||this.raise(t.start,y.ImportOutsideModule)}takeDecorators(t){const e=this.state.decoratorStack[this.state.decoratorStack.length-1];e.length&&(t.decorators=e,this.resetStartLocationFromNode(t,e[0]),this.state.decoratorStack[this.state.decoratorStack.length-1]=[])}canHaveLeadingDecorator(){return this.match(76)}parseDecorators(t){const e=this.state.decoratorStack[this.state.decoratorStack.length-1];for(;this.match(26);){const t=this.parseDecorator();e.push(t)}if(this.match(78))t||this.unexpected(),this.hasPlugin("decorators")&&!this.getPluginOption("decorators","decoratorsBeforeExport")&&this.raise(this.state.start,f.DecoratorExportClass);else if(!this.canHaveLeadingDecorator())throw this.raise(this.state.start,f.UnexpectedLeadingDecorator)}parseDecorator(){this.expectOnePlugin(["decorators-legacy","decorators"]);const t=this.startNode();if(this.next(),this.hasPlugin("decorators")){this.state.decoratorStack.push([]);const e=this.state.start,s=this.state.startLoc;let i;if(this.eat(10))i=this.parseExpression(),this.expect(11);else for(i=this.parseIdentifier(!1);this.eat(16);){const t=this.startNodeAt(e,s);t.object=i,t.property=this.parseIdentifier(!0),t.computed=!1,i=this.finishNode(t,"MemberExpression")}t.expression=this.parseMaybeDecoratorArguments(i),this.state.decoratorStack.pop()}else t.expression=this.parseExprSubscripts();return this.finishNode(t,"Decorator")}parseMaybeDecoratorArguments(t){if(this.eat(10)){const e=this.startNodeAtNode(t);return e.callee=t,e.arguments=this.parseCallExpressionArguments(11,!1),this.toReferencedList(e.arguments),this.finishNode(e,"CallExpression")}return t}parseBreakContinueStatement(t,e){return this.next(),this.isLineTerminator()?t.label=null:(t.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(t,e),this.finishNode(t,e?"BreakStatement":"ContinueStatement")}verifyBreakContinue(t,e){let s;for(s=0;s<this.state.labels.length;++s){const i=this.state.labels[s];if(null==t.label||i.name===t.label.name){if(null!=i.kind&&(e||"loop"===i.kind))break;if(t.label&&e)break}}s===this.state.labels.length&&this.raise(t.start,f.IllegalBreakContinue,e?"break":"continue")}
1parseDebuggerStatement(t){return this.next(),this.semicolon(),this.finishNode(t,"DebuggerStatement")}parseHeaderExpression(){this.expect(10);const t=this.parseExpression();return this.expect(11),t}parseDoStatement(t){return this.next(),this.state.labels.push(Pe),t.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement("do"))),this.state.labels.pop(),this.expect(88),t.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(t,"DoWhileStatement")}parseForStatement(t){this.next(),this.state.labels.push(Pe);let e=-1;if(this.isAwaitAllowed()&&this.eatContextual(92)&&(e=this.state.lastTokStart),this.scope.enter(0),this.expect(10),this.match(13))return e>-1&&this.unexpected(e),this.parseFor(t,null);const s=this.isContextual(95),i=s&&this.isLetKeyword();if(this.match(70)||this.match(71)||i){const s=this.startNode(),r=i?"let":this.state.value;return this.next(),this.parseVar(s,!0,r),this.finishNode(s,"VariableDeclaration"),(this.match(54)||this.isContextual(97))&&1===s.declarations.length?this.parseForIn(t,s,e):(e>-1&&this.unexpected(e),this.parseFor(t,s))}const r=this.isContextual(91),a=new jt,n=this.parseExpression(!0,a),o=this.isContextual(97);if(o&&(s?this.raise(n.start,f.ForOfLet):-1===e&&r&&"Identifier"===n.type&&this.raise(n.start,f.ForOfAsync)),o||this.match(54)){this.toAssignable(n,!0);const s=o?"for-of statement":"for-in statement";return this.checkLVal(n,s),this.parseForIn(t,n,e)}return this.checkExpressionErrors(a,!0),e>-1&&this.unexpected(e),this.parseFor(t,n)}parseFunctionStatement(t,e,s){return this.next(),this.parseFunction(t,1|(s?0:2),e)}parseIfStatement(t){return this.next(),t.test=this.parseHeaderExpression(),t.consequent=this.parseStatement("if"),t.alternate=this.eat(62)?this.parseStatement("if"):null,this.finishNode(t,"IfStatement")}
1parseReturnStatement(t){return this.prodParam.hasReturn||this.options.allowReturnOutsideFunction||this.raise(this.state.start,f.IllegalReturn),this.next(),this.isLineTerminator()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")}parseSwitchStatement(t){this.next(),t.discriminant=this.parseHeaderExpression();const e=t.cases=[];let s,i;for(this.expect(5),this.state.labels.push(ge),this.scope.enter(0);!this.match(8);)if(this.match(57)||this.match(61)){const t=this.match(57);s&&this.finishNode(s,"SwitchCase"),e.push(s=this.startNode()),s.consequent=[],this.next(),t?s.test=this.parseExpression():(i&&this.raise(this.state.lastTokStart,f.MultipleDefaultsInSwitch),i=!0,s.test=null),this.expect(14)}else s?s.consequent.push(this.parseStatement(null)):this.unexpected();return this.scope.exit(),s&&this.finishNode(s,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(t,"SwitchStatement")}parseThrowStatement(t){return this.next(),this.hasPrecedingLineBreak()&&this.raise(this.state.lastTokEnd,f.NewlineAfterThrow),t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")}parseCatchClauseParam(){const t=this.parseBindingAtom(),e="Identifier"===t.type;return this.scope.enter(e?8:0),this.checkLVal(t,"catch clause",9),t}parseTryStatement(t){if(this.next(),t.block=this.parseBlock(),t.handler=null,this.match(58)){const e=this.startNode();this.next(),this.match(10)?(this.expect(10),e.param=this.parseCatchClauseParam(),this.expect(11)):(e.param=null,this.scope.enter(0)),e.body=this.withSmartMixTopicForbiddingContext((()=>this.parseBlock(!1,!1))),this.scope.exit(),t.handler=this.finishNode(e,"CatchClause")}return t.finalizer=this.eat(63)?this.parseBlock():null,t.handler||t.finalizer||this.raise(t.start,f.NoCatchOrFinally),this.finishNode(t,"TryStatement")}parseVarStatement(t,e){return this.next(),this.parseVar(t,!1,e),this.semicolon(),this.finishNode(t,"VariableDeclaration")}parseWhileStatement(t){return this.next(),t.test=this.parseHeaderExpression(),this.state.labels.push(Pe),t.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement("while"))),this.state.labels.pop(),this.finishNode(t,"WhileStatement")}parseWithStatement(t){return this.state.strict&&this.raise(this.state.start,f.StrictWith),this.next(),t.object=this.parseHeaderExpression(),t.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement("with"))),this.finishNode(t,"WithStatement")}parseEmptyStatement(t){return this.next(),this.finishNode(t,"EmptyStatement")}parseLabeledStatement(t,e,s,i){for(const n of this.state.labels)n.name===e&&this.raise(s.start,f.LabelRedeclaration,e);const r=(a=this.state.type)>=86&&a<=88?"loop":this.match(67)?"switch":null;var a;for(let n=this.state.labels.length-1;n>=0;n--){const e=this.state.labels[n];if(e.statementStart!==t.start)break;e.statementStart=this.state.start,e.kind=r}return this.state.labels.push({name:e,kind:r,statementStart:this.state.start}),t.body=this.parseStatement(i?-1===i.indexOf("label")?i+"label":i:"label"),this.state.labels.pop(),t.label=s,this.finishNode(t,"LabeledStatement")}parseExpressionStatement(t,e){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")}parseBlock(t=!1,e=!0,s){const i=this.startNode();return t&&this.state.strictErrors.clear(),this.expect(5),e&&this.scope.enter(0),this.parseBlockBody(i,t,!1,8,s),e&&this.scope.exit(),this.finishNode(i,"BlockStatement")}isValidDirective(t){return"ExpressionStatement"===t.type&&"StringLiteral"===t.expression.type&&!t.expression.extra.parenthesized}parseBlockBody(t,e,s,i,r){const a=t.body=[],n=t.directives=[];this.parseBlockOrModuleBlockBody(a,e?n:void 0,s,i,r)}parseBlockOrModuleBlockBody(t,e,s,i,r){const a=this.state.strict;let n=!1,o=!1;for(;!this.match(i);){const i=this.parseStatement(null,s);if(e&&!o){if(this.isValidDirective(i)){const t=this.stmtToDirective(i);e.push(t),n||"use strict"!==t.value.value||(n=!0,this.setStrict(!0));continue}o=!0,this.state.strictErrors.clear()}t.push(i)}r&&r.call(this,n),a||this.setStrict(!1),this.next()}parseFor(t,e){return t.init=e,this.semicolon(!1),t.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),t.update=this.match(11)?null:this.parseExpression(),this.expect(11),t.body=this.withSmartMixTopicForbiddingContext((()=>
1this.parseStatement("for"))),this.scope.exit(),this.state.labels.pop(),this.finishNode(t,"ForStatement")}parseForIn(t,e,s){const i=this.match(54);return this.next(),i?s>-1&&this.unexpected(s):t.await=s>-1,"VariableDeclaration"!==e.type||null==e.declarations[0].init||i&&!this.state.strict&&"var"===e.kind&&"Identifier"===e.declarations[0].id.type?"AssignmentPattern"===e.type&&this.raise(e.start,f.InvalidLhs,"for-loop"):this.raise(e.start,f.ForInOfLoopInitializer,i?"for-in":"for-of"),t.left=e,t.right=i?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),t.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement("for"))),this.scope.exit(),this.state.labels.pop(),this.finishNode(t,i?"ForInStatement":"ForOfStatement")}parseVar(t,e,s){const i=t.declarations=[],r=this.hasPlugin("typescript");for(t.kind=s;;){const t=this.startNode();if(this.parseVarId(t,s),this.eat(29)?t.init=e?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():("const"!==s||this.match(54)||this.isContextual(97)?"Identifier"===t.id.type||e&&(this.match(54)||this.isContextual(97))||this.raise(this.state.lastTokEnd,f.DeclarationMissingInitializer,"Complex binding patterns"):r||this.raise(this.state.lastTokEnd,f.DeclarationMissingInitializer,"Const declarations"),t.init=null),i.push(this.finishNode(t,"VariableDeclarator")),!this.eat(12))break}return t}parseVarId(t,e){t.id=this.parseBindingAtom(),this.checkLVal(t.id,"variable declaration","var"===e?5:9,void 0,"var"!==e)}parseFunction(t,e=0,s=!1){const i=1&e,r=2&e,a=!!i&&!(4&e);this.initFunction(t,s),this.match(51)&&r&&this.raise(this.state.start,f.GeneratorInSingleStatementContext),t.generator=this.eat(51),i&&(t.id=this.parseFunctionId(a));const n=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(2),this.prodParam.enter(Ut(s,t.generator)),i||(t.id=this.parseFunctionId()),this.parseFunctionParams(t,!1),this.withSmartMixTopicForbiddingContext((()=>{this.parseFunctionBodyAndFinish(t,i?"FunctionDeclaration":"FunctionExpression")})),this.prodParam.exit(),this.scope.exit(),i&&!r&&this.registerFunctionStatementId(t),this.state.maybeInArrowParameters=n,t}parseFunctionId(t){return t||_(this.state.type)?this.parseIdentifier():null}parseFunctionParams(t,e){this.expect(10),this.expressionScope.enter(new Lt(3)),t.params=this.parseBindingList(11,41,!1,e),this.expressionScope.exit()}registerFunctionStatementId(t){t.id&&this.scope.declareName(t.id.name,this.state.strict||t.generator||t.async?this.scope.treatFunctionsAsVar?5:9:17,t.id.start)}parseClass(t,e,s){this.next(),this.takeDecorators(t);const i=this.state.strict;return this.state.strict=!0,this.parseClassId(t,e,s),this.parseClassSuper(t),t.body=this.parseClassBody(!!t.superClass,i),this.finishNode(t,e?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}isNonstaticConstructor(t){return!t.computed&&!t.static&&("constructor"===t.key.name||"constructor"===t.key.value)}parseClassBody(t,e){this.classScope.enter();const s={hadConstructor:!1,hadSuperClass:t};let i=[];const r=this.startNode();if(r.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext((()=>{for(;!this.match(8);){if(this.eat(13)){if(i.length>0)throw this.raise(this.state.lastTokEnd,f.DecoratorSemicolon);continue}if(this.match(26)){i.push(this.parseDecorator());continue}const t=this.startNode();i.length&&(t.decorators=i,this.resetStartLocationFromNode(t,i[0]),i=[]),this.parseClassMember(r,t,s),"constructor"===t.kind&&t.decorators&&t.decorators.length>0&&this.raise(t.start,f.DecoratorConstructor)}})),this.state.strict=e,this.next(),i.length)throw this.raise(this.state.start,f.TrailingDecorator);return this.classScope.exit(),this.finishNode(r,"ClassBody")}parseClassMemberFromModifier(t,e){const s=this.parseIdentifier(!0);if(this.isClassMethod()){const i=e;return i.kind="method",i.computed=!1,i.key=s,i.static=!1,this.pushClassMethod(t,i,!1,!1,!1,!1),!0}if(this.isClassProperty()){const i=e;return i.computed=!1,i.key=s,i.static=!1,t.body.push(this.parseClassProperty(i)),!0}return this.resetPreviousNodeTrailingComments(s),!1}parseClassMember(t,e,s){const i=this.isContextual(100);if(i){if(this.parseClassMemberFromModifier(t,e))return;if(this.eat(5))return void this.parseClassStaticBlock(t,e)}this.parseClassMemberWithIsStatic(t,e,s,i)}parseClassMemberWithIsStatic(t,e,s,i){const r=e,a=e,n=e,o=e,h=r,p=r;if(e.static=i,this.parsePropertyNamePrefixOperator(e),this.eat(51)){h.kind="method";const e=this.match(130);return this.parseClassElementName(h),e?void this.pushClassPrivateMethod(t,a,!0,!1):(this.isNonstaticConstructor(r)&&this.raise(r.key.start,f.ConstructorIsGenerator),void this.pushClassMethod(t,r,!0,!1,!1,!1))}const c=_(this.state.type)&&!this.state.containsEsc,l=this.match(130),u=this.parseClassElementName(e),d=this.state.start;if(this.parsePostMemberNameModifiers(p),this.isClassMethod()){if(h.kind="method",l)return void this.pushClassPrivateMethod(t,a,!1,!1);const i=this.isNonstaticConstructor(r);let n=!1;i&&(r.kind="constructor",s.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(u.start,f.DuplicateConstructor),i&&this.hasPlugin("typescript")&&e.override&&this.raise(u.start,f.OverrideOnConstructor),s.hadConstructor=!0,n=s.hadSuperClass),this.pushClassMethod(t,r,!1,!1,i,n)}else if(this.isClassProperty())l?this.pushClassPrivateProperty(t,o):this.pushClassProperty(t,n);else if(c&&"async"===u.name&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(u);const e=this.eat(51);p.optional&&this.unexpected(d),h.kind="method";const s=this.match(130);this.parseClassElementName(h),this.parsePostMemberNameModifiers(p),s?this.pushClassPrivateMethod(t,a,e,!0):(this.isNonstaticConstructor(r)&&this.raise(r.key.start,f.ConstructorIsAsync),this.pushClassMethod(t,r,e,!0,!1,!1))}else if(!c||"get"!==u.name&&"set"!==u.name||this.match(51)&&this.isLineTerminator())this.isLineTerminator()?l?this.pushClassPrivateProperty(t,o):this.pushClassProperty(t,n):this.unexpected();else{this.resetPreviousNodeTrailingComments(u),h.kind=u.name;const e=this.match(130);this.parseClassElementName(r),e?this.pushClassPrivateMethod(t,a,!1,!1):(this.isNonstaticConstructor(r)&&this.raise(r.key.start,f.ConstructorIsAccessor),this.pushClassMethod(t,r,!1,!1,!1,!1)),this.checkGetterSetterParams(r)}}parseClassElementName(t){const{type:e,value:s,start:i}=this.state;if(124!==e&&125!==e||!t.static||"prototype"!==s||this.raise(i,f.StaticPrototype),130===e){"constructor"===s&&this.raise(i,f.ConstructorClassPrivateField);const e=this.parsePrivateName();return t.key=e,e}return this.parsePropertyName(t)}parseClassStaticBlock(t,e){var s;this.scope.enter(208);const i=this.state.labels;this.state.labels=[],this.prodParam.enter(0);const r=e.body=[];this.parseBlockOrModuleBlockBody(r,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=i,t.body.push(this.finishNode(e,"StaticBlock")),null!=(s=e.decorators)&&s.length&&this.raise(e.start,f.DecoratorStaticBlock)}pushClassProperty(t,e){e.computed||"constructor"!==e.key.name&&"constructor"!==e.key.value||this.raise(e.key.start,f.ConstructorClassField),t.body.push(this.parseClassProperty(e))}pushClassPrivateProperty(t,e){const s=this.parseClassPrivateProperty(e);t.body.push(s),this.classScope.declarePrivateName(this.getPrivateNameSV(s.key),0,s.key.start)}pushClassMethod(t,e,s,i,r,a){t.body.push(this.parseMethod(e,s,i,r,a,"ClassMethod",!0))}pushClassPrivateMethod(t,e,s,i){const r=this.parseMethod(e,s,i,!1,!1,"ClassPrivateMethod",!0);t.body.push(r);const a="get"===r.kind?r.static?6:2:"set"===r.kind?r.static?5:1:0;this.declareClassPrivateMethodInScope(r,a)}declareClassPrivateMethodInScope(t,e){this.classScope.declarePrivateName(this.getPrivateNameSV(t.key),e,t.key.start)}parsePostMemberNameModifiers(t){}parseClassPrivateProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassPrivateProperty")}parseClassProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassProperty")}parseInitializer(t){this.scope.enter(80),this.expressionScope.enter(Bt()),this.prodParam.enter(0),t.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}
1parseClassId(t,e,s,i=139){_(this.state.type)?(t.id=this.parseIdentifier(),e&&this.checkLVal(t.id,"class name",i)):s||!e?t.id=null:this.unexpected(null,f.MissingClassName)}parseClassSuper(t){t.superClass=this.eat(77)?this.parseExprSubscripts():null}parseExport(t){const e=this.maybeParseExportDefaultSpecifier(t),s=!e||this.eat(12),i=s&&this.eatExportStar(t),r=i&&this.maybeParseExportNamespaceSpecifier(t),a=s&&(!r||this.eat(12)),n=e||i;if(i&&!r)return e&&this.unexpected(),this.parseExportFrom(t,!0),this.finishNode(t,"ExportAllDeclaration");const o=this.maybeParseExportNamedSpecifiers(t);if(e&&s&&!i&&!o||r&&a&&!o)throw this.unexpected(null,5);let h;if(n||o?(h=!1,this.parseExportFrom(t,n)):h=this.maybeParseExportDeclaration(t),n||o||h)return this.checkExport(t,!0,!1,!!t.source),this.finishNode(t,"ExportNamedDeclaration");if(this.eat(61))return t.declaration=this.parseExportDefaultExpression(),this.checkExport(t,!0,!0),this.finishNode(t,"ExportDefaultDeclaration");throw this.unexpected(null,5)}eatExportStar(t){return this.eat(51)}maybeParseExportDefaultSpecifier(t){if(this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom");const e=this.startNode();return e.exported=this.parseIdentifier(!0),t.specifiers=[this.finishNode(e,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(t){if(this.isContextual(89)){t.specifiers||(t.specifiers=[]);const e=this.startNodeAt(this.state.lastTokStart,this.state.lastTokStartLoc);return this.next(),e.exported=this.parseModuleExportName(),t.specifiers.push(this.finishNode(e,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(t){if(this.match(5)){t.specifiers||(t.specifiers=[]);const e="type"===t.exportKind;return t.specifiers.push(...this.parseExportSpecifiers(e)),t.source=null,t.declaration=null,this.hasPlugin("importAssertions")&&(t.assertions=[]),!0}return!1}maybeParseExportDeclaration(t){return!!this.shouldParseExportDeclaration()&&(t.specifiers=[],t.source=null,this.hasPlugin("importAssertions")&&(t.assertions=[]),t.declaration=this.parseExportDeclaration(t),!0)}isAsyncFunction(){if(!this.isContextual(91))return!1;const t=this.nextTokenStart();return!s.test(this.input.slice(this.state.pos,t))&&this.isUnparsedContextual(t,"function")}parseExportDefaultExpression(){const t=this.startNode(),e=this.isAsyncFunction();if(this.match(64)||e)return this.next(),e&&this.next(),this.parseFunction(t,5,e);if(this.match(76))return this.parseClass(t,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")&&this.raise(this.state.start,f.DecoratorBeforeExport),this.parseDecorators(!1),this.parseClass(t,!0,!0);if(this.match(71)||this.match(70)||this.isLet())throw this.raise(this.state.start,f.UnsupportedDefaultExport);{const t=this.parseMaybeAssignAllowIn();return this.semicolon(),t}}parseExportDeclaration(t){return this.parseStatement(null)}isExportDefaultSpecifier(){const{type:t}=this.state;if(_(t)){if(91===t&&!this.state.containsEsc||95===t)return!1;if((122===t||121===t)&&!this.state.containsEsc){const{type:t}=this.lookahead();if(_(t)&&93!==t||5===t)return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(61))return!1;const e=this.nextTokenStart(),s=this.isUnparsedContextual(e,"from");if(44===this.input.charCodeAt(e)||_(this.state.type)&&s)return!0;if(this.match(61)&&s){const t=this.input.charCodeAt(this.nextTokenStartSince(e+4));return 34===t||39===t}return!1}parseExportFrom(t,e){if(this.eatContextual(93)){t.source=this.parseImportSource(),this.checkExport(t);const e=this.maybeParseImportAssertions();e&&(t.assertions=e)}else e&&this.unexpected();this.semicolon()}shouldParseExportDeclaration(){const{type:t}=this.state;if(26===t&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))){if(!this.getPluginOption("decorators","decoratorsBeforeExport"))return!0;this.unexpected(this.state.start,f.DecoratorBeforeExport)}return 70===t||71===t||64===t||76===t||this.isLet()||this.isAsyncFunction()}
1checkExport(t,e,s,i){if(e)if(s){if(this.checkDuplicateExports(t,"default"),this.hasPlugin("exportDefaultFrom")){var r;const e=t.declaration;"Identifier"!==e.type||"from"!==e.name||e.end-e.start!==4||null!=(r=e.extra)&&r.parenthesized||this.raise(e.start,f.ExportDefaultFromAsIdentifier)}}else if(t.specifiers&&t.specifiers.length)for(const a of t.specifiers){const{exported:t}=a,e="Identifier"===t.type?t.name:t.value;if(this.checkDuplicateExports(a,e),!i&&a.local){const{local:t}=a;"Identifier"!==t.type?this.raise(a.start,f.ExportBindingIsString,t.value,e):(this.checkReservedWord(t.name,t.start,!0,!1),this.scope.checkLocalExport(t))}}else if(t.declaration)if("FunctionDeclaration"===t.declaration.type||"ClassDeclaration"===t.declaration.type){const e=t.declaration.id;if(!e)throw new Error("Assertion failure");this.checkDuplicateExports(t,e.name)}else if("VariableDeclaration"===t.declaration.type)for(const a of t.declaration.declarations)this.checkDeclaration(a.id);if(this.state.decoratorStack[this.state.decoratorStack.length-1].length)throw this.raise(t.start,f.UnsupportedDecoratorExport)}checkDeclaration(t){if("Identifier"===t.type)this.checkDuplicateExports(t,t.name);else if("ObjectPattern"===t.type)for(const e of t.properties)this.checkDeclaration(e);else if("ArrayPattern"===t.type)for(const e of t.elements)e&&this.checkDeclaration(e);else"ObjectProperty"===t.type?this.checkDeclaration(t.value):"RestElement"===t.type?this.checkDeclaration(t.argument):"AssignmentPattern"===t.type&&this.checkDeclaration(t.left)}checkDuplicateExports(t,e){this.exportedIdentifiers.has(e)&&this.raise(t.start,"default"===e?f.DuplicateDefaultExport:f.DuplicateExport,e),this.exportedIdentifiers.add(e)}parseExportSpecifiers(t){const e=[];let s=!0;for(this.expect(5);!this.eat(8);){if(s)s=!1;else if(this.expect(12),this.eat(8))break;const i=this.isContextual(122),r=this.match(125),a=this.startNode();a.local=this.parseModuleExportName(),e.push(this.parseExportSpecifier(a,r,t,i))}return e}parseExportSpecifier(t,e,s,i){return this.eatContextual(89)?t.exported=this.parseModuleExportName():e?t.exported=qt(t.local):t.exported||(t.exported=Ht(t.local)),this.finishNode(t,"ExportSpecifier")}parseModuleExportName(){if(this.match(125)){const t=this.parseStringLiteral(this.state.value),e=t.value.match(Te);return e&&this.raise(t.start,f.ModuleExportNameHasLoneSurrogate,e[0].charCodeAt(0).toString(16)),t}return this.parseIdentifier(!0)}parseImport(t){if(t.specifiers=[],!this.match(125)){const e=!this.maybeParseDefaultImportSpecifier(t)||this.eat(12),s=e&&this.maybeParseStarImportSpecifier(t);e&&!s&&this.parseNamedImportSpecifiers(t),this.expectContextual(93)}t.source=this.parseImportSource();const e=this.maybeParseImportAssertions();if(e)t.assertions=e;else{const e=this.maybeParseModuleAttributes();e&&(t.attributes=e)}return this.semicolon(),this.finishNode(t,"ImportDeclaration")}parseImportSource(){return this.match(125)||this.unexpected(),this.parseExprAtom()}shouldParseDefaultImport(t){return _(this.state.type)}parseImportSpecifierLocal(t,e,s,i){e.local=this.parseIdentifier(),this.checkLVal(e.local,i,9),t.specifiers.push(this.finishNode(e,s))}parseAssertEntries(){const t=[],e=new Set;do{if(this.match(8))break;const s=this.startNode(),i=this.state.value;if(e.has(i)&&this.raise(this.state.start,f.ModuleAttributesWithDuplicateKeys,i),e.add(i),this.match(125)?s.key=this.parseStringLiteral(i):s.key=this.parseIdentifier(!0),this.expect(14),!this.match(125))throw this.unexpected(this.state.start,f.ModuleAttributeInvalidValue);s.value=this.parseStringLiteral(this.state.value),this.finishNode(s,"ImportAttribute"),t.push(s)}while(this.eat(12));return t}maybeParseModuleAttributes(){if(!this.match(72)||this.hasPrecedingLineBreak())return this.hasPlugin("moduleAttributes")?[]:null;this.expectPlugin("moduleAttributes"),this.next();const t=[],e=new Set;do{const s=this.startNode();if(s.key=this.parseIdentifier(!0),"type"!==s.key.name&&this.raise(s.key.start,f.ModuleAttributeDifferentFromType,s.key.name),e.has(s.key.name)&&this.raise(s.key.start,f.ModuleAttributesWithDuplicateKeys,s.key.name),e.add(s.key.name),this.expect(14),!this.match(125))throw this.unexpected(this.state.start,f.ModuleAttributeInvalidValue);s.value=this.parseStringLiteral(this.state.value),this.finishNode(s,"ImportAttribute"),t.pu
1sh(s)}while(this.eat(12));return t}maybeParseImportAssertions(){if(!this.isContextual(90)||this.hasPrecedingLineBreak())return this.hasPlugin("importAssertions")?[]:null;this.expectPlugin("importAssertions"),this.next(),this.eat(5);const t=this.parseAssertEntries();return this.eat(8),t}maybeParseDefaultImportSpecifier(t){return!!this.shouldParseDefaultImport(t)&&(this.parseImportSpecifierLocal(t,this.startNode(),"ImportDefaultSpecifier","default import specifier"),!0)}maybeParseStarImportSpecifier(t){if(this.match(51)){const e=this.startNode();return this.next(),this.expectContextual(89),this.parseImportSpecifierLocal(t,e,"ImportNamespaceSpecifier","import namespace specifier"),!0}return!1}parseNamedImportSpecifiers(t){let e=!0;for(this.expect(5);!this.eat(8);){if(e)e=!1;else{if(this.eat(14))throw this.raise(this.state.start,f.DestructureNamedImport);if(this.expect(12),this.eat(8))break}const s=this.startNode(),i=this.match(125),r=this.isContextual(122);s.imported=this.parseModuleExportName();const a=this.parseImportSpecifier(s,i,"type"===t.importKind||"typeof"===t.importKind,r);t.specifiers.push(a)}}parseImportSpecifier(t,e,s,i){if(this.eatContextual(89))t.local=this.parseIdentifier();else{const{imported:s}=t;if(e)throw this.raise(t.start,f.ImportBindingIsString,s.value);this.checkReservedWord(s.name,t.start,!0,!0),t.local||(t.local=Ht(s))}return this.checkLVal(t.local,"import specifier",9),this.finishNode(t,"ImportSpecifier")}isThisParam(t){return"Identifier"===t.type&&"this"===t.name}}{constructor(t,e){super(t=function(t){const e={};for(const s of Object.keys(fe))e[s]=t&&null!=t[s]?t[s]:fe[s];return e}(t),e),this.options=t,this.initializeScopes(),this.plugins=function(t){const e=new Map;for(const s of t){const[t,i]=Array.isArray(s)?s:[s,{}];e.has(t)||e.set(t,i||{})}return e}(this.options.plugins),this.filename=t.sourceFilename}getScopeHandler(){return At}parse(){this.enterInitialScopes();const t=this.startNode(),e=this.startNode();return this.nextToken(),t.errors=null,this.parseTopLevel(t,e),t.errors=this.state.errors,t}}const Ee=function(t){const e={};for(const s of Object.keys(t))e[s]=G(t[s]);return e}(j);function we(t,e){let s=Ae;return null!=t&&t.plugins&&(!function(t){if(he(t,"decorators")){if(he(t,"decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");const e=pe(t,"decorators","decoratorsBeforeExport");if(null==e)throw new Error("The 'decorators' plugin requires a 'decoratorsBeforeExport' option, whose value must be a boolean. If you are migrating from Babylon/Babel 6 or want to use the old decorators proposal, you should use the 'decorators-legacy' plugin instead of 'decorators'.");if("boolean"!==typeof e)throw new Error("'decoratorsBeforeExport' must be a boolean.")}if(he(t,"flow")&&he(t,"typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(he(t,"placeholders")&&he(t,"v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(he(t,"pipelineOperator")){const e=pe(t,"pipelineOperator","proposal");if(!ce.includes(e)){const t=ce.map((t=>`"${t}"`)).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${t}.`)}const s=he(t,["recordAndTuple",{syntaxType:"hash"}]);if("hack"===e){if(he(t,"placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(he(t,"v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");const e=pe(t,"pipelineOperator","topicToken");if(!le.includes(e)){const t=le.map((t=>`"${t}"`)).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${t}.`)}if("#"===e&&s)throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "hack", topicToken: "#" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.')}else if("smart"===e&&s)throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "smart" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.')}if(he(t,"moduleAttributes")){if(he(t,"importAssertions"))throw new Error("Cannot combine importAssertions and moduleAttributes plugins.");if("may-2020"!==pe(t,"moduleAttributes","version"))throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.")}if(he(t,"recordAndTuple")&&!ue.includes(pe(t,"recordAndTuple","syntaxType")))throw new Error("'recordAndTuple' requires 'syntaxType' option whose value should be one of: "+ue.map((t=>`'${t}'`)).join(", "));if(he(t,"asyncDoExpressions")&&!he(t,"doExpressions")){const t=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw t.missingPlugins="doExpressions",t}}(t.plugins),s=function(t){const e=me.filter((e=>he(t,e))),s=e.join("/");let i=Se[s];if(!i){i=Ae;for(const t of e)i=de[t](i);
vendor: 613 bytes, line 1
1Se[s]=i}return i}(t.plugins)),new s(t,e)}const Se={};e.parse=function(t,e){var s;if("unambiguous"!==(null==(s=e)?void 0:s.sourceType))return we(e,t).parse();e=Object.assign({},e);try{e.sourceType="module";const s=we(e,t),r=s.parse();if(s.sawUnambiguousESM)return r;if(s.ambiguousScriptDifferentAst)try{return e.sourceType="script",we(e,t).parse()}catch(i){}else r.program.sourceType="script";return r}catch(r){try{return e.sourceType="script",we(e,t).parse()}catch(a){}throw r}},e.parseExpression=function(t,e){const s=we(e,t);return s.options.strictMode&&(s.state.strict=!0),s.getExpression()},e.tokTypes=Ee}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.