| 25 | `):o=String.fromCharCode(i),++this.state.curLine,this.state.lineStart=this.state.pos,o},n.jsxReadString=function(a){for(var i="",o=++this.state.pos;;){if(this.state.pos>=this.length)throw this.raise(oe.UnterminatedString,this.state.startLoc);var u=this.input.charCodeAt(this.state.pos);if(u===a)break;u===38?(i+=this.input.slice(o,this.state.pos),i+=this.jsxReadEntity(),o=this.state.pos):cu(u)?(i+=this.input.slice(o,this.state.pos),i+=this.jsxReadNewLine(!1),o=this.state.pos):++this.state.pos}i+=this.input.slice(o,this.state.pos++),this.finishToken(133,i)},n.jsxReadEntity=function(){var a=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;var i=10;this.codePointAtPos(this.state.pos)===120&&(i=16,++this.state.pos);var o=this.readInt(i,void 0,!1,"bail");if(o!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(o)}else{for(var u=0,d=!1;u++<10&&this.state.pos<this.length&&!(d=this.codePointAtPos(this.state.pos)==59);)++this.state.pos;if(d){var l=this.input.slice(a,this.state.pos),c=R1e[l];if(++this.state.pos,c)return c}}return this.state.pos=a,"&"},n.jsxReadWord=function(){var a,i=this.state.pos;do a=this.input.charCodeAt(++this.state.pos);while(Nn(a)||a===45);this.finishToken(140,this.input.slice(i,this.state.pos))},n.jsxParseIdentifier=function(){var a=this.startNode();return this.match(140)?a.name=this.state.value:A1(this.state.type)?a.name=Yn(this.state.type):this.unexpected(),this.next(),this.finishNode(a,"JSXIdentifier")},n.jsxParseNamespacedName=function(){var a=this.state.startLoc,i=this.jsxParseIdentifier();if(!this.eat(14))return i;var o=this.startNodeAt(a);return o.namespace=i,o.name=this.jsxParseIdentifier(),this.finishNode(o,"JSXNamespacedName")},n.jsxParseElementName=function(){var a=this.state.startLoc,i=this.jsxParseNamespacedName();if(i.type==="JSXNamespacedName")return i;for(;this.eat(16);){var o=this.startNodeAt(a);o.object=i,o.property=this.jsxParseIdentifier(),i=this.finishNode(o,"JSXMemberExpression")}return i},n.jsxParseAttributeValue=function(){var a;switch(this.state.type){case 5:return a=this.startNode(),this.setContext(Gr.brace),this.next(),a=this.jsxParseExpressionContainer(a,Gr.j_oTag),a.expression.type==="JSXEmptyExpression"&&this.raise(Ps.AttributeIsEmpty,a),a;case 142:case 133:return this.parseExprAtom();default:throw this.raise(Ps.UnsupportedJsxValue,this.state.startLoc)}},n.jsxParseEmptyExpression=function(){var a=this.startNodeAt(this.state.lastTokEndLoc);return this.finishNodeAt(a,"JSXEmptyExpression",this.state.startLoc)},n.jsxParseSpreadChild=function(a){return this.next(),a.expression=this.parseExpression(),this.setContext(Gr.j_expr),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(a,"JSXSpreadChild")},n.jsxParseExpressionContainer=function(a,i){if(this.match(8))a.expression=this.jsxParseEmptyExpression();else{var o=this.parseExpression();a.expression=o}return this.setContext(i),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(a,"JSXExpressionContainer")},n.jsxParseAttribute=function(){var a=this.startNode();return this.match(5)?(this.setContext(Gr.brace),this.next(),this.expect(21),a.argument=this.parseMaybeAssignAllowIn(),this.setContext(Gr.j_oTag),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(a,"JSXSpreadAttribute")):(a.name=this.jsxParseNamespacedName(),a.value=this.eat(29)?this.jsxParseAttributeValue():null,this.finishNode(a,"JSXAttribute"))},n.jsxParseOpeningElementAt=function(a){var i=this.startNodeAt(a);return this.eat(143)?this.finishNode(i,"JSXOpeningFragment"):(i.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(i))},n.jsxParseOpeningElementAfterName=function(a){for(var i=[];!this.match(56)&&!this.match(143);)i.push(this.jsxParseAttribute());return a.attributes=i,a.selfClosing=this.eat(56),this.expect(143),this.finishNode(a,"JSXOpeningElement")},n.jsxParseClosingElementAt=function(a){var i=this.startNodeAt(a);return this.eat(143)?this.finishNode(i,"JSXClosingFragment"):(i.name=this.jsxParseElementName(),this.expect(143),this.finishNode(i,"JSXClosingElement"))},n.jsxParseElementAt=function(a){var i=this.startNodeAt(a),o=[],u=this.jsxParseOpeningElementAt(a),d=null;if(!u.selfClosing){e:for(;;)switch(this.state.type){case 142:if(a=this.state.startLoc,this.next(),this.eat(56)){d=this.jsxParseClosingElementAt(a);break e}o.push(this.jsxParseElementAt(a));break;case 141:o.push(this.parseExprAtom());break;case 5:{var l=this.startNode();this.setContext(Gr.brace),this.next(),this.match(21)?o.push(this.jsxParseSpreadChild(l)):o.push(this.jsxParseExpressionContainer(l,Gr.j_expr));break}default:this.unexpected()}Jn(u)&&!Jn(d)&&d!==null?this.raise(Ps.MissingClosingTagFragment,d):!Jn(u)&&Jn(d)?this.raise(Ps.MissingClosingTagElement,d,{openingTagName:Ni(u.name)}):!Jn(u)&&!Jn(d)&&Ni(d.name)!==Ni(u.name)&&this.raise(Ps.MissingClosingTagElement,d,{openingTagName:Ni(u.name)})}if(Jn(u)?(i.openingFragment=u,i.closingFragment=d):(i.openingElement=u,i.closingElement=d),i.children=o,this.match(47))throw this.raise(Ps.UnwrappedAdjacentJSXElements,this.state.startLoc);return Jn(u)?this.finishNode(i,"JSXFragment"):this.finishNode(i,"JSXElement")},n.jsxParseElement=function(){var a=this.state.startLoc;return this.next(),this.jsxParseElementAt(a)},n.setContext=function(a){var i=this.state.context;i[i.length-1]=a},n.parseExprAtom=function(a){return this.match(141)?this.parseLiteral(this.state.value,"JSXText"):this.match(142)?this.jsxParseElement():this.match(47)&&this.input.charCodeAt(this.state.pos)!==33?(this.replaceToken(142),this.jsxParseElement()):r.prototype.parseExprAtom.call(this,a)},n.skipSpace=function(){var a=this.curContext();a.preserveSpace||r.prototype.skipSpace.call(this)},n.getTokenFromCode=function(a){var i=this.curContext();if(i===Gr.j_expr){this.jsxReadToken();return}if(i===Gr.j_oTag||i===Gr.j_cTag){if(Ma(a)){this.jsxReadWord();return}if(a===62){++this.state.pos,this.finishToken(143);return}if((a===34||a===39)&&i===Gr.j_oTag){this.jsxReadString(a);return}}if(a===60&&this.state.canStartJSXElement&&this.input.charCodeAt(this.state.pos+1)!==33){++this.state.pos,this.finishToken(142);return}r.prototype.getTokenFromCode.call(this,a)},n.updateContext=function(a){var i=this.state,o=i.context,u=i.type;if(u===56&&a===142)o.splice(-2,2,Gr.j_cTag),this.state.canStartJSXElement=!1;else if(u===142)o.push(Gr.j_oTag);else if(u===143){var d=o[o.length-1];d===Gr.j_oTag&&a===56||d===Gr.j_cTag?(o.pop(),this.state.canStartJSXElement=o[o.length-1]===Gr.j_expr):(this.setContext(Gr.j_expr),this.state.canStartJSXElement=!0)}else this.state.canStartJSXElement=Upe(u)},Qe(t)}(e)},w1e=function(e){nt(r,e);function r(){for(var t,n=arguments.length,s=new Array(n),a=0;a<n;a++)s[a]=arguments[a];return t=e.call.apply(e,[this].concat(s))||this,t.tsNames=new Map,t}return Qe(r)}(b1),S1e=function(e){nt(r,e);function r(){for(var n,s=arguments.length,a=new Array(s),i=0;i<s;i++)a[i]=arguments[i];return n=e.call.apply(e,[this].concat(a))||this,n.importsStack=[],n}var t=r.prototype;return t.createScope=function(s){return this.importsStack.push(new Set),new w1e(s)},t.enter=function(s){s==Fr.TS_MODULE&&this.importsStack.push(new Set),e.prototype.enter.call(this,s)},t.exit=function(){var s=e.prototype.exit.call(this);return s==Fr.TS_MODULE&&this.importsStack.pop(),s},t.hasImport=function(s,a){var i=this.importsStack.length;if(this.importsStack[i-1].has(s))return!0;if(!a&&i>1){for(var o=0;o<i-1;o++)if(this.importsStack[o].has(s))return!0}return!1},t.declareName=function(s,a,i){if(a&or.FLAG_TS_IMPORT){this.hasImport(s,!0)&&this.parser.raise(oe.VarRedeclaration,i,{identifierName:s}),this.importsStack[this.importsStack.length-1].add(s);return}var o=this.currentScope(),u=o.tsNames.get(s)||0;if(a&or.FLAG_TS_EXPORT_ONLY){this.maybeExportDefined(o,s),o.tsNames.set(s,u|16);return}e.prototype.declareName.call(this,s,a,i),a&or.KIND_TYPE&&(a&or.KIND_VALUE||(this.checkRedeclarationInScope(o,s,a,i),this.maybeExportDefined(o,s)),u=u|1),a&or.FLAG_TS_ENUM&&(u=u|2),a&or.FLAG_TS_CONST_ENUM&&(u=u|4),a&or.FLAG_CLASS&&(u=u|8),u&&o.tsNames.set(s,u)},t.isRedeclaredInScope=function(s,a,i){var o=s.tsNames.get(a);if((o&2)>0){if(i&or.FLAG_TS_ENUM){var u=!!(i&or.FLAG_TS_CONST_ENUM),d=(o&4)>0;return u!==d}return!0}return i&or.FLAG_CLASS&&(o&8)>0?s.names.get(a)&Ga.Lexical?!!(i&or.KIND_VALUE):!1:i&or.KIND_TYPE&&(o&1)>0?!0:e.prototype.isRedeclaredInScope.call(this,s,a,i)},t.checkLocalExport=function(s){var a=s.name;if(!this.hasImport(a)){for(var i=this.scopeStack.length,o=i-1;o>=0;o--){var u=this.scopeStack[o],d=u.tsNames.get(a);if((d&1)>0||(d&16)>0)return}e.prototype.checkLocalExport.call(this,s)}},Qe(r)}(R1),j1e=function(r,t){return hasOwnProperty.call(r,t)&&r[t]},T1e=function e(r){return r.type==="ParenthesizedExpression"?e(r.expression):r},Qn={ALLOW_EMPTY:1,IS_FUNCTION_PARAMS:2,IS_CONSTRUCTOR_PARAMS:4},P1e=function(e){nt(r,e);function r(){return e.apply(this,arguments)||this}var t=r.prototype;return t.toAssignable=function(s,a){var i,o;a===void 0&&(a=!1);var u=void 0;switch((s.type==="ParenthesizedExpression"||(i=s.extra)!=null&&i.parenthesized)&&(u=T1e(s),a?u.type==="Identifier"?this.expressionScope.recordArrowParameterBindingError(oe.InvalidParenthesizedAssignment,s):u.type!=="MemberExpression"&&!this.isOptionalMemberExpression(u)&&this.raise(oe.InvalidParenthesizedAssignment,s):this.raise(oe.InvalidParenthesizedAssignment,s)),s.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":s.type="ObjectPattern";for(var d=0,l=s.properties.length,c=l-1;d<l;d++){var x,f=s.properties[d],D=d===c;this.toAssignableObjectExpressionProp(f,D,a),D&&f.type==="RestElement"&&(x=s.extra)!=null&&x.trailingCommaLoc&&this.raise(oe.RestTrailingComma,s.extra.trailingCommaLoc)}break;case"ObjectProperty":{var g=s.key,p=s.value;this.isPrivateName(g)&&this.classScope.usePrivateName(this.getPrivateNameSV(g),g.loc.start),this.toAssignable(p,a);break}case"SpreadElement":throw new Error("Internal @babel/parser error (this is a bug, please report it). SpreadElement should be converted by .toAssignable's caller.");case"ArrayExpression":s.type="ArrayPattern",this.toAssignableList(s.elements,(o=s.extra)==null?void 0:o.trailingCommaLoc,a);break;case"AssignmentExpression":s.operator!=="="&&this.raise(oe.MissingEqInAssignment,s.left.loc.end),s.type="AssignmentPattern",delete s.operator,this.toAssignable(s.left,a);break;case"ParenthesizedExpression":this.toAssignable(u,a);break}},t.toAssignableObjectExpressionProp=function(s,a,i){if(s.type==="ObjectMethod")this.raise(s.kind==="get"||s.kind==="set"?oe.PatternHasAccessor:oe.PatternHasMethod,s.key);else if(s.type==="SpreadElement"){s.type="RestElement";var o=s.argument;this.checkToRestConversion(o,!1),this.toAssignable(o,i),a||this.raise(oe.RestTrailingComma,s)}else this.toAssignable(s,i)},t.toAssignableList=function(s,a,i){for(var o=s.length-1,u=0;u<=o;u++){var d=s[u];if(d){if(d.type==="SpreadElement"){d.type="RestElement";var l=d.argument;this.checkToRestConversion(l,!0),this.toAssignable(l,i)}else this.toAssignable(d,i);d.type==="RestElement"&&(u<o?this.raise(oe.RestTrailingComma,d):a&&this.raise(oe.RestTrailingComma,a))}}},t.isAssignable=function(s,a){var i=this;switch(s.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":return!0;case"ObjectExpression":{var o=s.properties.length-1;return s.properties.every(function(u,d){return u.type!=="ObjectMethod"&&(d===o||u.type!=="SpreadElement")&&i.isAssignable(u)})}case"ObjectProperty":return this.isAssignable(s.value);case"SpreadElement":return this.isAssignable(s.argument);case"ArrayExpression":return s.elements.every(function(u){return u===null||i.isAssignable(u)});case"AssignmentExpression":return s.operator==="=";case"ParenthesizedExpression":return this.isAssignable(s.expression);case"MemberExpression":case"OptionalMemberExpression":return!a;default:return!1}},t.toReferencedList=function(s,a){return s},t.toReferencedListDeep=function(s,a){this.toReferencedList(s,a);for(var i=0;i<s.length;i++){var o=s[i];o?.type==="ArrayExpression"&&this.toReferencedListDeep(o.elements)}},t.parseSpread=function(s){var a=this.startNode();return this.next(),a.argument=this.parseMaybeAssignAllowIn(s,void 0),this.finishNode(a,"SpreadElement")},t.parseRestBinding=function(){var s=this.startNode();return this.next(),s.argument=this.parseBindingAtom(),this.finishNode(s,"RestElement")},t.parseBindingAtom=function(){switch(this.state.type){case 0:{var s=this.startNode();return this.next(),s.elements=this.parseBindingList(3,93,Qn.ALLOW_EMPTY),this.finishNode(s,"ArrayPattern")}case 5:return this.parseObjectLike(8,!0)}return this.parseIdentifier()},t.parseBindingList=function(s,a,i){for(var o=i&Qn.ALLOW_EMPTY,u=[],d=!0;!this.eat(s);)if(d?d=!1:this.expect(12),o&&this.match(12))u.push(null);else{if(this.eat(s))break;if(this.match(21)){if(u.push(this.parseAssignableListItemTypes(this.parseRestBinding(),i)),!this.checkCommaAfterRest(a)){this.expect(s);break}}else{var l=[];for(this.match(26)&&this.hasPlugin("decorators")&&this.raise(oe.UnsupportedParameterDecorator,this.state.startLoc);this.match(26);)l.push(this.parseDecorator());u.push(this.parseAssignableListItem(i,l))}}return u},t.parseBindingRestProperty=function(s){return this.next(),s.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(s,"RestElement")},t.parseBindingProperty=function(){var s=this.startNode(),a=this.state,i=a.type,o=a.startLoc;return i===21?this.parseBindingRestProperty(s):(i===138?(this.expectPlugin("destructuringPrivate",o),this.classScope.usePrivateName(this.state.value,o),s.key=this.parsePrivateName()):this.parsePropertyName(s),s.method=!1,this.parseObjPropValue(s,o,!1,!1,!0,!1))},t.parseAssignableListItem=function(s,a){var i=this.parseMaybeDefault();this.parseAssignableListItemTypes(i,s);var o=this.parseMaybeDefault(i.loc.start,i);return a.length&&(i.decorators=a),o},t.parseAssignableListItemTypes=function(s,a){return s},t.parseMaybeDefault=function(s,a){var i,o;if((i=s)!=null||(s=this.state.startLoc),a=(o=a)!=null?o:this.parseBindingAtom(),!this.eat(29))return a;var u=this.startNodeAt(s);return u.left=a,u.right=this.parseMaybeAssignAllowIn(),this.finishNode(u,"AssignmentPattern")},t.isValidLVal=function(s,a,i){return j1e({AssignmentPattern:"left",RestElement:"argument",ObjectProperty:"value",ParenthesizedExpression:"expression",ArrayPattern:"elements",ObjectPattern:"properties"},s)},t.isOptionalMemberExpression=function(s){return s.type==="OptionalMemberExpression"},t.checkLVal=function(s,a){var i,o=a.in,u=a.binding,d=u===void 0?or.TYPE_NONE:u,l=a.checkClashes,c=l===void 0?!1:l,x=a.strictModeChanged,f=x===void 0?!1:x,D=a.hasParenthesizedAncestor,g=D===void 0?!1:D,p=s.type;if(!this.isObjectMethod(s)){var F=this.isOptionalMemberExpression(s);if(F||p==="MemberExpression"){F&&(this.expectPlugin("optionalChainingAssign",s.loc.start),o.type!=="AssignmentExpression"&&this.raise(oe.InvalidLhsOptionalChaining,s,{ancestor:o})),d!==or.TYPE_NONE&&this.raise(oe.InvalidPropertyBindingPattern,s);return}if(p==="Identifier"){this.checkIdentifier(s,d,f);var m=s,E=m.name;c&&(c.has(E)?this.raise(oe.ParamDupe,s):c.add(E));return}var h=this.isValidLVal(p,!(g||(i=s.extra)!=null&&i.parenthesized)&&o.type==="AssignmentExpression",d);if(h!==!0){if(h===!1){var v=d===or.TYPE_NONE?oe.InvalidLhs:oe.InvalidLhsBinding;this.raise(v,s,{ancestor:o});return}for(var A=Array.isArray(h)?h:[h,p==="ParenthesizedExpression"],C=A[0],w=A[1],B=p==="ArrayPattern"||p==="ObjectPattern"?{type:p}:o,j=0,S=[].concat(s[C]);j<S.length;j++){var T=S[j];T&&this.checkLVal(T,{in:B,binding:d,checkClashes:c,strictModeChanged:f,hasParenthesizedAncestor:w})}}}},t.checkIdentifier=function(s,a,i){i===void 0&&(i=!1),this.state.strict&&(i?ER(s.name,this.inModule):hR(s.name))&&(a===or.TYPE_NONE?this.raise(oe.StrictEvalArguments,s,{referenceName:s.name}):this.raise(oe.StrictEvalArgumentsBinding,s,{bindingName:s.name})),a&or.FLAG_NO_LET_IN_LEXICAL&&s.name==="let"&&this.raise(oe.LetInLexicalBinding,s),a&or.TYPE_NONE||this.declareNameFromIdentifier(s,a)},t.declareNameFromIdentifier=function(s,a){this.scope.declareName(s.name,a,s.loc.start)},t.checkToRestConversion=function(s,a){switch(s.type){case"ParenthesizedExpression":this.checkToRestConversion(s.expression,a);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(a)break;default:this.raise(oe.InvalidRestAssignmentPattern,s)}},t.checkCommaAfterRest=function(s){return this.match(12)?(this.raise(this.lookaheadCharCode()===s?oe.RestTrailingComma:oe.ElementAfterRest,this.state.startLoc),!0):!1},Qe(r)}(y1e),j9,I1e=function(r,t){return hasOwnProperty.call(r,t)&&r[t]};function k1e(e){if(e==null)throw new Error("Unexpected "+e+" value.");return e}function T9(e){if(!e)throw new Error("Assert fail")}var rr=un(j9||(j9=le(["typescript"])))({AbstractMethodHasImplementation:function(r){var t=r.methodName;return"Method '"+t+"' cannot have an implementation because it is marked abstract."},AbstractPropertyHasInitializer:function(r){var t=r.propertyName;return"Property '"+t+"' 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.",AccessorCannotBeOptional:"An 'accessor' property cannot be declared optional.",ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference:"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:function(r){var t=r.kind;return"'declare' is not allowed in "+t+"ters."},DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:function(r){return r.modifier,"Accessibility modifier already seen."},DuplicateModifier:function(r){var t=r.modifier;return"Duplicate modifier: '"+t+"'."},EmptyHeritageClauseType:function(r){var t=r.token;return"'"+t+"' list cannot be empty."},EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ImportAliasHasImportType:"An import alias can not use 'import type'.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` modifier",IncompatibleModifiers:function(r){var t=r.modifiers;return"'"+t[0]+"' modifier cannot be used with '"+t[1]+"' modifier."},IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:function(r){var t=r.modifier;return"Index signatures cannot have an accessibility modifier ('"+t+"')."},IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier.",IndexSignatureHasOverride:"'override' modifier cannot appear on an index signature.",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier.",InitializerNotAllowedInAmbientContext:"Initializers are not allowed in ambient contexts.",InvalidModifierOnTypeMember:function(r){var t=r.modifier;return"'"+t+"' modifier cannot appear on a type member."},InvalidModifierOnTypeParameter:function(r){var t=r.modifier;return"'"+t+"' modifier cannot appear on a type parameter."},InvalidModifierOnTypeParameterPositions:function(r){var t=r.modifier;return"'"+t+"' modifier can only appear on a type parameter of a class, interface or type alias."},InvalidModifiersOrder:function(r){var t=r.orderedModifiers;return"'"+t[0]+"' modifier must precede '"+t[1]+"' modifier."},InvalidPropertyAccessAfterInstantiationExpression:"Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MissingInterfaceName:"'interface' declarations must be followed by an identifier.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifer:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:function(r){var t=r.modifier;return"Private elements cannot have an accessibility modifier ('"+t+"')."},ReadonlyForMethodSignature:"'readonly' modifier can only appear on a property declaration or index signature.",ReservedArrowTypeParam:"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `<T,>() => ...`.",ReservedTypeAssertion:"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",SetAccesorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccesorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccesorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:function(r){var t=r.typeParameterName;return"Single type parameter "+t+" should have a trailing comma. Example usage: <"+t+",>."},StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TupleOptionalAfterType:"A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:"A type-only import can specify a default import or named bindings, but not both.",TypeModifierIsUsedInTypeExports:"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.",TypeModifierIsUsedInTypeImports:"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.",UnexpectedParameterModifier:"A parameter property is only allowed in a constructor implementation.",UnexpectedReadonly:"'readonly' type modifier is only permitted on array and tuple literal types.",UnexpectedTypeAnnotation:"Did not expect a type annotation here.",UnexpectedTypeCastInParameter:"Unexpected type cast in parameter position.",UnsupportedImportTypeArgument:"Argument in a type import must be a string literal.",UnsupportedParameterPropertyKind:"A parameter property may not be declared using a binding pattern.",UnsupportedSignatureParameterKind:function(r){var t=r.type;return"Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got "+t+"."}});function O1e(e){switch(e){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}function P9(e){return e==="private"||e==="public"||e==="protected"}function _1e(e){return e==="in"||e==="out"}var N1e=function(e){return function(r){nt(t,r);function t(){for(var s,a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return s=r.call.apply(r,[this].concat(i))||this,s.tsParseInOutModifiers=s.tsParseModifiers.bind(Fo(s),{allowedModifiers:["in","out"],disallowedModifiers:["const","public","private","protected","readonly","declare","abstract","override"],errorTemplate:rr.InvalidModifierOnTypeParameter}),s.tsParseConstModifier=s.tsParseModifiers.bind(Fo(s),{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:rr.InvalidModifierOnTypeParameterPositions}),s.tsParseInOutConstModifiers=s.tsParseModifiers.bind(Fo(s),{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:rr.InvalidModifierOnTypeParameter}),s}var n=t.prototype;return n.getScopeHandler=function(){return S1e},n.tsIsIdentifier=function(){return Nr(this.state.type)},n.tsTokenCanFollowModifier=function(){return(this.match(0)||this.match(5)||this.match(55)||this.match(21)||this.match(138)||this.isLiteralPropertyName())&&!this.hasPrecedingLineBreak()},n.tsNextTokenCanFollowModifier=function(){return this.next(),this.tsTokenCanFollowModifier()},n.tsParseModifier=function(a,i){if(!(!Nr(this.state.type)&&this.state.type!==58&&this.state.type!==75)){var o=this.state.value;if(a.indexOf(o)!==-1){if(i&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return o}}},n.tsParseModifiers=function(a,i){for(var o=this,u=a.allowedModifiers,d=a.disallowedModifiers,l=a.stopOnStartOfClassStaticBlock,c=a.errorTemplate,x=c===void 0?rr.InvalidModifierOnTypeMember:c,f=function(m,E,h,v){E===h&&i[v]&&o.raise(rr.InvalidModifiersOrder,m,{orderedModifiers:[h,v]})},D=function(m,E,h,v){(i[h]&&E===v||i[v]&&E===h)&&o.raise(rr.IncompatibleModifiers,m,{modifiers:[h,v]})};;){var g=this.state.startLoc,p=this.tsParseModifier(u.concat(d??[]),l);if(!p)break;P9(p)?i.accessibility?this.raise(rr.DuplicateAccessibilityModifier,g,{modifier:p}):(f(g,p,p,"override"),f(g,p,p,"static"),f(g,p,p,"readonly"),i.accessibility=p):_1e(p)?(i[p]&&this.raise(rr.DuplicateModifier,g,{modifier:p}),i[p]=!0,f(g,p,"in","out")):(hasOwnProperty.call(i,p)?this.raise(rr.DuplicateModifier,g,{modifier:p}):(f(g,p,"static","readonly"),f(g,p,"static","override"),f(g,p,"override","readonly"),f(g,p,"abstract","override"),D(g,p,"declare","override"),D(g,p,"static","abstract")),i[p]=!0),d!=null&&d.includes(p)&&this.raise(x,g,{modifier:p})}},n.tsIsListTerminator=function(a){switch(a){case"EnumMembers":case"TypeMembers":return this.match(8);case"HeritageClauseElement":return this.match(5);case"TupleElementTypes":return this.match(3);case"TypeParametersOrArguments":return this.match(48)}},n.tsParseList=function(a,i){for(var o=[];!this.tsIsListTerminator(a);)o.push(i());return o},n.tsParseDelimitedList=function(a,i,o){return k1e(this.tsParseDelimitedListWorker(a,i,!0,o))},n.tsParseDelimitedListWorker=function(a,i,o,u){for(var d=[],l=-1;!this.tsIsListTerminator(a);){l=-1;var c=i();if(c==null)return;if(d.push(c),this.eat(12)){l=this.state.lastTokStartLoc.index;continue}if(this.tsIsListTerminator(a))break;o&&this.expect(12);return}return u&&(u.value=l),d},n.tsParseBracketedList=function(a,i,o,u,d){u||(o?this.expect(0):this.expect(47));var l=this.tsParseDelimitedList(a,i,d);return o?this.expect(3):this.expect(48),l},n.tsParseImportType=function(){var a=this.startNode();return this.expect(83),this.expect(10),this.match(133)||this.raise(rr.UnsupportedImportTypeArgument,this.state.startLoc),a.argument=r.prototype.parseExprAtom.call(this),(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))&&(a.options=null),this.eat(12)&&(this.expectImportAttributesPlugin(),this.match(11)||(a.options=r.prototype.parseMaybeAssignAllowIn.call(this),this.eat(12))),this.expect(11),this.eat(16)&&(a.qualifier=this.tsParseEntityName()),this.match(47)&&(a.typeParameters=this.tsParseTypeArguments()),this.finishNode(a,"TSImportType")},n.tsParseEntityName=function(a){a===void 0&&(a=!0);for(var i=this.parseIdentifier(a);this.eat(16);){var o=this.startNodeAtNode(i);o.left=i,o.right=this.parseIdentifier(a),i=this.finishNode(o,"TSQualifiedName")}return i},n.tsParseTypeReference=function(){var a=this.startNode();return a.typeName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(a.typeParameters=this.tsParseTypeArguments()),this.finishNode(a,"TSTypeReference")},n.tsParseThisTypePredicate=function(a){this.next();var i=this.startNodeAtNode(a);return i.parameterName=a,i.typeAnnotation=this.tsParseTypeAnnotation(!1),i.asserts=!1,this.finishNode(i,"TSTypePredicate")},n.tsParseThisTypeNode=function(){var a=this.startNode();return this.next(),this.finishNode(a,"TSThisType")},n.tsParseTypeQuery=function(){var a=this.startNode();return this.expect(87),this.match(83)?a.exprName=this.tsParseImportType():a.exprName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(a.typeParameters=this.tsParseTypeArguments()),this.finishNode(a,"TSTypeQuery")},n.tsParseTypeParameter=function(a){var i=this.startNode();return a(i),i.name=this.tsParseTypeParameterName(),i.constraint=this.tsEatThenParseType(81),i.default=this.tsEatThenParseType(29),this.finishNode(i,"TSTypeParameter")},n.tsTryParseTypeParameters=function(a){if(this.match(47))return this.tsParseTypeParameters(a)},n.tsParseTypeParameters=function(a){var i=this.startNode();this.match(47)||this.match(142)?this.next():this.unexpected();var o={value:-1};return i.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,a),!1,!0,o),i.params.length===0&&this.raise(rr.EmptyTypeParameters,i),o.value!==-1&&this.addExtra(i,"trailingComma",o.value),this.finishNode(i,"TSTypeParameterDeclaration")},n.tsFillSignature=function(a,i){var o=a===19,u="parameters",d="typeAnnotation";i.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),i[u]=this.tsParseBindingListForSignature(),o?i[d]=this.tsParseTypeOrTypePredicateAnnotation(a):this.match(a)&&(i[d]=this.tsParseTypeOrTypePredicateAnnotation(a))},n.tsParseBindingListForSignature=function(){for(var a=r.prototype.parseBindingList.call(this,11,41,Qn.IS_FUNCTION_PARAMS),i=0;i<a.length;i++){var o=a[i],u=o.type;(u==="AssignmentPattern"||u==="TSParameterProperty")&&this.raise(rr.UnsupportedSignatureParameterKind,o,{type:u})}return a},n.tsParseTypeMemberSemicolon=function(){!this.eat(12)&&!this.isLineTerminator()&&this.expect(13)},n.tsParseSignatureMember=function(a,i){return this.tsFillSignature(14,i),this.tsParseTypeMemberSemicolon(),this.finishNode(i,a)},n.tsIsUnambiguouslyIndexSignature=function(){return this.next(),Nr(this.state.type)?(this.next(),this.match(14)):!1},n.tsTryParseIndexSignature=function(a){if(this.match(0)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))){this.expect(0);var i=this.parseIdentifier();i.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(i),this.expect(3),a.parameters=[i];var o=this.tsTryParseTypeAnnotation();return o&&(a.typeAnnotation=o),this.tsParseTypeMemberSemicolon(),this.finishNode(a,"TSIndexSignature")}},n.tsParsePropertyOrMethodSignature=function(a,i){this.eat(17)&&(a.optional=!0);var o=a;if(this.match(10)||this.match(47)){i&&this.raise(rr.ReadonlyForMethodSignature,a);var u=o;u.kind&&this.match(47)&&this.raise(rr.AccesorCannotHaveTypeParameters,this.state.curPosition()),this.tsFillSignature(14,u),this.tsParseTypeMemberSemicolon();var d="parameters",l="typeAnnotation";if(u.kind==="get")u[d].length>0&&(this.raise(oe.BadGetterArity,this.state.curPosition()),this.isThisParam(u[d][0])&&this.raise(rr.AccesorCannotDeclareThisParameter,this.state.curPosition()));else if(u.kind==="set"){if(u[d].length!==1)this.raise(oe.BadSetterArity,this.state.curPosition());else{var c=u[d][0];this.isThisParam(c)&&this.raise(rr.AccesorCannotDeclareThisParameter,this.state.curPosition()),c.type==="Identifier"&&c.optional&&this.raise(rr.SetAccesorCannotHaveOptionalParameter,this.state.curPosition()),c.type==="RestElement"&&this.raise(rr.SetAccesorCannotHaveRestParameter,this.state.curPosition())}u[l]&&this.raise(rr.SetAccesorCannotHaveReturnType,u[l])}else u.kind="method";return this.finishNode(u,"TSMethodSignature")}else{var x=o;i&&(x.readonly=!0);var f=this.tsTryParseTypeAnnotation();return f&&(x.typeAnnotation=f),this.tsParseTypeMemberSemicolon(),this.finishNode(x,"TSPropertySignature")}},n.tsParseTypeMember=function(){var a=this.startNode();if(this.match(10)||this.match(47))return this.tsParseSignatureMember("TSCallSignatureDeclaration",a);if(this.match(77)){var i=this.startNode();return this.next(),this.match(10)||this.match(47)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",a):(a.key=this.createIdentifier(i,"new"),this.tsParsePropertyOrMethodSignature(a,!1))}this.tsParseModifiers({allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]},a);var o=this.tsTryParseIndexSignature(a);return o||(r.prototype.parsePropertyName.call(this,a),!a.computed&&a.key.type==="Identifier"&&(a.key.name==="get"||a.key.name==="set")&&this.tsTokenCanFollowModifier()&&(a.kind=a.key.name,r.prototype.parsePropertyName.call(this,a)),this.tsParsePropertyOrMethodSignature(a,!!a.readonly))},n.tsParseTypeLiteral=function(){var a=this.startNode();return a.members=this.tsParseObjectTypeMembers(),this.finishNode(a,"TSTypeLiteral")},n.tsParseObjectTypeMembers=function(){this.expect(5);var a=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(8),a},n.tsIsStartOfMappedType=function(){return this.next(),this.eat(53)?this.isContextual(122):(this.isContextual(122)&&this.next(),!this.match(0)||(this.next(),!this.tsIsIdentifier())?!1:(this.next(),this.match(58)))},n.tsParseMappedTypeParameter=function(){var a=this.startNode();return a.name=this.tsParseTypeParameterName(),a.constraint=this.tsExpectThenParseType(58),this.finishNode(a,"TSTypeParameter")},n.tsParseMappedType=function(){var a=this.startNode();return this.expect(5),this.match(53)?(a.readonly=this.state.value,this.next(),this.expectContextual(122)):this.eatContextual(122)&&(a.readonly=!0),this.expect(0),a.typeParameter=this.tsParseMappedTypeParameter(),a.nameType=this.eatContextual(93)?this.tsParseType():null,this.expect(3),this.match(53)?(a.optional=this.state.value,this.next(),this.expect(17)):this.eat(17)&&(a.optional=!0),a.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(8),this.finishNode(a,"TSMappedType")},n.tsParseTupleType=function(){var a=this,i=this.startNode();i.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);var o=!1;return i.elementTypes.forEach(function(u){var d=u.type;o&&d!=="TSRestType"&&d!=="TSOptionalType"&&!(d==="TSNamedTupleMember"&&u.optional)&&a.raise(rr.OptionalTypeBeforeRequired,u),o||(o=d==="TSNamedTupleMember"&&u.optional||d==="TSOptionalType")}),this.finishNode(i,"TSTupleType")},n.tsParseTupleElementType=function(){var a=this.state.startLoc,i=this.eat(21),o,u,d,l,c=ba(this.state.type),x=c?this.lookaheadCharCode():null;if(x===58)o=!0,d=!1,u=this.parseIdentifier(!0),this.expect(14),l=this.tsParseType();else if(x===63){d=!0;var f=this.state.startLoc,D=this.state.value,g=this.tsParseNonArrayType();this.lookaheadCharCode()===58?(o=!0,u=this.createIdentifier(this.startNodeAt(f),D),this.expect(17),this.expect(14),l=this.tsParseType()):(o=!1,l=g,this.expect(17))}else l=this.tsParseType(),d=this.eat(17),o=this.eat(14);if(o){var p;u?(p=this.startNodeAtNode(u),p.optional=d,p.label=u,p.elementType=l,this.eat(17)&&(p.optional=!0,this.raise(rr.TupleOptionalAfterType,this.state.lastTokStartLoc))):(p=this.startNodeAtNode(l),p.optional=d,this.raise(rr.InvalidTupleMemberLabel,l),p.label=l,p.elementType=this.tsParseType()),l=this.finishNode(p,"TSNamedTupleMember")}else if(d){var F=this.startNodeAtNode(l);F.typeAnnotation=l,l=this.finishNode(F,"TSOptionalType")}if(i){var m=this.startNodeAt(a);m.typeAnnotation=l,l=this.finishNode(m,"TSRestType")}return l},n.tsParseParenthesizedType=function(){var a=this.startNode();return this.expect(10),a.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(a,"TSParenthesizedType")},n.tsParseFunctionOrConstructorType=function(a,i){var o=this,u=this.startNode();return a==="TSConstructorType"&&(u.abstract=!!i,i&&this.next(),this.next()),this.tsInAllowConditionalTypesContext(function(){return o.tsFillSignature(19,u)}),this.finishNode(u,a)},n.tsParseLiteralTypeNode=function(){var a=this.startNode();switch(this.state.type){case 134:case 135:case 133:case 85:case 86:a.literal=r.prototype.parseExprAtom.call(this);break;default:this.unexpected()}return this.finishNode(a,"TSLiteralType")},n.tsParseTemplateLiteralType=function(){var a=this.startNode();return a.literal=r.prototype.parseTemplate.call(this,!1),this.finishNode(a,"TSLiteralType")},n.parseTemplateSubstitution=function(){return this.state.inType?this.tsParseType():r.prototype.parseTemplateSubstitution.call(this)},n.tsParseThisTypeOrThisTypePredicate=function(){var a=this.tsParseThisTypeNode();return this.isContextual(116)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(a):a},n.tsParseNonArrayType=function(){switch(this.state.type){case 133:case 134:case 135:case 85:case 86:return this.tsParseLiteralTypeNode();case 53:if(this.state.value==="-"){var a=this.startNode(),i=this.lookahead();return i.type!==134&&i.type!==135&&this.unexpected(),a.literal=this.parseMaybeUnary(),this.finishNode(a,"TSLiteralType")}break;case 78:return this.tsParseThisTypeOrThisTypePredicate();case 87:return this.tsParseTypeQuery();case 83:return this.tsParseImportType();case 5:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case 0:return this.tsParseTupleType();case 10:return this.tsParseParenthesizedType();case 25:case 24:return this.tsParseTemplateLiteralType();default:{var o=this.state.type;if(Nr(o)||o===88||o===84){var u=o===88?"TSVoidKeyword":o===84?"TSNullKeyword":O1e(this.state.value);if(u!==void 0&&this.lookaheadCharCode()!==46){var d=this.startNode();return this.next(),this.finishNode(d,u)}return this.tsParseTypeReference()}}}this.unexpected()},n.tsParseArrayTypeOrHigher=function(){for(var a=this.tsParseNonArrayType();!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(3)){var i=this.startNodeAtNode(a);i.elementType=a,this.expect(3),a=this.finishNode(i,"TSArrayType")}else{var o=this.startNodeAtNode(a);o.objectType=a,o.indexType=this.tsParseType(),this.expect(3),a=this.finishNode(o,"TSIndexedAccessType")}return a},n.tsParseTypeOperator=function(){var a=this.startNode(),i=this.state.value;return this.next(),a.operator=i,a.typeAnnotation=this.tsParseTypeOperatorOrHigher(),i==="readonly"&&this.tsCheckTypeAnnotationForReadOnly(a),this.finishNode(a,"TSTypeOperator")},n.tsCheckTypeAnnotationForReadOnly=function(a){switch(a.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(rr.UnexpectedReadonly,a)}},n.tsParseInferType=function(){var a=this,i=this.startNode();this.expectContextual(115);var o=this.startNode();return o.name=this.tsParseTypeParameterName(),o.constraint=this.tsTryParse(function(){return a.tsParseConstraintForInferType()}),i.typeParameter=this.finishNode(o,"TSTypeParameter"),this.finishNode(i,"TSInferType")},n.tsParseConstraintForInferType=function(){var a=this;if(this.eat(81)){var i=this.tsInDisallowConditionalTypesContext(function(){return a.tsParseType()});if(this.state.inDisallowConditionalTypesContext||!this.match(17))return i}},n.tsParseTypeOperatorOrHigher=function(){var a=this,i=zpe(this.state.type)&&!this.state.containsEsc;return i?this.tsParseTypeOperator():this.isContextual(115)?this.tsParseInferType():this.tsInAllowConditionalTypesContext(function(){return a.tsParseArrayTypeOrHigher()})},n.tsParseUnionOrIntersectionType=function(a,i,o){var u=this.startNode(),d=this.eat(o),l=[];do l.push(i());while(this.eat(o));return l.length===1&&!d?l[0]:(u.types=l,this.finishNode(u,a))},n.tsParseIntersectionTypeOrHigher=function(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),45)},n.tsParseUnionTypeOrHigher=function(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),43)},n.tsIsStartOfFunctionType=function(){return this.match(47)?!0:this.match(10)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))},n.tsSkipParameterStart=function(){if(Nr(this.state.type)||this.match(78))return this.next(),!0;if(this.match(5)){var a=this.state.errors,i=a.length;try{return this.parseObjectLike(8,!0),a.length===i}catch{return!1}}if(this.match(0)){this.next();var o=this.state.errors,u=o.length;try{return r.prototype.parseBindingList.call(this,3,93,Qn.ALLOW_EMPTY),o.length===u}catch{return!1}}return!1},n.tsIsUnambiguouslyStartOfFunctionType=function(){return this.next(),!!(this.match(11)||this.match(21)||this.tsSkipParameterStart()&&(this.match(14)||this.match(12)||this.match(17)||this.match(29)||this.match(11)&&(this.next(),this.match(19))))},n.tsParseTypeOrTypePredicateAnnotation=function(a){var i=this;return this.tsInType(function(){var o=i.startNode();i.expect(a);var u=i.startNode(),d=!!i.tsTryParse(i.tsParseTypePredicateAsserts.bind(i));if(d&&i.match(78)){var l=i.tsParseThisTypeOrThisTypePredicate();return l.type==="TSThisType"?(u.parameterName=l,u.asserts=!0,u.typeAnnotation=null,l=i.finishNode(u,"TSTypePredicate")):(i.resetStartLocationFromNode(l,u),l.asserts=!0),o.typeAnnotation=l,i.finishNode(o,"TSTypeAnnotation")}var c=i.tsIsIdentifier()&&i.tsTryParse(i.tsParseTypePredicatePrefix.bind(i));if(!c)return d?(u.parameterName=i.parseIdentifier(),u.asserts=d,u.typeAnnotation=null,o.typeAnnotation=i.finishNode(u,"TSTypePredicate"),i.finishNode(o,"TSTypeAnnotation")):i.tsParseTypeAnnotation(!1,o);var x=i.tsParseTypeAnnotation(!1);return u.parameterName=c,u.typeAnnotation=x,u.asserts=d,o.typeAnnotation=i.finishNode(u,"TSTypePredicate"),i.finishNode(o,"TSTypeAnnotation")})},n.tsTryParseTypeOrTypePredicateAnnotation=function(){if(this.match(14))return this.tsParseTypeOrTypePredicateAnnotation(14)},n.tsTryParseTypeAnnotation=function(){if(this.match(14))return this.tsParseTypeAnnotation()},n.tsTryParseType=function(){return this.tsEatThenParseType(14)},n.tsParseTypePredicatePrefix=function(){var a=this.parseIdentifier();if(this.isContextual(116)&&!this.hasPrecedingLineBreak())return this.next(),a},n.tsParseTypePredicateAsserts=function(){if(this.state.type!==109)return!1;var a=this.state.containsEsc;return this.next(),!Nr(this.state.type)&&!this.match(78)?!1:(a&&this.raise(oe.InvalidEscapedReservedWord,this.state.lastTokStartLoc,{reservedWord:"asserts"}),!0)},n.tsParseTypeAnnotation=function(a,i){var o=this;return a===void 0&&(a=!0),i===void 0&&(i=this.startNode()),this.tsInType(function(){a&&o.expect(14),i.typeAnnotation=o.tsParseType()}),this.finishNode(i,"TSTypeAnnotation")},n.tsParseType=function(){var a=this;T9(this.state.inType);var i=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(81))return i;var o=this.startNodeAtNode(i);return o.checkType=i,o.extendsType=this.tsInDisallowConditionalTypesContext(function(){return a.tsParseNonConditionalType()}),this.expect(17),o.trueType=this.tsInAllowConditionalTypesContext(function(){return a.tsParseType()}),this.expect(14),o.falseType=this.tsInAllowConditionalTypesContext(function(){return a.tsParseType()}),this.finishNode(o,"TSConditionalType")},n.isAbstractConstructorSignature=function(){return this.isContextual(124)&&this.lookahead().type===77},n.tsParseNonConditionalType=function(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(77)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.isAbstractConstructorSignature()?this.tsParseFunctionOrConstructorType("TSConstructorType",!0):this.tsParseUnionTypeOrHigher()},n.tsParseTypeAssertion=function(){var a=this;this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(rr.ReservedTypeAssertion,this.state.startLoc);var i=this.startNode();return i.typeAnnotation=this.tsInType(function(){return a.next(),a.match(75)?a.tsParseTypeReference():a.tsParseType()}),this.expect(48),i.expression=this.parseMaybeUnary(),this.finishNode(i,"TSTypeAssertion")},n.tsParseHeritageClause=function(a){var i=this,o=this.state.startLoc,u=this.tsParseDelimitedList("HeritageClauseElement",function(){var d=i.startNode();return d.expression=i.tsParseEntityName(),i.match(47)&&(d.typeParameters=i.tsParseTypeArguments()),i.finishNode(d,"TSExpressionWithTypeArguments")});return u.length||this.raise(rr.EmptyHeritageClauseType,o,{token:a}),u},n.tsParseInterfaceDeclaration=function(a,i){if(i===void 0&&(i={}),this.hasFollowingLineBreak())return null;this.expectContextual(129),i.declare&&(a.declare=!0),Nr(this.state.type)?(a.id=this.parseIdentifier(),this.checkIdentifier(a.id,or.TYPE_TS_INTERFACE)):(a.id=null,this.raise(rr.MissingInterfaceName,this.state.startLoc)),a.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(81)&&(a.extends=this.tsParseHeritageClause("extends"));var o=this.startNode();return o.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),a.body=this.finishNode(o,"TSInterfaceBody"),this.finishNode(a,"TSInterfaceDeclaration")},n.tsParseTypeAliasDeclaration=function(a){var i=this;return a.id=this.parseIdentifier(),this.checkIdentifier(a.id,or.TYPE_TS_TYPE),a.typeAnnotation=this.tsInType(function(){if(a.typeParameters=i.tsTryParseTypeParameters(i.tsParseInOutModifiers),i.expect(29),i.isContextual(114)&&i.lookahead().type!==16){var o=i.startNode();return i.next(),i.finishNode(o,"TSIntrinsicKeyword")}return i.tsParseType()}),this.semicolon(),this.finishNode(a,"TSTypeAliasDeclaration")},n.tsInNoContext=function(a){var i=this.state.context;this.state.context=[i[0]];try{return a()}finally{this.state.context=i}},n.tsInType=function(a){var i=this.state.inType;this.state.inType=!0;try{return a()}finally{this.state.inType=i}},n.tsInDisallowConditionalTypesContext=function(a){var i=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return a()}finally{this.state.inDisallowConditionalTypesContext=i}},n.tsInAllowConditionalTypesContext=function(a){var i=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return a()}finally{this.state.inDisallowConditionalTypesContext=i}},n.tsEatThenParseType=function(a){if(this.match(a))return this.tsNextThenParseType()},n.tsExpectThenParseType=function(a){var i=this;return this.tsInType(function(){return i.expect(a),i.tsParseType()})},n.tsNextThenParseType=function(){var a=this;return this.tsInType(function(){return a.next(),a.tsParseType()})},n.tsParseEnumMember=function(){var a=this.startNode();return a.id=this.match(133)?r.prototype.parseStringLiteral.call(this,this.state.value):this.parseIdentifier(!0),this.eat(29)&&(a.initializer=r.prototype.parseMaybeAssignAllowIn.call(this)),this.finishNode(a,"TSEnumMember")},n.tsParseEnumDeclaration=function(a,i){return i===void 0&&(i={}),i.const&&(a.const=!0),i.declare&&(a.declare=!0),this.expectContextual(126),a.id=this.parseIdentifier(),this.checkIdentifier(a.id,a.const?or.TYPE_TS_CONST_ENUM:or.TYPE_TS_ENUM),this.expect(5),a.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(a,"TSEnumDeclaration")},n.tsParseModuleBlock=function(){var a=this.startNode();return this.scope.enter(Fr.OTHER),this.expect(5),r.prototype.parseBlockOrModuleBlockBody.call(this,a.body=[],void 0,!0,8),this.scope.exit(),this.finishNode(a,"TSModuleBlock")},n.tsParseModuleOrNamespaceDeclaration=function(a,i){if(i===void 0&&(i=!1),a.id=this.parseIdentifier(),i||this.checkIdentifier(a.id,or.TYPE_TS_NAMESPACE),this.eat(16)){var o=this.startNode();this.tsParseModuleOrNamespaceDeclaration(o,!0),a.body=o}else this.scope.enter(Fr.TS_MODULE),this.prodParam.enter(ot.PARAM),a.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(a,"TSModuleDeclaration")},n.tsParseAmbientExternalModuleDeclaration=function(a){return this.isContextual(112)?(a.global=!0,a.id=this.parseIdentifier()):this.match(133)?a.id=r.prototype.parseStringLiteral.call(this,this.state.value):this.unexpected(),this.match(5)?(this.scope.enter(Fr.TS_MODULE),this.prodParam.enter(ot.PARAM),a.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(a,"TSModuleDeclaration")},n.tsParseImportEqualsDeclaration=function(a,i,o){a.isExport=o||!1,a.id=i||this.parseIdentifier(),this.checkIdentifier(a.id,or.TYPE_TS_VALUE_IMPORT),this.expect(29);var u=this.tsParseModuleReference();return a.importKind==="type"&&u.type!=="TSExternalModuleReference"&&this.raise(rr.ImportAliasHasImportType,u),a.moduleReference=u,this.semicolon(),this.finishNode(a,"TSImportEqualsDeclaration")},n.tsIsExternalModuleReference=function(){return this.isContextual(119)&&this.lookaheadCharCode()===40},n.tsParseModuleReference=function(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)},n.tsParseExternalModuleReference=function(){var a=this.startNode();return this.expectContextual(119),this.expect(10),this.match(133)||this.unexpected(),a.expression=r.prototype.parseExprAtom.call(this),this.expect(11),this.sawUnambiguousESM=!0,this.finishNode(a,"TSExternalModuleReference")},n.tsLookAhead=function(a){var i=this.state.clone(),o=a();return this.state=i,o},n.tsTryParseAndCatch=function(a){var i=this.tryParse(function(o){return a()||o()});if(!(i.aborted||!i.node))return i.error&&(this.state=i.failState),i.node},n.tsTryParse=function(a){var i=this.state.clone(),o=a();if(o!==void 0&&o!==!1)return o;this.state=i},n.tsTryParseDeclare=function(a){var i=this;if(!this.isLineTerminator()){var o=this.state.type,u;return this.isContextual(100)&&(o=74,u="let"),this.tsInAmbientContext(function(){switch(o){case 68:return a.declare=!0,r.prototype.parseFunctionStatement.call(i,a,!1,!1);case 80:return a.declare=!0,i.parseClass(a,!0,!1);case 126:return i.tsParseEnumDeclaration(a,{declare:!0});case 112:return i.tsParseAmbientExternalModuleDeclaration(a);case 75:case 74:return!i.match(75)||!i.isLookaheadContextual("enum")?(a.declare=!0,i.parseVarStatement(a,u||i.state.value,!0)):(i.expect(75),i.tsParseEnumDeclaration(a,{const:!0,declare:!0}));case 129:{var d=i.tsParseInterfaceDeclaration(a,{declare:!0});if(d)return d}default:if(Nr(o))return i.tsParseDeclaration(a,i.state.value,!0,null)}})}},n.tsTryParseExportDeclaration=function(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0,null)},n.tsParseExpressionStatement=function(a,i,o){switch(i.name){case"declare":{var u=this.tsTryParseDeclare(a);return u&&(u.declare=!0),u}case"global":if(this.match(5)){this.scope.enter(Fr.TS_MODULE),this.prodParam.enter(ot.PARAM);var d=a;return d.global=!0,d.id=i,d.body=this.tsParseModuleBlock(),this.scope.exit(),this.prodParam.exit(),this.finishNode(d,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(a,i.name,!1,o)}},n.tsParseDeclaration=function(a,i,o,u){switch(i){case"abstract":if(this.tsCheckLineTerminator(o)&&(this.match(80)||Nr(this.state.type)))return this.tsParseAbstractDeclaration(a,u);break;case"module":if(this.tsCheckLineTerminator(o)){if(this.match(133))return this.tsParseAmbientExternalModuleDeclaration(a);if(Nr(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(a)}break;case"namespace":if(this.tsCheckLineTerminator(o)&&Nr(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(a);break;case"type":if(this.tsCheckLineTerminator(o)&&Nr(this.state.type))return this.tsParseTypeAliasDeclaration(a);break}},n.tsCheckLineTerminator=function(a){return a?this.hasFollowingLineBreak()?!1:(this.next(),!0):!this.isLineTerminator()},n.tsTryParseGenericAsyncArrowFunction=function(a){var i=this;if(this.match(47)){var o=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;var u=this.tsTryParseAndCatch(function(){var d=i.startNodeAt(a);return d.typeParameters=i.tsParseTypeParameters(i.tsParseConstModifier),r.prototype.parseFunctionParams.call(i,d),d.returnType=i.tsTryParseTypeOrTypePredicateAnnotation(),i.expect(19),d});if(this.state.maybeInArrowParameters=o,!!u)return r.prototype.parseArrowExpression.call(this,u,null,!0)}},n.tsParseTypeArgumentsInExpression=function(){if(this.reScan_lt()===47)return this.tsParseTypeArguments()},n.tsParseTypeArguments=function(){var a=this,i=this.startNode();return i.params=this.tsInType(function(){return a.tsInNoContext(function(){return a.expect(47),a.tsParseDelimitedList("TypeParametersOrArguments",a.tsParseType.bind(a))})}),i.params.length===0?this.raise(rr.EmptyTypeArguments,i):!this.state.inType&&this.curContext()===Gr.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(i,"TSTypeParameterInstantiation")},n.tsIsDeclarationStart=function(){return Ype(this.state.type)},n.isExportDefaultSpecifier=function(){return this.tsIsDeclarationStart()?!1:r.prototype.isExportDefaultSpecifier.call(this)},n.parseAssignableListItem=function(a,i){var o=this.state.startLoc,u={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},u);var d=u.accessibility,l=u.override,c=u.readonly;!(a&Qn.IS_CONSTRUCTOR_PARAMS)&&(d||c||l)&&this.raise(rr.UnexpectedParameterModifier,o);var x=this.parseMaybeDefault();this.parseAssignableListItemTypes(x,a);var f=this.parseMaybeDefault(x.loc.start,x);if(d||c||l){var D=this.startNodeAt(o);return i.length&&(D.decorators=i),d&&(D.accessibility=d),c&&(D.readonly=c),l&&(D.override=l),f.type!=="Identifier"&&f.type!=="AssignmentPattern"&&this.raise(rr.UnsupportedParameterPropertyKind,D),D.parameter=f,this.finishNode(D,"TSParameterProperty")}return i.length&&(x.decorators=i),f},n.isSimpleParameter=function(a){return a.type==="TSParameterProperty"&&r.prototype.isSimpleParameter.call(this,a.parameter)||r.prototype.isSimpleParameter.call(this,a)},n.tsDisallowOptionalPattern=function(a){for(var i=0,o=a.params;i<o.length;i++){var u=o[i];u.type!=="Identifier"&&u.optional&&!this.state.isAmbientContext&&this.raise(rr.PatternIsOptional,u)}},n.setArrowFunctionParameters=function(a,i,o){r.prototype.setArrowFunctionParameters.call(this,a,i,o),this.tsDisallowOptionalPattern(a)},n.parseFunctionBodyAndFinish=function(a,i,o){o===void 0&&(o=!1),this.match(14)&&(a.returnType=this.tsParseTypeOrTypePredicateAnnotation(14));var u=i==="FunctionDeclaration"?"TSDeclareFunction":i==="ClassMethod"||i==="ClassPrivateMethod"?"TSDeclareMethod":void 0;return u&&!this.match(5)&&this.isLineTerminator()?this.finishNode(a,u):u==="TSDeclareFunction"&&this.state.isAmbientContext&&(this.raise(rr.DeclareFunctionHasImplementation,a),a.declare)?r.prototype.parseFunctionBodyAndFinish.call(this,a,u,o):(this.tsDisallowOptionalPattern(a),r.prototype.parseFunctionBodyAndFinish.call(this,a,i,o))},n.registerFunctionStatementId=function(a){!a.body&&a.id?this.checkIdentifier(a.id,or.TYPE_TS_AMBIENT):r.prototype.registerFunctionStatementId.call(this,a)},n.tsCheckForInvalidTypeCasts=function(a){var i=this;a.forEach(function(o){o?.type==="TSTypeCastExpression"&&i.raise(rr.UnexpectedTypeAnnotation,o.typeAnnotation)})},n.toReferencedList=function(a,i){return this.tsCheckForInvalidTypeCasts(a),a},n.parseArrayLike=function(a,i,o,u){var d=r.prototype.parseArrayLike.call(this,a,i,o,u);return d.type==="ArrayExpression"&&this.tsCheckForInvalidTypeCasts(d.elements),d},n.parseSubscript=function(a,i,o,u){var d=this;if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();var l=this.startNodeAt(i);return l.expression=a,this.finishNode(l,"TSNonNullExpression")}var c=!1;if(this.match(18)&&this.lookaheadCharCode()===60){if(o)return u.stop=!0,a;u.optionalChainMember=c=!0,this.next()}if(this.match(47)||this.match(51)){var x,f=this.tsTryParseAndCatch(function(){if(!o&&d.atPossibleAsyncArrow(a)){var D=d.tsTryParseGenericAsyncArrowFunction(i);if(D)return D}var g=d.tsParseTypeArgumentsInExpression();if(g){if(c&&!d.match(10)){x=d.state.curPosition();return}if(tl(d.state.type)){var p=r.prototype.parseTaggedTemplateExpression.call(d,a,i,u);return p.typeParameters=g,p}if(!o&&d.eat(10)){var F=d.startNodeAt(i);return F.callee=a,F.arguments=d.parseCallExpressionArguments(11,!1),d.tsCheckForInvalidTypeCasts(F.arguments),F.typeParameters=g,u.optionalChainMember&&(F.optional=c),d.finishCallExpression(F,u.optionalChainMember)}var m=d.state.type;if(!(m===48||m===52||m!==10&&v1(m)&&!d.hasPrecedingLineBreak())){var E=d.startNodeAt(i);return E.expression=a,E.typeParameters=g,d.finishNode(E,"TSInstantiationExpression")}}});if(x&&this.unexpected(x,10),f)return f.type==="TSInstantiationExpression"&&(this.match(16)||this.match(18)&&this.lookaheadCharCode()!==40)&&this.raise(rr.InvalidPropertyAccessAfterInstantiationExpression,this.state.startLoc),f}return r.prototype.parseSubscript.call(this,a,i,o,u)},n.parseNewCallee=function(a){var i;r.prototype.parseNewCallee.call(this,a);var o=a.callee;o.type==="TSInstantiationExpression"&&!((i=o.extra)!=null&&i.parenthesized)&&(a.typeParameters=o.typeParameters,a.callee=o.expression)},n.parseExprOp=function(a,i,o){var u=this,d;if(rl(58)>o&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(d=this.isContextual(120)))){var l=this.startNodeAt(i);return l.expression=a,l.typeAnnotation=this.tsInType(function(){return u.next(),u.match(75)?(d&&u.raise(oe.UnexpectedKeyword,u.state.startLoc,{keyword:"const"}),u.tsParseTypeReference()):u.tsParseType()}),this.finishNode(l,d?"TSSatisfiesExpression":"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(l,i,o)}return r.prototype.parseExprOp.call(this,a,i,o)},n.checkReservedWord=function(a,i,o,u){this.state.isAmbientContext||r.prototype.checkReservedWord.call(this,a,i,o,u)},n.checkImportReflection=function(a){r.prototype.checkImportReflection.call(this,a),a.module&&a.importKind!=="value"&&this.raise(rr.ImportReflectionHasImportType,a.specifiers[0].loc.start)},n.checkDuplicateExports=function(){},n.isPotentialImportPhase=function(a){if(r.prototype.isPotentialImportPhase.call(this,a))return!0;if(this.isContextual(130)){var i=this.lookaheadCharCode();return a?i===123||i===42:i!==61}return!a&&this.isContextual(87)},n.applyImportPhase=function(a,i,o,u){r.prototype.applyImportPhase.call(this,a,i,o,u),i?a.exportKind=o==="type"?"type":"value":a.importKind=o==="type"||o==="typeof"?o:"value"},n.parseImport=function(a){if(this.match(133))return a.importKind="value",r.prototype.parseImport.call(this,a);var i;if(Nr(this.state.type)&&this.lookaheadCharCode()===61)return a.importKind="value",this.tsParseImportEqualsDeclaration(a);if(this.isContextual(130)){var o=this.parseMaybeImportPhase(a,!1);if(this.lookaheadCharCode()===61)return this.tsParseImportEqualsDeclaration(a,o);i=r.prototype.parseImportSpecifiersAndAfter.call(this,a,o)}else i=r.prototype.parseImport.call(this,a);return i.importKind==="type"&&i.specifiers.length>1&&i.specifiers[0].type==="ImportDefaultSpecifier"&&this.raise(rr.TypeImportCannotSpecifyDefaultAndNamed,i),i},n.parseExport=function(a,i){if(this.match(83)){this.next();var o=null;return this.isContextual(130)&&this.isPotentialImportPhase(!1)?o=this.parseMaybeImportPhase(a,!1):a.importKind="value",this.tsParseImportEqualsDeclaration(a,o,!0)}else if(this.eat(29)){var u=a;return u.expression=r.prototype.parseExpression.call(this),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(u,"TSExportAssignment")}else if(this.eatContextual(93)){var d=a;return this.expectContextual(128),d.id=this.parseIdentifier(),this.semicolon(),this.finishNode(d,"TSNamespaceExportDeclaration")}else return r.prototype.parseExport.call(this,a,i)},n.isAbstractClass=function(){return this.isContextual(124)&&this.lookahead().type===80},n.parseExportDefaultExpression=function(){if(this.isAbstractClass()){var a=this.startNode();return this.next(),a.abstract=!0,this.parseClass(a,!0,!0)}if(this.match(129)){var i=this.tsParseInterfaceDeclaration(this.startNode());if(i)return i}return r.prototype.parseExportDefaultExpression.call(this)},n.parseVarStatement=function(a,i,o){o===void 0&&(o=!1);var u=this.state.isAmbientContext,d=r.prototype.parseVarStatement.call(this,a,i,o||u);if(!u)return d;for(var l=0,c=d.declarations;l<c.length;l++){var x=c[l],f=x.id,D=x.init;D&&(i!=="const"||f.typeAnnotation?this.raise(rr.InitializerNotAllowedInAmbientContext,D):L1e(D,this.hasPlugin("estree"))||this.raise(rr.ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference,D))}return d},n.parseStatementContent=function(a,i){if(this.match(75)&&this.isLookaheadContextual("enum")){var o=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(o,{const:!0})}if(this.isContextual(126))return this.tsParseEnumDeclaration(this.startNode());if(this.isContextual(129)){var u=this.tsParseInterfaceDeclaration(this.startNode());if(u)return u}return r.prototype.parseStatementContent.call(this,a,i)},n.parseAccessModifier=function(){return this.tsParseModifier(["public","protected","private"])},n.tsHasSomeModifiers=function(a,i){return i.some(function(o){return P9(o)?a.accessibility===o:!!a[o]})},n.tsIsStartOfStaticBlocks=function(){return this.isContextual(106)&&this.lookaheadCharCode()===123},n.parseClassMember=function(a,i,o){var u=this,d=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:d,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:rr.InvalidModifierOnTypeParameterPositions},i);var l=function(){u.tsIsStartOfStaticBlocks()?(u.next(),u.next(),u.tsHasSomeModifiers(i,d)&&u.raise(rr.StaticBlockCannotHaveModifier,u.state.curPosition()),r.prototype.parseClassStaticBlock.call(u,a,i)):u.parseClassMemberWithIsStatic(a,i,o,!!i.static)};i.declare?this.tsInAmbientContext(l):l()},n.parseClassMemberWithIsStatic=function(a,i,o,u){var d=this.tsTryParseIndexSignature(i);if(d){a.body.push(d),i.abstract&&this.raise(rr.IndexSignatureHasAbstract,i),i.accessibility&&this.raise(rr.IndexSignatureHasAccessibility,i,{modifier:i.accessibility}),i.declare&&this.raise(rr.IndexSignatureHasDeclare,i),i.override&&this.raise(rr.IndexSignatureHasOverride,i);return}!this.state.inAbstractClass&&i.abstract&&this.raise(rr.NonAbstractClassHasAbstractMethod,i),i.override&&(o.hadSuperClass||this.raise(rr.OverrideNotInSubClass,i)),r.prototype.parseClassMemberWithIsStatic.call(this,a,i,o,u)},n.parsePostMemberNameModifiers=function(a){var i=this.eat(17);i&&(a.optional=!0),a.readonly&&this.match(10)&&this.raise(rr.ClassMethodHasReadonly,a),a.declare&&this.match(10)&&this.raise(rr.ClassMethodHasDeclare,a)},n.parseExpressionStatement=function(a,i,o){var u=i.type==="Identifier"?this.tsParseExpressionStatement(a,i,o):void 0;return u||r.prototype.parseExpressionStatement.call(this,a,i,o)},n.shouldParseExportDeclaration=function(){return this.tsIsDeclarationStart()?!0:r.prototype.shouldParseExportDeclaration.call(this)},n.parseConditional=function(a,i,o){var u=this;if(!this.state.maybeInArrowParameters||!this.match(17))return r.prototype.parseConditional.call(this,a,i,o);var d=this.tryParse(function(){return r.prototype.parseConditional.call(u,a,i)});return d.node?(d.error&&(this.state=d.failState),d.node):(d.error&&r.prototype.setOptionalParametersError.call(this,o,d.error),a)},n.parseParenItem=function(a,i){if(a=r.prototype.parseParenItem.call(this,a,i),this.eat(17)&&(a.optional=!0,this.resetEndLocation(a)),this.match(14)){var o=this.startNodeAt(i);return o.expression=a,o.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(o,"TSTypeCastExpression")}return a},n.parseExportDeclaration=function(a){var i=this;if(!this.state.isAmbientContext&&this.isContextual(125))return this.tsInAmbientContext(function(){return i.parseExportDeclaration(a)});var o=this.state.startLoc,u=this.eatContextual(125);if(u&&(this.isContextual(125)||!this.shouldParseExportDeclaration()))throw this.raise(rr.ExpectedAmbientAfterExportDeclare,this.state.startLoc);var d=Nr(this.state.type),l=d&&this.tsTryParseExportDeclaration()||r.prototype.parseExportDeclaration.call(this,a);return l?((l.type==="TSInterfaceDeclaration"||l.type==="TSTypeAliasDeclaration"||u)&&(a.exportKind="type"),u&&(this.resetStartLocation(l,o),l.declare=!0),l):null},n.parseClassId=function(a,i,o,u){if(!((!i||o)&&this.isContextual(113))){r.prototype.parseClassId.call(this,a,i,o,a.declare?or.TYPE_TS_AMBIENT:or.TYPE_CLASS);var d=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);d&&(a.typeParameters=d)}},n.parseClassPropertyAnnotation=function(a){a.optional||(this.eat(35)?a.definite=!0:this.eat(17)&&(a.optional=!0));var i=this.tsTryParseTypeAnnotation();i&&(a.typeAnnotation=i)},n.parseClassProperty=function(a){if(this.parseClassPropertyAnnotation(a),this.state.isAmbientContext&&!(a.readonly&&!a.typeAnnotation)&&this.match(29)&&this.raise(rr.DeclareClassFieldHasInitializer,this.state.startLoc),a.abstract&&this.match(29)){var i=a.key;this.raise(rr.AbstractPropertyHasInitializer,this.state.startLoc,{propertyName:i.type==="Identifier"&&!a.computed?i.name:"["+this.input.slice(i.start,i.end)+"]"})}return r.prototype.parseClassProperty.call(this,a)},n.parseClassPrivateProperty=function(a){return a.abstract&&this.raise(rr.PrivateElementHasAbstract,a),a.accessibility&&this.raise(rr.PrivateElementHasAccessibility,a,{modifier:a.accessibility}),this.parseClassPropertyAnnotation(a),r.prototype.parseClassPrivateProperty.call(this,a)},n.parseClassAccessorProperty=function(a){return this.parseClassPropertyAnnotation(a),a.optional&&this.raise(rr.AccessorCannotBeOptional,a),r.prototype.parseClassAccessorProperty.call(this,a)},n.pushClassMethod=function(a,i,o,u,d,l){var c=this.tsTryParseTypeParameters(this.tsParseConstModifier);c&&d&&this.raise(rr.ConstructorHasTypeParameters,c);var x=i.declare,f=x===void 0?!1:x,D=i.kind;f&&(D==="get"||D==="set")&&this.raise(rr.DeclareAccessor,i,{kind:D}),c&&(i.typeParameters=c),r.prototype.pushClassMethod.call(this,a,i,o,u,d,l)},n.pushClassPrivateMethod=function(a,i,o,u){var d=this.tsTryParseTypeParameters(this.tsParseConstModifier);d&&(i.typeParameters=d),r.prototype.pushClassPrivateMethod.call(this,a,i,o,u)},n.declareClassPrivateMethodInScope=function(a,i){a.type!=="TSDeclareMethod"&&(a.type==="MethodDefinition"&&!a.value.body||r.prototype.declareClassPrivateMethodInScope.call(this,a,i))},n.parseClassSuper=function(a){r.prototype.parseClassSuper.call(this,a),a.superClass&&(this.match(47)||this.match(51))&&(a.superTypeParameters=this.tsParseTypeArgumentsInExpression()),this.eatContextual(113)&&(a.implements=this.tsParseHeritageClause("implements"))},n.parseObjPropValue=function(a,i,o,u,d,l,c){var x=this.tsTryParseTypeParameters(this.tsParseConstModifier);return x&&(a.typeParameters=x),r.prototype.parseObjPropValue.call(this,a,i,o,u,d,l,c)},n.parseFunctionParams=function(a,i){var o=this.tsTryParseTypeParameters(this.tsParseConstModifier);o&&(a.typeParameters=o),r.prototype.parseFunctionParams.call(this,a,i)},n.parseVarId=function(a,i){r.prototype.parseVarId.call(this,a,i),a.id.type==="Identifier"&&!this.hasPrecedingLineBreak()&&this.eat(35)&&(a.definite=!0);var o=this.tsTryParseTypeAnnotation();o&&(a.id.typeAnnotation=o,this.resetEndLocation(a.id))},n.parseAsyncArrowFromCallExpression=function(a,i){return this.match(14)&&(a.returnType=this.tsParseTypeAnnotation()),r.prototype.parseAsyncArrowFromCallExpression.call(this,a,i)},n.parseMaybeAssign=function(a,i){var o=this,u,d,l,c,x,f,D,g;if(this.hasPlugin("jsx")&&(this.match(142)||this.match(47))){if(f=this.state.clone(),D=this.tryParse(function(){return r.prototype.parseMaybeAssign.call(o,a,i)},f),!D.error)return D.node;var p=this.state.context,F=p[p.length-1];(F===Gr.j_oTag||F===Gr.j_expr)&&p.pop()}if(!((u=D)!=null&&u.error)&&!this.match(47))return r.prototype.parseMaybeAssign.call(this,a,i);(!f||f===this.state)&&(f=this.state.clone());var m,E=this.tryParse(function(h){var v,A;m=o.tsParseTypeParameters(o.tsParseConstModifier);var C=r.prototype.parseMaybeAssign.call(o,a,i);return(C.type!=="ArrowFunctionExpression"||(v=C.extra)!=null&&v.parenthesized)&&h(),((A=m)==null?void 0:A.params.length)!==0&&o.resetStartLocationFromNode(C,m),C.typeParameters=m,C},f);if(!E.error&&!E.aborted)return m&&this.reportReservedArrowTypeParam(m),E.node;if(!D&&(T9(!this.hasPlugin("jsx")),g=this.tryParse(function(){return r.prototype.parseMaybeAssign.call(o,a,i)},f),!g.error))return g.node;if((d=D)!=null&&d.node)return this.state=D.failState,D.node;if(E.node)return this.state=E.failState,m&&this.reportReservedArrowTypeParam(m),E.node;if((l=g)!=null&&l.node)return this.state=g.failState,g.node;throw((c=D)==null?void 0:c.error)||E.error||((x=g)==null?void 0:x.error)},n.reportReservedArrowTypeParam=function(a){var i;a.params.length===1&&!a.params[0].constraint&&!((i=a.extra)!=null&&i.trailingComma)&&this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(rr.ReservedArrowTypeParam,a)},n.parseMaybeUnary=function(a,i){return!this.hasPlugin("jsx")&&this.match(47)?this.tsParseTypeAssertion():r.prototype.parseMaybeUnary.call(this,a,i)},n.parseArrow=function(a){var i=this;if(this.match(14)){var o=this.tryParse(function(u){var d=i.tsParseTypeOrTypePredicateAnnotation(14);return(i.canInsertSemicolon()||!i.match(19))&&u(),d});if(o.aborted)return;o.thrown||(o.error&&(this.state=o.failState),a.returnType=o.node)}return r.prototype.parseArrow.call(this,a)},n.parseAssignableListItemTypes=function(a,i){if(!(i&Qn.IS_FUNCTION_PARAMS))return a;this.eat(17)&&(a.optional=!0);var o=this.tsTryParseTypeAnnotation();return o&&(a.typeAnnotation=o),this.resetEndLocation(a),a},n.isAssignable=function(a,i){switch(a.type){case"TSTypeCastExpression":return this.isAssignable(a.expression,i);case"TSParameterProperty":return!0;default:return r.prototype.isAssignable.call(this,a,i)}},n.toAssignable=function(a,i){switch(i===void 0&&(i=!1),a.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(a,i);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":i?this.expressionScope.recordArrowParameterBindingError(rr.UnexpectedTypeCastInParameter,a):this.raise(rr.UnexpectedTypeCastInParameter,a),this.toAssignable(a.expression,i);break;case"AssignmentExpression":!i&&a.left.type==="TSTypeCastExpression"&&(a.left=this.typeCastToParameter(a.left));default:r.prototype.toAssignable.call(this,a,i)}},n.toAssignableParenthesizedExpression=function(a,i){switch(a.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(a.expression,i);break;default:r.prototype.toAssignable.call(this,a,i)}},n.checkToRestConversion=function(a,i){switch(a.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(a.expression,!1);break;default:r.prototype.checkToRestConversion.call(this,a,i)}},n.isValidLVal=function(a,i,o){return I1e({TSTypeCastExpression:!0,TSParameterProperty:"parameter",TSNonNullExpression:"expression",TSAsExpression:(o!==or.TYPE_NONE||!i)&&["expression",!0],TSSatisfiesExpression:(o!==or.TYPE_NONE||!i)&&["expression",!0],TSTypeAssertion:(o!==or.TYPE_NONE||!i)&&["expression",!0]},a)||r.prototype.isValidLVal.call(this,a,i,o)},n.parseBindingAtom=function(){return this.state.type===78?this.parseIdentifier(!0):r.prototype.parseBindingAtom.call(this)},n.parseMaybeDecoratorArguments=function(a){if(this.match(47)||this.match(51)){var i=this.tsParseTypeArgumentsInExpression();if(this.match(10)){var o=r.prototype.parseMaybeDecoratorArguments.call(this,a);return o.typeParameters=i,o}this.unexpected(null,10)}return r.prototype.parseMaybeDecoratorArguments.call(this,a)},n.checkCommaAfterRest=function(a){return this.state.isAmbientContext&&this.match(12)&&this.lookaheadCharCode()===a?(this.next(),!1):r.prototype.checkCommaAfterRest.call(this,a)},n.isClassMethod=function(){return this.match(47)||r.prototype.isClassMethod.call(this)},n.isClassProperty=function(){return this.match(35)||this.match(14)||r.prototype.isClassProperty.call(this)},n.parseMaybeDefault=function(a,i){var o=r.prototype.parseMaybeDefault.call(this,a,i);return o.type==="AssignmentPattern"&&o.typeAnnotation&&o.right.start<o.typeAnnotation.start&&this.raise(rr.TypeAnnotationAfterAssign,o.typeAnnotation),o},n.getTokenFromCode=function(a){if(this.state.inType){if(a===62){this.finishOp(48,1);return}if(a===60){this.finishOp(47,1);return}}r.prototype.getTokenFromCode.call(this,a)},n.reScan_lt_gt=function(){var a=this.state.type;a===47?(this.state.pos-=1,this.readToken_lt()):a===48&&(this.state.pos-=1,this.readToken_gt())},n.reScan_lt=function(){var a=this.state.type;return a===51?(this.state.pos-=2,this.finishOp(47,1),47):a},n.toAssignableList=function(a,i,o){for(var u=0;u<a.length;u++){var d=a[u];d?.type==="TSTypeCastExpression"&&(a[u]=this.typeCastToParameter(d))}r.prototype.toAssignableList.call(this,a,i,o)},n.typeCastToParameter=function(a){return a.expression.typeAnnotation=a.typeAnnotation,this.resetEndLocation(a.expression,a.typeAnnotation.loc.end),a.expression},n.shouldParseArrow=function(a){var i=this;return this.match(14)?a.every(function(o){return i.isAssignable(o,!0)}):r.prototype.shouldParseArrow.call(this,a)},n.shouldParseAsyncArrow=function(){return this.match(14)||r.prototype.shouldParseAsyncArrow.call(this)},n.canHaveLeadingDecorator=function(){return r.prototype.canHaveLeadingDecorator.call(this)||this.isAbstractClass()},n.jsxParseOpeningElementAfterName=function(a){var i=this;if(this.match(47)||this.match(51)){var o=this.tsTryParseAndCatch(function(){return i.tsParseTypeArgumentsInExpression()});o&&(a.typeParameters=o)}return r.prototype.jsxParseOpeningElementAfterName.call(this,a)},n.getGetterSetterExpectedParamCount=function(a){var i=r.prototype.getGetterSetterExpectedParamCount.call(this,a),o=this.getObjectOrClassMethodParams(a),u=o[0],d=u&&this.isThisParam(u);return d?i+1:i},n.parseCatchClauseParam=function(){var a=r.prototype.parseCatchClauseParam.call(this),i=this.tsTryParseTypeAnnotation();return i&&(a.typeAnnotation=i,this.resetEndLocation(a)),a},n.tsInAmbientContext=function(a){var i=this.state.isAmbientContext;this.state.isAmbientContext=!0;try{return a()}finally{this.state.isAmbientContext=i}},n.parseClass=function(a,i,o){var u=this.state.inAbstractClass;this.state.inAbstractClass=!!a.abstract;try{return r.prototype.parseClass.call(this,a,i,o)}finally{this.state.inAbstractClass=u}},n.tsParseAbstractDeclaration=function(a,i){if(this.match(80))return a.abstract=!0,this.maybeTakeDecorators(i,this.parseClass(a,!0,!1));if(this.isContextual(129)){if(!this.hasFollowingLineBreak())return a.abstract=!0,this.raise(rr.NonClassMethodPropertyHasAbstractModifer,a),this.tsParseInterfaceDeclaration(a)}else this.unexpected(null,80)},n.parseMethod=function(a,i,o,u,d,l,c){var x=r.prototype.parseMethod.call(this,a,i,o,u,d,l,c);if(x.abstract){var f=this.hasPlugin("estree")?!!x.value.body:!!x.body;if(f){var D=x.key;this.raise(rr.AbstractMethodHasImplementation,x,{methodName:D.type==="Identifier"&&!x.computed?D.name:"["+this.input.slice(D.start,D.end)+"]"})}}return x},n.tsParseTypeParameterName=function(){var a=this.parseIdentifier();return a.name},n.shouldParseAsAmbientContext=function(){return!!this.getPluginOption("typescript","dts")},n.parse=function(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),r.prototype.parse.call(this)},n.getExpression=function(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),r.prototype.getExpression.call(this)},n.parseExportSpecifier=function(a,i,o,u){return!i&&u?(this.parseTypeOnlyImportExportSpecifier(a,!1,o),this.finishNode(a,"ExportSpecifier")):(a.exportKind="value",r.prototype.parseExportSpecifier.call(this,a,i,o,u))},n.parseImportSpecifier=function(a,i,o,u,d){return!i&&u?(this.parseTypeOnlyImportExportSpecifier(a,!0,o),this.finishNode(a,"ImportSpecifier")):(a.importKind="value",r.prototype.parseImportSpecifier.call(this,a,i,o,u,o?or.TYPE_TS_TYPE_IMPORT:or.TYPE_TS_VALUE_IMPORT))},n.parseTypeOnlyImportExportSpecifier=function(a,i,o){var u=i?"imported":"local",d=i?"local":"exported",l=a[u],c,x=!1,f=!0,D=l.loc.start;if(this.isContextual(93)){var g=this.parseIdentifier();if(this.isContextual(93)){var p=this.parseIdentifier();ba(this.state.type)?(x=!0,l=g,c=i?this.parseIdentifier():this.parseModuleExportName(),f=!1):(c=p,f=!1)}else ba(this.state.type)?(f=!1,c=i?this.parseIdentifier():this.parseModuleExportName()):(x=!0,l=g)}else ba(this.state.type)&&(x=!0,i?(l=this.parseIdentifier(!0),this.isContextual(93)||this.checkReservedWord(l.name,l.loc.start,!0,!0)):l=this.parseModuleExportName());x&&o&&this.raise(i?rr.TypeModifierIsUsedInTypeImports:rr.TypeModifierIsUsedInTypeExports,D),a[u]=l,a[d]=c;var F=i?"importKind":"exportKind";a[F]=x?"type":"value",f&&this.eatContextual(93)&&(a[d]=i?this.parseIdentifier():this.parseModuleExportName()),a[d]||(a[d]=cn(a[u])),i&&this.checkIdentifier(a[d],x?or.TYPE_TS_TYPE_IMPORT:or.TYPE_TS_VALUE_IMPORT)},Qe(t)}(e)};function M1e(e){if(e.type!=="MemberExpression")return!1;var r=e.computed,t=e.property;return r&&t.type!=="StringLiteral"&&(t.type!=="TemplateLiteral"||t.expressions.length>0)?!1:k9(e.object)}function L1e(e,r){var t,n=e.type;if((t=e.extra)!=null&&t.parenthesized)return!1;if(r){if(n==="Literal"){var s=e.value;if(typeof s=="string"||typeof s=="boolean")return!0}}else if(n==="StringLiteral"||n==="BooleanLiteral")return!0;return!!(I9(e,r)||q1e(e,r)||n==="TemplateLiteral"&&e.expressions.length===0||M1e(e))}function I9(e,r){return r?e.type==="Literal"&&(typeof e.value=="number"||"bigint"in e):e.type==="NumericLiteral"||e.type==="BigIntLiteral"}function q1e(e,r){if(e.type==="UnaryExpression"){var t=e,n=t.operator,s=t.argument;if(n==="-"&&I9(s,r))return!0}return!1}function k9(e){return e.type==="Identifier"?!0:e.type!=="MemberExpression"||e.computed?!1:k9(e.object)}var O9,_9=un(O9||(O9=le(["placeholders"])))({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."}),$1e=function(e){return function(r){nt(t,r);function t(){return r.apply(this,arguments)||this}var n=t.prototype;return n.parsePlaceholder=function(a){if(this.match(144)){var i=this.startNode();return this.next(),this.assertNoSpace(),i.name=r.prototype.parseIdentifier.call(this,!0),this.assertNoSpace(),this.expect(144),this.finishPlaceholder(i,a)}},n.finishPlaceholder=function(a,i){var o=!!(a.expectedNode&&a.type==="Placeholder");return a.expectedNode=i,o?a:this.finishNode(a,"Placeholder")},n.getTokenFromCode=function(a){a===37&&this.input.charCodeAt(this.state.pos+1)===37?this.finishOp(144,2):r.prototype.getTokenFromCode.call(this,a)},n.parseExprAtom=function(a){return this.parsePlaceholder("Expression")||r.prototype.parseExprAtom.call(this,a)},n.parseIdentifier=function(a){return this.parsePlaceholder("Identifier")||r.prototype.parseIdentifier.call(this,a)},n.checkReservedWord=function(a,i,o,u){a!==void 0&&r.prototype.checkReservedWord.call(this,a,i,o,u)},n.parseBindingAtom=function(){return this.parsePlaceholder("Pattern")||r.prototype.parseBindingAtom.call(this)},n.isValidLVal=function(a,i,o){return a==="Placeholder"||r.prototype.isValidLVal.call(this,a,i,o)},n.toAssignable=function(a,i){a&&a.type==="Placeholder"&&a.expectedNode==="Expression"?a.expectedNode="Pattern":r.prototype.toAssignable.call(this,a,i)},n.chStartsBindingIdentifier=function(a,i){if(r.prototype.chStartsBindingIdentifier.call(this,a,i))return!0;var o=this.lookahead();return o.type===144},n.verifyBreakContinue=function(a,i){a.label&&a.label.type==="Placeholder"||r.prototype.verifyBreakContinue.call(this,a,i)},n.parseExpressionStatement=function(a,i){var o;if(i.type!=="Placeholder"||(o=i.extra)!=null&&o.parenthesized)return r.prototype.parseExpressionStatement.call(this,a,i);if(this.match(14)){var u=a;return u.label=this.finishPlaceholder(i,"Identifier"),this.next(),u.body=r.prototype.parseStatementOrSloppyAnnexBFunctionDeclaration.call(this),this.finishNode(u,"LabeledStatement")}return this.semicolon(),a.name=i.name,this.finishPlaceholder(a,"Statement")},n.parseBlock=function(a,i,o){return this.parsePlaceholder("BlockStatement")||r.prototype.parseBlock.call(this,a,i,o)},n.parseFunctionId=function(a){return this.parsePlaceholder("Identifier")||r.prototype.parseFunctionId.call(this,a)},n.parseClass=function(a,i,o){var u=i?"ClassDeclaration":"ClassExpression";this.next();var d=this.state.strict,l=this.parsePlaceholder("Identifier");if(l)if(this.match(81)||this.match(144)||this.match(5))a.id=l;else{if(o||!i)return a.id=null,a.body=this.finishPlaceholder(l,"ClassBody"),this.finishNode(a,u);throw this.raise(_9.ClassNameIsRequired,this.state.startLoc)}else this.parseClassId(a,i,o);return r.prototype.parseClassSuper.call(this,a),a.body=this.parsePlaceholder("ClassBody")||r.prototype.parseClassBody.call(this,!!a.superClass,d),this.finishNode(a,u)},n.parseExport=function(a,i){var o=this.parsePlaceholder("Identifier");if(!o)return r.prototype.parseExport.call(this,a,i);if(!this.isContextual(98)&&!this.match(12))return a.specifiers=[],a.source=null,a.declaration=this.finishPlaceholder(o,"Declaration"),this.finishNode(a,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");var u=this.startNode();return u.exported=o,a.specifiers=[this.finishNode(u,"ExportDefaultSpecifier")],r.prototype.parseExport.call(this,a,i)},n.isExportDefaultSpecifier=function(){if(this.match(65)){var a=this.nextTokenStart();if(this.isUnparsedContextual(a,"from")&&this.input.startsWith(Yn(144),this.nextTokenStartSince(a+4)))return!0}return r.prototype.isExportDefaultSpecifier.call(this)},n.maybeParseExportDefaultSpecifier=function(a,i){var o;return(o=a.specifiers)!=null&&o.length?!0:r.prototype.maybeParseExportDefaultSpecifier.call(this,a,i)},n.checkExport=function(a){var i=a.specifiers;i!=null&&i.length&&(a.specifiers=i.filter(function(o){return o.exported.type==="Placeholder"})),r.prototype.checkExport.call(this,a),a.specifiers=i},n.parseImport=function(a){var i=this.parsePlaceholder("Identifier");if(!i)return r.prototype.parseImport.call(this,a);if(a.specifiers=[],!this.isContextual(98)&&!this.match(12))return a.source=this.finishPlaceholder(i,"StringLiteral"),this.semicolon(),this.finishNode(a,"ImportDeclaration");var o=this.startNodeAtNode(i);if(o.local=i,a.specifiers.push(this.finishNode(o,"ImportDefaultSpecifier")),this.eat(12)){var u=this.maybeParseStarImportSpecifier(a);u||this.parseNamedImportSpecifiers(a)}return this.expectContextual(98),a.source=this.parseImportSource(),this.semicolon(),this.finishNode(a,"ImportDeclaration")},n.parseImportSource=function(){return this.parsePlaceholder("StringLiteral")||r.prototype.parseImportSource.call(this)},n.assertNoSpace=function(){this.state.start>this.state.lastTokEndLoc.index&&this.raise(_9.UnexpectedSpace,this.state.lastTokEndLoc)},Qe(t)}(e)},U1e=function(e){return function(r){nt(t,r);function t(){return r.apply(this,arguments)||this}var n=t.prototype;return n.parseV8Intrinsic=function(){if(this.match(54)){var a=this.state.startLoc,i=this.startNode();if(this.next(),Nr(this.state.type)){var o=this.parseIdentifierName(),u=this.createIdentifier(i,o);if(u.type="V8IntrinsicIdentifier",this.match(10))return u}this.unexpected(a)}},n.parseExprAtom=function(a){return this.parseV8Intrinsic()||r.prototype.parseExprAtom.call(this,a)},Qe(t)}(e)};function ut(e,r){var t=typeof r=="string"?[r,{}]:r,n=t[0],s=t[1],a=Object.keys(s),i=a.length===0;return e.some(function(o){if(typeof o=="string")return i&&o===n;var u=o[0],d=o[1];if(u!==n)return!1;for(var l=0;l<a.length;l++){var c=a[l];if(d[c]!==s[c])return!1}return!0})}function Zn(e,r,t){var n=e.find(function(s){return Array.isArray(s)?s[0]===r:s===r});return n&&Array.isArray(n)&&n.length>1?n[1][t]:null}var N9=["minimal","fsharp","hack","smart"],M9=["^^","@@","^","%","#"],L9=["hash","bar"];function G1e(e){if(ut(e,"decorators")){if(ut(e,"decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");var r=Zn(e,"decorators","decoratorsBeforeExport");if(r!=null&&typeof r!="boolean")throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");var t=Zn(e,"decorators","allowCallParenthesized");if(t!=null&&typeof t!="boolean")throw new Error("'allowCallParenthesized' must be a boolean.")}if(ut(e,"flow")&&ut(e,"typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(ut(e,"placeholders")&&ut(e,"v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(ut(e,"pipelineOperator")){var n=Zn(e,"pipelineOperator","proposal");if(!N9.includes(n)){var s=N9.map(function(l){return'"'+l+'"'}).join(", ");throw new Error('"pipelineOperator" requires "proposal" option whose value must be one of: '+s+".")}var a=ut(e,["recordAndTuple",{syntaxType:"hash"}]);if(n==="hack"){if(ut(e,"placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(ut(e,"v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");var i=Zn(e,"pipelineOperator","topicToken");if(!M9.includes(i)){var o=M9.map(function(l){return'"'+l+'"'}).join(", ");throw new Error('"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: '+o+".")}if(i==="#"&&a)throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "hack", topicToken: "#" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.')}else if(n==="smart"&&a)throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "smart" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.')}if(ut(e,"moduleAttributes")){if(ut(e,"importAssertions")||ut(e,"importAttributes"))throw new Error("Cannot combine importAssertions, importAttributes and moduleAttributes plugins.");var u=Zn(e,"moduleAttributes","version");if(u!=="may-2020")throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.")}if(ut(e,"importAssertions")&&ut(e,"importAttributes"))throw new Error("Cannot combine importAssertions and importAttributes plugins.");if(ut(e,"recordAndTuple")&&Zn(e,"recordAndTuple","syntaxType")!=null&&!L9.includes(Zn(e,"recordAndTuple","syntaxType")))throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: "+L9.map(function(l){return"'"+l+"'"}).join(", "));if(ut(e,"asyncDoExpressions")&&!ut(e,"doExpressions")){var d=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw d.missingPlugins="doExpressions",d}if(ut(e,"optionalChainingAssign")&&Zn(e,"optionalChainingAssign","version")!=="2023-07")throw new Error("The 'optionalChainingAssign' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is '2023-07'.")}var q9={estree:Mpe,jsx:B1e,flow:b1e,typescript:N1e,v8intrinsic:U1e,placeholders:$1e},W1e=Object.keys(q9),S1={sourceType:"script",sourceFilename:void 0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,plugins:[],strictMode:null,ranges:!1,tokens:!1,createImportExpressions:!1,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0};function V1e(e){if(e==null)return Object.assign({},S1);if(e.annexB!=null&&e.annexB!==!1)throw new Error("The `annexB` option can only be set to `false`.");for(var r={},t=0,n=Object.keys(S1);t<n.length;t++){var s,a=n[t];r[a]=(s=e[a])!=null?s:S1[a]}return r}var H1e=function(e){nt(r,e);function r(){return e.apply(this,arguments)||this}var t=r.prototype;return t.checkProto=function(s,a,i,o){if(!(s.type==="SpreadElement"||this.isObjectMethod(s)||s.computed||s.shorthand)){var u=s.key,d=u.type==="Identifier"?u.name:u.value;if(d==="__proto__"){if(a){this.raise(oe.RecordNoProto,u);return}i.used&&(o?o.doubleProtoLoc===null&&(o.doubleProtoLoc=u.loc.start):this.raise(oe.DuplicateProto,u)),i.used=!0}}},t.shouldExitDescending=function(s,a){return s.type==="ArrowFunctionExpression"&&s.start===a},t.getExpression=function(){this.enterInitialScopes(),this.nextToken();var s=this.parseExpression();return this.match(139)||this.unexpected(),this.finalizeRemainingComments(),s.comments=this.comments,s.errors=this.state.errors,this.options.tokens&&(s.tokens=this.tokens),s},t.parseExpression=function(s,a){var i=this;return s?this.disallowInAnd(function(){return i.parseExpressionBase(a)}):this.allowInAnd(function(){return i.parseExpressionBase(a)})},t.parseExpressionBase=function(s){var a=this.state.startLoc,i=this.parseMaybeAssign(s);if(this.match(12)){var o=this.startNodeAt(a);for(o.expressions=[i];this.eat(12);)o.expressions.push(this.parseMaybeAssign(s));return this.toReferencedList(o.expressions),this.finishNode(o,"SequenceExpression")}return i},t.parseMaybeAssignDisallowIn=function(s,a){var i=this;return this.disallowInAnd(function(){return i.parseMaybeAssign(s,a)})},t.parseMaybeAssignAllowIn=function(s,a){var i=this;return this.allowInAnd(function(){return i.parseMaybeAssign(s,a)})},t.setOptionalParametersError=function(s,a){var i;s.optionalParametersLoc=(i=a?.loc)!=null?i:this.state.startLoc},t.parseMaybeAssign=function(s,a){var i=this.state.startLoc;if(this.isContextual(108)&&this.prodParam.hasYield){var o=this.parseYield();return a&&(o=a.call(this,o,i)),o}var u;s?u=!1:(s=new ol,u=!0);var d=this.state.type;(d===10||Nr(d))&&(this.state.potentialArrowAt=this.state.start);var l=this.parseMaybeConditional(s);if(a&&(l=a.call(this,l,i)),Gpe(this.state.type)){var c=this.startNodeAt(i),x=this.state.value;if(c.operator=x,this.match(29)){this.toAssignable(l,!0),c.left=l;var f=i.index;s.doubleProtoLoc!=null&&s.doubleProtoLoc.index>=f&&(s.doubleProtoLoc=null),s.shorthandAssignLoc!=null&&s.shorthandAssignLoc.index>=f&&(s.shorthandAssignLoc=null),s.privateKeyLoc!=null&&s.privateKeyLoc.index>=f&&(this.checkDestructuringPrivate(s),s.privateKeyLoc=null)}else c.left=l;return this.next(),c.right=this.parseMaybeAssign(),this.checkLVal(l,{in:this.finishNode(c,"AssignmentExpression")}),c}else u&&this.checkExpressionErrors(s,!0);return l},t.parseMaybeConditional=function(s){var a=this.state.startLoc,i=this.state.potentialArrowAt,o=this.parseExprOps(s);return this.shouldExitDescending(o,i)?o:this.parseConditional(o,a,s)},t.parseConditional=function(s,a,i){if(this.eat(17)){var o=this.startNodeAt(a);return o.test=s,o.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),o.alternate=this.parseMaybeAssign(),this.finishNode(o,"ConditionalExpression")}return s},t.parseMaybeUnaryOrPrivate=function(s){return this.match(138)?this.parsePrivateName():this.parseMaybeUnary(s)},t.parseExprOps=function(s){var a=this.state.startLoc,i=this.state.potentialArrowAt,o=this.parseMaybeUnaryOrPrivate(s);return this.shouldExitDescending(o,i)?o:this.parseExprOp(o,a,-1)},t.parseExprOp=function(s,a,i){if(this.isPrivateName(s)){var o=this.getPrivateNameSV(s);(i>=rl(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise(oe.PrivateInExpectedIn,s,{identifierName:o}),this.classScope.usePrivateName(o,s.loc.start)}var u=this.state.type;if(Vpe(u)&&(this.prodParam.hasIn||!this.match(58))){var d=rl(u);if(d>i){if(u===39){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return s;this.checkPipelineAtInfixOperator(s,a)}var l=this.startNodeAt(a);l.left=s,l.operator=this.state.value;var c=u===41||u===42,x=u===40;if(x&&(d=rl(42)),this.next(),u===39&&this.hasPlugin(["pipelineOperator",{proposal:"minimal"}])&&this.state.type===96&&this.prodParam.hasAwait)throw this.raise(oe.UnexpectedAwaitAfterPipelineBody,this.state.startLoc);l.right=this.parseExprOpRightExpr(u,d);var f=this.finishNode(l,c||x?"LogicalExpression":"BinaryExpression"),D=this.state.type;if(x&&(D===41||D===42)||c&&D===40)throw this.raise(oe.MixingCoalesceWithLogical,this.state.startLoc);return this.parseExprOp(f,a,i)}}return s},t.parseExprOpRightExpr=function(s,a){var i=this,o=this.state.startLoc;switch(s){case 39:switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext(function(){return i.parseHackPipeBody()});case"smart":return this.withTopicBindingContext(function(){if(i.prodParam.hasYield&&i.isContextual(108))throw i.raise(oe.PipeBodyIsTighter,i.state.startLoc);return i.parseSmartPipelineBodyInStyle(i.parseExprOpBaseRightExpr(s,a),o)});case"fsharp":return this.withSoloAwaitPermittingContext(function(){return i.parseFSharpPipelineBody(a)})}default:return this.parseExprOpBaseRightExpr(s,a)}},t.parseExprOpBaseRightExpr=function(s,a){var i=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),i,Xpe(s)?a-1:a)},t.parseHackPipeBody=function(){var s,a=this.state.startLoc,i=this.parseMaybeAssign(),o=Ppe.has(i.type);return o&&!((s=i.extra)!=null&&s.parenthesized)&&this.raise(oe.PipeUnparenthesizedBody,a,{type:i.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(oe.PipeTopicUnused,a),i},t.checkExponentialAfterUnary=function(s){this.match(57)&&this.raise(oe.UnexpectedTokenUnaryExponentiation,s.argument)},t.parseMaybeUnary=function(s,a){var i=this.state.startLoc,o=this.isContextual(96);if(o&&this.isAwaitAllowed()){this.next();var u=this.parseAwait(i);return a||this.checkExponentialAfterUnary(u),u}var d=this.match(34),l=this.startNode();if(Kpe(this.state.type)){l.operator=this.state.value,l.prefix=!0,this.match(72)&&this.expectPlugin("throwExpressions");var c=this.match(89);if(this.next(),l.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(s,!0),this.state.strict&&c){var x=l.argument;x.type==="Identifier"?this.raise(oe.StrictDelete,l):this.hasPropertyAsPrivateName(x)&&this.raise(oe.DeletePrivateField,l)}if(!d)return a||this.checkExponentialAfterUnary(l),this.finishNode(l,"UnaryExpression")}var f=this.parseUpdate(l,d,s);if(o){var D=this.state.type,g=this.hasPlugin("v8intrinsic")?v1(D):v1(D)&&!this.match(54);if(g&&!this.isAmbiguousAwait())return this.raiseOverwrite(oe.AwaitNotInAsyncContext,i),this.parseAwait(i)}return f},t.parseUpdate=function(s,a,i){if(a){var o=s;return this.checkLVal(o.argument,{in:this.finishNode(o,"UpdateExpression")}),s}var u=this.state.startLoc,d=this.parseExprSubscripts(i);if(this.checkExpressionErrors(i,!1))return d;for(;Hpe(this.state.type)&&!this.canInsertSemicolon();){var l=this.startNodeAt(u);l.operator=this.state.value,l.prefix=!1,l.argument=d,this.next(),this.checkLVal(d,{in:d=this.finishNode(l,"UpdateExpression")})}return d},t.parseExprSubscripts=function(s){var a=this.state.startLoc,i=this.state.potentialArrowAt,o=this.parseExprAtom(s);return this.shouldExitDescending(o,i)?o:this.parseSubscripts(o,a)},t.parseSubscripts=function(s,a,i){var o={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(s),stop:!1};do s=this.parseSubscript(s,a,i,o),o.maybeAsyncArrow=!1;while(!o.stop);return s},t.parseSubscript=function(s,a,i,o){var u=this.state.type;if(!i&&u===15)return this.parseBind(s,a,i,o);if(tl(u))return this.parseTaggedTemplateExpression(s,a,o);var d=!1;if(u===18){if(i&&(this.raise(oe.OptionalChainingNoNew,this.state.startLoc),this.lookaheadCharCode()===40))return o.stop=!0,s;o.optionalChainMember=d=!0,this.next()}if(!i&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(s,a,o,d);var l=this.eat(0);return l||d||this.eat(16)?this.parseMember(s,a,o,l,d):(o.stop=!0,s)},t.parseMember=function(s,a,i,o,u){var d=this.startNodeAt(a);return d.object=s,d.computed=o,o?(d.property=this.parseExpression(),this.expect(3)):this.match(138)?(s.type==="Super"&&this.raise(oe.SuperPrivateField,a),this.classScope.usePrivateName(this.state.value,this.state.startLoc),d.property=this.parsePrivateName()):d.property=this.parseIdentifier(!0),i.optionalChainMember?(d.optional=u,this.finishNode(d,"OptionalMemberExpression")):this.finishNode(d,"MemberExpression")},t.parseBind=function(s,a,i,o){var u=this.startNodeAt(a);return u.object=s,this.next(),u.callee=this.parseNoCallExpr(),o.stop=!0,this.parseSubscripts(this.finishNode(u,"BindExpression"),a,i)},t.parseCoverCallAndAsyncArrowHead=function(s,a,i,o){var u=this.state.maybeInArrowParameters,d=null;this.state.maybeInArrowParameters=!0,this.next();var l=this.startNodeAt(a);l.callee=s;var c=i.maybeAsyncArrow,x=i.optionalChainMember;c&&(this.expressionScope.enter(f1e()),d=new ol),x&&(l.optional=o),o?l.arguments=this.parseCallExpressionArguments(11):l.arguments=this.parseCallExpressionArguments(11,s.type==="Import",s.type!=="Super",l,d);var f=this.finishCallExpression(l,x);return c&&this.shouldParseAsyncArrow()&&!o?(i.stop=!0,this.checkDestructuringPrivate(d),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),f=this.parseAsyncArrowFromCallExpression(this.startNodeAt(a),f)):(c&&(this.checkExpressionErrors(d,!0),this.expressionScope.exit()),this.toReferencedArguments(f)),this.state.maybeInArrowParameters=u,f},t.toReferencedArguments=function(s,a){this.toReferencedListDeep(s.arguments,a)},t.parseTaggedTemplateExpression=function(s,a,i){var o=this.startNodeAt(a);return o.tag=s,o.quasi=this.parseTemplate(!0),i.optionalChainMember&&this.raise(oe.OptionalChainingNoTemplate,a),this.finishNode(o,"TaggedTemplateExpression")},t.atPossibleAsyncArrow=function(s){return s.type==="Identifier"&&s.name==="async"&&this.state.lastTokEndLoc.index===s.end&&!this.canInsertSemicolon()&&s.end-s.start===5&&s.start===this.state.potentialArrowAt},t.expectImportAttributesPlugin=function(){this.hasPlugin("importAssertions")||this.expectPlugin("importAttributes")},t.finishCallExpression=function(s,a){if(s.callee.type==="Import")if(s.arguments.length===2&&(this.hasPlugin("moduleAttributes")||this.expectImportAttributesPlugin()),s.arguments.length===0||s.arguments.length>2)this.raise(oe.ImportCallArity,s,{maxArgumentCount:this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions")||this.hasPlugin("moduleAttributes")?2:1});else for(var i=0,o=s.arguments;i<o.length;i++){var u=o[i];u.type==="SpreadElement"&&this.raise(oe.ImportCallSpreadArgument,u)}return this.finishNode(s,a?"OptionalCallExpression":"CallExpression")},t.parseCallExpressionArguments=function(s,a,i,o,u){var d=[],l=!0,c=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(s);){if(l)l=!1;else if(this.expect(12),this.match(s)){a&&!this.hasPlugin("importAttributes")&&!this.hasPlugin("importAssertions")&&!this.hasPlugin("moduleAttributes")&&this.raise(oe.ImportCallArgumentTrailingComma,this.state.lastTokStartLoc),o&&this.addTrailingCommaExtraToNode(o),this.next();break}d.push(this.parseExprListItem(!1,u,i))}return this.state.inFSharpPipelineDirectBody=c,d},t.shouldParseAsyncArrow=function(){return this.match(19)&&!this.canInsertSemicolon()},t.parseAsyncArrowFromCallExpression=function(s,a){var i;return this.resetPreviousNodeTrailingComments(a),this.expect(19),this.parseArrowExpression(s,a.arguments,!0,(i=a.extra)==null?void 0:i.trailingCommaLoc),a.innerComments&&du(s,a.innerComments),a.callee.trailingComments&&du(s,a.callee.trailingComments),s},t.parseNoCallExpr=function(){var s=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),s,!0)},t.parseExprAtom=function(s){var a,i=null,o=this.state.type;switch(o){case 79:return this.parseSuper();case 83:return a=this.startNode(),this.next(),this.match(16)?this.parseImportMetaProperty(a):this.match(10)?this.options.createImportExpressions?this.parseImportCall(a):this.finishNode(a,"Import"):(this.raise(oe.UnsupportedImport,this.state.lastTokStartLoc),this.finishNode(a,"Import"));case 78:return a=this.startNode(),this.next(),this.finishNode(a,"ThisExpression");case 90:return this.parseDo(this.startNode(),!1);case 56:case 31:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 134:return this.parseNumericLiteral(this.state.value);case 135:return this.parseBigIntLiteral(this.state.value);case 136:return this.parseDecimalLiteral(this.state.value);case 133:return this.parseStringLiteral(this.state.value);case 84:return this.parseNullLiteral();case 85:return this.parseBooleanLiteral(!0);case 86:return this.parseBooleanLiteral(!1);case 10:{var u=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(u)}case 2:case 1:return this.parseArrayLike(this.state.type===2?4:3,!1,!0);case 0:return this.parseArrayLike(3,!0,!1,s);case 6:case 7:return this.parseObjectLike(this.state.type===6?9:8,!1,!0);case 5:return this.parseObjectLike(8,!1,!1,s);case 68:return this.parseFunctionOrFunctionSent();case 26:i=this.parseDecorators();case 80:return this.parseClass(this.maybeTakeDecorators(i,this.startNode()),!1);case 77:return this.parseNewOrNewTarget();case 25:case 24:return this.parseTemplate(!1);case 15:{a=this.startNode(),this.next(),a.object=null;var d=a.callee=this.parseNoCallExpr();if(d.type==="MemberExpression")return this.finishNode(a,"BindExpression");throw this.raise(oe.UnsupportedBind,d)}case 138:return this.raise(oe.PrivateInExpectedIn,this.state.startLoc,{identifierName:this.state.value}),this.parsePrivateName();case 33:return this.parseTopicReferenceThenEqualsSign(54,"%");case 32:return this.parseTopicReferenceThenEqualsSign(44,"^");case 37:case 38:return this.parseTopicReference("hack");case 44:case 54:case 27:{var l=this.getPluginOption("pipelineOperator","proposal");if(l)return this.parseTopicReference(l);this.unexpected();break}case 47:{var c=this.input.codePointAt(this.nextTokenStart());Ma(c)||c===62?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected();break}default:if(Nr(o)){if(this.isContextual(127)&&this.lookaheadInLineCharCode()===123)return this.parseModuleExpression();var x=this.state.potentialArrowAt===this.state.start,f=this.state.containsEsc,D=this.parseIdentifier();if(!f&&D.name==="async"&&!this.canInsertSemicolon()){var g=this.state.type;if(g===68)return this.resetPreviousNodeTrailingComments(D),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(D));if(Nr(g))return this.lookaheadCharCode()===61?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(D)):D;if(g===90)return this.resetPreviousNodeTrailingComments(D),this.parseDo(this.startNodeAtNode(D),!0)}return x&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(D),[D],!1)):D}else this.unexpected()}},t.parseTopicReferenceThenEqualsSign=function(s,a){var i=this.getPluginOption("pipelineOperator","proposal");if(i)return this.state.type=s,this.state.value=a,this.state.pos--,this.state.end--,this.state.endLoc=jt(this.state.endLoc,-1),this.parseTopicReference(i);this.unexpected()},t.parseTopicReference=function(s){var a=this.startNode(),i=this.state.startLoc,o=this.state.type;return this.next(),this.finishTopicReference(a,i,s,o)},t.finishTopicReference=function(s,a,i,o){if(this.testTopicReferenceConfiguration(i,a,o)){var u=i==="smart"?"PipelinePrimaryTopicReference":"TopicReference";return this.topicReferenceIsAllowedInCurrentContext()||this.raise(i==="smart"?oe.PrimaryTopicNotAllowed:oe.PipeTopicUnbound,a),this.registerTopicReference(),this.finishNode(s,u)}else throw this.raise(oe.PipeTopicUnconfiguredToken,a,{token:Yn(o)})},t.testTopicReferenceConfiguration=function(s,a,i){switch(s){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:Yn(i)}]);case"smart":return i===27;default:throw this.raise(oe.PipeTopicRequiresHackPipes,a)}},t.parseAsyncArrowUnaryFunction=function(s){this.prodParam.enter(il(!0,this.prodParam.hasYield));var a=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(oe.LineTerminatorBeforeArrow,this.state.curPosition()),this.expect(19),this.parseArrowExpression(s,a,!0)},t.parseDo=function(s,a){this.expectPlugin("doExpressions"),a&&this.expectPlugin("asyncDoExpressions"),s.async=a,this.next();var i=this.state.labels;return this.state.labels=[],a?(this.prodParam.enter(ot.PARAM_AWAIT),s.body=this.parseBlock(),this.prodParam.exit()):s.body=this.parseBlock(),this.state.labels=i,this.finishNode(s,"DoExpression")},t.parseSuper=function(){var s=this.startNode();return this.next(),this.match(10)&&!this.scope.allowDirectSuper&&!this.options.allowSuperOutsideMethod?this.raise(oe.SuperNotAllowed,s):!this.scope.allowSuper&&!this.options.allowSuperOutsideMethod&&this.raise(oe.UnexpectedSuper,s),!this.match(10)&&!this.match(0)&&!this.match(16)&&this.raise(oe.UnsupportedSuper,s),this.finishNode(s,"Super")},t.parsePrivateName=function(){var s=this.startNode(),a=this.startNodeAt(jt(this.state.startLoc,1)),i=this.state.value;return this.next(),s.id=this.createIdentifier(a,i),this.finishNode(s,"PrivateName")},t.parseFunctionOrFunctionSent=function(){var s=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(16)){var a=this.createIdentifier(this.startNodeAtNode(s),"function");return this.next(),this.match(103)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected(),this.parseMetaProperty(s,a,"sent")}return this.parseFunction(s)},t.parseMetaProperty=function(s,a,i){s.meta=a;var o=this.state.containsEsc;return s.property=this.parseIdentifier(!0),(s.property.name!==i||o)&&this.raise(oe.UnsupportedMetaProperty,s.property,{target:a.name,onlyValidPropertyName:i}),this.finishNode(s,"MetaProperty")},t.parseImportMetaProperty=function(s){var a=this.createIdentifier(this.startNodeAtNode(s),"import");if(this.next(),this.isContextual(101))this.inModule||this.raise(oe.ImportMetaOutsideModule,a),this.sawUnambiguousESM=!0;else if(this.isContextual(105)||this.isContextual(97)){var i=this.isContextual(105);if(i||this.unexpected(),this.expectPlugin(i?"sourcePhaseImports":"deferredImportEvaluation"),!this.options.createImportExpressions)throw this.raise(oe.DynamicImportPhaseRequiresImportExpressions,this.state.startLoc,{phase:this.state.value});return this.next(),s.phase=i?"source":"defer",this.parseImportCall(s)}return this.parseMetaProperty(s,a,"meta")},t.parseLiteralAtNode=function(s,a,i){return this.addExtra(i,"rawValue",s),this.addExtra(i,"raw",this.input.slice(i.start,this.state.end)),i.value=s,this.next(),this.finishNode(i,a)},t.parseLiteral=function(s,a){var i=this.startNode();return this.parseLiteralAtNode(s,a,i)},t.parseStringLiteral=function(s){return this.parseLiteral(s,"StringLiteral")},t.parseNumericLiteral=function(s){return this.parseLiteral(s,"NumericLiteral")},t.parseBigIntLiteral=function(s){return this.parseLiteral(s,"BigIntLiteral")},t.parseDecimalLiteral=function(s){return this.parseLiteral(s,"DecimalLiteral")},t.parseRegExpLiteral=function(s){var a=this.parseLiteral(s.value,"RegExpLiteral");return a.pattern=s.pattern,a.flags=s.flags,a},t.parseBooleanLiteral=function(s){var a=this.startNode();return a.value=s,this.next(),this.finishNode(a,"BooleanLiteral")},t.parseNullLiteral=function(){var s=this.startNode();return this.next(),this.finishNode(s,"NullLiteral")},t.parseParenAndDistinguishExpression=function(s){var a=this.state.startLoc,i;this.next(),this.expressionScope.enter(D1e());var o=this.state.maybeInArrowParameters,u=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;for(var d=this.state.startLoc,l=[],c=new ol,x=!0,f,D;!this.match(11);){if(x)x=!1;else if(this.expect(12,c.optionalParametersLoc===null?null:c.optionalParametersLoc),this.match(11)){D=this.state.startLoc;break}if(this.match(21)){var g=this.state.startLoc;if(f=this.state.startLoc,l.push(this.parseParenItem(this.parseRestBinding(),g)),!this.checkCommaAfterRest(41))break}else l.push(this.parseMaybeAssignAllowIn(c,this.parseParenItem))}var p=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=o,this.state.inFSharpPipelineDirectBody=u;var F=this.startNodeAt(a);return s&&this.shouldParseArrow(l)&&(F=this.parseArrow(F))?(this.checkDestructuringPrivate(c),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(F,l,!1),F):(this.expressionScope.exit(),l.length||this.unexpected(this.state.lastTokStartLoc),D&&this.unexpected(D),f&&this.unexpected(f),this.checkExpressionErrors(c,!0),this.toReferencedListDeep(l,!0),l.length>1?(i=this.startNodeAt(d),i.expressions=l,this.finishNode(i,"SequenceExpression"),this.resetEndLocation(i,p)):i=l[0],this.wrapParenthesis(a,i))},t.wrapParenthesis=function(s,a){if(!this.options.createParenthesizedExpressions)return this.addExtra(a,"parenthesized",!0),this.addExtra(a,"parenStart",s.index),this.takeSurroundingComments(a,s.index,this.state.lastTokEndLoc.index),a;var i=this.startNodeAt(s);return i.expression=a,this.finishNode(i,"ParenthesizedExpression")},t.shouldParseArrow=function(s){return!this.canInsertSemicolon()},t.parseArrow=function(s){if(this.eat(19))return s},t.parseParenItem=function(s,a){return s},t.parseNewOrNewTarget=function(){var s=this.startNode();if(this.next(),this.match(16)){var a=this.createIdentifier(this.startNodeAtNode(s),"new");this.next();var i=this.parseMetaProperty(s,a,"target");return!this.scope.inNonArrowFunction&&!this.scope.inClass&&!this.options.allowNewTargetOutsideFunction&&this.raise(oe.UnexpectedNewTarget,i),i}return this.parseNew(s)},t.parseNew=function(s){if(this.parseNewCallee(s),this.eat(10)){var a=this.parseExprList(11);this.toReferencedList(a),s.arguments=a}else s.arguments=[];return this.finishNode(s,"NewExpression")},t.parseNewCallee=function(s){var a=this.match(83),i=this.parseNoCallExpr();s.callee=i,a&&(i.type==="Import"||i.type==="ImportExpression")&&this.raise(oe.ImportCallNotNewExpression,i)},t.parseTemplateElement=function(s){var a=this.state,i=a.start,o=a.startLoc,u=a.end,d=a.value,l=i+1,c=this.startNodeAt(jt(o,1));d===null&&(s||this.raise(oe.InvalidEscapeSequenceTemplate,jt(this.state.firstInvalidTemplateEscapePos,1)));var x=this.match(24),f=x?-1:-2,D=u+f;c.value={raw:this.input.slice(l,D).replace(/\r\n?/g,` |
| 26 | `),cooked:d===null?null:d.slice(1,f)},c.tail=x,this.next();var g=this.finishNode(c,"TemplateElement");return this.resetEndLocation(g,jt(this.state.lastTokEndLoc,f)),g},t.parseTemplate=function(s){var a=this.startNode();a.expressions=[];var i=this.parseTemplateElement(s);for(a.quasis=[i];!i.tail;)a.expressions.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),a.quasis.push(i=this.parseTemplateElement(s));return this.finishNode(a,"TemplateLiteral")},t.parseTemplateSubstitution=function(){return this.parseExpression()},t.parseObjectLike=function(s,a,i,o){i&&this.expectPlugin("recordAndTuple");var u=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;var d=Object.create(null),l=!0,c=this.startNode();for(c.properties=[],this.next();!this.match(s);){if(l)l=!1;else if(this.expect(12),this.match(s)){this.addTrailingCommaExtraToNode(c);break}var x=void 0;a?x=this.parseBindingProperty():(x=this.parsePropertyDefinition(o),this.checkProto(x,i,d,o)),i&&!this.isObjectProperty(x)&&x.type!=="SpreadElement"&&this.raise(oe.InvalidRecordProperty,x),x.shorthand&&this.addExtra(x,"shorthand",!0),c.properties.push(x)}this.next(),this.state.inFSharpPipelineDirectBody=u;var f="ObjectExpression";return a?f="ObjectPattern":i&&(f="RecordExpression"),this.finishNode(c,f)},t.addTrailingCommaExtraToNode=function(s){this.addExtra(s,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(s,"trailingCommaLoc",this.state.lastTokStartLoc,!1)},t.maybeAsyncOrAccessorProp=function(s){return!s.computed&&s.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))},t.parsePropertyDefinition=function(s){var a=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(oe.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)a.push(this.parseDecorator());var i=this.startNode(),o=!1,u=!1,d;if(this.match(21))return a.length&&this.unexpected(),this.parseSpread();a.length&&(i.decorators=a,a=[]),i.method=!1,s&&(d=this.state.startLoc);var l=this.eat(55);this.parsePropertyNamePrefixOperator(i);var c=this.state.containsEsc,x=this.parsePropertyName(i,s);if(!l&&!c&&this.maybeAsyncOrAccessorProp(i)){var f=x.name;f==="async"&&!this.hasPrecedingLineBreak()&&(o=!0,this.resetPreviousNodeTrailingComments(x),l=this.eat(55),this.parsePropertyName(i)),(f==="get"||f==="set")&&(u=!0,this.resetPreviousNodeTrailingComments(x),i.kind=f,this.match(55)&&(l=!0,this.raise(oe.AccessorIsGenerator,this.state.curPosition(),{kind:f}),this.next()),this.parsePropertyName(i))}return this.parseObjPropValue(i,d,l,o,!1,u,s)},t.getGetterSetterExpectedParamCount=function(s){return s.kind==="get"?0:1},t.getObjectOrClassMethodParams=function(s){return s.params},t.checkGetterSetterParams=function(s){var a,i=this.getGetterSetterExpectedParamCount(s),o=this.getObjectOrClassMethodParams(s);o.length!==i&&this.raise(s.kind==="get"?oe.BadGetterArity:oe.BadSetterArity,s),s.kind==="set"&&((a=o[o.length-1])==null?void 0:a.type)==="RestElement"&&this.raise(oe.BadSetterRestParameter,s)},t.parseObjectMethod=function(s,a,i,o,u){if(u){var d=this.parseMethod(s,a,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(d),d}if(i||a||this.match(10))return o&&this.unexpected(),s.kind="method",s.method=!0,this.parseMethod(s,a,i,!1,!1,"ObjectMethod")},t.parseObjectProperty=function(s,a,i,o){if(s.shorthand=!1,this.eat(14))return s.value=i?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowIn(o),this.finishNode(s,"ObjectProperty");if(!s.computed&&s.key.type==="Identifier"){if(this.checkReservedWord(s.key.name,s.key.loc.start,!0,!1),i)s.value=this.parseMaybeDefault(a,cn(s.key));else if(this.match(29)){var u=this.state.startLoc;o!=null?o.shorthandAssignLoc===null&&(o.shorthandAssignLoc=u):this.raise(oe.InvalidCoverInitializedName,u),s.value=this.parseMaybeDefault(a,cn(s.key))}else s.value=cn(s.key);return s.shorthand=!0,this.finishNode(s,"ObjectProperty")}},t.parseObjPropValue=function(s,a,i,o,u,d,l){var c=this.parseObjectMethod(s,i,o,u,d)||this.parseObjectProperty(s,a,u,l);return c||this.unexpected(),c},t.parsePropertyName=function(s,a){if(this.eat(0))s.computed=!0,s.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{var i=this.state,o=i.type,u=i.value,d;if(ba(o))d=this.parseIdentifier(!0);else switch(o){case 134:d=this.parseNumericLiteral(u);break;case 133:d=this.parseStringLiteral(u);break;case 135:d=this.parseBigIntLiteral(u);break;case 136:d=this.parseDecimalLiteral(u);break;case 138:{var l=this.state.startLoc;a!=null?a.privateKeyLoc===null&&(a.privateKeyLoc=l):this.raise(oe.UnexpectedPrivateField,l),d=this.parsePrivateName();break}default:this.unexpected()}s.key=d,o!==138&&(s.computed=!1)}return s.key},t.initFunction=function(s,a){s.id=null,s.generator=!1,s.async=a},t.parseMethod=function(s,a,i,o,u,d,l){l===void 0&&(l=!1),this.initFunction(s,i),s.generator=a,this.scope.enter(Fr.FUNCTION|Fr.SUPER|(l?Fr.CLASS:0)|(u?Fr.DIRECT_SUPER:0)),this.prodParam.enter(il(i,s.generator)),this.parseFunctionParams(s,o);var c=this.parseFunctionBodyAndFinish(s,d,!0);return this.prodParam.exit(),this.scope.exit(),c},t.parseArrayLike=function(s,a,i,o){i&&this.expectPlugin("recordAndTuple");var u=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;var d=this.startNode();return this.next(),d.elements=this.parseExprList(s,!i,o,d),this.state.inFSharpPipelineDirectBody=u,this.finishNode(d,i?"TupleExpression":"ArrayExpression")},t.parseArrowExpression=function(s,a,i,o){this.scope.enter(Fr.FUNCTION|Fr.ARROW);var u=il(i,!1);!this.match(5)&&this.prodParam.hasIn&&(u|=ot.PARAM_IN),this.prodParam.enter(u),this.initFunction(s,i);var d=this.state.maybeInArrowParameters;return a&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(s,a,o)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(s,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=d,this.finishNode(s,"ArrowFunctionExpression")},t.setArrowFunctionParameters=function(s,a,i){this.toAssignableList(a,i,!1),s.params=a},t.parseFunctionBodyAndFinish=function(s,a,i){return i===void 0&&(i=!1),this.parseFunctionBody(s,!1,i),this.finishNode(s,a)},t.parseFunctionBody=function(s,a,i){var o=this;i===void 0&&(i=!1);var u=a&&!this.match(5);if(this.expressionScope.enter(R9()),u)s.body=this.parseMaybeAssign(),this.checkParams(s,!1,a,!1);else{var d=this.state.strict,l=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|ot.PARAM_RETURN),s.body=this.parseBlock(!0,!1,function(c){var x=!o.isSimpleParamList(s.params);c&&x&&o.raise(oe.IllegalLanguageModeDirective,(s.kind==="method"||s.kind==="constructor")&&s.key?s.key.loc.end:s);var f=!d&&o.state.strict;o.checkParams(s,!o.state.strict&&!a&&!i&&!x,a,f),o.state.strict&&s.id&&o.checkIdentifier(s.id,or.TYPE_OUTSIDE,f)}),this.prodParam.exit(),this.state.labels=l}this.expressionScope.exit()},t.isSimpleParameter=function(s){return s.type==="Identifier"},t.isSimpleParamList=function(s){for(var a=0,i=s.length;a<i;a++)if(!this.isSimpleParameter(s[a]))return!1;return!0},t.checkParams=function(s,a,i,o){o===void 0&&(o=!0);for(var u=!a&&new Set,d={type:"FormalParameters"},l=0,c=s.params;l<c.length;l++){var x=c[l];this.checkLVal(x,{in:d,binding:or.TYPE_VAR,checkClashes:u,strictModeChanged:o})}},t.parseExprList=function(s,a,i,o){for(var u=[],d=!0;!this.eat(s);){if(d)d=!1;else if(this.expect(12),this.match(s)){o&&this.addTrailingCommaExtraToNode(o),this.next();break}u.push(this.parseExprListItem(a,i))}return u},t.parseExprListItem=function(s,a,i){var o;if(this.match(12))s||this.raise(oe.UnexpectedToken,this.state.curPosition(),{unexpected:","}),o=null;else if(this.match(21)){var u=this.state.startLoc;o=this.parseParenItem(this.parseSpread(a),u)}else if(this.match(17)){this.expectPlugin("partialApplication"),i||this.raise(oe.UnexpectedArgumentPlaceholder,this.state.startLoc);var d=this.startNode();this.next(),o=this.finishNode(d,"ArgumentPlaceholder")}else o=this.parseMaybeAssignAllowIn(a,this.parseParenItem);return o},t.parseIdentifier=function(s){var a=this.startNode(),i=this.parseIdentifierName(s);return this.createIdentifier(a,i)},t.createIdentifier=function(s,a){return s.name=a,s.loc.identifierName=a,this.finishNode(s,"Identifier")},t.parseIdentifierName=function(s){var a,i=this.state,o=i.startLoc,u=i.type;ba(u)?a=this.state.value:this.unexpected();var d=$pe(u);return s?d&&this.replaceToken(132):this.checkReservedWord(a,o,d,!1),this.next(),a},t.checkReservedWord=function(s,a,i,o){if(!(s.length>10)&&Zpe(s)){if(i&&Z0(s)){this.raise(oe.UnexpectedKeyword,a,{keyword:s});return}var u=this.state.strict?o?ER:Q0:DD;if(u(s,this.inModule)){this.raise(oe.UnexpectedReservedWord,a,{reservedWord:s});return}else if(s==="yield"){if(this.prodParam.hasYield){this.raise(oe.YieldBindingIdentifier,a);return}}else if(s==="await"){if(this.prodParam.hasAwait){this.raise(oe.AwaitBindingIdentifier,a);return}if(this.scope.inStaticBlock){this.raise(oe.AwaitBindingIdentifierInStaticBlock,a);return}this.expressionScope.recordAsyncArrowParametersError(a)}else if(s==="arguments"&&this.scope.inClassAndNotInNonArrowFunction){this.raise(oe.ArgumentsInClass,a);return}}},t.isAwaitAllowed=function(){return!!(this.prodParam.hasAwait||this.options.allowAwaitOutsideFunction&&!this.scope.inFunction)},t.parseAwait=function(s){var a=this.startNodeAt(s);return this.expressionScope.recordParameterInitializerError(oe.AwaitExpressionFormalParameter,a),this.eat(55)&&this.raise(oe.ObsoleteAwaitStar,a),!this.scope.inFunction&&!this.options.allowAwaitOutsideFunction&&(this.isAmbiguousAwait()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(a.argument=this.parseMaybeUnary(null,!0)),this.finishNode(a,"AwaitExpression")},t.isAmbiguousAwait=function(){if(this.hasPrecedingLineBreak())return!0;var s=this.state.type;return s===53||s===10||s===0||tl(s)||s===102&&!this.state.containsEsc||s===137||s===56||this.hasPlugin("v8intrinsic")&&s===54},t.parseYield=function(){var s=this.startNode();this.expressionScope.recordParameterInitializerError(oe.YieldInParameter,s),this.next();var a=!1,i=null;if(!this.hasPrecedingLineBreak())switch(a=this.eat(55),this.state.type){case 13:case 139:case 8:case 11:case 3:case 9:case 14:case 12:if(!a)break;default:i=this.parseMaybeAssign()}return s.delegate=a,s.argument=i,this.finishNode(s,"YieldExpression")},t.parseImportCall=function(s){return this.next(),s.source=this.parseMaybeAssignAllowIn(),(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))&&(s.options=null),this.eat(12)&&(this.expectImportAttributesPlugin(),this.match(11)||(s.options=this.parseMaybeAssignAllowIn(),this.eat(12))),this.expect(11),this.finishNode(s,"ImportExpression")},t.checkPipelineAtInfixOperator=function(s,a){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&s.type==="SequenceExpression"&&this.raise(oe.PipelineHeadSequenceExpression,a)},t.parseSmartPipelineBodyInStyle=function(s,a){if(this.isSimpleReference(s)){var i=this.startNodeAt(a);return i.callee=s,this.finishNode(i,"PipelineBareFunction")}else{var o=this.startNodeAt(a);return this.checkSmartPipeTopicBodyEarlyErrors(a),o.expression=s,this.finishNode(o,"PipelineTopicExpression")}},t.isSimpleReference=function(s){switch(s.type){case"MemberExpression":return!s.computed&&this.isSimpleReference(s.object);case"Identifier":return!0;default:return!1}},t.checkSmartPipeTopicBodyEarlyErrors=function(s){if(this.match(19))throw this.raise(oe.PipelineBodyNoArrow,this.state.startLoc);this.topicReferenceWasUsedInCurrentContext()||this.raise(oe.PipelineTopicUnused,s)},t.withTopicBindingContext=function(s){var a=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return s()}finally{this.state.topicContext=a}},t.withSmartMixTopicForbiddingContext=function(s){if(this.hasPlugin(["pipelineOperator",{proposal:"smart"}])){var a=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return s()}finally{this.state.topicContext=a}}else return s()},t.withSoloAwaitPermittingContext=function(s){var a=this.state.soloAwait;this.state.soloAwait=!0;try{return s()}finally{this.state.soloAwait=a}},t.allowInAnd=function(s){var a=this.prodParam.currentFlags(),i=ot.PARAM_IN&~a;if(i){this.prodParam.enter(a|ot.PARAM_IN);try{return s()}finally{this.prodParam.exit()}}return s()},t.disallowInAnd=function(s){var a=this.prodParam.currentFlags(),i=ot.PARAM_IN&a;if(i){this.prodParam.enter(a&~ot.PARAM_IN);try{return s()}finally{this.prodParam.exit()}}return s()},t.registerTopicReference=function(){this.state.topicContext.maxTopicIndex=0},t.topicReferenceIsAllowedInCurrentContext=function(){return this.state.topicContext.maxNumOfResolvableTopics>=1},t.topicReferenceWasUsedInCurrentContext=function(){return this.state.topicContext.maxTopicIndex!=null&&this.state.topicContext.maxTopicIndex>=0},t.parseFSharpPipelineBody=function(s){var a=this.state.startLoc;this.state.potentialArrowAt=this.state.start;var i=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;var o=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),a,s);return this.state.inFSharpPipelineDirectBody=i,o},t.parseModuleExpression=function(){this.expectPlugin("moduleBlocks");var s=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);var a=this.startNodeAt(this.state.endLoc);this.next();var i=this.initializeScopes(!0);this.enterInitialScopes();try{s.body=this.parseProgram(a,8,"module")}finally{i()}return this.finishNode(s,"ModuleExpression")},t.parsePropertyNamePrefixOperator=function(s){},Qe(r)}(P1e),j1={kind:xu.Loop},K1e={kind:xu.Switch},Vt={Expression:0,Declaration:1,HangingDeclaration:2,NullableId:4,Async:8},Pt={StatementOnly:0,AllowImportExport:1,AllowDeclaration:2,AllowFunctionDeclaration:4,AllowLabeledFunction:8},z1e=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,T1=new RegExp("in(?:stanceof)?","y");function Y1e(e,r){for(var t=0;t<e.length;t++){var n=e[t],s=n.type;if(typeof s=="number"){{if(s===138){var a=n.loc,i=n.start,o=n.value,u=n.end,d=i+1,l=jt(a.start,1);e.splice(t,1,new Xn({type:ln(27),value:"#",start:i,end:d,startLoc:a.start,endLoc:l}),new Xn({type:ln(132),value:o,start:d,end:u,startLoc:l,endLoc:a.end})),t++;continue}if(tl(s)){var c=n.loc,x=n.start,f=n.value,D=n.end,g=x+1,p=jt(c.start,1),F=void 0;r.charCodeAt(x)===96?F=new Xn({type:ln(22),value:"`",start:x,end:g,startLoc:c.start,endLoc:p}):F=new Xn({type:ln(8),value:"}",start:x,end:g,startLoc:c.start,endLoc:p});var m=void 0,E=void 0,h=void 0,v=void 0;s===24?(E=D-1,h=jt(c.end,-1),m=f===null?null:f.slice(1,-1),v=new Xn({type:ln(22),value:"`",start:E,end:D,startLoc:h,endLoc:c.end})):(E=D-2,h=jt(c.end,-2),m=f===null?null:f.slice(1,-2),v=new Xn({type:ln(23),value:"${",start:E,end:D,startLoc:h,endLoc:c.end})),e.splice(t,1,F,new Xn({type:ln(20),value:m,start:g,end:E,startLoc:p,endLoc:h}),v),t+=2;continue}}n.type=ln(s)}}return e}var X1e=function(e){nt(r,e);function r(){return e.apply(this,arguments)||this}var t=r.prototype;return t.parseTopLevel=function(s,a){return s.program=this.parseProgram(a),s.comments=this.comments,this.options.tokens&&(s.tokens=Y1e(this.tokens,this.input)),this.finishNode(s,"File")},t.parseProgram=function(s,a,i){if(a===void 0&&(a=139),i===void 0&&(i=this.options.sourceType),s.sourceType=i,s.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(s,!0,!0,a),this.inModule&&!this.options.allowUndeclaredExports&&this.scope.undefinedExports.size>0)for(var o=0,u=Array.from(this.scope.undefinedExports);o<u.length;o++){var d=u[o],l=d[0],c=d[1];this.raise(oe.ModuleExportUndefined,c,{localName:l})}var x;return a===139?x=this.finishNode(s,"Program"):x=this.finishNodeAt(s,"Program",jt(this.state.startLoc,-1)),x},t.stmtToDirective=function(s){var a=s;a.type="Directive",a.value=a.expression,delete a.expression;var i=a.value,o=i.value,u=this.input.slice(i.start,i.end),d=i.value=u.slice(1,-1);return this.addExtra(i,"raw",u),this.addExtra(i,"rawValue",d),this.addExtra(i,"expressionValue",o),i.type="DirectiveLiteral",a},t.parseInterpreterDirective=function(){if(!this.match(28))return null;var s=this.startNode();return s.value=this.state.value,this.next(),this.finishNode(s,"InterpreterDirective")},t.isLet=function(){return this.isContextual(100)?this.hasFollowingBindingAtom():!1},t.chStartsBindingIdentifier=function(s,a){if(Ma(s)){if(T1.lastIndex=a,T1.test(this.input)){var i=this.codePointAtPos(T1.lastIndex);if(!Nn(i)&&i!==92)return!1}return!0}else return s===92},t.chStartsBindingPattern=function(s){return s===91||s===123},t.hasFollowingBindingAtom=function(){var s=this.nextTokenStart(),a=this.codePointAtPos(s);return this.chStartsBindingPattern(a)||this.chStartsBindingIdentifier(a,s)},t.hasInLineFollowingBindingIdentifier=function(){var s=this.nextTokenInLineStart(),a=this.codePointAtPos(s);return this.chStartsBindingIdentifier(a,s)},t.startsUsingForOf=function(){var s=this.lookahead(),a=s.type,i=s.containsEsc;if(a===102&&!i)return!1;if(Nr(a)&&!this.hasFollowingLineBreak())return this.expectPlugin("explicitResourceManagement"),!0},t.startsAwaitUsing=function(){var s=this.nextTokenInLineStart();if(this.isUnparsedContextual(s,"using")){s=this.nextTokenInLineStartSince(s+5);var a=this.codePointAtPos(s);if(this.chStartsBindingIdentifier(a,s))return this.expectPlugin("explicitResourceManagement"),!0}return!1},t.parseModuleItem=function(){return this.parseStatementLike(Pt.AllowImportExport|Pt.AllowDeclaration|Pt.AllowFunctionDeclaration|Pt.AllowLabeledFunction)},t.parseStatementListItem=function(){return this.parseStatementLike(Pt.AllowDeclaration|Pt.AllowFunctionDeclaration|(!this.options.annexB||this.state.strict?0:Pt.AllowLabeledFunction))},t.parseStatementOrSloppyAnnexBFunctionDeclaration=function(s){s===void 0&&(s=!1);var a=Pt.StatementOnly;return this.options.annexB&&!this.state.strict&&(a|=Pt.AllowFunctionDeclaration,s&&(a|=Pt.AllowLabeledFunction)),this.parseStatementLike(a)},t.parseStatement=function(){return this.parseStatementLike(Pt.StatementOnly)},t.parseStatementLike=function(s){var a=null;return this.match(26)&&(a=this.parseDecorators(!0)),this.parseStatementContent(s,a)},t.parseStatementContent=function(s,a){var i=this.state.type,o=this.startNode(),u=!!(s&Pt.AllowDeclaration),d=!!(s&Pt.AllowFunctionDeclaration),l=s&Pt.AllowImportExport;switch(i){case 60:return this.parseBreakContinueStatement(o,!0);case 63:return this.parseBreakContinueStatement(o,!1);case 64:return this.parseDebuggerStatement(o);case 90:return this.parseDoWhileStatement(o);case 91:return this.parseForStatement(o);case 68:if(this.lookaheadCharCode()===46)break;return d||this.raise(this.state.strict?oe.StrictFunction:this.options.annexB?oe.SloppyFunctionAnnexB:oe.SloppyFunction,this.state.startLoc),this.parseFunctionStatement(o,!1,!u&&d);case 80:return u||this.unexpected(),this.parseClass(this.maybeTakeDecorators(a,o),!0);case 69:return this.parseIfStatement(o);case 70:return this.parseReturnStatement(o);case 71:return this.parseSwitchStatement(o);case 72:return this.parseThrowStatement(o);case 73:return this.parseTryStatement(o);case 96:if(!this.state.containsEsc&&this.startsAwaitUsing())return this.isAwaitAllowed()?u||this.raise(oe.UnexpectedLexicalDeclaration,o):this.raise(oe.AwaitUsingNotInAsyncContext,o),this.next(),this.parseVarStatement(o,"await using");break;case 107:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifier())break;return this.expectPlugin("explicitResourceManagement"),!this.scope.inModule&&this.scope.inTopLevel?this.raise(oe.UnexpectedUsingDeclaration,this.state.startLoc):u||this.raise(oe.UnexpectedLexicalDeclaration,this.state.startLoc),this.parseVarStatement(o,"using");case 100:{if(this.state.containsEsc)break;var c=this.nextTokenStart(),x=this.codePointAtPos(c);if(x!==91&&(!u&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(x,c)&&x!==123))break}case 75:u||this.raise(oe.UnexpectedLexicalDeclaration,this.state.startLoc);case 74:{var f=this.state.value;return this.parseVarStatement(o,f)}case 92:return this.parseWhileStatement(o);case 76:return this.parseWithStatement(o);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(o);case 83:{var D=this.lookaheadCharCode();if(D===40||D===46)break}case 82:{!this.options.allowImportExportEverywhere&&!l&&this.raise(oe.UnexpectedImportExport,this.state.startLoc),this.next();var g;return i===83?(g=this.parseImport(o),g.type==="ImportDeclaration"&&(!g.importKind||g.importKind==="value")&&(this.sawUnambiguousESM=!0)):(g=this.parseExport(o,a),(g.type==="ExportNamedDeclaration"&&(!g.exportKind||g.exportKind==="value")||g.type==="ExportAllDeclaration"&&(!g.exportKind||g.exportKind==="value")||g.type==="ExportDefaultDeclaration")&&(this.sawUnambiguousESM=!0)),this.assertModuleNodeAllowed(g),g}default:if(this.isAsyncFunction())return u||this.raise(oe.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(o,!0,!u&&d)}var p=this.state.value,F=this.parseExpression();return Nr(i)&&F.type==="Identifier"&&this.eat(14)?this.parseLabeledStatement(o,p,F,s):this.parseExpressionStatement(o,F,a)},t.assertModuleNodeAllowed=function(s){!this.options.allowImportExportEverywhere&&!this.inModule&&this.raise(oe.ImportOutsideModule,s)},t.decoratorsEnabledBeforeExport=function(){return this.hasPlugin("decorators-legacy")?!0:this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")!==!1},t.maybeTakeDecorators=function(s,a,i){if(s){if(a.decorators&&a.decorators.length>0){var o;typeof this.getPluginOption("decorators","decoratorsBeforeExport")!="boolean"&&this.raise(oe.DecoratorsBeforeAfterExport,a.decorators[0]),(o=a.decorators).unshift.apply(o,s)}else a.decorators=s;this.resetStartLocationFromNode(a,s[0]),i&&this.resetStartLocationFromNode(i,a)}return a},t.canHaveLeadingDecorator=function(){return this.match(80)},t.parseDecorators=function(s){var a=[];do a.push(this.parseDecorator());while(this.match(26));if(this.match(82))s||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(oe.DecoratorExportClass,this.state.startLoc);else if(!this.canHaveLeadingDecorator())throw this.raise(oe.UnexpectedLeadingDecorator,this.state.startLoc);return a},t.parseDecorator=function(){this.expectOnePlugin(["decorators","decorators-legacy"]);var s=this.startNode();if(this.next(),this.hasPlugin("decorators")){var a=this.state.startLoc,i;if(this.match(10)){var o=this.state.startLoc;this.next(),i=this.parseExpression(),this.expect(11),i=this.wrapParenthesis(o,i);var u=this.state.startLoc;s.expression=this.parseMaybeDecoratorArguments(i),this.getPluginOption("decorators","allowCallParenthesized")===!1&&s.expression!==i&&this.raise(oe.DecoratorArgumentsOutsideParentheses,u)}else{for(i=this.parseIdentifier(!1);this.eat(16);){var d=this.startNodeAt(a);d.object=i,this.match(138)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),d.property=this.parsePrivateName()):d.property=this.parseIdentifier(!0),d.computed=!1,i=this.finishNode(d,"MemberExpression")}s.expression=this.parseMaybeDecoratorArguments(i)}}else s.expression=this.parseExprSubscripts();return this.finishNode(s,"Decorator")},t.parseMaybeDecoratorArguments=function(s){if(this.eat(10)){var a=this.startNodeAtNode(s);return a.callee=s,a.arguments=this.parseCallExpressionArguments(11,!1),this.toReferencedList(a.arguments),this.finishNode(a,"CallExpression")}return s},t.parseBreakContinueStatement=function(s,a){return this.next(),this.isLineTerminator()?s.label=null:(s.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(s,a),this.finishNode(s,a?"BreakStatement":"ContinueStatement")},t.verifyBreakContinue=function(s,a){var i;for(i=0;i<this.state.labels.length;++i){var o=this.state.labels[i];if((s.label==null||o.name===s.label.name)&&(o.kind!=null&&(a||o.kind===xu.Loop)||s.label&&a))break}if(i===this.state.labels.length){var u=a?"BreakStatement":"ContinueStatement";this.raise(oe.IllegalBreakContinue,s,{type:u})}},t.parseDebuggerStatement=function(s){return this.next(),this.semicolon(),this.finishNode(s,"DebuggerStatement")},t.parseHeaderExpression=function(){this.expect(10);var s=this.parseExpression();return this.expect(11),s},t.parseDoWhileStatement=function(s){var a=this;return this.next(),this.state.labels.push(j1),s.body=this.withSmartMixTopicForbiddingContext(function(){return a.parseStatement()}),this.state.labels.pop(),this.expect(92),s.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(s,"DoWhileStatement")},t.parseForStatement=function(s){this.next(),this.state.labels.push(j1);var a=null;if(this.isAwaitAllowed()&&this.eatContextual(96)&&(a=this.state.lastTokStartLoc),this.scope.enter(Fr.OTHER),this.expect(10),this.match(13))return a!==null&&this.unexpected(a),this.parseFor(s,null);var i=this.isContextual(100);{var o=this.isContextual(96)&&this.startsAwaitUsing(),u=o||this.isContextual(107)&&this.startsUsingForOf(),d=i&&this.hasFollowingBindingAtom()||u;if(this.match(74)||this.match(75)||d){var l=this.startNode(),c;o?(c="await using",this.isAwaitAllowed()||this.raise(oe.AwaitUsingNotInAsyncContext,this.state.startLoc),this.next()):c=this.state.value,this.next(),this.parseVar(l,!0,c);var x=this.finishNode(l,"VariableDeclaration"),f=this.match(58);return f&&u&&this.raise(oe.ForInUsing,x),(f||this.isContextual(102))&&x.declarations.length===1?this.parseForIn(s,x,a):(a!==null&&this.unexpected(a),this.parseFor(s,x))}}var D=this.isContextual(95),g=new ol,p=this.parseExpression(!0,g),F=this.isContextual(102);if(F&&(i&&this.raise(oe.ForOfLet,p),a===null&&D&&p.type==="Identifier"&&this.raise(oe.ForOfAsync,p)),F||this.match(58)){this.checkDestructuringPrivate(g),this.toAssignable(p,!0);var m=F?"ForOfStatement":"ForInStatement";return this.checkLVal(p,{in:{type:m}}),this.parseForIn(s,p,a)}else this.checkExpressionErrors(g,!0);return a!==null&&this.unexpected(a),this.parseFor(s,p)},t.parseFunctionStatement=function(s,a,i){return this.next(),this.parseFunction(s,Vt.Declaration|(i?Vt.HangingDeclaration:0)|(a?Vt.Async:0))},t.parseIfStatement=function(s){return this.next(),s.test=this.parseHeaderExpression(),s.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),s.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(s,"IfStatement")},t.parseReturnStatement=function(s){return!this.prodParam.hasReturn&&!this.options.allowReturnOutsideFunction&&this.raise(oe.IllegalReturn,this.state.startLoc),this.next(),this.isLineTerminator()?s.argument=null:(s.argument=this.parseExpression(),this.semicolon()),this.finishNode(s,"ReturnStatement")},t.parseSwitchStatement=function(s){this.next(),s.discriminant=this.parseHeaderExpression();var a=s.cases=[];this.expect(5),this.state.labels.push(K1e),this.scope.enter(Fr.OTHER);for(var i,o;!this.match(8);)if(this.match(61)||this.match(65)){var u=this.match(61);i&&this.finishNode(i,"SwitchCase"),a.push(i=this.startNode()),i.consequent=[],this.next(),u?i.test=this.parseExpression():(o&&this.raise(oe.MultipleDefaultsInSwitch,this.state.lastTokStartLoc),o=!0,i.test=null),this.expect(14)}else i?i.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),i&&this.finishNode(i,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(s,"SwitchStatement")},t.parseThrowStatement=function(s){return this.next(),this.hasPrecedingLineBreak()&&this.raise(oe.NewlineAfterThrow,this.state.lastTokEndLoc),s.argument=this.parseExpression(),this.semicolon(),this.finishNode(s,"ThrowStatement")},t.parseCatchClauseParam=function(){var s=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&s.type==="Identifier"?Fr.SIMPLE_CATCH:0),this.checkLVal(s,{in:{type:"CatchClause"},binding:or.TYPE_CATCH_PARAM}),s},t.parseTryStatement=function(s){var a=this;if(this.next(),s.block=this.parseBlock(),s.handler=null,this.match(62)){var i=this.startNode();this.next(),this.match(10)?(this.expect(10),i.param=this.parseCatchClauseParam(),this.expect(11)):(i.param=null,this.scope.enter(Fr.OTHER)),i.body=this.withSmartMixTopicForbiddingContext(function(){return a.parseBlock(!1,!1)}),this.scope.exit(),s.handler=this.finishNode(i,"CatchClause")}return s.finalizer=this.eat(67)?this.parseBlock():null,!s.handler&&!s.finalizer&&this.raise(oe.NoCatchOrFinally,s),this.finishNode(s,"TryStatement")},t.parseVarStatement=function(s,a,i){return i===void 0&&(i=!1),this.next(),this.parseVar(s,!1,a,i),this.semicolon(),this.finishNode(s,"VariableDeclaration")},t.parseWhileStatement=function(s){var a=this;return this.next(),s.test=this.parseHeaderExpression(),this.state.labels.push(j1),s.body=this.withSmartMixTopicForbiddingContext(function(){return a.parseStatement()}),this.state.labels.pop(),this.finishNode(s,"WhileStatement")},t.parseWithStatement=function(s){var a=this;return this.state.strict&&this.raise(oe.StrictWith,this.state.startLoc),this.next(),s.object=this.parseHeaderExpression(),s.body=this.withSmartMixTopicForbiddingContext(function(){return a.parseStatement()}),this.finishNode(s,"WithStatement")},t.parseEmptyStatement=function(s){return this.next(),this.finishNode(s,"EmptyStatement")},t.parseLabeledStatement=function(s,a,i,o){for(var u=0,d=this.state.labels;u<d.length;u++){var l=d[u];l.name===a&&this.raise(oe.LabelRedeclaration,i,{labelName:a})}for(var c=Wpe(this.state.type)?xu.Loop:this.match(71)?xu.Switch:null,x=this.state.labels.length-1;x>=0;x--){var f=this.state.labels[x];if(f.statementStart===s.start)f.statementStart=this.state.start,f.kind=c;else break}return this.state.labels.push({name:a,kind:c,statementStart:this.state.start}),s.body=o&Pt.AllowLabeledFunction?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),s.label=i,this.finishNode(s,"LabeledStatement")},t.parseExpressionStatement=function(s,a,i){return s.expression=a,this.semicolon(),this.finishNode(s,"ExpressionStatement")},t.parseBlock=function(s,a,i){s===void 0&&(s=!1),a===void 0&&(a=!0);var o=this.startNode();return s&&this.state.strictErrors.clear(),this.expect(5),a&&this.scope.enter(Fr.OTHER),this.parseBlockBody(o,s,!1,8,i),a&&this.scope.exit(),this.finishNode(o,"BlockStatement")},t.isValidDirective=function(s){return s.type==="ExpressionStatement"&&s.expression.type==="StringLiteral"&&!s.expression.extra.parenthesized},t.parseBlockBody=function(s,a,i,o,u){var d=s.body=[],l=s.directives=[];this.parseBlockOrModuleBlockBody(d,a?l:void 0,i,o,u)},t.parseBlockOrModuleBlockBody=function(s,a,i,o,u){for(var d=this.state.strict,l=!1,c=!1;!this.match(o);){var x=i?this.parseModuleItem():this.parseStatementListItem();if(a&&!c){if(this.isValidDirective(x)){var f=this.stmtToDirective(x);a.push(f),!l&&f.value.value==="use strict"&&(l=!0,this.setStrict(!0));continue}c=!0,this.state.strictErrors.clear()}s.push(x)}u?.call(this,l),d||this.setStrict(!1),this.next()},t.parseFor=function(s,a){var i=this;return s.init=a,this.semicolon(!1),s.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),s.update=this.match(11)?null:this.parseExpression(),this.expect(11),s.body=this.withSmartMixTopicForbiddingContext(function(){return i.parseStatement()}),this.scope.exit(),this.state.labels.pop(),this.finishNode(s,"ForStatement")},t.parseForIn=function(s,a,i){var o=this,u=this.match(58);return this.next(),u?i!==null&&this.unexpected(i):s.await=i!==null,a.type==="VariableDeclaration"&&a.declarations[0].init!=null&&(!u||!this.options.annexB||this.state.strict||a.kind!=="var"||a.declarations[0].id.type!=="Identifier")&&this.raise(oe.ForInOfLoopInitializer,a,{type:u?"ForInStatement":"ForOfStatement"}),a.type==="AssignmentPattern"&&this.raise(oe.InvalidLhs,a,{ancestor:{type:"ForStatement"}}),s.left=a,s.right=u?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),s.body=this.withSmartMixTopicForbiddingContext(function(){return o.parseStatement()}),this.scope.exit(),this.state.labels.pop(),this.finishNode(s,u?"ForInStatement":"ForOfStatement")},t.parseVar=function(s,a,i,o){o===void 0&&(o=!1);var u=s.declarations=[];for(s.kind=i;;){var d=this.startNode();if(this.parseVarId(d,i),d.init=this.eat(29)?a?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,d.init===null&&!o&&(d.id.type!=="Identifier"&&!(a&&(this.match(58)||this.isContextual(102)))?this.raise(oe.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"destructuring"}):(i==="const"||i==="using"||i==="await using")&&!(this.match(58)||this.isContextual(102))&&this.raise(oe.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:i})),u.push(this.finishNode(d,"VariableDeclarator")),!this.eat(12))break}return s},t.parseVarId=function(s,a){var i=this.parseBindingAtom();this.checkLVal(i,{in:{type:"VariableDeclarator"},binding:a==="var"?or.TYPE_VAR:or.TYPE_LEXICAL}),s.id=i},t.parseAsyncFunctionExpression=function(s){return this.parseFunction(s,Vt.Async)},t.parseFunction=function(s,a){var i=this;a===void 0&&(a=Vt.Expression);var o=a&Vt.HangingDeclaration,u=!!(a&Vt.Declaration),d=u&&!(a&Vt.NullableId),l=!!(a&Vt.Async);this.initFunction(s,l),this.match(55)&&(o&&this.raise(oe.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),s.generator=!0),u&&(s.id=this.parseFunctionId(d));var c=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(Fr.FUNCTION),this.prodParam.enter(il(l,s.generator)),u||(s.id=this.parseFunctionId()),this.parseFunctionParams(s,!1),this.withSmartMixTopicForbiddingContext(function(){i.parseFunctionBodyAndFinish(s,u?"FunctionDeclaration":"FunctionExpression")}),this.prodParam.exit(),this.scope.exit(),u&&!o&&this.registerFunctionStatementId(s),this.state.maybeInArrowParameters=c,s},t.parseFunctionId=function(s){return s||Nr(this.state.type)?this.parseIdentifier():null},t.parseFunctionParams=function(s,a){this.expect(10),this.expressionScope.enter(x1e()),s.params=this.parseBindingList(11,41,Qn.IS_FUNCTION_PARAMS|(a?Qn.IS_CONSTRUCTOR_PARAMS:0)),this.expressionScope.exit()},t.registerFunctionStatementId=function(s){s.id&&this.scope.declareName(s.id.name,!this.options.annexB||this.state.strict||s.generator||s.async?this.scope.treatFunctionsAsVar?or.TYPE_VAR:or.TYPE_LEXICAL:or.TYPE_FUNCTION,s.id.loc.start)},t.parseClass=function(s,a,i){this.next();var o=this.state.strict;return this.state.strict=!0,this.parseClassId(s,a,i),this.parseClassSuper(s),s.body=this.parseClassBody(!!s.superClass,o),this.finishNode(s,a?"ClassDeclaration":"ClassExpression")},t.isClassProperty=function(){return this.match(29)||this.match(13)||this.match(8)},t.isClassMethod=function(){return this.match(10)},t.isNonstaticConstructor=function(s){return!s.computed&&!s.static&&(s.key.name==="constructor"||s.key.value==="constructor")},t.parseClassBody=function(s,a){var i=this;this.classScope.enter();var o={hadConstructor:!1,hadSuperClass:s},u=[],d=this.startNode();if(d.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext(function(){for(;!i.match(8);){if(i.eat(13)){if(u.length>0)throw i.raise(oe.DecoratorSemicolon,i.state.lastTokEndLoc);continue}if(i.match(26)){u.push(i.parseDecorator());continue}var l=i.startNode();u.length&&(l.decorators=u,i.resetStartLocationFromNode(l,u[0]),u=[]),i.parseClassMember(d,l,o),l.kind==="constructor"&&l.decorators&&l.decorators.length>0&&i.raise(oe.DecoratorConstructor,l)}}),this.state.strict=a,this.next(),u.length)throw this.raise(oe.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(d,"ClassBody")},t.parseClassMemberFromModifier=function(s,a){var i=this.parseIdentifier(!0);if(this.isClassMethod()){var o=a;return o.kind="method",o.computed=!1,o.key=i,o.static=!1,this.pushClassMethod(s,o,!1,!1,!1,!1),!0}else if(this.isClassProperty()){var u=a;return u.computed=!1,u.key=i,u.static=!1,s.body.push(this.parseClassProperty(u)),!0}return this.resetPreviousNodeTrailingComments(i),!1},t.parseClassMember=function(s,a,i){var o=this.isContextual(106);if(o){if(this.parseClassMemberFromModifier(s,a))return;if(this.eat(5)){this.parseClassStaticBlock(s,a);return}}this.parseClassMemberWithIsStatic(s,a,i,o)},t.parseClassMemberWithIsStatic=function(s,a,i,o){var u=a,d=a,l=a,c=a,x=a,f=u,D=u;if(a.static=o,this.parsePropertyNamePrefixOperator(a),this.eat(55)){f.kind="method";var g=this.match(138);if(this.parseClassElementName(f),g){this.pushClassPrivateMethod(s,d,!0,!1);return}this.isNonstaticConstructor(u)&&this.raise(oe.ConstructorIsGenerator,u.key),this.pushClassMethod(s,u,!0,!1,!1,!1);return}var p=Nr(this.state.type)&&!this.state.containsEsc,F=this.match(138),m=this.parseClassElementName(a),E=this.state.startLoc;if(this.parsePostMemberNameModifiers(D),this.isClassMethod()){if(f.kind="method",F){this.pushClassPrivateMethod(s,d,!1,!1);return}var h=this.isNonstaticConstructor(u),v=!1;h&&(u.kind="constructor",i.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(oe.DuplicateConstructor,m),h&&this.hasPlugin("typescript")&&a.override&&this.raise(oe.OverrideOnConstructor,m),i.hadConstructor=!0,v=i.hadSuperClass),this.pushClassMethod(s,u,!1,!1,h,v)}else if(this.isClassProperty())F?this.pushClassPrivateProperty(s,c):this.pushClassProperty(s,l);else if(p&&m.name==="async"&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(m);var A=this.eat(55);D.optional&&this.unexpected(E),f.kind="method";var C=this.match(138);this.parseClassElementName(f),this.parsePostMemberNameModifiers(D),C?this.pushClassPrivateMethod(s,d,A,!0):(this.isNonstaticConstructor(u)&&this.raise(oe.ConstructorIsAsync,u.key),this.pushClassMethod(s,u,A,!0,!1,!1))}else if(p&&(m.name==="get"||m.name==="set")&&!(this.match(55)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(m),f.kind=m.name;var w=this.match(138);this.parseClassElementName(u),w?this.pushClassPrivateMethod(s,d,!1,!1):(this.isNonstaticConstructor(u)&&this.raise(oe.ConstructorIsAccessor,u.key),this.pushClassMethod(s,u,!1,!1,!1,!1)),this.checkGetterSetterParams(u)}else if(p&&m.name==="accessor"&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(m);var B=this.match(138);this.parseClassElementName(l),this.pushClassAccessorProperty(s,x,B)}else this.isLineTerminator()?F?this.pushClassPrivateProperty(s,c):this.pushClassProperty(s,l):this.unexpected()},t.parseClassElementName=function(s){var a=this.state,i=a.type,o=a.value;if((i===132||i===133)&&s.static&&o==="prototype"&&this.raise(oe.StaticPrototype,this.state.startLoc),i===138){o==="constructor"&&this.raise(oe.ConstructorClassPrivateField,this.state.startLoc);var u=this.parsePrivateName();return s.key=u,u}return this.parsePropertyName(s)},t.parseClassStaticBlock=function(s,a){var i;this.scope.enter(Fr.CLASS|Fr.STATIC_BLOCK|Fr.SUPER);var o=this.state.labels;this.state.labels=[],this.prodParam.enter(ot.PARAM);var u=a.body=[];this.parseBlockOrModuleBlockBody(u,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=o,s.body.push(this.finishNode(a,"StaticBlock")),(i=a.decorators)!=null&&i.length&&this.raise(oe.DecoratorStaticBlock,a)},t.pushClassProperty=function(s,a){!a.computed&&(a.key.name==="constructor"||a.key.value==="constructor")&&this.raise(oe.ConstructorClassField,a.key),s.body.push(this.parseClassProperty(a))},t.pushClassPrivateProperty=function(s,a){var i=this.parseClassPrivateProperty(a);s.body.push(i),this.classScope.declarePrivateName(this.getPrivateNameSV(i.key),ca.OTHER,i.key.loc.start)},t.pushClassAccessorProperty=function(s,a,i){if(!i&&!a.computed){var o=a.key;(o.name==="constructor"||o.value==="constructor")&&this.raise(oe.ConstructorClassField,o)}var u=this.parseClassAccessorProperty(a);s.body.push(u),i&&this.classScope.declarePrivateName(this.getPrivateNameSV(u.key),ca.OTHER,u.key.loc.start)},t.pushClassMethod=function(s,a,i,o,u,d){s.body.push(this.parseMethod(a,i,o,u,d,"ClassMethod",!0))},t.pushClassPrivateMethod=function(s,a,i,o){var u=this.parseMethod(a,i,o,!1,!1,"ClassPrivateMethod",!0);s.body.push(u);var d=u.kind==="get"?u.static?ca.STATIC_GETTER:ca.INSTANCE_GETTER:u.kind==="set"?u.static?ca.STATIC_SETTER:ca.INSTANCE_SETTER:ca.OTHER;this.declareClassPrivateMethodInScope(u,d)},t.declareClassPrivateMethodInScope=function(s,a){this.classScope.declarePrivateName(this.getPrivateNameSV(s.key),a,s.key.loc.start)},t.parsePostMemberNameModifiers=function(s){},t.parseClassPrivateProperty=function(s){return this.parseInitializer(s),this.semicolon(),this.finishNode(s,"ClassPrivateProperty")},t.parseClassProperty=function(s){return this.parseInitializer(s),this.semicolon(),this.finishNode(s,"ClassProperty")},t.parseClassAccessorProperty=function(s){return this.parseInitializer(s),this.semicolon(),this.finishNode(s,"ClassAccessorProperty")},t.parseInitializer=function(s){this.scope.enter(Fr.CLASS|Fr.SUPER),this.expressionScope.enter(R9()),this.prodParam.enter(ot.PARAM),s.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()},t.parseClassId=function(s,a,i,o){if(o===void 0&&(o=or.TYPE_CLASS),Nr(this.state.type))s.id=this.parseIdentifier(),a&&this.declareNameFromIdentifier(s.id,o);else if(i||!a)s.id=null;else throw this.raise(oe.MissingClassName,this.state.startLoc)},t.parseClassSuper=function(s){s.superClass=this.eat(81)?this.parseExprSubscripts():null},t.parseExport=function(s,a){var i=this.parseMaybeImportPhase(s,!0),o=this.maybeParseExportDefaultSpecifier(s,i),u=!o||this.eat(12),d=u&&this.eatExportStar(s),l=d&&this.maybeParseExportNamespaceSpecifier(s),c=u&&(!l||this.eat(12)),x=o||d;if(d&&!l){if(o&&this.unexpected(),a)throw this.raise(oe.UnsupportedDecoratorExport,s);return this.parseExportFrom(s,!0),this.finishNode(s,"ExportAllDeclaration")}var f=this.maybeParseExportNamedSpecifiers(s);o&&u&&!d&&!f&&this.unexpected(null,5),l&&c&&this.unexpected(null,98);var D;if(x||f){if(D=!1,a)throw this.raise(oe.UnsupportedDecoratorExport,s);this.parseExportFrom(s,x)}else D=this.maybeParseExportDeclaration(s);if(x||f||D){var g,p=s;if(this.checkExport(p,!0,!1,!!p.source),((g=p.declaration)==null?void 0:g.type)==="ClassDeclaration")this.maybeTakeDecorators(a,p.declaration,p);else if(a)throw this.raise(oe.UnsupportedDecoratorExport,s);return this.finishNode(p,"ExportNamedDeclaration")}if(this.eat(65)){var F=s,m=this.parseExportDefaultExpression();if(F.declaration=m,m.type==="ClassDeclaration")this.maybeTakeDecorators(a,m,F);else if(a)throw this.raise(oe.UnsupportedDecoratorExport,s);return this.checkExport(F,!0,!0),this.finishNode(F,"ExportDefaultDeclaration")}this.unexpected(null,5)},t.eatExportStar=function(s){return this.eat(55)},t.maybeParseExportDefaultSpecifier=function(s,a){if(a||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",a?.loc.start);var i=a||this.parseIdentifier(!0),o=this.startNodeAtNode(i);return o.exported=i,s.specifiers=[this.finishNode(o,"ExportDefaultSpecifier")],!0}return!1},t.maybeParseExportNamespaceSpecifier=function(s){if(this.isContextual(93)){s.specifiers||(s.specifiers=[]);var a=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),a.exported=this.parseModuleExportName(),s.specifiers.push(this.finishNode(a,"ExportNamespaceSpecifier")),!0}return!1},t.maybeParseExportNamedSpecifiers=function(s){if(this.match(5)){var a;s.specifiers||(s.specifiers=[]);var i=s.exportKind==="type";return(a=s.specifiers).push.apply(a,this.parseExportSpecifiers(i)),s.source=null,s.declaration=null,this.hasPlugin("importAssertions")&&(s.assertions=[]),!0}return!1},t.maybeParseExportDeclaration=function(s){return this.shouldParseExportDeclaration()?(s.specifiers=[],s.source=null,this.hasPlugin("importAssertions")&&(s.assertions=[]),s.declaration=this.parseExportDeclaration(s),!0):!1},t.isAsyncFunction=function(){if(!this.isContextual(95))return!1;var s=this.nextTokenInLineStart();return this.isUnparsedContextual(s,"function")},t.parseExportDefaultExpression=function(){var s=this.startNode();if(this.match(68))return this.next(),this.parseFunction(s,Vt.Declaration|Vt.NullableId);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(s,Vt.Declaration|Vt.NullableId|Vt.Async);if(this.match(80))return this.parseClass(s,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(oe.DecoratorBeforeExport,this.state.startLoc),this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0);if(this.match(75)||this.match(74)||this.isLet())throw this.raise(oe.UnsupportedDefaultExport,this.state.startLoc);var a=this.parseMaybeAssignAllowIn();return this.semicolon(),a},t.parseExportDeclaration=function(s){if(this.match(80)){var a=this.parseClass(this.startNode(),!0,!1);return a}return this.parseStatementListItem()},t.isExportDefaultSpecifier=function(){var s=this.state.type;if(Nr(s)){if(s===95&&!this.state.containsEsc||s===100)return!1;if((s===130||s===129)&&!this.state.containsEsc){var a=this.lookahead(),i=a.type;if(Nr(i)&&i!==98||i===5)return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;var o=this.nextTokenStart(),u=this.isUnparsedContextual(o,"from");if(this.input.charCodeAt(o)===44||Nr(this.state.type)&&u)return!0;if(this.match(65)&&u){var d=this.input.charCodeAt(this.nextTokenStartSince(o+4));return d===34||d===39}return!1},t.parseExportFrom=function(s,a){this.eatContextual(98)?(s.source=this.parseImportSource(),this.checkExport(s),this.maybeParseImportAttributes(s),this.checkJSONModuleImport(s)):a&&this.unexpected(),this.semicolon()},t.shouldParseExportDeclaration=function(){var s=this.state.type;return s===26&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))?(this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(oe.DecoratorBeforeExport,this.state.startLoc),!0):s===74||s===75||s===68||s===80||this.isLet()||this.isAsyncFunction()},t.checkExport=function(s,a,i,o){if(a){var u;if(i){if(this.checkDuplicateExports(s,"default"),this.hasPlugin("exportDefaultFrom")){var d,l=s.declaration;l.type==="Identifier"&&l.name==="from"&&l.end-l.start===4&&!((d=l.extra)!=null&&d.parenthesized)&&this.raise(oe.ExportDefaultFromAsIdentifier,l)}}else if((u=s.specifiers)!=null&&u.length)for(var c=0,x=s.specifiers;c<x.length;c++){var f=x[c],D=f.exported,g=D.type==="Identifier"?D.name:D.value;if(this.checkDuplicateExports(f,g),!o&&f.local){var p=f.local;p.type!=="Identifier"?this.raise(oe.ExportBindingIsString,f,{localName:p.value,exportName:g}):(this.checkReservedWord(p.name,p.loc.start,!0,!1),this.scope.checkLocalExport(p))}}else if(s.declaration){if(s.declaration.type==="FunctionDeclaration"||s.declaration.type==="ClassDeclaration"){var F=s.declaration.id;if(!F)throw new Error("Assertion failure");this.checkDuplicateExports(s,F.name)}else if(s.declaration.type==="VariableDeclaration")for(var m=0,E=s.declaration.declarations;m<E.length;m++){var h=E[m];this.checkDeclaration(h.id)}}}},t.checkDeclaration=function(s){if(s.type==="Identifier")this.checkDuplicateExports(s,s.name);else if(s.type==="ObjectPattern")for(var a=0,i=s.properties;a<i.length;a++){var o=i[a];this.checkDeclaration(o)}else if(s.type==="ArrayPattern")for(var u=0,d=s.elements;u<d.length;u++){var l=d[u];l&&this.checkDeclaration(l)}else s.type==="ObjectProperty"?this.checkDeclaration(s.value):s.type==="RestElement"?this.checkDeclaration(s.argument):s.type==="AssignmentPattern"&&this.checkDeclaration(s.left)},t.checkDuplicateExports=function(s,a){this.exportedIdentifiers.has(a)&&(a==="default"?this.raise(oe.DuplicateDefaultExport,s):this.raise(oe.DuplicateExport,s,{exportName:a})),this.exportedIdentifiers.add(a)},t.parseExportSpecifiers=function(s){var a=[],i=!0;for(this.expect(5);!this.eat(8);){if(i)i=!1;else if(this.expect(12),this.eat(8))break;var o=this.isContextual(130),u=this.match(133),d=this.startNode();d.local=this.parseModuleExportName(),a.push(this.parseExportSpecifier(d,u,s,o))}return a},t.parseExportSpecifier=function(s,a,i,o){return this.eatContextual(93)?s.exported=this.parseModuleExportName():a?s.exported=m1e(s.local):s.exported||(s.exported=cn(s.local)),this.finishNode(s,"ExportSpecifier")},t.parseModuleExportName=function(){if(this.match(133)){var s=this.parseStringLiteral(this.state.value),a=s.value.match(z1e);return a&&this.raise(oe.ModuleExportNameHasLoneSurrogate,s,{surrogateCharCode:a[0].charCodeAt(0)}),s}return this.parseIdentifier(!0)},t.isJSONModuleImport=function(s){return s.assertions!=null?s.assertions.some(function(a){var i=a.key,o=a.value;return o.value==="json"&&(i.type==="Identifier"?i.name==="type":i.value==="type")}):!1},t.checkImportReflection=function(s){var a=s.specifiers,i=a.length===1?a[0].type:null;if(s.phase==="source")i!=="ImportDefaultSpecifier"&&this.raise(oe.SourcePhaseImportRequiresDefault,a[0].loc.start);else if(s.phase==="defer")i!=="ImportNamespaceSpecifier"&&this.raise(oe.DeferImportRequiresNamespace,a[0].loc.start);else if(s.module){var o;i!=="ImportDefaultSpecifier"&&this.raise(oe.ImportReflectionNotBinding,a[0].loc.start),((o=s.assertions)==null?void 0:o.length)>0&&this.raise(oe.ImportReflectionHasAssertion,a[0].loc.start)}},t.checkJSONModuleImport=function(s){if(this.isJSONModuleImport(s)&&s.type!=="ExportAllDeclaration"){var a=s.specifiers;if(a!=null){var i=a.find(function(o){var u;if(o.type==="ExportSpecifier"?u=o.local:o.type==="ImportSpecifier"&&(u=o.imported),u!==void 0)return u.type==="Identifier"?u.name!=="default":u.value!=="default"});i!==void 0&&this.raise(oe.ImportJSONBindingNotDefault,i.loc.start)}}},t.isPotentialImportPhase=function(s){return s?!1:this.isContextual(105)||this.isContextual(97)||this.isContextual(127)},t.applyImportPhase=function(s,a,i,o){a||(i==="module"?(this.expectPlugin("importReflection",o),s.module=!0):this.hasPlugin("importReflection")&&(s.module=!1),i==="source"?(this.expectPlugin("sourcePhaseImports",o),s.phase="source"):i==="defer"?(this.expectPlugin("deferredImportEvaluation",o),s.phase="defer"):this.hasPlugin("sourcePhaseImports")&&(s.phase=null))},t.parseMaybeImportPhase=function(s,a){if(!this.isPotentialImportPhase(a))return this.applyImportPhase(s,a,null),null;var i=this.parseIdentifier(!0),o=this.state.type,u=ba(o)?o!==98||this.lookaheadCharCode()===102:o!==12;return u?(this.resetPreviousIdentifierLeadingComments(i),this.applyImportPhase(s,a,i.name,i.loc.start),null):(this.applyImportPhase(s,a,null),i)},t.isPrecedingIdImportPhase=function(s){var a=this.state.type;return Nr(a)?a!==98||this.lookaheadCharCode()===102:a!==12},t.parseImport=function(s){return this.match(133)?this.parseImportSourceAndAttributes(s):this.parseImportSpecifiersAndAfter(s,this.parseMaybeImportPhase(s,!1))},t.parseImportSpecifiersAndAfter=function(s,a){s.specifiers=[];var i=this.maybeParseDefaultImportSpecifier(s,a),o=!i||this.eat(12),u=o&&this.maybeParseStarImportSpecifier(s);return o&&!u&&this.parseNamedImportSpecifiers(s),this.expectContextual(98),this.parseImportSourceAndAttributes(s)},t.parseImportSourceAndAttributes=function(s){var a;return(a=s.specifiers)!=null||(s.specifiers=[]),s.source=this.parseImportSource(),this.maybeParseImportAttributes(s),this.checkImportReflection(s),this.checkJSONModuleImport(s),this.semicolon(),this.finishNode(s,"ImportDeclaration")},t.parseImportSource=function(){return this.match(133)||this.unexpected(),this.parseExprAtom()},t.parseImportSpecifierLocal=function(s,a,i){a.local=this.parseIdentifier(),s.specifiers.push(this.finishImportSpecifier(a,i))},t.finishImportSpecifier=function(s,a,i){return i===void 0&&(i=or.TYPE_LEXICAL),this.checkLVal(s.local,{in:{type:a},binding:i}),this.finishNode(s,a)},t.parseImportAttributes=function(){this.expect(5);var s=[],a=new Set;do{if(this.match(8))break;var i=this.startNode(),o=this.state.value;if(a.has(o)&&this.raise(oe.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:o}),a.add(o),this.match(133)?i.key=this.parseStringLiteral(o):i.key=this.parseIdentifier(!0),this.expect(14),!this.match(133))throw this.raise(oe.ModuleAttributeInvalidValue,this.state.startLoc);i.value=this.parseStringLiteral(this.state.value),s.push(this.finishNode(i,"ImportAttribute"))}while(this.eat(12));return this.expect(8),s},t.parseModuleAttributes=function(){var s=[],a=new Set;do{var i=this.startNode();if(i.key=this.parseIdentifier(!0),i.key.name!=="type"&&this.raise(oe.ModuleAttributeDifferentFromType,i.key),a.has(i.key.name)&&this.raise(oe.ModuleAttributesWithDuplicateKeys,i.key,{key:i.key.name}),a.add(i.key.name),this.expect(14),!this.match(133))throw this.raise(oe.ModuleAttributeInvalidValue,this.state.startLoc);i.value=this.parseStringLiteral(this.state.value),s.push(this.finishNode(i,"ImportAttribute"))}while(this.eat(12));return s},t.maybeParseImportAttributes=function(s){var a,i=!1;if(this.match(76)){if(this.hasPrecedingLineBreak()&&this.lookaheadCharCode()===40)return;this.next(),this.hasPlugin("moduleAttributes")?a=this.parseModuleAttributes():(this.expectImportAttributesPlugin(),a=this.parseImportAttributes()),i=!0}else if(this.isContextual(94)&&!this.hasPrecedingLineBreak())this.hasPlugin("importAttributes")?(this.getPluginOption("importAttributes","deprecatedAssertSyntax")!==!0&&this.raise(oe.ImportAttributesUseAssert,this.state.startLoc),this.addExtra(s,"deprecatedAssertSyntax",!0)):this.expectOnePlugin(["importAttributes","importAssertions"]),this.next(),a=this.parseImportAttributes();else if(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))a=[];else if(this.hasPlugin("moduleAttributes"))a=[];else return;!i&&this.hasPlugin("importAssertions")?s.assertions=a:s.attributes=a},t.maybeParseDefaultImportSpecifier=function(s,a){if(a){var i=this.startNodeAtNode(a);return i.local=a,s.specifiers.push(this.finishImportSpecifier(i,"ImportDefaultSpecifier")),!0}else if(ba(this.state.type))return this.parseImportSpecifierLocal(s,this.startNode(),"ImportDefaultSpecifier"),!0;return!1},t.maybeParseStarImportSpecifier=function(s){if(this.match(55)){var a=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(s,a,"ImportNamespaceSpecifier"),!0}return!1},t.parseNamedImportSpecifiers=function(s){var a=!0;for(this.expect(5);!this.eat(8);){if(a)a=!1;else{if(this.eat(14))throw this.raise(oe.DestructureNamedImport,this.state.startLoc);if(this.expect(12),this.eat(8))break}var i=this.startNode(),o=this.match(133),u=this.isContextual(130);i.imported=this.parseModuleExportName();var d=this.parseImportSpecifier(i,o,s.importKind==="type"||s.importKind==="typeof",u,void 0);s.specifiers.push(d)}},t.parseImportSpecifier=function(s,a,i,o,u){if(this.eatContextual(93))s.local=this.parseIdentifier();else{var d=s.imported;if(a)throw this.raise(oe.ImportBindingIsString,s,{importName:d.value});this.checkReservedWord(d.name,s.loc.start,!0,!0),s.local||(s.local=cn(d))}return this.finishImportSpecifier(s,"ImportSpecifier",u)},t.isThisParam=function(s){return s.type==="Identifier"&&s.name==="this"},Qe(r)}(H1e),$9=function(e){nt(r,e);function r(n,s){var a;return n=V1e(n),a=e.call(this,n,s)||this,a.options=n,a.initializeScopes(),a.plugins=J1e(a.options.plugins),a.filename=n.sourceFilename,a}var t=r.prototype;return t.getScopeHandler=function(){return R1},t.parse=function(){this.enterInitialScopes();var s=this.startNode(),a=this.startNode();return this.nextToken(),s.errors=null,this.parseTopLevel(s,a),s.errors=this.state.errors,s.comments.length=this.state.commentsLen,s},Qe(r)}(X1e);function J1e(e){for(var r=new Map,t=0;t<e.length;t++){var n=e[t],s=Array.isArray(n)?n:[n,{}],a=s[0],i=s[1];r.has(a)||r.set(a,i||{})}return r}function fu(e,r){var t;if(((t=r)==null?void 0:t.sourceType)==="unambiguous"){r=Object.assign({},r);try{r.sourceType="module";var n=pu(r,e),s=n.parse();if(n.sawUnambiguousESM)return s;if(n.ambiguousScriptDifferentAst)try{return r.sourceType="script",pu(r,e).parse()}catch{}else s.program.sourceType="script";return s}catch(a){try{return r.sourceType="script",pu(r,e).parse()}catch{}throw a}}else return pu(r,e).parse()}function Q1e(e,r){var t=pu(r,e);return t.options.strictMode&&(t.state.strict=!0),t.getExpression()}function Z1e(e){for(var r={},t=0,n=Object.keys(e);t<n.length;t++){var s=n[t];r[s]=ln(e[s])}return r}var U9=Z1e(qpe);function pu(e,r){var t=$9;return e!=null&&e.plugins&&(G1e(e.plugins),t=ege(e.plugins)),new t(e,r)}var G9={};function ege(e){var r=W1e.filter(function(i){return ut(e,i)}),t=r.join("/"),n=G9[t];if(!n){n=$9;for(var s=0;s<r.length;s++){var a=r[s];n=q9[a](n)}G9[t]=n}return n}var rge=Object.freeze({__proto__:null,parse:fu,parseExpression:Q1e,tokTypes:U9}),tge=ze,age=Ve,nge=Z,sge={Scope:function(r,t){t.kind==="let"&&r.skip()},FunctionParent:function(r){r.skip()},VariableDeclaration:function(e){function r(t,n){return e.apply(this,arguments)}return r.toString=function(){return e.toString()},r}(function(e,r){if(!(r.kind&&e.node.kind!==r.kind)){for(var t=[],n=e.get("declarations"),s,a=J(n),i;!(i=a()).done;){var o=i.value;s=o.node.id,o.node.init&&t.push(age(tge("=",o.node.id,o.node.init)));for(var u=0,d=Object.keys(o.getBindingIdentifiers());u<d.length;u++){var l=d[u];r.emit(nge(l),l,o.node.init!==null)}}e.parentPath.isFor({left:e.node})?e.replaceWith(s):e.replaceWithMultiple(t)}})};function W9(e,r,t){t===void 0&&(t="var"),e.traverse(sge,{kind:t,emit:r})}var V9=YB,ige=va,H9=ze,oge=tn,uge=Br,P1=wi,dge=he,I1=L,lge=ra,cge=Ve,xge=Gt,Dge=Z,fge=vd,pge=Ap,gge=qn,Fge=Tn,K9=kx,z9=Na,mge=Ja,yge=_x,hge=Eo,Ege=Ca,Cge=Zr,vge=bp,Y9=et,Age=hr,X9=Mo,bge=Ai;function Rge(e){var r;this.resync(),e=this._verifyNodeList(e),fge(e[0],this.node),pge(e[e.length-1],this.node),(r=Zo(this.hub,this.parent))==null||r.delete(this.node),this.node=this.container[this.key]=null;var t=this.insertAfter(e);return this.node?this.requeue():this.remove(),t}function Bge(e){this.resync();var r;try{e="("+e+")",r=fu(e)}catch(s){var t=s.loc;throw t&&(s.message+=` - make sure this is an expression. |