u)return!1;if((y+=m[_+1])>=u)return!0}}}),l=O(function(t,e){e.__esModule=!0,e.types=e.keywords=e.TokenType=void 0;class i{constructor(u,m={}){this.label=u,this.keyword=m.keyword,this.beforeExpr=!!m.beforeExpr,this.startsExpr=!!m.startsExpr,this.isLoop=!!m.isLoop,this.isAssign=!!m.isAssign,this.prefix=!!m.prefix,this.postfix=!!m.postfix,this.binop=m.binop||null,this.updateContext=null}}function n(h,u){return new i(h,{beforeExpr:!0,binop:u})}e.TokenType=i;let r={beforeExpr:!0},s={startsExpr:!0},a={};function o(h,u={}){return u.keyword=h,a[h]=new i(h,u)}e.keywords=a;let p={num:new i("num",s),regexp:new i("regexp",s),string:new i("string",s),name:new i("name",s),privateId:new i("privateId",s),eof:new i("eof"),bracketL:new i("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new i("]"),braceL:new i("{",{beforeExpr:!0,startsExpr:!0}),braceR:new i("}"),parenL:new i("(",{beforeExpr:!0,startsExpr:!0}),parenR:new i(")"),comma:new i(",",r),semi:new i(";",r),colon:new i(":",r),dot:new i("."),question:new i("?",r),questionDot:new i("?."),arrow:new i("=>",r),template:new i("template"),invalidTemplate:new i("invalidTemplate"),ellipsis:new i("...",r),backQuote:new i("`",s),dollarBraceL:new i("${",{beforeExpr:!0,startsExpr:!0}),eq:new i("=",{beforeExpr:!0,isAssign:!0}),assign:new i("_=",{beforeExpr:!0,isAssign:!0}),incDec:new i("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new i("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:n("||",1),logicalAND:n("&&",2),bitwiseOR:n("|",3),bitwiseXOR:n("^",4),bitwiseAND:n("&",5),equality:n("==/!=/===/!==",6),relational:n(">/<=/>=",7),bitShift:n("<>>/>>>",8),plusMin:new i("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:n("%",10),star:n("*",10),slash:n("/",10),starstar:new i("**",{beforeExpr:!0}),coalesce:n("??",1),_break:o("break"),_case:o("case",r),_catch:o("catch"),_continue:o("continue"),_debugger:o("debugger"),_default:o("default",r),_do:o("do",{isLoop:!0,beforeExpr:!0}),_else:o("else",r),_finally:o("finally"),_for:o("for",{isLoop:!0}),_function:o("function",s),_if:o("if"),_return:o("return",r),_switch:o("switch"),_throw:o("throw",r),_try:o("try"),_var:o("var"),_const:o("const"),_while:o("while",{isLoop:!0}),_with:o("with"),_new:o("new",{beforeExpr:!0,startsExpr:!0}),_this:o("this",s),_super:o("super",s),_class:o("class",s),_extends:o("extends",r),_export:o("export"),_import:o("import",s),_null:o("null",s),_true:o("true",s),_false:o("false",s),_in:o("in",{beforeExpr:!0,binop:7}),_instanceof:o("instanceof",{beforeExpr:!0,binop:7}),_typeof:o("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:o("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:o("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})};e.types=p}),S=O(function(t,e){e.__esModule=!0,e.isNewLine=r,e.lineBreakG=e.lineBreak=void 0,e.nextLineBreak=function(a,o,p=a.length){for(let h=o;hn.call(o,p));e.hasOwn=s;let a=Array.isArray||(o=>r.call(o)==="[object Array]");e.isArray=a,e.loneSurrogate=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/}),F=O(function(t,e){e.__esModule=!0,e.SourceLocation=e.Position=void 0,e.getLineInfo=function(r,s){for(let a=1,o=0;;){let p=(0,S.nextLineBreak)(r,o,s);if(p<0)return new i(a,s-o);++a,o=p}};class i{constructor(r,s){this.line=r,this.column=s}offset(r){return new i(this.line,this.column+r)}}e.Position=i,e.SourceLocation=class{constructor(r,s,a){this.start=s,this.end=a,r.sourceFile!==null&&(this.source=r.sourceFile)}}}),ee=O(function(t,e){e.__esModule=!0,e.defaultOptions=void 0,e.getOptions=function(s){var a,o;let p={};for(let h in i)p[h]=s&&(0,P.hasOwn)(s,h)?s[h]:i[h];if(p.ecmaVersion==="latest"?p.ecmaVersion=1e8:p.ecmaVersion==null?(!n&&typeof console=="object"&&console.warn&&(n=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
Defaulting to 2020, but this will stop working in the future.`)),p.ecmaVersion=11):p.ecmaVersion>=2015&&(p.ecmaVersion-=2009),p.allowReserved==null&&(p.allowReserved=p.ecmaVersion<5),(0,P.isArray)(p.onToken)){let h=p.onToken;p.onToken=u=>h.push(u)}return(0,P.isArray)(p.onComment)&&(p.onComment=(a=p,o=p.onComment,function(h,u,m,y,_,w){let c={type:h?"Block":"Line",value:u,start:m,end:y};a.locations&&(c.loc=new F.SourceLocation(this,_,w)),a.ranges&&(c.range=[m,y]),o.push(c)})),p};let i={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1};e.defaultOptions=i;let n=!1}),x=O(function(t,e){e.__esModule=!0,e.SCOPE_VAR=e.SCOPE_TOP=e.SCOPE_SUPER=e.SCOPE_SIMPLE_CATCH=e.SCOPE_GENERATOR=e.SCOPE_FUNCTION=e.SCOPE_DIRECT_SUPER=e.SCOPE_CLASS_STATIC_BLOCK=e.SCOPE_ASYNC=e.SCOPE_ARROW=e.BIND_VAR=e.BIND_SIMPLE_CATCH=e.BIND_OUTSIDE=e.BIND_NONE=e.BIND_LEXICAL=e.BIND_FUNCTION=void 0,e.functionFlags=function(n,r){return 2|(n?4:0)|(r?8:0)},e.SCOPE_VAR=259,e.SCOPE_CLASS_STATIC_BLOCK=256,e.SCOPE_DIRECT_SUPER=128,e.SCOPE_SUPER=64,e.SCOPE_SIMPLE_CATCH=32,e.SCOPE_ARROW=16,e.SCOPE_GENERATOR=8,e.SCOPE_ASYNC=4,e.SCOPE_FUNCTION=2,e.SCOPE_TOP=1,e.BIND_OUTSIDE=5,e.BIND_SIMPLE_CATCH=4,e.BIND_FUNCTION=3,e.BIND_LEXICAL=2,e.BIND_VAR=1,e.BIND_NONE=0}),L=O(function(t,e){e.__esModule=!0,e.Parser=void 0,e.Parser=class{constructor(n,r,s){this.options=n=(0,ee.getOptions)(n),this.sourceFile=n.sourceFile,this.keywords=(0,P.wordsRegexp)(k.keywords[n.ecmaVersion>=6?6:n.sourceType==="module"?"5module":5]);let a="";n.allowReserved!==!0&&(a=k.reservedWords[n.ecmaVersion>=6?6:n.ecmaVersion===5?5:3],n.sourceType==="module"&&(a+=" await")),this.reservedWords=(0,P.wordsRegexp)(a);let o=(a?a+" ":"")+k.reservedWords.strict;this.reservedWordsStrict=(0,P.wordsRegexp)(o),this.reservedWordsStrictBind=(0,P.wordsRegexp)(o+" "+k.reservedWords.strictBind),this.input=String(r),this.containsEsc=!1,s?(this.pos=s,this.lineStart=this.input.lastIndexOf(`
`,s-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(S.lineBreak).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=l.types.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=n.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&n.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(x.SCOPE_TOP),this.regexpState=null,this.privateNameStack=[]}parse(){let n=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(n)}get inFunction(){return(this.currentVarScope().flags&x.SCOPE_FUNCTION)>0}get inGenerator(){return(this.currentVarScope().flags&x.SCOPE_GENERATOR)>0&&!this.currentVarScope().inClassFieldInit}get inAsync(){return(this.currentVarScope().flags&x.SCOPE_ASYNC)>0&&!this.currentVarScope().inClassFieldInit}get canAwait(){for(let n=this.scopeStack.length-1;n>=0;n--){let r=this.scopeStack[n];if(r.inClassFieldInit||r.flags&x.SCOPE_CLASS_STATIC_BLOCK)return!1;if(r.flags&x.SCOPE_FUNCTION)return(r.flags&x.SCOPE_ASYNC)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction}get allowSuper(){let n=this.currentThisScope(),r=n.flags,s=n.inClassFieldInit;return(r&x.SCOPE_SUPER)>0||s||this.options.allowSuperOutsideMethod}get allowDirectSuper(){return(this.currentThisScope().flags&x.SCOPE_DIRECT_SUPER)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}get allowNewDotTarget(){let n=this.currentThisScope(),r=n.flags,s=n.inClassFieldInit;return(r&(x.SCOPE_FUNCTION|x.SCOPE_CLASS_STATIC_BLOCK))>0||s}get inClassStaticBlock(){return(this.currentVarScope().flags&x.SCOPE_CLASS_STATIC_BLOCK)>0}static extend(...n){let r=this;for(let s=0;s-1&&this.raiseRecoverable(r.trailingComma,"Comma is not permitted after the rest element");let a=s?r.parenthesizedAssign:r.parenthesizedBind;a>-1&&this.raiseRecoverable(a,"Parenthesized pattern")},i.checkExpressionErrors=function(r,s){if(!r)return!1;let a=r.shorthandAssign,o=r.doubleProto;if(!s)return a>=0||o>=0;a>=0&&this.raise(a,"Shorthand property assignments are valid only in destructuring patterns"),o>=0&&this.raiseRecoverable(o,"Redefinition of __proto__ property")},i.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Hr(t,e){if(t){if(typeof t=="string")return Ii(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);if(i==="Object"&&t.constructor&&(i=t.constructor.name),i==="Map"||i==="Set")return Array.from(t);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Ii(t,e)}}function Ii(t,e){(e==null||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i55295&&n<56320)return!0;if(t)return!1;if(n===123)return!0;if((0,k.isIdentifierStart)(n,!0)){let r=i+1;for(;(0,k.isIdentifierChar)(n=this.input.charCodeAt(r),!0);)++r;if(n===92||n>55295&&n<56320)return!0;let s=this.input.slice(i,r);if(!k.keywordRelationalOperator.test(s))return!0}return!1},b.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;S.skipWhiteSpace.lastIndex=this.pos;let t=S.skipWhiteSpace.exec(this.input),e=this.pos+t[0].length,i;return!S.lineBreak.test(this.input.slice(this.pos,e))&&this.input.slice(e,e+8)==="function"&&(e+8===this.input.length||!((0,k.isIdentifierChar)(i=this.input.charCodeAt(e+8))||i>55295&&i<56320))},b.parseStatement=function(t,e,i){let n=this.type,r=this.startNode(),s;switch(this.isLet(t)&&(n=l.types._var,s="let"),n){case l.types._break:case l.types._continue:return this.parseBreakContinueStatement(r,n.keyword);case l.types._debugger:return this.parseDebuggerStatement(r);case l.types._do:return this.parseDoStatement(r);case l.types._for:return this.parseForStatement(r);case l.types._function:return t&&(this.strict||t!=="if"&&t!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(r,!1,!t);case l.types._class:return t&&this.unexpected(),this.parseClass(r,!0);case l.types._if:return this.parseIfStatement(r);case l.types._return:return this.parseReturnStatement(r);case l.types._switch:return this.parseSwitchStatement(r);case l.types._throw:return this.parseThrowStatement(r);case l.types._try:return this.parseTryStatement(r);case l.types._const:case l.types._var:return s=s||this.value,t&&s!=="var"&&this.unexpected(),this.parseVarStatement(r,s);case l.types._while:return this.parseWhileStatement(r);case l.types._with:return this.parseWithStatement(r);case l.types.braceL:return this.parseBlock(!0,r);case l.types.semi:return this.parseEmptyStatement(r);case l.types._export:case l.types._import:if(this.options.ecmaVersion>10&&n===l.types._import){S.skipWhiteSpace.lastIndex=this.pos;let p=S.skipWhiteSpace.exec(this.input),h=this.pos+p[0].length,u=this.input.charCodeAt(h);if(u===40||u===46)return this.parseExpressionStatement(r,this.parseExpression())}return this.options.allowImportExportEverywhere||(e||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),n===l.types._import?this.parseImport(r):this.parseExport(r,i);default:if(this.isAsyncFunction())return t&&this.unexpected(),this.next(),this.parseFunctionStatement(r,!0,!t);let a=this.value,o=this.parseExpression();return n===l.types.name&&o.type==="Identifier"&&this.eat(l.types.colon)?this.parseLabeledStatement(r,a,o,t):this.parseExpressionStatement(r,o)}},b.parseBreakContinueStatement=function(t,e){let i=e==="break";this.next(),this.eat(l.types.semi)||this.insertSemicolon()?t.label=null:this.type!==l.types.name?this.unexpected():(t.label=this.parseIdent(),this.semicolon());let n=0;for(;n=6?this.eat(l.types.semi):this.semicolon(),this.finishNode(t,"DoWhileStatement")},b.parseForStatement=function(t){this.next();let e=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(ie),this.enterScope(0),this.expect(l.types.parenL),this.type===l.types.semi)return e>-1&&this.unexpected(e),this.parseFor(t,null);let i=this.isLet();if(this.type===l.types._var||this.type===l.types._const||i){let o=this.startNode(),p=i?"let":this.value;return this.next(),this.parseVar(o,!0,p),this.finishNode(o,"VariableDeclaration"),(this.type===l.types._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&o.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===l.types._in?e>-1&&this.unexpected(e):t.await=e>-1),this.parseForIn(t,o)):(e>-1&&this.unexpected(e),this.parseFor(t,o))}let n=this.isContextual("let"),r=!1,s=new kt.DestructuringErrors,a=this.parseExpression(!(e>-1)||"await",s);return this.type===l.types._in||(r=this.options.ecmaVersion>=6&&this.isContextual("of"))?(this.options.ecmaVersion>=9&&(this.type===l.types._in?e>-1&&this.unexpected(e):t.await=e>-1),n&&r&&this.raise(a.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(a,!1,s),this.checkLValPattern(a),this.parseForIn(t,a)):(this.checkExpressionErrors(s,!0),e>-1&&this.unexpected(e),this.parseFor(t,a))},b.parseFunctionStatement=function(t,e,i){return this.next(),this.parseFunction(t,at|(i?0:re),!1,e)},b.parseIfStatement=function(t){return this.next(),t.test=this.parseParenExpression(),t.consequent=this.parseStatement("if"),t.alternate=this.eat(l.types._else)?this.parseStatement("if"):null,this.finishNode(t,"IfStatement")},b.parseReturnStatement=function(t){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(l.types.semi)||this.insertSemicolon()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")},b.parseSwitchStatement=function(t){this.next(),t.discriminant=this.parseParenExpression(),t.cases=[],this.expect(l.types.braceL),this.labels.push(Wr),this.enterScope(0);let e;for(let i=!1;this.type!==l.types.braceR;)if(this.type===l.types._case||this.type===l.types._default){let n=this.type===l.types._case;e&&this.finishNode(e,"SwitchCase"),t.cases.push(e=this.startNode()),e.consequent=[],this.next(),n?e.test=this.parseExpression():(i&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),i=!0,e.test=null),this.expect(l.types.colon)}else e||this.unexpected(),e.consequent.push(this.parseStatement(null));return this.exitScope(),e&&this.finishNode(e,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(t,"SwitchStatement")},b.parseThrowStatement=function(t){return this.next(),S.lineBreak.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")};var qr=[];b.parseTryStatement=function(t){if(this.next(),t.block=this.parseBlock(),t.handler=null,this.type===l.types._catch){let e=this.startNode();if(this.next(),this.eat(l.types.parenL)){e.param=this.parseBindingAtom();let i=e.param.type==="Identifier";this.enterScope(i?x.SCOPE_SIMPLE_CATCH:0),this.checkLValPattern(e.param,i?x.BIND_SIMPLE_CATCH:x.BIND_LEXICAL),this.expect(l.types.parenR)}else this.options.ecmaVersion<10&&this.unexpected(),e.param=null,this.enterScope(0);e.body=this.parseBlock(!1),this.exitScope(),t.handler=this.finishNode(e,"CatchClause")}return t.finalizer=this.eat(l.types._finally)?this.parseBlock():null,t.handler||t.finalizer||this.raise(t.start,"Missing catch or finally clause"),this.finishNode(t,"TryStatement")},b.parseVarStatement=function(t,e){return this.next(),this.parseVar(t,!1,e),this.semicolon(),this.finishNode(t,"VariableDeclaration")},b.parseWhileStatement=function(t){return this.next(),t.test=this.parseParenExpression(),this.labels.push(ie),t.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(t,"WhileStatement")},b.parseWithStatement=function(t){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),t.object=this.parseParenExpression(),t.body=this.parseStatement("with"),this.finishNode(t,"WithStatement")},b.parseEmptyStatement=function(t){return this.next(),this.finishNode(t,"EmptyStatement")},b.parseLabeledStatement=function(t,e,i,n){for(var r,s=st(this.labels);!(r=s()).done;)r.value.name===e&&this.raise(i.start,"Label '"+e+"' is already declared");let a=this.type.isLoop?"loop":this.type===l.types._switch?"switch":null;for(let o=this.labels.length-1;o>=0;o--){let p=this.labels[o];if(p.statementStart===t.start)p.statementStart=this.start,p.kind=a;else break}return this.labels.push({name:e,kind:a,statementStart:this.start}),t.body=this.parseStatement(n?n.indexOf("label")===-1?n+"label":n:"label"),this.labels.pop(),t.label=i,this.finishNode(t,"LabeledStatement")},b.parseExpressionStatement=function(t,e){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")},b.parseBlock=function(t=!0,e=this.startNode(),i){for(e.body=[],this.expect(l.types.braceL),t&&this.enterScope(0);this.type!==l.types.braceR;){let n=this.parseStatement(null);e.body.push(n)}return i&&(this.strict=!1),this.next(),t&&this.exitScope(),this.finishNode(e,"BlockStatement")},b.parseFor=function(t,e){return t.init=e,this.expect(l.types.semi),t.test=this.type===l.types.semi?null:this.parseExpression(),this.expect(l.types.semi),t.update=this.type===l.types.parenR?null:this.parseExpression(),this.expect(l.types.parenR),t.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(t,"ForStatement")},b.parseForIn=function(t,e){let i=this.type===l.types._in;return this.next(),e.type==="VariableDeclaration"&&e.declarations[0].init!=null&&(!i||this.options.ecmaVersion<8||this.strict||e.kind!=="var"||e.declarations[0].id.type!=="Identifier")&&this.raise(e.start,`${i?"for-in":"for-of"} loop variable declaration may not have an initializer`),t.left=e,t.right=i?this.parseExpression():this.parseMaybeAssign(),this.expect(l.types.parenR),t.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(t,i?"ForInStatement":"ForOfStatement")},b.parseVar=function(t,e,i){for(t.declarations=[],t.kind=i;;){let n=this.startNode();if(this.parseVarId(n,i),this.eat(l.types.eq)?n.init=this.parseMaybeAssign(e):i!=="const"||this.type===l.types._in||this.options.ecmaVersion>=6&&this.isContextual("of")?n.id.type==="Identifier"||e&&(this.type===l.types._in||this.isContextual("of"))?n.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),t.declarations.push(this.finishNode(n,"VariableDeclarator")),!this.eat(l.types.comma))break}return t},b.parseVarId=function(t,e){t.id=this.parseBindingAtom(),this.checkLValPattern(t.id,e==="var"?x.BIND_VAR:x.BIND_LEXICAL,!1)};var at=1,re=2;function Gr(t,e){let i=e.key.name,n=t[i],r="true";return e.type==="MethodDefinition"&&(e.kind==="get"||e.kind==="set")&&(r=(e.static?"s":"i")+e.kind),n==="iget"&&r==="iset"||n==="iset"&&r==="iget"||n==="sget"&&r==="sset"||n==="sset"&&r==="sget"?(t[i]="true",!1):!!n||(t[i]=r,!1)}function St(t,e){let i=t.computed,n=t.key;return!i&&(n.type==="Identifier"&&n.name===e||n.type==="Literal"&&n.value===e)}function te(t,e){var i=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(i)return(i=i.call(t)).next.bind(i);if(Array.isArray(t)||(i=zr(t))||e&&t&&typeof t.length=="number"){i&&(t=i);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zr(t,e){if(t){if(typeof t=="string")return Ti(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);if(i==="Object"&&t.constructor&&(i=t.constructor.name),i==="Map"||i==="Set")return Array.from(t);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Ti(t,e)}}function Ti(t,e){(e==null||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i=9||this.options.ecmaVersion>=6&&!n)&&(this.type===l.types.star&&e&re&&this.unexpected(),t.generator=this.eat(l.types.star)),this.options.ecmaVersion>=8&&(t.async=!!n),e&at&&(t.id=4&e&&this.type!==l.types.name?null:this.parseIdent(),t.id&&!(e&re)&&this.checkLValSimple(t.id,this.strict||t.generator||t.async?this.treatFunctionsAsVar?x.BIND_VAR:x.BIND_LEXICAL:x.BIND_FUNCTION));let s=this.yieldPos,a=this.awaitPos,o=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope((0,x.functionFlags)(t.async,t.generator)),e&at||(t.id=this.type===l.types.name?this.parseIdent():null),this.parseFunctionParams(t),this.parseFunctionBody(t,i,!1,r),this.yieldPos=s,this.awaitPos=a,this.awaitIdentPos=o,this.finishNode(t,e&at?"FunctionDeclaration":"FunctionExpression")},b.parseFunctionParams=function(t){this.expect(l.types.parenL),t.params=this.parseBindingList(l.types.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},b.parseClass=function(t,e){this.next();let i=this.strict;this.strict=!0,this.parseClassId(t,e),this.parseClassSuper(t);let n=this.enterClassBody(),r=this.startNode(),s=!1;for(r.body=[],this.expect(l.types.braceL);this.type!==l.types.braceR;){let a=this.parseClassElement(t.superClass!==null);a&&(r.body.push(a),a.type==="MethodDefinition"&&a.kind==="constructor"?(s&&this.raise(a.start,"Duplicate constructor in the same class"),s=!0):a.key&&a.key.type==="PrivateIdentifier"&&Gr(n,a)&&this.raiseRecoverable(a.key.start,`Identifier '#${a.key.name}' has already been declared`))}return this.strict=i,this.next(),t.body=this.finishNode(r,"ClassBody"),this.exitClassBody(),this.finishNode(t,e?"ClassDeclaration":"ClassExpression")},b.parseClassElement=function(t){if(this.eat(l.types.semi))return null;let e=this.options.ecmaVersion,i=this.startNode(),n="",r=!1,s=!1,a="method",o=!1;if(this.eatContextual("static")){if(e>=13&&this.eat(l.types.braceL))return this.parseClassStaticBlock(i),i;this.isClassElementNameStart()||this.type===l.types.star?o=!0:n="static"}if(i.static=o,!n&&e>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===l.types.star)&&!this.canInsertSemicolon()?s=!0:n="async"),!n&&(e>=9||!s)&&this.eat(l.types.star)&&(r=!0),!n&&!s&&!r){let p=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?a=p:n=p)}if(n?(i.computed=!1,i.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),i.key.name=n,this.finishNode(i.key,"Identifier")):this.parseClassElementName(i),e<13||this.type===l.types.parenL||a!=="method"||r||s){let p=!i.static&&St(i,"constructor");p&&a!=="method"&&this.raise(i.key.start,"Constructor can't have get/set modifier"),i.kind=p?"constructor":a,this.parseClassMethod(i,r,s,p&&t)}else this.parseClassField(i);return i},b.isClassElementNameStart=function(){return this.type===l.types.name||this.type===l.types.privateId||this.type===l.types.num||this.type===l.types.string||this.type===l.types.bracketL||this.type.keyword},b.parseClassElementName=function(t){this.type===l.types.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),t.computed=!1,t.key=this.parsePrivateIdent()):this.parsePropertyName(t)},b.parseClassMethod=function(t,e,i,n){let r=t.key;t.kind==="constructor"?(e&&this.raise(r.start,"Constructor can't be a generator"),i&&this.raise(r.start,"Constructor can't be an async method")):t.static&&St(t,"prototype")&&this.raise(r.start,"Classes may not have a static property named prototype");let s=t.value=this.parseMethod(e,i,n);return t.kind==="get"&&s.params.length!==0&&this.raiseRecoverable(s.start,"getter should have no params"),t.kind==="set"&&s.params.length!==1&&this.raiseRecoverable(s.start,"setter should have exactly one param"),t.kind==="set"&&s.params[0].type==="RestElement"&&this.raiseRecoverable(s.params[0].start,"Setter cannot use rest params"),this.finishNode(t,"MethodDefinition")},b.parseClassField=function(t){if(St(t,"constructor")?this.raise(t.key.start,"Classes can't have a field named 'constructor'"):t.static&&St(t,"prototype")&&this.raise(t.key.start,"Classes can't have a static field named 'prototype'"),this.eat(l.types.eq)){let e=this.currentThisScope(),i=e.inClassFieldInit;e.inClassFieldInit=!0,t.value=this.parseMaybeAssign(),e.inClassFieldInit=i}else t.value=null;return this.semicolon(),this.finishNode(t,"PropertyDefinition")},b.parseClassStaticBlock=function(t){t.body=[];let e=this.labels;for(this.labels=[],this.enterScope(x.SCOPE_CLASS_STATIC_BLOCK|x.SCOPE_SUPER);this.type!==l.types.braceR;){let i=this.parseStatement(null);t.body.push(i)}return this.next(),this.exitScope(),this.labels=e,this.finishNode(t,"StaticBlock")},b.parseClassId=function(t,e){this.type===l.types.name?(t.id=this.parseIdent(),e&&this.checkLValSimple(t.id,x.BIND_LEXICAL,!1)):(e===!0&&this.unexpected(),t.id=null)},b.parseClassSuper=function(t){t.superClass=this.eat(l.types._extends)?this.parseExprSubscripts(!1):null},b.enterClassBody=function(){let t={declared:Object.create(null),used:[]};return this.privateNameStack.push(t),t.declared},b.exitClassBody=function(){let t=this.privateNameStack.pop(),e=t.declared,i=t.used,n=this.privateNameStack.length,r=n===0?null:this.privateNameStack[n-1];for(let s=0;s=11&&(this.eatContextual("as")?(t.exported=this.parseModuleExportName(),this.checkExport(e,t.exported.name,this.lastTokStart)):t.exported=null),this.expectContextual("from"),this.type!==l.types.string&&this.unexpected(),t.source=this.parseExprAtom(),this.semicolon(),this.finishNode(t,"ExportAllDeclaration");if(this.eat(l.types._default)){this.checkExport(e,"default",this.lastTokStart);let r;if(this.type===l.types._function||(r=this.isAsyncFunction())){let s=this.startNode();this.next(),r&&this.next(),t.declaration=this.parseFunction(s,4|at,!1,r)}else if(this.type===l.types._class){let s=this.startNode();t.declaration=this.parseClass(s,"nullableID")}else t.declaration=this.parseMaybeAssign(),this.semicolon();return this.finishNode(t,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement())t.declaration=this.parseStatement(null),t.declaration.type==="VariableDeclaration"?this.checkVariableExport(e,t.declaration.declarations):this.checkExport(e,t.declaration.id.name,t.declaration.id.start),t.specifiers=[],t.source=null;else{if(t.declaration=null,t.specifiers=this.parseExportSpecifiers(e),this.eatContextual("from"))this.type!==l.types.string&&this.unexpected(),t.source=this.parseExprAtom();else{for(var i,n=st(t.specifiers);!(i=n()).done;){let r=i.value;this.checkUnreserved(r.local),this.checkLocalExport(r.local),r.local.type==="Literal"&&this.raise(r.local.start,"A string literal cannot be used as an exported binding without `from`.")}t.source=null}this.semicolon()}return this.finishNode(t,"ExportNamedDeclaration")},b.checkExport=function(t,e,i){t&&((0,P.hasOwn)(t,e)&&this.raiseRecoverable(i,"Duplicate export '"+e+"'"),t[e]=!0)},b.checkPatternExport=function(t,e){let i=e.type;if(i==="Identifier")this.checkExport(t,e.name,e.start);else if(i==="ObjectPattern")for(var n,r=st(e.properties);!(n=r()).done;){let o=n.value;this.checkPatternExport(t,o)}else if(i==="ArrayPattern")for(var s,a=st(e.elements);!(s=a()).done;){let o=s.value;o&&this.checkPatternExport(t,o)}else i==="Property"?this.checkPatternExport(t,e.value):i==="AssignmentPattern"?this.checkPatternExport(t,e.left):i==="RestElement"?this.checkPatternExport(t,e.argument):i==="ParenthesizedExpression"&&this.checkPatternExport(t,e.expression)},b.checkVariableExport=function(t,e){if(t)for(var i,n=st(e);!(i=n()).done;){let r=i.value;this.checkPatternExport(t,r.id)}},b.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()},b.parseExportSpecifiers=function(t){let e=[],i=!0;for(this.expect(l.types.braceL);!this.eat(l.types.braceR);){if(i)i=!1;else if(this.expect(l.types.comma),this.afterTrailingComma(l.types.braceR))break;let n=this.startNode();n.local=this.parseModuleExportName(),n.exported=this.eatContextual("as")?this.parseModuleExportName():n.local,this.checkExport(t,n.exported[n.exported.type==="Identifier"?"name":"value"],n.exported.start),e.push(this.finishNode(n,"ExportSpecifier"))}return e},b.parseImport=function(t){return this.next(),this.type===l.types.string?(t.specifiers=qr,t.source=this.parseExprAtom()):(t.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),t.source=this.type===l.types.string?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(t,"ImportDeclaration")},b.parseImportSpecifiers=function(){let t=[],e=!0;if(this.type===l.types.name){let i=this.startNode();if(i.local=this.parseIdent(),this.checkLValSimple(i.local,x.BIND_LEXICAL),t.push(this.finishNode(i,"ImportDefaultSpecifier")),!this.eat(l.types.comma))return t}if(this.type===l.types.star){let i=this.startNode();return this.next(),this.expectContextual("as"),i.local=this.parseIdent(),this.checkLValSimple(i.local,x.BIND_LEXICAL),t.push(this.finishNode(i,"ImportNamespaceSpecifier")),t}for(this.expect(l.types.braceL);!this.eat(l.types.braceR);){if(e)e=!1;else if(this.expect(l.types.comma),this.afterTrailingComma(l.types.braceR))break;let i=this.startNode();i.imported=this.parseModuleExportName(),this.eatContextual("as")?i.local=this.parseIdent():(this.checkUnreserved(i.imported),i.local=i.imported),this.checkLValSimple(i.local,x.BIND_LEXICAL),t.push(this.finishNode(i,"ImportSpecifier"))}return t},b.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===l.types.string){let t=this.parseLiteral(this.value);return P.loneSurrogate.test(t.value)&&this.raise(t.start,"An export name cannot include a lone surrogate."),t}return this.parseIdent(!0)},b.adaptDirectivePrologue=function(t){for(let e=0;e=6&&t)switch(t.type){case"Identifier":this.inAsync&&t.name==="await"&&this.raise(t.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":t.type="ObjectPattern",i&&this.checkPatternErrors(i,!0);for(var n,r=te(t.properties);!(n=r()).done;){let s=n.value;this.toAssignable(s,e),s.type==="RestElement"&&(s.argument.type==="ArrayPattern"||s.argument.type==="ObjectPattern")&&this.raise(s.argument.start,"Unexpected token")}break;case"Property":t.kind!=="init"&&this.raise(t.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(t.value,e);break;case"ArrayExpression":t.type="ArrayPattern",i&&this.checkPatternErrors(i,!0),this.toAssignableList(t.elements,e);break;case"SpreadElement":t.type="RestElement",this.toAssignable(t.argument,e),t.argument.type==="AssignmentPattern"&&this.raise(t.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":t.operator!=="="&&this.raise(t.left.end,"Only '=' operator can be used for specifying default value."),t.type="AssignmentPattern",delete t.operator,this.toAssignable(t.left,e);break;case"ParenthesizedExpression":this.toAssignable(t.expression,e,i);break;case"ChainExpression":this.raiseRecoverable(t.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!e)break;default:this.raise(t.start,"Assigning to rvalue")}else i&&this.checkPatternErrors(i,!0);return t},U.toAssignableList=function(t,e){let i=t.length;for(let n=0;n=6)switch(this.type){case l.types.bracketL:let t=this.startNode();return this.next(),t.elements=this.parseBindingList(l.types.bracketR,!0,!0),this.finishNode(t,"ArrayPattern");case l.types.braceL:return this.parseObj(!0)}return this.parseIdent()},U.parseBindingList=function(t,e,i){let n=[],r=!0;for(;!this.eat(t);)if(r?r=!1:this.expect(l.types.comma),e&&this.type===l.types.comma)n.push(null);else{if(i&&this.afterTrailingComma(t))break;if(this.type===l.types.ellipsis){let s=this.parseRestBinding();this.parseBindingListItem(s),n.push(s),this.type===l.types.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.expect(t);break}else{let s=this.parseMaybeDefault(this.start,this.startLoc);this.parseBindingListItem(s),n.push(s)}}return n},U.parseBindingListItem=function(t){return t},U.parseMaybeDefault=function(t,e,i){if(i=i||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(l.types.eq))return i;let n=this.startNodeAt(t,e);return n.left=i,n.right=this.parseMaybeAssign(),this.finishNode(n,"AssignmentPattern")},U.checkLValSimple=function(t,e=x.BIND_NONE,i){let n=e!==x.BIND_NONE;switch(t.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(t.name)&&this.raiseRecoverable(t.start,(n?"Binding ":"Assigning to ")+t.name+" in strict mode"),n&&(e===x.BIND_LEXICAL&&t.name==="let"&&this.raiseRecoverable(t.start,"let is disallowed as a lexically bound name"),i&&((0,P.hasOwn)(i,t.name)&&this.raiseRecoverable(t.start,"Argument name clash"),i[t.name]=!0),e!==x.BIND_OUTSIDE&&this.declareName(t.name,e,t.start));break;case"ChainExpression":this.raiseRecoverable(t.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":n&&this.raiseRecoverable(t.start,"Binding member expression");break;case"ParenthesizedExpression":return n&&this.raiseRecoverable(t.start,"Binding parenthesized expression"),this.checkLValSimple(t.expression,e,i);default:this.raise(t.start,(n?"Binding":"Assigning to")+" rvalue")}},U.checkLValPattern=function(t,e=x.BIND_NONE,i){switch(t.type){case"ObjectPattern":for(var n,r=te(t.properties);!(n=r()).done;){let o=n.value;this.checkLValInnerPattern(o,e,i)}break;case"ArrayPattern":for(var s,a=te(t.elements);!(s=a()).done;){let o=s.value;o&&this.checkLValInnerPattern(o,e,i)}break;default:this.checkLValSimple(t,e,i)}},U.checkLValInnerPattern=function(t,e=x.BIND_NONE,i){switch(t.type){case"Property":this.checkLValInnerPattern(t.value,e,i);break;case"AssignmentPattern":this.checkLValPattern(t.left,e,i);break;case"RestElement":this.checkLValPattern(t.argument,e,i);break;default:this.checkLValPattern(t,e,i)}};var tt=O(function(t,e){e.__esModule=!0,e.types=e.TokContext=void 0;class i{constructor(a,o,p,h,u){this.token=a,this.isExpr=!!o,this.preserveSpace=!!p,this.override=h,this.generator=!!u}}e.TokContext=i;let n={b_stat:new i("{",!1),b_expr:new i("{",!0),b_tmpl:new i("${",!1),p_stat:new i("(",!1),p_expr:new i("(",!0),q_tmpl:new i("`",!0,!0,s=>s.tryReadTemplateToken()),f_stat:new i("function",!1),f_expr:new i("function",!0),f_expr_gen:new i("function",!0,!1,null,!0),f_gen:new i("function",!1,!1,null,!0)};e.types=n;let r=L.Parser.prototype;r.initialContext=function(){return[n.b_stat]},r.curContext=function(){return this.context[this.context.length-1]},r.braceIsBlock=function(s){let a=this.curContext();return a===n.f_expr||a===n.f_stat||(s===l.types.colon&&(a===n.b_stat||a===n.b_expr)?!a.isExpr:s===l.types._return||s===l.types.name&&this.exprAllowed?S.lineBreak.test(this.input.slice(this.lastTokEnd,this.start)):s===l.types._else||s===l.types.semi||s===l.types.eof||s===l.types.parenR||s===l.types.arrow||(s===l.types.braceL?a===n.b_stat:s!==l.types._var&&s!==l.types._const&&s!==l.types.name&&!this.exprAllowed))},r.inGeneratorContext=function(){for(let s=this.context.length-1;s>=1;s--){let a=this.context[s];if(a.token==="function")return a.generator}return!1},r.updateContext=function(s){let a,o=this.type;o.keyword&&s===l.types.dot?this.exprAllowed=!1:(a=o.updateContext)?a.call(this,s):this.exprAllowed=o.beforeExpr},r.overrideContext=function(s){this.curContext()!==s&&(this.context[this.context.length-1]=s)},l.types.parenR.updateContext=l.types.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}let s=this.context.pop();s===n.b_stat&&this.curContext().token==="function"&&(s=this.context.pop()),this.exprAllowed=!s.isExpr},l.types.braceL.updateContext=function(s){this.context.push(this.braceIsBlock(s)?n.b_stat:n.b_expr),this.exprAllowed=!0},l.types.dollarBraceL.updateContext=function(){this.context.push(n.b_tmpl),this.exprAllowed=!0},l.types.parenL.updateContext=function(s){let a=s===l.types._if||s===l.types._for||s===l.types._with||s===l.types._while;this.context.push(a?n.p_stat:n.p_expr),this.exprAllowed=!0},l.types.incDec.updateContext=function(){},l.types._function.updateContext=l.types._class.updateContext=function(s){!s.beforeExpr||s===l.types._else||s===l.types.semi&&this.curContext()!==n.p_stat||s===l.types._return&&S.lineBreak.test(this.input.slice(this.lastTokEnd,this.start))||(s===l.types.colon||s===l.types.braceL)&&this.curContext()===n.b_stat?this.context.push(n.f_stat):this.context.push(n.f_expr),this.exprAllowed=!1},l.types.backQuote.updateContext=function(){this.curContext()===n.q_tmpl?this.context.pop():this.context.push(n.q_tmpl),this.exprAllowed=!1},l.types.star.updateContext=function(s){if(s===l.types._function){let a=this.context.length-1;this.context[a]===n.f_expr?this.context[a]=n.f_expr_gen:this.context[a]=n.f_gen}this.exprAllowed=!0},l.types.name.updateContext=function(s){let a=!1;this.options.ecmaVersion>=6&&s!==l.types.dot&&(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())&&(a=!0),this.exprAllowed=a}});function Ri(t,e){var i=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(i)return(i=i.call(t)).next.bind(i);if(Array.isArray(t)||(i=Xr(t))||e&&t&&typeof t.length=="number"){i&&(t=i);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Xr(t,e){if(t){if(typeof t=="string")return Ni(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);if(i==="Object"&&t.constructor&&(i=t.constructor.name),i==="Map"||i==="Set")return Array.from(t);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Ni(t,e)}}function Ni(t,e){(e==null||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i=9&&t.type==="SpreadElement"||this.options.ecmaVersion>=6&&(t.computed||t.method||t.shorthand))return;let n=t.key,r;switch(n.type){case"Identifier":r=n.name;break;case"Literal":r=String(n.value);break;default:return}let s=t.kind;if(this.options.ecmaVersion>=6){r==="__proto__"&&s==="init"&&(e.proto&&(i?i.doubleProto<0&&(i.doubleProto=n.start):this.raiseRecoverable(n.start,"Redefinition of __proto__ property")),e.proto=!0);return}let a=e[r="$"+r];if(a){let o;(o=s==="init"?this.strict&&a.init||a.get||a.set:a.init||a[s])&&this.raiseRecoverable(n.start,"Redefinition of property")}else a=e[r]={init:!1,get:!1,set:!1};a[s]=!0},E.parseExpression=function(t,e){let i=this.start,n=this.startLoc,r=this.parseMaybeAssign(t,e);if(this.type===l.types.comma){let s=this.startNodeAt(i,n);for(s.expressions=[r];this.eat(l.types.comma);)s.expressions.push(this.parseMaybeAssign(t,e));return this.finishNode(s,"SequenceExpression")}return r},E.parseMaybeAssign=function(t,e,i){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(t);this.exprAllowed=!1}let n=!1,r=-1,s=-1,a=-1;e?(r=e.parenthesizedAssign,s=e.trailingComma,a=e.doubleProto,e.parenthesizedAssign=e.trailingComma=-1):(e=new kt.DestructuringErrors,n=!0);let o=this.start,p=this.startLoc;(this.type===l.types.parenL||this.type===l.types.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=t==="await");let h=this.parseMaybeConditional(t,e);if(i&&(h=i.call(this,h,o,p)),this.type.isAssign){let u=this.startNodeAt(o,p);return u.operator=this.value,this.type===l.types.eq&&(h=this.toAssignable(h,!1,e)),n||(e.parenthesizedAssign=e.trailingComma=e.doubleProto=-1),e.shorthandAssign>=h.start&&(e.shorthandAssign=-1),this.type===l.types.eq?this.checkLValPattern(h):this.checkLValSimple(h),u.left=h,this.next(),u.right=this.parseMaybeAssign(t),a>-1&&(e.doubleProto=a),this.finishNode(u,"AssignmentExpression")}return n&&this.checkExpressionErrors(e,!0),r>-1&&(e.parenthesizedAssign=r),s>-1&&(e.trailingComma=s),h},E.parseMaybeConditional=function(t,e){let i=this.start,n=this.startLoc,r=this.parseExprOps(t,e);if(this.checkExpressionErrors(e))return r;if(this.eat(l.types.question)){let s=this.startNodeAt(i,n);return s.test=r,s.consequent=this.parseMaybeAssign(),this.expect(l.types.colon),s.alternate=this.parseMaybeAssign(t),this.finishNode(s,"ConditionalExpression")}return r},E.parseExprOps=function(t,e){let i=this.start,n=this.startLoc,r=this.parseMaybeUnary(e,!1,!1,t);return this.checkExpressionErrors(e)||r.start===i&&r.type==="ArrowFunctionExpression"?r:this.parseExprOp(r,i,n,-1,t)},E.parseExprOp=function(t,e,i,n,r){let s=this.type.binop;if(s!=null&&(!r||this.type!==l.types._in)&&s>n){let a=this.type===l.types.logicalOR||this.type===l.types.logicalAND,o=this.type===l.types.coalesce;o&&(s=l.types.logicalAND.binop);let p=this.value;this.next();let h=this.start,u=this.startLoc,m=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,r),h,u,s,r),y=this.buildBinary(e,i,t,m,p,a||o);return(a&&this.type===l.types.coalesce||o&&(this.type===l.types.logicalOR||this.type===l.types.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(y,e,i,n,r)}return t},E.buildBinary=function(t,e,i,n,r,s){n.type==="PrivateIdentifier"&&this.raise(n.start,"Private identifier can only be left side of binary expression");let a=this.startNodeAt(t,e);return a.left=i,a.operator=r,a.right=n,this.finishNode(a,s?"LogicalExpression":"BinaryExpression")},E.parseMaybeUnary=function(t,e,i,n){let r=this.start,s=this.startLoc,a;if(this.isContextual("await")&&this.canAwait)a=this.parseAwait(n),e=!0;else if(this.type.prefix){let o=this.startNode(),p=this.type===l.types.incDec;o.operator=this.value,o.prefix=!0,this.next(),o.argument=this.parseMaybeUnary(null,!0,p,n),this.checkExpressionErrors(t,!0),p?this.checkLValSimple(o.argument):this.strict&&o.operator==="delete"&&o.argument.type==="Identifier"?this.raiseRecoverable(o.start,"Deleting local variable in strict mode"):o.operator==="delete"&&Mi(o.argument)?this.raiseRecoverable(o.start,"Private fields can not be deleted"):e=!0,a=this.finishNode(o,p?"UpdateExpression":"UnaryExpression")}else if(e||this.type!==l.types.privateId){if(a=this.parseExprSubscripts(t,n),this.checkExpressionErrors(t))return a;for(;this.type.postfix&&!this.canInsertSemicolon();){let o=this.startNodeAt(r,s);o.operator=this.value,o.prefix=!1,o.argument=a,this.checkLValSimple(a),this.next(),a=this.finishNode(o,"UpdateExpression")}}else(n||this.privateNameStack.length===0)&&this.unexpected(),a=this.parsePrivateIdent(),this.type!==l.types._in&&this.unexpected();return!i&&this.eat(l.types.starstar)?e?void this.unexpected(this.lastTokStart):this.buildBinary(r,s,a,this.parseMaybeUnary(null,!1,!1,n),"**",!1):a},E.parseExprSubscripts=function(t,e){let i=this.start,n=this.startLoc,r=this.parseExprAtom(t,e);if(r.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return r;let s=this.parseSubscripts(r,i,n,!1,e);return t&&s.type==="MemberExpression"&&(t.parenthesizedAssign>=s.start&&(t.parenthesizedAssign=-1),t.parenthesizedBind>=s.start&&(t.parenthesizedBind=-1),t.trailingComma>=s.start&&(t.trailingComma=-1)),s},E.parseSubscripts=function(t,e,i,n,r){let s=this.options.ecmaVersion>=8&&t.type==="Identifier"&&t.name==="async"&&this.lastTokEnd===t.end&&!this.canInsertSemicolon()&&t.end-t.start==5&&this.potentialArrowAt===t.start,a=!1;for(;;){let o=this.parseSubscript(t,e,i,n,s,a,r);if(o.optional&&(a=!0),o===t||o.type==="ArrowFunctionExpression"){if(a){let p=this.startNodeAt(e,i);p.expression=o,o=this.finishNode(p,"ChainExpression")}return o}t=o}},E.parseSubscript=function(t,e,i,n,r,s,a){let o=this.options.ecmaVersion>=11,p=o&&this.eat(l.types.questionDot);n&&p&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");let h=this.eat(l.types.bracketL);if(h||p&&this.type!==l.types.parenL&&this.type!==l.types.backQuote||this.eat(l.types.dot)){let u=this.startNodeAt(e,i);u.object=t,h?(u.property=this.parseExpression(),this.expect(l.types.bracketR)):this.type===l.types.privateId&&t.type!=="Super"?u.property=this.parsePrivateIdent():u.property=this.parseIdent(this.options.allowReserved!=="never"),u.computed=!!h,o&&(u.optional=p||u.object.optional),t=this.finishNode(u,"MemberExpression")}else if(!n&&this.eat(l.types.parenL)){let u=new kt.DestructuringErrors,m=this.yieldPos,y=this.awaitPos,_=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;let w=this.parseExprList(l.types.parenR,this.options.ecmaVersion>=8,!1,u);if(r&&!p&&!this.canInsertSemicolon()&&this.eat(l.types.arrow))return this.checkPatternErrors(u,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=m,this.awaitPos=y,this.awaitIdentPos=_,this.parseArrowExpression(this.startNodeAt(e,i),w,!0,a);this.checkExpressionErrors(u,!0),this.yieldPos=m||this.yieldPos,this.awaitPos=y||this.awaitPos,this.awaitIdentPos=_||this.awaitIdentPos;let c=this.startNodeAt(e,i);c.callee=t,c.arguments=w,o&&(c.optional=p),t=this.finishNode(c,"CallExpression")}else if(this.type===l.types.backQuote){(p||s)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");let u=this.startNodeAt(e,i);u.tag=t,u.quasi=this.parseTemplate({isTagged:!0}),t=this.finishNode(u,"TaggedTemplateExpression")}return t},E.parseExprAtom=function(t,e){this.type===l.types.slash&&this.readRegexp();let i,n=this.potentialArrowAt===this.start;switch(this.type){case l.types._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),i=this.startNode(),this.next(),this.type!==l.types.parenL||this.allowDirectSuper||this.raise(i.start,"super() call outside constructor of a subclass"),this.type!==l.types.dot&&this.type!==l.types.bracketL&&this.type!==l.types.parenL&&this.unexpected(),this.finishNode(i,"Super");case l.types._this:return i=this.startNode(),this.next(),this.finishNode(i,"ThisExpression");case l.types.name:let r=this.start,s=this.startLoc,a=this.containsEsc,o=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!a&&o.name==="async"&&!this.canInsertSemicolon()&&this.eat(l.types._function))return this.overrideContext(tt.types.f_expr),this.parseFunction(this.startNodeAt(r,s),0,!1,!0,e);if(n&&!this.canInsertSemicolon()){if(this.eat(l.types.arrow))return this.parseArrowExpression(this.startNodeAt(r,s),[o],!1,e);if(this.options.ecmaVersion>=8&&o.name==="async"&&this.type===l.types.name&&!a&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return o=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(l.types.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(r,s),[o],!0,e)}return o;case l.types.regexp:let p=this.value;return(i=this.parseLiteral(p.value)).regex={pattern:p.pattern,flags:p.flags},i;case l.types.num:case l.types.string:return this.parseLiteral(this.value);case l.types._null:case l.types._true:case l.types._false:return(i=this.startNode()).value=this.type===l.types._null?null:this.type===l.types._true,i.raw=this.type.keyword,this.next(),this.finishNode(i,"Literal");case l.types.parenL:let h=this.start,u=this.parseParenAndDistinguishExpression(n,e);return t&&(t.parenthesizedAssign<0&&!this.isSimpleAssignTarget(u)&&(t.parenthesizedAssign=h),t.parenthesizedBind<0&&(t.parenthesizedBind=h)),u;case l.types.bracketL:return i=this.startNode(),this.next(),i.elements=this.parseExprList(l.types.bracketR,!0,!0,t),this.finishNode(i,"ArrayExpression");case l.types.braceL:return this.overrideContext(tt.types.b_expr),this.parseObj(!1,t);case l.types._function:return i=this.startNode(),this.next(),this.parseFunction(i,0);case l.types._class:return this.parseClass(this.startNode(),!1);case l.types._new:return this.parseNew();case l.types.backQuote:return this.parseTemplate();case l.types._import:return this.options.ecmaVersion>=11?this.parseExprImport():this.unexpected();default:this.unexpected()}},E.parseExprImport=function(){let t=this.startNode();this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import");let e=this.parseIdent(!0);switch(this.type){case l.types.parenL:return this.parseDynamicImport(t);case l.types.dot:return t.meta=e,this.parseImportMeta(t);default:this.unexpected()}},E.parseDynamicImport=function(t){if(this.next(),t.source=this.parseMaybeAssign(),!this.eat(l.types.parenR)){let e=this.start;this.eat(l.types.comma)&&this.eat(l.types.parenR)?this.raiseRecoverable(e,"Trailing comma is not allowed in import()"):this.unexpected(e)}return this.finishNode(t,"ImportExpression")},E.parseImportMeta=function(t){this.next();let e=this.containsEsc;return t.property=this.parseIdent(!0),t.property.name!=="meta"&&this.raiseRecoverable(t.property.start,"The only valid meta property for import is 'import.meta'"),e&&this.raiseRecoverable(t.start,"'import.meta' must not contain escaped characters"),this.options.sourceType==="module"||this.options.allowImportExportEverywhere||this.raiseRecoverable(t.start,"Cannot use 'import.meta' outside a module"),this.finishNode(t,"MetaProperty")},E.parseLiteral=function(t){let e=this.startNode();return e.value=t,e.raw=this.input.slice(this.start,this.end),e.raw.charCodeAt(e.raw.length-1)===110&&(e.bigint=e.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(e,"Literal")},E.parseParenExpression=function(){this.expect(l.types.parenL);let t=this.parseExpression();return this.expect(l.types.parenR),t},E.parseParenAndDistinguishExpression=function(t,e){let i=this.start,n=this.startLoc,r,s=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();let a=this.start,o=this.startLoc,p=[],h=!0,u=!1,m=new kt.DestructuringErrors,y=this.yieldPos,_=this.awaitPos,w;for(this.yieldPos=0,this.awaitPos=0;this.type!==l.types.parenR;){if(h?h=!1:this.expect(l.types.comma),s&&this.afterTrailingComma(l.types.parenR,!0)){u=!0;break}if(this.type===l.types.ellipsis){w=this.start,p.push(this.parseParenItem(this.parseRestBinding())),this.type===l.types.comma&&this.raise(this.start,"Comma is not permitted after the rest element");break}p.push(this.parseMaybeAssign(!1,m,this.parseParenItem))}let c=this.lastTokEnd,d=this.lastTokEndLoc;if(this.expect(l.types.parenR),t&&!this.canInsertSemicolon()&&this.eat(l.types.arrow))return this.checkPatternErrors(m,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=y,this.awaitPos=_,this.parseParenArrowList(i,n,p,e);(!p.length||u)&&this.unexpected(this.lastTokStart),w&&this.unexpected(w),this.checkExpressionErrors(m,!0),this.yieldPos=y||this.yieldPos,this.awaitPos=_||this.awaitPos,p.length>1?((r=this.startNodeAt(a,o)).expressions=p,this.finishNodeAt(r,"SequenceExpression",c,d)):r=p[0]}else r=this.parseParenExpression();if(!this.options.preserveParens)return r;{let a=this.startNodeAt(i,n);return a.expression=r,this.finishNode(a,"ParenthesizedExpression")}},E.parseParenItem=function(t){return t},E.parseParenArrowList=function(t,e,i,n){return this.parseArrowExpression(this.startNodeAt(t,e),i,!1,n)};var Kr=[];E.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");let t=this.startNode(),e=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(l.types.dot)){t.meta=e;let s=this.containsEsc;return t.property=this.parseIdent(!0),t.property.name!=="target"&&this.raiseRecoverable(t.property.start,"The only valid meta property for new is 'new.target'"),s&&this.raiseRecoverable(t.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(t.start,"'new.target' can only be used in functions and class static block"),this.finishNode(t,"MetaProperty")}let i=this.start,n=this.startLoc,r=this.type===l.types._import;return t.callee=this.parseSubscripts(this.parseExprAtom(),i,n,!0,!1),r&&t.callee.type==="ImportExpression"&&this.raise(i,"Cannot use new with import()"),this.eat(l.types.parenL)?t.arguments=this.parseExprList(l.types.parenR,this.options.ecmaVersion>=8,!1):t.arguments=Kr,this.finishNode(t,"NewExpression")},E.parseTemplateElement=function({isTagged:t}){let e=this.startNode();return this.type===l.types.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),e.value={raw:this.value,cooked:null}):e.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
`),cooked:this.value},this.next(),e.tail=this.type===l.types.backQuote,this.finishNode(e,"TemplateElement")},E.parseTemplate=function({isTagged:t=!1}={}){let e=this.startNode();this.next(),e.expressions=[];let i=this.parseTemplateElement({isTagged:t});for(e.quasis=[i];!i.tail;)this.type===l.types.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(l.types.dollarBraceL),e.expressions.push(this.parseExpression()),this.expect(l.types.braceR),e.quasis.push(i=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(e,"TemplateLiteral")},E.isAsyncProp=function(t){return!t.computed&&t.key.type==="Identifier"&&t.key.name==="async"&&(this.type===l.types.name||this.type===l.types.num||this.type===l.types.string||this.type===l.types.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===l.types.star)&&!S.lineBreak.test(this.input.slice(this.lastTokEnd,this.start))},E.parseObj=function(t,e){let i=this.startNode(),n=!0,r={};for(i.properties=[],this.next();!this.eat(l.types.braceR);){if(n)n=!1;else if(this.expect(l.types.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(l.types.braceR))break;let s=this.parseProperty(t,e);t||this.checkPropClash(s,r,e),i.properties.push(s)}return this.finishNode(i,t?"ObjectPattern":"ObjectExpression")},E.parseProperty=function(t,e){let i=this.startNode(),n,r,s,a;if(this.options.ecmaVersion>=9&&this.eat(l.types.ellipsis))return t?(i.argument=this.parseIdent(!1),this.type===l.types.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.finishNode(i,"RestElement")):(this.type===l.types.parenL&&e&&(e.parenthesizedAssign<0&&(e.parenthesizedAssign=this.start),e.parenthesizedBind<0&&(e.parenthesizedBind=this.start)),i.argument=this.parseMaybeAssign(!1,e),this.type===l.types.comma&&e&&e.trailingComma<0&&(e.trailingComma=this.start),this.finishNode(i,"SpreadElement"));this.options.ecmaVersion>=6&&(i.method=!1,i.shorthand=!1,(t||e)&&(s=this.start,a=this.startLoc),t||(n=this.eat(l.types.star)));let o=this.containsEsc;return this.parsePropertyName(i),!t&&!o&&this.options.ecmaVersion>=8&&!n&&this.isAsyncProp(i)?(r=!0,n=this.options.ecmaVersion>=9&&this.eat(l.types.star),this.parsePropertyName(i,e)):r=!1,this.parsePropertyValue(i,t,n,r,s,a,e,o),this.finishNode(i,"Property")},E.parsePropertyValue=function(t,e,i,n,r,s,a,o){if((i||n)&&this.type===l.types.colon&&this.unexpected(),this.eat(l.types.colon))t.value=e?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,a),t.kind="init";else if(this.options.ecmaVersion>=6&&this.type===l.types.parenL)e&&this.unexpected(),t.kind="init",t.method=!0,t.value=this.parseMethod(i,n);else if(e||o||!(this.options.ecmaVersion>=5)||t.computed||t.key.type!=="Identifier"||t.key.name!=="get"&&t.key.name!=="set"||this.type===l.types.comma||this.type===l.types.braceR||this.type===l.types.eq)this.options.ecmaVersion>=6&&!t.computed&&t.key.type==="Identifier"?((i||n)&&this.unexpected(),this.checkUnreserved(t.key),t.key.name!=="await"||this.awaitIdentPos||(this.awaitIdentPos=r),t.kind="init",e?t.value=this.parseMaybeDefault(r,s,this.copyNode(t.key)):this.type===l.types.eq&&a?(a.shorthandAssign<0&&(a.shorthandAssign=this.start),t.value=this.parseMaybeDefault(r,s,this.copyNode(t.key))):t.value=this.copyNode(t.key),t.shorthand=!0):this.unexpected();else{(i||n)&&this.unexpected(),t.kind=t.key.name,this.parsePropertyName(t),t.value=this.parseMethod(!1);let p=t.kind==="get"?0:1;if(t.value.params.length!==p){let h=t.value.start;t.kind==="get"?this.raiseRecoverable(h,"getter should have no params"):this.raiseRecoverable(h,"setter should have exactly one param")}else t.kind==="set"&&t.value.params[0].type==="RestElement"&&this.raiseRecoverable(t.value.params[0].start,"Setter cannot use rest params")}},E.parsePropertyName=function(t){if(this.options.ecmaVersion>=6){if(this.eat(l.types.bracketL))return t.computed=!0,t.key=this.parseMaybeAssign(),this.expect(l.types.bracketR),t.key;t.computed=!1}return t.key=this.type===l.types.num||this.type===l.types.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")},E.initFunction=function(t){t.id=null,this.options.ecmaVersion>=6&&(t.generator=t.expression=!1),this.options.ecmaVersion>=8&&(t.async=!1)},E.parseMethod=function(t,e,i){let n=this.startNode(),r=this.yieldPos,s=this.awaitPos,a=this.awaitIdentPos;return this.initFunction(n),this.options.ecmaVersion>=6&&(n.generator=t),this.options.ecmaVersion>=8&&(n.async=!!e),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope((0,x.functionFlags)(e,n.generator)|x.SCOPE_SUPER|(i?x.SCOPE_DIRECT_SUPER:0)),this.expect(l.types.parenL),n.params=this.parseBindingList(l.types.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(n,!1,!0,!1),this.yieldPos=r,this.awaitPos=s,this.awaitIdentPos=a,this.finishNode(n,"FunctionExpression")},E.parseArrowExpression=function(t,e,i,n){let r=this.yieldPos,s=this.awaitPos,a=this.awaitIdentPos;return this.enterScope((0,x.functionFlags)(i,!1)|x.SCOPE_ARROW),this.initFunction(t),this.options.ecmaVersion>=8&&(t.async=!!i),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,t.params=this.toAssignableList(e,!0),this.parseFunctionBody(t,!0,!1,n),this.yieldPos=r,this.awaitPos=s,this.awaitIdentPos=a,this.finishNode(t,"ArrowFunctionExpression")},E.parseFunctionBody=function(t,e,i,n){let r=e&&this.type!==l.types.braceL,s=this.strict,a=!1;if(r)t.body=this.parseMaybeAssign(n),t.expression=!0,this.checkParams(t,!1);else{let o=this.options.ecmaVersion>=7&&!this.isSimpleParamList(t.params);(!s||o)&&(a=this.strictDirective(this.end))&&o&&this.raiseRecoverable(t.start,"Illegal 'use strict' directive in function with non-simple parameter list");let p=this.labels;this.labels=[],a&&(this.strict=!0),this.checkParams(t,!s&&!a&&!e&&!i&&this.isSimpleParamList(t.params)),this.strict&&t.id&&this.checkLValSimple(t.id,x.BIND_OUTSIDE),t.body=this.parseBlock(!1,void 0,a&&!s),t.expression=!1,this.adaptDirectivePrologue(t.body.body),this.labels=p}this.exitScope()},E.isSimpleParamList=function(t){for(var e,i=Ri(t);!(e=i()).done;)if(e.value.type!=="Identifier")return!1;return!0},E.checkParams=function(t,e){let i=Object.create(null);for(var n,r=Ri(t.params);!(n=r()).done;){let s=n.value;this.checkLValInnerPattern(s,x.BIND_VAR,e?null:i)}},E.parseExprList=function(t,e,i,n){let r=[],s=!0;for(;!this.eat(t);){if(s)s=!1;else if(this.expect(l.types.comma),e&&this.afterTrailingComma(t))break;let a;i&&this.type===l.types.comma?a=null:this.type===l.types.ellipsis?(a=this.parseSpread(n),n&&this.type===l.types.comma&&n.trailingComma<0&&(n.trailingComma=this.start)):a=this.parseMaybeAssign(!1,n),r.push(a)}return r},E.checkUnreserved=function({start:t,end:e,name:i}){if(this.inGenerator&&i==="yield"&&this.raiseRecoverable(t,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&i==="await"&&this.raiseRecoverable(t,"Cannot use 'await' as identifier inside an async function"),this.currentThisScope().inClassFieldInit&&i==="arguments"&&this.raiseRecoverable(t,"Cannot use 'arguments' in class field initializer"),this.inClassStaticBlock&&(i==="arguments"||i==="await")&&this.raise(t,`Cannot use ${i} in class static initialization block`),this.keywords.test(i)&&this.raise(t,`Unexpected keyword '${i}'`),this.options.ecmaVersion<6&&this.input.slice(t,e).indexOf("\\")!==-1)return;(this.strict?this.reservedWordsStrict:this.reservedWords).test(i)&&(this.inAsync||i!=="await"||this.raiseRecoverable(t,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(t,`The keyword '${i}' is reserved`))},E.parseIdent=function(t,e){let i=this.startNode();return this.type===l.types.name?i.name=this.value:this.type.keyword?(i.name=this.type.keyword,(i.name==="class"||i.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46)&&this.context.pop()):this.unexpected(),this.next(!!t),this.finishNode(i,"Identifier"),t||(this.checkUnreserved(i),i.name!=="await"||this.awaitIdentPos||(this.awaitIdentPos=i.start)),i},E.parsePrivateIdent=function(){let t=this.startNode();return this.type===l.types.privateId?t.name=this.value:this.unexpected(),this.next(),this.finishNode(t,"PrivateIdentifier"),this.privateNameStack.length===0?this.raise(t.start,`Private field '#${t.name}' must be declared in an enclosing class`):this.privateNameStack[this.privateNameStack.length-1].used.push(t),t},E.parseYield=function(t){this.yieldPos||(this.yieldPos=this.start);let e=this.startNode();return this.next(),this.type===l.types.semi||this.canInsertSemicolon()||this.type!==l.types.star&&!this.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(l.types.star),e.argument=this.parseMaybeAssign(t)),this.finishNode(e,"YieldExpression")},E.parseAwait=function(t){this.awaitPos||(this.awaitPos=this.start);let e=this.startNode();return this.next(),e.argument=this.parseMaybeUnary(null,!0,!1,t),this.finishNode(e,"AwaitExpression")};var Ct=L.Parser.prototype;Ct.raise=function(t,e){let i=(0,F.getLineInfo)(this.input,t),n=SyntaxError(e+=" ("+i.line+":"+i.column+")");throw n.pos=t,n.loc=i,n.raisedAt=this.pos,n},Ct.raiseRecoverable=Ct.raise,Ct.curPosition=function(){if(this.options.locations)return new F.Position(this.curLine,this.pos-this.lineStart)};var G=L.Parser.prototype,ne=class{constructor(e){this.flags=e,this.var=[],this.lexical=[],this.functions=[],this.inClassFieldInit=!1}};G.enterScope=function(t){this.scopeStack.push(new ne(t))},G.exitScope=function(){this.scopeStack.pop()},G.treatFunctionsAsVarInScope=function(t){return t.flags&x.SCOPE_FUNCTION||!this.inModule&&t.flags&x.SCOPE_TOP},G.declareName=function(t,e,i){let n=!1;if(e===x.BIND_LEXICAL){let r=this.currentScope();n=r.lexical.indexOf(t)>-1||r.functions.indexOf(t)>-1||r.var.indexOf(t)>-1,r.lexical.push(t),this.inModule&&r.flags&x.SCOPE_TOP&&delete this.undefinedExports[t]}else if(e===x.BIND_SIMPLE_CATCH)this.currentScope().lexical.push(t);else if(e===x.BIND_FUNCTION){let r=this.currentScope();n=this.treatFunctionsAsVar?r.lexical.indexOf(t)>-1:r.lexical.indexOf(t)>-1||r.var.indexOf(t)>-1,r.functions.push(t)}else for(let r=this.scopeStack.length-1;r>=0;--r){let s=this.scopeStack[r];if(s.lexical.indexOf(t)>-1&&!(s.flags&x.SCOPE_SIMPLE_CATCH&&s.lexical[0]===t)||!this.treatFunctionsAsVarInScope(s)&&s.functions.indexOf(t)>-1){n=!0;break}if(s.var.push(t),this.inModule&&s.flags&x.SCOPE_TOP&&delete this.undefinedExports[t],s.flags&x.SCOPE_VAR)break}n&&this.raiseRecoverable(i,`Identifier '${t}' has already been declared`)},G.checkLocalExport=function(t){this.scopeStack[0].lexical.indexOf(t.name)===-1&&this.scopeStack[0].var.indexOf(t.name)===-1&&(this.undefinedExports[t.name]=t)},G.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},G.currentVarScope=function(){for(let t=this.scopeStack.length-1;;t--){let e=this.scopeStack[t];if(e.flags&x.SCOPE_VAR)return e}},G.currentThisScope=function(){for(let t=this.scopeStack.length-1;;t--){let e=this.scopeStack[t];if(e.flags&x.SCOPE_VAR&&!(e.flags&x.SCOPE_ARROW))return e}};var Oi=O(function(t,e){e.__esModule=!0,e.Node=void 0;class i{constructor(a,o,p){this.type="",this.start=o,this.end=0,a.options.locations&&(this.loc=new F.SourceLocation(a,p)),a.options.directSourceFile&&(this.sourceFile=a.options.directSourceFile),a.options.ranges&&(this.range=[o,0])}}e.Node=i;let n=L.Parser.prototype;function r(s,a,o,p){return s.type=a,s.end=o,this.options.locations&&(s.loc.end=p),this.options.ranges&&(s.range[1]=o),s}n.startNode=function(){return new i(this,this.start,this.startLoc)},n.startNodeAt=function(s,a){return new i(this,s,a)},n.finishNode=function(s,a){return r.call(this,s,a,this.lastTokEnd,this.lastTokEndLoc)},n.finishNodeAt=function(s,a,o,p){return r.call(this,s,a,o,p)},n.copyNode=function(s){let a=new i(this,s.start,this.startLoc);for(let o in s)a[o]=s[o];return a}}),Qr=O(function(t,e){e.__esModule=!0,e.default=void 0;let i="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",n=i+" Extended_Pictographic",r=n,s=r+" EBase EComp EMod EPres ExtPict",a={9:i,10:n,11:r,12:s,13:s},o="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",p="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",h=p+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",u=h+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",m=u+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",y={9:p,10:h,11:u,12:m,13:m+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith"},_={};function w(f){let g=_[f]={binary:(0,P.wordsRegexp)(a[f]+" "+o),nonBinary:{General_Category:(0,P.wordsRegexp)(o),Script:(0,P.wordsRegexp)(y[f])}};g.nonBinary.Script_Extensions=g.nonBinary.Script,g.nonBinary.gc=g.nonBinary.General_Category,g.nonBinary.sc=g.nonBinary.Script,g.nonBinary.scx=g.nonBinary.Script_Extensions}for(var c=0,d=[9,10,11,12,13];cc.length)&&(d=c.length);for(var f=0,g=Array(d);f>10)+55296,(1023&c)+56320)}function o(c){return c===36||c>=40&&c<=43||c===46||c===63||c>=91&&c<=94||c>=123&&c<=125}function p(c){return c>=65&&c<=90||c>=97&&c<=122}function h(c){return p(c)||c===95}function u(c){return h(c)||m(c)}function m(c){return c>=48&&c<=57}function y(c){return c>=48&&c<=57||c>=65&&c<=70||c>=97&&c<=102}function _(c){return c>=65&&c<=70?10+(c-65):c>=97&&c<=102?10+(c-97):c-48}function w(c){return c>=48&&c<=55}e.RegExpValidationState=class{constructor(d){this.parser=d,this.validFlags=`gim${d.options.ecmaVersion>=6?"uy":""}${d.options.ecmaVersion>=9?"s":""}${d.options.ecmaVersion>=13?"d":""}`,this.unicodeProperties=n.default[d.options.ecmaVersion>=13?13:d.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=[],this.backReferenceNames=[]}reset(d,f,g){let v=g.indexOf("u")!==-1;this.start=0|d,this.source=f+"",this.flags=g,this.switchU=v&&this.parser.options.ecmaVersion>=6,this.switchN=v&&this.parser.options.ecmaVersion>=9}raise(d){this.parser.raiseRecoverable(this.start,`Invalid regular expression: /${this.source}/: ${d}`)}at(d,f=!1){let g=this.source,v=g.length;if(d>=v)return-1;let M=g.charCodeAt(d);if(!(f||this.switchU)||M<=55295||M>=57344||d+1>=v)return M;let A=g.charCodeAt(d+1);return A>=56320&&A<=57343?(M<<10)+A-56613888:M}nextIndex(d,f=!1){let g=this.source,v=g.length;if(d>=v)return v;let M=g.charCodeAt(d),A;return!(f||this.switchU)||M<=55295||M>=57344||d+1>=v||(A=g.charCodeAt(d+1))<56320||A>57343?d+1:d+2}current(d=!1){return this.at(this.pos,d)}lookahead(d=!1){return this.at(this.nextIndex(this.pos,d),d)}advance(d=!1){this.pos=this.nextIndex(this.pos,d)}eat(d,f=!1){return this.current(f)===d&&(this.advance(f),!0)}},s.validateRegExpFlags=function(c){let d=c.validFlags,f=c.flags;for(let g=0;g-1&&this.raise(c.start,"Duplicate regular expression flag")}},s.validateRegExpPattern=function(c){this.regexp_pattern(c),!c.switchN&&this.options.ecmaVersion>=9&&c.groupNames.length>0&&(c.switchN=!0,this.regexp_pattern(c))},s.regexp_pattern=function(c){c.pos=0,c.lastIntValue=0,c.lastStringValue="",c.lastAssertionIsQuantifiable=!1,c.numCapturingParens=0,c.maxBackReference=0,c.groupNames.length=0,c.backReferenceNames.length=0,this.regexp_disjunction(c),c.pos!==c.source.length&&(c.eat(41)&&c.raise("Unmatched ')'"),(c.eat(93)||c.eat(125))&&c.raise("Lone quantifier brackets")),c.maxBackReference>c.numCapturingParens&&c.raise("Invalid escape");for(var d,f=function(v,M){var A=typeof Symbol<"u"&&v[Symbol.iterator]||v["@@iterator"];if(A)return(A=A.call(v)).next.bind(A);if(Array.isArray(v)||(A=function(q,yi){if(q){if(typeof q=="string")return r(q,yi);var J=Object.prototype.toString.call(q).slice(8,-1);if(J==="Object"&&q.constructor&&(J=q.constructor.name),J==="Map"||J==="Set")return Array.from(q);if(J==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(J))return r(q,yi)}}(v))){A&&(v=A);var Y=0;return function(){return Y>=v.length?{done:!0}:{done:!1,value:v[Y++]}}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}(c.backReferenceNames);!(d=f()).done;){let g=d.value;c.groupNames.indexOf(g)===-1&&c.raise("Invalid named capture referenced")}},s.regexp_disjunction=function(c){for(this.regexp_alternative(c);c.eat(124);)this.regexp_alternative(c);this.regexp_eatQuantifier(c,!0)&&c.raise("Nothing to repeat"),c.eat(123)&&c.raise("Lone quantifier brackets")},s.regexp_alternative=function(c){for(;c.pos=9&&(f=c.eat(60)),c.eat(61)||c.eat(33))return this.regexp_disjunction(c),c.eat(41)||c.raise("Unterminated group"),c.lastAssertionIsQuantifiable=!f,!0}return c.pos=d,!1},s.regexp_eatQuantifier=function(c,d=!1){return!!this.regexp_eatQuantifierPrefix(c,d)&&(c.eat(63),!0)},s.regexp_eatQuantifierPrefix=function(c,d){return c.eat(42)||c.eat(43)||c.eat(63)||this.regexp_eatBracedQuantifier(c,d)},s.regexp_eatBracedQuantifier=function(c,d){let f=c.pos;if(c.eat(123)){let g=0,v=-1;if(this.regexp_eatDecimalDigits(c)&&(g=c.lastIntValue,c.eat(44)&&this.regexp_eatDecimalDigits(c)&&(v=c.lastIntValue),c.eat(125)))return v!==-1&&v=9?this.regexp_groupSpecifier(c):c.current()===63&&c.raise("Invalid group"),this.regexp_disjunction(c),c.eat(41))return c.numCapturingParens+=1,!0;c.raise("Unterminated group")}return!1},s.regexp_eatExtendedAtom=function(c){return c.eat(46)||this.regexp_eatReverseSolidusAtomEscape(c)||this.regexp_eatCharacterClass(c)||this.regexp_eatUncapturingGroup(c)||this.regexp_eatCapturingGroup(c)||this.regexp_eatInvalidBracedQuantifier(c)||this.regexp_eatExtendedPatternCharacter(c)},s.regexp_eatInvalidBracedQuantifier=function(c){return this.regexp_eatBracedQuantifier(c,!0)&&c.raise("Nothing to repeat"),!1},s.regexp_eatSyntaxCharacter=function(c){let d=c.current();return!!o(d)&&(c.lastIntValue=d,c.advance(),!0)},s.regexp_eatPatternCharacters=function(c){let d=c.pos,f=0;for(;(f=c.current())!==-1&&!o(f);)c.advance();return c.pos!==d},s.regexp_eatExtendedPatternCharacter=function(c){let d=c.current();return d!==-1&&d!==36&&(!(d>=40)||!(d<=43))&&d!==46&&d!==63&&d!==91&&d!==94&&d!==124&&(c.advance(),!0)},s.regexp_groupSpecifier=function(c){if(c.eat(63)){if(this.regexp_eatGroupName(c)){c.groupNames.indexOf(c.lastStringValue)!==-1&&c.raise("Duplicate capture group name"),c.groupNames.push(c.lastStringValue);return}c.raise("Invalid group")}},s.regexp_eatGroupName=function(c){if(c.lastStringValue="",c.eat(60)){if(this.regexp_eatRegExpIdentifierName(c)&&c.eat(62))return!0;c.raise("Invalid capture group name")}return!1},s.regexp_eatRegExpIdentifierName=function(c){if(c.lastStringValue="",this.regexp_eatRegExpIdentifierStart(c)){for(c.lastStringValue+=a(c.lastIntValue);this.regexp_eatRegExpIdentifierPart(c);)c.lastStringValue+=a(c.lastIntValue);return!0}return!1},s.regexp_eatRegExpIdentifierStart=function(c){var d;let f=c.pos,g=this.options.ecmaVersion>=11,v=c.current(g);return c.advance(g),v===92&&this.regexp_eatRegExpUnicodeEscapeSequence(c,g)&&(v=c.lastIntValue),d=v,(0,k.isIdentifierStart)(d,!0)||d===36||d===95?(c.lastIntValue=v,!0):(c.pos=f,!1)},s.regexp_eatRegExpIdentifierPart=function(c){var d;let f=c.pos,g=this.options.ecmaVersion>=11,v=c.current(g);return c.advance(g),v===92&&this.regexp_eatRegExpUnicodeEscapeSequence(c,g)&&(v=c.lastIntValue),d=v,(0,k.isIdentifierChar)(d,!0)||d===36||d===95||d===8204||d===8205?(c.lastIntValue=v,!0):(c.pos=f,!1)},s.regexp_eatAtomEscape=function(c){return!!(this.regexp_eatBackReference(c)||this.regexp_eatCharacterClassEscape(c)||this.regexp_eatCharacterEscape(c)||c.switchN&&this.regexp_eatKGroupName(c))||(c.switchU&&(c.current()===99&&c.raise("Invalid unicode escape"),c.raise("Invalid escape")),!1)},s.regexp_eatBackReference=function(c){let d=c.pos;if(this.regexp_eatDecimalEscape(c)){let f=c.lastIntValue;if(c.switchU)return f>c.maxBackReference&&(c.maxBackReference=f),!0;if(f<=c.numCapturingParens)return!0;c.pos=d}return!1},s.regexp_eatKGroupName=function(c){if(c.eat(107)){if(this.regexp_eatGroupName(c))return c.backReferenceNames.push(c.lastStringValue),!0;c.raise("Invalid named reference")}return!1},s.regexp_eatCharacterEscape=function(c){return this.regexp_eatControlEscape(c)||this.regexp_eatCControlLetter(c)||this.regexp_eatZero(c)||this.regexp_eatHexEscapeSequence(c)||this.regexp_eatRegExpUnicodeEscapeSequence(c,!1)||!c.switchU&&this.regexp_eatLegacyOctalEscapeSequence(c)||this.regexp_eatIdentityEscape(c)},s.regexp_eatCControlLetter=function(c){let d=c.pos;if(c.eat(99)){if(this.regexp_eatControlLetter(c))return!0;c.pos=d}return!1},s.regexp_eatZero=function(c){return!(c.current()!==48||m(c.lookahead()))&&(c.lastIntValue=0,c.advance(),!0)},s.regexp_eatControlEscape=function(c){let d=c.current();return d===116?(c.lastIntValue=9,c.advance(),!0):d===110?(c.lastIntValue=10,c.advance(),!0):d===118?(c.lastIntValue=11,c.advance(),!0):d===102?(c.lastIntValue=12,c.advance(),!0):d===114&&(c.lastIntValue=13,c.advance(),!0)},s.regexp_eatControlLetter=function(c){let d=c.current();return!!p(d)&&(c.lastIntValue=d%32,c.advance(),!0)},s.regexp_eatRegExpUnicodeEscapeSequence=function(c,d=!1){let f=c.pos,g=d||c.switchU;if(c.eat(117)){var v;if(this.regexp_eatFixedHexDigits(c,4)){let M=c.lastIntValue;if(g&&M>=55296&&M<=56319){let A=c.pos;if(c.eat(92)&&c.eat(117)&&this.regexp_eatFixedHexDigits(c,4)){let Y=c.lastIntValue;if(Y>=56320&&Y<=57343)return c.lastIntValue=(M-55296)*1024+(Y-56320)+65536,!0}c.pos=A,c.lastIntValue=M}return!0}if(g&&c.eat(123)&&this.regexp_eatHexDigits(c)&&c.eat(125)&&(v=c.lastIntValue,v>=0&&v<=1114111))return!0;g&&c.raise("Invalid unicode escape"),c.pos=f}return!1},s.regexp_eatIdentityEscape=function(c){if(c.switchU)return!!this.regexp_eatSyntaxCharacter(c)||!!c.eat(47)&&(c.lastIntValue=47,!0);let d=c.current();return d!==99&&(!c.switchN||d!==107)&&(c.lastIntValue=d,c.advance(),!0)},s.regexp_eatDecimalEscape=function(c){c.lastIntValue=0;let d=c.current();if(d>=49&&d<=57){do c.lastIntValue=10*c.lastIntValue+(d-48),c.advance();while((d=c.current())>=48&&d<=57);return!0}return!1},s.regexp_eatCharacterClassEscape=function(c){var d;let f=c.current();if(d=f,d===100||d===68||d===115||d===83||d===119||d===87)return c.lastIntValue=-1,c.advance(),!0;if(c.switchU&&this.options.ecmaVersion>=9&&(f===80||f===112)){if(c.lastIntValue=-1,c.advance(),c.eat(123)&&this.regexp_eatUnicodePropertyValueExpression(c)&&c.eat(125))return!0;c.raise("Invalid property name")}return!1},s.regexp_eatUnicodePropertyValueExpression=function(c){let d=c.pos;if(this.regexp_eatUnicodePropertyName(c)&&c.eat(61)){let f=c.lastStringValue;if(this.regexp_eatUnicodePropertyValue(c)){let g=c.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(c,f,g),!0}}if(c.pos=d,this.regexp_eatLoneUnicodePropertyNameOrValue(c)){let f=c.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(c,f),!0}return!1},s.regexp_validateUnicodePropertyNameAndValue=function(c,d,f){(0,P.hasOwn)(c.unicodeProperties.nonBinary,d)||c.raise("Invalid property name"),c.unicodeProperties.nonBinary[d].test(f)||c.raise("Invalid property value")},s.regexp_validateUnicodePropertyNameOrValue=function(c,d){c.unicodeProperties.binary.test(d)||c.raise("Invalid property name")},s.regexp_eatUnicodePropertyName=function(c){let d=0;for(c.lastStringValue="";h(d=c.current());)c.lastStringValue+=a(d),c.advance();return c.lastStringValue!==""},s.regexp_eatUnicodePropertyValue=function(c){let d=0;for(c.lastStringValue="";u(d=c.current());)c.lastStringValue+=a(d),c.advance();return c.lastStringValue!==""},s.regexp_eatLoneUnicodePropertyNameOrValue=function(c){return this.regexp_eatUnicodePropertyValue(c)},s.regexp_eatCharacterClass=function(c){if(c.eat(91)){if(c.eat(94),this.regexp_classRanges(c),c.eat(93))return!0;c.raise("Unterminated character class")}return!1},s.regexp_classRanges=function(c){for(;this.regexp_eatClassAtom(c);){let d=c.lastIntValue;if(c.eat(45)&&this.regexp_eatClassAtom(c)){let f=c.lastIntValue;c.switchU&&(d===-1||f===-1)&&c.raise("Invalid character class"),d!==-1&&f!==-1&&d>f&&c.raise("Range out of order in character class")}}},s.regexp_eatClassAtom=function(c){let d=c.pos;if(c.eat(92)){if(this.regexp_eatClassEscape(c))return!0;if(c.switchU){let g=c.current();(g===99||w(g))&&c.raise("Invalid class escape"),c.raise("Invalid escape")}c.pos=d}let f=c.current();return f!==93&&(c.lastIntValue=f,c.advance(),!0)},s.regexp_eatClassEscape=function(c){let d=c.pos;if(c.eat(98))return c.lastIntValue=8,!0;if(c.switchU&&c.eat(45))return c.lastIntValue=45,!0;if(!c.switchU&&c.eat(99)){if(this.regexp_eatClassControlLetter(c))return!0;c.pos=d}return this.regexp_eatCharacterClassEscape(c)||this.regexp_eatCharacterEscape(c)},s.regexp_eatClassControlLetter=function(c){let d=c.current();return(!!m(d)||d===95)&&(c.lastIntValue=d%32,c.advance(),!0)},s.regexp_eatHexEscapeSequence=function(c){let d=c.pos;if(c.eat(120)){if(this.regexp_eatFixedHexDigits(c,2))return!0;c.switchU&&c.raise("Invalid escape"),c.pos=d}return!1},s.regexp_eatDecimalDigits=function(c){let d=c.pos,f=0;for(c.lastIntValue=0;m(f=c.current());)c.lastIntValue=10*c.lastIntValue+(f-48),c.advance();return c.pos!==d},s.regexp_eatHexDigits=function(c){let d=c.pos,f=0;for(c.lastIntValue=0;y(f=c.current());)c.lastIntValue=16*c.lastIntValue+_(f),c.advance();return c.pos!==d},s.regexp_eatLegacyOctalEscapeSequence=function(c){if(this.regexp_eatOctalDigit(c)){let d=c.lastIntValue;if(this.regexp_eatOctalDigit(c)){let f=c.lastIntValue;d<=3&&this.regexp_eatOctalDigit(c)?c.lastIntValue=64*d+8*f+c.lastIntValue:c.lastIntValue=8*d+f}else c.lastIntValue=d;return!0}return!1},s.regexp_eatOctalDigit=function(c){let d=c.current();return w(d)?(c.lastIntValue=d-48,c.advance(),!0):(c.lastIntValue=0,!1)},s.regexp_eatFixedHexDigits=function(c,d){let f=c.pos;c.lastIntValue=0;for(let g=0;g>10)+55296,(1023&o)+56320)}n.next=function(o){!o&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new i(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},n.getToken=function(){return this.next(),new i(this)},typeof Symbol<"u"&&(n[Symbol.iterator]=function(){return{next:()=>{let o=this.getToken();return{done:o.type===l.types.eof,value:o}}}}),n.nextToken=function(){let o=this.curContext();return o&&o.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length?this.finishToken(l.types.eof):o.override?o.override(this):void this.readToken(this.fullCharCodeAtPos())},n.readToken=function(o){return(0,k.isIdentifierStart)(o,this.options.ecmaVersion>=6)||o===92?this.readWord():this.getTokenFromCode(o)},n.fullCharCodeAtPos=function(){let o=this.input.charCodeAt(this.pos);if(o<=55295||o>=56320)return o;let p=this.input.charCodeAt(this.pos+1);return p<=56319||p>=57344?o:(o<<10)+p-56613888},n.skipBlockComment=function(){let o=this.options.onComment&&this.curPosition(),p=this.pos,h=this.input.indexOf("*/",this.pos+=2);if(h===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=h+2,this.options.locations)for(let u,m=p;(u=(0,S.nextLineBreak)(this.input,m,this.pos))>-1;)++this.curLine,m=this.lineStart=u;this.options.onComment&&this.options.onComment(!0,this.input.slice(p+2,h),p,this.pos,o,this.curPosition())},n.skipLineComment=function(o){let p=this.pos,h=this.options.onComment&&this.curPosition(),u=this.input.charCodeAt(this.pos+=o);for(;this.pos8&&o<14||o>=5760&&S.nonASCIIwhitespace.test(String.fromCharCode(o)))++this.pos;else break t}}},n.finishToken=function(o,p){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());let h=this.type;this.type=o,this.value=p,this.updateContext(h)},n.readToken_dot=function(){let o=this.input.charCodeAt(this.pos+1);if(o>=48&&o<=57)return this.readNumber(!0);let p=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&o===46&&p===46?(this.pos+=3,this.finishToken(l.types.ellipsis)):(++this.pos,this.finishToken(l.types.dot))},n.readToken_slash=function(){let o=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):o===61?this.finishOp(l.types.assign,2):this.finishOp(l.types.slash,1)},n.readToken_mult_modulo_exp=function(o){let p=this.input.charCodeAt(this.pos+1),h=1,u=o===42?l.types.star:l.types.modulo;return this.options.ecmaVersion>=7&&o===42&&p===42&&(++h,u=l.types.starstar,p=this.input.charCodeAt(this.pos+2)),p===61?this.finishOp(l.types.assign,h+1):this.finishOp(u,h)},n.readToken_pipe_amp=function(o){let p=this.input.charCodeAt(this.pos+1);return p===o?this.options.ecmaVersion>=12&&this.input.charCodeAt(this.pos+2)===61?this.finishOp(l.types.assign,3):this.finishOp(o===124?l.types.logicalOR:l.types.logicalAND,2):p===61?this.finishOp(l.types.assign,2):this.finishOp(o===124?l.types.bitwiseOR:l.types.bitwiseAND,1)},n.readToken_caret=function(){return this.input.charCodeAt(this.pos+1)===61?this.finishOp(l.types.assign,2):this.finishOp(l.types.bitwiseXOR,1)},n.readToken_plus_min=function(o){let p=this.input.charCodeAt(this.pos+1);return p===o?p===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||S.lineBreak.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(l.types.incDec,2):p===61?this.finishOp(l.types.assign,2):this.finishOp(l.types.plusMin,1)},n.readToken_lt_gt=function(o){let p=this.input.charCodeAt(this.pos+1),h=1;return p===o?(h=o===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+h)===61?this.finishOp(l.types.assign,h+1):this.finishOp(l.types.bitShift,h)):p!==33||o!==60||this.inModule||this.input.charCodeAt(this.pos+2)!==45||this.input.charCodeAt(this.pos+3)!==45?(p===61&&(h=2),this.finishOp(l.types.relational,h)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},n.readToken_eq_excl=function(o){let p=this.input.charCodeAt(this.pos+1);return p===61?this.finishOp(l.types.equality,this.input.charCodeAt(this.pos+2)===61?3:2):o===61&&p===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(l.types.arrow)):this.finishOp(o===61?l.types.eq:l.types.prefix,1)},n.readToken_question=function(){let o=this.options.ecmaVersion;if(o>=11){let p=this.input.charCodeAt(this.pos+1);if(p===46){let h=this.input.charCodeAt(this.pos+2);if(h<48||h>57)return this.finishOp(l.types.questionDot,2)}if(p===63)return o>=12&&this.input.charCodeAt(this.pos+2)===61?this.finishOp(l.types.assign,3):this.finishOp(l.types.coalesce,2)}return this.finishOp(l.types.question,1)},n.readToken_numberSign=function(){let o=this.options.ecmaVersion,p=35;if(o>=13&&(++this.pos,p=this.fullCharCodeAtPos(),(0,k.isIdentifierStart)(p,!0)||p===92))return this.finishToken(l.types.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+s(p)+"'")},n.getTokenFromCode=function(o){switch(o){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(l.types.parenL);case 41:return++this.pos,this.finishToken(l.types.parenR);case 59:return++this.pos,this.finishToken(l.types.semi);case 44:return++this.pos,this.finishToken(l.types.comma);case 91:return++this.pos,this.finishToken(l.types.bracketL);case 93:return++this.pos,this.finishToken(l.types.bracketR);case 123:return++this.pos,this.finishToken(l.types.braceL);case 125:return++this.pos,this.finishToken(l.types.braceR);case 58:return++this.pos,this.finishToken(l.types.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(l.types.backQuote);case 48:let p=this.input.charCodeAt(this.pos+1);if(p===120||p===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(p===111||p===79)return this.readRadixNumber(8);if(p===98||p===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(o);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(o);case 124:case 38:return this.readToken_pipe_amp(o);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(o);case 60:case 62:return this.readToken_lt_gt(o);case 61:case 33:return this.readToken_eq_excl(o);case 63:return this.readToken_question();case 126:return this.finishOp(l.types.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+s(o)+"'")},n.finishOp=function(o,p){let h=this.input.slice(this.pos,this.pos+p);return this.pos+=p,this.finishToken(o,h)},n.readRegexp=function(){let o,p,h=this.pos;for(;;){this.pos>=this.input.length&&this.raise(h,"Unterminated regular expression");let c=this.input.charAt(this.pos);if(S.lineBreak.test(c)&&this.raise(h,"Unterminated regular expression"),o)o=!1;else{if(c==="[")p=!0;else if(c==="]"&&p)p=!1;else if(c==="/"&&!p)break;o=c==="\\"}++this.pos}let u=this.input.slice(h,this.pos);++this.pos;let m=this.pos,y=this.readWord1();this.containsEsc&&this.unexpected(m);let _=this.regexpState||(this.regexpState=new Yr.RegExpValidationState(this));_.reset(h,u,y),this.validateRegExpFlags(_),this.validateRegExpPattern(_);let w=null;try{w=RegExp(u,y)}catch{}return this.finishToken(l.types.regexp,{pattern:u,flags:y,value:w})},n.readInt=function(o,p,h){let u=this.options.ecmaVersion>=12&&p===void 0,m=h&&this.input.charCodeAt(this.pos)===48,y=this.pos,_=0,w=0;for(let c=0,d=p??1/0;c=97?f-97+10:f>=65?f-65+10:f>=48&&f<=57?f-48:1/0)>=o)break;w=f,_=_*o+g}return u&&w===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===y||p!=null&&this.pos-y!==p?null:_},n.readRadixNumber=function(o){let p=this.pos;this.pos+=2;let h=this.readInt(o);return h==null&&this.raise(this.start+2,"Expected number in radix "+o),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(h=r(this.input.slice(p,this.pos)),++this.pos):(0,k.isIdentifierStart)(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(l.types.num,h)},n.readNumber=function(o){var p,h;let u=this.pos;o||this.readInt(10,void 0,!0)!==null||this.raise(u,"Invalid number");let m=this.pos-u>=2&&this.input.charCodeAt(u)===48;m&&this.strict&&this.raise(u,"Invalid number");let y=this.input.charCodeAt(this.pos);if(!m&&!o&&this.options.ecmaVersion>=11&&y===110){let w=r(this.input.slice(u,this.pos));return++this.pos,(0,k.isIdentifierStart)(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(l.types.num,w)}m&&/[89]/.test(this.input.slice(u,this.pos))&&(m=!1),y!==46||m||(++this.pos,this.readInt(10),y=this.input.charCodeAt(this.pos)),y!==69&&y!==101||m||(((y=this.input.charCodeAt(++this.pos))===43||y===45)&&++this.pos,this.readInt(10)===null&&this.raise(u,"Invalid number")),(0,k.isIdentifierStart)(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");let _=(p=this.input.slice(u,this.pos),(h=m)?parseInt(p,8):parseFloat(p.replace(/_/g,"")));return this.finishToken(l.types.num,_)},n.readCodePoint=function(){let o;if(this.input.charCodeAt(this.pos)===123){this.options.ecmaVersion<6&&this.unexpected();let p=++this.pos;o=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,o>1114111&&this.invalidStringToken(p,"Code point out of bounds")}else o=this.readHexChar(4);return o},n.readString=function(o){let p="",h=++this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");let u=this.input.charCodeAt(this.pos);if(u===o)break;u===92?(p+=this.input.slice(h,this.pos),p+=this.readEscapedChar(!1),h=this.pos):u===8232||u===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):((0,S.isNewLine)(u)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return p+=this.input.slice(h,this.pos++),this.finishToken(l.types.string,p)};let a={};n.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(o){if(o===a)this.readInvalidTemplateToken();else throw o}this.inTemplateElement=!1},n.invalidStringToken=function(o,p){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw a;this.raise(o,p)},n.readTmplToken=function(){let o="",p=this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");let h=this.input.charCodeAt(this.pos);if(h===96||h===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===l.types.template||this.type===l.types.invalidTemplate)?h===36?(this.pos+=2,this.finishToken(l.types.dollarBraceL)):(++this.pos,this.finishToken(l.types.backQuote)):(o+=this.input.slice(p,this.pos),this.finishToken(l.types.template,o));if(h===92)o+=this.input.slice(p,this.pos),o+=this.readEscapedChar(!0),p=this.pos;else if((0,S.isNewLine)(h)){switch(o+=this.input.slice(p,this.pos),++this.pos,h){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:o+=`
`;break;default:o+=String.fromCharCode(h)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),p=this.pos}else++this.pos}},n.readInvalidTemplateToken=function(){for(;this.pos=48&&p<=55){let h=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],u=parseInt(h,8);return u>255&&(u=parseInt(h=h.slice(0,-1),8)),this.pos+=h.length-1,p=this.input.charCodeAt(this.pos),(h!=="0"||p===56||p===57)&&(this.strict||o)&&this.invalidStringToken(this.pos-1-h.length,o?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(u)}return(0,S.isNewLine)(p)?"":String.fromCharCode(p)}},n.readHexChar=function(o){let p=this.pos,h=this.readInt(16,o);return h===null&&this.invalidStringToken(p,"Bad character escape sequence"),h},n.readWord1=function(){this.containsEsc=!1;let o="",p=!0,h=this.pos,u=this.options.ecmaVersion>=6;for(;this.pos>16)+(e>>16)+(i>>16)<<16|i&65535}function rn(t,e){return t<>>32-e}function Pt(t,e,i,n,r,s){return X(rn(X(X(e,t),X(n,s)),r),i)}function I(t,e,i,n,r,s,a){return Pt(e&i|~e&n,t,e,r,s,a)}function T(t,e,i,n,r,s,a){return Pt(e&n|i&~n,t,e,r,s,a)}function R(t,e,i,n,r,s,a){return Pt(e^i^n,t,e,r,s,a)}function N(t,e,i,n,r,s,a){return Pt(i^(e|~n),t,e,r,s,a)}function At(t,e){t[e>>5]|=128<>>9<<4)+14]=e;let i=1732584193,n=-271733879,r=-1732584194,s=271733878;for(let a=0;a>5]>>>n%32&255);return e}function ce(t){let e=[],i=t.length>>2;for(let r=0;r>5]|=(t.charCodeAt(r/8)&255)<16&&(i=At(i,t.length*8));for(let a=0;a<16;a+=1)n[a]=i[a]^909522486,r[a]=i[a]^1549556828;let s=At(n.concat(ce(e)),512+e.length*8);return Bi(At(r.concat(s),512+128))}function ji(t){let e="0123456789abcdef",i="";for(let n=0;n>>4&15)+e.charAt(r&15)}return i}function pe(t){return unescape(encodeURIComponent(t))}function Ui(t){return nn(pe(t))}function an(t){return ji(Ui(t))}function Fi(t,e){return sn(pe(t),pe(e))}function on(t,e){return ji(Fi(t,e))}function cn(t,e,i){return e?i?Fi(e,t):on(e,t):i?Ui(t):an(t)}var se=3072;function pn(t){let e=new Headers(t);if(t.has("x-bare-headers")){let i=t.get("x-bare-headers");if(i.length>se){e.delete("x-bare-headers");let n=0;for(let r=0;r{o.removeEventListener("close",h),o.removeEventListener("message",u)},h=()=>{p()},u=m=>{if(p(),typeof m.data!="string")throw new TypeError("the first websocket message was not a text frame");let y=JSON.parse(m.data);if(y.type!=="open")throw new TypeError("message was not of open type");m.stopImmediatePropagation(),s({protocol:y.protocol,setCookies:y.setCookies}),a(Q.OPEN),o.dispatchEvent(new Event("open"))};return o.addEventListener("close",h),o.addEventListener("message",u),o.addEventListener("open",m=>{m.stopImmediatePropagation(),a(Q.CONNECTING),r().then(y=>Q.prototype.send.call(o,JSON.stringify({type:"connect",remote:i.toString(),protocols:n,headers:y,forwardHeaders:[]})))},{once:!0}),o}async request(i,n,r,s,a,o,p){if(s.protocol.startsWith("blob:")){let w=await ae(s),c=new Vi(w.body,w);return c.rawHeaders=Object.fromEntries(w.headers),c.rawResponse=w,c}let h={};if(n instanceof Headers)for(let[w,c]of n)h[w]=c;else for(let w in n)h[w]=n[w];let u={credentials:"omit",method:i,signal:p};a!=="only-if-cached"&&(u.cache=a),r!==void 0&&(u.body=r),o!==void 0&&(u.duplex=o),u.headers=this.createBareHeaders(s,h);let m=await ae(this.http+"?cache="+cn(s.toString()),u),y=await this.readBareResponse(m),_=new Vi(tn.includes(y.status)?void 0:m.body,{status:y.status,statusText:y.statusText??void 0,headers:new Headers(y.headers)});return _.rawHeaders=y.headers,_.rawResponse=m,_}async readBareResponse(i){if(!i.ok)throw new Lt(i.status,await i.json());let n=ln(i.headers),r={},s=n.get("x-bare-status");s!==null&&(r.status=parseInt(s));let a=n.get("x-bare-status-text");a!==null&&(r.statusText=a);let o=n.get("x-bare-headers");return o!==null&&(r.headers=JSON.parse(o)),r}createBareHeaders(i,n,r=[],s=[],a=[]){let o=new Headers;o.set("x-bare-url",i.toString()),o.set("x-bare-headers",JSON.stringify(n));for(let p of r)o.append("x-bare-forward-headers",p);for(let p of s)o.append("x-bare-pass-headers",p);for(let p of a)o.append("x-bare-pass-status",p.toString());return pn(o),o}},hn="!#$%&'*+-.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ^_`abcdefghijklmnopqrstuvwxyz|~";function un(t){for(let e=0;ethis.loadManifest(e)).catch(e=>{throw delete this.working,e})),this.working):this.client}getClient(){for(let[e,i]of dn)if(this.manifest.versions.includes(e))return new i(this.server);throw new Error("Unable to find compatible client version. Starting from v2.0.0, @tomphttp/bare-client only supports Bare servers v3+. For more information, see https://github.com/tomphttp/bare-client/")}createWebSocket(e,i=[],n){if(!this.client)throw new TypeError("You need to wait for the client to finish fetching the manifest before creating any WebSockets. Try caching the manifest data before making this request.");try{e=new URL(e)}catch{throw new DOMException(`Faiiled to construct 'WebSocket': The URL '${e}' is invalid.`)}if(!fn.includes(e.protocol))throw new DOMException(`Failed to construct 'WebSocket': The URL's scheme must be either 'ws' or 'wss'. '${e.protocol}' is not allowed.`);Array.isArray(i)||(i=[i]),i=i.map(String);for(let u of i)if(!un(u))throw new DOMException(`Failed to construct 'WebSocket': The subprotocol '${u}' is invalid.`);let r=this.client.connect(e,i,async()=>{let u=typeof n.headers=="function"?await n.headers():n.headers||{},m=u instanceof Headers?Object.fromEntries(u):u;return m.Host=e.host,m.Pragma="no-cache",m["Cache-Control"]="no-cache",m.Upgrade="websocket",m.Connection="Upgrade",m},u=>{s=u.protocol,n.setCookiesCallback&&n.setCookiesCallback(u.setCookies)},u=>{a=u},n.webSocketImpl||z),s="",a=Q.CONNECTING,o=()=>{let u=mn.call(r);return u===Q.OPEN?a:u};n.readyStateHook?n.readyStateHook(r,o):Object.defineProperty(r,"readyState",{get:o,configurable:!0,enumerable:!0});let p=()=>{if(o()===Q.CONNECTING)return new DOMException("Failed to execute 'send' on 'WebSocket': Still in CONNECTING state.")};n.sendErrorHook?n.sendErrorHook(r,p):r.send=function(...u){let m=p();if(m)throw m;Q.prototype.send.call(this,...u)},n.urlHook?n.urlHook(r,e):Object.defineProperty(r,"url",{get:()=>e.toString(),configurable:!0,enumerable:!0});let h=()=>s;return n.protocolHook?n.protocolHook(r,h):Object.defineProperty(r,"protocol",{get:h,configurable:!0,enumerable:!0}),r}async fetch(e,i){let n=yn(e)?new Jr(e,i):e,r=i?.headers||n.headers,s=r instanceof Headers?Object.fromEntries(r):r,a=i?.duplex,o=i?.body||n.body,p=new URL(n.url),h=await this.demand();for(let u=0;;u++){"host"in s?s.host=p.host:s.Host=p.host;let m=await h.request(n.method,s,o,p,n.cache,a,n.signal);m.finalURL=p.toString();let y=i?.redirect||n.redirect;if(en.includes(m.status))switch(y){case"follow":{let _=m.headers.get("location");if(Zr>u&&_!==null){p=new URL(_,p);continue}else throw new TypeError("Failed to fetch")}case"error":throw new TypeError("Failed to fetch");case"manual":return m}else return m}}};function yn(t){return typeof t=="string"||t instanceof URL}async function Wi(t,e){let i=await Hi(t,e);return new ot(t,i)}var ue={};wt(ue,{parse:()=>_n,serialize:()=>he});var gn=Object.prototype.toString,It=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function _n(t,e){if(typeof t!="string")throw new TypeError("argument str must be a string");for(var i={},n=(e||{}).decode||xn,r=0;r":9,"<=":9,">=":9,in:9,instanceof:9,"<<":10,">>":10,">>>":10,"+":11,"-":11,"*":12,"%":12,"/":12,"**":13},j=17;K.NEEDS_PARENTHESES=j;var Xi,Ki,Qi,Yi,Ji,Zi,tr={ArrayExpression:20,TaggedTemplateExpression:20,ThisExpression:20,Identifier:20,PrivateIdentifier:20,Literal:18,TemplateLiteral:20,Super:20,SequenceExpression:20,MemberExpression:19,ChainExpression:19,CallExpression:19,NewExpression:19,ArrowFunctionExpression:j,ClassExpression:j,FunctionExpression:j,ObjectExpression:j,UpdateExpression:16,UnaryExpression:15,AwaitExpression:15,BinaryExpression:14,LogicalExpression:13,ConditionalExpression:4,AssignmentExpression:3,YieldExpression:2,RestElement:1};function it(t,e){var i=t.generator;if(t.write("("),e!=null&&e.length>0){i[e[0].type](e[0],t);for(var n=e.length,r=1;r0){t.write(n);for(var a=1;a0){i.VariableDeclarator(n[0],t);for(var s=1;s0){e.write(n),r&&t.comments!=null&&D(e,t.comments,s,n);for(var o=a.length,p=0;p0){for(;r0&&e.write(", ");var s=i[r],a=s.type[6];if(a==="D")e.write(s.local.name,s),r++;else{if(a!=="N")break;e.write("* as "+s.local.name,s),r++}}if(r0)for(var r=0;;){var s=i[r],a=s.local.name;if(e.write(a,s),a!==s.exported.name&&e.write(" as "+s.exported.name),!(++r "),t.body.type[0]==="O"?(e.write("("),this.ObjectExpression(t.body,e),e.write(")")):this[t.body.type](t.body,e)},ThisExpression:function(t,e){e.write("this",t)},Super:function(t,e){e.write("super",t)},RestElement:Qi=function(t,e){e.write("..."),this[t.argument.type](t.argument,e)},SpreadElement:Qi,YieldExpression:function(t,e){e.write(t.delegate?"yield*":"yield"),t.argument&&(e.write(" "),this[t.argument.type](t.argument,e))},AwaitExpression:function(t,e){e.write("await ",t),Rt(e,t.argument,t)},TemplateLiteral:function(t,e){var i=t.quasis,n=t.expressions;e.write("`");for(var r=n.length,s=0;s0)for(var i=t.elements,n=i.length,r=0;;){var s=i[r];if(s!=null&&this[s.type](s,e),!(++r0){e.write(n),r&&t.comments!=null&&D(e,t.comments,s,n);for(var a=","+n,o=t.properties,p=o.length,h=0;;){var u=o[h];if(r&&u.comments!=null&&D(e,u.comments,s,n),e.write(s),this[u.type](u,e),!(++h0)for(var i=t.properties,n=i.length,r=0;this[i[r].type](i[r],e),++r1)&&(r[0]!=="U"||r[1]!=="n"&&r[1]!=="p"||!n.prefix||n.operator[0]!==i||i!=="+"&&i!=="-")||e.write(" "),s?(e.write(i.length>1?" (":"("),this[r](n,e),e.write(")")):this[r](n,e)}else this[t.argument.type](t.argument,e),e.write(t.operator)},UpdateExpression:function(t,e){t.prefix?(e.write(t.operator),this[t.argument.type](t.argument,e)):(this[t.argument.type](t.argument,e),e.write(t.operator))},AssignmentExpression:function(t,e){this[t.left.type](t.left,e),e.write(" "+t.operator+" "),this[t.right.type](t.right,e)},AssignmentPattern:function(t,e){this[t.left.type](t.left,e),e.write(" = "),this[t.right.type](t.right,e)},BinaryExpression:Yi=function(t,e){var i=t.operator==="in";i&&e.write("("),Rt(e,t.left,t,!1),e.write(" "+t.operator+" "),Rt(e,t.right,t,!0),i&&e.write(")")},LogicalExpression:Yi,ConditionalExpression:function(t,e){var i=t.test,n=e.expressionsPrecedence[i.type];n===j||n<=e.expressionsPrecedence.ConditionalExpression?(e.write("("),this[i.type](i,e),e.write(")")):this[i.type](i,e),e.write(" ? "),this[t.consequent.type](t.consequent,e),e.write(" : "),this[t.alternate.type](t.alternate,e)},NewExpression:function(t,e){e.write("new ");var i=e.expressionsPrecedence[t.callee.type];i===j||i0&&(this.lineEndSize>0&&(u.length===1?e[h-1]===u:e.endsWith(u))?(this.line+=this.lineEndSize,this.column=0):this.column+=h)}},{key:"toString",value:function(){return this.output}}]),t}();function ir(t,e){var i=new Rn(e);return i.generator[t.type](t,i),i.output}var ge=class{constructor(e){this.mime=Ei;this.idb=vt;this.path=Nn;this.acorn={parse:$i};this.bare={createBareClient:Wi,BareClient:ot};this.base64=Et;this.estree={generate:ir};this.cookie={...ue,serialize:(...e)=>{try{return he.apply({},e)}catch(i){console.log(i)}}};this.setCookieParser=rr.parse;this.ctx=e}},nr=ge;function _e(t,e,i,n,r="",s=!1,a=""){if(self.__dynamic$config)var o=self.__dynamic$config.mode=="development";else var o=!1;if(s){var p=[{nodeName:"script",tagName:"script",namespaceURI:"http://www.w3.org/1999/xhtml",childNodes:[],attrs:[{name:"src",value:t+(o?"?"+Math.floor(Math.random()*89999+1e4):"")}]},{nodeName:"script",tagName:"script",namespaceURI:"http://www.w3.org/1999/xhtml",childNodes:[],attrs:[{name:"src",value:e+(o?"?"+Math.floor(Math.random()*89999+1e4):"")}]}];return this.ctx.config.assets.files.inject&&p.unshift({nodeName:"script",tagName:"script",namespaceURI:"http://www.w3.org/1999/xhtml",childNodes:[],attrs:[{name:"src",value:this.ctx.config.assets.files.inject+(o?"?"+Math.floor(Math.random()*(99999-1e4)+1e4):"")}]}),n&&p.unshift({nodeName:"script",tagName:"script",namespaceURI:"http://www.w3.org/1999/xhtml",childNodes:[],attrs:[{name:"src",value:"data:application/javascript;base64,"+btoa(`self.__dynamic$cookies = atob("${btoa(n)}");document.currentScript?.remove();`)}]}),r&&p.unshift({nodeName:"script",tagName:"script",namespaceURI:"http://www.w3.org/1999/xhtml",childNodes:[],attrs:[{name:"src",value:"data:application/javascript;base64,"+btoa(r+";document.currentScript?.remove();")}]}),a&&p.unshift({nodeName:"script",tagName:"script",namespaceURI:"http://www.w3.org/1999/xhtml",childNodes:[],attrs:[{name:"src",value:"data:application/javascript;base64,"+btoa(a+";document.currentScript?.remove();")}]}),p}else{var h=[`