setupin 2.6.0 → 2.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +1 -1
- package/dist/main.prod.js +1 -1
- package/package.json +3 -3
package/dist/main.js
CHANGED
|
@@ -8,7 +8,7 @@ var Vue=function(T){"use strict";var sn={};Object.defineProperty(sn,"__esModule"
|
|
|
8
8
|
`),cooked:n===null?null:n.slice(1,c)},o.tail=l,this.next();const h=this.finishNode(o,"TemplateElement");return this.resetEndLocation(h,Xe(this.state.lastTokEndLoc,c)),h}parseTemplate(t){const e=this.startNode();let i=this.parseTemplateElement(t);const r=[i],n=[];for(;!i.tail;)n.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),r.push(i=this.parseTemplateElement(t));return e.expressions=n,e.quasis=r,this.finishNode(e,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(t,e,i,r){i&&this.expectPlugin("recordAndTuple");const n=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;const a=Object.create(null);let o=!0;const l=this.startNode();for(l.properties=[],this.next();!this.match(t);){if(o)o=!1;else if(this.expect(12),this.match(t)){this.addTrailingCommaExtraToNode(l);break}let u;e?u=this.parseBindingProperty():(u=this.parsePropertyDefinition(r),this.checkProto(u,i,a,r)),i&&!this.isObjectProperty(u)&&u.type!=="SpreadElement"&&this.raise(y.InvalidRecordProperty,u),u.shorthand&&this.addExtra(u,"shorthand",!0),l.properties.push(u)}this.next(),this.state.inFSharpPipelineDirectBody=n;let c="ObjectExpression";return e?c="ObjectPattern":i&&(c="RecordExpression"),this.finishNode(l,c)}addTrailingCommaExtraToNode(t){this.addExtra(t,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(t,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(t){return!t.computed&&t.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(t){let e=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(y.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)e.push(this.parseDecorator());const i=this.startNode();let r=!1,n=!1,a;if(this.match(21))return e.length&&this.unexpected(),this.parseSpread();e.length&&(i.decorators=e,e=[]),i.method=!1,t&&(a=this.state.startLoc);let o=this.eat(55);this.parsePropertyNamePrefixOperator(i);const l=this.state.containsEsc;if(this.parsePropertyName(i,t),!o&&!l&&this.maybeAsyncOrAccessorProp(i)){const{key:c}=i,u=c.name;u==="async"&&!this.hasPrecedingLineBreak()&&(r=!0,this.resetPreviousNodeTrailingComments(c),o=this.eat(55),this.parsePropertyName(i)),(u==="get"||u==="set")&&(n=!0,this.resetPreviousNodeTrailingComments(c),i.kind=u,this.match(55)&&(o=!0,this.raise(y.AccessorIsGenerator,this.state.curPosition(),{kind:u}),this.next()),this.parsePropertyName(i))}return this.parseObjPropValue(i,a,o,r,!1,n,t)}getGetterSetterExpectedParamCount(t){return t.kind==="get"?0:1}getObjectOrClassMethodParams(t){return t.params}checkGetterSetterParams(t){var e;const i=this.getGetterSetterExpectedParamCount(t),r=this.getObjectOrClassMethodParams(t);r.length!==i&&this.raise(t.kind==="get"?y.BadGetterArity:y.BadSetterArity,t),t.kind==="set"&&((e=r[r.length-1])==null?void 0:e.type)==="RestElement"&&this.raise(y.BadSetterRestParameter,t)}parseObjectMethod(t,e,i,r,n){if(n){const a=this.parseMethod(t,e,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(a),a}if(i||e||this.match(10))return r&&this.unexpected(),t.kind="method",t.method=!0,this.parseMethod(t,e,i,!1,!1,"ObjectMethod")}parseObjectProperty(t,e,i,r){if(t.shorthand=!1,this.eat(14))return t.value=i?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowIn(r),this.finishNode(t,"ObjectProperty");if(!t.computed&&t.key.type==="Identifier"){if(this.checkReservedWord(t.key.name,t.key.loc.start,!0,!1),i)t.value=this.parseMaybeDefault(e,Gt(t.key));else if(this.match(29)){const n=this.state.startLoc;r!=null?r.shorthandAssignLoc===null&&(r.shorthandAssignLoc=n):this.raise(y.InvalidCoverInitializedName,n),t.value=this.parseMaybeDefault(e,Gt(t.key))}else t.value=Gt(t.key);return t.shorthand=!0,this.finishNode(t,"ObjectProperty")}}parseObjPropValue(t,e,i,r,n,a,o){const l=this.parseObjectMethod(t,i,r,n,a)||this.parseObjectProperty(t,e,n,o);return l||this.unexpected(),l}parsePropertyName(t,e){if(this.eat(0))t.computed=!0,t.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{const{type:i,value:r}=this.state;let n;if(Nt(i))n=this.parseIdentifier(!0);else switch(i){case 135:n=this.parseNumericLiteral(r);break;case 134:n=this.parseStringLiteral(r);break;case 136:n=this.parseBigIntLiteral(r);break;case 139:{const a=this.state.startLoc;e!=null?e.privateKeyLoc===null&&(e.privateKeyLoc=a):this.raise(y.UnexpectedPrivateField,a),n=this.parsePrivateName();break}default:if(i===137){n=this.parseDecimalLiteral(r);break}this.unexpected()}t.key=n,i!==139&&(t.computed=!1)}}initFunction(t,e){t.id=null,t.generator=!1,t.async=e}parseMethod(t,e,i,r,n,a,o=!1){this.initFunction(t,i),t.generator=e,this.scope.enter(18|(o?64:0)|(n?32:0)),this.prodParam.enter(hn(i,t.generator)),this.parseFunctionParams(t,r);const l=this.parseFunctionBodyAndFinish(t,a,!0);return this.prodParam.exit(),this.scope.exit(),l}parseArrayLike(t,e,i,r){i&&this.expectPlugin("recordAndTuple");const n=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;const a=this.startNode();return this.next(),a.elements=this.parseExprList(t,!i,r,a),this.state.inFSharpPipelineDirectBody=n,this.finishNode(a,i?"TupleExpression":"ArrayExpression")}parseArrowExpression(t,e,i,r){this.scope.enter(6);let n=hn(i,!1);!this.match(5)&&this.prodParam.hasIn&&(n|=8),this.prodParam.enter(n),this.initFunction(t,i);const a=this.state.maybeInArrowParameters;return e&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(t,e,r)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(t,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=a,this.finishNode(t,"ArrowFunctionExpression")}setArrowFunctionParameters(t,e,i){this.toAssignableList(e,i,!1),t.params=e}parseFunctionBodyAndFinish(t,e,i=!1){return this.parseFunctionBody(t,!1,i),this.finishNode(t,e)}parseFunctionBody(t,e,i=!1){const r=e&&!this.match(5);if(this.expressionScope.enter(Zu()),r)t.body=this.parseMaybeAssign(),this.checkParams(t,!1,e,!1);else{const n=this.state.strict,a=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|4),t.body=this.parseBlock(!0,!1,o=>{const l=!this.isSimpleParamList(t.params);o&&l&&this.raise(y.IllegalLanguageModeDirective,(t.kind==="method"||t.kind==="constructor")&&t.key?t.key.loc.end:t);const c=!n&&this.state.strict;this.checkParams(t,!this.state.strict&&!e&&!i&&!l,e,c),this.state.strict&&t.id&&this.checkIdentifier(t.id,65,c)}),this.prodParam.exit(),this.state.labels=a}this.expressionScope.exit()}isSimpleParameter(t){return t.type==="Identifier"}isSimpleParamList(t){for(let e=0,i=t.length;e<i;e++)if(!this.isSimpleParameter(t[e]))return!1;return!0}checkParams(t,e,i,r=!0){const n=!e&&new Set,a={type:"FormalParameters"};for(const o of t.params)this.checkLVal(o,a,5,n,r)}parseExprList(t,e,i,r){const n=[];let a=!0;for(;!this.eat(t);){if(a)a=!1;else if(this.expect(12),this.match(t)){r&&this.addTrailingCommaExtraToNode(r),this.next();break}n.push(this.parseExprListItem(e,i))}return n}parseExprListItem(t,e,i){let r;if(this.match(12))t||this.raise(y.UnexpectedToken,this.state.curPosition(),{unexpected:","}),r=null;else if(this.match(21)){const n=this.state.startLoc;r=this.parseParenItem(this.parseSpread(e),n)}else if(this.match(17)){this.expectPlugin("partialApplication"),i||this.raise(y.UnexpectedArgumentPlaceholder,this.state.startLoc);const n=this.startNode();this.next(),r=this.finishNode(n,"ArgumentPlaceholder")}else r=this.parseMaybeAssignAllowIn(e,this.parseParenItem);return r}parseIdentifier(t){const e=this.startNode(),i=this.parseIdentifierName(t);return this.createIdentifier(e,i)}createIdentifier(t,e){return t.name=e,t.loc.identifierName=e,this.finishNode(t,"Identifier")}parseIdentifierName(t){let e;const{startLoc:i,type:r}=this.state;Nt(r)?e=this.state.value:this.unexpected();const n=Am(r);return t?n&&this.replaceToken(132):this.checkReservedWord(e,i,n,!1),this.next(),e}checkReservedWord(t,e,i,r){if(t.length>10||!jm(t))return;if(i&&Um(t)){this.raise(y.UnexpectedKeyword,e,{keyword:t});return}if((this.state.strict?r?qu:Hu:ju)(t,this.inModule)){this.raise(y.UnexpectedReservedWord,e,{reservedWord:t});return}else if(t==="yield"){if(this.prodParam.hasYield){this.raise(y.YieldBindingIdentifier,e);return}}else if(t==="await"){if(this.prodParam.hasAwait){this.raise(y.AwaitBindingIdentifier,e);return}if(this.scope.inStaticBlock){this.raise(y.AwaitBindingIdentifierInStaticBlock,e);return}this.expressionScope.recordAsyncArrowParametersError(e)}else if(t==="arguments"&&this.scope.inClassAndNotInNonArrowFunction){this.raise(y.ArgumentsInClass,e);return}}recordAwaitIfAllowed(){const t=this.prodParam.hasAwait||this.options.allowAwaitOutsideFunction&&!this.scope.inFunction;return t&&!this.scope.inFunction&&(this.state.hasTopLevelAwait=!0),t}parseAwait(t){const e=this.startNodeAt(t);return this.expressionScope.recordParameterInitializerError(y.AwaitExpressionFormalParameter,e),this.eat(55)&&this.raise(y.ObsoleteAwaitStar,e),!this.scope.inFunction&&!this.options.allowAwaitOutsideFunction&&(this.isAmbiguousAwait()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(e.argument=this.parseMaybeUnary(null,!0)),this.finishNode(e,"AwaitExpression")}isAmbiguousAwait(){if(this.hasPrecedingLineBreak())return!0;const{type:t}=this.state;return t===53||t===10||t===0||on(t)||t===102&&!this.state.containsEsc||t===138||t===56||this.hasPlugin("v8intrinsic")&&t===54}parseYield(){const t=this.startNode();this.expressionScope.recordParameterInitializerError(y.YieldInParameter,t),this.next();let e=!1,i=null;if(!this.hasPrecedingLineBreak())switch(e=this.eat(55),this.state.type){case 13:case 140:case 8:case 11:case 3:case 9:case 14:case 12:if(!e)break;default:i=this.parseMaybeAssign()}return t.delegate=e,t.argument=i,this.finishNode(t,"YieldExpression")}parseImportCall(t){if(this.next(),t.source=this.parseMaybeAssignAllowIn(),t.options=null,this.eat(12)&&!this.match(11)&&(t.options=this.parseMaybeAssignAllowIn(),this.eat(12)&&!this.match(11))){do this.parseMaybeAssignAllowIn();while(this.eat(12)&&!this.match(11));this.raise(y.ImportCallArity,t)}return this.expect(11),this.finishNode(t,"ImportExpression")}checkPipelineAtInfixOperator(t,e){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&t.type==="SequenceExpression"&&this.raise(y.PipelineHeadSequenceExpression,e)}parseSmartPipelineBodyInStyle(t,e){if(this.isSimpleReference(t)){const i=this.startNodeAt(e);return i.callee=t,this.finishNode(i,"PipelineBareFunction")}else{const i=this.startNodeAt(e);return this.checkSmartPipeTopicBodyEarlyErrors(e),i.expression=t,this.finishNode(i,"PipelineTopicExpression")}}isSimpleReference(t){switch(t.type){case"MemberExpression":return!t.computed&&this.isSimpleReference(t.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(t){if(this.match(19))throw this.raise(y.PipelineBodyNoArrow,this.state.startLoc);this.topicReferenceWasUsedInCurrentContext()||this.raise(y.PipelineTopicUnused,t)}withTopicBindingContext(t){const e=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return t()}finally{this.state.topicContext=e}}withSmartMixTopicForbiddingContext(t){if(this.hasPlugin(["pipelineOperator",{proposal:"smart"}])){const e=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return t()}finally{this.state.topicContext=e}}else return t()}withSoloAwaitPermittingContext(t){const e=this.state.soloAwait;this.state.soloAwait=!0;try{return t()}finally{this.state.soloAwait=e}}allowInAnd(t){const e=this.prodParam.currentFlags();if(8&~e){this.prodParam.enter(e|8);try{return t()}finally{this.prodParam.exit()}}return t()}disallowInAnd(t){const e=this.prodParam.currentFlags();if(8&e){this.prodParam.enter(e&-9);try{return t()}finally{this.prodParam.exit()}}return t()}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(t){const e=this.state.startLoc;this.state.potentialArrowAt=this.state.start;const i=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;const r=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),e,t);return this.state.inFSharpPipelineDirectBody=i,r}parseModuleExpression(){this.expectPlugin("moduleBlocks");const t=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);const e=this.startNodeAt(this.state.endLoc);this.next();const i=this.initializeScopes(!0);this.enterInitialScopes();try{t.body=this.parseProgram(e,8,"module")}finally{i()}return this.finishNode(t,"ModuleExpression")}parsePropertyNamePrefixOperator(t){}}const No={kind:1},Fy={kind:2},By=/[\uD800-\uDFFF]/u,ko=/in(?:stanceof)?/y;function Uy(s,t,e){for(let i=0;i<s.length;i++){const r=s[i],{type:n}=r;if(typeof n=="number"){{if(n===139){const{loc:a,start:o,value:l,end:c}=r,u=o+1,h=Xe(a.start,1);s.splice(i,1,new ds({type:zt(27),value:"#",start:o,end:u,startLoc:a.start,endLoc:h}),new ds({type:zt(132),value:l,start:u,end:c,startLoc:h,endLoc:a.end})),i++;continue}if(on(n)){const{loc:a,start:o,value:l,end:c}=r,u=o+1,h=Xe(a.start,1);let p;t.charCodeAt(o-e)===96?p=new ds({type:zt(22),value:"`",start:o,end:u,startLoc:a.start,endLoc:h}):p=new ds({type:zt(8),value:"}",start:o,end:u,startLoc:a.start,endLoc:h});let f,m,b,_;n===24?(m=c-1,b=Xe(a.end,-1),f=l===null?null:l.slice(1,-1),_=new ds({type:zt(22),value:"`",start:m,end:c,startLoc:b,endLoc:a.end})):(m=c-2,b=Xe(a.end,-2),f=l===null?null:l.slice(1,-2),_=new ds({type:zt(23),value:"${",start:m,end:c,startLoc:b,endLoc:a.end})),s.splice(i,1,p,new ds({type:zt(20),value:f,start:u,end:m,startLoc:h,endLoc:b}),_),i+=2;continue}}r.type=zt(n)}}return s}class $y extends Ry{parseTopLevel(t,e){return t.program=this.parseProgram(e),t.comments=this.comments,this.options.tokens&&(t.tokens=Uy(this.tokens,this.input,this.startIndex)),this.finishNode(t,"File")}parseProgram(t,e=140,i=this.options.sourceType){if(t.sourceType=i,t.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(t,!0,!0,e),this.inModule){if(!this.options.allowUndeclaredExports&&this.scope.undefinedExports.size>0)for(const[n,a]of Array.from(this.scope.undefinedExports))this.raise(y.ModuleExportUndefined,a,{localName:n});this.addExtra(t,"topLevelAwait",this.state.hasTopLevelAwait)}let r;return e===140?r=this.finishNode(t,"Program"):r=this.finishNodeAt(t,"Program",Xe(this.state.startLoc,-1)),r}stmtToDirective(t){const e=t;e.type="Directive",e.value=e.expression,delete e.expression;const i=e.value,r=i.value,n=this.input.slice(this.offsetToSourcePos(i.start),this.offsetToSourcePos(i.end)),a=i.value=n.slice(1,-1);return this.addExtra(i,"raw",n),this.addExtra(i,"rawValue",a),this.addExtra(i,"expressionValue",r),i.type="DirectiveLiteral",e}parseInterpreterDirective(){if(!this.match(28))return null;const t=this.startNode();return t.value=this.state.value,this.next(),this.finishNode(t,"InterpreterDirective")}isLet(){return this.isContextual(100)?this.hasFollowingBindingAtom():!1}chStartsBindingIdentifier(t,e){if(Jt(t)){if(ko.lastIndex=e,ko.test(this.input)){const i=this.codePointAtPos(ko.lastIndex);if(!pi(i)&&i!==92)return!1}return!0}else return t===92}chStartsBindingPattern(t){return t===91||t===123}hasFollowingBindingAtom(){const t=this.nextTokenStart(),e=this.codePointAtPos(t);return this.chStartsBindingPattern(e)||this.chStartsBindingIdentifier(e,t)}hasInLineFollowingBindingIdentifierOrBrace(){const t=this.nextTokenInLineStart(),e=this.codePointAtPos(t);return e===123||this.chStartsBindingIdentifier(e,t)}startsUsingForOf(){const{type:t,containsEsc:e}=this.lookahead();if(t===102&&!e)return!1;if(me(t)&&!this.hasFollowingLineBreak())return this.expectPlugin("explicitResourceManagement"),!0}startsAwaitUsing(){let t=this.nextTokenInLineStart();if(this.isUnparsedContextual(t,"using")){t=this.nextTokenInLineStartSince(t+5);const e=this.codePointAtPos(t);if(this.chStartsBindingIdentifier(e,t))return this.expectPlugin("explicitResourceManagement"),!0}return!1}parseModuleItem(){return this.parseStatementLike(15)}parseStatementListItem(){return this.parseStatementLike(6|(!this.options.annexB||this.state.strict?0:8))}parseStatementOrSloppyAnnexBFunctionDeclaration(t=!1){let e=0;return this.options.annexB&&!this.state.strict&&(e|=4,t&&(e|=8)),this.parseStatementLike(e)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(t){let e=null;return this.match(26)&&(e=this.parseDecorators(!0)),this.parseStatementContent(t,e)}parseStatementContent(t,e){const i=this.state.type,r=this.startNode(),n=!!(t&2),a=!!(t&4),o=t&1;switch(i){case 60:return this.parseBreakContinueStatement(r,!0);case 63:return this.parseBreakContinueStatement(r,!1);case 64:return this.parseDebuggerStatement(r);case 90:return this.parseDoWhileStatement(r);case 91:return this.parseForStatement(r);case 68:if(this.lookaheadCharCode()===46)break;return a||this.raise(this.state.strict?y.StrictFunction:this.options.annexB?y.SloppyFunctionAnnexB:y.SloppyFunction,this.state.startLoc),this.parseFunctionStatement(r,!1,!n&&a);case 80:return n||this.unexpected(),this.parseClass(this.maybeTakeDecorators(e,r),!0);case 69:return this.parseIfStatement(r);case 70:return this.parseReturnStatement(r);case 71:return this.parseSwitchStatement(r);case 72:return this.parseThrowStatement(r);case 73:return this.parseTryStatement(r);case 96:if(!this.state.containsEsc&&this.startsAwaitUsing())return this.recordAwaitIfAllowed()?n||this.raise(y.UnexpectedLexicalDeclaration,r):this.raise(y.AwaitUsingNotInAsyncContext,r),this.next(),this.parseVarStatement(r,"await using");break;case 107:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifierOrBrace())break;return this.expectPlugin("explicitResourceManagement"),!this.scope.inModule&&this.scope.inTopLevel?this.raise(y.UnexpectedUsingDeclaration,this.state.startLoc):n||this.raise(y.UnexpectedLexicalDeclaration,this.state.startLoc),this.parseVarStatement(r,"using");case 100:{if(this.state.containsEsc)break;const u=this.nextTokenStart(),h=this.codePointAtPos(u);if(h!==91&&(!n&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(h,u)&&h!==123))break}case 75:n||this.raise(y.UnexpectedLexicalDeclaration,this.state.startLoc);case 74:{const u=this.state.value;return this.parseVarStatement(r,u)}case 92:return this.parseWhileStatement(r);case 76:return this.parseWithStatement(r);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(r);case 83:{const u=this.lookaheadCharCode();if(u===40||u===46)break}case 82:{!this.options.allowImportExportEverywhere&&!o&&this.raise(y.UnexpectedImportExport,this.state.startLoc),this.next();let u;return i===83?(u=this.parseImport(r),u.type==="ImportDeclaration"&&(!u.importKind||u.importKind==="value")&&(this.sawUnambiguousESM=!0)):(u=this.parseExport(r,e),(u.type==="ExportNamedDeclaration"&&(!u.exportKind||u.exportKind==="value")||u.type==="ExportAllDeclaration"&&(!u.exportKind||u.exportKind==="value")||u.type==="ExportDefaultDeclaration")&&(this.sawUnambiguousESM=!0)),this.assertModuleNodeAllowed(u),u}default:if(this.isAsyncFunction())return n||this.raise(y.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(r,!0,!n&&a)}const l=this.state.value,c=this.parseExpression();return me(i)&&c.type==="Identifier"&&this.eat(14)?this.parseLabeledStatement(r,l,c,t):this.parseExpressionStatement(r,c,e)}assertModuleNodeAllowed(t){!this.options.allowImportExportEverywhere&&!this.inModule&&this.raise(y.ImportOutsideModule,t)}decoratorsEnabledBeforeExport(){return this.hasPlugin("decorators-legacy")?!0:this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")!==!1}maybeTakeDecorators(t,e,i){return t&&(e.decorators&&e.decorators.length>0?(typeof this.getPluginOption("decorators","decoratorsBeforeExport")!="boolean"&&this.raise(y.DecoratorsBeforeAfterExport,e.decorators[0]),e.decorators.unshift(...t)):e.decorators=t,this.resetStartLocationFromNode(e,t[0]),i&&this.resetStartLocationFromNode(i,e)),e}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(t){const e=[];do e.push(this.parseDecorator());while(this.match(26));if(this.match(82))t||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(y.DecoratorExportClass,this.state.startLoc);else if(!this.canHaveLeadingDecorator())throw this.raise(y.UnexpectedLeadingDecorator,this.state.startLoc);return e}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);const t=this.startNode();if(this.next(),this.hasPlugin("decorators")){const e=this.state.startLoc;let i;if(this.match(10)){const r=this.state.startLoc;this.next(),i=this.parseExpression(),this.expect(11),i=this.wrapParenthesis(r,i);const n=this.state.startLoc;t.expression=this.parseMaybeDecoratorArguments(i),this.getPluginOption("decorators","allowCallParenthesized")===!1&&t.expression!==i&&this.raise(y.DecoratorArgumentsOutsideParentheses,n)}else{for(i=this.parseIdentifier(!1);this.eat(16);){const r=this.startNodeAt(e);r.object=i,this.match(139)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),r.property=this.parsePrivateName()):r.property=this.parseIdentifier(!0),r.computed=!1,i=this.finishNode(r,"MemberExpression")}t.expression=this.parseMaybeDecoratorArguments(i)}}else t.expression=this.parseExprSubscripts();return this.finishNode(t,"Decorator")}parseMaybeDecoratorArguments(t){if(this.eat(10)){const e=this.startNodeAtNode(t);return e.callee=t,e.arguments=this.parseCallExpressionArguments(11),this.toReferencedList(e.arguments),this.finishNode(e,"CallExpression")}return t}parseBreakContinueStatement(t,e){return this.next(),this.isLineTerminator()?t.label=null:(t.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(t,e),this.finishNode(t,e?"BreakStatement":"ContinueStatement")}verifyBreakContinue(t,e){let i;for(i=0;i<this.state.labels.length;++i){const r=this.state.labels[i];if((t.label==null||r.name===t.label.name)&&(r.kind!=null&&(e||r.kind===1)||t.label&&e))break}if(i===this.state.labels.length){const r=e?"BreakStatement":"ContinueStatement";this.raise(y.IllegalBreakContinue,t,{type:r})}}parseDebuggerStatement(t){return this.next(),this.semicolon(),this.finishNode(t,"DebuggerStatement")}parseHeaderExpression(){this.expect(10);const t=this.parseExpression();return this.expect(11),t}parseDoWhileStatement(t){return this.next(),this.state.labels.push(No),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.expect(92),t.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(t,"DoWhileStatement")}parseForStatement(t){this.next(),this.state.labels.push(No);let e=null;if(this.isContextual(96)&&this.recordAwaitIfAllowed()&&(e=this.state.startLoc,this.next()),this.scope.enter(0),this.expect(10),this.match(13))return e!==null&&this.unexpected(e),this.parseFor(t,null);const i=this.isContextual(100);{const l=this.isContextual(96)&&this.startsAwaitUsing(),c=l||this.isContextual(107)&&this.startsUsingForOf(),u=i&&this.hasFollowingBindingAtom()||c;if(this.match(74)||this.match(75)||u){const h=this.startNode();let p;l?(p="await using",this.recordAwaitIfAllowed()||this.raise(y.AwaitUsingNotInAsyncContext,this.state.startLoc),this.next()):p=this.state.value,this.next(),this.parseVar(h,!0,p);const f=this.finishNode(h,"VariableDeclaration"),m=this.match(58);return m&&c&&this.raise(y.ForInUsing,f),(m||this.isContextual(102))&&f.declarations.length===1?this.parseForIn(t,f,e):(e!==null&&this.unexpected(e),this.parseFor(t,f))}}const r=this.isContextual(95),n=new pn,a=this.parseExpression(!0,n),o=this.isContextual(102);if(o&&(i&&this.raise(y.ForOfLet,a),e===null&&r&&a.type==="Identifier"&&this.raise(y.ForOfAsync,a)),o||this.match(58)){this.checkDestructuringPrivate(n),this.toAssignable(a,!0);const l=o?"ForOfStatement":"ForInStatement";return this.checkLVal(a,{type:l}),this.parseForIn(t,a,e)}else this.checkExpressionErrors(n,!0);return e!==null&&this.unexpected(e),this.parseFor(t,a)}parseFunctionStatement(t,e,i){return this.next(),this.parseFunction(t,1|(i?2:0)|(e?8:0))}parseIfStatement(t){return this.next(),t.test=this.parseHeaderExpression(),t.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),t.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(t,"IfStatement")}parseReturnStatement(t){return!this.prodParam.hasReturn&&!this.options.allowReturnOutsideFunction&&this.raise(y.IllegalReturn,this.state.startLoc),this.next(),this.isLineTerminator()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")}parseSwitchStatement(t){this.next(),t.discriminant=this.parseHeaderExpression();const e=t.cases=[];this.expect(5),this.state.labels.push(Fy),this.scope.enter(0);let i;for(let r;!this.match(8);)if(this.match(61)||this.match(65)){const n=this.match(61);i&&this.finishNode(i,"SwitchCase"),e.push(i=this.startNode()),i.consequent=[],this.next(),n?i.test=this.parseExpression():(r&&this.raise(y.MultipleDefaultsInSwitch,this.state.lastTokStartLoc),r=!0,i.test=null),this.expect(14)}else i?i.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),i&&this.finishNode(i,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(t,"SwitchStatement")}parseThrowStatement(t){return this.next(),this.hasPrecedingLineBreak()&&this.raise(y.NewlineAfterThrow,this.state.lastTokEndLoc),t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")}parseCatchClauseParam(){const t=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&t.type==="Identifier"?8:0),this.checkLVal(t,{type:"CatchClause"},9),t}parseTryStatement(t){if(this.next(),t.block=this.parseBlock(),t.handler=null,this.match(62)){const e=this.startNode();this.next(),this.match(10)?(this.expect(10),e.param=this.parseCatchClauseParam(),this.expect(11)):(e.param=null,this.scope.enter(0)),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseBlock(!1,!1)),this.scope.exit(),t.handler=this.finishNode(e,"CatchClause")}return t.finalizer=this.eat(67)?this.parseBlock():null,!t.handler&&!t.finalizer&&this.raise(y.NoCatchOrFinally,t),this.finishNode(t,"TryStatement")}parseVarStatement(t,e,i=!1){return this.next(),this.parseVar(t,!1,e,i),this.semicolon(),this.finishNode(t,"VariableDeclaration")}parseWhileStatement(t){return this.next(),t.test=this.parseHeaderExpression(),this.state.labels.push(No),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.finishNode(t,"WhileStatement")}parseWithStatement(t){return this.state.strict&&this.raise(y.StrictWith,this.state.startLoc),this.next(),t.object=this.parseHeaderExpression(),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.finishNode(t,"WithStatement")}parseEmptyStatement(t){return this.next(),this.finishNode(t,"EmptyStatement")}parseLabeledStatement(t,e,i,r){for(const a of this.state.labels)a.name===e&&this.raise(y.LabelRedeclaration,i,{labelName:e});const n=vm(this.state.type)?1:this.match(71)?2:null;for(let a=this.state.labels.length-1;a>=0;a--){const o=this.state.labels[a];if(o.statementStart===t.start)o.statementStart=this.sourceToOffsetPos(this.state.start),o.kind=n;else break}return this.state.labels.push({name:e,kind:n,statementStart:this.sourceToOffsetPos(this.state.start)}),t.body=r&8?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),t.label=i,this.finishNode(t,"LabeledStatement")}parseExpressionStatement(t,e,i){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")}parseBlock(t=!1,e=!0,i){const r=this.startNode();return t&&this.state.strictErrors.clear(),this.expect(5),e&&this.scope.enter(0),this.parseBlockBody(r,t,!1,8,i),e&&this.scope.exit(),this.finishNode(r,"BlockStatement")}isValidDirective(t){return t.type==="ExpressionStatement"&&t.expression.type==="StringLiteral"&&!t.expression.extra.parenthesized}parseBlockBody(t,e,i,r,n){const a=t.body=[],o=t.directives=[];this.parseBlockOrModuleBlockBody(a,e?o:void 0,i,r,n)}parseBlockOrModuleBlockBody(t,e,i,r,n){const a=this.state.strict;let o=!1,l=!1;for(;!this.match(r);){const c=i?this.parseModuleItem():this.parseStatementListItem();if(e&&!l){if(this.isValidDirective(c)){const u=this.stmtToDirective(c);e.push(u),!o&&u.value.value==="use strict"&&(o=!0,this.setStrict(!0));continue}l=!0,this.state.strictErrors.clear()}t.push(c)}n?.call(this,o),a||this.setStrict(!1),this.next()}parseFor(t,e){return t.init=e,this.semicolon(!1),t.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),t.update=this.match(11)?null:this.parseExpression(),this.expect(11),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(t,"ForStatement")}parseForIn(t,e,i){const r=this.match(58);return this.next(),r?i!==null&&this.unexpected(i):t.await=i!==null,e.type==="VariableDeclaration"&&e.declarations[0].init!=null&&(!r||!this.options.annexB||this.state.strict||e.kind!=="var"||e.declarations[0].id.type!=="Identifier")&&this.raise(y.ForInOfLoopInitializer,e,{type:r?"ForInStatement":"ForOfStatement"}),e.type==="AssignmentPattern"&&this.raise(y.InvalidLhs,e,{ancestor:{type:"ForStatement"}}),t.left=e,t.right=r?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(t,r?"ForInStatement":"ForOfStatement")}parseVar(t,e,i,r=!1){const n=t.declarations=[];for(t.kind=i;;){const a=this.startNode();if(this.parseVarId(a,i),a.init=this.eat(29)?e?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,a.init===null&&!r&&(a.id.type!=="Identifier"&&!(e&&(this.match(58)||this.isContextual(102)))?this.raise(y.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"destructuring"}):(i==="const"||i==="using"||i==="await using")&&!(this.match(58)||this.isContextual(102))&&this.raise(y.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:i})),n.push(this.finishNode(a,"VariableDeclarator")),!this.eat(12))break}return t}parseVarId(t,e){const i=this.parseBindingAtom();(e==="using"||e==="await using")&&(i.type==="ArrayPattern"||i.type==="ObjectPattern")&&this.raise(y.UsingDeclarationHasBindingPattern,i.loc.start),this.checkLVal(i,{type:"VariableDeclarator"},e==="var"?5:8201),t.id=i}parseAsyncFunctionExpression(t){return this.parseFunction(t,8)}parseFunction(t,e=0){const i=e&2,r=!!(e&1),n=r&&!(e&4),a=!!(e&8);this.initFunction(t,a),this.match(55)&&(i&&this.raise(y.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),t.generator=!0),r&&(t.id=this.parseFunctionId(n));const o=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(2),this.prodParam.enter(hn(a,t.generator)),r||(t.id=this.parseFunctionId()),this.parseFunctionParams(t,!1),this.withSmartMixTopicForbiddingContext(()=>{this.parseFunctionBodyAndFinish(t,r?"FunctionDeclaration":"FunctionExpression")}),this.prodParam.exit(),this.scope.exit(),r&&!i&&this.registerFunctionStatementId(t),this.state.maybeInArrowParameters=o,t}parseFunctionId(t){return t||me(this.state.type)?this.parseIdentifier():null}parseFunctionParams(t,e){this.expect(10),this.expressionScope.enter(ry()),t.params=this.parseBindingList(11,41,2|(e?4:0)),this.expressionScope.exit()}registerFunctionStatementId(t){t.id&&this.scope.declareName(t.id.name,!this.options.annexB||this.state.strict||t.generator||t.async?this.scope.treatFunctionsAsVar?5:8201:17,t.id.loc.start)}parseClass(t,e,i){this.next();const r=this.state.strict;return this.state.strict=!0,this.parseClassId(t,e,i),this.parseClassSuper(t),t.body=this.parseClassBody(!!t.superClass,r),this.finishNode(t,e?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}nameIsConstructor(t){return t.type==="Identifier"&&t.name==="constructor"||t.type==="StringLiteral"&&t.value==="constructor"}isNonstaticConstructor(t){return!t.computed&&!t.static&&this.nameIsConstructor(t.key)}parseClassBody(t,e){this.classScope.enter();const i={hadConstructor:!1,hadSuperClass:t};let r=[];const n=this.startNode();if(n.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext(()=>{for(;!this.match(8);){if(this.eat(13)){if(r.length>0)throw this.raise(y.DecoratorSemicolon,this.state.lastTokEndLoc);continue}if(this.match(26)){r.push(this.parseDecorator());continue}const a=this.startNode();r.length&&(a.decorators=r,this.resetStartLocationFromNode(a,r[0]),r=[]),this.parseClassMember(n,a,i),a.kind==="constructor"&&a.decorators&&a.decorators.length>0&&this.raise(y.DecoratorConstructor,a)}}),this.state.strict=e,this.next(),r.length)throw this.raise(y.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(n,"ClassBody")}parseClassMemberFromModifier(t,e){const i=this.parseIdentifier(!0);if(this.isClassMethod()){const r=e;return r.kind="method",r.computed=!1,r.key=i,r.static=!1,this.pushClassMethod(t,r,!1,!1,!1,!1),!0}else if(this.isClassProperty()){const r=e;return r.computed=!1,r.key=i,r.static=!1,t.body.push(this.parseClassProperty(r)),!0}return this.resetPreviousNodeTrailingComments(i),!1}parseClassMember(t,e,i){const r=this.isContextual(106);if(r){if(this.parseClassMemberFromModifier(t,e))return;if(this.eat(5)){this.parseClassStaticBlock(t,e);return}}this.parseClassMemberWithIsStatic(t,e,i,r)}parseClassMemberWithIsStatic(t,e,i,r){const n=e,a=e,o=e,l=e,c=e,u=n,h=n;if(e.static=r,this.parsePropertyNamePrefixOperator(e),this.eat(55)){u.kind="method";const C=this.match(139);if(this.parseClassElementName(u),C){this.pushClassPrivateMethod(t,a,!0,!1);return}this.isNonstaticConstructor(n)&&this.raise(y.ConstructorIsGenerator,n.key),this.pushClassMethod(t,n,!0,!1,!1,!1);return}const p=!this.state.containsEsc&&me(this.state.type),f=this.parseClassElementName(e),m=p?f.name:null,b=this.isPrivateName(f),_=this.state.startLoc;if(this.parsePostMemberNameModifiers(h),this.isClassMethod()){if(u.kind="method",b){this.pushClassPrivateMethod(t,a,!1,!1);return}const C=this.isNonstaticConstructor(n);let w=!1;C&&(n.kind="constructor",i.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(y.DuplicateConstructor,f),C&&this.hasPlugin("typescript")&&e.override&&this.raise(y.OverrideOnConstructor,f),i.hadConstructor=!0,w=i.hadSuperClass),this.pushClassMethod(t,n,!1,!1,C,w)}else if(this.isClassProperty())b?this.pushClassPrivateProperty(t,l):this.pushClassProperty(t,o);else if(m==="async"&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(f);const C=this.eat(55);h.optional&&this.unexpected(_),u.kind="method";const w=this.match(139);this.parseClassElementName(u),this.parsePostMemberNameModifiers(h),w?this.pushClassPrivateMethod(t,a,C,!0):(this.isNonstaticConstructor(n)&&this.raise(y.ConstructorIsAsync,n.key),this.pushClassMethod(t,n,C,!0,!1,!1))}else if((m==="get"||m==="set")&&!(this.match(55)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(f),u.kind=m;const C=this.match(139);this.parseClassElementName(n),C?this.pushClassPrivateMethod(t,a,!1,!1):(this.isNonstaticConstructor(n)&&this.raise(y.ConstructorIsAccessor,n.key),this.pushClassMethod(t,n,!1,!1,!1,!1)),this.checkGetterSetterParams(n)}else if(m==="accessor"&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(f);const C=this.match(139);this.parseClassElementName(o),this.pushClassAccessorProperty(t,c,C)}else this.isLineTerminator()?b?this.pushClassPrivateProperty(t,l):this.pushClassProperty(t,o):this.unexpected()}parseClassElementName(t){const{type:e,value:i}=this.state;if((e===132||e===134)&&t.static&&i==="prototype"&&this.raise(y.StaticPrototype,this.state.startLoc),e===139){i==="constructor"&&this.raise(y.ConstructorClassPrivateField,this.state.startLoc);const r=this.parsePrivateName();return t.key=r,r}return this.parsePropertyName(t),t.key}parseClassStaticBlock(t,e){var i;this.scope.enter(208);const r=this.state.labels;this.state.labels=[],this.prodParam.enter(0);const n=e.body=[];this.parseBlockOrModuleBlockBody(n,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=r,t.body.push(this.finishNode(e,"StaticBlock")),(i=e.decorators)!=null&&i.length&&this.raise(y.DecoratorStaticBlock,e)}pushClassProperty(t,e){!e.computed&&this.nameIsConstructor(e.key)&&this.raise(y.ConstructorClassField,e.key),t.body.push(this.parseClassProperty(e))}pushClassPrivateProperty(t,e){const i=this.parseClassPrivateProperty(e);t.body.push(i),this.classScope.declarePrivateName(this.getPrivateNameSV(i.key),0,i.key.loc.start)}pushClassAccessorProperty(t,e,i){!i&&!e.computed&&this.nameIsConstructor(e.key)&&this.raise(y.ConstructorClassField,e.key);const r=this.parseClassAccessorProperty(e);t.body.push(r),i&&this.classScope.declarePrivateName(this.getPrivateNameSV(r.key),0,r.key.loc.start)}pushClassMethod(t,e,i,r,n,a){t.body.push(this.parseMethod(e,i,r,n,a,"ClassMethod",!0))}pushClassPrivateMethod(t,e,i,r){const n=this.parseMethod(e,i,r,!1,!1,"ClassPrivateMethod",!0);t.body.push(n);const a=n.kind==="get"?n.static?6:2:n.kind==="set"?n.static?5:1:0;this.declareClassPrivateMethodInScope(n,a)}declareClassPrivateMethodInScope(t,e){this.classScope.declarePrivateName(this.getPrivateNameSV(t.key),e,t.key.loc.start)}parsePostMemberNameModifiers(t){}parseClassPrivateProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassPrivateProperty")}parseClassProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassProperty")}parseClassAccessorProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassAccessorProperty")}parseInitializer(t){this.scope.enter(80),this.expressionScope.enter(Zu()),this.prodParam.enter(0),t.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(t,e,i,r=8331){if(me(this.state.type))t.id=this.parseIdentifier(),e&&this.declareNameFromIdentifier(t.id,r);else if(i||!e)t.id=null;else throw this.raise(y.MissingClassName,this.state.startLoc)}parseClassSuper(t){t.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(t,e){const i=this.parseMaybeImportPhase(t,!0),r=this.maybeParseExportDefaultSpecifier(t,i),n=!r||this.eat(12),a=n&&this.eatExportStar(t),o=a&&this.maybeParseExportNamespaceSpecifier(t),l=n&&(!o||this.eat(12)),c=r||a;if(a&&!o){if(r&&this.unexpected(),e)throw this.raise(y.UnsupportedDecoratorExport,t);return this.parseExportFrom(t,!0),this.finishNode(t,"ExportAllDeclaration")}const u=this.maybeParseExportNamedSpecifiers(t);r&&n&&!a&&!u&&this.unexpected(null,5),o&&l&&this.unexpected(null,98);let h;if(c||u){if(h=!1,e)throw this.raise(y.UnsupportedDecoratorExport,t);this.parseExportFrom(t,c)}else h=this.maybeParseExportDeclaration(t);if(c||u||h){var p;const f=t;if(this.checkExport(f,!0,!1,!!f.source),((p=f.declaration)==null?void 0:p.type)==="ClassDeclaration")this.maybeTakeDecorators(e,f.declaration,f);else if(e)throw this.raise(y.UnsupportedDecoratorExport,t);return this.finishNode(f,"ExportNamedDeclaration")}if(this.eat(65)){const f=t,m=this.parseExportDefaultExpression();if(f.declaration=m,m.type==="ClassDeclaration")this.maybeTakeDecorators(e,m,f);else if(e)throw this.raise(y.UnsupportedDecoratorExport,t);return this.checkExport(f,!0,!0),this.finishNode(f,"ExportDefaultDeclaration")}this.unexpected(null,5)}eatExportStar(t){return this.eat(55)}maybeParseExportDefaultSpecifier(t,e){if(e||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",e?.loc.start);const i=e||this.parseIdentifier(!0),r=this.startNodeAtNode(i);return r.exported=i,t.specifiers=[this.finishNode(r,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(t){if(this.isContextual(93)){var e,i;(i=(e=t).specifiers)!=null||(e.specifiers=[]);const r=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),r.exported=this.parseModuleExportName(),t.specifiers.push(this.finishNode(r,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(t){if(this.match(5)){const e=t;e.specifiers||(e.specifiers=[]);const i=e.exportKind==="type";return e.specifiers.push(...this.parseExportSpecifiers(i)),e.source=null,e.declaration=null,this.hasPlugin("importAssertions")&&(e.assertions=[]),!0}return!1}maybeParseExportDeclaration(t){return this.shouldParseExportDeclaration()?(t.specifiers=[],t.source=null,this.hasPlugin("importAssertions")&&(t.assertions=[]),t.declaration=this.parseExportDeclaration(t),!0):!1}isAsyncFunction(){if(!this.isContextual(95))return!1;const t=this.nextTokenInLineStart();return this.isUnparsedContextual(t,"function")}parseExportDefaultExpression(){const t=this.startNode();if(this.match(68))return this.next(),this.parseFunction(t,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(t,13);if(this.match(80))return this.parseClass(t,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(y.DecoratorBeforeExport,this.state.startLoc),this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0);if(this.match(75)||this.match(74)||this.isLet())throw this.raise(y.UnsupportedDefaultExport,this.state.startLoc);const e=this.parseMaybeAssignAllowIn();return this.semicolon(),e}parseExportDeclaration(t){return this.match(80)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){const{type:t}=this.state;if(me(t)){if(t===95&&!this.state.containsEsc||t===100)return!1;if((t===130||t===129)&&!this.state.containsEsc){const{type:r}=this.lookahead();if(me(r)&&r!==98||r===5)return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;const e=this.nextTokenStart(),i=this.isUnparsedContextual(e,"from");if(this.input.charCodeAt(e)===44||me(this.state.type)&&i)return!0;if(this.match(65)&&i){const r=this.input.charCodeAt(this.nextTokenStartSince(e+4));return r===34||r===39}return!1}parseExportFrom(t,e){this.eatContextual(98)?(t.source=this.parseImportSource(),this.checkExport(t),this.maybeParseImportAttributes(t),this.checkJSONModuleImport(t)):e&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){const{type:t}=this.state;return t===26&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))?(this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(y.DecoratorBeforeExport,this.state.startLoc),!0):this.isContextual(107)?(this.raise(y.UsingDeclarationExport,this.state.startLoc),!0):this.isContextual(96)&&this.startsAwaitUsing()?(this.raise(y.UsingDeclarationExport,this.state.startLoc),!0):t===74||t===75||t===68||t===80||this.isLet()||this.isAsyncFunction()}checkExport(t,e,i,r){if(e){var n;if(i){if(this.checkDuplicateExports(t,"default"),this.hasPlugin("exportDefaultFrom")){var a;const o=t.declaration;o.type==="Identifier"&&o.name==="from"&&o.end-o.start===4&&!((a=o.extra)!=null&&a.parenthesized)&&this.raise(y.ExportDefaultFromAsIdentifier,o)}}else if((n=t.specifiers)!=null&&n.length)for(const o of t.specifiers){const{exported:l}=o,c=l.type==="Identifier"?l.name:l.value;if(this.checkDuplicateExports(o,c),!r&&o.local){const{local:u}=o;u.type!=="Identifier"?this.raise(y.ExportBindingIsString,o,{localName:u.value,exportName:c}):(this.checkReservedWord(u.name,u.loc.start,!0,!1),this.scope.checkLocalExport(u))}}else if(t.declaration){const o=t.declaration;if(o.type==="FunctionDeclaration"||o.type==="ClassDeclaration"){const{id:l}=o;if(!l)throw new Error("Assertion failure");this.checkDuplicateExports(t,l.name)}else if(o.type==="VariableDeclaration")for(const l of o.declarations)this.checkDeclaration(l.id)}}}checkDeclaration(t){if(t.type==="Identifier")this.checkDuplicateExports(t,t.name);else if(t.type==="ObjectPattern")for(const e of t.properties)this.checkDeclaration(e);else if(t.type==="ArrayPattern")for(const e of t.elements)e&&this.checkDeclaration(e);else t.type==="ObjectProperty"?this.checkDeclaration(t.value):t.type==="RestElement"?this.checkDeclaration(t.argument):t.type==="AssignmentPattern"&&this.checkDeclaration(t.left)}checkDuplicateExports(t,e){this.exportedIdentifiers.has(e)&&(e==="default"?this.raise(y.DuplicateDefaultExport,t):this.raise(y.DuplicateExport,t,{exportName:e})),this.exportedIdentifiers.add(e)}parseExportSpecifiers(t){const e=[];let i=!0;for(this.expect(5);!this.eat(8);){if(i)i=!1;else if(this.expect(12),this.eat(8))break;const r=this.isContextual(130),n=this.match(134),a=this.startNode();a.local=this.parseModuleExportName(),e.push(this.parseExportSpecifier(a,n,t,r))}return e}parseExportSpecifier(t,e,i,r){return this.eatContextual(93)?t.exported=this.parseModuleExportName():e?t.exported=uy(t.local):t.exported||(t.exported=Gt(t.local)),this.finishNode(t,"ExportSpecifier")}parseModuleExportName(){if(this.match(134)){const t=this.parseStringLiteral(this.state.value),e=By.exec(t.value);return e&&this.raise(y.ModuleExportNameHasLoneSurrogate,t,{surrogateCharCode:e[0].charCodeAt(0)}),t}return this.parseIdentifier(!0)}isJSONModuleImport(t){return t.assertions!=null?t.assertions.some(({key:e,value:i})=>i.value==="json"&&(e.type==="Identifier"?e.name==="type":e.value==="type")):!1}checkImportReflection(t){const{specifiers:e}=t,i=e.length===1?e[0].type:null;if(t.phase==="source")i!=="ImportDefaultSpecifier"&&this.raise(y.SourcePhaseImportRequiresDefault,e[0].loc.start);else if(t.phase==="defer")i!=="ImportNamespaceSpecifier"&&this.raise(y.DeferImportRequiresNamespace,e[0].loc.start);else if(t.module){var r;i!=="ImportDefaultSpecifier"&&this.raise(y.ImportReflectionNotBinding,e[0].loc.start),((r=t.assertions)==null?void 0:r.length)>0&&this.raise(y.ImportReflectionHasAssertion,e[0].loc.start)}}checkJSONModuleImport(t){if(this.isJSONModuleImport(t)&&t.type!=="ExportAllDeclaration"){const{specifiers:e}=t;if(e!=null){const i=e.find(r=>{let n;if(r.type==="ExportSpecifier"?n=r.local:r.type==="ImportSpecifier"&&(n=r.imported),n!==void 0)return n.type==="Identifier"?n.name!=="default":n.value!=="default"});i!==void 0&&this.raise(y.ImportJSONBindingNotDefault,i.loc.start)}}}isPotentialImportPhase(t){return t?!1:this.isContextual(105)||this.isContextual(97)||this.isContextual(127)}applyImportPhase(t,e,i,r){e||(i==="module"?(this.expectPlugin("importReflection",r),t.module=!0):this.hasPlugin("importReflection")&&(t.module=!1),i==="source"?(this.expectPlugin("sourcePhaseImports",r),t.phase="source"):i==="defer"?(this.expectPlugin("deferredImportEvaluation",r),t.phase="defer"):this.hasPlugin("sourcePhaseImports")&&(t.phase=null))}parseMaybeImportPhase(t,e){if(!this.isPotentialImportPhase(e))return this.applyImportPhase(t,e,null),null;const i=this.parseIdentifier(!0),{type:r}=this.state;return(Nt(r)?r!==98||this.lookaheadCharCode()===102:r!==12)?(this.resetPreviousIdentifierLeadingComments(i),this.applyImportPhase(t,e,i.name,i.loc.start),null):(this.applyImportPhase(t,e,null),i)}isPrecedingIdImportPhase(t){const{type:e}=this.state;return me(e)?e!==98||this.lookaheadCharCode()===102:e!==12}parseImport(t){return this.match(134)?this.parseImportSourceAndAttributes(t):this.parseImportSpecifiersAndAfter(t,this.parseMaybeImportPhase(t,!1))}parseImportSpecifiersAndAfter(t,e){t.specifiers=[];const r=!this.maybeParseDefaultImportSpecifier(t,e)||this.eat(12),n=r&&this.maybeParseStarImportSpecifier(t);return r&&!n&&this.parseNamedImportSpecifiers(t),this.expectContextual(98),this.parseImportSourceAndAttributes(t)}parseImportSourceAndAttributes(t){var e;return(e=t.specifiers)!=null||(t.specifiers=[]),t.source=this.parseImportSource(),this.maybeParseImportAttributes(t),this.checkImportReflection(t),this.checkJSONModuleImport(t),this.semicolon(),this.finishNode(t,"ImportDeclaration")}parseImportSource(){return this.match(134)||this.unexpected(),this.parseExprAtom()}parseImportSpecifierLocal(t,e,i){e.local=this.parseIdentifier(),t.specifiers.push(this.finishImportSpecifier(e,i))}finishImportSpecifier(t,e,i=8201){return this.checkLVal(t.local,{type:e},i),this.finishNode(t,e)}parseImportAttributes(){this.expect(5);const t=[],e=new Set;do{if(this.match(8))break;const i=this.startNode(),r=this.state.value;if(e.has(r)&&this.raise(y.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:r}),e.add(r),this.match(134)?i.key=this.parseStringLiteral(r):i.key=this.parseIdentifier(!0),this.expect(14),!this.match(134))throw this.raise(y.ModuleAttributeInvalidValue,this.state.startLoc);i.value=this.parseStringLiteral(this.state.value),t.push(this.finishNode(i,"ImportAttribute"))}while(this.eat(12));return this.expect(8),t}parseModuleAttributes(){const t=[],e=new Set;do{const i=this.startNode();if(i.key=this.parseIdentifier(!0),i.key.name!=="type"&&this.raise(y.ModuleAttributeDifferentFromType,i.key),e.has(i.key.name)&&this.raise(y.ModuleAttributesWithDuplicateKeys,i.key,{key:i.key.name}),e.add(i.key.name),this.expect(14),!this.match(134))throw this.raise(y.ModuleAttributeInvalidValue,this.state.startLoc);i.value=this.parseStringLiteral(this.state.value),t.push(this.finishNode(i,"ImportAttribute"))}while(this.eat(12));return t}maybeParseImportAttributes(t){let e;var i=!1;if(this.match(76)){if(this.hasPrecedingLineBreak()&&this.lookaheadCharCode()===40)return;this.next(),this.hasPlugin("moduleAttributes")?e=this.parseModuleAttributes():e=this.parseImportAttributes(),i=!0}else this.isContextual(94)&&!this.hasPrecedingLineBreak()?(!this.hasPlugin("deprecatedImportAssert")&&!this.hasPlugin("importAssertions")&&this.raise(y.ImportAttributesUseAssert,this.state.startLoc),this.hasPlugin("importAssertions")||this.addExtra(t,"deprecatedAssertSyntax",!0),this.next(),e=this.parseImportAttributes()):e=[];!i&&this.hasPlugin("importAssertions")?t.assertions=e:t.attributes=e}maybeParseDefaultImportSpecifier(t,e){if(e){const i=this.startNodeAtNode(e);return i.local=e,t.specifiers.push(this.finishImportSpecifier(i,"ImportDefaultSpecifier")),!0}else if(Nt(this.state.type))return this.parseImportSpecifierLocal(t,this.startNode(),"ImportDefaultSpecifier"),!0;return!1}maybeParseStarImportSpecifier(t){if(this.match(55)){const e=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(t,e,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(t){let e=!0;for(this.expect(5);!this.eat(8);){if(e)e=!1;else{if(this.eat(14))throw this.raise(y.DestructureNamedImport,this.state.startLoc);if(this.expect(12),this.eat(8))break}const i=this.startNode(),r=this.match(134),n=this.isContextual(130);i.imported=this.parseModuleExportName();const a=this.parseImportSpecifier(i,r,t.importKind==="type"||t.importKind==="typeof",n,void 0);t.specifiers.push(a)}}parseImportSpecifier(t,e,i,r,n){if(this.eatContextual(93))t.local=this.parseIdentifier();else{const{imported:a}=t;if(e)throw this.raise(y.ImportBindingIsString,t,{importName:a.value});this.checkReservedWord(a.name,t.loc.start,!0,!0),t.local||(t.local=Gt(a))}return this.finishImportSpecifier(t,"ImportSpecifier",n)}isThisParam(t){return t.type==="Identifier"&&t.name==="this"}}class uh extends $y{constructor(t,e,i){t=Dy(t),super(t,e),this.options=t,this.initializeScopes(),this.plugins=i,this.filename=t.sourceFilename,this.startIndex=t.startIndex}getScopeHandler(){return Ao}parse(){this.enterInitialScopes();const t=this.startNode(),e=this.startNode();return this.nextToken(),t.errors=null,this.parseTopLevel(t,e),t.errors=this.state.errors,t.comments.length=this.state.commentsLen,t}}function Vy(s,t){var e;if(((e=t)==null?void 0:e.sourceType)==="unambiguous"){t=Object.assign({},t);try{t.sourceType="module";const i=tr(t,s),r=i.parse();if(i.sawUnambiguousESM)return r;if(i.ambiguousScriptDifferentAst)try{return t.sourceType="script",tr(t,s).parse()}catch{}else r.program.sourceType="script";return r}catch(i){try{return t.sourceType="script",tr(t,s).parse()}catch{}throw i}}else return tr(t,s).parse()}function jy(s,t){const e=tr(t,s);return e.options.strictMode&&(e.state.strict=!0),e.getExpression()}function Hy(s){const t={};for(const e of Object.keys(s))t[e]=zt(s[e]);return t}const Ky=Hy(Sm);function tr(s,t){let e=uh;const i=new Map;if(s!=null&&s.plugins){for(const r of s.plugins){let n,a;typeof r=="string"?n=r:[n,a]=r,i.has(n)||i.set(n,a||{})}Oy(i),e=qy(i)}return new e(s,t,i)}const hh=new Map;function qy(s){const t=[];for(const r of My)s.has(r)&&t.push(r);const e=t.join("|");let i=hh.get(e);if(!i){i=uh;for(const r of t)i=ch[r](i);hh.set(e,i)}return i}var Wy=sn.parse=Vy;sn.parseExpression=jy,sn.tokTypes=Ky;function zy(s,t){const e=s.filter(({type:i})=>i==="ImportDeclaration").map(i=>t.slice(i.start,i.end));return{importsCode:`${e.join(`
|
|
9
9
|
`)}
|
|
10
10
|
`,setupCode:`${t.replace(new RegExp(e.join("|"),"g"),"").trim()}
|
|
11
|
-
`}}function Jy(s,t){return new Promise(e=>{const i=Object.create(null),r=new MutationObserver(a=>{for(const o of a)o.addedNodes.forEach(l=>{l instanceof Element&&s({node:l,discovery:i,announce:n})})});r.observe(document,{childList:!0,subtree:!0}),document.addEventListener("DOMContentLoaded",()=>{t?.({discovery:i,announce:n}),n()});function n(){e(i),r.disconnect()}})}function Gy(s,t){try{const e=new DOMParser().parseFromString(`<body>${t}</body>`,"text/html").body.firstElementChild,i=e?.tagName===s.tagName,r=s.getAttributeNames(),n=e?.getAttributeNames()??[],a=new Set(n).isSubsetOf(new Set(r));return i&&a}catch{return!1}}function mi(s,t=s){return function(e){const i=Object.getOwnPropertySymbols(e).find(r=>r.description==="default");return(e[t]??(i&&e[i]))?.(s)}}function Xy(s){return s.flatMap(e=>mi(e,e.type)({FunctionDeclaration:({id:i})=>i?[i.name]:[],VariableDeclaration:i=>i.declarations.flatMap(({id:r})=>t(r)),[Symbol("default")]:()=>[]}));function t(e){const i=r=>t(r.argument);return mi(e,e?.type)({Identifier:r=>[r.name],AssignmentPattern:r=>t(r.left),ObjectPattern:r=>r.properties.flatMap(n=>mi(n,n.type)({ObjectProperty:a=>t(a.value),RestElement:i}),[]),ArrayPattern:r=>r.elements.flatMap(n=>mi(n,n?.type??0)({0:()=>[],RestElement:i,[Symbol("default")]:a=>t(a)})),[Symbol("default")]:()=>[]})}}function Yy(s){return s.some(t=>mi(t,t.type)({ExpressionStatement:e=>e.expression.type==="AwaitExpression",VariableDeclaration:e=>e.declarations.some(i=>i.init?.type==="AwaitExpression")}))}function Qy(s){const t=Wy(s,{sourceType:"module"}).program.body;return{extractImport:()=>zy(t,s),isAsyncModule:()=>Yy(t),getGlobalVars:()=>Xy(t)}}function Zy(s){const t=s?.innerHTML??"";mi(s?.tagName??0)({0:()=>{s=document.createElement("script"),document.head.appendChild(s)},SCRIPT:()=>s.innerHTML=""}),s.type="module";const{extractImport:e,getGlobalVars:i,isAsyncModule:r}=Qy(t);return{scriptEl:s,retNames:i(),isAsync:r(),...e()}}function eg(s){const t=s?.innerHTML??"not found <template>";return s?.remove(),t}function ph(s,t,e,i){return{str:s,parse:t,logType:e,beNoHere:i.replace(/%s/g,`${s} is not supposed to be here`)}}const Fs=ph("<script setup>",Zy,{lose:console.warn,excess:console.warn},"/* %s */"),sr=ph("<template>",eg,{lose:console.error,excess:console.warn},"<!-- %s -->"),fh=[Fs,sr];function dh(s){const{
|
|
11
|
+
`}}function Jy(s,t){return new Promise(e=>{const i=Object.create(null),r=new MutationObserver(a=>{for(const o of a)o.addedNodes.forEach(l=>{l instanceof Element&&s({node:l,discovery:i,announce:n})})});r.observe(document,{childList:!0,subtree:!0}),document.addEventListener("DOMContentLoaded",()=>{t?.({discovery:i,announce:n}),n()});function n(){e(i),r.disconnect()}})}function Gy(s,t){try{const e=new DOMParser().parseFromString(`<body>${t}</body>`,"text/html").body.firstElementChild,i=e?.tagName===s.tagName,r=s.getAttributeNames(),n=e?.getAttributeNames()??[],a=new Set(n).isSubsetOf(new Set(r));return i&&a}catch{return!1}}function mi(s,t=s){return function(e){const i=Object.getOwnPropertySymbols(e).find(r=>r.description==="default");return(e[t]??(i&&e[i]))?.(s)}}function Xy(s){return s.flatMap(e=>mi(e,e.type)({FunctionDeclaration:({id:i})=>i?[i.name]:[],VariableDeclaration:i=>i.declarations.flatMap(({id:r})=>t(r)),[Symbol("default")]:()=>[]}));function t(e){const i=r=>t(r.argument);return mi(e,e?.type)({Identifier:r=>[r.name],AssignmentPattern:r=>t(r.left),ObjectPattern:r=>r.properties.flatMap(n=>mi(n,n.type)({ObjectProperty:a=>t(a.value),RestElement:i}),[]),ArrayPattern:r=>r.elements.flatMap(n=>mi(n,n?.type??0)({0:()=>[],RestElement:i,[Symbol("default")]:a=>t(a)})),[Symbol("default")]:()=>[]})}}function Yy(s){return s.some(t=>mi(t,t.type)({ExpressionStatement:e=>e.expression.type==="AwaitExpression",VariableDeclaration:e=>e.declarations.some(i=>i.init?.type==="AwaitExpression")}))}function Qy(s){const t=Wy(s,{sourceType:"module"}).program.body;return{extractImport:()=>zy(t,s),isAsyncModule:()=>Yy(t),getGlobalVars:()=>Xy(t)}}function Zy(s){const t=s?.innerHTML??"";mi(s?.tagName??0)({0:()=>{s=document.createElement("script"),document.head.appendChild(s)},SCRIPT:()=>s.innerHTML=""}),s.type="module";const{extractImport:e,getGlobalVars:i,isAsyncModule:r}=Qy(t);return{scriptEl:s,retNames:i(),isAsync:r(),...e()}}function eg(s){const t=s?.innerHTML??"not found <template>";return s?.remove(),t}function ph(s,t,e,i){return{str:s,parse:t,logType:e,beNoHere:i.replace(/%s/g,`${s} is not supposed to be here`)}}const Fs=ph("<script setup>",Zy,{lose:console.warn,excess:console.warn},"/* %s */"),sr=ph("<template>",eg,{lose:console.error,excess:console.warn},"<!-- %s -->"),fh=[Fs,sr];function dh(s){const{parse:t,logType:e,beNoHere:i}=s;return{...e,beNoHere:r=>r.innerHTML=i,parse:t}}const _o={[Fs.str]:dh(Fs),[sr.str]:dh(sr)},tg=({discovery:s})=>{for(const{str:t}of fh){const{count:e}=s[t],{lose:i,excess:r,parse:n}=_o[t];e===0&&(i(`not found ${t} in top level for document`),s[t].parsed=n()),e>1&&r(`only one ${t} is allowed in top level for document`)}};function mh(s,t){return{count:s,parsed:t}}const sg={[Fs.str]:mh(0,null),[sr.str]:mh(0,null)},ig=({node:s,discovery:t})=>{let e;(o=>(o[o.WITHOUT=0]="WITHOUT",o[o.RELATE=1]="RELATE",o[o.CORRECT=2]="CORRECT"))(e||(e={}));const{WITHOUT:i,RELATE:r,CORRECT:n}=e;Object.assign(t,sg);function a(o){return Gy(s,o)?s.parentElement===document.head?n:r:i}for(const{str:o}of fh){if(a(o)!==n)continue;const{parse:l,beNoHere:c}=_o[o];if(t[o].count++,t[o].count!==1){c(s);continue}t[o].parsed=l(s)}a(Fs.str)===r&&_o[Fs.str].beNoHere(s)},rg=`/***************************************\r
|
|
12
12
|
** _ _ **\r
|
|
13
13
|
** ___ ___| |_ _ _ _ __ (_)_ __ **\r
|
|
14
14
|
** / __|/ _ \\ __| | | | '_ \\| | '_ \\ **\r
|
package/dist/main.prod.js
CHANGED
|
@@ -8,7 +8,7 @@ var Vue=function(v){"use strict";var Br={};Object.defineProperty(Br,"__esModule"
|
|
|
8
8
|
`),cooked:n===null?null:n.slice(1,c)},o.tail=l,this.next();const u=this.finishNode(o,"TemplateElement");return this.resetEndLocation(u,nt(this.state.lastTokEndLoc,c)),u}parseTemplate(t){const e=this.startNode();let i=this.parseTemplateElement(t);const r=[i],n=[];for(;!i.tail;)n.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),r.push(i=this.parseTemplateElement(t));return e.expressions=n,e.quasis=r,this.finishNode(e,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(t,e,i,r){i&&this.expectPlugin("recordAndTuple");const n=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;const a=Object.create(null);let o=!0;const l=this.startNode();for(l.properties=[],this.next();!this.match(t);){if(o)o=!1;else if(this.expect(12),this.match(t)){this.addTrailingCommaExtraToNode(l);break}let h;e?h=this.parseBindingProperty():(h=this.parsePropertyDefinition(r),this.checkProto(h,i,a,r)),i&&!this.isObjectProperty(h)&&h.type!=="SpreadElement"&&this.raise(b.InvalidRecordProperty,h),h.shorthand&&this.addExtra(h,"shorthand",!0),l.properties.push(h)}this.next(),this.state.inFSharpPipelineDirectBody=n;let c="ObjectExpression";return e?c="ObjectPattern":i&&(c="RecordExpression"),this.finishNode(l,c)}addTrailingCommaExtraToNode(t){this.addExtra(t,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(t,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(t){return!t.computed&&t.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(t){let e=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(b.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)e.push(this.parseDecorator());const i=this.startNode();let r=!1,n=!1,a;if(this.match(21))return e.length&&this.unexpected(),this.parseSpread();e.length&&(i.decorators=e,e=[]),i.method=!1,t&&(a=this.state.startLoc);let o=this.eat(55);this.parsePropertyNamePrefixOperator(i);const l=this.state.containsEsc;if(this.parsePropertyName(i,t),!o&&!l&&this.maybeAsyncOrAccessorProp(i)){const{key:c}=i,h=c.name;h==="async"&&!this.hasPrecedingLineBreak()&&(r=!0,this.resetPreviousNodeTrailingComments(c),o=this.eat(55),this.parsePropertyName(i)),(h==="get"||h==="set")&&(n=!0,this.resetPreviousNodeTrailingComments(c),i.kind=h,this.match(55)&&(o=!0,this.raise(b.AccessorIsGenerator,this.state.curPosition(),{kind:h}),this.next()),this.parsePropertyName(i))}return this.parseObjPropValue(i,a,o,r,!1,n,t)}getGetterSetterExpectedParamCount(t){return t.kind==="get"?0:1}getObjectOrClassMethodParams(t){return t.params}checkGetterSetterParams(t){var e;const i=this.getGetterSetterExpectedParamCount(t),r=this.getObjectOrClassMethodParams(t);r.length!==i&&this.raise(t.kind==="get"?b.BadGetterArity:b.BadSetterArity,t),t.kind==="set"&&((e=r[r.length-1])==null?void 0:e.type)==="RestElement"&&this.raise(b.BadSetterRestParameter,t)}parseObjectMethod(t,e,i,r,n){if(n){const a=this.parseMethod(t,e,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(a),a}if(i||e||this.match(10))return r&&this.unexpected(),t.kind="method",t.method=!0,this.parseMethod(t,e,i,!1,!1,"ObjectMethod")}parseObjectProperty(t,e,i,r){if(t.shorthand=!1,this.eat(14))return t.value=i?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowIn(r),this.finishNode(t,"ObjectProperty");if(!t.computed&&t.key.type==="Identifier"){if(this.checkReservedWord(t.key.name,t.key.loc.start,!0,!1),i)t.value=this.parseMaybeDefault(e,Xt(t.key));else if(this.match(29)){const n=this.state.startLoc;r!=null?r.shorthandAssignLoc===null&&(r.shorthandAssignLoc=n):this.raise(b.InvalidCoverInitializedName,n),t.value=this.parseMaybeDefault(e,Xt(t.key))}else t.value=Xt(t.key);return t.shorthand=!0,this.finishNode(t,"ObjectProperty")}}parseObjPropValue(t,e,i,r,n,a,o){const l=this.parseObjectMethod(t,i,r,n,a)||this.parseObjectProperty(t,e,n,o);return l||this.unexpected(),l}parsePropertyName(t,e){if(this.eat(0))t.computed=!0,t.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{const{type:i,value:r}=this.state;let n;if(Mt(i))n=this.parseIdentifier(!0);else switch(i){case 135:n=this.parseNumericLiteral(r);break;case 134:n=this.parseStringLiteral(r);break;case 136:n=this.parseBigIntLiteral(r);break;case 139:{const a=this.state.startLoc;e!=null?e.privateKeyLoc===null&&(e.privateKeyLoc=a):this.raise(b.UnexpectedPrivateField,a),n=this.parsePrivateName();break}default:if(i===137){n=this.parseDecimalLiteral(r);break}this.unexpected()}t.key=n,i!==139&&(t.computed=!1)}}initFunction(t,e){t.id=null,t.generator=!1,t.async=e}parseMethod(t,e,i,r,n,a,o=!1){this.initFunction(t,i),t.generator=e,this.scope.enter(18|(o?64:0)|(n?32:0)),this.prodParam.enter(Kr(i,t.generator)),this.parseFunctionParams(t,r);const l=this.parseFunctionBodyAndFinish(t,a,!0);return this.prodParam.exit(),this.scope.exit(),l}parseArrayLike(t,e,i,r){i&&this.expectPlugin("recordAndTuple");const n=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;const a=this.startNode();return this.next(),a.elements=this.parseExprList(t,!i,r,a),this.state.inFSharpPipelineDirectBody=n,this.finishNode(a,i?"TupleExpression":"ArrayExpression")}parseArrowExpression(t,e,i,r){this.scope.enter(6);let n=Kr(i,!1);!this.match(5)&&this.prodParam.hasIn&&(n|=8),this.prodParam.enter(n),this.initFunction(t,i);const a=this.state.maybeInArrowParameters;return e&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(t,e,r)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(t,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=a,this.finishNode(t,"ArrowFunctionExpression")}setArrowFunctionParameters(t,e,i){this.toAssignableList(e,i,!1),t.params=e}parseFunctionBodyAndFinish(t,e,i=!1){return this.parseFunctionBody(t,!1,i),this.finishNode(t,e)}parseFunctionBody(t,e,i=!1){const r=e&&!this.match(5);if(this.expressionScope.enter(yh()),r)t.body=this.parseMaybeAssign(),this.checkParams(t,!1,e,!1);else{const n=this.state.strict,a=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|4),t.body=this.parseBlock(!0,!1,o=>{const l=!this.isSimpleParamList(t.params);o&&l&&this.raise(b.IllegalLanguageModeDirective,(t.kind==="method"||t.kind==="constructor")&&t.key?t.key.loc.end:t);const c=!n&&this.state.strict;this.checkParams(t,!this.state.strict&&!e&&!i&&!l,e,c),this.state.strict&&t.id&&this.checkIdentifier(t.id,65,c)}),this.prodParam.exit(),this.state.labels=a}this.expressionScope.exit()}isSimpleParameter(t){return t.type==="Identifier"}isSimpleParamList(t){for(let e=0,i=t.length;e<i;e++)if(!this.isSimpleParameter(t[e]))return!1;return!0}checkParams(t,e,i,r=!0){const n=!e&&new Set,a={type:"FormalParameters"};for(const o of t.params)this.checkLVal(o,a,5,n,r)}parseExprList(t,e,i,r){const n=[];let a=!0;for(;!this.eat(t);){if(a)a=!1;else if(this.expect(12),this.match(t)){r&&this.addTrailingCommaExtraToNode(r),this.next();break}n.push(this.parseExprListItem(e,i))}return n}parseExprListItem(t,e,i){let r;if(this.match(12))t||this.raise(b.UnexpectedToken,this.state.curPosition(),{unexpected:","}),r=null;else if(this.match(21)){const n=this.state.startLoc;r=this.parseParenItem(this.parseSpread(e),n)}else if(this.match(17)){this.expectPlugin("partialApplication"),i||this.raise(b.UnexpectedArgumentPlaceholder,this.state.startLoc);const n=this.startNode();this.next(),r=this.finishNode(n,"ArgumentPlaceholder")}else r=this.parseMaybeAssignAllowIn(e,this.parseParenItem);return r}parseIdentifier(t){const e=this.startNode(),i=this.parseIdentifierName(t);return this.createIdentifier(e,i)}createIdentifier(t,e){return t.name=e,t.loc.identifierName=e,this.finishNode(t,"Identifier")}parseIdentifierName(t){let e;const{startLoc:i,type:r}=this.state;Mt(r)?e=this.state.value:this.unexpected();const n=qd(r);return t?n&&this.replaceToken(132):this.checkReservedWord(e,i,n,!1),this.next(),e}checkReservedWord(t,e,i,r){if(t.length>10||!hf(t))return;if(i&&of(t)){this.raise(b.UnexpectedKeyword,e,{keyword:t});return}if((this.state.strict?r?lh:ah:nh)(t,this.inModule)){this.raise(b.UnexpectedReservedWord,e,{reservedWord:t});return}else if(t==="yield"){if(this.prodParam.hasYield){this.raise(b.YieldBindingIdentifier,e);return}}else if(t==="await"){if(this.prodParam.hasAwait){this.raise(b.AwaitBindingIdentifier,e);return}if(this.scope.inStaticBlock){this.raise(b.AwaitBindingIdentifierInStaticBlock,e);return}this.expressionScope.recordAsyncArrowParametersError(e)}else if(t==="arguments"&&this.scope.inClassAndNotInNonArrowFunction){this.raise(b.ArgumentsInClass,e);return}}recordAwaitIfAllowed(){const t=this.prodParam.hasAwait||this.options.allowAwaitOutsideFunction&&!this.scope.inFunction;return t&&!this.scope.inFunction&&(this.state.hasTopLevelAwait=!0),t}parseAwait(t){const e=this.startNodeAt(t);return this.expressionScope.recordParameterInitializerError(b.AwaitExpressionFormalParameter,e),this.eat(55)&&this.raise(b.ObsoleteAwaitStar,e),!this.scope.inFunction&&!this.options.allowAwaitOutsideFunction&&(this.isAmbiguousAwait()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(e.argument=this.parseMaybeUnary(null,!0)),this.finishNode(e,"AwaitExpression")}isAmbiguousAwait(){if(this.hasPrecedingLineBreak())return!0;const{type:t}=this.state;return t===53||t===10||t===0||$r(t)||t===102&&!this.state.containsEsc||t===138||t===56||this.hasPlugin("v8intrinsic")&&t===54}parseYield(){const t=this.startNode();this.expressionScope.recordParameterInitializerError(b.YieldInParameter,t),this.next();let e=!1,i=null;if(!this.hasPrecedingLineBreak())switch(e=this.eat(55),this.state.type){case 13:case 140:case 8:case 11:case 3:case 9:case 14:case 12:if(!e)break;default:i=this.parseMaybeAssign()}return t.delegate=e,t.argument=i,this.finishNode(t,"YieldExpression")}parseImportCall(t){if(this.next(),t.source=this.parseMaybeAssignAllowIn(),t.options=null,this.eat(12)&&!this.match(11)&&(t.options=this.parseMaybeAssignAllowIn(),this.eat(12)&&!this.match(11))){do this.parseMaybeAssignAllowIn();while(this.eat(12)&&!this.match(11));this.raise(b.ImportCallArity,t)}return this.expect(11),this.finishNode(t,"ImportExpression")}checkPipelineAtInfixOperator(t,e){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&t.type==="SequenceExpression"&&this.raise(b.PipelineHeadSequenceExpression,e)}parseSmartPipelineBodyInStyle(t,e){if(this.isSimpleReference(t)){const i=this.startNodeAt(e);return i.callee=t,this.finishNode(i,"PipelineBareFunction")}else{const i=this.startNodeAt(e);return this.checkSmartPipeTopicBodyEarlyErrors(e),i.expression=t,this.finishNode(i,"PipelineTopicExpression")}}isSimpleReference(t){switch(t.type){case"MemberExpression":return!t.computed&&this.isSimpleReference(t.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(t){if(this.match(19))throw this.raise(b.PipelineBodyNoArrow,this.state.startLoc);this.topicReferenceWasUsedInCurrentContext()||this.raise(b.PipelineTopicUnused,t)}withTopicBindingContext(t){const e=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return t()}finally{this.state.topicContext=e}}withSmartMixTopicForbiddingContext(t){if(this.hasPlugin(["pipelineOperator",{proposal:"smart"}])){const e=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return t()}finally{this.state.topicContext=e}}else return t()}withSoloAwaitPermittingContext(t){const e=this.state.soloAwait;this.state.soloAwait=!0;try{return t()}finally{this.state.soloAwait=e}}allowInAnd(t){const e=this.prodParam.currentFlags();if(8&~e){this.prodParam.enter(e|8);try{return t()}finally{this.prodParam.exit()}}return t()}disallowInAnd(t){const e=this.prodParam.currentFlags();if(8&e){this.prodParam.enter(e&-9);try{return t()}finally{this.prodParam.exit()}}return t()}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(t){const e=this.state.startLoc;this.state.potentialArrowAt=this.state.start;const i=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;const r=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),e,t);return this.state.inFSharpPipelineDirectBody=i,r}parseModuleExpression(){this.expectPlugin("moduleBlocks");const t=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);const e=this.startNodeAt(this.state.endLoc);this.next();const i=this.initializeScopes(!0);this.enterInitialScopes();try{t.body=this.parseProgram(e,8,"module")}finally{i()}return this.finishNode(t,"ModuleExpression")}parsePropertyNamePrefixOperator(t){}}const eo={kind:1},nm={kind:2},am=/[\uD800-\uDFFF]/u,to=/in(?:stanceof)?/y;function om(s,t,e){for(let i=0;i<s.length;i++){const r=s[i],{type:n}=r;if(typeof n=="number"){{if(n===139){const{loc:a,start:o,value:l,end:c}=r,h=o+1,u=nt(a.start,1);s.splice(i,1,new ps({type:Wt(27),value:"#",start:o,end:h,startLoc:a.start,endLoc:u}),new ps({type:Wt(132),value:l,start:h,end:c,startLoc:u,endLoc:a.end})),i++;continue}if($r(n)){const{loc:a,start:o,value:l,end:c}=r,h=o+1,u=nt(a.start,1);let d;t.charCodeAt(o-e)===96?d=new ps({type:Wt(22),value:"`",start:o,end:h,startLoc:a.start,endLoc:u}):d=new ps({type:Wt(8),value:"}",start:o,end:h,startLoc:a.start,endLoc:u});let p,f,P,I;n===24?(f=c-1,P=nt(a.end,-1),p=l===null?null:l.slice(1,-1),I=new ps({type:Wt(22),value:"`",start:f,end:c,startLoc:P,endLoc:a.end})):(f=c-2,P=nt(a.end,-2),p=l===null?null:l.slice(1,-2),I=new ps({type:Wt(23),value:"${",start:f,end:c,startLoc:P,endLoc:a.end})),s.splice(i,1,d,new ps({type:Wt(20),value:p,start:h,end:f,startLoc:u,endLoc:P}),I),i+=2;continue}}r.type=Wt(n)}}return s}class lm extends rm{parseTopLevel(t,e){return t.program=this.parseProgram(e),t.comments=this.comments,this.options.tokens&&(t.tokens=om(this.tokens,this.input,this.startIndex)),this.finishNode(t,"File")}parseProgram(t,e=140,i=this.options.sourceType){if(t.sourceType=i,t.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(t,!0,!0,e),this.inModule){if(!this.options.allowUndeclaredExports&&this.scope.undefinedExports.size>0)for(const[n,a]of Array.from(this.scope.undefinedExports))this.raise(b.ModuleExportUndefined,a,{localName:n});this.addExtra(t,"topLevelAwait",this.state.hasTopLevelAwait)}let r;return e===140?r=this.finishNode(t,"Program"):r=this.finishNodeAt(t,"Program",nt(this.state.startLoc,-1)),r}stmtToDirective(t){const e=t;e.type="Directive",e.value=e.expression,delete e.expression;const i=e.value,r=i.value,n=this.input.slice(this.offsetToSourcePos(i.start),this.offsetToSourcePos(i.end)),a=i.value=n.slice(1,-1);return this.addExtra(i,"raw",n),this.addExtra(i,"rawValue",a),this.addExtra(i,"expressionValue",r),i.type="DirectiveLiteral",e}parseInterpreterDirective(){if(!this.match(28))return null;const t=this.startNode();return t.value=this.state.value,this.next(),this.finishNode(t,"InterpreterDirective")}isLet(){return this.isContextual(100)?this.hasFollowingBindingAtom():!1}chStartsBindingIdentifier(t,e){if(Jt(t)){if(to.lastIndex=e,to.test(this.input)){const i=this.codePointAtPos(to.lastIndex);if(!ai(i)&&i!==92)return!1}return!0}else return t===92}chStartsBindingPattern(t){return t===91||t===123}hasFollowingBindingAtom(){const t=this.nextTokenStart(),e=this.codePointAtPos(t);return this.chStartsBindingPattern(e)||this.chStartsBindingIdentifier(e,t)}hasInLineFollowingBindingIdentifierOrBrace(){const t=this.nextTokenInLineStart(),e=this.codePointAtPos(t);return e===123||this.chStartsBindingIdentifier(e,t)}startsUsingForOf(){const{type:t,containsEsc:e}=this.lookahead();if(t===102&&!e)return!1;if(Te(t)&&!this.hasFollowingLineBreak())return this.expectPlugin("explicitResourceManagement"),!0}startsAwaitUsing(){let t=this.nextTokenInLineStart();if(this.isUnparsedContextual(t,"using")){t=this.nextTokenInLineStartSince(t+5);const e=this.codePointAtPos(t);if(this.chStartsBindingIdentifier(e,t))return this.expectPlugin("explicitResourceManagement"),!0}return!1}parseModuleItem(){return this.parseStatementLike(15)}parseStatementListItem(){return this.parseStatementLike(6|(!this.options.annexB||this.state.strict?0:8))}parseStatementOrSloppyAnnexBFunctionDeclaration(t=!1){let e=0;return this.options.annexB&&!this.state.strict&&(e|=4,t&&(e|=8)),this.parseStatementLike(e)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(t){let e=null;return this.match(26)&&(e=this.parseDecorators(!0)),this.parseStatementContent(t,e)}parseStatementContent(t,e){const i=this.state.type,r=this.startNode(),n=!!(t&2),a=!!(t&4),o=t&1;switch(i){case 60:return this.parseBreakContinueStatement(r,!0);case 63:return this.parseBreakContinueStatement(r,!1);case 64:return this.parseDebuggerStatement(r);case 90:return this.parseDoWhileStatement(r);case 91:return this.parseForStatement(r);case 68:if(this.lookaheadCharCode()===46)break;return a||this.raise(this.state.strict?b.StrictFunction:this.options.annexB?b.SloppyFunctionAnnexB:b.SloppyFunction,this.state.startLoc),this.parseFunctionStatement(r,!1,!n&&a);case 80:return n||this.unexpected(),this.parseClass(this.maybeTakeDecorators(e,r),!0);case 69:return this.parseIfStatement(r);case 70:return this.parseReturnStatement(r);case 71:return this.parseSwitchStatement(r);case 72:return this.parseThrowStatement(r);case 73:return this.parseTryStatement(r);case 96:if(!this.state.containsEsc&&this.startsAwaitUsing())return this.recordAwaitIfAllowed()?n||this.raise(b.UnexpectedLexicalDeclaration,r):this.raise(b.AwaitUsingNotInAsyncContext,r),this.next(),this.parseVarStatement(r,"await using");break;case 107:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifierOrBrace())break;return this.expectPlugin("explicitResourceManagement"),!this.scope.inModule&&this.scope.inTopLevel?this.raise(b.UnexpectedUsingDeclaration,this.state.startLoc):n||this.raise(b.UnexpectedLexicalDeclaration,this.state.startLoc),this.parseVarStatement(r,"using");case 100:{if(this.state.containsEsc)break;const h=this.nextTokenStart(),u=this.codePointAtPos(h);if(u!==91&&(!n&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(u,h)&&u!==123))break}case 75:n||this.raise(b.UnexpectedLexicalDeclaration,this.state.startLoc);case 74:{const h=this.state.value;return this.parseVarStatement(r,h)}case 92:return this.parseWhileStatement(r);case 76:return this.parseWithStatement(r);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(r);case 83:{const h=this.lookaheadCharCode();if(h===40||h===46)break}case 82:{!this.options.allowImportExportEverywhere&&!o&&this.raise(b.UnexpectedImportExport,this.state.startLoc),this.next();let h;return i===83?(h=this.parseImport(r),h.type==="ImportDeclaration"&&(!h.importKind||h.importKind==="value")&&(this.sawUnambiguousESM=!0)):(h=this.parseExport(r,e),(h.type==="ExportNamedDeclaration"&&(!h.exportKind||h.exportKind==="value")||h.type==="ExportAllDeclaration"&&(!h.exportKind||h.exportKind==="value")||h.type==="ExportDefaultDeclaration")&&(this.sawUnambiguousESM=!0)),this.assertModuleNodeAllowed(h),h}default:if(this.isAsyncFunction())return n||this.raise(b.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(r,!0,!n&&a)}const l=this.state.value,c=this.parseExpression();return Te(i)&&c.type==="Identifier"&&this.eat(14)?this.parseLabeledStatement(r,l,c,t):this.parseExpressionStatement(r,c,e)}assertModuleNodeAllowed(t){!this.options.allowImportExportEverywhere&&!this.inModule&&this.raise(b.ImportOutsideModule,t)}decoratorsEnabledBeforeExport(){return this.hasPlugin("decorators-legacy")?!0:this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")!==!1}maybeTakeDecorators(t,e,i){return t&&(e.decorators&&e.decorators.length>0?(typeof this.getPluginOption("decorators","decoratorsBeforeExport")!="boolean"&&this.raise(b.DecoratorsBeforeAfterExport,e.decorators[0]),e.decorators.unshift(...t)):e.decorators=t,this.resetStartLocationFromNode(e,t[0]),i&&this.resetStartLocationFromNode(i,e)),e}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(t){const e=[];do e.push(this.parseDecorator());while(this.match(26));if(this.match(82))t||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(b.DecoratorExportClass,this.state.startLoc);else if(!this.canHaveLeadingDecorator())throw this.raise(b.UnexpectedLeadingDecorator,this.state.startLoc);return e}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);const t=this.startNode();if(this.next(),this.hasPlugin("decorators")){const e=this.state.startLoc;let i;if(this.match(10)){const r=this.state.startLoc;this.next(),i=this.parseExpression(),this.expect(11),i=this.wrapParenthesis(r,i);const n=this.state.startLoc;t.expression=this.parseMaybeDecoratorArguments(i),this.getPluginOption("decorators","allowCallParenthesized")===!1&&t.expression!==i&&this.raise(b.DecoratorArgumentsOutsideParentheses,n)}else{for(i=this.parseIdentifier(!1);this.eat(16);){const r=this.startNodeAt(e);r.object=i,this.match(139)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),r.property=this.parsePrivateName()):r.property=this.parseIdentifier(!0),r.computed=!1,i=this.finishNode(r,"MemberExpression")}t.expression=this.parseMaybeDecoratorArguments(i)}}else t.expression=this.parseExprSubscripts();return this.finishNode(t,"Decorator")}parseMaybeDecoratorArguments(t){if(this.eat(10)){const e=this.startNodeAtNode(t);return e.callee=t,e.arguments=this.parseCallExpressionArguments(11),this.toReferencedList(e.arguments),this.finishNode(e,"CallExpression")}return t}parseBreakContinueStatement(t,e){return this.next(),this.isLineTerminator()?t.label=null:(t.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(t,e),this.finishNode(t,e?"BreakStatement":"ContinueStatement")}verifyBreakContinue(t,e){let i;for(i=0;i<this.state.labels.length;++i){const r=this.state.labels[i];if((t.label==null||r.name===t.label.name)&&(r.kind!=null&&(e||r.kind===1)||t.label&&e))break}if(i===this.state.labels.length){const r=e?"BreakStatement":"ContinueStatement";this.raise(b.IllegalBreakContinue,t,{type:r})}}parseDebuggerStatement(t){return this.next(),this.semicolon(),this.finishNode(t,"DebuggerStatement")}parseHeaderExpression(){this.expect(10);const t=this.parseExpression();return this.expect(11),t}parseDoWhileStatement(t){return this.next(),this.state.labels.push(eo),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.expect(92),t.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(t,"DoWhileStatement")}parseForStatement(t){this.next(),this.state.labels.push(eo);let e=null;if(this.isContextual(96)&&this.recordAwaitIfAllowed()&&(e=this.state.startLoc,this.next()),this.scope.enter(0),this.expect(10),this.match(13))return e!==null&&this.unexpected(e),this.parseFor(t,null);const i=this.isContextual(100);{const l=this.isContextual(96)&&this.startsAwaitUsing(),c=l||this.isContextual(107)&&this.startsUsingForOf(),h=i&&this.hasFollowingBindingAtom()||c;if(this.match(74)||this.match(75)||h){const u=this.startNode();let d;l?(d="await using",this.recordAwaitIfAllowed()||this.raise(b.AwaitUsingNotInAsyncContext,this.state.startLoc),this.next()):d=this.state.value,this.next(),this.parseVar(u,!0,d);const p=this.finishNode(u,"VariableDeclaration"),f=this.match(58);return f&&c&&this.raise(b.ForInUsing,p),(f||this.isContextual(102))&&p.declarations.length===1?this.parseForIn(t,p,e):(e!==null&&this.unexpected(e),this.parseFor(t,p))}}const r=this.isContextual(95),n=new Wr,a=this.parseExpression(!0,n),o=this.isContextual(102);if(o&&(i&&this.raise(b.ForOfLet,a),e===null&&r&&a.type==="Identifier"&&this.raise(b.ForOfAsync,a)),o||this.match(58)){this.checkDestructuringPrivate(n),this.toAssignable(a,!0);const l=o?"ForOfStatement":"ForInStatement";return this.checkLVal(a,{type:l}),this.parseForIn(t,a,e)}else this.checkExpressionErrors(n,!0);return e!==null&&this.unexpected(e),this.parseFor(t,a)}parseFunctionStatement(t,e,i){return this.next(),this.parseFunction(t,1|(i?2:0)|(e?8:0))}parseIfStatement(t){return this.next(),t.test=this.parseHeaderExpression(),t.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),t.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(t,"IfStatement")}parseReturnStatement(t){return!this.prodParam.hasReturn&&!this.options.allowReturnOutsideFunction&&this.raise(b.IllegalReturn,this.state.startLoc),this.next(),this.isLineTerminator()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")}parseSwitchStatement(t){this.next(),t.discriminant=this.parseHeaderExpression();const e=t.cases=[];this.expect(5),this.state.labels.push(nm),this.scope.enter(0);let i;for(let r;!this.match(8);)if(this.match(61)||this.match(65)){const n=this.match(61);i&&this.finishNode(i,"SwitchCase"),e.push(i=this.startNode()),i.consequent=[],this.next(),n?i.test=this.parseExpression():(r&&this.raise(b.MultipleDefaultsInSwitch,this.state.lastTokStartLoc),r=!0,i.test=null),this.expect(14)}else i?i.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),i&&this.finishNode(i,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(t,"SwitchStatement")}parseThrowStatement(t){return this.next(),this.hasPrecedingLineBreak()&&this.raise(b.NewlineAfterThrow,this.state.lastTokEndLoc),t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")}parseCatchClauseParam(){const t=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&t.type==="Identifier"?8:0),this.checkLVal(t,{type:"CatchClause"},9),t}parseTryStatement(t){if(this.next(),t.block=this.parseBlock(),t.handler=null,this.match(62)){const e=this.startNode();this.next(),this.match(10)?(this.expect(10),e.param=this.parseCatchClauseParam(),this.expect(11)):(e.param=null,this.scope.enter(0)),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseBlock(!1,!1)),this.scope.exit(),t.handler=this.finishNode(e,"CatchClause")}return t.finalizer=this.eat(67)?this.parseBlock():null,!t.handler&&!t.finalizer&&this.raise(b.NoCatchOrFinally,t),this.finishNode(t,"TryStatement")}parseVarStatement(t,e,i=!1){return this.next(),this.parseVar(t,!1,e,i),this.semicolon(),this.finishNode(t,"VariableDeclaration")}parseWhileStatement(t){return this.next(),t.test=this.parseHeaderExpression(),this.state.labels.push(eo),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.finishNode(t,"WhileStatement")}parseWithStatement(t){return this.state.strict&&this.raise(b.StrictWith,this.state.startLoc),this.next(),t.object=this.parseHeaderExpression(),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.finishNode(t,"WithStatement")}parseEmptyStatement(t){return this.next(),this.finishNode(t,"EmptyStatement")}parseLabeledStatement(t,e,i,r){for(const a of this.state.labels)a.name===e&&this.raise(b.LabelRedeclaration,i,{labelName:e});const n=Wd(this.state.type)?1:this.match(71)?2:null;for(let a=this.state.labels.length-1;a>=0;a--){const o=this.state.labels[a];if(o.statementStart===t.start)o.statementStart=this.sourceToOffsetPos(this.state.start),o.kind=n;else break}return this.state.labels.push({name:e,kind:n,statementStart:this.sourceToOffsetPos(this.state.start)}),t.body=r&8?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),t.label=i,this.finishNode(t,"LabeledStatement")}parseExpressionStatement(t,e,i){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")}parseBlock(t=!1,e=!0,i){const r=this.startNode();return t&&this.state.strictErrors.clear(),this.expect(5),e&&this.scope.enter(0),this.parseBlockBody(r,t,!1,8,i),e&&this.scope.exit(),this.finishNode(r,"BlockStatement")}isValidDirective(t){return t.type==="ExpressionStatement"&&t.expression.type==="StringLiteral"&&!t.expression.extra.parenthesized}parseBlockBody(t,e,i,r,n){const a=t.body=[],o=t.directives=[];this.parseBlockOrModuleBlockBody(a,e?o:void 0,i,r,n)}parseBlockOrModuleBlockBody(t,e,i,r,n){const a=this.state.strict;let o=!1,l=!1;for(;!this.match(r);){const c=i?this.parseModuleItem():this.parseStatementListItem();if(e&&!l){if(this.isValidDirective(c)){const h=this.stmtToDirective(c);e.push(h),!o&&h.value.value==="use strict"&&(o=!0,this.setStrict(!0));continue}l=!0,this.state.strictErrors.clear()}t.push(c)}n?.call(this,o),a||this.setStrict(!1),this.next()}parseFor(t,e){return t.init=e,this.semicolon(!1),t.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),t.update=this.match(11)?null:this.parseExpression(),this.expect(11),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(t,"ForStatement")}parseForIn(t,e,i){const r=this.match(58);return this.next(),r?i!==null&&this.unexpected(i):t.await=i!==null,e.type==="VariableDeclaration"&&e.declarations[0].init!=null&&(!r||!this.options.annexB||this.state.strict||e.kind!=="var"||e.declarations[0].id.type!=="Identifier")&&this.raise(b.ForInOfLoopInitializer,e,{type:r?"ForInStatement":"ForOfStatement"}),e.type==="AssignmentPattern"&&this.raise(b.InvalidLhs,e,{ancestor:{type:"ForStatement"}}),t.left=e,t.right=r?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(t,r?"ForInStatement":"ForOfStatement")}parseVar(t,e,i,r=!1){const n=t.declarations=[];for(t.kind=i;;){const a=this.startNode();if(this.parseVarId(a,i),a.init=this.eat(29)?e?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,a.init===null&&!r&&(a.id.type!=="Identifier"&&!(e&&(this.match(58)||this.isContextual(102)))?this.raise(b.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"destructuring"}):(i==="const"||i==="using"||i==="await using")&&!(this.match(58)||this.isContextual(102))&&this.raise(b.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:i})),n.push(this.finishNode(a,"VariableDeclarator")),!this.eat(12))break}return t}parseVarId(t,e){const i=this.parseBindingAtom();(e==="using"||e==="await using")&&(i.type==="ArrayPattern"||i.type==="ObjectPattern")&&this.raise(b.UsingDeclarationHasBindingPattern,i.loc.start),this.checkLVal(i,{type:"VariableDeclarator"},e==="var"?5:8201),t.id=i}parseAsyncFunctionExpression(t){return this.parseFunction(t,8)}parseFunction(t,e=0){const i=e&2,r=!!(e&1),n=r&&!(e&4),a=!!(e&8);this.initFunction(t,a),this.match(55)&&(i&&this.raise(b.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),t.generator=!0),r&&(t.id=this.parseFunctionId(n));const o=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(2),this.prodParam.enter(Kr(a,t.generator)),r||(t.id=this.parseFunctionId()),this.parseFunctionParams(t,!1),this.withSmartMixTopicForbiddingContext(()=>{this.parseFunctionBodyAndFinish(t,r?"FunctionDeclaration":"FunctionExpression")}),this.prodParam.exit(),this.scope.exit(),r&&!i&&this.registerFunctionStatementId(t),this.state.maybeInArrowParameters=o,t}parseFunctionId(t){return t||Te(this.state.type)?this.parseIdentifier():null}parseFunctionParams(t,e){this.expect(10),this.expressionScope.enter(wf()),t.params=this.parseBindingList(11,41,2|(e?4:0)),this.expressionScope.exit()}registerFunctionStatementId(t){t.id&&this.scope.declareName(t.id.name,!this.options.annexB||this.state.strict||t.generator||t.async?this.scope.treatFunctionsAsVar?5:8201:17,t.id.loc.start)}parseClass(t,e,i){this.next();const r=this.state.strict;return this.state.strict=!0,this.parseClassId(t,e,i),this.parseClassSuper(t),t.body=this.parseClassBody(!!t.superClass,r),this.finishNode(t,e?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}nameIsConstructor(t){return t.type==="Identifier"&&t.name==="constructor"||t.type==="StringLiteral"&&t.value==="constructor"}isNonstaticConstructor(t){return!t.computed&&!t.static&&this.nameIsConstructor(t.key)}parseClassBody(t,e){this.classScope.enter();const i={hadConstructor:!1,hadSuperClass:t};let r=[];const n=this.startNode();if(n.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext(()=>{for(;!this.match(8);){if(this.eat(13)){if(r.length>0)throw this.raise(b.DecoratorSemicolon,this.state.lastTokEndLoc);continue}if(this.match(26)){r.push(this.parseDecorator());continue}const a=this.startNode();r.length&&(a.decorators=r,this.resetStartLocationFromNode(a,r[0]),r=[]),this.parseClassMember(n,a,i),a.kind==="constructor"&&a.decorators&&a.decorators.length>0&&this.raise(b.DecoratorConstructor,a)}}),this.state.strict=e,this.next(),r.length)throw this.raise(b.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(n,"ClassBody")}parseClassMemberFromModifier(t,e){const i=this.parseIdentifier(!0);if(this.isClassMethod()){const r=e;return r.kind="method",r.computed=!1,r.key=i,r.static=!1,this.pushClassMethod(t,r,!1,!1,!1,!1),!0}else if(this.isClassProperty()){const r=e;return r.computed=!1,r.key=i,r.static=!1,t.body.push(this.parseClassProperty(r)),!0}return this.resetPreviousNodeTrailingComments(i),!1}parseClassMember(t,e,i){const r=this.isContextual(106);if(r){if(this.parseClassMemberFromModifier(t,e))return;if(this.eat(5)){this.parseClassStaticBlock(t,e);return}}this.parseClassMemberWithIsStatic(t,e,i,r)}parseClassMemberWithIsStatic(t,e,i,r){const n=e,a=e,o=e,l=e,c=e,h=n,u=n;if(e.static=r,this.parsePropertyNamePrefixOperator(e),this.eat(55)){h.kind="method";const T=this.match(139);if(this.parseClassElementName(h),T){this.pushClassPrivateMethod(t,a,!0,!1);return}this.isNonstaticConstructor(n)&&this.raise(b.ConstructorIsGenerator,n.key),this.pushClassMethod(t,n,!0,!1,!1,!1);return}const d=!this.state.containsEsc&&Te(this.state.type),p=this.parseClassElementName(e),f=d?p.name:null,P=this.isPrivateName(p),I=this.state.startLoc;if(this.parsePostMemberNameModifiers(u),this.isClassMethod()){if(h.kind="method",P){this.pushClassPrivateMethod(t,a,!1,!1);return}const T=this.isNonstaticConstructor(n);let m=!1;T&&(n.kind="constructor",i.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(b.DuplicateConstructor,p),T&&this.hasPlugin("typescript")&&e.override&&this.raise(b.OverrideOnConstructor,p),i.hadConstructor=!0,m=i.hadSuperClass),this.pushClassMethod(t,n,!1,!1,T,m)}else if(this.isClassProperty())P?this.pushClassPrivateProperty(t,l):this.pushClassProperty(t,o);else if(f==="async"&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(p);const T=this.eat(55);u.optional&&this.unexpected(I),h.kind="method";const m=this.match(139);this.parseClassElementName(h),this.parsePostMemberNameModifiers(u),m?this.pushClassPrivateMethod(t,a,T,!0):(this.isNonstaticConstructor(n)&&this.raise(b.ConstructorIsAsync,n.key),this.pushClassMethod(t,n,T,!0,!1,!1))}else if((f==="get"||f==="set")&&!(this.match(55)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(p),h.kind=f;const T=this.match(139);this.parseClassElementName(n),T?this.pushClassPrivateMethod(t,a,!1,!1):(this.isNonstaticConstructor(n)&&this.raise(b.ConstructorIsAccessor,n.key),this.pushClassMethod(t,n,!1,!1,!1,!1)),this.checkGetterSetterParams(n)}else if(f==="accessor"&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(p);const T=this.match(139);this.parseClassElementName(o),this.pushClassAccessorProperty(t,c,T)}else this.isLineTerminator()?P?this.pushClassPrivateProperty(t,l):this.pushClassProperty(t,o):this.unexpected()}parseClassElementName(t){const{type:e,value:i}=this.state;if((e===132||e===134)&&t.static&&i==="prototype"&&this.raise(b.StaticPrototype,this.state.startLoc),e===139){i==="constructor"&&this.raise(b.ConstructorClassPrivateField,this.state.startLoc);const r=this.parsePrivateName();return t.key=r,r}return this.parsePropertyName(t),t.key}parseClassStaticBlock(t,e){var i;this.scope.enter(208);const r=this.state.labels;this.state.labels=[],this.prodParam.enter(0);const n=e.body=[];this.parseBlockOrModuleBlockBody(n,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=r,t.body.push(this.finishNode(e,"StaticBlock")),(i=e.decorators)!=null&&i.length&&this.raise(b.DecoratorStaticBlock,e)}pushClassProperty(t,e){!e.computed&&this.nameIsConstructor(e.key)&&this.raise(b.ConstructorClassField,e.key),t.body.push(this.parseClassProperty(e))}pushClassPrivateProperty(t,e){const i=this.parseClassPrivateProperty(e);t.body.push(i),this.classScope.declarePrivateName(this.getPrivateNameSV(i.key),0,i.key.loc.start)}pushClassAccessorProperty(t,e,i){!i&&!e.computed&&this.nameIsConstructor(e.key)&&this.raise(b.ConstructorClassField,e.key);const r=this.parseClassAccessorProperty(e);t.body.push(r),i&&this.classScope.declarePrivateName(this.getPrivateNameSV(r.key),0,r.key.loc.start)}pushClassMethod(t,e,i,r,n,a){t.body.push(this.parseMethod(e,i,r,n,a,"ClassMethod",!0))}pushClassPrivateMethod(t,e,i,r){const n=this.parseMethod(e,i,r,!1,!1,"ClassPrivateMethod",!0);t.body.push(n);const a=n.kind==="get"?n.static?6:2:n.kind==="set"?n.static?5:1:0;this.declareClassPrivateMethodInScope(n,a)}declareClassPrivateMethodInScope(t,e){this.classScope.declarePrivateName(this.getPrivateNameSV(t.key),e,t.key.loc.start)}parsePostMemberNameModifiers(t){}parseClassPrivateProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassPrivateProperty")}parseClassProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassProperty")}parseClassAccessorProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassAccessorProperty")}parseInitializer(t){this.scope.enter(80),this.expressionScope.enter(yh()),this.prodParam.enter(0),t.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(t,e,i,r=8331){if(Te(this.state.type))t.id=this.parseIdentifier(),e&&this.declareNameFromIdentifier(t.id,r);else if(i||!e)t.id=null;else throw this.raise(b.MissingClassName,this.state.startLoc)}parseClassSuper(t){t.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(t,e){const i=this.parseMaybeImportPhase(t,!0),r=this.maybeParseExportDefaultSpecifier(t,i),n=!r||this.eat(12),a=n&&this.eatExportStar(t),o=a&&this.maybeParseExportNamespaceSpecifier(t),l=n&&(!o||this.eat(12)),c=r||a;if(a&&!o){if(r&&this.unexpected(),e)throw this.raise(b.UnsupportedDecoratorExport,t);return this.parseExportFrom(t,!0),this.finishNode(t,"ExportAllDeclaration")}const h=this.maybeParseExportNamedSpecifiers(t);r&&n&&!a&&!h&&this.unexpected(null,5),o&&l&&this.unexpected(null,98);let u;if(c||h){if(u=!1,e)throw this.raise(b.UnsupportedDecoratorExport,t);this.parseExportFrom(t,c)}else u=this.maybeParseExportDeclaration(t);if(c||h||u){var d;const p=t;if(this.checkExport(p,!0,!1,!!p.source),((d=p.declaration)==null?void 0:d.type)==="ClassDeclaration")this.maybeTakeDecorators(e,p.declaration,p);else if(e)throw this.raise(b.UnsupportedDecoratorExport,t);return this.finishNode(p,"ExportNamedDeclaration")}if(this.eat(65)){const p=t,f=this.parseExportDefaultExpression();if(p.declaration=f,f.type==="ClassDeclaration")this.maybeTakeDecorators(e,f,p);else if(e)throw this.raise(b.UnsupportedDecoratorExport,t);return this.checkExport(p,!0,!0),this.finishNode(p,"ExportDefaultDeclaration")}this.unexpected(null,5)}eatExportStar(t){return this.eat(55)}maybeParseExportDefaultSpecifier(t,e){if(e||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",e?.loc.start);const i=e||this.parseIdentifier(!0),r=this.startNodeAtNode(i);return r.exported=i,t.specifiers=[this.finishNode(r,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(t){if(this.isContextual(93)){var e,i;(i=(e=t).specifiers)!=null||(e.specifiers=[]);const r=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),r.exported=this.parseModuleExportName(),t.specifiers.push(this.finishNode(r,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(t){if(this.match(5)){const e=t;e.specifiers||(e.specifiers=[]);const i=e.exportKind==="type";return e.specifiers.push(...this.parseExportSpecifiers(i)),e.source=null,e.declaration=null,this.hasPlugin("importAssertions")&&(e.assertions=[]),!0}return!1}maybeParseExportDeclaration(t){return this.shouldParseExportDeclaration()?(t.specifiers=[],t.source=null,this.hasPlugin("importAssertions")&&(t.assertions=[]),t.declaration=this.parseExportDeclaration(t),!0):!1}isAsyncFunction(){if(!this.isContextual(95))return!1;const t=this.nextTokenInLineStart();return this.isUnparsedContextual(t,"function")}parseExportDefaultExpression(){const t=this.startNode();if(this.match(68))return this.next(),this.parseFunction(t,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(t,13);if(this.match(80))return this.parseClass(t,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(b.DecoratorBeforeExport,this.state.startLoc),this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0);if(this.match(75)||this.match(74)||this.isLet())throw this.raise(b.UnsupportedDefaultExport,this.state.startLoc);const e=this.parseMaybeAssignAllowIn();return this.semicolon(),e}parseExportDeclaration(t){return this.match(80)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){const{type:t}=this.state;if(Te(t)){if(t===95&&!this.state.containsEsc||t===100)return!1;if((t===130||t===129)&&!this.state.containsEsc){const{type:r}=this.lookahead();if(Te(r)&&r!==98||r===5)return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;const e=this.nextTokenStart(),i=this.isUnparsedContextual(e,"from");if(this.input.charCodeAt(e)===44||Te(this.state.type)&&i)return!0;if(this.match(65)&&i){const r=this.input.charCodeAt(this.nextTokenStartSince(e+4));return r===34||r===39}return!1}parseExportFrom(t,e){this.eatContextual(98)?(t.source=this.parseImportSource(),this.checkExport(t),this.maybeParseImportAttributes(t),this.checkJSONModuleImport(t)):e&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){const{type:t}=this.state;return t===26&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))?(this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(b.DecoratorBeforeExport,this.state.startLoc),!0):this.isContextual(107)?(this.raise(b.UsingDeclarationExport,this.state.startLoc),!0):this.isContextual(96)&&this.startsAwaitUsing()?(this.raise(b.UsingDeclarationExport,this.state.startLoc),!0):t===74||t===75||t===68||t===80||this.isLet()||this.isAsyncFunction()}checkExport(t,e,i,r){if(e){var n;if(i){if(this.checkDuplicateExports(t,"default"),this.hasPlugin("exportDefaultFrom")){var a;const o=t.declaration;o.type==="Identifier"&&o.name==="from"&&o.end-o.start===4&&!((a=o.extra)!=null&&a.parenthesized)&&this.raise(b.ExportDefaultFromAsIdentifier,o)}}else if((n=t.specifiers)!=null&&n.length)for(const o of t.specifiers){const{exported:l}=o,c=l.type==="Identifier"?l.name:l.value;if(this.checkDuplicateExports(o,c),!r&&o.local){const{local:h}=o;h.type!=="Identifier"?this.raise(b.ExportBindingIsString,o,{localName:h.value,exportName:c}):(this.checkReservedWord(h.name,h.loc.start,!0,!1),this.scope.checkLocalExport(h))}}else if(t.declaration){const o=t.declaration;if(o.type==="FunctionDeclaration"||o.type==="ClassDeclaration"){const{id:l}=o;if(!l)throw new Error("Assertion failure");this.checkDuplicateExports(t,l.name)}else if(o.type==="VariableDeclaration")for(const l of o.declarations)this.checkDeclaration(l.id)}}}checkDeclaration(t){if(t.type==="Identifier")this.checkDuplicateExports(t,t.name);else if(t.type==="ObjectPattern")for(const e of t.properties)this.checkDeclaration(e);else if(t.type==="ArrayPattern")for(const e of t.elements)e&&this.checkDeclaration(e);else t.type==="ObjectProperty"?this.checkDeclaration(t.value):t.type==="RestElement"?this.checkDeclaration(t.argument):t.type==="AssignmentPattern"&&this.checkDeclaration(t.left)}checkDuplicateExports(t,e){this.exportedIdentifiers.has(e)&&(e==="default"?this.raise(b.DuplicateDefaultExport,t):this.raise(b.DuplicateExport,t,{exportName:e})),this.exportedIdentifiers.add(e)}parseExportSpecifiers(t){const e=[];let i=!0;for(this.expect(5);!this.eat(8);){if(i)i=!1;else if(this.expect(12),this.eat(8))break;const r=this.isContextual(130),n=this.match(134),a=this.startNode();a.local=this.parseModuleExportName(),e.push(this.parseExportSpecifier(a,n,t,r))}return e}parseExportSpecifier(t,e,i,r){return this.eatContextual(93)?t.exported=this.parseModuleExportName():e?t.exported=_f(t.local):t.exported||(t.exported=Xt(t.local)),this.finishNode(t,"ExportSpecifier")}parseModuleExportName(){if(this.match(134)){const t=this.parseStringLiteral(this.state.value),e=am.exec(t.value);return e&&this.raise(b.ModuleExportNameHasLoneSurrogate,t,{surrogateCharCode:e[0].charCodeAt(0)}),t}return this.parseIdentifier(!0)}isJSONModuleImport(t){return t.assertions!=null?t.assertions.some(({key:e,value:i})=>i.value==="json"&&(e.type==="Identifier"?e.name==="type":e.value==="type")):!1}checkImportReflection(t){const{specifiers:e}=t,i=e.length===1?e[0].type:null;if(t.phase==="source")i!=="ImportDefaultSpecifier"&&this.raise(b.SourcePhaseImportRequiresDefault,e[0].loc.start);else if(t.phase==="defer")i!=="ImportNamespaceSpecifier"&&this.raise(b.DeferImportRequiresNamespace,e[0].loc.start);else if(t.module){var r;i!=="ImportDefaultSpecifier"&&this.raise(b.ImportReflectionNotBinding,e[0].loc.start),((r=t.assertions)==null?void 0:r.length)>0&&this.raise(b.ImportReflectionHasAssertion,e[0].loc.start)}}checkJSONModuleImport(t){if(this.isJSONModuleImport(t)&&t.type!=="ExportAllDeclaration"){const{specifiers:e}=t;if(e!=null){const i=e.find(r=>{let n;if(r.type==="ExportSpecifier"?n=r.local:r.type==="ImportSpecifier"&&(n=r.imported),n!==void 0)return n.type==="Identifier"?n.name!=="default":n.value!=="default"});i!==void 0&&this.raise(b.ImportJSONBindingNotDefault,i.loc.start)}}}isPotentialImportPhase(t){return t?!1:this.isContextual(105)||this.isContextual(97)||this.isContextual(127)}applyImportPhase(t,e,i,r){e||(i==="module"?(this.expectPlugin("importReflection",r),t.module=!0):this.hasPlugin("importReflection")&&(t.module=!1),i==="source"?(this.expectPlugin("sourcePhaseImports",r),t.phase="source"):i==="defer"?(this.expectPlugin("deferredImportEvaluation",r),t.phase="defer"):this.hasPlugin("sourcePhaseImports")&&(t.phase=null))}parseMaybeImportPhase(t,e){if(!this.isPotentialImportPhase(e))return this.applyImportPhase(t,e,null),null;const i=this.parseIdentifier(!0),{type:r}=this.state;return(Mt(r)?r!==98||this.lookaheadCharCode()===102:r!==12)?(this.resetPreviousIdentifierLeadingComments(i),this.applyImportPhase(t,e,i.name,i.loc.start),null):(this.applyImportPhase(t,e,null),i)}isPrecedingIdImportPhase(t){const{type:e}=this.state;return Te(e)?e!==98||this.lookaheadCharCode()===102:e!==12}parseImport(t){return this.match(134)?this.parseImportSourceAndAttributes(t):this.parseImportSpecifiersAndAfter(t,this.parseMaybeImportPhase(t,!1))}parseImportSpecifiersAndAfter(t,e){t.specifiers=[];const r=!this.maybeParseDefaultImportSpecifier(t,e)||this.eat(12),n=r&&this.maybeParseStarImportSpecifier(t);return r&&!n&&this.parseNamedImportSpecifiers(t),this.expectContextual(98),this.parseImportSourceAndAttributes(t)}parseImportSourceAndAttributes(t){var e;return(e=t.specifiers)!=null||(t.specifiers=[]),t.source=this.parseImportSource(),this.maybeParseImportAttributes(t),this.checkImportReflection(t),this.checkJSONModuleImport(t),this.semicolon(),this.finishNode(t,"ImportDeclaration")}parseImportSource(){return this.match(134)||this.unexpected(),this.parseExprAtom()}parseImportSpecifierLocal(t,e,i){e.local=this.parseIdentifier(),t.specifiers.push(this.finishImportSpecifier(e,i))}finishImportSpecifier(t,e,i=8201){return this.checkLVal(t.local,{type:e},i),this.finishNode(t,e)}parseImportAttributes(){this.expect(5);const t=[],e=new Set;do{if(this.match(8))break;const i=this.startNode(),r=this.state.value;if(e.has(r)&&this.raise(b.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:r}),e.add(r),this.match(134)?i.key=this.parseStringLiteral(r):i.key=this.parseIdentifier(!0),this.expect(14),!this.match(134))throw this.raise(b.ModuleAttributeInvalidValue,this.state.startLoc);i.value=this.parseStringLiteral(this.state.value),t.push(this.finishNode(i,"ImportAttribute"))}while(this.eat(12));return this.expect(8),t}parseModuleAttributes(){const t=[],e=new Set;do{const i=this.startNode();if(i.key=this.parseIdentifier(!0),i.key.name!=="type"&&this.raise(b.ModuleAttributeDifferentFromType,i.key),e.has(i.key.name)&&this.raise(b.ModuleAttributesWithDuplicateKeys,i.key,{key:i.key.name}),e.add(i.key.name),this.expect(14),!this.match(134))throw this.raise(b.ModuleAttributeInvalidValue,this.state.startLoc);i.value=this.parseStringLiteral(this.state.value),t.push(this.finishNode(i,"ImportAttribute"))}while(this.eat(12));return t}maybeParseImportAttributes(t){let e;var i=!1;if(this.match(76)){if(this.hasPrecedingLineBreak()&&this.lookaheadCharCode()===40)return;this.next(),this.hasPlugin("moduleAttributes")?e=this.parseModuleAttributes():e=this.parseImportAttributes(),i=!0}else this.isContextual(94)&&!this.hasPrecedingLineBreak()?(!this.hasPlugin("deprecatedImportAssert")&&!this.hasPlugin("importAssertions")&&this.raise(b.ImportAttributesUseAssert,this.state.startLoc),this.hasPlugin("importAssertions")||this.addExtra(t,"deprecatedAssertSyntax",!0),this.next(),e=this.parseImportAttributes()):e=[];!i&&this.hasPlugin("importAssertions")?t.assertions=e:t.attributes=e}maybeParseDefaultImportSpecifier(t,e){if(e){const i=this.startNodeAtNode(e);return i.local=e,t.specifiers.push(this.finishImportSpecifier(i,"ImportDefaultSpecifier")),!0}else if(Mt(this.state.type))return this.parseImportSpecifierLocal(t,this.startNode(),"ImportDefaultSpecifier"),!0;return!1}maybeParseStarImportSpecifier(t){if(this.match(55)){const e=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(t,e,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(t){let e=!0;for(this.expect(5);!this.eat(8);){if(e)e=!1;else{if(this.eat(14))throw this.raise(b.DestructureNamedImport,this.state.startLoc);if(this.expect(12),this.eat(8))break}const i=this.startNode(),r=this.match(134),n=this.isContextual(130);i.imported=this.parseModuleExportName();const a=this.parseImportSpecifier(i,r,t.importKind==="type"||t.importKind==="typeof",n,void 0);t.specifiers.push(a)}}parseImportSpecifier(t,e,i,r,n){if(this.eatContextual(93))t.local=this.parseIdentifier();else{const{imported:a}=t;if(e)throw this.raise(b.ImportBindingIsString,t,{importName:a.value});this.checkReservedWord(a.name,t.loc.start,!0,!0),t.local||(t.local=Xt(a))}return this.finishImportSpecifier(t,"ImportSpecifier",n)}isThisParam(t){return t.type==="Identifier"&&t.name==="this"}}class Eh extends lm{constructor(t,e,i){t=im(t),super(t,e),this.options=t,this.initializeScopes(),this.plugins=i,this.filename=t.sourceFilename,this.startIndex=t.startIndex}getScopeHandler(){return Ja}parse(){this.enterInitialScopes();const t=this.startNode(),e=this.startNode();return this.nextToken(),t.errors=null,this.parseTopLevel(t,e),t.errors=this.state.errors,t.comments.length=this.state.commentsLen,t}}function cm(s,t){var e;if(((e=t)==null?void 0:e.sourceType)==="unambiguous"){t=Object.assign({},t);try{t.sourceType="module";const i=Wi(t,s),r=i.parse();if(i.sawUnambiguousESM)return r;if(i.ambiguousScriptDifferentAst)try{return t.sourceType="script",Wi(t,s).parse()}catch{}else r.program.sourceType="script";return r}catch(i){try{return t.sourceType="script",Wi(t,s).parse()}catch{}throw i}}else return Wi(t,s).parse()}function hm(s,t){const e=Wi(t,s);return e.options.strictMode&&(e.state.strict=!0),e.getExpression()}function um(s){const t={};for(const e of Object.keys(s))t[e]=Wt(s[e]);return t}const pm=um(Hd);function Wi(s,t){let e=Eh;const i=new Map;if(s!=null&&s.plugins){for(const r of s.plugins){let n,a;typeof r=="string"?n=r:[n,a]=r,i.has(n)||i.set(n,a||{})}em(i),e=dm(i)}return new e(s,t,i)}const Ih=new Map;function dm(s){const t=[];for(const r of tm)s.has(r)&&t.push(r);const e=t.join("|");let i=Ih.get(e);if(!i){i=Eh;for(const r of t)i=wh[r](i);Ih.set(e,i)}return i}var fm=Br.parse=cm;Br.parseExpression=hm,Br.tokTypes=pm;function mm(s,t){const e=s.filter(({type:i})=>i==="ImportDeclaration").map(i=>t.slice(i.start,i.end));return{importsCode:`${e.join(`
|
|
9
9
|
`)}
|
|
10
10
|
`,setupCode:`${t.replace(new RegExp(e.join("|"),"g"),"").trim()}
|
|
11
|
-
`}}function ym(s,t){return new Promise(e=>{const i=Object.create(null),r=new MutationObserver(a=>{for(const o of a)o.addedNodes.forEach(l=>{l instanceof Element&&s({node:l,discovery:i,announce:n})})});r.observe(document,{childList:!0,subtree:!0}),document.addEventListener("DOMContentLoaded",()=>{t?.({discovery:i,announce:n}),n()});function n(){e(i),r.disconnect()}})}function gm(s,t){try{const e=new DOMParser().parseFromString(`<body>${t}</body>`,"text/html").body.firstElementChild,i=e?.tagName===s.tagName,r=s.getAttributeNames(),n=e?.getAttributeNames()??[],a=new Set(n).isSubsetOf(new Set(r));return i&&a}catch{return!1}}function ci(s,t=s){return function(e){const i=Object.getOwnPropertySymbols(e).find(r=>r.description==="default");return(e[t]??(i&&e[i]))?.(s)}}function xm(s){return s.flatMap(e=>ci(e,e.type)({FunctionDeclaration:({id:i})=>i?[i.name]:[],VariableDeclaration:i=>i.declarations.flatMap(({id:r})=>t(r)),[Symbol("default")]:()=>[]}));function t(e){const i=r=>t(r.argument);return ci(e,e?.type)({Identifier:r=>[r.name],AssignmentPattern:r=>t(r.left),ObjectPattern:r=>r.properties.flatMap(n=>ci(n,n.type)({ObjectProperty:a=>t(a.value),RestElement:i}),[]),ArrayPattern:r=>r.elements.flatMap(n=>ci(n,n?.type??0)({0:()=>[],RestElement:i,[Symbol("default")]:a=>t(a)})),[Symbol("default")]:()=>[]})}}function bm(s){return s.some(t=>ci(t,t.type)({ExpressionStatement:e=>e.expression.type==="AwaitExpression",VariableDeclaration:e=>e.declarations.some(i=>i.init?.type==="AwaitExpression")}))}function Pm(s){const t=fm(s,{sourceType:"module"}).program.body;return{extractImport:()=>mm(t,s),isAsyncModule:()=>bm(t),getGlobalVars:()=>xm(t)}}function Tm(s){const t=s?.innerHTML??"";ci(s?.tagName??0)({0:()=>{s=document.createElement("script"),document.head.appendChild(s)},SCRIPT:()=>s.innerHTML=""}),s.type="module";const{extractImport:e,getGlobalVars:i,isAsyncModule:r}=Pm(t);return{scriptEl:s,retNames:i(),isAsync:r(),...e()}}function Sm(s){const t=s?.innerHTML??"not found <template>";return s?.remove(),t}function Nh(s,t,e,i){return{str:s,parse:t,logType:
|
|
11
|
+
`}}function ym(s,t){return new Promise(e=>{const i=Object.create(null),r=new MutationObserver(a=>{for(const o of a)o.addedNodes.forEach(l=>{l instanceof Element&&s({node:l,discovery:i,announce:n})})});r.observe(document,{childList:!0,subtree:!0}),document.addEventListener("DOMContentLoaded",()=>{t?.({discovery:i,announce:n}),n()});function n(){e(i),r.disconnect()}})}function gm(s,t){try{const e=new DOMParser().parseFromString(`<body>${t}</body>`,"text/html").body.firstElementChild,i=e?.tagName===s.tagName,r=s.getAttributeNames(),n=e?.getAttributeNames()??[],a=new Set(n).isSubsetOf(new Set(r));return i&&a}catch{return!1}}function ci(s,t=s){return function(e){const i=Object.getOwnPropertySymbols(e).find(r=>r.description==="default");return(e[t]??(i&&e[i]))?.(s)}}function xm(s){return s.flatMap(e=>ci(e,e.type)({FunctionDeclaration:({id:i})=>i?[i.name]:[],VariableDeclaration:i=>i.declarations.flatMap(({id:r})=>t(r)),[Symbol("default")]:()=>[]}));function t(e){const i=r=>t(r.argument);return ci(e,e?.type)({Identifier:r=>[r.name],AssignmentPattern:r=>t(r.left),ObjectPattern:r=>r.properties.flatMap(n=>ci(n,n.type)({ObjectProperty:a=>t(a.value),RestElement:i}),[]),ArrayPattern:r=>r.elements.flatMap(n=>ci(n,n?.type??0)({0:()=>[],RestElement:i,[Symbol("default")]:a=>t(a)})),[Symbol("default")]:()=>[]})}}function bm(s){return s.some(t=>ci(t,t.type)({ExpressionStatement:e=>e.expression.type==="AwaitExpression",VariableDeclaration:e=>e.declarations.some(i=>i.init?.type==="AwaitExpression")}))}function Pm(s){const t=fm(s,{sourceType:"module"}).program.body;return{extractImport:()=>mm(t,s),isAsyncModule:()=>bm(t),getGlobalVars:()=>xm(t)}}function Tm(s){const t=s?.innerHTML??"";ci(s?.tagName??0)({0:()=>{s=document.createElement("script"),document.head.appendChild(s)},SCRIPT:()=>s.innerHTML=""}),s.type="module";const{extractImport:e,getGlobalVars:i,isAsyncModule:r}=Pm(t);return{scriptEl:s,retNames:i(),isAsync:r(),...e()}}function Sm(s){const t=s?.innerHTML??"not found <template>";return s?.remove(),t}function Nh(s,t,e,i){return{str:s,parse:t,logType:{lose:()=>{},excess:()=>{}},beNoHere:i.replace(/%s/g,`${s} is not supposed to be here`)}}const Ds=Nh("<script setup>",Tm,{lose:console.warn,excess:console.warn},"/* %s */"),Ji=Nh("<template>",Sm,{lose:console.error,excess:console.warn},"<!-- %s -->"),kh=[Ds,Ji];function Lh(s){const{parse:t,logType:e,beNoHere:i}=s;return{...e,beNoHere:r=>r.innerHTML=i,parse:t}}const so={[Ds.str]:Lh(Ds),[Ji.str]:Lh(Ji)},vm=({discovery:s})=>{for(const{str:t}of kh){const{count:e}=s[t],{lose:i,excess:r,parse:n}=so[t];e===0&&(i(`not found ${t} in top level for document`),s[t].parsed=n()),e>1&&r(`only one ${t} is allowed in top level for document`)}};function _h(s,t){return{count:s,parsed:t}}const Am={[Ds.str]:_h(0,null),[Ji.str]:_h(0,null)},Cm=({node:s,discovery:t})=>{let e;(o=>(o[o.WITHOUT=0]="WITHOUT",o[o.RELATE=1]="RELATE",o[o.CORRECT=2]="CORRECT"))(e||(e={}));const{WITHOUT:i,RELATE:r,CORRECT:n}=e;Object.assign(t,Am);function a(o){return gm(s,o)?s.parentElement===document.head?n:r:i}for(const{str:o}of kh){if(a(o)!==n)continue;const{parse:l,beNoHere:c}=so[o];if(t[o].count++,t[o].count!==1){c(s);continue}t[o].parsed=l(s)}a(Ds.str)===r&&so[Ds.str].beNoHere(s)};/**
|
|
12
12
|
* vue v3.5.12
|
|
13
13
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
14
14
|
* @license MIT
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "setupin",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.6.
|
|
4
|
+
"version": "2.6.1",
|
|
5
5
|
"description": "Vue SFC? HTML! <script setup> in html",
|
|
6
6
|
"author": "tofu-xx <tofu-xx@foxmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
"vue": "^3.5.12"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
|
-
"release": "bumpp --no-push && nr build && pnpm publish",
|
|
47
|
-
"build": "unbuild",
|
|
48
46
|
"dev": "unbuild --stub",
|
|
47
|
+
"build": "unbuild",
|
|
48
|
+
"release": "bumpp --no-push && nr build && pnpm publish",
|
|
49
49
|
"up": "taze major -I"
|
|
50
50
|
}
|
|
51
51
|
}
|