gemi 0.4.78 → 0.4.80

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/dist/app/App.d.ts +5 -10
  2. package/dist/app/App.d.ts.map +1 -1
  3. package/dist/app/index.js +60 -60
  4. package/dist/bin/index.js +104 -75
  5. package/dist/broadcasting/BroadcastingChannel.d.ts +5 -0
  6. package/dist/broadcasting/BroadcastingChannel.d.ts.map +1 -0
  7. package/dist/broadcasting/index.js +2 -0
  8. package/dist/chunk-02ba977a552fd2da.js +18 -0
  9. package/dist/chunk-0ba2cc302113ab40.js +3 -0
  10. package/dist/{chunk-28c7d04b6f555350.js → chunk-1e6b656dc70ab1fd.js} +2 -2
  11. package/dist/{chunk-e3d242546d1a2927.js → chunk-24a86f8f5ddc0cbd.js} +1 -1
  12. package/dist/chunk-2786cd9024d0d164.js +2 -0
  13. package/dist/chunk-357d6f34be7eafaa.js +2 -0
  14. package/dist/chunk-5075c75a0b45f02c.js +2 -0
  15. package/dist/{chunk-20e12a96dfe36b97.js → chunk-53b7d6267c9172bc.js} +1 -1
  16. package/dist/chunk-55c7fe17750b0378.js +9 -0
  17. package/dist/chunk-5ddf530ee3afe1d4.js +2 -0
  18. package/dist/{chunk-4e37f45d636da627.js → chunk-6a97611e6bd65152.js} +2 -2
  19. package/dist/chunk-7d5fe4acabfee228.js +2 -0
  20. package/dist/{chunk-9631e167bae739a0.js → chunk-813a4c185ab4c0c0.js} +1 -1
  21. package/dist/chunk-81fb135d80e84b06.js +2 -0
  22. package/dist/chunk-8ee09f1f74206a04.js +2 -0
  23. package/dist/chunk-9475c6ed18013dc8.js +2 -0
  24. package/dist/chunk-a7246b5b3e2f2366.js +2 -0
  25. package/dist/chunk-aebf7df48200842b.js +2 -0
  26. package/dist/chunk-b3b228374e54f4ff.js +6 -0
  27. package/dist/chunk-c22e0fc22de0403a.js +2 -0
  28. package/dist/chunk-e1a9177afdc46b3b.js +2 -0
  29. package/dist/chunk-e834f558250dac89.js +2 -0
  30. package/dist/chunk-e910e2a8677bca82.js +2 -0
  31. package/dist/chunk-f47acd04bf65c5c9.js +2 -0
  32. package/dist/{chunk-5ea45ebea038bef4.js → chunk-f9f264ce0c8e9699.js} +2 -2
  33. package/dist/{chunk-4ad752c87b795617.js → chunk-ff8cd8fd047cfee5.js} +2 -2
  34. package/dist/client/ClientRouter.d.ts.map +1 -1
  35. package/dist/client/HttpReload.d.ts.map +1 -1
  36. package/dist/client/WebsocketContext.d.ts +10 -0
  37. package/dist/client/WebsocketContext.d.ts.map +1 -0
  38. package/dist/client/index.d.ts +2 -0
  39. package/dist/client/index.d.ts.map +1 -1
  40. package/dist/client/index.js +114 -13
  41. package/dist/client/useBroadcast.d.ts +4 -0
  42. package/dist/client/useBroadcast.d.ts.map +1 -0
  43. package/dist/client/useQuery.d.ts.map +1 -1
  44. package/dist/client/useSearchParams.d.ts +1 -1
  45. package/dist/client/useSearchParams.d.ts.map +1 -1
  46. package/dist/client/useSubscription.d.ts +5 -0
  47. package/dist/client/useSubscription.d.ts.map +1 -0
  48. package/dist/email/Email.d.ts +12 -5
  49. package/dist/email/Email.d.ts.map +1 -1
  50. package/dist/email/index.d.ts +0 -2
  51. package/dist/email/index.d.ts.map +1 -1
  52. package/dist/email/index.js +1 -1
  53. package/dist/facades/Auth.d.ts.map +1 -1
  54. package/dist/facades/Broadcast.d.ts +6 -0
  55. package/dist/facades/Broadcast.d.ts.map +1 -0
  56. package/dist/facades/Prefetch.d.ts.map +1 -1
  57. package/dist/facades/index.d.ts +1 -0
  58. package/dist/facades/index.d.ts.map +1 -1
  59. package/dist/facades/index.js +1 -1
  60. package/dist/http/ApiRouter.d.ts.map +1 -1
  61. package/dist/http/BroadcastingRouter.d.ts +8 -0
  62. package/dist/http/BroadcastingRouter.d.ts.map +1 -0
  63. package/dist/http/HttpRequest.d.ts.map +1 -1
  64. package/dist/http/index.js +1 -1
  65. package/dist/kernel/Kernel.d.ts +9 -3
  66. package/dist/kernel/Kernel.d.ts.map +1 -1
  67. package/dist/kernel/context.d.ts +4 -2
  68. package/dist/kernel/context.d.ts.map +1 -1
  69. package/dist/kernel/index.js +1 -2
  70. package/dist/server/index.js +5 -5
  71. package/dist/services/ServiceContainer.d.ts +7 -0
  72. package/dist/services/ServiceContainer.d.ts.map +1 -0
  73. package/dist/services/email/EmailServiceContainer.d.ts +8 -0
  74. package/dist/services/email/EmailServiceContainer.d.ts.map +1 -0
  75. package/dist/services/email/EmailServiceProvider.d.ts +9 -0
  76. package/dist/services/email/EmailServiceProvider.d.ts.map +1 -0
  77. package/dist/services/email/drivers/EmailDriver.d.ts +5 -0
  78. package/dist/services/email/drivers/EmailDriver.d.ts.map +1 -0
  79. package/dist/services/email/drivers/ResendDriver.d.ts +8 -0
  80. package/dist/services/email/drivers/ResendDriver.d.ts.map +1 -0
  81. package/dist/{email → services/email/drivers}/types.d.ts +2 -3
  82. package/dist/services/email/drivers/types.d.ts.map +1 -0
  83. package/dist/services/index.d.ts +5 -0
  84. package/dist/services/index.d.ts.map +1 -1
  85. package/dist/services/index.js +1 -1
  86. package/dist/services/pubsub/BroadcastingServiceContainer.d.ts +24 -0
  87. package/dist/services/pubsub/BroadcastingServiceContainer.d.ts.map +1 -0
  88. package/dist/services/pubsub/BroadcastingServiceProvider.d.ts +7 -0
  89. package/dist/services/pubsub/BroadcastingServiceProvider.d.ts.map +1 -0
  90. package/dist/services/pubsub/types.d.ts +6 -0
  91. package/dist/services/pubsub/types.d.ts.map +1 -0
  92. package/dist/utils/applyParams.d.ts +1 -1
  93. package/dist/utils/applyParams.d.ts.map +1 -1
  94. package/package.json +4 -2
  95. package/dist/chunk-168ace6fc79b185b.js +0 -2
  96. package/dist/chunk-1c56f79378e4123d.js +0 -2
  97. package/dist/chunk-269dd2cd89aa1c32.js +0 -2
  98. package/dist/chunk-30daf610f498e198.js +0 -6
  99. package/dist/chunk-3abc648638ed6645.js +0 -18
  100. package/dist/chunk-48b2990a93ae50b3.js +0 -2
  101. package/dist/chunk-52dd5453e79e1cef.js +0 -2
  102. package/dist/chunk-5c1c113b94101135.js +0 -2
  103. package/dist/chunk-5fb9d31b7b4629e9.js +0 -1
  104. package/dist/chunk-8bf925705fdcef0c.js +0 -2
  105. package/dist/chunk-9c05674e98ebc485.js +0 -2
  106. package/dist/chunk-a5da5f8d6f9e8633.js +0 -2
  107. package/dist/chunk-b943cac32cc3670f.js +0 -2
  108. package/dist/chunk-d4eceea16ddc567d.js +0 -9
  109. package/dist/chunk-e64fe80074576b85.js +0 -2
  110. package/dist/chunk-f9d7921dc209275a.js +0 -2
  111. package/dist/email/EmailServiceProvider.d.ts +0 -8
  112. package/dist/email/EmailServiceProvider.d.ts.map +0 -1
  113. package/dist/email/EmailTemplate.d.ts +0 -22
  114. package/dist/email/EmailTemplate.d.ts.map +0 -1
  115. package/dist/email/providers.d.ts +0 -5
  116. package/dist/email/providers.d.ts.map +0 -1
  117. package/dist/email/types.d.ts.map +0 -1
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{B as WJ} from"./chunk-e3d242546d1a2927.js";import{Db as cZ} from"./chunk-52dd5453e79e1cef.js";import{Fb as bZ} from"./chunk-4ad752c87b795617.js";var FJ=WJ((yJ)=>{var lZ=function(Z){return{sourceType:fJ.getOption(Z,"sourceType","module"),strictMode:fJ.getOption(Z,"strictMode",!1),allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,startLine:1,tokens:!0,plugins:["asyncGenerators","bigInt","classPrivateMethods","classPrivateProperties","classProperties","classStaticBlock","decimal","decorators-legacy","doExpressions","dynamicImport","exportDefaultFrom","exportExtensions","exportNamespaceFrom","functionBind","functionSent","importAssertions","importMeta","nullishCoalescingOperator","numericSeparator","objectRestSpread","optionalCatchBinding","optionalChaining",["pipelineOperator",{proposal:"minimal"}],["recordAndTuple",{syntaxType:"hash"}],"throwExpressions","topLevelAwait","v8intrinsic"]}};Object.defineProperty(yJ,"__esModule",{value:!0});var fJ=cZ();yJ.default=lZ});var hZ=WJ((gZ)=>{var iZ=function(Z,X){if(Z==null)return{};var J={};for(var Q in Z)if({}.hasOwnProperty.call(Z,Q)){if(X.includes(Q))continue;J[Q]=Z[Q]}return J},w=function(Z,X){const{line:J,column:Q,index:Y}=Z;return new E(J,Q+X,Y+X)},lJ=function(Z,X,J){Object.defineProperty(Z,X,{enumerable:!1,configurable:!0,value:J})},oZ=function({toMessage:Z,code:X,reasonCode:J,syntaxPlugin:Q}){const Y=J==="MissingPlugin"||J==="MissingOneOfPlugins";return function V(W,z){const U=new SyntaxError;if(U.code=X,U.reasonCode=J,U.loc=W,U.pos=W.index,U.syntaxPlugin=Q,Y)U.missingPlugin=z.missingPlugin;return lJ(U,"clone",function j(R={}){var H;const{line:K,column:F,index:B}=(H=R.loc)!=null?H:W;return V(new E(K,F,B),Object.assign({},z,R.details))}),lJ(U,"details",z),Object.defineProperty(U,"message",{configurable:!0,get(){const j=`${Z(z)} (${W.line}:${W.column})`;return this.message=j,j},set(j){Object.defineProperty(this,"message",{value:j,writable:!0})}}),U}},u=function(Z,X){if(Array.isArray(Z))return(Q)=>u(Q,Z[0]);const J={};for(let Q of Object.keys(Z)){const Y=Z[Q],V=typeof Y==="string"?{message:()=>Y}:typeof Y==="function"?{message:Y}:Y,{message:W}=V,z=iZ(V,rZ),U=typeof W==="string"?()=>W:W;J[Q]=oZ(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:Q,toMessage:U},X?{syntaxPlugin:X}:{},z))}return J},t=function(Z){return pJ(Z.loc.start,"index"),pJ(Z.loc.end,"index"),Z},N=function(Z,X={}){X.keyword=Z;const J=O(Z,X);return IJ.set(Z,J),J},P=function(Z,X){return O(Z,{beforeExpr:C,binop:X})},O=function(Z,X={}){var J,Q,Y,V;return++e,AJ.push(Z),SJ.push((J=X.binop)!=null?J:-1),PJ.push((Q=X.beforeExpr)!=null?Q:!1),wJ.push((Y=X.startsExpr)!=null?Y:!1),kJ.push((V=X.prefix)!=null?V:!1),h.push(new MJ(Z,X)),e},D=function(Z,X={}){var J,Q,Y,V;return++e,IJ.set(Z,e),AJ.push(Z),SJ.push((J=X.binop)!=null?J:-1),PJ.push((Q=X.beforeExpr)!=null?Q:!1),wJ.push((Y=X.startsExpr)!=null?Y:!1),kJ.push((V=X.prefix)!=null?V:!1),h.push(new MJ("name",X)),e},v=function(Z){return Z>=93&&Z<=132},X0=function(Z){return Z<=92},k=function(Z){return Z>=58&&Z<=132},QZ=function(Z){return Z>=58&&Z<=136},Y0=function(Z){return PJ[Z]},NJ=function(Z){return wJ[Z]},V0=function(Z){return Z>=29&&Z<=33},iJ=function(Z){return Z>=129&&Z<=131},W0=function(Z){return Z>=90&&Z<=92},LJ=function(Z){return Z>=58&&Z<=92},z0=function(Z){return Z>=39&&Z<=59},j0=function(Z){return Z===34},U0=function(Z){return kJ[Z]},q0=function(Z){return Z>=121&&Z<=123},R0=function(Z){return Z>=124&&Z<=130},m=function(Z){return AJ[Z]},qJ=function(Z){return SJ[Z]},H0=function(Z){return Z===57},HJ=function(Z){return Z>=24&&Z<=25},L=function(Z){return h[Z]},vJ=function(Z,X){let J=65536;for(let Q=0,Y=X.length;Q<Y;Q+=2){if(J+=X[Q],J>Z)return!1;if(J+=X[Q+1],J>=Z)return!0}return!1},b=function(Z){if(Z<65)return Z===36;if(Z<=90)return!0;if(Z<97)return Z===95;if(Z<=122)return!0;if(Z<=65535)return Z>=170&&K0.test(String.fromCharCode(Z));return vJ(Z,YZ)},i=function(Z){if(Z<48)return Z===36;if(Z<58)return!0;if(Z<65)return!1;if(Z<=90)return!0;if(Z<97)return Z===95;if(Z<=122)return!0;if(Z<=65535)return Z>=170&&G0.test(String.fromCharCode(Z));return vJ(Z,YZ)||vJ(Z,F0)},VZ=function(Z,X){return X&&Z==="await"||Z==="enum"},WZ=function(Z,X){return VZ(Z,X)||O0.has(Z)},zZ=function(Z){return _0.has(Z)},jZ=function(Z,X){return WZ(Z,X)||zZ(Z)},B0=function(Z){return $0.has(Z)},D0=function(Z,X,J){return Z===64&&X===64&&b(J)},N0=function(Z){return C0.has(Z)},HZ=function(Z,X){if(Z.trailingComments===void 0)Z.trailingComments=X;else Z.trailingComments.unshift(...X)},v0=function(Z,X){if(Z.leadingComments===void 0)Z.leadingComments=X;else Z.leadingComments.unshift(...X)},QJ=function(Z,X){if(Z.innerComments===void 0)Z.innerComments=X;else Z.innerComments.unshift(...X)},s=function(Z,X,J){let Q=null,Y=X.length;while(Q===null&&Y>0)Q=X[--Y];if(Q===null||Q.start>J.start)QJ(Z,J.comments);else HZ(Q,J.comments)},a=function(Z){switch(Z){case 10:case 13:case 8232:case 8233:return!0;default:return!1}},aJ=function(Z,X,J){for(let Q=X;Q<J;Q++)if(a(Z.charCodeAt(Q)))return!0;return!1},M0=function(Z){switch(Z){case 9:case 11:case 12:case 32:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8239:case 8287:case 12288:case 65279:return!0;default:return!1}},tJ=function(Z,X,J,Q,Y,V){const W=J,z=Q,U=Y;let j="",R=null,H=J;const{length:K}=X;for(;;){if(J>=K){V.unterminated(W,z,U),j+=X.slice(H,J);break}const F=X.charCodeAt(J);if(A0(Z,F,X,J)){j+=X.slice(H,J);break}if(F===92){j+=X.slice(H,J);const B=S0(X,J,Q,Y,Z==="template",V);if(B.ch===null&&!R)R={pos:J,lineStart:Q,curLine:Y};else j+=B.ch;({pos:J,lineStart:Q,curLine:Y}=B),H=J}else if(F===8232||F===8233)++J,++Y,Q=J;else if(F===10||F===13)if(Z==="template"){if(j+=X.slice(H,J)+"\n",++J,F===13&&X.charCodeAt(J)===10)++J;++Y,H=Q=J}else V.unterminated(W,z,U);else++J}return{pos:J,str:j,firstInvalidLoc:R,lineStart:Q,curLine:Y,containsInvalid:!!R}},A0=function(Z,X,J,Q){if(Z==="template")return X===96||X===36&&J.charCodeAt(Q+1)===123;return X===(Z==="double"?34:39)},S0=function(Z,X,J,Q,Y,V){const W=!Y;X++;const z=(j)=>({pos:X,ch:j,lineStart:J,curLine:Q}),U=Z.charCodeAt(X++);switch(U){case 110:return z("\n");case 114:return z("\r");case 120:{let j;return{code:j,pos:X}=TJ(Z,X,J,Q,2,!1,W,V),z(j===null?null:String.fromCharCode(j))}case 117:{let j;return{code:j,pos:X}=FZ(Z,X,J,Q,W,V),z(j===null?null:String.fromCodePoint(j))}case 116:return z("\t");case 98:return z("\b");case 118:return z("\v");case 102:return z("\f");case 13:if(Z.charCodeAt(X)===10)++X;case 10:J=X,++Q;case 8232:case 8233:return z("");case 56:case 57:if(Y)return z(null);else V.strictNumericEscape(X-1,J,Q);default:if(U>=48&&U<=55){const j=X-1;let H=/^[0-7]+/.exec(Z.slice(j,X+2))[0],K=parseInt(H,8);if(K>255)H=H.slice(0,-1),K=parseInt(H,8);X+=H.length-1;const F=Z.charCodeAt(X);if(H!=="0"||F===56||F===57)if(Y)return z(null);else V.strictNumericEscape(j,J,Q);return z(String.fromCharCode(K))}return z(String.fromCharCode(U))}},TJ=function(Z,X,J,Q,Y,V,W,z){const U=X;let j;if({n:j,pos:X}=GZ(Z,X,J,Q,16,Y,V,!1,z,!W),j===null)if(W)z.invalidEscapeSequence(U,J,Q);else X=U-1;return{code:j,pos:X}},GZ=function(Z,X,J,Q,Y,V,W,z,U,j){const R=X,H=Y===16?dJ.hex:dJ.decBinOct,K=Y===16?jJ.hex:Y===10?jJ.dec:Y===8?jJ.oct:jJ.bin;let F=!1,B=0;for(let A=0,M=V==null?Infinity:V;A<M;++A){const I=Z.charCodeAt(X);let S;if(I===95&&z!=="bail"){const VJ=Z.charCodeAt(X-1),d=Z.charCodeAt(X+1);if(!z){if(j)return{n:null,pos:X};U.numericSeparatorInEscapeSequence(X,J,Q)}else if(Number.isNaN(d)||!K(d)||H.has(VJ)||H.has(d)){if(j)return{n:null,pos:X};U.unexpectedNumericSeparator(X,J,Q)}++X;continue}if(I>=97)S=I-97+10;else if(I>=65)S=I-65+10;else if(I0(I))S=I-48;else S=Infinity;if(S>=Y)if(S<=9&&j)return{n:null,pos:X};else if(S<=9&&U.invalidDigit(X,J,Q,Y))S=0;else if(W)S=0,F=!0;else break;++X,B=B*Y+S}if(X===R||V!=null&&X-R!==V||F)return{n:null,pos:X};return{n:B,pos:X}},FZ=function(Z,X,J,Q,Y,V){const W=Z.charCodeAt(X);let z;if(W===123){if(++X,{code:z,pos:X}=TJ(Z,X,J,Q,Z.indexOf("}",X)-X,!0,Y,V),++X,z!==null&&z>1114111)if(Y)V.invalidCodePoint(X,J,Q);else return{code:null,pos:X}}else({code:z,pos:X}=TJ(Z,X,J,Q,4,!1,Y,V));return{code:z,pos:X}},r=function(Z,X,J){return new E(J,Z-X,Z)},w0=function(){return new YJ(3)},k0=function(){return new uJ(1)},L0=function(){return new uJ(2)},DZ=function(){return new YJ},RJ=function(Z,X){return(Z?2:0)|(X?1:0)},g0=function(Z){return x(Z)},x=function(Z){const{type:X,start:J,end:Q,loc:Y,range:V,extra:W,name:z}=Z,U=Object.create(EJ);if(U.type=X,U.start=J,U.end=Q,U.loc=Y,U.range=V,U.extra=W,U.name=z,X==="Placeholder")U.expectedNode=Z.expectedNode;return U},h0=function(Z){const{type:X,start:J,end:Q,loc:Y,range:V,extra:W}=Z;if(X==="Placeholder")return g0(Z);const z=Object.create(EJ);if(z.type=X,z.start=J,z.end=Q,z.loc=Y,z.range=V,Z.raw!==void 0)z.raw=Z.raw;else z.extra=W;return z.value=Z.value,z},u0=function(Z){return Z.type==="DeclareExportAllDeclaration"||Z.type==="DeclareExportDeclaration"&&(!Z.declaration||Z.declaration.type!=="TypeAlias"&&Z.declaration.type!=="InterfaceDeclaration")},nJ=function(Z){return Z.importKind==="type"||Z.importKind==="typeof"},x0=function(Z,X){const J=[],Q=[];for(let Y=0;Y<Z.length;Y++)(X(Z[Y],Y,Z)?J:Q).push(Z[Y]);return[J,Q]},y=function(Z){return Z?Z.type==="JSXOpeningFragment"||Z.type==="JSXClosingFragment":!1},p=function(Z){if(Z.type==="JSXIdentifier")return Z.name;if(Z.type==="JSXNamespacedName")return Z.namespace.name+":"+Z.name.name;if(Z.type==="JSXMemberExpression")return p(Z.object)+"."+p(Z.property);throw new Error("Node had unexpected type: "+Z.type)},l0=function(Z){if(Z==null)throw new Error(`Unexpected ${Z} value.`);return Z},sJ=function(Z){if(!Z)throw new Error("Assert fail")},p0=function(Z){switch(Z){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}},rJ=function(Z){return Z==="private"||Z==="public"||Z==="protected"},i0=function(Z){return Z==="in"||Z==="out"},d0=function(Z){if(Z.type!=="MemberExpression")return!1;const{computed:X,property:J}=Z;if(X&&J.type!=="StringLiteral"&&(J.type!=="TemplateLiteral"||J.expressions.length>0))return!1;return PZ(Z.object)},t0=function(Z,X){var J;const{type:Q}=Z;if((J=Z.extra)!=null&&J.parenthesized)return!1;if(X){if(Q==="Literal"){const{value:Y}=Z;if(typeof Y==="string"||typeof Y==="boolean")return!0}}else if(Q==="StringLiteral"||Q==="BooleanLiteral")return!0;if(SZ(Z,X)||n0(Z,X))return!0;if(Q==="TemplateLiteral"&&Z.expressions.length===0)return!0;if(d0(Z))return!0;return!1},SZ=function(Z,X){if(X)return Z.type==="Literal"&&(typeof Z.value==="number"||("bigint"in Z));return Z.type==="NumericLiteral"||Z.type==="BigIntLiteral"},n0=function(Z,X){if(Z.type==="UnaryExpression"){const{operator:J,argument:Q}=Z;if(J==="-"&&SZ(Q,X))return!0}return!1},PZ=function(Z){if(Z.type==="Identifier")return!0;if(Z.type!=="MemberExpression"||Z.computed)return!1;return PZ(Z.object)},o0=function(Z){if(Z.has("decorators")){if(Z.has("decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");const J=Z.get("decorators").decoratorsBeforeExport;if(J!=null&&typeof J!=="boolean")throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");const Q=Z.get("decorators").allowCallParenthesized;if(Q!=null&&typeof Q!=="boolean")throw new Error("'allowCallParenthesized' must be a boolean.")}if(Z.has("flow")&&Z.has("typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(Z.has("placeholders")&&Z.has("v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(Z.has("pipelineOperator")){var X;const J=Z.get("pipelineOperator").proposal;if(!eJ.includes(J)){const Y=eJ.map((V)=>`"${V}"`).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${Y}.`)}const Q=((X=Z.get("recordAndTuple"))==null?void 0:X.syntaxType)==="hash";if(J==="hack"){if(Z.has("placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(Z.has("v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");const Y=Z.get("pipelineOperator").topicToken;if(!JZ.includes(Y)){const V=JZ.map((W)=>`"${W}"`).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${V}.`)}if(Y==="#"&&Q)throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "hack", topicToken: "#" }]\` and \`${JSON.stringify(["recordAndTuple",Z.get("recordAndTuple")])}\`.`)}else if(J==="smart"&&Q)throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "smart" }]\` and \`${JSON.stringify(["recordAndTuple",Z.get("recordAndTuple")])}\`.`)}if(Z.has("moduleAttributes")){if(Z.has("importAttributes")||Z.has("importAssertions"))throw new Error("Cannot combine importAssertions, importAttributes and moduleAttributes plugins.");if(Z.get("moduleAttributes").version!=="may-2020")throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.")}if(Z.has("importAttributes")&&Z.has("importAssertions"))throw new Error("Cannot combine importAssertions and importAttributes plugins.");if(Z.has("recordAndTuple")){const J=Z.get("recordAndTuple").syntaxType;if(J!=null){const Q=["hash","bar"];if(!Q.includes(J))throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: "+Q.map((Y)=>`'${Y}'`).join(", "))}}if(Z.has("asyncDoExpressions")&&!Z.has("doExpressions")){const J=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw J.missingPlugins="doExpressions",J}if(Z.has("optionalChainingAssign")&&Z.get("optionalChainingAssign").version!=="2023-07")throw new Error("The 'optionalChainingAssign' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is '2023-07'.")},J1=function(Z){if(Z==null)return Object.assign({},BJ);if(Z.annexB!=null&&Z.annexB!==!1)throw new Error("The `annexB` option can only be set to `false`.");const X={};for(let Q of Object.keys(BJ)){var J;X[Q]=(J=Z[Q])!=null?J:BJ[Q]}return X},X1=function(Z,X){for(let J=0;J<Z.length;J++){const Q=Z[J],{type:Y}=Q;if(typeof Y==="number"){{if(Y===138){const{loc:V,start:W,value:z,end:U}=Q,j=W+1,R=w(V.start,1);Z.splice(J,1,new g({type:L(27),value:"#",start:W,end:j,startLoc:V.start,endLoc:R}),new g({type:L(132),value:z,start:j,end:U,startLoc:R,endLoc:V.end})),J++;continue}if(HJ(Y)){const{loc:V,start:W,value:z,end:U}=Q,j=W+1,R=w(V.start,1);let H;if(X.charCodeAt(W)===96)H=new g({type:L(22),value:"`",start:W,end:j,startLoc:V.start,endLoc:R});else H=new g({type:L(8),value:"}",start:W,end:j,startLoc:V.start,endLoc:R});let K,F,B,A;if(Y===24)F=U-1,B=w(V.end,-1),K=z===null?null:z.slice(1,-1),A=new g({type:L(22),value:"`",start:F,end:U,startLoc:B,endLoc:V.end});else F=U-2,B=w(V.end,-2),K=z===null?null:z.slice(1,-2),A=new g({type:L(23),value:"${",start:F,end:U,startLoc:B,endLoc:V.end});Z.splice(J,1,H,new g({type:L(20),value:K,start:j,end:F,startLoc:R,endLoc:B}),A),J+=2;continue}}Q.type=L(Y)}}return Z},Y1=function(Z,X){var J;if(((J=X)==null?void 0:J.sourceType)==="unambiguous"){X=Object.assign({},X);try{X.sourceType="module";const Q=o(X,Z),Y=Q.parse();if(Q.sawUnambiguousESM)return Y;if(Q.ambiguousScriptDifferentAst)try{return X.sourceType="script",o(X,Z).parse()}catch(V){}else Y.program.sourceType="script";return Y}catch(Q){try{return X.sourceType="script",o(X,Z).parse()}catch(Y){}throw Q}}else return o(X,Z).parse()},V1=function(Z,X){const J=o(X,Z);if(J.options.strictMode)J.state.strict=!0;return J.getExpression()},W1=function(Z){const X={};for(let J of Object.keys(Z))X[J]=L(Z[J]);return X},o=function(Z,X){let J=xJ;const Q=new Map;if(Z!=null&&Z.plugins){for(let Y of Z.plugins){let V,W;if(typeof Y==="string")V=Y;else[V,W]=Y;if(!Q.has(V))Q.set(V,W||{})}o0(Q),J=j1(Q)}return new J(Z,X,Q)},j1=function(Z){const X=[];for(let Y of e0)if(Z.has(Y))X.push(Y);const J=X.join("|");let Q=ZZ.get(J);if(!Q){Q=xJ;for(let Y of X)Q=wZ[Y](Q);ZZ.set(J,Q)}return Q};Object.defineProperty(gZ,"__esModule",{value:!0});class E{constructor(Z,X,J){this.line=void 0,this.column=void 0,this.index=void 0,this.line=Z,this.column=X,this.index=J}}class ZJ{constructor(Z,X){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=Z,this.end=X}}var mJ="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",aZ={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:mJ},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:mJ}},cJ={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},UJ=(Z)=>Z.type==="UpdateExpression"?cJ.UpdateExpression[`${Z.prefix}`]:cJ[Z.type],dZ={AccessorIsGenerator:({kind:Z})=>`A ${Z}ter cannot be a generator.`,ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncFunction:"'await' is only allowed within async functions.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:({kind:Z})=>`Missing initializer in ${Z} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',DeletePrivateField:"Deleting a private field is not allowed.",DestructureNamedImport:"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",DuplicateConstructor:"Duplicate constructor in the same class.",DuplicateDefaultExport:"Only one default export allowed per module.",DuplicateExport:({exportName:Z})=>`\`${Z}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",DynamicImportPhaseRequiresImportExpressions:({phase:Z})=>`'import.${Z}(...)' can only be parsed when using the 'createImportExpressions' option.`,ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName:Z,exportName:X})=>`A string literal cannot be used as an exported binding without \`from\`.\n- Did you mean \`export { '${Z}' as '${X}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:Z})=>`'${Z==="ForInStatement"?"for-in":"for-of"}' loop variable declaration may not have an initializer.`,ForInUsing:"For-in loop may not start with 'using' declaration.",ForOfAsync:"The left-hand side of a for-of loop may not be 'async'.",ForOfLet:"The left-hand side of a for-of loop may not start with 'let'.",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block.",IllegalBreakContinue:({type:Z})=>`Unsyntactic ${Z==="BreakStatement"?"break":"continue"}.`,IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportAttributesUseAssert:"The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedAssertSyntax: true` option in the import attributes plugin to suppress this error.",ImportBindingIsString:({importName:Z})=>`A string literal cannot be used as an imported binding.\n- Did you mean \`import { "${Z}" as foo }\`?`,ImportCallArgumentTrailingComma:"Trailing comma is disallowed inside import(...) arguments.",ImportCallArity:({maxArgumentCount:Z})=>`\`import()\` requires exactly ${Z===1?"one argument":"one or two arguments"}.`,ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:({radix:Z})=>`Expected number in radix ${Z}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:Z})=>`Escape sequence in keyword ${Z}.`,InvalidIdentifier:({identifierName:Z})=>`Invalid identifier ${Z}.`,InvalidLhs:({ancestor:Z})=>`Invalid left-hand side in ${UJ(Z)}.`,InvalidLhsBinding:({ancestor:Z})=>`Binding invalid left-hand side in ${UJ(Z)}.`,InvalidLhsOptionalChaining:({ancestor:Z})=>`Invalid optional chaining in the left-hand side of ${UJ(Z)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:Z})=>`Unexpected character '${Z}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:Z})=>`Private name #${Z} is not defined.`,InvalidPropertyBindingPattern:"Binding member expression.",InvalidRecordProperty:"Only properties and spread elements are allowed in record definitions.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:({labelName:Z})=>`Label '${Z}' is already declared.`,LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingPlugin:({missingPlugin:Z})=>`This experimental syntax requires enabling the parser plugin: ${Z.map((X)=>JSON.stringify(X)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:Z})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${Z.map((X)=>JSON.stringify(X)).join(", ")}.`,MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeDifferentFromType:"The only accepted module attribute is `type`.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:({key:Z})=>`Duplicate key "${Z}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:Z})=>`An export name cannot include a lone surrogate, found '\\u${Z.toString(16)}'.`,ModuleExportUndefined:({localName:Z})=>`Export '${Z}' is not defined.`,MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:({identifierName:Z})=>`Private names are only allowed in property accesses (\`obj.#${Z}\`) or in \`in\` expressions (\`#${Z} in obj\`).`,PrivateNameRedeclaration:({identifierName:Z})=>`Duplicate private name #${Z}.`,RecordExpressionBarIncorrectEndSyntaxType:"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionBarIncorrectStartSyntaxType:"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionHashIncorrectStartSyntaxType:"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",RecordNoProto:"'__proto__' is not allowed in Record expressions.",RestTrailingComma:"Unexpected trailing comma after rest element.",SloppyFunction:"In non-strict mode code, functions can only be declared at top level or inside a block.",SloppyFunctionAnnexB:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",SourcePhaseImportRequiresDefault:'Only `import source x from "./module"` is valid.',StaticPrototype:"Classes may not have static property named prototype.",SuperNotAllowed:"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:"Private fields can't be accessed on super.",TrailingDecorator:"Decorators must be attached to a class element.",TupleExpressionBarIncorrectEndSyntaxType:"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionBarIncorrectStartSyntaxType:"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionHashIncorrectStartSyntaxType:"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",UnexpectedArgumentPlaceholder:"Unexpected argument placeholder.",UnexpectedAwaitAfterPipelineBody:'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.',UnexpectedDigitAfterHash:"Unexpected digit after hash token.",UnexpectedImportExport:"'import' and 'export' may only appear at the top level.",UnexpectedKeyword:({keyword:Z})=>`Unexpected keyword '${Z}'.`,UnexpectedLeadingDecorator:"Leading decorators must be attached to a class declaration.",UnexpectedLexicalDeclaration:"Lexical declaration cannot appear in a single-statement context.",UnexpectedNewTarget:"`new.target` can only be used in functions or class properties.",UnexpectedNumericSeparator:"A numeric separator is only allowed between two digits.",UnexpectedPrivateField:"Unexpected private name.",UnexpectedReservedWord:({reservedWord:Z})=>`Unexpected reserved word '${Z}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:Z,unexpected:X})=>`Unexpected token${X?` '${X}'.`:""}${Z?`, expected "${Z}"`:""}`,UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",UnexpectedUsingDeclaration:"Using declaration cannot appear in the top level when source type is `script`.",UnsupportedBind:"Binding should be performed on object property.",UnsupportedDecoratorExport:"A decorated export must export a class declaration.",UnsupportedDefaultExport:"Only expressions, functions or classes are allowed as the `default` export.",UnsupportedImport:"`import` can only be used in `import()` or `import.meta`.",UnsupportedMetaProperty:({target:Z,onlyValidPropertyName:X})=>`The only valid meta property for ${Z} is ${Z}.${X}.`,UnsupportedParameterDecorator:"Decorators cannot be used to decorate parameters.",UnsupportedPropertyDecorator:"Decorators cannot be used to decorate object literal properties.",UnsupportedSuper:"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",UnterminatedComment:"Unterminated comment.",UnterminatedRegExp:"Unterminated regular expression.",UnterminatedString:"Unterminated string constant.",UnterminatedTemplate:"Unterminated template.",UsingDeclarationExport:"Using declaration cannot be exported.",UsingDeclarationHasBindingPattern:"Using declaration cannot have destructuring patterns.",VarRedeclaration:({identifierName:Z})=>`Identifier '${Z}' has already been declared.`,YieldBindingIdentifier:"Can not use 'yield' as identifier inside a generator.",YieldInParameter:"Yield expression is not allowed in formal parameters.",ZeroDigitNumericSeparator:"Numeric separator can not be used after leading 0."},tZ={StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:Z})=>`Assigning to '${Z}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:Z})=>`Binding '${Z}' in strict mode.`,StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block.",StrictNumericEscape:"The only valid numeric escape in strict mode is '\\0'.",StrictOctalLiteral:"Legacy octal literals are not allowed in strict mode.",StrictWith:"'with' in strict mode."},nZ=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]),sZ={PipeBodyIsTighter:"Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.",PipeTopicRequiresHackPipes:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.',PipeTopicUnbound:"Topic reference is unbound; it must be inside a pipe body.",PipeTopicUnconfiguredToken:({token:Z})=>`Invalid topic token ${Z}. In order to use ${Z} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${Z}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:Z})=>`Hack-style pipe body cannot be an unparenthesized ${UJ({type:Z})}; please wrap it in parentheses.`,PipelineBodyNoArrow:'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.',PipelineBodySequenceExpression:"Pipeline body may not be a comma-separated sequence expression.",PipelineHeadSequenceExpression:"Pipeline head should not be a comma-separated sequence expression.",PipelineTopicUnused:"Pipeline is in topic style but does not use topic reference.",PrimaryTopicNotAllowed:"Topic reference was used in a lexical context without topic binding.",PrimaryTopicRequiresSmartPipeline:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.'},rZ=["message"],q=Object.assign({},u(aZ),u(dZ),u(tZ),u`pipelineOperator`(sZ)),{defineProperty:eZ}=Object,pJ=(Z,X)=>{if(Z)eZ(Z,X,{enumerable:!1,value:Z[X]})},J0=(Z)=>class X extends Z{parse(){const J=t(super.parse());if(this.options.tokens)J.tokens=J.tokens.map(t);return J}parseRegExpLiteral({pattern:J,flags:Q}){let Y=null;try{Y=new RegExp(J,Q)}catch(W){}const V=this.estreeParseLiteral(Y);return V.regex={pattern:J,flags:Q},V}parseBigIntLiteral(J){let Q;try{Q=BigInt(J)}catch(V){Q=null}const Y=this.estreeParseLiteral(Q);return Y.bigint=String(Y.value||J),Y}parseDecimalLiteral(J){const Y=this.estreeParseLiteral(null);return Y.decimal=String(Y.value||J),Y}estreeParseLiteral(J){return this.parseLiteral(J,"Literal")}parseStringLiteral(J){return this.estreeParseLiteral(J)}parseNumericLiteral(J){return this.estreeParseLiteral(J)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(J){return this.estreeParseLiteral(J)}directiveToStmt(J){const Q=J.value;delete J.value,Q.type="Literal",Q.raw=Q.extra.raw,Q.value=Q.extra.expressionValue;const Y=J;return Y.type="ExpressionStatement",Y.expression=Q,Y.directive=Q.extra.rawValue,delete Q.extra,Y}initFunction(J,Q){super.initFunction(J,Q),J.expression=!1}checkDeclaration(J){if(J!=null&&this.isObjectProperty(J))this.checkDeclaration(J.value);else super.checkDeclaration(J)}getObjectOrClassMethodParams(J){return J.value.params}isValidDirective(J){var Q;return J.type==="ExpressionStatement"&&J.expression.type==="Literal"&&typeof J.expression.value==="string"&&!((Q=J.expression.extra)!=null&&Q.parenthesized)}parseBlockBody(J,Q,Y,V,W){super.parseBlockBody(J,Q,Y,V,W);const z=J.directives.map((U)=>this.directiveToStmt(U));J.body=z.concat(J.body),delete J.directives}pushClassMethod(J,Q,Y,V,W,z){if(this.parseMethod(Q,Y,V,W,z,"ClassMethod",!0),Q.typeParameters)Q.value.typeParameters=Q.typeParameters,delete Q.typeParameters;J.body.push(Q)}parsePrivateName(){const J=super.parsePrivateName();if(!this.getPluginOption("estree","classFeatures"))return J;return this.convertPrivateNameToPrivateIdentifier(J)}convertPrivateNameToPrivateIdentifier(J){const Q=super.getPrivateNameSV(J);return J=J,delete J.id,J.name=Q,J.type="PrivateIdentifier",J}isPrivateName(J){if(!this.getPluginOption("estree","classFeatures"))return super.isPrivateName(J);return J.type==="PrivateIdentifier"}getPrivateNameSV(J){if(!this.getPluginOption("estree","classFeatures"))return super.getPrivateNameSV(J);return J.name}parseLiteral(J,Q){const Y=super.parseLiteral(J,Q);return Y.raw=Y.extra.raw,delete Y.extra,Y}parseFunctionBody(J,Q,Y=!1){super.parseFunctionBody(J,Q,Y),J.expression=J.body.type!=="BlockStatement"}parseMethod(J,Q,Y,V,W,z,U=!1){let j=this.startNode();if(j.kind=J.kind,j=super.parseMethod(j,Q,Y,V,W,z,U),j.type="FunctionExpression",delete j.kind,J.value=j,z==="ClassPrivateMethod")J.computed=!1;return this.finishNode(J,"MethodDefinition")}nameIsConstructor(J){if(J.type==="Literal")return J.value==="constructor";return super.nameIsConstructor(J)}parseClassProperty(...J){const Q=super.parseClassProperty(...J);if(!this.getPluginOption("estree","classFeatures"))return Q;return Q.type="PropertyDefinition",Q}parseClassPrivateProperty(...J){const Q=super.parseClassPrivateProperty(...J);if(!this.getPluginOption("estree","classFeatures"))return Q;return Q.type="PropertyDefinition",Q.computed=!1,Q}parseObjectMethod(J,Q,Y,V,W){const z=super.parseObjectMethod(J,Q,Y,V,W);if(z){if(z.type="Property",z.kind==="method")z.kind="init";z.shorthand=!1}return z}parseObjectProperty(J,Q,Y,V){const W=super.parseObjectProperty(J,Q,Y,V);if(W)W.kind="init",W.type="Property";return W}isValidLVal(J,Q,Y){return J==="Property"?"value":super.isValidLVal(J,Q,Y)}isAssignable(J,Q){if(J!=null&&this.isObjectProperty(J))return this.isAssignable(J.value,Q);return super.isAssignable(J,Q)}toAssignable(J,Q=!1){if(J!=null&&this.isObjectProperty(J)){const{key:Y,value:V}=J;if(this.isPrivateName(Y))this.classScope.usePrivateName(this.getPrivateNameSV(Y),Y.loc.start);this.toAssignable(V,Q)}else super.toAssignable(J,Q)}toAssignableObjectExpressionProp(J,Q,Y){if(J.type==="Property"&&(J.kind==="get"||J.kind==="set"))this.raise(q.PatternHasAccessor,J.key);else if(J.type==="Property"&&J.method)this.raise(q.PatternHasMethod,J.key);else super.toAssignableObjectExpressionProp(J,Q,Y)}finishCallExpression(J,Q){const Y=super.finishCallExpression(J,Q);if(Y.callee.type==="Import"){if(Y.type="ImportExpression",Y.source=Y.arguments[0],this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions")){var V,W;Y.options=(V=Y.arguments[1])!=null?V:null,Y.attributes=(W=Y.arguments[1])!=null?W:null}delete Y.arguments,delete Y.callee}return Y}toReferencedArguments(J){if(J.type==="ImportExpression")return;super.toReferencedArguments(J)}parseExport(J,Q){const Y=this.state.lastTokStartLoc,V=super.parseExport(J,Q);switch(V.type){case"ExportAllDeclaration":V.exported=null;break;case"ExportNamedDeclaration":if(V.specifiers.length===1&&V.specifiers[0].type==="ExportNamespaceSpecifier")V.type="ExportAllDeclaration",V.exported=V.specifiers[0].exported,delete V.specifiers;case"ExportDefaultDeclaration":{var W;const{declaration:z}=V;if((z==null?void 0:z.type)==="ClassDeclaration"&&((W=z.decorators)==null?void 0:W.length)>0&&z.start===V.start)this.resetStartLocation(V,Y)}break}return V}parseSubscript(J,Q,Y,V){const W=super.parseSubscript(J,Q,Y,V);if(V.optionalChainMember){if(W.type==="OptionalMemberExpression"||W.type==="OptionalCallExpression")W.type=W.type.substring(8);if(V.stop){const z=this.startNodeAtNode(W);return z.expression=W,this.finishNode(z,"ChainExpression")}}else if(W.type==="MemberExpression"||W.type==="CallExpression")W.optional=!1;return W}isOptionalMemberExpression(J){if(J.type==="ChainExpression")return J.expression.type==="MemberExpression";return super.isOptionalMemberExpression(J)}hasPropertyAsPrivateName(J){if(J.type==="ChainExpression")J=J.expression;return super.hasPropertyAsPrivateName(J)}isObjectProperty(J){return J.type==="Property"&&J.kind==="init"&&!J.method}isObjectMethod(J){return J.type==="Property"&&(J.method||J.kind==="get"||J.kind==="set")}finishNodeAt(J,Q,Y){return t(super.finishNodeAt(J,Q,Y))}resetStartLocation(J,Q){super.resetStartLocation(J,Q),t(J)}resetEndLocation(J,Q=this.state.lastTokEndLoc){super.resetEndLocation(J,Q),t(J)}};class l{constructor(Z,X){this.token=void 0,this.preserveSpace=void 0,this.token=Z,this.preserveSpace=!!X}}var T={brace:new l("{"),j_oTag:new l("<tag"),j_cTag:new l("</tag"),j_expr:new l("<tag>...</tag>",!0)};T.template=new l("`",!0);var C=!0,G=!0,$J=!0,n=!0,f=!0,Z0=!0;class MJ{constructor(Z,X={}){this.label=void 0,this.keyword=void 0,this.beforeExpr=void 0,this.startsExpr=void 0,this.rightAssociative=void 0,this.isLoop=void 0,this.isAssign=void 0,this.prefix=void 0,this.postfix=void 0,this.binop=void 0,this.label=Z,this.keyword=X.keyword,this.beforeExpr=!!X.beforeExpr,this.startsExpr=!!X.startsExpr,this.rightAssociative=!!X.rightAssociative,this.isLoop=!!X.isLoop,this.isAssign=!!X.isAssign,this.prefix=!!X.prefix,this.postfix=!!X.postfix,this.binop=X.binop!=null?X.binop:null,this.updateContext=null}}var IJ=new Map,e=-1,h=[],AJ=[],SJ=[],PJ=[],wJ=[],kJ=[],Q0={bracketL:O("[",{beforeExpr:C,startsExpr:G}),bracketHashL:O("#[",{beforeExpr:C,startsExpr:G}),bracketBarL:O("[|",{beforeExpr:C,startsExpr:G}),bracketR:O("]"),bracketBarR:O("|]"),braceL:O("{",{beforeExpr:C,startsExpr:G}),braceBarL:O("{|",{beforeExpr:C,startsExpr:G}),braceHashL:O("#{",{beforeExpr:C,startsExpr:G}),braceR:O("}"),braceBarR:O("|}"),parenL:O("(",{beforeExpr:C,startsExpr:G}),parenR:O(")"),comma:O(",",{beforeExpr:C}),semi:O(";",{beforeExpr:C}),colon:O(":",{beforeExpr:C}),doubleColon:O("::",{beforeExpr:C}),dot:O("."),question:O("?",{beforeExpr:C}),questionDot:O("?."),arrow:O("=>",{beforeExpr:C}),template:O("template"),ellipsis:O("...",{beforeExpr:C}),backQuote:O("`",{startsExpr:G}),dollarBraceL:O("${",{beforeExpr:C,startsExpr:G}),templateTail:O("...`",{startsExpr:G}),templateNonTail:O("...${",{beforeExpr:C,startsExpr:G}),at:O("@"),hash:O("#",{startsExpr:G}),interpreterDirective:O("#!..."),eq:O("=",{beforeExpr:C,isAssign:n}),assign:O("_=",{beforeExpr:C,isAssign:n}),slashAssign:O("_=",{beforeExpr:C,isAssign:n}),xorAssign:O("_=",{beforeExpr:C,isAssign:n}),moduloAssign:O("_=",{beforeExpr:C,isAssign:n}),incDec:O("++/--",{prefix:f,postfix:Z0,startsExpr:G}),bang:O("!",{beforeExpr:C,prefix:f,startsExpr:G}),tilde:O("~",{beforeExpr:C,prefix:f,startsExpr:G}),doubleCaret:O("^^",{startsExpr:G}),doubleAt:O("@@",{startsExpr:G}),pipeline:P("|>",0),nullishCoalescing:P("??",1),logicalOR:P("||",1),logicalAND:P("&&",2),bitwiseOR:P("|",3),bitwiseXOR:P("^",4),bitwiseAND:P("&",5),equality:P("==/!=/===/!==",6),lt:P("</>/<=/>=",7),gt:P("</>/<=/>=",7),relational:P("</>/<=/>=",7),bitShift:P("<</>>/>>>",8),bitShiftL:P("<</>>/>>>",8),bitShiftR:P("<</>>/>>>",8),plusMin:O("+/-",{beforeExpr:C,binop:9,prefix:f,startsExpr:G}),modulo:O("%",{binop:10,startsExpr:G}),star:O("*",{binop:10}),slash:P("/",10),exponent:O("**",{beforeExpr:C,binop:11,rightAssociative:!0}),_in:N("in",{beforeExpr:C,binop:7}),_instanceof:N("instanceof",{beforeExpr:C,binop:7}),_break:N("break"),_case:N("case",{beforeExpr:C}),_catch:N("catch"),_continue:N("continue"),_debugger:N("debugger"),_default:N("default",{beforeExpr:C}),_else:N("else",{beforeExpr:C}),_finally:N("finally"),_function:N("function",{startsExpr:G}),_if:N("if"),_return:N("return",{beforeExpr:C}),_switch:N("switch"),_throw:N("throw",{beforeExpr:C,prefix:f,startsExpr:G}),_try:N("try"),_var:N("var"),_const:N("const"),_with:N("with"),_new:N("new",{beforeExpr:C,startsExpr:G}),_this:N("this",{startsExpr:G}),_super:N("super",{startsExpr:G}),_class:N("class",{startsExpr:G}),_extends:N("extends",{beforeExpr:C}),_export:N("export"),_import:N("import",{startsExpr:G}),_null:N("null",{startsExpr:G}),_true:N("true",{startsExpr:G}),_false:N("false",{startsExpr:G}),_typeof:N("typeof",{beforeExpr:C,prefix:f,startsExpr:G}),_void:N("void",{beforeExpr:C,prefix:f,startsExpr:G}),_delete:N("delete",{beforeExpr:C,prefix:f,startsExpr:G}),_do:N("do",{isLoop:$J,beforeExpr:C}),_for:N("for",{isLoop:$J}),_while:N("while",{isLoop:$J}),_as:D("as",{startsExpr:G}),_assert:D("assert",{startsExpr:G}),_async:D("async",{startsExpr:G}),_await:D("await",{startsExpr:G}),_defer:D("defer",{startsExpr:G}),_from:D("from",{startsExpr:G}),_get:D("get",{startsExpr:G}),_let:D("let",{startsExpr:G}),_meta:D("meta",{startsExpr:G}),_of:D("of",{startsExpr:G}),_sent:D("sent",{startsExpr:G}),_set:D("set",{startsExpr:G}),_source:D("source",{startsExpr:G}),_static:D("static",{startsExpr:G}),_using:D("using",{startsExpr:G}),_yield:D("yield",{startsExpr:G}),_asserts:D("asserts",{startsExpr:G}),_checks:D("checks",{startsExpr:G}),_exports:D("exports",{startsExpr:G}),_global:D("global",{startsExpr:G}),_implements:D("implements",{startsExpr:G}),_intrinsic:D("intrinsic",{startsExpr:G}),_infer:D("infer",{startsExpr:G}),_is:D("is",{startsExpr:G}),_mixins:D("mixins",{startsExpr:G}),_proto:D("proto",{startsExpr:G}),_require:D("require",{startsExpr:G}),_satisfies:D("satisfies",{startsExpr:G}),_keyof:D("keyof",{startsExpr:G}),_readonly:D("readonly",{startsExpr:G}),_unique:D("unique",{startsExpr:G}),_abstract:D("abstract",{startsExpr:G}),_declare:D("declare",{startsExpr:G}),_enum:D("enum",{startsExpr:G}),_module:D("module",{startsExpr:G}),_namespace:D("namespace",{startsExpr:G}),_interface:D("interface",{startsExpr:G}),_type:D("type",{startsExpr:G}),_opaque:D("opaque",{startsExpr:G}),name:O("name",{startsExpr:G}),string:O("string",{startsExpr:G}),num:O("num",{startsExpr:G}),bigint:O("bigint",{startsExpr:G}),decimal:O("decimal",{startsExpr:G}),regexp:O("regexp",{startsExpr:G}),privateName:O("#name",{startsExpr:G}),eof:O("eof"),jsxName:O("jsxName"),jsxText:O("jsxText",{beforeExpr:!0}),jsxTagStart:O("jsxTagStart",{startsExpr:!0}),jsxTagEnd:O("jsxTagEnd"),placeholder:O("%%",{startsExpr:!0})};h[8].updateContext=(Z)=>{Z.pop()},h[5].updateContext=h[7].updateContext=h[23].updateContext=(Z)=>{Z.push(T.brace)},h[22].updateContext=(Z)=>{if(Z[Z.length-1]===T.template)Z.pop();else Z.push(T.template)},h[142].updateContext=(Z)=>{Z.push(T.j_expr,T.j_oTag)};var gJ="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",XZ="\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",K0=new RegExp("["+gJ+"]"),G0=new RegExp("["+gJ+XZ+"]");gJ=XZ=null;var YZ=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],F0=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239],hJ={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},$0=new Set(hJ.keyword),O0=new Set(hJ.strict),_0=new Set(hJ.strictBind),C0=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete","implements","interface","let","package","private","protected","public","static","yield","eval","arguments","enum","await"]);class KJ{constructor(Z){this.flags=0,this.names=new Map,this.firstLexicalName="",this.flags=Z}}class GJ{constructor(Z,X){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=new Map,this.parser=Z,this.inModule=X}get inTopLevel(){return(this.currentScope().flags&1)>0}get inFunction(){return(this.currentVarScopeFlags()&2)>0}get allowSuper(){return(this.currentThisScopeFlags()&16)>0}get allowDirectSuper(){return(this.currentThisScopeFlags()&32)>0}get inClass(){return(this.currentThisScopeFlags()&64)>0}get inClassAndNotInNonArrowFunction(){const Z=this.currentThisScopeFlags();return(Z&64)>0&&(Z&2)===0}get inStaticBlock(){for(let Z=this.scopeStack.length-1;;Z--){const{flags:X}=this.scopeStack[Z];if(X&128)return!0;if(X&(387|64))return!1}}get inNonArrowFunction(){return(this.currentThisScopeFlags()&2)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(Z){return new KJ(Z)}enter(Z){this.scopeStack.push(this.createScope(Z))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(Z){return!!(Z.flags&(2|128)||!this.parser.inModule&&Z.flags&1)}declareName(Z,X,J){let Q=this.currentScope();if(X&8||X&16){this.checkRedeclarationInScope(Q,Z,X,J);let Y=Q.names.get(Z)||0;if(X&16)Y=Y|4;else{if(!Q.firstLexicalName)Q.firstLexicalName=Z;Y=Y|2}if(Q.names.set(Z,Y),X&8)this.maybeExportDefined(Q,Z)}else if(X&4){for(let Y=this.scopeStack.length-1;Y>=0;--Y)if(Q=this.scopeStack[Y],this.checkRedeclarationInScope(Q,Z,X,J),Q.names.set(Z,(Q.names.get(Z)||0)|1),this.maybeExportDefined(Q,Z),Q.flags&387)break}if(this.parser.inModule&&Q.flags&1)this.undefinedExports.delete(Z)}maybeExportDefined(Z,X){if(this.parser.inModule&&Z.flags&1)this.undefinedExports.delete(X)}checkRedeclarationInScope(Z,X,J,Q){if(this.isRedeclaredInScope(Z,X,J))this.parser.raise(q.VarRedeclaration,Q,{identifierName:X})}isRedeclaredInScope(Z,X,J){if(!(J&1))return!1;if(J&8)return Z.names.has(X);const Q=Z.names.get(X);if(J&16)return(Q&2)>0||!this.treatFunctionsAsVarInScope(Z)&&(Q&1)>0;return(Q&2)>0&&!(Z.flags&8&&Z.firstLexicalName===X)||!this.treatFunctionsAsVarInScope(Z)&&(Q&4)>0}checkLocalExport(Z){const{name:X}=Z;if(!this.scopeStack[0].names.has(X))this.undefinedExports.set(X,Z.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let Z=this.scopeStack.length-1;;Z--){const{flags:X}=this.scopeStack[Z];if(X&387)return X}}currentThisScopeFlags(){for(let Z=this.scopeStack.length-1;;Z--){const{flags:X}=this.scopeStack[Z];if(X&(387|64)&&!(X&4))return X}}}class UZ extends KJ{constructor(...Z){super(...Z);this.declareFunctions=new Set}}class qZ extends GJ{createScope(Z){return new UZ(Z)}declareName(Z,X,J){const Q=this.currentScope();if(X&2048){this.checkRedeclarationInScope(Q,Z,X,J),this.maybeExportDefined(Q,Z),Q.declareFunctions.add(Z);return}super.declareName(Z,X,J)}isRedeclaredInScope(Z,X,J){if(super.isRedeclaredInScope(Z,X,J))return!0;if(J&2048&&!Z.declareFunctions.has(X)){const Q=Z.names.get(X);return(Q&4)>0||(Q&2)>0}return!1}checkLocalExport(Z){if(!this.scopeStack[0].declareFunctions.has(Z.name))super.checkLocalExport(Z)}}class RZ{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}hasPlugin(Z){if(typeof Z==="string")return this.plugins.has(Z);else{const[X,J]=Z;if(!this.hasPlugin(X))return!1;const Q=this.plugins.get(X);for(let Y of Object.keys(J))if((Q==null?void 0:Q[Y])!==J[Y])return!1;return!0}}getPluginOption(Z,X){var J;return(J=this.plugins.get(Z))==null?void 0:J[X]}}class KZ extends RZ{addComment(Z){if(this.filename)Z.loc.filename=this.filename;const{commentsLen:X}=this.state;if(this.comments.length!==X)this.comments.length=X;this.comments.push(Z),this.state.commentsLen++}processComment(Z){const{commentStack:X}=this.state,J=X.length;if(J===0)return;let Q=J-1;const Y=X[Q];if(Y.start===Z.end)Y.leadingNode=Z,Q--;const{start:V}=Z;for(;Q>=0;Q--){const W=X[Q],z=W.end;if(z>V)W.containingNode=Z,this.finalizeComment(W),X.splice(Q,1);else{if(z===V)W.trailingNode=Z;break}}}finalizeComment(Z){const{comments:X}=Z;if(Z.leadingNode!==null||Z.trailingNode!==null){if(Z.leadingNode!==null)HZ(Z.leadingNode,X);if(Z.trailingNode!==null)v0(Z.trailingNode,X)}else{const{containingNode:J,start:Q}=Z;if(this.input.charCodeAt(Q-1)===44)switch(J.type){case"ObjectExpression":case"ObjectPattern":case"RecordExpression":s(J,J.properties,Z);break;case"CallExpression":case"OptionalCallExpression":s(J,J.arguments,Z);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":s(J,J.params,Z);break;case"ArrayExpression":case"ArrayPattern":case"TupleExpression":s(J,J.elements,Z);break;case"ExportNamedDeclaration":case"ImportDeclaration":s(J,J.specifiers,Z);break;default:QJ(J,X)}else QJ(J,X)}}finalizeRemainingComments(){const{commentStack:Z}=this.state;for(let X=Z.length-1;X>=0;X--)this.finalizeComment(Z[X]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(Z){const{commentStack:X}=this.state,{length:J}=X;if(J===0)return;const Q=X[J-1];if(Q.leadingNode===Z)Q.leadingNode=null}resetPreviousIdentifierLeadingComments(Z){const{commentStack:X}=this.state,{length:J}=X;if(J===0)return;if(X[J-1].trailingNode===Z)X[J-1].trailingNode=null;else if(J>=2&&X[J-2].trailingNode===Z)X[J-2].trailingNode=null}takeSurroundingComments(Z,X,J){const{commentStack:Q}=this.state,Y=Q.length;if(Y===0)return;let V=Y-1;for(;V>=0;V--){const W=Q[V],z=W.end;if(W.start===J)W.leadingNode=Z;else if(z===X)W.trailingNode=Z;else if(z<X)break}}}var T0=/\r\n|[\r\n\u2028\u2029]/,zJ=new RegExp(T0.source,"g"),OJ=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,_J=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g;class bJ{constructor(){this.flags=1024,this.curLine=void 0,this.lineStart=void 0,this.startLoc=void 0,this.endLoc=void 0,this.errors=[],this.potentialArrowAt=-1,this.noArrowAt=[],this.noArrowParamsConversionAt=[],this.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null},this.labels=[],this.commentsLen=0,this.commentStack=[],this.pos=0,this.type=139,this.value=null,this.start=0,this.end=0,this.lastTokEndLoc=null,this.lastTokStartLoc=null,this.context=[T.brace],this.firstInvalidTemplateEscapePos=null,this.strictErrors=new Map,this.tokensLength=0}get strict(){return(this.flags&1)>0}set strict(Z){if(Z)this.flags|=1;else this.flags&=-2}init({strictMode:Z,sourceType:X,startLine:J,startColumn:Q}){this.strict=Z===!1?!1:Z===!0?!0:X==="module",this.curLine=J,this.lineStart=-Q,this.startLoc=this.endLoc=new E(J,Q,0)}get maybeInArrowParameters(){return(this.flags&2)>0}set maybeInArrowParameters(Z){if(Z)this.flags|=2;else this.flags&=-3}get inType(){return(this.flags&4)>0}set inType(Z){if(Z)this.flags|=4;else this.flags&=-5}get noAnonFunctionType(){return(this.flags&8)>0}set noAnonFunctionType(Z){if(Z)this.flags|=8;else this.flags&=-9}get hasFlowComment(){return(this.flags&16)>0}set hasFlowComment(Z){if(Z)this.flags|=16;else this.flags&=-17}get isAmbientContext(){return(this.flags&32)>0}set isAmbientContext(Z){if(Z)this.flags|=32;else this.flags&=-33}get inAbstractClass(){return(this.flags&64)>0}set inAbstractClass(Z){if(Z)this.flags|=64;else this.flags&=-65}get inDisallowConditionalTypesContext(){return(this.flags&128)>0}set inDisallowConditionalTypesContext(Z){if(Z)this.flags|=128;else this.flags&=-129}get soloAwait(){return(this.flags&256)>0}set soloAwait(Z){if(Z)this.flags|=256;else this.flags&=-257}get inFSharpPipelineDirectBody(){return(this.flags&512)>0}set inFSharpPipelineDirectBody(Z){if(Z)this.flags|=512;else this.flags&=-513}get canStartJSXElement(){return(this.flags&1024)>0}set canStartJSXElement(Z){if(Z)this.flags|=1024;else this.flags&=-1025}get containsEsc(){return(this.flags&2048)>0}set containsEsc(Z){if(Z)this.flags|=2048;else this.flags&=-2049}get hasTopLevelAwait(){return(this.flags&4096)>0}set hasTopLevelAwait(Z){if(Z)this.flags|=4096;else this.flags&=-4097}curPosition(){return new E(this.curLine,this.pos-this.lineStart,this.pos)}clone(){const Z=new bJ;return Z.flags=this.flags,Z.curLine=this.curLine,Z.lineStart=this.lineStart,Z.startLoc=this.startLoc,Z.endLoc=this.endLoc,Z.errors=this.errors.slice(),Z.potentialArrowAt=this.potentialArrowAt,Z.noArrowAt=this.noArrowAt.slice(),Z.noArrowParamsConversionAt=this.noArrowParamsConversionAt.slice(),Z.topicContext=this.topicContext,Z.labels=this.labels.slice(),Z.commentsLen=this.commentsLen,Z.commentStack=this.commentStack.slice(),Z.pos=this.pos,Z.type=this.type,Z.value=this.value,Z.start=this.start,Z.end=this.end,Z.lastTokEndLoc=this.lastTokEndLoc,Z.lastTokStartLoc=this.lastTokStartLoc,Z.context=this.context.slice(),Z.firstInvalidTemplateEscapePos=this.firstInvalidTemplateEscapePos,Z.strictErrors=this.strictErrors,Z.tokensLength=this.tokensLength,Z}}var I0=function Z(X){return X>=48&&X<=57},dJ={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},jJ={bin:(Z)=>Z===48||Z===49,oct:(Z)=>Z>=48&&Z<=55,dec:(Z)=>Z>=48&&Z<=57,hex:(Z)=>Z>=48&&Z<=57||Z>=65&&Z<=70||Z>=97&&Z<=102},P0=new Set([103,109,115,105,121,117,100,118]);class g{constructor(Z){this.type=Z.type,this.value=Z.value,this.start=Z.start,this.end=Z.end,this.loc=new ZJ(Z.startLoc,Z.endLoc)}}class $Z extends KZ{constructor(Z,X){super();this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(J,Q,Y,V)=>{if(!this.options.errorRecovery)return!1;return this.raise(q.InvalidDigit,r(J,Q,Y),{radix:V}),!0},numericSeparatorInEscapeSequence:this.errorBuilder(q.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(q.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(q.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(q.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(J,Q,Y)=>{this.recordStrictModeErrors(q.StrictNumericEscape,r(J,Q,Y))},unterminated:(J,Q,Y)=>{throw this.raise(q.UnterminatedString,r(J-1,Q,Y))}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(q.StrictNumericEscape),unterminated:(J,Q,Y)=>{throw this.raise(q.UnterminatedTemplate,r(J,Q,Y))}}),this.state=new bJ,this.state.init(Z),this.input=X,this.length=X.length,this.comments=[],this.isLookahead=!1}pushToken(Z){this.tokens.length=this.state.tokensLength,this.tokens.push(Z),++this.state.tokensLength}next(){if(this.checkKeywordEscapes(),this.options.tokens)this.pushToken(new g(this.state));this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(Z){if(this.match(Z))return this.next(),!0;else return!1}match(Z){return this.state.type===Z}createLookaheadState(Z){return{pos:Z.pos,value:null,type:Z.type,start:Z.start,end:Z.end,context:[this.curContext()],inType:Z.inType,startLoc:Z.startLoc,lastTokEndLoc:Z.lastTokEndLoc,curLine:Z.curLine,lineStart:Z.lineStart,curPosition:Z.curPosition}}lookahead(){const Z=this.state;this.state=this.createLookaheadState(Z),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;const X=this.state;return this.state=Z,X}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(Z){return OJ.lastIndex=Z,OJ.test(this.input)?OJ.lastIndex:Z}lookaheadCharCode(){return this.input.charCodeAt(this.nextTokenStart())}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(Z){return _J.lastIndex=Z,_J.test(this.input)?_J.lastIndex:Z}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(Z){let X=this.input.charCodeAt(Z);if((X&64512)===55296&&++Z<this.input.length){const J=this.input.charCodeAt(Z);if((J&64512)===56320)X=65536+((X&1023)<<10)+(J&1023)}return X}setStrict(Z){if(this.state.strict=Z,Z)this.state.strictErrors.forEach(([X,J])=>this.raise(X,J)),this.state.strictErrors.clear()}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){if(this.skipSpace(),this.state.start=this.state.pos,!this.isLookahead)this.state.startLoc=this.state.curPosition();if(this.state.pos>=this.length){this.finishToken(139);return}this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(Z){let X;if(!this.isLookahead)X=this.state.curPosition();const J=this.state.pos,Q=this.input.indexOf(Z,J+2);if(Q===-1)throw this.raise(q.UnterminatedComment,this.state.curPosition());this.state.pos=Q+Z.length,zJ.lastIndex=J+2;while(zJ.test(this.input)&&zJ.lastIndex<=Q)++this.state.curLine,this.state.lineStart=zJ.lastIndex;if(this.isLookahead)return;const Y={type:"CommentBlock",value:this.input.slice(J+2,Q),start:J,end:Q+Z.length,loc:new ZJ(X,this.state.curPosition())};if(this.options.tokens)this.pushToken(Y);return Y}skipLineComment(Z){const X=this.state.pos;let J;if(!this.isLookahead)J=this.state.curPosition();let Q=this.input.charCodeAt(this.state.pos+=Z);if(this.state.pos<this.length)while(!a(Q)&&++this.state.pos<this.length)Q=this.input.charCodeAt(this.state.pos);if(this.isLookahead)return;const Y=this.state.pos,W={type:"CommentLine",value:this.input.slice(X+Z,Y),start:X,end:Y,loc:new ZJ(J,this.state.curPosition())};if(this.options.tokens)this.pushToken(W);return W}skipSpace(){const Z=this.state.pos,X=[];J:while(this.state.pos<this.length){const J=this.input.charCodeAt(this.state.pos);switch(J){case 32:case 160:case 9:++this.state.pos;break;case 13:if(this.input.charCodeAt(this.state.pos+1)===10)++this.state.pos;case 10:case 8232:case 8233:++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;break;case 47:switch(this.input.charCodeAt(this.state.pos+1)){case 42:{const Q=this.skipBlockComment("*/");if(Q!==void 0){if(this.addComment(Q),this.options.attachComment)X.push(Q)}break}case 47:{const Q=this.skipLineComment(2);if(Q!==void 0){if(this.addComment(Q),this.options.attachComment)X.push(Q)}break}default:break J}break;default:if(M0(J))++this.state.pos;else if(J===45&&!this.inModule&&this.options.annexB){const Q=this.state.pos;if(this.input.charCodeAt(Q+1)===45&&this.input.charCodeAt(Q+2)===62&&(Z===0||this.state.lineStart>Z)){const Y=this.skipLineComment(3);if(Y!==void 0){if(this.addComment(Y),this.options.attachComment)X.push(Y)}}else break J}else if(J===60&&!this.inModule&&this.options.annexB){const Q=this.state.pos;if(this.input.charCodeAt(Q+1)===33&&this.input.charCodeAt(Q+2)===45&&this.input.charCodeAt(Q+3)===45){const Y=this.skipLineComment(4);if(Y!==void 0){if(this.addComment(Y),this.options.attachComment)X.push(Y)}}else break J}else break J}}if(X.length>0){const J=this.state.pos,Q={start:Z,end:J,comments:X,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(Q)}}finishToken(Z,X){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();const J=this.state.type;if(this.state.type=Z,this.state.value=X,!this.isLookahead)this.updateContext(J)}replaceToken(Z){this.state.type=Z,this.updateContext()}readToken_numberSign(){if(this.state.pos===0&&this.readToken_interpreter())return;const Z=this.state.pos+1,X=this.codePointAtPos(Z);if(X>=48&&X<=57)throw this.raise(q.UnexpectedDigitAfterHash,this.state.curPosition());if(X===123||X===91&&this.hasPlugin("recordAndTuple")){if(this.expectPlugin("recordAndTuple"),this.getPluginOption("recordAndTuple","syntaxType")==="bar")throw this.raise(X===123?q.RecordExpressionHashIncorrectStartSyntaxType:q.TupleExpressionHashIncorrectStartSyntaxType,this.state.curPosition());if(this.state.pos+=2,X===123)this.finishToken(7);else this.finishToken(1)}else if(b(X))++this.state.pos,this.finishToken(138,this.readWord1(X));else if(X===92)++this.state.pos,this.finishToken(138,this.readWord1());else this.finishOp(27,1)}readToken_dot(){const Z=this.input.charCodeAt(this.state.pos+1);if(Z>=48&&Z<=57){this.readNumber(!0);return}if(Z===46&&this.input.charCodeAt(this.state.pos+2)===46)this.state.pos+=3,this.finishToken(21);else++this.state.pos,this.finishToken(16)}readToken_slash(){if(this.input.charCodeAt(this.state.pos+1)===61)this.finishOp(31,2);else this.finishOp(56,1)}readToken_interpreter(){if(this.state.pos!==0||this.length<2)return!1;let Z=this.input.charCodeAt(this.state.pos+1);if(Z!==33)return!1;const X=this.state.pos;this.state.pos+=1;while(!a(Z)&&++this.state.pos<this.length)Z=this.input.charCodeAt(this.state.pos);const J=this.input.slice(X+2,this.state.pos);return this.finishToken(28,J),!0}readToken_mult_modulo(Z){let X=Z===42?55:54,J=1,Q=this.input.charCodeAt(this.state.pos+1);if(Z===42&&Q===42)J++,Q=this.input.charCodeAt(this.state.pos+2),X=57;if(Q===61&&!this.state.inType)J++,X=Z===37?33:30;this.finishOp(X,J)}readToken_pipe_amp(Z){const X=this.input.charCodeAt(this.state.pos+1);if(X===Z){if(this.input.charCodeAt(this.state.pos+2)===61)this.finishOp(30,3);else this.finishOp(Z===124?41:42,2);return}if(Z===124){if(X===62){this.finishOp(39,2);return}if(this.hasPlugin("recordAndTuple")&&X===125){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(q.RecordExpressionBarIncorrectEndSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(9);return}if(this.hasPlugin("recordAndTuple")&&X===93){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(q.TupleExpressionBarIncorrectEndSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(4);return}}if(X===61){this.finishOp(30,2);return}this.finishOp(Z===124?43:45,1)}readToken_caret(){const Z=this.input.charCodeAt(this.state.pos+1);if(Z===61&&!this.state.inType)this.finishOp(32,2);else if(Z===94&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"^^"}])){if(this.finishOp(37,2),this.input.codePointAt(this.state.pos)===94)this.unexpected()}else this.finishOp(44,1)}readToken_atSign(){if(this.input.charCodeAt(this.state.pos+1)===64&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"@@"}]))this.finishOp(38,2);else this.finishOp(26,1)}readToken_plus_min(Z){const X=this.input.charCodeAt(this.state.pos+1);if(X===Z){this.finishOp(34,2);return}if(X===61)this.finishOp(30,2);else this.finishOp(53,1)}readToken_lt(){const{pos:Z}=this.state,X=this.input.charCodeAt(Z+1);if(X===60){if(this.input.charCodeAt(Z+2)===61){this.finishOp(30,3);return}this.finishOp(51,2);return}if(X===61){this.finishOp(49,2);return}this.finishOp(47,1)}readToken_gt(){const{pos:Z}=this.state,X=this.input.charCodeAt(Z+1);if(X===62){const J=this.input.charCodeAt(Z+2)===62?3:2;if(this.input.charCodeAt(Z+J)===61){this.finishOp(30,J+1);return}this.finishOp(52,J);return}if(X===61){this.finishOp(49,2);return}this.finishOp(48,1)}readToken_eq_excl(Z){const X=this.input.charCodeAt(this.state.pos+1);if(X===61){this.finishOp(46,this.input.charCodeAt(this.state.pos+2)===61?3:2);return}if(Z===61&&X===62){this.state.pos+=2,this.finishToken(19);return}this.finishOp(Z===61?29:35,1)}readToken_question(){const Z=this.input.charCodeAt(this.state.pos+1),X=this.input.charCodeAt(this.state.pos+2);if(Z===63)if(X===61)this.finishOp(30,3);else this.finishOp(40,2);else if(Z===46&&!(X>=48&&X<=57))this.state.pos+=2,this.finishToken(18);else++this.state.pos,this.finishToken(17)}getTokenFromCode(Z){switch(Z){case 46:this.readToken_dot();return;case 40:++this.state.pos,this.finishToken(10);return;case 41:++this.state.pos,this.finishToken(11);return;case 59:++this.state.pos,this.finishToken(13);return;case 44:++this.state.pos,this.finishToken(12);return;case 91:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(q.TupleExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(2)}else++this.state.pos,this.finishToken(0);return;case 93:++this.state.pos,this.finishToken(3);return;case 123:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(q.RecordExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(6)}else++this.state.pos,this.finishToken(5);return;case 125:++this.state.pos,this.finishToken(8);return;case 58:if(this.hasPlugin("functionBind")&&this.input.charCodeAt(this.state.pos+1)===58)this.finishOp(15,2);else++this.state.pos,this.finishToken(14);return;case 63:this.readToken_question();return;case 96:this.readTemplateToken();return;case 48:{const X=this.input.charCodeAt(this.state.pos+1);if(X===120||X===88){this.readRadixNumber(16);return}if(X===111||X===79){this.readRadixNumber(8);return}if(X===98||X===66){this.readRadixNumber(2);return}}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:this.readNumber(!1);return;case 34:case 39:this.readString(Z);return;case 47:this.readToken_slash();return;case 37:case 42:this.readToken_mult_modulo(Z);return;case 124:case 38:this.readToken_pipe_amp(Z);return;case 94:this.readToken_caret();return;case 43:case 45:this.readToken_plus_min(Z);return;case 60:this.readToken_lt();return;case 62:this.readToken_gt();return;case 61:case 33:this.readToken_eq_excl(Z);return;case 126:this.finishOp(36,1);return;case 64:this.readToken_atSign();return;case 35:this.readToken_numberSign();return;case 92:this.readWord();return;default:if(b(Z)){this.readWord(Z);return}}throw this.raise(q.InvalidOrUnexpectedToken,this.state.curPosition(),{unexpected:String.fromCodePoint(Z)})}finishOp(Z,X){const J=this.input.slice(this.state.pos,this.state.pos+X);this.state.pos+=X,this.finishToken(Z,J)}readRegexp(){const Z=this.state.startLoc,X=this.state.start+1;let J,Q,{pos:Y}=this.state;for(;;++Y){if(Y>=this.length)throw this.raise(q.UnterminatedRegExp,w(Z,1));const U=this.input.charCodeAt(Y);if(a(U))throw this.raise(q.UnterminatedRegExp,w(Z,1));if(J)J=!1;else{if(U===91)Q=!0;else if(U===93&&Q)Q=!1;else if(U===47&&!Q)break;J=U===92}}const V=this.input.slice(X,Y);++Y;let W="";const z=()=>w(Z,Y+2-X);while(Y<this.length){const U=this.codePointAtPos(Y),j=String.fromCharCode(U);if(P0.has(U)){if(U===118){if(W.includes("u"))this.raise(q.IncompatibleRegExpUVFlags,z())}else if(U===117){if(W.includes("v"))this.raise(q.IncompatibleRegExpUVFlags,z())}if(W.includes(j))this.raise(q.DuplicateRegExpFlags,z())}else if(i(U)||U===92)this.raise(q.MalformedRegExpFlags,z());else break;++Y,W+=j}this.state.pos=Y,this.finishToken(137,{pattern:V,flags:W})}readInt(Z,X,J=!1,Q=!0){const{n:Y,pos:V}=GZ(this.input,this.state.pos,this.state.lineStart,this.state.curLine,Z,X,J,Q,this.errorHandlers_readInt,!1);return this.state.pos=V,Y}readRadixNumber(Z){const X=this.state.curPosition();let J=!1;this.state.pos+=2;const Q=this.readInt(Z);if(Q==null)this.raise(q.InvalidDigit,w(X,2),{radix:Z});const Y=this.input.charCodeAt(this.state.pos);if(Y===110)++this.state.pos,J=!0;else if(Y===109)throw this.raise(q.InvalidDecimal,X);if(b(this.codePointAtPos(this.state.pos)))throw this.raise(q.NumberIdentifier,this.state.curPosition());if(J){const V=this.input.slice(X.index,this.state.pos).replace(/[_n]/g,"");this.finishToken(135,V);return}this.finishToken(134,Q)}readNumber(Z){const X=this.state.pos,J=this.state.curPosition();let Q=!1,Y=!1,V=!1,W=!1,z=!1;if(!Z&&this.readInt(10)===null)this.raise(q.InvalidNumber,this.state.curPosition());const U=this.state.pos-X>=2&&this.input.charCodeAt(X)===48;if(U){const K=this.input.slice(X,this.state.pos);if(this.recordStrictModeErrors(q.StrictOctalLiteral,J),!this.state.strict){const F=K.indexOf("_");if(F>0)this.raise(q.ZeroDigitNumericSeparator,w(J,F))}z=U&&!/[89]/.test(K)}let j=this.input.charCodeAt(this.state.pos);if(j===46&&!z)++this.state.pos,this.readInt(10),Q=!0,j=this.input.charCodeAt(this.state.pos);if((j===69||j===101)&&!z){if(j=this.input.charCodeAt(++this.state.pos),j===43||j===45)++this.state.pos;if(this.readInt(10)===null)this.raise(q.InvalidOrMissingExponent,J);Q=!0,W=!0,j=this.input.charCodeAt(this.state.pos)}if(j===110){if(Q||U)this.raise(q.InvalidBigIntLiteral,J);++this.state.pos,Y=!0}if(j===109){if(this.expectPlugin("decimal",this.state.curPosition()),W||U)this.raise(q.InvalidDecimal,J);++this.state.pos,V=!0}if(b(this.codePointAtPos(this.state.pos)))throw this.raise(q.NumberIdentifier,this.state.curPosition());const R=this.input.slice(X,this.state.pos).replace(/[_mn]/g,"");if(Y){this.finishToken(135,R);return}if(V){this.finishToken(136,R);return}const H=z?parseInt(R,8):parseFloat(R);this.finishToken(134,H)}readCodePoint(Z){const{code:X,pos:J}=FZ(this.input,this.state.pos,this.state.lineStart,this.state.curLine,Z,this.errorHandlers_readCodePoint);return this.state.pos=J,X}readString(Z){const{str:X,pos:J,curLine:Q,lineStart:Y}=tJ(Z===34?"double":"single",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string);this.state.pos=J+1,this.state.lineStart=Y,this.state.curLine=Q,this.finishToken(133,X)}readTemplateContinuation(){if(!this.match(8))this.unexpected(null,8);this.state.pos--,this.readTemplateToken()}readTemplateToken(){const Z=this.input[this.state.pos],{str:X,firstInvalidLoc:J,pos:Q,curLine:Y,lineStart:V}=tJ("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);if(this.state.pos=Q+1,this.state.lineStart=V,this.state.curLine=Y,J)this.state.firstInvalidTemplateEscapePos=new E(J.curLine,J.pos-J.lineStart,J.pos);if(this.input.codePointAt(Q)===96)this.finishToken(24,J?null:Z+X+"`");else this.state.pos++,this.finishToken(25,J?null:Z+X+"${")}recordStrictModeErrors(Z,X){const J=X.index;if(this.state.strict&&!this.state.strictErrors.has(J))this.raise(Z,X);else this.state.strictErrors.set(J,[Z,X])}readWord1(Z){this.state.containsEsc=!1;let X="";const J=this.state.pos;let Q=this.state.pos;if(Z!==void 0)this.state.pos+=Z<=65535?1:2;while(this.state.pos<this.length){const Y=this.codePointAtPos(this.state.pos);if(i(Y))this.state.pos+=Y<=65535?1:2;else if(Y===92){this.state.containsEsc=!0,X+=this.input.slice(Q,this.state.pos);const V=this.state.curPosition(),W=this.state.pos===J?b:i;if(this.input.charCodeAt(++this.state.pos)!==117){this.raise(q.MissingUnicodeEscape,this.state.curPosition()),Q=this.state.pos-1;continue}++this.state.pos;const z=this.readCodePoint(!0);if(z!==null){if(!W(z))this.raise(q.EscapedCharNotAnIdentifier,V);X+=String.fromCodePoint(z)}Q=this.state.pos}else break}return X+this.input.slice(Q,this.state.pos)}readWord(Z){const X=this.readWord1(Z),J=IJ.get(X);if(J!==void 0)this.finishToken(J,m(J));else this.finishToken(132,X)}checkKeywordEscapes(){const{type:Z}=this.state;if(LJ(Z)&&this.state.containsEsc)this.raise(q.InvalidEscapedReservedWord,this.state.startLoc,{reservedWord:m(Z)})}raise(Z,X,J={}){const Q=X instanceof E?X:X.loc.start,Y=Z(Q,J);if(!this.options.errorRecovery)throw Y;if(!this.isLookahead)this.state.errors.push(Y);return Y}raiseOverwrite(Z,X,J={}){const Q=X instanceof E?X:X.loc.start,Y=Q.index,V=this.state.errors;for(let W=V.length-1;W>=0;W--){const z=V[W];if(z.loc.index===Y)return V[W]=Z(Q,J);if(z.loc.index<Y)break}return this.raise(Z,X,J)}updateContext(Z){}unexpected(Z,X){throw this.raise(q.UnexpectedToken,Z!=null?Z:this.state.startLoc,{expected:X?m(X):null})}expectPlugin(Z,X){if(this.hasPlugin(Z))return!0;throw this.raise(q.MissingPlugin,X!=null?X:this.state.startLoc,{missingPlugin:[Z]})}expectOnePlugin(Z){if(!Z.some((X)=>this.hasPlugin(X)))throw this.raise(q.MissingOneOfPlugins,this.state.startLoc,{missingPlugin:Z})}errorBuilder(Z){return(X,J,Q)=>{this.raise(Z,r(X,J,Q))}}}class OZ{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}}class _Z{constructor(Z){this.parser=void 0,this.stack=[],this.undefinedPrivateNames=new Map,this.parser=Z}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new OZ)}exit(){const Z=this.stack.pop(),X=this.current();for(let[J,Q]of Array.from(Z.undefinedPrivateNames))if(X){if(!X.undefinedPrivateNames.has(J))X.undefinedPrivateNames.set(J,Q)}else this.parser.raise(q.InvalidPrivateFieldResolution,Q,{identifierName:J})}declarePrivateName(Z,X,J){const{privateNames:Q,loneAccessors:Y,undefinedPrivateNames:V}=this.current();let W=Q.has(Z);if(X&3){const z=W&&Y.get(Z);if(z){const U=z&4,j=X&4,R=z&3,H=X&3;if(W=R===H||U!==j,!W)Y.delete(Z)}else if(!W)Y.set(Z,X)}if(W)this.parser.raise(q.PrivateNameRedeclaration,J,{identifierName:Z});Q.add(Z),V.delete(Z)}usePrivateName(Z,X){let J;for(J of this.stack)if(J.privateNames.has(Z))return;if(J)J.undefinedPrivateNames.set(Z,X);else this.parser.raise(q.InvalidPrivateFieldResolution,X,{identifierName:Z})}}class YJ{constructor(Z=0){this.type=Z}canBeArrowParameterDeclaration(){return this.type===2||this.type===1}isCertainlyParameterDeclaration(){return this.type===3}}class uJ extends YJ{constructor(Z){super(Z);this.declarationErrors=new Map}recordDeclarationError(Z,X){const J=X.index;this.declarationErrors.set(J,[Z,X])}clearDeclarationError(Z){this.declarationErrors.delete(Z)}iterateErrors(Z){this.declarationErrors.forEach(Z)}}class BZ{constructor(Z){this.parser=void 0,this.stack=[new YJ],this.parser=Z}enter(Z){this.stack.push(Z)}exit(){this.stack.pop()}recordParameterInitializerError(Z,X){const J=X.loc.start,{stack:Q}=this;let Y=Q.length-1,V=Q[Y];while(!V.isCertainlyParameterDeclaration()){if(V.canBeArrowParameterDeclaration())V.recordDeclarationError(Z,J);else return;V=Q[--Y]}this.parser.raise(Z,J)}recordArrowParameterBindingError(Z,X){const{stack:J}=this,Q=J[J.length-1],Y=X.loc.start;if(Q.isCertainlyParameterDeclaration())this.parser.raise(Z,Y);else if(Q.canBeArrowParameterDeclaration())Q.recordDeclarationError(Z,Y);else return}recordAsyncArrowParametersError(Z){const{stack:X}=this;let J=X.length-1,Q=X[J];while(Q.canBeArrowParameterDeclaration()){if(Q.type===2)Q.recordDeclarationError(q.AwaitBindingIdentifier,Z);Q=X[--J]}}validateAsPattern(){const{stack:Z}=this,X=Z[Z.length-1];if(!X.canBeArrowParameterDeclaration())return;X.iterateErrors(([J,Q])=>{this.parser.raise(J,Q);let Y=Z.length-2,V=Z[Y];while(V.canBeArrowParameterDeclaration())V.clearDeclarationError(Q.index),V=Z[--Y]})}}class CZ{constructor(){this.stacks=[]}enter(Z){this.stacks.push(Z)}exit(){this.stacks.pop()}currentFlags(){return this.stacks[this.stacks.length-1]}get hasAwait(){return(this.currentFlags()&2)>0}get hasYield(){return(this.currentFlags()&1)>0}get hasReturn(){return(this.currentFlags()&4)>0}get hasIn(){return(this.currentFlags()&8)>0}}class NZ extends $Z{addExtra(Z,X,J,Q=!0){if(!Z)return;let{extra:Y}=Z;if(Y==null)Y={},Z.extra=Y;if(Q)Y[X]=J;else Object.defineProperty(Y,X,{enumerable:Q,value:J})}isContextual(Z){return this.state.type===Z&&!this.state.containsEsc}isUnparsedContextual(Z,X){const J=Z+X.length;if(this.input.slice(Z,J)===X){const Q=this.input.charCodeAt(J);return!(i(Q)||(Q&64512)===55296)}return!1}isLookaheadContextual(Z){const X=this.nextTokenStart();return this.isUnparsedContextual(X,Z)}eatContextual(Z){if(this.isContextual(Z))return this.next(),!0;return!1}expectContextual(Z,X){if(!this.eatContextual(Z)){if(X!=null)throw this.raise(X,this.state.startLoc);this.unexpected(null,Z)}}canInsertSemicolon(){return this.match(139)||this.match(8)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return aJ(this.input,this.state.lastTokEndLoc.index,this.state.start)}hasFollowingLineBreak(){return aJ(this.input,this.state.end,this.nextTokenStart())}isLineTerminator(){return this.eat(13)||this.canInsertSemicolon()}semicolon(Z=!0){if(Z?this.isLineTerminator():this.eat(13))return;this.raise(q.MissingSemicolon,this.state.lastTokEndLoc)}expect(Z,X){if(!this.eat(Z))this.unexpected(X,Z)}tryParse(Z,X=this.state.clone()){const J={node:null};try{const Q=Z((Y=null)=>{throw J.node=Y,J});if(this.state.errors.length>X.errors.length){const Y=this.state;return this.state=X,this.state.tokensLength=Y.tokensLength,{node:Q,error:Y.errors[X.errors.length],thrown:!1,aborted:!1,failState:Y}}return{node:Q,error:null,thrown:!1,aborted:!1,failState:null}}catch(Q){const Y=this.state;if(this.state=X,Q instanceof SyntaxError)return{node:null,error:Q,thrown:!0,aborted:!1,failState:Y};if(Q===J)return{node:J.node,error:null,thrown:!1,aborted:!0,failState:Y};throw Q}}checkExpressionErrors(Z,X){if(!Z)return!1;const{shorthandAssignLoc:J,doubleProtoLoc:Q,privateKeyLoc:Y,optionalParametersLoc:V}=Z,W=!!J||!!Q||!!V||!!Y;if(!X)return W;if(J!=null)this.raise(q.InvalidCoverInitializedName,J);if(Q!=null)this.raise(q.DuplicateProto,Q);if(Y!=null)this.raise(q.UnexpectedPrivateField,Y);if(V!=null)this.unexpected(V)}isLiteralPropertyName(){return QZ(this.state.type)}isPrivateName(Z){return Z.type==="PrivateName"}getPrivateNameSV(Z){return Z.id.name}hasPropertyAsPrivateName(Z){return(Z.type==="MemberExpression"||Z.type==="OptionalMemberExpression")&&this.isPrivateName(Z.property)}isObjectProperty(Z){return Z.type==="ObjectProperty"}isObjectMethod(Z){return Z.type==="ObjectMethod"}initializeScopes(Z=this.options.sourceType==="module"){const X=this.state.labels;this.state.labels=[];const J=this.exportedIdentifiers;this.exportedIdentifiers=new Set;const Q=this.inModule;this.inModule=Z;const Y=this.scope,V=this.getScopeHandler();this.scope=new V(this,Z);const W=this.prodParam;this.prodParam=new CZ;const z=this.classScope;this.classScope=new _Z(this);const U=this.expressionScope;return this.expressionScope=new BZ(this),()=>{this.state.labels=X,this.exportedIdentifiers=J,this.inModule=Q,this.scope=Y,this.prodParam=W,this.classScope=z,this.expressionScope=U}}enterInitialScopes(){let Z=0;if(this.inModule)Z|=2;this.scope.enter(1),this.prodParam.enter(Z)}checkDestructuringPrivate(Z){const{privateKeyLoc:X}=Z;if(X!==null)this.expectPlugin("destructuringPrivate",X)}}class JJ{constructor(){this.shorthandAssignLoc=null,this.doubleProtoLoc=null,this.privateKeyLoc=null,this.optionalParametersLoc=null}}class XJ{constructor(Z,X,J){if(this.type="",this.start=X,this.end=0,this.loc=new ZJ(J),Z!=null&&Z.options.ranges)this.range=[X,0];if(Z!=null&&Z.filename)this.loc.filename=Z.filename}}var EJ=XJ.prototype;EJ.__clone=function(){const Z=new XJ(void 0,this.start,this.loc.start),X=Object.keys(this);for(let J=0,Q=X.length;J<Q;J++){const Y=X[J];if(Y!=="leadingComments"&&Y!=="trailingComments"&&Y!=="innerComments")Z[Y]=this[Y]}return Z};class vZ extends NZ{startNode(){const Z=this.state.startLoc;return new XJ(this,Z.index,Z)}startNodeAt(Z){return new XJ(this,Z.index,Z)}startNodeAtNode(Z){return this.startNodeAt(Z.loc.start)}finishNode(Z,X){return this.finishNodeAt(Z,X,this.state.lastTokEndLoc)}finishNodeAt(Z,X,J){if(Z.type=X,Z.end=J.index,Z.loc.end=J,this.options.ranges)Z.range[1]=J.index;if(this.options.attachComment)this.processComment(Z);return Z}resetStartLocation(Z,X){if(Z.start=X.index,Z.loc.start=X,this.options.ranges)Z.range[0]=X.index}resetEndLocation(Z,X=this.state.lastTokEndLoc){if(Z.end=X.index,Z.loc.end=X,this.options.ranges)Z.range[1]=X.index}resetStartLocationFromNode(Z,X){this.resetStartLocation(Z,X.loc.start)}}var b0=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),_=u`flow`({AmbiguousConditionalArrow:"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",AmbiguousDeclareModuleKind:"Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.",AssignReservedType:({reservedType:Z})=>`Cannot overwrite reserved type ${Z}.`,DeclareClassElement:"The `declare` modifier can only appear on class fields.",DeclareClassFieldInitializer:"Initializers are not allowed in fields with the `declare` modifier.",DuplicateDeclareModuleExports:"Duplicate `declare module.exports` statement.",EnumBooleanMemberNotInitialized:({memberName:Z,enumName:X})=>`Boolean enum members need to be initialized. Use either \`${Z} = true,\` or \`${Z} = false,\` in enum \`${X}\`.`,EnumDuplicateMemberName:({memberName:Z,enumName:X})=>`Enum member names need to be unique, but the name \`${Z}\` has already been used before in enum \`${X}\`.`,EnumInconsistentMemberValues:({enumName:Z})=>`Enum \`${Z}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:Z,enumName:X})=>`Enum type \`${Z}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${X}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:Z})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${Z}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:Z,memberName:X,explicitType:J})=>`Enum \`${Z}\` has type \`${J}\`, so the initializer of \`${X}\` needs to be a ${J} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:Z,memberName:X})=>`Symbol enum members cannot be initialized. Use \`${X},\` in enum \`${Z}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:Z,memberName:X})=>`The enum member initializer for \`${X}\` needs to be a literal (either a boolean, number, or string) in enum \`${Z}\`.`,EnumInvalidMemberName:({enumName:Z,memberName:X,suggestion:J})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${X}\`, consider using \`${J}\`, in enum \`${Z}\`.`,EnumNumberMemberNotInitialized:({enumName:Z,memberName:X})=>`Number enum members need to be initialized, e.g. \`${X} = 1\` in enum \`${Z}\`.`,EnumStringMemberInconsistentlyInitialized:({enumName:Z})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${Z}\`.`,GetterMayNotHaveThisParam:"A getter cannot have a `this` parameter.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` or `typeof` keyword.",ImportTypeShorthandOnlyInPureImport:"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",InexactInsideExact:"Explicit inexact syntax cannot appear inside an explicit exact object type.",InexactInsideNonObject:"Explicit inexact syntax cannot appear in class or interface definitions.",InexactVariance:"Explicit inexact syntax cannot have variance.",InvalidNonTypeImportInDeclareModule:"Imports within a `declare module` body must always be `import type` or `import typeof`.",MissingTypeParamDefault:"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",NestedDeclareModule:"`declare module` cannot be used inside another `declare module`.",NestedFlowComment:"Cannot have a flow comment inside another flow comment.",PatternIsOptional:Object.assign({message:"A binding pattern parameter cannot be optional in an implementation signature."},{reasonCode:"OptionalBindingPattern"}),SetterMayNotHaveThisParam:"A setter cannot have a `this` parameter.",SpreadVariance:"Spread properties cannot have variance.",ThisParamAnnotationRequired:"A type annotation is required for the `this` parameter.",ThisParamBannedInConstructor:"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",ThisParamMayNotBeOptional:"The `this` parameter cannot be optional.",ThisParamMustBeFirst:"The `this` parameter must be the first function parameter.",ThisParamNoDefault:"The `this` parameter may not have a default value.",TypeBeforeInitializer:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeCastInPattern:"The type cast expression is expected to be wrapped with parenthesis.",UnexpectedExplicitInexactInObject:"Explicit inexact syntax must appear at the end of an inexact object.",UnexpectedReservedType:({reservedType:Z})=>`Unexpected reserved type ${Z}.`,UnexpectedReservedUnderscore:"`_` is only allowed as a type argument to call or new.",UnexpectedSpaceBetweenModuloChecks:"Spaces between `%` and `checks` are not allowed here.",UnexpectedSpreadType:"Spread operator cannot appear in class or interface definitions.",UnexpectedSubtractionOperand:'Unexpected token, expected "number" or "bigint".',UnexpectedTokenAfterTypeParameter:"Expected an arrow function after this type parameter declaration.",UnexpectedTypeParameterBeforeAsyncArrowFunction:"Type parameters must come after the async keyword, e.g. instead of `<T> async () => {}`, use `async <T>() => {}`.",UnsupportedDeclareExportKind:({unsupportedExportKind:Z,suggestion:X})=>`\`declare export ${Z}\` is not supported. Use \`${X}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."}),E0={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"},f0=/\*?\s*@((?:no)?flow)\b/,y0=(Z)=>class X extends Z{constructor(...J){super(...J);this.flowPragma=void 0}getScopeHandler(){return qZ}shouldParseTypes(){return this.getPluginOption("flow","all")||this.flowPragma==="flow"}shouldParseEnums(){return!!this.getPluginOption("flow","enums")}finishToken(J,Q){if(J!==133&&J!==13&&J!==28){if(this.flowPragma===void 0)this.flowPragma=null}super.finishToken(J,Q)}addComment(J){if(this.flowPragma===void 0){const Q=f0.exec(J.value);if(!Q);else if(Q[1]==="flow")this.flowPragma="flow";else if(Q[1]==="noflow")this.flowPragma="noflow";else throw new Error("Unexpected flow pragma")}super.addComment(J)}flowParseTypeInitialiser(J){const Q=this.state.inType;this.state.inType=!0,this.expect(J||14);const Y=this.flowParseType();return this.state.inType=Q,Y}flowParsePredicate(){const J=this.startNode(),Q=this.state.startLoc;if(this.next(),this.expectContextual(110),this.state.lastTokStartLoc.index>Q.index+1)this.raise(_.UnexpectedSpaceBetweenModuloChecks,Q);if(this.eat(10))return J.value=super.parseExpression(),this.expect(11),this.finishNode(J,"DeclaredPredicate");else return this.finishNode(J,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){const J=this.state.inType;this.state.inType=!0,this.expect(14);let Q=null,Y=null;if(this.match(54))this.state.inType=J,Y=this.flowParsePredicate();else if(Q=this.flowParseType(),this.state.inType=J,this.match(54))Y=this.flowParsePredicate();return[Q,Y]}flowParseDeclareClass(J){return this.next(),this.flowParseInterfaceish(J,!0),this.finishNode(J,"DeclareClass")}flowParseDeclareFunction(J){this.next();const Q=J.id=this.parseIdentifier(),Y=this.startNode(),V=this.startNode();if(this.match(47))Y.typeParameters=this.flowParseTypeParameterDeclaration();else Y.typeParameters=null;this.expect(10);const W=this.flowParseFunctionTypeParams();return Y.params=W.params,Y.rest=W.rest,Y.this=W._this,this.expect(11),[Y.returnType,J.predicate]=this.flowParseTypeAndPredicateInitialiser(),V.typeAnnotation=this.finishNode(Y,"FunctionTypeAnnotation"),Q.typeAnnotation=this.finishNode(V,"TypeAnnotation"),this.resetEndLocation(Q),this.semicolon(),this.scope.declareName(J.id.name,2048,J.id.loc.start),this.finishNode(J,"DeclareFunction")}flowParseDeclare(J,Q){if(this.match(80))return this.flowParseDeclareClass(J);else if(this.match(68))return this.flowParseDeclareFunction(J);else if(this.match(74))return this.flowParseDeclareVariable(J);else if(this.eatContextual(127))if(this.match(16))return this.flowParseDeclareModuleExports(J);else{if(Q)this.raise(_.NestedDeclareModule,this.state.lastTokStartLoc);return this.flowParseDeclareModule(J)}else if(this.isContextual(130))return this.flowParseDeclareTypeAlias(J);else if(this.isContextual(131))return this.flowParseDeclareOpaqueType(J);else if(this.isContextual(129))return this.flowParseDeclareInterface(J);else if(this.match(82))return this.flowParseDeclareExportDeclaration(J,Q);else this.unexpected()}flowParseDeclareVariable(J){return this.next(),J.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(J.id.name,5,J.id.loc.start),this.semicolon(),this.finishNode(J,"DeclareVariable")}flowParseDeclareModule(J){if(this.scope.enter(0),this.match(133))J.id=super.parseExprAtom();else J.id=this.parseIdentifier();const Q=J.body=this.startNode(),Y=Q.body=[];this.expect(5);while(!this.match(8)){let z=this.startNode();if(this.match(83)){if(this.next(),!this.isContextual(130)&&!this.match(87))this.raise(_.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc);super.parseImport(z)}else this.expectContextual(125,_.UnsupportedStatementInDeclareModule),z=this.flowParseDeclare(z,!0);Y.push(z)}this.scope.exit(),this.expect(8),this.finishNode(Q,"BlockStatement");let V=null,W=!1;return Y.forEach((z)=>{if(u0(z)){if(V==="CommonJS")this.raise(_.AmbiguousDeclareModuleKind,z);V="ES"}else if(z.type==="DeclareModuleExports"){if(W)this.raise(_.DuplicateDeclareModuleExports,z);if(V==="ES")this.raise(_.AmbiguousDeclareModuleKind,z);V="CommonJS",W=!0}}),J.kind=V||"CommonJS",this.finishNode(J,"DeclareModule")}flowParseDeclareExportDeclaration(J,Q){if(this.expect(82),this.eat(65)){if(this.match(68)||this.match(80))J.declaration=this.flowParseDeclare(this.startNode());else J.declaration=this.flowParseType(),this.semicolon();return J.default=!0,this.finishNode(J,"DeclareExportDeclaration")}else{if(this.match(75)||this.isLet()||(this.isContextual(130)||this.isContextual(129))&&!Q){const Y=this.state.value;throw this.raise(_.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:Y,suggestion:E0[Y]})}if(this.match(74)||this.match(68)||this.match(80)||this.isContextual(131))return J.declaration=this.flowParseDeclare(this.startNode()),J.default=!1,this.finishNode(J,"DeclareExportDeclaration");else if(this.match(55)||this.match(5)||this.isContextual(129)||this.isContextual(130)||this.isContextual(131)){if(J=this.parseExport(J,null),J.type==="ExportNamedDeclaration")J.type="ExportDeclaration",J.default=!1,delete J.exportKind;return J.type="Declare"+J.type,J}}this.unexpected()}flowParseDeclareModuleExports(J){return this.next(),this.expectContextual(111),J.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(J,"DeclareModuleExports")}flowParseDeclareTypeAlias(J){this.next();const Q=this.flowParseTypeAlias(J);return Q.type="DeclareTypeAlias",Q}flowParseDeclareOpaqueType(J){this.next();const Q=this.flowParseOpaqueType(J,!0);return Q.type="DeclareOpaqueType",Q}flowParseDeclareInterface(J){return this.next(),this.flowParseInterfaceish(J,!1),this.finishNode(J,"DeclareInterface")}flowParseInterfaceish(J,Q){if(J.id=this.flowParseRestrictedIdentifier(!Q,!0),this.scope.declareName(J.id.name,Q?17:8201,J.id.loc.start),this.match(47))J.typeParameters=this.flowParseTypeParameterDeclaration();else J.typeParameters=null;if(J.extends=[],this.eat(81))do J.extends.push(this.flowParseInterfaceExtends());while(!Q&&this.eat(12));if(Q){if(J.implements=[],J.mixins=[],this.eatContextual(117))do J.mixins.push(this.flowParseInterfaceExtends());while(this.eat(12));if(this.eatContextual(113))do J.implements.push(this.flowParseInterfaceExtends());while(this.eat(12))}J.body=this.flowParseObjectType({allowStatic:Q,allowExact:!1,allowSpread:!1,allowProto:Q,allowInexact:!1})}flowParseInterfaceExtends(){const J=this.startNode();if(J.id=this.flowParseQualifiedTypeIdentifier(),this.match(47))J.typeParameters=this.flowParseTypeParameterInstantiation();else J.typeParameters=null;return this.finishNode(J,"InterfaceExtends")}flowParseInterface(J){return this.flowParseInterfaceish(J,!1),this.finishNode(J,"InterfaceDeclaration")}checkNotUnderscore(J){if(J==="_")this.raise(_.UnexpectedReservedUnderscore,this.state.startLoc)}checkReservedType(J,Q,Y){if(!b0.has(J))return;this.raise(Y?_.AssignReservedType:_.UnexpectedReservedType,Q,{reservedType:J})}flowParseRestrictedIdentifier(J,Q){return this.checkReservedType(this.state.value,this.state.startLoc,Q),this.parseIdentifier(J)}flowParseTypeAlias(J){if(J.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(J.id.name,8201,J.id.loc.start),this.match(47))J.typeParameters=this.flowParseTypeParameterDeclaration();else J.typeParameters=null;return J.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(J,"TypeAlias")}flowParseOpaqueType(J,Q){if(this.expectContextual(130),J.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(J.id.name,8201,J.id.loc.start),this.match(47))J.typeParameters=this.flowParseTypeParameterDeclaration();else J.typeParameters=null;if(J.supertype=null,this.match(14))J.supertype=this.flowParseTypeInitialiser(14);if(J.impltype=null,!Q)J.impltype=this.flowParseTypeInitialiser(29);return this.semicolon(),this.finishNode(J,"OpaqueType")}flowParseTypeParameter(J=!1){const Q=this.state.startLoc,Y=this.startNode(),V=this.flowParseVariance(),W=this.flowParseTypeAnnotatableIdentifier();if(Y.name=W.name,Y.variance=V,Y.bound=W.typeAnnotation,this.match(29))this.eat(29),Y.default=this.flowParseType();else if(J)this.raise(_.MissingTypeParamDefault,Q);return this.finishNode(Y,"TypeParameter")}flowParseTypeParameterDeclaration(){const J=this.state.inType,Q=this.startNode();if(Q.params=[],this.state.inType=!0,this.match(47)||this.match(142))this.next();else this.unexpected();let Y=!1;do{const V=this.flowParseTypeParameter(Y);if(Q.params.push(V),V.default)Y=!0;if(!this.match(48))this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=J,this.finishNode(Q,"TypeParameterDeclaration")}flowParseTypeParameterInstantiation(){const J=this.startNode(),Q=this.state.inType;J.params=[],this.state.inType=!0,this.expect(47);const Y=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!1;while(!this.match(48))if(J.params.push(this.flowParseType()),!this.match(48))this.expect(12);return this.state.noAnonFunctionType=Y,this.expect(48),this.state.inType=Q,this.finishNode(J,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){const J=this.startNode(),Q=this.state.inType;J.params=[],this.state.inType=!0,this.expect(47);while(!this.match(48))if(J.params.push(this.flowParseTypeOrImplicitInstantiation()),!this.match(48))this.expect(12);return this.expect(48),this.state.inType=Q,this.finishNode(J,"TypeParameterInstantiation")}flowParseInterfaceType(){const J=this.startNode();if(this.expectContextual(129),J.extends=[],this.eat(81))do J.extends.push(this.flowParseInterfaceExtends());while(this.eat(12));return J.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(J,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(134)||this.match(133)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(J,Q,Y){if(J.static=Q,this.lookahead().type===14)J.id=this.flowParseObjectPropertyKey(),J.key=this.flowParseTypeInitialiser();else J.id=null,J.key=this.flowParseType();return this.expect(3),J.value=this.flowParseTypeInitialiser(),J.variance=Y,this.finishNode(J,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(J,Q){if(J.static=Q,J.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(47)||this.match(10))J.method=!0,J.optional=!1,J.value=this.flowParseObjectTypeMethodish(this.startNodeAt(J.loc.start));else{if(J.method=!1,this.eat(17))J.optional=!0;J.value=this.flowParseTypeInitialiser()}return this.finishNode(J,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(J){if(J.params=[],J.rest=null,J.typeParameters=null,J.this=null,this.match(47))J.typeParameters=this.flowParseTypeParameterDeclaration();if(this.expect(10),this.match(78)){if(J.this=this.flowParseFunctionTypeParam(!0),J.this.name=null,!this.match(11))this.expect(12)}while(!this.match(11)&&!this.match(21))if(J.params.push(this.flowParseFunctionTypeParam(!1)),!this.match(11))this.expect(12);if(this.eat(21))J.rest=this.flowParseFunctionTypeParam(!1);return this.expect(11),J.returnType=this.flowParseTypeInitialiser(),this.finishNode(J,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(J,Q){const Y=this.startNode();return J.static=Q,J.value=this.flowParseObjectTypeMethodish(Y),this.finishNode(J,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:J,allowExact:Q,allowSpread:Y,allowProto:V,allowInexact:W}){const z=this.state.inType;this.state.inType=!0;const U=this.startNode();U.callProperties=[],U.properties=[],U.indexers=[],U.internalSlots=[];let j,R,H=!1;if(Q&&this.match(6))this.expect(6),j=9,R=!0;else this.expect(5),j=8,R=!1;U.exact=R;while(!this.match(j)){let F=!1,B=null,A=null;const M=this.startNode();if(V&&this.isContextual(118)){const S=this.lookahead();if(S.type!==14&&S.type!==17)this.next(),B=this.state.startLoc,J=!1}if(J&&this.isContextual(106)){const S=this.lookahead();if(S.type!==14&&S.type!==17)this.next(),F=!0}const I=this.flowParseVariance();if(this.eat(0)){if(B!=null)this.unexpected(B);if(this.eat(0)){if(I)this.unexpected(I.loc.start);U.internalSlots.push(this.flowParseObjectTypeInternalSlot(M,F))}else U.indexers.push(this.flowParseObjectTypeIndexer(M,F,I))}else if(this.match(10)||this.match(47)){if(B!=null)this.unexpected(B);if(I)this.unexpected(I.loc.start);U.callProperties.push(this.flowParseObjectTypeCallProperty(M,F))}else{let S="init";if(this.isContextual(99)||this.isContextual(104)){const d=this.lookahead();if(QZ(d.type))S=this.state.value,this.next()}const VJ=this.flowParseObjectTypeProperty(M,F,B,I,S,Y,W!=null?W:!R);if(VJ===null)H=!0,A=this.state.lastTokStartLoc;else U.properties.push(VJ)}if(this.flowObjectTypeSemicolon(),A&&!this.match(8)&&!this.match(9))this.raise(_.UnexpectedExplicitInexactInObject,A)}if(this.expect(j),Y)U.inexact=H;const K=this.finishNode(U,"ObjectTypeAnnotation");return this.state.inType=z,K}flowParseObjectTypeProperty(J,Q,Y,V,W,z,U){if(this.eat(21)){if(this.match(12)||this.match(13)||this.match(8)||this.match(9)){if(!z)this.raise(_.InexactInsideNonObject,this.state.lastTokStartLoc);else if(!U)this.raise(_.InexactInsideExact,this.state.lastTokStartLoc);if(V)this.raise(_.InexactVariance,V);return null}if(!z)this.raise(_.UnexpectedSpreadType,this.state.lastTokStartLoc);if(Y!=null)this.unexpected(Y);if(V)this.raise(_.SpreadVariance,V);return J.argument=this.flowParseType(),this.finishNode(J,"ObjectTypeSpreadProperty")}else{J.key=this.flowParseObjectPropertyKey(),J.static=Q,J.proto=Y!=null,J.kind=W;let j=!1;if(this.match(47)||this.match(10)){if(J.method=!0,Y!=null)this.unexpected(Y);if(V)this.unexpected(V.loc.start);if(J.value=this.flowParseObjectTypeMethodish(this.startNodeAt(J.loc.start)),W==="get"||W==="set")this.flowCheckGetterSetterParams(J);if(!z&&J.key.name==="constructor"&&J.value.this)this.raise(_.ThisParamBannedInConstructor,J.value.this)}else{if(W!=="init")this.unexpected();if(J.method=!1,this.eat(17))j=!0;J.value=this.flowParseTypeInitialiser(),J.variance=V}return J.optional=j,this.finishNode(J,"ObjectTypeProperty")}}flowCheckGetterSetterParams(J){const Q=J.kind==="get"?0:1,Y=J.value.params.length+(J.value.rest?1:0);if(J.value.this)this.raise(J.kind==="get"?_.GetterMayNotHaveThisParam:_.SetterMayNotHaveThisParam,J.value.this);if(Y!==Q)this.raise(J.kind==="get"?q.BadGetterArity:q.BadSetterArity,J);if(J.kind==="set"&&J.value.rest)this.raise(q.BadSetterRestParameter,J)}flowObjectTypeSemicolon(){if(!this.eat(13)&&!this.eat(12)&&!this.match(8)&&!this.match(9))this.unexpected()}flowParseQualifiedTypeIdentifier(J,Q){var Y;(Y=J)!=null||(J=this.state.startLoc);let V=Q||this.flowParseRestrictedIdentifier(!0);while(this.eat(16)){const W=this.startNodeAt(J);W.qualification=V,W.id=this.flowParseRestrictedIdentifier(!0),V=this.finishNode(W,"QualifiedTypeIdentifier")}return V}flowParseGenericType(J,Q){const Y=this.startNodeAt(J);if(Y.typeParameters=null,Y.id=this.flowParseQualifiedTypeIdentifier(J,Q),this.match(47))Y.typeParameters=this.flowParseTypeParameterInstantiation();return this.finishNode(Y,"GenericTypeAnnotation")}flowParseTypeofType(){const J=this.startNode();return this.expect(87),J.argument=this.flowParsePrimaryType(),this.finishNode(J,"TypeofTypeAnnotation")}flowParseTupleType(){const J=this.startNode();J.types=[],this.expect(0);while(this.state.pos<this.length&&!this.match(3)){if(J.types.push(this.flowParseType()),this.match(3))break;this.expect(12)}return this.expect(3),this.finishNode(J,"TupleTypeAnnotation")}flowParseFunctionTypeParam(J){let Q=null,Y=!1,V=null;const W=this.startNode(),z=this.lookahead(),U=this.state.type===78;if(z.type===14||z.type===17){if(U&&!J)this.raise(_.ThisParamMustBeFirst,W);if(Q=this.parseIdentifier(U),this.eat(17)){if(Y=!0,U)this.raise(_.ThisParamMayNotBeOptional,W)}V=this.flowParseTypeInitialiser()}else V=this.flowParseType();return W.name=Q,W.optional=Y,W.typeAnnotation=V,this.finishNode(W,"FunctionTypeParam")}reinterpretTypeAsFunctionTypeParam(J){const Q=this.startNodeAt(J.loc.start);return Q.name=null,Q.optional=!1,Q.typeAnnotation=J,this.finishNode(Q,"FunctionTypeParam")}flowParseFunctionTypeParams(J=[]){let Q=null,Y=null;if(this.match(78)){if(Y=this.flowParseFunctionTypeParam(!0),Y.name=null,!this.match(11))this.expect(12)}while(!this.match(11)&&!this.match(21))if(J.push(this.flowParseFunctionTypeParam(!1)),!this.match(11))this.expect(12);if(this.eat(21))Q=this.flowParseFunctionTypeParam(!1);return{params:J,rest:Q,_this:Y}}flowIdentToTypeAnnotation(J,Q,Y){switch(Y.name){case"any":return this.finishNode(Q,"AnyTypeAnnotation");case"bool":case"boolean":return this.finishNode(Q,"BooleanTypeAnnotation");case"mixed":return this.finishNode(Q,"MixedTypeAnnotation");case"empty":return this.finishNode(Q,"EmptyTypeAnnotation");case"number":return this.finishNode(Q,"NumberTypeAnnotation");case"string":return this.finishNode(Q,"StringTypeAnnotation");case"symbol":return this.finishNode(Q,"SymbolTypeAnnotation");default:return this.checkNotUnderscore(Y.name),this.flowParseGenericType(J,Y)}}flowParsePrimaryType(){const J=this.state.startLoc,Q=this.startNode();let Y,V,W=!1;const z=this.state.noAnonFunctionType;switch(this.state.type){case 5:return this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!0,allowProto:!1,allowInexact:!0});case 6:return this.flowParseObjectType({allowStatic:!1,allowExact:!0,allowSpread:!0,allowProto:!1,allowInexact:!1});case 0:return this.state.noAnonFunctionType=!1,V=this.flowParseTupleType(),this.state.noAnonFunctionType=z,V;case 47:{const U=this.startNode();return U.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(10),Y=this.flowParseFunctionTypeParams(),U.params=Y.params,U.rest=Y.rest,U.this=Y._this,this.expect(11),this.expect(19),U.returnType=this.flowParseType(),this.finishNode(U,"FunctionTypeAnnotation")}case 10:{const U=this.startNode();if(this.next(),!this.match(11)&&!this.match(21))if(v(this.state.type)||this.match(78)){const j=this.lookahead().type;W=j!==17&&j!==14}else W=!0;if(W)if(this.state.noAnonFunctionType=!1,V=this.flowParseType(),this.state.noAnonFunctionType=z,this.state.noAnonFunctionType||!(this.match(12)||this.match(11)&&this.lookahead().type===19))return this.expect(11),V;else this.eat(12);if(V)Y=this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(V)]);else Y=this.flowParseFunctionTypeParams();return U.params=Y.params,U.rest=Y.rest,U.this=Y._this,this.expect(11),this.expect(19),U.returnType=this.flowParseType(),U.typeParameters=null,this.finishNode(U,"FunctionTypeAnnotation")}case 133:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case 85:case 86:return Q.value=this.match(85),this.next(),this.finishNode(Q,"BooleanLiteralTypeAnnotation");case 53:if(this.state.value==="-"){if(this.next(),this.match(134))return this.parseLiteralAtNode(-this.state.value,"NumberLiteralTypeAnnotation",Q);if(this.match(135))return this.parseLiteralAtNode(-this.state.value,"BigIntLiteralTypeAnnotation",Q);throw this.raise(_.UnexpectedSubtractionOperand,this.state.startLoc)}this.unexpected();return;case 134:return this.parseLiteral(this.state.value,"NumberLiteralTypeAnnotation");case 135:return this.parseLiteral(this.state.value,"BigIntLiteralTypeAnnotation");case 88:return this.next(),this.finishNode(Q,"VoidTypeAnnotation");case 84:return this.next(),this.finishNode(Q,"NullLiteralTypeAnnotation");case 78:return this.next(),this.finishNode(Q,"ThisTypeAnnotation");case 55:return this.next(),this.finishNode(Q,"ExistsTypeAnnotation");case 87:return this.flowParseTypeofType();default:if(LJ(this.state.type)){const U=m(this.state.type);return this.next(),super.createIdentifier(Q,U)}else if(v(this.state.type)){if(this.isContextual(129))return this.flowParseInterfaceType();return this.flowIdentToTypeAnnotation(J,Q,this.parseIdentifier())}}this.unexpected()}flowParsePostfixType(){const J=this.state.startLoc;let Q=this.flowParsePrimaryType(),Y=!1;while((this.match(0)||this.match(18))&&!this.canInsertSemicolon()){const V=this.startNodeAt(J),W=this.eat(18);if(Y=Y||W,this.expect(0),!W&&this.match(3))V.elementType=Q,this.next(),Q=this.finishNode(V,"ArrayTypeAnnotation");else if(V.objectType=Q,V.indexType=this.flowParseType(),this.expect(3),Y)V.optional=W,Q=this.finishNode(V,"OptionalIndexedAccessType");else Q=this.finishNode(V,"IndexedAccessType")}return Q}flowParsePrefixType(){const J=this.startNode();if(this.eat(17))return J.typeAnnotation=this.flowParsePrefixType(),this.finishNode(J,"NullableTypeAnnotation");else return this.flowParsePostfixType()}flowParseAnonFunctionWithoutParens(){const J=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(19)){const Q=this.startNodeAt(J.loc.start);return Q.params=[this.reinterpretTypeAsFunctionTypeParam(J)],Q.rest=null,Q.this=null,Q.returnType=this.flowParseType(),Q.typeParameters=null,this.finishNode(Q,"FunctionTypeAnnotation")}return J}flowParseIntersectionType(){const J=this.startNode();this.eat(45);const Q=this.flowParseAnonFunctionWithoutParens();J.types=[Q];while(this.eat(45))J.types.push(this.flowParseAnonFunctionWithoutParens());return J.types.length===1?Q:this.finishNode(J,"IntersectionTypeAnnotation")}flowParseUnionType(){const J=this.startNode();this.eat(43);const Q=this.flowParseIntersectionType();J.types=[Q];while(this.eat(43))J.types.push(this.flowParseIntersectionType());return J.types.length===1?Q:this.finishNode(J,"UnionTypeAnnotation")}flowParseType(){const J=this.state.inType;this.state.inType=!0;const Q=this.flowParseUnionType();return this.state.inType=J,Q}flowParseTypeOrImplicitInstantiation(){if(this.state.type===132&&this.state.value==="_"){const J=this.state.startLoc,Q=this.parseIdentifier();return this.flowParseGenericType(J,Q)}else return this.flowParseType()}flowParseTypeAnnotation(){const J=this.startNode();return J.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(J,"TypeAnnotation")}flowParseTypeAnnotatableIdentifier(J){const Q=J?this.parseIdentifier():this.flowParseRestrictedIdentifier();if(this.match(14))Q.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(Q);return Q}typeCastToParameter(J){return J.expression.typeAnnotation=J.typeAnnotation,this.resetEndLocation(J.expression,J.typeAnnotation.loc.end),J.expression}flowParseVariance(){let J=null;if(this.match(53)){if(J=this.startNode(),this.state.value==="+")J.kind="plus";else J.kind="minus";return this.next(),this.finishNode(J,"Variance")}return J}parseFunctionBody(J,Q,Y=!1){if(Q){this.forwardNoArrowParamsConversionAt(J,()=>super.parseFunctionBody(J,!0,Y));return}super.parseFunctionBody(J,!1,Y)}parseFunctionBodyAndFinish(J,Q,Y=!1){if(this.match(14)){const V=this.startNode();[V.typeAnnotation,J.predicate]=this.flowParseTypeAndPredicateInitialiser(),J.returnType=V.typeAnnotation?this.finishNode(V,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(J,Q,Y)}parseStatementLike(J){if(this.state.strict&&this.isContextual(129)){const Y=this.lookahead();if(k(Y.type)){const V=this.startNode();return this.next(),this.flowParseInterface(V)}}else if(this.shouldParseEnums()&&this.isContextual(126)){const Y=this.startNode();return this.next(),this.flowParseEnumDeclaration(Y)}const Q=super.parseStatementLike(J);if(this.flowPragma===void 0&&!this.isValidDirective(Q))this.flowPragma=null;return Q}parseExpressionStatement(J,Q,Y){if(Q.type==="Identifier"){if(Q.name==="declare"){if(this.match(80)||v(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(J)}else if(v(this.state.type)){if(Q.name==="interface")return this.flowParseInterface(J);else if(Q.name==="type")return this.flowParseTypeAlias(J);else if(Q.name==="opaque")return this.flowParseOpaqueType(J,!1)}}return super.parseExpressionStatement(J,Q,Y)}shouldParseExportDeclaration(){const{type:J}=this.state;if(iJ(J)||this.shouldParseEnums()&&J===126)return!this.state.containsEsc;return super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){const{type:J}=this.state;if(iJ(J)||this.shouldParseEnums()&&J===126)return this.state.containsEsc;return super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.shouldParseEnums()&&this.isContextual(126)){const J=this.startNode();return this.next(),this.flowParseEnumDeclaration(J)}return super.parseExportDefaultExpression()}parseConditional(J,Q,Y){if(!this.match(17))return J;if(this.state.maybeInArrowParameters){const K=this.lookaheadCharCode();if(K===44||K===61||K===58||K===41)return this.setOptionalParametersError(Y),J}this.expect(17);const V=this.state.clone(),W=this.state.noArrowAt,z=this.startNodeAt(Q);let{consequent:U,failed:j}=this.tryParseConditionalConsequent(),[R,H]=this.getArrowLikeExpressions(U);if(j||H.length>0){const K=[...W];if(H.length>0){this.state=V,this.state.noArrowAt=K;for(let F=0;F<H.length;F++)K.push(H[F].start);({consequent:U,failed:j}=this.tryParseConditionalConsequent()),[R,H]=this.getArrowLikeExpressions(U)}if(j&&R.length>1)this.raise(_.AmbiguousConditionalArrow,V.startLoc);if(j&&R.length===1)this.state=V,K.push(R[0].start),this.state.noArrowAt=K,{consequent:U,failed:j}=this.tryParseConditionalConsequent()}return this.getArrowLikeExpressions(U,!0),this.state.noArrowAt=W,this.expect(14),z.test=J,z.consequent=U,z.alternate=this.forwardNoArrowParamsConversionAt(z,()=>this.parseMaybeAssign(void 0,void 0)),this.finishNode(z,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);const J=this.parseMaybeAssignAllowIn(),Q=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:J,failed:Q}}getArrowLikeExpressions(J,Q){const Y=[J],V=[];while(Y.length!==0){const W=Y.pop();if(W.type==="ArrowFunctionExpression"&&W.body.type!=="BlockStatement"){if(W.typeParameters||!W.returnType)this.finishArrowValidation(W);else V.push(W);Y.push(W.body)}else if(W.type==="ConditionalExpression")Y.push(W.consequent),Y.push(W.alternate)}if(Q)return V.forEach((W)=>this.finishArrowValidation(W)),[V,[]];return x0(V,(W)=>W.params.every((z)=>this.isAssignable(z,!0)))}finishArrowValidation(J){var Q;this.toAssignableList(J.params,(Q=J.extra)==null?void 0:Q.trailingCommaLoc,!1),this.scope.enter(2|4),super.checkParams(J,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(J,Q){let Y;if(this.state.noArrowParamsConversionAt.includes(J.start))this.state.noArrowParamsConversionAt.push(this.state.start),Y=Q(),this.state.noArrowParamsConversionAt.pop();else Y=Q();return Y}parseParenItem(J,Q){const Y=super.parseParenItem(J,Q);if(this.eat(17))Y.optional=!0,this.resetEndLocation(J);if(this.match(14)){const V=this.startNodeAt(Q);return V.expression=Y,V.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(V,"TypeCastExpression")}return Y}assertModuleNodeAllowed(J){if(J.type==="ImportDeclaration"&&(J.importKind==="type"||J.importKind==="typeof")||J.type==="ExportNamedDeclaration"&&J.exportKind==="type"||J.type==="ExportAllDeclaration"&&J.exportKind==="type")return;super.assertModuleNodeAllowed(J)}parseExportDeclaration(J){if(this.isContextual(130)){J.exportKind="type";const Q=this.startNode();if(this.next(),this.match(5))return J.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(J),null;else return this.flowParseTypeAlias(Q)}else if(this.isContextual(131)){J.exportKind="type";const Q=this.startNode();return this.next(),this.flowParseOpaqueType(Q,!1)}else if(this.isContextual(129)){J.exportKind="type";const Q=this.startNode();return this.next(),this.flowParseInterface(Q)}else if(this.shouldParseEnums()&&this.isContextual(126)){J.exportKind="value";const Q=this.startNode();return this.next(),this.flowParseEnumDeclaration(Q)}else return super.parseExportDeclaration(J)}eatExportStar(J){if(super.eatExportStar(J))return!0;if(this.isContextual(130)&&this.lookahead().type===55)return J.exportKind="type",this.next(),this.next(),!0;return!1}maybeParseExportNamespaceSpecifier(J){const{startLoc:Q}=this.state,Y=super.maybeParseExportNamespaceSpecifier(J);if(Y&&J.exportKind==="type")this.unexpected(Q);return Y}parseClassId(J,Q,Y){if(super.parseClassId(J,Q,Y),this.match(47))J.typeParameters=this.flowParseTypeParameterDeclaration()}parseClassMember(J,Q,Y){const{startLoc:V}=this.state;if(this.isContextual(125)){if(super.parseClassMemberFromModifier(J,Q))return;Q.declare=!0}if(super.parseClassMember(J,Q,Y),Q.declare){if(Q.type!=="ClassProperty"&&Q.type!=="ClassPrivateProperty"&&Q.type!=="PropertyDefinition")this.raise(_.DeclareClassElement,V);else if(Q.value)this.raise(_.DeclareClassFieldInitializer,Q.value)}}isIterator(J){return J==="iterator"||J==="asyncIterator"}readIterator(){const J=super.readWord1(),Q="@@"+J;if(!this.isIterator(J)||!this.state.inType)this.raise(q.InvalidIdentifier,this.state.curPosition(),{identifierName:Q});this.finishToken(132,Q)}getTokenFromCode(J){const Q=this.input.charCodeAt(this.state.pos+1);if(J===123&&Q===124)this.finishOp(6,2);else if(this.state.inType&&(J===62||J===60))this.finishOp(J===62?48:47,1);else if(this.state.inType&&J===63)if(Q===46)this.finishOp(18,2);else this.finishOp(17,1);else if(D0(J,Q,this.input.charCodeAt(this.state.pos+2)))this.state.pos+=2,this.readIterator();else super.getTokenFromCode(J)}isAssignable(J,Q){if(J.type==="TypeCastExpression")return this.isAssignable(J.expression,Q);else return super.isAssignable(J,Q)}toAssignable(J,Q=!1){if(!Q&&J.type==="AssignmentExpression"&&J.left.type==="TypeCastExpression")J.left=this.typeCastToParameter(J.left);super.toAssignable(J,Q)}toAssignableList(J,Q,Y){for(let V=0;V<J.length;V++){const W=J[V];if((W==null?void 0:W.type)==="TypeCastExpression")J[V]=this.typeCastToParameter(W)}super.toAssignableList(J,Q,Y)}toReferencedList(J,Q){for(let V=0;V<J.length;V++){var Y;const W=J[V];if(W&&W.type==="TypeCastExpression"&&!((Y=W.extra)!=null&&Y.parenthesized)&&(J.length>1||!Q))this.raise(_.TypeCastInPattern,W.typeAnnotation)}return J}parseArrayLike(J,Q,Y,V){const W=super.parseArrayLike(J,Q,Y,V);if(Q&&!this.state.maybeInArrowParameters)this.toReferencedList(W.elements);return W}isValidLVal(J,Q,Y){return J==="TypeCastExpression"||super.isValidLVal(J,Q,Y)}parseClassProperty(J){if(this.match(14))J.typeAnnotation=this.flowParseTypeAnnotation();return super.parseClassProperty(J)}parseClassPrivateProperty(J){if(this.match(14))J.typeAnnotation=this.flowParseTypeAnnotation();return super.parseClassPrivateProperty(J)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(J){return!this.match(14)&&super.isNonstaticConstructor(J)}pushClassMethod(J,Q,Y,V,W,z){if(Q.variance)this.unexpected(Q.variance.loc.start);if(delete Q.variance,this.match(47))Q.typeParameters=this.flowParseTypeParameterDeclaration();if(super.pushClassMethod(J,Q,Y,V,W,z),Q.params&&W){const U=Q.params;if(U.length>0&&this.isThisParam(U[0]))this.raise(_.ThisParamBannedInConstructor,Q)}else if(Q.type==="MethodDefinition"&&W&&Q.value.params){const U=Q.value.params;if(U.length>0&&this.isThisParam(U[0]))this.raise(_.ThisParamBannedInConstructor,Q)}}pushClassPrivateMethod(J,Q,Y,V){if(Q.variance)this.unexpected(Q.variance.loc.start);if(delete Q.variance,this.match(47))Q.typeParameters=this.flowParseTypeParameterDeclaration();super.pushClassPrivateMethod(J,Q,Y,V)}parseClassSuper(J){if(super.parseClassSuper(J),J.superClass&&this.match(47))J.superTypeParameters=this.flowParseTypeParameterInstantiation();if(this.isContextual(113)){this.next();const Q=J.implements=[];do{const Y=this.startNode();if(Y.id=this.flowParseRestrictedIdentifier(!0),this.match(47))Y.typeParameters=this.flowParseTypeParameterInstantiation();else Y.typeParameters=null;Q.push(this.finishNode(Y,"ClassImplements"))}while(this.eat(12))}}checkGetterSetterParams(J){super.checkGetterSetterParams(J);const Q=this.getObjectOrClassMethodParams(J);if(Q.length>0){const Y=Q[0];if(this.isThisParam(Y)&&J.kind==="get")this.raise(_.GetterMayNotHaveThisParam,Y);else if(this.isThisParam(Y))this.raise(_.SetterMayNotHaveThisParam,Y)}}parsePropertyNamePrefixOperator(J){J.variance=this.flowParseVariance()}parseObjPropValue(J,Q,Y,V,W,z,U){if(J.variance)this.unexpected(J.variance.loc.start);delete J.variance;let j;if(this.match(47)&&!z){if(j=this.flowParseTypeParameterDeclaration(),!this.match(10))this.unexpected()}const R=super.parseObjPropValue(J,Q,Y,V,W,z,U);if(j)(R.value||R).typeParameters=j;return R}parseAssignableListItemTypes(J){if(this.eat(17)){if(J.type!=="Identifier")this.raise(_.PatternIsOptional,J);if(this.isThisParam(J))this.raise(_.ThisParamMayNotBeOptional,J);J.optional=!0}if(this.match(14))J.typeAnnotation=this.flowParseTypeAnnotation();else if(this.isThisParam(J))this.raise(_.ThisParamAnnotationRequired,J);if(this.match(29)&&this.isThisParam(J))this.raise(_.ThisParamNoDefault,J);return this.resetEndLocation(J),J}parseMaybeDefault(J,Q){const Y=super.parseMaybeDefault(J,Q);if(Y.type==="AssignmentPattern"&&Y.typeAnnotation&&Y.right.start<Y.typeAnnotation.start)this.raise(_.TypeBeforeInitializer,Y.typeAnnotation);return Y}checkImportReflection(J){if(super.checkImportReflection(J),J.module&&J.importKind!=="value")this.raise(_.ImportReflectionHasImportType,J.specifiers[0].loc.start)}parseImportSpecifierLocal(J,Q,Y){Q.local=nJ(J)?this.flowParseRestrictedIdentifier(!0,!0):this.parseIdentifier(),J.specifiers.push(this.finishImportSpecifier(Q,Y))}isPotentialImportPhase(J){if(super.isPotentialImportPhase(J))return!0;if(this.isContextual(130)){if(!J)return!0;const Q=this.lookaheadCharCode();return Q===123||Q===42}return!J&&this.isContextual(87)}applyImportPhase(J,Q,Y,V){if(super.applyImportPhase(J,Q,Y,V),Q){if(!Y&&this.match(65))return;J.exportKind=Y==="type"?Y:"value"}else{if(Y==="type"&&this.match(55))this.unexpected();J.importKind=Y==="type"||Y==="typeof"?Y:"value"}}parseImportSpecifier(J,Q,Y,V,W){const z=J.imported;let U=null;if(z.type==="Identifier"){if(z.name==="type")U="type";else if(z.name==="typeof")U="typeof"}let j=!1;if(this.isContextual(93)&&!this.isLookaheadContextual("as")){const H=this.parseIdentifier(!0);if(U!==null&&!k(this.state.type))J.imported=H,J.importKind=U,J.local=x(H);else J.imported=z,J.importKind=null,J.local=this.parseIdentifier()}else{if(U!==null&&k(this.state.type))J.imported=this.parseIdentifier(!0),J.importKind=U;else{if(Q)throw this.raise(q.ImportBindingIsString,J,{importName:z.value});J.imported=z,J.importKind=null}if(this.eatContextual(93))J.local=this.parseIdentifier();else j=!0,J.local=x(J.imported)}const R=nJ(J);if(Y&&R)this.raise(_.ImportTypeShorthandOnlyInPureImport,J);if(Y||R)this.checkReservedType(J.local.name,J.local.loc.start,!0);if(j&&!Y&&!R)this.checkReservedWord(J.local.name,J.loc.start,!0,!0);return this.finishImportSpecifier(J,"ImportSpecifier")}parseBindingAtom(){switch(this.state.type){case 78:return this.parseIdentifier(!0);default:return super.parseBindingAtom()}}parseFunctionParams(J,Q){const Y=J.kind;if(Y!=="get"&&Y!=="set"&&this.match(47))J.typeParameters=this.flowParseTypeParameterDeclaration();super.parseFunctionParams(J,Q)}parseVarId(J,Q){if(super.parseVarId(J,Q),this.match(14))J.id.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(J.id)}parseAsyncArrowFromCallExpression(J,Q){if(this.match(14)){const Y=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,J.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=Y}return super.parseAsyncArrowFromCallExpression(J,Q)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}parseMaybeAssign(J,Q){var Y;let V=null,W;if(this.hasPlugin("jsx")&&(this.match(142)||this.match(47))){if(V=this.state.clone(),W=this.tryParse(()=>super.parseMaybeAssign(J,Q),V),!W.error)return W.node;const{context:j}=this.state,R=j[j.length-1];if(R===T.j_oTag||R===T.j_expr)j.pop()}if((Y=W)!=null&&Y.error||this.match(47)){var z,U;V=V||this.state.clone();let j;const R=this.tryParse((K)=>{var F;j=this.flowParseTypeParameterDeclaration();const B=this.forwardNoArrowParamsConversionAt(j,()=>{const M=super.parseMaybeAssign(J,Q);return this.resetStartLocationFromNode(M,j),M});if((F=B.extra)!=null&&F.parenthesized)K();const A=this.maybeUnwrapTypeCastExpression(B);if(A.type!=="ArrowFunctionExpression")K();return A.typeParameters=j,this.resetStartLocationFromNode(A,j),B},V);let H=null;if(R.node&&this.maybeUnwrapTypeCastExpression(R.node).type==="ArrowFunctionExpression"){if(!R.error&&!R.aborted){if(R.node.async)this.raise(_.UnexpectedTypeParameterBeforeAsyncArrowFunction,j);return R.node}H=R.node}if((z=W)!=null&&z.node)return this.state=W.failState,W.node;if(H)return this.state=R.failState,H;if((U=W)!=null&&U.thrown)throw W.error;if(R.thrown)throw R.error;throw this.raise(_.UnexpectedTokenAfterTypeParameter,j)}return super.parseMaybeAssign(J,Q)}parseArrow(J){if(this.match(14)){const Q=this.tryParse(()=>{const Y=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;const V=this.startNode();if([V.typeAnnotation,J.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=Y,this.canInsertSemicolon())this.unexpected();if(!this.match(19))this.unexpected();return V});if(Q.thrown)return null;if(Q.error)this.state=Q.failState;J.returnType=Q.node.typeAnnotation?this.finishNode(Q.node,"TypeAnnotation"):null}return super.parseArrow(J)}shouldParseArrow(J){return this.match(14)||super.shouldParseArrow(J)}setArrowFunctionParameters(J,Q){if(this.state.noArrowParamsConversionAt.includes(J.start))J.params=Q;else super.setArrowFunctionParameters(J,Q)}checkParams(J,Q,Y,V=!0){if(Y&&this.state.noArrowParamsConversionAt.includes(J.start))return;for(let W=0;W<J.params.length;W++)if(this.isThisParam(J.params[W])&&W>0)this.raise(_.ThisParamMustBeFirst,J.params[W]);super.checkParams(J,Q,Y,V)}parseParenAndDistinguishExpression(J){return super.parseParenAndDistinguishExpression(J&&!this.state.noArrowAt.includes(this.state.start))}parseSubscripts(J,Q,Y){if(J.type==="Identifier"&&J.name==="async"&&this.state.noArrowAt.includes(Q.index)){this.next();const V=this.startNodeAt(Q);V.callee=J,V.arguments=super.parseCallExpressionArguments(11,!1),J=this.finishNode(V,"CallExpression")}else if(J.type==="Identifier"&&J.name==="async"&&this.match(47)){const V=this.state.clone(),W=this.tryParse((U)=>this.parseAsyncArrowWithTypeParameters(Q)||U(),V);if(!W.error&&!W.aborted)return W.node;const z=this.tryParse(()=>super.parseSubscripts(J,Q,Y),V);if(z.node&&!z.error)return z.node;if(W.node)return this.state=W.failState,W.node;if(z.node)return this.state=z.failState,z.node;throw W.error||z.error}return super.parseSubscripts(J,Q,Y)}parseSubscript(J,Q,Y,V){if(this.match(18)&&this.isLookaheadToken_lt()){if(V.optionalChainMember=!0,Y)return V.stop=!0,J;this.next();const W=this.startNodeAt(Q);return W.callee=J,W.typeArguments=this.flowParseTypeParameterInstantiation(),this.expect(10),W.arguments=this.parseCallExpressionArguments(11,!1),W.optional=!0,this.finishCallExpression(W,!0)}else if(!Y&&this.shouldParseTypes()&&this.match(47)){const W=this.startNodeAt(Q);W.callee=J;const z=this.tryParse(()=>{if(W.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),W.arguments=super.parseCallExpressionArguments(11,!1),V.optionalChainMember)W.optional=!1;return this.finishCallExpression(W,V.optionalChainMember)});if(z.node){if(z.error)this.state=z.failState;return z.node}}return super.parseSubscript(J,Q,Y,V)}parseNewCallee(J){super.parseNewCallee(J);let Q=null;if(this.shouldParseTypes()&&this.match(47))Q=this.tryParse(()=>this.flowParseTypeParameterInstantiationCallOrNew()).node;J.typeArguments=Q}parseAsyncArrowWithTypeParameters(J){const Q=this.startNodeAt(J);if(this.parseFunctionParams(Q,!1),!this.parseArrow(Q))return;return super.parseArrowExpression(Q,void 0,!0)}readToken_mult_modulo(J){const Q=this.input.charCodeAt(this.state.pos+1);if(J===42&&Q===47&&this.state.hasFlowComment){this.state.hasFlowComment=!1,this.state.pos+=2,this.nextToken();return}super.readToken_mult_modulo(J)}readToken_pipe_amp(J){const Q=this.input.charCodeAt(this.state.pos+1);if(J===124&&Q===125){this.finishOp(9,2);return}super.readToken_pipe_amp(J)}parseTopLevel(J,Q){const Y=super.parseTopLevel(J,Q);if(this.state.hasFlowComment)this.raise(_.UnterminatedFlowComment,this.state.curPosition());return Y}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(_.NestedFlowComment,this.state.startLoc);this.hasFlowCommentCompletion();const J=this.skipFlowComment();if(J)this.state.pos+=J,this.state.hasFlowComment=!0;return}return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/")}skipFlowComment(){const{pos:J}=this.state;let Q=2;while([32,9].includes(this.input.charCodeAt(J+Q)))Q++;const Y=this.input.charCodeAt(Q+J),V=this.input.charCodeAt(Q+J+1);if(Y===58&&V===58)return Q+2;if(this.input.slice(Q+J,Q+J+12)==="flow-include")return Q+12;if(Y===58&&V!==58)return Q;return!1}hasFlowCommentCompletion(){if(this.input.indexOf("*/",this.state.pos)===-1)throw this.raise(q.UnterminatedComment,this.state.curPosition())}flowEnumErrorBooleanMemberNotInitialized(J,{enumName:Q,memberName:Y}){this.raise(_.EnumBooleanMemberNotInitialized,J,{memberName:Y,enumName:Q})}flowEnumErrorInvalidMemberInitializer(J,Q){return this.raise(!Q.explicitType?_.EnumInvalidMemberInitializerUnknownType:Q.explicitType==="symbol"?_.EnumInvalidMemberInitializerSymbolType:_.EnumInvalidMemberInitializerPrimaryType,J,Q)}flowEnumErrorNumberMemberNotInitialized(J,Q){this.raise(_.EnumNumberMemberNotInitialized,J,Q)}flowEnumErrorStringMemberInconsistentlyInitialized(J,Q){this.raise(_.EnumStringMemberInconsistentlyInitialized,J,Q)}flowEnumMemberInit(){const J=this.state.startLoc,Q=()=>this.match(12)||this.match(8);switch(this.state.type){case 134:{const Y=this.parseNumericLiteral(this.state.value);if(Q())return{type:"number",loc:Y.loc.start,value:Y};return{type:"invalid",loc:J}}case 133:{const Y=this.parseStringLiteral(this.state.value);if(Q())return{type:"string",loc:Y.loc.start,value:Y};return{type:"invalid",loc:J}}case 85:case 86:{const Y=this.parseBooleanLiteral(this.match(85));if(Q())return{type:"boolean",loc:Y.loc.start,value:Y};return{type:"invalid",loc:J}}default:return{type:"invalid",loc:J}}}flowEnumMemberRaw(){const J=this.state.startLoc,Q=this.parseIdentifier(!0),Y=this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:J};return{id:Q,init:Y}}flowEnumCheckExplicitTypeMismatch(J,Q,Y){const{explicitType:V}=Q;if(V===null)return;if(V!==Y)this.flowEnumErrorInvalidMemberInitializer(J,Q)}flowEnumMembers({enumName:J,explicitType:Q}){const Y=new Set,V={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]};let W=!1;while(!this.match(8)){if(this.eat(21)){W=!0;break}const z=this.startNode(),{id:U,init:j}=this.flowEnumMemberRaw(),R=U.name;if(R==="")continue;if(/^[a-z]/.test(R))this.raise(_.EnumInvalidMemberName,U,{memberName:R,suggestion:R[0].toUpperCase()+R.slice(1),enumName:J});if(Y.has(R))this.raise(_.EnumDuplicateMemberName,U,{memberName:R,enumName:J});Y.add(R);const H={enumName:J,explicitType:Q,memberName:R};switch(z.id=U,j.type){case"boolean":{this.flowEnumCheckExplicitTypeMismatch(j.loc,H,"boolean"),z.init=j.value,V.booleanMembers.push(this.finishNode(z,"EnumBooleanMember"));break}case"number":{this.flowEnumCheckExplicitTypeMismatch(j.loc,H,"number"),z.init=j.value,V.numberMembers.push(this.finishNode(z,"EnumNumberMember"));break}case"string":{this.flowEnumCheckExplicitTypeMismatch(j.loc,H,"string"),z.init=j.value,V.stringMembers.push(this.finishNode(z,"EnumStringMember"));break}case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(j.loc,H);case"none":switch(Q){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(j.loc,H);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(j.loc,H);break;default:V.defaultedMembers.push(this.finishNode(z,"EnumDefaultedMember"))}}if(!this.match(8))this.expect(12)}return{members:V,hasUnknownMembers:W}}flowEnumStringMembers(J,Q,{enumName:Y}){if(J.length===0)return Q;else if(Q.length===0)return J;else if(Q.length>J.length){for(let V of J)this.flowEnumErrorStringMemberInconsistentlyInitialized(V,{enumName:Y});return Q}else{for(let V of Q)this.flowEnumErrorStringMemberInconsistentlyInitialized(V,{enumName:Y});return J}}flowEnumParseExplicitType({enumName:J}){if(!this.eatContextual(102))return null;if(!v(this.state.type))throw this.raise(_.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName:J});const{value:Q}=this.state;if(this.next(),Q!=="boolean"&&Q!=="number"&&Q!=="string"&&Q!=="symbol")this.raise(_.EnumInvalidExplicitType,this.state.startLoc,{enumName:J,invalidEnumType:Q});return Q}flowEnumBody(J,Q){const Y=Q.name,V=Q.loc.start,W=this.flowEnumParseExplicitType({enumName:Y});this.expect(5);const{members:z,hasUnknownMembers:U}=this.flowEnumMembers({enumName:Y,explicitType:W});switch(J.hasUnknownMembers=U,W){case"boolean":return J.explicitType=!0,J.members=z.booleanMembers,this.expect(8),this.finishNode(J,"EnumBooleanBody");case"number":return J.explicitType=!0,J.members=z.numberMembers,this.expect(8),this.finishNode(J,"EnumNumberBody");case"string":return J.explicitType=!0,J.members=this.flowEnumStringMembers(z.stringMembers,z.defaultedMembers,{enumName:Y}),this.expect(8),this.finishNode(J,"EnumStringBody");case"symbol":return J.members=z.defaultedMembers,this.expect(8),this.finishNode(J,"EnumSymbolBody");default:{const j=()=>{return J.members=[],this.expect(8),this.finishNode(J,"EnumStringBody")};J.explicitType=!1;const R=z.booleanMembers.length,H=z.numberMembers.length,K=z.stringMembers.length,F=z.defaultedMembers.length;if(!R&&!H&&!K&&!F)return j();else if(!R&&!H)return J.members=this.flowEnumStringMembers(z.stringMembers,z.defaultedMembers,{enumName:Y}),this.expect(8),this.finishNode(J,"EnumStringBody");else if(!H&&!K&&R>=F){for(let B of z.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(B.loc.start,{enumName:Y,memberName:B.id.name});return J.members=z.booleanMembers,this.expect(8),this.finishNode(J,"EnumBooleanBody")}else if(!R&&!K&&H>=F){for(let B of z.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(B.loc.start,{enumName:Y,memberName:B.id.name});return J.members=z.numberMembers,this.expect(8),this.finishNode(J,"EnumNumberBody")}else return this.raise(_.EnumInconsistentMemberValues,V,{enumName:Y}),j()}}}flowParseEnumDeclaration(J){const Q=this.parseIdentifier();return J.id=Q,J.body=this.flowEnumBody(this.startNode(),Q),this.finishNode(J,"EnumDeclaration")}isLookaheadToken_lt(){const J=this.nextTokenStart();if(this.input.charCodeAt(J)===60){const Q=this.input.charCodeAt(J+1);return Q!==60&&Q!==61}return!1}maybeUnwrapTypeCastExpression(J){return J.type==="TypeCastExpression"?J.expression:J}},m0={__proto__:null,quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02C6",tilde:"\u02DC",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203A",oline:"\u203E",frasl:"\u2044",euro:"\u20AC",image:"\u2111",weierp:"\u2118",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",lang:"\u2329",rang:"\u232A",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666"},c=u`jsx`({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:({openingTagName:Z})=>`Expected corresponding JSX closing tag for <${Z}>.`,MissingClosingTagFragment:"Expected corresponding JSX closing tag for <>.",UnexpectedSequenceExpression:"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",UnexpectedToken:({unexpected:Z,HTMLEntity:X})=>`Unexpected token \`${Z}\`. Did you mean \`${X}\` or \`{'${Z}'}\`?`,UnsupportedJsxValue:"JSX value should be either an expression or a quoted JSX text.",UnterminatedJsxContent:"Unterminated JSX contents.",UnwrappedAdjacentJSXElements:"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?"}),c0=(Z)=>class X extends Z{jsxReadToken(){let J="",Q=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(c.UnterminatedJsxContent,this.state.startLoc);const Y=this.input.charCodeAt(this.state.pos);switch(Y){case 60:case 123:if(this.state.pos===this.state.start){if(Y===60&&this.state.canStartJSXElement)++this.state.pos,this.finishToken(142);else super.getTokenFromCode(Y);return}J+=this.input.slice(Q,this.state.pos),this.finishToken(141,J);return;case 38:J+=this.input.slice(Q,this.state.pos),J+=this.jsxReadEntity(),Q=this.state.pos;break;case 62:case 125:default:if(a(Y))J+=this.input.slice(Q,this.state.pos),J+=this.jsxReadNewLine(!0),Q=this.state.pos;else++this.state.pos}}}jsxReadNewLine(J){const Q=this.input.charCodeAt(this.state.pos);let Y;if(++this.state.pos,Q===13&&this.input.charCodeAt(this.state.pos)===10)++this.state.pos,Y=J?"\n":"\r\n";else Y=String.fromCharCode(Q);return++this.state.curLine,this.state.lineStart=this.state.pos,Y}jsxReadString(J){let Q="",Y=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(q.UnterminatedString,this.state.startLoc);const V=this.input.charCodeAt(this.state.pos);if(V===J)break;if(V===38)Q+=this.input.slice(Y,this.state.pos),Q+=this.jsxReadEntity(),Y=this.state.pos;else if(a(V))Q+=this.input.slice(Y,this.state.pos),Q+=this.jsxReadNewLine(!1),Y=this.state.pos;else++this.state.pos}Q+=this.input.slice(Y,this.state.pos++),this.finishToken(133,Q)}jsxReadEntity(){const J=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let Q=10;if(this.codePointAtPos(this.state.pos)===120)Q=16,++this.state.pos;const Y=this.readInt(Q,void 0,!1,"bail");if(Y!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(Y)}else{let Q=0,Y=!1;while(Q++<10&&this.state.pos<this.length&&!(Y=this.codePointAtPos(this.state.pos)===59))++this.state.pos;if(Y){const V=this.input.slice(J,this.state.pos),W=m0[V];if(++this.state.pos,W)return W}}return this.state.pos=J,"&"}jsxReadWord(){let J;const Q=this.state.pos;do J=this.input.charCodeAt(++this.state.pos);while(i(J)||J===45);this.finishToken(140,this.input.slice(Q,this.state.pos))}jsxParseIdentifier(){const J=this.startNode();if(this.match(140))J.name=this.state.value;else if(LJ(this.state.type))J.name=m(this.state.type);else this.unexpected();return this.next(),this.finishNode(J,"JSXIdentifier")}jsxParseNamespacedName(){const J=this.state.startLoc,Q=this.jsxParseIdentifier();if(!this.eat(14))return Q;const Y=this.startNodeAt(J);return Y.namespace=Q,Y.name=this.jsxParseIdentifier(),this.finishNode(Y,"JSXNamespacedName")}jsxParseElementName(){const J=this.state.startLoc;let Q=this.jsxParseNamespacedName();if(Q.type==="JSXNamespacedName")return Q;while(this.eat(16)){const Y=this.startNodeAt(J);Y.object=Q,Y.property=this.jsxParseIdentifier(),Q=this.finishNode(Y,"JSXMemberExpression")}return Q}jsxParseAttributeValue(){let J;switch(this.state.type){case 5:if(J=this.startNode(),this.setContext(T.brace),this.next(),J=this.jsxParseExpressionContainer(J,T.j_oTag),J.expression.type==="JSXEmptyExpression")this.raise(c.AttributeIsEmpty,J);return J;case 142:case 133:return this.parseExprAtom();default:throw this.raise(c.UnsupportedJsxValue,this.state.startLoc)}}jsxParseEmptyExpression(){const J=this.startNodeAt(this.state.lastTokEndLoc);return this.finishNodeAt(J,"JSXEmptyExpression",this.state.startLoc)}jsxParseSpreadChild(J){return this.next(),J.expression=this.parseExpression(),this.setContext(T.j_expr),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(J,"JSXSpreadChild")}jsxParseExpressionContainer(J,Q){if(this.match(8))J.expression=this.jsxParseEmptyExpression();else{const Y=this.parseExpression();J.expression=Y}return this.setContext(Q),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(J,"JSXExpressionContainer")}jsxParseAttribute(){const J=this.startNode();if(this.match(5))return this.setContext(T.brace),this.next(),this.expect(21),J.argument=this.parseMaybeAssignAllowIn(),this.setContext(T.j_oTag),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(J,"JSXSpreadAttribute");return J.name=this.jsxParseNamespacedName(),J.value=this.eat(29)?this.jsxParseAttributeValue():null,this.finishNode(J,"JSXAttribute")}jsxParseOpeningElementAt(J){const Q=this.startNodeAt(J);if(this.eat(143))return this.finishNode(Q,"JSXOpeningFragment");return Q.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(Q)}jsxParseOpeningElementAfterName(J){const Q=[];while(!this.match(56)&&!this.match(143))Q.push(this.jsxParseAttribute());return J.attributes=Q,J.selfClosing=this.eat(56),this.expect(143),this.finishNode(J,"JSXOpeningElement")}jsxParseClosingElementAt(J){const Q=this.startNodeAt(J);if(this.eat(143))return this.finishNode(Q,"JSXClosingFragment");return Q.name=this.jsxParseElementName(),this.expect(143),this.finishNode(Q,"JSXClosingElement")}jsxParseElementAt(J){const Q=this.startNodeAt(J),Y=[],V=this.jsxParseOpeningElementAt(J);let W=null;if(!V.selfClosing){J:for(;;)switch(this.state.type){case 142:if(J=this.state.startLoc,this.next(),this.eat(56)){W=this.jsxParseClosingElementAt(J);break J}Y.push(this.jsxParseElementAt(J));break;case 141:Y.push(this.parseLiteral(this.state.value,"JSXText"));break;case 5:{const z=this.startNode();if(this.setContext(T.brace),this.next(),this.match(21))Y.push(this.jsxParseSpreadChild(z));else Y.push(this.jsxParseExpressionContainer(z,T.j_expr));break}default:this.unexpected()}if(y(V)&&!y(W)&&W!==null)this.raise(c.MissingClosingTagFragment,W);else if(!y(V)&&y(W))this.raise(c.MissingClosingTagElement,W,{openingTagName:p(V.name)});else if(!y(V)&&!y(W)){if(p(W.name)!==p(V.name))this.raise(c.MissingClosingTagElement,W,{openingTagName:p(V.name)})}}if(y(V))Q.openingFragment=V,Q.closingFragment=W;else Q.openingElement=V,Q.closingElement=W;if(Q.children=Y,this.match(47))throw this.raise(c.UnwrappedAdjacentJSXElements,this.state.startLoc);return y(V)?this.finishNode(Q,"JSXFragment"):this.finishNode(Q,"JSXElement")}jsxParseElement(){const J=this.state.startLoc;return this.next(),this.jsxParseElementAt(J)}setContext(J){const{context:Q}=this.state;Q[Q.length-1]=J}parseExprAtom(J){if(this.match(142))return this.jsxParseElement();else if(this.match(47)&&this.input.charCodeAt(this.state.pos)!==33)return this.replaceToken(142),this.jsxParseElement();else return super.parseExprAtom(J)}skipSpace(){if(!this.curContext().preserveSpace)super.skipSpace()}getTokenFromCode(J){const Q=this.curContext();if(Q===T.j_expr){this.jsxReadToken();return}if(Q===T.j_oTag||Q===T.j_cTag){if(b(J)){this.jsxReadWord();return}if(J===62){++this.state.pos,this.finishToken(143);return}if((J===34||J===39)&&Q===T.j_oTag){this.jsxReadString(J);return}}if(J===60&&this.state.canStartJSXElement&&this.input.charCodeAt(this.state.pos+1)!==33){++this.state.pos,this.finishToken(142);return}super.getTokenFromCode(J)}updateContext(J){const{context:Q,type:Y}=this.state;if(Y===56&&J===142)Q.splice(-2,2,T.j_cTag),this.state.canStartJSXElement=!1;else if(Y===142)Q.push(T.j_oTag);else if(Y===143){const V=Q[Q.length-1];if(V===T.j_oTag&&J===56||V===T.j_cTag)Q.pop(),this.state.canStartJSXElement=Q[Q.length-1]===T.j_expr;else this.setContext(T.j_expr),this.state.canStartJSXElement=!0}else this.state.canStartJSXElement=Y0(Y)}};class TZ extends KJ{constructor(...Z){super(...Z);this.tsNames=new Map}}class MZ extends GJ{constructor(...Z){super(...Z);this.importsStack=[]}createScope(Z){return this.importsStack.push(new Set),new TZ(Z)}enter(Z){if(Z===256)this.importsStack.push(new Set);super.enter(Z)}exit(){const Z=super.exit();if(Z===256)this.importsStack.pop();return Z}hasImport(Z,X){const J=this.importsStack.length;if(this.importsStack[J-1].has(Z))return!0;if(!X&&J>1){for(let Q=0;Q<J-1;Q++)if(this.importsStack[Q].has(Z))return!0}return!1}declareName(Z,X,J){if(X&4096){if(this.hasImport(Z,!0))this.parser.raise(q.VarRedeclaration,J,{identifierName:Z});this.importsStack[this.importsStack.length-1].add(Z);return}const Q=this.currentScope();let Y=Q.tsNames.get(Z)||0;if(X&1024){this.maybeExportDefined(Q,Z),Q.tsNames.set(Z,Y|16);return}if(super.declareName(Z,X,J),X&2){if(!(X&1))this.checkRedeclarationInScope(Q,Z,X,J),this.maybeExportDefined(Q,Z);Y=Y|1}if(X&256)Y=Y|2;if(X&512)Y=Y|4;if(X&128)Y=Y|8;if(Y)Q.tsNames.set(Z,Y)}isRedeclaredInScope(Z,X,J){const Q=Z.tsNames.get(X);if((Q&2)>0){if(J&256){const Y=!!(J&512),V=(Q&4)>0;return Y!==V}return!0}if(J&128&&(Q&8)>0)if(Z.names.get(X)&2)return!!(J&1);else return!1;if(J&2&&(Q&1)>0)return!0;return super.isRedeclaredInScope(Z,X,J)}checkLocalExport(Z){const{name:X}=Z;if(this.hasImport(X))return;const J=this.scopeStack.length;for(let Q=J-1;Q>=0;Q--){const V=this.scopeStack[Q].tsNames.get(X);if((V&1)>0||(V&16)>0)return}super.checkLocalExport(Z)}}var IZ=(Z)=>{return Z.type==="ParenthesizedExpression"?IZ(Z.expression):Z};class AZ extends vZ{toAssignable(Z,X=!1){var J,Q;let Y=void 0;if(Z.type==="ParenthesizedExpression"||(J=Z.extra)!=null&&J.parenthesized)if(Y=IZ(Z),X){if(Y.type==="Identifier")this.expressionScope.recordArrowParameterBindingError(q.InvalidParenthesizedAssignment,Z);else if(Y.type!=="MemberExpression"&&!this.isOptionalMemberExpression(Y))this.raise(q.InvalidParenthesizedAssignment,Z)}else this.raise(q.InvalidParenthesizedAssignment,Z);switch(Z.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":Z.type="ObjectPattern";for(let W=0,z=Z.properties.length,U=z-1;W<z;W++){var V;const j=Z.properties[W],R=W===U;if(this.toAssignableObjectExpressionProp(j,R,X),R&&j.type==="RestElement"&&(V=Z.extra)!=null&&V.trailingCommaLoc)this.raise(q.RestTrailingComma,Z.extra.trailingCommaLoc)}break;case"ObjectProperty":{const{key:W,value:z}=Z;if(this.isPrivateName(W))this.classScope.usePrivateName(this.getPrivateNameSV(W),W.loc.start);this.toAssignable(z,X);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":Z.type="ArrayPattern",this.toAssignableList(Z.elements,(Q=Z.extra)==null?void 0:Q.trailingCommaLoc,X);break;case"AssignmentExpression":if(Z.operator!=="=")this.raise(q.MissingEqInAssignment,Z.left.loc.end);Z.type="AssignmentPattern",delete Z.operator,this.toAssignable(Z.left,X);break;case"ParenthesizedExpression":this.toAssignable(Y,X);break}}toAssignableObjectExpressionProp(Z,X,J){if(Z.type==="ObjectMethod")this.raise(Z.kind==="get"||Z.kind==="set"?q.PatternHasAccessor:q.PatternHasMethod,Z.key);else if(Z.type==="SpreadElement"){Z.type="RestElement";const Q=Z.argument;if(this.checkToRestConversion(Q,!1),this.toAssignable(Q,J),!X)this.raise(q.RestTrailingComma,Z)}else this.toAssignable(Z,J)}toAssignableList(Z,X,J){const Q=Z.length-1;for(let Y=0;Y<=Q;Y++){const V=Z[Y];if(!V)continue;if(V.type==="SpreadElement"){V.type="RestElement";const W=V.argument;this.checkToRestConversion(W,!0),this.toAssignable(W,J)}else this.toAssignable(V,J);if(V.type==="RestElement"){if(Y<Q)this.raise(q.RestTrailingComma,V);else if(X)this.raise(q.RestTrailingComma,X)}}}isAssignable(Z,X){switch(Z.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":return!0;case"ObjectExpression":{const J=Z.properties.length-1;return Z.properties.every((Q,Y)=>{return Q.type!=="ObjectMethod"&&(Y===J||Q.type!=="SpreadElement")&&this.isAssignable(Q)})}case"ObjectProperty":return this.isAssignable(Z.value);case"SpreadElement":return this.isAssignable(Z.argument);case"ArrayExpression":return Z.elements.every((J)=>J===null||this.isAssignable(J));case"AssignmentExpression":return Z.operator==="=";case"ParenthesizedExpression":return this.isAssignable(Z.expression);case"MemberExpression":case"OptionalMemberExpression":return!X;default:return!1}}toReferencedList(Z,X){return Z}toReferencedListDeep(Z,X){this.toReferencedList(Z,X);for(let J of Z)if((J==null?void 0:J.type)==="ArrayExpression")this.toReferencedListDeep(J.elements)}parseSpread(Z){const X=this.startNode();return this.next(),X.argument=this.parseMaybeAssignAllowIn(Z,void 0),this.finishNode(X,"SpreadElement")}parseRestBinding(){const Z=this.startNode();return this.next(),Z.argument=this.parseBindingAtom(),this.finishNode(Z,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{const Z=this.startNode();return this.next(),Z.elements=this.parseBindingList(3,93,1),this.finishNode(Z,"ArrayPattern")}case 5:return this.parseObjectLike(8,!0)}return this.parseIdentifier()}parseBindingList(Z,X,J){const Q=J&1,Y=[];let V=!0;while(!this.eat(Z)){if(V)V=!1;else this.expect(12);if(Q&&this.match(12))Y.push(null);else if(this.eat(Z))break;else if(this.match(21)){if(Y.push(this.parseAssignableListItemTypes(this.parseRestBinding(),J)),!this.checkCommaAfterRest(X)){this.expect(Z);break}}else{const W=[];if(this.match(26)&&this.hasPlugin("decorators"))this.raise(q.UnsupportedParameterDecorator,this.state.startLoc);while(this.match(26))W.push(this.parseDecorator());Y.push(this.parseAssignableListItem(J,W))}}return Y}parseBindingRestProperty(Z){return this.next(),Z.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(Z,"RestElement")}parseBindingProperty(){const{type:Z,startLoc:X}=this.state;if(Z===21)return this.parseBindingRestProperty(this.startNode());const J=this.startNode();if(Z===138)this.expectPlugin("destructuringPrivate",X),this.classScope.usePrivateName(this.state.value,X),J.key=this.parsePrivateName();else this.parsePropertyName(J);return J.method=!1,this.parseObjPropValue(J,X,!1,!1,!0,!1)}parseAssignableListItem(Z,X){const J=this.parseMaybeDefault();this.parseAssignableListItemTypes(J,Z);const Q=this.parseMaybeDefault(J.loc.start,J);if(X.length)J.decorators=X;return Q}parseAssignableListItemTypes(Z,X){return Z}parseMaybeDefault(Z,X){var J,Q;if((J=Z)!=null||(Z=this.state.startLoc),X=(Q=X)!=null?Q:this.parseBindingAtom(),!this.eat(29))return X;const Y=this.startNodeAt(Z);return Y.left=X,Y.right=this.parseMaybeAssignAllowIn(),this.finishNode(Y,"AssignmentPattern")}isValidLVal(Z,X,J){switch(Z){case"AssignmentPattern":return"left";case"RestElement":return"argument";case"ObjectProperty":return"value";case"ParenthesizedExpression":return"expression";case"ArrayPattern":return"elements";case"ObjectPattern":return"properties"}return!1}isOptionalMemberExpression(Z){return Z.type==="OptionalMemberExpression"}checkLVal(Z,X,J=64,Q=!1,Y=!1,V=!1){var W;const z=Z.type;if(this.isObjectMethod(Z))return;const U=this.isOptionalMemberExpression(Z);if(U||z==="MemberExpression"){if(U){if(this.expectPlugin("optionalChainingAssign",Z.loc.start),X.type!=="AssignmentExpression")this.raise(q.InvalidLhsOptionalChaining,Z,{ancestor:X})}if(J!==64)this.raise(q.InvalidPropertyBindingPattern,Z);return}if(z==="Identifier"){this.checkIdentifier(Z,J,Y);const{name:B}=Z;if(Q)if(Q.has(B))this.raise(q.ParamDupe,Z);else Q.add(B);return}const j=this.isValidLVal(z,!(V||(W=Z.extra)!=null&&W.parenthesized)&&X.type==="AssignmentExpression",J);if(j===!0)return;if(j===!1){const B=J===64?q.InvalidLhs:q.InvalidLhsBinding;this.raise(B,Z,{ancestor:X});return}let R,H;if(typeof j==="string")R=j,H=z==="ParenthesizedExpression";else[R,H]=j;const K=z==="ArrayPattern"||z==="ObjectPattern"?{type:z}:X,F=Z[R];if(Array.isArray(F)){for(let B of F)if(B)this.checkLVal(B,K,J,Q,Y,H)}else if(F)this.checkLVal(F,K,J,Q,Y,H)}checkIdentifier(Z,X,J=!1){if(this.state.strict&&(J?jZ(Z.name,this.inModule):zZ(Z.name)))if(X===64)this.raise(q.StrictEvalArguments,Z,{referenceName:Z.name});else this.raise(q.StrictEvalArgumentsBinding,Z,{bindingName:Z.name});if(X&8192&&Z.name==="let")this.raise(q.LetInLexicalBinding,Z);if(!(X&64))this.declareNameFromIdentifier(Z,X)}declareNameFromIdentifier(Z,X){this.scope.declareName(Z.name,X,Z.loc.start)}checkToRestConversion(Z,X){switch(Z.type){case"ParenthesizedExpression":this.checkToRestConversion(Z.expression,X);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(X)break;default:this.raise(q.InvalidRestAssignmentPattern,Z)}}checkCommaAfterRest(Z){if(!this.match(12))return!1;return this.raise(this.lookaheadCharCode()===Z?q.RestTrailingComma:q.ElementAfterRest,this.state.startLoc),!0}}var $=u`typescript`({AbstractMethodHasImplementation:({methodName:Z})=>`Method '${Z}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:Z})=>`Property '${Z}' 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:({kind:Z})=>`'declare' is not allowed in ${Z}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:({modifier:Z})=>"Accessibility modifier already seen.",DuplicateModifier:({modifier:Z})=>`Duplicate modifier: '${Z}'.`,EmptyHeritageClauseType:({token:Z})=>`'${Z}' list cannot be empty.`,EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ImportAliasHasImportType:"An import alias can not use 'import type'.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` modifier",IncompatibleModifiers:({modifiers:Z})=>`'${Z[0]}' modifier cannot be used with '${Z[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:Z})=>`Index signatures cannot have an accessibility modifier ('${Z}').`,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:({modifier:Z})=>`'${Z}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:Z})=>`'${Z}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:Z})=>`'${Z}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifiersOrder:({orderedModifiers:Z})=>`'${Z[0]}' modifier must precede '${Z[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:({modifier:Z})=>`Private elements cannot have an accessibility modifier ('${Z}').`,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:({typeParameterName:Z})=>`Single type parameter ${Z} should have a trailing comma. Example usage: <${Z},>.`,StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TupleOptionalAfterType:"A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:"A type-only import can specify a default import or named bindings, but not both.",TypeModifierIsUsedInTypeExports:"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.",TypeModifierIsUsedInTypeImports:"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.",UnexpectedParameterModifier:"A parameter property is only allowed in a constructor implementation.",UnexpectedReadonly:"'readonly' type modifier is only permitted on array and tuple literal types.",UnexpectedTypeAnnotation:"Did not expect a type annotation here.",UnexpectedTypeCastInParameter:"Unexpected type cast in parameter position.",UnsupportedImportTypeArgument:"Argument in a type import must be a string literal.",UnsupportedParameterPropertyKind:"A parameter property may not be declared using a binding pattern.",UnsupportedSignatureParameterKind:({type:Z})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${Z}.`}),a0=(Z)=>class X extends Z{constructor(...J){super(...J);this.tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out"],disallowedModifiers:["const","public","private","protected","readonly","declare","abstract","override"],errorTemplate:$.InvalidModifierOnTypeParameter}),this.tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:$.InvalidModifierOnTypeParameterPositions}),this.tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:$.InvalidModifierOnTypeParameter})}getScopeHandler(){return MZ}tsIsIdentifier(){return v(this.state.type)}tsTokenCanFollowModifier(){return(this.match(0)||this.match(5)||this.match(55)||this.match(21)||this.match(138)||this.isLiteralPropertyName())&&!this.hasPrecedingLineBreak()}tsNextTokenCanFollowModifier(){return this.next(),this.tsTokenCanFollowModifier()}tsParseModifier(J,Q){if(!v(this.state.type)&&this.state.type!==58&&this.state.type!==75)return;const Y=this.state.value;if(J.includes(Y)){if(Q&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return Y}return}tsParseModifiers({allowedModifiers:J,disallowedModifiers:Q,stopOnStartOfClassStaticBlock:Y,errorTemplate:V=$.InvalidModifierOnTypeMember},W){const z=(j,R,H,K)=>{if(R===H&&W[K])this.raise($.InvalidModifiersOrder,j,{orderedModifiers:[H,K]})},U=(j,R,H,K)=>{if(W[H]&&R===K||W[K]&&R===H)this.raise($.IncompatibleModifiers,j,{modifiers:[H,K]})};for(;;){const{startLoc:j}=this.state,R=this.tsParseModifier(J.concat(Q!=null?Q:[]),Y);if(!R)break;if(rJ(R))if(W.accessibility)this.raise($.DuplicateAccessibilityModifier,j,{modifier:R});else z(j,R,R,"override"),z(j,R,R,"static"),z(j,R,R,"readonly"),W.accessibility=R;else if(i0(R)){if(W[R])this.raise($.DuplicateModifier,j,{modifier:R});W[R]=!0,z(j,R,"in","out")}else{if(hasOwnProperty.call(W,R))this.raise($.DuplicateModifier,j,{modifier:R});else z(j,R,"static","readonly"),z(j,R,"static","override"),z(j,R,"override","readonly"),z(j,R,"abstract","override"),U(j,R,"declare","override"),U(j,R,"static","abstract");W[R]=!0}if(Q!=null&&Q.includes(R))this.raise(V,j,{modifier:R})}}tsIsListTerminator(J){switch(J){case"EnumMembers":case"TypeMembers":return this.match(8);case"HeritageClauseElement":return this.match(5);case"TupleElementTypes":return this.match(3);case"TypeParametersOrArguments":return this.match(48)}}tsParseList(J,Q){const Y=[];while(!this.tsIsListTerminator(J))Y.push(Q());return Y}tsParseDelimitedList(J,Q,Y){return l0(this.tsParseDelimitedListWorker(J,Q,!0,Y))}tsParseDelimitedListWorker(J,Q,Y,V){const W=[];let z=-1;for(;;){if(this.tsIsListTerminator(J))break;z=-1;const U=Q();if(U==null)return;if(W.push(U),this.eat(12)){z=this.state.lastTokStartLoc.index;continue}if(this.tsIsListTerminator(J))break;if(Y)this.expect(12);return}if(V)V.value=z;return W}tsParseBracketedList(J,Q,Y,V,W){if(!V)if(Y)this.expect(0);else this.expect(47);const z=this.tsParseDelimitedList(J,Q,W);if(Y)this.expect(3);else this.expect(48);return z}tsParseImportType(){const J=this.startNode();if(this.expect(83),this.expect(10),!this.match(133))this.raise($.UnsupportedImportTypeArgument,this.state.startLoc);if(J.argument=super.parseExprAtom(),this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))J.options=null;if(this.eat(12)){if(this.expectImportAttributesPlugin(),!this.match(11))J.options=super.parseMaybeAssignAllowIn(),this.eat(12)}if(this.expect(11),this.eat(16))J.qualifier=this.tsParseEntityName();if(this.match(47))J.typeParameters=this.tsParseTypeArguments();return this.finishNode(J,"TSImportType")}tsParseEntityName(J=!0){let Q=this.parseIdentifier(J);while(this.eat(16)){const Y=this.startNodeAtNode(Q);Y.left=Q,Y.right=this.parseIdentifier(J),Q=this.finishNode(Y,"TSQualifiedName")}return Q}tsParseTypeReference(){const J=this.startNode();if(J.typeName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47))J.typeParameters=this.tsParseTypeArguments();return this.finishNode(J,"TSTypeReference")}tsParseThisTypePredicate(J){this.next();const Q=this.startNodeAtNode(J);return Q.parameterName=J,Q.typeAnnotation=this.tsParseTypeAnnotation(!1),Q.asserts=!1,this.finishNode(Q,"TSTypePredicate")}tsParseThisTypeNode(){const J=this.startNode();return this.next(),this.finishNode(J,"TSThisType")}tsParseTypeQuery(){const J=this.startNode();if(this.expect(87),this.match(83))J.exprName=this.tsParseImportType();else J.exprName=this.tsParseEntityName();if(!this.hasPrecedingLineBreak()&&this.match(47))J.typeParameters=this.tsParseTypeArguments();return this.finishNode(J,"TSTypeQuery")}tsParseTypeParameter(J){const Q=this.startNode();return J(Q),Q.name=this.tsParseTypeParameterName(),Q.constraint=this.tsEatThenParseType(81),Q.default=this.tsEatThenParseType(29),this.finishNode(Q,"TSTypeParameter")}tsTryParseTypeParameters(J){if(this.match(47))return this.tsParseTypeParameters(J)}tsParseTypeParameters(J){const Q=this.startNode();if(this.match(47)||this.match(142))this.next();else this.unexpected();const Y={value:-1};if(Q.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,J),!1,!0,Y),Q.params.length===0)this.raise($.EmptyTypeParameters,Q);if(Y.value!==-1)this.addExtra(Q,"trailingComma",Y.value);return this.finishNode(Q,"TSTypeParameterDeclaration")}tsFillSignature(J,Q){const Y=J===19;if(Q.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),Q["parameters"]=this.tsParseBindingListForSignature(),Y)Q["typeAnnotation"]=this.tsParseTypeOrTypePredicateAnnotation(J);else if(this.match(J))Q["typeAnnotation"]=this.tsParseTypeOrTypePredicateAnnotation(J)}tsParseBindingListForSignature(){const J=super.parseBindingList(11,41,2);for(let Q of J){const{type:Y}=Q;if(Y==="AssignmentPattern"||Y==="TSParameterProperty")this.raise($.UnsupportedSignatureParameterKind,Q,{type:Y})}return J}tsParseTypeMemberSemicolon(){if(!this.eat(12)&&!this.isLineTerminator())this.expect(13)}tsParseSignatureMember(J,Q){return this.tsFillSignature(14,Q),this.tsParseTypeMemberSemicolon(),this.finishNode(Q,J)}tsIsUnambiguouslyIndexSignature(){if(this.next(),v(this.state.type))return this.next(),this.match(14);return!1}tsTryParseIndexSignature(J){if(!(this.match(0)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))))return;this.expect(0);const Q=this.parseIdentifier();Q.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(Q),this.expect(3),J.parameters=[Q];const Y=this.tsTryParseTypeAnnotation();if(Y)J.typeAnnotation=Y;return this.tsParseTypeMemberSemicolon(),this.finishNode(J,"TSIndexSignature")}tsParsePropertyOrMethodSignature(J,Q){if(this.eat(17))J.optional=!0;const Y=J;if(this.match(10)||this.match(47)){if(Q)this.raise($.ReadonlyForMethodSignature,J);const V=Y;if(V.kind&&this.match(47))this.raise($.AccesorCannotHaveTypeParameters,this.state.curPosition());this.tsFillSignature(14,V),this.tsParseTypeMemberSemicolon();const W="parameters",z="typeAnnotation";if(V.kind==="get"){if(V[W].length>0){if(this.raise(q.BadGetterArity,this.state.curPosition()),this.isThisParam(V[W][0]))this.raise($.AccesorCannotDeclareThisParameter,this.state.curPosition())}}else if(V.kind==="set"){if(V[W].length!==1)this.raise(q.BadSetterArity,this.state.curPosition());else{const U=V[W][0];if(this.isThisParam(U))this.raise($.AccesorCannotDeclareThisParameter,this.state.curPosition());if(U.type==="Identifier"&&U.optional)this.raise($.SetAccesorCannotHaveOptionalParameter,this.state.curPosition());if(U.type==="RestElement")this.raise($.SetAccesorCannotHaveRestParameter,this.state.curPosition())}if(V[z])this.raise($.SetAccesorCannotHaveReturnType,V[z])}else V.kind="method";return this.finishNode(V,"TSMethodSignature")}else{const V=Y;if(Q)V.readonly=!0;const W=this.tsTryParseTypeAnnotation();if(W)V.typeAnnotation=W;return this.tsParseTypeMemberSemicolon(),this.finishNode(V,"TSPropertySignature")}}tsParseTypeMember(){const J=this.startNode();if(this.match(10)||this.match(47))return this.tsParseSignatureMember("TSCallSignatureDeclaration",J);if(this.match(77)){const Y=this.startNode();if(this.next(),this.match(10)||this.match(47))return this.tsParseSignatureMember("TSConstructSignatureDeclaration",J);else return J.key=this.createIdentifier(Y,"new"),this.tsParsePropertyOrMethodSignature(J,!1)}this.tsParseModifiers({allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]},J);const Q=this.tsTryParseIndexSignature(J);if(Q)return Q;if(super.parsePropertyName(J),!J.computed&&J.key.type==="Identifier"&&(J.key.name==="get"||J.key.name==="set")&&this.tsTokenCanFollowModifier())J.kind=J.key.name,super.parsePropertyName(J);return this.tsParsePropertyOrMethodSignature(J,!!J.readonly)}tsParseTypeLiteral(){const J=this.startNode();return J.members=this.tsParseObjectTypeMembers(),this.finishNode(J,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(5);const J=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(8),J}tsIsStartOfMappedType(){if(this.next(),this.eat(53))return this.isContextual(122);if(this.isContextual(122))this.next();if(!this.match(0))return!1;if(this.next(),!this.tsIsIdentifier())return!1;return this.next(),this.match(58)}tsParseMappedTypeParameter(){const J=this.startNode();return J.name=this.tsParseTypeParameterName(),J.constraint=this.tsExpectThenParseType(58),this.finishNode(J,"TSTypeParameter")}tsParseMappedType(){const J=this.startNode();if(this.expect(5),this.match(53))J.readonly=this.state.value,this.next(),this.expectContextual(122);else if(this.eatContextual(122))J.readonly=!0;if(this.expect(0),J.typeParameter=this.tsParseMappedTypeParameter(),J.nameType=this.eatContextual(93)?this.tsParseType():null,this.expect(3),this.match(53))J.optional=this.state.value,this.next(),this.expect(17);else if(this.eat(17))J.optional=!0;return J.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(8),this.finishNode(J,"TSMappedType")}tsParseTupleType(){const J=this.startNode();J.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let Q=!1;return J.elementTypes.forEach((Y)=>{const{type:V}=Y;if(Q&&V!=="TSRestType"&&V!=="TSOptionalType"&&!(V==="TSNamedTupleMember"&&Y.optional))this.raise($.OptionalTypeBeforeRequired,Y);Q||(Q=V==="TSNamedTupleMember"&&Y.optional||V==="TSOptionalType")}),this.finishNode(J,"TSTupleType")}tsParseTupleElementType(){const{startLoc:J}=this.state,Q=this.eat(21);let Y,V,W,z;const j=k(this.state.type)?this.lookaheadCharCode():null;if(j===58)Y=!0,W=!1,V=this.parseIdentifier(!0),this.expect(14),z=this.tsParseType();else if(j===63){W=!0;const R=this.state.startLoc,H=this.state.value,K=this.tsParseNonArrayType();if(this.lookaheadCharCode()===58)Y=!0,V=this.createIdentifier(this.startNodeAt(R),H),this.expect(17),this.expect(14),z=this.tsParseType();else Y=!1,z=K,this.expect(17)}else z=this.tsParseType(),W=this.eat(17),Y=this.eat(14);if(Y){let R;if(V){if(R=this.startNodeAtNode(V),R.optional=W,R.label=V,R.elementType=z,this.eat(17))R.optional=!0,this.raise($.TupleOptionalAfterType,this.state.lastTokStartLoc)}else R=this.startNodeAtNode(z),R.optional=W,this.raise($.InvalidTupleMemberLabel,z),R.label=z,R.elementType=this.tsParseType();z=this.finishNode(R,"TSNamedTupleMember")}else if(W){const R=this.startNodeAtNode(z);R.typeAnnotation=z,z=this.finishNode(R,"TSOptionalType")}if(Q){const R=this.startNodeAt(J);R.typeAnnotation=z,z=this.finishNode(R,"TSRestType")}return z}tsParseParenthesizedType(){const J=this.startNode();return this.expect(10),J.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(J,"TSParenthesizedType")}tsParseFunctionOrConstructorType(J,Q){const Y=this.startNode();if(J==="TSConstructorType"){if(Y.abstract=!!Q,Q)this.next();this.next()}return this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(19,Y)),this.finishNode(Y,J)}tsParseLiteralTypeNode(){const J=this.startNode();switch(this.state.type){case 134:case 135:case 133:case 85:case 86:J.literal=super.parseExprAtom();break;default:this.unexpected()}return this.finishNode(J,"TSLiteralType")}tsParseTemplateLiteralType(){const J=this.startNode();return J.literal=super.parseTemplate(!1),this.finishNode(J,"TSLiteralType")}parseTemplateSubstitution(){if(this.state.inType)return this.tsParseType();return super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){const J=this.tsParseThisTypeNode();if(this.isContextual(116)&&!this.hasPrecedingLineBreak())return this.tsParseThisTypePredicate(J);else return J}tsParseNonArrayType(){switch(this.state.type){case 133:case 134:case 135:case 85:case 86:return this.tsParseLiteralTypeNode();case 53:if(this.state.value==="-"){const J=this.startNode(),Q=this.lookahead();if(Q.type!==134&&Q.type!==135)this.unexpected();return J.literal=this.parseMaybeUnary(),this.finishNode(J,"TSLiteralType")}break;case 78:return this.tsParseThisTypeOrThisTypePredicate();case 87:return this.tsParseTypeQuery();case 83:return this.tsParseImportType();case 5:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case 0:return this.tsParseTupleType();case 10:return this.tsParseParenthesizedType();case 25:case 24:return this.tsParseTemplateLiteralType();default:{const{type:J}=this.state;if(v(J)||J===88||J===84){const Q=J===88?"TSVoidKeyword":J===84?"TSNullKeyword":p0(this.state.value);if(Q!==void 0&&this.lookaheadCharCode()!==46){const Y=this.startNode();return this.next(),this.finishNode(Y,Q)}return this.tsParseTypeReference()}}}this.unexpected()}tsParseArrayTypeOrHigher(){let J=this.tsParseNonArrayType();while(!this.hasPrecedingLineBreak()&&this.eat(0))if(this.match(3)){const Q=this.startNodeAtNode(J);Q.elementType=J,this.expect(3),J=this.finishNode(Q,"TSArrayType")}else{const Q=this.startNodeAtNode(J);Q.objectType=J,Q.indexType=this.tsParseType(),this.expect(3),J=this.finishNode(Q,"TSIndexedAccessType")}return J}tsParseTypeOperator(){const J=this.startNode(),Q=this.state.value;if(this.next(),J.operator=Q,J.typeAnnotation=this.tsParseTypeOperatorOrHigher(),Q==="readonly")this.tsCheckTypeAnnotationForReadOnly(J);return this.finishNode(J,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(J){switch(J.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise($.UnexpectedReadonly,J)}}tsParseInferType(){const J=this.startNode();this.expectContextual(115);const Q=this.startNode();return Q.name=this.tsParseTypeParameterName(),Q.constraint=this.tsTryParse(()=>this.tsParseConstraintForInferType()),J.typeParameter=this.finishNode(Q,"TSTypeParameter"),this.finishNode(J,"TSInferType")}tsParseConstraintForInferType(){if(this.eat(81)){const J=this.tsInDisallowConditionalTypesContext(()=>this.tsParseType());if(this.state.inDisallowConditionalTypesContext||!this.match(17))return J}}tsParseTypeOperatorOrHigher(){return q0(this.state.type)&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(115)?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseUnionOrIntersectionType(J,Q,Y){const V=this.startNode(),W=this.eat(Y),z=[];do z.push(Q());while(this.eat(Y));if(z.length===1&&!W)return z[0];return V.types=z,this.finishNode(V,J)}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),45)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),43)}tsIsStartOfFunctionType(){if(this.match(47))return!0;return this.match(10)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(v(this.state.type)||this.match(78))return this.next(),!0;if(this.match(5)){const{errors:J}=this.state,Q=J.length;try{return this.parseObjectLike(8,!0),J.length===Q}catch(Y){return!1}}if(this.match(0)){this.next();const{errors:J}=this.state,Q=J.length;try{return super.parseBindingList(3,93,1),J.length===Q}catch(Y){return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){if(this.next(),this.match(11)||this.match(21))return!0;if(this.tsSkipParameterStart()){if(this.match(14)||this.match(12)||this.match(17)||this.match(29))return!0;if(this.match(11)){if(this.next(),this.match(19))return!0}}return!1}tsParseTypeOrTypePredicateAnnotation(J){return this.tsInType(()=>{const Q=this.startNode();this.expect(J);const Y=this.startNode(),V=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(V&&this.match(78)){let U=this.tsParseThisTypeOrThisTypePredicate();if(U.type==="TSThisType")Y.parameterName=U,Y.asserts=!0,Y.typeAnnotation=null,U=this.finishNode(Y,"TSTypePredicate");else this.resetStartLocationFromNode(U,Y),U.asserts=!0;return Q.typeAnnotation=U,this.finishNode(Q,"TSTypeAnnotation")}const W=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!W){if(!V)return this.tsParseTypeAnnotation(!1,Q);return Y.parameterName=this.parseIdentifier(),Y.asserts=V,Y.typeAnnotation=null,Q.typeAnnotation=this.finishNode(Y,"TSTypePredicate"),this.finishNode(Q,"TSTypeAnnotation")}const z=this.tsParseTypeAnnotation(!1);return Y.parameterName=W,Y.typeAnnotation=z,Y.asserts=V,Q.typeAnnotation=this.finishNode(Y,"TSTypePredicate"),this.finishNode(Q,"TSTypeAnnotation")})}tsTryParseTypeOrTypePredicateAnnotation(){if(this.match(14))return this.tsParseTypeOrTypePredicateAnnotation(14)}tsTryParseTypeAnnotation(){if(this.match(14))return this.tsParseTypeAnnotation()}tsTryParseType(){return this.tsEatThenParseType(14)}tsParseTypePredicatePrefix(){const J=this.parseIdentifier();if(this.isContextual(116)&&!this.hasPrecedingLineBreak())return this.next(),J}tsParseTypePredicateAsserts(){if(this.state.type!==109)return!1;const J=this.state.containsEsc;if(this.next(),!v(this.state.type)&&!this.match(78))return!1;if(J)this.raise(q.InvalidEscapedReservedWord,this.state.lastTokStartLoc,{reservedWord:"asserts"});return!0}tsParseTypeAnnotation(J=!0,Q=this.startNode()){return this.tsInType(()=>{if(J)this.expect(14);Q.typeAnnotation=this.tsParseType()}),this.finishNode(Q,"TSTypeAnnotation")}tsParseType(){sJ(this.state.inType);const J=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(81))return J;const Q=this.startNodeAtNode(J);return Q.checkType=J,Q.extendsType=this.tsInDisallowConditionalTypesContext(()=>this.tsParseNonConditionalType()),this.expect(17),Q.trueType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.expect(14),Q.falseType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.finishNode(Q,"TSConditionalType")}isAbstractConstructorSignature(){return this.isContextual(124)&&this.lookahead().type===77}tsParseNonConditionalType(){if(this.tsIsStartOfFunctionType())return this.tsParseFunctionOrConstructorType("TSFunctionType");if(this.match(77))return this.tsParseFunctionOrConstructorType("TSConstructorType");else if(this.isAbstractConstructorSignature())return this.tsParseFunctionOrConstructorType("TSConstructorType",!0);return this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){if(this.getPluginOption("typescript","disallowAmbiguousJSXLike"))this.raise($.ReservedTypeAssertion,this.state.startLoc);const J=this.startNode();return J.typeAnnotation=this.tsInType(()=>{return this.next(),this.match(75)?this.tsParseTypeReference():this.tsParseType()}),this.expect(48),J.expression=this.parseMaybeUnary(),this.finishNode(J,"TSTypeAssertion")}tsParseHeritageClause(J){const Q=this.state.startLoc,Y=this.tsParseDelimitedList("HeritageClauseElement",()=>{const V=this.startNode();if(V.expression=this.tsParseEntityName(),this.match(47))V.typeParameters=this.tsParseTypeArguments();return this.finishNode(V,"TSExpressionWithTypeArguments")});if(!Y.length)this.raise($.EmptyHeritageClauseType,Q,{token:J});return Y}tsParseInterfaceDeclaration(J,Q={}){if(this.hasFollowingLineBreak())return null;if(this.expectContextual(129),Q.declare)J.declare=!0;if(v(this.state.type))J.id=this.parseIdentifier(),this.checkIdentifier(J.id,130);else J.id=null,this.raise($.MissingInterfaceName,this.state.startLoc);if(J.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(81))J.extends=this.tsParseHeritageClause("extends");const Y=this.startNode();return Y.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),J.body=this.finishNode(Y,"TSInterfaceBody"),this.finishNode(J,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(J){return J.id=this.parseIdentifier(),this.checkIdentifier(J.id,2),J.typeAnnotation=this.tsInType(()=>{if(J.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers),this.expect(29),this.isContextual(114)&&this.lookahead().type!==16){const Q=this.startNode();return this.next(),this.finishNode(Q,"TSIntrinsicKeyword")}return this.tsParseType()}),this.semicolon(),this.finishNode(J,"TSTypeAliasDeclaration")}tsInNoContext(J){const Q=this.state.context;this.state.context=[Q[0]];try{return J()}finally{this.state.context=Q}}tsInType(J){const Q=this.state.inType;this.state.inType=!0;try{return J()}finally{this.state.inType=Q}}tsInDisallowConditionalTypesContext(J){const Q=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return J()}finally{this.state.inDisallowConditionalTypesContext=Q}}tsInAllowConditionalTypesContext(J){const Q=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return J()}finally{this.state.inDisallowConditionalTypesContext=Q}}tsEatThenParseType(J){if(this.match(J))return this.tsNextThenParseType()}tsExpectThenParseType(J){return this.tsInType(()=>{return this.expect(J),this.tsParseType()})}tsNextThenParseType(){return this.tsInType(()=>{return this.next(),this.tsParseType()})}tsParseEnumMember(){const J=this.startNode();if(J.id=this.match(133)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(29))J.initializer=super.parseMaybeAssignAllowIn();return this.finishNode(J,"TSEnumMember")}tsParseEnumDeclaration(J,Q={}){if(Q.const)J.const=!0;if(Q.declare)J.declare=!0;return this.expectContextual(126),J.id=this.parseIdentifier(),this.checkIdentifier(J.id,J.const?8971:8459),this.expect(5),J.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(J,"TSEnumDeclaration")}tsParseModuleBlock(){const J=this.startNode();return this.scope.enter(0),this.expect(5),super.parseBlockOrModuleBlockBody(J.body=[],void 0,!0,8),this.scope.exit(),this.finishNode(J,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(J,Q=!1){if(J.id=this.parseIdentifier(),!Q)this.checkIdentifier(J.id,1024);if(this.eat(16)){const Y=this.startNode();this.tsParseModuleOrNamespaceDeclaration(Y,!0),J.body=Y}else this.scope.enter(256),this.prodParam.enter(0),J.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(J,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(J){if(this.isContextual(112))J.global=!0,J.id=this.parseIdentifier();else if(this.match(133))J.id=super.parseStringLiteral(this.state.value);else this.unexpected();if(this.match(5))this.scope.enter(256),this.prodParam.enter(0),J.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();else this.semicolon();return this.finishNode(J,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(J,Q,Y){J.isExport=Y||!1,J.id=Q||this.parseIdentifier(),this.checkIdentifier(J.id,4096),this.expect(29);const V=this.tsParseModuleReference();if(J.importKind==="type"&&V.type!=="TSExternalModuleReference")this.raise($.ImportAliasHasImportType,V);return J.moduleReference=V,this.semicolon(),this.finishNode(J,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual(119)&&this.lookaheadCharCode()===40}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)}tsParseExternalModuleReference(){const J=this.startNode();if(this.expectContextual(119),this.expect(10),!this.match(133))this.unexpected();return J.expression=super.parseExprAtom(),this.expect(11),this.sawUnambiguousESM=!0,this.finishNode(J,"TSExternalModuleReference")}tsLookAhead(J){const Q=this.state.clone(),Y=J();return this.state=Q,Y}tsTryParseAndCatch(J){const Q=this.tryParse((Y)=>J()||Y());if(Q.aborted||!Q.node)return;if(Q.error)this.state=Q.failState;return Q.node}tsTryParse(J){const Q=this.state.clone(),Y=J();if(Y!==void 0&&Y!==!1)return Y;this.state=Q}tsTryParseDeclare(J){if(this.isLineTerminator())return;let Q=this.state.type,Y;if(this.isContextual(100))Q=74,Y="let";return this.tsInAmbientContext(()=>{switch(Q){case 68:return J.declare=!0,super.parseFunctionStatement(J,!1,!1);case 80:return J.declare=!0,this.parseClass(J,!0,!1);case 126:return this.tsParseEnumDeclaration(J,{declare:!0});case 112:return this.tsParseAmbientExternalModuleDeclaration(J);case 75:case 74:if(!this.match(75)||!this.isLookaheadContextual("enum"))return J.declare=!0,this.parseVarStatement(J,Y||this.state.value,!0);return this.expect(75),this.tsParseEnumDeclaration(J,{const:!0,declare:!0});case 129:{const V=this.tsParseInterfaceDeclaration(J,{declare:!0});if(V)return V}default:if(v(Q))return this.tsParseDeclaration(J,this.state.value,!0,null)}})}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0,null)}tsParseExpressionStatement(J,Q,Y){switch(Q.name){case"declare":{const V=this.tsTryParseDeclare(J);if(V)V.declare=!0;return V}case"global":if(this.match(5)){this.scope.enter(256),this.prodParam.enter(0);const V=J;return V.global=!0,V.id=Q,V.body=this.tsParseModuleBlock(),this.scope.exit(),this.prodParam.exit(),this.finishNode(V,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(J,Q.name,!1,Y)}}tsParseDeclaration(J,Q,Y,V){switch(Q){case"abstract":if(this.tsCheckLineTerminator(Y)&&(this.match(80)||v(this.state.type)))return this.tsParseAbstractDeclaration(J,V);break;case"module":if(this.tsCheckLineTerminator(Y)){if(this.match(133))return this.tsParseAmbientExternalModuleDeclaration(J);else if(v(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(J)}break;case"namespace":if(this.tsCheckLineTerminator(Y)&&v(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(J);break;case"type":if(this.tsCheckLineTerminator(Y)&&v(this.state.type))return this.tsParseTypeAliasDeclaration(J);break}}tsCheckLineTerminator(J){if(J){if(this.hasFollowingLineBreak())return!1;return this.next(),!0}return!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(J){if(!this.match(47))return;const Q=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;const Y=this.tsTryParseAndCatch(()=>{const V=this.startNodeAt(J);return V.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(V),V.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(19),V});if(this.state.maybeInArrowParameters=Q,!Y)return;return super.parseArrowExpression(Y,null,!0)}tsParseTypeArgumentsInExpression(){if(this.reScan_lt()!==47)return;return this.tsParseTypeArguments()}tsParseTypeArguments(){const J=this.startNode();if(J.params=this.tsInType(()=>this.tsInNoContext(()=>{return this.expect(47),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))})),J.params.length===0)this.raise($.EmptyTypeArguments,J);else if(!this.state.inType&&this.curContext()===T.brace)this.reScan_lt_gt();return this.expect(48),this.finishNode(J,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return R0(this.state.type)}isExportDefaultSpecifier(){if(this.tsIsDeclarationStart())return!1;return super.isExportDefaultSpecifier()}parseAssignableListItem(J,Q){const Y=this.state.startLoc,V={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},V);const{accessibility:W,override:z,readonly:U}=V;if(!(J&4)&&(W||U||z))this.raise($.UnexpectedParameterModifier,Y);const j=this.parseMaybeDefault();this.parseAssignableListItemTypes(j,J);const R=this.parseMaybeDefault(j.loc.start,j);if(W||U||z){const H=this.startNodeAt(Y);if(Q.length)H.decorators=Q;if(W)H.accessibility=W;if(U)H.readonly=U;if(z)H.override=z;if(R.type!=="Identifier"&&R.type!=="AssignmentPattern")this.raise($.UnsupportedParameterPropertyKind,H);return H.parameter=R,this.finishNode(H,"TSParameterProperty")}if(Q.length)j.decorators=Q;return R}isSimpleParameter(J){return J.type==="TSParameterProperty"&&super.isSimpleParameter(J.parameter)||super.isSimpleParameter(J)}tsDisallowOptionalPattern(J){for(let Q of J.params)if(Q.type!=="Identifier"&&Q.optional&&!this.state.isAmbientContext)this.raise($.PatternIsOptional,Q)}setArrowFunctionParameters(J,Q,Y){super.setArrowFunctionParameters(J,Q,Y),this.tsDisallowOptionalPattern(J)}parseFunctionBodyAndFinish(J,Q,Y=!1){if(this.match(14))J.returnType=this.tsParseTypeOrTypePredicateAnnotation(14);const V=Q==="FunctionDeclaration"?"TSDeclareFunction":Q==="ClassMethod"||Q==="ClassPrivateMethod"?"TSDeclareMethod":void 0;if(V&&!this.match(5)&&this.isLineTerminator())return this.finishNode(J,V);if(V==="TSDeclareFunction"&&this.state.isAmbientContext){if(this.raise($.DeclareFunctionHasImplementation,J),J.declare)return super.parseFunctionBodyAndFinish(J,V,Y)}return this.tsDisallowOptionalPattern(J),super.parseFunctionBodyAndFinish(J,Q,Y)}registerFunctionStatementId(J){if(!J.body&&J.id)this.checkIdentifier(J.id,1024);else super.registerFunctionStatementId(J)}tsCheckForInvalidTypeCasts(J){J.forEach((Q)=>{if((Q==null?void 0:Q.type)==="TSTypeCastExpression")this.raise($.UnexpectedTypeAnnotation,Q.typeAnnotation)})}toReferencedList(J,Q){return this.tsCheckForInvalidTypeCasts(J),J}parseArrayLike(J,Q,Y,V){const W=super.parseArrayLike(J,Q,Y,V);if(W.type==="ArrayExpression")this.tsCheckForInvalidTypeCasts(W.elements);return W}parseSubscript(J,Q,Y,V){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();const z=this.startNodeAt(Q);return z.expression=J,this.finishNode(z,"TSNonNullExpression")}let W=!1;if(this.match(18)&&this.lookaheadCharCode()===60){if(Y)return V.stop=!0,J;V.optionalChainMember=W=!0,this.next()}if(this.match(47)||this.match(51)){let z;const U=this.tsTryParseAndCatch(()=>{if(!Y&&this.atPossibleAsyncArrow(J)){const K=this.tsTryParseGenericAsyncArrowFunction(Q);if(K)return K}const j=this.tsParseTypeArgumentsInExpression();if(!j)return;if(W&&!this.match(10)){z=this.state.curPosition();return}if(HJ(this.state.type)){const K=super.parseTaggedTemplateExpression(J,Q,V);return K.typeParameters=j,K}if(!Y&&this.eat(10)){const K=this.startNodeAt(Q);if(K.callee=J,K.arguments=this.parseCallExpressionArguments(11,!1),this.tsCheckForInvalidTypeCasts(K.arguments),K.typeParameters=j,V.optionalChainMember)K.optional=W;return this.finishCallExpression(K,V.optionalChainMember)}const R=this.state.type;if(R===48||R===52||R!==10&&NJ(R)&&!this.hasPrecedingLineBreak())return;const H=this.startNodeAt(Q);return H.expression=J,H.typeParameters=j,this.finishNode(H,"TSInstantiationExpression")});if(z)this.unexpected(z,10);if(U){if(U.type==="TSInstantiationExpression"&&(this.match(16)||this.match(18)&&this.lookaheadCharCode()!==40))this.raise($.InvalidPropertyAccessAfterInstantiationExpression,this.state.startLoc);return U}}return super.parseSubscript(J,Q,Y,V)}parseNewCallee(J){var Q;super.parseNewCallee(J);const{callee:Y}=J;if(Y.type==="TSInstantiationExpression"&&!((Q=Y.extra)!=null&&Q.parenthesized))J.typeParameters=Y.typeParameters,J.callee=Y.expression}parseExprOp(J,Q,Y){let V;if(qJ(58)>Y&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(V=this.isContextual(120)))){const W=this.startNodeAt(Q);return W.expression=J,W.typeAnnotation=this.tsInType(()=>{if(this.next(),this.match(75)){if(V)this.raise(q.UnexpectedKeyword,this.state.startLoc,{keyword:"const"});return this.tsParseTypeReference()}return this.tsParseType()}),this.finishNode(W,V?"TSSatisfiesExpression":"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(W,Q,Y)}return super.parseExprOp(J,Q,Y)}checkReservedWord(J,Q,Y,V){if(!this.state.isAmbientContext)super.checkReservedWord(J,Q,Y,V)}checkImportReflection(J){if(super.checkImportReflection(J),J.module&&J.importKind!=="value")this.raise($.ImportReflectionHasImportType,J.specifiers[0].loc.start)}checkDuplicateExports(){}isPotentialImportPhase(J){if(super.isPotentialImportPhase(J))return!0;if(this.isContextual(130)){const Q=this.lookaheadCharCode();return J?Q===123||Q===42:Q!==61}return!J&&this.isContextual(87)}applyImportPhase(J,Q,Y,V){if(super.applyImportPhase(J,Q,Y,V),Q)J.exportKind=Y==="type"?"type":"value";else J.importKind=Y==="type"||Y==="typeof"?Y:"value"}parseImport(J){if(this.match(133))return J.importKind="value",super.parseImport(J);let Q;if(v(this.state.type)&&this.lookaheadCharCode()===61)return J.importKind="value",this.tsParseImportEqualsDeclaration(J);else if(this.isContextual(130)){const Y=this.parseMaybeImportPhase(J,!1);if(this.lookaheadCharCode()===61)return this.tsParseImportEqualsDeclaration(J,Y);else Q=super.parseImportSpecifiersAndAfter(J,Y)}else Q=super.parseImport(J);if(Q.importKind==="type"&&Q.specifiers.length>1&&Q.specifiers[0].type==="ImportDefaultSpecifier")this.raise($.TypeImportCannotSpecifyDefaultAndNamed,Q);return Q}parseExport(J,Q){if(this.match(83)){this.next();const Y=J;let V=null;if(this.isContextual(130)&&this.isPotentialImportPhase(!1))V=this.parseMaybeImportPhase(Y,!1);else Y.importKind="value";return this.tsParseImportEqualsDeclaration(Y,V,!0)}else if(this.eat(29)){const Y=J;return Y.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(Y,"TSExportAssignment")}else if(this.eatContextual(93)){const Y=J;return this.expectContextual(128),Y.id=this.parseIdentifier(),this.semicolon(),this.finishNode(Y,"TSNamespaceExportDeclaration")}else return super.parseExport(J,Q)}isAbstractClass(){return this.isContextual(124)&&this.lookahead().type===80}parseExportDefaultExpression(){if(this.isAbstractClass()){const J=this.startNode();return this.next(),J.abstract=!0,this.parseClass(J,!0,!0)}if(this.match(129)){const J=this.tsParseInterfaceDeclaration(this.startNode());if(J)return J}return super.parseExportDefaultExpression()}parseVarStatement(J,Q,Y=!1){const{isAmbientContext:V}=this.state,W=super.parseVarStatement(J,Q,Y||V);if(!V)return W;for(let{id:z,init:U}of W.declarations){if(!U)continue;if(Q!=="const"||!!z.typeAnnotation)this.raise($.InitializerNotAllowedInAmbientContext,U);else if(!t0(U,this.hasPlugin("estree")))this.raise($.ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference,U)}return W}parseStatementContent(J,Q){if(this.match(75)&&this.isLookaheadContextual("enum")){const Y=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(Y,{const:!0})}if(this.isContextual(126))return this.tsParseEnumDeclaration(this.startNode());if(this.isContextual(129)){const Y=this.tsParseInterfaceDeclaration(this.startNode());if(Y)return Y}return super.parseStatementContent(J,Q)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(J,Q){return Q.some((Y)=>{if(rJ(Y))return J.accessibility===Y;return!!J[Y]})}tsIsStartOfStaticBlocks(){return this.isContextual(106)&&this.lookaheadCharCode()===123}parseClassMember(J,Q,Y){const V=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:V,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:$.InvalidModifierOnTypeParameterPositions},Q);const W=()=>{if(this.tsIsStartOfStaticBlocks()){if(this.next(),this.next(),this.tsHasSomeModifiers(Q,V))this.raise($.StaticBlockCannotHaveModifier,this.state.curPosition());super.parseClassStaticBlock(J,Q)}else this.parseClassMemberWithIsStatic(J,Q,Y,!!Q.static)};if(Q.declare)this.tsInAmbientContext(W);else W()}parseClassMemberWithIsStatic(J,Q,Y,V){const W=this.tsTryParseIndexSignature(Q);if(W){if(J.body.push(W),Q.abstract)this.raise($.IndexSignatureHasAbstract,Q);if(Q.accessibility)this.raise($.IndexSignatureHasAccessibility,Q,{modifier:Q.accessibility});if(Q.declare)this.raise($.IndexSignatureHasDeclare,Q);if(Q.override)this.raise($.IndexSignatureHasOverride,Q);return}if(!this.state.inAbstractClass&&Q.abstract)this.raise($.NonAbstractClassHasAbstractMethod,Q);if(Q.override){if(!Y.hadSuperClass)this.raise($.OverrideNotInSubClass,Q)}super.parseClassMemberWithIsStatic(J,Q,Y,V)}parsePostMemberNameModifiers(J){if(this.eat(17))J.optional=!0;if(J.readonly&&this.match(10))this.raise($.ClassMethodHasReadonly,J);if(J.declare&&this.match(10))this.raise($.ClassMethodHasDeclare,J)}parseExpressionStatement(J,Q,Y){return(Q.type==="Identifier"?this.tsParseExpressionStatement(J,Q,Y):void 0)||super.parseExpressionStatement(J,Q,Y)}shouldParseExportDeclaration(){if(this.tsIsDeclarationStart())return!0;return super.shouldParseExportDeclaration()}parseConditional(J,Q,Y){if(!this.state.maybeInArrowParameters||!this.match(17))return super.parseConditional(J,Q,Y);const V=this.tryParse(()=>super.parseConditional(J,Q));if(!V.node){if(V.error)super.setOptionalParametersError(Y,V.error);return J}if(V.error)this.state=V.failState;return V.node}parseParenItem(J,Q){const Y=super.parseParenItem(J,Q);if(this.eat(17))Y.optional=!0,this.resetEndLocation(J);if(this.match(14)){const V=this.startNodeAt(Q);return V.expression=J,V.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(V,"TSTypeCastExpression")}return J}parseExportDeclaration(J){if(!this.state.isAmbientContext&&this.isContextual(125))return this.tsInAmbientContext(()=>this.parseExportDeclaration(J));const Q=this.state.startLoc,Y=this.eatContextual(125);if(Y&&(this.isContextual(125)||!this.shouldParseExportDeclaration()))throw this.raise($.ExpectedAmbientAfterExportDeclare,this.state.startLoc);const W=v(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(J);if(!W)return null;if(W.type==="TSInterfaceDeclaration"||W.type==="TSTypeAliasDeclaration"||Y)J.exportKind="type";if(Y)this.resetStartLocation(W,Q),W.declare=!0;return W}parseClassId(J,Q,Y,V){if((!Q||Y)&&this.isContextual(113))return;super.parseClassId(J,Q,Y,J.declare?1024:8331);const W=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);if(W)J.typeParameters=W}parseClassPropertyAnnotation(J){if(!J.optional){if(this.eat(35))J.definite=!0;else if(this.eat(17))J.optional=!0}const Q=this.tsTryParseTypeAnnotation();if(Q)J.typeAnnotation=Q}parseClassProperty(J){if(this.parseClassPropertyAnnotation(J),this.state.isAmbientContext&&!(J.readonly&&!J.typeAnnotation)&&this.match(29))this.raise($.DeclareClassFieldHasInitializer,this.state.startLoc);if(J.abstract&&this.match(29)){const{key:Q}=J;this.raise($.AbstractPropertyHasInitializer,this.state.startLoc,{propertyName:Q.type==="Identifier"&&!J.computed?Q.name:`[${this.input.slice(Q.start,Q.end)}]`})}return super.parseClassProperty(J)}parseClassPrivateProperty(J){if(J.abstract)this.raise($.PrivateElementHasAbstract,J);if(J.accessibility)this.raise($.PrivateElementHasAccessibility,J,{modifier:J.accessibility});return this.parseClassPropertyAnnotation(J),super.parseClassPrivateProperty(J)}parseClassAccessorProperty(J){if(this.parseClassPropertyAnnotation(J),J.optional)this.raise($.AccessorCannotBeOptional,J);return super.parseClassAccessorProperty(J)}pushClassMethod(J,Q,Y,V,W,z){const U=this.tsTryParseTypeParameters(this.tsParseConstModifier);if(U&&W)this.raise($.ConstructorHasTypeParameters,U);const{declare:j=!1,kind:R}=Q;if(j&&(R==="get"||R==="set"))this.raise($.DeclareAccessor,Q,{kind:R});if(U)Q.typeParameters=U;super.pushClassMethod(J,Q,Y,V,W,z)}pushClassPrivateMethod(J,Q,Y,V){const W=this.tsTryParseTypeParameters(this.tsParseConstModifier);if(W)Q.typeParameters=W;super.pushClassPrivateMethod(J,Q,Y,V)}declareClassPrivateMethodInScope(J,Q){if(J.type==="TSDeclareMethod")return;if(J.type==="MethodDefinition"&&!hasOwnProperty.call(J.value,"body"))return;super.declareClassPrivateMethodInScope(J,Q)}parseClassSuper(J){if(super.parseClassSuper(J),J.superClass&&(this.match(47)||this.match(51)))J.superTypeParameters=this.tsParseTypeArgumentsInExpression();if(this.eatContextual(113))J.implements=this.tsParseHeritageClause("implements")}parseObjPropValue(J,Q,Y,V,W,z,U){const j=this.tsTryParseTypeParameters(this.tsParseConstModifier);if(j)J.typeParameters=j;return super.parseObjPropValue(J,Q,Y,V,W,z,U)}parseFunctionParams(J,Q){const Y=this.tsTryParseTypeParameters(this.tsParseConstModifier);if(Y)J.typeParameters=Y;super.parseFunctionParams(J,Q)}parseVarId(J,Q){if(super.parseVarId(J,Q),J.id.type==="Identifier"&&!this.hasPrecedingLineBreak()&&this.eat(35))J.definite=!0;const Y=this.tsTryParseTypeAnnotation();if(Y)J.id.typeAnnotation=Y,this.resetEndLocation(J.id)}parseAsyncArrowFromCallExpression(J,Q){if(this.match(14))J.returnType=this.tsParseTypeAnnotation();return super.parseAsyncArrowFromCallExpression(J,Q)}parseMaybeAssign(J,Q){var Y,V,W,z,U;let j,R,H;if(this.hasPlugin("jsx")&&(this.match(142)||this.match(47))){if(j=this.state.clone(),R=this.tryParse(()=>super.parseMaybeAssign(J,Q),j),!R.error)return R.node;const{context:B}=this.state,A=B[B.length-1];if(A===T.j_oTag||A===T.j_expr)B.pop()}if(!((Y=R)!=null&&Y.error)&&!this.match(47))return super.parseMaybeAssign(J,Q);if(!j||j===this.state)j=this.state.clone();let K;const F=this.tryParse((B)=>{var A,M;K=this.tsParseTypeParameters(this.tsParseConstModifier);const I=super.parseMaybeAssign(J,Q);if(I.type!=="ArrowFunctionExpression"||(A=I.extra)!=null&&A.parenthesized)B();if(((M=K)==null?void 0:M.params.length)!==0)this.resetStartLocationFromNode(I,K);return I.typeParameters=K,I},j);if(!F.error&&!F.aborted){if(K)this.reportReservedArrowTypeParam(K);return F.node}if(!R){if(sJ(!this.hasPlugin("jsx")),H=this.tryParse(()=>super.parseMaybeAssign(J,Q),j),!H.error)return H.node}if((V=R)!=null&&V.node)return this.state=R.failState,R.node;if(F.node){if(this.state=F.failState,K)this.reportReservedArrowTypeParam(K);return F.node}if((W=H)!=null&&W.node)return this.state=H.failState,H.node;throw((z=R)==null?void 0:z.error)||F.error||((U=H)==null?void 0:U.error)}reportReservedArrowTypeParam(J){var Q;if(J.params.length===1&&!J.params[0].constraint&&!((Q=J.extra)!=null&&Q.trailingComma)&&this.getPluginOption("typescript","disallowAmbiguousJSXLike"))this.raise($.ReservedArrowTypeParam,J)}parseMaybeUnary(J,Q){if(!this.hasPlugin("jsx")&&this.match(47))return this.tsParseTypeAssertion();return super.parseMaybeUnary(J,Q)}parseArrow(J){if(this.match(14)){const Q=this.tryParse((Y)=>{const V=this.tsParseTypeOrTypePredicateAnnotation(14);if(this.canInsertSemicolon()||!this.match(19))Y();return V});if(Q.aborted)return;if(!Q.thrown){if(Q.error)this.state=Q.failState;J.returnType=Q.node}}return super.parseArrow(J)}parseAssignableListItemTypes(J,Q){if(!(Q&2))return J;if(this.eat(17))J.optional=!0;const Y=this.tsTryParseTypeAnnotation();if(Y)J.typeAnnotation=Y;return this.resetEndLocation(J),J}isAssignable(J,Q){switch(J.type){case"TSTypeCastExpression":return this.isAssignable(J.expression,Q);case"TSParameterProperty":return!0;default:return super.isAssignable(J,Q)}}toAssignable(J,Q=!1){switch(J.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(J,Q);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":if(Q)this.expressionScope.recordArrowParameterBindingError($.UnexpectedTypeCastInParameter,J);else this.raise($.UnexpectedTypeCastInParameter,J);this.toAssignable(J.expression,Q);break;case"AssignmentExpression":if(!Q&&J.left.type==="TSTypeCastExpression")J.left=this.typeCastToParameter(J.left);default:super.toAssignable(J,Q)}}toAssignableParenthesizedExpression(J,Q){switch(J.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(J.expression,Q);break;default:super.toAssignable(J,Q)}}checkToRestConversion(J,Q){switch(J.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(J.expression,!1);break;default:super.checkToRestConversion(J,Q)}}isValidLVal(J,Q,Y){switch(J){case"TSTypeCastExpression":return!0;case"TSParameterProperty":return"parameter";case"TSNonNullExpression":case"TSInstantiationExpression":return"expression";case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":return(Y!==64||!Q)&&["expression",!0];default:return super.isValidLVal(J,Q,Y)}}parseBindingAtom(){if(this.state.type===78)return this.parseIdentifier(!0);return super.parseBindingAtom()}parseMaybeDecoratorArguments(J){if(this.match(47)||this.match(51)){const Q=this.tsParseTypeArgumentsInExpression();if(this.match(10)){const Y=super.parseMaybeDecoratorArguments(J);return Y.typeParameters=Q,Y}this.unexpected(null,10)}return super.parseMaybeDecoratorArguments(J)}checkCommaAfterRest(J){if(this.state.isAmbientContext&&this.match(12)&&this.lookaheadCharCode()===J)return this.next(),!1;return super.checkCommaAfterRest(J)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(35)||this.match(14)||super.isClassProperty()}parseMaybeDefault(J,Q){const Y=super.parseMaybeDefault(J,Q);if(Y.type==="AssignmentPattern"&&Y.typeAnnotation&&Y.right.start<Y.typeAnnotation.start)this.raise($.TypeAnnotationAfterAssign,Y.typeAnnotation);return Y}getTokenFromCode(J){if(this.state.inType){if(J===62){this.finishOp(48,1);return}if(J===60){this.finishOp(47,1);return}}super.getTokenFromCode(J)}reScan_lt_gt(){const{type:J}=this.state;if(J===47)this.state.pos-=1,this.readToken_lt();else if(J===48)this.state.pos-=1,this.readToken_gt()}reScan_lt(){const{type:J}=this.state;if(J===51)return this.state.pos-=2,this.finishOp(47,1),47;return J}toAssignableList(J,Q,Y){for(let V=0;V<J.length;V++){const W=J[V];if((W==null?void 0:W.type)==="TSTypeCastExpression")J[V]=this.typeCastToParameter(W)}super.toAssignableList(J,Q,Y)}typeCastToParameter(J){return J.expression.typeAnnotation=J.typeAnnotation,this.resetEndLocation(J.expression,J.typeAnnotation.loc.end),J.expression}shouldParseArrow(J){if(this.match(14))return J.every((Q)=>this.isAssignable(Q,!0));return super.shouldParseArrow(J)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(J){if(this.match(47)||this.match(51)){const Q=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());if(Q)J.typeParameters=Q}return super.jsxParseOpeningElementAfterName(J)}getGetterSetterExpectedParamCount(J){const Q=super.getGetterSetterExpectedParamCount(J),V=this.getObjectOrClassMethodParams(J)[0];return V&&this.isThisParam(V)?Q+1:Q}parseCatchClauseParam(){const J=super.parseCatchClauseParam(),Q=this.tsTryParseTypeAnnotation();if(Q)J.typeAnnotation=Q,this.resetEndLocation(J);return J}tsInAmbientContext(J){const{isAmbientContext:Q,strict:Y}=this.state;this.state.isAmbientContext=!0,this.state.strict=!1;try{return J()}finally{this.state.isAmbientContext=Q,this.state.strict=Y}}parseClass(J,Q,Y){const V=this.state.inAbstractClass;this.state.inAbstractClass=!!J.abstract;try{return super.parseClass(J,Q,Y)}finally{this.state.inAbstractClass=V}}tsParseAbstractDeclaration(J,Q){if(this.match(80))return J.abstract=!0,this.maybeTakeDecorators(Q,this.parseClass(J,!0,!1));else if(this.isContextual(129)){if(!this.hasFollowingLineBreak())return J.abstract=!0,this.raise($.NonClassMethodPropertyHasAbstractModifer,J),this.tsParseInterfaceDeclaration(J)}else this.unexpected(null,80)}parseMethod(J,Q,Y,V,W,z,U){const j=super.parseMethod(J,Q,Y,V,W,z,U);if(j.abstract){if(this.hasPlugin("estree")?!!j.value.body:!!j.body){const{key:H}=j;this.raise($.AbstractMethodHasImplementation,j,{methodName:H.type==="Identifier"&&!j.computed?H.name:`[${this.input.slice(H.start,H.end)}]`})}}return j}tsParseTypeParameterName(){return this.parseIdentifier().name}shouldParseAsAmbientContext(){return!!this.getPluginOption("typescript","dts")}parse(){if(this.shouldParseAsAmbientContext())this.state.isAmbientContext=!0;return super.parse()}getExpression(){if(this.shouldParseAsAmbientContext())this.state.isAmbientContext=!0;return super.getExpression()}parseExportSpecifier(J,Q,Y,V){if(!Q&&V)return this.parseTypeOnlyImportExportSpecifier(J,!1,Y),this.finishNode(J,"ExportSpecifier");return J.exportKind="value",super.parseExportSpecifier(J,Q,Y,V)}parseImportSpecifier(J,Q,Y,V,W){if(!Q&&V)return this.parseTypeOnlyImportExportSpecifier(J,!0,Y),this.finishNode(J,"ImportSpecifier");return J.importKind="value",super.parseImportSpecifier(J,Q,Y,V,Y?4098:4096)}parseTypeOnlyImportExportSpecifier(J,Q,Y){const V=Q?"imported":"local",W=Q?"local":"exported";let z=J[V],U,j=!1,R=!0;const H=z.loc.start;if(this.isContextual(93)){const F=this.parseIdentifier();if(this.isContextual(93)){const B=this.parseIdentifier();if(k(this.state.type))j=!0,z=F,U=Q?this.parseIdentifier():this.parseModuleExportName(),R=!1;else U=B,R=!1}else if(k(this.state.type))R=!1,U=Q?this.parseIdentifier():this.parseModuleExportName();else j=!0,z=F}else if(k(this.state.type))if(j=!0,Q){if(z=this.parseIdentifier(!0),!this.isContextual(93))this.checkReservedWord(z.name,z.loc.start,!0,!0)}else z=this.parseModuleExportName();if(j&&Y)this.raise(Q?$.TypeModifierIsUsedInTypeImports:$.TypeModifierIsUsedInTypeExports,H);J[V]=z,J[W]=U;const K=Q?"importKind":"exportKind";if(J[K]=j?"type":"value",R&&this.eatContextual(93))J[W]=Q?this.parseIdentifier():this.parseModuleExportName();if(!J[W])J[W]=x(J[V]);if(Q)this.checkIdentifier(J[W],j?4098:4096)}},oJ=u`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."}),s0=(Z)=>class X extends Z{parsePlaceholder(J){if(this.match(144)){const Q=this.startNode();return this.next(),this.assertNoSpace(),Q.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(144),this.finishPlaceholder(Q,J)}}finishPlaceholder(J,Q){let Y=J;if(!Y.expectedNode||!Y.type)Y=this.finishNode(Y,"Placeholder");return Y.expectedNode=Q,Y}getTokenFromCode(J){if(J===37&&this.input.charCodeAt(this.state.pos+1)===37)this.finishOp(144,2);else super.getTokenFromCode(J)}parseExprAtom(J){return this.parsePlaceholder("Expression")||super.parseExprAtom(J)}parseIdentifier(J){return this.parsePlaceholder("Identifier")||super.parseIdentifier(J)}checkReservedWord(J,Q,Y,V){if(J!==void 0)super.checkReservedWord(J,Q,Y,V)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(J,Q,Y){return J==="Placeholder"||super.isValidLVal(J,Q,Y)}toAssignable(J,Q){if(J&&J.type==="Placeholder"&&J.expectedNode==="Expression")J.expectedNode="Pattern";else super.toAssignable(J,Q)}chStartsBindingIdentifier(J,Q){if(super.chStartsBindingIdentifier(J,Q))return!0;if(this.lookahead().type===144)return!0;return!1}verifyBreakContinue(J,Q){if(J.label&&J.label.type==="Placeholder")return;super.verifyBreakContinue(J,Q)}parseExpressionStatement(J,Q){var Y;if(Q.type!=="Placeholder"||(Y=Q.extra)!=null&&Y.parenthesized)return super.parseExpressionStatement(J,Q);if(this.match(14)){const W=J;return W.label=this.finishPlaceholder(Q,"Identifier"),this.next(),W.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(W,"LabeledStatement")}this.semicolon();const V=J;return V.name=Q.name,this.finishPlaceholder(V,"Statement")}parseBlock(J,Q,Y){return this.parsePlaceholder("BlockStatement")||super.parseBlock(J,Q,Y)}parseFunctionId(J){return this.parsePlaceholder("Identifier")||super.parseFunctionId(J)}parseClass(J,Q,Y){const V=Q?"ClassDeclaration":"ClassExpression";this.next();const W=this.state.strict,z=this.parsePlaceholder("Identifier");if(z)if(this.match(81)||this.match(144)||this.match(5))J.id=z;else if(Y||!Q)return J.id=null,J.body=this.finishPlaceholder(z,"ClassBody"),this.finishNode(J,V);else throw this.raise(oJ.ClassNameIsRequired,this.state.startLoc);else this.parseClassId(J,Q,Y);return super.parseClassSuper(J),J.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!J.superClass,W),this.finishNode(J,V)}parseExport(J,Q){const Y=this.parsePlaceholder("Identifier");if(!Y)return super.parseExport(J,Q);const V=J;if(!this.isContextual(98)&&!this.match(12))return V.specifiers=[],V.source=null,V.declaration=this.finishPlaceholder(Y,"Declaration"),this.finishNode(V,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");const W=this.startNode();return W.exported=Y,V.specifiers=[this.finishNode(W,"ExportDefaultSpecifier")],super.parseExport(V,Q)}isExportDefaultSpecifier(){if(this.match(65)){const J=this.nextTokenStart();if(this.isUnparsedContextual(J,"from")){if(this.input.startsWith(m(144),this.nextTokenStartSince(J+4)))return!0}}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(J,Q){var Y;if((Y=J.specifiers)!=null&&Y.length)return!0;return super.maybeParseExportDefaultSpecifier(J,Q)}checkExport(J){const{specifiers:Q}=J;if(Q!=null&&Q.length)J.specifiers=Q.filter((Y)=>Y.exported.type==="Placeholder");super.checkExport(J),J.specifiers=Q}parseImport(J){const Q=this.parsePlaceholder("Identifier");if(!Q)return super.parseImport(J);if(J.specifiers=[],!this.isContextual(98)&&!this.match(12))return J.source=this.finishPlaceholder(Q,"StringLiteral"),this.semicolon(),this.finishNode(J,"ImportDeclaration");const Y=this.startNodeAtNode(Q);if(Y.local=Q,J.specifiers.push(this.finishNode(Y,"ImportDefaultSpecifier")),this.eat(12)){if(!this.maybeParseStarImportSpecifier(J))this.parseNamedImportSpecifiers(J)}return this.expectContextual(98),J.source=this.parseImportSource(),this.semicolon(),this.finishNode(J,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource()}assertNoSpace(){if(this.state.start>this.state.lastTokEndLoc.index)this.raise(oJ.UnexpectedSpace,this.state.lastTokEndLoc)}},r0=(Z)=>class X extends Z{parseV8Intrinsic(){if(this.match(54)){const J=this.state.startLoc,Q=this.startNode();if(this.next(),v(this.state.type)){const Y=this.parseIdentifierName(),V=this.createIdentifier(Q,Y);if(V.type="V8IntrinsicIdentifier",this.match(10))return V}this.unexpected(J)}}parseExprAtom(J){return this.parseV8Intrinsic()||super.parseExprAtom(J)}},eJ=["minimal","fsharp","hack","smart"],JZ=["^^","@@","^","%","#"],wZ={estree:J0,jsx:c0,flow:y0,typescript:a0,v8intrinsic:r0,placeholders:s0},e0=Object.keys(wZ),BJ={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};class kZ extends AZ{checkProto(Z,X,J,Q){if(Z.type==="SpreadElement"||this.isObjectMethod(Z)||Z.computed||Z.shorthand)return;const Y=Z.key;if((Y.type==="Identifier"?Y.name:Y.value)==="__proto__"){if(X){this.raise(q.RecordNoProto,Y);return}if(J.used)if(Q){if(Q.doubleProtoLoc===null)Q.doubleProtoLoc=Y.loc.start}else this.raise(q.DuplicateProto,Y);J.used=!0}}shouldExitDescending(Z,X){return Z.type==="ArrowFunctionExpression"&&Z.start===X}getExpression(){this.enterInitialScopes(),this.nextToken();const Z=this.parseExpression();if(!this.match(139))this.unexpected();if(this.finalizeRemainingComments(),Z.comments=this.comments,Z.errors=this.state.errors,this.options.tokens)Z.tokens=this.tokens;return Z}parseExpression(Z,X){if(Z)return this.disallowInAnd(()=>this.parseExpressionBase(X));return this.allowInAnd(()=>this.parseExpressionBase(X))}parseExpressionBase(Z){const X=this.state.startLoc,J=this.parseMaybeAssign(Z);if(this.match(12)){const Q=this.startNodeAt(X);Q.expressions=[J];while(this.eat(12))Q.expressions.push(this.parseMaybeAssign(Z));return this.toReferencedList(Q.expressions),this.finishNode(Q,"SequenceExpression")}return J}parseMaybeAssignDisallowIn(Z,X){return this.disallowInAnd(()=>this.parseMaybeAssign(Z,X))}parseMaybeAssignAllowIn(Z,X){return this.allowInAnd(()=>this.parseMaybeAssign(Z,X))}setOptionalParametersError(Z,X){var J;Z.optionalParametersLoc=(J=X==null?void 0:X.loc)!=null?J:this.state.startLoc}parseMaybeAssign(Z,X){const J=this.state.startLoc;if(this.isContextual(108)){if(this.prodParam.hasYield){let W=this.parseYield();if(X)W=X.call(this,W,J);return W}}let Q;if(Z)Q=!1;else Z=new JJ,Q=!0;const{type:Y}=this.state;if(Y===10||v(Y))this.state.potentialArrowAt=this.state.start;let V=this.parseMaybeConditional(Z);if(X)V=X.call(this,V,J);if(V0(this.state.type)){const W=this.startNodeAt(J),z=this.state.value;if(W.operator=z,this.match(29)){this.toAssignable(V,!0),W.left=V;const U=J.index;if(Z.doubleProtoLoc!=null&&Z.doubleProtoLoc.index>=U)Z.doubleProtoLoc=null;if(Z.shorthandAssignLoc!=null&&Z.shorthandAssignLoc.index>=U)Z.shorthandAssignLoc=null;if(Z.privateKeyLoc!=null&&Z.privateKeyLoc.index>=U)this.checkDestructuringPrivate(Z),Z.privateKeyLoc=null}else W.left=V;return this.next(),W.right=this.parseMaybeAssign(),this.checkLVal(V,this.finishNode(W,"AssignmentExpression")),W}else if(Q)this.checkExpressionErrors(Z,!0);return V}parseMaybeConditional(Z){const X=this.state.startLoc,J=this.state.potentialArrowAt,Q=this.parseExprOps(Z);if(this.shouldExitDescending(Q,J))return Q;return this.parseConditional(Q,X,Z)}parseConditional(Z,X,J){if(this.eat(17)){const Q=this.startNodeAt(X);return Q.test=Z,Q.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),Q.alternate=this.parseMaybeAssign(),this.finishNode(Q,"ConditionalExpression")}return Z}parseMaybeUnaryOrPrivate(Z){return this.match(138)?this.parsePrivateName():this.parseMaybeUnary(Z)}parseExprOps(Z){const X=this.state.startLoc,J=this.state.potentialArrowAt,Q=this.parseMaybeUnaryOrPrivate(Z);if(this.shouldExitDescending(Q,J))return Q;return this.parseExprOp(Q,X,-1)}parseExprOp(Z,X,J){if(this.isPrivateName(Z)){const Y=this.getPrivateNameSV(Z);if(J>=qJ(58)||!this.prodParam.hasIn||!this.match(58))this.raise(q.PrivateInExpectedIn,Z,{identifierName:Y});this.classScope.usePrivateName(Y,Z.loc.start)}const Q=this.state.type;if(z0(Q)&&(this.prodParam.hasIn||!this.match(58))){let Y=qJ(Q);if(Y>J){if(Q===39){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return Z;this.checkPipelineAtInfixOperator(Z,X)}const V=this.startNodeAt(X);V.left=Z,V.operator=this.state.value;const W=Q===41||Q===42,z=Q===40;if(z)Y=qJ(42);if(this.next(),Q===39&&this.hasPlugin(["pipelineOperator",{proposal:"minimal"}])){if(this.state.type===96&&this.prodParam.hasAwait)throw this.raise(q.UnexpectedAwaitAfterPipelineBody,this.state.startLoc)}V.right=this.parseExprOpRightExpr(Q,Y);const U=this.finishNode(V,W||z?"LogicalExpression":"BinaryExpression"),j=this.state.type;if(z&&(j===41||j===42)||W&&j===40)throw this.raise(q.MixingCoalesceWithLogical,this.state.startLoc);return this.parseExprOp(U,X,J)}}return Z}parseExprOpRightExpr(Z,X){const J=this.state.startLoc;switch(Z){case 39:switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext(()=>{return this.parseHackPipeBody()});case"smart":return this.withTopicBindingContext(()=>{if(this.prodParam.hasYield&&this.isContextual(108))throw this.raise(q.PipeBodyIsTighter,this.state.startLoc);return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(Z,X),J)});case"fsharp":return this.withSoloAwaitPermittingContext(()=>{return this.parseFSharpPipelineBody(X)})}default:return this.parseExprOpBaseRightExpr(Z,X)}}parseExprOpBaseRightExpr(Z,X){const J=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),J,H0(Z)?X-1:X)}parseHackPipeBody(){var Z;const{startLoc:X}=this.state,J=this.parseMaybeAssign();if(nZ.has(J.type)&&!((Z=J.extra)!=null&&Z.parenthesized))this.raise(q.PipeUnparenthesizedBody,X,{type:J.type});if(!this.topicReferenceWasUsedInCurrentContext())this.raise(q.PipeTopicUnused,X);return J}checkExponentialAfterUnary(Z){if(this.match(57))this.raise(q.UnexpectedTokenUnaryExponentiation,Z.argument)}parseMaybeUnary(Z,X){const J=this.state.startLoc,Q=this.isContextual(96);if(Q&&this.recordAwaitIfAllowed()){this.next();const z=this.parseAwait(J);if(!X)this.checkExponentialAfterUnary(z);return z}const Y=this.match(34),V=this.startNode();if(U0(this.state.type)){if(V.operator=this.state.value,V.prefix=!0,this.match(72))this.expectPlugin("throwExpressions");const z=this.match(89);if(this.next(),V.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(Z,!0),this.state.strict&&z){const U=V.argument;if(U.type==="Identifier")this.raise(q.StrictDelete,V);else if(this.hasPropertyAsPrivateName(U))this.raise(q.DeletePrivateField,V)}if(!Y){if(!X)this.checkExponentialAfterUnary(V);return this.finishNode(V,"UnaryExpression")}}const W=this.parseUpdate(V,Y,Z);if(Q){const{type:z}=this.state;if((this.hasPlugin("v8intrinsic")?NJ(z):NJ(z)&&!this.match(54))&&!this.isAmbiguousAwait())return this.raiseOverwrite(q.AwaitNotInAsyncContext,J),this.parseAwait(J)}return W}parseUpdate(Z,X,J){if(X){const V=Z;return this.checkLVal(V.argument,this.finishNode(V,"UpdateExpression")),Z}const Q=this.state.startLoc;let Y=this.parseExprSubscripts(J);if(this.checkExpressionErrors(J,!1))return Y;while(j0(this.state.type)&&!this.canInsertSemicolon()){const V=this.startNodeAt(Q);V.operator=this.state.value,V.prefix=!1,V.argument=Y,this.next(),this.checkLVal(Y,Y=this.finishNode(V,"UpdateExpression"))}return Y}parseExprSubscripts(Z){const X=this.state.startLoc,J=this.state.potentialArrowAt,Q=this.parseExprAtom(Z);if(this.shouldExitDescending(Q,J))return Q;return this.parseSubscripts(Q,X)}parseSubscripts(Z,X,J){const Q={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(Z),stop:!1};do Z=this.parseSubscript(Z,X,J,Q),Q.maybeAsyncArrow=!1;while(!Q.stop);return Z}parseSubscript(Z,X,J,Q){const{type:Y}=this.state;if(!J&&Y===15)return this.parseBind(Z,X,J,Q);else if(HJ(Y))return this.parseTaggedTemplateExpression(Z,X,Q);let V=!1;if(Y===18){if(J){if(this.raise(q.OptionalChainingNoNew,this.state.startLoc),this.lookaheadCharCode()===40)return Q.stop=!0,Z}Q.optionalChainMember=V=!0,this.next()}if(!J&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(Z,X,Q,V);else{const W=this.eat(0);if(W||V||this.eat(16))return this.parseMember(Z,X,Q,W,V);else return Q.stop=!0,Z}}parseMember(Z,X,J,Q,Y){const V=this.startNodeAt(X);if(V.object=Z,V.computed=Q,Q)V.property=this.parseExpression(),this.expect(3);else if(this.match(138)){if(Z.type==="Super")this.raise(q.SuperPrivateField,X);this.classScope.usePrivateName(this.state.value,this.state.startLoc),V.property=this.parsePrivateName()}else V.property=this.parseIdentifier(!0);if(J.optionalChainMember)return V.optional=Y,this.finishNode(V,"OptionalMemberExpression");else return this.finishNode(V,"MemberExpression")}parseBind(Z,X,J,Q){const Y=this.startNodeAt(X);return Y.object=Z,this.next(),Y.callee=this.parseNoCallExpr(),Q.stop=!0,this.parseSubscripts(this.finishNode(Y,"BindExpression"),X,J)}parseCoverCallAndAsyncArrowHead(Z,X,J,Q){const Y=this.state.maybeInArrowParameters;let V=null;this.state.maybeInArrowParameters=!0,this.next();const W=this.startNodeAt(X);W.callee=Z;const{maybeAsyncArrow:z,optionalChainMember:U}=J;if(z)this.expressionScope.enter(L0()),V=new JJ;if(U)W.optional=Q;if(Q)W.arguments=this.parseCallExpressionArguments(11);else W.arguments=this.parseCallExpressionArguments(11,Z.type==="Import",Z.type!=="Super",W,V);let j=this.finishCallExpression(W,U);if(z&&this.shouldParseAsyncArrow()&&!Q)J.stop=!0,this.checkDestructuringPrivate(V),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),j=this.parseAsyncArrowFromCallExpression(this.startNodeAt(X),j);else{if(z)this.checkExpressionErrors(V,!0),this.expressionScope.exit();this.toReferencedArguments(j)}return this.state.maybeInArrowParameters=Y,j}toReferencedArguments(Z,X){this.toReferencedListDeep(Z.arguments,X)}parseTaggedTemplateExpression(Z,X,J){const Q=this.startNodeAt(X);if(Q.tag=Z,Q.quasi=this.parseTemplate(!0),J.optionalChainMember)this.raise(q.OptionalChainingNoTemplate,X);return this.finishNode(Q,"TaggedTemplateExpression")}atPossibleAsyncArrow(Z){return Z.type==="Identifier"&&Z.name==="async"&&this.state.lastTokEndLoc.index===Z.end&&!this.canInsertSemicolon()&&Z.end-Z.start===5&&Z.start===this.state.potentialArrowAt}expectImportAttributesPlugin(){if(!this.hasPlugin("importAssertions"))this.expectPlugin("importAttributes")}finishCallExpression(Z,X){if(Z.callee.type==="Import"){if(Z.arguments.length===2){if(!this.hasPlugin("moduleAttributes"))this.expectImportAttributesPlugin()}if(Z.arguments.length===0||Z.arguments.length>2)this.raise(q.ImportCallArity,Z,{maxArgumentCount:this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions")||this.hasPlugin("moduleAttributes")?2:1});else for(let J of Z.arguments)if(J.type==="SpreadElement")this.raise(q.ImportCallSpreadArgument,J)}return this.finishNode(Z,X?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(Z,X,J,Q,Y){const V=[];let W=!0;const z=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;while(!this.eat(Z)){if(W)W=!1;else if(this.expect(12),this.match(Z)){if(X&&!this.hasPlugin("importAttributes")&&!this.hasPlugin("importAssertions")&&!this.hasPlugin("moduleAttributes"))this.raise(q.ImportCallArgumentTrailingComma,this.state.lastTokStartLoc);if(Q)this.addTrailingCommaExtraToNode(Q);this.next();break}V.push(this.parseExprListItem(!1,Y,J))}return this.state.inFSharpPipelineDirectBody=z,V}shouldParseAsyncArrow(){return this.match(19)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(Z,X){var J;if(this.resetPreviousNodeTrailingComments(X),this.expect(19),this.parseArrowExpression(Z,X.arguments,!0,(J=X.extra)==null?void 0:J.trailingCommaLoc),X.innerComments)QJ(Z,X.innerComments);if(X.callee.trailingComments)QJ(Z,X.callee.trailingComments);return Z}parseNoCallExpr(){const Z=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),Z,!0)}parseExprAtom(Z){let X,J=null;const{type:Q}=this.state;switch(Q){case 79:return this.parseSuper();case 83:if(X=this.startNode(),this.next(),this.match(16))return this.parseImportMetaProperty(X);if(this.match(10))if(this.options.createImportExpressions)return this.parseImportCall(X);else return this.finishNode(X,"Import");else return this.raise(q.UnsupportedImport,this.state.lastTokStartLoc),this.finishNode(X,"Import");case 78:return X=this.startNode(),this.next(),this.finishNode(X,"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:{const Y=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(Y)}case 2:case 1:return this.parseArrayLike(this.state.type===2?4:3,!1,!0);case 0:return this.parseArrayLike(3,!0,!1,Z);case 6:case 7:return this.parseObjectLike(this.state.type===6?9:8,!1,!0);case 5:return this.parseObjectLike(8,!1,!1,Z);case 68:return this.parseFunctionOrFunctionSent();case 26:J=this.parseDecorators();case 80:return this.parseClass(this.maybeTakeDecorators(J,this.startNode()),!1);case 77:return this.parseNewOrNewTarget();case 25:case 24:return this.parseTemplate(!1);case 15:{X=this.startNode(),this.next(),X.object=null;const Y=X.callee=this.parseNoCallExpr();if(Y.type==="MemberExpression")return this.finishNode(X,"BindExpression");else throw this.raise(q.UnsupportedBind,Y)}case 138:return this.raise(q.PrivateInExpectedIn,this.state.startLoc,{identifierName:this.state.value}),this.parsePrivateName();case 33:return this.parseTopicReferenceThenEqualsSign(54,"%");case 32:return this.parseTopicReferenceThenEqualsSign(44,"^");case 37:case 38:return this.parseTopicReference("hack");case 44:case 54:case 27:{const Y=this.getPluginOption("pipelineOperator","proposal");if(Y)return this.parseTopicReference(Y);this.unexpected();break}case 47:{const Y=this.input.codePointAt(this.nextTokenStart());if(b(Y)||Y===62)this.expectOnePlugin(["jsx","flow","typescript"]);else this.unexpected();break}default:if(v(Q)){if(this.isContextual(127)&&this.lookaheadInLineCharCode()===123)return this.parseModuleExpression();const Y=this.state.potentialArrowAt===this.state.start,V=this.state.containsEsc,W=this.parseIdentifier();if(!V&&W.name==="async"&&!this.canInsertSemicolon()){const{type:z}=this.state;if(z===68)return this.resetPreviousNodeTrailingComments(W),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(W));else if(v(z))if(this.lookaheadCharCode()===61)return this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(W));else return W;else if(z===90)return this.resetPreviousNodeTrailingComments(W),this.parseDo(this.startNodeAtNode(W),!0)}if(Y&&this.match(19)&&!this.canInsertSemicolon())return this.next(),this.parseArrowExpression(this.startNodeAtNode(W),[W],!1);return W}else this.unexpected()}}parseTopicReferenceThenEqualsSign(Z,X){const J=this.getPluginOption("pipelineOperator","proposal");if(J)return this.state.type=Z,this.state.value=X,this.state.pos--,this.state.end--,this.state.endLoc=w(this.state.endLoc,-1),this.parseTopicReference(J);else this.unexpected()}parseTopicReference(Z){const X=this.startNode(),J=this.state.startLoc,Q=this.state.type;return this.next(),this.finishTopicReference(X,J,Z,Q)}finishTopicReference(Z,X,J,Q){if(this.testTopicReferenceConfiguration(J,X,Q)){const Y=J==="smart"?"PipelinePrimaryTopicReference":"TopicReference";if(!this.topicReferenceIsAllowedInCurrentContext())this.raise(J==="smart"?q.PrimaryTopicNotAllowed:q.PipeTopicUnbound,X);return this.registerTopicReference(),this.finishNode(Z,Y)}else throw this.raise(q.PipeTopicUnconfiguredToken,X,{token:m(Q)})}testTopicReferenceConfiguration(Z,X,J){switch(Z){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:m(J)}]);case"smart":return J===27;default:throw this.raise(q.PipeTopicRequiresHackPipes,X)}}parseAsyncArrowUnaryFunction(Z){this.prodParam.enter(RJ(!0,this.prodParam.hasYield));const X=[this.parseIdentifier()];if(this.prodParam.exit(),this.hasPrecedingLineBreak())this.raise(q.LineTerminatorBeforeArrow,this.state.curPosition());return this.expect(19),this.parseArrowExpression(Z,X,!0)}parseDo(Z,X){if(this.expectPlugin("doExpressions"),X)this.expectPlugin("asyncDoExpressions");Z.async=X,this.next();const J=this.state.labels;if(this.state.labels=[],X)this.prodParam.enter(2),Z.body=this.parseBlock(),this.prodParam.exit();else Z.body=this.parseBlock();return this.state.labels=J,this.finishNode(Z,"DoExpression")}parseSuper(){const Z=this.startNode();if(this.next(),this.match(10)&&!this.scope.allowDirectSuper&&!this.options.allowSuperOutsideMethod)this.raise(q.SuperNotAllowed,Z);else if(!this.scope.allowSuper&&!this.options.allowSuperOutsideMethod)this.raise(q.UnexpectedSuper,Z);if(!this.match(10)&&!this.match(0)&&!this.match(16))this.raise(q.UnsupportedSuper,Z);return this.finishNode(Z,"Super")}parsePrivateName(){const Z=this.startNode(),X=this.startNodeAt(w(this.state.startLoc,1)),J=this.state.value;return this.next(),Z.id=this.createIdentifier(X,J),this.finishNode(Z,"PrivateName")}parseFunctionOrFunctionSent(){const Z=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(16)){const X=this.createIdentifier(this.startNodeAtNode(Z),"function");if(this.next(),this.match(103))this.expectPlugin("functionSent");else if(!this.hasPlugin("functionSent"))this.unexpected();return this.parseMetaProperty(Z,X,"sent")}return this.parseFunction(Z)}parseMetaProperty(Z,X,J){Z.meta=X;const Q=this.state.containsEsc;if(Z.property=this.parseIdentifier(!0),Z.property.name!==J||Q)this.raise(q.UnsupportedMetaProperty,Z.property,{target:X.name,onlyValidPropertyName:J});return this.finishNode(Z,"MetaProperty")}parseImportMetaProperty(Z){const X=this.createIdentifier(this.startNodeAtNode(Z),"import");if(this.next(),this.isContextual(101)){if(!this.inModule)this.raise(q.ImportMetaOutsideModule,X);this.sawUnambiguousESM=!0}else if(this.isContextual(105)||this.isContextual(97)){const J=this.isContextual(105);if(!J)this.unexpected();if(this.expectPlugin(J?"sourcePhaseImports":"deferredImportEvaluation"),!this.options.createImportExpressions)throw this.raise(q.DynamicImportPhaseRequiresImportExpressions,this.state.startLoc,{phase:this.state.value});return this.next(),Z.phase=J?"source":"defer",this.parseImportCall(Z)}return this.parseMetaProperty(Z,X,"meta")}parseLiteralAtNode(Z,X,J){return this.addExtra(J,"rawValue",Z),this.addExtra(J,"raw",this.input.slice(J.start,this.state.end)),J.value=Z,this.next(),this.finishNode(J,X)}parseLiteral(Z,X){const J=this.startNode();return this.parseLiteralAtNode(Z,X,J)}parseStringLiteral(Z){return this.parseLiteral(Z,"StringLiteral")}parseNumericLiteral(Z){return this.parseLiteral(Z,"NumericLiteral")}parseBigIntLiteral(Z){return this.parseLiteral(Z,"BigIntLiteral")}parseDecimalLiteral(Z){return this.parseLiteral(Z,"DecimalLiteral")}parseRegExpLiteral(Z){const X=this.startNode();return this.addExtra(X,"raw",this.input.slice(X.start,this.state.end)),X.pattern=Z.pattern,X.flags=Z.flags,this.next(),this.finishNode(X,"RegExpLiteral")}parseBooleanLiteral(Z){const X=this.startNode();return X.value=Z,this.next(),this.finishNode(X,"BooleanLiteral")}parseNullLiteral(){const Z=this.startNode();return this.next(),this.finishNode(Z,"NullLiteral")}parseParenAndDistinguishExpression(Z){const X=this.state.startLoc;let J;this.next(),this.expressionScope.enter(k0());const Q=this.state.maybeInArrowParameters,Y=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;const V=this.state.startLoc,W=[],z=new JJ;let U=!0,j,R;while(!this.match(11)){if(U)U=!1;else if(this.expect(12,z.optionalParametersLoc===null?null:z.optionalParametersLoc),this.match(11)){R=this.state.startLoc;break}if(this.match(21)){const F=this.state.startLoc;if(j=this.state.startLoc,W.push(this.parseParenItem(this.parseRestBinding(),F)),!this.checkCommaAfterRest(41))break}else W.push(this.parseMaybeAssignAllowIn(z,this.parseParenItem))}const H=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=Q,this.state.inFSharpPipelineDirectBody=Y;let K=this.startNodeAt(X);if(Z&&this.shouldParseArrow(W)&&(K=this.parseArrow(K)))return this.checkDestructuringPrivate(z),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(K,W,!1),K;if(this.expressionScope.exit(),!W.length)this.unexpected(this.state.lastTokStartLoc);if(R)this.unexpected(R);if(j)this.unexpected(j);if(this.checkExpressionErrors(z,!0),this.toReferencedListDeep(W,!0),W.length>1)J=this.startNodeAt(V),J.expressions=W,this.finishNode(J,"SequenceExpression"),this.resetEndLocation(J,H);else J=W[0];return this.wrapParenthesis(X,J)}wrapParenthesis(Z,X){if(!this.options.createParenthesizedExpressions)return this.addExtra(X,"parenthesized",!0),this.addExtra(X,"parenStart",Z.index),this.takeSurroundingComments(X,Z.index,this.state.lastTokEndLoc.index),X;const J=this.startNodeAt(Z);return J.expression=X,this.finishNode(J,"ParenthesizedExpression")}shouldParseArrow(Z){return!this.canInsertSemicolon()}parseArrow(Z){if(this.eat(19))return Z}parseParenItem(Z,X){return Z}parseNewOrNewTarget(){const Z=this.startNode();if(this.next(),this.match(16)){const X=this.createIdentifier(this.startNodeAtNode(Z),"new");this.next();const J=this.parseMetaProperty(Z,X,"target");if(!this.scope.inNonArrowFunction&&!this.scope.inClass&&!this.options.allowNewTargetOutsideFunction)this.raise(q.UnexpectedNewTarget,J);return J}return this.parseNew(Z)}parseNew(Z){if(this.parseNewCallee(Z),this.eat(10)){const X=this.parseExprList(11);this.toReferencedList(X),Z.arguments=X}else Z.arguments=[];return this.finishNode(Z,"NewExpression")}parseNewCallee(Z){const X=this.match(83),J=this.parseNoCallExpr();if(Z.callee=J,X&&(J.type==="Import"||J.type==="ImportExpression"))this.raise(q.ImportCallNotNewExpression,J)}parseTemplateElement(Z){const{start:X,startLoc:J,end:Q,value:Y}=this.state,V=X+1,W=this.startNodeAt(w(J,1));if(Y===null){if(!Z)this.raise(q.InvalidEscapeSequenceTemplate,w(this.state.firstInvalidTemplateEscapePos,1))}const z=this.match(24),U=z?-1:-2,j=Q+U;W.value={raw:this.input.slice(V,j).replace(/\r\n?/g,"\n"),cooked:Y===null?null:Y.slice(1,U)},W.tail=z,this.next();const R=this.finishNode(W,"TemplateElement");return this.resetEndLocation(R,w(this.state.lastTokEndLoc,U)),R}parseTemplate(Z){const X=this.startNode();let J=this.parseTemplateElement(Z);const Q=[J],Y=[];while(!J.tail)Y.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),Q.push(J=this.parseTemplateElement(Z));return X.expressions=Y,X.quasis=Q,this.finishNode(X,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(Z,X,J,Q){if(J)this.expectPlugin("recordAndTuple");const Y=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;const V=Object.create(null);let W=!0;const z=this.startNode();z.properties=[],this.next();while(!this.match(Z)){if(W)W=!1;else if(this.expect(12),this.match(Z)){this.addTrailingCommaExtraToNode(z);break}let j;if(X)j=this.parseBindingProperty();else j=this.parsePropertyDefinition(Q),this.checkProto(j,J,V,Q);if(J&&!this.isObjectProperty(j)&&j.type!=="SpreadElement")this.raise(q.InvalidRecordProperty,j);if(j.shorthand)this.addExtra(j,"shorthand",!0);z.properties.push(j)}this.next(),this.state.inFSharpPipelineDirectBody=Y;let U="ObjectExpression";if(X)U="ObjectPattern";else if(J)U="RecordExpression";return this.finishNode(z,U)}addTrailingCommaExtraToNode(Z){this.addExtra(Z,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(Z,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(Z){return!Z.computed&&Z.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(Z){let X=[];if(this.match(26)){if(this.hasPlugin("decorators"))this.raise(q.UnsupportedPropertyDecorator,this.state.startLoc);while(this.match(26))X.push(this.parseDecorator())}const J=this.startNode();let Q=!1,Y=!1,V;if(this.match(21)){if(X.length)this.unexpected();return this.parseSpread()}if(X.length)J.decorators=X,X=[];if(J.method=!1,Z)V=this.state.startLoc;let W=this.eat(55);this.parsePropertyNamePrefixOperator(J);const z=this.state.containsEsc;if(this.parsePropertyName(J,Z),!W&&!z&&this.maybeAsyncOrAccessorProp(J)){const{key:U}=J,j=U.name;if(j==="async"&&!this.hasPrecedingLineBreak())Q=!0,this.resetPreviousNodeTrailingComments(U),W=this.eat(55),this.parsePropertyName(J);if(j==="get"||j==="set"){if(Y=!0,this.resetPreviousNodeTrailingComments(U),J.kind=j,this.match(55))W=!0,this.raise(q.AccessorIsGenerator,this.state.curPosition(),{kind:j}),this.next();this.parsePropertyName(J)}}return this.parseObjPropValue(J,V,W,Q,!1,Y,Z)}getGetterSetterExpectedParamCount(Z){return Z.kind==="get"?0:1}getObjectOrClassMethodParams(Z){return Z.params}checkGetterSetterParams(Z){var X;const J=this.getGetterSetterExpectedParamCount(Z),Q=this.getObjectOrClassMethodParams(Z);if(Q.length!==J)this.raise(Z.kind==="get"?q.BadGetterArity:q.BadSetterArity,Z);if(Z.kind==="set"&&((X=Q[Q.length-1])==null?void 0:X.type)==="RestElement")this.raise(q.BadSetterRestParameter,Z)}parseObjectMethod(Z,X,J,Q,Y){if(Y){const V=this.parseMethod(Z,X,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(V),V}if(J||X||this.match(10)){if(Q)this.unexpected();return Z.kind="method",Z.method=!0,this.parseMethod(Z,X,J,!1,!1,"ObjectMethod")}}parseObjectProperty(Z,X,J,Q){if(Z.shorthand=!1,this.eat(14))return Z.value=J?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowIn(Q),this.finishNode(Z,"ObjectProperty");if(!Z.computed&&Z.key.type==="Identifier"){if(this.checkReservedWord(Z.key.name,Z.key.loc.start,!0,!1),J)Z.value=this.parseMaybeDefault(X,x(Z.key));else if(this.match(29)){const Y=this.state.startLoc;if(Q!=null){if(Q.shorthandAssignLoc===null)Q.shorthandAssignLoc=Y}else this.raise(q.InvalidCoverInitializedName,Y);Z.value=this.parseMaybeDefault(X,x(Z.key))}else Z.value=x(Z.key);return Z.shorthand=!0,this.finishNode(Z,"ObjectProperty")}}parseObjPropValue(Z,X,J,Q,Y,V,W){const z=this.parseObjectMethod(Z,J,Q,Y,V)||this.parseObjectProperty(Z,X,Y,W);if(!z)this.unexpected();return z}parsePropertyName(Z,X){if(this.eat(0))Z.computed=!0,Z.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{const{type:J,value:Q}=this.state;let Y;if(k(J))Y=this.parseIdentifier(!0);else switch(J){case 134:Y=this.parseNumericLiteral(Q);break;case 133:Y=this.parseStringLiteral(Q);break;case 135:Y=this.parseBigIntLiteral(Q);break;case 136:Y=this.parseDecimalLiteral(Q);break;case 138:{const V=this.state.startLoc;if(X!=null){if(X.privateKeyLoc===null)X.privateKeyLoc=V}else this.raise(q.UnexpectedPrivateField,V);Y=this.parsePrivateName();break}default:this.unexpected()}if(Z.key=Y,J!==138)Z.computed=!1}}initFunction(Z,X){Z.id=null,Z.generator=!1,Z.async=X}parseMethod(Z,X,J,Q,Y,V,W=!1){this.initFunction(Z,J),Z.generator=X,this.scope.enter(2|16|(W?64:0)|(Y?32:0)),this.prodParam.enter(RJ(J,Z.generator)),this.parseFunctionParams(Z,Q);const z=this.parseFunctionBodyAndFinish(Z,V,!0);return this.prodParam.exit(),this.scope.exit(),z}parseArrayLike(Z,X,J,Q){if(J)this.expectPlugin("recordAndTuple");const Y=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;const V=this.startNode();return this.next(),V.elements=this.parseExprList(Z,!J,Q,V),this.state.inFSharpPipelineDirectBody=Y,this.finishNode(V,J?"TupleExpression":"ArrayExpression")}parseArrowExpression(Z,X,J,Q){this.scope.enter(2|4);let Y=RJ(J,!1);if(!this.match(5)&&this.prodParam.hasIn)Y|=8;this.prodParam.enter(Y),this.initFunction(Z,J);const V=this.state.maybeInArrowParameters;if(X)this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(Z,X,Q);return this.state.maybeInArrowParameters=!1,this.parseFunctionBody(Z,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=V,this.finishNode(Z,"ArrowFunctionExpression")}setArrowFunctionParameters(Z,X,J){this.toAssignableList(X,J,!1),Z.params=X}parseFunctionBodyAndFinish(Z,X,J=!1){return this.parseFunctionBody(Z,!1,J),this.finishNode(Z,X)}parseFunctionBody(Z,X,J=!1){const Q=X&&!this.match(5);if(this.expressionScope.enter(DZ()),Q)Z.body=this.parseMaybeAssign(),this.checkParams(Z,!1,X,!1);else{const Y=this.state.strict,V=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|4),Z.body=this.parseBlock(!0,!1,(W)=>{const z=!this.isSimpleParamList(Z.params);if(W&&z)this.raise(q.IllegalLanguageModeDirective,(Z.kind==="method"||Z.kind==="constructor")&&!!Z.key?Z.key.loc.end:Z);const U=!Y&&this.state.strict;if(this.checkParams(Z,!this.state.strict&&!X&&!J&&!z,X,U),this.state.strict&&Z.id)this.checkIdentifier(Z.id,65,U)}),this.prodParam.exit(),this.state.labels=V}this.expressionScope.exit()}isSimpleParameter(Z){return Z.type==="Identifier"}isSimpleParamList(Z){for(let X=0,J=Z.length;X<J;X++)if(!this.isSimpleParameter(Z[X]))return!1;return!0}checkParams(Z,X,J,Q=!0){const Y=!X&&new Set,V={type:"FormalParameters"};for(let W of Z.params)this.checkLVal(W,V,5,Y,Q)}parseExprList(Z,X,J,Q){const Y=[];let V=!0;while(!this.eat(Z)){if(V)V=!1;else if(this.expect(12),this.match(Z)){if(Q)this.addTrailingCommaExtraToNode(Q);this.next();break}Y.push(this.parseExprListItem(X,J))}return Y}parseExprListItem(Z,X,J){let Q;if(this.match(12)){if(!Z)this.raise(q.UnexpectedToken,this.state.curPosition(),{unexpected:","});Q=null}else if(this.match(21)){const Y=this.state.startLoc;Q=this.parseParenItem(this.parseSpread(X),Y)}else if(this.match(17)){if(this.expectPlugin("partialApplication"),!J)this.raise(q.UnexpectedArgumentPlaceholder,this.state.startLoc);const Y=this.startNode();this.next(),Q=this.finishNode(Y,"ArgumentPlaceholder")}else Q=this.parseMaybeAssignAllowIn(X,this.parseParenItem);return Q}parseIdentifier(Z){const X=this.startNode(),J=this.parseIdentifierName(Z);return this.createIdentifier(X,J)}createIdentifier(Z,X){return Z.name=X,Z.loc.identifierName=X,this.finishNode(Z,"Identifier")}parseIdentifierName(Z){let X;const{startLoc:J,type:Q}=this.state;if(k(Q))X=this.state.value;else this.unexpected();const Y=X0(Q);if(Z){if(Y)this.replaceToken(132)}else this.checkReservedWord(X,J,Y,!1);return this.next(),X}checkReservedWord(Z,X,J,Q){if(Z.length>10)return;if(!N0(Z))return;if(J&&B0(Z)){this.raise(q.UnexpectedKeyword,X,{keyword:Z});return}if((!this.state.strict?VZ:Q?jZ:WZ)(Z,this.inModule)){this.raise(q.UnexpectedReservedWord,X,{reservedWord:Z});return}else if(Z==="yield"){if(this.prodParam.hasYield){this.raise(q.YieldBindingIdentifier,X);return}}else if(Z==="await"){if(this.prodParam.hasAwait){this.raise(q.AwaitBindingIdentifier,X);return}if(this.scope.inStaticBlock){this.raise(q.AwaitBindingIdentifierInStaticBlock,X);return}this.expressionScope.recordAsyncArrowParametersError(X)}else if(Z==="arguments"){if(this.scope.inClassAndNotInNonArrowFunction){this.raise(q.ArgumentsInClass,X);return}}}recordAwaitIfAllowed(){const Z=this.prodParam.hasAwait||this.options.allowAwaitOutsideFunction&&!this.scope.inFunction;if(Z&&!this.scope.inFunction)this.state.hasTopLevelAwait=!0;return Z}parseAwait(Z){const X=this.startNodeAt(Z);if(this.expressionScope.recordParameterInitializerError(q.AwaitExpressionFormalParameter,X),this.eat(55))this.raise(q.ObsoleteAwaitStar,X);if(!this.scope.inFunction&&!this.options.allowAwaitOutsideFunction)if(this.isAmbiguousAwait())this.ambiguousScriptDifferentAst=!0;else this.sawUnambiguousESM=!0;if(!this.state.soloAwait)X.argument=this.parseMaybeUnary(null,!0);return this.finishNode(X,"AwaitExpression")}isAmbiguousAwait(){if(this.hasPrecedingLineBreak())return!0;const{type:Z}=this.state;return Z===53||Z===10||Z===0||HJ(Z)||Z===102&&!this.state.containsEsc||Z===137||Z===56||this.hasPlugin("v8intrinsic")&&Z===54}parseYield(){const Z=this.startNode();this.expressionScope.recordParameterInitializerError(q.YieldInParameter,Z),this.next();let X=!1,J=null;if(!this.hasPrecedingLineBreak())switch(X=this.eat(55),this.state.type){case 13:case 139:case 8:case 11:case 3:case 9:case 14:case 12:if(!X)break;default:J=this.parseMaybeAssign()}return Z.delegate=X,Z.argument=J,this.finishNode(Z,"YieldExpression")}parseImportCall(Z){if(this.next(),Z.source=this.parseMaybeAssignAllowIn(),this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))Z.options=null;if(this.eat(12)){if(this.expectImportAttributesPlugin(),!this.match(11))Z.options=this.parseMaybeAssignAllowIn(),this.eat(12)}return this.expect(11),this.finishNode(Z,"ImportExpression")}checkPipelineAtInfixOperator(Z,X){if(this.hasPlugin(["pipelineOperator",{proposal:"smart"}])){if(Z.type==="SequenceExpression")this.raise(q.PipelineHeadSequenceExpression,X)}}parseSmartPipelineBodyInStyle(Z,X){if(this.isSimpleReference(Z)){const J=this.startNodeAt(X);return J.callee=Z,this.finishNode(J,"PipelineBareFunction")}else{const J=this.startNodeAt(X);return this.checkSmartPipeTopicBodyEarlyErrors(X),J.expression=Z,this.finishNode(J,"PipelineTopicExpression")}}isSimpleReference(Z){switch(Z.type){case"MemberExpression":return!Z.computed&&this.isSimpleReference(Z.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(Z){if(this.match(19))throw this.raise(q.PipelineBodyNoArrow,this.state.startLoc);if(!this.topicReferenceWasUsedInCurrentContext())this.raise(q.PipelineTopicUnused,Z)}withTopicBindingContext(Z){const X=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return Z()}finally{this.state.topicContext=X}}withSmartMixTopicForbiddingContext(Z){if(this.hasPlugin(["pipelineOperator",{proposal:"smart"}])){const X=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return Z()}finally{this.state.topicContext=X}}else return Z()}withSoloAwaitPermittingContext(Z){const X=this.state.soloAwait;this.state.soloAwait=!0;try{return Z()}finally{this.state.soloAwait=X}}allowInAnd(Z){const X=this.prodParam.currentFlags();if(8&~X){this.prodParam.enter(X|8);try{return Z()}finally{this.prodParam.exit()}}return Z()}disallowInAnd(Z){const X=this.prodParam.currentFlags();if(8&X){this.prodParam.enter(X&~8);try{return Z()}finally{this.prodParam.exit()}}return Z()}registerTopicReference(){this.state.topicContext.maxTopicIndex=0}topicReferenceIsAllowedInCurrentContext(){return this.state.topicContext.maxNumOfResolvableTopics>=1}topicReferenceWasUsedInCurrentContext(){return this.state.topicContext.maxTopicIndex!=null&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(Z){const X=this.state.startLoc;this.state.potentialArrowAt=this.state.start;const J=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;const Q=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),X,Z);return this.state.inFSharpPipelineDirectBody=J,Q}parseModuleExpression(){this.expectPlugin("moduleBlocks");const Z=this.startNode();if(this.next(),!this.match(5))this.unexpected(null,5);const X=this.startNodeAt(this.state.endLoc);this.next();const J=this.initializeScopes(!0);this.enterInitialScopes();try{Z.body=this.parseProgram(X,8,"module")}finally{J()}return this.finishNode(Z,"ModuleExpression")}parsePropertyNamePrefixOperator(Z){}}var DJ={kind:1},Z1={kind:2},Q1=/[\uD800-\uDFFF]/u,CJ=/in(?:stanceof)?/y;class LZ extends kZ{parseTopLevel(Z,X){if(Z.program=this.parseProgram(X),Z.comments=this.comments,this.options.tokens)Z.tokens=X1(this.tokens,this.input);return this.finishNode(Z,"File")}parseProgram(Z,X=139,J=this.options.sourceType){if(Z.sourceType=J,Z.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(Z,!0,!0,X),this.inModule){if(!this.options.allowUndeclaredExports&&this.scope.undefinedExports.size>0)for(let[Y,V]of Array.from(this.scope.undefinedExports))this.raise(q.ModuleExportUndefined,V,{localName:Y});this.addExtra(Z,"topLevelAwait",this.state.hasTopLevelAwait)}let Q;if(X===139)Q=this.finishNode(Z,"Program");else Q=this.finishNodeAt(Z,"Program",w(this.state.startLoc,-1));return Q}stmtToDirective(Z){const X=Z;X.type="Directive",X.value=X.expression,delete X.expression;const J=X.value,Q=J.value,Y=this.input.slice(J.start,J.end),V=J.value=Y.slice(1,-1);return this.addExtra(J,"raw",Y),this.addExtra(J,"rawValue",V),this.addExtra(J,"expressionValue",Q),J.type="DirectiveLiteral",X}parseInterpreterDirective(){if(!this.match(28))return null;const Z=this.startNode();return Z.value=this.state.value,this.next(),this.finishNode(Z,"InterpreterDirective")}isLet(){if(!this.isContextual(100))return!1;return this.hasFollowingBindingAtom()}chStartsBindingIdentifier(Z,X){if(b(Z)){if(CJ.lastIndex=X,CJ.test(this.input)){const J=this.codePointAtPos(CJ.lastIndex);if(!i(J)&&J!==92)return!1}return!0}else if(Z===92)return!0;else return!1}chStartsBindingPattern(Z){return Z===91||Z===123}hasFollowingBindingAtom(){const Z=this.nextTokenStart(),X=this.codePointAtPos(Z);return this.chStartsBindingPattern(X)||this.chStartsBindingIdentifier(X,Z)}hasInLineFollowingBindingIdentifierOrBrace(){const Z=this.nextTokenInLineStart(),X=this.codePointAtPos(Z);return X===123||this.chStartsBindingIdentifier(X,Z)}startsUsingForOf(){const{type:Z,containsEsc:X}=this.lookahead();if(Z===102&&!X)return!1;else if(v(Z)&&!this.hasFollowingLineBreak())return this.expectPlugin("explicitResourceManagement"),!0}startsAwaitUsing(){let Z=this.nextTokenInLineStart();if(this.isUnparsedContextual(Z,"using")){Z=this.nextTokenInLineStartSince(Z+5);const X=this.codePointAtPos(Z);if(this.chStartsBindingIdentifier(X,Z))return this.expectPlugin("explicitResourceManagement"),!0}return!1}parseModuleItem(){return this.parseStatementLike(1|2|4|8)}parseStatementListItem(){return this.parseStatementLike(2|4|(!this.options.annexB||this.state.strict?0:8))}parseStatementOrSloppyAnnexBFunctionDeclaration(Z=!1){let X=0;if(this.options.annexB&&!this.state.strict){if(X|=4,Z)X|=8}return this.parseStatementLike(X)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(Z){let X=null;if(this.match(26))X=this.parseDecorators(!0);return this.parseStatementContent(Z,X)}parseStatementContent(Z,X){const J=this.state.type,Q=this.startNode(),Y=!!(Z&2),V=!!(Z&4),W=Z&1;switch(J){case 60:return this.parseBreakContinueStatement(Q,!0);case 63:return this.parseBreakContinueStatement(Q,!1);case 64:return this.parseDebuggerStatement(Q);case 90:return this.parseDoWhileStatement(Q);case 91:return this.parseForStatement(Q);case 68:if(this.lookaheadCharCode()===46)break;if(!V)this.raise(this.state.strict?q.StrictFunction:this.options.annexB?q.SloppyFunctionAnnexB:q.SloppyFunction,this.state.startLoc);return this.parseFunctionStatement(Q,!1,!Y&&V);case 80:if(!Y)this.unexpected();return this.parseClass(this.maybeTakeDecorators(X,Q),!0);case 69:return this.parseIfStatement(Q);case 70:return this.parseReturnStatement(Q);case 71:return this.parseSwitchStatement(Q);case 72:return this.parseThrowStatement(Q);case 73:return this.parseTryStatement(Q);case 96:if(!this.state.containsEsc&&this.startsAwaitUsing()){if(!this.recordAwaitIfAllowed())this.raise(q.AwaitUsingNotInAsyncContext,Q);else if(!Y)this.raise(q.UnexpectedLexicalDeclaration,Q);return this.next(),this.parseVarStatement(Q,"await using")}break;case 107:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifierOrBrace())break;if(this.expectPlugin("explicitResourceManagement"),!this.scope.inModule&&this.scope.inTopLevel)this.raise(q.UnexpectedUsingDeclaration,this.state.startLoc);else if(!Y)this.raise(q.UnexpectedLexicalDeclaration,this.state.startLoc);return this.parseVarStatement(Q,"using");case 100:{if(this.state.containsEsc)break;const j=this.nextTokenStart(),R=this.codePointAtPos(j);if(R!==91){if(!Y&&this.hasFollowingLineBreak())break;if(!this.chStartsBindingIdentifier(R,j)&&R!==123)break}}case 75:if(!Y)this.raise(q.UnexpectedLexicalDeclaration,this.state.startLoc);case 74:{const j=this.state.value;return this.parseVarStatement(Q,j)}case 92:return this.parseWhileStatement(Q);case 76:return this.parseWithStatement(Q);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(Q);case 83:{const j=this.lookaheadCharCode();if(j===40||j===46)break}case 82:{if(!this.options.allowImportExportEverywhere&&!W)this.raise(q.UnexpectedImportExport,this.state.startLoc);this.next();let j;if(J===83){if(j=this.parseImport(Q),j.type==="ImportDeclaration"&&(!j.importKind||j.importKind==="value"))this.sawUnambiguousESM=!0}else if(j=this.parseExport(Q,X),j.type==="ExportNamedDeclaration"&&(!j.exportKind||j.exportKind==="value")||j.type==="ExportAllDeclaration"&&(!j.exportKind||j.exportKind==="value")||j.type==="ExportDefaultDeclaration")this.sawUnambiguousESM=!0;return this.assertModuleNodeAllowed(j),j}default:if(this.isAsyncFunction()){if(!Y)this.raise(q.AsyncFunctionInSingleStatementContext,this.state.startLoc);return this.next(),this.parseFunctionStatement(Q,!0,!Y&&V)}}const z=this.state.value,U=this.parseExpression();if(v(J)&&U.type==="Identifier"&&this.eat(14))return this.parseLabeledStatement(Q,z,U,Z);else return this.parseExpressionStatement(Q,U,X)}assertModuleNodeAllowed(Z){if(!this.options.allowImportExportEverywhere&&!this.inModule)this.raise(q.ImportOutsideModule,Z)}decoratorsEnabledBeforeExport(){if(this.hasPlugin("decorators-legacy"))return!0;return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")!==!1}maybeTakeDecorators(Z,X,J){if(Z){if(X.decorators&&X.decorators.length>0){if(typeof this.getPluginOption("decorators","decoratorsBeforeExport")!=="boolean")this.raise(q.DecoratorsBeforeAfterExport,X.decorators[0]);X.decorators.unshift(...Z)}else X.decorators=Z;if(this.resetStartLocationFromNode(X,Z[0]),J)this.resetStartLocationFromNode(J,X)}return X}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(Z){const X=[];do X.push(this.parseDecorator());while(this.match(26));if(this.match(82)){if(!Z)this.unexpected();if(!this.decoratorsEnabledBeforeExport())this.raise(q.DecoratorExportClass,this.state.startLoc)}else if(!this.canHaveLeadingDecorator())throw this.raise(q.UnexpectedLeadingDecorator,this.state.startLoc);return X}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);const Z=this.startNode();if(this.next(),this.hasPlugin("decorators")){const X=this.state.startLoc;let J;if(this.match(10)){const Q=this.state.startLoc;this.next(),J=this.parseExpression(),this.expect(11),J=this.wrapParenthesis(Q,J);const Y=this.state.startLoc;if(Z.expression=this.parseMaybeDecoratorArguments(J),this.getPluginOption("decorators","allowCallParenthesized")===!1&&Z.expression!==J)this.raise(q.DecoratorArgumentsOutsideParentheses,Y)}else{J=this.parseIdentifier(!1);while(this.eat(16)){const Q=this.startNodeAt(X);if(Q.object=J,this.match(138))this.classScope.usePrivateName(this.state.value,this.state.startLoc),Q.property=this.parsePrivateName();else Q.property=this.parseIdentifier(!0);Q.computed=!1,J=this.finishNode(Q,"MemberExpression")}Z.expression=this.parseMaybeDecoratorArguments(J)}}else Z.expression=this.parseExprSubscripts();return this.finishNode(Z,"Decorator")}parseMaybeDecoratorArguments(Z){if(this.eat(10)){const X=this.startNodeAtNode(Z);return X.callee=Z,X.arguments=this.parseCallExpressionArguments(11,!1),this.toReferencedList(X.arguments),this.finishNode(X,"CallExpression")}return Z}parseBreakContinueStatement(Z,X){if(this.next(),this.isLineTerminator())Z.label=null;else Z.label=this.parseIdentifier(),this.semicolon();return this.verifyBreakContinue(Z,X),this.finishNode(Z,X?"BreakStatement":"ContinueStatement")}verifyBreakContinue(Z,X){let J;for(J=0;J<this.state.labels.length;++J){const Q=this.state.labels[J];if(Z.label==null||Q.name===Z.label.name){if(Q.kind!=null&&(X||Q.kind===1))break;if(Z.label&&X)break}}if(J===this.state.labels.length){const Q=X?"BreakStatement":"ContinueStatement";this.raise(q.IllegalBreakContinue,Z,{type:Q})}}parseDebuggerStatement(Z){return this.next(),this.semicolon(),this.finishNode(Z,"DebuggerStatement")}parseHeaderExpression(){this.expect(10);const Z=this.parseExpression();return this.expect(11),Z}parseDoWhileStatement(Z){return this.next(),this.state.labels.push(DJ),Z.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.expect(92),Z.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(Z,"DoWhileStatement")}parseForStatement(Z){this.next(),this.state.labels.push(DJ);let X=null;if(this.isContextual(96)&&this.recordAwaitIfAllowed())X=this.state.startLoc,this.next();if(this.scope.enter(0),this.expect(10),this.match(13)){if(X!==null)this.unexpected(X);return this.parseFor(Z,null)}const J=this.isContextual(100);{const z=this.isContextual(96)&&this.startsAwaitUsing(),U=z||this.isContextual(107)&&this.startsUsingForOf(),j=J&&this.hasFollowingBindingAtom()||U;if(this.match(74)||this.match(75)||j){const R=this.startNode();let H;if(z){if(H="await using",!this.recordAwaitIfAllowed())this.raise(q.AwaitUsingNotInAsyncContext,this.state.startLoc);this.next()}else H=this.state.value;this.next(),this.parseVar(R,!0,H);const K=this.finishNode(R,"VariableDeclaration"),F=this.match(58);if(F&&U)this.raise(q.ForInUsing,K);if((F||this.isContextual(102))&&K.declarations.length===1)return this.parseForIn(Z,K,X);if(X!==null)this.unexpected(X);return this.parseFor(Z,K)}}const Q=this.isContextual(95),Y=new JJ,V=this.parseExpression(!0,Y),W=this.isContextual(102);if(W){if(J)this.raise(q.ForOfLet,V);if(X===null&&Q&&V.type==="Identifier")this.raise(q.ForOfAsync,V)}if(W||this.match(58)){this.checkDestructuringPrivate(Y),this.toAssignable(V,!0);const z=W?"ForOfStatement":"ForInStatement";return this.checkLVal(V,{type:z}),this.parseForIn(Z,V,X)}else this.checkExpressionErrors(Y,!0);if(X!==null)this.unexpected(X);return this.parseFor(Z,V)}parseFunctionStatement(Z,X,J){return this.next(),this.parseFunction(Z,1|(J?2:0)|(X?8:0))}parseIfStatement(Z){return this.next(),Z.test=this.parseHeaderExpression(),Z.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),Z.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(Z,"IfStatement")}parseReturnStatement(Z){if(!this.prodParam.hasReturn&&!this.options.allowReturnOutsideFunction)this.raise(q.IllegalReturn,this.state.startLoc);if(this.next(),this.isLineTerminator())Z.argument=null;else Z.argument=this.parseExpression(),this.semicolon();return this.finishNode(Z,"ReturnStatement")}parseSwitchStatement(Z){this.next(),Z.discriminant=this.parseHeaderExpression();const X=Z.cases=[];this.expect(5),this.state.labels.push(Z1),this.scope.enter(0);let J;for(let Q;!this.match(8);)if(this.match(61)||this.match(65)){const Y=this.match(61);if(J)this.finishNode(J,"SwitchCase");if(X.push(J=this.startNode()),J.consequent=[],this.next(),Y)J.test=this.parseExpression();else{if(Q)this.raise(q.MultipleDefaultsInSwitch,this.state.lastTokStartLoc);Q=!0,J.test=null}this.expect(14)}else if(J)J.consequent.push(this.parseStatementListItem());else this.unexpected();if(this.scope.exit(),J)this.finishNode(J,"SwitchCase");return this.next(),this.state.labels.pop(),this.finishNode(Z,"SwitchStatement")}parseThrowStatement(Z){if(this.next(),this.hasPrecedingLineBreak())this.raise(q.NewlineAfterThrow,this.state.lastTokEndLoc);return Z.argument=this.parseExpression(),this.semicolon(),this.finishNode(Z,"ThrowStatement")}parseCatchClauseParam(){const Z=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&Z.type==="Identifier"?8:0),this.checkLVal(Z,{type:"CatchClause"},9),Z}parseTryStatement(Z){if(this.next(),Z.block=this.parseBlock(),Z.handler=null,this.match(62)){const X=this.startNode();if(this.next(),this.match(10))this.expect(10),X.param=this.parseCatchClauseParam(),this.expect(11);else X.param=null,this.scope.enter(0);X.body=this.withSmartMixTopicForbiddingContext(()=>this.parseBlock(!1,!1)),this.scope.exit(),Z.handler=this.finishNode(X,"CatchClause")}if(Z.finalizer=this.eat(67)?this.parseBlock():null,!Z.handler&&!Z.finalizer)this.raise(q.NoCatchOrFinally,Z);return this.finishNode(Z,"TryStatement")}parseVarStatement(Z,X,J=!1){return this.next(),this.parseVar(Z,!1,X,J),this.semicolon(),this.finishNode(Z,"VariableDeclaration")}parseWhileStatement(Z){return this.next(),Z.test=this.parseHeaderExpression(),this.state.labels.push(DJ),Z.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.finishNode(Z,"WhileStatement")}parseWithStatement(Z){if(this.state.strict)this.raise(q.StrictWith,this.state.startLoc);return this.next(),Z.object=this.parseHeaderExpression(),Z.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.finishNode(Z,"WithStatement")}parseEmptyStatement(Z){return this.next(),this.finishNode(Z,"EmptyStatement")}parseLabeledStatement(Z,X,J,Q){for(let V of this.state.labels)if(V.name===X)this.raise(q.LabelRedeclaration,J,{labelName:X});const Y=W0(this.state.type)?1:this.match(71)?2:null;for(let V=this.state.labels.length-1;V>=0;V--){const W=this.state.labels[V];if(W.statementStart===Z.start)W.statementStart=this.state.start,W.kind=Y;else break}return this.state.labels.push({name:X,kind:Y,statementStart:this.state.start}),Z.body=Q&8?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),Z.label=J,this.finishNode(Z,"LabeledStatement")}parseExpressionStatement(Z,X,J){return Z.expression=X,this.semicolon(),this.finishNode(Z,"ExpressionStatement")}parseBlock(Z=!1,X=!0,J){const Q=this.startNode();if(Z)this.state.strictErrors.clear();if(this.expect(5),X)this.scope.enter(0);if(this.parseBlockBody(Q,Z,!1,8,J),X)this.scope.exit();return this.finishNode(Q,"BlockStatement")}isValidDirective(Z){return Z.type==="ExpressionStatement"&&Z.expression.type==="StringLiteral"&&!Z.expression.extra.parenthesized}parseBlockBody(Z,X,J,Q,Y){const V=Z.body=[],W=Z.directives=[];this.parseBlockOrModuleBlockBody(V,X?W:void 0,J,Q,Y)}parseBlockOrModuleBlockBody(Z,X,J,Q,Y){const V=this.state.strict;let W=!1,z=!1;while(!this.match(Q)){const U=J?this.parseModuleItem():this.parseStatementListItem();if(X&&!z){if(this.isValidDirective(U)){const j=this.stmtToDirective(U);if(X.push(j),!W&&j.value.value==="use strict")W=!0,this.setStrict(!0);continue}z=!0,this.state.strictErrors.clear()}Z.push(U)}if(Y==null||Y.call(this,W),!V)this.setStrict(!1);this.next()}parseFor(Z,X){return Z.init=X,this.semicolon(!1),Z.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),Z.update=this.match(11)?null:this.parseExpression(),this.expect(11),Z.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(Z,"ForStatement")}parseForIn(Z,X,J){const Q=this.match(58);if(this.next(),Q){if(J!==null)this.unexpected(J)}else Z.await=J!==null;if(X.type==="VariableDeclaration"&&X.declarations[0].init!=null&&(!Q||!this.options.annexB||this.state.strict||X.kind!=="var"||X.declarations[0].id.type!=="Identifier"))this.raise(q.ForInOfLoopInitializer,X,{type:Q?"ForInStatement":"ForOfStatement"});if(X.type==="AssignmentPattern")this.raise(q.InvalidLhs,X,{ancestor:{type:"ForStatement"}});return Z.left=X,Z.right=Q?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),Z.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(Z,Q?"ForInStatement":"ForOfStatement")}parseVar(Z,X,J,Q=!1){const Y=Z.declarations=[];Z.kind=J;for(;;){const V=this.startNode();if(this.parseVarId(V,J),V.init=!this.eat(29)?null:X?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn(),V.init===null&&!Q){if(V.id.type!=="Identifier"&&!(X&&(this.match(58)||this.isContextual(102))))this.raise(q.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"destructuring"});else if((J==="const"||J==="using"||J==="await using")&&!(this.match(58)||this.isContextual(102)))this.raise(q.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:J})}if(Y.push(this.finishNode(V,"VariableDeclarator")),!this.eat(12))break}return Z}parseVarId(Z,X){const J=this.parseBindingAtom();if(X==="using"||X==="await using"){if(J.type==="ArrayPattern"||J.type==="ObjectPattern")this.raise(q.UsingDeclarationHasBindingPattern,J.loc.start)}this.checkLVal(J,{type:"VariableDeclarator"},X==="var"?5:8201),Z.id=J}parseAsyncFunctionExpression(Z){return this.parseFunction(Z,8)}parseFunction(Z,X=0){const J=X&2,Q=!!(X&1),Y=Q&&!(X&4),V=!!(X&8);if(this.initFunction(Z,V),this.match(55)){if(J)this.raise(q.GeneratorInSingleStatementContext,this.state.startLoc);this.next(),Z.generator=!0}if(Q)Z.id=this.parseFunctionId(Y);const W=this.state.maybeInArrowParameters;if(this.state.maybeInArrowParameters=!1,this.scope.enter(2),this.prodParam.enter(RJ(V,Z.generator)),!Q)Z.id=this.parseFunctionId();if(this.parseFunctionParams(Z,!1),this.withSmartMixTopicForbiddingContext(()=>{this.parseFunctionBodyAndFinish(Z,Q?"FunctionDeclaration":"FunctionExpression")}),this.prodParam.exit(),this.scope.exit(),Q&&!J)this.registerFunctionStatementId(Z);return this.state.maybeInArrowParameters=W,Z}parseFunctionId(Z){return Z||v(this.state.type)?this.parseIdentifier():null}parseFunctionParams(Z,X){this.expect(10),this.expressionScope.enter(w0()),Z.params=this.parseBindingList(11,41,2|(X?4:0)),this.expressionScope.exit()}registerFunctionStatementId(Z){if(!Z.id)return;this.scope.declareName(Z.id.name,!this.options.annexB||this.state.strict||Z.generator||Z.async?this.scope.treatFunctionsAsVar?5:8201:17,Z.id.loc.start)}parseClass(Z,X,J){this.next();const Q=this.state.strict;return this.state.strict=!0,this.parseClassId(Z,X,J),this.parseClassSuper(Z),Z.body=this.parseClassBody(!!Z.superClass,Q),this.finishNode(Z,X?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}nameIsConstructor(Z){return Z.type==="Identifier"&&Z.name==="constructor"||Z.type==="StringLiteral"&&Z.value==="constructor"}isNonstaticConstructor(Z){return!Z.computed&&!Z.static&&this.nameIsConstructor(Z.key)}parseClassBody(Z,X){this.classScope.enter();const J={hadConstructor:!1,hadSuperClass:Z};let Q=[];const Y=this.startNode();if(Y.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext(()=>{while(!this.match(8)){if(this.eat(13)){if(Q.length>0)throw this.raise(q.DecoratorSemicolon,this.state.lastTokEndLoc);continue}if(this.match(26)){Q.push(this.parseDecorator());continue}const V=this.startNode();if(Q.length)V.decorators=Q,this.resetStartLocationFromNode(V,Q[0]),Q=[];if(this.parseClassMember(Y,V,J),V.kind==="constructor"&&V.decorators&&V.decorators.length>0)this.raise(q.DecoratorConstructor,V)}}),this.state.strict=X,this.next(),Q.length)throw this.raise(q.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(Y,"ClassBody")}parseClassMemberFromModifier(Z,X){const J=this.parseIdentifier(!0);if(this.isClassMethod()){const Q=X;return Q.kind="method",Q.computed=!1,Q.key=J,Q.static=!1,this.pushClassMethod(Z,Q,!1,!1,!1,!1),!0}else if(this.isClassProperty()){const Q=X;return Q.computed=!1,Q.key=J,Q.static=!1,Z.body.push(this.parseClassProperty(Q)),!0}return this.resetPreviousNodeTrailingComments(J),!1}parseClassMember(Z,X,J){const Q=this.isContextual(106);if(Q){if(this.parseClassMemberFromModifier(Z,X))return;if(this.eat(5)){this.parseClassStaticBlock(Z,X);return}}this.parseClassMemberWithIsStatic(Z,X,J,Q)}parseClassMemberWithIsStatic(Z,X,J,Q){const Y=X,V=X,W=X,z=X,U=X,j=Y,R=Y;if(X.static=Q,this.parsePropertyNamePrefixOperator(X),this.eat(55)){j.kind="method";const M=this.match(138);if(this.parseClassElementName(j),M){this.pushClassPrivateMethod(Z,V,!0,!1);return}if(this.isNonstaticConstructor(Y))this.raise(q.ConstructorIsGenerator,Y.key);this.pushClassMethod(Z,Y,!0,!1,!1,!1);return}const H=!this.state.containsEsc&&v(this.state.type),K=this.parseClassElementName(X),F=H?K.name:null,B=this.isPrivateName(K),A=this.state.startLoc;if(this.parsePostMemberNameModifiers(R),this.isClassMethod()){if(j.kind="method",B){this.pushClassPrivateMethod(Z,V,!1,!1);return}const M=this.isNonstaticConstructor(Y);let I=!1;if(M){if(Y.kind="constructor",J.hadConstructor&&!this.hasPlugin("typescript"))this.raise(q.DuplicateConstructor,K);if(M&&this.hasPlugin("typescript")&&X.override)this.raise(q.OverrideOnConstructor,K);J.hadConstructor=!0,I=J.hadSuperClass}this.pushClassMethod(Z,Y,!1,!1,M,I)}else if(this.isClassProperty())if(B)this.pushClassPrivateProperty(Z,z);else this.pushClassProperty(Z,W);else if(F==="async"&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(K);const M=this.eat(55);if(R.optional)this.unexpected(A);j.kind="method";const I=this.match(138);if(this.parseClassElementName(j),this.parsePostMemberNameModifiers(R),I)this.pushClassPrivateMethod(Z,V,M,!0);else{if(this.isNonstaticConstructor(Y))this.raise(q.ConstructorIsAsync,Y.key);this.pushClassMethod(Z,Y,M,!0,!1,!1)}}else if((F==="get"||F==="set")&&!(this.match(55)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(K),j.kind=F;const M=this.match(138);if(this.parseClassElementName(Y),M)this.pushClassPrivateMethod(Z,V,!1,!1);else{if(this.isNonstaticConstructor(Y))this.raise(q.ConstructorIsAccessor,Y.key);this.pushClassMethod(Z,Y,!1,!1,!1,!1)}this.checkGetterSetterParams(Y)}else if(F==="accessor"&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(K);const M=this.match(138);this.parseClassElementName(W),this.pushClassAccessorProperty(Z,U,M)}else if(this.isLineTerminator())if(B)this.pushClassPrivateProperty(Z,z);else this.pushClassProperty(Z,W);else this.unexpected()}parseClassElementName(Z){const{type:X,value:J}=this.state;if((X===132||X===133)&&Z.static&&J==="prototype")this.raise(q.StaticPrototype,this.state.startLoc);if(X===138){if(J==="constructor")this.raise(q.ConstructorClassPrivateField,this.state.startLoc);const Q=this.parsePrivateName();return Z.key=Q,Q}return this.parsePropertyName(Z),Z.key}parseClassStaticBlock(Z,X){var J;this.scope.enter(64|128|16);const Q=this.state.labels;this.state.labels=[],this.prodParam.enter(0);const Y=X.body=[];if(this.parseBlockOrModuleBlockBody(Y,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=Q,Z.body.push(this.finishNode(X,"StaticBlock")),(J=X.decorators)!=null&&J.length)this.raise(q.DecoratorStaticBlock,X)}pushClassProperty(Z,X){if(!X.computed&&this.nameIsConstructor(X.key))this.raise(q.ConstructorClassField,X.key);Z.body.push(this.parseClassProperty(X))}pushClassPrivateProperty(Z,X){const J=this.parseClassPrivateProperty(X);Z.body.push(J),this.classScope.declarePrivateName(this.getPrivateNameSV(J.key),0,J.key.loc.start)}pushClassAccessorProperty(Z,X,J){if(!J&&!X.computed&&this.nameIsConstructor(X.key))this.raise(q.ConstructorClassField,X.key);const Q=this.parseClassAccessorProperty(X);if(Z.body.push(Q),J)this.classScope.declarePrivateName(this.getPrivateNameSV(Q.key),0,Q.key.loc.start)}pushClassMethod(Z,X,J,Q,Y,V){Z.body.push(this.parseMethod(X,J,Q,Y,V,"ClassMethod",!0))}pushClassPrivateMethod(Z,X,J,Q){const Y=this.parseMethod(X,J,Q,!1,!1,"ClassPrivateMethod",!0);Z.body.push(Y);const V=Y.kind==="get"?Y.static?6:2:Y.kind==="set"?Y.static?5:1:0;this.declareClassPrivateMethodInScope(Y,V)}declareClassPrivateMethodInScope(Z,X){this.classScope.declarePrivateName(this.getPrivateNameSV(Z.key),X,Z.key.loc.start)}parsePostMemberNameModifiers(Z){}parseClassPrivateProperty(Z){return this.parseInitializer(Z),this.semicolon(),this.finishNode(Z,"ClassPrivateProperty")}parseClassProperty(Z){return this.parseInitializer(Z),this.semicolon(),this.finishNode(Z,"ClassProperty")}parseClassAccessorProperty(Z){return this.parseInitializer(Z),this.semicolon(),this.finishNode(Z,"ClassAccessorProperty")}parseInitializer(Z){this.scope.enter(64|16),this.expressionScope.enter(DZ()),this.prodParam.enter(0),Z.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(Z,X,J,Q=8331){if(v(this.state.type)){if(Z.id=this.parseIdentifier(),X)this.declareNameFromIdentifier(Z.id,Q)}else if(J||!X)Z.id=null;else throw this.raise(q.MissingClassName,this.state.startLoc)}parseClassSuper(Z){Z.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(Z,X){const J=this.parseMaybeImportPhase(Z,!0),Q=this.maybeParseExportDefaultSpecifier(Z,J),Y=!Q||this.eat(12),V=Y&&this.eatExportStar(Z),W=V&&this.maybeParseExportNamespaceSpecifier(Z),z=Y&&(!W||this.eat(12)),U=Q||V;if(V&&!W){if(Q)this.unexpected();if(X)throw this.raise(q.UnsupportedDecoratorExport,Z);return this.parseExportFrom(Z,!0),this.finishNode(Z,"ExportAllDeclaration")}const j=this.maybeParseExportNamedSpecifiers(Z);if(Q&&Y&&!V&&!j)this.unexpected(null,5);if(W&&z)this.unexpected(null,98);let R;if(U||j){if(R=!1,X)throw this.raise(q.UnsupportedDecoratorExport,Z);this.parseExportFrom(Z,U)}else R=this.maybeParseExportDeclaration(Z);if(U||j||R){var H;const K=Z;if(this.checkExport(K,!0,!1,!!K.source),((H=K.declaration)==null?void 0:H.type)==="ClassDeclaration")this.maybeTakeDecorators(X,K.declaration,K);else if(X)throw this.raise(q.UnsupportedDecoratorExport,Z);return this.finishNode(K,"ExportNamedDeclaration")}if(this.eat(65)){const K=Z,F=this.parseExportDefaultExpression();if(K.declaration=F,F.type==="ClassDeclaration")this.maybeTakeDecorators(X,F,K);else if(X)throw this.raise(q.UnsupportedDecoratorExport,Z);return this.checkExport(K,!0,!0),this.finishNode(K,"ExportDefaultDeclaration")}this.unexpected(null,5)}eatExportStar(Z){return this.eat(55)}maybeParseExportDefaultSpecifier(Z,X){if(X||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",X==null?void 0:X.loc.start);const J=X||this.parseIdentifier(!0),Q=this.startNodeAtNode(J);return Q.exported=J,Z.specifiers=[this.finishNode(Q,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(Z){if(this.isContextual(93)){var X,J;(J=(X=Z).specifiers)!=null||(X.specifiers=[]);const Q=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),Q.exported=this.parseModuleExportName(),Z.specifiers.push(this.finishNode(Q,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(Z){if(this.match(5)){const X=Z;if(!X.specifiers)X.specifiers=[];const J=X.exportKind==="type";if(X.specifiers.push(...this.parseExportSpecifiers(J)),X.source=null,X.declaration=null,this.hasPlugin("importAssertions"))X.assertions=[];return!0}return!1}maybeParseExportDeclaration(Z){if(this.shouldParseExportDeclaration()){if(Z.specifiers=[],Z.source=null,this.hasPlugin("importAssertions"))Z.assertions=[];return Z.declaration=this.parseExportDeclaration(Z),!0}return!1}isAsyncFunction(){if(!this.isContextual(95))return!1;const Z=this.nextTokenInLineStart();return this.isUnparsedContextual(Z,"function")}parseExportDefaultExpression(){const Z=this.startNode();if(this.match(68))return this.next(),this.parseFunction(Z,1|4);else if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(Z,1|4|8);if(this.match(80))return this.parseClass(Z,!0,!0);if(this.match(26)){if(this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")===!0)this.raise(q.DecoratorBeforeExport,this.state.startLoc);return this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0)}if(this.match(75)||this.match(74)||this.isLet())throw this.raise(q.UnsupportedDefaultExport,this.state.startLoc);const X=this.parseMaybeAssignAllowIn();return this.semicolon(),X}parseExportDeclaration(Z){if(this.match(80))return this.parseClass(this.startNode(),!0,!1);return this.parseStatementListItem()}isExportDefaultSpecifier(){const{type:Z}=this.state;if(v(Z)){if(Z===95&&!this.state.containsEsc||Z===100)return!1;if((Z===130||Z===129)&&!this.state.containsEsc){const{type:Q}=this.lookahead();if(v(Q)&&Q!==98||Q===5)return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;const X=this.nextTokenStart(),J=this.isUnparsedContextual(X,"from");if(this.input.charCodeAt(X)===44||v(this.state.type)&&J)return!0;if(this.match(65)&&J){const Q=this.input.charCodeAt(this.nextTokenStartSince(X+4));return Q===34||Q===39}return!1}parseExportFrom(Z,X){if(this.eatContextual(98))Z.source=this.parseImportSource(),this.checkExport(Z),this.maybeParseImportAttributes(Z),this.checkJSONModuleImport(Z);else if(X)this.unexpected();this.semicolon()}shouldParseExportDeclaration(){const{type:Z}=this.state;if(Z===26){if(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators")){if(this.getPluginOption("decorators","decoratorsBeforeExport")===!0)this.raise(q.DecoratorBeforeExport,this.state.startLoc);return!0}}if(this.isContextual(107))return this.raise(q.UsingDeclarationExport,this.state.startLoc),!0;if(this.isContextual(96)&&this.startsAwaitUsing())return this.raise(q.UsingDeclarationExport,this.state.startLoc),!0;return Z===74||Z===75||Z===68||Z===80||this.isLet()||this.isAsyncFunction()}checkExport(Z,X,J,Q){if(X){var Y;if(J){if(this.checkDuplicateExports(Z,"default"),this.hasPlugin("exportDefaultFrom")){var V;const W=Z.declaration;if(W.type==="Identifier"&&W.name==="from"&&W.end-W.start===4&&!((V=W.extra)!=null&&V.parenthesized))this.raise(q.ExportDefaultFromAsIdentifier,W)}}else if((Y=Z.specifiers)!=null&&Y.length)for(let W of Z.specifiers){const{exported:z}=W,U=z.type==="Identifier"?z.name:z.value;if(this.checkDuplicateExports(W,U),!Q&&W.local){const{local:j}=W;if(j.type!=="Identifier")this.raise(q.ExportBindingIsString,W,{localName:j.value,exportName:U});else this.checkReservedWord(j.name,j.loc.start,!0,!1),this.scope.checkLocalExport(j)}}else if(Z.declaration){const W=Z.declaration;if(W.type==="FunctionDeclaration"||W.type==="ClassDeclaration"){const{id:z}=W;if(!z)throw new Error("Assertion failure");this.checkDuplicateExports(Z,z.name)}else if(W.type==="VariableDeclaration")for(let z of W.declarations)this.checkDeclaration(z.id)}}}checkDeclaration(Z){if(Z.type==="Identifier")this.checkDuplicateExports(Z,Z.name);else if(Z.type==="ObjectPattern")for(let X of Z.properties)this.checkDeclaration(X);else if(Z.type==="ArrayPattern"){for(let X of Z.elements)if(X)this.checkDeclaration(X)}else if(Z.type==="ObjectProperty")this.checkDeclaration(Z.value);else if(Z.type==="RestElement")this.checkDeclaration(Z.argument);else if(Z.type==="AssignmentPattern")this.checkDeclaration(Z.left)}checkDuplicateExports(Z,X){if(this.exportedIdentifiers.has(X))if(X==="default")this.raise(q.DuplicateDefaultExport,Z);else this.raise(q.DuplicateExport,Z,{exportName:X});this.exportedIdentifiers.add(X)}parseExportSpecifiers(Z){const X=[];let J=!0;this.expect(5);while(!this.eat(8)){if(J)J=!1;else if(this.expect(12),this.eat(8))break;const Q=this.isContextual(130),Y=this.match(133),V=this.startNode();V.local=this.parseModuleExportName(),X.push(this.parseExportSpecifier(V,Y,Z,Q))}return X}parseExportSpecifier(Z,X,J,Q){if(this.eatContextual(93))Z.exported=this.parseModuleExportName();else if(X)Z.exported=h0(Z.local);else if(!Z.exported)Z.exported=x(Z.local);return this.finishNode(Z,"ExportSpecifier")}parseModuleExportName(){if(this.match(133)){const Z=this.parseStringLiteral(this.state.value),X=Q1.exec(Z.value);if(X)this.raise(q.ModuleExportNameHasLoneSurrogate,Z,{surrogateCharCode:X[0].charCodeAt(0)});return Z}return this.parseIdentifier(!0)}isJSONModuleImport(Z){if(Z.assertions!=null)return Z.assertions.some(({key:X,value:J})=>{return J.value==="json"&&(X.type==="Identifier"?X.name==="type":X.value==="type")});return!1}checkImportReflection(Z){const{specifiers:X}=Z,J=X.length===1?X[0].type:null;if(Z.phase==="source"){if(J!=="ImportDefaultSpecifier")this.raise(q.SourcePhaseImportRequiresDefault,X[0].loc.start)}else if(Z.phase==="defer"){if(J!=="ImportNamespaceSpecifier")this.raise(q.DeferImportRequiresNamespace,X[0].loc.start)}else if(Z.module){var Q;if(J!=="ImportDefaultSpecifier")this.raise(q.ImportReflectionNotBinding,X[0].loc.start);if(((Q=Z.assertions)==null?void 0:Q.length)>0)this.raise(q.ImportReflectionHasAssertion,X[0].loc.start)}}checkJSONModuleImport(Z){if(this.isJSONModuleImport(Z)&&Z.type!=="ExportAllDeclaration"){const{specifiers:X}=Z;if(X!=null){const J=X.find((Q)=>{let Y;if(Q.type==="ExportSpecifier")Y=Q.local;else if(Q.type==="ImportSpecifier")Y=Q.imported;if(Y!==void 0)return Y.type==="Identifier"?Y.name!=="default":Y.value!=="default"});if(J!==void 0)this.raise(q.ImportJSONBindingNotDefault,J.loc.start)}}}isPotentialImportPhase(Z){if(Z)return!1;return this.isContextual(105)||this.isContextual(97)||this.isContextual(127)}applyImportPhase(Z,X,J,Q){if(X)return;if(J==="module")this.expectPlugin("importReflection",Q),Z.module=!0;else if(this.hasPlugin("importReflection"))Z.module=!1;if(J==="source")this.expectPlugin("sourcePhaseImports",Q),Z.phase="source";else if(J==="defer")this.expectPlugin("deferredImportEvaluation",Q),Z.phase="defer";else if(this.hasPlugin("sourcePhaseImports"))Z.phase=null}parseMaybeImportPhase(Z,X){if(!this.isPotentialImportPhase(X))return this.applyImportPhase(Z,X,null),null;const J=this.parseIdentifier(!0),{type:Q}=this.state;if(k(Q)?Q!==98||this.lookaheadCharCode()===102:Q!==12)return this.resetPreviousIdentifierLeadingComments(J),this.applyImportPhase(Z,X,J.name,J.loc.start),null;else return this.applyImportPhase(Z,X,null),J}isPrecedingIdImportPhase(Z){const{type:X}=this.state;return v(X)?X!==98||this.lookaheadCharCode()===102:X!==12}parseImport(Z){if(this.match(133))return this.parseImportSourceAndAttributes(Z);return this.parseImportSpecifiersAndAfter(Z,this.parseMaybeImportPhase(Z,!1))}parseImportSpecifiersAndAfter(Z,X){Z.specifiers=[];const Q=!this.maybeParseDefaultImportSpecifier(Z,X)||this.eat(12),Y=Q&&this.maybeParseStarImportSpecifier(Z);if(Q&&!Y)this.parseNamedImportSpecifiers(Z);return this.expectContextual(98),this.parseImportSourceAndAttributes(Z)}parseImportSourceAndAttributes(Z){var X;return(X=Z.specifiers)!=null||(Z.specifiers=[]),Z.source=this.parseImportSource(),this.maybeParseImportAttributes(Z),this.checkImportReflection(Z),this.checkJSONModuleImport(Z),this.semicolon(),this.finishNode(Z,"ImportDeclaration")}parseImportSource(){if(!this.match(133))this.unexpected();return this.parseExprAtom()}parseImportSpecifierLocal(Z,X,J){X.local=this.parseIdentifier(),Z.specifiers.push(this.finishImportSpecifier(X,J))}finishImportSpecifier(Z,X,J=8201){return this.checkLVal(Z.local,{type:X},J),this.finishNode(Z,X)}parseImportAttributes(){this.expect(5);const Z=[],X=new Set;do{if(this.match(8))break;const J=this.startNode(),Q=this.state.value;if(X.has(Q))this.raise(q.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:Q});if(X.add(Q),this.match(133))J.key=this.parseStringLiteral(Q);else J.key=this.parseIdentifier(!0);if(this.expect(14),!this.match(133))throw this.raise(q.ModuleAttributeInvalidValue,this.state.startLoc);J.value=this.parseStringLiteral(this.state.value),Z.push(this.finishNode(J,"ImportAttribute"))}while(this.eat(12));return this.expect(8),Z}parseModuleAttributes(){const Z=[],X=new Set;do{const J=this.startNode();if(J.key=this.parseIdentifier(!0),J.key.name!=="type")this.raise(q.ModuleAttributeDifferentFromType,J.key);if(X.has(J.key.name))this.raise(q.ModuleAttributesWithDuplicateKeys,J.key,{key:J.key.name});if(X.add(J.key.name),this.expect(14),!this.match(133))throw this.raise(q.ModuleAttributeInvalidValue,this.state.startLoc);J.value=this.parseStringLiteral(this.state.value),Z.push(this.finishNode(J,"ImportAttribute"))}while(this.eat(12));return Z}maybeParseImportAttributes(Z){let X,J=!1;if(this.match(76)){if(this.hasPrecedingLineBreak()&&this.lookaheadCharCode()===40)return;if(this.next(),this.hasPlugin("moduleAttributes"))X=this.parseModuleAttributes();else this.expectImportAttributesPlugin(),X=this.parseImportAttributes();J=!0}else if(this.isContextual(94)&&!this.hasPrecedingLineBreak()){if(this.hasPlugin("importAttributes")){if(this.getPluginOption("importAttributes","deprecatedAssertSyntax")!==!0)this.raise(q.ImportAttributesUseAssert,this.state.startLoc);this.addExtra(Z,"deprecatedAssertSyntax",!0)}else this.expectOnePlugin(["importAttributes","importAssertions"]);this.next(),X=this.parseImportAttributes()}else if(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))X=[];else if(this.hasPlugin("moduleAttributes"))X=[];else return;if(!J&&this.hasPlugin("importAssertions"))Z.assertions=X;else Z.attributes=X}maybeParseDefaultImportSpecifier(Z,X){if(X){const J=this.startNodeAtNode(X);return J.local=X,Z.specifiers.push(this.finishImportSpecifier(J,"ImportDefaultSpecifier")),!0}else if(k(this.state.type))return this.parseImportSpecifierLocal(Z,this.startNode(),"ImportDefaultSpecifier"),!0;return!1}maybeParseStarImportSpecifier(Z){if(this.match(55)){const X=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(Z,X,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(Z){let X=!0;this.expect(5);while(!this.eat(8)){if(X)X=!1;else{if(this.eat(14))throw this.raise(q.DestructureNamedImport,this.state.startLoc);if(this.expect(12),this.eat(8))break}const J=this.startNode(),Q=this.match(133),Y=this.isContextual(130);J.imported=this.parseModuleExportName();const V=this.parseImportSpecifier(J,Q,Z.importKind==="type"||Z.importKind==="typeof",Y,void 0);Z.specifiers.push(V)}}parseImportSpecifier(Z,X,J,Q,Y){if(this.eatContextual(93))Z.local=this.parseIdentifier();else{const{imported:V}=Z;if(X)throw this.raise(q.ImportBindingIsString,Z,{importName:V.value});if(this.checkReservedWord(V.name,Z.loc.start,!0,!0),!Z.local)Z.local=x(V)}return this.finishImportSpecifier(Z,"ImportSpecifier",Y)}isThisParam(Z){return Z.type==="Identifier"&&Z.name==="this"}}class xJ extends LZ{constructor(Z,X,J){Z=J1(Z);super(Z,X);this.options=Z,this.initializeScopes(),this.plugins=J,this.filename=Z.sourceFilename}getScopeHandler(){return GJ}parse(){this.enterInitialScopes();const Z=this.startNode(),X=this.startNode();return this.nextToken(),Z.errors=null,this.parseTopLevel(Z,X),Z.errors=this.state.errors,Z.comments.length=this.state.commentsLen,Z}}var z1=W1(Q0),ZZ=new Map;gZ.parse=Y1;gZ.parseExpression=V1;gZ.tokTypes=z1});var fZ=WJ((uZ)=>{var G1=function(Z,X){var J=K1.default(X);return J.plugins.push("jsx","flow","decoratorAutoAccessors"),uZ.parser.parse(Z,J)};Object.defineProperty(uZ,"__esModule",{value:!0});uZ.parse=uZ.parser=void 0;var H1=bZ(),K1=H1.__importDefault(FJ());uZ.parser=function(){try{return hZ()}catch(Z){try{return (()=>{throw new Error(`Cannot require module "babylon"`);})()}catch(X){throw new Error("Install @babel/parser to use the `typescript`, `flow`, or `babel` parsers")}}}();uZ.parse=G1});var B1=WJ((yZ)=>{var _1=function(Z,X){var J=O1.default(X);return J.plugins.push("typescript"),$1.parser.parse(Z,J)};Object.defineProperty(yZ,"__esModule",{value:!0});yZ.parse=void 0;var F1=bZ(),$1=fZ(),O1=F1.__importDefault(FJ());yZ.parse=_1});export default B1();