sval 0.6.6 → 0.6.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/sval.umd.cjs CHANGED
@@ -6,4 +6,4 @@ Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=1
6
6
  `;break;default:e+=String.fromCharCode(r);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}},b.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{")break;case"`":return this.finishToken(o.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":this.input[this.pos+1]===`
7
7
  `&&++this.pos;case`
8
8
  `:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")},b.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return`
9
- `;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return te(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),e){var r=this.pos-1;this.invalidStringToken(r,"Invalid escape sequence in template string")}default:if(t>=48&&t<=55){var i=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],a=parseInt(i,8);return a>255&&(i=i.slice(0,-1),a=parseInt(i,8)),this.pos+=i.length-1,t=this.input.charCodeAt(this.pos),(i!=="0"||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-i.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(a)}return we(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(t)}},b.readHexChar=function(e){var t=this.pos,r=this.readInt(16,e);return r===null&&this.invalidStringToken(t,"Bad character escape sequence"),r},b.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,r=this.pos,i=this.options.ecmaVersion>=6;this.pos<this.input.length;){var a=this.fullCharCodeAtPos();if(Se(a,i))this.pos+=a<=65535?1:2;else if(a===92){this.containsEsc=!0,e+=this.input.slice(r,this.pos);var s=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var n=this.readCodePoint();(t?ee:Se)(n,i)||this.invalidStringToken(s,"Invalid Unicode escape"),e+=te(n),r=this.pos}else break;t=!1}return e+this.input.slice(r,this.pos)},b.readWord=function(){var e=this.readWord1(),t=o.name;return this.keywords.test(e)&&(t=dt[e]),this.finishToken(t,e)};var ca="8.14.1";V.acorn={Parser:V,version:ca,defaultOptions:yt,Position:Re,SourceLocation:Qe,getLineInfo:Xt,Node:it,TokenType:k,tokTypes:o,keywordTypes:dt,TokContext:Q,tokContexts:A,isIdentifierChar:Se,isIdentifierStart:ee,Token:Et,isNewLine:we,lineBreak:W,lineBreakG:Tr,nonASCIIwhitespace:Gt};function ha(e,t){return V.parse(e,t)}const me={RES:void 0},E={RES:void 0},_={LABEL:void 0},I={LABEL:void 0},st=R("super"),he=R("supercall"),nt=R("noctor"),_e=R("clsctor"),ot=R("newtarget"),T=R("private"),O=R("noinit"),F=R("deadzone"),ge=R("import"),U=R("exports");class ut{constructor(t,r){this.kind=t,this.value=r}get(){return this.value}set(t){if(this.kind==="const")throw new TypeError("Assignment to constant variable");return this.value=t}}class fe{constructor(t,r){this.object=t,this.property=r}get(){return this.object[this.property]}set(t){return this.object[this.property]=t,!0}del(){return delete this.object[this.property]}}class P{constructor(t=null,r=!1){this.context=ve(null),this.withContext=ve(null),this.parent=t,this.isolated=r}global(){let t=this;for(;t.parent;)t=t.parent;return t}find(t){if(this.context[t])return this.context[t];if(t in this.withContext)return new fe(this.withContext,t);if(this.parent)return this.parent.find(t);{const r=this.global().find("window").get();return t in r?new fe(r,t):null}}var(t,r){let i=this;for(;i.parent&&!i.isolated;)i=i.parent;const a=i.context[t];if(!a)i.context[t]=new ut("var",r===O?void 0:r);else if(a.kind==="var")r!==O&&a.set(r);else throw new SyntaxError(`Identifier '${t}' has already been declared`);if(!i.parent){const s=i.find("window").get();r!==O&&w(s,t,{value:r,writable:!0,enumerable:!0})}}let(t,r){const i=this.context[t];if(!i||i.get()===F)this.context[t]=new ut("let",r);else throw new SyntaxError(`Identifier '${t}' has already been declared`)}const(t,r){const i=this.context[t];if(!i||i.get()===F)this.context[t]=new ut("const",r);else throw new SyntaxError(`Identifier '${t}' has already been declared`)}func(t,r){const i=this.context[t];if(!i||i.kind==="var")this.context[t]=new ut("var",r);else throw new SyntaxError(`Identifier '${t}' has already been declared`)}with(t){Object.keys(t)&&(this.withContext=t)}}const fa={version:"0.6.6"};function Ct(e,t={}){const{res:r,err:i,ret:a,fullRet:s}=t;return new Promise((n,u)=>{if("ret"in t)return n(e.return(a));"err"in t?c(i):l(r);function l(p){let S;try{S=e.next(p)}catch(C){return u(C)}return h(S),null}function c(p){let S;try{S=e.throw(p)}catch(C){return u(C)}h(S)}function h(p){if(p.done)return n(s?p:p.value);if(p.value!==me)return n(p);const S=p.value.RES;return(S&&S.then==="function"?S:Promise.resolve(S)).then(l,c)}})}function*Ie(e,t,r={}){const{getVar:i=!1,throwErr:a=!0}=r;if(e.name==="undefined")return;const s=t.find(e.name);if(s){if(i)return s;{const n=s.get();if(n===F)throw new ReferenceError(`${e.name} is not defined`);return n}}else{if(a)throw new ReferenceError(`${e.name} is not defined`);return}}const pa=Object.freeze(Object.defineProperty({__proto__:null,Identifier:Ie},Symbol.toStringTag,{value:"Module"}));function*Pi(e,t){return e.value}const da=Object.freeze(Object.defineProperty({__proto__:null,Literal:Pi},Symbol.toStringTag,{value:"Module"}));function*ya(e,t){const r=t.find(he);if(r&&r.get()!==!0)throw new ReferenceError("Must call super constructor in derived class before accessing 'this' or returning from derived constructor");return t.find("this").get()}function*ma(e,t){let r=[];for(let i=0;i<e.elements.length;i++){const a=e.elements[i];a.type==="SpreadElement"?r=r.concat(yield*je(a,t)):r.push(yield*d(a,t))}return r}function*ga(e,t){const r={};for(let i=0;i<e.properties.length;i++){const a=e.properties[i];if(a.type==="SpreadElement")N(r,yield*je(a,t,{spreadProps:!0}));else{let s;const n=a.key;a.computed?s=yield*d(n,t):n.type==="Identifier"?s=n.name:s=""+(yield*Pi(n));const u=yield*d(a.value,t),l=a.kind;if(l==="init")r[s]=u;else if(l==="get"){const c=ue(r,s);w(r,s,{get:u,set:c&&c.set,enumerable:!0,configurable:!0})}else{const c=ue(r,s);w(r,s,{get:c&&c.get,set:u,enumerable:!0,configurable:!0})}}}return r}function*xa(e,t){if(e.id&&e.id.name){const r=new P(t),i=J(e,r);return r.const(e.id.name,i),i}else return J(e,t)}function*ba(e,t){const r=e.argument;switch(e.operator){case"+":return+(yield*d(r,t));case"-":return-(yield*d(r,t));case"!":return!(yield*d(r,t));case"~":return~(yield*d(r,t));case"void":return void(yield*d(r,t));case"typeof":return r.type==="Identifier"?typeof(yield*Ie(r,t,{throwErr:!1})):typeof(yield*d(r,t));case"delete":if(r.type==="MemberExpression")return(yield*Me(r,t,{getVar:!0})).del();if(r.type==="Identifier")throw new SyntaxError("Delete of an unqualified identifier in strict mode");return yield*d(r,t),!0;default:throw new SyntaxError(`Unexpected token ${e.operator}`)}}function*va(e,t){const r=e.argument;let i;if(r.type==="Identifier")i=yield*Ie(r,t,{getVar:!0});else if(r.type==="MemberExpression")i=yield*Me(r,t,{getVar:!0});else throw new SyntaxError("Unexpected token");const a=i.get();if(e.operator==="++")return i.set(a+1),e.prefix?i.get():a;if(e.operator==="--")return i.set(a-1),e.prefix?i.get():a;throw new SyntaxError(`Unexpected token ${e.operator}`)}function*Sa(e,t){let r,i;switch(e.left.type==="PrivateIdentifier"?(r=e.left.name,i=yield*d(e.right,t),i=i[T]||{}):(r=yield*d(e.left,t),i=yield*d(e.right,t)),e.operator){case"==":return r==i;case"!=":return r!=i;case"===":return r===i;case"!==":return r!==i;case"<":return r<i;case"<=":return r<=i;case">":return r>i;case">=":return r>=i;case"<<":return r<<i;case">>":return r>>i;case">>>":return r>>>i;case"+":return r+i;case"-":return r-i;case"*":return r*i;case"**":return r**i;case"/":return r/i;case"%":return r%i;case"|":return r|i;case"^":return r^i;case"&":return r&i;case"in":return r in i;case"instanceof":return r instanceof i;default:throw new SyntaxError(`Unexpected token ${e.operator}`)}}function*wa(e,t){const r=e.left;let i;if(r.type==="Identifier"){if(i=yield*Ie(r,t,{getVar:!0,throwErr:!1}),!i){const s=t.global().find("window").get();i=new fe(s,r.name)}}else if(r.type==="MemberExpression")i=yield*Me(r,t,{getVar:!0});else{const s=yield*d(e.right,t);return yield*j(r,t,{feed:s})}const a=yield*d(e.right,t);switch(e.operator){case"=":return i.set(a),i.get();case"+=":return i.set(i.get()+a),i.get();case"-=":return i.set(i.get()-a),i.get();case"*=":return i.set(i.get()*a),i.get();case"/=":return i.set(i.get()/a),i.get();case"%=":return i.set(i.get()%a),i.get();case"**=":return i.set(i.get()**a),i.get();case"<<=":return i.set(i.get()<<a),i.get();case">>=":return i.set(i.get()>>a),i.get();case">>>=":return i.set(i.get()>>>a),i.get();case"|=":return i.set(i.get()|a),i.get();case"^=":return i.set(i.get()^a),i.get();case"&=":return i.set(i.get()&a),i.get();case"??=":return i.set(i.get()??a),i.get();case"&&=":return i.set(i.get()&&a),i.get();case"||=":return i.set(i.get()||a),i.get();default:throw new SyntaxError(`Unexpected token ${e.operator}`)}}function*ka(e,t){switch(e.operator){case"||":return(yield*d(e.left,t))||(yield*d(e.right,t));case"&&":return(yield*d(e.left,t))&&(yield*d(e.right,t));case"??":return(yield*d(e.left,t))??(yield*d(e.right,t));default:throw new SyntaxError(`Unexpected token ${e.operator}`)}}function*Me(e,t,r={}){const{getObj:i=!1,getVar:a=!1}=r;let s;if(e.object.type==="Super"?s=yield*Vi(e.object,t,{getProto:!0}):s=yield*d(e.object,t),i)return s;let n,u=!1;if(e.computed?n=yield*d(e.property,t):e.property.type==="PrivateIdentifier"?(n=e.property.name,u=!0):n=e.property.name,u&&(s=s[T]),a){const l=jt(s,n);if(e.object.type==="Super"&&l){const c=t.find("this").get(),h=R(n);return w(c,h,{set:l}),new fe(c,h)}else return new fe(s,n)}else{const l=Mt(s,n);if(e.object.type==="Super"&&l){const c=t.find("this").get();return e.optional&&c==null?void 0:l.call(c)}else return e.optional&&s==null?void 0:s[n]}}function*Ea(e,t){return(yield*d(e.test,t))?yield*d(e.consequent,t):yield*d(e.alternate,t)}function*Ca(e,t){let r,i;if(e.callee.type==="MemberExpression"){if(i=yield*Me(e.callee,t,{getObj:!0}),e.callee.optional&&i==null)return;let s,n=!1;e.callee.computed?s=yield*d(e.callee.property,t):e.callee.property.type==="PrivateIdentifier"?(s=e.callee.property.name,n=!0):s=e.callee.property.name;let u=i;if(n&&(u=u[T]),e.callee.object.type==="Super"){const l=t.find("this").get();r=u[s].bind(l)}else r=u[s];if(e.optional&&r==null)return;if(typeof r!="function")throw new TypeError(`${s} is not a function`);if(_e in r)throw new TypeError(`Class constructor ${s} cannot be invoked without 'new'`)}else{if(i=t.find("this").get(),r=yield*d(e.callee,t),e.optional&&r==null)return;if(typeof r!="function"||e.callee.type!=="Super"&&_e in r){let s;if(e.callee.type==="Identifier")s=e.callee.name;else try{s=JSON.stringify(r)}catch{s=""+r}throw typeof r!="function"?new TypeError(`${s} is not a function`):new TypeError(`Class constructor ${s} cannot be invoked without 'new'`)}}let a=[];for(let s=0;s<e.arguments.length;s++){const n=e.arguments[s];n.type==="SpreadElement"?a=a.concat(yield*je(n,t)):a.push(yield*d(n,t))}if(e.callee.type==="Super"){const n=t.find(he).get();if(n===!0)throw new ReferenceError("Super constructor may only be called once");const u=Ge(i,r,a);return yield*n(u),t.find("this").set(u),t.find(he).set(!0),u}try{return r.apply(i,a)}catch(s){if(s instanceof TypeError&&s.message==="Illegal invocation"&&r.toString().indexOf("[native code]")!==-1){const n=t.global().find("window").get();if(n&&n[Ne])return r.apply(n[Ne],a)}throw s}}function*_a(e,t){const r=yield*d(e.callee,t);if(typeof r!="function"){let a;if(e.callee.type==="Identifier")a=e.callee.name;else try{a=JSON.stringify(r)}catch{a=""+r}throw new TypeError(`${a} is not a constructor`)}else if(r[nt])throw new TypeError(`${r.name||"(intermediate value)"} is not a constructor`);let i=[];for(let a=0;a<e.arguments.length;a++){const s=e.arguments[a];s.type==="SpreadElement"?i=i.concat(yield*je(s,t)):i.push(yield*d(s,t))}return new r(...i)}function*Ia(e,t){if(e.meta.name==="new"&&e.property.name==="target")return t.find(ot).get();if(e.meta.name==="import"&&e.property.name==="meta")return{url:""}}function*Aa(e,t){let r;for(let i=0;i<e.expressions.length;i++)r=yield*d(e.expressions[i],t);return r}function*Pa(e,t){return J(e,t)}function*La(e,t){const r=e.quasis.slice(),i=e.expressions.slice();let a="",s,n;for(;s=r.shift();)a+=yield*Li(s),n=i.shift(),n&&(a+=yield*d(n,t));return a}function*Va(e,t){const r=yield*d(e.tag,t),i=e.quasi.quasis,a=i.map(l=>l.value.cooked),s=i.map(l=>l.value.raw);w(a,"raw",{value:ze(s)});const n=e.quasi.expressions,u=[];if(n)for(let l=0;l<n.length;l++)u.push(yield*d(n[l],t));return r(ze(a),...u)}function*Li(e,t){return e.value.raw}function*Ta(e,t){if(e.id&&e.id.name){const r=new P(t),i=yield*We(e,r);return r.const(e.id.name,i),i}else return yield*We(e,t)}function*Vi(e,t,r={}){const{getProto:i=!1}=r,a=t.find(st).get();return i?a.prototype:a}function*je(e,t,r={}){const i=yield*d(e.argument,t);if(r.spreadProps)return i;if(typeof Symbol=="function"&&typeof i[Symbol.iterator]!="function")throw new TypeError("Spread syntax requires ...iterable[Symbol.iterator] to be a function");return[...i]}function*Na(e,t){return yield*d(e.expression,t)}function*Ra(e,t){const r=t.global(),i=yield*d(e.source,t),a=r.find(ge+i);let s;if(a){const n=a.get();n&&(typeof n=="function"?s=n():typeof n=="object"&&(s=n))}return!s||typeof s!="object"?Promise.reject(new TypeError(`Failed to resolve module specifier "${i}"`)):Promise.resolve(s)}function*Ba(e,t){const r=yield*d(e.argument,t);return e.delegate?yield*r:yield r}function*Oa(e,t){return me.RES=yield*d(e.argument,t),yield me}const Da=Object.freeze(Object.defineProperty({__proto__:null,ArrayExpression:ma,ArrowFunctionExpression:Pa,AssignmentExpression:wa,AwaitExpression:Oa,BinaryExpression:Sa,CallExpression:Ca,ChainExpression:Na,ClassExpression:Ta,ConditionalExpression:Ea,FunctionExpression:xa,ImportExpression:Ra,LogicalExpression:ka,MemberExpression:Me,MetaProperty:Ia,NewExpression:_a,ObjectExpression:ga,SequenceExpression:Aa,SpreadElement:je,Super:Vi,TaggedTemplateExpression:Va,TemplateElement:Li,TemplateLiteral:La,ThisExpression:ya,UnaryExpression:ba,UpdateExpression:va,YieldExpression:Ba},Symbol.toStringTag,{value:"Module"}));function*Ti(e,t,r={}){const{kind:i="var",hoist:a=!1,onlyBlock:s=!1,feed:n={}}=r,u=[];for(let l=0;l<e.properties.length;l++){const c=e.properties[l];if(a){if(s||i==="var")if(c.type==="Property"){const h=c.value;h.type==="Identifier"?t[i](h.name,s?F:i==="var"?O:void 0):yield*j(h,t,{kind:i,hoist:a,onlyBlock:s})}else yield*Ae(c,t,{kind:i,hoist:a,onlyBlock:s})}else if(c.type==="Property"){let h;c.computed?h=yield*d(c.key,t):h=c.key.name,u.push(h);const p=c.value;p.type==="Identifier"?t[i](p.name,n[h]):yield*j(p,t,{kind:i,feed:n[h]})}else{const h=N({},n);for(let p=0;p<u.length;p++)delete h[u[p]];yield*Ae(c,t,{kind:i,feed:h})}}}function*Ni(e,t,r={}){const{kind:i,hoist:a=!1,onlyBlock:s=!1,feed:n=[]}=r,u=[];for(let l=0;l<e.elements.length;l++){const c=e.elements[l];if(c)if(a)(s||i==="var")&&(c.type==="Identifier"?t[i](c.name,s?F:i==="var"?O:void 0):yield*j(c,t,{kind:i,hoist:a,onlyBlock:s}));else if(c.type==="Identifier")if(i)t[i](c.name,n[l]);else{const h=yield*Ie(c,t,{getVar:!0});h.set(n[l]),u.push(h.get())}else c.type==="RestElement"?yield*Ae(c,t,{kind:i,feed:n.slice(l)}):yield*j(c,t,{kind:i,feed:n[l]})}if(u.length)return u}function*Ae(e,t,r={}){const{kind:i,hoist:a=!1,onlyBlock:s=!1,feed:n=[]}=r,u=e.argument;a?(s||i==="var")&&(u.type==="Identifier"?t[i](u.name,s?F:i==="var"?O:void 0):yield*j(u,t,{kind:i,hoist:a,onlyBlock:s})):u.type==="Identifier"?i?t[i](u.name,n):(yield*Ie(u,t,{getVar:!0})).set(n):yield*j(u,t,{kind:i,feed:n})}function*Ri(e,t,r={}){const{kind:i="var",hoist:a=!1,onlyBlock:s=!1,feed:n=yield*d(e.right,t)}=r,u=e.left;a?(s||i==="var")&&(u.type==="Identifier"?t[i](u.name,s?F:i==="var"?O:void 0):yield*j(u,t,{kind:i,hoist:a,onlyBlock:s})):u.type==="Identifier"?t[i](u.name,n):yield*j(u,t,{kind:i,feed:n})}const Fa=Object.freeze(Object.defineProperty({__proto__:null,ArrayPattern:Ni,AssignmentPattern:Ri,ObjectPattern:Ti,RestElement:Ae},Symbol.toStringTag,{value:"Module"}));function*Ma(e,t){for(let r=0;r<e.body.length;r++)yield*d(e.body[r],t)}const ja=Object.freeze(Object.defineProperty({__proto__:null,Program:Ma},Symbol.toStringTag,{value:"Module"}));let _t;function*d(e,t){if(!e)return;_t||(_t=N({},Te,Da,pa,Ve,da,Fa,ja));const r=_t[e.type];if(r)return yield*r(e,t);throw new Error(`${e.type} isn't implemented`)}function*Ua(e,t){yield*d(e.expression,t)}function*ae(e,t,r={}){const{invasived:i=!1,hoisted:a=!1}=r,s=i?t:new P(t);a||(yield*Vt(e,s,{onlyBlock:!0}));for(let n=0;n<e.body.length;n++){const u=yield*d(e.body[n],s);if(u===I){if(u.LABEL&&u.LABEL===r.label)break;return u}if(u===_||u===E)return u}}function*$a(){}function*qa(){debugger}function*Wa(e,t){return E.RES=e.argument?yield*d(e.argument,t):void 0,E}function*za(e){var t;return I.LABEL=(t=e.label)==null?void 0:t.name,I}function*Ga(e){var t;return _.LABEL=(t=e.label)==null?void 0:t.name,_}function*Ha(e,t){const r=e.label.name;if(e.body.type==="WhileStatement")return yield*Ui(e.body,t,{label:r});if(e.body.type==="DoWhileStatement")return yield*$i(e.body,t,{label:r});if(e.body.type==="ForStatement")return yield*qi(e.body,t,{label:r});if(e.body.type==="ForInStatement")return yield*Wi(e.body,t,{label:r});if(e.body.type==="ForOfStatement")return yield*zi(e.body,t,{label:r});if(e.body.type==="BlockStatement")return yield*ae(e.body,t,{label:r});if(e.body.type==="WithStatement")return yield*Bi(e.body,t,{label:r});if(e.body.type==="IfStatement")return yield*Oi(e.body,t,{label:r});if(e.body.type==="SwitchStatement")return yield*Di(e.body,t,{label:r});if(e.body.type==="TryStatement")return yield*Mi(e.body,t,{label:r});throw new SyntaxError(`${e.body.type} cannot be labeled`)}function*Bi(e,t,r={}){const i=new P(t);i.with(yield*d(e.object,t));const a=yield*d(e.body,i);if(a===I)return a.LABEL&&a.LABEL===r.label?void 0:a;if(a===_||a===E)return a}function*Oi(e,t,r={}){let i;if((yield*d(e.test,t))?i=yield*d(e.consequent,t):i=yield*d(e.alternate,t),i===I)return i.LABEL&&i.LABEL===r.label?void 0:i;if(i===_||i===E)return i}function*Di(e,t,r={}){const i=yield*d(e.discriminant,t);let a=!1;for(let s=0;s<e.cases.length;s++){const n=e.cases[s];if(!a&&(!n.test||(yield*d(n.test,t))===i)&&(a=!0),a){const u=yield*Fi(n,t);if(u===I){if(u.LABEL===r.label)break;return u}if(u===_||u===E)return u}}}function*Fi(e,t){for(let r=0;r<e.consequent.length;r++){const i=yield*d(e.consequent[r],t);if(i===I||i===_||i===E)return i}}function*Ka(e,t){throw yield*d(e.argument,t)}function*Mi(e,t,r={}){let i;try{i=yield*ae(e.block,t)}catch(a){if(e.handler){const s=new P(t),n=e.handler.param;if(n)if(n.type==="Identifier"){const u=n.name;s.var(u,a)}else yield*j(n,t,{feed:a});i=yield*ji(e.handler,s)}else throw a}finally{e.finalizer&&(i=yield*ae(e.finalizer,t))}if(i===I)return i.LABEL&&i.LABEL===r.label?void 0:i;if(i===_||i===E)return i}function*ji(e,t){return yield*ae(e.body,t,{invasived:!0})}function*Ui(e,t,r={}){for(;yield*d(e.test,t);){const i=yield*d(e.body,t);if(i===I){if(i.LABEL===r.label)break;return i}else if(i===_){if(i.LABEL===r.label)continue;return i}else if(i===E)return i}}function*$i(e,t,r={}){do{const i=yield*d(e.body,t);if(i===I){if(i.LABEL===r.label)break;return i}else if(i===_){if(i.LABEL===r.label)continue;return i}else if(i===E)return i}while(yield*d(e.test,t))}function*qi(e,t,r={}){const i=new P(t);for(yield*d(e.init,i);!e.test||(yield*d(e.test,i));yield*d(e.update,i)){const a=new P(i);let s;if(e.body.type==="BlockStatement"?s=yield*ae(e.body,a,{invasived:!0}):s=yield*d(e.body,a),s===I){if(s.LABEL===r.label)break;return s}else if(s===_){if(s.LABEL===r.label)continue;return s}else if(s===E)return s}}function*Wi(e,t,r={}){for(const i in yield*d(e.right,t)){const a=yield*Tt(e,t,{value:i});if(a===I){if(a.LABEL===r.label)break;return a}else if(a===_){if(a.LABEL===r.label)continue;return a}else if(a===E)return a}}function*zi(e,t,r={}){const i=yield*d(e.right,t);if(e.await){const a=Cr(i);let s;for(me.RES=a.next(),s=yield me;!s.done;me.RES=a.next(),s=yield me){const n=yield*Tt(e,t,{value:s.value});if(n===I){if(n.LABEL===r.label)break;return n}else if(n===_){if(n.LABEL===r.label)continue;return n}else if(n===E)return n}}else for(const a of i){const s=yield*Tt(e,t,{value:a});if(s===I){if(s.LABEL===r.label)break;return s}else if(s===_){if(s.LABEL===r.label)continue;return s}else if(s===E)return s}}function*Qa(e,t){t.func(e.id.name,J(e,t))}function*xe(e,t,r={}){for(let i=0;i<e.declarations.length;i++)yield*Gi(e.declarations[i],t,N({kind:e.kind},r))}function*Gi(e,t,r={}){const{kind:i="var",hoist:a=!1,onlyBlock:s=!1,feed:n}=r;if(a)(s||i==="var")&&(e.id.type==="Identifier"?t[i](e.id.name,s?F:i==="var"?O:void 0):yield*j(e.id,t,{kind:i,hoist:a,onlyBlock:s}));else{const u="feed"in r,l=u?n:yield*d(e.init,t);if(e.id.type==="Identifier"){const c=e.id.name;i==="var"&&!e.init&&!u?t.var(c,O):t[i](c,l),e.init&&["ClassExpression","FunctionExpression","ArrowFunctionExpression"].indexOf(e.init.type)!==-1&&!l.name&&w(l,"name",{value:c,configurable:!0})}else yield*j(e.id,t,{kind:i,feed:l})}}function*Xa(e,t){t.func(e.id.name,yield*We(e,t))}function*Hi(e,t,r={}){const{klass:i,superClass:a}=r;for(let s=0;s<e.body.length;s++){const n=e.body[s];n.type==="MethodDefinition"?yield*Ki(n,t,{klass:i,superClass:a}):n.type==="PropertyDefinition"&&n.static?yield*It(n,t,{klass:i,superClass:a}):n.type==="StaticBlock"&&(yield*Qi(n,t,{klass:i}))}}function*Ki(e,t,r={}){const{klass:i,superClass:a}=r;let s,n=!1;if(e.computed)s=yield*d(e.key,t);else if(e.key.type==="Identifier")s=e.key.name;else if(e.key.type==="PrivateIdentifier")s=e.key.name,n=!0;else throw new SyntaxError("Unexpected token");let u=e.static?i:i.prototype;n&&(u[T]||w(u,T,{value:{}}),u=u[T]);const l=J(e.value,t,{superClass:a});switch(e.kind){case"constructor":break;case"method":w(u,s,{value:l,writable:!0,configurable:!0});break;case"get":{const c=ue(u,s);w(u,s,{get:l,set:c&&c.set,configurable:!0});break}case"set":{const c=ue(u,s);w(u,s,{get:c&&c.get,set:l,configurable:!0});break}default:throw new SyntaxError("Unexpected token")}}function*It(e,t,r={}){const{klass:i,superClass:a}=r;let s,n=!1;if(e.computed)s=yield*d(e.key,t);else if(e.key.type==="Identifier")s=e.key.name;else if(e.key.type==="PrivateIdentifier")s=e.key.name,n=!0;else throw new SyntaxError("Unexpected token");const u=new P(t,!0);u.const("this",i);let l=i;n&&(l[T]||w(l,T,{value:{}}),l=l[T]),e.value?e.value.type==="FunctionExpression"||e.value.type==="ArrowFunctionExpression"?l[s]=J(e.value,u,{superClass:a}):l[s]=yield*d(e.value,u):l[s]=void 0}function*Qi(e,t,r={}){const{klass:i}=r,a=new P(t,!0);return a.const("this",i),yield*ae(e,a,{invasived:!0})}function*Ya(e,t){const i=t.global().find(ge+e.source.value);let a;if(i){const s=i.get();s&&(typeof s=="function"?a=s():typeof s=="object"&&(a=s))}if(!a||typeof a!="object")throw new TypeError(`Failed to resolve module specifier "${e.source.value}"`);for(let s=0;s<e.specifiers.length;s++){const n=e.specifiers[s];let u;if(n.type==="ImportSpecifier"?u=n.imported.type==="Identifier"?n.imported.name:n.imported.value:n.type==="ImportDefaultSpecifier"?u="default":n.type==="ImportNamespaceSpecifier"&&(u="*"),u!=="*"&&!lt(a,u))throw new SyntaxError(`The requested module "${e.source.value}" does not provide an export named "${u}"`);t.var(n.local.name,u==="*"?N({},a):a[u])}}function*Za(e,t){const r=t.global();let i;e.declaration.type==="FunctionDeclaration"?(i=J(e.declaration,t),t.func(e.declaration.id.name,i)):e.declaration.type==="ClassDeclaration"?(i=yield*We(e.declaration,t),t.func(e.declaration.id.name,i)):i=yield*d(e.declaration,t);const a=r.find(U);if(a){const s=a.get();s&&typeof s=="object"&&(s.default=i)}}function*Ja(e,t){const r=t.global();if(e.declaration){if(e.declaration.type==="FunctionDeclaration"){const i=J(e.declaration,t);t.func(e.declaration.id.name,i);const a=r.find(U);if(a){const s=a.get();s&&typeof s=="object"&&(s[e.declaration.id.name]=i)}}else if(e.declaration.type==="ClassDeclaration"){const i=yield*We(e.declaration,t);t.func(e.declaration.id.name,i);const a=r.find(U);if(a){const s=a.get();s&&typeof s=="object"&&(s[e.declaration.id.name]=i)}}else if(e.declaration.type==="VariableDeclaration"){yield*xe(e.declaration,t);const i=r.find(U);if(i){const a=i.get();if(a&&typeof a=="object")for(let s=0;s<e.declaration.declarations.length;s++){const n=e.declaration.declarations[s].id.name,u=t.find(n);u&&(a[n]=u.get())}}}}else if(e.specifiers){const i=r.find(U);if(i){const a=i.get();if(a&&typeof a=="object")for(let s=0;s<e.specifiers.length;s++){const n=e.specifiers[s],u=n.local.type==="Identifier"?n.local.name:n.local.value,l=t.find(u);l&&(a[n.exported.type==="Identifier"?n.exported.name:n.exported.value]=l.get())}}}}function*es(e,t){const r=t.global(),i=r.find(ge+e.source.value);let a;if(i){const n=i.get();n&&(typeof n=="function"?a=n():typeof n=="object"&&(a=n))}if(!a||typeof a!="object")throw new TypeError(`Failed to resolve module specifier "${e.source.value}"`);const s=r.find(U);if(s){const n=s.get();n&&typeof n=="object"&&N(n,a)}}function pe(e,t,r={}){const{getVar:i=!1,throwErr:a=!0}=r;if(e.name==="undefined")return;const s=t.find(e.name);if(s){if(i)return s;{const n=s.get();if(n===F)throw new ReferenceError(`${e.name} is not defined`);return n}}else{if(a)throw new ReferenceError(`${e.name} is not defined`);return}}const ts=Object.freeze(Object.defineProperty({__proto__:null,Identifier:pe},Symbol.toStringTag,{value:"Module"}));function Xi(e,t){return e.value}const is=Object.freeze(Object.defineProperty({__proto__:null,Literal:Xi},Symbol.toStringTag,{value:"Module"}));function rs(e,t){const r=t.find(he);if(r&&r.get()!==!0)throw new ReferenceError("Must call super constructor in derived class before accessing 'this' or returning from derived constructor");return t.find("this").get()}function as(e,t){let r=[];for(let i=0;i<e.elements.length;i++){const a=e.elements[i];a.type==="SpreadElement"?r=r.concat($e(a,t)):r.push(y(a,t))}return r}function ss(e,t){const r={};for(let i=0;i<e.properties.length;i++){const a=e.properties[i];if(a.type==="SpreadElement")N(r,$e(a,t,{spreadProps:!0}));else{let s;const n=a.key;a.computed?s=y(n,t):n.type==="Identifier"?s=n.name:s=""+Xi(n);const u=y(a.value,t),l=a.kind;if(l==="init")r[s]=u;else if(l==="get"){const c=ue(r,s);w(r,s,{get:u,set:c&&c.set,enumerable:!0,configurable:!0})}else{const c=ue(r,s);w(r,s,{get:c&&c.get,set:u,enumerable:!0,configurable:!0})}}}return r}function ns(e,t){if(e.id&&e.id.name){const r=new P(t),i=Z(e,r);return r.const(e.id.name,i),i}else return Z(e,t)}function os(e,t){const r=e.argument;switch(e.operator){case"+":return+y(r,t);case"-":return-y(r,t);case"!":return!y(r,t);case"~":return~y(r,t);case"void":return void y(r,t);case"typeof":return r.type==="Identifier"?typeof pe(r,t,{throwErr:!1}):typeof y(r,t);case"delete":if(r.type==="MemberExpression")return Ue(r,t,{getVar:!0}).del();if(r.type==="Identifier")throw new SyntaxError("Delete of an unqualified identifier in strict mode");return y(r,t),!0;default:throw new SyntaxError(`Unexpected token ${e.operator}`)}}function us(e,t){const r=e.argument;let i;if(r.type==="Identifier")i=pe(r,t,{getVar:!0});else if(r.type==="MemberExpression")i=Ue(r,t,{getVar:!0});else throw new SyntaxError("Unexpected token");const a=i.get();if(e.operator==="++")return i.set(a+1),e.prefix?i.get():a;if(e.operator==="--")return i.set(a-1),e.prefix?i.get():a;throw new SyntaxError(`Unexpected token ${e.operator}`)}function ls(e,t){let r,i;switch(e.left.type==="PrivateIdentifier"?(r=e.left.name,i=y(e.right,t),i=i[T]||{}):(r=y(e.left,t),i=y(e.right,t)),e.operator){case"==":return r==i;case"!=":return r!=i;case"===":return r===i;case"!==":return r!==i;case"<":return r<i;case"<=":return r<=i;case">":return r>i;case">=":return r>=i;case"<<":return r<<i;case">>":return r>>i;case">>>":return r>>>i;case"+":return r+i;case"-":return r-i;case"*":return r*i;case"**":return r**i;case"/":return r/i;case"%":return r%i;case"|":return r|i;case"^":return r^i;case"&":return r&i;case"in":return r in i;case"instanceof":return r instanceof i;default:throw new SyntaxError(`Unexpected token ${e.operator}`)}}function cs(e,t){const r=e.left;let i;if(r.type==="Identifier"){if(i=pe(r,t,{getVar:!0,throwErr:!1}),!i){const s=t.global().find("window").get();i=new fe(s,r.name)}}else if(r.type==="MemberExpression")i=Ue(r,t,{getVar:!0});else{const s=y(e.right,t);return M(r,t,{feed:s})}const a=y(e.right,t);switch(e.operator){case"=":return i.set(a),i.get();case"+=":return i.set(i.get()+a),i.get();case"-=":return i.set(i.get()-a),i.get();case"*=":return i.set(i.get()*a),i.get();case"/=":return i.set(i.get()/a),i.get();case"%=":return i.set(i.get()%a),i.get();case"**=":return i.set(i.get()**a),i.get();case"<<=":return i.set(i.get()<<a),i.get();case">>=":return i.set(i.get()>>a),i.get();case">>>=":return i.set(i.get()>>>a),i.get();case"|=":return i.set(i.get()|a),i.get();case"^=":return i.set(i.get()^a),i.get();case"&=":return i.set(i.get()&a),i.get();case"??=":return i.set(i.get()??a),i.get();case"&&=":return i.set(i.get()&&a),i.get();case"||=":return i.set(i.get()||a),i.get();default:throw new SyntaxError(`Unexpected token ${e.operator}`)}}function hs(e,t){switch(e.operator){case"||":return y(e.left,t)||y(e.right,t);case"&&":return y(e.left,t)&&y(e.right,t);case"??":return y(e.left,t)??y(e.right,t);default:throw new SyntaxError(`Unexpected token ${e.operator}`)}}function Ue(e,t,r={}){const{getObj:i=!1,getVar:a=!1}=r;let s;if(e.object.type==="Super"?s=Zi(e.object,t,{getProto:!0}):s=y(e.object,t),i)return s;let n,u=!1;if(e.computed?n=y(e.property,t):e.property.type==="PrivateIdentifier"?(n=e.property.name,u=!0):n=e.property.name,u&&(s=s[T]),a){const l=jt(s,n);if(e.object.type==="Super"&&l){const c=t.find("this").get(),h=R(n);return w(c,h,{set:l}),new fe(c,h)}else return new fe(s,n)}else{const l=Mt(s,n);if(e.object.type==="Super"&&l){const c=t.find("this").get();return e.optional&&c==null?void 0:l.call(c)}else return e.optional&&s==null?void 0:s[n]}}function fs(e,t){return y(e.test,t)?y(e.consequent,t):y(e.alternate,t)}function ps(e,t){let r,i;if(e.callee.type==="MemberExpression"){if(i=Ue(e.callee,t,{getObj:!0}),e.callee.optional&&i==null)return;let s,n=!1;e.callee.computed?s=y(e.callee.property,t):e.callee.property.type==="PrivateIdentifier"?(s=e.callee.property.name,n=!0):s=e.callee.property.name;let u=i;if(n&&(u=u[T]),e.callee.object.type==="Super"){const l=t.find("this").get();r=u[s].bind(l)}else r=u[s];if(e.optional&&r==null)return;if(typeof r!="function")throw new TypeError(`${s} is not a function`);if(_e in r)throw new TypeError(`Class constructor ${s} cannot be invoked without 'new'`)}else{if(i=t.find("this").get(),r=y(e.callee,t),e.optional&&r==null)return;if(typeof r!="function"||e.callee.type!=="Super"&&_e in r){let s;if(e.callee.type==="Identifier")s=e.callee.name;else try{s=JSON.stringify(r)}catch{s=""+r}throw typeof r!="function"?new TypeError(`${s} is not a function`):new TypeError(`Class constructor ${s} cannot be invoked without 'new'`)}}let a=[];for(let s=0;s<e.arguments.length;s++){const n=e.arguments[s];n.type==="SpreadElement"?a=a.concat($e(n,t)):a.push(y(n,t))}if(e.callee.type==="Super"){const n=t.find(he).get();if(n===!0)throw new ReferenceError("Super constructor may only be called once");const u=Ge(i,r,a);return n(u),t.find("this").set(u),t.find(he).set(!0),u}try{return r.apply(i,a)}catch(s){if(s instanceof TypeError&&s.message==="Illegal invocation"&&r.toString().indexOf("[native code]")!==-1){const n=t.global().find("window").get();if(n&&n[Ne])return r.apply(n[Ne],a)}throw s}}function ds(e,t){const r=y(e.callee,t);if(typeof r!="function"){let a;if(e.callee.type==="Identifier")a=e.callee.name;else try{a=JSON.stringify(r)}catch{a=""+r}throw new TypeError(`${a} is not a constructor`)}else if(r[nt])throw new TypeError(`${r.name||"(intermediate value)"} is not a constructor`);let i=[];for(let a=0;a<e.arguments.length;a++){const s=e.arguments[a];s.type==="SpreadElement"?i=i.concat($e(s,t)):i.push(y(s,t))}return new r(...i)}function ys(e,t){if(e.meta.name==="new"&&e.property.name==="target")return t.find(ot).get();if(e.meta.name==="import"&&e.property.name==="meta")return{url:""}}function ms(e,t){let r;for(let i=0;i<e.expressions.length;i++)r=y(e.expressions[i],t);return r}function gs(e,t){return Z(e,t)}function xs(e,t){const r=e.quasis.slice(),i=e.expressions.slice();let a="",s,n;for(;s=r.shift();)a+=Yi(s),n=i.shift(),n&&(a+=y(n,t));return a}function bs(e,t){const r=y(e.tag,t),i=e.quasi.quasis,a=i.map(l=>l.value.cooked),s=i.map(l=>l.value.raw);w(a,"raw",{value:ze(s)});const n=e.quasi.expressions,u=[];if(n)for(let l=0;l<n.length;l++)u.push(y(n[l],t));return r(ze(a),...u)}function Yi(e,t){return e.value.raw}function vs(e,t){if(e.id&&e.id.name){const r=new P(t),i=qe(e,r);return r.const(e.id.name,i),i}else return qe(e,t)}function Zi(e,t,r={}){const{getProto:i=!1}=r,a=t.find(st).get();return i?a.prototype:a}function $e(e,t,r={}){const i=y(e.argument,t);if(r.spreadProps)return i;if(typeof Symbol=="function"&&typeof i[Symbol.iterator]!="function")throw new TypeError("Spread syntax requires ...iterable[Symbol.iterator] to be a function");return[...i]}function Ss(e,t){return y(e.expression,t)}function ws(e,t){const r=t.global(),i=y(e.source,t),a=r.find(ge+i);let s;if(a){const n=a.get();n&&(typeof n=="function"?s=n():typeof n=="object"&&(s=n))}return!s||typeof s!="object"?Promise.reject(new TypeError(`Failed to resolve module specifier "${i}"`)):Promise.resolve(s)}const ks=Object.freeze(Object.defineProperty({__proto__:null,ArrayExpression:as,ArrowFunctionExpression:gs,AssignmentExpression:cs,BinaryExpression:ls,CallExpression:ps,ChainExpression:Ss,ClassExpression:vs,ConditionalExpression:fs,FunctionExpression:ns,ImportExpression:ws,LogicalExpression:hs,MemberExpression:Ue,MetaProperty:ys,NewExpression:ds,ObjectExpression:ss,SequenceExpression:ms,SpreadElement:$e,Super:Zi,TaggedTemplateExpression:bs,TemplateElement:Yi,TemplateLiteral:xs,ThisExpression:rs,UnaryExpression:os,UpdateExpression:us},Symbol.toStringTag,{value:"Module"}));function Ji(e,t,r={}){const{kind:i="var",hoist:a=!1,onlyBlock:s=!1,feed:n={}}=r,u=[];for(let l=0;l<e.properties.length;l++){const c=e.properties[l];if(a){if(s||i==="var")if(c.type==="Property"){const h=c.value;h.type==="Identifier"?t[i](h.name,s?F:i==="var"?O:void 0):M(h,t,{kind:i,hoist:a,onlyBlock:s})}else Pe(c,t,{kind:i,hoist:a,onlyBlock:s})}else if(c.type==="Property"){let h;c.computed?h=y(c.key,t):h=c.key.name,u.push(h);const p=c.value;p.type==="Identifier"?t[i](p.name,n[h]):M(p,t,{kind:i,feed:n[h]})}else{const h=N({},n);for(let p=0;p<u.length;p++)delete h[u[p]];Pe(c,t,{kind:i,feed:h})}}}function er(e,t,r={}){const{kind:i,hoist:a=!1,onlyBlock:s=!1,feed:n=[]}=r,u=[];for(let l=0;l<e.elements.length;l++){const c=e.elements[l];if(c)if(a)(s||i==="var")&&(c.type==="Identifier"?t[i](c.name,s?F:i==="var"?O:void 0):M(c,t,{kind:i,hoist:a,onlyBlock:s}));else if(c.type==="Identifier")if(i)t[i](c.name,n[l]);else{const h=pe(c,t,{getVar:!0});h.set(n[l]),u.push(h.get())}else c.type==="RestElement"?Pe(c,t,{kind:i,feed:n.slice(l)}):M(c,t,{kind:i,feed:n[l]})}if(u.length)return u}function Pe(e,t,r={}){const{kind:i,hoist:a=!1,onlyBlock:s=!1,feed:n=[]}=r,u=e.argument;a?(s||i==="var")&&(u.type==="Identifier"?t[i](u.name,s?F:i==="var"?O:void 0):M(u,t,{kind:i,hoist:a,onlyBlock:s})):u.type==="Identifier"?i?t[i](u.name,n):pe(u,t,{getVar:!0}).set(n):M(u,t,{kind:i,feed:n})}function tr(e,t,r={}){const{kind:i="var",hoist:a=!1,onlyBlock:s=!1,feed:n=y(e.right,t)}=r,u=e.left;a?(s||i==="var")&&(u.type==="Identifier"?t[i](u.name,s?F:i==="var"?O:void 0):M(u,t,{kind:i,hoist:a,onlyBlock:s})):u.type==="Identifier"?t[i](u.name,n):M(u,t,{kind:i,feed:n})}const Es=Object.freeze(Object.defineProperty({__proto__:null,ArrayPattern:er,AssignmentPattern:tr,ObjectPattern:Ji,RestElement:Pe},Symbol.toStringTag,{value:"Module"}));function Cs(e,t){for(let r=0;r<e.body.length;r++)y(e.body[r],t)}const _s=Object.freeze(Object.defineProperty({__proto__:null,Program:Cs},Symbol.toStringTag,{value:"Module"}));let At;function y(e,t){if(!e)return;At||(At=N({},br,ks,ts,xr,is,Es,_s));const r=At[e.type];if(r)return r(e,t);throw new Error(`${e.type} isn't implemented`)}function Is(e,t){y(e.expression,t)}function se(e,t,r={}){const{invasived:i=!1,hoisted:a=!1}=r,s=i?t:new P(t);a||Lt(e,s,{onlyBlock:!0});for(let n=0;n<e.body.length;n++){const u=y(e.body[n],s);if(u===I){if(u.LABEL&&u.LABEL===r.label)break;return u}if(u===_||u===E)return u}}function As(){}function Ps(){debugger}function Ls(e,t){return E.RES=e.argument?y(e.argument,t):void 0,E}function Vs(e){var t;return I.LABEL=(t=e.label)==null?void 0:t.name,I}function Ts(e){var t;return _.LABEL=(t=e.label)==null?void 0:t.name,_}function Ns(e,t){const r=e.label.name;if(e.body.type==="WhileStatement")return ur(e.body,t,{label:r});if(e.body.type==="DoWhileStatement")return lr(e.body,t,{label:r});if(e.body.type==="ForStatement")return cr(e.body,t,{label:r});if(e.body.type==="ForInStatement")return hr(e.body,t,{label:r});if(e.body.type==="ForOfStatement")return fr(e.body,t,{label:r});if(e.body.type==="BlockStatement")return se(e.body,t,{label:r});if(e.body.type==="WithStatement")return ir(e.body,t,{label:r});if(e.body.type==="IfStatement")return rr(e.body,t,{label:r});if(e.body.type==="SwitchStatement")return ar(e.body,t,{label:r});if(e.body.type==="TryStatement")return nr(e.body,t,{label:r});throw new SyntaxError(`${e.body.type} cannot be labeled`)}function ir(e,t,r={}){const i=new P(t);i.with(y(e.object,t));const a=y(e.body,i);if(a===I)return a.LABEL&&a.LABEL===r.label?void 0:a;if(a===_||a===E)return a}function rr(e,t,r={}){let i;if(y(e.test,t)?i=y(e.consequent,t):i=y(e.alternate,t),i===I)return i.LABEL&&i.LABEL===r.label?void 0:i;if(i===_||i===E)return i}function ar(e,t,r={}){const i=y(e.discriminant,t);let a=!1;for(let s=0;s<e.cases.length;s++){const n=e.cases[s];if(!a&&(!n.test||y(n.test,t)===i)&&(a=!0),a){const u=sr(n,t);if(u===I){if(u.LABEL===r.label)break;return u}if(u===_||u===E)return u}}}function sr(e,t){for(let r=0;r<e.consequent.length;r++){const i=y(e.consequent[r],t);if(i===I||i===_||i===E)return i}}function Rs(e,t){throw y(e.argument,t)}function nr(e,t,r={}){let i;try{i=se(e.block,t)}catch(a){if(e.handler){const s=new P(t),n=e.handler.param;if(n)if(n.type==="Identifier"){const u=n.name;s.var(u,a)}else M(n,t,{feed:a});i=or(e.handler,s)}else throw a}finally{e.finalizer&&(i=se(e.finalizer,t))}if(i===I)return i.LABEL&&i.LABEL===r.label?void 0:i;if(i===_||i===E)return i}function or(e,t){return se(e.body,t,{invasived:!0})}function ur(e,t,r={}){for(;y(e.test,t);){const i=y(e.body,t);if(i===I){if(i.LABEL===r.label)break;return i}else if(i===_){if(i.LABEL===r.label)continue;return i}else if(i===E)return i}}function lr(e,t,r={}){do{const i=y(e.body,t);if(i===I){if(i.LABEL===r.label)break;return i}else if(i===_){if(i.LABEL===r.label)continue;return i}else if(i===E)return i}while(y(e.test,t))}function cr(e,t,r={}){const i=new P(t);for(y(e.init,i);!e.test||y(e.test,i);y(e.update,i)){const a=new P(i);let s;if(e.body.type==="BlockStatement"?s=se(e.body,a,{invasived:!0}):s=y(e.body,a),s===I){if(s.LABEL===r.label)break;return s}else if(s===_){if(s.LABEL===r.label)continue;return s}else if(s===E)return s}}function hr(e,t,r={}){for(const i in y(e.right,t)){const a=gr(e,t,{value:i});if(a===I){if(a.LABEL===r.label)break;return a}else if(a===_){if(a.LABEL===r.label)continue;return a}else if(a===E)return a}}function fr(e,t,r={}){const i=y(e.right,t);for(const a of i){const s=gr(e,t,{value:a});if(s===I){if(s.LABEL===r.label)break;return s}else if(s===_){if(s.LABEL===r.label)continue;return s}else if(s===E)return s}}function Bs(e,t){t.func(e.id.name,Z(e,t))}function be(e,t,r={}){for(let i=0;i<e.declarations.length;i++)pr(e.declarations[i],t,N({kind:e.kind},r))}function pr(e,t,r={}){const{kind:i="var",hoist:a=!1,onlyBlock:s=!1,feed:n}=r;if(a)(s||i==="var")&&(e.id.type==="Identifier"?t[i](e.id.name,s?F:i==="var"?O:void 0):M(e.id,t,{kind:i,hoist:a,onlyBlock:s}));else{const u="feed"in r,l=u?n:y(e.init,t);if(e.id.type==="Identifier"){const c=e.id.name;i==="var"&&!e.init&&!u?t.var(c,O):t[i](c,l),e.init&&["ClassExpression","FunctionExpression","ArrowFunctionExpression"].indexOf(e.init.type)!==-1&&!l.name&&w(l,"name",{value:c,configurable:!0})}else M(e.id,t,{kind:i,feed:l})}}function Os(e,t){t.func(e.id.name,qe(e,t))}function dr(e,t,r={}){const{klass:i,superClass:a}=r;for(let s=0;s<e.body.length;s++){const n=e.body[s];n.type==="MethodDefinition"?yr(n,t,{klass:i,superClass:a}):n.type==="PropertyDefinition"&&n.static?Pt(n,t,{klass:i,superClass:a}):n.type==="StaticBlock"&&mr(n,t,{klass:i})}}function yr(e,t,r={}){const{klass:i,superClass:a}=r;let s,n=!1;if(e.computed)s=y(e.key,t);else if(e.key.type==="Identifier")s=e.key.name;else if(e.key.type==="PrivateIdentifier")s=e.key.name,n=!0;else throw new SyntaxError("Unexpected token");let u=e.static?i:i.prototype;n&&(u[T]||w(u,T,{value:{}}),u=u[T]);const l=Z(e.value,t,{superClass:a});switch(e.kind){case"constructor":break;case"method":w(u,s,{value:l,writable:!0,configurable:!0});break;case"get":{const c=ue(u,s);w(u,s,{get:l,set:c&&c.set,configurable:!0});break}case"set":{const c=ue(u,s);w(u,s,{get:c&&c.get,set:l,configurable:!0});break}default:throw new SyntaxError("Unexpected token")}}function Pt(e,t,r={}){const{klass:i,superClass:a}=r;let s,n=!1;if(e.computed)s=y(e.key,t);else if(e.key.type==="Identifier")s=e.key.name;else if(e.key.type==="PrivateIdentifier")s=e.key.name,n=!0;else throw new SyntaxError("Unexpected token");const u=new P(t,!0);u.const("this",i);let l=i;n&&(l[T]||w(l,T,{value:{}}),l=l[T]),e.value?e.value.type==="FunctionExpression"||e.value.type==="ArrowFunctionExpression"?l[s]=Z(e.value,u,{superClass:a}):l[s]=y(e.value,u):l[s]=void 0}function mr(e,t,r={}){const{klass:i}=r,a=new P(t,!0);return a.const("this",i),se(e,a,{invasived:!0})}function Ds(e,t){const i=t.global().find(ge+e.source.value);let a;if(i){const s=i.get();s&&(typeof s=="function"?a=s():typeof s=="object"&&(a=s))}if(!a||typeof a!="object")throw new TypeError(`Failed to resolve module specifier "${e.source.value}"`);for(let s=0;s<e.specifiers.length;s++){const n=e.specifiers[s];let u;if(n.type==="ImportSpecifier"?u=n.imported.type==="Identifier"?n.imported.name:n.imported.value:n.type==="ImportDefaultSpecifier"?u="default":n.type==="ImportNamespaceSpecifier"&&(u="*"),u!=="*"&&!lt(a,u))throw new SyntaxError(`The requested module "${e.source.value}" does not provide an export named "${u}"`);t.var(n.local.name,u==="*"?N({},a):a[u])}}function Fs(e,t){const r=t.global();let i;e.declaration.type==="FunctionDeclaration"?(i=Z(e.declaration,t),t.func(e.declaration.id.name,i)):e.declaration.type==="ClassDeclaration"?(i=qe(e.declaration,t),t.func(e.declaration.id.name,i)):i=y(e.declaration,t);const a=r.find(U);if(a){const s=a.get();s&&typeof s=="object"&&(s.default=i)}}function Ms(e,t){const r=t.global();if(e.declaration){if(e.declaration.type==="FunctionDeclaration"){const i=Z(e.declaration,t);t.func(e.declaration.id.name,i);const a=r.find(U);if(a){const s=a.get();s&&typeof s=="object"&&(s[e.declaration.id.name]=i)}}else if(e.declaration.type==="ClassDeclaration"){const i=qe(e.declaration,t);t.func(e.declaration.id.name,i);const a=r.find(U);if(a){const s=a.get();s&&typeof s=="object"&&(s[e.declaration.id.name]=i)}}else if(e.declaration.type==="VariableDeclaration"){be(e.declaration,t);const i=r.find(U);if(i){const a=i.get();if(a&&typeof a=="object")for(let s=0;s<e.declaration.declarations.length;s++){const n=e.declaration.declarations[s].id.name,u=t.find(n);u&&(a[n]=u.get())}}}}else if(e.specifiers){const i=r.find(U);if(i){const a=i.get();if(a&&typeof a=="object")for(let s=0;s<e.specifiers.length;s++){const n=e.specifiers[s],u=n.local.type==="Identifier"?n.local.name:n.local.value,l=t.find(u);l&&(a[n.exported.type==="Identifier"?n.exported.name:n.exported.value]=l.get())}}}}function js(e,t){const r=t.global(),i=r.find(ge+e.source.value);let a;if(i){const n=i.get();n&&(typeof n=="function"?a=n():typeof n=="object"&&(a=n))}if(!a||typeof a!="object")throw new TypeError(`Failed to resolve module specifier "${e.source.value}"`);const s=r.find(U);if(s){const n=s.get();n&&typeof n=="object"&&N(n,a)}}function Lt(e,t,r={}){const{onlyBlock:i=!1}=r,a=[],s=[];for(let n=0;n<e.body.length;n++){const u=e.body[n];u.type==="FunctionDeclaration"?(a.push(u),s.push(n)):u.type==="VariableDeclaration"&&["const","let"].indexOf(u.kind)!==-1?be(u,t,{hoist:!0,onlyBlock:!0}):i||ne(u,t)}if(s.length){for(let n=s.length-1;n>-1;n--)e.body.splice(s[n],1);e.body=a.concat(e.body)}}function ne(e,t){switch(e.type){case"VariableDeclaration":be(e,t,{hoist:!0});break;case"ForInStatement":case"ForOfStatement":e.left.type==="VariableDeclaration"&&be(e.left,t,{hoist:!0});case"ForStatement":e.type==="ForStatement"&&e.init.type==="VariableDeclaration"&&be(e.init,t,{hoist:!0});case"WhileStatement":case"DoWhileStatement":ne(e.body,t);break;case"IfStatement":ne(e.consequent,t),e.alternate&&ne(e.alternate,t);break;case"BlockStatement":for(let r=0;r<e.body.length;r++)ne(e.body[r],t);break;case"SwitchStatement":for(let r=0;r<e.cases.length;r++)for(let i=0;i<e.cases[r].consequent.length;i++)ne(e.cases[r].consequent[i],t);break;case"TryStatement":{const r=e.block.body;for(let s=0;s<r.length;s++)ne(r[s],t);const i=e.handler&&e.handler.body.body;if(i)for(let s=0;s<i.length;s++)ne(i[s],t);const a=e.finalizer&&e.finalizer.body;if(a)for(let s=0;s<a.length;s++)ne(a[s],t);break}}}function M(e,t,r={}){switch(e.type){case"ObjectPattern":return Ji(e,t,r);case"ArrayPattern":return er(e,t,r);case"RestElement":return Pe(e,t,r);case"AssignmentPattern":return tr(e,t,r);default:throw new SyntaxError("Unexpected token")}}function Z(e,t,r={}){var c;if(e.generator||e.async)return J(e,t,r);const{superClass:i,construct:a}=r,s=e.params;let u=function(...h){const p=new P(t,!0);e.type!=="ArrowFunctionExpression"&&(p.let("this",this),p.let("arguments",arguments),p.const(ot,new.target),i?(p.const(st,i),a&&p.let(he,a)):a&&a(this));for(let C=0;C<s.length;C++){const L=s[C];L.type==="Identifier"?p.var(L.name,h[C]):L.type==="RestElement"?Pe(L,p,{kind:"var",feed:h.slice(C)}):M(L,p,{kind:"var",feed:h[C]})}let S;if(e.body.type==="BlockStatement"?(Lt(e.body,p),S=se(e.body,p,{invasived:!0,hoisted:!0})):(S=y(e.body,p),e.type==="ArrowFunctionExpression"&&(E.RES=S,S=E)),S===E)return S.RES;if(new.target)return p.find("this").get()};e.type==="ArrowFunctionExpression"&&w(u,nt,{value:!0}),w(u,"name",{value:e.id&&e.id.name||"",configurable:!0}),w(u,"length",{value:s.length,configurable:!0});const l=(c=e.loc)==null?void 0:c.source;return l&&w(u,"toString",{value:()=>l.substring(e.start,e.end),configurable:!0}),u}function qe(e,t){const r=y(e.superClass,t),i=e.body.body,a=function(n){for(let u=0;u<i.length;u++){const l=i[u];l.type==="PropertyDefinition"&&!l.static&&Pt(l,t,{klass:n,superClass:r})}};let s=function(){const n=r?Ge(this,r):this;return a(n),n};for(let n=0;n<i.length;n++){const u=i[n];if(u.type==="MethodDefinition"&&u.kind==="constructor"){s=Z(u.value,t,{superClass:r,construct:a});break}}return r&&Ut(s,r),dr(e.body,t,{klass:s,superClass:r}),w(s,_e,{value:!0}),w(s,"name",{value:e.id&&e.id.name||"",configurable:!0}),s}function gr(e,t,r){const{value:i}=r,a=e.left,s=new P(t);a.type==="VariableDeclaration"?be(a,s,{feed:i}):a.type==="Identifier"?pe(a,t,{getVar:!0}).set(i):M(a,t,{feed:i});let n;return e.body.type==="BlockStatement"?n=se(e.body,s,{invasived:!0}):n=y(e.body,s),n}function*Vt(e,t,r={}){const{onlyBlock:i=!1}=r,a=[],s=[];for(let n=0;n<e.body.length;n++){const u=e.body[n];u.type==="FunctionDeclaration"?(a.push(u),s.push(n)):u.type==="VariableDeclaration"&&["const","let"].indexOf(u.kind)!==-1?yield*xe(u,t,{hoist:!0,onlyBlock:!0}):i||(yield*oe(u,t))}if(s.length){for(let n=s.length-1;n>-1;n--)e.body.splice(s[n],1);e.body=a.concat(e.body)}}function*oe(e,t){switch(e.type){case"VariableDeclaration":yield*xe(e,t,{hoist:!0});break;case"ForInStatement":case"ForOfStatement":e.left.type==="VariableDeclaration"&&(yield*xe(e.left,t,{hoist:!0}));case"ForStatement":e.type==="ForStatement"&&e.init.type==="VariableDeclaration"&&(yield*xe(e.init,t,{hoist:!0}));case"WhileStatement":case"DoWhileStatement":yield*oe(e.body,t);break;case"IfStatement":yield*oe(e.consequent,t),e.alternate&&(yield*oe(e.alternate,t));break;case"BlockStatement":for(let r=0;r<e.body.length;r++)yield*oe(e.body[r],t);break;case"SwitchStatement":for(let r=0;r<e.cases.length;r++)for(let i=0;i<e.cases[r].consequent.length;i++)yield*oe(e.cases[r].consequent[i],t);break;case"TryStatement":{const r=e.block.body;for(let s=0;s<r.length;s++)yield*oe(r[s],t);const i=e.handler&&e.handler.body.body;if(i)for(let s=0;s<i.length;s++)yield*oe(i[s],t);const a=e.finalizer&&e.finalizer.body;if(a)for(let s=0;s<a.length;s++)yield*oe(a[s],t);break}}}function*j(e,t,r={}){switch(e.type){case"ObjectPattern":return yield*Ti(e,t,r);case"ArrayPattern":return yield*Ni(e,t,r);case"RestElement":return yield*Ae(e,t,r);case"AssignmentPattern":return yield*Ri(e,t,r);default:throw new SyntaxError("Unexpected token")}}function J(e,t,r={}){var c;if(!e.generator&&!e.async)return Z(e,t,r);const{superClass:i,construct:a}=r,s=e.params,n=function*(...h){const p=new P(t,!0);e.type!=="ArrowFunctionExpression"&&(p.let("this",this),p.let("arguments",arguments),p.const(ot,new.target),i?(p.const(st,i),a&&p.let(he,a)):a&&(yield*a(this)));for(let C=0;C<s.length;C++){const L=s[C];L.type==="Identifier"?p.var(L.name,h[C]):L.type==="RestElement"?yield*Ae(L,p,{kind:"var",feed:h.slice(C)}):yield*j(L,p,{kind:"var",feed:h[C]})}let S;if(e.body.type==="BlockStatement"?(yield*Vt(e.body,p),S=yield*ae(e.body,p,{invasived:!0,hoisted:!0})):(S=yield*d(e.body,p),e.type==="ArrowFunctionExpression"&&(E.RES=S,S=E)),S===E)return S.RES;if(new.target)return p.find("this").get()};let u;e.async&&e.generator?u=function(){const h=n.apply(this,arguments);let p=Promise.resolve(),S=!1;const C=K=>p=p.then(()=>Ct(h,N({fullRet:!0},K))).catch(de=>{if(!S)return S=!0,Promise.reject(de)}),L={next:K=>C({res:K}),throw:K=>C({err:K}),return:K=>C({ret:K})};return typeof Symbol=="function"&&(L[Symbol.iterator]=function(){return this}),L}:e.async?u=function(){return Ct(n.apply(this,arguments))}:u=n,w(u,nt,{value:!0}),w(u,"name",{value:e.id&&e.id.name||"",configurable:!0}),w(u,"length",{value:s.length,configurable:!0});const l=(c=e.loc)==null?void 0:c.source;return l&&w(u,"toString",{value:()=>l.substring(e.start,e.end),configurable:!0}),u}function*We(e,t){const r=yield*d(e.superClass,t),i=e.body.body,a=function*(n){for(let u=0;u<i.length;u++){const l=i[u];l.type==="PropertyDefinition"&&!l.static&&(yield*It(l,t,{klass:n,superClass:r}))}};let s=function*(){const n=r?Ge(this,r):this;return yield*a(n),n};for(let n=0;n<i.length;n++){const u=i[n];if(u.type==="MethodDefinition"&&u.kind==="constructor"){s=J(u.value,t,{superClass:r,construct:a});break}}return r&&Ut(s,r),yield*Hi(e.body,t,{klass:s,superClass:r}),w(s,_e,{value:!0}),w(s,"name",{value:e.id&&e.id.name||"",configurable:!0}),s}function*Tt(e,t,r){const{value:i}=r,a=e.left,s=new P(t);a.type==="VariableDeclaration"?yield*xe(a,s,{feed:i}):a.type==="Identifier"?(yield*pe(a,t,{getVar:!0})).set(i):yield*j(a,t,{feed:i});let n;return e.body.type==="BlockStatement"?n=yield*ae(e.body,s,{invasived:!0}):n=yield*d(e.body,s),n}const Us=15,Rt=class Rt{constructor(t={}){this.options={ecmaVersion:"latest"},this.scope=new P(null,!0),this.exports={};let{ecmaVer:r="latest",sandBox:i=!0,sourceType:a="script"}=t;if(typeof r=="number"&&(r-=r<2015?0:2009),r!=="latest"&&r!==3&&(r<5||r>Us))throw new Error("unsupported ecmaVer");if(this.options.ecmaVersion=r,this.options.sourceType=a,i){const s=Er();this.scope.let("globalThis",s),this.scope.let("window",s),this.scope.let("self",s),this.scope.let("this",s)}else this.scope.let("globalThis",f),this.scope.let("window",f),this.scope.let("self",f),this.scope.let("this",f);this.scope.const(a==="module"?U:"exports",this.exports={})}import(t,r){if(typeof t=="string"&&(t={[t]:r}),typeof t!="object")return;const i=ct(t);for(let a=0;a<i.length;a++){const s=i[a],n=this.options.sourceType==="module"?ge+s:s;this.scope.var(n,t[s])}}parse(t,r){return typeof r=="function"?r(t,N({},this.options)):ha(t,this.options)}run(t){const r=typeof t=="string"?this.parse(t):t,i=this.scope;this.options.sourceType==="module"&&(this.options.ecmaVersion==="latest"||this.options.ecmaVersion>=13)?Ct(function*(){yield*Vt(r,i),yield*d(r,i)}()):(Lt(r,i),y(r,i))}};Rt.version=fa.version;let Nt=Rt;return Nt});
9
+ `;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return te(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),e){var r=this.pos-1;this.invalidStringToken(r,"Invalid escape sequence in template string")}default:if(t>=48&&t<=55){var i=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],a=parseInt(i,8);return a>255&&(i=i.slice(0,-1),a=parseInt(i,8)),this.pos+=i.length-1,t=this.input.charCodeAt(this.pos),(i!=="0"||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-i.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(a)}return we(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(t)}},b.readHexChar=function(e){var t=this.pos,r=this.readInt(16,e);return r===null&&this.invalidStringToken(t,"Bad character escape sequence"),r},b.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,r=this.pos,i=this.options.ecmaVersion>=6;this.pos<this.input.length;){var a=this.fullCharCodeAtPos();if(Se(a,i))this.pos+=a<=65535?1:2;else if(a===92){this.containsEsc=!0,e+=this.input.slice(r,this.pos);var s=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var n=this.readCodePoint();(t?ee:Se)(n,i)||this.invalidStringToken(s,"Invalid Unicode escape"),e+=te(n),r=this.pos}else break;t=!1}return e+this.input.slice(r,this.pos)},b.readWord=function(){var e=this.readWord1(),t=o.name;return this.keywords.test(e)&&(t=dt[e]),this.finishToken(t,e)};var ca="8.14.1";V.acorn={Parser:V,version:ca,defaultOptions:yt,Position:Re,SourceLocation:Qe,getLineInfo:Xt,Node:it,TokenType:k,tokTypes:o,keywordTypes:dt,TokContext:Q,tokContexts:A,isIdentifierChar:Se,isIdentifierStart:ee,Token:Et,isNewLine:we,lineBreak:W,lineBreakG:Tr,nonASCIIwhitespace:Gt};function ha(e,t){return V.parse(e,t)}const me={RES:void 0},E={RES:void 0},_={LABEL:void 0},I={LABEL:void 0},st=R("super"),he=R("supercall"),nt=R("noctor"),_e=R("clsctor"),ot=R("newtarget"),T=R("private"),O=R("noinit"),F=R("deadzone"),ge=R("import"),U=R("exports");class ut{constructor(t,r){this.kind=t,this.value=r}get(){return this.value}set(t){if(this.kind==="const")throw new TypeError("Assignment to constant variable");return this.value=t}}class fe{constructor(t,r){this.object=t,this.property=r}get(){return this.object[this.property]}set(t){return this.object[this.property]=t,!0}del(){return delete this.object[this.property]}}class P{constructor(t=null,r=!1){this.context=ve(null),this.withContext=ve(null),this.parent=t,this.isolated=r}global(){let t=this;for(;t.parent;)t=t.parent;return t}find(t){if(this.context[t])return this.context[t];if(t in this.withContext)return new fe(this.withContext,t);if(this.parent)return this.parent.find(t);{const r=this.global().find("window").get();return t in r?new fe(r,t):null}}var(t,r){let i=this;for(;i.parent&&!i.isolated;)i=i.parent;const a=i.context[t];if(!a)i.context[t]=new ut("var",r===O?void 0:r);else if(a.kind==="var")r!==O&&a.set(r);else throw new SyntaxError(`Identifier '${t}' has already been declared`);if(!i.parent){const s=i.find("window").get();r!==O&&w(s,t,{value:r,writable:!0,enumerable:!0})}}let(t,r){const i=this.context[t];if(!i||i.get()===F)this.context[t]=new ut("let",r);else throw new SyntaxError(`Identifier '${t}' has already been declared`)}const(t,r){const i=this.context[t];if(!i||i.get()===F)this.context[t]=new ut("const",r);else throw new SyntaxError(`Identifier '${t}' has already been declared`)}func(t,r){const i=this.context[t];if(!i||i.kind==="var")this.context[t]=new ut("var",r);else throw new SyntaxError(`Identifier '${t}' has already been declared`)}with(t){Object.keys(t)&&(this.withContext=t)}}const fa={version:"0.6.7"};function Ct(e,t={}){const{res:r,err:i,ret:a,fullRet:s}=t;return new Promise((n,u)=>{if("ret"in t)return n(e.return(a));"err"in t?c(i):l(r);function l(p){let S;try{S=e.next(p)}catch(C){return u(C)}return h(S),null}function c(p){let S;try{S=e.throw(p)}catch(C){return u(C)}h(S)}function h(p){if(p.done)return n(s?p:p.value);if(p.value!==me)return n(p);const S=p.value.RES;return(S&&S.then==="function"?S:Promise.resolve(S)).then(l,c)}})}function*Ie(e,t,r={}){const{getVar:i=!1,throwErr:a=!0}=r;if(e.name==="undefined")return;const s=t.find(e.name);if(s){if(i)return s;{const n=s.get();if(n===F)throw new ReferenceError(`${e.name} is not defined`);return n}}else{if(a)throw new ReferenceError(`${e.name} is not defined`);return}}const pa=Object.freeze(Object.defineProperty({__proto__:null,Identifier:Ie},Symbol.toStringTag,{value:"Module"}));function*Pi(e,t){return e.value}const da=Object.freeze(Object.defineProperty({__proto__:null,Literal:Pi},Symbol.toStringTag,{value:"Module"}));function*ya(e,t){const r=t.find(he);if(r&&r.get()!==!0)throw new ReferenceError("Must call super constructor in derived class before accessing 'this' or returning from derived constructor");return t.find("this").get()}function*ma(e,t){let r=[];for(let i=0;i<e.elements.length;i++){const a=e.elements[i];a.type==="SpreadElement"?r=r.concat(yield*je(a,t)):r.push(yield*d(a,t))}return r}function*ga(e,t){const r={};for(let i=0;i<e.properties.length;i++){const a=e.properties[i];if(a.type==="SpreadElement")N(r,yield*je(a,t,{spreadProps:!0}));else{let s;const n=a.key;a.computed?s=yield*d(n,t):n.type==="Identifier"?s=n.name:s=""+(yield*Pi(n));const u=yield*d(a.value,t),l=a.kind;if(l==="init")r[s]=u;else if(l==="get"){const c=ue(r,s);w(r,s,{get:u,set:c&&c.set,enumerable:!0,configurable:!0})}else{const c=ue(r,s);w(r,s,{get:c&&c.get,set:u,enumerable:!0,configurable:!0})}}}return r}function*xa(e,t){if(e.id&&e.id.name){const r=new P(t),i=J(e,r);return r.const(e.id.name,i),i}else return J(e,t)}function*ba(e,t){const r=e.argument;switch(e.operator){case"+":return+(yield*d(r,t));case"-":return-(yield*d(r,t));case"!":return!(yield*d(r,t));case"~":return~(yield*d(r,t));case"void":return void(yield*d(r,t));case"typeof":return r.type==="Identifier"?typeof(yield*Ie(r,t,{throwErr:!1})):typeof(yield*d(r,t));case"delete":if(r.type==="MemberExpression")return(yield*Me(r,t,{getVar:!0})).del();if(r.type==="Identifier")throw new SyntaxError("Delete of an unqualified identifier in strict mode");return yield*d(r,t),!0;default:throw new SyntaxError(`Unexpected token ${e.operator}`)}}function*va(e,t){const r=e.argument;let i;if(r.type==="Identifier")i=yield*Ie(r,t,{getVar:!0});else if(r.type==="MemberExpression")i=yield*Me(r,t,{getVar:!0});else throw new SyntaxError("Unexpected token");const a=i.get();if(e.operator==="++")return i.set(a+1),e.prefix?i.get():a;if(e.operator==="--")return i.set(a-1),e.prefix?i.get():a;throw new SyntaxError(`Unexpected token ${e.operator}`)}function*Sa(e,t){let r,i;switch(e.left.type==="PrivateIdentifier"?(r=e.left.name,i=yield*d(e.right,t),i=i[T]||{}):(r=yield*d(e.left,t),i=yield*d(e.right,t)),e.operator){case"==":return r==i;case"!=":return r!=i;case"===":return r===i;case"!==":return r!==i;case"<":return r<i;case"<=":return r<=i;case">":return r>i;case">=":return r>=i;case"<<":return r<<i;case">>":return r>>i;case">>>":return r>>>i;case"+":return r+i;case"-":return r-i;case"*":return r*i;case"**":return r**i;case"/":return r/i;case"%":return r%i;case"|":return r|i;case"^":return r^i;case"&":return r&i;case"in":return r in i;case"instanceof":return r instanceof i;default:throw new SyntaxError(`Unexpected token ${e.operator}`)}}function*wa(e,t){const r=e.left;let i;if(r.type==="Identifier"){if(i=yield*Ie(r,t,{getVar:!0,throwErr:!1}),!i){const s=t.global().find("window").get();i=new fe(s,r.name)}}else if(r.type==="MemberExpression")i=yield*Me(r,t,{getVar:!0});else{const s=yield*d(e.right,t);return yield*j(r,t,{feed:s})}const a=yield*d(e.right,t);switch(e.operator){case"=":return i.set(a),i.get();case"+=":return i.set(i.get()+a),i.get();case"-=":return i.set(i.get()-a),i.get();case"*=":return i.set(i.get()*a),i.get();case"/=":return i.set(i.get()/a),i.get();case"%=":return i.set(i.get()%a),i.get();case"**=":return i.set(i.get()**a),i.get();case"<<=":return i.set(i.get()<<a),i.get();case">>=":return i.set(i.get()>>a),i.get();case">>>=":return i.set(i.get()>>>a),i.get();case"|=":return i.set(i.get()|a),i.get();case"^=":return i.set(i.get()^a),i.get();case"&=":return i.set(i.get()&a),i.get();case"??=":return i.set(i.get()??a),i.get();case"&&=":return i.set(i.get()&&a),i.get();case"||=":return i.set(i.get()||a),i.get();default:throw new SyntaxError(`Unexpected token ${e.operator}`)}}function*ka(e,t){switch(e.operator){case"||":return(yield*d(e.left,t))||(yield*d(e.right,t));case"&&":return(yield*d(e.left,t))&&(yield*d(e.right,t));case"??":return(yield*d(e.left,t))??(yield*d(e.right,t));default:throw new SyntaxError(`Unexpected token ${e.operator}`)}}function*Me(e,t,r={}){const{getObj:i=!1,getVar:a=!1}=r;let s;if(e.object.type==="Super"?s=yield*Vi(e.object,t,{getProto:!0}):s=yield*d(e.object,t),i)return s;let n,u=!1;if(e.computed?n=yield*d(e.property,t):e.property.type==="PrivateIdentifier"?(n=e.property.name,u=!0):n=e.property.name,u&&(s=s[T]),a){const l=jt(s,n);if(e.object.type==="Super"&&l){const c=t.find("this").get(),h=R(n);return w(c,h,{set:l}),new fe(c,h)}else return new fe(s,n)}else{const l=Mt(s,n);if(e.object.type==="Super"&&l){const c=t.find("this").get();return e.optional&&c==null?void 0:l.call(c)}else return e.optional&&s==null?void 0:s[n]}}function*Ea(e,t){return(yield*d(e.test,t))?yield*d(e.consequent,t):yield*d(e.alternate,t)}function*Ca(e,t){let r,i;if(e.callee.type==="MemberExpression"){if(i=yield*Me(e.callee,t,{getObj:!0}),e.callee.optional&&i==null)return;let s,n=!1;e.callee.computed?s=yield*d(e.callee.property,t):e.callee.property.type==="PrivateIdentifier"?(s=e.callee.property.name,n=!0):s=e.callee.property.name;let u=i;if(n&&(u=u[T]),e.callee.object.type==="Super"){const l=t.find("this").get();r=u[s].bind(l)}else r=u[s];if(e.optional&&r==null)return;if(typeof r!="function")throw new TypeError(`${s} is not a function`);if(_e in r)throw new TypeError(`Class constructor ${s} cannot be invoked without 'new'`)}else{if(i=t.find("this").get(),r=yield*d(e.callee,t),e.optional&&r==null)return;if(typeof r!="function"||e.callee.type!=="Super"&&_e in r){let s;if(e.callee.type==="Identifier")s=e.callee.name;else try{s=JSON.stringify(r)}catch{s=""+r}throw typeof r!="function"?new TypeError(`${s} is not a function`):new TypeError(`Class constructor ${s} cannot be invoked without 'new'`)}}let a=[];for(let s=0;s<e.arguments.length;s++){const n=e.arguments[s];n.type==="SpreadElement"?a=a.concat(yield*je(n,t)):a.push(yield*d(n,t))}if(e.callee.type==="Super"){const n=t.find(he).get();if(n===!0)throw new ReferenceError("Super constructor may only be called once");const u=Ge(i,r,a);return yield*n(u),t.find("this").set(u),t.find(he).set(!0),u}try{return r.apply(i,a)}catch(s){if(s instanceof TypeError&&s.message==="Illegal invocation"&&r.toString().indexOf("[native code]")!==-1){const n=t.global().find("window").get();if(n&&n[Ne])return r.apply(n[Ne],a)}throw s}}function*_a(e,t){const r=yield*d(e.callee,t);if(typeof r!="function"){let a;if(e.callee.type==="Identifier")a=e.callee.name;else try{a=JSON.stringify(r)}catch{a=""+r}throw new TypeError(`${a} is not a constructor`)}else if(r[nt])throw new TypeError(`${r.name||"(intermediate value)"} is not a constructor`);let i=[];for(let a=0;a<e.arguments.length;a++){const s=e.arguments[a];s.type==="SpreadElement"?i=i.concat(yield*je(s,t)):i.push(yield*d(s,t))}return new r(...i)}function*Ia(e,t){if(e.meta.name==="new"&&e.property.name==="target")return t.find(ot).get();if(e.meta.name==="import"&&e.property.name==="meta")return{url:""}}function*Aa(e,t){let r;for(let i=0;i<e.expressions.length;i++)r=yield*d(e.expressions[i],t);return r}function*Pa(e,t){return J(e,t)}function*La(e,t){const r=e.quasis.slice(),i=e.expressions.slice();let a="",s,n;for(;s=r.shift();)a+=yield*Li(s),n=i.shift(),n&&(a+=yield*d(n,t));return a}function*Va(e,t){const r=yield*d(e.tag,t),i=e.quasi.quasis,a=i.map(l=>l.value.cooked),s=i.map(l=>l.value.raw);w(a,"raw",{value:ze(s)});const n=e.quasi.expressions,u=[];if(n)for(let l=0;l<n.length;l++)u.push(yield*d(n[l],t));return r(ze(a),...u)}function*Li(e,t){return e.value.raw}function*Ta(e,t){if(e.id&&e.id.name){const r=new P(t),i=yield*We(e,r);return r.const(e.id.name,i),i}else return yield*We(e,t)}function*Vi(e,t,r={}){const{getProto:i=!1}=r,a=t.find(st).get();return i?a.prototype:a}function*je(e,t,r={}){const i=yield*d(e.argument,t);if(r.spreadProps)return i;if(typeof Symbol=="function"&&typeof i[Symbol.iterator]!="function")throw new TypeError("Spread syntax requires ...iterable[Symbol.iterator] to be a function");return[...i]}function*Na(e,t){return yield*d(e.expression,t)}function*Ra(e,t){const r=t.global(),i=yield*d(e.source,t),a=r.find(ge+i);let s;if(a){const n=a.get();n&&(typeof n=="function"?s=n():typeof n=="object"&&(s=n))}return!s||typeof s!="object"?Promise.reject(new TypeError(`Failed to resolve module specifier "${i}"`)):Promise.resolve(s)}function*Ba(e,t){const r=yield*d(e.argument,t);return e.delegate?yield*r:yield r}function*Oa(e,t){return me.RES=yield*d(e.argument,t),yield me}const Da=Object.freeze(Object.defineProperty({__proto__:null,ArrayExpression:ma,ArrowFunctionExpression:Pa,AssignmentExpression:wa,AwaitExpression:Oa,BinaryExpression:Sa,CallExpression:Ca,ChainExpression:Na,ClassExpression:Ta,ConditionalExpression:Ea,FunctionExpression:xa,ImportExpression:Ra,LogicalExpression:ka,MemberExpression:Me,MetaProperty:Ia,NewExpression:_a,ObjectExpression:ga,SequenceExpression:Aa,SpreadElement:je,Super:Vi,TaggedTemplateExpression:Va,TemplateElement:Li,TemplateLiteral:La,ThisExpression:ya,UnaryExpression:ba,UpdateExpression:va,YieldExpression:Ba},Symbol.toStringTag,{value:"Module"}));function*Ti(e,t,r={}){const{kind:i="var",hoist:a=!1,onlyBlock:s=!1,feed:n={}}=r,u=[];for(let l=0;l<e.properties.length;l++){const c=e.properties[l];if(a){if(s||i==="var")if(c.type==="Property"){const h=c.value;h.type==="Identifier"?t[i](h.name,s?F:i==="var"?O:void 0):yield*j(h,t,{kind:i,hoist:a,onlyBlock:s})}else yield*Ae(c,t,{kind:i,hoist:a,onlyBlock:s})}else if(c.type==="Property"){let h;c.computed?h=yield*d(c.key,t):h=c.key.name,u.push(h);const p=c.value;p.type==="Identifier"?t[i](p.name,n[h]):yield*j(p,t,{kind:i,feed:n[h]})}else{const h=N({},n);for(let p=0;p<u.length;p++)delete h[u[p]];yield*Ae(c,t,{kind:i,feed:h})}}}function*Ni(e,t,r={}){const{kind:i,hoist:a=!1,onlyBlock:s=!1,feed:n=[]}=r,u=[];for(let l=0;l<e.elements.length;l++){const c=e.elements[l];if(c)if(a)(s||i==="var")&&(c.type==="Identifier"?t[i](c.name,s?F:i==="var"?O:void 0):yield*j(c,t,{kind:i,hoist:a,onlyBlock:s}));else if(c.type==="Identifier")if(i)t[i](c.name,n[l]);else{const h=yield*Ie(c,t,{getVar:!0});h.set(n[l]),u.push(h.get())}else c.type==="RestElement"?yield*Ae(c,t,{kind:i,feed:n.slice(l)}):yield*j(c,t,{kind:i,feed:n[l]})}if(u.length)return u}function*Ae(e,t,r={}){const{kind:i,hoist:a=!1,onlyBlock:s=!1,feed:n=[]}=r,u=e.argument;a?(s||i==="var")&&(u.type==="Identifier"?t[i](u.name,s?F:i==="var"?O:void 0):yield*j(u,t,{kind:i,hoist:a,onlyBlock:s})):u.type==="Identifier"?i?t[i](u.name,n):(yield*Ie(u,t,{getVar:!0})).set(n):yield*j(u,t,{kind:i,feed:n})}function*Ri(e,t,r={}){const{kind:i="var",hoist:a=!1,onlyBlock:s=!1,feed:n=yield*d(e.right,t)}=r,u=e.left;a?(s||i==="var")&&(u.type==="Identifier"?t[i](u.name,s?F:i==="var"?O:void 0):yield*j(u,t,{kind:i,hoist:a,onlyBlock:s})):u.type==="Identifier"?t[i](u.name,n):yield*j(u,t,{kind:i,feed:n})}const Fa=Object.freeze(Object.defineProperty({__proto__:null,ArrayPattern:Ni,AssignmentPattern:Ri,ObjectPattern:Ti,RestElement:Ae},Symbol.toStringTag,{value:"Module"}));function*Ma(e,t){for(let r=0;r<e.body.length;r++)yield*d(e.body[r],t)}const ja=Object.freeze(Object.defineProperty({__proto__:null,Program:Ma},Symbol.toStringTag,{value:"Module"}));let _t;function*d(e,t){if(!e)return;_t||(_t=N({},Te,Da,pa,Ve,da,Fa,ja));const r=_t[e.type];if(r)return yield*r(e,t);throw new Error(`${e.type} isn't implemented`)}function*Ua(e,t){yield*d(e.expression,t)}function*ae(e,t,r={}){const{invasived:i=!1,hoisted:a=!1}=r,s=i?t:new P(t);a||(yield*Vt(e,s,{onlyBlock:!0}));for(let n=0;n<e.body.length;n++){const u=yield*d(e.body[n],s);if(u===I){if(u.LABEL&&u.LABEL===r.label)break;return u}if(u===_||u===E)return u}}function*$a(){}function*qa(){debugger}function*Wa(e,t){return E.RES=e.argument?yield*d(e.argument,t):void 0,E}function*za(e){var t;return I.LABEL=(t=e.label)==null?void 0:t.name,I}function*Ga(e){var t;return _.LABEL=(t=e.label)==null?void 0:t.name,_}function*Ha(e,t){const r=e.label.name;if(e.body.type==="WhileStatement")return yield*Ui(e.body,t,{label:r});if(e.body.type==="DoWhileStatement")return yield*$i(e.body,t,{label:r});if(e.body.type==="ForStatement")return yield*qi(e.body,t,{label:r});if(e.body.type==="ForInStatement")return yield*Wi(e.body,t,{label:r});if(e.body.type==="ForOfStatement")return yield*zi(e.body,t,{label:r});if(e.body.type==="BlockStatement")return yield*ae(e.body,t,{label:r});if(e.body.type==="WithStatement")return yield*Bi(e.body,t,{label:r});if(e.body.type==="IfStatement")return yield*Oi(e.body,t,{label:r});if(e.body.type==="SwitchStatement")return yield*Di(e.body,t,{label:r});if(e.body.type==="TryStatement")return yield*Mi(e.body,t,{label:r});throw new SyntaxError(`${e.body.type} cannot be labeled`)}function*Bi(e,t,r={}){const i=new P(t);i.with(yield*d(e.object,t));const a=yield*d(e.body,i);if(a===I)return a.LABEL&&a.LABEL===r.label?void 0:a;if(a===_||a===E)return a}function*Oi(e,t,r={}){let i;if((yield*d(e.test,t))?i=yield*d(e.consequent,t):i=yield*d(e.alternate,t),i===I)return i.LABEL&&i.LABEL===r.label?void 0:i;if(i===_||i===E)return i}function*Di(e,t,r={}){const i=yield*d(e.discriminant,t);let a=!1;for(let s=0;s<e.cases.length;s++){const n=e.cases[s];if(!a&&(!n.test||(yield*d(n.test,t))===i)&&(a=!0),a){const u=yield*Fi(n,t);if(u===I){if(u.LABEL===r.label)break;return u}if(u===_||u===E)return u}}}function*Fi(e,t){for(let r=0;r<e.consequent.length;r++){const i=yield*d(e.consequent[r],t);if(i===I||i===_||i===E)return i}}function*Ka(e,t){throw yield*d(e.argument,t)}function*Mi(e,t,r={}){let i;try{i=yield*ae(e.block,t)}catch(a){if(e.handler){const s=new P(t),n=e.handler.param;if(n)if(n.type==="Identifier"){const u=n.name;s.var(u,a)}else yield*j(n,t,{feed:a});i=yield*ji(e.handler,s)}else throw a}finally{e.finalizer&&(i=yield*ae(e.finalizer,t))}if(i===I)return i.LABEL&&i.LABEL===r.label?void 0:i;if(i===_||i===E)return i}function*ji(e,t){return yield*ae(e.body,t,{invasived:!0})}function*Ui(e,t,r={}){for(;yield*d(e.test,t);){const i=yield*d(e.body,t);if(i===I){if(i.LABEL===r.label)break;return i}else if(i===_){if(i.LABEL===r.label)continue;return i}else if(i===E)return i}}function*$i(e,t,r={}){do{const i=yield*d(e.body,t);if(i===I){if(i.LABEL===r.label)break;return i}else if(i===_){if(i.LABEL===r.label)continue;return i}else if(i===E)return i}while(yield*d(e.test,t))}function*qi(e,t,r={}){const i=new P(t);for(yield*d(e.init,i);!e.test||(yield*d(e.test,i));yield*d(e.update,i)){const a=new P(i);let s;if(e.body.type==="BlockStatement"?s=yield*ae(e.body,a,{invasived:!0}):s=yield*d(e.body,a),s===I){if(s.LABEL===r.label)break;return s}else if(s===_){if(s.LABEL===r.label)continue;return s}else if(s===E)return s}}function*Wi(e,t,r={}){for(const i in yield*d(e.right,t)){const a=yield*Tt(e,t,{value:i});if(a===I){if(a.LABEL===r.label)break;return a}else if(a===_){if(a.LABEL===r.label)continue;return a}else if(a===E)return a}}function*zi(e,t,r={}){const i=yield*d(e.right,t);if(e.await){const a=Cr(i);let s;for(me.RES=a.next(),s=yield me;!s.done;me.RES=a.next(),s=yield me){const n=yield*Tt(e,t,{value:s.value});if(n===I){if(n.LABEL===r.label)break;return n}else if(n===_){if(n.LABEL===r.label)continue;return n}else if(n===E)return n}}else for(const a of i){const s=yield*Tt(e,t,{value:a});if(s===I){if(s.LABEL===r.label)break;return s}else if(s===_){if(s.LABEL===r.label)continue;return s}else if(s===E)return s}}function*Qa(e,t){t.func(e.id.name,J(e,t))}function*xe(e,t,r={}){for(let i=0;i<e.declarations.length;i++)yield*Gi(e.declarations[i],t,N({kind:e.kind},r))}function*Gi(e,t,r={}){const{kind:i="var",hoist:a=!1,onlyBlock:s=!1,feed:n}=r;if(a)(s||i==="var")&&(e.id.type==="Identifier"?t[i](e.id.name,s?F:i==="var"?O:void 0):yield*j(e.id,t,{kind:i,hoist:a,onlyBlock:s}));else{const u="feed"in r,l=u?n:yield*d(e.init,t);if(e.id.type==="Identifier"){const c=e.id.name;i==="var"&&!e.init&&!u?t.var(c,O):t[i](c,l),e.init&&["ClassExpression","FunctionExpression","ArrowFunctionExpression"].indexOf(e.init.type)!==-1&&!l.name&&w(l,"name",{value:c,configurable:!0})}else yield*j(e.id,t,{kind:i,feed:l})}}function*Xa(e,t){t.func(e.id.name,yield*We(e,t))}function*Hi(e,t,r={}){const{klass:i,superClass:a}=r;for(let s=0;s<e.body.length;s++){const n=e.body[s];n.type==="MethodDefinition"?yield*Ki(n,t,{klass:i,superClass:a}):n.type==="PropertyDefinition"&&n.static?yield*It(n,t,{klass:i,superClass:a}):n.type==="StaticBlock"&&(yield*Qi(n,t,{klass:i}))}}function*Ki(e,t,r={}){const{klass:i,superClass:a}=r;let s,n=!1;if(e.computed)s=yield*d(e.key,t);else if(e.key.type==="Identifier")s=e.key.name;else if(e.key.type==="PrivateIdentifier")s=e.key.name,n=!0;else throw new SyntaxError("Unexpected token");let u=e.static?i:i.prototype;n&&(u[T]||w(u,T,{value:{}}),u=u[T]);const l=J(e.value,t,{superClass:a});switch(e.kind){case"constructor":break;case"method":w(u,s,{value:l,writable:!0,configurable:!0});break;case"get":{const c=ue(u,s);w(u,s,{get:l,set:c&&c.set,configurable:!0});break}case"set":{const c=ue(u,s);w(u,s,{get:c&&c.get,set:l,configurable:!0});break}default:throw new SyntaxError("Unexpected token")}}function*It(e,t,r={}){const{klass:i,superClass:a}=r;let s,n=!1;if(e.computed)s=yield*d(e.key,t);else if(e.key.type==="Identifier")s=e.key.name;else if(e.key.type==="PrivateIdentifier")s=e.key.name,n=!0;else throw new SyntaxError("Unexpected token");const u=new P(t,!0);u.const("this",i);let l=i;n&&(l[T]||w(l,T,{value:{}}),l=l[T]),e.value?e.value.type==="FunctionExpression"||e.value.type==="ArrowFunctionExpression"?l[s]=J(e.value,u,{superClass:a}):l[s]=yield*d(e.value,u):l[s]=void 0}function*Qi(e,t,r={}){const{klass:i}=r,a=new P(t,!0);return a.const("this",i),yield*ae(e,a,{invasived:!0})}function*Ya(e,t){const i=t.global().find(ge+e.source.value);let a;if(i){const s=i.get();s&&(typeof s=="function"?a=s():typeof s=="object"&&(a=s))}if(!a||typeof a!="object")throw new TypeError(`Failed to resolve module specifier "${e.source.value}"`);for(let s=0;s<e.specifiers.length;s++){const n=e.specifiers[s];let u;if(n.type==="ImportSpecifier"?u=n.imported.type==="Identifier"?n.imported.name:n.imported.value:n.type==="ImportDefaultSpecifier"?u="default":n.type==="ImportNamespaceSpecifier"&&(u="*"),u!=="*"&&!lt(a,u))throw new SyntaxError(`The requested module "${e.source.value}" does not provide an export named "${u}"`);t.var(n.local.name,u==="*"?N({},a):a[u])}}function*Za(e,t){const r=t.global();let i;e.declaration.type==="FunctionDeclaration"?(i=J(e.declaration,t),t.func(e.declaration.id.name,i)):e.declaration.type==="ClassDeclaration"?(i=yield*We(e.declaration,t),t.func(e.declaration.id.name,i)):i=yield*d(e.declaration,t);const a=r.find(U);if(a){const s=a.get();s&&typeof s=="object"&&(s.default=i)}}function*Ja(e,t){const r=t.global();if(e.declaration){if(e.declaration.type==="FunctionDeclaration"){const i=J(e.declaration,t);t.func(e.declaration.id.name,i);const a=r.find(U);if(a){const s=a.get();s&&typeof s=="object"&&(s[e.declaration.id.name]=i)}}else if(e.declaration.type==="ClassDeclaration"){const i=yield*We(e.declaration,t);t.func(e.declaration.id.name,i);const a=r.find(U);if(a){const s=a.get();s&&typeof s=="object"&&(s[e.declaration.id.name]=i)}}else if(e.declaration.type==="VariableDeclaration"){yield*xe(e.declaration,t);const i=r.find(U);if(i){const a=i.get();if(a&&typeof a=="object")for(let s=0;s<e.declaration.declarations.length;s++){const n=e.declaration.declarations[s].id.name,u=t.find(n);u&&(a[n]=u.get())}}}}else if(e.specifiers){const i=r.find(U);if(i){const a=i.get();if(a&&typeof a=="object")for(let s=0;s<e.specifiers.length;s++){const n=e.specifiers[s],u=n.local.type==="Identifier"?n.local.name:n.local.value,l=t.find(u);l&&(a[n.exported.type==="Identifier"?n.exported.name:n.exported.value]=l.get())}}}}function*es(e,t){const r=t.global(),i=r.find(ge+e.source.value);let a;if(i){const n=i.get();n&&(typeof n=="function"?a=n():typeof n=="object"&&(a=n))}if(!a||typeof a!="object")throw new TypeError(`Failed to resolve module specifier "${e.source.value}"`);const s=r.find(U);if(s){const n=s.get();n&&typeof n=="object"&&N(n,a)}}function pe(e,t,r={}){const{getVar:i=!1,throwErr:a=!0}=r;if(e.name==="undefined")return;const s=t.find(e.name);if(s){if(i)return s;{const n=s.get();if(n===F)throw new ReferenceError(`${e.name} is not defined`);return n}}else{if(a)throw new ReferenceError(`${e.name} is not defined`);return}}const ts=Object.freeze(Object.defineProperty({__proto__:null,Identifier:pe},Symbol.toStringTag,{value:"Module"}));function Xi(e,t){return e.value}const is=Object.freeze(Object.defineProperty({__proto__:null,Literal:Xi},Symbol.toStringTag,{value:"Module"}));function rs(e,t){const r=t.find(he);if(r&&r.get()!==!0)throw new ReferenceError("Must call super constructor in derived class before accessing 'this' or returning from derived constructor");return t.find("this").get()}function as(e,t){let r=[];for(let i=0;i<e.elements.length;i++){const a=e.elements[i];a.type==="SpreadElement"?r=r.concat($e(a,t)):r.push(y(a,t))}return r}function ss(e,t){const r={};for(let i=0;i<e.properties.length;i++){const a=e.properties[i];if(a.type==="SpreadElement")N(r,$e(a,t,{spreadProps:!0}));else{let s;const n=a.key;a.computed?s=y(n,t):n.type==="Identifier"?s=n.name:s=""+Xi(n);const u=y(a.value,t),l=a.kind;if(l==="init")r[s]=u;else if(l==="get"){const c=ue(r,s);w(r,s,{get:u,set:c&&c.set,enumerable:!0,configurable:!0})}else{const c=ue(r,s);w(r,s,{get:c&&c.get,set:u,enumerable:!0,configurable:!0})}}}return r}function ns(e,t){if(e.id&&e.id.name){const r=new P(t),i=Z(e,r);return r.const(e.id.name,i),i}else return Z(e,t)}function os(e,t){const r=e.argument;switch(e.operator){case"+":return+y(r,t);case"-":return-y(r,t);case"!":return!y(r,t);case"~":return~y(r,t);case"void":return void y(r,t);case"typeof":return r.type==="Identifier"?typeof pe(r,t,{throwErr:!1}):typeof y(r,t);case"delete":if(r.type==="MemberExpression")return Ue(r,t,{getVar:!0}).del();if(r.type==="Identifier")throw new SyntaxError("Delete of an unqualified identifier in strict mode");return y(r,t),!0;default:throw new SyntaxError(`Unexpected token ${e.operator}`)}}function us(e,t){const r=e.argument;let i;if(r.type==="Identifier")i=pe(r,t,{getVar:!0});else if(r.type==="MemberExpression")i=Ue(r,t,{getVar:!0});else throw new SyntaxError("Unexpected token");const a=i.get();if(e.operator==="++")return i.set(a+1),e.prefix?i.get():a;if(e.operator==="--")return i.set(a-1),e.prefix?i.get():a;throw new SyntaxError(`Unexpected token ${e.operator}`)}function ls(e,t){let r,i;switch(e.left.type==="PrivateIdentifier"?(r=e.left.name,i=y(e.right,t),i=i[T]||{}):(r=y(e.left,t),i=y(e.right,t)),e.operator){case"==":return r==i;case"!=":return r!=i;case"===":return r===i;case"!==":return r!==i;case"<":return r<i;case"<=":return r<=i;case">":return r>i;case">=":return r>=i;case"<<":return r<<i;case">>":return r>>i;case">>>":return r>>>i;case"+":return r+i;case"-":return r-i;case"*":return r*i;case"**":return r**i;case"/":return r/i;case"%":return r%i;case"|":return r|i;case"^":return r^i;case"&":return r&i;case"in":return r in i;case"instanceof":return r instanceof i;default:throw new SyntaxError(`Unexpected token ${e.operator}`)}}function cs(e,t){const r=e.left;let i;if(r.type==="Identifier"){if(i=pe(r,t,{getVar:!0,throwErr:!1}),!i){const s=t.global().find("window").get();i=new fe(s,r.name)}}else if(r.type==="MemberExpression")i=Ue(r,t,{getVar:!0});else{const s=y(e.right,t);return M(r,t,{feed:s})}const a=y(e.right,t);switch(e.operator){case"=":return i.set(a),i.get();case"+=":return i.set(i.get()+a),i.get();case"-=":return i.set(i.get()-a),i.get();case"*=":return i.set(i.get()*a),i.get();case"/=":return i.set(i.get()/a),i.get();case"%=":return i.set(i.get()%a),i.get();case"**=":return i.set(i.get()**a),i.get();case"<<=":return i.set(i.get()<<a),i.get();case">>=":return i.set(i.get()>>a),i.get();case">>>=":return i.set(i.get()>>>a),i.get();case"|=":return i.set(i.get()|a),i.get();case"^=":return i.set(i.get()^a),i.get();case"&=":return i.set(i.get()&a),i.get();case"??=":return i.set(i.get()??a),i.get();case"&&=":return i.set(i.get()&&a),i.get();case"||=":return i.set(i.get()||a),i.get();default:throw new SyntaxError(`Unexpected token ${e.operator}`)}}function hs(e,t){switch(e.operator){case"||":return y(e.left,t)||y(e.right,t);case"&&":return y(e.left,t)&&y(e.right,t);case"??":return y(e.left,t)??y(e.right,t);default:throw new SyntaxError(`Unexpected token ${e.operator}`)}}function Ue(e,t,r={}){const{getObj:i=!1,getVar:a=!1}=r;let s;if(e.object.type==="Super"?s=Zi(e.object,t,{getProto:!0}):s=y(e.object,t),i)return s;let n,u=!1;if(e.computed?n=y(e.property,t):e.property.type==="PrivateIdentifier"?(n=e.property.name,u=!0):n=e.property.name,u&&(s=s[T]),a){const l=jt(s,n);if(e.object.type==="Super"&&l){const c=t.find("this").get(),h=R(n);return w(c,h,{set:l}),new fe(c,h)}else return new fe(s,n)}else{const l=Mt(s,n);if(e.object.type==="Super"&&l){const c=t.find("this").get();return e.optional&&c==null?void 0:l.call(c)}else return e.optional&&s==null?void 0:s[n]}}function fs(e,t){return y(e.test,t)?y(e.consequent,t):y(e.alternate,t)}function ps(e,t){let r,i;if(e.callee.type==="MemberExpression"){if(i=Ue(e.callee,t,{getObj:!0}),e.callee.optional&&i==null)return;let s,n=!1;e.callee.computed?s=y(e.callee.property,t):e.callee.property.type==="PrivateIdentifier"?(s=e.callee.property.name,n=!0):s=e.callee.property.name;let u=i;if(n&&(u=u[T]),e.callee.object.type==="Super"){const l=t.find("this").get();r=u[s].bind(l)}else r=u[s];if(e.optional&&r==null)return;if(typeof r!="function")throw new TypeError(`${s} is not a function`);if(_e in r)throw new TypeError(`Class constructor ${s} cannot be invoked without 'new'`)}else{if(i=t.find("this").get(),r=y(e.callee,t),e.optional&&r==null)return;if(typeof r!="function"||e.callee.type!=="Super"&&_e in r){let s;if(e.callee.type==="Identifier")s=e.callee.name;else try{s=JSON.stringify(r)}catch{s=""+r}throw typeof r!="function"?new TypeError(`${s} is not a function`):new TypeError(`Class constructor ${s} cannot be invoked without 'new'`)}}let a=[];for(let s=0;s<e.arguments.length;s++){const n=e.arguments[s];n.type==="SpreadElement"?a=a.concat($e(n,t)):a.push(y(n,t))}if(e.callee.type==="Super"){const n=t.find(he).get();if(n===!0)throw new ReferenceError("Super constructor may only be called once");const u=Ge(i,r,a);return n(u),t.find("this").set(u),t.find(he).set(!0),u}try{return r.apply(i,a)}catch(s){if(s instanceof TypeError&&s.message==="Illegal invocation"&&r.toString().indexOf("[native code]")!==-1){const n=t.global().find("window").get();if(n&&n[Ne])return r.apply(n[Ne],a)}throw s}}function ds(e,t){const r=y(e.callee,t);if(typeof r!="function"){let a;if(e.callee.type==="Identifier")a=e.callee.name;else try{a=JSON.stringify(r)}catch{a=""+r}throw new TypeError(`${a} is not a constructor`)}else if(r[nt])throw new TypeError(`${r.name||"(intermediate value)"} is not a constructor`);let i=[];for(let a=0;a<e.arguments.length;a++){const s=e.arguments[a];s.type==="SpreadElement"?i=i.concat($e(s,t)):i.push(y(s,t))}return new r(...i)}function ys(e,t){if(e.meta.name==="new"&&e.property.name==="target")return t.find(ot).get();if(e.meta.name==="import"&&e.property.name==="meta")return{url:""}}function ms(e,t){let r;for(let i=0;i<e.expressions.length;i++)r=y(e.expressions[i],t);return r}function gs(e,t){return Z(e,t)}function xs(e,t){const r=e.quasis.slice(),i=e.expressions.slice();let a="",s,n;for(;s=r.shift();)a+=Yi(s),n=i.shift(),n&&(a+=y(n,t));return a}function bs(e,t){const r=y(e.tag,t),i=e.quasi.quasis,a=i.map(l=>l.value.cooked),s=i.map(l=>l.value.raw);w(a,"raw",{value:ze(s)});const n=e.quasi.expressions,u=[];if(n)for(let l=0;l<n.length;l++)u.push(y(n[l],t));return r(ze(a),...u)}function Yi(e,t){return e.value.raw}function vs(e,t){if(e.id&&e.id.name){const r=new P(t),i=qe(e,r);return r.const(e.id.name,i),i}else return qe(e,t)}function Zi(e,t,r={}){const{getProto:i=!1}=r,a=t.find(st).get();return i?a.prototype:a}function $e(e,t,r={}){const i=y(e.argument,t);if(r.spreadProps)return i;if(typeof Symbol=="function"&&typeof i[Symbol.iterator]!="function")throw new TypeError("Spread syntax requires ...iterable[Symbol.iterator] to be a function");return[...i]}function Ss(e,t){return y(e.expression,t)}function ws(e,t){const r=t.global(),i=y(e.source,t),a=r.find(ge+i);let s;if(a){const n=a.get();n&&(typeof n=="function"?s=n():typeof n=="object"&&(s=n))}return!s||typeof s!="object"?Promise.reject(new TypeError(`Failed to resolve module specifier "${i}"`)):Promise.resolve(s)}const ks=Object.freeze(Object.defineProperty({__proto__:null,ArrayExpression:as,ArrowFunctionExpression:gs,AssignmentExpression:cs,BinaryExpression:ls,CallExpression:ps,ChainExpression:Ss,ClassExpression:vs,ConditionalExpression:fs,FunctionExpression:ns,ImportExpression:ws,LogicalExpression:hs,MemberExpression:Ue,MetaProperty:ys,NewExpression:ds,ObjectExpression:ss,SequenceExpression:ms,SpreadElement:$e,Super:Zi,TaggedTemplateExpression:bs,TemplateElement:Yi,TemplateLiteral:xs,ThisExpression:rs,UnaryExpression:os,UpdateExpression:us},Symbol.toStringTag,{value:"Module"}));function Ji(e,t,r={}){const{kind:i="var",hoist:a=!1,onlyBlock:s=!1,feed:n={}}=r,u=[];for(let l=0;l<e.properties.length;l++){const c=e.properties[l];if(a){if(s||i==="var")if(c.type==="Property"){const h=c.value;h.type==="Identifier"?t[i](h.name,s?F:i==="var"?O:void 0):M(h,t,{kind:i,hoist:a,onlyBlock:s})}else Pe(c,t,{kind:i,hoist:a,onlyBlock:s})}else if(c.type==="Property"){let h;c.computed?h=y(c.key,t):h=c.key.name,u.push(h);const p=c.value;p.type==="Identifier"?t[i](p.name,n[h]):M(p,t,{kind:i,feed:n[h]})}else{const h=N({},n);for(let p=0;p<u.length;p++)delete h[u[p]];Pe(c,t,{kind:i,feed:h})}}}function er(e,t,r={}){const{kind:i,hoist:a=!1,onlyBlock:s=!1,feed:n=[]}=r,u=[];for(let l=0;l<e.elements.length;l++){const c=e.elements[l];if(c)if(a)(s||i==="var")&&(c.type==="Identifier"?t[i](c.name,s?F:i==="var"?O:void 0):M(c,t,{kind:i,hoist:a,onlyBlock:s}));else if(c.type==="Identifier")if(i)t[i](c.name,n[l]);else{const h=pe(c,t,{getVar:!0});h.set(n[l]),u.push(h.get())}else c.type==="RestElement"?Pe(c,t,{kind:i,feed:n.slice(l)}):M(c,t,{kind:i,feed:n[l]})}if(u.length)return u}function Pe(e,t,r={}){const{kind:i,hoist:a=!1,onlyBlock:s=!1,feed:n=[]}=r,u=e.argument;a?(s||i==="var")&&(u.type==="Identifier"?t[i](u.name,s?F:i==="var"?O:void 0):M(u,t,{kind:i,hoist:a,onlyBlock:s})):u.type==="Identifier"?i?t[i](u.name,n):pe(u,t,{getVar:!0}).set(n):M(u,t,{kind:i,feed:n})}function tr(e,t,r={}){const{kind:i="var",hoist:a=!1,onlyBlock:s=!1,feed:n=y(e.right,t)}=r,u=e.left;a?(s||i==="var")&&(u.type==="Identifier"?t[i](u.name,s?F:i==="var"?O:void 0):M(u,t,{kind:i,hoist:a,onlyBlock:s})):u.type==="Identifier"?t[i](u.name,n):M(u,t,{kind:i,feed:n})}const Es=Object.freeze(Object.defineProperty({__proto__:null,ArrayPattern:er,AssignmentPattern:tr,ObjectPattern:Ji,RestElement:Pe},Symbol.toStringTag,{value:"Module"}));function Cs(e,t){for(let r=0;r<e.body.length;r++)y(e.body[r],t)}const _s=Object.freeze(Object.defineProperty({__proto__:null,Program:Cs},Symbol.toStringTag,{value:"Module"}));let At;function y(e,t){if(!e)return;At||(At=N({},br,ks,ts,xr,is,Es,_s));const r=At[e.type];if(r)return r(e,t);throw new Error(`${e.type} isn't implemented`)}function Is(e,t){y(e.expression,t)}function se(e,t,r={}){const{invasived:i=!1,hoisted:a=!1}=r,s=i?t:new P(t);a||Lt(e,s,{onlyBlock:!0});for(let n=0;n<e.body.length;n++){const u=y(e.body[n],s);if(u===I){if(u.LABEL&&u.LABEL===r.label)break;return u}if(u===_||u===E)return u}}function As(){}function Ps(){debugger}function Ls(e,t){return E.RES=e.argument?y(e.argument,t):void 0,E}function Vs(e){var t;return I.LABEL=(t=e.label)==null?void 0:t.name,I}function Ts(e){var t;return _.LABEL=(t=e.label)==null?void 0:t.name,_}function Ns(e,t){const r=e.label.name;if(e.body.type==="WhileStatement")return ur(e.body,t,{label:r});if(e.body.type==="DoWhileStatement")return lr(e.body,t,{label:r});if(e.body.type==="ForStatement")return cr(e.body,t,{label:r});if(e.body.type==="ForInStatement")return hr(e.body,t,{label:r});if(e.body.type==="ForOfStatement")return fr(e.body,t,{label:r});if(e.body.type==="BlockStatement")return se(e.body,t,{label:r});if(e.body.type==="WithStatement")return ir(e.body,t,{label:r});if(e.body.type==="IfStatement")return rr(e.body,t,{label:r});if(e.body.type==="SwitchStatement")return ar(e.body,t,{label:r});if(e.body.type==="TryStatement")return nr(e.body,t,{label:r});throw new SyntaxError(`${e.body.type} cannot be labeled`)}function ir(e,t,r={}){const i=new P(t);i.with(y(e.object,t));const a=y(e.body,i);if(a===I)return a.LABEL&&a.LABEL===r.label?void 0:a;if(a===_||a===E)return a}function rr(e,t,r={}){let i;if(y(e.test,t)?i=y(e.consequent,t):i=y(e.alternate,t),i===I)return i.LABEL&&i.LABEL===r.label?void 0:i;if(i===_||i===E)return i}function ar(e,t,r={}){const i=y(e.discriminant,t);let a=!1;for(let s=0;s<e.cases.length;s++){const n=e.cases[s];if(!a&&(!n.test||y(n.test,t)===i)&&(a=!0),a){const u=sr(n,t);if(u===I){if(u.LABEL===r.label)break;return u}if(u===_||u===E)return u}}}function sr(e,t){for(let r=0;r<e.consequent.length;r++){const i=y(e.consequent[r],t);if(i===I||i===_||i===E)return i}}function Rs(e,t){throw y(e.argument,t)}function nr(e,t,r={}){let i;try{i=se(e.block,t)}catch(a){if(e.handler){const s=new P(t),n=e.handler.param;if(n)if(n.type==="Identifier"){const u=n.name;s.var(u,a)}else M(n,t,{feed:a});i=or(e.handler,s)}else throw a}finally{e.finalizer&&(i=se(e.finalizer,t))}if(i===I)return i.LABEL&&i.LABEL===r.label?void 0:i;if(i===_||i===E)return i}function or(e,t){return se(e.body,t,{invasived:!0})}function ur(e,t,r={}){for(;y(e.test,t);){const i=y(e.body,t);if(i===I){if(i.LABEL===r.label)break;return i}else if(i===_){if(i.LABEL===r.label)continue;return i}else if(i===E)return i}}function lr(e,t,r={}){do{const i=y(e.body,t);if(i===I){if(i.LABEL===r.label)break;return i}else if(i===_){if(i.LABEL===r.label)continue;return i}else if(i===E)return i}while(y(e.test,t))}function cr(e,t,r={}){const i=new P(t);for(y(e.init,i);!e.test||y(e.test,i);y(e.update,i)){const a=new P(i);let s;if(e.body.type==="BlockStatement"?s=se(e.body,a,{invasived:!0}):s=y(e.body,a),s===I){if(s.LABEL===r.label)break;return s}else if(s===_){if(s.LABEL===r.label)continue;return s}else if(s===E)return s}}function hr(e,t,r={}){for(const i in y(e.right,t)){const a=gr(e,t,{value:i});if(a===I){if(a.LABEL===r.label)break;return a}else if(a===_){if(a.LABEL===r.label)continue;return a}else if(a===E)return a}}function fr(e,t,r={}){const i=y(e.right,t);for(const a of i){const s=gr(e,t,{value:a});if(s===I){if(s.LABEL===r.label)break;return s}else if(s===_){if(s.LABEL===r.label)continue;return s}else if(s===E)return s}}function Bs(e,t){t.func(e.id.name,Z(e,t))}function be(e,t,r={}){for(let i=0;i<e.declarations.length;i++)pr(e.declarations[i],t,N({kind:e.kind},r))}function pr(e,t,r={}){const{kind:i="var",hoist:a=!1,onlyBlock:s=!1,feed:n}=r;if(a)(s||i==="var")&&(e.id.type==="Identifier"?t[i](e.id.name,s?F:i==="var"?O:void 0):M(e.id,t,{kind:i,hoist:a,onlyBlock:s}));else{const u="feed"in r,l=u?n:y(e.init,t);if(e.id.type==="Identifier"){const c=e.id.name;i==="var"&&!e.init&&!u?t.var(c,O):t[i](c,l),e.init&&["ClassExpression","FunctionExpression","ArrowFunctionExpression"].indexOf(e.init.type)!==-1&&!l.name&&w(l,"name",{value:c,configurable:!0})}else M(e.id,t,{kind:i,feed:l})}}function Os(e,t){t.func(e.id.name,qe(e,t))}function dr(e,t,r={}){const{klass:i,superClass:a}=r;for(let s=0;s<e.body.length;s++){const n=e.body[s];n.type==="MethodDefinition"?yr(n,t,{klass:i,superClass:a}):n.type==="PropertyDefinition"&&n.static?Pt(n,t,{klass:i,superClass:a}):n.type==="StaticBlock"&&mr(n,t,{klass:i})}}function yr(e,t,r={}){const{klass:i,superClass:a}=r;let s,n=!1;if(e.computed)s=y(e.key,t);else if(e.key.type==="Identifier")s=e.key.name;else if(e.key.type==="PrivateIdentifier")s=e.key.name,n=!0;else throw new SyntaxError("Unexpected token");let u=e.static?i:i.prototype;n&&(u[T]||w(u,T,{value:{}}),u=u[T]);const l=Z(e.value,t,{superClass:a});switch(e.kind){case"constructor":break;case"method":w(u,s,{value:l,writable:!0,configurable:!0});break;case"get":{const c=ue(u,s);w(u,s,{get:l,set:c&&c.set,configurable:!0});break}case"set":{const c=ue(u,s);w(u,s,{get:c&&c.get,set:l,configurable:!0});break}default:throw new SyntaxError("Unexpected token")}}function Pt(e,t,r={}){const{klass:i,superClass:a}=r;let s,n=!1;if(e.computed)s=y(e.key,t);else if(e.key.type==="Identifier")s=e.key.name;else if(e.key.type==="PrivateIdentifier")s=e.key.name,n=!0;else throw new SyntaxError("Unexpected token");const u=new P(t,!0);u.const("this",i);let l=i;n&&(l[T]||w(l,T,{value:{}}),l=l[T]),e.value?e.value.type==="FunctionExpression"||e.value.type==="ArrowFunctionExpression"?l[s]=Z(e.value,u,{superClass:a}):l[s]=y(e.value,u):l[s]=void 0}function mr(e,t,r={}){const{klass:i}=r,a=new P(t,!0);return a.const("this",i),se(e,a,{invasived:!0})}function Ds(e,t){const i=t.global().find(ge+e.source.value);let a;if(i){const s=i.get();s&&(typeof s=="function"?a=s():typeof s=="object"&&(a=s))}if(!a||typeof a!="object")throw new TypeError(`Failed to resolve module specifier "${e.source.value}"`);for(let s=0;s<e.specifiers.length;s++){const n=e.specifiers[s];let u;if(n.type==="ImportSpecifier"?u=n.imported.type==="Identifier"?n.imported.name:n.imported.value:n.type==="ImportDefaultSpecifier"?u="default":n.type==="ImportNamespaceSpecifier"&&(u="*"),u!=="*"&&!lt(a,u))throw new SyntaxError(`The requested module "${e.source.value}" does not provide an export named "${u}"`);t.var(n.local.name,u==="*"?N({},a):a[u])}}function Fs(e,t){const r=t.global();let i;e.declaration.type==="FunctionDeclaration"?(i=Z(e.declaration,t),t.func(e.declaration.id.name,i)):e.declaration.type==="ClassDeclaration"?(i=qe(e.declaration,t),t.func(e.declaration.id.name,i)):i=y(e.declaration,t);const a=r.find(U);if(a){const s=a.get();s&&typeof s=="object"&&(s.default=i)}}function Ms(e,t){const r=t.global();if(e.declaration){if(e.declaration.type==="FunctionDeclaration"){const i=Z(e.declaration,t);t.func(e.declaration.id.name,i);const a=r.find(U);if(a){const s=a.get();s&&typeof s=="object"&&(s[e.declaration.id.name]=i)}}else if(e.declaration.type==="ClassDeclaration"){const i=qe(e.declaration,t);t.func(e.declaration.id.name,i);const a=r.find(U);if(a){const s=a.get();s&&typeof s=="object"&&(s[e.declaration.id.name]=i)}}else if(e.declaration.type==="VariableDeclaration"){be(e.declaration,t);const i=r.find(U);if(i){const a=i.get();if(a&&typeof a=="object")for(let s=0;s<e.declaration.declarations.length;s++){const n=e.declaration.declarations[s].id.name,u=t.find(n);u&&(a[n]=u.get())}}}}else if(e.specifiers){const i=r.find(U);if(i){const a=i.get();if(a&&typeof a=="object")for(let s=0;s<e.specifiers.length;s++){const n=e.specifiers[s],u=n.local.type==="Identifier"?n.local.name:n.local.value,l=t.find(u);l&&(a[n.exported.type==="Identifier"?n.exported.name:n.exported.value]=l.get())}}}}function js(e,t){const r=t.global(),i=r.find(ge+e.source.value);let a;if(i){const n=i.get();n&&(typeof n=="function"?a=n():typeof n=="object"&&(a=n))}if(!a||typeof a!="object")throw new TypeError(`Failed to resolve module specifier "${e.source.value}"`);const s=r.find(U);if(s){const n=s.get();n&&typeof n=="object"&&N(n,a)}}function Lt(e,t,r={}){const{onlyBlock:i=!1}=r,a=[],s=[];for(let n=0;n<e.body.length;n++){const u=e.body[n];u.type==="FunctionDeclaration"?(a.push(u),s.push(n)):u.type==="VariableDeclaration"&&["const","let"].indexOf(u.kind)!==-1?be(u,t,{hoist:!0,onlyBlock:!0}):i||ne(u,t)}if(s.length){for(let n=s.length-1;n>-1;n--)e.body.splice(s[n],1);e.body=a.concat(e.body)}}function ne(e,t){switch(e.type){case"VariableDeclaration":be(e,t,{hoist:!0});break;case"ForInStatement":case"ForOfStatement":e.left.type==="VariableDeclaration"&&be(e.left,t,{hoist:!0});case"ForStatement":e.type==="ForStatement"&&e.init.type==="VariableDeclaration"&&be(e.init,t,{hoist:!0});case"WhileStatement":case"DoWhileStatement":ne(e.body,t);break;case"IfStatement":ne(e.consequent,t),e.alternate&&ne(e.alternate,t);break;case"BlockStatement":for(let r=0;r<e.body.length;r++)ne(e.body[r],t);break;case"SwitchStatement":for(let r=0;r<e.cases.length;r++)for(let i=0;i<e.cases[r].consequent.length;i++)ne(e.cases[r].consequent[i],t);break;case"TryStatement":{const r=e.block.body;for(let s=0;s<r.length;s++)ne(r[s],t);const i=e.handler&&e.handler.body.body;if(i)for(let s=0;s<i.length;s++)ne(i[s],t);const a=e.finalizer&&e.finalizer.body;if(a)for(let s=0;s<a.length;s++)ne(a[s],t);break}}}function M(e,t,r={}){switch(e.type){case"ObjectPattern":return Ji(e,t,r);case"ArrayPattern":return er(e,t,r);case"RestElement":return Pe(e,t,r);case"AssignmentPattern":return tr(e,t,r);default:throw new SyntaxError("Unexpected token")}}function Z(e,t,r={}){var c;if(e.generator||e.async)return J(e,t,r);const{superClass:i,construct:a}=r,s=e.params;let u=function(...h){const p=new P(t,!0);e.type!=="ArrowFunctionExpression"&&(p.let("this",this),p.let("arguments",arguments),p.const(ot,new.target),i?(p.const(st,i),a&&p.let(he,a)):a&&a(this));for(let C=0;C<s.length;C++){const L=s[C];L.type==="Identifier"?p.var(L.name,h[C]):L.type==="RestElement"?Pe(L,p,{kind:"var",feed:h.slice(C)}):M(L,p,{kind:"var",feed:h[C]})}let S;if(e.body.type==="BlockStatement"?(Lt(e.body,p),S=se(e.body,p,{invasived:!0,hoisted:!0})):(S=y(e.body,p),e.type==="ArrowFunctionExpression"&&(E.RES=S,S=E)),S===E)return S.RES;if(new.target)return p.find("this").get()};e.type==="ArrowFunctionExpression"&&w(u,nt,{value:!0}),w(u,"name",{value:e.id&&e.id.name||"",configurable:!0}),w(u,"length",{value:s.length,configurable:!0});const l=(c=e.loc)==null?void 0:c.source;return l&&w(u,"toString",{value:()=>l.substring(e.start,e.end),configurable:!0}),u}function qe(e,t){const r=y(e.superClass,t),i=e.body.body,a=function(n){for(let u=0;u<i.length;u++){const l=i[u];l.type==="PropertyDefinition"&&!l.static&&Pt(l,t,{klass:n,superClass:r})}};let s=function(){const n=r?Ge(this,r):this;return a(n),n};for(let n=0;n<i.length;n++){const u=i[n];if(u.type==="MethodDefinition"&&u.kind==="constructor"){s=Z(u.value,t,{superClass:r,construct:a});break}}return r&&Ut(s,r),dr(e.body,t,{klass:s,superClass:r}),w(s,_e,{value:!0}),w(s,"name",{value:e.id&&e.id.name||"",configurable:!0}),s}function gr(e,t,r){const{value:i}=r,a=e.left,s=new P(t);a.type==="VariableDeclaration"?be(a,s,{feed:i}):a.type==="Identifier"?pe(a,t,{getVar:!0}).set(i):M(a,t,{feed:i});let n;return e.body.type==="BlockStatement"?n=se(e.body,s,{invasived:!0}):n=y(e.body,s),n}function*Vt(e,t,r={}){const{onlyBlock:i=!1}=r,a=[],s=[];for(let n=0;n<e.body.length;n++){const u=e.body[n];u.type==="FunctionDeclaration"?(a.push(u),s.push(n)):u.type==="VariableDeclaration"&&["const","let"].indexOf(u.kind)!==-1?yield*xe(u,t,{hoist:!0,onlyBlock:!0}):i||(yield*oe(u,t))}if(s.length){for(let n=s.length-1;n>-1;n--)e.body.splice(s[n],1);e.body=a.concat(e.body)}}function*oe(e,t){switch(e.type){case"VariableDeclaration":yield*xe(e,t,{hoist:!0});break;case"ForInStatement":case"ForOfStatement":e.left.type==="VariableDeclaration"&&(yield*xe(e.left,t,{hoist:!0}));case"ForStatement":e.type==="ForStatement"&&e.init.type==="VariableDeclaration"&&(yield*xe(e.init,t,{hoist:!0}));case"WhileStatement":case"DoWhileStatement":yield*oe(e.body,t);break;case"IfStatement":yield*oe(e.consequent,t),e.alternate&&(yield*oe(e.alternate,t));break;case"BlockStatement":for(let r=0;r<e.body.length;r++)yield*oe(e.body[r],t);break;case"SwitchStatement":for(let r=0;r<e.cases.length;r++)for(let i=0;i<e.cases[r].consequent.length;i++)yield*oe(e.cases[r].consequent[i],t);break;case"TryStatement":{const r=e.block.body;for(let s=0;s<r.length;s++)yield*oe(r[s],t);const i=e.handler&&e.handler.body.body;if(i)for(let s=0;s<i.length;s++)yield*oe(i[s],t);const a=e.finalizer&&e.finalizer.body;if(a)for(let s=0;s<a.length;s++)yield*oe(a[s],t);break}}}function*j(e,t,r={}){switch(e.type){case"ObjectPattern":return yield*Ti(e,t,r);case"ArrayPattern":return yield*Ni(e,t,r);case"RestElement":return yield*Ae(e,t,r);case"AssignmentPattern":return yield*Ri(e,t,r);default:throw new SyntaxError("Unexpected token")}}function J(e,t,r={}){var c;if(!e.generator&&!e.async)return Z(e,t,r);const{superClass:i,construct:a}=r,s=e.params,n=function*(...h){const p=new P(t,!0);e.type!=="ArrowFunctionExpression"&&(p.let("this",this),p.let("arguments",arguments),p.const(ot,new.target),i?(p.const(st,i),a&&p.let(he,a)):a&&(yield*a(this)));for(let C=0;C<s.length;C++){const L=s[C];L.type==="Identifier"?p.var(L.name,h[C]):L.type==="RestElement"?yield*Ae(L,p,{kind:"var",feed:h.slice(C)}):yield*j(L,p,{kind:"var",feed:h[C]})}let S;if(e.body.type==="BlockStatement"?(yield*Vt(e.body,p),S=yield*ae(e.body,p,{invasived:!0,hoisted:!0})):(S=yield*d(e.body,p),e.type==="ArrowFunctionExpression"&&(E.RES=S,S=E)),S===E)return S.RES;if(new.target)return p.find("this").get()};let u;e.async&&e.generator?u=function(){const h=n.apply(this,arguments);let p=Promise.resolve(),S=!1;const C=K=>p=p.then(()=>Ct(h,N({fullRet:!0},K))).catch(de=>{if(!S)return S=!0,Promise.reject(de)}),L={next:K=>C({res:K}),throw:K=>C({err:K}),return:K=>C({ret:K})};return typeof Symbol=="function"&&(L[Symbol.iterator]=function(){return this}),L}:e.async?u=function(){return Ct(n.apply(this,arguments))}:u=n,w(u,nt,{value:!0}),w(u,"name",{value:e.id&&e.id.name||"",configurable:!0}),w(u,"length",{value:s.length,configurable:!0});const l=(c=e.loc)==null?void 0:c.source;return l&&w(u,"toString",{value:()=>l.substring(e.start,e.end),configurable:!0}),u}function*We(e,t){const r=yield*d(e.superClass,t),i=e.body.body,a=function*(n){for(let u=0;u<i.length;u++){const l=i[u];l.type==="PropertyDefinition"&&!l.static&&(yield*It(l,t,{klass:n,superClass:r}))}};let s=function*(){const n=r?Ge(this,r):this;return yield*a(n),n};for(let n=0;n<i.length;n++){const u=i[n];if(u.type==="MethodDefinition"&&u.kind==="constructor"){s=J(u.value,t,{superClass:r,construct:a});break}}return r&&Ut(s,r),yield*Hi(e.body,t,{klass:s,superClass:r}),w(s,_e,{value:!0}),w(s,"name",{value:e.id&&e.id.name||"",configurable:!0}),s}function*Tt(e,t,r){const{value:i}=r,a=e.left,s=new P(t);a.type==="VariableDeclaration"?yield*xe(a,s,{feed:i}):a.type==="Identifier"?(yield*pe(a,t,{getVar:!0})).set(i):yield*j(a,t,{feed:i});let n;return e.body.type==="BlockStatement"?n=yield*ae(e.body,s,{invasived:!0}):n=yield*d(e.body,s),n}const Us=15,Rt=class Rt{constructor(t={}){this.options={ecmaVersion:"latest"},this.scope=new P(null,!0),this.exports={};let{ecmaVer:r="latest",sandBox:i=!0,sourceType:a="script"}=t;if(typeof r=="number"&&(r-=r<2015?0:2009),r!=="latest"&&r!==3&&(r<5||r>Us))throw new Error("unsupported ecmaVer");if(this.options.ecmaVersion=r,this.options.sourceType=a,i){const s=Er();this.scope.let("globalThis",s),this.scope.let("window",s),this.scope.let("self",s),this.scope.let("this",s)}else this.scope.let("globalThis",f),this.scope.let("window",f),this.scope.let("self",f),this.scope.let("this",f);this.scope.const(a==="module"?U:"exports",this.exports={})}import(t,r){if(typeof t=="string"&&(t={[t]:r}),typeof t!="object")return;const i=ct(t);for(let a=0;a<i.length;a++){const s=i[a],n=this.options.sourceType==="module"?ge+s:s;this.scope.var(n,t[s])}}parse(t,r){return typeof r=="function"?r(t,N({},this.options)):ha(t,this.options)}run(t){const r=typeof t=="string"?this.parse(t):t,i=this.scope;this.options.sourceType==="module"&&(this.options.ecmaVersion==="latest"||this.options.ecmaVersion>=13)?Ct(function*(){yield*Vt(r,i),yield*d(r,i)}()):(Lt(r,i),y(r,i))}};Rt.version=fa.version;let Nt=Rt;return Nt});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sval",
3
- "version": "0.6.6",
3
+ "version": "0.6.7",
4
4
  "description": "A javascript interpreter written in javascript",
5
5
  "type": "module",
6
6
  "main": "dist/sval.min.js",
@@ -14,8 +14,8 @@
14
14
  },
15
15
  "scripts": {
16
16
  "start": "vite",
17
- "build": "npm test && vite build && swc dist/sval.js -o dist/sval.min.js",
18
- "test": "node scripts && vitest run --coverage"
17
+ "test": "node scripts && vitest run --coverage",
18
+ "build": "npm test && vite build && node scripts/legacy.js"
19
19
  },
20
20
  "repository": {
21
21
  "type": "git",
@@ -38,7 +38,6 @@
38
38
  "acorn": "^8.14.0"
39
39
  },
40
40
  "devDependencies": {
41
- "@swc/cli": "^0.7.3",
42
41
  "@swc/core": "^1.11.24",
43
42
  "@types/node": "^22.15.3",
44
43
  "@vitest/coverage-v8": "^3.1.2",